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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // request_context is NULL in unit tests. | 145 // request_context is NULL in unit tests. |
146 if (request_context && install_attributes_) { | 146 if (request_context && install_attributes_) { |
147 app_pack_updater_.reset( | 147 app_pack_updater_.reset( |
148 new AppPackUpdater(request_context, install_attributes_.get())); | 148 new AppPackUpdater(request_context, install_attributes_.get())); |
149 } | 149 } |
150 | 150 |
151 SetTimezoneIfPolicyAvailable(); | 151 SetTimezoneIfPolicyAvailable(); |
152 | 152 |
153 network_configuration_updater_ = | 153 network_configuration_updater_ = |
154 DeviceNetworkConfigurationUpdater::CreateForDevicePolicy( | 154 DeviceNetworkConfigurationUpdater::CreateForDevicePolicy( |
155 scoped_ptr<chromeos::onc::CertificateImporter>( | |
156 new chromeos::onc::CertificateImporterImpl), | |
157 GetPolicyService(), | 155 GetPolicyService(), |
158 chromeos::NetworkHandler::Get() | 156 chromeos::NetworkHandler::Get() |
159 ->managed_network_configuration_handler(), | 157 ->managed_network_configuration_handler(), |
160 chromeos::NetworkHandler::Get()->network_device_handler(), | 158 chromeos::NetworkHandler::Get()->network_device_handler(), |
161 chromeos::CrosSettings::Get()); | 159 chromeos::CrosSettings::Get()); |
162 } | 160 } |
163 | 161 |
164 void BrowserPolicyConnectorChromeOS::Shutdown() { | 162 void BrowserPolicyConnectorChromeOS::Shutdown() { |
165 // The AppPackUpdater may be observing the |device_cloud_policy_manager_|. | 163 // The AppPackUpdater may be observing the |device_cloud_policy_manager_|. |
166 // Delete it first. | 164 // Delete it first. |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 std::string timezone; | 240 std::string timezone; |
243 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy, | 241 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy, |
244 &timezone) && | 242 &timezone) && |
245 !timezone.empty()) { | 243 !timezone.empty()) { |
246 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( | 244 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( |
247 base::UTF8ToUTF16(timezone)); | 245 base::UTF8ToUTF16(timezone)); |
248 } | 246 } |
249 } | 247 } |
250 | 248 |
251 } // namespace policy | 249 } // namespace policy |
OLD | NEW |