OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/test/appcache_test_helper.h" | 5 #include "content/test/appcache_test_helper.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "content/browser/appcache/appcache.h" | 10 #include "content/browser/appcache/appcache.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 origins_(NULL) {} | 22 origins_(NULL) {} |
23 | 23 |
24 AppCacheTestHelper::~AppCacheTestHelper() {} | 24 AppCacheTestHelper::~AppCacheTestHelper() {} |
25 | 25 |
26 void AppCacheTestHelper::OnGroupAndNewestCacheStored( | 26 void AppCacheTestHelper::OnGroupAndNewestCacheStored( |
27 AppCacheGroup* /*group*/, | 27 AppCacheGroup* /*group*/, |
28 AppCache* /*newest_cache*/, | 28 AppCache* /*newest_cache*/, |
29 bool success, | 29 bool success, |
30 bool /*would_exceed_quota*/) { | 30 bool /*would_exceed_quota*/) { |
31 ASSERT_TRUE(success); | 31 ASSERT_TRUE(success); |
32 base::MessageLoop::current()->Quit(); | 32 base::MessageLoop::current()->QuitWhenIdle(); |
33 } | 33 } |
34 | 34 |
35 void AppCacheTestHelper::AddGroupAndCache(AppCacheServiceImpl* | 35 void AppCacheTestHelper::AddGroupAndCache(AppCacheServiceImpl* |
36 appcache_service, const GURL& manifest_url) { | 36 appcache_service, const GURL& manifest_url) { |
37 AppCacheGroup* appcache_group = | 37 AppCacheGroup* appcache_group = |
38 new AppCacheGroup(appcache_service->storage(), | 38 new AppCacheGroup(appcache_service->storage(), |
39 manifest_url, | 39 manifest_url, |
40 ++group_id_); | 40 ++group_id_); |
41 AppCache* appcache = new AppCache( | 41 AppCache* appcache = new AppCache( |
42 appcache_service->storage(), ++appcache_id_); | 42 appcache_service->storage(), ++appcache_id_); |
(...skipping 24 matching lines...) Expand all Loading... |
67 | 67 |
68 void AppCacheTestHelper::OnGotAppCacheInfo(int rv) { | 68 void AppCacheTestHelper::OnGotAppCacheInfo(int rv) { |
69 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; | 69 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; |
70 | 70 |
71 origins_->clear(); | 71 origins_->clear(); |
72 for (InfoByOrigin::const_iterator origin = | 72 for (InfoByOrigin::const_iterator origin = |
73 appcache_info_->infos_by_origin.begin(); | 73 appcache_info_->infos_by_origin.begin(); |
74 origin != appcache_info_->infos_by_origin.end(); ++origin) { | 74 origin != appcache_info_->infos_by_origin.end(); ++origin) { |
75 origins_->insert(origin->first); | 75 origins_->insert(origin->first); |
76 } | 76 } |
77 base::MessageLoop::current()->Quit(); | 77 base::MessageLoop::current()->QuitWhenIdle(); |
78 } | 78 } |
79 | 79 |
80 } // namespace content | 80 } // namespace content |
OLD | NEW |