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

Side by Side Diff: chrome/browser/ui/views/frame/test_with_browser_view.cc

Issue 839193002: Move ServiceAccessType into //components/keyed_service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on android Created 5 years, 11 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/ui/views/frame/test_with_browser_view.h" 5 #include "chrome/browser/ui/views/frame/test_with_browser_view.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_classifier_factory.h" 8 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
9 #include "chrome/browser/autocomplete/autocomplete_controller.h" 9 #include "chrome/browser/autocomplete/autocomplete_controller.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 20 matching lines...) Expand all
31 31
32 namespace { 32 namespace {
33 33
34 // Caller owns the returned service. 34 // Caller owns the returned service.
35 KeyedService* CreateTemplateURLService(content::BrowserContext* context) { 35 KeyedService* CreateTemplateURLService(content::BrowserContext* context) {
36 Profile* profile = static_cast<Profile*>(context); 36 Profile* profile = static_cast<Profile*>(context);
37 return new TemplateURLService( 37 return new TemplateURLService(
38 profile->GetPrefs(), 38 profile->GetPrefs(),
39 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)), 39 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)),
40 WebDataServiceFactory::GetKeywordWebDataForProfile( 40 WebDataServiceFactory::GetKeywordWebDataForProfile(
41 profile, Profile::EXPLICIT_ACCESS), 41 profile, ServiceAccessType::EXPLICIT_ACCESS),
42 scoped_ptr<TemplateURLServiceClient>( 42 scoped_ptr<TemplateURLServiceClient>(new ChromeTemplateURLServiceClient(
43 new ChromeTemplateURLServiceClient( 43 HistoryServiceFactory::GetForProfile(
44 HistoryServiceFactory::GetForProfile(profile, 44 profile, ServiceAccessType::EXPLICIT_ACCESS))),
45 Profile::EXPLICIT_ACCESS))),
46 nullptr, nullptr, base::Closure()); 45 nullptr, nullptr, base::Closure());
47 } 46 }
48 47
49 KeyedService* CreateAutocompleteClassifier(content::BrowserContext* context) { 48 KeyedService* CreateAutocompleteClassifier(content::BrowserContext* context) {
50 Profile* profile = static_cast<Profile*>(context); 49 Profile* profile = static_cast<Profile*>(context);
51 return new AutocompleteClassifier( 50 return new AutocompleteClassifier(
52 make_scoped_ptr(new AutocompleteController( 51 make_scoped_ptr(new AutocompleteController(
53 profile, TemplateURLServiceFactory::GetForProfile(profile), nullptr, 52 profile, TemplateURLServiceFactory::GetForProfile(profile), nullptr,
54 AutocompleteClassifier::kDefaultOmniboxProviders)), 53 AutocompleteClassifier::kDefaultOmniboxProviders)),
55 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier())); 54 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier()));
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory( 116 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory(
118 profile, &CreateAutocompleteClassifier); 117 profile, &CreateAutocompleteClassifier);
119 return profile; 118 return profile;
120 } 119 }
121 120
122 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() { 121 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() {
123 // Allow BrowserWithTestWindowTest to use Browser to create the default 122 // Allow BrowserWithTestWindowTest to use Browser to create the default
124 // BrowserView and BrowserFrame. 123 // BrowserView and BrowserFrame.
125 return nullptr; 124 return nullptr;
126 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/recent_tabs_sub_menu_model.cc ('k') | chrome/browser/ui/website_settings/website_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698