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

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

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: Created 6 years, 5 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
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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 return net::OK; 417 return net::OK;
418 418
419 CallbackLater(callback, net::OK); 419 CallbackLater(callback, net::OK);
420 return net::ERR_IO_PENDING; 420 return net::ERR_IO_PENDING;
421 } 421 }
422 422
423 void MockNetworkTransaction::SetBeforeNetworkStartCallback( 423 void MockNetworkTransaction::SetBeforeNetworkStartCallback(
424 const BeforeNetworkStartCallback& callback) { 424 const BeforeNetworkStartCallback& callback) {
425 } 425 }
426 426
427 void MockNetworkTransaction::SetBeforeProxyHeadersSentCallback(
428 const BeforeProxyHeadersSentCallback& callback) {
429 }
430
427 int MockNetworkTransaction::ResumeNetworkStart() { 431 int MockNetworkTransaction::ResumeNetworkStart() {
428 // Should not get here. 432 // Should not get here.
429 return net::ERR_FAILED; 433 return net::ERR_FAILED;
430 } 434 }
431 435
432 void MockNetworkTransaction::CallbackLater( 436 void MockNetworkTransaction::CallbackLater(
433 const net::CompletionCallback& callback, int result) { 437 const net::CompletionCallback& callback, int result) {
434 base::MessageLoop::current()->PostTask( 438 base::MessageLoop::current()->PostTask(
435 FROM_HERE, base::Bind(&MockNetworkTransaction::RunCallback, 439 FROM_HERE, base::Bind(&MockNetworkTransaction::RunCallback,
436 weak_factory_.GetWeakPtr(), callback, result)); 440 weak_factory_.GetWeakPtr(), callback, result));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 498
495 if (rv > 0) 499 if (rv > 0)
496 content.append(buf->data(), rv); 500 content.append(buf->data(), rv);
497 else if (rv < 0) 501 else if (rv < 0)
498 return rv; 502 return rv;
499 } while (rv > 0); 503 } while (rv > 0);
500 504
501 result->swap(content); 505 result->swap(content);
502 return net::OK; 506 return net::OK;
503 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698