Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |