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 { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 127 } |
128 } | 128 } |
129 return true; | 129 return true; |
130 } | 130 } |
131 | 131 |
132 void ParamTraits<webkit_common::DataElement>::Log( | 132 void ParamTraits<webkit_common::DataElement>::Log( |
133 const param_type& p, std::string* l) { | 133 const param_type& p, std::string* l) { |
134 l->append("<webkit_common::DataElement>"); | 134 l->append("<webkit_common::DataElement>"); |
135 } | 135 } |
136 | 136 |
137 void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Write( | 137 void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Write( |
138 Message* m, const param_type& p) { | 138 Message* m, const param_type& p) { |
139 WriteParam(m, p.get() != NULL); | 139 WriteParam(m, p.get() != NULL); |
140 if (p.get()) { | 140 if (p.get()) { |
141 WriteParam(m, p->http_status_code); | 141 WriteParam(m, p->http_status_code); |
142 WriteParam(m, p->http_status_text); | 142 WriteParam(m, p->http_status_text); |
143 WriteParam(m, p->request_headers); | 143 WriteParam(m, p->request_headers); |
144 WriteParam(m, p->response_headers); | 144 WriteParam(m, p->response_headers); |
145 WriteParam(m, p->request_headers_text); | 145 WriteParam(m, p->request_headers_text); |
146 WriteParam(m, p->response_headers_text); | 146 WriteParam(m, p->response_headers_text); |
147 } | 147 } |
148 } | 148 } |
149 | 149 |
150 bool ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Read( | 150 bool ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Read( |
151 const Message* m, PickleIterator* iter, param_type* r) { | 151 const Message* m, PickleIterator* iter, param_type* r) { |
152 bool has_object; | 152 bool has_object; |
153 if (!ReadParam(m, iter, &has_object)) | 153 if (!ReadParam(m, iter, &has_object)) |
154 return false; | 154 return false; |
155 if (!has_object) | 155 if (!has_object) |
156 return true; | 156 return true; |
157 *r = new webkit_glue::ResourceDevToolsInfo(); | 157 *r = new content::ResourceDevToolsInfo(); |
158 return | 158 return |
159 ReadParam(m, iter, &(*r)->http_status_code) && | 159 ReadParam(m, iter, &(*r)->http_status_code) && |
160 ReadParam(m, iter, &(*r)->http_status_text) && | 160 ReadParam(m, iter, &(*r)->http_status_text) && |
161 ReadParam(m, iter, &(*r)->request_headers) && | 161 ReadParam(m, iter, &(*r)->request_headers) && |
162 ReadParam(m, iter, &(*r)->response_headers) && | 162 ReadParam(m, iter, &(*r)->response_headers) && |
163 ReadParam(m, iter, &(*r)->request_headers_text) && | 163 ReadParam(m, iter, &(*r)->request_headers_text) && |
164 ReadParam(m, iter, &(*r)->response_headers_text); | 164 ReadParam(m, iter, &(*r)->response_headers_text); |
165 } | 165 } |
166 | 166 |
167 void ParamTraits<scoped_refptr<webkit_glue::ResourceDevToolsInfo> >::Log( | 167 void ParamTraits<scoped_refptr<content::ResourceDevToolsInfo> >::Log( |
168 const param_type& p, std::string* l) { | 168 const param_type& p, std::string* l) { |
169 l->append("("); | 169 l->append("("); |
170 if (p.get()) { | 170 if (p.get()) { |
171 LogParam(p->request_headers, l); | 171 LogParam(p->request_headers, l); |
172 l->append(", "); | 172 l->append(", "); |
173 LogParam(p->response_headers, l); | 173 LogParam(p->response_headers, l); |
174 } | 174 } |
175 l->append(")"); | 175 l->append(")"); |
176 } | 176 } |
177 | 177 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 (*r)->set_identifier(identifier); | 289 (*r)->set_identifier(identifier); |
290 return true; | 290 return true; |
291 } | 291 } |
292 | 292 |
293 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( | 293 void ParamTraits<scoped_refptr<content::ResourceRequestBody> >::Log( |
294 const param_type& p, std::string* l) { | 294 const param_type& p, std::string* l) { |
295 l->append("<ResourceRequestBody>"); | 295 l->append("<ResourceRequestBody>"); |
296 } | 296 } |
297 | 297 |
298 } // namespace IPC | 298 } // namespace IPC |
OLD | NEW |