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

Side by Side Diff: chrome/browser/autocomplete/history_provider.h

Issue 105193002: Replace string16 with base::string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/autocomplete/autocomplete_provider.h" 9 #include "chrome/browser/autocomplete/autocomplete_provider.h"
10 #include "chrome/browser/history/in_memory_url_index_types.h" 10 #include "chrome/browser/history/in_memory_url_index_types.h"
(...skipping 28 matching lines...) Expand all
39 // e.g. we convert a Unicode hostname to punycode, other providers will show 39 // e.g. we convert a Unicode hostname to punycode, other providers will show
40 // output that surprises the user ("Search Google for xn--6ca.com"). 40 // output that surprises the user ("Search Google for xn--6ca.com").
41 // Returns false if the fixup attempt resulted in an empty string (which 41 // Returns false if the fixup attempt resulted in an empty string (which
42 // providers generally can't do anything with). 42 // providers generally can't do anything with).
43 static bool FixupUserInput(AutocompleteInput* input); 43 static bool FixupUserInput(AutocompleteInput* input);
44 44
45 // Trims "http:" and up to two subsequent slashes from |url|. Returns the 45 // Trims "http:" and up to two subsequent slashes from |url|. Returns the
46 // number of characters that were trimmed. 46 // number of characters that were trimmed.
47 // NOTE: For a view-source: URL, this will trim from after "view-source:" and 47 // NOTE: For a view-source: URL, this will trim from after "view-source:" and
48 // return 0. 48 // return 0.
49 static size_t TrimHttpPrefix(string16* url); 49 static size_t TrimHttpPrefix(base::string16* url);
50 50
51 // Returns true if inline autocompletion should be prevented. Use this instead 51 // Returns true if inline autocompletion should be prevented. Use this instead
52 // of |input.prevent_inline_autocomplete| if the input is passed through 52 // of |input.prevent_inline_autocomplete| if the input is passed through
53 // FixupUserInput(). This method returns true if 53 // FixupUserInput(). This method returns true if
54 // |input.prevent_inline_autocomplete()| is true or the input text contains 54 // |input.prevent_inline_autocomplete()| is true or the input text contains
55 // trailing whitespace. 55 // trailing whitespace.
56 bool PreventInlineAutocomplete(const AutocompleteInput& input); 56 bool PreventInlineAutocomplete(const AutocompleteInput& input);
57 57
58 // Fill and return an ACMatchClassifications structure given the |matches| 58 // Fill and return an ACMatchClassifications structure given the |matches|
59 // to highlight. 59 // to highlight.
60 static ACMatchClassifications SpansFromTermMatch( 60 static ACMatchClassifications SpansFromTermMatch(
61 const history::TermMatches& matches, 61 const history::TermMatches& matches,
62 size_t text_length, 62 size_t text_length,
63 bool is_url); 63 bool is_url);
64 }; 64 };
65 65
66 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_ 66 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/extension_app_provider_unittest.cc ('k') | chrome/browser/autocomplete/history_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698