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

Side by Side Diff: chrome/browser/metrics/perf_provider_chromeos.h

Issue 1218583002: metrics: Add dbus interface for GetRandomPerfOutput (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check that the dbus method returns some data Created 5 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
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_METRICS_PERF_PROVIDER_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_METRICS_PERF_PROVIDER_CHROMEOS_H_
6 #define CHROME_BROWSER_METRICS_PERF_PROVIDER_CHROMEOS_H_ 6 #define CHROME_BROWSER_METRICS_PERF_PROVIDER_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void CollectPerfDataAfterResume(const base::TimeDelta& sleep_duration, 86 void CollectPerfDataAfterResume(const base::TimeDelta& sleep_duration,
87 const base::TimeDelta& time_after_resume); 87 const base::TimeDelta& time_after_resume);
88 88
89 // Collects perf data after a session restore. |time_after_restore| is how 89 // Collects perf data after a session restore. |time_after_restore| is how
90 // long ago the session restore started. |num_tabs_restored| is the total 90 // long ago the session restore started. |num_tabs_restored| is the total
91 // number of tabs being restored. 91 // number of tabs being restored.
92 void CollectPerfDataAfterSessionRestore( 92 void CollectPerfDataAfterSessionRestore(
93 const base::TimeDelta& time_after_restore, 93 const base::TimeDelta& time_after_restore,
94 int num_tabs_restored); 94 int num_tabs_restored);
95 95
96 // Parses a perf data protobuf from the |data| passed in only if the 96 // Parses a PerfDataProto from serialized data |perf_data|, if it exists.
97 // |incognito_observer| indicates that no incognito window had been opened 97 // Parses a PerfStatProto from serialized data |perf_stat|, if it exists.
98 // during the profile collection period. 98 // |incognito_observer| indicates whether an incognito window had been opened
99 // during the profile collection period. If there was an incognito window,
100 // discard the incoming data.
99 // |trigger_event| is the cause of the perf data collection. 101 // |trigger_event| is the cause of the perf data collection.
100 void ParseProtoIfValid( 102 void ParseOutputProtoIfValid(
101 scoped_ptr<WindowedIncognitoObserver> incognito_observer, 103 scoped_ptr<WindowedIncognitoObserver> incognito_observer,
102 scoped_ptr<SampledProfile> sampled_profile, 104 scoped_ptr<SampledProfile> sampled_profile,
103 const std::vector<uint8>& data); 105 int result,
Ilya Sherman 2015/06/27 05:44:24 Please document the |result|.
Simon Que 2015/06/30 05:28:09 Done.
106 const std::vector<uint8>& perf_data,
107 const std::vector<uint8>& perf_stat);
104 108
105 // Vector of SampledProfile protobufs containing perf profiles. 109 // Vector of SampledProfile protobufs containing perf profiles.
106 std::vector<SampledProfile> cached_perf_data_; 110 std::vector<SampledProfile> cached_perf_data_;
107 111
108 // For scheduling collection of perf data. 112 // For scheduling collection of perf data.
109 base::OneShotTimer<PerfProvider> timer_; 113 base::OneShotTimer<PerfProvider> timer_;
110 114
111 // For detecting when changes to the login state. 115 // For detecting when changes to the login state.
112 LoginObserver login_observer_; 116 LoginObserver login_observer_;
113 117
(...skipping 16 matching lines...) Expand all
130 134
131 // To pass around the "this" pointer across threads safely. 135 // To pass around the "this" pointer across threads safely.
132 base::WeakPtrFactory<PerfProvider> weak_factory_; 136 base::WeakPtrFactory<PerfProvider> weak_factory_;
133 137
134 DISALLOW_COPY_AND_ASSIGN(PerfProvider); 138 DISALLOW_COPY_AND_ASSIGN(PerfProvider);
135 }; 139 };
136 140
137 } // namespace metrics 141 } // namespace metrics
138 142
139 #endif // CHROME_BROWSER_METRICS_PERF_PROVIDER_CHROMEOS_H_ 143 #endif // CHROME_BROWSER_METRICS_PERF_PROVIDER_CHROMEOS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/perf_provider_chromeos.cc » ('j') | chrome/browser/metrics/perf_provider_chromeos.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698