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

Unified Diff: chrome/browser/chromeos/arc/arc_session_manager.cc

Issue 2709393003: Split ArcAuthNotification UI control flag from ArcSessionManager. (Closed)
Patch Set: Address comments. 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 | « chrome/browser/chromeos/arc/arc_auth_notification.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/arc/arc_session_manager.cc
diff --git a/chrome/browser/chromeos/arc/arc_session_manager.cc b/chrome/browser/chromeos/arc/arc_session_manager.cc
index ca0b41b7921a1c7ebec62a34b3657141f32bd982..0959bb2836deda93aa460c13f949d0bce76a0324 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager.cc
@@ -143,6 +143,9 @@ bool ArcSessionManager::IsOobeOptInActive() {
// static
void ArcSessionManager::DisableUIForTesting() {
g_disable_ui_for_testing = true;
+ // TODO(hidehiko): When the dependency to ArcAuthNotification from this
+ // class is removed, we should remove this as well.
+ ArcAuthNotification::DisableForTesting();
}
// static
@@ -469,8 +472,7 @@ void ArcSessionManager::OnIsSyncingChanged() {
return;
pref_service_syncable->RemoveObserver(this);
- if (!g_disable_ui_for_testing &&
- !base::CommandLine::ForCurrentProcess()->HasSwitch(
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kEnableArcOOBEOptIn) &&
profile_->IsNewProfile() &&
!profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) {
@@ -479,8 +481,7 @@ void ArcSessionManager::OnIsSyncingChanged() {
}
void ArcSessionManager::Shutdown() {
- if (!g_disable_ui_for_testing)
- ArcAuthNotification::Hide();
+ ArcAuthNotification::Hide();
enable_requested_ = false;
ShutdownSession();
@@ -537,10 +538,8 @@ void ArcSessionManager::OnOptInPreferenceChanged() {
// Hide auth notification if it was opened before and arc.enabled pref was
// explicitly set to true or false.
- if (!g_disable_ui_for_testing &&
- profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) {
+ if (profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled))
ArcAuthNotification::Hide();
- }
if (is_play_store_enabled)
RequestEnable();
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_notification.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698