| Index: chrome/browser/background/background_contents_service.cc
|
| diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
|
| index 90a5107c13d2863ff74c5b3ce371540c16904799..406411bdc348518fbf0cd879e50a01c64c37022d 100644
|
| --- a/chrome/browser/background/background_contents_service.cc
|
| +++ b/chrome/browser/background/background_contents_service.cc
|
| @@ -67,6 +67,7 @@ using extensions::UnloadedExtensionInfo;
|
| namespace {
|
|
|
| const char kNotificationPrefix[] = "app.background.crashed.";
|
| +bool g_disable_close_balloon_for_testing = false;
|
|
|
| void CloseBalloon(const std::string& balloon_id, ProfileID profile_id) {
|
| NotificationUIManager* notification_ui_manager =
|
| @@ -84,7 +85,7 @@ void CloseBalloon(const std::string& balloon_id, ProfileID profile_id) {
|
|
|
| // Closes the crash notification balloon for the app/extension with this id.
|
| void ScheduleCloseBalloon(const std::string& extension_id, Profile* profile) {
|
| - if (!base::MessageLoop::current()) // For unit_tests
|
| + if (g_disable_close_balloon_for_testing)
|
| return;
|
| base::MessageLoop::current()->PostTask(
|
| FROM_HERE,
|
| @@ -293,6 +294,12 @@ void BackgroundContentsService::ShowBalloonForTesting(
|
| ShowBalloon(extension, profile);
|
| }
|
|
|
| +// static
|
| +void BackgroundContentsService::DisableCloseBalloonForTesting(
|
| + bool disable_close_balloon_for_testing) {
|
| + g_disable_close_balloon_for_testing = disable_close_balloon_for_testing;
|
| +}
|
| +
|
| std::vector<BackgroundContents*>
|
| BackgroundContentsService::GetBackgroundContents() const
|
| {
|
|
|