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

Unified Diff: components/metrics/file_metrics_provider.cc

Issue 2748463004: No 'prefs' state is necessary for an active file. (Closed)
Patch Set: fixed test Created 3 years, 9 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
« no previous file with comments | « components/metrics/file_metrics_provider.h ('k') | components/metrics/file_metrics_provider_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/file_metrics_provider.cc
diff --git a/components/metrics/file_metrics_provider.cc b/components/metrics/file_metrics_provider.cc
index 24cfa9b761368155ec1698486ceef795f8a89a82..65a1bae7029dbdb263aaa42a70ff9db5ef2b46fc 100644
--- a/components/metrics/file_metrics_provider.cc
+++ b/components/metrics/file_metrics_provider.cc
@@ -141,8 +141,10 @@ void FileMetricsProvider::RegisterSource(const base::FilePath& path,
source->prefs_key = prefs_key.as_string();
switch (source->type) {
- case SOURCE_HISTOGRAMS_ATOMIC_FILE:
case SOURCE_HISTOGRAMS_ACTIVE_FILE:
+ DCHECK(prefs_key.empty());
+ // fall through
+ case SOURCE_HISTOGRAMS_ATOMIC_FILE:
source->path = path;
break;
case SOURCE_HISTOGRAMS_ATOMIC_DIR:
« no previous file with comments | « components/metrics/file_metrics_provider.h ('k') | components/metrics/file_metrics_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698