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

Unified Diff: android_webview/native/state_serializer.cc

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sort out the tests Created 5 years 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
Index: android_webview/native/state_serializer.cc
diff --git a/android_webview/native/state_serializer.cc b/android_webview/native/state_serializer.cc
index 22139a279e1367a1e56e8d69ec4a3ae3938e7977..aaf1a063d5c8ccaf6343b2ccedc31e231830aa09 100644
--- a/android_webview/native/state_serializer.cc
+++ b/android_webview/native/state_serializer.cc
@@ -34,7 +34,7 @@ namespace {
// Sanity check value that we are restoring from a valid pickle.
// This can potentially used as an actual serialization version number in the
// future if we ever decide to support restoring from older versions.
-const uint32 AW_STATE_VERSION = 20130814;
+const uint32 AW_STATE_VERSION = 20151204;
} // namespace
@@ -179,6 +179,9 @@ bool WriteNavigationEntryToPickle(const content::NavigationEntry& entry,
if (!pickle->WriteString(entry.GetBaseURLForDataURL().spec()))
return false;
+ if (!pickle->WriteString(entry.GetDataURLAsString()))
+ return false;
+
if (!pickle->WriteBool(static_cast<int>(entry.GetIsOverridingUserAgent())))
return false;
@@ -261,6 +264,13 @@ bool RestoreNavigationEntryFromPickle(base::PickleIterator* iterator,
}
{
+ string data_url;
+ if (!iterator->ReadString(&data_url))
+ return false;
+ entry->SetDataURLAsString(data_url);
+ }
+
+ {
bool is_overriding_user_agent;
if (!iterator->ReadBool(&is_overriding_user_agent))
return false;

Powered by Google App Engine
This is Rietveld 408576698