OLD | NEW |
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/ui/webui/omnibox/omnibox_page_handler.h" | 5 #include "chrome/browser/ui/webui/omnibox/omnibox_page_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/auto_reset.h" | 12 #include "base/auto_reset.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "base/strings/stringprintf.h" | |
17 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
18 #include "base/time/time.h" | 17 #include "base/time/time.h" |
19 #include "base/values.h" | 18 #include "base/values.h" |
20 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" | 19 #include "chrome/browser/autocomplete/chrome_autocomplete_provider_client.h" |
21 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" | 20 #include "chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.h" |
22 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 21 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
23 #include "chrome/browser/history/history_service_factory.h" | 22 #include "chrome/browser/history/history_service_factory.h" |
24 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/search/search.h" | 24 #include "chrome/browser/search/search.h" |
26 #include "chrome/browser/search_engines/template_url_service_factory.h" | 25 #include "chrome/browser/search_engines/template_url_service_factory.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 prevent_inline_autocomplete, prefer_keyword, true, true, false, | 209 prevent_inline_autocomplete, prefer_keyword, true, true, false, |
211 ChromeAutocompleteSchemeClassifier(profile_)); | 210 ChromeAutocompleteSchemeClassifier(profile_)); |
212 controller_->Start(input_); | 211 controller_->Start(input_); |
213 } | 212 } |
214 | 213 |
215 void OmniboxPageHandler::ResetController() { | 214 void OmniboxPageHandler::ResetController() { |
216 controller_.reset(new AutocompleteController( | 215 controller_.reset(new AutocompleteController( |
217 base::MakeUnique<ChromeAutocompleteProviderClient>(profile_), this, | 216 base::MakeUnique<ChromeAutocompleteProviderClient>(profile_), this, |
218 AutocompleteClassifier::kDefaultOmniboxProviders)); | 217 AutocompleteClassifier::kDefaultOmniboxProviders)); |
219 } | 218 } |
OLD | NEW |