OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" | 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 0, | 64 0, |
65 &address_list, | 65 &address_list, |
66 NULL); | 66 NULL); |
67 ASSERT_EQ(net::OK, rv); | 67 ASSERT_EQ(net::OK, rv); |
68 } else { | 68 } else { |
69 ASSERT_TRUE(ip_literal.empty()); | 69 ASSERT_TRUE(ip_literal.empty()); |
70 } | 70 } |
71 | 71 |
72 // Add entry to the cache. | 72 // Add entry to the cache. |
73 cache->Set(net::HostCache::Key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0), | 73 cache->Set(net::HostCache::Key(hostname, net::ADDRESS_FAMILY_UNSPECIFIED, 0), |
74 net_error, | 74 net::HostCache::Entry(net_error, address_list), |
75 address_list, | |
76 base::TimeTicks::Now(), | 75 base::TimeTicks::Now(), |
77 ttl); | 76 ttl); |
78 } | 77 } |
79 | 78 |
80 // Called on IO thread. Adds an entry to the list of known HTTP pipelining | 79 // Called on IO thread. Adds an entry to the list of known HTTP pipelining |
81 // hosts. | 80 // hosts. |
82 void AddDummyHttpPipelineFeedbackOnIOThread( | 81 void AddDummyHttpPipelineFeedbackOnIOThread( |
83 net::URLRequestContextGetter* context_getter, | 82 net::URLRequestContextGetter* context_getter, |
84 const std::string& hostname, | 83 const std::string& hostname, |
85 int port, | 84 int port, |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 GURL url_loader = test_server()->GetURL(replacement_path); | 356 GURL url_loader = test_server()->GetURL(replacement_path); |
358 return url_loader; | 357 return url_loader; |
359 } | 358 } |
360 | 359 |
361 bool NetInternalsTest::StartTestServer() { | 360 bool NetInternalsTest::StartTestServer() { |
362 if (test_server_started_) | 361 if (test_server_started_) |
363 return true; | 362 return true; |
364 test_server_started_ = test_server()->Start(); | 363 test_server_started_ = test_server()->Start(); |
365 return test_server_started_; | 364 return test_server_started_; |
366 } | 365 } |
OLD | NEW |