diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-18 00:19:44 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-18 00:19:44 +0000 |
commit | b3b2d6e76a2cfbb02933298c565d3718b0288774 (patch) | |
tree | 548c4d8fe0b7c7d22c44e045a61c7719977359cc /chrome/browser/search_engines/template_url_model.h | |
parent | 5786d3d3a7cd151fb5dc0aa2f1f0d84460fb6cdf (diff) | |
download | chromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.zip chromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.tar.gz chromium_src-b3b2d6e76a2cfbb02933298c565d3718b0288774.tar.bz2 |
Fixes two related bugs:
. If we can't init the web db a dialog is shown to the user.
. If we can't init the web db the default search provider no longer
becomes NULL.
BUG=28374
TEST=none
Review URL: http://codereview.chromium.org/501090
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines/template_url_model.h')
-rw-r--r-- | chrome/browser/search_engines/template_url_model.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/search_engines/template_url_model.h b/chrome/browser/search_engines/template_url_model.h index 044ec23..5b76234 100644 --- a/chrome/browser/search_engines/template_url_model.h +++ b/chrome/browser/search_engines/template_url_model.h @@ -320,6 +320,9 @@ class TemplateURLModel : public WebDataServiceConsumer, // Whether the keywords have been loaded. bool loaded_; + // Did loading fail? This is only valid if loaded_ is true. + bool load_failed_; + // If non-zero, we're waiting on a load. WebDataService::Handle load_handle_; @@ -340,8 +343,8 @@ class TemplateURLModel : public WebDataServiceConsumer, const TemplateURL* default_search_provider_; // The default search provider from preferences. This is only valid if - // GetDefaultSearchProvider is invoked and we haven't been loaded. Once loaded - // this is not used. + // GetDefaultSearchProvider is invoked and we haven't been loaded or loading + // failed. If loading was successful this is not used. scoped_ptr<TemplateURL> prefs_default_search_provider_; // ID assigned to next TemplateURL added to this model. This is an ever |