| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ |
| 6 #define CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ | 6 #define CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual void CancelNotification(); | 25 virtual void CancelNotification(); |
| 26 virtual void DeleteAppCacheGroup(const GURL& manifest_url); | 26 virtual void DeleteAppCacheGroup(const GURL& manifest_url); |
| 27 | 27 |
| 28 appcache::AppCacheInfoCollection* info_collection() const { | 28 appcache::AppCacheInfoCollection* info_collection() const { |
| 29 DCHECK(!is_fetching_); | 29 DCHECK(!is_fetching_); |
| 30 return info_collection_; | 30 return info_collection_; |
| 31 } | 31 } |
| 32 | 32 |
| 33 protected: | 33 protected: |
| 34 friend class base::RefCountedThreadSafe<BrowsingDataAppCacheHelper>; | 34 friend class base::RefCountedThreadSafe<BrowsingDataAppCacheHelper>; |
| 35 virtual ~BrowsingDataAppCacheHelper() {} | 35 virtual ~BrowsingDataAppCacheHelper(); |
| 36 | 36 |
| 37 scoped_ptr<Callback0::Type> completion_callback_; | 37 scoped_ptr<Callback0::Type> completion_callback_; |
| 38 scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; | 38 scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 void OnFetchComplete(int rv); | 41 void OnFetchComplete(int rv); |
| 42 ChromeAppCacheService* GetAppCacheService(); | 42 ChromeAppCacheService* GetAppCacheService(); |
| 43 | 43 |
| 44 scoped_refptr<URLRequestContextGetter> request_context_getter_; | 44 scoped_refptr<URLRequestContextGetter> request_context_getter_; |
| 45 bool is_fetching_; | 45 bool is_fetching_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 64 void Reset(); | 64 void Reset(); |
| 65 | 65 |
| 66 // True if no appcaches are currently stored. | 66 // True if no appcaches are currently stored. |
| 67 bool empty() const; | 67 bool empty() const; |
| 68 | 68 |
| 69 // BrowsingDataAppCacheHelper methods. | 69 // BrowsingDataAppCacheHelper methods. |
| 70 virtual void StartFetching(Callback0::Type* completion_callback); | 70 virtual void StartFetching(Callback0::Type* completion_callback); |
| 71 virtual void CancelNotification() {} | 71 virtual void CancelNotification() {} |
| 72 | 72 |
| 73 private: | 73 private: |
| 74 virtual ~CannedBrowsingDataAppCacheHelper() {} | 74 virtual ~CannedBrowsingDataAppCacheHelper(); |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); | 76 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ | 79 #endif // CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ |
| OLD | NEW |