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

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

Issue 112053002: Allow the max url length to be overridden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed comment nit 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/common_param_traits.cc
diff --git a/content/public/common/common_param_traits.cc b/content/public/common/common_param_traits.cc
index 0501683374c3fa67233cdef8a07985efd1d8f5cd..4e5d92b852230e6b43af471a7547fd2bb6089620 100644
--- a/content/public/common/common_param_traits.cc
+++ b/content/public/common/common_param_traits.cc
@@ -7,6 +7,7 @@
#include "content/public/common/content_constants.h"
#include "content/public/common/page_state.h"
#include "content/public/common/referrer.h"
+#include "content/public/common/url_utils.h"
#include "net/base/host_port_pair.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/rect.h"
@@ -50,7 +51,7 @@ struct SkBitmap_Data {
namespace IPC {
void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
- DCHECK(p.possibly_invalid_spec().length() <= content::kMaxURLChars);
+ DCHECK(p.possibly_invalid_spec().length() <= content::GetMaxURLChars());
// Beware of print-parse inconsistency which would change an invalid
// URL into a valid one. Ideally, the message would contain this flag
@@ -69,7 +70,7 @@ void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
bool ParamTraits<GURL>::Read(const Message* m, PickleIterator* iter, GURL* p) {
std::string s;
- if (!m->ReadString(iter, &s) || s.length() > content::kMaxURLChars) {
+ if (!m->ReadString(iter, &s) || s.length() > content::GetMaxURLChars()) {
*p = GURL();
return false;
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl_unittest.cc ('k') | content/public/common/content_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698