Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Unified Diff: chrome/browser/ui/ash/screenshot_taker.cc

Issue 22715006: Suppressing screenshot messages as long as the login screen is shown and no user is logged in. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « no previous file | chrome/browser/ui/ash/screenshot_taker_unittest.cc » ('j') | chrome/browser/ui/ash/screenshot_taker_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698