Chromium Code Reviews| Index: chrome/test/appcache_util.h |
| diff --git a/chrome/test/appcache_util.h b/chrome/test/appcache_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dd49e73f2b2286db992d777ebffd787d4c979521 |
| --- /dev/null |
| +++ b/chrome/test/appcache_util.h |
| @@ -0,0 +1,59 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_TEST_APPCACHE_UTIL_H_ |
| +#define CHROME_TEST_APPCACHE_UTIL_H_ |
| +#pragma once |
| + |
| +#include <set> |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "net/base/completion_callback.h" |
| +#include "webkit/appcache/appcache_storage.h" |
| + |
| +class ChromeAppCacheService; |
| + |
| +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.
|
| + public: |
| + AppCacheInserter(); |
| + virtual ~AppCacheInserter(); |
| + |
| + 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.
|
| + appcache::AppCacheGroup* group, |
| + appcache::AppCache* newest_cache, |
| + bool success, |
| + bool would_exceed_quota); |
| + |
| + void AddGroupAndCache(ChromeAppCacheService* appcache_service, |
| + const GURL& manifest_url); |
| + |
| + private: |
| + int group_id_; |
| + int appcache_id_; |
| + int response_id_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppCacheInserter); |
| +}; |
| + |
| +// Helper class for reading appcaches. |
| +class AppCacheReader { |
| + public: |
| + explicit AppCacheReader(ChromeAppCacheService* appcache_service); |
| + virtual ~AppCacheReader(); |
| + |
| + 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.
|
| + |
| + private: |
| + void OnGotAppCacheInfo(int rv); |
| + |
| + scoped_refptr<ChromeAppCacheService> appcache_service_; |
| + net::CompletionCallbackImpl<AppCacheReader> |
| + appcache_got_info_callback_; |
| + scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_; |
| + std::set<GURL> origins_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AppCacheReader); |
| +}; |
| + |
| +#endif // CHROME_TEST_APPCACHE_UTIL_H_ |