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

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

Issue 259063004: Track which IndexedDBBackingStores have been opened since boot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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_BACKING_STORE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 15 matching lines...) Expand all
26 #include "content/common/indexed_db/indexed_db_key_path.h" 26 #include "content/common/indexed_db/indexed_db_key_path.h"
27 #include "content/common/indexed_db/indexed_db_key_range.h" 27 #include "content/common/indexed_db/indexed_db_key_range.h"
28 #include "third_party/leveldatabase/src/include/leveldb/status.h" 28 #include "third_party/leveldatabase/src/include/leveldb/status.h"
29 #include "url/gurl.h" 29 #include "url/gurl.h"
30 #include "webkit/browser/blob/blob_data_handle.h" 30 #include "webkit/browser/blob/blob_data_handle.h"
31 31
32 namespace base { 32 namespace base {
33 class TaskRunner; 33 class TaskRunner;
34 } 34 }
35 35
36 namespace net {
37 class URLRequestContext;
38 }
39
36 namespace content { 40 namespace content {
37 41
38 class IndexedDBFactory; 42 class IndexedDBFactory;
39 class LevelDBComparator; 43 class LevelDBComparator;
40 class LevelDBDatabase; 44 class LevelDBDatabase;
41 struct IndexedDBValue; 45 struct IndexedDBValue;
42 46
43 class LevelDBFactory { 47 class LevelDBFactory {
44 public: 48 public:
45 virtual ~LevelDBFactory() {} 49 virtual ~LevelDBFactory() {}
(...skipping 23 matching lines...) Expand all
69 return &close_timer_; 73 return &close_timer_;
70 } 74 }
71 IndexedDBActiveBlobRegistry* active_blob_registry() { 75 IndexedDBActiveBlobRegistry* active_blob_registry() {
72 return &active_blob_registry_; 76 return &active_blob_registry_;
73 } 77 }
74 78
75 static scoped_refptr<IndexedDBBackingStore> Open( 79 static scoped_refptr<IndexedDBBackingStore> Open(
76 IndexedDBFactory* indexed_db_factory, 80 IndexedDBFactory* indexed_db_factory,
77 const GURL& origin_url, 81 const GURL& origin_url,
78 const base::FilePath& path_base, 82 const base::FilePath& path_base,
83 net::URLRequestContext* request_context,
79 blink::WebIDBDataLoss* data_loss, 84 blink::WebIDBDataLoss* data_loss,
80 std::string* data_loss_message, 85 std::string* data_loss_message,
81 bool* disk_full, 86 bool* disk_full,
82 base::TaskRunner* task_runner); 87 base::TaskRunner* task_runner,
83 88 bool clean_journal);
84 static scoped_refptr<IndexedDBBackingStore> Open( 89 static scoped_refptr<IndexedDBBackingStore> Open(
85 IndexedDBFactory* indexed_db_factory, 90 IndexedDBFactory* indexed_db_factory,
86 const GURL& origin_url, 91 const GURL& origin_url,
87 const base::FilePath& path_base, 92 const base::FilePath& path_base,
93 net::URLRequestContext* request_context,
88 blink::WebIDBDataLoss* data_loss, 94 blink::WebIDBDataLoss* data_loss,
89 std::string* data_loss_message, 95 std::string* data_loss_message,
90 bool* disk_full, 96 bool* disk_full,
91 LevelDBFactory* leveldb_factory, 97 LevelDBFactory* leveldb_factory,
92 base::TaskRunner* task_runner); 98 base::TaskRunner* task_runner,
99 bool clean_journal);
93 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( 100 static scoped_refptr<IndexedDBBackingStore> OpenInMemory(
94 const GURL& origin_url, 101 const GURL& origin_url,
95 base::TaskRunner* task_runner); 102 base::TaskRunner* task_runner);
96 static scoped_refptr<IndexedDBBackingStore> OpenInMemory( 103 static scoped_refptr<IndexedDBBackingStore> OpenInMemory(
97 const GURL& origin_url, 104 const GURL& origin_url,
98 LevelDBFactory* level_db_factory, 105 LevelDBFactory* level_db_factory,
99 base::TaskRunner* task_runner); 106 base::TaskRunner* task_runner);
100 107
101 void GrantChildProcessPermissions(int child_process_id); 108 void GrantChildProcessPermissions(int child_process_id);
102 109
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 scoped_ptr<LevelDBComparator> comparator_; 440 scoped_ptr<LevelDBComparator> comparator_;
434 // Whenever blobs are registered in active_blob_registry_, indexed_db_factory_ 441 // Whenever blobs are registered in active_blob_registry_, indexed_db_factory_
435 // will hold a reference to this backing store. 442 // will hold a reference to this backing store.
436 IndexedDBActiveBlobRegistry active_blob_registry_; 443 IndexedDBActiveBlobRegistry active_blob_registry_;
437 base::OneShotTimer<IndexedDBBackingStore> close_timer_; 444 base::OneShotTimer<IndexedDBBackingStore> close_timer_;
438 }; 445 };
439 446
440 } // namespace content 447 } // namespace content
441 448
442 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ 449 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698