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

Side by Side Diff: chrome/browser/prefs/pref_metrics_service.cc

Issue 2779893005: Continue to clean c_str() calls. (Closed)
Patch Set: Revert changes in font_service_app.cc Created 3 years, 8 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 | chrome/browser/profiles/profile_avatar_icon_util.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/prefs/pref_metrics_service.h" 5 #include "chrome/browser/prefs/pref_metrics_service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 histogram_name_prefix, callback)); 201 histogram_name_prefix, callback));
202 } 202 }
203 203
204 void PrefMetricsService::OnPrefChanged( 204 void PrefMetricsService::OnPrefChanged(
205 const std::string& histogram_name_prefix, 205 const std::string& histogram_name_prefix,
206 const LogHistogramValueCallback& callback, 206 const LogHistogramValueCallback& callback,
207 const std::string& path, 207 const std::string& path,
208 bool from_sync) { 208 bool from_sync) {
209 sync_preferences::PrefServiceSyncable* prefs = 209 sync_preferences::PrefServiceSyncable* prefs =
210 PrefServiceSyncableFromProfile(profile_); 210 PrefServiceSyncableFromProfile(profile_);
211 const PrefService::Preference* pref = prefs->FindPreference(path.c_str()); 211 const PrefService::Preference* pref = prefs->FindPreference(path);
212 DCHECK(pref); 212 DCHECK(pref);
213 std::string source_name( 213 std::string source_name(
214 from_sync ? ".PulledFromSync" : ".PushedToSync"); 214 from_sync ? ".PulledFromSync" : ".PushedToSync");
215 std::string histogram_name("Settings." + histogram_name_prefix + source_name); 215 std::string histogram_name("Settings." + histogram_name_prefix + source_name);
216 callback.Run(histogram_name, pref->GetValue()); 216 callback.Run(histogram_name, pref->GetValue());
217 } 217 }
218 218
219 void PrefMetricsService::LogBooleanPrefChange(const std::string& histogram_name, 219 void PrefMetricsService::LogBooleanPrefChange(const std::string& histogram_name,
220 const base::Value* value) { 220 const base::Value* value) {
221 bool boolean_value = false; 221 bool boolean_value = false;
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { 275 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const {
276 return false; 276 return false;
277 } 277 }
278 278
279 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( 279 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse(
280 content::BrowserContext* context) const { 280 content::BrowserContext* context) const {
281 return chrome::GetBrowserContextRedirectedInIncognito(context); 281 return chrome::GetBrowserContextRedirectedInIncognito(context);
282 } 282 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_avatar_icon_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698