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 #ifndef WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ | 5 #ifndef WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ | 6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
11 #include <utility> | 11 #include <utility> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/memory/weak_ptr.h" |
14 #include "base/task.h" | 15 #include "base/task.h" |
15 #include "base/time.h" | 16 #include "base/time.h" |
16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
17 #include "webkit/quota/quota_client.h" | 18 #include "webkit/quota/quota_client.h" |
18 | 19 |
19 namespace quota { | 20 namespace quota { |
20 | 21 |
21 class QuotaManagerProxy; | 22 class QuotaManagerProxy; |
22 | 23 |
23 struct MockOriginData { | 24 struct MockOriginData { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 scoped_refptr<QuotaManagerProxy> quota_manager_proxy_; | 75 scoped_refptr<QuotaManagerProxy> quota_manager_proxy_; |
75 const ID id_; | 76 const ID id_; |
76 | 77 |
77 typedef std::map<std::pair<GURL, StorageType>, int64> OriginDataMap; | 78 typedef std::map<std::pair<GURL, StorageType>, int64> OriginDataMap; |
78 OriginDataMap origin_data_; | 79 OriginDataMap origin_data_; |
79 typedef std::set<std::pair<GURL, StorageType> > ErrorOriginSet; | 80 typedef std::set<std::pair<GURL, StorageType> > ErrorOriginSet; |
80 ErrorOriginSet error_origins_; | 81 ErrorOriginSet error_origins_; |
81 | 82 |
82 int mock_time_counter_; | 83 int mock_time_counter_; |
83 | 84 |
84 ScopedRunnableMethodFactory<MockStorageClient> runnable_factory_; | 85 base::WeakPtrFactory<MockStorageClient> weak_factory_; |
85 | 86 |
86 DISALLOW_COPY_AND_ASSIGN(MockStorageClient); | 87 DISALLOW_COPY_AND_ASSIGN(MockStorageClient); |
87 }; | 88 }; |
88 | 89 |
89 } // namespace quota | 90 } // namespace quota |
90 | 91 |
91 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ | 92 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ |
OLD | NEW |