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

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

Issue 8399019: base::Bind usage (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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_url_request_job.cc ('k') | no next file » | 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/mock_appcache_service.h" 5 #include "webkit/appcache/mock_appcache_service.h"
6 6
7 #include "base/bind.h"
7 #include "base/message_loop.h" 8 #include "base/message_loop.h"
8 9
9 namespace appcache { 10 namespace appcache {
10 11
11 static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) { 12 static void DeferredCallCallback(net::OldCompletionCallback* callback, int rv) {
12 callback->Run(rv); 13 callback->Run(rv);
13 } 14 }
14 15
15 void MockAppCacheService::DeleteAppCachesForOrigin( 16 void MockAppCacheService::DeleteAppCachesForOrigin(
16 const GURL& origin, net::OldCompletionCallback* callback) { 17 const GURL& origin, net::OldCompletionCallback* callback) {
17 ++delete_called_count_; 18 ++delete_called_count_;
18 MessageLoop::current()->PostTask( 19 MessageLoop::current()->PostTask(
19 FROM_HERE, 20 FROM_HERE,
20 NewRunnableFunction(&DeferredCallCallback, callback, 21 base::Bind(&DeferredCallCallback, callback,
21 mock_delete_appcaches_for_origin_result_)); 22 mock_delete_appcaches_for_origin_result_));
22 } 23 }
23 24
24 } // namespace appcache 25 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_url_request_job.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698