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

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

Issue 7839029: QuotaManager::DeleteOriginData now allows deletion of specific QuotaClients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« webkit/quota/quota_client.h ('K') | « webkit/quota/quota_manager.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 <set> 5 #include <set>
6 #include <sstream> 6 #include <sstream>
7 #include <vector> 7 #include <vector>
8 8
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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 quota_status_ = kQuotaStatusUnknown; 161 quota_status_ = kQuotaStatusUnknown;
162 quota_manager_->EvictOriginData(origin, type, 162 quota_manager_->EvictOriginData(origin, type,
163 callback_factory_.NewCallback( 163 callback_factory_.NewCallback(
164 &QuotaManagerTest::StatusCallback)); 164 &QuotaManagerTest::StatusCallback));
165 } 165 }
166 166
167 void DeleteOriginData(const GURL& origin, 167 void DeleteOriginData(const GURL& origin,
168 StorageType type) { 168 StorageType type) {
169 quota_status_ = kQuotaStatusUnknown; 169 quota_status_ = kQuotaStatusUnknown;
170 quota_manager_->DeleteOriginData(origin, type, 170 quota_manager_->DeleteOriginData(origin, type,
171 QuotaClient::kAllClientsMask,
171 callback_factory_.NewCallback( 172 callback_factory_.NewCallback(
172 &QuotaManagerTest::StatusCallback)); 173 &QuotaManagerTest::StatusCallback));
173 } 174 }
174 175
175 void GetAvailableSpace() { 176 void GetAvailableSpace() {
176 quota_status_ = kQuotaStatusUnknown; 177 quota_status_ = kQuotaStatusUnknown;
177 available_space_ = -1; 178 available_space_ = -1;
178 quota_manager_->GetAvailableSpace( 179 quota_manager_->GetAvailableSpace(
179 callback_factory_.NewCallback( 180 callback_factory_.NewCallback(
180 &QuotaManagerTest::DidGetAvailableSpace)); 181 &QuotaManagerTest::DidGetAvailableSpace));
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 GetPersistentHostQuota(std::string()); 1586 GetPersistentHostQuota(std::string());
1586 MessageLoop::current()->RunAllPending(); 1587 MessageLoop::current()->RunAllPending();
1587 EXPECT_EQ(kQuotaStatusOk, status()); 1588 EXPECT_EQ(kQuotaStatusOk, status());
1588 EXPECT_EQ(0, quota()); 1589 EXPECT_EQ(0, quota());
1589 1590
1590 SetPersistentHostQuota(std::string(), 10); 1591 SetPersistentHostQuota(std::string(), 10);
1591 MessageLoop::current()->RunAllPending(); 1592 MessageLoop::current()->RunAllPending();
1592 EXPECT_EQ(kQuotaErrorNotSupported, status()); 1593 EXPECT_EQ(kQuotaErrorNotSupported, status());
1593 } 1594 }
1594 } // namespace quota 1595 } // namespace quota
OLDNEW
« webkit/quota/quota_client.h ('K') | « webkit/quota/quota_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698