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

Side by Side Diff: url/url_canon_internal_file.h

Issue 1270443006: Proof-read comments in src/url/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef URL_URL_CANON_INTERNAL_FILE_H_ 5 #ifndef URL_URL_CANON_INTERNAL_FILE_H_
6 #define URL_URL_CANON_INTERNAL_FILE_H_ 6 #define URL_URL_CANON_INTERNAL_FILE_H_
7 7
8 // As with url_canon_internal.h, this file is intended to be included in 8 // As with url_canon_internal.h, this file is intended to be included in
9 // another C++ file where the template types are defined. This allows the 9 // another C++ file where the template types are defined. This allows the
10 // programmer to use this to use these functions for their own strings 10 // programmer to use this to use these functions for their own strings
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // should probably handle validity checking of UNC hosts differently than 106 // should probably handle validity checking of UNC hosts differently than
107 // for regular IP hosts. 107 // for regular IP hosts.
108 bool success = URLCanonInternal<CHAR, UCHAR>::DoHost( 108 bool success = URLCanonInternal<CHAR, UCHAR>::DoHost(
109 source.host, parsed.host, output, &new_parsed->host); 109 source.host, parsed.host, output, &new_parsed->host);
110 110
111 // Write a separator for the start of the path. We'll ignore any slashes 111 // Write a separator for the start of the path. We'll ignore any slashes
112 // already at the beginning of the path. 112 // already at the beginning of the path.
113 new_parsed->path.begin = output->length(); 113 new_parsed->path.begin = output->length();
114 output->push_back('/'); 114 output->push_back('/');
115 115
116 // Copies and normalizes the "c:" at the beginning, if present. 116 // Copy and normalize the "c:" at the beginning, if present.
117 int after_drive = FileDoDriveSpec(source.path, parsed.path.begin, 117 int after_drive = FileDoDriveSpec(source.path, parsed.path.begin,
118 parsed.path.end(), output); 118 parsed.path.end(), output);
119 119
120 // Copies the rest of the path 120 // Copy the rest of the path.
121 FileDoPath<CHAR, UCHAR>(source.path, after_drive, parsed.path.end(), output); 121 FileDoPath<CHAR, UCHAR>(source.path, after_drive, parsed.path.end(), output);
122 new_parsed->path.len = output->length() - new_parsed->path.begin; 122 new_parsed->path.len = output->length() - new_parsed->path.begin;
123 123
124 // Things following the path we can use the standard canonicalizers for. 124 // For things following the path, we can use the standard canonicalizers.
125 success &= URLCanonInternal<CHAR, UCHAR>::DoQuery( 125 success &= URLCanonInternal<CHAR, UCHAR>::DoQuery(
126 source.query, parsed.query, output, &new_parsed->query); 126 source.query, parsed.query, output, &new_parsed->query);
127 success &= URLCanonInternal<CHAR, UCHAR>::DoRef( 127 success &= URLCanonInternal<CHAR, UCHAR>::DoRef(
128 source.ref, parsed.ref, output, &new_parsed->ref); 128 source.ref, parsed.ref, output, &new_parsed->ref);
129 129
130 return success; 130 return success;
131 } 131 }
132 132
133 } // namespace url 133 } // namespace url
134 134
135 #endif // URL_URL_CANON_INTERNAL_FILE_H_ 135 #endif // URL_URL_CANON_INTERNAL_FILE_H_
OLDNEW
« url/gurl.h ('K') | « url/url_canon_internal.cc ('k') | url/url_canon_ip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698