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

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: changed bluetooth test at: requestDevice.html 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..5094a9400f2828ed25928f4f1bd5d22cb75775df 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,8 +22,9 @@ 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) {
+ DCHECK(!origin.unique());
base::android::ScopedJavaLocalRef<jobject> window_android =
content::ContentViewCore::FromWebContents(
web_contents)->GetWindowAndroid()->GetJavaObject();
@@ -34,7 +36,7 @@ BluetoothChooserAndroid::BluetoothChooserAndroid(
// Create (and show) the BluetoothChooser dialog.
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jstring> origin_string =
- ConvertUTF8ToJavaString(env, origin.spec());
+ ConvertUTF8ToJavaString(env, origin.Serialize());
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