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

Side by Side Diff: chrome/browser/profiles/profile_dependency_manager.cc

Issue 10380041: Refactoring AutocompleteActionPredictor Database. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressing Dominich's comments. Created 8 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 (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/profiles/profile_dependency_manager.h" 5 #include "chrome/browser/profiles/profile_dependency_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <iterator> 9 #include <iterator>
10 10
11 #include "chrome/browser/autofill/personal_data_manager_factory.h" 11 #include "chrome/browser/autofill/personal_data_manager_factory.h"
12 #include "chrome/browser/background/background_contents_service_factory.h" 12 #include "chrome/browser/background/background_contents_service_factory.h"
13 #include "chrome/browser/content_settings/cookie_settings.h" 13 #include "chrome/browser/content_settings/cookie_settings.h"
14 #include "chrome/browser/download/download_service_factory.h" 14 #include "chrome/browser/download/download_service_factory.h"
15 #include "chrome/browser/extensions/api/commands/extension_command_service_facto ry.h" 15 #include "chrome/browser/extensions/api/commands/extension_command_service_facto ry.h"
16 #include "chrome/browser/extensions/extension_system_factory.h" 16 #include "chrome/browser/extensions/extension_system_factory.h"
17 #include "chrome/browser/intents/web_intents_registry_factory.h" 17 #include "chrome/browser/intents/web_intents_registry_factory.h"
18 #include "chrome/browser/notifications/desktop_notification_service_factory.h" 18 #include "chrome/browser/notifications/desktop_notification_service_factory.h"
19 #include "chrome/browser/password_manager/password_store_factory.h" 19 #include "chrome/browser/password_manager/password_store_factory.h"
20 #include "chrome/browser/plugin_prefs_factory.h" 20 #include "chrome/browser/plugin_prefs_factory.h"
21 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" 21 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h"
22 #include "chrome/browser/predictors/predictor_database_factory.h"
22 #include "chrome/browser/prerender/prerender_manager_factory.h" 23 #include "chrome/browser/prerender/prerender_manager_factory.h"
23 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" 24 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h"
24 #include "chrome/browser/profiles/profile.h" 25 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/profiles/profile_keyed_service.h" 26 #include "chrome/browser/profiles/profile_keyed_service.h"
26 #include "chrome/browser/profiles/profile_keyed_service_factory.h" 27 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
27 #include "chrome/browser/protector/protector_service_factory.h" 28 #include "chrome/browser/protector/protector_service_factory.h"
28 #include "chrome/browser/search_engines/template_url_fetcher_factory.h" 29 #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
29 #include "chrome/browser/search_engines/template_url_service_factory.h" 30 #include "chrome/browser/search_engines/template_url_service_factory.h"
30 #include "chrome/browser/sessions/session_service_factory.h" 31 #include "chrome/browser/sessions/session_service_factory.h"
31 #include "chrome/browser/sessions/tab_restore_service_factory.h" 32 #include "chrome/browser/sessions/tab_restore_service_factory.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // dependency graph when we create a profile so we can dispatch the profile 168 // dependency graph when we create a profile so we can dispatch the profile
168 // creation message to the services that want to create their services at 169 // creation message to the services that want to create their services at
169 // profile creation time. 170 // profile creation time.
170 // 171 //
171 // TODO(erg): This needs to be something else. I don't think putting every 172 // TODO(erg): This needs to be something else. I don't think putting every
172 // FooServiceFactory here will scale or is desireable long term. 173 // FooServiceFactory here will scale or is desireable long term.
173 void ProfileDependencyManager::AssertFactoriesBuilt() { 174 void ProfileDependencyManager::AssertFactoriesBuilt() {
174 if (built_factories_) 175 if (built_factories_)
175 return; 176 return;
176 177
177 AutocompleteActionPredictorFactory::GetInstance();
178 ChromeURLDataManagerFactory::GetInstance(); 178 ChromeURLDataManagerFactory::GetInstance();
179 CookieSettings::Factory::GetInstance(); 179 CookieSettings::Factory::GetInstance();
180 DownloadServiceFactory::GetInstance(); 180 DownloadServiceFactory::GetInstance();
181 ExtensionCommandServiceFactory::GetInstance(); 181 ExtensionCommandServiceFactory::GetInstance();
182 ExtensionSystemFactory::GetInstance(); 182 ExtensionSystemFactory::GetInstance();
183 FindBarStateFactory::GetInstance(); 183 FindBarStateFactory::GetInstance();
184 #if defined(USE_AURA) 184 #if defined(USE_AURA)
185 GesturePrefsObserverFactoryAura::GetInstance(); 185 GesturePrefsObserverFactoryAura::GetInstance();
186 #endif 186 #endif
187 GlobalErrorServiceFactory::GetInstance(); 187 GlobalErrorServiceFactory::GetInstance();
188 NTPResourceCacheFactory::GetInstance(); 188 NTPResourceCacheFactory::GetInstance();
189 PasswordStoreFactory::GetInstance(); 189 PasswordStoreFactory::GetInstance();
190 PersonalDataManagerFactory::GetInstance(); 190 PersonalDataManagerFactory::GetInstance();
191 PluginPrefsFactory::GetInstance(); 191 PluginPrefsFactory::GetInstance();
192 predictors::AutocompleteActionPredictorFactory::GetInstance();
193 predictors::PredictorDatabaseFactory::GetInstance();
192 prerender::PrerenderManagerFactory::GetInstance(); 194 prerender::PrerenderManagerFactory::GetInstance();
193 ProfileSyncServiceFactory::GetInstance(); 195 ProfileSyncServiceFactory::GetInstance();
194 SigninManagerFactory::GetInstance(); 196 SigninManagerFactory::GetInstance();
195 SpellCheckFactory::GetInstance(); 197 SpellCheckFactory::GetInstance();
196 TabRestoreServiceFactory::GetInstance(); 198 TabRestoreServiceFactory::GetInstance();
197 TemplateURLFetcherFactory::GetInstance(); 199 TemplateURLFetcherFactory::GetInstance();
198 TemplateURLServiceFactory::GetInstance(); 200 TemplateURLServiceFactory::GetInstance();
199 TokenServiceFactory::GetInstance(); 201 TokenServiceFactory::GetInstance();
200 #if !defined(OS_ANDROID) 202 #if !defined(OS_ANDROID)
201 CloudPrintProxyServiceFactory::GetInstance(); 203 CloudPrintProxyServiceFactory::GetInstance();
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 332 }
331 333
332 result.append("\n /* Toplevel profile */\n"); 334 result.append("\n /* Toplevel profile */\n");
333 result.append(" Profile [shape=box];\n"); 335 result.append(" Profile [shape=box];\n");
334 336
335 result.append("}\n"); 337 result.append("}\n");
336 return result; 338 return result;
337 } 339 }
338 340
339 #endif 341 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698