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

Side by Side Diff: components/omnibox/browser/url_prefix.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 4 years, 12 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/omnibox/browser/url_prefix.h" 5 #include "components/omnibox/browser/url_prefix.h"
6 6
7 #include "base/basictypes.h"
8 #include "base/i18n/case_conversion.h" 7 #include "base/i18n/case_conversion.h"
9 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
11 10
12 namespace { 11 namespace {
13 12
14 // Like URLPrefix::BestURLPrefix() except also handles the prefix of 13 // Like URLPrefix::BestURLPrefix() except also handles the prefix of
15 // "www.". 14 // "www.".
16 const URLPrefix* BestURLPrefixWithWWWCase( 15 const URLPrefix* BestURLPrefixWithWWWCase(
17 const base::string16& text, 16 const base::string16& text,
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (!best_prefix && !fixed_up_input.empty() && (fixed_up_input != input)) { 93 if (!best_prefix && !fixed_up_input.empty() && (fixed_up_input != input)) {
95 best_prefix = allow_www_prefix_without_scheme ? 94 best_prefix = allow_www_prefix_without_scheme ?
96 BestURLPrefixWithWWWCase(text, fixed_up_input) : 95 BestURLPrefixWithWWWCase(text, fixed_up_input) :
97 BestURLPrefix(text, fixed_up_input); 96 BestURLPrefix(text, fixed_up_input);
98 matching_string = &fixed_up_input; 97 matching_string = &fixed_up_input;
99 } 98 }
100 return (best_prefix != NULL) ? 99 return (best_prefix != NULL) ?
101 (best_prefix->prefix.length() + matching_string->length()) : 100 (best_prefix->prefix.length() + matching_string->length()) :
102 base::string16::npos; 101 base::string16::npos;
103 } 102 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/url_prefix.h ('k') | components/omnibox/browser/zero_suggest_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698