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

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

Issue 2567083002: Migrate ArcBridgeService::Observer and ArcSession::Observer. (Closed)
Patch Set: rebase Created 4 years 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_session_manager.h" 5 #include "chrome/browser/chromeos/arc/arc_session_manager.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/common/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 185 }
186 186
187 return true; 187 return true;
188 } 188 }
189 189
190 // static 190 // static
191 bool ArcSessionManager::IsArcKioskMode() { 191 bool ArcSessionManager::IsArcKioskMode() {
192 return user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp(); 192 return user_manager::UserManager::Get()->IsLoggedInAsArcKioskApp();
193 } 193 }
194 194
195 void ArcSessionManager::OnBridgeStopped(ArcBridgeService::StopReason reason) { 195 void ArcSessionManager::OnSessionStopped(StopReason reason) {
196 // TODO(crbug.com/625923): Use |reason| to report more detailed errors. 196 // TODO(crbug.com/625923): Use |reason| to report more detailed errors.
197 if (arc_sign_in_timer_.IsRunning()) { 197 if (arc_sign_in_timer_.IsRunning())
198 OnProvisioningFinished(ProvisioningResult::ARC_STOPPED); 198 OnProvisioningFinished(ProvisioningResult::ARC_STOPPED);
199 }
200 199
201 if (profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested)) { 200 if (profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested)) {
202 // This should be always true, but just in case as this is looked at 201 // This should be always true, but just in case as this is looked at
203 // inside RemoveArcData() at first. 202 // inside RemoveArcData() at first.
204 DCHECK(arc_bridge_service()->stopped()); 203 DCHECK(arc_bridge_service()->stopped());
205 RemoveArcData(); 204 RemoveArcData();
206 } else { 205 } else {
207 // To support special "Stop and enable ARC" procedure for enterprise, 206 // To support special "Stop and enable ARC" procedure for enterprise,
208 // here call MaybeReenableArc() asyncronously. 207 // here call MaybeReenableArc() asyncronously.
209 // TODO(hidehiko): Restructure the code. crbug.com/665316 208 // TODO(hidehiko): Restructure the code. crbug.com/665316
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 return os << "ACTIVE"; 922 return os << "ACTIVE";
924 } 923 }
925 924
926 // Some compiler reports an error even if all values of an enum-class are 925 // Some compiler reports an error even if all values of an enum-class are
927 // covered indivisually in a switch statement. 926 // covered indivisually in a switch statement.
928 NOTREACHED(); 927 NOTREACHED();
929 return os; 928 return os;
930 } 929 }
931 930
932 } // namespace arc 931 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698