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

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

Issue 14307012: webkit: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
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/mock_quota_manager.h" 5 #include "webkit/quota/mock_quota_manager.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 24 matching lines...) Expand all
35 // MockQuotaManager ---------------------------------------------------------- 35 // MockQuotaManager ----------------------------------------------------------
36 36
37 MockQuotaManager::MockQuotaManager( 37 MockQuotaManager::MockQuotaManager(
38 bool is_incognito, 38 bool is_incognito,
39 const base::FilePath& profile_path, 39 const base::FilePath& profile_path,
40 base::SingleThreadTaskRunner* io_thread, 40 base::SingleThreadTaskRunner* io_thread,
41 base::SequencedTaskRunner* db_thread, 41 base::SequencedTaskRunner* db_thread,
42 SpecialStoragePolicy* special_storage_policy) 42 SpecialStoragePolicy* special_storage_policy)
43 : QuotaManager(is_incognito, profile_path, io_thread, db_thread, 43 : QuotaManager(is_incognito, profile_path, io_thread, db_thread,
44 special_storage_policy), 44 special_storage_policy),
45 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 45 weak_factory_(this) {
46 } 46 }
47 47
48 void MockQuotaManager::GetUsageAndQuota( 48 void MockQuotaManager::GetUsageAndQuota(
49 const GURL& origin, 49 const GURL& origin,
50 quota::StorageType type, 50 quota::StorageType type,
51 const GetUsageAndQuotaCallback& callback) { 51 const GetUsageAndQuotaCallback& callback) {
52 StorageInfo& info = usage_and_quota_map_[std::make_pair(origin, type)]; 52 StorageInfo& info = usage_and_quota_map_[std::make_pair(origin, type)];
53 callback.Run(quota::kQuotaStatusOk, info.usage, info.quota); 53 callback.Run(quota::kQuotaStatusOk, info.usage, info.quota);
54 } 54 }
55 55
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 last_notified_delta_ = delta; 190 last_notified_delta_ = delta;
191 if (mock_manager()) 191 if (mock_manager())
192 mock_manager()->UpdateUsage(origin, type, delta); 192 mock_manager()->UpdateUsage(origin, type, delta);
193 } 193 }
194 194
195 MockQuotaManagerProxy::~MockQuotaManagerProxy() { 195 MockQuotaManagerProxy::~MockQuotaManagerProxy() {
196 DCHECK(!registered_client_); 196 DCHECK(!registered_client_);
197 } 197 }
198 198
199 } // namespace quota 199 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/quota_file_io_unittest.cc ('k') | webkit/quota/mock_quota_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698