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

Side by Side Diff: components/metrics/metrics_service.h

Issue 558653002: Allow MetricsProviders to request an initial stability log. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Address Alexei's comments. Created 6 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file defines a service that collects information about the user 5 // This file defines a service that collects information about the user
6 // experience in order to help improve future versions of the app. 6 // experience in order to help improve future versions of the app.
7 7
8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_ 8 #ifndef COMPONENTS_METRICS_METRICS_SERVICE_H_
9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_ 9 #define COMPONENTS_METRICS_METRICS_SERVICE_H_
10 10
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // Starts the process of uploading metrics data. 313 // Starts the process of uploading metrics data.
314 void StartScheduledUpload(); 314 void StartScheduledUpload();
315 315
316 // Called by the client when final log info collection is complete. 316 // Called by the client when final log info collection is complete.
317 void OnFinalLogInfoCollectionDone(); 317 void OnFinalLogInfoCollectionDone();
318 318
319 // Either closes the current log or creates and closes the initial log 319 // Either closes the current log or creates and closes the initial log
320 // (depending on |state_|), and stages it for upload. 320 // (depending on |state_|), and stages it for upload.
321 void StageNewLog(); 321 void StageNewLog();
322 322
323 // Returns true if any of the registered metrics providers have stability
324 // metrics to report.
325 bool ProvidersHaveStabilityMetrics();
326
323 // Prepares the initial stability log, which is only logged when the previous 327 // Prepares the initial stability log, which is only logged when the previous
324 // run of Chrome crashed. This log contains any stability metrics left over 328 // run of Chrome crashed. This log contains any stability metrics left over
325 // from that previous run, and only these stability metrics. It uses the 329 // from that previous run, and only these stability metrics. It uses the
326 // system profile from the previous session. 330 // system profile from the previous session.
327 void PrepareInitialStabilityLog(); 331 void PrepareInitialStabilityLog();
328 332
329 // Prepares the initial metrics log, which includes startup histograms and 333 // Prepares the initial metrics log, which includes startup histograms and
330 // profiler data, as well as incremental stability-related metrics. 334 // profiler data, as well as incremental stability-related metrics.
331 void PrepareInitialMetricsLog(); 335 void PrepareInitialMetricsLog();
332 336
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess); 469 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, IsPluginProcess);
466 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver); 470 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, MetricsServiceObserver);
467 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, 471 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest,
468 PermutedEntropyCacheClearedWhenLowEntropyReset); 472 PermutedEntropyCacheClearedWhenLowEntropyReset);
469 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial); 473 FRIEND_TEST_ALL_PREFIXES(MetricsServiceTest, RegisterSyntheticTrial);
470 474
471 DISALLOW_COPY_AND_ASSIGN(MetricsService); 475 DISALLOW_COPY_AND_ASSIGN(MetricsService);
472 }; 476 };
473 477
474 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ 478 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698