OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/common/resource_messages.h" | 5 #include "content/common/resource_messages.h" |
6 | 6 |
7 #include "net/base/load_timing_info.h" | 7 #include "net/base/load_timing_info.h" |
8 #include "net/http/http_response_headers.h" | 8 #include "net/http/http_response_headers.h" |
9 | 9 |
10 namespace IPC { | 10 namespace IPC { |
11 | 11 |
12 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write( | 12 void ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Write( |
13 Message* m, const param_type& p) { | 13 Message* m, const param_type& p) { |
14 WriteParam(m, p.get() != NULL); | 14 WriteParam(m, p.get() != nullptr); |
15 if (p.get()) { | 15 if (p.get()) { |
16 // Do not disclose Set-Cookie headers over IPC. | 16 // Do not disclose Set-Cookie headers over IPC. |
17 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES); | 17 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES); |
18 } | 18 } |
19 } | 19 } |
20 | 20 |
21 bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read( | 21 bool ParamTraits<scoped_refptr<net::HttpResponseHeaders> >::Read( |
22 const Message* m, PickleIterator* iter, param_type* r) { | 22 const Message* m, PickleIterator* iter, param_type* r) { |
23 bool has_object; | 23 bool has_object; |
24 if (!ReadParam(m, iter, &has_object)) | 24 if (!ReadParam(m, iter, &has_object)) |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return true; | 128 return true; |
129 } | 129 } |
130 | 130 |
131 void ParamTraits<storage::DataElement>::Log(const param_type& p, | 131 void ParamTraits<storage::DataElement>::Log(const param_type& p, |
132 std::string* l) { | 132 std::string* l) { |
133 l->append("<storage::DataElement>"); | 133 l->append("<storage::DataElement>"); |
134 } | 134 } |
135 | 135 |
136 void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Write( | 136 void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Write( |
137 Message* m, const param_type& p) { | 137 Message* m, const param_type& p) { |
138 WriteParam(m, p.get() != NULL); | 138 WriteParam(m, p.get() != nullptr); |
139 if (p.get()) { | 139 if (p.get()) { |
140 WriteParam(m, p->http_status_code); | 140 WriteParam(m, p->http_status_code); |
141 WriteParam(m, p->http_status_text); | 141 WriteParam(m, p->http_status_text); |
142 WriteParam(m, p->request_headers); | 142 WriteParam(m, p->request_headers); |
143 WriteParam(m, p->response_headers); | 143 WriteParam(m, p->response_headers); |
144 WriteParam(m, p->request_headers_text); | 144 WriteParam(m, p->request_headers_text); |
145 WriteParam(m, p->response_headers_text); | 145 WriteParam(m, p->response_headers_text); |
146 } | 146 } |
147 } | 147 } |
148 | 148 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 l->append(", "); | 254 l->append(", "); |
255 LogParam(p.send_end, l); | 255 LogParam(p.send_end, l); |
256 l->append(", "); | 256 l->append(", "); |
257 LogParam(p.receive_headers_end, l); | 257 LogParam(p.receive_headers_end, l); |
258 l->append(")"); | 258 l->append(")"); |
259 } | 259 } |
260 | 260 |
261 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Write( | 261 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Write( |
262 Message* m, | 262 Message* m, |
263 const param_type& p) { | 263 const param_type& p) { |
264 WriteParam(m, p.get() != NULL); | 264 WriteParam(m, p.get() != nullptr); |
265 if (p.get()) { | 265 if (p.get()) { |
266 WriteParam(m, *p->elements()); | 266 WriteParam(m, *p->elements()); |
267 WriteParam(m, p->identifier()); | 267 WriteParam(m, p->identifier()); |
268 } | 268 } |
269 } | 269 } |
270 | 270 |
271 bool ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Read( | 271 bool ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Read( |
272 const Message* m, | 272 const Message* m, |
273 PickleIterator* iter, | 273 PickleIterator* iter, |
274 param_type* r) { | 274 param_type* r) { |
(...skipping 13 matching lines...) Expand all Loading... |
288 (*r)->set_identifier(identifier); | 288 (*r)->set_identifier(identifier); |
289 return true; | 289 return true; |
290 } | 290 } |
291 | 291 |
292 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( | 292 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( |
293 const param_type& p, std::string* l) { | 293 const param_type& p, std::string* l) { |
294 l->append("<ResourceRequestBody>"); | 294 l->append("<ResourceRequestBody>"); |
295 } | 295 } |
296 | 296 |
297 } // namespace IPC | 297 } // namespace IPC |
OLD | NEW |