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

Side by Side Diff: chrome/browser/extensions/extension_omnibox_api.cc

Issue 6306011: Remove wstring from autocomplete. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_omnibox_api.h" 5 #include "chrome/browser/extensions/extension_omnibox_api.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 string16 replacement = 254 string16 replacement =
255 remaining_input.empty() ? kReplacementText : remaining_input; 255 remaining_input.empty() ? kReplacementText : remaining_input;
256 description.replace(placeholder, kPlaceholderText.length(), replacement); 256 description.replace(placeholder, kPlaceholderText.length(), replacement);
257 257
258 for (size_t i = 0; i < description_styles.size(); ++i) { 258 for (size_t i = 0; i < description_styles.size(); ++i) {
259 if (description_styles[i].offset > placeholder) 259 if (description_styles[i].offset > placeholder)
260 description_styles[i].offset += replacement.length() - 2; 260 description_styles[i].offset += replacement.length() - 2;
261 } 261 }
262 } 262 }
263 263
264 match->contents.assign(UTF16ToWide(description)); 264 match->contents.assign(description);
265 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698