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

Unified Diff: content/renderer/history_serialization.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 | « content/public/common/page_state.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/history_serialization.cc
diff --git a/content/renderer/history_serialization.cc b/content/renderer/history_serialization.cc
index ee5981afa3fdede74589a74bd82311a614c5f09e..45855c15fc7bfc8b3e37e49b388f4203ab5448de 100644
--- a/content/renderer/history_serialization.cc
+++ b/content/renderer/history_serialization.cc
@@ -122,9 +122,7 @@ PageState HistoryEntryToPageState(HistoryEntry* entry) {
&state.referenced_files);
std::string encoded_data;
- if (!EncodePageState(state, &encoded_data))
- return PageState();
-
+ EncodePageState(state, &encoded_data);
return PageState::CreateFromEncodedData(encoded_data);
}
@@ -135,9 +133,7 @@ PageState SingleHistoryItemToPageState(const WebHistoryItem& item) {
GenerateFrameStateFromItem(item, &state.top);
std::string encoded_data;
- if (!EncodePageState(state, &encoded_data))
- return PageState();
-
+ EncodePageState(state, &encoded_data);
return PageState::CreateFromEncodedData(encoded_data);
}
« no previous file with comments | « content/public/common/page_state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698