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

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

Issue 2578363003: Inline RecordBooleanPrefValue to LogCleanShutdown. (Closed)
Patch Set: RecordCurrentState Created 4 years 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
« no previous file with comments | « no previous file | components/metrics/metrics_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 void OnLogUploadComplete(int response_code); 354 void OnLogUploadComplete(int response_code);
355 355
356 // Reads, increments and then sets the specified integer preference. 356 // Reads, increments and then sets the specified integer preference.
357 void IncrementPrefValue(const char* path); 357 void IncrementPrefValue(const char* path);
358 358
359 // Reads, increments and then sets the specified long preference that is 359 // Reads, increments and then sets the specified long preference that is
360 // stored as a string. 360 // stored as a string.
361 void IncrementLongPrefsValue(const char* path); 361 void IncrementLongPrefsValue(const char* path);
362 362
363 // Records that the browser was shut down cleanly. 363 // Records that the browser was shut down cleanly.
364 void LogCleanShutdown(); 364 void LogCleanShutdown(bool end_completed);
365 365
366 // Records state that should be periodically saved, like uptime and 366 // Records state that should be periodically saved, like uptime and
367 // buffered plugin stability statistics. 367 // buffered plugin stability statistics.
368 void RecordCurrentState(PrefService* pref); 368 void RecordCurrentState(PrefService* pref);
369 369
370 // Sets the value of the specified path in prefs and schedules a save.
371 void RecordBooleanPrefValue(const char* path, bool value);
372
373 // Notifies observers on a synthetic trial list change. 370 // Notifies observers on a synthetic trial list change.
374 void NotifySyntheticTrialObservers(); 371 void NotifySyntheticTrialObservers();
375 372
376 // Returns a list of synthetic field trials that are older than |time|. 373 // Returns a list of synthetic field trials that are older than |time|.
377 void GetSyntheticFieldTrialsOlderThan( 374 void GetSyntheticFieldTrialsOlderThan(
378 base::TimeTicks time, 375 base::TimeTicks time,
379 std::vector<variations::ActiveGroupId>* synthetic_trials); 376 std::vector<variations::ActiveGroupId>* synthetic_trials);
380 377
381 // Creates a new MetricsLog instance with the given |log_type|. 378 // Creates a new MetricsLog instance with the given |log_type|.
382 std::unique_ptr<MetricsLog> CreateLog(MetricsLog::LogType log_type); 379 std::unique_ptr<MetricsLog> CreateLog(MetricsLog::LogType log_type);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 // Weak pointers factory used for saving state. All weak pointers managed by 488 // Weak pointers factory used for saving state. All weak pointers managed by
492 // this factory are invalidated in ScheduleNextStateSave. 489 // this factory are invalidated in ScheduleNextStateSave.
493 base::WeakPtrFactory<MetricsService> state_saver_factory_; 490 base::WeakPtrFactory<MetricsService> state_saver_factory_;
494 491
495 DISALLOW_COPY_AND_ASSIGN(MetricsService); 492 DISALLOW_COPY_AND_ASSIGN(MetricsService);
496 }; 493 };
497 494
498 } // namespace metrics 495 } // namespace metrics
499 496
500 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_ 497 #endif // COMPONENTS_METRICS_METRICS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698