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

Side by Side Diff: chrome/browser/metrics/metrics_state_manager.cc

Issue 266213004: Fix build error which occurs due to an incorrectly referenced member variable in the MetricsStateMa… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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 #include "chrome/browser/metrics/metrics_state_manager.h" 5 #include "chrome/browser/metrics/metrics_state_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/guid.h" 8 #include "base/guid.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Disable metrics reporting when field trials are forced. 75 // Disable metrics reporting when field trials are forced.
76 if (command_line->HasSwitch(switches::kForceFieldTrials)) 76 if (command_line->HasSwitch(switches::kForceFieldTrials))
77 return false; 77 return false;
78 78
79 bool enabled = false; 79 bool enabled = false;
80 #if defined(GOOGLE_CHROME_BUILD) 80 #if defined(GOOGLE_CHROME_BUILD)
81 #if defined(OS_CHROMEOS) 81 #if defined(OS_CHROMEOS)
82 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref, 82 chromeos::CrosSettings::Get()->GetBoolean(chromeos::kStatsReportingPref,
83 &enabled); 83 &enabled);
84 #else 84 #else
85 enabled = local_state->GetBoolean(prefs::kMetricsReportingEnabled); 85 enabled = local_state_->GetBoolean(prefs::kMetricsReportingEnabled);
86 #endif // #if defined(OS_CHROMEOS) 86 #endif // #if defined(OS_CHROMEOS)
87 #endif // defined(GOOGLE_CHROME_BUILD) 87 #endif // defined(GOOGLE_CHROME_BUILD)
88 return enabled; 88 return enabled;
89 } 89 }
90 90
91 void MetricsStateManager::ForceClientIdCreation() { 91 void MetricsStateManager::ForceClientIdCreation() {
92 if (!client_id_.empty()) 92 if (!client_id_.empty())
93 return; 93 return;
94 94
95 client_id_ = local_state_->GetString(prefs::kMetricsClientID); 95 client_id_ = local_state_->GetString(prefs::kMetricsClientID);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 DCHECK(client_id_.empty()); 225 DCHECK(client_id_.empty());
226 DCHECK_EQ(kLowEntropySourceNotSet, low_entropy_source_); 226 DCHECK_EQ(kLowEntropySourceNotSet, low_entropy_source_);
227 227
228 local_state_->ClearPref(prefs::kMetricsClientID); 228 local_state_->ClearPref(prefs::kMetricsClientID);
229 local_state_->ClearPref(prefs::kMetricsLowEntropySource); 229 local_state_->ClearPref(prefs::kMetricsLowEntropySource);
230 local_state_->ClearPref(prefs::kMetricsResetIds); 230 local_state_->ClearPref(prefs::kMetricsResetIds);
231 } 231 }
232 232
233 } // namespace metrics 233 } // namespace metrics
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698