Index: chrome/browser/metrics/perf_provider_chromeos.h |
diff --git a/chrome/browser/metrics/perf_provider_chromeos.h b/chrome/browser/metrics/perf_provider_chromeos.h |
index 28227107830e6215be58cb763456962a3172550b..91f07a2af795338e90636cb8b461ccd001e6a72e 100644 |
--- a/chrome/browser/metrics/perf_provider_chromeos.h |
+++ b/chrome/browser/metrics/perf_provider_chromeos.h |
@@ -12,7 +12,7 @@ |
#include "base/threading/non_thread_safe.h" |
#include "base/time/time.h" |
#include "base/timer/timer.h" |
-#include "components/metrics/proto/perf_data.pb.h" |
+#include "components/metrics/proto/sampled_profile.pb.h" |
namespace metrics { |
@@ -28,12 +28,13 @@ class PerfProvider : public base::NonThreadSafe { |
// Writes collected perf data protobufs to |perf_data|. Clears all the stored |
// perf data. Returns true if it wrote to |perf_data|. |
- bool GetPerfData(std::vector<PerfDataProto>* perf_data); |
+ bool GetPerfData(std::vector<SampledProfile>* perf_data); |
private: |
// Starts an internal timer to start collecting perf data. The timer is set to |
- // trigger |interval| after this function call. |
- void ScheduleCollection(const base::TimeDelta& interval); |
+ // trigger at a random point in either the current or the next profiling |
+ // interval. |
+ void ScheduleCollection(); |
// Collects perf data if it has not been consumed by calling GetPerfData() |
// (see above). |
@@ -50,8 +51,8 @@ class PerfProvider : public base::NonThreadSafe { |
scoped_ptr<WindowedIncognitoObserver> incognito_observer, |
const std::vector<uint8>& data); |
- // Vector of perf data protobufs. |
- std::vector<PerfDataProto> cached_perf_data_; |
+ // Vector of SampledProfile protobufs containing perf profiles. |
+ std::vector<SampledProfile> cached_perf_data_; |
// For scheduling collection of perf data. |
base::OneShotTimer<PerfProvider> timer_; |
@@ -59,6 +60,9 @@ class PerfProvider : public base::NonThreadSafe { |
// To pass around the "this" pointer across threads safely. |
base::WeakPtrFactory<PerfProvider> weak_factory_; |
+ // Record of the last login time. |
+ base::Time login_time_; |
Ilya Sherman
2014/05/16 21:48:57
Did you mean TimeTicks?
Simon Que
2014/05/17 03:25:07
Done.
|
+ |
DISALLOW_COPY_AND_ASSIGN(PerfProvider); |
}; |