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

Side by Side Diff: content/public/common/page_state.cc

Issue 134813003: Add the referrer policy to the page state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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
OLDNEW
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 28 matching lines...) Expand all
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 } 45 }
46 46
47 void RecursivelyRemoveReferrer(ExplodedFrameState* state) { 47 void RecursivelyRemoveReferrer(ExplodedFrameState* state) {
48 state->referrer = base::NullableString16(); 48 state->referrer = base::NullableString16();
49 state->referrer_policy = blink::WebReferrerPolicyDefault;
49 for (std::vector<ExplodedFrameState>::iterator it = state->children.begin(); 50 for (std::vector<ExplodedFrameState>::iterator it = state->children.begin();
50 it != state->children.end(); 51 it != state->children.end();
51 ++it) { 52 ++it) {
52 RecursivelyRemoveReferrer(&*it); 53 RecursivelyRemoveReferrer(&*it);
53 } 54 }
54 } 55 }
55 56
56 } // namespace 57 } // namespace
57 58
58 // static 59 // static
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 161 }
161 162
162 PageState::PageState(const std::string& data) 163 PageState::PageState(const std::string& data)
163 : data_(data) { 164 : data_(data) {
164 // TODO(darin): Enable this DCHECK once tests have been fixed up to not pass 165 // TODO(darin): Enable this DCHECK once tests have been fixed up to not pass
165 // bogus encoded data to CreateFromEncodedData. 166 // bogus encoded data to CreateFromEncodedData.
166 //DCHECK(IsValid()); 167 //DCHECK(IsValid());
167 } 168 }
168 169
169 } // namespace content 170 } // namespace content
OLDNEW
« no previous file with comments | « content/common/page_state_serialization_unittest.cc ('k') | content/public/renderer/history_item_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698