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/browser/printing/cloud_print/cloud_print_proxy_service.h" | 5 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "chrome/common/cloud_print/cloud_print_proxy_info.h" | 28 #include "chrome/common/cloud_print/cloud_print_proxy_info.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
30 #include "chrome/common/service_messages.h" | 30 #include "chrome/common/service_messages.h" |
31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
32 #include "printing/backend/print_backend.h" | 32 #include "printing/backend/print_backend.h" |
33 | 33 |
34 using content::BrowserThread; | 34 using content::BrowserThread; |
35 | 35 |
36 CloudPrintProxyService::CloudPrintProxyService(Profile* profile) | 36 CloudPrintProxyService::CloudPrintProxyService(Profile* profile) |
37 : profile_(profile), | 37 : profile_(profile), |
38 weak_factory_(this), | 38 enforcing_connector_policy_(false), |
39 enforcing_connector_policy_(false) { | 39 weak_factory_(this) { |
40 } | 40 } |
41 | 41 |
42 CloudPrintProxyService::~CloudPrintProxyService() { | 42 CloudPrintProxyService::~CloudPrintProxyService() { |
43 } | 43 } |
44 | 44 |
45 void CloudPrintProxyService::Initialize() { | 45 void CloudPrintProxyService::Initialize() { |
46 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 46 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
47 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents", | 47 UMA_HISTOGRAM_ENUMERATION("CloudPrint.ServiceEvents", |
48 ServiceProcessControl::SERVICE_EVENT_INITIALIZE, | 48 ServiceProcessControl::SERVICE_EVENT_INITIALIZE, |
49 ServiceProcessControl::SERVICE_EVENT_MAX); | 49 ServiceProcessControl::SERVICE_EVENT_MAX); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 221 } |
222 | 222 |
223 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { | 223 bool CloudPrintProxyService::InvokeServiceTask(const base::Closure& task) { |
224 GetServiceProcessControl()->Launch(task, base::Closure()); | 224 GetServiceProcessControl()->Launch(task, base::Closure()); |
225 return true; | 225 return true; |
226 } | 226 } |
227 | 227 |
228 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() { | 228 ServiceProcessControl* CloudPrintProxyService::GetServiceProcessControl() { |
229 return ServiceProcessControl::GetInstance(); | 229 return ServiceProcessControl::GetInstance(); |
230 } | 230 } |
OLD | NEW |