| 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/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/linked_ptr.h" | 8 #include "base/linked_ptr.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 } | 356 } |
| 357 | 357 |
| 358 const std::string& path = url.PathForRequest(); | 358 const std::string& path = url.PathForRequest(); |
| 359 | 359 |
| 360 *stream = GetActivePushStream(path); | 360 *stream = GetActivePushStream(path); |
| 361 if (stream->get()) { | 361 if (stream->get()) { |
| 362 DCHECK(streams_pushed_and_claimed_count_ < streams_pushed_count_); | 362 DCHECK(streams_pushed_and_claimed_count_ < streams_pushed_count_); |
| 363 streams_pushed_and_claimed_count_++; | 363 streams_pushed_and_claimed_count_++; |
| 364 return OK; | 364 return OK; |
| 365 } | 365 } |
| 366 return NULL; | 366 return 0; |
| 367 } | 367 } |
| 368 | 368 |
| 369 int SpdySession::CreateStream( | 369 int SpdySession::CreateStream( |
| 370 const GURL& url, | 370 const GURL& url, |
| 371 RequestPriority priority, | 371 RequestPriority priority, |
| 372 scoped_refptr<SpdyStream>* spdy_stream, | 372 scoped_refptr<SpdyStream>* spdy_stream, |
| 373 const BoundNetLog& stream_net_log, | 373 const BoundNetLog& stream_net_log, |
| 374 CompletionCallback* callback) { | 374 CompletionCallback* callback) { |
| 375 if (!max_concurrent_streams_ || | 375 if (!max_concurrent_streams_ || |
| 376 active_streams_.size() < max_concurrent_streams_) { | 376 active_streams_.size() < max_concurrent_streams_) { |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsRetransRate", | 1386 UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySettingsRetransRate", |
| 1387 setting.second, | 1387 setting.second, |
| 1388 1, 100, 50); | 1388 1, 100, 50); |
| 1389 break; | 1389 break; |
| 1390 } | 1390 } |
| 1391 } | 1391 } |
| 1392 } | 1392 } |
| 1393 } | 1393 } |
| 1394 | 1394 |
| 1395 } // namespace net | 1395 } // namespace net |
| OLD | NEW |