| OLD | NEW |
| 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 "chrome/browser/appcache/appcache_dispatcher_host.h" | 5 #include "chrome/browser/appcache/appcache_dispatcher_host.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "chrome/browser/appcache/chrome_appcache_service.h" | 8 #include "chrome/browser/appcache/chrome_appcache_service.h" |
| 9 #include "chrome/browser/metrics/user_metrics.h" | 9 #include "chrome/browser/metrics/user_metrics.h" |
| 10 #include "chrome/browser/net/chrome_url_request_context.h" | 10 #include "chrome/browser/net/chrome_url_request_context.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 } | 210 } |
| 211 return; | 211 return; |
| 212 } | 212 } |
| 213 | 213 |
| 214 SwapCacheCallback(false, reply_msg); | 214 SwapCacheCallback(false, reply_msg); |
| 215 } | 215 } |
| 216 | 216 |
| 217 void AppCacheDispatcherHost::GetStatusCallback( | 217 void AppCacheDispatcherHost::GetStatusCallback( |
| 218 appcache::Status status, void* param) { | 218 appcache::Status status, void* param) { |
| 219 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 219 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
| 220 DCHECK(reply_msg == pending_reply_msg_.get()); | 220 DCHECK_EQ(reply_msg, pending_reply_msg_.get()); |
| 221 AppCacheMsg_GetStatus::WriteReplyParams(reply_msg, status); | 221 AppCacheMsg_GetStatus::WriteReplyParams(reply_msg, status); |
| 222 Send(pending_reply_msg_.release()); | 222 Send(pending_reply_msg_.release()); |
| 223 } | 223 } |
| 224 | 224 |
| 225 void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) { | 225 void AppCacheDispatcherHost::StartUpdateCallback(bool result, void* param) { |
| 226 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 226 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
| 227 DCHECK(reply_msg == pending_reply_msg_.get()); | 227 DCHECK_EQ(reply_msg, pending_reply_msg_.get()); |
| 228 AppCacheMsg_StartUpdate::WriteReplyParams(reply_msg, result); | 228 AppCacheMsg_StartUpdate::WriteReplyParams(reply_msg, result); |
| 229 Send(pending_reply_msg_.release()); | 229 Send(pending_reply_msg_.release()); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { | 232 void AppCacheDispatcherHost::SwapCacheCallback(bool result, void* param) { |
| 233 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); | 233 IPC::Message* reply_msg = reinterpret_cast<IPC::Message*>(param); |
| 234 DCHECK(reply_msg == pending_reply_msg_.get()); | 234 DCHECK_EQ(reply_msg, pending_reply_msg_.get()); |
| 235 AppCacheMsg_SwapCache::WriteReplyParams(reply_msg, result); | 235 AppCacheMsg_SwapCache::WriteReplyParams(reply_msg, result); |
| 236 Send(pending_reply_msg_.release()); | 236 Send(pending_reply_msg_.release()); |
| 237 } | 237 } |
| OLD | NEW |