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

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

Issue 651193002: Remove NOTIFICATION_HISTORY_URL_VISITED (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@373326.2
Patch Set: Address comments Created 6 years, 2 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/predictors/predictor_database.h" 11 #include "chrome/browser/predictors/predictor_database.h"
11 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" 12 #include "chrome/browser/search_engines/chrome_template_url_service_client.h"
12 #include "chrome/browser/search_engines/template_url_service_factory.h" 13 #include "chrome/browser/search_engines/template_url_service_factory.h"
13 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" 14 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 15 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/browser/ui/views/frame/browser_view.h" 16 #include "chrome/browser/ui/views/frame/browser_view.h"
16 #include "chrome/browser/webdata/web_data_service_factory.h" 17 #include "chrome/browser/webdata/web_data_service_factory.h"
17 #include "chrome/test/base/browser_with_test_window_test.h" 18 #include "chrome/test/base/browser_with_test_window_test.h"
18 #include "chrome/test/base/scoped_testing_local_state.h" 19 #include "chrome/test/base/scoped_testing_local_state.h"
19 #include "chrome/test/base/testing_browser_process.h" 20 #include "chrome/test/base/testing_browser_process.h"
(...skipping 12 matching lines...) Expand all
32 33
33 // Caller owns the returned service. 34 // Caller owns the returned service.
34 KeyedService* CreateTemplateURLService(content::BrowserContext* context) { 35 KeyedService* CreateTemplateURLService(content::BrowserContext* context) {
35 Profile* profile = static_cast<Profile*>(context); 36 Profile* profile = static_cast<Profile*>(context);
36 return new TemplateURLService( 37 return new TemplateURLService(
37 profile->GetPrefs(), 38 profile->GetPrefs(),
38 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)), 39 scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)),
39 WebDataServiceFactory::GetKeywordWebDataForProfile( 40 WebDataServiceFactory::GetKeywordWebDataForProfile(
40 profile, Profile::EXPLICIT_ACCESS), 41 profile, Profile::EXPLICIT_ACCESS),
41 scoped_ptr<TemplateURLServiceClient>( 42 scoped_ptr<TemplateURLServiceClient>(
42 new ChromeTemplateURLServiceClient(profile)), 43 new ChromeTemplateURLServiceClient(
44 HistoryServiceFactory::GetForProfile(profile,
45 Profile::EXPLICIT_ACCESS))),
43 NULL, NULL, base::Closure()); 46 NULL, NULL, base::Closure());
44 } 47 }
45 48
46 KeyedService* CreateAutocompleteClassifier(content::BrowserContext* context) { 49 KeyedService* CreateAutocompleteClassifier(content::BrowserContext* context) {
47 Profile* profile = static_cast<Profile*>(context); 50 Profile* profile = static_cast<Profile*>(context);
48 return new AutocompleteClassifier( 51 return new AutocompleteClassifier(
49 make_scoped_ptr(new AutocompleteController( 52 make_scoped_ptr(new AutocompleteController(
50 profile, TemplateURLServiceFactory::GetForProfile(profile), NULL, 53 profile, TemplateURLServiceFactory::GetForProfile(profile), NULL,
51 AutocompleteClassifier::kDefaultOmniboxProviders)), 54 AutocompleteClassifier::kDefaultOmniboxProviders)),
52 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier())); 55 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier()));
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory( 117 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory(
115 profile, &CreateAutocompleteClassifier); 118 profile, &CreateAutocompleteClassifier);
116 return profile; 119 return profile;
117 } 120 }
118 121
119 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() { 122 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() {
120 // Allow BrowserWithTestWindowTest to use Browser to create the default 123 // Allow BrowserWithTestWindowTest to use Browser to create the default
121 // BrowserView and BrowserFrame. 124 // BrowserView and BrowserFrame.
122 return NULL; 125 return NULL;
123 } 126 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/history_menu_bridge.mm ('k') | components/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698