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

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

Issue 16236003: Add tracing to prefs for analyzing startup performance (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_pref_service_factory.h" 5 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h"
8 #include "base/file_util.h" 9 #include "base/file_util.h"
9 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
10 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
11 #include "base/prefs/default_pref_store.h" 12 #include "base/prefs/default_pref_store.h"
12 #include "base/prefs/json_pref_store.h" 13 #include "base/prefs/json_pref_store.h"
13 #include "base/prefs/pref_notifier_impl.h" 14 #include "base/prefs/pref_notifier_impl.h"
14 #include "base/prefs/pref_registry.h" 15 #include "base/prefs/pref_registry.h"
15 #include "base/prefs/pref_service.h" 16 #include "base/prefs/pref_service.h"
16 #include "base/prefs/pref_value_store.h" 17 #include "base/prefs/pref_value_store.h"
17 #include "chrome/browser/policy/configuration_policy_pref_store.h" 18 #include "chrome/browser/policy/configuration_policy_pref_store.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return builder.Create(pref_registry); 112 return builder.Create(pref_registry);
112 } 113 }
113 114
114 PrefServiceSyncable* CreateProfilePrefs( 115 PrefServiceSyncable* CreateProfilePrefs(
115 const base::FilePath& pref_filename, 116 const base::FilePath& pref_filename,
116 base::SequencedTaskRunner* pref_io_task_runner, 117 base::SequencedTaskRunner* pref_io_task_runner,
117 policy::PolicyService* policy_service, 118 policy::PolicyService* policy_service,
118 const scoped_refptr<PrefStore>& extension_prefs, 119 const scoped_refptr<PrefStore>& extension_prefs,
119 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry, 120 const scoped_refptr<user_prefs::PrefRegistrySyncable>& pref_registry,
120 bool async) { 121 bool async) {
122 TRACE_EVENT0("browser", "chrome_prefs::CreateProfilePrefs")
121 PrefServiceSyncableBuilder builder; 123 PrefServiceSyncableBuilder builder;
122 PrepareBuilder(&builder, 124 PrepareBuilder(&builder,
123 pref_filename, 125 pref_filename,
124 pref_io_task_runner, 126 pref_io_task_runner,
125 policy_service, 127 policy_service,
126 extension_prefs, 128 extension_prefs,
127 async); 129 async);
128 return builder.CreateSyncable(pref_registry); 130 return builder.CreateSyncable(pref_registry);
129 } 131 }
130 132
131 } // namespace chrome_prefs 133 } // namespace chrome_prefs
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698