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

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

Issue 14192017: Extract certificate policy application from NetworkLibrary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 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 | Annotate | Revision Log
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/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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h" 64 #include "chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.h"
65 #include "chrome/browser/chromeos/settings/cros_settings.h" 65 #include "chrome/browser/chromeos/settings/cros_settings.h"
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_switches.h" 71 #include "chromeos/chromeos_switches.h"
72 #include "chromeos/dbus/cryptohome_client.h" 72 #include "chromeos/dbus/cryptohome_client.h"
73 #include "chromeos/dbus/dbus_thread_manager.h" 73 #include "chromeos/dbus/dbus_thread_manager.h"
74 #include "chromeos/network/certificate_handler.h"
75 #include "chromeos/network/managed_network_configuration_handler.h"
74 #else 76 #else
75 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h" 77 #include "chrome/browser/policy/cloud/user_cloud_policy_manager.h"
76 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h" 78 #include "chrome/browser/policy/cloud/user_cloud_policy_manager_factory.h"
77 #endif 79 #endif
78 80
79 using content::BrowserThread; 81 using content::BrowserThread;
80 82
81 namespace policy { 83 namespace policy {
82 84
83 namespace { 85 namespace {
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 return app_pack_updater_.get(); 402 return app_pack_updater_.get();
401 } 403 }
402 404
403 NetworkConfigurationUpdater* 405 NetworkConfigurationUpdater*
404 BrowserPolicyConnector::GetNetworkConfigurationUpdater() { 406 BrowserPolicyConnector::GetNetworkConfigurationUpdater() {
405 if (!network_configuration_updater_) { 407 if (!network_configuration_updater_) {
406 CommandLine* command_line = CommandLine::ForCurrentProcess(); 408 CommandLine* command_line = CommandLine::ForCurrentProcess();
407 if (command_line->HasSwitch( 409 if (command_line->HasSwitch(
408 chromeos::switches::kUseNewNetworkConfigurationHandlers)) { 410 chromeos::switches::kUseNewNetworkConfigurationHandlers)) {
409 network_configuration_updater_.reset( 411 network_configuration_updater_.reset(
410 new NetworkConfigurationUpdaterImpl(GetPolicyService())); 412 new NetworkConfigurationUpdaterImpl(
413 GetPolicyService(),
414 chromeos::ManagedNetworkConfigurationHandler::Get(),
415 chromeos::CertificateHandler::Get()));
411 } else { 416 } else {
412 network_configuration_updater_.reset( 417 network_configuration_updater_.reset(
413 new NetworkConfigurationUpdaterImplCros( 418 new NetworkConfigurationUpdaterImplCros(
414 GetPolicyService(), 419 GetPolicyService(),
415 chromeos::CrosLibrary::Get()->GetNetworkLibrary())); 420 chromeos::CrosLibrary::Get()->GetNetworkLibrary(),
421 chromeos::CertificateHandler::Get()));
416 } 422 }
417 } 423 }
418 return network_configuration_updater_.get(); 424 return network_configuration_updater_.get();
419 } 425 }
420 426
421 net::CertTrustAnchorProvider* 427 net::CertTrustAnchorProvider*
422 BrowserPolicyConnector::GetCertTrustAnchorProvider() { 428 BrowserPolicyConnector::GetCertTrustAnchorProvider() {
423 return GetNetworkConfigurationUpdater()->GetCertTrustAnchorProvider(); 429 return GetNetworkConfigurationUpdater()->GetCertTrustAnchorProvider();
424 } 430 }
425 #endif 431 #endif
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 return new AsyncPolicyProvider(loader.Pass()); 602 return new AsyncPolicyProvider(loader.Pass());
597 } else { 603 } else {
598 return NULL; 604 return NULL;
599 } 605 }
600 #else 606 #else
601 return NULL; 607 return NULL;
602 #endif 608 #endif
603 } 609 }
604 610
605 } // namespace policy 611 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698