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

Unified Diff: content/browser/frame_host/navigation_entry_impl.cc

Issue 2181753002: Simplify EncodePageState to return no value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | content/common/page_state_serialization.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_entry_impl.cc
diff --git a/content/browser/frame_host/navigation_entry_impl.cc b/content/browser/frame_host/navigation_entry_impl.cc
index 6baa2a7fbd5ddd817b9ecfd74524e70a65e96eac..4d570359ea0029c6d0379981d851da73b54ec016 100644
--- a/content/browser/frame_host/navigation_entry_impl.cc
+++ b/content/browser/frame_host/navigation_entry_impl.cc
@@ -51,8 +51,8 @@ void RecursivelyGenerateFrameEntries(const ExplodedFrameState& state,
ExplodedPageState page_state;
page_state.top = state;
std::string data;
- if (EncodePageState(page_state, &data))
- node->frame_entry->set_page_state(PageState::CreateFromEncodedData(data));
+ EncodePageState(page_state, &data);
+ node->frame_entry->set_page_state(PageState::CreateFromEncodedData(data));
for (const ExplodedFrameState& child_state : state.children) {
NavigationEntryImpl::TreeNode* child_node =
@@ -317,9 +317,7 @@ PageState NavigationEntryImpl::GetPageState() const {
&exploded_state.referenced_files);
std::string encoded_data;
- if (!EncodePageState(exploded_state, &encoded_data))
- return frame_tree_->frame_entry->page_state();
-
+ EncodePageState(exploded_state, &encoded_data);
return PageState::CreateFromEncodedData(encoded_data);
}
« no previous file with comments | « no previous file | content/common/page_state_serialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698