| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ | 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ |
| 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ | 6 #define CHROME_COMMON_RENDER_MESSAGES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1342 l->append(L")"); | 1342 l->append(L")"); |
| 1343 } | 1343 } |
| 1344 } | 1344 } |
| 1345 }; | 1345 }; |
| 1346 | 1346 |
| 1347 template <> | 1347 template <> |
| 1348 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders>> { | 1348 struct ParamTraits<scoped_refptr<net::HttpResponseHeaders>> { |
| 1349 typedef scoped_refptr<net::HttpResponseHeaders> param_type; | 1349 typedef scoped_refptr<net::HttpResponseHeaders> param_type; |
| 1350 static void Write(Message* m, const param_type& p) { | 1350 static void Write(Message* m, const param_type& p) { |
| 1351 WriteParam(m, p.get() != NULL); | 1351 WriteParam(m, p.get() != NULL); |
| 1352 if (p) | 1352 if (p) { |
| 1353 p->Persist(m, false); | 1353 // Do not disclose Set-Cookie headers over IPC. |
| 1354 p->Persist(m, net::HttpResponseHeaders::PERSIST_SANS_COOKIES); |
| 1355 } |
| 1354 } | 1356 } |
| 1355 static bool Read(const Message* m, void** iter, param_type* r) { | 1357 static bool Read(const Message* m, void** iter, param_type* r) { |
| 1356 bool has_object; | 1358 bool has_object; |
| 1357 if (!ReadParam(m, iter, &has_object)) | 1359 if (!ReadParam(m, iter, &has_object)) |
| 1358 return false; | 1360 return false; |
| 1359 if (has_object) | 1361 if (has_object) |
| 1360 *r = new net::HttpResponseHeaders(*m, iter); | 1362 *r = new net::HttpResponseHeaders(*m, iter); |
| 1361 return true; | 1363 return true; |
| 1362 } | 1364 } |
| 1363 static void Log(const param_type& p, std::wstring* l) { | 1365 static void Log(const param_type& p, std::wstring* l) { |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1643 ReadParam(m, iter, &p->file_contents); | 1645 ReadParam(m, iter, &p->file_contents); |
| 1644 } | 1646 } |
| 1645 static void Log(const param_type& p, std::wstring* l) { | 1647 static void Log(const param_type& p, std::wstring* l) { |
| 1646 l->append(L"<WebDropData>"); | 1648 l->append(L"<WebDropData>"); |
| 1647 } | 1649 } |
| 1648 }; | 1650 }; |
| 1649 | 1651 |
| 1650 } // namespace IPC | 1652 } // namespace IPC |
| 1651 | 1653 |
| 1652 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 1654 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |