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

Side by Side Diff: chrome/browser/policy/configuration_policy_handler.cc

Issue 78763002: Move PolicyMap and its dependencies to components/policy/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: export nested struct Created 7 years, 1 month 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 "chrome/browser/policy/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/json/json_writer.h" 11 #include "base/json/json_writer.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/prefs/pref_value_map.h" 13 #include "base/prefs/pref_value_map.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_util.h" 16 #include "base/strings/string_util.h"
17 #include "chrome/browser/policy/configuration_policy_pref_store.h" 17 #include "chrome/browser/policy/configuration_policy_pref_store.h"
18 #include "chrome/browser/policy/external_data_fetcher.h"
19 #include "chrome/browser/policy/policy_error_map.h" 18 #include "chrome/browser/policy/policy_error_map.h"
20 #include "chrome/browser/policy/policy_map.h" 19 #include "components/policy/core/common/external_data_fetcher.h"
20 #include "components/policy/core/common/policy_map.h"
21 #include "grit/generated_resources.h" 21 #include "grit/generated_resources.h"
22 #include "url/gurl.h" 22 #include "url/gurl.h"
23 23
24 namespace policy { 24 namespace policy {
25 25
26 namespace { 26 namespace {
27 27
28 // Helper function ------------------------------------------------------------- 28 // Helper function -------------------------------------------------------------
29 29
30 // Utility function that returns a JSON representation of the given |dict| as 30 // Utility function that returns a JSON representation of the given |dict| as
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies, 333 void SimplePolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
334 PrefValueMap* prefs) { 334 PrefValueMap* prefs) {
335 if (!pref_path_) 335 if (!pref_path_)
336 return; 336 return;
337 const Value* value = policies.GetValue(policy_name()); 337 const Value* value = policies.GetValue(policy_name());
338 if (value) 338 if (value)
339 prefs->SetValue(pref_path_, value->DeepCopy()); 339 prefs->SetValue(pref_path_, value->DeepCopy());
340 } 340 }
341 341
342 } // namespace policy 342 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698