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

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

Issue 1504033007: Move Indexed DB from dedicated thread to task scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@timer
Patch Set: Tweak traits Created 3 years, 6 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) 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
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
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_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_callbacks.cc ('k') | content/browser/indexed_db/indexed_db_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698