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

Side by Side Diff: webkit/quota/mock_storage_client.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
« no previous file with comments | « webkit/quota/mock_quota_manager_unittest.cc ('k') | webkit/quota/quota_manager.cc » ('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/mock_storage_client.h" 5 #include "webkit/quota/mock_storage_client.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "base/message_loop_proxy.h" 11 #include "base/message_loop_proxy.h"
12 #include "base/stl_util.h" 12 #include "base/stl_util.h"
13 #include "net/base/net_util.h" 13 #include "net/base/net_util.h"
14 #include "webkit/quota/quota_manager.h" 14 #include "webkit/quota/quota_manager.h"
15 15
16 namespace quota { 16 namespace quota {
17 17
18 using std::make_pair; 18 using std::make_pair;
19 19
20 MockStorageClient::MockStorageClient( 20 MockStorageClient::MockStorageClient(
21 QuotaManagerProxy* quota_manager_proxy, 21 QuotaManagerProxy* quota_manager_proxy,
22 const MockOriginData* mock_data, QuotaClient::ID id, size_t mock_data_size) 22 const MockOriginData* mock_data, QuotaClient::ID id, size_t mock_data_size)
23 : quota_manager_proxy_(quota_manager_proxy), 23 : quota_manager_proxy_(quota_manager_proxy),
24 id_(id), 24 id_(id),
25 mock_time_counter_(0), 25 mock_time_counter_(0),
26 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 26 weak_factory_(this) {
27 Populate(mock_data, mock_data_size); 27 Populate(mock_data, mock_data_size);
28 } 28 }
29 29
30 void MockStorageClient::Populate( 30 void MockStorageClient::Populate(
31 const MockOriginData* mock_data, 31 const MockOriginData* mock_data,
32 size_t mock_data_size) { 32 size_t mock_data_size) {
33 for (size_t i = 0; i < mock_data_size; ++i) { 33 for (size_t i = 0; i < mock_data_size; ++i) {
34 origin_data_[make_pair(GURL(mock_data[i].origin), mock_data[i].type)] = 34 origin_data_[make_pair(GURL(mock_data[i].origin), mock_data[i].type)] =
35 mock_data[i].usage; 35 mock_data[i].usage;
36 } 36 }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 int64 delta = itr->second; 173 int64 delta = itr->second;
174 quota_manager_proxy_-> 174 quota_manager_proxy_->
175 NotifyStorageModified(id(), origin_url, type, -delta); 175 NotifyStorageModified(id(), origin_url, type, -delta);
176 origin_data_.erase(itr); 176 origin_data_.erase(itr);
177 } 177 }
178 178
179 callback.Run(kQuotaStatusOk); 179 callback.Run(kQuotaStatusOk);
180 } 180 }
181 181
182 } // namespace quota 182 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/mock_quota_manager_unittest.cc ('k') | webkit/quota/quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698