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

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

Issue 475063004: IndexedDB + Coding Style: re-order enums/typedefs/... to match guide (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased after r291485 Created 6 years, 4 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) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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_IMPL_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest, DatabaseFailedOpen); 97 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest, DatabaseFailedOpen);
98 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest, 98 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest,
99 DeleteDatabaseClosesBackingStore); 99 DeleteDatabaseClosesBackingStore);
100 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest, 100 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest,
101 ForceCloseReleasesBackingStore); 101 ForceCloseReleasesBackingStore);
102 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest, 102 FRIEND_TEST_ALL_PREFIXES(IndexedDBFactoryTest,
103 GetDatabaseNamesClosesBackingStore); 103 GetDatabaseNamesClosesBackingStore);
104 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest, 104 FRIEND_TEST_ALL_PREFIXES(IndexedDBTest,
105 ForceCloseOpenDatabasesOnCommitFailure); 105 ForceCloseOpenDatabasesOnCommitFailure);
106 106
107 typedef std::map<IndexedDBDatabase::Identifier, IndexedDBDatabase*>
108 IndexedDBDatabaseMap;
109 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> >
110 IndexedDBBackingStoreMap;
111
107 // Called internally after a database is closed, with some delay. If this 112 // Called internally after a database is closed, with some delay. If this
108 // factory has the last reference, it will be released. 113 // factory has the last reference, it will be released.
109 void MaybeCloseBackingStore(const GURL& origin_url); 114 void MaybeCloseBackingStore(const GURL& origin_url);
110 bool HasLastBackingStoreReference(const GURL& origin_url) const; 115 bool HasLastBackingStoreReference(const GURL& origin_url) const;
111 116
112 // Testing helpers, so unit tests don't need to grovel through internal state. 117 // Testing helpers, so unit tests don't need to grovel through internal state.
113 bool IsDatabaseOpen(const GURL& origin_url, const base::string16& name) const; 118 bool IsDatabaseOpen(const GURL& origin_url, const base::string16& name) const;
114 bool IsBackingStoreOpen(const GURL& origin_url) const; 119 bool IsBackingStoreOpen(const GURL& origin_url) const;
115 bool IsBackingStorePendingClose(const GURL& origin_url) const; 120 bool IsBackingStorePendingClose(const GURL& origin_url) const;
116 void RemoveDatabaseFromMaps(const IndexedDBDatabase::Identifier& identifier); 121 void RemoveDatabaseFromMaps(const IndexedDBDatabase::Identifier& identifier);
117 122
118 IndexedDBContextImpl* context_; 123 IndexedDBContextImpl* context_;
119 124
120 typedef std::map<IndexedDBDatabase::Identifier, IndexedDBDatabase*>
121 IndexedDBDatabaseMap;
122 IndexedDBDatabaseMap database_map_; 125 IndexedDBDatabaseMap database_map_;
123 OriginDBMap origin_dbs_; 126 OriginDBMap origin_dbs_;
124
125 typedef std::map<GURL, scoped_refptr<IndexedDBBackingStore> >
126 IndexedDBBackingStoreMap;
127 IndexedDBBackingStoreMap backing_store_map_; 127 IndexedDBBackingStoreMap backing_store_map_;
128 128
129 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_; 129 std::set<scoped_refptr<IndexedDBBackingStore> > session_only_backing_stores_;
130 IndexedDBBackingStoreMap backing_stores_with_active_blobs_; 130 IndexedDBBackingStoreMap backing_stores_with_active_blobs_;
131 std::set<GURL> backends_opened_since_boot_; 131 std::set<GURL> backends_opened_since_boot_;
132 132
133 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactoryImpl); 133 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactoryImpl);
134 }; 134 };
135 135
136 } // namespace content 136 } // namespace content
137 137
138 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_ 138 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.h ('k') | content/browser/indexed_db/indexed_db_leveldb_coding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698