OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/policy/browser_policy_connector_chromeos.h" | 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 return app_pack_updater_.get(); | 204 return app_pack_updater_.get(); |
205 } | 205 } |
206 | 206 |
207 void BrowserPolicyConnectorChromeOS::SetUserPolicyDelegate( | 207 void BrowserPolicyConnectorChromeOS::SetUserPolicyDelegate( |
208 ConfigurationPolicyProvider* user_policy_provider) { | 208 ConfigurationPolicyProvider* user_policy_provider) { |
209 global_user_cloud_policy_provider_->SetDelegate(user_policy_provider); | 209 global_user_cloud_policy_provider_->SetDelegate(user_policy_provider); |
210 } | 210 } |
211 | 211 |
212 void BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( | 212 void BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( |
213 EnterpriseInstallAttributes* attributes) { | 213 EnterpriseInstallAttributes* attributes) { |
214 DCHECK((attributes == NULL) != (g_testing_install_attributes == NULL)); | 214 DCHECK(!g_testing_install_attributes); |
215 g_testing_install_attributes = attributes; | 215 g_testing_install_attributes = attributes; |
216 } | 216 } |
217 | 217 |
218 // static | 218 // static |
219 void BrowserPolicyConnectorChromeOS::RegisterPrefs( | 219 void BrowserPolicyConnectorChromeOS::RegisterPrefs( |
220 PrefRegistrySimple* registry) { | 220 PrefRegistrySimple* registry) { |
221 registry->RegisterIntegerPref( | 221 registry->RegisterIntegerPref( |
222 prefs::kDevicePolicyRefreshRate, | 222 prefs::kDevicePolicyRefreshRate, |
223 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs); | 223 CloudPolicyRefreshScheduler::kDefaultRefreshDelayMs); |
224 } | 224 } |
(...skipping 11 matching lines...) Expand all Loading... |
236 std::string timezone; | 236 std::string timezone; |
237 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy, | 237 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy, |
238 &timezone) && | 238 &timezone) && |
239 !timezone.empty()) { | 239 !timezone.empty()) { |
240 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 240 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
241 base::UTF8ToUTF16(timezone)); | 241 base::UTF8ToUTF16(timezone)); |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } // namespace policy | 245 } // namespace policy |
OLD | NEW |