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

Side by Side Diff: content/common/common_param_traits.cc

Issue 6621025: Move socket stream messages to content, in preparation for moving its dispatc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/common_param_traits.h ('k') | content/common/content_constants.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/common/common_param_traits.h"
6
7 #include "content/common/content_constants.h"
8
9 namespace IPC {
10
11 void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
12 m->WriteString(p.possibly_invalid_spec());
13 // TODO(brettw) bug 684583: Add encoding for query params.
14 }
15
16 bool ParamTraits<GURL>::Read(const Message* m, void** iter, GURL* p) {
17 std::string s;
18 if (!m->ReadString(iter, &s) || s.length() > content::kMaxURLChars) {
19 *p = GURL();
20 return false;
21 }
22 *p = GURL(s);
23 return true;
24 }
25
26 void ParamTraits<GURL>::Log(const GURL& p, std::string* l) {
27 l->append(p.spec());
28 }
29
30 } // namespace IPC
OLDNEW
« no previous file with comments | « content/common/common_param_traits.h ('k') | content/common/content_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698