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

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

Issue 198223002: Added IndexedDBPendingConnection to group up a bunch of parameters that get (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge out Created 6 years, 9 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 | Annotate | Revision Log
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_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "content/browser/indexed_db/indexed_db_callbacks.h" 15 #include "content/browser/indexed_db/indexed_db_callbacks.h"
16 #include "content/browser/indexed_db/indexed_db_database.h" 16 #include "content/browser/indexed_db/indexed_db_database.h"
17 #include "content/browser/indexed_db/indexed_db_database_callbacks.h" 17 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
18 #include "content/common/content_export.h" 18 #include "content/common/content_export.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 20
21 namespace content { 21 namespace content {
22 22
23 class IndexedDBBackingStore; 23 class IndexedDBBackingStore;
24 class IndexedDBContextImpl; 24 class IndexedDBContextImpl;
25 struct IndexedDBPendingConnection;
25 26
26 class CONTENT_EXPORT IndexedDBFactory 27 class CONTENT_EXPORT IndexedDBFactory
27 : NON_EXPORTED_BASE(public base::RefCountedThreadSafe<IndexedDBFactory>) { 28 : NON_EXPORTED_BASE(public base::RefCountedThreadSafe<IndexedDBFactory>) {
28 public: 29 public:
29 typedef std::multimap<GURL, IndexedDBDatabase*> OriginDBMap; 30 typedef std::multimap<GURL, IndexedDBDatabase*> OriginDBMap;
30 typedef OriginDBMap::const_iterator OriginDBMapIterator; 31 typedef OriginDBMap::const_iterator OriginDBMapIterator;
31 32
32 explicit IndexedDBFactory(IndexedDBContextImpl* context); 33 explicit IndexedDBFactory(IndexedDBContextImpl* context);
33 34
34 // Notifications from weak pointers. 35 // Notifications from weak pointers.
35 void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier, 36 void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier,
36 bool forcedClose); 37 bool forcedClose);
37 38
38 void GetDatabaseNames(scoped_refptr<IndexedDBCallbacks> callbacks, 39 void GetDatabaseNames(scoped_refptr<IndexedDBCallbacks> callbacks,
39 const GURL& origin_url, 40 const GURL& origin_url,
40 const base::FilePath& data_directory); 41 const base::FilePath& data_directory);
41 void Open(const base::string16& name, 42 void Open(const base::string16& name,
42 int64 version, 43 const IndexedDBPendingConnection& connection,
43 int64 transaction_id,
44 scoped_refptr<IndexedDBCallbacks> callbacks,
45 scoped_refptr<IndexedDBDatabaseCallbacks> database_callbacks,
46 const GURL& origin_url, 44 const GURL& origin_url,
47 const base::FilePath& data_directory); 45 const base::FilePath& data_directory);
48 46
49 void DeleteDatabase(const base::string16& name, 47 void DeleteDatabase(const base::string16& name,
50 scoped_refptr<IndexedDBCallbacks> callbacks, 48 scoped_refptr<IndexedDBCallbacks> callbacks,
51 const GURL& origin_url, 49 const GURL& origin_url,
52 const base::FilePath& data_directory); 50 const base::FilePath& data_directory);
53 51
54 void HandleBackingStoreFailure(const GURL& origin_url); 52 void HandleBackingStoreFailure(const GURL& origin_url);
55 53
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> > 118 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> >
121 IndexedDBBackingStoreMap; 119 IndexedDBBackingStoreMap;
122 IndexedDBBackingStoreMap backing_store_map_; 120 IndexedDBBackingStoreMap backing_store_map_;
123 121
124 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; 122 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_;
125 }; 123 };
126 124
127 } // namespace content 125 } // namespace content
128 126
129 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ 127 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698