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

Unified Diff: chrome/browser/ui/android/bluetooth_chooser_android.cc

Issue 1601323002: Use GetLastCommittedOrigin instead of GetLastCommittedURL in bluetooth chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use GetLastCommittedOrigin instead of GetLastCommittedURL Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/android/bluetooth_chooser_android.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/bluetooth_chooser_android.cc
diff --git a/chrome/browser/ui/android/bluetooth_chooser_android.cc b/chrome/browser/ui/android/bluetooth_chooser_android.cc
index 04449ae806ae4efc4e11b56486a3f7ada265cfbf..cd0d08dcd65a98bb4573d535b49de62c2ade9ca1 100644
--- a/chrome/browser/ui/android/bluetooth_chooser_android.cc
+++ b/chrome/browser/ui/android/bluetooth_chooser_android.cc
@@ -12,6 +12,7 @@
#include "content/public/browser/android/content_view_core.h"
#include "jni/BluetoothChooserDialog_jni.h"
#include "ui/android/window_android.h"
+#include "url/origin.h"
using base::android::AttachCurrentThread;
using base::android::ConvertUTF8ToJavaString;
@@ -21,7 +22,7 @@ using base::android::ScopedJavaLocalRef;
BluetoothChooserAndroid::BluetoothChooserAndroid(
content::WebContents* web_contents,
const EventHandler& event_handler,
- const GURL& origin)
+ const url::Origin& origin)
: event_handler_(event_handler) {
base::android::ScopedJavaLocalRef<jobject> window_android =
content::ContentViewCore::FromWebContents(
@@ -34,7 +35,7 @@ BluetoothChooserAndroid::BluetoothChooserAndroid(
// Create (and show) the BluetoothChooser dialog.
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> origin_string =
- ConvertUTF8ToJavaString(env, origin.spec());
+ ConvertUTF8ToJavaString(env, origin.Serialize());
ncarter (slow) 2016/01/20 20:59:44 What if the origin is unique? Do we still want to
Jeffrey Yasskin 2016/01/20 21:29:58 Good point. We don't want to show the user the str
ncarter (slow) 2016/01/20 22:00:20 Thanks for the spec link, that was good reading.
juncai 2016/01/21 17:47:42 Done.
java_dialog_.Reset(Java_BluetoothChooserDialog_create(
env, window_android.obj(), origin_string.obj(),
security_model_client->GetSecurityInfo().security_level,
« no previous file with comments | « chrome/browser/ui/android/bluetooth_chooser_android.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698