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

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: Fix merge errors Created 8 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/mime_sniffer.cc ('k') | ui/base/text/text_elider.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) 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 1890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1901 string16 result = FormatUrlWithOffsets(url, languages, format_types, 1901 string16 result = FormatUrlWithOffsets(url, languages, format_types,
1902 unescape_rules, new_parsed, prefix_end, &offsets); 1902 unescape_rules, new_parsed, prefix_end, &offsets);
1903 if (offset_for_adjustment) 1903 if (offset_for_adjustment)
1904 *offset_for_adjustment = offsets[0]; 1904 *offset_for_adjustment = offsets[0];
1905 return result; 1905 return result;
1906 } 1906 }
1907 1907
1908 bool CanStripTrailingSlash(const GURL& url) { 1908 bool CanStripTrailingSlash(const GURL& url) {
1909 // Omit the path only for standard, non-file URLs with nothing but "/" after 1909 // Omit the path only for standard, non-file URLs with nothing but "/" after
1910 // the hostname. 1910 // the hostname.
1911 return url.IsStandard() && !url.SchemeIsFile() && !url.has_query() && 1911 return url.IsStandard() && !url.SchemeIsFile() &&
1912 !url.has_ref() && url.path() == "/"; 1912 !url.SchemeIsFileSystem() && !url.has_query() && !url.has_ref()
1913 && url.path() == "/";
1913 } 1914 }
1914 1915
1915 GURL SimplifyUrlForRequest(const GURL& url) { 1916 GURL SimplifyUrlForRequest(const GURL& url) {
1916 DCHECK(url.is_valid()); 1917 DCHECK(url.is_valid());
1917 GURL::Replacements replacements; 1918 GURL::Replacements replacements;
1918 replacements.ClearUsername(); 1919 replacements.ClearUsername();
1919 replacements.ClearPassword(); 1920 replacements.ClearPassword();
1920 replacements.ClearRef(); 1921 replacements.ClearRef();
1921 return url.ReplaceComponents(replacements); 1922 return url.ReplaceComponents(replacements);
1922 } 1923 }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
2413 2414
2414 NetworkInterface::NetworkInterface(const std::string& name, 2415 NetworkInterface::NetworkInterface(const std::string& name,
2415 const IPAddressNumber& address) 2416 const IPAddressNumber& address)
2416 : name(name), address(address) { 2417 : name(name), address(address) {
2417 } 2418 }
2418 2419
2419 NetworkInterface::~NetworkInterface() { 2420 NetworkInterface::~NetworkInterface() {
2420 } 2421 }
2421 2422
2422 } // namespace net 2423 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mime_sniffer.cc ('k') | ui/base/text/text_elider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698