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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java

Issue 2405983002: Catch TransactionTooLargeException in another case. (Closed)
Patch Set: Created 4 years, 2 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: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
index 690cc6c80ebd13f47793b4166dfe400f85d1a1b3..f364b41ab31aac09225923f587b2ca46cdd3c830 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabDelegateFactory.java
@@ -8,10 +8,8 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
-import android.os.TransactionTooLargeException;
import android.text.TextUtils;
-import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
@@ -23,6 +21,7 @@ import org.chromium.chrome.browser.tab.TabContextMenuItemDelegate;
import org.chromium.chrome.browser.tab.TabDelegateFactory;
import org.chromium.chrome.browser.tab.TabWebContentsDelegateAndroid;
import org.chromium.chrome.browser.tab.TopControlsVisibilityDelegate;
+import org.chromium.chrome.browser.util.IntentUtils;
import org.chromium.chrome.browser.util.UrlUtilities;
/**
@@ -75,7 +74,7 @@ public class CustomTabDelegateFactory extends TabDelegateFactory {
}
return false;
} catch (RuntimeException e) {
- logTransactionTooLargeOrRethrow(e, intent);
+ IntentUtils.logTransactionTooLargeOrRethrow(e, intent);
return false;
}
}
@@ -97,7 +96,7 @@ public class CustomTabDelegateFactory extends TabDelegateFactory {
}
}
} catch (RuntimeException e) {
- logTransactionTooLargeOrRethrow(e, intent);
+ IntentUtils.logTransactionTooLargeOrRethrow(e, intent);
}
return false;
}
@@ -109,15 +108,6 @@ public class CustomTabDelegateFactory extends TabDelegateFactory {
public boolean hasExternalActivityStarted() {
return mHasActivityStarted;
}
-
- private static void logTransactionTooLargeOrRethrow(RuntimeException e, Intent intent) {
- // See http://crbug.com/369574.
- if (e.getCause() instanceof TransactionTooLargeException) {
- Log.e(TAG, "Could not resolve Activity for intent " + intent.toString(), e);
- } else {
- throw e;
- }
- }
}
private static class CustomTabWebContentsDelegate extends TabWebContentsDelegateAndroid {

Powered by Google App Engine
This is Rietveld 408576698