| 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/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/common/chrome_paths.h" | 21 #include "chrome/common/chrome_paths.h" |
| 22 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
| 23 #include "chrome/common/net/gaia/gaia_constants.h" | 23 #include "chrome/common/net/gaia/gaia_constants.h" |
| 24 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
| 25 #include "content/public/browser/notification_details.h" | 25 #include "content/public/browser/notification_details.h" |
| 26 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
| 27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
| 28 #include "policy/policy_constants.h" | 28 #include "policy/policy_constants.h" |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| 31 #include "chrome/browser/policy/configuration_policy_provider_win.h" | 31 #include "chrome/browser/policy/policy_loader_win.h" |
| 32 #elif defined(OS_MACOSX) | 32 #elif defined(OS_MACOSX) |
| 33 #include "chrome/browser/policy/policy_loader_mac.h" | 33 #include "chrome/browser/policy/policy_loader_mac.h" |
| 34 #elif defined(OS_POSIX) | 34 #elif defined(OS_POSIX) |
| 35 #include "chrome/browser/policy/config_dir_policy_loader.h" | 35 #include "chrome/browser/policy/config_dir_policy_loader.h" |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 #if defined(OS_CHROMEOS) | 38 #if defined(OS_CHROMEOS) |
| 39 #include "chrome/browser/chromeos/cros/cros_library.h" | 39 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 40 #include "chrome/browser/chromeos/system/statistics_provider.h" | 40 #include "chrome/browser/chromeos/system/statistics_provider.h" |
| 41 #include "chrome/browser/policy/app_pack_updater.h" | 41 #include "chrome/browser/policy/app_pack_updater.h" |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 } | 490 } |
| 491 device_data_store_->set_device_status_collector( | 491 device_data_store_->set_device_status_collector( |
| 492 new DeviceStatusCollector( | 492 new DeviceStatusCollector( |
| 493 g_browser_process->local_state(), | 493 g_browser_process->local_state(), |
| 494 chromeos::system::StatisticsProvider::GetInstance(), | 494 chromeos::system::StatisticsProvider::GetInstance(), |
| 495 NULL)); | 495 NULL)); |
| 496 #endif | 496 #endif |
| 497 } | 497 } |
| 498 | 498 |
| 499 // static | 499 // static |
| 500 ConfigurationPolicyProvider* | 500 ConfigurationPolicyProvider* BrowserPolicyConnector::CreatePlatformProvider() { |
| 501 BrowserPolicyConnector::CreatePlatformProvider() { | |
| 502 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); | 501 const PolicyDefinitionList* policy_list = GetChromePolicyDefinitionList(); |
| 503 #if defined(OS_WIN) | 502 #if defined(OS_WIN) |
| 504 return new ConfigurationPolicyProviderWin(policy_list); | 503 return WinPolicyLoader::CreateProvider(policy_list); |
| 505 #elif defined(OS_MACOSX) | 504 #elif defined(OS_MACOSX) |
| 506 return MacPolicyLoader::CreateProvider(policy_list); | 505 return MacPolicyLoader::CreateProvider(policy_list); |
| 507 #elif defined(OS_POSIX) | 506 #elif defined(OS_POSIX) |
| 508 FilePath config_dir_path; | 507 FilePath config_dir_path; |
| 509 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { | 508 if (PathService::Get(chrome::DIR_POLICY_FILES, &config_dir_path)) { |
| 510 return ConfigDirPolicyLoader::CreateProvider( | 509 return ConfigDirPolicyLoader::CreateProvider( |
| 511 policy_list, | 510 policy_list, |
| 512 POLICY_SCOPE_MACHINE, | 511 POLICY_SCOPE_MACHINE, |
| 513 config_dir_path); | 512 config_dir_path); |
| 514 } else { | 513 } else { |
| 515 return NULL; | 514 return NULL; |
| 516 } | 515 } |
| 517 #else | 516 #else |
| 518 return NULL; | 517 return NULL; |
| 519 #endif | 518 #endif |
| 520 } | 519 } |
| 521 | 520 |
| 522 } // namespace policy | 521 } // namespace policy |
| OLD | NEW |