diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 00:59:27 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 00:59:27 +0000 |
commit | 4e6ffdeb72dead790b276ea580210c9f4584b277 (patch) | |
tree | 38c694d4b644929990b178a4ca93a4cbefb7231e /chrome/browser/autocomplete/history_url_provider.cc | |
parent | 8ba7fa577750fea29b7ed2bb8b65010fd0c2d17a (diff) | |
download | chromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.zip chromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.tar.gz chromium_src-4e6ffdeb72dead790b276ea580210c9f4584b277.tar.bz2 |
Fix uninitialized constructors and reverse NULL checks found by Coverity
CID=15466,14666,14747,14334,13593,13507,7591
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6674007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77739 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/history_url_provider.cc')
-rw-r--r-- | chrome/browser/autocomplete/history_url_provider.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc index 0dafe8e..65a60f5 100644 --- a/chrome/browser/autocomplete/history_url_provider.cc +++ b/chrome/browser/autocomplete/history_url_provider.cc @@ -576,6 +576,8 @@ void HistoryURLProvider::RunAutocompletePasses( matches_.push_back(SuggestExactInput(input, trim_http)); // We'll need the history service to run both passes, so try to obtain it. + if (!profile_) + return; HistoryService* const history_service = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); if (!history_service) @@ -585,7 +587,7 @@ void HistoryURLProvider::RunAutocompletePasses( // onto the |params_| member for later deletion below if we need to run pass // 2. std::string languages(languages_); - if (languages.empty() && profile_) { + if (languages.empty()) { languages = profile_->GetPrefs()->GetString(prefs::kAcceptLanguages); } |