Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(604)

Side by Side Diff: chrome/service/service_process.cc

Issue 11360151: Move common cloud print methods from service/cloud_print to common/cloud_print. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/service/service_process.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/service_process.h" 5 #include "chrome/service/service_process.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 // If there are no enabled services or if there is an update available 263 // If there are no enabled services or if there is an update available
264 // we want to shutdown right away. Else we want to keep listening for 264 // we want to shutdown right away. Else we want to keep listening for
265 // new connections. 265 // new connections.
266 if (!enabled_services_ || update_available()) { 266 if (!enabled_services_ || update_available()) {
267 Shutdown(); 267 Shutdown();
268 return false; 268 return false;
269 } 269 }
270 return true; 270 return true;
271 } 271 }
272 272
273 CloudPrintProxy* ServiceProcess::GetCloudPrintProxy() { 273 cloud_print::CloudPrintProxy* ServiceProcess::GetCloudPrintProxy() {
274 if (!cloud_print_proxy_.get()) { 274 if (!cloud_print_proxy_.get()) {
275 cloud_print_proxy_.reset(new CloudPrintProxy()); 275 cloud_print_proxy_.reset(new cloud_print::CloudPrintProxy());
276 cloud_print_proxy_->Initialize(service_prefs_.get(), this); 276 cloud_print_proxy_->Initialize(service_prefs_.get(), this);
277 } 277 }
278 return cloud_print_proxy_.get(); 278 return cloud_print_proxy_.get();
279 } 279 }
280 280
281 void ServiceProcess::OnCloudPrintProxyEnabled(bool persist_state) { 281 void ServiceProcess::OnCloudPrintProxyEnabled(bool persist_state) {
282 if (persist_state) { 282 if (persist_state) {
283 // Save the preference that we have enabled the cloud print proxy. 283 // Save the preference that we have enabled the cloud print proxy.
284 service_prefs_->SetBoolean(prefs::kCloudPrintProxyEnabled, true); 284 service_prefs_->SetBoolean(prefs::kCloudPrintProxyEnabled, true);
285 service_prefs_->WritePrefs(); 285 service_prefs_->WritePrefs();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 if (enabled_services_ && !ipc_server_->is_client_connected()) { 360 if (enabled_services_ && !ipc_server_->is_client_connected()) {
361 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy(); 361 GetCloudPrintProxy()->CheckCloudPrintProxyPolicy();
362 } 362 }
363 ScheduleCloudPrintPolicyCheck(); 363 ScheduleCloudPrintPolicyCheck();
364 } 364 }
365 365
366 ServiceProcess::~ServiceProcess() { 366 ServiceProcess::~ServiceProcess() {
367 Teardown(); 367 Teardown();
368 g_service_process = NULL; 368 g_service_process = NULL;
369 } 369 }
OLDNEW
« no previous file with comments | « chrome/service/service_process.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698