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

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

Issue 1841553002: IndexedDB: Use url::Origin rather than GURL for representing origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@origin-idb
Patch Set: Rebased Created 4 years, 8 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_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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 #include <map> 12 #include <map>
13 #include <string> 13 #include <string>
14 #include <utility> 14 #include <utility>
15 #include <vector> 15 #include <vector>
16 16
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/ref_counted.h" 18 #include "base/memory/ref_counted.h"
19 #include "content/browser/indexed_db/indexed_db.h" 19 #include "content/browser/indexed_db/indexed_db.h"
20 #include "content/browser/indexed_db/indexed_db_backing_store.h" 20 #include "content/browser/indexed_db/indexed_db_backing_store.h"
21 #include "content/browser/indexed_db/indexed_db_callbacks.h" 21 #include "content/browser/indexed_db/indexed_db_callbacks.h"
22 #include "content/browser/indexed_db/indexed_db_metadata.h" 22 #include "content/browser/indexed_db/indexed_db_metadata.h"
23 #include "content/browser/indexed_db/indexed_db_pending_connection.h" 23 #include "content/browser/indexed_db/indexed_db_pending_connection.h"
24 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h" 24 #include "content/browser/indexed_db/indexed_db_transaction_coordinator.h"
25 #include "content/browser/indexed_db/list_set.h" 25 #include "content/browser/indexed_db/list_set.h"
26 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h" 26 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
27 #include "url/gurl.h" 27
28 namespace url {
29 class Origin;
30 }
28 31
29 namespace content { 32 namespace content {
30 33
31 class IndexedDBBlobInfo; 34 class IndexedDBBlobInfo;
32 class IndexedDBConnection; 35 class IndexedDBConnection;
33 class IndexedDBDatabaseCallbacks; 36 class IndexedDBDatabaseCallbacks;
34 class IndexedDBFactory; 37 class IndexedDBFactory;
35 class IndexedDBKey; 38 class IndexedDBKey;
36 class IndexedDBKeyPath; 39 class IndexedDBKeyPath;
37 class IndexedDBKeyRange; 40 class IndexedDBKeyRange;
38 class IndexedDBTransaction; 41 class IndexedDBTransaction;
39 struct IndexedDBValue; 42 struct IndexedDBValue;
40 43
41 class CONTENT_EXPORT IndexedDBDatabase 44 class CONTENT_EXPORT IndexedDBDatabase
42 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) { 45 : NON_EXPORTED_BASE(public base::RefCounted<IndexedDBDatabase>) {
43 public: 46 public:
44 // An index and corresponding set of keys 47 // An index and corresponding set of keys
45 typedef std::pair<int64_t, std::vector<IndexedDBKey>> IndexKeys; 48 using IndexKeys = std::pair<int64_t, std::vector<IndexedDBKey>>;
46 49
47 // Identifier is pair of (origin url, database name). 50 // Identifier is pair of (origin, database name).
48 typedef std::pair<GURL, base::string16> Identifier; 51 using Identifier = std::pair<url::Origin, base::string16>;
49 52
50 static const int64_t kInvalidId = 0; 53 static const int64_t kInvalidId = 0;
51 static const int64_t kMinimumIndexId = 30; 54 static const int64_t kMinimumIndexId = 30;
52 55
53 static scoped_refptr<IndexedDBDatabase> Create( 56 static scoped_refptr<IndexedDBDatabase> Create(
54 const base::string16& name, 57 const base::string16& name,
55 IndexedDBBackingStore* backing_store, 58 IndexedDBBackingStore* backing_store,
56 IndexedDBFactory* factory, 59 IndexedDBFactory* factory,
57 const Identifier& unique_identifier, 60 const Identifier& unique_identifier,
58 leveldb::Status* s); 61 leveldb::Status* s);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 PendingDeleteCallList pending_delete_calls_; 311 PendingDeleteCallList pending_delete_calls_;
309 312
310 ConnectionSet connections_; 313 ConnectionSet connections_;
311 314
312 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase); 315 DISALLOW_COPY_AND_ASSIGN(IndexedDBDatabase);
313 }; 316 };
314 317
315 } // namespace content 318 } // namespace content
316 319
317 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_ 320 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_DATABASE_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_context_impl.cc ('k') | content/browser/indexed_db/indexed_db_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698