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

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

Issue 2109273002: IndexedDB: Created IndexedDBDataLossInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initializing data loss in IndexedDBBackingStore::Open Created 4 years, 5 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_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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 13 matching lines...) Expand all
24 #include "url/origin.h" 24 #include "url/origin.h"
25 25
26 namespace net { 26 namespace net {
27 class URLRequestContext; 27 class URLRequestContext;
28 } 28 }
29 29
30 namespace content { 30 namespace content {
31 31
32 class IndexedDBBackingStore; 32 class IndexedDBBackingStore;
33 struct IndexedDBPendingConnection; 33 struct IndexedDBPendingConnection;
34 struct IndexedDBDataLossInfo;
34 35
35 class CONTENT_EXPORT IndexedDBFactory 36 class CONTENT_EXPORT IndexedDBFactory
36 : NON_EXPORTED_BASE(public base::RefCountedThreadSafe<IndexedDBFactory>) { 37 : NON_EXPORTED_BASE(public base::RefCountedThreadSafe<IndexedDBFactory>) {
37 public: 38 public:
38 typedef std::multimap<url::Origin, IndexedDBDatabase*> OriginDBMap; 39 typedef std::multimap<url::Origin, IndexedDBDatabase*> OriginDBMap;
39 typedef OriginDBMap::const_iterator OriginDBMapIterator; 40 typedef OriginDBMap::const_iterator OriginDBMapIterator;
40 typedef std::pair<OriginDBMapIterator, OriginDBMapIterator> OriginDBs; 41 typedef std::pair<OriginDBMapIterator, OriginDBMapIterator> OriginDBs;
41 42
42 virtual void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier, 43 virtual void ReleaseDatabase(const IndexedDBDatabase::Identifier& identifier,
43 bool forced_close) = 0; 44 bool forced_close) = 0;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 protected: 85 protected:
85 friend class base::RefCountedThreadSafe<IndexedDBFactory>; 86 friend class base::RefCountedThreadSafe<IndexedDBFactory>;
86 87
87 IndexedDBFactory() {} 88 IndexedDBFactory() {}
88 virtual ~IndexedDBFactory() {} 89 virtual ~IndexedDBFactory() {}
89 90
90 virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore( 91 virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStore(
91 const url::Origin& origin, 92 const url::Origin& origin,
92 const base::FilePath& data_directory, 93 const base::FilePath& data_directory,
93 net::URLRequestContext* request_context, 94 net::URLRequestContext* request_context,
94 blink::WebIDBDataLoss* data_loss, 95 IndexedDBDataLossInfo* data_loss_info,
95 std::string* data_loss_reason,
96 bool* disk_full, 96 bool* disk_full,
97 leveldb::Status* status) = 0; 97 leveldb::Status* status) = 0;
98 98
99 virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStoreHelper( 99 virtual scoped_refptr<IndexedDBBackingStore> OpenBackingStoreHelper(
100 const url::Origin& origin, 100 const url::Origin& origin,
101 const base::FilePath& data_directory, 101 const base::FilePath& data_directory,
102 net::URLRequestContext* request_context, 102 net::URLRequestContext* request_context,
103 blink::WebIDBDataLoss* data_loss, 103 IndexedDBDataLossInfo* data_loss_info,
104 std::string* data_loss_message,
105 bool* disk_full, 104 bool* disk_full,
106 bool first_time, 105 bool first_time,
107 leveldb::Status* status) = 0; 106 leveldb::Status* status) = 0;
108 107
109 private: 108 private:
110 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactory); 109 DISALLOW_COPY_AND_ASSIGN(IndexedDBFactory);
111 }; 110 };
112 111
113 } // namespace content 112 } // namespace content
114 113
115 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_ 114 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_database.cc ('k') | content/browser/indexed_db/indexed_db_factory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698