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/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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 // Init() should not reenter this function. Updating | 434 // Init() should not reenter this function. Updating |
435 // |created_browser_policy_connector_| here makes reentering hit the DCHECK. | 435 // |created_browser_policy_connector_| here makes reentering hit the DCHECK. |
436 created_browser_policy_connector_ = true; | 436 created_browser_policy_connector_ = true; |
437 } | 437 } |
438 return browser_policy_connector_.get(); | 438 return browser_policy_connector_.get(); |
439 } | 439 } |
440 | 440 |
441 policy::PolicyService* BrowserProcessImpl::policy_service() { | 441 policy::PolicyService* BrowserProcessImpl::policy_service() { |
442 if (!policy_service_.get()) { | 442 if (!policy_service_.get()) { |
443 #if defined(ENABLE_CONFIGURATION_POLICY) | 443 #if defined(ENABLE_CONFIGURATION_POLICY) |
444 policy_service_.reset( | 444 policy_service_ = browser_policy_connector()->CreatePolicyService(NULL); |
445 browser_policy_connector()->CreatePolicyService(NULL)); | |
446 #else | 445 #else |
447 policy_service_.reset(new policy::PolicyServiceStub()); | 446 policy_service_.reset(new policy::PolicyServiceStub()); |
448 #endif | 447 #endif |
449 } | 448 } |
450 return policy_service_.get(); | 449 return policy_service_.get(); |
451 } | 450 } |
452 | 451 |
453 IconManager* BrowserProcessImpl::icon_manager() { | 452 IconManager* BrowserProcessImpl::icon_manager() { |
454 DCHECK(CalledOnValidThread()); | 453 DCHECK(CalledOnValidThread()); |
455 if (!created_icon_manager_) | 454 if (!created_icon_manager_) |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 } | 918 } |
920 | 919 |
921 void BrowserProcessImpl::OnAutoupdateTimer() { | 920 void BrowserProcessImpl::OnAutoupdateTimer() { |
922 if (CanAutorestartForUpdate()) { | 921 if (CanAutorestartForUpdate()) { |
923 DLOG(WARNING) << "Detected update. Restarting browser."; | 922 DLOG(WARNING) << "Detected update. Restarting browser."; |
924 RestartBackgroundInstance(); | 923 RestartBackgroundInstance(); |
925 } | 924 } |
926 } | 925 } |
927 | 926 |
928 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 927 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |