| OLD | NEW |
| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 content::WebContents* web_contents = | 216 content::WebContents* web_contents = |
| 217 content::WebContents::FromJavaWebContents(j_web_contents); | 217 content::WebContents::FromJavaWebContents(j_web_contents); |
| 218 | 218 |
| 219 OmniboxLog log( | 219 OmniboxLog log( |
| 220 input_.text(), | 220 input_.text(), |
| 221 false, /* don't know */ | 221 false, /* don't know */ |
| 222 input_.type(), | 222 input_.type(), |
| 223 true, | 223 true, |
| 224 selected_index, | 224 selected_index, |
| 225 false, | 225 false, |
| 226 false, /* don't know */ | |
| 227 SessionTabHelper::IdForTab(web_contents), | 226 SessionTabHelper::IdForTab(web_contents), |
| 228 current_page_classification, | 227 current_page_classification, |
| 229 base::TimeDelta::FromMilliseconds(elapsed_time_since_first_modified), | 228 base::TimeDelta::FromMilliseconds(elapsed_time_since_first_modified), |
| 230 base::string16::npos, | 229 base::string16::npos, |
| 231 now - autocomplete_controller_->last_time_default_match_changed(), | 230 now - autocomplete_controller_->last_time_default_match_changed(), |
| 232 autocomplete_controller_->result()); | 231 autocomplete_controller_->result()); |
| 233 autocomplete_controller_->AddProvidersInfo(&log.providers_info); | 232 autocomplete_controller_->AddProvidersInfo(&log.providers_info); |
| 234 | 233 |
| 235 content::NotificationService::current()->Notify( | 234 content::NotificationService::current()->Notify( |
| 236 chrome::NOTIFICATION_OMNIBOX_OPENED_URL, | 235 chrome::NOTIFICATION_OMNIBOX_OPENED_URL, |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 return; | 555 return; |
| 557 | 556 |
| 558 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. | 557 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. |
| 559 new ZeroSuggestPrefetcher(profile); | 558 new ZeroSuggestPrefetcher(profile); |
| 560 } | 559 } |
| 561 | 560 |
| 562 // Register native methods | 561 // Register native methods |
| 563 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { | 562 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { |
| 564 return RegisterNativesImpl(env); | 563 return RegisterNativesImpl(env); |
| 565 } | 564 } |
| OLD | NEW |