Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / webkit / appcache / mock_appcache_service.cc
blob56c66ba2a92e71fb2b807377a71a7f921d29b2ef
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
3 // found in the LICENSE file.
5 #include "webkit/appcache/mock_appcache_service.h"
7 #include "base/bind.h"
8 #include "base/message_loop.h"
10 namespace appcache {
12 static void DeferredCallCallback(
13 const net::CompletionCallback& callback, int rv) {
14 callback.Run(rv);
17 void MockAppCacheService::DeleteAppCachesForOrigin(
18 const GURL& origin, const net::CompletionCallback& callback) {
19 ++delete_called_count_;
20 MessageLoop::current()->PostTask(
21 FROM_HERE,
22 base::Bind(&DeferredCallCallback, callback,
23 mock_delete_appcaches_for_origin_result_));
26 } // namespace appcache