Index: chrome/browser/ui/ash/screenshot_taker.cc |
diff --git a/chrome/browser/ui/ash/screenshot_taker.cc b/chrome/browser/ui/ash/screenshot_taker.cc |
index 548e93f54184d73eb6f7161dd719a60e5d7f4bdf..89991d5d8d8c095105e22bd40b4ce6fdee296278 100644 |
--- a/chrome/browser/ui/ash/screenshot_taker.cc |
+++ b/chrome/browser/ui/ash/screenshot_taker.cc |
@@ -39,6 +39,7 @@ |
#include "chrome/browser/chromeos/login/user_manager.h" |
#include "chrome/browser/notifications/desktop_notification_service.h" |
#include "chrome/browser/notifications/desktop_notification_service_factory.h" |
+#include "chromeos/login/login_state.h" |
#endif |
namespace { |
@@ -352,6 +353,11 @@ void ScreenshotTaker::ShowNotification( |
const base::FilePath& screenshot_path) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
#if defined(OS_CHROMEOS) |
+ // Do not show a notification that a screenshot was taken when it was done |
+ // while no user the login screen. |
James Cook
2013/08/09 20:09:16
nit: Maybe add the "why" here -- because it's conf
Mr4D (OOO till 08-26)
2013/08/09 20:35:45
Done.
|
+ if (!chromeos::LoginState::Get()->IsUserLoggedIn()) |
+ return; |
+ |
// TODO(sschmitz): make this work for Windows. |
DesktopNotificationService* const service = |
DesktopNotificationServiceFactory::GetForProfile(GetProfile()); |