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

Unified Diff: chrome/test/base/testing_profile.cc

Issue 1786263002: Remove uses of ENABLE_CONFIGURATION_POLICY from src/chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sort Created 4 years, 9 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/test/base/testing_profile.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/testing_profile.cc
diff --git a/chrome/test/base/testing_profile.cc b/chrome/test/base/testing_profile.cc
index 9c64443a7fcb9f811d99effbcbd74321ab3604d5..8edc7dcdff4d750bb92b4a6a30b67cdbd50d6d08 100644
--- a/chrome/test/base/testing_profile.cc
+++ b/chrome/test/base/testing_profile.cc
@@ -33,6 +33,8 @@
#include "chrome/browser/net/proxy_service_factory.h"
#include "chrome/browser/policy/profile_policy_connector.h"
#include "chrome/browser/policy/profile_policy_connector_factory.h"
+#include "chrome/browser/policy/schema_registry_service.h"
+#include "chrome/browser/policy/schema_registry_service_factory.h"
#include "chrome/browser/prefs/browser_prefs.h"
#include "chrome/browser/prefs/pref_service_syncable_util.h"
#include "chrome/browser/prerender/prerender_manager.h"
@@ -66,7 +68,10 @@
#include "components/omnibox/browser/autocomplete_classifier.h"
#include "components/omnibox/browser/history_index_restore_observer.h"
#include "components/omnibox/browser/in_memory_url_index.h"
+#include "components/policy/core/common/configuration_policy_provider.h"
#include "components/policy/core/common/policy_service.h"
+#include "components/policy/core/common/policy_service_impl.h"
+#include "components/policy/core/common/schema.h"
#include "components/prefs/testing_pref_store.h"
#include "components/proxy_config/pref_proxy_config_tracker.h"
#include "components/syncable_prefs/pref_service_syncable.h"
@@ -89,16 +94,6 @@
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
-#if defined(ENABLE_CONFIGURATION_POLICY)
-#include "chrome/browser/policy/schema_registry_service.h"
-#include "chrome/browser/policy/schema_registry_service_factory.h"
-#include "components/policy/core/common/configuration_policy_provider.h"
-#include "components/policy/core/common/policy_service_impl.h"
-#include "components/policy/core/common/schema.h"
-#else
-#include "components/policy/core/common/policy_service_stub.h"
-#endif // defined(ENABLE_CONFIGURATION_POLICY)
-
#if defined(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_special_storage_policy.h"
@@ -763,21 +758,15 @@ void TestingProfile::CreateIncognitoPrefService() {
}
void TestingProfile::CreateProfilePolicyConnector() {
-#if defined(ENABLE_CONFIGURATION_POLICY)
schema_registry_service_ =
policy::SchemaRegistryServiceFactory::CreateForContext(
this, policy::Schema(), NULL);
CHECK_EQ(schema_registry_service_.get(),
policy::SchemaRegistryServiceFactory::GetForContext(this));
-#endif // defined(ENABLE_CONFIGURATION_POLICY)
-if (!policy_service_) {
-#if defined(ENABLE_CONFIGURATION_POLICY)
+ if (!policy_service_) {
std::vector<policy::ConfigurationPolicyProvider*> providers;
policy_service_.reset(new policy::PolicyServiceImpl(providers));
-#else
- policy_service_.reset(new policy::PolicyServiceStub());
-#endif
}
profile_policy_connector_.reset(new policy::ProfilePolicyConnector());
profile_policy_connector_->InitForTesting(std::move(policy_service_));
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698