Chromium Code Reviews| 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/chromeos/policy/device_status_collector.h" | 5 #include "chrome/browser/chromeos/policy/device_status_collector.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
|
Joao da Silva
2014/05/19 12:49:50
Remove
Steve Condie
2014/05/19 17:44:51
Done.
| |
| 12 #include "base/location.h" | 12 #include "base/location.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/prefs/pref_registry_simple.h" | 15 #include "base/prefs/pref_registry_simple.h" |
| 16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
| 17 #include "base/prefs/scoped_user_pref_update.h" | 17 #include "base/prefs/scoped_user_pref_update.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 21 #include "chrome/browser/chromeos/login/users/user.h" | 21 #include "chrome/browser/chromeos/login/users/user.h" |
| 22 #include "chrome/browser/chromeos/login/users/user_manager.h" | 22 #include "chrome/browser/chromeos/login/users/user_manager.h" |
| 23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 24 #include "chrome/browser/chromeos/settings/cros_settings.h" | 24 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 25 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
| 26 #include "chrome/common/pref_names.h" | 26 #include "chrome/common/pref_names.h" |
| 27 #include "chromeos/chromeos_switches.h" | 27 #include "chromeos/chromeos_switches.h" |
|
Joao da Silva
2014/05/19 12:49:50
Remove
Steve Condie
2014/05/19 17:44:51
Done.
| |
| 28 #include "chromeos/network/device_state.h" | 28 #include "chromeos/network/device_state.h" |
| 29 #include "chromeos/network/network_handler.h" | 29 #include "chromeos/network/network_handler.h" |
| 30 #include "chromeos/network/network_state_handler.h" | 30 #include "chromeos/network/network_state_handler.h" |
| 31 #include "chromeos/settings/cros_settings_names.h" | 31 #include "chromeos/settings/cros_settings_names.h" |
| 32 #include "chromeos/system/statistics_provider.h" | 32 #include "chromeos/system/statistics_provider.h" |
| 33 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 33 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 34 #include "content/public/browser/browser_thread.h" | 34 #include "content/public/browser/browser_thread.h" |
| 35 #include "policy/proto/device_management_backend.pb.h" | 35 #include "policy/proto/device_management_backend.pb.h" |
| 36 #include "third_party/cros_system_api/dbus/service_constants.h" | 36 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 37 | 37 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 | 465 |
| 466 if (report_boot_mode_) | 466 if (report_boot_mode_) |
| 467 GetBootMode(status); | 467 GetBootMode(status); |
| 468 | 468 |
| 469 if (report_location_) | 469 if (report_location_) |
| 470 GetLocation(status); | 470 GetLocation(status); |
| 471 | 471 |
| 472 if (report_network_interfaces_) | 472 if (report_network_interfaces_) |
| 473 GetNetworkInterfaces(status); | 473 GetNetworkInterfaces(status); |
| 474 | 474 |
| 475 if (report_users_ && !CommandLine::ForCurrentProcess()->HasSwitch( | 475 if (report_users_) { |
| 476 chromeos::switches::kDisableEnterpriseUserReporting)) { | |
| 477 GetUsers(status); | 476 GetUsers(status); |
| 478 } | 477 } |
| 479 | 478 |
| 480 return true; | 479 return true; |
| 481 } | 480 } |
| 482 | 481 |
| 483 bool DeviceStatusCollector::GetSessionStatus( | 482 bool DeviceStatusCollector::GetSessionStatus( |
| 484 em::SessionStatusReportRequest* status) { | 483 em::SessionStatusReportRequest* status) { |
| 485 return false; | 484 return false; |
| 486 } | 485 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 550 location.SetDouble(kSpeed, position.speed); | 549 location.SetDouble(kSpeed, position.speed); |
| 551 location.SetString(kTimestamp, | 550 location.SetString(kTimestamp, |
| 552 base::Int64ToString(position.timestamp.ToInternalValue())); | 551 base::Int64ToString(position.timestamp.ToInternalValue())); |
| 553 local_state_->Set(prefs::kDeviceLocation, location); | 552 local_state_->Set(prefs::kDeviceLocation, location); |
| 554 } | 553 } |
| 555 | 554 |
| 556 ScheduleGeolocationUpdateRequest(); | 555 ScheduleGeolocationUpdateRequest(); |
| 557 } | 556 } |
| 558 | 557 |
| 559 } // namespace policy | 558 } // namespace policy |
| OLD | NEW |