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

Unified Diff: chrome/browser/autocomplete/builtin_provider.cc

Issue 296593003: Make various string_util functions take StringPieces instead of char[]. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resync Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/builtin_provider.cc
diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc
index 5b35c75fa0317aa646997e622f0d0e11c2f752a2..df0fc434d451ec6c92644baaae757a76775e4c48 100644
--- a/chrome/browser/autocomplete/builtin_provider.cc
+++ b/chrome/browser/autocomplete/builtin_provider.cc
@@ -107,8 +107,7 @@ void BuiltinProvider::Start(const AutocompleteInput& input,
!url.has_query() && !url.has_ref()) {
// Include the path for sub-pages (e.g. "chrome://settings/browser").
base::string16 host_and_path = base::UTF8ToUTF16(url.host() + url.path());
- base::TrimString(host_and_path, base::ASCIIToUTF16("/").c_str(),
- &host_and_path);
+ base::TrimString(host_and_path, base::ASCIIToUTF16("/"), &host_and_path);
size_t match_length = kChrome.length() + host_and_path.length();
for (Builtins::const_iterator i(builtins_.begin());
(i != builtins_.end()) && (matches_.size() < kMaxMatches); ++i) {
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_input.cc ('k') | chrome/browser/chromeos/drive/file_system_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698