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

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

Issue 546663003: Remove Clone() from CannedBrowsingData*Helper classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/browsing_data/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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_BROWSING_DATA_APPCACHE_HELPER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_APPCACHE_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_APPCACHE_HELPER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_APPCACHE_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper); 53 DISALLOW_COPY_AND_ASSIGN(BrowsingDataAppCacheHelper);
54 }; 54 };
55 55
56 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not 56 // This class is a thin wrapper around BrowsingDataAppCacheHelper that does not
57 // fetch its information from the appcache service, but gets them passed as 57 // fetch its information from the appcache service, but gets them passed as
58 // a parameter during construction. 58 // a parameter during construction.
59 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper { 59 class CannedBrowsingDataAppCacheHelper : public BrowsingDataAppCacheHelper {
60 public: 60 public:
61 explicit CannedBrowsingDataAppCacheHelper(Profile* profile); 61 explicit CannedBrowsingDataAppCacheHelper(Profile* profile);
62 62
63 // Return a copy of the appcache helper. Only one consumer can use the
64 // StartFetching method at a time, so we need to create a copy of the helper
65 // every time we instantiate a cookies tree model for it.
66 CannedBrowsingDataAppCacheHelper* Clone();
67
68 // Add an appcache to the set of canned caches that is returned by this 63 // Add an appcache to the set of canned caches that is returned by this
69 // helper. 64 // helper.
70 void AddAppCache(const GURL& manifest_url); 65 void AddAppCache(const GURL& manifest_url);
71 66
72 // Clears the list of canned caches. 67 // Clears the list of canned caches.
73 void Reset(); 68 void Reset();
74 69
75 // True if no appcaches are currently stored. 70 // True if no appcaches are currently stored.
76 bool empty() const; 71 bool empty() const;
77 72
78 // Returns the number of app cache resources. 73 // Returns the number of app cache resources.
79 size_t GetAppCacheCount() const; 74 size_t GetAppCacheCount() const;
80 75
81 // Returns a current map with the |AppCacheInfoVector|s per origin. 76 // Returns a current map with the |AppCacheInfoVector|s per origin.
82 const OriginAppCacheInfoMap& GetOriginAppCacheInfoMap() const; 77 const OriginAppCacheInfoMap& GetOriginAppCacheInfoMap() const;
83 78
84 // BrowsingDataAppCacheHelper methods. 79 // BrowsingDataAppCacheHelper methods.
85 virtual void StartFetching(const base::Closure& completion_callback) OVERRIDE; 80 virtual void StartFetching(const base::Closure& completion_callback) OVERRIDE;
86 virtual void DeleteAppCacheGroup(const GURL& manifest_url) OVERRIDE; 81 virtual void DeleteAppCacheGroup(const GURL& manifest_url) OVERRIDE;
87 82
88 private: 83 private:
89 virtual ~CannedBrowsingDataAppCacheHelper(); 84 virtual ~CannedBrowsingDataAppCacheHelper();
90 85
91 Profile* profile_;
92
93 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper); 86 DISALLOW_COPY_AND_ASSIGN(CannedBrowsingDataAppCacheHelper);
94 }; 87 };
95 88
96 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_APPCACHE_HELPER_H_ 89 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_APPCACHE_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_appcache_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698