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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_classifier_factory.cc

Issue 363893002: Revert of Reduces dependency from AutocompleteMatch to Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
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/autocomplete/autocomplete_classifier_factory.h" 5 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
6 6
7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 7 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
8 #include "chrome/browser/autocomplete/autocomplete_controller.h" 8 #include "chrome/browser/autocomplete/autocomplete_controller.h"
9 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" 9 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h"
10 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h" 10 #include "chrome/browser/autocomplete/shortcuts_backend_factory.h"
(...skipping 15 matching lines...) Expand all
26 AutocompleteClassifierFactory* AutocompleteClassifierFactory::GetInstance() { 26 AutocompleteClassifierFactory* AutocompleteClassifierFactory::GetInstance() {
27 return Singleton<AutocompleteClassifierFactory>::get(); 27 return Singleton<AutocompleteClassifierFactory>::get();
28 } 28 }
29 29
30 // static 30 // static
31 KeyedService* AutocompleteClassifierFactory::BuildInstanceFor( 31 KeyedService* AutocompleteClassifierFactory::BuildInstanceFor(
32 content::BrowserContext* context) { 32 content::BrowserContext* context) {
33 Profile* profile = static_cast<Profile*>(context); 33 Profile* profile = static_cast<Profile*>(context);
34 return new AutocompleteClassifier( 34 return new AutocompleteClassifier(
35 make_scoped_ptr(new AutocompleteController( 35 make_scoped_ptr(new AutocompleteController(
36 profile, TemplateURLServiceFactory::GetForProfile(profile), NULL, 36 profile, NULL, AutocompleteClassifier::kDefaultOmniboxProviders)),
37 AutocompleteClassifier::kDefaultOmniboxProviders)),
38 scoped_ptr<AutocompleteSchemeClassifier>( 37 scoped_ptr<AutocompleteSchemeClassifier>(
39 new ChromeAutocompleteSchemeClassifier(profile))); 38 new ChromeAutocompleteSchemeClassifier(profile)));
40 } 39 }
41 40
42 AutocompleteClassifierFactory::AutocompleteClassifierFactory() 41 AutocompleteClassifierFactory::AutocompleteClassifierFactory()
43 : BrowserContextKeyedServiceFactory( 42 : BrowserContextKeyedServiceFactory(
44 "AutocompleteClassifier", 43 "AutocompleteClassifier",
45 BrowserContextDependencyManager::GetInstance()) { 44 BrowserContextDependencyManager::GetInstance()) {
46 DependsOn( 45 DependsOn(
47 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); 46 extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
(...skipping 12 matching lines...) Expand all
60 } 59 }
61 60
62 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const { 61 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const {
63 return true; 62 return true;
64 } 63 }
65 64
66 KeyedService* AutocompleteClassifierFactory::BuildServiceInstanceFor( 65 KeyedService* AutocompleteClassifierFactory::BuildServiceInstanceFor(
67 content::BrowserContext* profile) const { 66 content::BrowserContext* profile) const {
68 return BuildInstanceFor(static_cast<Profile*>(profile)); 67 return BuildInstanceFor(static_cast<Profile*>(profile));
69 } 68 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698