| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy_backend.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class CloudPrintProxyBackend::Core | 37 class CloudPrintProxyBackend::Core |
| 38 : public base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>, | 38 : public base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>, |
| 39 public CloudPrintURLFetcherDelegate, | 39 public CloudPrintURLFetcherDelegate, |
| 40 public cloud_print::PrintServerWatcherDelegate, | 40 public cloud_print::PrintServerWatcherDelegate, |
| 41 public PrinterJobHandlerDelegate, | 41 public PrinterJobHandlerDelegate, |
| 42 public notifier::TalkMediator::Delegate, | 42 public notifier::TalkMediator::Delegate, |
| 43 public gaia::GaiaOAuthClient::Delegate { | 43 public gaia::GaiaOAuthClient::Delegate { |
| 44 public: | 44 public: |
| 45 // It is OK for print_server_url to be empty. In this case system should | 45 // It is OK for print_server_url to be empty. In this case system should |
| 46 // use system default (local) print server. | 46 // use system default (local) print server. |
| 47 explicit Core(CloudPrintProxyBackend* backend, | 47 Core(CloudPrintProxyBackend* backend, |
| 48 const GURL& cloud_print_server_url, | 48 const GURL& cloud_print_server_url, |
| 49 const DictionaryValue* print_system_settings, | 49 const DictionaryValue* print_system_settings, |
| 50 const gaia::OAuthClientInfo& oauth_client_info, | 50 const gaia::OAuthClientInfo& oauth_client_info, |
| 51 bool enable_job_poll); | 51 bool enable_job_poll); |
| 52 | 52 |
| 53 // Note: | 53 // Note: |
| 54 // | 54 // |
| 55 // The Do* methods are the various entry points from CloudPrintProxyBackend | 55 // The Do* methods are the various entry points from CloudPrintProxyBackend |
| 56 // It calls us on a dedicated thread to actually perform synchronous | 56 // It calls us on a dedicated thread to actually perform synchronous |
| 57 // (and potentially blocking) operations. | 57 // (and potentially blocking) operations. |
| 58 // | 58 // |
| 59 // Called on the CloudPrintProxyBackend core_thread_ to perform | 59 // Called on the CloudPrintProxyBackend core_thread_ to perform |
| 60 // initialization. When we are passed in an LSID we authenticate using that | 60 // initialization. When we are passed in an LSID we authenticate using that |
| 61 // and retrieve new auth tokens. | 61 // and retrieve new auth tokens. |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 OnAuthError(); | 1159 OnAuthError(); |
| 1160 } | 1160 } |
| 1161 | 1161 |
| 1162 void CloudPrintProxyBackend::Core::OnNetworkError(int response_code) { | 1162 void CloudPrintProxyBackend::Core::OnNetworkError(int response_code) { |
| 1163 // Since we specify inifinite retries on network errors, this should never | 1163 // Since we specify inifinite retries on network errors, this should never |
| 1164 // be called. | 1164 // be called. |
| 1165 NOTREACHED() << | 1165 NOTREACHED() << |
| 1166 "OnNetworkError invoked when not expected, response code is " << | 1166 "OnNetworkError invoked when not expected, response code is " << |
| 1167 response_code; | 1167 response_code; |
| 1168 } | 1168 } |
| OLD | NEW |