OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 } | 42 } |
43 | 43 |
44 // This method is invoked on the IO thread to launch the browser process to | 44 // This method is invoked on the IO thread to launch the browser process to |
45 // display a desktop notification that the Cloud Print token is invalid and | 45 // display a desktop notification that the Cloud Print token is invalid and |
46 // needs re-authentication. | 46 // needs re-authentication. |
47 void ShowTokenExpiredNotificationInBrowser() { | 47 void ShowTokenExpiredNotificationInBrowser() { |
48 LaunchBrowserProcessWithSwitch(switches::kNotifyCloudPrintTokenExpired); | 48 LaunchBrowserProcessWithSwitch(switches::kNotifyCloudPrintTokenExpired); |
49 } | 49 } |
50 | 50 |
51 void CheckCloudPrintProxyPolicyInBrowser() { | 51 void CheckCloudPrintProxyPolicyInBrowser() { |
| 52 // crbug.com/128541, speculative temporary workaround for the crash. |
| 53 // TODO(scottbyer): Find the real problem and put this back in. |
| 54 #if !defined(OS_WIN) |
52 LaunchBrowserProcessWithSwitch(switches::kCheckCloudPrintConnectorPolicy); | 55 LaunchBrowserProcessWithSwitch(switches::kCheckCloudPrintConnectorPolicy); |
| 56 #endif |
53 } | 57 } |
54 | 58 |
55 } // namespace | 59 } // namespace |
56 | 60 |
57 CloudPrintProxy::CloudPrintProxy() | 61 CloudPrintProxy::CloudPrintProxy() |
58 : service_prefs_(NULL), | 62 : service_prefs_(NULL), |
59 client_(NULL), | 63 client_(NULL), |
60 enabled_(false) { | 64 enabled_(false) { |
61 } | 65 } |
62 | 66 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 // Finish disabling cloud print for this user. | 281 // Finish disabling cloud print for this user. |
278 DisableForUser(); | 282 DisableForUser(); |
279 } | 283 } |
280 | 284 |
281 void CloudPrintProxy::ShutdownBackend() { | 285 void CloudPrintProxy::ShutdownBackend() { |
282 DCHECK(CalledOnValidThread()); | 286 DCHECK(CalledOnValidThread()); |
283 if (backend_.get()) | 287 if (backend_.get()) |
284 backend_->Shutdown(); | 288 backend_->Shutdown(); |
285 backend_.reset(); | 289 backend_.reset(); |
286 } | 290 } |
OLD | NEW |