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

Side by Side Diff: webkit/browser/appcache/appcache_storage.h

Issue 214233005: Move mock_quota_manager and friends from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 8 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 | « content/content_tests.gypi ('k') | webkit/browser/appcache/appcache_storage_unittest.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 WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ 5 #ifndef WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_
6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ 6 #define WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 13 #include "base/gtest_prod_util.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "webkit/browser/appcache/appcache_working_set.h" 17 #include "webkit/browser/appcache/appcache_working_set.h"
18 #include "webkit/browser/webkit_storage_browser_export.h" 18 #include "webkit/browser/webkit_storage_browser_export.h"
19 19
20 class GURL; 20 class GURL;
21 21
22 namespace content {
23 FORWARD_DECLARE_TEST(AppCacheStorageTest, DelegateReferences);
24 FORWARD_DECLARE_TEST(AppCacheStorageTest, UsageMap);
25 class AppCacheStorageTest;
26 }
27
22 namespace appcache { 28 namespace appcache {
23 29
24 class AppCache; 30 class AppCache;
25 class AppCacheEntry; 31 class AppCacheEntry;
26 class AppCacheGroup; 32 class AppCacheGroup;
27 class AppCacheResponseReader; 33 class AppCacheResponseReader;
28 class AppCacheResponseWriter; 34 class AppCacheResponseWriter;
29 class AppCacheService; 35 class AppCacheService;
30 struct AppCacheInfoCollection; 36 struct AppCacheInfoCollection;
31 struct HttpResponseInfoIOBuffer; 37 struct HttpResponseInfoIOBuffer;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 195
190 // A map of origins to usage. 196 // A map of origins to usage.
191 const UsageMap* usage_map() { return &usage_map_; } 197 const UsageMap* usage_map() { return &usage_map_; }
192 198
193 // Simple ptr back to the service object that owns us. 199 // Simple ptr back to the service object that owns us.
194 AppCacheService* service() { return service_; } 200 AppCacheService* service() { return service_; }
195 201
196 protected: 202 protected:
197 friend class AppCacheQuotaClientTest; 203 friend class AppCacheQuotaClientTest;
198 friend class AppCacheResponseTest; 204 friend class AppCacheResponseTest;
199 friend class AppCacheStorageTest; 205 friend class content::AppCacheStorageTest;
200 206
201 // Helper to call a collection of delegates. 207 // Helper to call a collection of delegates.
202 #define FOR_EACH_DELEGATE(delegates, func_and_args) \ 208 #define FOR_EACH_DELEGATE(delegates, func_and_args) \
203 do { \ 209 do { \
204 for (DelegateReferenceVector::iterator it = delegates.begin(); \ 210 for (DelegateReferenceVector::iterator it = delegates.begin(); \
205 it != delegates.end(); ++it) { \ 211 it != delegates.end(); ++it) { \
206 if (it->get()->delegate) \ 212 if (it->get()->delegate) \
207 it->get()->delegate->func_and_args; \ 213 it->get()->delegate->func_and_args; \
208 } \ 214 } \
209 } while (0) 215 } while (0)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 310
305 UsageMap usage_map_; // maps origin to usage 311 UsageMap usage_map_; // maps origin to usage
306 AppCacheWorkingSet working_set_; 312 AppCacheWorkingSet working_set_;
307 AppCacheService* service_; 313 AppCacheService* service_;
308 DelegateReferenceMap delegate_references_; 314 DelegateReferenceMap delegate_references_;
309 PendingResponseInfoLoads pending_info_loads_; 315 PendingResponseInfoLoads pending_info_loads_;
310 316
311 // The set of last ids must be retrieved from storage prior to being used. 317 // The set of last ids must be retrieved from storage prior to being used.
312 static const int64 kUnitializedId; 318 static const int64 kUnitializedId;
313 319
314 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, DelegateReferences); 320 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, DelegateReferences);
315 FRIEND_TEST_ALL_PREFIXES(AppCacheStorageTest, UsageMap); 321 FRIEND_TEST_ALL_PREFIXES(content::AppCacheStorageTest, UsageMap);
316 322
317 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage); 323 DISALLOW_COPY_AND_ASSIGN(AppCacheStorage);
318 }; 324 };
319 325
320 } // namespace appcache 326 } // namespace appcache
321 327
322 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_ 328 #endif // WEBKIT_BROWSER_APPCACHE_APPCACHE_STORAGE_H_
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | webkit/browser/appcache/appcache_storage_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698