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

Unified Diff: components/omnibox/browser/autocomplete_controller.cc

Issue 2048693003: Misc. omnibox cleanup: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resync Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/browser/autocomplete_controller.cc
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc
index 5cf72d5830bb56595e3d6509a42d6f2fe2c83b0a..f5f2e7e0ce1f5ea67c42129f5441c69a38900301 100644
--- a/components/omnibox/browser/autocomplete_controller.cc
+++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -175,10 +175,10 @@ AutocompleteController::AutocompleteController(
int provider_types)
: delegate_(delegate),
provider_client_(std::move(provider_client)),
- history_url_provider_(NULL),
- keyword_provider_(NULL),
- search_provider_(NULL),
- zero_suggest_provider_(NULL),
+ history_url_provider_(nullptr),
+ keyword_provider_(nullptr),
+ search_provider_(nullptr),
+ zero_suggest_provider_(nullptr),
stop_timer_duration_(OmniboxFieldTrial::StopTimerFieldTrialDuration()),
done_(true),
in_start_(false),
@@ -408,9 +408,10 @@ void AutocompleteController::UpdateResult(
if (last_default_was_valid) {
last_default_fill_into_edit = result_.default_match()->fill_into_edit;
last_default_keyword = result_.default_match()->keyword;
- if (result_.default_match()->associated_keyword != NULL)
+ if (result_.default_match()->associated_keyword) {
last_default_associated_keyword =
result_.default_match()->associated_keyword->keyword;
+ }
}
if (regenerate_result)
@@ -447,7 +448,7 @@ void AutocompleteController::UpdateResult(
const bool default_is_valid = result_.default_match() != result_.end();
base::string16 default_associated_keyword;
if (default_is_valid &&
- (result_.default_match()->associated_keyword != NULL)) {
+ result_.default_match()->associated_keyword) {
default_associated_keyword =
result_.default_match()->associated_keyword->keyword;
}
« no previous file with comments | « no previous file | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698