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

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

Issue 9023002: Cleanup: Remove unused DeferredCallCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | 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/appcache_service.h" 5 #include "webkit/appcache/appcache_service.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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 protected: 58 protected:
59 void CallCallback(int rv) { 59 void CallCallback(int rv) {
60 if (!callback_.is_null()) { 60 if (!callback_.is_null()) {
61 // Defer to guarantee async completion. 61 // Defer to guarantee async completion.
62 MessageLoop::current()->PostTask( 62 MessageLoop::current()->PostTask(
63 FROM_HERE, base::Bind(&DeferredCallback, callback_, rv)); 63 FROM_HERE, base::Bind(&DeferredCallback, callback_, rv));
64 } 64 }
65 callback_.Reset(); 65 callback_.Reset();
66 } 66 }
67 67
68 static void DeferredCallCallback(const net::CompletionCallback& callback,
69 int rv) {
70 callback.Run(rv);
71 }
72
73 AppCacheService* service_; 68 AppCacheService* service_;
74 net::CompletionCallback callback_; 69 net::CompletionCallback callback_;
75 }; 70 };
76 71
77 void AppCacheService::NewAsyncHelper::Cancel() { 72 void AppCacheService::NewAsyncHelper::Cancel() {
78 if (!callback_.is_null()) { 73 if (!callback_.is_null()) {
79 callback_.Run(net::ERR_ABORTED); 74 callback_.Run(net::ERR_ABORTED);
80 callback_.Reset(); 75 callback_.Reset();
81 } 76 }
82 77
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 backends_.insert( 551 backends_.insert(
557 BackendMap::value_type(backend_impl->process_id(), backend_impl)); 552 BackendMap::value_type(backend_impl->process_id(), backend_impl));
558 } 553 }
559 554
560 void AppCacheService::UnregisterBackend( 555 void AppCacheService::UnregisterBackend(
561 AppCacheBackendImpl* backend_impl) { 556 AppCacheBackendImpl* backend_impl) {
562 backends_.erase(backend_impl->process_id()); 557 backends_.erase(backend_impl->process_id());
563 } 558 }
564 559
565 } // namespace appcache 560 } // namespace appcache
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698