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

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

Issue 22493010: policy: load JSON schema into domain descriptor at start time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments and clean up includes Created 7 years, 3 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
Index: chrome/browser/policy/async_policy_loader.cc
diff --git a/chrome/browser/policy/async_policy_loader.cc b/chrome/browser/policy/async_policy_loader.cc
index 05c1bb09537f80fb4df33e1b208dedc0ca4d2815..f482e2063e6a85958bc0d7a8a9c1b89d55d14a84 100644
--- a/chrome/browser/policy/async_policy_loader.cc
+++ b/chrome/browser/policy/async_policy_loader.cc
@@ -70,10 +70,8 @@ void AsyncPolicyLoader::Reload(bool force) {
void AsyncPolicyLoader::RegisterPolicyDomain(
scoped_refptr<const PolicyDomainDescriptor> descriptor) {
- if (descriptor->domain() != POLICY_DOMAIN_CHROME) {
- descriptor_map_[descriptor->domain()] = descriptor;
- Reload(true);
- }
+ InitialRegisterPolicyDomain(descriptor);
+ Reload(true);
}
scoped_ptr<PolicyBundle> AsyncPolicyLoader::InitialLoad() {
@@ -84,6 +82,11 @@ scoped_ptr<PolicyBundle> AsyncPolicyLoader::InitialLoad() {
return Load();
}
+void AsyncPolicyLoader::InitialRegisterPolicyDomain(
+ scoped_refptr<const PolicyDomainDescriptor> descriptor) {
+ descriptor_map_[descriptor->domain()] = descriptor;
+}
+
void AsyncPolicyLoader::Init(const UpdateCallback& update_callback) {
DCHECK(task_runner_->RunsTasksOnCurrentThread());
DCHECK(update_callback_.is_null());

Powered by Google App Engine
This is Rietveld 408576698