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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc

Issue 8370007: base::Bind: Convert BrowsingDatabaseHelper::StartFetching. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Build fix. Created 9 years, 2 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 | « chrome/browser/mock_browsing_data_database_helper.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <map> 5 #include <map>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/memory/scoped_callback_factory.h" 10 #include "base/memory/scoped_callback_factory.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 private: 134 private:
135 void OnGetOriginUsageComplete(int64 usage) { 135 void OnGetOriginUsageComplete(int64 usage) {
136 usage_ = usage; 136 usage_ = usage;
137 } 137 }
138 138
139 void OnGetOriginsComplete(const std::set<GURL>& origins, 139 void OnGetOriginsComplete(const std::set<GURL>& origins,
140 quota::StorageType type) { 140 quota::StorageType type) {
141 origins_ = origins; 141 origins_ = origins;
142 type_ = type_; 142 type_ = type;
143 } 143 }
144 144
145 void OnDeleteOriginComplete(quota::QuotaStatusCode code) { 145 void OnDeleteOriginComplete(quota::QuotaStatusCode code) {
146 delete_status_ = code; 146 delete_status_ = code;
147 } 147 }
148 148
149 ScopedTempDir temp_dir_; 149 ScopedTempDir temp_dir_;
150 int64 usage_; 150 int64 usage_;
151 std::set<GURL> origins_; 151 std::set<GURL> origins_;
152 quota::StorageType type_; 152 quota::StorageType type_;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 AddFakeIndexedDB(kOriginA, 1000); 228 AddFakeIndexedDB(kOriginA, 1000);
229 AddFakeIndexedDB(kOriginB, 50); 229 AddFakeIndexedDB(kOriginB, 50);
230 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp)); 230 EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp));
231 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 231 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
232 232
233 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA); 233 quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
234 EXPECT_EQ(quota::kQuotaStatusOk, delete_status); 234 EXPECT_EQ(quota::kQuotaStatusOk, delete_status);
235 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp)); 235 EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
236 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp)); 236 EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
237 } 237 }
OLDNEW
« no previous file with comments | « chrome/browser/mock_browsing_data_database_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698