| 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 "net/base/net_util.h" | 5 #include "net/base/net_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1687 void GetIdentityFromURL(const GURL& url, | 1687 void GetIdentityFromURL(const GURL& url, |
| 1688 string16* username, | 1688 string16* username, |
| 1689 string16* password) { | 1689 string16* password) { |
| 1690 UnescapeRule::Type flags = | 1690 UnescapeRule::Type flags = |
| 1691 UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS; | 1691 UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS; |
| 1692 *username = UnescapeAndDecodeUTF8URLComponent(url.username(), flags, NULL); | 1692 *username = UnescapeAndDecodeUTF8URLComponent(url.username(), flags, NULL); |
| 1693 *password = UnescapeAndDecodeUTF8URLComponent(url.password(), flags, NULL); | 1693 *password = UnescapeAndDecodeUTF8URLComponent(url.password(), flags, NULL); |
| 1694 } | 1694 } |
| 1695 | 1695 |
| 1696 std::string GetHostOrSpecFromURL(const GURL& url) { | 1696 std::string GetHostOrSpecFromURL(const GURL& url) { |
| 1697 return url.has_host() ? TrimEndingDot(url.host()) : url.spec(); | 1697 return url.has_host() ? |
| 1698 TrimEndingDot(url.host()) : |
| 1699 (url.is_valid() ? url.spec() : GURL::EmptyGURL().spec()); |
| 1698 } | 1700 } |
| 1699 | 1701 |
| 1700 void AppendFormattedHost(const GURL& url, | 1702 void AppendFormattedHost(const GURL& url, |
| 1701 const std::string& languages, | 1703 const std::string& languages, |
| 1702 string16* output) { | 1704 string16* output) { |
| 1703 std::vector<size_t> offsets; | 1705 std::vector<size_t> offsets; |
| 1704 AppendFormattedComponent(url.possibly_invalid_spec(), | 1706 AppendFormattedComponent(url.possibly_invalid_spec(), |
| 1705 url.parsed_for_possibly_invalid_spec().host, offsets, | 1707 url.parsed_for_possibly_invalid_spec().host, offsets, |
| 1706 HostComponentTransform(languages), output, NULL, NULL); | 1708 HostComponentTransform(languages), output, NULL, NULL); |
| 1707 } | 1709 } |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 | 2346 |
| 2345 NetworkInterface::NetworkInterface(const std::string& name, | 2347 NetworkInterface::NetworkInterface(const std::string& name, |
| 2346 const IPAddressNumber& address) | 2348 const IPAddressNumber& address) |
| 2347 : name(name), address(address) { | 2349 : name(name), address(address) { |
| 2348 } | 2350 } |
| 2349 | 2351 |
| 2350 NetworkInterface::~NetworkInterface() { | 2352 NetworkInterface::~NetworkInterface() { |
| 2351 } | 2353 } |
| 2352 | 2354 |
| 2353 } // namespace net | 2355 } // namespace net |
| OLD | NEW |