Chromium Code Reviews| Index: content/common/page_state_serialization.cc |
| diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc |
| index 2d4782e27b6f12e1d5e44bd35fe867fb37a5a8ae..dcfd25e06c8b5c3586ed0367bc9aa0e16ff4e36c 100644 |
| --- a/content/common/page_state_serialization.cc |
| +++ b/content/common/page_state_serialization.cc |
| @@ -765,6 +765,9 @@ scoped_refptr<ResourceRequestBodyImpl> DecodeResourceRequestBody( |
| scoped_refptr<ResourceRequestBodyImpl> result = new ResourceRequestBodyImpl(); |
| SerializeObject obj(data, static_cast<int>(size)); |
| ReadResourceRequestBody(&obj, result); |
| + // Please see the EncodeResourceRequestBody() function below for information |
| + // this is being explicitl deserialized. |
|
Łukasz Anforowicz
2016/10/15 00:02:27
nit:explicitly
nit:s/this/that/
ananta
2016/10/15 00:23:31
Done.
|
| + result->set_contains_sensitive_info(ReadBoolean(&obj)); |
| return obj.parse_error ? nullptr : result; |
| } |
| @@ -773,6 +776,10 @@ std::string EncodeResourceRequestBody( |
| SerializeObject obj; |
| obj.version = kCurrentVersion; |
| WriteResourceRequestBody(resource_request_body, &obj); |
| + // We are serializing the contains_sensitive_info() field explicitly to avoid |
| + // changing the WriteResourceRequestBody function which would require a |
| + // PageState version update. |
|
Łukasz Anforowicz
2016/10/15 00:02:27
Maybe we could tweak the comment to say why Encode
ananta
2016/10/15 00:23:31
Done.
|
| + WriteBoolean(resource_request_body.contains_sensitive_info(), &obj); |
| return obj.GetAsString(); |
| } |