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

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

Issue 228553002: Preference dis/allowing supervised users creation is now available as owner setting, not only as de… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test-specific logic added: check for BrowserPolicyConnector existence used. Created 6 years, 7 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 <vector> 9 #include <vector>
10 10
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 DCHECK(!browser_policy_connector_); 482 DCHECK(!browser_policy_connector_);
483 browser_policy_connector_ = platform_part_->CreateBrowserPolicyConnector(); 483 browser_policy_connector_ = platform_part_->CreateBrowserPolicyConnector();
484 created_browser_policy_connector_ = true; 484 created_browser_policy_connector_ = true;
485 } 485 }
486 return browser_policy_connector_.get(); 486 return browser_policy_connector_.get();
487 #else 487 #else
488 return NULL; 488 return NULL;
489 #endif 489 #endif
490 } 490 }
491 491
492 bool BrowserProcessImpl::is_browser_policy_connector_created() {
493 return created_browser_policy_connector_;
494 }
495
492 policy::PolicyService* BrowserProcessImpl::policy_service() { 496 policy::PolicyService* BrowserProcessImpl::policy_service() {
493 #if defined(ENABLE_CONFIGURATION_POLICY) 497 #if defined(ENABLE_CONFIGURATION_POLICY)
494 return browser_policy_connector()->GetPolicyService(); 498 return browser_policy_connector()->GetPolicyService();
495 #else 499 #else
496 if (!policy_service_.get()) 500 if (!policy_service_.get())
497 policy_service_.reset(new policy::PolicyServiceStub()); 501 policy_service_.reset(new policy::PolicyServiceStub());
498 return policy_service_.get(); 502 return policy_service_.get();
499 #endif 503 #endif
500 } 504 }
501 505
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 } 1044 }
1041 1045
1042 void BrowserProcessImpl::OnAutoupdateTimer() { 1046 void BrowserProcessImpl::OnAutoupdateTimer() {
1043 if (CanAutorestartForUpdate()) { 1047 if (CanAutorestartForUpdate()) {
1044 DLOG(WARNING) << "Detected update. Restarting browser."; 1048 DLOG(WARNING) << "Detected update. Restarting browser.";
1045 RestartBackgroundInstance(); 1049 RestartBackgroundInstance();
1046 } 1050 }
1047 } 1051 }
1048 1052
1049 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1053 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698