| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |