Chromium Code Reviews| Index: chrome/browser/ui/global_error_service.cc |
| diff --git a/chrome/browser/ui/global_error_service.cc b/chrome/browser/ui/global_error_service.cc |
| index 3e47cc89f2fd8b75c9041175247661225af37744..19bd38a491a5077414f5fb6eb2d2425f131f703d 100644 |
| --- a/chrome/browser/ui/global_error_service.cc |
| +++ b/chrome/browser/ui/global_error_service.cc |
| @@ -7,6 +7,7 @@ |
| #include <algorithm> |
| #include "base/stl_util.h" |
| +#include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/ui/global_error.h" |
| #include "chrome/common/chrome_notification_types.h" |
| #include "content/public/browser/notification_service.h" |
| @@ -60,8 +61,18 @@ GlobalError* GlobalErrorService::GetFirstGlobalErrorWithBubbleView() const { |
| } |
| void GlobalErrorService::NotifyErrorsChanged(GlobalError* error) { |
| - content::NotificationService::current()->Notify( |
| - chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
| - content::Source<Profile>(profile_), |
| - content::Details<GlobalError>(error)); |
| + std::vector<Profile*> profiles_to_notify; |
|
sail
2011/12/08 17:44:45
can you add a DCHECK() for ServiceRedirectedInInco
whywhat
2011/12/09 11:14:33
I've added comment. How can I check ServiceRedirec
sail
2011/12/09 17:43:51
Ahh damn, never mind.
|
| + if (profile_ != NULL) { |
| + profiles_to_notify.push_back(profile_); |
| + if (profile_->IsOffTheRecord()) |
| + profiles_to_notify.push_back(profile_->GetOriginalProfile()); |
| + else if (profile_->HasOffTheRecordProfile()) |
| + profiles_to_notify.push_back(profile_->GetOffTheRecordProfile()); |
| + for (size_t i = 0; i < profiles_to_notify.size(); ++i) { |
| + content::NotificationService::current()->Notify( |
| + chrome::NOTIFICATION_GLOBAL_ERRORS_CHANGED, |
| + content::Source<Profile>(profiles_to_notify[i]), |
| + content::Details<GlobalError>(error)); |
| + } |
| + } |
| } |