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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account_policy_provider.cc

Issue 1825173003: [Policy Experimental] Add "recommended" policies for URL exceptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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/browser/chromeos/policy/device_local_account_policy_provider.h" 5 #include "chrome/browser/chromeos/policy/device_local_account_policy_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 weak_factory_.InvalidateWeakPtrs(); 168 weak_factory_.InvalidateWeakPtrs();
169 bundle->CopyFrom(policies()); 169 bundle->CopyFrom(policies());
170 } 170 }
171 171
172 // Apply overrides. 172 // Apply overrides.
173 if (chrome_policy_overrides_) { 173 if (chrome_policy_overrides_) {
174 PolicyMap& chrome_policy = 174 PolicyMap& chrome_policy =
175 bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); 175 bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()));
176 for (PolicyMap::const_iterator it(chrome_policy_overrides_->begin()); 176 for (PolicyMap::const_iterator it(chrome_policy_overrides_->begin());
177 it != chrome_policy_overrides_->end(); 177 it != chrome_policy_overrides_->end();
178 ++it) { 178 chrome_policy_overrides_.next_dominant(&it)) {
179 const PolicyMap::Entry& entry = it->second; 179 const PolicyMap::Entry& entry = it->second;
180 chrome_policy.Set(it->first, 180 chrome_policy.Set(it->first,
181 entry.level, 181 entry.level,
182 entry.scope, 182 entry.scope,
183 entry.source, 183 entry.source,
184 entry.value->DeepCopy(), 184 entry.value->DeepCopy(),
185 nullptr); 185 nullptr);
186 } 186 }
187 } 187 }
188 188
189 UpdatePolicy(std::move(bundle)); 189 UpdatePolicy(std::move(bundle));
190 } 190 }
191 191
192 } // namespace policy 192 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698