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

Side by Side Diff: chrome/common/render_messages.h

Issue 18533: Merge r5767 - Protect cookie headers from XHR... (Closed) Base URL: svn://chrome-svn/chrome/branches/release_154.next/src/
Patch Set: Created 11 years, 11 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 | « no previous file | net/http/http_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « no previous file | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698