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

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

Issue 264123004: Modify rappor parameters. (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
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // homepages through the privacy-preserving Rappor service. 75 // homepages through the privacy-preserving Rappor service.
76 if (!home_page_is_ntp) { 76 if (!home_page_is_ntp) {
77 GURL homepage_url(prefs_->GetString(prefs::kHomePage)); 77 GURL homepage_url(prefs_->GetString(prefs::kHomePage));
78 if (homepage_url.is_valid()) { 78 if (homepage_url.is_valid()) {
79 UMA_HISTOGRAM_ENUMERATION( 79 UMA_HISTOGRAM_ENUMERATION(
80 "Settings.HomePageEngineType", 80 "Settings.HomePageEngineType",
81 TemplateURLPrepopulateData::GetEngineType(homepage_url), 81 TemplateURLPrepopulateData::GetEngineType(homepage_url),
82 SEARCH_ENGINE_MAX); 82 SEARCH_ENGINE_MAX);
83 if (g_browser_process->rappor_service()) { 83 if (g_browser_process->rappor_service()) {
84 g_browser_process->rappor_service()->RecordSample( 84 g_browser_process->rappor_service()->RecordSample(
85 "Settings.HomePage", 85 "Settings.HomePage2",
86 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE, 86 rappor::ETLD_PLUS_ONE_RAPPOR_TYPE,
87 net::registry_controlled_domains::GetDomainAndRegistry(homepage_url, 87 net::registry_controlled_domains::GetDomainAndRegistry(homepage_url,
88 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES)); 88 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES));
89 } 89 }
90 } 90 }
91 } 91 }
92 92
93 int restore_on_startup = prefs_->GetInteger(prefs::kRestoreOnStartup); 93 int restore_on_startup = prefs_->GetInteger(prefs::kRestoreOnStartup);
94 UMA_HISTOGRAM_ENUMERATION("Settings.StartupPageLoadSettings", 94 UMA_HISTOGRAM_ENUMERATION("Settings.StartupPageLoadSettings",
95 restore_on_startup, kSessionStartupPrefValueMax); 95 restore_on_startup, kSessionStartupPrefValueMax);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { 225 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const {
226 return false; 226 return false;
227 } 227 }
228 228
229 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( 229 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse(
230 content::BrowserContext* context) const { 230 content::BrowserContext* context) const {
231 return chrome::GetBrowserContextRedirectedInIncognito(context); 231 return chrome::GetBrowserContextRedirectedInIncognito(context);
232 } 232 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698