| 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 | 5 |
| 6 #include <set> | 6 #include <set> |
| 7 | 7 |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/memory/scoped_callback_factory.h" | 9 #include "base/memory/scoped_callback_factory.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 MockQuotaManager* manager() const { | 79 MockQuotaManager* manager() const { |
| 80 return manager_.get(); | 80 return manager_.get(); |
| 81 } | 81 } |
| 82 | 82 |
| 83 const std::set<GURL>& origins() const { | 83 const std::set<GURL>& origins() const { |
| 84 return origins_; | 84 return origins_; |
| 85 } | 85 } |
| 86 | 86 |
| 87 const StorageType type() const { | 87 const StorageType& type() const { |
| 88 return type_; | 88 return type_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 private: | 91 private: |
| 92 ScopedTempDir data_dir_; | 92 ScopedTempDir data_dir_; |
| 93 base::ScopedCallbackFactory<MockQuotaManagerTest> callback_factory_; | 93 base::ScopedCallbackFactory<MockQuotaManagerTest> callback_factory_; |
| 94 scoped_refptr<MockQuotaManager> manager_; | 94 scoped_refptr<MockQuotaManager> manager_; |
| 95 scoped_refptr<MockSpecialStoragePolicy> policy_; | 95 scoped_refptr<MockSpecialStoragePolicy> policy_; |
| 96 | 96 |
| 97 int deletion_callback_count_; | 97 int deletion_callback_count_; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 | 171 |
| 172 GetModifiedOrigins(kStorageTypeTemporary, now - a_minute); | 172 GetModifiedOrigins(kStorageTypeTemporary, now - a_minute); |
| 173 MessageLoop::current()->RunAllPending(); | 173 MessageLoop::current()->RunAllPending(); |
| 174 | 174 |
| 175 EXPECT_EQ(kStorageTypeTemporary, type()); | 175 EXPECT_EQ(kStorageTypeTemporary, type()); |
| 176 EXPECT_EQ(1UL, origins().size()); | 176 EXPECT_EQ(1UL, origins().size()); |
| 177 EXPECT_EQ(0UL, origins().count(kOrigin1)); | 177 EXPECT_EQ(0UL, origins().count(kOrigin1)); |
| 178 EXPECT_EQ(1UL, origins().count(kOrigin2)); | 178 EXPECT_EQ(1UL, origins().count(kOrigin2)); |
| 179 } | 179 } |
| 180 } // Namespace quota | 180 } // Namespace quota |
| OLD | NEW |