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

Unified 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: Add comment for clarity 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 side-by-side diff with in-line comments
Download patch
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 8353be5f59b32f9574b8566fa119a2fc6f065e26..66d2141eebdf28cf6668972cb9a06a7094c1d033 100644
--- a/chrome/browser/metrics/perf_provider_chromeos.h
+++ b/chrome/browser/metrics/perf_provider_chromeos.h
@@ -34,6 +34,24 @@ class PerfProvider : public base::NonThreadSafe,
// stored profile data. Returns true if it wrote to |sampled_profiles|.
bool GetSampledProfiles(std::vector<SampledProfile>* sampled_profiles);
+ protected:
+ // Parses a PerfDataProto from serialized data |perf_data|, if it exists.
+ // Parses a PerfStatProto from serialized data |perf_stat|, if it exists.
+ // Only one of these may contain data. If both |perf_data| and |perf_stat|
+ // contain data, it is counted as an error and neither is parsed.
+ // |incognito_observer| indicates whether an incognito window had been opened
+ // during the profile collection period. If there was an incognito window,
+ // discard the incoming data.
+ // |trigger_event| is the cause of the perf data collection.
+ // |result| is the return value of running perf/quipper. It is 0 if successful
+ // and nonzero if not successful.
+ void ParseOutputProtoIfValid(
+ scoped_ptr<WindowedIncognitoObserver> incognito_observer,
+ scoped_ptr<SampledProfile> sampled_profile,
+ int result,
+ const std::vector<uint8>& perf_data,
+ const std::vector<uint8>& perf_stat);
+
private:
// Class that listens for changes to the login state. When a normal user logs
// in, it updates PerfProvider to start collecting data.
@@ -93,15 +111,6 @@ class PerfProvider : public base::NonThreadSafe,
const base::TimeDelta& time_after_restore,
int num_tabs_restored);
- // Parses a perf data protobuf from the |data| passed in only if the
- // |incognito_observer| indicates that no incognito window had been opened
- // during the profile collection period.
- // |trigger_event| is the cause of the perf data collection.
- void ParseProtoIfValid(
- scoped_ptr<WindowedIncognitoObserver> incognito_observer,
- scoped_ptr<SampledProfile> sampled_profile,
- const std::vector<uint8>& data);
-
// Vector of SampledProfile protobufs containing perf profiles.
std::vector<SampledProfile> cached_perf_data_;

Powered by Google App Engine
This is Rietveld 408576698