| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 FORCE_CLOSE_REASON_MAX | 55 FORCE_CLOSE_REASON_MAX |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 // The indexed db directory. | 58 // The indexed db directory. |
| 59 static const base::FilePath::CharType kIndexedDBDirectory[]; | 59 static const base::FilePath::CharType kIndexedDBDirectory[]; |
| 60 | 60 |
| 61 // If |data_path| is empty, nothing will be saved to disk. | 61 // If |data_path| is empty, nothing will be saved to disk. |
| 62 IndexedDBContextImpl(const base::FilePath& data_path, | 62 IndexedDBContextImpl(const base::FilePath& data_path, |
| 63 storage::SpecialStoragePolicy* special_storage_policy, | 63 storage::SpecialStoragePolicy* special_storage_policy, |
| 64 storage::QuotaManagerProxy* quota_manager_proxy, | 64 storage::QuotaManagerProxy* quota_manager_proxy, |
| 65 base::SequencedTaskRunner* task_runner); | 65 scoped_refptr<base::SequencedTaskRunner> task_runner); |
| 66 | 66 |
| 67 IndexedDBFactory* GetIDBFactory(); | 67 IndexedDBFactory* GetIDBFactory(); |
| 68 | 68 |
| 69 // Disables the exit-time deletion of session-only data. | 69 // Disables the exit-time deletion of session-only data. |
| 70 void SetForceKeepSessionState() { force_keep_session_state_ = true; } | 70 void SetForceKeepSessionState() { force_keep_session_state_ = true; } |
| 71 | 71 |
| 72 // IndexedDBContext implementation: | 72 // IndexedDBContext implementation: |
| 73 base::SequencedTaskRunner* TaskRunner() const override; | 73 base::SequencedTaskRunner* TaskRunner() const override; |
| 74 std::vector<IndexedDBInfo> GetAllOriginsInfo() override; | 74 std::vector<IndexedDBInfo> GetAllOriginsInfo() override; |
| 75 int64_t GetOriginDiskUsage(const GURL& origin_url) override; | 75 int64_t GetOriginDiskUsage(const GURL& origin_url) override; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 165 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 166 std::unique_ptr<std::set<url::Origin>> origin_set_; | 166 std::unique_ptr<std::set<url::Origin>> origin_set_; |
| 167 std::map<url::Origin, int64_t> origin_size_map_; | 167 std::map<url::Origin, int64_t> origin_size_map_; |
| 168 | 168 |
| 169 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); | 169 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace content | 172 } // namespace content |
| 173 | 173 |
| 174 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 174 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
| OLD | NEW |