| Index: content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java
|
| diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java
|
| index d5b89bc6586b6da34c0c5f8ffd264a9cae161e1a..c4307ab5311d4cba1d48242e0dc0d1a6b5202f52 100644
|
| --- a/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java
|
| +++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewClient.java
|
| @@ -26,12 +26,16 @@ import org.chromium.base.Log;
|
| */
|
| public class ContentViewClient {
|
| // Tag used for logging.
|
| - private static final String TAG = "cr.ContentViewClient";
|
| + private static final String TAG = "cr_ContentViewClient";
|
|
|
| // Default value to signal that the ContentView's size should not be overridden.
|
| private static final int UNSPECIFIED_MEASURE_SPEC =
|
| MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);
|
|
|
| + private static final String GEO_SCHEME = "geo";
|
| + private static final String TEL_SCHEME = "tel";
|
| + private static final String MAILTO_SCHEME = "mailto";
|
| +
|
| public void onUpdateTitle(String title) {
|
| }
|
|
|
| @@ -144,6 +148,14 @@ public class ContentViewClient {
|
| // Perform generic parsing of the URI to turn it into an Intent.
|
| try {
|
| intent = Intent.parseUri(intentUrl, Intent.URI_INTENT_SCHEME);
|
| +
|
| + String scheme = intent.getScheme();
|
| + if (!scheme.equals(GEO_SCHEME) && !scheme.equals(TEL_SCHEME)
|
| + && !scheme.equals(MAILTO_SCHEME)) {
|
| + Log.w(TAG, "Invalid scheme for URI %s", intentUrl);
|
| + return;
|
| + }
|
| +
|
| intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
| } catch (Exception ex) {
|
| Log.w(TAG, "Bad URI %s", intentUrl, ex);
|
|
|