| 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 #include "content/browser/quota/mock_quota_manager_proxy.h" | 5 #include "content/browser/quota/mock_quota_manager_proxy.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
| 9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 } | 37 } |
| 38 | 38 |
| 39 void MockQuotaManagerProxy::NotifyStorageAccessed( | 39 void MockQuotaManagerProxy::NotifyStorageAccessed( |
| 40 QuotaClient::ID client_id, const GURL& origin, StorageType type) { | 40 QuotaClient::ID client_id, const GURL& origin, StorageType type) { |
| 41 ++storage_accessed_count_; | 41 ++storage_accessed_count_; |
| 42 last_notified_origin_ = origin; | 42 last_notified_origin_ = origin; |
| 43 last_notified_type_ = type; | 43 last_notified_type_ = type; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void MockQuotaManagerProxy::NotifyStorageModified( | 46 void MockQuotaManagerProxy::NotifyStorageModified(QuotaClient::ID client_id, |
| 47 QuotaClient::ID client_id, const GURL& origin, | 47 const GURL& origin, |
| 48 StorageType type, int64 delta) { | 48 StorageType type, |
| 49 int64_t delta) { |
| 49 ++storage_modified_count_; | 50 ++storage_modified_count_; |
| 50 last_notified_origin_ = origin; | 51 last_notified_origin_ = origin; |
| 51 last_notified_type_ = type; | 52 last_notified_type_ = type; |
| 52 last_notified_delta_ = delta; | 53 last_notified_delta_ = delta; |
| 53 if (mock_manager()) | 54 if (mock_manager()) |
| 54 mock_manager()->UpdateUsage(origin, type, delta); | 55 mock_manager()->UpdateUsage(origin, type, delta); |
| 55 } | 56 } |
| 56 | 57 |
| 57 MockQuotaManagerProxy::~MockQuotaManagerProxy() { | 58 MockQuotaManagerProxy::~MockQuotaManagerProxy() { |
| 58 DCHECK(!registered_client_); | 59 DCHECK(!registered_client_); |
| 59 } | 60 } |
| 60 | 61 |
| 61 } // namespace content | 62 } // namespace content |
| OLD | NEW |