Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Side by Side Diff: chrome/browser/browsing_data_appcache_helper.h

Issue 8776024: base::Bind: Convert AppCacheService::GetAllAppCacheInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browsing_data_appcache_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/appcache/chrome_appcache_service.h" 11 #include "content/browser/appcache/chrome_appcache_service.h"
12 #include "net/base/completion_callback.h"
12 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
13 14
14 class Profile; 15 class Profile;
15 16
16 // This class fetches appcache information on behalf of a caller 17 // This class fetches appcache information on behalf of a caller
17 // on the UI thread. 18 // on the UI thread.
18 class BrowsingDataAppCacheHelper 19 class BrowsingDataAppCacheHelper
19 : public base::RefCountedThreadSafe<BrowsingDataAppCacheHelper> { 20 : public base::RefCountedThreadSafe<BrowsingDataAppCacheHelper> {
20 public: 21 public:
21 explicit BrowsingDataAppCacheHelper(Profile* profile); 22 explicit BrowsingDataAppCacheHelper(Profile* profile);
(...skipping 12 matching lines...) Expand all
34 virtual ~BrowsingDataAppCacheHelper(); 35 virtual ~BrowsingDataAppCacheHelper();
35 36
36 base::Closure completion_callback_; 37 base::Closure completion_callback_;
37 scoped_refptr<appcache::AppCacheInfoCollection> info_collection_; 38 scoped_refptr<appcache::AppCacheInfoCollection> info_collection_;
38 39
39 private: 40 private:
40 void OnFetchComplete(int rv); 41 void OnFetchComplete(int rv);
41 42
42 bool is_fetching_; 43 bool is_fetching_;
43 scoped_refptr<ChromeAppCacheService> appcache_service_; 44 scoped_refptr<ChromeAppCacheService> appcache_service_;
44 scoped_refptr<net::CancelableOldCompletionCallback<BrowsingDataAppCacheHelper> > 45 net::CancelableCompletionCallback appcache_info_callback_;
45 appcache_info_callback_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper); 47 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper);
48 }; 48 };
49 49
50 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not 50 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not
51 // fetch its information from the appcache service, but gets them passed as 51 // fetch its information from the appcache service, but gets them passed as
52 // a parameter during construction. 52 // a parameter during construction.
53 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper { 53 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
54 public: 54 public:
55 explicit CannedBrowsingDataAppCacheHelper(Profile* profile); 55 explicit CannedBrowsingDataAppCacheHelper(Profile* profile);
(...skipping 19 matching lines...) Expand all
75 75
76 private: 76 private:
77 virtual ~CannedBrowsingDataAppCacheHelper(); 77 virtual ~CannedBrowsingDataAppCacheHelper();
78 78
79 Profile* profile_; 79 Profile* profile_;
80 80
81 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); 81 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper);
82 }; 82 };
83 83
84 #endif // CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ 84 #endif // CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data_appcache_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698