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

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: Addressed 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/screenshot_taker_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f1764fb948b27a6a32825976694830a81d0d2563 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,12 @@ 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 while no user is
+ // logged in, since it is confusing for the user to get a message about it
+ // after he logs in (crbug.com/235217).
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698