Index: content/public/common/url_utils.h |
diff --git a/content/public/common/url_utils.h b/content/public/common/url_utils.h |
index 0b67ab809727c8a894690dd6d7da0d0a79743ac4..d07e223f297706b7992bc1f82577e12bc7b16f80 100644 |
--- a/content/public/common/url_utils.h |
+++ b/content/public/common/url_utils.h |
@@ -5,6 +5,8 @@ |
#ifndef CONTENT_PUBLIC_COMMON_URL_UTILS_H_ |
#define CONTENT_PUBLIC_COMMON_URL_UTILS_H_ |
+#include <stddef.h> // For size_t |
+ |
#include "content/common/content_export.h" |
class GURL; |
@@ -22,6 +24,22 @@ CONTENT_EXPORT bool HasWebUIScheme(const GURL& url); |
// Check whether we can do the saving page operation for the specified URL. |
CONTENT_EXPORT bool IsSavableURL(const GURL& url); |
+// The maximum number of characters in the URL that we're willing to accept |
+// in the browser process. It is set low enough to avoid damage to the browser |
+// but high enough that a web site can abuse location.hash for a little storage. |
+// We have different values for "max accepted" and "max displayed" because |
+// a data: URI may be legitimately massive, but the full URI would kill all |
+// known operating systems if you dropped it into a UI control. |
+CONTENT_EXPORT size_t GetMaxURLChars(); |
+ |
+#if defined(OS_ANDROID) |
+// Set a new max size for URL's that we are willing to accept in the browser |
+// process. |
+// Should not be used except by Android WebView for backwards compatibility. |
+// Should be called early in start up before forking child processes. |
+CONTENT_EXPORT void SetMaxURLChars(size_t max_chars); |
+#endif |
+ |
} // namespace content |
#endif // CONTENT_PUBLIC_COMMON_URL_UTILS_H_ |