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

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

Issue 7811006: Add full support for filesystem URLs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test updates Created 8 years, 10 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
OLDNEW
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 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 string16 result = FormatUrlWithOffsets(url, languages, format_types, 1891 string16 result = FormatUrlWithOffsets(url, languages, format_types,
1892 unescape_rules, new_parsed, prefix_end, &offsets); 1892 unescape_rules, new_parsed, prefix_end, &offsets);
1893 if (offset_for_adjustment) 1893 if (offset_for_adjustment)
1894 *offset_for_adjustment = offsets[0]; 1894 *offset_for_adjustment = offsets[0];
1895 return result; 1895 return result;
1896 } 1896 }
1897 1897
1898 bool CanStripTrailingSlash(const GURL& url) { 1898 bool CanStripTrailingSlash(const GURL& url) {
1899 // Omit the path only for standard, non-file URLs with nothing but "/" after 1899 // Omit the path only for standard, non-file URLs with nothing but "/" after
1900 // the hostname. 1900 // the hostname.
1901 return url.IsStandard() && !url.SchemeIsFile() && !url.has_query() && 1901 return url.IsStandard() && !url.SchemeIsFile() &&
1902 !url.has_ref() && url.path() == "/"; 1902 !url.SchemeIsFileSystem() && !url.has_query() && !url.has_ref()
eroman 2012/02/15 06:07:13 I see, I think I understand a bit better what this
ericu 2012/02/16 01:42:56 Having looked through again, I found two files tha
1903 && url.path() == "/";
1903 } 1904 }
1904 1905
1905 GURL SimplifyUrlForRequest(const GURL& url) { 1906 GURL SimplifyUrlForRequest(const GURL& url) {
1906 DCHECK(url.is_valid()); 1907 DCHECK(url.is_valid());
1907 GURL::Replacements replacements; 1908 GURL::Replacements replacements;
1908 replacements.ClearUsername(); 1909 replacements.ClearUsername();
1909 replacements.ClearPassword(); 1910 replacements.ClearPassword();
1910 replacements.ClearRef(); 1911 replacements.ClearRef();
1911 return url.ReplaceComponents(replacements); 1912 return url.ReplaceComponents(replacements);
1912 } 1913 }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2403 2404
2404 NetworkInterface::NetworkInterface(const std::string& name, 2405 NetworkInterface::NetworkInterface(const std::string& name,
2405 const IPAddressNumber& address) 2406 const IPAddressNumber& address)
2406 : name(name), address(address) { 2407 : name(name), address(address) {
2407 } 2408 }
2408 2409
2409 NetworkInterface::~NetworkInterface() { 2410 NetworkInterface::~NetworkInterface() {
2410 } 2411 }
2411 2412
2412 } // namespace net 2413 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698