Add protos to control device disabling during normal operation
[chromium-blink-merge.git] / content / test / appcache_test_helper.h
blob5f5221f0a963f97c107b7b6bbccba48ea3a8606d
1 // Copyright 2014 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.
5 #ifndef CONTENT_TEST_APPCACHE_TEST_HELPER_H_
6 #define CONTENT_TEST_APPCACHE_TEST_HELPER_H_
8 #include <set>
10 #include "content/browser/appcache/appcache_storage.h"
12 namespace content {
13 class AppCacheServiceImpl;
16 namespace content {
18 // Helper class for inserting data into a ChromeAppCacheService and reading it
19 // back.
20 class AppCacheTestHelper : public AppCacheStorage::Delegate {
21 public:
22 AppCacheTestHelper();
23 ~AppCacheTestHelper() override;
24 void AddGroupAndCache(AppCacheServiceImpl* appcache_service,
25 const GURL& manifest_url);
27 void GetOriginsWithCaches(AppCacheServiceImpl* appcache_service,
28 std::set<GURL>* origins);
29 private:
30 void OnGroupAndNewestCacheStored(AppCacheGroup* group,
31 AppCache* newest_cache,
32 bool success,
33 bool would_exceed_quota) override;
34 void OnGotAppCacheInfo(int rv);
36 int group_id_;
37 int appcache_id_;
38 int response_id_;
39 scoped_refptr<AppCacheInfoCollection> appcache_info_;
40 std::set<GURL>* origins_; // not owned
42 DISALLOW_COPY_AND_ASSIGN(AppCacheTestHelper);
45 } // namespace content
47 #endif // CONTENT_TEST_APPCACHE_TEST_HELPER_H_