| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 62 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 63 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" | 63 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" |
| 64 #include "chrome/browser/chromeos/policy/device_local_account.h" | 64 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 65 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" | 65 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" |
| 66 #include "chrome/browser/chromeos/policy/device_status_collector.h" | 66 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 67 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" | 67 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" |
| 68 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" | 68 #include "chrome/browser/chromeos/policy/network_configuration_updater.h" |
| 69 #include "chrome/browser/chromeos/settings/cros_settings.h" | 69 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 70 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" | 70 #include "chrome/browser/chromeos/settings/cros_settings_provider.h" |
| 71 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 71 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 72 #include "chrome/browser/chromeos/system/statistics_provider.h" | |
| 73 #include "chrome/browser/chromeos/system/timezone_settings.h" | 72 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 74 #include "chromeos/chromeos_paths.h" | 73 #include "chromeos/chromeos_paths.h" |
| 75 #include "chromeos/chromeos_switches.h" | 74 #include "chromeos/chromeos_switches.h" |
| 76 #include "chromeos/cryptohome/cryptohome_library.h" | 75 #include "chromeos/cryptohome/cryptohome_library.h" |
| 77 #include "chromeos/dbus/cryptohome_client.h" | 76 #include "chromeos/dbus/cryptohome_client.h" |
| 78 #include "chromeos/dbus/dbus_thread_manager.h" | 77 #include "chromeos/dbus/dbus_thread_manager.h" |
| 79 #include "chromeos/network/network_handler.h" | 78 #include "chromeos/network/network_handler.h" |
| 80 #include "chromeos/network/onc/onc_certificate_importer_impl.h" | 79 #include "chromeos/network/onc/onc_certificate_importer_impl.h" |
| 80 #include "chromeos/system/statistics_provider.h" |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 using content::BrowserThread; | 83 using content::BrowserThread; |
| 84 | 84 |
| 85 namespace policy { | 85 namespace policy { |
| 86 | 86 |
| 87 namespace { | 87 namespace { |
| 88 | 88 |
| 89 // The following constants define delays applied before the initial policy fetch | 89 // The following constants define delays applied before the initial policy fetch |
| 90 // on startup. (So that displaying Chrome's GUI does not get delayed.) | 90 // on startup. (So that displaying Chrome's GUI does not get delayed.) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 virtual std::string GetPlatformParameter() OVERRIDE { | 151 virtual std::string GetPlatformParameter() OVERRIDE { |
| 152 std::string os_name = base::SysInfo::OperatingSystemName(); | 152 std::string os_name = base::SysInfo::OperatingSystemName(); |
| 153 std::string os_hardware = base::SysInfo::OperatingSystemArchitecture(); | 153 std::string os_hardware = base::SysInfo::OperatingSystemArchitecture(); |
| 154 | 154 |
| 155 #if defined(OS_CHROMEOS) | 155 #if defined(OS_CHROMEOS) |
| 156 chromeos::system::StatisticsProvider* provider = | 156 chromeos::system::StatisticsProvider* provider = |
| 157 chromeos::system::StatisticsProvider::GetInstance(); | 157 chromeos::system::StatisticsProvider::GetInstance(); |
| 158 | 158 |
| 159 std::string hwclass; | 159 std::string hwclass; |
| 160 if (!provider->GetMachineStatistic(chromeos::system::kHardwareClass, | 160 if (!provider->GetMachineStatistic(chromeos::system::kHardwareClassKey, |
| 161 &hwclass)) { | 161 &hwclass)) { |
| 162 LOG(ERROR) << "Failed to get machine information"; | 162 LOG(ERROR) << "Failed to get machine information"; |
| 163 } | 163 } |
| 164 os_name += ",CrOS," + base::SysInfo::GetLsbReleaseBoard(); | 164 os_name += ",CrOS," + base::SysInfo::GetLsbReleaseBoard(); |
| 165 os_hardware += "," + hwclass; | 165 os_hardware += "," + hwclass; |
| 166 #endif | 166 #endif |
| 167 | 167 |
| 168 std::string os_version("-"); | 168 std::string os_version("-"); |
| 169 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 169 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 170 int32 os_major_version = 0; | 170 int32 os_major_version = 0; |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 return new AsyncPolicyProvider(loader.Pass()); | 558 return new AsyncPolicyProvider(loader.Pass()); |
| 559 } else { | 559 } else { |
| 560 return NULL; | 560 return NULL; |
| 561 } | 561 } |
| 562 #else | 562 #else |
| 563 return NULL; | 563 return NULL; |
| 564 #endif | 564 #endif |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace policy | 567 } // namespace policy |
| OLD | NEW |