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

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

Issue 8359019: Create Private Data for InMemoryURLIndex (in Preparation for SQLite Cache) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | chrome/browser/autocomplete/history_quick_provider.cc » ('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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 history::InMemoryURLIndex* GetIndex(); 74 history::InMemoryURLIndex* GetIndex();
75 75
76 // Fill and return an ACMatchClassifications structure given the term 76 // Fill and return an ACMatchClassifications structure given the term
77 // matches (|matches|) to highlight where terms were found. 77 // matches (|matches|) to highlight where terms were found.
78 static ACMatchClassifications SpansFromTermMatch( 78 static ACMatchClassifications SpansFromTermMatch(
79 const history::TermMatches& matches, 79 const history::TermMatches& matches,
80 size_t text_length, 80 size_t text_length,
81 bool is_url); 81 bool is_url);
82 82
83 // Only for use in unittests. Takes ownership of |index|. 83 // Only for use in unittests. Takes ownership of |index|.
84 void SetIndexForTesting(history::InMemoryURLIndex* index); 84 void set_index(history::InMemoryURLIndex* index) {
85 index_for_testing_.reset(index);
86 }
87
85 AutocompleteInput autocomplete_input_; 88 AutocompleteInput autocomplete_input_;
86 std::string languages_; 89 std::string languages_;
87 90
88 // Only used for testing. 91 // Only used for testing.
89 scoped_ptr<history::InMemoryURLIndex> index_for_testing_; 92 scoped_ptr<history::InMemoryURLIndex> index_for_testing_;
90 93
91 // This provider is disabled when true. 94 // This provider is disabled when true.
92 static bool disabled_; 95 static bool disabled_;
93 }; 96 };
94 97
95 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_ 98 #endif // CHROME_BROWSER_AUTOCOMPLETE_HISTORY_QUICK_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autocomplete/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698