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

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

Issue 18348016: If requested, report network interfaces to management server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test. Created 7 years, 5 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 20 matching lines...) Expand all
31 31
32 namespace content { 32 namespace content {
33 class NotificationDetails; 33 class NotificationDetails;
34 class NotificationSource; 34 class NotificationSource;
35 } 35 }
36 36
37 namespace enterprise_management { 37 namespace enterprise_management {
38 class DeviceStatusReportRequest; 38 class DeviceStatusReportRequest;
39 } 39 }
40 40
41 class PrefRegistrySimple;
41 class PrefService; 42 class PrefService;
42 class PrefRegistrySimple;
43 43
44 namespace policy { 44 namespace policy {
45 45
46 // Collects and summarizes the status of an enterprised-managed ChromeOS device. 46 // Collects and summarizes the status of an enterprised-managed ChromeOS device.
47 class DeviceStatusCollector : public CloudPolicyClient::StatusProvider, 47 class DeviceStatusCollector : public CloudPolicyClient::StatusProvider,
48 public content::NotificationObserver { 48 public content::NotificationObserver {
49 public: 49 public:
50 // TODO(bartfab): Remove this once crbug.com/125931 is addressed and a proper 50 // TODO(bartfab): Remove this once crbug.com/125931 is addressed and a proper
51 // way to mock geolocation exists. 51 // way to mock geolocation exists.
52 typedef base::Callback<void( 52 typedef base::Callback<void(
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 // Helpers for the various portions of the status. 139 // Helpers for the various portions of the status.
140 void GetActivityTimes( 140 void GetActivityTimes(
141 enterprise_management::DeviceStatusReportRequest* request); 141 enterprise_management::DeviceStatusReportRequest* request);
142 void GetVersionInfo( 142 void GetVersionInfo(
143 enterprise_management::DeviceStatusReportRequest* request); 143 enterprise_management::DeviceStatusReportRequest* request);
144 void GetBootMode( 144 void GetBootMode(
145 enterprise_management::DeviceStatusReportRequest* request); 145 enterprise_management::DeviceStatusReportRequest* request);
146 void GetLocation( 146 void GetLocation(
147 enterprise_management::DeviceStatusReportRequest* request); 147 enterprise_management::DeviceStatusReportRequest* request);
148 void GetNetworkInterfaces(
149 enterprise_management::DeviceStatusReportRequest* request);
148 150
149 // Update the cached values of the reporting settings. 151 // Update the cached values of the reporting settings.
150 void UpdateReportingSettings(); 152 void UpdateReportingSettings();
151 153
152 // content::NotificationObserver interface. 154 // content::NotificationObserver interface.
153 virtual void Observe( 155 virtual void Observe(
154 int type, 156 int type,
155 const content::NotificationSource& source, 157 const content::NotificationSource& source,
156 const content::NotificationDetails& details) OVERRIDE; 158 const content::NotificationDetails& details) OVERRIDE;
157 159
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 199
198 // TODO(bartfab): Remove this once crbug.com/125931 is addressed and a proper 200 // TODO(bartfab): Remove this once crbug.com/125931 is addressed and a proper
199 // way to mock geolocation exists. 201 // way to mock geolocation exists.
200 LocationUpdateRequester location_update_requester_; 202 LocationUpdateRequester location_update_requester_;
201 203
202 // Cached values of the reporting settings from the device policy. 204 // Cached values of the reporting settings from the device policy.
203 bool report_version_info_; 205 bool report_version_info_;
204 bool report_activity_times_; 206 bool report_activity_times_;
205 bool report_boot_mode_; 207 bool report_boot_mode_;
206 bool report_location_; 208 bool report_location_;
209 bool report_network_interfaces_;
207 210
208 scoped_refptr<Context> context_; 211 scoped_refptr<Context> context_;
209 212
210 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector); 213 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector);
211 }; 214 };
212 215
213 } // namespace policy 216 } // namespace policy
214 217
215 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ 218 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698