OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/public/common/page_state.h" | 5 #include "content/public/common/page_state.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/common/page_state_serialization.h" | 9 #include "content/common/page_state_serialization.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 return PageState::CreateFromEncodedData(encoded_data); | 35 return PageState::CreateFromEncodedData(encoded_data); |
36 } | 36 } |
37 | 37 |
38 void RecursivelyRemovePasswordData(ExplodedFrameState* state) { | 38 void RecursivelyRemovePasswordData(ExplodedFrameState* state) { |
39 if (state->http_body.contains_passwords) | 39 if (state->http_body.contains_passwords) |
40 state->http_body = ExplodedHttpBody(); | 40 state->http_body = ExplodedHttpBody(); |
41 } | 41 } |
42 | 42 |
43 void RecursivelyRemoveScrollOffset(ExplodedFrameState* state) { | 43 void RecursivelyRemoveScrollOffset(ExplodedFrameState* state) { |
44 state->scroll_offset = gfx::Point(); | 44 state->scroll_offset = gfx::Point(); |
| 45 state->pinch_viewport_scroll_offset = gfx::PointF(); |
45 } | 46 } |
46 | 47 |
47 void RecursivelyRemoveReferrer(ExplodedFrameState* state) { | 48 void RecursivelyRemoveReferrer(ExplodedFrameState* state) { |
48 state->referrer = base::NullableString16(); | 49 state->referrer = base::NullableString16(); |
49 state->referrer_policy = blink::WebReferrerPolicyDefault; | 50 state->referrer_policy = blink::WebReferrerPolicyDefault; |
50 for (std::vector<ExplodedFrameState>::iterator it = state->children.begin(); | 51 for (std::vector<ExplodedFrameState>::iterator it = state->children.begin(); |
51 it != state->children.end(); | 52 it != state->children.end(); |
52 ++it) { | 53 ++it) { |
53 RecursivelyRemoveReferrer(&*it); | 54 RecursivelyRemoveReferrer(&*it); |
54 } | 55 } |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 } | 163 } |
163 | 164 |
164 PageState::PageState(const std::string& data) | 165 PageState::PageState(const std::string& data) |
165 : data_(data) { | 166 : data_(data) { |
166 // TODO(darin): Enable this DCHECK once tests have been fixed up to not pass | 167 // TODO(darin): Enable this DCHECK once tests have been fixed up to not pass |
167 // bogus encoded data to CreateFromEncodedData. | 168 // bogus encoded data to CreateFromEncodedData. |
168 //DCHECK(IsValid()); | 169 //DCHECK(IsValid()); |
169 } | 170 } |
170 | 171 |
171 } // namespace content | 172 } // namespace content |
OLD | NEW |