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

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 10693022: Add support for loading user cloud policy on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed redundant #ifdef OS_CHROMEOS guard Created 8 years, 4 months 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
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/browser/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // Init() should not reenter this function. Updating 435 // Init() should not reenter this function. Updating
436 // |created_browser_policy_connector_| here makes reentering hit the DCHECK. 436 // |created_browser_policy_connector_| here makes reentering hit the DCHECK.
437 created_browser_policy_connector_ = true; 437 created_browser_policy_connector_ = true;
438 } 438 }
439 return browser_policy_connector_.get(); 439 return browser_policy_connector_.get();
440 } 440 }
441 441
442 policy::PolicyService* BrowserProcessImpl::policy_service() { 442 policy::PolicyService* BrowserProcessImpl::policy_service() {
443 if (!policy_service_.get()) { 443 if (!policy_service_.get()) {
444 #if defined(ENABLE_CONFIGURATION_POLICY) 444 #if defined(ENABLE_CONFIGURATION_POLICY)
445 policy_service_.reset( 445 policy_service_ = browser_policy_connector()->CreatePolicyService(NULL);
446 browser_policy_connector()->CreatePolicyService(NULL));
447 #else 446 #else
448 policy_service_.reset(new policy::PolicyServiceStub()); 447 policy_service_.reset(new policy::PolicyServiceStub());
449 #endif 448 #endif
450 } 449 }
451 return policy_service_.get(); 450 return policy_service_.get();
452 } 451 }
453 452
454 IconManager* BrowserProcessImpl::icon_manager() { 453 IconManager* BrowserProcessImpl::icon_manager() {
455 DCHECK(CalledOnValidThread()); 454 DCHECK(CalledOnValidThread());
456 if (!created_icon_manager_) 455 if (!created_icon_manager_)
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 } 919 }
921 920
922 void BrowserProcessImpl::OnAutoupdateTimer() { 921 void BrowserProcessImpl::OnAutoupdateTimer() {
923 if (CanAutorestartForUpdate()) { 922 if (CanAutorestartForUpdate()) {
924 DLOG(WARNING) << "Detected update. Restarting browser."; 923 DLOG(WARNING) << "Detected update. Restarting browser.";
925 RestartBackgroundInstance(); 924 RestartBackgroundInstance();
926 } 925 }
927 } 926 }
928 927
929 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 928 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/login_utils.cc » ('j') | chrome/browser/chromeos/login/login_utils.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698