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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2171213002: Merge: ARC Opt in notification not shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_notification.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/shelf/shelf_delegate.h" 9 #include "ash/shelf/shelf_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (!pref_service_syncable->IsSyncing()) 389 if (!pref_service_syncable->IsSyncing())
390 return; 390 return;
391 391
392 pref_service_syncable->RemoveObserver(this); 392 pref_service_syncable->RemoveObserver(this);
393 393
394 if (IsArcEnabled()) 394 if (IsArcEnabled())
395 OnOptInPreferenceChanged(); 395 OnOptInPreferenceChanged();
396 396
397 if (!disable_ui_for_testing && profile_->IsNewProfile() && 397 if (!disable_ui_for_testing && profile_->IsNewProfile() &&
398 !profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) { 398 !profile_->GetPrefs()->HasPrefPath(prefs::kArcEnabled)) {
399 arc::ArcAuthNotification::Show(); 399 ArcAuthNotification::Show(profile_);
400 } 400 }
401 } 401 }
402 402
403 void ArcAuthService::Shutdown() { 403 void ArcAuthService::Shutdown() {
404 ShutdownBridgeAndCloseUI(); 404 ShutdownBridgeAndCloseUI();
405 if (profile_) { 405 if (profile_) {
406 syncable_prefs::PrefServiceSyncable* pref_service_syncable = 406 syncable_prefs::PrefServiceSyncable* pref_service_syncable =
407 PrefServiceSyncableFromProfile(profile_); 407 PrefServiceSyncableFromProfile(profile_);
408 pref_service_syncable->RemoveObserver(this); 408 pref_service_syncable->RemoveObserver(this);
409 pref_service_syncable->RemoveSyncedPrefObserver(prefs::kArcEnabled, this); 409 pref_service_syncable->RemoveSyncedPrefObserver(prefs::kArcEnabled, this);
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 return os << kStateFetchingCode; 751 return os << kStateFetchingCode;
752 case ArcAuthService::State::ACTIVE: 752 case ArcAuthService::State::ACTIVE:
753 return os << kStateActive; 753 return os << kStateActive;
754 default: 754 default:
755 NOTREACHED(); 755 NOTREACHED();
756 return os; 756 return os;
757 } 757 }
758 } 758 }
759 759
760 } // namespace arc 760 } // namespace arc
OLDNEW
« 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