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

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

Issue 2775873002: Adds the ability to run chromeos with mus (Closed)
Patch Set: merge 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
« no previous file with comments | « chrome/browser/ui/ash/ash_util.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 451ad3ceda4e820d0e9123c4ab433038bcdf4184..9bce24158cb8441842c6ff67fd86f0a135c03c72 100644
--- a/chrome/browser/ui/ash/ash_util.cc
+++ b/chrome/browser/ui/ash/ash_util.cc
@@ -8,9 +8,11 @@
#include "ash/common/mojo_interface_factory.h"
#include "ash/public/interfaces/event_properties.mojom.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"
@@ -60,7 +62,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) {
« no previous file with comments | « chrome/browser/ui/ash/ash_util.h ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698