OLD | NEW |
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/managed_mode_policy_provider.h" | 5 #include "chrome/browser/policy/managed_mode_policy_provider.h" |
6 | 6 |
7 #include "base/prefs/json_pref_store.h" | 7 #include "base/prefs/json_pref_store.h" |
8 #include "base/threading/sequenced_worker_pool.h" | 8 #include "base/threading/sequenced_worker_pool.h" |
9 #include "chrome/browser/policy/policy_bundle.h" | 9 #include "chrome/browser/policy/policy_bundle.h" |
| 10 #include "chrome/browser/policy/policy_namespace.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/common/chrome_constants.h" | 12 #include "chrome/common/chrome_constants.h" |
12 #include "content/public/browser/browser_thread.h" | 13 #include "content/public/browser/browser_thread.h" |
13 | 14 |
14 using content::BrowserThread; | 15 using content::BrowserThread; |
15 | 16 |
16 namespace policy { | 17 namespace policy { |
17 | 18 |
18 // static | 19 // static |
19 const char ManagedModePolicyProvider::kPolicies[] = "policies"; | 20 const char ManagedModePolicyProvider::kPolicies[] = "policies"; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 void ManagedModePolicyProvider::UpdatePolicyFromCache() { | 104 void ManagedModePolicyProvider::UpdatePolicyFromCache() { |
104 scoped_ptr<PolicyBundle> policy_bundle(new PolicyBundle); | 105 scoped_ptr<PolicyBundle> policy_bundle(new PolicyBundle); |
105 PolicyMap* policy_map = | 106 PolicyMap* policy_map = |
106 &policy_bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); | 107 &policy_bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())); |
107 policy_map->LoadFrom(GetCachedPolicy(), | 108 policy_map->LoadFrom(GetCachedPolicy(), |
108 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); | 109 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER); |
109 UpdatePolicy(policy_bundle.Pass()); | 110 UpdatePolicy(policy_bundle.Pass()); |
110 } | 111 } |
111 | 112 |
112 } // namespace policy | 113 } // namespace policy |
OLD | NEW |