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

Unified Diff: chrome/browser/ui/ash/multi_user/multi_user_util.cc

Issue 149703006: Fixing problem with browser invocations from a visiting files application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Win Created 6 years, 11 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 | « chrome/browser/ui/ash/multi_user/multi_user_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/multi_user/multi_user_util.cc
diff --git a/chrome/browser/ui/ash/multi_user/multi_user_util.cc b/chrome/browser/ui/ash/multi_user/multi_user_util.cc
index 0d9250d4c135ee952193679eb3745249965b5892..0b99c9808305da2c6ae03f6b0251e66682443e63 100644
--- a/chrome/browser/ui/ash/multi_user/multi_user_util.cc
+++ b/chrome/browser/ui/ash/multi_user/multi_user_util.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "base/strings/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
@@ -70,4 +71,21 @@ bool IsProfileFromActiveUser(Profile* profile) {
#endif
}
+const std::string& GetCurrentUserId() {
+#if defined(OS_CHROMEOS)
+ return chromeos::UserManager::Get()->GetActiveUser()->email();
+#else
+ return base::EmptyString();
+#endif
+}
+
+// Move the window to the current user's desktop.
+void MoveWindowToCurrentDesktop(aura::Window* window) {
+#if defined(OS_CHROMEOS)
+ chrome::MultiUserWindowManager::GetInstance()->ShowWindowForUser(
+ window,
+ GetCurrentUserId());
+#endif
+}
+
} // namespace multi_user_util
« no previous file with comments | « chrome/browser/ui/ash/multi_user/multi_user_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698