Make sure webrtc::VideoSource is released when WebRtcVideoTrackAdapter is destroyed.
[chromium-blink-merge.git] / content / test / appcache_test_helper.h
blob184e4273fb8032ded15b3c4d56193c473551fe4d
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 "webkit/browser/appcache/appcache_storage.h"
12 namespace appcache {
13 class AppCacheService;
16 namespace content {
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(appcache::AppCacheService* appcache_service,
25 const GURL& manifest_url);
27 void GetOriginsWithCaches(appcache::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) OVERRIDE;
35 void OnGotAppCacheInfo(int rv);
37 int group_id_;
38 int appcache_id_;
39 int response_id_;
40 scoped_refptr<appcache::AppCacheInfoCollection> appcache_info_;
41 std::set<GURL>* origins_; // not owned
43 DISALLOW_COPY_AND_ASSIGN(AppCacheTestHelper);
46 } // namespace content
48 #endif // CONTENT_TEST_APPCACHE_TEST_HELPER_H_