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

Unified Diff: content/public/common/url_utils.cc

Issue 112053002: Allow the max url length to be overridden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wrapping the setting in OS_ANDROID ifdef Created 7 years 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: content/public/common/url_utils.cc
diff --git a/content/public/common/url_utils.cc b/content/public/common/url_utils.cc
index 2f08b9650b63a10b92353909eaa8a1b5b9f44cb0..65d4bd633c4b58c29a9227df7d99a450555182e0 100644
--- a/content/public/common/url_utils.cc
+++ b/content/public/common/url_utils.cc
@@ -11,6 +11,8 @@
namespace content {
+static size_t g_max_url_size = 2 * 1024 * 1024;
Tom Sepez 2013/12/10 22:12:19 nit: you can probably avoid introducing this stati
Kristian Monsen 2013/12/11 22:05:42 I can but would prefer keeping the code simpler. I
+
const char* const* GetSavableSchemes() {
return GetSavableSchemesInternal();
}
@@ -32,4 +34,14 @@ bool IsSavableURL(const GURL& url) {
return false;
}
+#if defined (OS_ANDROID)
+void SetMaxURLChars(size_t maxChars) {
+ g_maxUrlSize = maxChars;
Tom Sepez 2013/12/10 22:12:19 nit: can you assert that you're android webview an
boliu 2013/12/10 22:21:59 Not really, unless the assert is on something else
Kristian Monsen 2013/12/11 22:05:42 I don't think we can assert. I can update the meth
+}
+#endif
+
+size_t MaxURLChars() {
+ return g_maxUrlSize;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698