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

Unified Diff: content/common/page_state_serialization.cc

Issue 29513003: Cleanup deprecated and no longer needed blob revamp stuff, deadcode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/common/page_state_serialization.h ('k') | content/common/page_state_serialization_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/page_state_serialization.cc
diff --git a/content/common/page_state_serialization.cc b/content/common/page_state_serialization.cc
index 0184677805f81ebd2f61b3476484d2e5d12bc0df..e22cf41528d69caffb139ec946533bb46bb33c16 100644
--- a/content/common/page_state_serialization.cc
+++ b/content/common/page_state_serialization.cc
@@ -58,7 +58,6 @@ void AppendURLRangeToHttpBody(ExplodedHttpBody* http_body,
http_body->elements.push_back(element);
}
-#ifdef USE_BLOB_UUIDS
void AppendBlobToHttpBody(ExplodedHttpBody* http_body,
const std::string& uuid) {
ExplodedHttpBodyElement element;
@@ -66,15 +65,6 @@ void AppendBlobToHttpBody(ExplodedHttpBody* http_body,
element.blob_uuid = uuid;
http_body->elements.push_back(element);
}
-#else
-void DeprecatedAppendBlobToHttpBody(ExplodedHttpBody* http_body,
- const GURL& url) {
- ExplodedHttpBodyElement element;
- element.type = WebKit::WebHTTPBody::Element::TypeBlob;
- element.deprecated_blob_url = url;
- http_body->elements.push_back(element);
-}
-#endif
//----------------------------------------------------------------------------
@@ -202,15 +192,7 @@ struct SerializeObject {
// See ReadPageState.
//
const int kMinVersion = 11;
-#ifdef USE_BLOB_UUIDS
-// This is not used yet, if a version bump is needed in advance of
-// this becoming used, bump both values by one and fixup the comment
-// and change the test for '16' in ReadHttpBody().
-// -- michaeln
const int kCurrentVersion = 16;
-#else
-const int kCurrentVersion = 15;
-#endif
// A bunch of convenience functions to read/write to SerializeObjects. The
// de-serializers assume the input data will be in the correct format and fall
@@ -444,11 +426,7 @@ void WriteHttpBody(const ExplodedHttpBody& http_body, SerializeObject* obj) {
WriteReal(element.file_modification_time, obj);
} else {
DCHECK(element.type == WebKit::WebHTTPBody::Element::TypeBlob);
-#ifdef USE_BLOB_UUIDS
WriteStdString(element.blob_uuid, obj);
-#else
- WriteGURL(element.deprecated_blob_url, obj);
-#endif
}
}
WriteInteger64(http_body.identifier, obj);
@@ -488,17 +466,12 @@ void ReadHttpBody(SerializeObject* obj, ExplodedHttpBody* http_body) {
AppendURLRangeToHttpBody(http_body, url, file_start, file_length,
file_modification_time);
} else if (type == WebKit::WebHTTPBody::Element::TypeBlob) {
-#ifdef USE_BLOB_UUIDS
if (obj->version >= 16) {
std::string blob_uuid = ReadStdString(obj);
AppendBlobToHttpBody(http_body, blob_uuid);
} else {
ReadGURL(obj); // Skip the obsolete blob url value.
}
-#else
- GURL blob_url = ReadGURL(obj);
- DeprecatedAppendBlobToHttpBody(http_body, blob_url);
-#endif
}
}
http_body->identifier = ReadInteger64(obj);
« no previous file with comments | « content/common/page_state_serialization.h ('k') | content/common/page_state_serialization_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698