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

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

Issue 2721993002: Omnibox - Make Clipboard Provider Enabled via an Experimental Feature (Closed)
Patch Set: rebase Created 3 years, 9 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/autocomplete/autocomplete_classifier_factory.h" 5 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" 8 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.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/in_memory_url_index_factory.h" 10 #include "chrome/browser/autocomplete/in_memory_url_index_factory.h"
(...skipping 23 matching lines...) Expand all
34 return base::Singleton<AutocompleteClassifierFactory>::get(); 34 return base::Singleton<AutocompleteClassifierFactory>::get();
35 } 35 }
36 36
37 // static 37 // static
38 std::unique_ptr<KeyedService> AutocompleteClassifierFactory::BuildInstanceFor( 38 std::unique_ptr<KeyedService> AutocompleteClassifierFactory::BuildInstanceFor(
39 content::BrowserContext* context) { 39 content::BrowserContext* context) {
40 Profile* profile = static_cast<Profile*>(context); 40 Profile* profile = static_cast<Profile*>(context);
41 return base::MakeUnique<AutocompleteClassifier>( 41 return base::MakeUnique<AutocompleteClassifier>(
42 base::WrapUnique(new AutocompleteController( 42 base::WrapUnique(new AutocompleteController(
43 base::WrapUnique(new ChromeAutocompleteProviderClient(profile)), NULL, 43 base::WrapUnique(new ChromeAutocompleteProviderClient(profile)), NULL,
44 AutocompleteClassifier::kDefaultOmniboxProviders)), 44 AutocompleteClassifier::DefaultOmniboxProviders())),
45 std::unique_ptr<AutocompleteSchemeClassifier>( 45 std::unique_ptr<AutocompleteSchemeClassifier>(
46 new ChromeAutocompleteSchemeClassifier(profile))); 46 new ChromeAutocompleteSchemeClassifier(profile)));
47 } 47 }
48 48
49 AutocompleteClassifierFactory::AutocompleteClassifierFactory() 49 AutocompleteClassifierFactory::AutocompleteClassifierFactory()
50 : BrowserContextKeyedServiceFactory( 50 : BrowserContextKeyedServiceFactory(
51 "AutocompleteClassifier", 51 "AutocompleteClassifier",
52 BrowserContextDependencyManager::GetInstance()) { 52 BrowserContextDependencyManager::GetInstance()) {
53 #if BUILDFLAG(ENABLE_EXTENSIONS) 53 #if BUILDFLAG(ENABLE_EXTENSIONS)
54 DependsOn( 54 DependsOn(
(...skipping 15 matching lines...) Expand all
70 } 70 }
71 71
72 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const { 72 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const {
73 return true; 73 return true;
74 } 74 }
75 75
76 KeyedService* AutocompleteClassifierFactory::BuildServiceInstanceFor( 76 KeyedService* AutocompleteClassifierFactory::BuildServiceInstanceFor(
77 content::BrowserContext* profile) const { 77 content::BrowserContext* profile) const {
78 return BuildInstanceFor(static_cast<Profile*>(profile)).release(); 78 return BuildInstanceFor(static_cast<Profile*>(profile)).release();
79 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/android/vr_shell/vr_omnibox.cc ('k') | chrome/browser/ui/app_list/search/omnibox_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698