Chromium Code Reviews| Index: content/browser/indexed_db/indexed_db_context_impl.h |
| diff --git a/content/browser/indexed_db/indexed_db_context_impl.h b/content/browser/indexed_db/indexed_db_context_impl.h |
| index a486070f088448bdf13229a18718291772a0e536..a81719240bf875d1e6d48ed0cfde62df80721261 100644 |
| --- a/content/browser/indexed_db/indexed_db_context_impl.h |
| +++ b/content/browser/indexed_db/indexed_db_context_impl.h |
| @@ -22,6 +22,7 @@ class GURL; |
| namespace base { |
| class FilePath; |
| +class MessageLoop; |
| class MessageLoopProxy; |
| } |
| @@ -41,7 +42,7 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| IndexedDBContextImpl(const base::FilePath& data_path, |
| quota::SpecialStoragePolicy* special_storage_policy, |
| quota::QuotaManagerProxy* quota_manager_proxy, |
| - base::MessageLoopProxy* webkit_thread_loop); |
| + base::MessageLoop* message_loop); |
|
jam
2013/06/21 16:00:50
question: why did you switch from MLP to ML? the f
jsbell
2013/06/21 16:34:16
Purely for the base::MessageLoop::current() == mes
jsbell
2013/06/21 16:49:47
Oh, RunsTasksOnCurrentThread should do it for the
jsbell
2013/06/21 17:38:21
And the TestThreadHelper can replaced by ThreadSim
|
| WebIDBFactoryImpl* GetIDBFactory(); |
| @@ -52,6 +53,8 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| void SetForceKeepSessionState() { force_keep_session_state_ = true; } |
| // IndexedDBContext implementation: |
| + virtual base::TaskRunner* TaskRunner() OVERRIDE; |
| + virtual bool OnIndexedDBThread() const OVERRIDE; |
| virtual std::vector<GURL> GetAllOrigins() OVERRIDE; |
| virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() OVERRIDE; |
| virtual int64 GetOriginDiskUsage(const GURL& origin_url) OVERRIDE; |
| @@ -59,6 +62,8 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; |
| virtual base::FilePath GetFilePathForTesting( |
| const std::string& origin_id) const OVERRIDE; |
| + virtual void SetMessageLoopForTesting( |
| + base::MessageLoop* message_loop) OVERRIDE; |
| // Methods called by IndexedDBDispatcherHost for quota support. |
| void ConnectionOpened(const GURL& origin_url, WebIDBDatabaseImpl* db); |
| @@ -77,6 +82,8 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| return set->find(origin_url) != set->end(); |
| } |
| + scoped_refptr<base::MessageLoopProxy> MessageLoopProxy(); |
|
jam
2013/06/21 16:00:50
nit: document
jsbell
2013/06/21 16:34:16
Done.
|
| + |
| // For unit tests allow to override the |data_path_|. |
| void set_data_path_for_testing(const base::FilePath& data_path) { |
| data_path_ = data_path; |
| @@ -113,6 +120,7 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| void RemoveFromOriginSet(const GURL& origin_url) { |
| GetOriginSet()->erase(origin_url); |
| } |
| + |
| // Only for testing. |
| void ResetCaches(); |
| @@ -122,6 +130,7 @@ class CONTENT_EXPORT IndexedDBContextImpl |
| bool force_keep_session_state_; |
| scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |
| + base::MessageLoop* message_loop_; |
| scoped_ptr<std::set<GURL> > origin_set_; |
| OriginToSizeMap origin_size_map_; |
| OriginToSizeMap space_available_map_; |