OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/renderer_host/sync_resource_handler.h" | 5 #include "chrome/browser/renderer_host/sync_resource_handler.h" |
| 6 |
6 #include "base/logging.h" | 7 #include "base/logging.h" |
7 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
8 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
9 #include "net/http/http_response_headers.h" | 10 #include "net/http/http_response_headers.h" |
10 | 11 |
11 SyncResourceHandler::SyncResourceHandler( | 12 SyncResourceHandler::SyncResourceHandler( |
12 ResourceDispatcherHost::Receiver* receiver, | 13 ResourceDispatcherHost::Receiver* receiver, |
13 const GURL& url, | 14 const GURL& url, |
14 IPC::Message* result_message) | 15 IPC::Message* result_message) |
15 : read_buffer_(new net::IOBuffer(kReadBufSize)), | 16 : read_buffer_(new net::IOBuffer(kReadBufSize)), |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 88 } |
88 | 89 |
89 void SyncResourceHandler::OnRequestClosed() { | 90 void SyncResourceHandler::OnRequestClosed() { |
90 if (!result_message_) | 91 if (!result_message_) |
91 return; | 92 return; |
92 | 93 |
93 result_message_->set_reply_error(); | 94 result_message_->set_reply_error(); |
94 receiver_->Send(result_message_); | 95 receiver_->Send(result_message_); |
95 receiver_ = NULL; // URLRequest is gone, and perhaps also the receiver. | 96 receiver_ = NULL; // URLRequest is gone, and perhaps also the receiver. |
96 } | 97 } |
OLD | NEW |