| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/net/predictor.h" | 5 #include "chrome/browser/net/predictor.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <sstream> | 10 #include <sstream> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/string_util.h" | 14 #include "base/stringprintf.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/net/preconnect.h" | 17 #include "chrome/browser/net/preconnect.h" |
| 18 #include "content/browser/browser_thread.h" | 18 #include "content/browser/browser_thread.h" |
| 19 #include "net/base/address_list.h" | 19 #include "net/base/address_list.h" |
| 20 #include "net/base/completion_callback.h" | 20 #include "net/base/completion_callback.h" |
| 21 #include "net/base/host_port_pair.h" | 21 #include "net/base/host_port_pair.h" |
| 22 #include "net/base/host_resolver.h" | 22 #include "net/base/host_resolver.h" |
| 23 #include "net/base/net_errors.h" | 23 #include "net/base/net_errors.h" |
| 24 #include "net/base/net_log.h" | 24 #include "net/base/net_log.h" |
| (...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 // If we omit a port, it will default to 80 or 443 as appropriate. | 765 // If we omit a port, it will default to 80 or 443 as appropriate. |
| 766 std::string colon_plus_port; | 766 std::string colon_plus_port; |
| 767 if (url.has_port()) | 767 if (url.has_port()) |
| 768 colon_plus_port = ":" + url.port(); | 768 colon_plus_port = ":" + url.port(); |
| 769 | 769 |
| 770 return GURL(scheme + "://" + url.host() + colon_plus_port); | 770 return GURL(scheme + "://" + url.host() + colon_plus_port); |
| 771 } | 771 } |
| 772 | 772 |
| 773 | 773 |
| 774 } // namespace chrome_browser_net | 774 } // namespace chrome_browser_net |
| OLD | NEW |