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

Side by Side Diff: net/spdy/spdy_session.cc

Issue 9391027: Disable CREDENTIALS frames when using spdy/2.1 or earlier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/spdy/spdy_session.h" 5 #include "net/spdy/spdy_session.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/linked_ptr.h" 9 #include "base/memory/linked_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 546
547 DCHECK_EQ(active_streams_[stream_id].get(), stream.get()); 547 DCHECK_EQ(active_streams_[stream_id].get(), stream.get());
548 return OK; 548 return OK;
549 } 549 }
550 550
551 bool SpdySession::NeedsCredentials(const HostPortPair& origin) const { 551 bool SpdySession::NeedsCredentials(const HostPortPair& origin) const {
552 if (!is_secure_) 552 if (!is_secure_)
553 return false; 553 return false;
554 SSLClientSocket* ssl_socket = 554 SSLClientSocket* ssl_socket =
555 reinterpret_cast<SSLClientSocket*>(connection_->socket()); 555 reinterpret_cast<SSLClientSocket*>(connection_->socket());
556 if (ssl_socket->protocol_negotiated() < SSLClientSocket::kProtoSPDY3)
557 return false;
556 if (!ssl_socket->WasOriginBoundCertSent()) 558 if (!ssl_socket->WasOriginBoundCertSent())
557 return false; 559 return false;
558 return !credential_state_.HasCredential(origin); 560 return !credential_state_.HasCredential(origin);
559 } 561 }
560 562
561 int SpdySession::WriteSynStream( 563 int SpdySession::WriteSynStream(
562 spdy::SpdyStreamId stream_id, 564 spdy::SpdyStreamId stream_id,
563 RequestPriority priority, 565 RequestPriority priority,
564 spdy::SpdyControlFlags flags, 566 spdy::SpdyControlFlags flags,
565 const linked_ptr<spdy::SpdyHeaderBlock>& headers) { 567 const linked_ptr<spdy::SpdyHeaderBlock>& headers) {
(...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after
1916 if (it == pending_callback_map_.end()) 1918 if (it == pending_callback_map_.end())
1917 return; 1919 return;
1918 1920
1919 CompletionCallback callback = it->second.callback; 1921 CompletionCallback callback = it->second.callback;
1920 int result = it->second.result; 1922 int result = it->second.result;
1921 pending_callback_map_.erase(it); 1923 pending_callback_map_.erase(it);
1922 callback.Run(result); 1924 callback.Run(result);
1923 } 1925 }
1924 1926
1925 } // namespace net 1927 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_http_stream_unittest.cc ('k') | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698