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

Unified Diff: customtabs/src/android/support/customtabs/CustomTabsSessionToken.java

Issue 2978593002: Add validateOrigin() to the support library. (Closed)
Patch Set: Comment. Created 3 years, 5 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
Index: customtabs/src/android/support/customtabs/CustomTabsSessionToken.java
diff --git a/customtabs/src/android/support/customtabs/CustomTabsSessionToken.java b/customtabs/src/android/support/customtabs/CustomTabsSessionToken.java
index 749edc2f69e07977dd1655adf55221cbe6f7d39f..d43349b14c5a221dfdbc463a14141b13940d3646 100644
--- a/customtabs/src/android/support/customtabs/CustomTabsSessionToken.java
+++ b/customtabs/src/android/support/customtabs/CustomTabsSessionToken.java
@@ -17,9 +17,11 @@
package android.support.customtabs;
import android.content.Intent;
+import android.net.Uri;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
+import android.support.customtabs.CustomTabsService.Relation;
import android.support.v4.app.BundleCompat;
import android.util.Log;
@@ -45,6 +47,10 @@ public class CustomTabsSessionToken {
@Override
public void onPostMessage(String message, Bundle extras) {}
+ @Override
+ public void onRelationshipValidationResult(int relation, Uri origin, boolean result,
+ Bundle extras) {}
+
@Override
public IBinder asBinder() {
return this;
@@ -114,6 +120,17 @@ public class CustomTabsSessionToken {
Log.e(TAG, "RemoteException during ICustomTabsCallback transaction");
}
}
+
+ @Override
+ public void onRelationshipValidationResult(@Relation int relation, Uri origin,
+ boolean result, Bundle extras) {
+ try {
+ mCallbackBinder.onRelationshipValidationResult(relation, origin, result, extras);
+ } catch (RemoteException e) {
+ Log.e(TAG, "RemoteException during ICustomTabsCallback transaction");
+ }
+ }
+
};
}

Powered by Google App Engine
This is Rietveld 408576698