OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/cloud/component_cloud_policy_store.h" | 5 #include "chrome/browser/policy/cloud/component_cloud_policy_store.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/sha1.h" | 10 #include "base/sha1.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" | 13 #include "chrome/browser/policy/cloud/cloud_policy_constants.h" |
14 #include "chrome/browser/policy/cloud/cloud_policy_validator.h" | 14 #include "chrome/browser/policy/cloud/cloud_policy_validator.h" |
15 #include "chrome/browser/policy/cloud/resource_cache.h" | 15 #include "chrome/browser/policy/cloud/resource_cache.h" |
16 #include "chrome/browser/policy/external_data_fetcher.h" | 16 #include "chrome/browser/policy/external_data_fetcher.h" |
17 #include "chrome/browser/policy/policy_map.h" | 17 #include "chrome/browser/policy/policy_map.h" |
18 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" | 18 #include "chrome/browser/policy/proto/cloud/chrome_extension_policy.pb.h" |
19 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | 19 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" |
20 #include "url/gurl.h" | 20 #include "url/gurl.h" |
21 | 21 |
22 namespace em = enterprise_management; | 22 namespace em = enterprise_management; |
23 | 23 |
24 namespace policy { | 24 namespace policy { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 const char kValue[] = "Value"; | 28 const char kValue[] = "Value"; |
29 const char kLevel[] = "Level"; | 29 const char kLevel[] = "Level"; |
30 const char kMandatory[] = "Mandatory"; | |
31 const char kRecommended[] = "Recommended"; | 30 const char kRecommended[] = "Recommended"; |
32 | 31 |
33 const struct DomainConstants { | 32 const struct DomainConstants { |
34 PolicyDomain domain; | 33 PolicyDomain domain; |
35 const char* proto_cache_key; | 34 const char* proto_cache_key; |
36 const char* data_cache_key; | 35 const char* data_cache_key; |
37 const char* policy_type; | 36 const char* policy_type; |
38 } kDomains[] = { | 37 } kDomains[] = { |
39 { | 38 { |
40 POLICY_DOMAIN_EXTENSIONS, | 39 POLICY_DOMAIN_EXTENSIONS, |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 // If policy for components is ever used for device-level settings then | 335 // If policy for components is ever used for device-level settings then |
337 // this must support a configurable scope; assuming POLICY_SCOPE_USER is | 336 // this must support a configurable scope; assuming POLICY_SCOPE_USER is |
338 // fine for now. | 337 // fine for now. |
339 policy->Set(it.key(), level, POLICY_SCOPE_USER, value.release(), NULL); | 338 policy->Set(it.key(), level, POLICY_SCOPE_USER, value.release(), NULL); |
340 } | 339 } |
341 | 340 |
342 return true; | 341 return true; |
343 } | 342 } |
344 | 343 |
345 } // namespace policy | 344 } // namespace policy |
OLD | NEW |