| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" | 66 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" |
| 67 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 67 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 68 #include "chrome/browser/chromeos/system/statistics_provider.h" | 68 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 69 #include "chrome/browser/chromeos/system/timezone_settings.h" | 69 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 70 #include "chrome/browser/policy/cloud/resource_cache.h" | 70 #include "chrome/browser/policy/cloud/resource_cache.h" |
| 71 #include "chromeos/chromeos_paths.h" | 71 #include "chromeos/chromeos_paths.h" |
| 72 #include "chromeos/chromeos_switches.h" | 72 #include "chromeos/chromeos_switches.h" |
| 73 #include "chromeos/cryptohome/cryptohome_library.h" | 73 #include "chromeos/cryptohome/cryptohome_library.h" |
| 74 #include "chromeos/dbus/cryptohome_client.h" | 74 #include "chromeos/dbus/cryptohome_client.h" |
| 75 #include "chromeos/dbus/dbus_thread_manager.h" | 75 #include "chromeos/dbus/dbus_thread_manager.h" |
| 76 #include "chromeos/network/certificate_handler.h" |
| 77 #include "chromeos/network/managed_network_configuration_handler.h" |
| 76 #else | 78 #else |
| 77 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" | 79 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" |
| 78 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" | 80 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" |
| 79 #endif | 81 #endif |
| 80 | 82 |
| 81 using content::BrowserThread; | 83 using content::BrowserThread; |
| 82 | 84 |
| 83 namespace policy { | 85 namespace policy { |
| 84 | 86 |
| 85 namespace { | 87 namespace { |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 return app_pack_updater_.get(); | 403 return app_pack_updater_.get(); |
| 402 } | 404 } |
| 403 | 405 |
| 404 NetworkConfigurationUpdater* | 406 NetworkConfigurationUpdater* |
| 405 BrowserPolicyConnector::GetNetworkConfigurationUpdater() { | 407 BrowserPolicyConnector::GetNetworkConfigurationUpdater() { |
| 406 if (!network_configuration_updater_) { | 408 if (!network_configuration_updater_) { |
| 407 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 409 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 408 if (command_line->HasSwitch( | 410 if (command_line->HasSwitch( |
| 409 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { | 411 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { |
| 410 network_configuration_updater_.reset( | 412 network_configuration_updater_.reset( |
| 411 new NetworkConfigurationUpdaterImpl(GetPolicyService())); | 413 new NetworkConfigurationUpdaterImpl( |
| 414 GetPolicyService(), |
| 415 chromeos::ManagedNetworkConfigurationHandler::Get(), |
| 416 make_scoped_ptr(new chromeos::CertificateHandler))); |
| 412 } else { | 417 } else { |
| 413 network_configuration_updater_.reset( | 418 network_configuration_updater_.reset( |
| 414 new NetworkConfigurationUpdaterImplCros( | 419 new NetworkConfigurationUpdaterImplCros( |
| 415 GetPolicyService(), | 420 GetPolicyService(), |
| 416 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); | 421 chromeos::CrosLibrary::Get()->GetNetworkLibrary(), |
| 422 make_scoped_ptr(new chromeos::CertificateHandler))); |
| 417 } | 423 } |
| 418 } | 424 } |
| 419 return network_configuration_updater_.get(); | 425 return network_configuration_updater_.get(); |
| 420 } | 426 } |
| 421 | 427 |
| 422 net::CertTrustAnchorProvider* | 428 net::CertTrustAnchorProvider* |
| 423 BrowserPolicyConnector::GetCertTrustAnchorProvider() { | 429 BrowserPolicyConnector::GetCertTrustAnchorProvider() { |
| 424 return GetNetworkConfigurationUpdater()->GetCertTrustAnchorProvider(); | 430 return GetNetworkConfigurationUpdater()->GetCertTrustAnchorProvider(); |
| 425 } | 431 } |
| 426 #endif | 432 #endif |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 return new AsyncPolicyProvider(loader.Pass()); | 603 return new AsyncPolicyProvider(loader.Pass()); |
| 598 } else { | 604 } else { |
| 599 return NULL; | 605 return NULL; |
| 600 } | 606 } |
| 601 #else | 607 #else |
| 602 return NULL; | 608 return NULL; |
| 603 #endif | 609 #endif |
| 604 } | 610 } |
| 605 | 611 |
| 606 } // namespace policy | 612 } // namespace policy |
| OLD | NEW |