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

Side by Side Diff: chrome/browser/ui/webui/options/startup_pages_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/options/startup_pages_handler.h" 5 #include "chrome/browser/ui/webui/options/startup_pages_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 10 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 } 229 }
230 230
231 void StartupPagesHandler::RequestAutocompleteSuggestions( 231 void StartupPagesHandler::RequestAutocompleteSuggestions(
232 const base::ListValue* args) { 232 const base::ListValue* args) {
233 base::string16 input; 233 base::string16 input;
234 CHECK_EQ(args->GetSize(), 1U); 234 CHECK_EQ(args->GetSize(), 1U);
235 CHECK(args->GetString(0, &input)); 235 CHECK(args->GetString(0, &input));
236 236
237 autocomplete_controller_->Start(AutocompleteInput( 237 autocomplete_controller_->Start(AutocompleteInput(
238 input, base::string16::npos, base::string16(), GURL(), 238 input, base::string16::npos, base::string16(), GURL(),
239 AutocompleteInput::INVALID_SPEC, true, false, false, true)); 239 metrics::OmniboxEventProto::INVALID_SPEC, true, false, false, true));
240 } 240 }
241 241
242 void StartupPagesHandler::OnResultChanged(bool default_match_changed) { 242 void StartupPagesHandler::OnResultChanged(bool default_match_changed) {
243 const AutocompleteResult& result = autocomplete_controller_->result(); 243 const AutocompleteResult& result = autocomplete_controller_->result();
244 base::ListValue suggestions; 244 base::ListValue suggestions;
245 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions); 245 OptionsUI::ProcessAutocompleteSuggestions(result, &suggestions);
246 web_ui()->CallJavascriptFunction( 246 web_ui()->CallJavascriptFunction(
247 "StartupOverlay.updateAutocompleteSuggestions", suggestions); 247 "StartupOverlay.updateAutocompleteSuggestions", suggestions);
248 } 248 }
249 249
250 } // namespace options 250 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698