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

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

Issue 1676023002: Make IPAddress::FromIPLiteral a member function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // by a cache hit. 384 // by a cache hit.
385 load_timing_info->socket_reused = true; 385 load_timing_info->socket_reused = true;
386 load_timing_info->send_start = base::TimeTicks::Now(); 386 load_timing_info->send_start = base::TimeTicks::Now();
387 load_timing_info->send_end = base::TimeTicks::Now(); 387 load_timing_info->send_end = base::TimeTicks::Now();
388 } 388 }
389 return true; 389 return true;
390 } 390 }
391 391
392 bool MockNetworkTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const { 392 bool MockNetworkTransaction::GetRemoteEndpoint(IPEndPoint* endpoint) const {
393 IPAddress ip_address; 393 IPAddress ip_address;
394 CHECK(IPAddress::FromIPLiteral("127.0.0.1", &ip_address)); 394 CHECK(ip_address.AssignFromIPLiteral("127.0.0.1"));
395 *endpoint = IPEndPoint(ip_address, 80); 395 *endpoint = IPEndPoint(ip_address, 80);
396 return true; 396 return true;
397 } 397 }
398 398
399 void MockNetworkTransaction::SetPriority(RequestPriority priority) { 399 void MockNetworkTransaction::SetPriority(RequestPriority priority) {
400 priority_ = priority; 400 priority_ = priority;
401 } 401 }
402 402
403 void MockNetworkTransaction::SetWebSocketHandshakeStreamCreateHelper( 403 void MockNetworkTransaction::SetWebSocketHandshakeStreamCreateHelper(
404 WebSocketHandshakeStreamBase::CreateHelper* create_helper) { 404 WebSocketHandshakeStreamBase::CreateHelper* create_helper) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 content.append(buf->data(), rv); 570 content.append(buf->data(), rv);
571 else if (rv < 0) 571 else if (rv < 0)
572 return rv; 572 return rv;
573 } while (rv > 0); 573 } while (rv > 0);
574 574
575 result->swap(content); 575 result->swap(content);
576 return OK; 576 return OK;
577 } 577 }
578 578
579 } // namespace net 579 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698