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

Side by Side Diff: url/url_canon.h

Issue 662713004: Type conversion fixes, url/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | url/url_canon_fileurl.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 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_H_ 5 #ifndef URL_URL_CANON_H_
6 #define URL_URL_CANON_H_ 6 #define URL_URL_CANON_H_
7 7
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 29 matching lines...) Expand all
40 virtual void Resize(int sz) = 0; 40 virtual void Resize(int sz) = 0;
41 41
42 // Accessor for returning a character at a given position. The input offset 42 // Accessor for returning a character at a given position. The input offset
43 // must be in the valid range. 43 // must be in the valid range.
44 inline char at(int offset) const { 44 inline char at(int offset) const {
45 return buffer_[offset]; 45 return buffer_[offset];
46 } 46 }
47 47
48 // Sets the character at the given position. The given position MUST be less 48 // Sets the character at the given position. The given position MUST be less
49 // than the length(). 49 // than the length().
50 inline void set(int offset, int ch) { 50 inline void set(int offset, char ch) {
brettw 2014/10/17 17:31:17 This should be "T" instead of char. Can you fix th
Peter Kasting 2014/10/17 22:49:07 Done.
51 buffer_[offset] = ch; 51 buffer_[offset] = ch;
52 } 52 }
53 53
54 // Returns the number of characters currently in the buffer. 54 // Returns the number of characters currently in the buffer.
55 inline int length() const { 55 inline int length() const {
56 return cur_len_; 56 return cur_len_;
57 } 57 }
58 58
59 // Returns the current capacity of the buffer. The length() is the number of 59 // Returns the current capacity of the buffer. The length() is the number of
60 // characters that have been declared to be written, but the capacity() is 60 // characters that have been declared to be written, but the capacity() is
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 bool base_is_file, 883 bool base_is_file,
884 const base::char16* relative_url, 884 const base::char16* relative_url,
885 const Component& relative_component, 885 const Component& relative_component,
886 CharsetConverter* query_converter, 886 CharsetConverter* query_converter,
887 CanonOutput* output, 887 CanonOutput* output,
888 Parsed* out_parsed); 888 Parsed* out_parsed);
889 889
890 } // namespace url 890 } // namespace url
891 891
892 #endif // URL_URL_CANON_H_ 892 #endif // URL_URL_CANON_H_
OLDNEW
« no previous file with comments | « no previous file | url/url_canon_fileurl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698