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

Side by Side Diff: net/http/http_transaction_test_util.cc

Issue 1006643002: Plumb connection attempts from (non-proxy) ConnectJobs to HttpNetworkTransaction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, resolve conflict Created 5 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
« no previous file with comments | « net/http/http_transaction_test_util.h ('k') | net/net.gypi » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/http/http_transaction_test_util.h" 5 #include "net/http/http_transaction_test_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 void MockNetworkTransaction::SetBeforeProxyHeadersSentCallback( 433 void MockNetworkTransaction::SetBeforeProxyHeadersSentCallback(
434 const BeforeProxyHeadersSentCallback& callback) { 434 const BeforeProxyHeadersSentCallback& callback) {
435 } 435 }
436 436
437 int MockNetworkTransaction::ResumeNetworkStart() { 437 int MockNetworkTransaction::ResumeNetworkStart() {
438 // Should not get here. 438 // Should not get here.
439 return ERR_FAILED; 439 return ERR_FAILED;
440 } 440 }
441 441
442 void MockNetworkTransaction::GetConnectionAttempts(
443 ConnectionAttempts* out) const {
444 NOTIMPLEMENTED();
445 }
446
442 void MockNetworkTransaction::CallbackLater(const CompletionCallback& callback, 447 void MockNetworkTransaction::CallbackLater(const CompletionCallback& callback,
443 int result) { 448 int result) {
444 base::MessageLoop::current()->PostTask( 449 base::MessageLoop::current()->PostTask(
445 FROM_HERE, base::Bind(&MockNetworkTransaction::RunCallback, 450 FROM_HERE, base::Bind(&MockNetworkTransaction::RunCallback,
446 weak_factory_.GetWeakPtr(), callback, result)); 451 weak_factory_.GetWeakPtr(), callback, result));
447 } 452 }
448 453
449 void MockNetworkTransaction::RunCallback(const CompletionCallback& callback, 454 void MockNetworkTransaction::RunCallback(const CompletionCallback& callback,
450 int result) { 455 int result) {
451 callback.Run(result); 456 callback.Run(result);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 content.append(buf->data(), rv); 523 content.append(buf->data(), rv);
519 else if (rv < 0) 524 else if (rv < 0)
520 return rv; 525 return rv;
521 } while (rv > 0); 526 } while (rv > 0);
522 527
523 result->swap(content); 528 result->swap(content);
524 return OK; 529 return OK;
525 } 530 }
526 531
527 } // namespace net 532 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_transaction_test_util.h ('k') | net/net.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698