OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |