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

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

Issue 1305213009: Componentize PrefSyncableService and support classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pref_service_syncable
Patch Set: Add missing dependency on //sync:test_support_sync_api for unit tests with gn Created 5 years, 3 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"
11 #include "base/prefs/pref_service.h" 11 #include "base/prefs/pref_service.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/prefs/pref_service_syncable.h"
15 #include "chrome/browser/prefs/pref_service_syncable_util.h" 14 #include "chrome/browser/prefs/pref_service_syncable_util.h"
16 #include "chrome/browser/prefs/session_startup_pref.h" 15 #include "chrome/browser/prefs/session_startup_pref.h"
17 #include "chrome/browser/prefs/synced_pref_change_registrar.h"
18 #include "chrome/browser/profiles/incognito_helpers.h" 16 #include "chrome/browser/profiles/incognito_helpers.h"
19 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
20 #include "chrome/browser/search_engines/template_url_service_factory.h" 18 #include "chrome/browser/search_engines/template_url_service_factory.h"
21 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 19 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
22 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
23 #include "chrome/common/url_constants.h" 21 #include "chrome/common/url_constants.h"
24 #include "components/keyed_service/content/browser_context_dependency_manager.h" 22 #include "components/keyed_service/content/browser_context_dependency_manager.h"
25 #include "components/rappor/rappor_utils.h" 23 #include "components/rappor/rappor_utils.h"
26 #include "components/search_engines/template_url_prepopulate_data.h" 24 #include "components/search_engines/template_url_prepopulate_data.h"
25 #include "components/syncable_prefs/pref_service_syncable.h"
26 #include "components/syncable_prefs/synced_pref_change_registrar.h"
27 #include "content/public/browser/browser_url_handler.h" 27 #include "content/public/browser/browser_url_handler.h"
28 #include "crypto/hmac.h" 28 #include "crypto/hmac.h"
29 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 29 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
30 30
31 namespace { 31 namespace {
32 32
33 const int kSessionStartupPrefValueMax = SessionStartupPref::kPrefValueMax; 33 const int kSessionStartupPrefValueMax = SessionStartupPref::kPrefValueMax;
34 34
35 // Record a sample for the Settings.NewTabPage rappor metric. 35 // Record a sample for the Settings.NewTabPage rappor metric.
36 void SampleNewTabPageURL(Profile* profile) { 36 void SampleNewTabPageURL(Profile* profile) {
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const { 245 bool PrefMetricsService::Factory::ServiceIsNULLWhileTesting() const {
246 return false; 246 return false;
247 } 247 }
248 248
249 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse( 249 content::BrowserContext* PrefMetricsService::Factory::GetBrowserContextToUse(
250 content::BrowserContext* context) const { 250 content::BrowserContext* context) const {
251 return chrome::GetBrowserContextRedirectedInIncognito(context); 251 return chrome::GetBrowserContextRedirectedInIncognito(context);
252 } 252 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/pref_metrics_service.h ('k') | chrome/browser/prefs/pref_model_associator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698