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

Side by Side Diff: chrome/browser/android/omnibox/autocomplete_controller_android.cc

Issue 872433003: Remove omnibox watcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/android/omnibox/autocomplete_controller_android.h" 5 #include "chrome/browser/android/omnibox/autocomplete_controller_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 content::WebContents* web_contents = 217 content::WebContents* web_contents =
218 content::WebContents::FromJavaWebContents(j_web_contents); 218 content::WebContents::FromJavaWebContents(j_web_contents);
219 219
220 OmniboxLog log( 220 OmniboxLog log(
221 input_.text(), 221 input_.text(),
222 false, /* don't know */ 222 false, /* don't know */
223 input_.type(), 223 input_.type(),
224 true, 224 true,
225 selected_index, 225 selected_index,
226 false, 226 false,
227 false, /* don't know */
228 SessionTabHelper::IdForTab(web_contents), 227 SessionTabHelper::IdForTab(web_contents),
229 current_page_classification, 228 current_page_classification,
230 base::TimeDelta::FromMilliseconds(elapsed_time_since_first_modified), 229 base::TimeDelta::FromMilliseconds(elapsed_time_since_first_modified),
231 base::string16::npos, 230 base::string16::npos,
232 now - autocomplete_controller_->last_time_default_match_changed(), 231 now - autocomplete_controller_->last_time_default_match_changed(),
233 autocomplete_controller_->result()); 232 autocomplete_controller_->result());
234 autocomplete_controller_->AddProvidersInfo(&log.providers_info); 233 autocomplete_controller_->AddProvidersInfo(&log.providers_info);
235 234
236 content::NotificationService::current()->Notify( 235 content::NotificationService::current()->Notify(
237 chrome::NOTIFICATION_OMNIBOX_OPENED_URL, 236 chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return; 556 return;
558 557
559 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. 558 // ZeroSuggestPrefetcher deletes itself after it's done prefetching.
560 new ZeroSuggestPrefetcher(profile); 559 new ZeroSuggestPrefetcher(profile);
561 } 560 }
562 561
563 // Register native methods 562 // Register native methods
564 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { 563 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) {
565 return RegisterNativesImpl(env); 564 return RegisterNativesImpl(env);
566 } 565 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/omnibox/omnibox_log.h » ('j') | chrome/common/safe_browsing/csd.proto » ('J')

Powered by Google App Engine
This is Rietveld 408576698