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