OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ | 5 #ifndef CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ |
6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ | 6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ |
7 | 7 |
8 #include "content/browser/quota/mock_quota_manager.h" | 8 #include "content/browser/quota/mock_quota_manager.h" |
9 #include "storage/browser/quota/quota_client.h" | 9 #include "storage/browser/quota/quota_client.h" |
10 #include "storage/browser/quota/quota_manager_proxy.h" | 10 #include "storage/browser/quota/quota_manager_proxy.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 const GURL& origin, | 48 const GURL& origin, |
49 StorageType type) override; | 49 StorageType type) override; |
50 | 50 |
51 // Records the |origin|, |type| and |delta| as last_notified_origin_, | 51 // Records the |origin|, |type| and |delta| as last_notified_origin_, |
52 // last_notified_type_ and last_notified_delta_ respecitvely. | 52 // last_notified_type_ and last_notified_delta_ respecitvely. |
53 // If non-null MockQuotaManager is given to the constructor this also | 53 // If non-null MockQuotaManager is given to the constructor this also |
54 // updates the manager's internal usage information. | 54 // updates the manager's internal usage information. |
55 void NotifyStorageModified(QuotaClient::ID client_id, | 55 void NotifyStorageModified(QuotaClient::ID client_id, |
56 const GURL& origin, | 56 const GURL& origin, |
57 StorageType type, | 57 StorageType type, |
58 int64 delta) override; | 58 int64_t delta) override; |
59 | 59 |
60 int notify_storage_accessed_count() const { return storage_accessed_count_; } | 60 int notify_storage_accessed_count() const { return storage_accessed_count_; } |
61 int notify_storage_modified_count() const { return storage_modified_count_; } | 61 int notify_storage_modified_count() const { return storage_modified_count_; } |
62 GURL last_notified_origin() const { return last_notified_origin_; } | 62 GURL last_notified_origin() const { return last_notified_origin_; } |
63 StorageType last_notified_type() const { return last_notified_type_; } | 63 StorageType last_notified_type() const { return last_notified_type_; } |
64 int64 last_notified_delta() const { return last_notified_delta_; } | 64 int64_t last_notified_delta() const { return last_notified_delta_; } |
65 | 65 |
66 protected: | 66 protected: |
67 ~MockQuotaManagerProxy() override; | 67 ~MockQuotaManagerProxy() override; |
68 | 68 |
69 private: | 69 private: |
70 MockQuotaManager* mock_manager() const { | 70 MockQuotaManager* mock_manager() const { |
71 return static_cast<MockQuotaManager*>(quota_manager()); | 71 return static_cast<MockQuotaManager*>(quota_manager()); |
72 } | 72 } |
73 | 73 |
74 int storage_accessed_count_; | 74 int storage_accessed_count_; |
75 int storage_modified_count_; | 75 int storage_modified_count_; |
76 GURL last_notified_origin_; | 76 GURL last_notified_origin_; |
77 StorageType last_notified_type_; | 77 StorageType last_notified_type_; |
78 int64 last_notified_delta_; | 78 int64_t last_notified_delta_; |
79 | 79 |
80 QuotaClient* registered_client_; | 80 QuotaClient* registered_client_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(MockQuotaManagerProxy); | 82 DISALLOW_COPY_AND_ASSIGN(MockQuotaManagerProxy); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace content | 85 } // namespace content |
86 | 86 |
87 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ | 87 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_PROXY_H_ |
OLD | NEW |