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

Side by Side Diff: components/policy/core/browser/configuration_policy_handler.cc

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/policy/configuration_policy_handler.h" 5 #include "components/policy/core/browser/configuration_policy_handler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/prefs/pref_value_map.h" 12 #include "base/prefs/pref_value_map.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "base/strings/string_number_conversions.h" 14 #include "base/strings/string_number_conversions.h"
15 #include "base/strings/string_util.h" 15 #include "base/strings/string_util.h"
16 #include "chrome/browser/policy/configuration_policy_pref_store.h" 16 #include "components/policy/core/browser/configuration_policy_pref_store.h"
17 #include "components/policy/core/browser/policy_error_map.h" 17 #include "components/policy/core/browser/policy_error_map.h"
18 #include "components/policy/core/common/policy_map.h" 18 #include "components/policy/core/common/policy_map.h"
19 #include "grit/component_strings.h" 19 #include "grit/component_strings.h"
20 #include "url/gurl.h" 20 #include "url/gurl.h"
21 21
22 namespace policy { 22 namespace policy {
23 23
24 // ConfigurationPolicyHandler implementation ----------------------------------- 24 // ConfigurationPolicyHandler implementation -----------------------------------
25 25
26 // static 26 // static
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, 289 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
290 PrefValueMap* prefs) { 290 PrefValueMap* prefs) {
291 if (!pref_path_) 291 if (!pref_path_)
292 return; 292 return;
293 const Value* value = policies.GetValue(policy_name()); 293 const Value* value = policies.GetValue(policy_name());
294 if (value) 294 if (value)
295 prefs->SetValue(pref_path_, value->DeepCopy()); 295 prefs->SetValue(pref_path_, value->DeepCopy());
296 } 296 }
297 297
298 } // namespace policy 298 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698