| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/login/screens/user_image_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/user_image_screen.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 } | 327 } |
| 328 if (view_) | 328 if (view_) |
| 329 view_->HideCurtain(); | 329 view_->HideCurtain(); |
| 330 } | 330 } |
| 331 | 331 |
| 332 void UserImageScreen::ExitScreen() { | 332 void UserImageScreen::ExitScreen() { |
| 333 policy_registrar_.reset(); | 333 policy_registrar_.reset(); |
| 334 sync_timer_.reset(); | 334 sync_timer_.reset(); |
| 335 if (UserImageSyncObserver* sync_observer = GetSyncObserver()) | 335 if (UserImageSyncObserver* sync_observer = GetSyncObserver()) |
| 336 sync_observer->RemoveObserver(this); | 336 sync_observer->RemoveObserver(this); |
| 337 Finish(BaseScreenDelegate::USER_IMAGE_SELECTED); | 337 Finish(ScreenExitCode::USER_IMAGE_SELECTED); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void UserImageScreen::ReportSyncResult(SyncResult timed_out) const { | 340 void UserImageScreen::ReportSyncResult(SyncResult timed_out) const { |
| 341 base::TimeDelta duration = base::Time::Now() - sync_waiting_start_time_; | 341 base::TimeDelta duration = base::Time::Now() - sync_waiting_start_time_; |
| 342 UMA_HISTOGRAM_TIMES("Login.NewUserPriorityPrefsSyncTime", duration); | 342 UMA_HISTOGRAM_TIMES("Login.NewUserPriorityPrefsSyncTime", duration); |
| 343 UMA_HISTOGRAM_ENUMERATION("Login.NewUserPriorityPrefsSyncResult", | 343 UMA_HISTOGRAM_ENUMERATION("Login.NewUserPriorityPrefsSyncResult", |
| 344 static_cast<int>(timed_out), | 344 static_cast<int>(timed_out), |
| 345 static_cast<int>(SyncResult::COUNT)); | 345 static_cast<int>(SyncResult::COUNT)); |
| 346 } | 346 } |
| 347 | 347 |
| 348 } // namespace chromeos | 348 } // namespace chromeos |
| OLD | NEW |