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 #ifndef CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ |
6 #define CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ | 6 #define CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | 13 #include "base/macros.h" |
12 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
13 #include "base/time/time.h" | 15 #include "base/time/time.h" |
14 #include "base/timer/timer.h" | 16 #include "base/timer/timer.h" |
15 #include "chrome/browser/metrics/perf/cpu_identity.h" | 17 #include "chrome/browser/metrics/perf/cpu_identity.h" |
16 #include "chrome/browser/metrics/perf/random_selector.h" | 18 #include "chrome/browser/metrics/perf/random_selector.h" |
17 #include "chrome/browser/sessions/session_restore.h" | 19 #include "chrome/browser/sessions/session_restore.h" |
18 #include "chromeos/dbus/power_manager_client.h" | 20 #include "chromeos/dbus/power_manager_client.h" |
19 #include "chromeos/login/login_state.h" | 21 #include "chromeos/login/login_state.h" |
20 #include "components/metrics/proto/sampled_profile.pb.h" | 22 #include "components/metrics/proto/sampled_profile.pb.h" |
21 | 23 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // |incognito_observer| indicates whether an incognito window had been opened | 124 // |incognito_observer| indicates whether an incognito window had been opened |
123 // during the profile collection period. If there was an incognito window, | 125 // during the profile collection period. If there was an incognito window, |
124 // discard the incoming data. | 126 // discard the incoming data. |
125 // |trigger_event| is the cause of the perf data collection. | 127 // |trigger_event| is the cause of the perf data collection. |
126 // |result| is the return value of running perf/quipper. It is 0 if successful | 128 // |result| is the return value of running perf/quipper. It is 0 if successful |
127 // and nonzero if not successful. | 129 // and nonzero if not successful. |
128 void ParseOutputProtoIfValid( | 130 void ParseOutputProtoIfValid( |
129 scoped_ptr<WindowedIncognitoObserver> incognito_observer, | 131 scoped_ptr<WindowedIncognitoObserver> incognito_observer, |
130 scoped_ptr<SampledProfile> sampled_profile, | 132 scoped_ptr<SampledProfile> sampled_profile, |
131 int result, | 133 int result, |
132 const std::vector<uint8>& perf_data, | 134 const std::vector<uint8_t>& perf_data, |
133 const std::vector<uint8>& perf_stat); | 135 const std::vector<uint8_t>& perf_stat); |
134 | 136 |
135 const CollectionParams& collection_params() const { | 137 const CollectionParams& collection_params() const { |
136 return collection_params_; | 138 return collection_params_; |
137 } | 139 } |
138 const RandomSelector& command_selector() const { | 140 const RandomSelector& command_selector() const { |
139 return command_selector_; | 141 return command_selector_; |
140 } | 142 } |
141 | 143 |
142 private: | 144 private: |
143 static const CollectionParams kDefaultParameters; | 145 static const CollectionParams kDefaultParameters; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // (currently only Intel uarchs supported), or a CPU model name substring. | 260 // (currently only Intel uarchs supported), or a CPU model name substring. |
259 std::string FindBestCpuSpecifierFromParams( | 261 std::string FindBestCpuSpecifierFromParams( |
260 const std::map<std::string, std::string>& params, | 262 const std::map<std::string, std::string>& params, |
261 const CPUIdentity& cpuid); | 263 const CPUIdentity& cpuid); |
262 | 264 |
263 } // namespace internal | 265 } // namespace internal |
264 | 266 |
265 } // namespace metrics | 267 } // namespace metrics |
266 | 268 |
267 #endif // CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ | 269 #endif // CHROME_BROWSER_METRICS_PERF_PERF_PROVIDER_CHROMEOS_H_ |
OLD | NEW |