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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc

Issue 819953005: Files.app: Remove multi-profile related fileManagerPrivate APIs that are no more used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
index 25d73ea4effc64b3ca59afc77d0828989008367f..f8976ed6e9ddfb2c9a15b662e3d38dcef145f4e0 100644
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_misc.cc
@@ -388,50 +388,6 @@ bool FileManagerPrivateGetProfilesFunction::RunSync() {
return true;
}
-bool FileManagerPrivateVisitDesktopFunction::RunSync() {
- using api::file_manager_private::VisitDesktop::Params;
- const scoped_ptr<Params> params(Params::Create(*args_));
- const std::vector<linked_ptr<api::file_manager_private::ProfileInfo> >&
- profiles = GetLoggedInProfileInfoList();
-
- chrome::MultiUserWindowManager* const window_manager =
- chrome::MultiUserWindowManager::GetInstance();
- DCHECK(window_manager);
-
- // Check if the target user is logged-in or not.
- bool logged_in = false;
- for (size_t i = 0; i < profiles.size(); ++i) {
- if (profiles[i]->profile_id == params->profile_id) {
- logged_in = true;
- break;
- }
- }
- if (!logged_in) {
- SetError("The user is not logged-in now.");
- return false;
- }
-
- // Look for the current app window.
- AppWindow* const app_window = GetCurrentAppWindow(this);
- if (!app_window) {
- SetError("Target window is not found.");
- return false;
- }
-
- // Move the window to the user's desktop.
- window_manager->ShowWindowForUser(app_window->GetNativeWindow(),
- params->profile_id);
-
- // Check the result.
- if (!window_manager->IsWindowOnDesktopOfUser(app_window->GetNativeWindow(),
- params->profile_id)) {
- SetError("The window cannot visit the desktop.");
- return false;
- }
-
- return true;
-}
-
bool FileManagerPrivateOpenInspectorFunction::RunSync() {
using extensions::api::file_manager_private::OpenInspector::Params;
const scoped_ptr<Params> params(Params::Create(*args_));

Powered by Google App Engine
This is Rietveld 408576698