| 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/socket_stream_host.h" | 5 #include "chrome/browser/renderer_host/socket_stream_host.h" | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profiles/profile.h" | 
| 9 #include "chrome/common/net/socket_stream.h" | 9 #include "chrome/common/net/socket_stream.h" | 
| 10 #include "chrome/common/net/url_request_context_getter.h" | 10 #include "chrome/common/net/url_request_context_getter.h" | 
| 11 #include "chrome/common/render_messages.h" | 11 #include "chrome/common/render_messages.h" | 
| 12 #include "net/socket_stream/socket_stream_job.h" | 12 #include "net/socket_stream/socket_stream_job.h" | 
| 13 | 13 | 
| 14 static const char* kSocketHostKey = "socketHost"; | 14 static const char* kSocketHostKey = "socketHost"; | 
| 15 | 15 | 
| 16 class SocketStreamInfo : public net::SocketStream::UserData { | 16 class SocketStreamInfo : public net::SocketStream::UserData { | 
| 17  public: | 17  public: | 
| 18   explicit SocketStreamInfo(SocketStreamHost* host) : host_(host) {} | 18   explicit SocketStreamInfo(SocketStreamHost* host) : host_(host) {} | 
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 81 | 81 | 
| 82 bool SocketStreamHost::SentData(int amount_sent) { | 82 bool SocketStreamHost::SentData(int amount_sent) { | 
| 83   return receiver_->Send(new ViewMsg_SocketStream_SentData( | 83   return receiver_->Send(new ViewMsg_SocketStream_SentData( | 
| 84       socket_id_, amount_sent)); | 84       socket_id_, amount_sent)); | 
| 85 } | 85 } | 
| 86 | 86 | 
| 87 bool SocketStreamHost::ReceivedData(const char* data, int len) { | 87 bool SocketStreamHost::ReceivedData(const char* data, int len) { | 
| 88   return receiver_->Send(new ViewMsg_SocketStream_ReceivedData( | 88   return receiver_->Send(new ViewMsg_SocketStream_ReceivedData( | 
| 89       socket_id_, std::vector<char>(data, data + len))); | 89       socket_id_, std::vector<char>(data, data + len))); | 
| 90 } | 90 } | 
| OLD | NEW | 
|---|