Index: chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java b/chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java |
index 480f946a3e7d3e045867463a2fadd42c07c1d3c8..3c7a00e85e6d5e027f2b4e91661bfeda33b0b22f 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/WebappAuthenticator.java |
@@ -7,6 +7,7 @@ package org.chromium.chrome.browser; |
import android.annotation.SuppressLint; |
import android.content.Context; |
import android.os.AsyncTask; |
+import android.os.StrictMode; |
import android.util.Log; |
import org.chromium.base.SecureRandomInitializer; |
@@ -54,7 +55,14 @@ public class WebappAuthenticator { |
* @return true if the MAC is a valid MAC for the URL, false otherwise. |
*/ |
public static boolean isUrlValid(Context context, String url, byte[] mac) { |
- byte[] goodMac = getMacForUrl(context, url); |
+ byte[] goodMac = null; |
+ // Temporarily allowing disk access while fixing. TODO: http://crbug.com/525785 |
+ StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads(); |
+ try { |
+ goodMac = getMacForUrl(context, url); |
+ } finally { |
+ StrictMode.setThreadPolicy(oldPolicy); |
+ } |
if (goodMac == null) { |
return false; |
} |