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

Unified Diff: chrome/browser/ui/ash/ash_util.cc

Issue 2775873002: Adds the ability to run chromeos with mus (Closed)
Patch Set: Created 3 years, 9 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/ui/ash/ash_util.cc
diff --git a/chrome/browser/ui/ash/ash_util.cc b/chrome/browser/ui/ash/ash_util.cc
index 77ef383bddac3a5919dfdb2baddb44ac1b455d19..4cd9986d097d519af820a3d7c72015079efeb6a1 100644
--- a/chrome/browser/ui/ash/ash_util.cc
+++ b/chrome/browser/ui/ash/ash_util.cc
@@ -7,9 +7,11 @@
#include "ash/common/accelerators/accelerator_controller.h"
#include "ash/common/mojo_interface_factory.h"
#include "ash/shell.h"
+#include "base/command_line.h"
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/browser/ui/ash/ash_init.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/common/service_names.mojom.h"
#include "services/service_manager/public/cpp/interface_registry.h"
#include "services/service_manager/public/cpp/service.h"
@@ -59,7 +61,17 @@ bool ShouldOpenAshOnStartup() {
}
bool IsRunningInMash() {
- return service_manager::ServiceManagerIsRemote();
+ return GetConfig() == Config::MASH;
+}
+
+Config GetConfig() {
+ if (!service_manager::ServiceManagerIsRemote())
+ return Config::CLASSIC;
+
+ return base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
+ switches::kMusConfig) == switches::kMash
+ ? Config::MASH
+ : Config::MUS;
}
bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) {

Powered by Google App Engine
This is Rietveld 408576698