Chromium Code Reviews| 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 #include "components/omnibox/browser/autocomplete_controller.h" | 5 #include "components/omnibox/browser/autocomplete_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 AutocompleteController::AutocompleteController( | 170 AutocompleteController::AutocompleteController( |
| 171 scoped_ptr<AutocompleteProviderClient> provider_client, | 171 scoped_ptr<AutocompleteProviderClient> provider_client, |
| 172 AutocompleteControllerDelegate* delegate, | 172 AutocompleteControllerDelegate* delegate, |
| 173 int provider_types) | 173 int provider_types) |
| 174 : delegate_(delegate), | 174 : delegate_(delegate), |
| 175 provider_client_(std::move(provider_client)), | 175 provider_client_(std::move(provider_client)), |
| 176 history_url_provider_(NULL), | 176 history_url_provider_(NULL), |
| 177 keyword_provider_(NULL), | 177 keyword_provider_(NULL), |
| 178 search_provider_(NULL), | 178 search_provider_(NULL), |
| 179 zero_suggest_provider_(NULL), | 179 zero_suggest_provider_(NULL), |
| 180 stop_timer_duration_(OmniboxFieldTrial::StopTimerFieldTrialDuration()), | 180 stop_timer_duration_(base::TimeDelta::FromMilliseconds(1500)), |
|
Mark P
2016/01/14 05:31:02
I wouldn't be surprised if we decide to experiment
Ilya Sherman
2016/01/14 05:40:41
I'd argue that it's easy enough to restore, but I
| |
| 181 done_(true), | 181 done_(true), |
| 182 in_start_(false), | 182 in_start_(false), |
| 183 template_url_service_(provider_client_->GetTemplateURLService()) { | 183 template_url_service_(provider_client_->GetTemplateURLService()) { |
| 184 provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes(); | 184 provider_types &= ~OmniboxFieldTrial::GetDisabledProviderTypes(); |
| 185 if (provider_types & AutocompleteProvider::TYPE_BOOKMARK) | 185 if (provider_types & AutocompleteProvider::TYPE_BOOKMARK) |
| 186 providers_.push_back(new BookmarkProvider(provider_client_.get())); | 186 providers_.push_back(new BookmarkProvider(provider_client_.get())); |
| 187 if (provider_types & AutocompleteProvider::TYPE_BUILTIN) | 187 if (provider_types & AutocompleteProvider::TYPE_BUILTIN) |
| 188 providers_.push_back(new BuiltinProvider(provider_client_.get())); | 188 providers_.push_back(new BuiltinProvider(provider_client_.get())); |
| 189 if (provider_types & AutocompleteProvider::TYPE_HISTORY_QUICK) | 189 if (provider_types & AutocompleteProvider::TYPE_HISTORY_QUICK) |
| 190 providers_.push_back(new HistoryQuickProvider(provider_client_.get())); | 190 providers_.push_back(new HistoryQuickProvider(provider_client_.get())); |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 652 expire_timer_.Stop(); | 652 expire_timer_.Stop(); |
| 653 stop_timer_.Stop(); | 653 stop_timer_.Stop(); |
| 654 done_ = true; | 654 done_ = true; |
| 655 if (clear_result && !result_.empty()) { | 655 if (clear_result && !result_.empty()) { |
| 656 result_.Reset(); | 656 result_.Reset(); |
| 657 // NOTE: We pass in false since we're trying to only clear the popup, not | 657 // NOTE: We pass in false since we're trying to only clear the popup, not |
| 658 // touch the edit... this is all a mess and should be cleaned up :( | 658 // touch the edit... this is all a mess and should be cleaned up :( |
| 659 NotifyChanged(false); | 659 NotifyChanged(false); |
| 660 } | 660 } |
| 661 } | 661 } |
| OLD | NEW |