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

Unified Diff: ash/system/chromeos/multi_user/user_switch_util.h

Issue 496563002: Multiprofile security: Show a warning messagebox when desktop casting/sharing is turned on upon user (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed release unit test failure on server Created 6 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 | « ash/system/OWNERS ('k') | ash/system/chromeos/multi_user/user_switch_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/chromeos/multi_user/user_switch_util.h
diff --git a/ash/system/chromeos/multi_user/user_switch_util.h b/ash/system/chromeos/multi_user/user_switch_util.h
new file mode 100644
index 0000000000000000000000000000000000000000..965f014c028b82c009806226dc3bb5951e487a53
--- /dev/null
+++ b/ash/system/chromeos/multi_user/user_switch_util.h
@@ -0,0 +1,26 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
+#define ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
+
+#include "ash/ash_export.h"
+#include "base/callback.h"
+
+namespace ash {
+
+// Tries to switch to a new user by first checking if desktop casting / sharing
+// is going on, and let the user decide if he wants to terminate it or not.
+// After terminating any desktop sharing operations, the |switch_user| function
+// will be called.
+void ASH_EXPORT TrySwitchingActiveUser(
+ const base::Callback<void()> switch_user);
+
+// Terminates the "DesktopCastingWarning" dialog from a unit tests and |accept|s
+// it. False will be returned if there was no dialog shown.
+bool ASH_EXPORT TestAndTerminateDesktopCastingWarningForTest(bool accept);
+
+} // namespace chromeos
+
+#endif // ASH_SYSTEM_CHROMEOS_MULTI_USER_MULTI_USER_SWITCH_UTIL_H_
« no previous file with comments | « ash/system/OWNERS ('k') | ash/system/chromeos/multi_user/user_switch_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698