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

Unified Diff: chrome/test/testing_browser_process.h

Issue 6312121: Add initial device policy infrastructure. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix race condition and tests. Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/test/testing_device_token_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/testing_browser_process.h
diff --git a/chrome/test/testing_browser_process.h b/chrome/test/testing_browser_process.h
index 9655d5ad6e583abfcf8252af92756e713248bec6..60f9ff102693dd88c61ae0c2dd8583ad34a1bccb 100644
--- a/chrome/test/testing_browser_process.h
+++ b/chrome/test/testing_browser_process.h
@@ -19,9 +19,9 @@
#include "base/synchronization/waitable_event.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/google/google_url_tracker.h"
+#include "chrome/browser/policy/browser_policy_context.h"
#include "chrome/browser/policy/configuration_policy_pref_store.h"
#include "chrome/browser/policy/configuration_policy_provider.h"
-#include "chrome/browser/policy/configuration_policy_provider_keeper.h"
#include "chrome/browser/policy/dummy_configuration_policy_provider.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/notification_service.h"
@@ -35,8 +35,7 @@ class TestingBrowserProcess : public BrowserProcess {
: shutdown_event_(new base::WaitableEvent(true, false)),
module_ref_count_(0),
app_locale_("en"),
- pref_service_(NULL),
- created_configuration_policy_provider_keeper_(false) {
+ pref_service_(NULL) {
}
virtual ~TestingBrowserProcess() {
@@ -83,21 +82,17 @@ class TestingBrowserProcess : public BrowserProcess {
return pref_service_;
}
- virtual policy::ConfigurationPolicyProviderKeeper*
- configuration_policy_provider_keeper() {
- if (!created_configuration_policy_provider_keeper_) {
- DCHECK(configuration_policy_provider_keeper_.get() == NULL);
- created_configuration_policy_provider_keeper_ = true;
+ virtual policy::BrowserPolicyContext* browser_policy_context() {
+ if (!browser_policy_context_.get()) {
const policy::ConfigurationPolicyProvider::PolicyDefinitionList*
policy_list = policy::ConfigurationPolicyPrefStore::
GetChromePolicyDefinitionList();
- configuration_policy_provider_keeper_.reset(
- new policy::ConfigurationPolicyProviderKeeper(
- new policy::DummyConfigurationPolicyProvider(policy_list),
+ browser_policy_context_.reset(
+ new policy::BrowserPolicyContext(
new policy::DummyConfigurationPolicyProvider(policy_list),
new policy::DummyConfigurationPolicyProvider(policy_list)));
}
- return configuration_policy_provider_keeper_.get();
+ return browser_policy_context_.get();
}
virtual IconManager* icon_manager() {
@@ -219,9 +214,7 @@ class TestingBrowserProcess : public BrowserProcess {
std::string app_locale_;
PrefService* pref_service_;
- bool created_configuration_policy_provider_keeper_;
- scoped_ptr<policy::ConfigurationPolicyProviderKeeper>
- configuration_policy_provider_keeper_;
+ scoped_ptr<policy::BrowserPolicyContext> browser_policy_context_;
scoped_ptr<GoogleURLTracker> google_url_tracker_;
DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess);
« no previous file with comments | « chrome/common/pref_names.cc ('k') | chrome/test/testing_device_token_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698