| Index: chrome/service/cloud_print/cloud_print_connector.h
|
| diff --git a/chrome/service/cloud_print/cloud_print_connector.h b/chrome/service/cloud_print/cloud_print_connector.h
|
| index a734b211e99983b9d9a9c05cdf6700e234c5f7b5..aa01d301aabef20a3e7224e6b6d0936143cd2cce 100644
|
| --- a/chrome/service/cloud_print/cloud_print_connector.h
|
| +++ b/chrome/service/cloud_print/cloud_print_connector.h
|
| @@ -39,7 +39,6 @@ class CloudPrintConnector
|
| const std::string& proxy_id,
|
| const GURL& cloud_print_server_url,
|
| const DictionaryValue* print_system_settings);
|
| - virtual ~CloudPrintConnector();
|
|
|
| bool Start();
|
| void Stop();
|
| @@ -63,7 +62,6 @@ class CloudPrintConnector
|
| const content::URLFetcher* source,
|
| const GURL& url,
|
| const std::string& data) OVERRIDE;
|
| -
|
| virtual CloudPrintURLFetcher::ResponseAction HandleJSONData(
|
| const content::URLFetcher* source,
|
| const GURL& url,
|
| @@ -73,6 +71,8 @@ class CloudPrintConnector
|
| virtual std::string GetAuthHeader() OVERRIDE;
|
|
|
| private:
|
| + friend class base::RefCountedThreadSafe<CloudPrintConnector>;
|
| +
|
| // Prototype for a response handler.
|
| typedef CloudPrintURLFetcher::ResponseAction
|
| (CloudPrintConnector::*ResponseHandler)(
|
| @@ -81,6 +81,26 @@ class CloudPrintConnector
|
| DictionaryValue* json_data,
|
| bool succeeded);
|
|
|
| + enum PendingTaskType {
|
| + PENDING_PRINTERS_NONE,
|
| + PENDING_PRINTERS_AVAILABLE,
|
| + PENDING_PRINTER_REGISTER,
|
| + PENDING_PRINTER_DELETE
|
| + };
|
| +
|
| + // TODO(jhawkins): This name conflicts with base::PendingTask.
|
| + struct PendingTask {
|
| + PendingTaskType type;
|
| + // Optional members, depending on type.
|
| + std::string printer_id; // For pending delete.
|
| + printing::PrinterBasicInfo printer_info; // For pending registration.
|
| +
|
| + PendingTask() : type(PENDING_PRINTERS_NONE) {}
|
| + ~PendingTask() {}
|
| + };
|
| +
|
| + virtual ~CloudPrintConnector();
|
| +
|
| // Begin response handlers
|
| CloudPrintURLFetcher::ResponseAction HandlePrinterListResponse(
|
| const content::URLFetcher* source,
|
| @@ -120,24 +140,6 @@ class CloudPrintConnector
|
|
|
| void InitJobHandlerForPrinter(DictionaryValue* printer_data);
|
|
|
| - enum PendingTaskType {
|
| - PENDING_PRINTERS_NONE,
|
| - PENDING_PRINTERS_AVAILABLE,
|
| - PENDING_PRINTER_REGISTER,
|
| - PENDING_PRINTER_DELETE
|
| - };
|
| -
|
| - // TODO(jhawkins): This name conflicts with base::PendingTask.
|
| - struct PendingTask {
|
| - PendingTaskType type;
|
| - // Optional members, depending on type.
|
| - std::string printer_id; // For pending delete.
|
| - printing::PrinterBasicInfo printer_info; // For pending registration.
|
| -
|
| - PendingTask() : type(PENDING_PRINTERS_NONE) {}
|
| - ~PendingTask() {}
|
| - };
|
| -
|
| void AddPendingAvailableTask();
|
| void AddPendingDeleteTask(const std::string& id);
|
| void AddPendingRegisterTask(const printing::PrinterBasicInfo& info);
|
|
|