Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 } | 280 } |
| 281 | 281 |
| 282 void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) { | 282 void ArcSessionManager::OnProvisioningFinished(ProvisioningResult result) { |
| 283 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 283 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 284 | 284 |
| 285 // Due asynchronous nature of stopping the ARC instance, | 285 // Due asynchronous nature of stopping the ARC instance, |
| 286 // OnProvisioningFinished may arrive after setting the |State::STOPPED| state | 286 // OnProvisioningFinished may arrive after setting the |State::STOPPED| state |
| 287 // and |State::Active| is not guaranteed to be set here. | 287 // and |State::Active| is not guaranteed to be set here. |
| 288 // prefs::kArcDataRemoveRequested also can be active for now. | 288 // prefs::kArcDataRemoveRequested also can be active for now. |
| 289 | 289 |
| 290 if (!IsArcEnabled()) { | |
|
hidehiko
2017/01/05 08:18:02
This check does not work in more complicated situa
khmel
2017/01/05 22:55:53
Done.
| |
| 291 LOG(WARNING) << " Provisioning result received after Arc was disabled. " | |
|
hidehiko
2017/01/05 08:18:02
Please remove a space between '"' and P. Ditto for
khmel
2017/01/05 22:55:53
The reason of this situation is the same as for li
| |
| 292 << " Ignoring result " << static_cast<int>(result) << "."; | |
| 293 return; | |
| 294 } | |
| 295 | |
| 290 if (provisioning_reported_) { | 296 if (provisioning_reported_) { |
| 291 // We don't expect ProvisioningResult::SUCCESS is reported twice or reported | 297 // We don't expect ProvisioningResult::SUCCESS is reported twice or reported |
| 292 // after an error. | 298 // after an error. |
| 293 DCHECK_NE(result, ProvisioningResult::SUCCESS); | 299 DCHECK_NE(result, ProvisioningResult::SUCCESS); |
| 294 // TODO (khmel): Consider changing LOG to NOTREACHED once we guaranty that | 300 // TODO (khmel): Consider changing LOG to NOTREACHED once we guaranty that |
| 295 // no double message can happen in production. | 301 // no double message can happen in production. |
| 296 LOG(WARNING) << " Provisioning result was already reported. Ignoring " | 302 LOG(WARNING) << " Provisioning result was already reported. Ignoring " |
| 297 << " additional result " << static_cast<int>(result) << "."; | 303 << " additional result " << static_cast<int>(result) << "."; |
| 298 return; | 304 return; |
| 299 } | 305 } |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 986 return os << "ACTIVE"; | 992 return os << "ACTIVE"; |
| 987 } | 993 } |
| 988 | 994 |
| 989 // Some compiler reports an error even if all values of an enum-class are | 995 // Some compiler reports an error even if all values of an enum-class are |
| 990 // covered indivisually in a switch statement. | 996 // covered indivisually in a switch statement. |
| 991 NOTREACHED(); | 997 NOTREACHED(); |
| 992 return os; | 998 return os; |
| 993 } | 999 } |
| 994 | 1000 |
| 995 } // namespace arc | 1001 } // namespace arc |
| OLD | NEW |