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

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: 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"
jsbell 2014/06/09 16:38:27 Need to #include "third_party/WebKit/public/platfo
Pritam Nikam 2014/06/11 14:05:16 Done.
16 16
17 namespace content { 17 namespace content {
18 18
19 class IndexedDBTransaction; 19 class IndexedDBTransaction;
20 20
21 class CONTENT_EXPORT IndexedDBCursor 21 class CONTENT_EXPORT IndexedDBCursor
22 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) { 22 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBCursor>) {
23 public: 23 public:
24 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor, 24 IndexedDBCursor(scoped_ptr<IndexedDBBackingStore::Cursor> cursor,
25 indexed_db::CursorType cursor_type, 25 indexed_db::CursorType cursor_type,
26 IndexedDBDatabase::TaskType task_type, 26 blink::TaskType task_type,
27 IndexedDBTransaction* transaction); 27 IndexedDBTransaction* transaction);
28 28
29 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks); 29 void Advance(uint32 count, scoped_refptr<IndexedDBCallbacks> callbacks);
30 void Continue(scoped_ptr<IndexedDBKey> key, 30 void Continue(scoped_ptr<IndexedDBKey> key,
31 scoped_ptr<IndexedDBKey> primary_key, 31 scoped_ptr<IndexedDBKey> primary_key,
32 scoped_refptr<IndexedDBCallbacks> callbacks); 32 scoped_refptr<IndexedDBCallbacks> callbacks);
33 void PrefetchContinue(int number_to_fetch, 33 void PrefetchContinue(int number_to_fetch,
34 scoped_refptr<IndexedDBCallbacks> callbacks); 34 scoped_refptr<IndexedDBCallbacks> callbacks);
35 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches); 35 leveldb::Status PrefetchReset(int used_prefetches, int unused_prefetches);
36 36
(...skipping 15 matching lines...) Expand all
52 void CursorPrefetchIterationOperation( 52 void CursorPrefetchIterationOperation(
53 int number_to_fetch, 53 int number_to_fetch,
54 scoped_refptr<IndexedDBCallbacks> callbacks, 54 scoped_refptr<IndexedDBCallbacks> callbacks,
55 IndexedDBTransaction* transaction); 55 IndexedDBTransaction* transaction);
56 56
57 private: 57 private:
58 friend class base::RefCounted<IndexedDBCursor>; 58 friend class base::RefCounted<IndexedDBCursor>;
59 59
60 ~IndexedDBCursor(); 60 ~IndexedDBCursor();
61 61
62 IndexedDBDatabase::TaskType task_type_; 62 blink::TaskType task_type_;
63 indexed_db::CursorType cursor_type_; 63 indexed_db::CursorType cursor_type_;
64 const scoped_refptr<IndexedDBTransaction> transaction_; 64 const scoped_refptr<IndexedDBTransaction> transaction_;
65 65
66 // Must be destroyed before transaction_. 66 // Must be destroyed before transaction_.
67 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_; 67 scoped_ptr<IndexedDBBackingStore::Cursor> cursor_;
68 // Must be destroyed before transaction_. 68 // Must be destroyed before transaction_.
69 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_; 69 scoped_ptr<IndexedDBBackingStore::Cursor> saved_cursor_;
70 70
71 bool closed_; 71 bool closed_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor); 73 DISALLOW_COPY_AND_ASSIGN(IndexedDBCursor);
74 }; 74 };
75 75
76 } // namespace content 76 } // namespace content
77 77
78 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_ 78 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CURSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698