OLD | NEW |
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/mock_appcache_service.h" | 5 #include "webkit/appcache/mock_appcache_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 | 9 |
10 namespace appcache { | 10 namespace appcache { |
11 | 11 |
12 static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) { | 12 static void DeferredCallCallback( |
13 callback->Run(rv); | 13 const net::CompletionCallback& callback, int rv) { |
| 14 callback.Run(rv); |
14 } | 15 } |
15 | 16 |
16 void MockAppCacheService::DeleteAppCachesForOrigin( | 17 void MockAppCacheService::DeleteAppCachesForOrigin( |
17 const GURL& origin, net::OldCompletionCallback* callback) { | 18 const GURL& origin, const net::CompletionCallback& callback) { |
18 ++delete_called_count_; | 19 ++delete_called_count_; |
19 MessageLoop::current()->PostTask( | 20 MessageLoop::current()->PostTask( |
20 FROM_HERE, | 21 FROM_HERE, |
21 base::Bind(&DeferredCallCallback, callback, | 22 base::Bind(&DeferredCallCallback, callback, |
22 mock_delete_appcaches_for_origin_result_)); | 23 mock_delete_appcaches_for_origin_result_)); |
23 } | 24 } |
24 | 25 |
25 } // namespace appcache | 26 } // namespace appcache |
OLD | NEW |