OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 storage::SpecialStoragePolicy* special_storage_policy, | 56 storage::SpecialStoragePolicy* special_storage_policy, |
57 storage::QuotaManagerProxy* quota_manager_proxy, | 57 storage::QuotaManagerProxy* quota_manager_proxy, |
58 base::SequencedTaskRunner* task_runner); | 58 base::SequencedTaskRunner* task_runner); |
59 | 59 |
60 IndexedDBFactory* GetIDBFactory(); | 60 IndexedDBFactory* GetIDBFactory(); |
61 | 61 |
62 // Disables the exit-time deletion of session-only data. | 62 // Disables the exit-time deletion of session-only data. |
63 void SetForceKeepSessionState() { force_keep_session_state_ = true; } | 63 void SetForceKeepSessionState() { force_keep_session_state_ = true; } |
64 | 64 |
65 // IndexedDBContext implementation: | 65 // IndexedDBContext implementation: |
66 virtual base::SequencedTaskRunner* TaskRunner() const OVERRIDE; | 66 virtual base::SequencedTaskRunner* TaskRunner() const override; |
67 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() OVERRIDE; | 67 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() override; |
68 virtual int64 GetOriginDiskUsage(const GURL& origin_url) OVERRIDE; | 68 virtual int64 GetOriginDiskUsage(const GURL& origin_url) override; |
69 virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; | 69 virtual void DeleteForOrigin(const GURL& origin_url) override; |
70 virtual base::FilePath GetFilePathForTesting( | 70 virtual base::FilePath GetFilePathForTesting( |
71 const std::string& origin_id) const OVERRIDE; | 71 const std::string& origin_id) const override; |
72 virtual void SetTaskRunnerForTesting(base::SequencedTaskRunner* task_runner) | 72 virtual void SetTaskRunnerForTesting(base::SequencedTaskRunner* task_runner) |
73 OVERRIDE; | 73 override; |
74 | 74 |
75 // Methods called by IndexedDBDispatcherHost for quota support. | 75 // Methods called by IndexedDBDispatcherHost for quota support. |
76 void ConnectionOpened(const GURL& origin_url, IndexedDBConnection* db); | 76 void ConnectionOpened(const GURL& origin_url, IndexedDBConnection* db); |
77 void ConnectionClosed(const GURL& origin_url, IndexedDBConnection* db); | 77 void ConnectionClosed(const GURL& origin_url, IndexedDBConnection* db); |
78 void TransactionComplete(const GURL& origin_url); | 78 void TransactionComplete(const GURL& origin_url); |
79 void DatabaseDeleted(const GURL& origin_url); | 79 void DatabaseDeleted(const GURL& origin_url); |
80 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); | 80 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); |
81 bool IsOverQuota(const GURL& origin_url); | 81 bool IsOverQuota(const GURL& origin_url); |
82 | 82 |
83 storage::QuotaManagerProxy* quota_manager_proxy(); | 83 storage::QuotaManagerProxy* quota_manager_proxy(); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 scoped_ptr<std::set<GURL> > origin_set_; | 150 scoped_ptr<std::set<GURL> > origin_set_; |
151 OriginToSizeMap origin_size_map_; | 151 OriginToSizeMap origin_size_map_; |
152 OriginToSizeMap space_available_map_; | 152 OriginToSizeMap space_available_map_; |
153 | 153 |
154 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); | 154 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); |
155 }; | 155 }; |
156 | 156 |
157 } // namespace content | 157 } // namespace content |
158 | 158 |
159 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 159 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
OLD | NEW |