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