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

Unified Diff: url/ipc/url_param_traits.cc

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 months 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
« no previous file with comments | « url/ipc/url_param_traits.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/ipc/url_param_traits.cc
diff --git a/url/ipc/url_param_traits.cc b/url/ipc/url_param_traits.cc
index e40ae8f9a3c9ccc4558cf6fb559f0342ebec545d..b41e4716204f9a383e5cb64980fdbf86a2633a9e 100644
--- a/url/ipc/url_param_traits.cc
+++ b/url/ipc/url_param_traits.cc
@@ -8,6 +8,15 @@
namespace IPC {
+void ParamTraits<GURL>::GetSize(base::PickleSizer* s, const GURL& p) {
+ if (p.possibly_invalid_spec().length() > url::kMaxURLChars || !p.is_valid()) {
+ GetParamSize(s, std::string());
+ return;
+ }
+
+ GetParamSize(s, p.possibly_invalid_spec());
+}
+
void ParamTraits<GURL>::Write(base::Pickle* m, const GURL& p) {
if (p.possibly_invalid_spec().length() > url::kMaxURLChars) {
m->WriteString(std::string());
« no previous file with comments | « url/ipc/url_param_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698