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

Side by Side Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc

Issue 343523003: Remove AutocompleteInput Type and PageClassification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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_ui_handler.h" 5 #include "chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // variable (or something else) and some providers will short-circuit 165 // variable (or something else) and some providers will short-circuit
166 // important logic and return stale results. In short, we want the 166 // important logic and return stale results. In short, we want the
167 // actual results to not depend on the state of the previous request. 167 // actual results to not depend on the state of the previous request.
168 ResetController(); 168 ResetController();
169 time_omnibox_started_ = base::Time::Now(); 169 time_omnibox_started_ = base::Time::Now();
170 input_ = AutocompleteInput( 170 input_ = AutocompleteInput(
171 input_string.To<base::string16>(), 171 input_string.To<base::string16>(),
172 cursor_position, 172 cursor_position,
173 base::string16(), // user's desired tld (top-level domain) 173 base::string16(), // user's desired tld (top-level domain)
174 GURL(), 174 GURL(),
175 static_cast<AutocompleteInput::PageClassification>( 175 static_cast<metrics::OmniboxEventProto::PageClassification>(
176 page_classification), 176 page_classification),
177 prevent_inline_autocomplete, 177 prevent_inline_autocomplete,
178 prefer_keyword, 178 prefer_keyword,
179 true, // allow exact keyword matches 179 true, // allow exact keyword matches
180 true); 180 true);
181 controller_->Start(input_); // want all matches 181 controller_->Start(input_); // want all matches
182 } 182 }
183 183
184 void OmniboxUIHandler::ResetController() { 184 void OmniboxUIHandler::ResetController() {
185 controller_.reset(new AutocompleteController(profile_, this, 185 controller_.reset(new AutocompleteController(profile_, this,
186 AutocompleteClassifier::kDefaultOmniboxProviders)); 186 AutocompleteClassifier::kDefaultOmniboxProviders));
187 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698