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

Unified Diff: chrome/browser/policy/profile_policy_connector.cc

Issue 775613004: Improve documentation for special-purpose policy providers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@policy_provider_dcheck
Patch Set: Created 6 years 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
Index: chrome/browser/policy/profile_policy_connector.cc
diff --git a/chrome/browser/policy/profile_policy_connector.cc b/chrome/browser/policy/profile_policy_connector.cc
index cd93a32454dc44c42e53117a2562822282a16f12..12b5b44e65566fd688605f7ba6298f9cdcd9f62b 100644
--- a/chrome/browser/policy/profile_policy_connector.cc
+++ b/chrome/browser/policy/profile_policy_connector.cc
@@ -15,8 +15,8 @@
#include "components/policy/core/common/cloud/cloud_policy_manager.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h"
#include "components/policy/core/common/configuration_policy_provider.h"
-#include "components/policy/core/common/forwarding_policy_provider.h"
#include "components/policy/core/common/policy_service_impl.h"
+#include "components/policy/core/common/schema_registry_tracking_policy_provider.h"
#include "google_apis/gaia/gaia_auth_util.h"
#if defined(OS_CHROMEOS)
@@ -84,10 +84,11 @@ void ProfilePolicyConnector::Init(
#endif
if (connector->GetPlatformProvider()) {
- forwarding_policy_provider_.reset(
- new ForwardingPolicyProvider(connector->GetPlatformProvider()));
- forwarding_policy_provider_->Init(schema_registry);
- providers.push_back(forwarding_policy_provider_.get());
+ wrapped_platform_policy_provider_.reset(
+ new SchemaRegistryTrackingPolicyProvider(
+ connector->GetPlatformProvider()));
+ wrapped_platform_policy_provider_->Init(schema_registry);
+ providers.push_back(wrapped_platform_policy_provider_.get());
}
#if defined(OS_CHROMEOS)
@@ -143,8 +144,8 @@ void ProfilePolicyConnector::Shutdown() {
if (special_user_policy_provider_)
special_user_policy_provider_->Shutdown();
#endif
- if (forwarding_policy_provider_)
- forwarding_policy_provider_->Shutdown();
+ if (wrapped_platform_policy_provider_)
+ wrapped_platform_policy_provider_->Shutdown();
}
bool ProfilePolicyConnector::IsManaged() const {
@@ -168,7 +169,7 @@ bool ProfilePolicyConnector::IsPolicyFromCloudPolicy(const char* name) const {
// |user_cloud_policy_manager_|. These checks must be kept in sync with the
// order of the providers in Init().
- if (HasChromePolicy(forwarding_policy_provider_.get(), name))
+ if (HasChromePolicy(wrapped_platform_policy_provider_.get(), name))
return false;
#if defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698