Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(459)

Side by Side Diff: webkit/appcache/appcache_test_helper.cc

Issue 16155009: Update webkit/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/appcache/appcache_storage_unittest.cc ('k') | webkit/appcache/appcache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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 "webkit/appcache/appcache_test_helper.h" 5 #include "webkit/appcache/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.h" 9 #include "base/message_loop.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 this); 50 this);
51 // OnGroupAndNewestCacheStored will quit the message loop. 51 // OnGroupAndNewestCacheStored will quit the message loop.
52 base::MessageLoop::current()->Run(); 52 base::MessageLoop::current()->Run();
53 } 53 }
54 54
55 void AppCacheTestHelper::GetOriginsWithCaches(AppCacheService* appcache_service, 55 void AppCacheTestHelper::GetOriginsWithCaches(AppCacheService* appcache_service,
56 std::set<GURL>* origins) { 56 std::set<GURL>* origins) {
57 appcache_info_ = new AppCacheInfoCollection; 57 appcache_info_ = new AppCacheInfoCollection;
58 origins_ = origins; 58 origins_ = origins;
59 appcache_service->GetAllAppCacheInfo( 59 appcache_service->GetAllAppCacheInfo(
60 appcache_info_, base::Bind(&AppCacheTestHelper::OnGotAppCacheInfo, 60 appcache_info_.get(),
61 base::Unretained(this))); 61 base::Bind(&AppCacheTestHelper::OnGotAppCacheInfo,
62 base::Unretained(this)));
62 63
63 // OnGotAppCacheInfo will quit the message loop. 64 // OnGotAppCacheInfo will quit the message loop.
64 base::MessageLoop::current()->Run(); 65 base::MessageLoop::current()->Run();
65 } 66 }
66 67
67 void AppCacheTestHelper::OnGotAppCacheInfo(int rv) { 68 void AppCacheTestHelper::OnGotAppCacheInfo(int rv) {
68 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin; 69 typedef std::map<GURL, AppCacheInfoVector> InfoByOrigin;
69 70
70 origins_->clear(); 71 origins_->clear();
71 for (InfoByOrigin::const_iterator origin = 72 for (InfoByOrigin::const_iterator origin =
72 appcache_info_->infos_by_origin.begin(); 73 appcache_info_->infos_by_origin.begin();
73 origin != appcache_info_->infos_by_origin.end(); ++origin) { 74 origin != appcache_info_->infos_by_origin.end(); ++origin) {
74 origins_->insert(origin->first); 75 origins_->insert(origin->first);
75 } 76 }
76 base::MessageLoop::current()->Quit(); 77 base::MessageLoop::current()->Quit();
77 } 78 }
78 79
79 } // namespace appcache 80 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_storage_unittest.cc ('k') | webkit/appcache/appcache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698