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

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

Issue 6670033: Use copies of canned browsing data helpers to populate the cookies tree model. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months 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) 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper); 49 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper);
50 }; 50 };
51 51
52 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not 52 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not
53 // fetch its information from the appcache service, but gets them passed as 53 // fetch its information from the appcache service, but gets them passed as
54 // a parameter during construction. 54 // a parameter during construction.
55 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper { 55 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
56 public: 56 public:
57 explicit CannedBrowsingDataAppCacheHelper(Profile* profile); 57 explicit CannedBrowsingDataAppCacheHelper(Profile* profile);
58 58
59 // Return a copy of the appcache helper. Only one consumer can use the
60 // StartFetching method at a time, so we need to create a copy of the helper
61 // everytime we instantiate a cookies tree model for it.
62 CannedBrowsingDataAppCacheHelper* Clone();
63
59 // Add an appcache to the set of canned caches that is returned by this 64 // Add an appcache to the set of canned caches that is returned by this
60 // helper. 65 // helper.
61 void AddAppCache(const GURL& manifest_url); 66 void AddAppCache(const GURL& manifest_url);
62 67
63 // Clears the list of canned caches. 68 // Clears the list of canned caches.
64 void Reset(); 69 void Reset();
65 70
66 // True if no appcaches are currently stored. 71 // True if no appcaches are currently stored.
67 bool empty() const; 72 bool empty() const;
68 73
69 // BrowsingDataAppCacheHelper methods. 74 // BrowsingDataAppCacheHelper methods.
70 virtual void StartFetching(Callback0::Type* completion_callback); 75 virtual void StartFetching(Callback0::Type* completion_callback);
71 virtual void CancelNotification() {} 76 virtual void CancelNotification() {}
72 77
73 private: 78 private:
74 virtual ~CannedBrowsingDataAppCacheHelper(); 79 virtual ~CannedBrowsingDataAppCacheHelper();
75 80
81 Profile* profile_;
82
76 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); 83 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper);
77 }; 84 };
78 85
79 #endif // CHROME_BROWSER_BROWSING_DATA_APPCACHE_HELPER_H_ 86 #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