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/appcache_service_impl.h" |
10 #include "content/browser/appcache/mock_appcache_storage.h" | 10 #include "content/browser/appcache/mock_appcache_storage.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 delete_called_count_(0) { | 21 delete_called_count_(0) { |
22 storage_.reset(new MockAppCacheStorage(this)); | 22 storage_.reset(new MockAppCacheStorage(this)); |
23 } | 23 } |
24 | 24 |
25 // Just returns a canned completion code without actually | 25 // Just returns a canned completion code without actually |
26 // removing groups and caches in our mock storage instance. | 26 // removing groups and caches in our mock storage instance. |
27 virtual void DeleteAppCachesForOrigin( | 27 virtual void DeleteAppCachesForOrigin( |
28 const GURL& origin, | 28 const GURL& origin, |
29 const net::CompletionCallback& callback) OVERRIDE; | 29 const net::CompletionCallback& callback) OVERRIDE; |
30 | 30 |
31 void set_quota_manager_proxy(quota::QuotaManagerProxy* proxy) { | 31 void set_quota_manager_proxy(storage::QuotaManagerProxy* proxy) { |
32 quota_manager_proxy_ = proxy; | 32 quota_manager_proxy_ = proxy; |
33 } | 33 } |
34 | 34 |
35 void set_mock_delete_appcaches_for_origin_result(int rv) { | 35 void set_mock_delete_appcaches_for_origin_result(int rv) { |
36 mock_delete_appcaches_for_origin_result_ = rv; | 36 mock_delete_appcaches_for_origin_result_ = rv; |
37 } | 37 } |
38 | 38 |
39 int delete_called_count() const { return delete_called_count_; } | 39 int delete_called_count() const { return delete_called_count_; } |
40 | 40 |
41 private: | 41 private: |
42 int mock_delete_appcaches_for_origin_result_; | 42 int mock_delete_appcaches_for_origin_result_; |
43 int delete_called_count_; | 43 int delete_called_count_; |
44 }; | 44 }; |
45 | 45 |
46 } // namespace content | 46 } // namespace content |
47 | 47 |
48 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ | 48 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_SERVICE_H_ |
OLD | NEW |