Chromium Code Reviews| 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 ed2636ba4a1f43fbfdfa5f93acfc503bfd13599e..a671d5de1b35e2d1d06e4f404505ad96c9af1703 100644 |
| --- a/chrome/browser/chromeos/arc/arc_session_manager.cc |
| +++ b/chrome/browser/chromeos/arc/arc_session_manager.cc |
| @@ -167,6 +167,7 @@ void ArcSessionManager::OnSessionStopped(StopReason reason) { |
| if (profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested)) { |
| // This should be always true, but just in case as this is looked at |
| // inside RemoveArcData() at first. |
| + VLOG(1) << "ARC had previously requested to remove user data."; |
| DCHECK(arc_session_runner_->IsStopped()); |
| RemoveArcData(); |
| } else { |
| @@ -196,6 +197,7 @@ void ArcSessionManager::RemoveArcData() { |
| return; |
| } |
| + VLOG(1) << "Starting ARC data removal"; |
| SetState(State::REMOVING_DATA_DIR); |
| chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->RemoveArcData( |
| cryptohome::Identification( |
| @@ -205,7 +207,10 @@ void ArcSessionManager::RemoveArcData() { |
| } |
| void ArcSessionManager::OnArcDataRemoved(bool success) { |
| - LOG_IF(ERROR, !success) << "Required ARC user data wipe failed."; |
| + if (success) |
| + VLOG(1) << "ARC data removal successful"; |
| + else |
| + LOG(ERROR) << "Request for ARC user data removal failed."; |
| // TODO(khmel): Browser tests may shutdown profile by itself. Update browser |
| // tests and remove this check. |
| @@ -362,6 +367,7 @@ void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) { |
| result == ProvisioningResult::OVERALL_SIGN_IN_TIMEOUT || |
| // Just to be safe, remove data if we don't know the cause. |
| result == ProvisioningResult::UNKNOWN_ERROR) { |
| + VLOG(1) << "ARC provisioning failed: " << result << ". Removing user data"; |
|
hidehiko
2017/02/08 04:19:33
How about logging in L320 or so? After the line, w
Luis Héctor Chávez
2017/02/08 18:11:16
I want to comply with the comment I'm adding to Re
|
| RemoveArcData(); |
| } |
| @@ -436,11 +442,13 @@ void ArcSessionManager::OnPrimaryUserProfilePrepared(Profile* profile) { |
| // ARC once data removal finishes. |
| if (profile_->GetPrefs()->GetBoolean(prefs::kArcDataRemoveRequested)) { |
| reenable_arc_ = true; |
| + VLOG(1) << "ARC previously requested to remove data."; |
| RemoveArcData(); |
| } else { |
| OnOptInPreferenceChanged(); |
| } |
| } else { |
| + VLOG(1) << "ARC disabled on profile. Removing data."; |
| RemoveArcData(); |
| PrefServiceSyncableFromProfile(profile_)->AddObserver(this); |
| OnIsSyncingChanged(); |
| @@ -537,7 +545,8 @@ void ArcSessionManager::OnOptInPreferenceChanged() { |
| } |
| if (!arc_enabled) { |
| - // Reset any pending request to re-enable Arc. |
| + // Reset any pending request to re-enable ARC. |
| + VLOG(1) << "ARC opt-out. Removing user data."; |
| reenable_arc_ = false; |
| StopArc(); |
| RemoveArcData(); |
| @@ -978,8 +987,8 @@ std::ostream& operator<<(std::ostream& os, |
| return os << "ACTIVE"; |
| } |
| - // Some compiler reports an error even if all values of an enum-class are |
| - // covered indivisually in a switch statement. |
| + // Some compilers report an error even if all values of an enum-class are |
| + // covered exhaustively in a switch statement. |
| NOTREACHED(); |
| return os; |
|
Yusuke Sato
2017/02/08 07:48:55
same
Luis Héctor Chávez
2017/02/08 18:11:16
Done.
|
| } |