OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/appcache/appcache_dispatcher_host.h" | 5 #include "content/browser/appcache/appcache_dispatcher_host.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 "content/browser/appcache/chrome_appcache_service.h" | 9 #include "content/browser/appcache/chrome_appcache_service.h" |
10 #include "content/common/appcache_messages.h" | 10 #include "content/common/appcache_messages.h" |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 host_id, swap_cache_callback_, reply_msg)) { | 198 host_id, swap_cache_callback_, reply_msg)) { |
199 BadMessageReceived(); | 199 BadMessageReceived(); |
200 } | 200 } |
201 return; | 201 return; |
202 } | 202 } |
203 | 203 |
204 SwapCacheCallback(false, reply_msg); | 204 SwapCacheCallback(false, reply_msg); |
205 } | 205 } |
206 | 206 |
207 void AppCacheDispatcherHost::GetStatusCallback( | 207 void AppCacheDispatcherHost::GetStatusCallback( |
208 appcache::Status status, void* param) { | 208 appcache::AppCacheStatus status, void* param) { |
209 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 209 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
210 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); | 210 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); |
211 AppCacheHostMsg_GetStatus::WriteReplyParams(reply_msg, status); | 211 AppCacheHostMsg_GetStatus::WriteReplyParams(reply_msg, status); |
212 Send(pending_reply_msg_.release()); | 212 Send(pending_reply_msg_.release()); |
213 } | 213 } |
214 | 214 |
215 void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) { | 215 void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) { |
216 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 216 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
217 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); | 217 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); |
218 AppCacheHostMsg_StartUpdate::WriteReplyParams(reply_msg, result); | 218 AppCacheHostMsg_StartUpdate::WriteReplyParams(reply_msg, result); |
219 Send(pending_reply_msg_.release()); | 219 Send(pending_reply_msg_.release()); |
220 } | 220 } |
221 | 221 |
222 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { | 222 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { |
223 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 223 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
224 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); | 224 DCHECK_EQ(pending_reply_msg_.get(), reply_msg); |
225 AppCacheHostMsg_SwapCache::WriteReplyParams(reply_msg, result); | 225 AppCacheHostMsg_SwapCache::WriteReplyParams(reply_msg, result); |
226 Send(pending_reply_msg_.release()); | 226 Send(pending_reply_msg_.release()); |
227 } | 227 } |
228 | 228 |
229 } // namespace content | 229 } // namespace content |
OLD | NEW |