Index: chrome/service/cloud_print/cloud_print_connector.cc |
diff --git a/chrome/service/cloud_print/cloud_print_connector.cc b/chrome/service/cloud_print/cloud_print_connector.cc |
index 244babfbb8be3277971bff5d33041027dc175683..59845e88491ca685b71c42c83d1e1f73e4699460 100644 |
--- a/chrome/service/cloud_print/cloud_print_connector.cc |
+++ b/chrome/service/cloud_print/cloud_print_connector.cc |
@@ -34,9 +34,6 @@ CloudPrintConnector::CloudPrintConnector( |
} |
} |
-CloudPrintConnector::~CloudPrintConnector() { |
-} |
- |
bool CloudPrintConnector::Start() { |
DCHECK(!print_system_.get()); |
VLOG(1) << "CP_CONNECTOR: Starting connector, id: " << proxy_id_; |
@@ -145,6 +142,17 @@ CloudPrintURLFetcher::ResponseAction CloudPrintConnector::HandleJSONData( |
return (this->*next_response_handler_)(source, url, json_data, succeeded); |
} |
+CloudPrintURLFetcher::ResponseAction CloudPrintConnector::OnRequestAuthError() { |
+ OnAuthError(); |
+ return CloudPrintURLFetcher::STOP_PROCESSING; |
+} |
+ |
+std::string CloudPrintConnector::GetAuthHeader() { |
+ return CloudPrintHelpers::GetCloudPrintAuthHeader(); |
+} |
+ |
+CloudPrintConnector::~CloudPrintConnector() {} |
+ |
CloudPrintURLFetcher::ResponseAction |
CloudPrintConnector::HandlePrinterListResponse( |
const content::URLFetcher* source, |
@@ -246,15 +254,6 @@ CloudPrintConnector::HandleRegisterPrinterResponse( |
} |
-CloudPrintURLFetcher::ResponseAction CloudPrintConnector::OnRequestAuthError() { |
- OnAuthError(); |
- return CloudPrintURLFetcher::STOP_PROCESSING; |
-} |
- |
-std::string CloudPrintConnector::GetAuthHeader() { |
- return CloudPrintHelpers::GetCloudPrintAuthHeader(); |
-} |
- |
void CloudPrintConnector::StartGetRequest(const GURL& url, |
int max_retries, |
ResponseHandler handler) { |
@@ -409,6 +408,18 @@ void CloudPrintConnector::ProcessPendingTask() { |
} |
} |
+void CloudPrintConnector::ContinuePendingTaskProcessing() { |
+ if (pending_tasks_.size() == 0) |
+ return; // No pending tasks. |
+ |
+ // Delete current task and repost if we have more task available. |
+ pending_tasks_.pop_front(); |
+ if (pending_tasks_.size() != 0) { |
+ MessageLoop::current()->PostTask( |
+ FROM_HERE, base::Bind(&CloudPrintConnector::ProcessPendingTask, this)); |
+ } |
+} |
+ |
void CloudPrintConnector::OnPrintersAvailable() { |
GURL printer_list_url = |
CloudPrintHelpers::GetUrlForPrinterList(cloud_print_server_url_, |
@@ -455,18 +466,6 @@ void CloudPrintConnector::OnPrinterDelete(const std::string& printer_id) { |
&CloudPrintConnector::HandlePrinterDeleteResponse); |
} |
-void CloudPrintConnector::ContinuePendingTaskProcessing() { |
- if (pending_tasks_.size() == 0) |
- return; // No pending tasks. |
- |
- // Delete current task and repost if we have more task available. |
- pending_tasks_.pop_front(); |
- if (pending_tasks_.size() != 0) { |
- MessageLoop::current()->PostTask( |
- FROM_HERE, base::Bind(&CloudPrintConnector::ProcessPendingTask, this)); |
- } |
-} |
- |
void CloudPrintConnector::OnReceivePrinterCaps( |
bool succeeded, |
const std::string& printer_name, |