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

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

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 ToJavaIntArray(env, description_class_offsets).obj(), 549 ToJavaIntArray(env, description_class_offsets).obj(),
550 ToJavaIntArray(env, description_class_styles).obj(), 550 ToJavaIntArray(env, description_class_styles).obj(),
551 answer_contents.obj(), 551 answer_contents.obj(),
552 answer_type.obj(), 552 answer_type.obj(),
553 fill_into_edit.obj(), 553 fill_into_edit.obj(),
554 destination_url.obj(), 554 destination_url.obj(),
555 bookmark_model && bookmark_model->IsBookmarked(match.destination_url), 555 bookmark_model && bookmark_model->IsBookmarked(match.destination_url),
556 match.SupportsDeletion()); 556 match.SupportsDeletion());
557 } 557 }
558 558
559 base::string16 AutocompleteControllerAndroid::FormatURLUsingAcceptLanguages(
560 GURL url) {
561 if (profile_ == NULL)
562 return base::string16();
563
564 std::string languages(
565 profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
566
567 return url_formatter::FormatUrl(
568 url, languages, url_formatter::kFormatUrlOmitAll,
569 net::UnescapeRule::SPACES, nullptr, nullptr, nullptr);
570 }
571
572 ScopedJavaLocalRef<jobject> 559 ScopedJavaLocalRef<jobject>
573 AutocompleteControllerAndroid::GetTopSynchronousResult( 560 AutocompleteControllerAndroid::GetTopSynchronousResult(
574 JNIEnv* env, 561 JNIEnv* env,
575 const JavaRef<jobject>& obj, 562 const JavaRef<jobject>& obj,
576 const JavaRef<jstring>& j_text, 563 const JavaRef<jstring>& j_text,
577 bool prevent_inline_autocomplete) { 564 bool prevent_inline_autocomplete) {
578 if (!autocomplete_controller_) 565 if (!autocomplete_controller_)
579 return ScopedJavaLocalRef<jobject>(); 566 return ScopedJavaLocalRef<jobject>();
580 567
581 inside_synchronous_start_ = true; 568 inside_synchronous_start_ = true;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 return; 636 return;
650 637
651 // ZeroSuggestPrefetcher deletes itself after it's done prefetching. 638 // ZeroSuggestPrefetcher deletes itself after it's done prefetching.
652 new ZeroSuggestPrefetcher(profile); 639 new ZeroSuggestPrefetcher(profile);
653 } 640 }
654 641
655 // Register native methods 642 // Register native methods
656 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) { 643 bool RegisterAutocompleteControllerAndroid(JNIEnv* env) {
657 return RegisterNativesImpl(env); 644 return RegisterNativesImpl(env);
658 } 645 }
OLDNEW
« no previous file with comments | « chrome/browser/android/omnibox/autocomplete_controller_android.h ('k') | chrome/browser/android/password_ui_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698