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

Unified Diff: content/public/common/page_state.cc

Issue 952783003: Revert of When sanitizing serialized navigation entries also take iframes into account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/sessions/content/content_serialized_navigation_driver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/common/page_state.cc
diff --git a/content/public/common/page_state.cc b/content/public/common/page_state.cc
index 1f3dd2ff72d54ae7e474d123bc408f158e46e1c7..9d100d31b626754d205874ebc42bcbd8754b8c38 100644
--- a/content/public/common/page_state.cc
+++ b/content/public/common/page_state.cc
@@ -7,7 +7,6 @@
#include "base/files/file_path.h"
#include "base/strings/utf_string_conversions.h"
#include "content/common/page_state_serialization.h"
-#include "content/public/common/referrer.h"
namespace content {
namespace {
@@ -54,25 +53,6 @@
++it) {
RecursivelyRemoveReferrer(&*it);
}
-}
-
-bool RecursivelyCheckReferrer(ExplodedFrameState* state) {
- Referrer referrer(GURL(state->referrer.string()), state->referrer_policy);
- GURL url(state->url_string.string());
- if (url.SchemeIsHTTPOrHTTPS() &&
- Referrer::SanitizeForRequest(url, referrer).url != referrer.url) {
- LOG(ERROR) << "Referrer for request to " << url << " is " << referrer.url
- << " but should be "
- << Referrer::SanitizeForRequest(url, referrer).url;
- return false;
- }
- for (std::vector<ExplodedFrameState>::iterator it = state->children.begin();
- it != state->children.end();
- ++it) {
- if (!RecursivelyCheckReferrer(&*it))
- return false;
- }
- return true;
}
} // namespace
@@ -128,16 +108,7 @@
}
bool PageState::IsValid() const {
- if (data_.empty())
- return false;
-
- ExplodedPageState state;
- // This should return false, but tests create invalid page state.
- if (!DecodePageState(data_, &state))
- return true;
-
- // TODO(jochen): Remove referrer check once http://crbug.com/450589 is fixed.
- return RecursivelyCheckReferrer(&state.top);
+ return !data_.empty();
}
bool PageState::Equals(const PageState& other) const {
« no previous file with comments | « components/sessions/content/content_serialized_navigation_driver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698