OLD | NEW |
---|---|
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 COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ | 5 #ifndef COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ |
6 #define COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ | 6 #define COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/gtest_prod_util.h" | 14 #include "base/gtest_prod_util.h" |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/synchronization/cancellation_flag.h" | 16 #include "base/synchronization/cancellation_flag.h" |
17 #include "base/threading/sequenced_task_runner_handle.h" | |
17 #include "base/threading/thread_checker.h" | 18 #include "base/threading/thread_checker.h" |
18 #include "components/history/core/browser/history_match.h" | 19 #include "components/history/core/browser/history_match.h" |
19 #include "components/omnibox/browser/autocomplete_input.h" | 20 #include "components/omnibox/browser/autocomplete_input.h" |
20 #include "components/omnibox/browser/history_provider.h" | 21 #include "components/omnibox/browser/history_provider.h" |
21 #include "components/omnibox/browser/omnibox_field_trial.h" | 22 #include "components/omnibox/browser/omnibox_field_trial.h" |
22 #include "components/search_engines/template_url.h" | 23 #include "components/search_engines/template_url.h" |
23 | 24 |
24 class AutocompleteProviderListener; | 25 class AutocompleteProviderListener; |
25 class SearchTermsData; | 26 class SearchTermsData; |
26 | 27 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
100 NEITHER, | 101 NEITHER, |
101 }; | 102 }; |
102 | 103 |
103 HistoryURLProviderParams(const AutocompleteInput& input, | 104 HistoryURLProviderParams(const AutocompleteInput& input, |
104 bool trim_http, | 105 bool trim_http, |
105 const AutocompleteMatch& what_you_typed_match, | 106 const AutocompleteMatch& what_you_typed_match, |
106 TemplateURL* default_search_provider, | 107 TemplateURL* default_search_provider, |
107 const SearchTermsData& search_terms_data); | 108 const SearchTermsData& search_terms_data); |
108 ~HistoryURLProviderParams(); | 109 ~HistoryURLProviderParams(); |
109 | 110 |
110 base::MessageLoop* message_loop; | 111 const scoped_refptr<base::SequencedTaskRunner> origin_task_runner = |
112 base::SequencedTaskRunnerHandle::Get(); | |
Peter Kasting
2016/10/19 18:07:11
Nit: Can we initialize this in the constructor ins
fdoray
2016/10/20 13:50:40
Done.
| |
111 | 113 |
112 // A copy of the autocomplete input. We need the copy since this object will | 114 // A copy of the autocomplete input. We need the copy since this object will |
113 // live beyond the original query while it runs on the history thread. | 115 // live beyond the original query while it runs on the history thread. |
114 AutocompleteInput input; | 116 AutocompleteInput input; |
115 | 117 |
116 // Should inline autocompletion be disabled? This is initalized from | 118 // Should inline autocompletion be disabled? This is initalized from |
117 // |input.prevent_inline_autocomplete()|, but set to false is the input | 119 // |input.prevent_inline_autocomplete()|, but set to false is the input |
118 // contains trailing white space. | 120 // contains trailing white space. |
119 bool prevent_inline_autocomplete; | 121 bool prevent_inline_autocomplete; |
120 | 122 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
342 | 344 |
343 // Params controlling experimental behavior of this provider. | 345 // Params controlling experimental behavior of this provider. |
344 HUPScoringParams scoring_params_; | 346 HUPScoringParams scoring_params_; |
345 | 347 |
346 base::ThreadChecker thread_checker_; | 348 base::ThreadChecker thread_checker_; |
347 | 349 |
348 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); | 350 DISALLOW_COPY_AND_ASSIGN(HistoryURLProvider); |
349 }; | 351 }; |
350 | 352 |
351 #endif // COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ | 353 #endif // COMPONENTS_OMNIBOX_BROWSER_HISTORY_URL_PROVIDER_H_ |
OLD | NEW |