OLD | NEW |
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/autocomplete/chrome_autocomplete_provider_client.h" |
10 #include "chrome/browser/history/history_service_factory.h" | 11 #include "chrome/browser/history/history_service_factory.h" |
11 #include "chrome/browser/predictors/predictor_database.h" | 12 #include "chrome/browser/predictors/predictor_database.h" |
12 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" | 13 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" |
13 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
14 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 15 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 16 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
16 #include "chrome/browser/ui/views/frame/browser_view.h" | 17 #include "chrome/browser/ui/views/frame/browser_view.h" |
17 #include "chrome/browser/web_data_service_factory.h" | 18 #include "chrome/browser/web_data_service_factory.h" |
18 #include "chrome/test/base/browser_with_test_window_test.h" | 19 #include "chrome/test/base/browser_with_test_window_test.h" |
19 #include "chrome/test/base/scoped_testing_local_state.h" | 20 #include "chrome/test/base/scoped_testing_local_state.h" |
(...skipping 23 matching lines...) Expand all Loading... |
43 HistoryServiceFactory::GetForProfile( | 44 HistoryServiceFactory::GetForProfile( |
44 profile, ServiceAccessType::EXPLICIT_ACCESS))), | 45 profile, ServiceAccessType::EXPLICIT_ACCESS))), |
45 nullptr, nullptr, base::Closure())); | 46 nullptr, nullptr, base::Closure())); |
46 } | 47 } |
47 | 48 |
48 scoped_ptr<KeyedService> CreateAutocompleteClassifier( | 49 scoped_ptr<KeyedService> CreateAutocompleteClassifier( |
49 content::BrowserContext* context) { | 50 content::BrowserContext* context) { |
50 Profile* profile = static_cast<Profile*>(context); | 51 Profile* profile = static_cast<Profile*>(context); |
51 return make_scoped_ptr(new AutocompleteClassifier( | 52 return make_scoped_ptr(new AutocompleteClassifier( |
52 make_scoped_ptr(new AutocompleteController( | 53 make_scoped_ptr(new AutocompleteController( |
53 profile, TemplateURLServiceFactory::GetForProfile(profile), nullptr, | 54 make_scoped_ptr(new ChromeAutocompleteProviderClient(profile)), |
54 AutocompleteClassifier::kDefaultOmniboxProviders)), | 55 |
| 56 nullptr, AutocompleteClassifier::kDefaultOmniboxProviders)), |
55 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier()))); | 57 scoped_ptr<AutocompleteSchemeClassifier>(new TestSchemeClassifier()))); |
56 } | 58 } |
57 | 59 |
58 } // namespace | 60 } // namespace |
59 | 61 |
60 TestWithBrowserView::TestWithBrowserView() { | 62 TestWithBrowserView::TestWithBrowserView() { |
61 } | 63 } |
62 | 64 |
63 TestWithBrowserView::TestWithBrowserView( | 65 TestWithBrowserView::TestWithBrowserView( |
64 Browser::Type browser_type, | 66 Browser::Type browser_type, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory( | 119 AutocompleteClassifierFactory::GetInstance()->SetTestingFactory( |
118 profile, &CreateAutocompleteClassifier); | 120 profile, &CreateAutocompleteClassifier); |
119 return profile; | 121 return profile; |
120 } | 122 } |
121 | 123 |
122 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() { | 124 BrowserWindow* TestWithBrowserView::CreateBrowserWindow() { |
123 // Allow BrowserWithTestWindowTest to use Browser to create the default | 125 // Allow BrowserWithTestWindowTest to use Browser to create the default |
124 // BrowserView and BrowserFrame. | 126 // BrowserView and BrowserFrame. |
125 return nullptr; | 127 return nullptr; |
126 } | 128 } |
OLD | NEW |