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

Side by Side Diff: webkit/appcache/appcache_test_helper.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: Moving test helpers to webkit/appcache. 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
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/appcache/appcache_test_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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_APPCACHE_APPCACHE_TEST_HELPER_H_
6 #define WEBKIT_APPCACHE_APPCACHE_TEST_HELPER_H_
7 #pragma once
8
9 #include <set>
10
11 #include "net/base/completion_callback.h"
12 #include "webkit/appcache/appcache_storage.h"
13
14 namespace appcache {
15
16 class AppCacheService;
17
18 // Helper class for inserting data into a ChromeAppCacheService and reading it
19 // back.
20 class AppCacheTestHelper : public appcache::AppCacheStorage::Delegate {
21 public:
22 AppCacheTestHelper();
23 virtual ~AppCacheTestHelper();
24 void AddGroupAndCache(AppCacheService* appcache_service,
25 const GURL& manifest_url);
26
27 void GetOriginsWithCaches(AppCacheService* appcache_service,
28 std::set<GURL>* origins);
29 private:
30 virtual void OnGroupAndNewestCacheStored(
31 appcache::AppCacheGroup* group,
32 appcache::AppCache* newest_cache,
33 bool success,
34 bool would_exceed_quota);
35 void OnGotAppCacheInfo(int rv);
36
37 int group_id_;
38 int appcache_id_;
39 int response_id_;
40 net::CompletionCallbackImpl<AppCacheTestHelper> appcache_got_info_callback_;
41 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
42 std::set<GURL>* origins_; // not owned
43
44 DISALLOW_COPY_AND_ASSIGN(AppCacheTestHelper);
45 };
46
47 } // namespace appcache
48
49 #endif // WEBKIT_APPCACHE_APPCACHE_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_storage_impl.cc ('k') | webkit/appcache/appcache_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698