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 "webkit/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 |
11 namespace quota { | 11 using quota::kStorageTypeUnknown; |
| 12 |
| 13 namespace content { |
12 | 14 |
13 MockQuotaManagerProxy::MockQuotaManagerProxy( | 15 MockQuotaManagerProxy::MockQuotaManagerProxy( |
14 MockQuotaManager* quota_manager, | 16 MockQuotaManager* quota_manager, |
15 base::SingleThreadTaskRunner* task_runner) | 17 base::SingleThreadTaskRunner* task_runner) |
16 : QuotaManagerProxy(quota_manager, task_runner), | 18 : QuotaManagerProxy(quota_manager, task_runner), |
17 storage_accessed_count_(0), | 19 storage_accessed_count_(0), |
18 storage_modified_count_(0), | 20 storage_modified_count_(0), |
19 last_notified_type_(kStorageTypeUnknown), | 21 last_notified_type_(kStorageTypeUnknown), |
20 last_notified_delta_(0), | 22 last_notified_delta_(0), |
21 registered_client_(NULL) {} | 23 registered_client_(NULL) {} |
(...skipping 27 matching lines...) Expand all Loading... |
49 last_notified_type_ = type; | 51 last_notified_type_ = type; |
50 last_notified_delta_ = delta; | 52 last_notified_delta_ = delta; |
51 if (mock_manager()) | 53 if (mock_manager()) |
52 mock_manager()->UpdateUsage(origin, type, delta); | 54 mock_manager()->UpdateUsage(origin, type, delta); |
53 } | 55 } |
54 | 56 |
55 MockQuotaManagerProxy::~MockQuotaManagerProxy() { | 57 MockQuotaManagerProxy::~MockQuotaManagerProxy() { |
56 DCHECK(!registered_client_); | 58 DCHECK(!registered_client_); |
57 } | 59 } |
58 | 60 |
59 } // namespace quota | 61 } // namespace content |
OLD | NEW |