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

Side by Side Diff: content/browser/appcache/mock_appcache_storage.h

Issue 667943003: Standardize usage of virtual/override/final in content/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
OLDNEW
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_STORAGE_H_ 5 #ifndef CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_
6 #define CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_ 6 #define CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 class AppCacheServiceImplTest; 40 class AppCacheServiceImplTest;
41 class MockAppCacheStorageTest; 41 class MockAppCacheStorageTest;
42 42
43 // For use in unit tests. 43 // For use in unit tests.
44 // Note: This class is also being used to bootstrap our development efforts. 44 // Note: This class is also being used to bootstrap our development efforts.
45 // We can get layout tests up and running, and back fill with real storage 45 // We can get layout tests up and running, and back fill with real storage
46 // somewhat in parallel. 46 // somewhat in parallel.
47 class MockAppCacheStorage : public AppCacheStorage { 47 class MockAppCacheStorage : public AppCacheStorage {
48 public: 48 public:
49 explicit MockAppCacheStorage(AppCacheServiceImpl* service); 49 explicit MockAppCacheStorage(AppCacheServiceImpl* service);
50 virtual ~MockAppCacheStorage(); 50 ~MockAppCacheStorage() override;
51 51
52 virtual void GetAllInfo(Delegate* delegate) override; 52 void GetAllInfo(Delegate* delegate) override;
53 virtual void LoadCache(int64 id, Delegate* delegate) override; 53 void LoadCache(int64 id, Delegate* delegate) override;
54 virtual void LoadOrCreateGroup(const GURL& manifest_url, 54 void LoadOrCreateGroup(const GURL& manifest_url, Delegate* delegate) override;
55 Delegate* delegate) override; 55 void StoreGroupAndNewestCache(AppCacheGroup* group,
56 virtual void StoreGroupAndNewestCache(AppCacheGroup* group, 56 AppCache* newest_cache,
57 AppCache* newest_cache, 57 Delegate* delegate) override;
58 Delegate* delegate) override; 58 void FindResponseForMainRequest(const GURL& url,
59 virtual void FindResponseForMainRequest(const GURL& url, 59 const GURL& preferred_manifest_url,
60 const GURL& preferred_manifest_url, 60 Delegate* delegate) override;
61 Delegate* delegate) override; 61 void FindResponseForSubRequest(AppCache* cache,
62 virtual void FindResponseForSubRequest( 62 const GURL& url,
63 AppCache* cache, const GURL& url, 63 AppCacheEntry* found_entry,
64 AppCacheEntry* found_entry, AppCacheEntry* found_fallback_entry, 64 AppCacheEntry* found_fallback_entry,
65 bool * found_network_namespace) override; 65 bool* found_network_namespace) override;
66 virtual void MarkEntryAsForeign(const GURL& entry_url, 66 void MarkEntryAsForeign(const GURL& entry_url, int64 cache_id) override;
67 int64 cache_id) override; 67 void MakeGroupObsolete(AppCacheGroup* group,
68 virtual void MakeGroupObsolete(AppCacheGroup* group, 68 Delegate* delegate,
69 Delegate* delegate, 69 int response_code) override;
70 int response_code) override; 70 AppCacheResponseReader* CreateResponseReader(const GURL& manifest_url,
71 virtual AppCacheResponseReader* CreateResponseReader( 71 int64 group_id,
72 const GURL& manifest_url, int64 group_id, int64 response_id) override; 72 int64 response_id) override;
73 virtual AppCacheResponseWriter* CreateResponseWriter( 73 AppCacheResponseWriter* CreateResponseWriter(const GURL& manifest_url,
74 const GURL& manifest_url, int64 group_id) override; 74 int64 group_id) override;
75 virtual void DoomResponses( 75 void DoomResponses(const GURL& manifest_url,
76 const GURL& manifest_url, 76 const std::vector<int64>& response_ids) override;
77 const std::vector<int64>& response_ids) override; 77 void DeleteResponses(const GURL& manifest_url,
78 virtual void DeleteResponses( 78 const std::vector<int64>& response_ids) override;
79 const GURL& manifest_url,
80 const std::vector<int64>& response_ids) override;
81 79
82 private: 80 private:
83 friend class AppCacheRequestHandlerTest; 81 friend class AppCacheRequestHandlerTest;
84 friend class AppCacheServiceImplTest; 82 friend class AppCacheServiceImplTest;
85 friend class AppCacheUpdateJobTest; 83 friend class AppCacheUpdateJobTest;
86 friend class MockAppCacheStorageTest; 84 friend class MockAppCacheStorageTest;
87 85
88 typedef base::hash_map<int64, scoped_refptr<AppCache> > StoredCacheMap; 86 typedef base::hash_map<int64, scoped_refptr<AppCache> > StoredCacheMap;
89 typedef std::map<GURL, scoped_refptr<AppCacheGroup> > StoredGroupMap; 87 typedef std::map<GURL, scoped_refptr<AppCacheGroup> > StoredGroupMap;
90 typedef std::set<int64> DoomedResponseIds; 88 typedef std::set<int64> DoomedResponseIds;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 StoreExistingGroupExistingCache); 232 StoreExistingGroupExistingCache);
235 FRIEND_TEST_ALL_PREFIXES(AppCacheServiceImplTest, 233 FRIEND_TEST_ALL_PREFIXES(AppCacheServiceImplTest,
236 DeleteAppCachesForOrigin); 234 DeleteAppCachesForOrigin);
237 235
238 DISALLOW_COPY_AND_ASSIGN(MockAppCacheStorage); 236 DISALLOW_COPY_AND_ASSIGN(MockAppCacheStorage);
239 }; 237 };
240 238
241 } // namespace content 239 } // namespace content
242 240
243 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_ 241 #endif // CONTENT_BROWSER_APPCACHE_MOCK_APPCACHE_STORAGE_H_
OLDNEW
« no previous file with comments | « content/browser/appcache/mock_appcache_service.h ('k') | content/browser/appcache/mock_appcache_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698