onCloudPrintSearchDone_(event) {
      if (event.printers) {
        this.insertDestinations_(event.printers);
      }
      if (event.searchDone) {
        const origins = this.loadedCloudOrigins_[event.user] || [];
        if (origins.indexOf(event.origin) < 0) {
          this.loadedCloudOrigins_[event.user] = origins.concat([event.origin]);
        }
      }
      cr.dispatchSimpleEvent(
          this, DestinationStore.EventType.DESTINATION_SEARCH_DONE);
    }
/**
     * Called when the /search call completes, either successfully or not.
     * In case of success, stores fetched destinations.
     * @param {Event} event Contains the request result.
     * @private
     */
Called when the /search call completes, either successfully or not.
In case of success, stores fetched destinations.
@param {Event} event Contains the request result.
@private
Called when the / search call completes either successfully or not . In case of success stores fetched destinations . @param { Event } event Contains the request result . @private
onCloudPrintSearchDone_(event) {
      if (event.printers) {
        this.insertDestinations_(event.printers);
      }
      if (event.searchDone) {
        const origins = this.loadedCloudOrigins_[event.user] || [];
        if (origins.indexOf(event.origin) < 0) {
          this.loadedCloudOrigins_[event.user] = origins.concat([event.origin]);
        }
      }
      cr.dispatchSimpleEvent(
          this, DestinationStore.EventType.DESTINATION_SEARCH_DONE);
    }
onCloudPrintSearchDone_ ( event ) { if ( event . printers ) { this . insertDestinations_ ( event . printers ) ; } if ( event . searchDone ) { const origins = this . loadedCloudOrigins_ [ event . user ] || [ ] ; if ( origins . indexOf ( event . origin ) < 0 ) { this . loadedCloudOrigins_ [ event . user ] = origins . concat ( [ event . origin ] ) ; } } cr . dispatchSimpleEvent ( this , DestinationStore . EventType . DESTINATION_SEARCH_DONE ) ; }
Called when the /search call completes, either successfully or not.
Called when the / search call completes either successfully or not .