OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ |
6 #define CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ | 6 #define CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
12 #include "base/trace_event/tracing_agent.h" | 13 #include "base/trace_event/tracing_agent.h" |
13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
14 #include "tools/battor_agent/battor_agent.h" | 15 #include "tools/battor_agent/battor_agent.h" |
15 #include "tools/battor_agent/battor_error.h" | 16 #include "tools/battor_agent/battor_error.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 template <typename Type> | 19 template <typename Type> |
19 struct DefaultSingletonTraits; | 20 struct DefaultSingletonTraits; |
20 } // namespace base | 21 } // namespace base |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 void RecordClockSyncMarkerOnIOThread( | 62 void RecordClockSyncMarkerOnIOThread( |
62 const std::string& sync_id, | 63 const std::string& sync_id, |
63 const RecordClockSyncMarkerCallback& callback); | 64 const RecordClockSyncMarkerCallback& callback); |
64 | 65 |
65 // Returns the path of a BattOr (e.g. /dev/ttyUSB0), or an empty string if | 66 // Returns the path of a BattOr (e.g. /dev/ttyUSB0), or an empty string if |
66 // none are found. | 67 // none are found. |
67 std::string GetBattOrPath(); | 68 std::string GetBattOrPath(); |
68 | 69 |
69 // All interactions with the BattOrAgent (after construction) must happen on | 70 // All interactions with the BattOrAgent (after construction) must happen on |
70 // the IO thread. | 71 // the IO thread. |
71 scoped_ptr<battor::BattOrAgent, BrowserThread::DeleteOnIOThread> | 72 std::unique_ptr<battor::BattOrAgent, BrowserThread::DeleteOnIOThread> |
72 battor_agent_; | 73 battor_agent_; |
73 | 74 |
74 StartAgentTracingCallback start_tracing_callback_; | 75 StartAgentTracingCallback start_tracing_callback_; |
75 StopAgentTracingCallback stop_tracing_callback_; | 76 StopAgentTracingCallback stop_tracing_callback_; |
76 std::string record_clock_sync_marker_sync_id_; | 77 std::string record_clock_sync_marker_sync_id_; |
77 base::TimeTicks record_clock_sync_marker_start_time_; | 78 base::TimeTicks record_clock_sync_marker_start_time_; |
78 RecordClockSyncMarkerCallback record_clock_sync_marker_callback_; | 79 RecordClockSyncMarkerCallback record_clock_sync_marker_callback_; |
79 | 80 |
80 DISALLOW_COPY_AND_ASSIGN(PowerTracingAgent); | 81 DISALLOW_COPY_AND_ASSIGN(PowerTracingAgent); |
81 }; | 82 }; |
82 | 83 |
83 } // namespace content | 84 } // namespace content |
84 | 85 |
85 #endif // CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ | 86 #endif // CONTENT_BROWSER_TRACING_POWER_TRACING_AGENT_H_ |
OLD | NEW |