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

Side by Side Diff: base/utf_offset_string_conversions.cc

Issue 7149008: Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 2) (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix nits Created 9 years, 6 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 | « base/metrics/histogram_unittest.cc ('k') | content/browser/renderer_host/p2p/socket_host_tcp.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/utf_offset_string_conversions.h" 5 #include "base/utf_offset_string_conversions.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string_piece.h" 10 #include "base/string_piece.h"
11 #include "base/utf_string_conversion_utils.h" 11 #include "base/utf_string_conversion_utils.h"
12 12
13 using base::PrepareForUTF16Or32Output; 13 using base::PrepareForUTF16Or32Output;
14 using base::ReadUnicodeCharacter; 14 using base::ReadUnicodeCharacter;
15 using base::WriteUnicodeCharacter; 15 using base::WriteUnicodeCharacter;
16 16
17 // Converts the given source Unicode character type to the given destination 17 // Converts the given source Unicode character type to the given destination
18 // Unicode character type as a STL string. The given input buffer and size 18 // Unicode character type as a STL string. The given input buffer and size
19 // determine the source, and the given output STL string will be replaced by 19 // determine the source, and the given output STL string will be replaced by
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (*offset <= i->original_offset) 135 if (*offset <= i->original_offset)
136 break; 136 break;
137 if (*offset < (i->original_offset + i->original_length)) { 137 if (*offset < (i->original_offset + i->original_length)) {
138 *offset = string16::npos; 138 *offset = string16::npos;
139 return; 139 return;
140 } 140 }
141 adjustment += (i->original_length - i->output_length); 141 adjustment += (i->original_length - i->output_length);
142 } 142 }
143 *offset -= adjustment; 143 *offset -= adjustment;
144 } 144 }
OLDNEW
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | content/browser/renderer_host/p2p/socket_host_tcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698