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