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

Side by Side Diff: chrome/test/appcache_util.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: More cleanup. 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
(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 CHROME_TEST_APPCACHE_UTIL_H_
6 #define CHROME_TEST_APPCACHE_UTIL_H_
7 #pragma once
8
9 #include <set>
10
11 #include "base/memory/ref_counted.h"
12 #include "net/base/completion_callback.h"
13 #include "webkit/appcache/appcache_storage.h"
14
15 class ChromeAppCacheService;
16
17 class AppCacheInserter : public appcache::AppCacheStorage::Delegate {
michaeln 2011/07/15 19:15:46 Now that this class is promoted to a separate .h f
marja(google) 2011/07/18 09:55:41 Done.
18 public:
19 AppCacheInserter();
20 virtual ~AppCacheInserter();
21
22 virtual void OnGroupAndNewestCacheStored(
michaeln 2011/07/15 19:15:46 I'd suggest making this method private or protecte
marja(google) 2011/07/18 09:55:41 Done.
23 appcache::AppCacheGroup* group,
24 appcache::AppCache* newest_cache,
25 bool success,
26 bool would_exceed_quota);
27
28 void AddGroupAndCache(ChromeAppCacheService* appcache_service,
29 const GURL& manifest_url);
30
31 private:
32 int group_id_;
33 int appcache_id_;
34 int response_id_;
35
36 DISALLOW_COPY_AND_ASSIGN(AppCacheInserter);
37 };
38
39 // Helper class for reading appcaches.
40 class AppCacheReader {
41 public:
42 explicit AppCacheReader(ChromeAppCacheService* appcache_service);
43 virtual ~AppCacheReader();
44
45 std::set<GURL>* ReadAppCaches();
michaeln 2011/07/15 19:15:46 This method name seems a little vague, and the ret
marja(google) 2011/07/18 09:55:41 Done.
46
47 private:
48 void OnGotAppCacheInfo(int rv);
49
50 scoped_refptr<ChromeAppCacheService> appcache_service_;
51 net::CompletionCallbackImpl<AppCacheReader>
52 appcache_got_info_callback_;
53 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
54 std::set<GURL> origins_;
55
56 DISALLOW_COPY_AND_ASSIGN(AppCacheReader);
57 };
58
59 #endif // CHROME_TEST_APPCACHE_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698