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

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: Actually using the new API in AWV 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..1906d14a0c3c2bc41aa1ba1337f909e75ec15d24 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_maxUrlSize = 2 * 1024 * 1024;
boliu 2013/12/10 21:35:44 g_max_url_size
Kristian Monsen 2013/12/10 21:42:07 Done.
+
const char* const* GetSavableSchemes() {
return GetSavableSchemesInternal();
}
@@ -32,4 +34,12 @@ bool IsSavableURL(const GURL& url) {
return false;
}
+void SetMaxURLChars(size_t maxChars) {
+ g_maxUrlSize = maxChars;
+}
+
+size_t MaxURLChars() {
+ return g_maxUrlSize;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698