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

Side by Side Diff: webkit/quota/quota_manager.cc

Issue 10197007: Change webkit/{fileapi,quota} code to use TaskRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fix Created 8 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
« no previous file with comments | « webkit/quota/quota_manager.h ('k') | webkit/quota/quota_task.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "webkit/quota/quota_manager.h" 5 #include "webkit/quota/quota_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/message_loop_proxy.h" 15 #include "base/sequenced_task_runner.h"
16 #include "base/single_thread_task_runner.h"
16 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
17 #include "base/string_number_conversions.h" 18 #include "base/string_number_conversions.h"
18 #include "base/sys_info.h" 19 #include "base/sys_info.h"
19 #include "base/time.h" 20 #include "base/time.h"
20 #include "net/base/net_util.h" 21 #include "net/base/net_util.h"
21 #include "webkit/quota/quota_database.h" 22 #include "webkit/quota/quota_database.h"
22 #include "webkit/quota/quota_temporary_storage_evictor.h" 23 #include "webkit/quota/quota_temporary_storage_evictor.h"
23 #include "webkit/quota/quota_types.h" 24 #include "webkit/quota/quota_types.h"
24 #include "webkit/quota/usage_tracker.h" 25 #include "webkit/quota/usage_tracker.h"
25 26
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 } 1175 }
1175 1176
1176 Callback callback_; 1177 Callback callback_;
1177 TableEntries entries_; 1178 TableEntries entries_;
1178 }; 1179 };
1179 1180
1180 // QuotaManager --------------------------------------------------------------- 1181 // QuotaManager ---------------------------------------------------------------
1181 1182
1182 QuotaManager::QuotaManager(bool is_incognito, 1183 QuotaManager::QuotaManager(bool is_incognito,
1183 const FilePath& profile_path, 1184 const FilePath& profile_path,
1184 base::MessageLoopProxy* io_thread, 1185 base::SingleThreadTaskRunner* io_thread,
1185 base::MessageLoopProxy* db_thread, 1186 base::SequencedTaskRunner* db_thread,
1186 SpecialStoragePolicy* special_storage_policy) 1187 SpecialStoragePolicy* special_storage_policy)
1187 : is_incognito_(is_incognito), 1188 : is_incognito_(is_incognito),
1188 profile_path_(profile_path), 1189 profile_path_(profile_path),
1189 proxy_(new QuotaManagerProxy( 1190 proxy_(new QuotaManagerProxy(
1190 ALLOW_THIS_IN_INITIALIZER_LIST(this), io_thread)), 1191 ALLOW_THIS_IN_INITIALIZER_LIST(this), io_thread)),
1191 db_disabled_(false), 1192 db_disabled_(false),
1192 eviction_disabled_(false), 1193 eviction_disabled_(false),
1193 io_thread_(io_thread), 1194 io_thread_(io_thread),
1194 db_thread_(db_thread), 1195 db_thread_(db_thread),
1195 temporary_quota_initialized_(false), 1196 temporary_quota_initialized_(false),
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1816 if (manager_) 1817 if (manager_)
1817 manager_->NotifyOriginNoLongerInUse(origin); 1818 manager_->NotifyOriginNoLongerInUse(origin);
1818 } 1819 }
1819 1820
1820 QuotaManager* QuotaManagerProxy::quota_manager() const { 1821 QuotaManager* QuotaManagerProxy::quota_manager() const {
1821 DCHECK(!io_thread_ || io_thread_->BelongsToCurrentThread()); 1822 DCHECK(!io_thread_ || io_thread_->BelongsToCurrentThread());
1822 return manager_; 1823 return manager_;
1823 } 1824 }
1824 1825
1825 QuotaManagerProxy::QuotaManagerProxy( 1826 QuotaManagerProxy::QuotaManagerProxy(
1826 QuotaManager* manager, base::MessageLoopProxy* io_thread) 1827 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread)
1827 : manager_(manager), io_thread_(io_thread) { 1828 : manager_(manager), io_thread_(io_thread) {
1828 } 1829 }
1829 1830
1830 QuotaManagerProxy::~QuotaManagerProxy() { 1831 QuotaManagerProxy::~QuotaManagerProxy() {
1831 } 1832 }
1832 1833
1833 } // namespace quota 1834 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/quota_manager.h ('k') | webkit/quota/quota_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698