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

Side by Side Diff: webkit/appcache/mock_appcache_storage.h

Issue 7210006: AppCaches which belong to hosted apps are not protected from deletion (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Clearing appcaches & waiting in Shutdown(). Created 9 years, 5 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
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 WEBKIT_APPCACHE_MOCK_APPCACHE_STORAGE_H_ 5 #ifndef WEBKIT_APPCACHE_MOCK_APPCACHE_STORAGE_H_
6 #define WEBKIT_APPCACHE_MOCK_APPCACHE_STORAGE_H_ 6 #define WEBKIT_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>
11 11
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/hash_tables.h" 13 #include "base/hash_tables.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/task.h" 15 #include "base/task.h"
16 #include "webkit/appcache/appcache.h" 16 #include "webkit/appcache/appcache.h"
17 #include "webkit/appcache/appcache_disk_cache.h" 17 #include "webkit/appcache/appcache_disk_cache.h"
18 #include "webkit/appcache/appcache_group.h" 18 #include "webkit/appcache/appcache_group.h"
19 #include "webkit/appcache/appcache_storage.h" 19 #include "webkit/appcache/appcache_storage.h"
20 20
21 namespace browsing_data_remover_test {
22 void AddGroupAndCache(ChromeAppCacheService* appcache_service,
23 const GURL& manifest_url);
24 }
25
21 namespace appcache { 26 namespace appcache {
22 27
23 // For use in unit tests. 28 // For use in unit tests.
24 // Note: This class is also being used to bootstrap our development efforts. 29 // Note: This class is also being used to bootstrap our development efforts.
25 // We can get layout tests up and running, and back fill with real storage 30 // We can get layout tests up and running, and back fill with real storage
26 // somewhat in parallel. 31 // somewhat in parallel.
27 class MockAppCacheStorage : public AppCacheStorage { 32 class MockAppCacheStorage : public AppCacheStorage {
28 public: 33 public:
29 explicit MockAppCacheStorage(AppCacheService* service); 34 explicit MockAppCacheStorage(AppCacheService* service);
30 virtual ~MockAppCacheStorage(); 35 virtual ~MockAppCacheStorage();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, 183 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest,
179 FindMainResponseWithMultipleCandidates); 184 FindMainResponseWithMultipleCandidates);
180 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, LoadCache_FarHit); 185 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, LoadCache_FarHit);
181 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, LoadGroupAndCache_FarHit); 186 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, LoadGroupAndCache_FarHit);
182 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, MakeGroupObsolete); 187 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, MakeGroupObsolete);
183 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, StoreNewGroup); 188 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, StoreNewGroup);
184 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, StoreExistingGroup); 189 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, StoreExistingGroup);
185 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest, 190 FRIEND_TEST_ALL_PREFIXES(MockAppCacheStorageTest,
186 StoreExistingGroupExistingCache); 191 StoreExistingGroupExistingCache);
187 FRIEND_TEST_ALL_PREFIXES(AppCacheServiceTest, DeleteAppCachesForOrigin); 192 FRIEND_TEST_ALL_PREFIXES(AppCacheServiceTest, DeleteAppCachesForOrigin);
193 friend void browsing_data_remover_test::AddGroupAndCache(
194 ChromeAppCacheService* appcache_service, const GURL& manifest_url);
188 195
189 DISALLOW_COPY_AND_ASSIGN(MockAppCacheStorage); 196 DISALLOW_COPY_AND_ASSIGN(MockAppCacheStorage);
190 }; 197 };
191 198
192 } // namespace appcache 199 } // namespace appcache
193 200
194 #endif // WEBKIT_APPCACHE_MOCK_APPCACHE_STORAGE_H_ 201 #endif // WEBKIT_APPCACHE_MOCK_APPCACHE_STORAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698