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

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: 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
« ui/gfx/ipc/gfx_param_traits.cc ('K') | « 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..b9297122da515d7a724e16f552845f9107ce51e6 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()) {
+ s->AddString(std::string());
+ return;
+ }
+
+ s->AddString(p.possibly_invalid_spec());
dcheng 2016/05/11 17:39:12 Ditto: maybe this should just be GetParamSize(s, p
jam 2016/05/11 17:57:02 Done.
+}
+
void ParamTraits<GURL>::Write(base::Pickle* m, const GURL& p) {
if (p.possibly_invalid_spec().length() > url::kMaxURLChars) {
m->WriteString(std::string());
« ui/gfx/ipc/gfx_param_traits.cc ('K') | « url/ipc/url_param_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698