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

Side by Side Diff: components/metrics/file_metrics_provider.cc

Issue 2524363003: Support experiment configurations with/without stability metrics. (Closed)
Patch Set: 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "components/metrics/file_metrics_provider.h" 5 #include "components/metrics/file_metrics_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/files/file_enumerator.h" 9 #include "base/files/file_enumerator.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool read_complete = false; 99 bool read_complete = false;
100 100
101 // Once a file has been recognized as needing to be read, it is mapped 101 // Once a file has been recognized as needing to be read, it is mapped
102 // into memory and assigned to an |allocator| object. 102 // into memory and assigned to an |allocator| object.
103 std::unique_ptr<base::PersistentHistogramAllocator> allocator; 103 std::unique_ptr<base::PersistentHistogramAllocator> allocator;
104 104
105 private: 105 private:
106 DISALLOW_COPY_AND_ASSIGN(SourceInfo); 106 DISALLOW_COPY_AND_ASSIGN(SourceInfo);
107 }; 107 };
108 108
109 bool FileMetricsProvider::stability_metrics_enabled_ = true;
Alexei Svitkine (slow) 2016/11/24 21:27:58 I don't see where you're using this?
bcwhite 2016/11/25 18:51:57 Doh! Unsaved file after testing.
110
109 FileMetricsProvider::FileMetricsProvider( 111 FileMetricsProvider::FileMetricsProvider(
110 const scoped_refptr<base::TaskRunner>& task_runner, 112 const scoped_refptr<base::TaskRunner>& task_runner,
111 PrefService* local_state) 113 PrefService* local_state)
112 : task_runner_(task_runner), 114 : task_runner_(task_runner),
113 pref_service_(local_state), 115 pref_service_(local_state),
114 weak_factory_(this) { 116 weak_factory_(this) {
115 } 117 }
116 118
117 FileMetricsProvider::~FileMetricsProvider() {} 119 FileMetricsProvider::~FileMetricsProvider() {}
118 120
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 546
545 // Dump all histograms contained within the source to the snapshot-manager. 547 // Dump all histograms contained within the source to the snapshot-manager.
546 RecordHistogramSnapshotsFromSource(snapshot_manager, source.get()); 548 RecordHistogramSnapshotsFromSource(snapshot_manager, source.get());
547 549
548 // Update the last-seen time so it isn't read again unless it changes. 550 // Update the last-seen time so it isn't read again unless it changes.
549 RecordSourceAsRead(source.get()); 551 RecordSourceAsRead(source.get());
550 } 552 }
551 } 553 }
552 554
553 } // namespace metrics 555 } // namespace metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698