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

Side by Side Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 286093003: Remove disable-enterprise-user-reporting flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unneeded includes Created 6 years, 7 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
« no previous file with comments | « no previous file | chromeos/chromeos_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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"
12 #include "base/location.h" 11 #include "base/location.h"
13 #include "base/logging.h" 12 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
15 #include "base/prefs/pref_registry_simple.h" 14 #include "base/prefs/pref_registry_simple.h"
16 #include "base/prefs/pref_service.h" 15 #include "base/prefs/pref_service.h"
17 #include "base/prefs/scoped_user_pref_update.h" 16 #include "base/prefs/scoped_user_pref_update.h"
18 #include "base/strings/string_number_conversions.h" 17 #include "base/strings/string_number_conversions.h"
19 #include "base/values.h" 18 #include "base/values.h"
20 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chromeos/login/users/user.h" 20 #include "chrome/browser/chromeos/login/users/user.h"
22 #include "chrome/browser/chromeos/login/users/user_manager.h" 21 #include "chrome/browser/chromeos/login/users/user_manager.h"
23 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 22 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
24 #include "chrome/browser/chromeos/settings/cros_settings.h" 23 #include "chrome/browser/chromeos/settings/cros_settings.h"
25 #include "chrome/common/chrome_version_info.h" 24 #include "chrome/common/chrome_version_info.h"
26 #include "chrome/common/pref_names.h" 25 #include "chrome/common/pref_names.h"
27 #include "chromeos/chromeos_switches.h"
28 #include "chromeos/network/device_state.h" 26 #include "chromeos/network/device_state.h"
29 #include "chromeos/network/network_handler.h" 27 #include "chromeos/network/network_handler.h"
30 #include "chromeos/network/network_state_handler.h" 28 #include "chromeos/network/network_state_handler.h"
31 #include "chromeos/settings/cros_settings_names.h" 29 #include "chromeos/settings/cros_settings_names.h"
32 #include "chromeos/system/statistics_provider.h" 30 #include "chromeos/system/statistics_provider.h"
33 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 31 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
34 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
35 #include "policy/proto/device_management_backend.pb.h" 33 #include "policy/proto/device_management_backend.pb.h"
36 #include "third_party/cros_system_api/dbus/service_constants.h" 34 #include "third_party/cros_system_api/dbus/service_constants.h"
37 35
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 463
466 if (report_boot_mode_) 464 if (report_boot_mode_)
467 GetBootMode(status); 465 GetBootMode(status);
468 466
469 if (report_location_) 467 if (report_location_)
470 GetLocation(status); 468 GetLocation(status);
471 469
472 if (report_network_interfaces_) 470 if (report_network_interfaces_)
473 GetNetworkInterfaces(status); 471 GetNetworkInterfaces(status);
474 472
475 if (report_users_ && !CommandLine::ForCurrentProcess()->HasSwitch( 473 if (report_users_) {
476 chromeos::switches::kDisableEnterpriseUserReporting)) {
477 GetUsers(status); 474 GetUsers(status);
478 } 475 }
479 476
480 return true; 477 return true;
481 } 478 }
482 479
483 bool DeviceStatusCollector::GetSessionStatus( 480 bool DeviceStatusCollector::GetSessionStatus(
484 em::SessionStatusReportRequest* status) { 481 em::SessionStatusReportRequest* status) {
485 return false; 482 return false;
486 } 483 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 location.SetDouble(kSpeed, position.speed); 547 location.SetDouble(kSpeed, position.speed);
551 location.SetString(kTimestamp, 548 location.SetString(kTimestamp,
552 base::Int64ToString(position.timestamp.ToInternalValue())); 549 base::Int64ToString(position.timestamp.ToInternalValue()));
553 local_state_->Set(prefs::kDeviceLocation, location); 550 local_state_->Set(prefs::kDeviceLocation, location);
554 } 551 }
555 552
556 ScheduleGeolocationUpdateRequest(); 553 ScheduleGeolocationUpdateRequest();
557 } 554 }
558 555
559 } // namespace policy 556 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | chromeos/chromeos_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698