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

Side by Side Diff: net/base/net_util.cc

Issue 1614001: Pull latest googleurl to get it to stop unescaping at signs in paths.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/base/escape_unittest.cc ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698