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/browser_policy_connector.h" | 5 #include "chrome/browser/policy/browser_policy_connector.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 #include "chrome/browser/chromeos/login/user_manager.h" | 53 #include "chrome/browser/chromeos/login/user_manager.h" |
54 #include "chrome/browser/chromeos/policy/app_pack_updater.h" | 54 #include "chrome/browser/chromeos/policy/app_pack_updater.h" |
55 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 55 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
56 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" | 56 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
57 #include "chrome/browser/chromeos/policy/device_local_account.h" | 57 #include "chrome/browser/chromeos/policy/device_local_account.h" |
58 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 58 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
59 #include "chrome/browser/chromeos/policy/device_status_collector.h" | 59 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
60 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 60 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
61 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" | 61 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" |
62 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl.h" | 62 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl.h" |
63 #include "chrome/browser/chromeos/policy/network_configuration_updater_impl_cros .h" | |
63 #include "chrome/browser/chromeos/settings/cros_settings.h" | 64 #include "chrome/browser/chromeos/settings/cros_settings.h" |
64 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" | 65 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" |
65 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 66 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
66 #include "chrome/browser/chromeos/system/statistics_provider.h" | 67 #include "chrome/browser/chromeos/system/statistics_provider.h" |
67 #include "chrome/browser/chromeos/system/timezone_settings.h" | 68 #include "chrome/browser/chromeos/system/timezone_settings.h" |
68 #include "chromeos/chromeos_paths.h" | 69 #include "chromeos/chromeos_paths.h" |
69 #include "chromeos/chromeos_switches.h" | 70 #include "chromeos/chromeos_switches.h" |
70 #include "chromeos/cryptohome/cryptohome_library.h" | 71 #include "chromeos/cryptohome/cryptohome_library.h" |
71 #include "chromeos/dbus/cryptohome_client.h" | 72 #include "chromeos/dbus/cryptohome_client.h" |
72 #include "chromeos/dbus/dbus_thread_manager.h" | 73 #include "chromeos/dbus/dbus_thread_manager.h" |
73 #include "chromeos/network/certificate_handler.h" | |
74 #include "chromeos/network/managed_network_configuration_handler.h" | 74 #include "chromeos/network/managed_network_configuration_handler.h" |
75 #include "chromeos/network/onc/onc_certificate_importer_impl.h" | |
75 #endif | 76 #endif |
76 | 77 |
77 using content::BrowserThread; | 78 using content::BrowserThread; |
78 | 79 |
79 namespace policy { | 80 namespace policy { |
80 | 81 |
81 namespace { | 82 namespace { |
82 | 83 |
83 // The following constants define delays applied before the initial policy fetch | 84 // The following constants define delays applied before the initial policy fetch |
84 // on startup. (So that displaying Chrome's GUI does not get delayed.) | 85 // on startup. (So that displaying Chrome's GUI does not get delayed.) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 #endif | 201 #endif |
201 | 202 |
202 policy_statistics_collector_.reset( | 203 policy_statistics_collector_.reset( |
203 new policy::PolicyStatisticsCollector( | 204 new policy::PolicyStatisticsCollector( |
204 GetPolicyService(), | 205 GetPolicyService(), |
205 local_state_, | 206 local_state_, |
206 base::MessageLoop::current()->message_loop_proxy())); | 207 base::MessageLoop::current()->message_loop_proxy())); |
207 policy_statistics_collector_->Initialize(); | 208 policy_statistics_collector_->Initialize(); |
208 | 209 |
209 #if defined(OS_CHROMEOS) | 210 #if defined(OS_CHROMEOS) |
211 scoped_ptr<chromeos::onc::CertificateImporter> cert_importer( | |
212 new chromeos::onc::CertificateImporterImpl); | |
210 network_configuration_updater_.reset( | 213 network_configuration_updater_.reset( |
211 new NetworkConfigurationUpdaterImpl( | 214 new NetworkConfigurationUpdaterImpl( |
212 GetPolicyService(), | 215 GetPolicyService(), |
213 make_scoped_ptr(new chromeos::CertificateHandler))); | 216 cert_importer.Pass())); |
Mattias Nissler (ping if slow)
2013/07/24 11:25:40
why not
make_scoped_ptr<chromeos::onc::Certificat
pneubeck (no reviews)
2013/07/25 08:03:23
Done.
| |
214 #endif | 217 #endif |
215 | 218 |
216 is_initialized_ = true; | 219 is_initialized_ = true; |
217 } | 220 } |
218 | 221 |
219 void BrowserPolicyConnector::Shutdown() { | 222 void BrowserPolicyConnector::Shutdown() { |
220 is_initialized_ = false; | 223 is_initialized_ = false; |
221 | 224 |
222 if (g_testing_provider) | 225 if (g_testing_provider) |
223 g_testing_provider->Shutdown(); | 226 g_testing_provider->Shutdown(); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
473 return new AsyncPolicyProvider(loader.Pass()); | 476 return new AsyncPolicyProvider(loader.Pass()); |
474 } else { | 477 } else { |
475 return NULL; | 478 return NULL; |
476 } | 479 } |
477 #else | 480 #else |
478 return NULL; | 481 return NULL; |
479 #endif | 482 #endif |
480 } | 483 } |
481 | 484 |
482 } // namespace policy | 485 } // namespace policy |
OLD | NEW |