| 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 ++num_get_origins_completions_; | 147 ++num_get_origins_completions_; |
| 148 origins_ = origins; | 148 origins_ = origins; |
| 149 type_ = type; | 149 type_ = type; |
| 150 } | 150 } |
| 151 | 151 |
| 152 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) { | 152 void OnDeleteOriginDataComplete(quota::QuotaStatusCode status) { |
| 153 ++num_delete_origins_completions_; | 153 ++num_delete_origins_completions_; |
| 154 delete_status_ = status; | 154 delete_status_ = status; |
| 155 } | 155 } |
| 156 | 156 |
| 157 MessageLoop message_loop_; |
| 157 int64 usage_; | 158 int64 usage_; |
| 158 std::set<GURL> origins_; | 159 std::set<GURL> origins_; |
| 159 quota::StorageType type_; | 160 quota::StorageType type_; |
| 160 quota::QuotaStatusCode delete_status_; | 161 quota::QuotaStatusCode delete_status_; |
| 161 int num_get_origin_usage_completions_; | 162 int num_get_origin_usage_completions_; |
| 162 int num_get_origins_completions_; | 163 int num_get_origins_completions_; |
| 163 int num_delete_origins_completions_; | 164 int num_delete_origins_completions_; |
| 164 MockAppCacheService mock_service_; | 165 MockAppCacheService mock_service_; |
| 165 base::WeakPtrFactory<AppCacheQuotaClientTest> weak_factory_; | 166 base::WeakPtrFactory<AppCacheQuotaClientTest> weak_factory_; |
| 166 }; | 167 }; |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 // A real completion callback from the service should | 429 // A real completion callback from the service should |
| 429 // be dropped if it comes in after NotifyAppCacheDestroyed. | 430 // be dropped if it comes in after NotifyAppCacheDestroyed. |
| 430 MessageLoop::current()->RunAllPending(); | 431 MessageLoop::current()->RunAllPending(); |
| 431 EXPECT_EQ(1, num_delete_origins_completions_); | 432 EXPECT_EQ(1, num_delete_origins_completions_); |
| 432 EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_); | 433 EXPECT_EQ(quota::kQuotaErrorAbort, delete_status_); |
| 433 | 434 |
| 434 Call_OnQuotaManagerDestroyed(client); | 435 Call_OnQuotaManagerDestroyed(client); |
| 435 } | 436 } |
| 436 | 437 |
| 437 } // namespace appcache | 438 } // namespace appcache |
| OLD | NEW |