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

Side by Side Diff: url/url_canon_internal.cc

Issue 56043002: Make our codebase less entertaining. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « url/url_canon_internal.h ('k') | no next file » | 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 #include <errno.h> 5 #include <errno.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include <cstdio> 8 #include <cstdio>
9 #include <string> 9 #include <string>
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if (override_source) { 67 if (override_source) {
68 *dest = override_source; 68 *dest = override_source;
69 *dest_component = override_component; 69 *dest_component = override_component;
70 } 70 }
71 } 71 }
72 72
73 // Similar to DoOverrideComponent except that it takes a UTF-16 input and does 73 // Similar to DoOverrideComponent except that it takes a UTF-16 input and does
74 // not actually set the output character pointer. 74 // not actually set the output character pointer.
75 // 75 //
76 // The input is converted to UTF-8 at the end of the given buffer as a temporary 76 // The input is converted to UTF-8 at the end of the given buffer as a temporary
77 // holding place. The component indentifying the portion of the buffer used in 77 // holding place. The component identifying the portion of the buffer used in
78 // the |utf8_buffer| will be specified in |*dest_component|. 78 // the |utf8_buffer| will be specified in |*dest_component|.
79 // 79 //
80 // This will not actually set any |dest| pointer like DoOverrideComponent 80 // This will not actually set any |dest| pointer like DoOverrideComponent
81 // does because all of the pointers will point into the |utf8_buffer|, which 81 // does because all of the pointers will point into the |utf8_buffer|, which
82 // may get resized while we're overriding a subsequent component. Instead, the 82 // may get resized while we're overriding a subsequent component. Instead, the
83 // caller should use the beginning of the |utf8_buffer| as the string pointer 83 // caller should use the beginning of the |utf8_buffer| as the string pointer
84 // for all components once all overrides have been prepared. 84 // for all components once all overrides have been prepared.
85 bool PrepareUTF16OverrideComponent( 85 bool PrepareUTF16OverrideComponent(
86 const base::char16* override_source, 86 const base::char16* override_source,
87 const url_parse::Component& override_component, 87 const url_parse::Component& override_component,
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 for (int i = 0; i < written; ++i) { 396 for (int i = 0; i < written; ++i) {
397 buffer[i] = static_cast<base::char16>(temp[i]); 397 buffer[i] = static_cast<base::char16>(temp[i]);
398 } 398 }
399 buffer[written] = '\0'; 399 buffer[written] = '\0';
400 return 0; 400 return 0;
401 } 401 }
402 402
403 #endif // !WIN32 403 #endif // !WIN32
404 404
405 } // namespace url_canon 405 } // namespace url_canon
OLDNEW
« no previous file with comments | « url/url_canon_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698