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

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

Issue 1466143002: arc-bridge: Enable ARC with a command-line flag (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased to ToT Created 5 years, 1 month 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/chrome_shell_delegate.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index c330a955f0fa91a936eb54ccb3895d8a0d28927e..ef02593ce831284bb86feea74c96f9e68c26e281 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -36,16 +36,13 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_switches.h"
+#include "components/arc/arc_bridge_service.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "ui/aura/window.h"
#include "ui/base/ime/chromeos/input_method_manager.h"
#include "ui/base/l10n/l10n_util.h"
-#if defined(ENABLE_ARC)
-#include "components/arc/arc_bridge_service.h"
-#endif
-
namespace {
void InitAfterFirstSessionStart() {
@@ -232,9 +229,7 @@ void ChromeShellDelegate::PreInit() {
display_configuration_observer_.reset(
new chromeos::DisplayConfigurationObserver());
-#if defined(ENABLE_ARC)
arc_session_observer_.reset(new ArcSessionObserver);
-#endif
chrome_user_metrics_recorder_.reset(new ChromeUserMetricsRecorder);
}
@@ -242,11 +237,9 @@ void ChromeShellDelegate::PreInit() {
void ChromeShellDelegate::PreShutdown() {
display_configuration_observer_.reset();
-#if defined(ENABLE_ARC)
// Remove the ARC observer now since it uses the ash::Shell instance in its
// destructor, which is unavailable after PreShutdown() returns.
arc_session_observer_.reset();
-#endif
chrome_user_metrics_recorder_.reset();
}
@@ -316,7 +309,6 @@ void ChromeShellDelegate::PlatformInit() {
content::NotificationService::AllSources());
}
-#if defined(ENABLE_ARC)
ChromeShellDelegate::ArcSessionObserver::ArcSessionObserver() {
ash::Shell::GetInstance()->AddShellObserver(this);
}
@@ -341,8 +333,10 @@ void ChromeShellDelegate::ArcSessionObserver::OnLoginStateChanged(
case ash::user::LOGGED_IN_GUEST:
case ash::user::LOGGED_IN_PUBLIC:
case ash::user::LOGGED_IN_SUPERVISED:
- arc::ArcBridgeService::Get()->HandleStartup();
+ if (arc::ArcBridgeService::GetEnabled(
+ base::CommandLine::ForCurrentProcess())) {
+ arc::ArcBridgeService::Get()->HandleStartup();
+ }
break;
}
}
-#endif
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698