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

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

Issue 320833002: [IndexedDB] Use consistent enums on both sides of IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporated review comments. Created 6 years, 6 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
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 1e1d85b4cbbf9e277f005c83fe55a180ce7f00b9..8b0f6bc848aac17ae6f2064e0c7d7ec9273520ec 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -30,7 +30,6 @@
#include "content/common/indexed_db/indexed_db_key_range.h"
#include "content/public/browser/browser_thread.h"
#include "net/url_request/url_request_context.h"
-#include "third_party/WebKit/public/platform/WebIDBTypes.h"
#include "third_party/WebKit/public/web/WebSerializedScriptValueVersion.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "webkit/browser/blob/blob_data_handle.h"
@@ -1957,7 +1956,7 @@ leveldb::Status IndexedDBBackingStore::DeleteRange(
database_id,
object_store_id,
key_range,
- indexed_db::CURSOR_NEXT,
+ blink::WebIDBCursorDirectionNext,
&s);
if (!s.ok())
return s;
@@ -1969,7 +1968,7 @@ leveldb::Status IndexedDBBackingStore::DeleteRange(
database_id,
object_store_id,
key_range,
- indexed_db::CURSOR_PREV,
+ blink::WebIDBCursorDirectionPrev,
&s);
if (!s.ok())
@@ -3559,7 +3558,7 @@ bool ObjectStoreCursorOptions(
int64 database_id,
int64 object_store_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
IndexedDBBackingStore::Cursor::CursorOptions* cursor_options) {
cursor_options->database_id = database_id;
cursor_options->object_store_id = object_store_id;
@@ -3567,10 +3566,11 @@ bool ObjectStoreCursorOptions(
bool lower_bound = range.lower().IsValid();
bool upper_bound = range.upper().IsValid();
cursor_options->forward =
- (direction == indexed_db::CURSOR_NEXT_NO_DUPLICATE ||
- direction == indexed_db::CURSOR_NEXT);
- cursor_options->unique = (direction == indexed_db::CURSOR_NEXT_NO_DUPLICATE ||
- direction == indexed_db::CURSOR_PREV_NO_DUPLICATE);
+ (direction == blink::WebIDBCursorDirectionNextNoDuplicate ||
+ direction == blink::WebIDBCursorDirectionNext);
+ cursor_options->unique =
+ (direction == blink::WebIDBCursorDirectionNextNoDuplicate ||
+ direction == blink::WebIDBCursorDirectionPrevNoDuplicate);
if (!lower_bound) {
cursor_options->low_key =
@@ -3632,7 +3632,7 @@ bool IndexCursorOptions(
int64 object_store_id,
int64 index_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
IndexedDBBackingStore::Cursor::CursorOptions* cursor_options) {
DCHECK(transaction);
if (!KeyPrefix::ValidIds(database_id, object_store_id, index_id))
@@ -3645,10 +3645,11 @@ bool IndexCursorOptions(
bool lower_bound = range.lower().IsValid();
bool upper_bound = range.upper().IsValid();
cursor_options->forward =
- (direction == indexed_db::CURSOR_NEXT_NO_DUPLICATE ||
- direction == indexed_db::CURSOR_NEXT);
- cursor_options->unique = (direction == indexed_db::CURSOR_NEXT_NO_DUPLICATE ||
- direction == indexed_db::CURSOR_PREV_NO_DUPLICATE);
+ (direction == blink::WebIDBCursorDirectionNextNoDuplicate ||
+ direction == blink::WebIDBCursorDirectionNext);
+ cursor_options->unique =
+ (direction == blink::WebIDBCursorDirectionNextNoDuplicate ||
+ direction == blink::WebIDBCursorDirectionPrevNoDuplicate);
if (!lower_bound) {
cursor_options->low_key =
@@ -3705,7 +3706,7 @@ IndexedDBBackingStore::OpenObjectStoreCursor(
int64 database_id,
int64 object_store_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
IDB_TRACE("IndexedDBBackingStore::OpenObjectStoreCursor");
*s = leveldb::Status::OK();
@@ -3732,7 +3733,7 @@ IndexedDBBackingStore::OpenObjectStoreKeyCursor(
int64 database_id,
int64 object_store_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
IDB_TRACE("IndexedDBBackingStore::OpenObjectStoreKeyCursor");
*s = leveldb::Status::OK();
@@ -3760,7 +3761,7 @@ IndexedDBBackingStore::OpenIndexKeyCursor(
int64 object_store_id,
int64 index_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
IDB_TRACE("IndexedDBBackingStore::OpenIndexKeyCursor");
*s = leveldb::Status::OK();
@@ -3789,7 +3790,7 @@ IndexedDBBackingStore::OpenIndexCursor(
int64 object_store_id,
int64 index_id,
const IndexedDBKeyRange& range,
- indexed_db::CursorDirection direction,
+ blink::WebIDBCursorDirection direction,
leveldb::Status* s) {
IDB_TRACE("IndexedDBBackingStore::OpenIndexCursor");
LevelDBTransaction* leveldb_transaction = transaction->transaction();

Powered by Google App Engine
This is Rietveld 408576698