OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <map> | 8 #include <map> |
9 #include <unicode/ucnv.h> | 9 #include <unicode/ucnv.h> |
10 #include <unicode/uidna.h> | 10 #include <unicode/uidna.h> |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 if (result != 0) { | 1271 if (result != 0) { |
1272 DLOG(INFO) << "gethostname() failed with " << result; | 1272 DLOG(INFO) << "gethostname() failed with " << result; |
1273 buffer[0] = '\0'; | 1273 buffer[0] = '\0'; |
1274 } | 1274 } |
1275 return std::string(buffer); | 1275 return std::string(buffer); |
1276 } | 1276 } |
1277 | 1277 |
1278 void GetIdentityFromURL(const GURL& url, | 1278 void GetIdentityFromURL(const GURL& url, |
1279 std::wstring* username, | 1279 std::wstring* username, |
1280 std::wstring* password) { | 1280 std::wstring* password) { |
1281 UnescapeRule::Type flags = UnescapeRule::SPACES; | 1281 UnescapeRule::Type flags = |
| 1282 UnescapeRule::SPACES | UnescapeRule::URL_SPECIAL_CHARS; |
1282 *username = UTF16ToWideHack(UnescapeAndDecodeUTF8URLComponent(url.username(), | 1283 *username = UTF16ToWideHack(UnescapeAndDecodeUTF8URLComponent(url.username(), |
1283 flags, NULL)); | 1284 flags, NULL)); |
1284 *password = UTF16ToWideHack(UnescapeAndDecodeUTF8URLComponent(url.password(), | 1285 *password = UTF16ToWideHack(UnescapeAndDecodeUTF8URLComponent(url.password(), |
1285 flags, NULL)); | 1286 flags, NULL)); |
1286 } | 1287 } |
1287 | 1288 |
1288 void AppendFormattedHost(const GURL& url, | 1289 void AppendFormattedHost(const GURL& url, |
1289 const std::wstring& languages, | 1290 const std::wstring& languages, |
1290 std::wstring* output, | 1291 std::wstring* output, |
1291 url_parse::Parsed* new_parsed, | 1292 url_parse::Parsed* new_parsed, |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1676 | 1677 |
1677 IPv6SupportResults(IPV6_GLOBAL_ADDRESS_MISSING); | 1678 IPv6SupportResults(IPV6_GLOBAL_ADDRESS_MISSING); |
1678 return false; | 1679 return false; |
1679 #else | 1680 #else |
1680 NOTIMPLEMENTED(); | 1681 NOTIMPLEMENTED(); |
1681 return true; | 1682 return true; |
1682 #endif // defined(various platforms) | 1683 #endif // defined(various platforms) |
1683 } | 1684 } |
1684 | 1685 |
1685 } // namespace net | 1686 } // namespace net |
OLD | NEW |