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 "net/socket/tcp_client_socket_win.h" | 5 #include "net/socket/tcp_client_socket_win.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory_debug.h" | 9 #include "base/memory_debug.h" |
10 #include "base/stats_counters.h" | 10 #include "base/stats_counters.h" |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 return ERR_FAILED; | 514 return ERR_FAILED; |
515 address->Copy(current_ai_, false); | 515 address->Copy(current_ai_, false); |
516 return OK; | 516 return OK; |
517 } | 517 } |
518 | 518 |
519 void TCPClientSocketWin::SetSubresourceSpeculation() { | 519 void TCPClientSocketWin::SetSubresourceSpeculation() { |
520 use_history_.set_subresource_speculation(); | 520 use_history_.set_subresource_speculation(); |
521 } | 521 } |
522 | 522 |
523 void TCPClientSocketWin::SetOmniboxSpeculation() { | 523 void TCPClientSocketWin::SetOmniboxSpeculation() { |
524 use_history_.set_subresource_speculation(); | 524 use_history_.set_omnibox_speculation(); |
525 } | 525 } |
526 | 526 |
527 bool TCPClientSocketWin::WasEverUsed() const { | 527 bool TCPClientSocketWin::WasEverUsed() const { |
528 return use_history_.was_used_to_convey_data(); | 528 return use_history_.was_used_to_convey_data(); |
529 } | 529 } |
530 | 530 |
531 int TCPClientSocketWin::Read(IOBuffer* buf, | 531 int TCPClientSocketWin::Read(IOBuffer* buf, |
532 int buf_len, | 532 int buf_len, |
533 CompletionCallback* callback) { | 533 CompletionCallback* callback) { |
534 DCHECK(CalledOnValidThread()); | 534 DCHECK(CalledOnValidThread()); |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 use_history_.set_was_used_to_convey_data(); | 806 use_history_.set_was_used_to_convey_data(); |
807 net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT, | 807 net_log_.AddEvent(NetLog::TYPE_SOCKET_BYTES_SENT, |
808 new NetLogIntegerParameter("num_bytes", rv)); | 808 new NetLogIntegerParameter("num_bytes", rv)); |
809 } | 809 } |
810 } | 810 } |
811 core_->write_iobuffer_ = NULL; | 811 core_->write_iobuffer_ = NULL; |
812 DoWriteCallback(rv); | 812 DoWriteCallback(rv); |
813 } | 813 } |
814 | 814 |
815 } // namespace net | 815 } // namespace net |
OLD | NEW |