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

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

Issue 9911029: Refactored the CloudPolicyProvider so that it becomes initialized once and stays initialized. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Updated expectations in failing browser_tests Created 8 years, 8 months 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
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/device_policy_cache.h" 5 #include "chrome/browser/policy/device_policy_cache.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 return Value::CreateIntegerValue(static_cast<int>(value)); 112 return Value::CreateIntegerValue(static_cast<int>(value));
113 } 113 }
114 114
115 } // namespace 115 } // namespace
116 116
117 namespace policy { 117 namespace policy {
118 118
119 DevicePolicyCache::DevicePolicyCache( 119 DevicePolicyCache::DevicePolicyCache(
120 CloudPolicyDataStore* data_store, 120 CloudPolicyDataStore* data_store,
121 EnterpriseInstallAttributes* install_attributes)
122 : data_store_(data_store),
123 install_attributes_(install_attributes),
124 signed_settings_helper_(chromeos::SignedSettingsHelper::Get()),
125 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
126 }
127
128 DevicePolicyCache::DevicePolicyCache(
129 CloudPolicyDataStore* data_store,
130 EnterpriseInstallAttributes* install_attributes, 121 EnterpriseInstallAttributes* install_attributes,
131 chromeos::SignedSettingsHelper* signed_settings_helper) 122 chromeos::SignedSettingsHelper* signed_settings_helper)
132 : data_store_(data_store), 123 : data_store_(data_store),
133 install_attributes_(install_attributes), 124 install_attributes_(install_attributes),
134 signed_settings_helper_(signed_settings_helper), 125 signed_settings_helper_(signed_settings_helper),
135 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) { 126 ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)) {
136 } 127 }
137 128
138 DevicePolicyCache::~DevicePolicyCache() { 129 DevicePolicyCache::~DevicePolicyCache() {
139 } 130 }
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 PolicyMap* policies) { 600 PolicyMap* policies) {
610 // Decode the various groups of policies. 601 // Decode the various groups of policies.
611 DecodeLoginPolicies(policy, policies); 602 DecodeLoginPolicies(policy, policies);
612 DecodeKioskPolicies(policy, policies); 603 DecodeKioskPolicies(policy, policies);
613 DecodeNetworkPolicies(policy, policies); 604 DecodeNetworkPolicies(policy, policies);
614 DecodeReportingPolicies(policy, policies); 605 DecodeReportingPolicies(policy, policies);
615 DecodeGenericPolicies(policy, policies); 606 DecodeGenericPolicies(policy, policies);
616 } 607 }
617 608
618 } // namespace policy 609 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698