| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/quota/mock_quota_manager.h" | 5 #include "webkit/quota/mock_quota_manager.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 MockQuotaManager::OriginInfo::~OriginInfo() {} | 30 MockQuotaManager::OriginInfo::~OriginInfo() {} |
| 31 | 31 |
| 32 MockQuotaManager::StorageInfo::StorageInfo() : usage(0), quota(kint64max) {} | 32 MockQuotaManager::StorageInfo::StorageInfo() : usage(0), quota(kint64max) {} |
| 33 MockQuotaManager::StorageInfo::~StorageInfo() {} | 33 MockQuotaManager::StorageInfo::~StorageInfo() {} |
| 34 | 34 |
| 35 // MockQuotaManager ---------------------------------------------------------- | 35 // MockQuotaManager ---------------------------------------------------------- |
| 36 | 36 |
| 37 MockQuotaManager::MockQuotaManager( | 37 MockQuotaManager::MockQuotaManager( |
| 38 bool is_incognito, | 38 bool is_incognito, |
| 39 const FilePath& profile_path, | 39 const base::FilePath& profile_path, |
| 40 base::SingleThreadTaskRunner* io_thread, | 40 base::SingleThreadTaskRunner* io_thread, |
| 41 base::SequencedTaskRunner* db_thread, | 41 base::SequencedTaskRunner* db_thread, |
| 42 SpecialStoragePolicy* special_storage_policy) | 42 SpecialStoragePolicy* special_storage_policy) |
| 43 : QuotaManager(is_incognito, profile_path, io_thread, db_thread, | 43 : QuotaManager(is_incognito, profile_path, io_thread, db_thread, |
| 44 special_storage_policy), | 44 special_storage_policy), |
| 45 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 45 weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 46 } | 46 } |
| 47 | 47 |
| 48 void MockQuotaManager::GetUsageAndQuota( | 48 void MockQuotaManager::GetUsageAndQuota( |
| 49 const GURL& origin, | 49 const GURL& origin, |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 last_notified_delta_ = delta; | 190 last_notified_delta_ = delta; |
| 191 if (mock_manager()) | 191 if (mock_manager()) |
| 192 mock_manager()->UpdateUsage(origin, type, delta); | 192 mock_manager()->UpdateUsage(origin, type, delta); |
| 193 } | 193 } |
| 194 | 194 |
| 195 MockQuotaManagerProxy::~MockQuotaManagerProxy() { | 195 MockQuotaManagerProxy::~MockQuotaManagerProxy() { |
| 196 DCHECK(!registered_client_); | 196 DCHECK(!registered_client_); |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace quota | 199 } // namespace quota |
| OLD | NEW |