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

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

Issue 2406053002: PlzNavigate: Fix the failing ContinueWhereILeftOffTest.PostWithPassword test. (Closed)
Patch Set: Address comments and add code to serialize and deserialize the contains_sensitive_info_ field in th… Created 4 years, 2 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
OLDNEW
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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 } 399 }
400 } 400 }
401 401
402 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write( 402 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Write(
403 base::Pickle* m, 403 base::Pickle* m,
404 const param_type& p) { 404 const param_type& p) {
405 WriteParam(m, p.get() != NULL); 405 WriteParam(m, p.get() != NULL);
406 if (p.get()) { 406 if (p.get()) {
407 WriteParam(m, *p->elements()); 407 WriteParam(m, *p->elements());
408 WriteParam(m, p->identifier()); 408 WriteParam(m, p->identifier());
409 WriteParam(m, p->contains_sensitive_info());
Łukasz Anforowicz 2016/10/15 00:02:27 Do we also need to modify ParamTraits<...>::GetSiz
ananta 2016/10/15 00:23:31 Thanks. Done.
409 } 410 }
410 } 411 }
411 412
412 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read( 413 bool ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Read(
413 const base::Pickle* m, 414 const base::Pickle* m,
414 base::PickleIterator* iter, 415 base::PickleIterator* iter,
415 param_type* r) { 416 param_type* r) {
416 bool has_object; 417 bool has_object;
417 if (!ReadParam(m, iter, &has_object)) 418 if (!ReadParam(m, iter, &has_object))
418 return false; 419 return false;
419 if (!has_object) 420 if (!has_object)
420 return true; 421 return true;
421 std::vector<storage::DataElement> elements; 422 std::vector<storage::DataElement> elements;
422 if (!ReadParam(m, iter, &elements)) 423 if (!ReadParam(m, iter, &elements))
423 return false; 424 return false;
424 int64_t identifier; 425 int64_t identifier;
425 if (!ReadParam(m, iter, &identifier)) 426 if (!ReadParam(m, iter, &identifier))
426 return false; 427 return false;
428 bool contains_sensitive_info;
429 if (!ReadParam(m, iter, &contains_sensitive_info))
430 return false;
427 *r = new content::ResourceRequestBodyImpl; 431 *r = new content::ResourceRequestBodyImpl;
428 (*r)->swap_elements(&elements); 432 (*r)->swap_elements(&elements);
429 (*r)->set_identifier(identifier); 433 (*r)->set_identifier(identifier);
434 (*r)->set_contains_sensitive_info(contains_sensitive_info);
430 return true; 435 return true;
431 } 436 }
432 437
433 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log( 438 void ParamTraits<scoped_refptr<content::ResourceRequestBodyImpl>>::Log(
434 const param_type& p, 439 const param_type& p,
435 std::string* l) { 440 std::string* l) {
436 l->append("<ResourceRequestBodyImpl>"); 441 l->append("<ResourceRequestBodyImpl>");
437 } 442 }
438 443
439 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize( 444 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::GetSize(
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 return true; 479 return true;
475 } 480 }
476 481
477 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log( 482 void ParamTraits<scoped_refptr<net::ct::SignedCertificateTimestamp>>::Log(
478 const param_type& p, 483 const param_type& p,
479 std::string* l) { 484 std::string* l) {
480 l->append("<SignedCertificateTimestamp>"); 485 l->append("<SignedCertificateTimestamp>");
481 } 486 }
482 487
483 } // namespace IPC 488 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698