| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ios/chrome/browser/autocomplete/autocomplete_classifier_factory.h" | 5 #include "ios/chrome/browser/autocomplete/autocomplete_classifier_factory.h" |
| 6 | 6 |
| 7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
| 8 #include "components/keyed_service/ios/browser_state_dependency_manager.h" | 8 #include "components/keyed_service/ios/browser_state_dependency_manager.h" |
| 9 #include "components/omnibox/browser/autocomplete_classifier.h" | 9 #include "components/omnibox/browser/autocomplete_classifier.h" |
| 10 #include "components/omnibox/browser/autocomplete_controller.h" | 10 #include "components/omnibox/browser/autocomplete_controller.h" |
| 11 #include "ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h" | 11 #include "ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.h" |
| 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" | 12 #include "ios/chrome/browser/autocomplete/autocomplete_scheme_classifier_impl.h" |
| 13 #include "ios/chrome/browser/autocomplete/in_memory_url_index_factory.h" | 13 #include "ios/chrome/browser/autocomplete/in_memory_url_index_factory.h" |
| 14 #include "ios/chrome/browser/autocomplete/shortcuts_backend_factory.h" | 14 #include "ios/chrome/browser/autocomplete/shortcuts_backend_factory.h" |
| 15 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" | 15 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" |
| 16 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" |
| 16 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" | 17 #include "ios/chrome/browser/search_engines/template_url_service_factory.h" |
| 17 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state.
h" | |
| 18 | 18 |
| 19 namespace ios { | 19 namespace ios { |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 scoped_ptr<KeyedService> BuildAutocompleteClassifier( | 22 scoped_ptr<KeyedService> BuildAutocompleteClassifier( |
| 23 web::BrowserState* context) { | 23 web::BrowserState* context) { |
| 24 ios::ChromeBrowserState* browser_state = | 24 ios::ChromeBrowserState* browser_state = |
| 25 ios::ChromeBrowserState::FromBrowserState(context); | 25 ios::ChromeBrowserState::FromBrowserState(context); |
| 26 return make_scoped_ptr(new AutocompleteClassifier( | 26 return make_scoped_ptr(new AutocompleteClassifier( |
| 27 make_scoped_ptr(new AutocompleteController( | 27 make_scoped_ptr(new AutocompleteController( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 web::BrowserState* AutocompleteClassifierFactory::GetBrowserStateToUse( | 69 web::BrowserState* AutocompleteClassifierFactory::GetBrowserStateToUse( |
| 70 web::BrowserState* context) const { | 70 web::BrowserState* context) const { |
| 71 return GetBrowserStateRedirectedInIncognito(context); | 71 return GetBrowserStateRedirectedInIncognito(context); |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const { | 74 bool AutocompleteClassifierFactory::ServiceIsNULLWhileTesting() const { |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace ios | 78 } // namespace ios |
| OLD | NEW |