| 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..5c7bb6cc08bf0d67b1b18b64c74fefeda1d13e69 100644
|
| --- a/content/public/common/url_utils.cc
|
| +++ b/content/public/common/url_utils.cc
|
| @@ -4,13 +4,19 @@
|
|
|
| #include "content/public/common/url_utils.h"
|
|
|
| +#include "base/base_switches.h"
|
| +#include "base/command_line.h"
|
| +#include "base/logging.h"
|
| #include "build/build_config.h"
|
| #include "content/common/savable_url_schemes.h"
|
| +#include "content/public/common/content_switches.h"
|
| #include "content/public/common/url_constants.h"
|
| #include "url/gurl.h"
|
|
|
| namespace content {
|
|
|
| +static size_t g_max_url_size = 2 * 1024 * 1024;
|
| +
|
| const char* const* GetSavableSchemes() {
|
| return GetSavableSchemesInternal();
|
| }
|
| @@ -32,4 +38,17 @@ bool IsSavableURL(const GURL& url) {
|
| return false;
|
| }
|
|
|
| +#if defined(OS_ANDROID)
|
| +void SetMaxURLChars(size_t max_chars) {
|
| + // Check that it is not used by a multiprocesses embedder
|
| + CommandLine* cmd = CommandLine::ForCurrentProcess();
|
| + CHECK(cmd->HasSwitch(switches::kSingleProcess));
|
| + g_max_url_size = max_chars;
|
| +}
|
| +#endif
|
| +
|
| +size_t GetMaxURLChars() {
|
| + return g_max_url_size;
|
| +}
|
| +
|
| } // namespace content
|
|
|