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

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

Issue 2504013003: arc: enable use_new_wrapper_types for enterprise_reporting.mojom (Closed)
Patch Set: rebased, no code change Created 4 years, 1 month 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 | chrome/browser/chromeos/policy/device_status_collector.cc » ('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 #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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <deque> 10 #include <deque>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/callback_forward.h" 15 #include "base/callback_forward.h"
16 #include "base/callback_list.h" 16 #include "base/callback_list.h"
17 #include "base/compiler_specific.h" 17 #include "base/compiler_specific.h"
18 #include "base/macros.h" 18 #include "base/macros.h"
19 #include "base/memory/ref_counted.h" 19 #include "base/memory/ref_counted.h"
20 #include "base/memory/weak_ptr.h" 20 #include "base/memory/weak_ptr.h"
21 #include "base/sequenced_task_runner.h" 21 #include "base/sequenced_task_runner.h"
22 #include "base/task/cancelable_task_tracker.h" 22 #include "base/task/cancelable_task_tracker.h"
23 #include "base/threading/thread_checker.h" 23 #include "base/threading/thread_checker.h"
24 #include "base/time/time.h" 24 #include "base/time/time.h"
25 #include "base/timer/timer.h" 25 #include "base/timer/timer.h"
26
27 #include "chrome/browser/chromeos/settings/cros_settings.h" 26 #include "chrome/browser/chromeos/settings/cros_settings.h"
28 #include "chromeos/system/version_loader.h" 27 #include "chromeos/system/version_loader.h"
29 #include "components/policy/proto/device_management_backend.pb.h" 28 #include "components/policy/proto/device_management_backend.pb.h"
30 #include "components/prefs/pref_member.h" 29 #include "components/prefs/pref_member.h"
31 #include "mojo/public/cpp/bindings/string.h"
32 #include "ui/base/idle/idle.h" 30 #include "ui/base/idle/idle.h"
33 31
34 namespace chromeos { 32 namespace chromeos {
35 class CrosSettings; 33 class CrosSettings;
36 namespace system { 34 namespace system {
37 class StatisticsProvider; 35 class StatisticsProvider;
38 } 36 }
39 } 37 }
40 38
41 namespace content { 39 namespace content {
(...skipping 24 matching lines...) Expand all
66 // cpu user_time nice_time system_time idle_time 64 // cpu user_time nice_time system_time idle_time
67 using CPUStatisticsFetcher = base::Callback<std::string(void)>; 65 using CPUStatisticsFetcher = base::Callback<std::string(void)>;
68 66
69 // Reads CPU temperatures from /sys/class/hwmon/hwmon*/temp*_input and 67 // Reads CPU temperatures from /sys/class/hwmon/hwmon*/temp*_input and
70 // appropriate labels from /sys/class/hwmon/hwmon*/temp*_label. 68 // appropriate labels from /sys/class/hwmon/hwmon*/temp*_label.
71 using CPUTempFetcher = 69 using CPUTempFetcher =
72 base::Callback<std::vector<enterprise_management::CPUTempInfo>()>; 70 base::Callback<std::vector<enterprise_management::CPUTempInfo>()>;
73 71
74 // Passed into asynchronous mojo interface for communicating with Android. 72 // Passed into asynchronous mojo interface for communicating with Android.
75 using AndroidStatusReceiver = 73 using AndroidStatusReceiver =
76 base::Callback<void(mojo::String, mojo::String)>; 74 base::Callback<void(const std::string&, const std::string&)>;
77 // Calls the enterprise reporting mojo interface, passing over the 75 // Calls the enterprise reporting mojo interface, passing over the
78 // AndroidStatusReceiver. 76 // AndroidStatusReceiver.
79 using AndroidStatusFetcher = 77 using AndroidStatusFetcher =
80 base::Callback<bool(const AndroidStatusReceiver&)>; 78 base::Callback<bool(const AndroidStatusReceiver&)>;
81 79
82 // Called in the UI thread after the device and session status have been 80 // Called in the UI thread after the device and session status have been
83 // collected asynchronously in GetDeviceAndSessionStatusAsync. Null pointers 81 // collected asynchronously in GetDeviceAndSessionStatusAsync. Null pointers
84 // indicate errors or that device or session status reporting is disabled. 82 // indicate errors or that device or session status reporting is disabled.
85 using StatusCallback = base::Callback<void( 83 using StatusCallback = base::Callback<void(
86 std::unique_ptr<enterprise_management::DeviceStatusReportRequest>, 84 std::unique_ptr<enterprise_management::DeviceStatusReportRequest>,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 base::ThreadChecker thread_checker_; 290 base::ThreadChecker thread_checker_;
293 291
294 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_; 292 base::WeakPtrFactory<DeviceStatusCollector> weak_factory_;
295 293
296 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector); 294 DISALLOW_COPY_AND_ASSIGN(DeviceStatusCollector);
297 }; 295 };
298 296
299 } // namespace policy 297 } // namespace policy
300 298
301 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_ 299 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_STATUS_COLLECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/policy/device_status_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698