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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 24904002: IndexedDB: Consume SSV wire format version from Blink public headers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 3 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/browser/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index ee3ba135b16e050c5b7a4f393857413bdcd6c4d6..c6f073c064a4a566051560690b862d2d9430f1b7 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -21,13 +21,11 @@
#include "content/common/indexed_db/indexed_db_key_path.h"
#include "content/common/indexed_db/indexed_db_key_range.h"
#include "third_party/WebKit/public/platform/WebIDBTypes.h"
+#include "third_party/WebKit/public/web/WebSerializedScriptValueVersion.h"
#include "third_party/leveldatabase/env_chromium.h"
using base::StringPiece;
-// TODO(jsbell): Make blink push the version during the open() call.
-static const uint32 kWireVersion = 2;
-
namespace content {
static const int64 kKeyGeneratorInitialNumber =
@@ -209,7 +207,8 @@ WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) {
return true;
}
- const uint32 latest_known_data_version = kWireVersion;
+ const uint32 latest_known_data_version =
+ WebKit::kSerializedScriptValueVersion;
int64 db_data_version = 0;
ok = GetInt(db, DataVersionKey::Encode(), &db_data_version, &found);
if (!ok)
@@ -231,7 +230,8 @@ WARN_UNUSED_RESULT static bool IsSchemaKnown(LevelDBDatabase* db, bool* known) {
WARN_UNUSED_RESULT static bool SetUpMetadata(
LevelDBDatabase* db,
const std::string& origin_identifier) {
- const uint32 latest_known_data_version = kWireVersion;
+ const uint32 latest_known_data_version =
+ WebKit::kSerializedScriptValueVersion;
const std::string schema_version_key = SchemaVersionKey::Encode();
const std::string data_version_key = DataVersionKey::Encode();
@@ -287,7 +287,7 @@ WARN_UNUSED_RESULT static bool SetUpMetadata(
if (db_schema_version < 2) {
db_schema_version = 2;
PutInt(transaction.get(), schema_version_key, db_schema_version);
- db_data_version = kWireVersion;
+ db_data_version = WebKit::kSerializedScriptValueVersion;
PutInt(transaction.get(), data_version_key, db_data_version);
}
}
« no previous file with comments | « content/browser/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698