 Chromium Code Reviews
 Chromium Code Reviews Issue 320833002:
  [IndexedDB] Use consistent enums on both sides of IPC.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 320833002:
  [IndexedDB] Use consistent enums on both sides of IPC.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 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_DATABASE_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 
| 7 | 7 | 
| 8 #include <list> | 8 #include <list> | 
| 9 #include <map> | 9 #include <map> | 
| 10 #include <string> | 10 #include <string> | 
| 11 #include <utility> | 11 #include <utility> | 
| 12 #include <vector> | 12 #include <vector> | 
| 13 | 13 | 
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" | 
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" | 
| 16 #include "content/browser/indexed_db/indexed_db.h" | 16 #include "content/browser/indexed_db/indexed_db.h" | 
| 17 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 17 #include "content/browser/indexed_db/indexed_db_backing_store.h" | 
| 18 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 18 #include "content/browser/indexed_db/indexed_db_callbacks.h" | 
| 19 #include "content/browser/indexed_db/indexed_db_metadata.h" | 19 #include "content/browser/indexed_db/indexed_db_metadata.h" | 
| 20 #include "content/browser/indexed_db/indexed_db_pending_connection.h" | 20 #include "content/browser/indexed_db/indexed_db_pending_connection.h" | 
| 21 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" | 21 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" | 
| 22 #include "content/browser/indexed_db/list_set.h" | 22 #include "content/browser/indexed_db/list_set.h" | 
| 23 #include "url/gurl.h" | 23 #include "url/gurl.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.
 | |
| 24 | 24 | 
| 25 namespace content { | 25 namespace content { | 
| 26 | 26 | 
| 27 class IndexedDBBlobInfo; | 27 class IndexedDBBlobInfo; | 
| 28 class IndexedDBConnection; | 28 class IndexedDBConnection; | 
| 29 class IndexedDBDatabaseCallbacks; | 29 class IndexedDBDatabaseCallbacks; | 
| 30 class IndexedDBFactory; | 30 class IndexedDBFactory; | 
| 31 class IndexedDBKey; | 31 class IndexedDBKey; | 
| 32 class IndexedDBKeyPath; | 32 class IndexedDBKeyPath; | 
| 33 class IndexedDBKeyRange; | 33 class IndexedDBKeyRange; | 
| 34 class IndexedDBTransaction; | 34 class IndexedDBTransaction; | 
| 35 struct IndexedDBValue; | 35 struct IndexedDBValue; | 
| 36 | 36 | 
| 37 class CONTENT_EXPORT IndexedDBDatabase | 37 class CONTENT_EXPORT IndexedDBDatabase | 
| 38 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { | 38 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { | 
| 39 public: | 39 public: | 
| 40 enum TaskType { | |
| 41 NORMAL_TASK = 0, | |
| 42 PREEMPTIVE_TASK | |
| 43 }; | |
| 44 | |
| 45 enum PutMode { | 40 enum PutMode { | 
| 
jsbell
2014/06/09 16:38:27
Remove this enum too?
 
Pritam Nikam
2014/06/11 14:05:16
Done.
 | |
| 46 ADD_OR_UPDATE, | 41 ADD_OR_UPDATE, | 
| 47 ADD_ONLY, | 42 ADD_ONLY, | 
| 48 CURSOR_UPDATE | 43 CURSOR_UPDATE | 
| 49 }; | 44 }; | 
| 50 | 45 | 
| 51 // An index and corresponding set of keys | 46 // An index and corresponding set of keys | 
| 52 typedef std::pair<int64, std::vector<IndexedDBKey> > IndexKeys; | 47 typedef std::pair<int64, std::vector<IndexedDBKey> > IndexKeys; | 
| 53 | 48 | 
| 54 // Identifier is pair of (origin url, database name). | 49 // Identifier is pair of (origin url, database name). | 
| 55 typedef std::pair<GURL, base::string16> Identifier; | 50 typedef std::pair<GURL, base::string16> Identifier; | 
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 int64 object_store_id, | 134 int64 object_store_id, | 
| 140 scoped_ptr<IndexedDBKey> primary_key, | 135 scoped_ptr<IndexedDBKey> primary_key, | 
| 141 const std::vector<IndexKeys>& index_keys); | 136 const std::vector<IndexKeys>& index_keys); | 
| 142 void SetIndexesReady(int64 transaction_id, | 137 void SetIndexesReady(int64 transaction_id, | 
| 143 int64 object_store_id, | 138 int64 object_store_id, | 
| 144 const std::vector<int64>& index_ids); | 139 const std::vector<int64>& index_ids); | 
| 145 void OpenCursor(int64 transaction_id, | 140 void OpenCursor(int64 transaction_id, | 
| 146 int64 object_store_id, | 141 int64 object_store_id, | 
| 147 int64 index_id, | 142 int64 index_id, | 
| 148 scoped_ptr<IndexedDBKeyRange> key_range, | 143 scoped_ptr<IndexedDBKeyRange> key_range, | 
| 149 indexed_db::CursorDirection, | 144 blink::Direction, | 
| 150 bool key_only, | 145 bool key_only, | 
| 151 TaskType task_type, | 146 blink::TaskType task_type, | 
| 152 scoped_refptr<IndexedDBCallbacks> callbacks); | 147 scoped_refptr<IndexedDBCallbacks> callbacks); | 
| 153 void Count(int64 transaction_id, | 148 void Count(int64 transaction_id, | 
| 154 int64 object_store_id, | 149 int64 object_store_id, | 
| 155 int64 index_id, | 150 int64 index_id, | 
| 156 scoped_ptr<IndexedDBKeyRange> key_range, | 151 scoped_ptr<IndexedDBKeyRange> key_range, | 
| 157 scoped_refptr<IndexedDBCallbacks> callbacks); | 152 scoped_refptr<IndexedDBCallbacks> callbacks); | 
| 158 void DeleteRange(int64 transaction_id, | 153 void DeleteRange(int64 transaction_id, | 
| 159 int64 object_store_id, | 154 int64 object_store_id, | 
| 160 scoped_ptr<IndexedDBKeyRange> key_range, | 155 scoped_ptr<IndexedDBKeyRange> key_range, | 
| 161 scoped_refptr<IndexedDBCallbacks> callbacks); | 156 scoped_refptr<IndexedDBCallbacks> callbacks); | 
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 290 | 285 | 
| 291 typedef list_set<IndexedDBConnection*> ConnectionSet; | 286 typedef list_set<IndexedDBConnection*> ConnectionSet; | 
| 292 ConnectionSet connections_; | 287 ConnectionSet connections_; | 
| 293 | 288 | 
| 294 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); | 289 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); | 
| 295 }; | 290 }; | 
| 296 | 291 | 
| 297 } // namespace content | 292 } // namespace content | 
| 298 | 293 | 
| 299 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 294 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ | 
| OLD | NEW |