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

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: Rebase patch. 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 0a83a914f84de9848c8354a09911a9ae64ea6edd..7d5aae0dddb573c4c3fd795888bdbd86c5372c45 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -1961,7 +1961,7 @@ leveldb::Status IndexedDBBackingStore::DeleteRange(
database_id,
object_store_id,
key_range,
- indexed_db::CURSOR_NEXT,
+ blink::WebIDBCursorDirectionNext,
&s);
if (!s.ok())
return s;
@@ -1973,7 +1973,7 @@ leveldb::Status IndexedDBBackingStore::DeleteRange(
database_id,
object_store_id,
key_range,
- indexed_db::CURSOR_PREV,
+ blink::WebIDBCursorDirectionPrev,
&s);
if (!s.ok())
@@ -3573,7 +3573,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;
@@ -3581,10 +3581,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 =
@@ -3646,7 +3647,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))
@@ -3659,10 +3660,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 =
@@ -3719,7 +3721,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();
@@ -3746,7 +3748,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();
@@ -3774,7 +3776,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();
@@ -3803,7 +3805,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();
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.h ('k') | content/browser/indexed_db/indexed_db_cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698