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/test/base/testing_browser_process.h" | 5 #include "chrome/test/base/testing_browser_process.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "chrome/browser/notifications/notification_ui_manager.h" | 8 #include "chrome/browser/notifications/notification_ui_manager.h" |
9 #include "chrome/browser/policy/browser_policy_connector.h" | 9 #include "chrome/browser/policy/browser_policy_connector.h" |
10 #include "chrome/browser/policy/policy_service.h" | 10 #include "chrome/browser/policy/policy_service.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 chrome_variations::VariationsService* | 68 chrome_variations::VariationsService* |
69 TestingBrowserProcess::variations_service() { | 69 TestingBrowserProcess::variations_service() { |
70 return NULL; | 70 return NULL; |
71 } | 71 } |
72 | 72 |
73 policy::BrowserPolicyConnector* | 73 policy::BrowserPolicyConnector* |
74 TestingBrowserProcess::browser_policy_connector() { | 74 TestingBrowserProcess::browser_policy_connector() { |
75 #if defined(ENABLE_CONFIGURATION_POLICY) | 75 #if defined(ENABLE_CONFIGURATION_POLICY) |
76 if (!browser_policy_connector_.get()) { | 76 if (!browser_policy_connector_.get()) |
77 browser_policy_connector_.reset(new policy::BrowserPolicyConnector()); | 77 browser_policy_connector_.reset(new policy::BrowserPolicyConnector()); |
78 browser_policy_connector_->Init(); | |
79 } | |
80 #endif | 78 #endif |
81 return browser_policy_connector_.get(); | 79 return browser_policy_connector_.get(); |
82 } | 80 } |
83 | 81 |
84 policy::PolicyService* TestingBrowserProcess::policy_service() { | 82 policy::PolicyService* TestingBrowserProcess::policy_service() { |
85 if (!policy_service_.get()) { | 83 if (!policy_service_.get()) { |
86 #if defined(ENABLE_CONFIGURATION_POLICY) | 84 #if defined(ENABLE_CONFIGURATION_POLICY) |
87 policy_service_ = browser_policy_connector()->CreatePolicyService(NULL); | 85 policy_service_ = browser_policy_connector()->CreatePolicyService(NULL); |
88 #else | 86 #else |
89 policy_service_.reset(new policy::PolicyServiceStub()); | 87 policy_service_.reset(new policy::PolicyServiceStub()); |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 270 |
273 void TestingBrowserProcess::SetBrowserPolicyConnector( | 271 void TestingBrowserProcess::SetBrowserPolicyConnector( |
274 policy::BrowserPolicyConnector* connector) { | 272 policy::BrowserPolicyConnector* connector) { |
275 browser_policy_connector_.reset(connector); | 273 browser_policy_connector_.reset(connector); |
276 } | 274 } |
277 | 275 |
278 void TestingBrowserProcess::SetSafeBrowsingService( | 276 void TestingBrowserProcess::SetSafeBrowsingService( |
279 SafeBrowsingService* sb_service) { | 277 SafeBrowsingService* sb_service) { |
280 sb_service_ = sb_service; | 278 sb_service_ = sb_service; |
281 } | 279 } |
OLD | NEW |