| 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_APPCACHE_MOCK_APPCACHE_SERVICE_H_ | 5 #ifndef CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ |
| 6 #define CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ | 6 #define CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "content/browser/appcache/appcache_service_impl.h" |
| 9 #include "content/browser/appcache/mock_appcache_storage.h" | 10 #include "content/browser/appcache/mock_appcache_storage.h" |
| 10 #include "webkit/browser/appcache/appcache_service_impl.h" | |
| 11 #include "webkit/browser/quota/quota_manager.h" | 11 #include "webkit/browser/quota/quota_manager.h" |
| 12 | 12 |
| 13 using appcache::AppCacheServiceImpl; | |
| 14 | |
| 15 namespace content { | 13 namespace content { |
| 16 | 14 |
| 17 // For use by unit tests. | 15 // For use by unit tests. |
| 18 class MockAppCacheService : public AppCacheServiceImpl { | 16 class MockAppCacheService : public AppCacheServiceImpl { |
| 19 public: | 17 public: |
| 20 MockAppCacheService() | 18 MockAppCacheService() |
| 21 : AppCacheServiceImpl(NULL), | 19 : AppCacheServiceImpl(NULL), |
| 22 mock_delete_appcaches_for_origin_result_(net::OK), | 20 mock_delete_appcaches_for_origin_result_(net::OK), |
| 23 delete_called_count_(0) { | 21 delete_called_count_(0) { |
| 24 storage_.reset(new MockAppCacheStorage(this)); | 22 storage_.reset(new MockAppCacheStorage(this)); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 41 int delete_called_count() const { return delete_called_count_; } | 39 int delete_called_count() const { return delete_called_count_; } |
| 42 | 40 |
| 43 private: | 41 private: |
| 44 int mock_delete_appcaches_for_origin_result_; | 42 int mock_delete_appcaches_for_origin_result_; |
| 45 int delete_called_count_; | 43 int delete_called_count_; |
| 46 }; | 44 }; |
| 47 | 45 |
| 48 } // namespace content | 46 } // namespace content |
| 49 | 47 |
| 50 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ | 48 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ |
| OLD | NEW |