Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: net/socket/tcp_client_socket_win.cc

Issue 3292011: Fix SetOmniboxSpeculation in TcpClientSocket* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/socket/tcp_client_socket_libevent.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/socket/tcp_client_socket_libevent.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698