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

Unified Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2681663004: Mustash: Ignore --mash flag when comparing flags in UserSessionManager. (Closed)
Patch Set: Created 3 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/session/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 61c3de9feb182e269cc116c0439633da34662e5a..17bdfaed53c1a16bdc46e4f5e56992c886dfb2bd 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -77,6 +77,7 @@
#include "chrome/browser/ui/app_list/app_list_service.h"
#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/startup/startup_browser_creator.h"
+#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
@@ -107,6 +108,7 @@
#include "components/user_manager/user_manager.h"
#include "components/user_manager/user_names.h"
#include "components/user_manager/user_type.h"
+#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/storage_partition.h"
@@ -290,6 +292,21 @@ bool NeedRestartToApplyPerSessionFlags(
return false;
}
+#if BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
+ // TODO(mfomitchev): When running Mustash, the flags stored in Profile Prefs
+ // will contain --mash, while the browser command line will not (and should
+ // not) have it. Also, the restart functionality doesn't currently work in
+ // Mustash. So if we detect that we are running Mustash - just return false.
+ // crbug.com/644350
+ version_info::Channel channel = chrome::GetChannel();
James Cook 2017/02/07 21:07:32 Is there any particular reason to do the channel c
mfomitchev 2017/02/07 21:42:59 Just being extra careful to not affect anything in
+ if (channel == version_info::Channel::CANARY ||
+ channel == version_info::Channel::UNKNOWN) {
+ if (out_command_line_difference->find("--mash") !=
+ out_command_line_difference->end())
James Cook 2017/02/07 21:07:31 nit: not strictly needed for style guide, but I wo
mfomitchev 2017/02/07 21:42:59 I changed the code - let me know if you still want
+ return false;
+ }
+#endif // BUILDFLAG(ENABLE_PACKAGE_MASH_SERVICES)
+
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698