| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "net/url_request/url_request.h" | 9 #include "net/url_request/url_request.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 // Not needed for our tests. | 96 // Not needed for our tests. |
| 97 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {} | 97 virtual void RegisterClient(quota::QuotaClient* client) OVERRIDE {} |
| 98 virtual void NotifyStorageAccessed(quota::QuotaClient::ID client_id, | 98 virtual void NotifyStorageAccessed(quota::QuotaClient::ID client_id, |
| 99 const GURL& origin, | 99 const GURL& origin, |
| 100 quota::StorageType type) OVERRIDE {} | 100 quota::StorageType type) OVERRIDE {} |
| 101 virtual void NotifyStorageModified(quota::QuotaClient::ID client_id, | 101 virtual void NotifyStorageModified(quota::QuotaClient::ID client_id, |
| 102 const GURL& origin, | 102 const GURL& origin, |
| 103 quota::StorageType type, | 103 quota::StorageType type, |
| 104 int64 delta) OVERRIDE {} | 104 int64 delta) OVERRIDE {} |
| 105 virtual void SetUsageCacheEnabled(quota::QuotaClient::ID client_id, |
| 106 const GURL& origin, |
| 107 quota::StorageType type, |
| 108 bool enabled) OVERRIDE {} |
| 109 virtual void GetUsageAndQuota( |
| 110 base::SingleThreadTaskRunner* original_task_runner, |
| 111 const GURL& origin, |
| 112 quota::StorageType type, |
| 113 const GetUsageAndQuotaCallback& callback) OVERRIDE {} |
| 105 | 114 |
| 106 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE { | 115 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE { |
| 107 inuse_[origin] += 1; | 116 inuse_[origin] += 1; |
| 108 } | 117 } |
| 109 | 118 |
| 110 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE { | 119 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE { |
| 111 inuse_[origin] -= 1; | 120 inuse_[origin] -= 1; |
| 112 } | 121 } |
| 113 | 122 |
| 114 int GetInUseCount(const GURL& origin) { | 123 int GetInUseCount(const GURL& origin) { |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 EXPECT_EQ(&mock_frontend_, host.frontend()); | 530 EXPECT_EQ(&mock_frontend_, host.frontend()); |
| 522 EXPECT_EQ(NULL, host.associated_cache()); | 531 EXPECT_EQ(NULL, host.associated_cache()); |
| 523 EXPECT_FALSE(host.is_selection_pending()); | 532 EXPECT_FALSE(host.is_selection_pending()); |
| 524 EXPECT_TRUE(host.preferred_manifest_url().is_empty()); | 533 EXPECT_TRUE(host.preferred_manifest_url().is_empty()); |
| 525 } | 534 } |
| 526 EXPECT_EQ(0, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl)); | 535 EXPECT_EQ(0, mock_quota_proxy->GetInUseCount(kDocAndOriginUrl)); |
| 527 service_.set_quota_manager_proxy(NULL); | 536 service_.set_quota_manager_proxy(NULL); |
| 528 } | 537 } |
| 529 | 538 |
| 530 } // namespace appcache | 539 } // namespace appcache |
| OLD | NEW |