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

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

Issue 15701009: [SPDY] Add a SpdyStreamType enum and use it for SpdyStream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK -> DCHECK Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_test_util_common.h" 5 #include "net/spdy/spdy_test_util_common.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 framer.set_visitor(&priority_getter); 273 framer.set_visitor(&priority_getter);
274 size_t frame_size = frame.size(); 274 size_t frame_size = frame.size();
275 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) { 275 if (framer.ProcessInput(frame.data(), frame_size) != frame_size) {
276 return false; 276 return false;
277 } 277 }
278 *priority = priority_getter.priority(); 278 *priority = priority_getter.priority();
279 return true; 279 return true;
280 } 280 }
281 281
282 base::WeakPtr<SpdyStream> CreateStreamSynchronously( 282 base::WeakPtr<SpdyStream> CreateStreamSynchronously(
283 SpdyStreamType type,
283 const scoped_refptr<SpdySession>& session, 284 const scoped_refptr<SpdySession>& session,
284 const GURL& url, 285 const GURL& url,
285 RequestPriority priority, 286 RequestPriority priority,
286 const BoundNetLog& net_log) { 287 const BoundNetLog& net_log) {
287 SpdyStreamRequest stream_request; 288 SpdyStreamRequest stream_request;
288 int rv = stream_request.StartRequest(session, url, priority, net_log, 289 int rv = stream_request.StartRequest(type, session, url, priority, net_log,
289 CompletionCallback()); 290 CompletionCallback());
290 return 291 return
291 (rv == OK) ? stream_request.ReleaseStream() : base::WeakPtr<SpdyStream>(); 292 (rv == OK) ? stream_request.ReleaseStream() : base::WeakPtr<SpdyStream>();
292 } 293 }
293 294
294 StreamReleaserCallback::StreamReleaserCallback() {} 295 StreamReleaserCallback::StreamReleaserCallback() {}
295 296
296 StreamReleaserCallback::~StreamReleaserCallback() {} 297 StreamReleaserCallback::~StreamReleaserCallback() {}
297 298
298 CompletionCallback StreamReleaserCallback::MakeCallback( 299 CompletionCallback StreamReleaserCallback::MakeCallback(
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 kConnectHeaders, 844 kConnectHeaders,
844 arraysize(kConnectHeaders), 845 arraysize(kConnectHeaders),
845 0); 846 0);
846 } 847 }
847 848
848 scoped_ptr<SpdyFramer> SpdyTestUtil::CreateFramer() const { 849 scoped_ptr<SpdyFramer> SpdyTestUtil::CreateFramer() const {
849 return scoped_ptr<SpdyFramer>(new SpdyFramer(spdy_version_)); 850 return scoped_ptr<SpdyFramer>(new SpdyFramer(spdy_version_));
850 } 851 }
851 852
852 } // namespace net 853 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698