diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 20:47:10 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-14 20:47:10 +0000 |
commit | c7fb2da33ffbf5f6bc997b8f1f8a8370ab0f3f8c (patch) | |
tree | c17fb9ce9b135be58f2da0841038e2389baf8b04 /chrome/browser/webdata/web_data_service.cc | |
parent | ecaa8009f2f44ea46ec3fafc1cf608099f9a2caa (diff) | |
download | chromium_src-c7fb2da33ffbf5f6bc997b8f1f8a8370ab0f3f8c.zip chromium_src-c7fb2da33ffbf5f6bc997b8f1f8a8370ab0f3f8c.tar.gz chromium_src-c7fb2da33ffbf5f6bc997b8f1f8a8370ab0f3f8c.tar.bz2 |
Moves responsibility for showing profile error dialog out of Browser
and into a standalone function. This way we can show the error dialog
if no browser is around (as can happen during startup).
BUG=74639
TEST=none
R=ben@chromium.org,avi@chromium.org,estade@chromium.org
Review URL: http://codereview.chromium.org/6838031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81637 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/webdata/web_data_service.cc')
-rw-r--r-- | chrome/browser/webdata/web_data_service.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc index e14cc32..30d3f33 100644 --- a/chrome/browser/webdata/web_data_service.cc +++ b/chrome/browser/webdata/web_data_service.cc @@ -11,6 +11,7 @@ #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/browser/autofill/credit_card.h" #include "chrome/browser/search_engines/template_url.h" +#include "chrome/browser/ui/profile_error_dialog.h" #include "chrome/browser/webdata/autofill_change.h" #include "chrome/browser/webdata/autofill_entry.h" #include "chrome/browser/webdata/web_database.h" @@ -569,11 +570,9 @@ void WebDataService::RegisterRequest(WebDataRequest* request) { //////////////////////////////////////////////////////////////////////////////// void WebDataService::DBInitFailed(sql::InitStatus init_status) { - Source<WebDataService> source(this); - int message_id = (init_status == sql::INIT_FAILURE) ? - IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR; - NotificationService::current()->Notify(NotificationType::PROFILE_ERROR, - source, Details<int>(&message_id)); + ShowProfileErrorDialog( + (init_status == sql::INIT_FAILURE) ? + IDS_COULDNT_OPEN_PROFILE_ERROR : IDS_PROFILE_TOO_NEW_ERROR); } void WebDataService::InitializeDatabaseIfNecessary() { |