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

Side by Side Diff: content/browser/indexed_db/indexed_db_cursor.h

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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "content/browser/indexed_db/indexed_db_backing_store.h" 13 #include "content/browser/indexed_db/indexed_db_backing_store.h"
14 #include "content/browser/indexed_db/indexed_db_database.h" 14 #include "content/browser/indexed_db/indexed_db_database.h"
15 #include "content/common/indexed_db/indexed_db_key_range.h" 15 #include "content/common/indexed_db/indexed_db_key_range.h"
16 #include "third_party/WebKit/public/platform/WebIDBTypes.h"
16 17
17 namespace content { 18 namespace content {
18 19
19 class IndexedDBTransaction; 20 class IndexedDBTransaction;
20 21
21 class CONTENT_EXPORT IndexedDBCursor 22 class CONTENT_EXPORT IndexedDBCursor
22 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) { 23 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) {
23 public: 24 public:
24 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor, 25 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor,
25 indexed_db::CursorType cursor_type, 26 indexed_db::CursorType cursor_type,
26 IndexedDBDatabase::TaskType task_type, 27 blink::WebIDBTaskType task_type,
27 IndexedDBTransaction* transaction); 28 IndexedDBTransaction* transaction);
28 29
29 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks); 30 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks);
30 void Continue(scoped_ptr<IndexedDBKey> key, 31 void Continue(scoped_ptr<IndexedDBKey> key,
31 scoped_ptr<IndexedDBKey> primary_key, 32 scoped_ptr<IndexedDBKey> primary_key,
32 scoped_refptr<IndexedDBCallbacks> callbacks); 33 scoped_refptr<IndexedDBCallbacks> callbacks);
33 void PrefetchContinue(int number_to_fetch, 34 void PrefetchContinue(int number_to_fetch,
34 scoped_refptr<IndexedDBCallbacks> callbacks); 35 scoped_refptr<IndexedDBCallbacks> callbacks);
35 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches); 36 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches);
36 37
(...skipping 15 matching lines...) Expand all
52 void CursorPrefetchIterationOperation( 53 void CursorPrefetchIterationOperation(
53 int number_to_fetch, 54 int number_to_fetch,
54 scoped_refptr<IndexedDBCallbacks> callbacks, 55 scoped_refptr<IndexedDBCallbacks> callbacks,
55 IndexedDBTransaction* transaction); 56 IndexedDBTransaction* transaction);
56 57
57 private: 58 private:
58 friend class base::RefCounted<IndexedDBCursor>; 59 friend class base::RefCounted<IndexedDBCursor>;
59 60
60 ~IndexedDBCursor(); 61 ~IndexedDBCursor();
61 62
62 IndexedDBDatabase::TaskType task_type_; 63 blink::WebIDBTaskType task_type_;
63 indexed_db::CursorType cursor_type_; 64 indexed_db::CursorType cursor_type_;
64 const scoped_refptr<IndexedDBTransaction> transaction_; 65 const scoped_refptr<IndexedDBTransaction> transaction_;
65 66
66 // Must be destroyed before transaction_. 67 // Must be destroyed before transaction_.
67 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_; 68 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_;
68 // Must be destroyed before transaction_. 69 // Must be destroyed before transaction_.
69 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_; 70 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_;
70 71
71 bool closed_; 72 bool closed_;
72 73
73 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor); 74 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor);
74 }; 75 };
75 76
76 } // namespace content 77 } // namespace content
77 78
78 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ 79 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_backing_store.cc ('k') | content/browser/indexed_db/indexed_db_cursor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698