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

Unified Diff: chrome/browser/chromeos/login/user_image_screen.cc

Issue 4228002: Moved ownership of camera thread to user image screen (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/user_image_screen.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_image_screen.cc
diff --git a/chrome/browser/chromeos/login/user_image_screen.cc b/chrome/browser/chromeos/login/user_image_screen.cc
index 3aa68b070437bb464a7266ea82940023b8a146e8..9016652066bf2406daafffdb0bbe1a108c091bce 100644
--- a/chrome/browser/chromeos/login/user_image_screen.cc
+++ b/chrome/browser/chromeos/login/user_image_screen.cc
@@ -31,17 +31,22 @@ const int kMaxCaptureFailureCounter = 5;
// Maximum number of camera initialization retries.
const int kMaxCameraInitFailureCounter = 3;
+// Name for camera thread.
+const char kCameraThreadName[] = "Chrome_CameraThread";
+
} // namespace
UserImageScreen::UserImageScreen(WizardScreenDelegate* delegate)
: ViewScreen<UserImageView>(delegate),
- ALLOW_THIS_IN_INITIALIZER_LIST(camera_(new Camera(this, true))),
capture_failure_counter_(0),
- camera_init_failure_counter_(0) {
+ camera_init_failure_counter_(0),
+ camera_thread_(kCameraThreadName) {
registrar_.Add(
this,
NotificationType::SCREEN_LOCK_STATE_CHANGED,
NotificationService::AllSources());
+ camera_thread_.Start();
+ camera_ = new Camera(this, &camera_thread_, true);
camera_->Initialize(kFrameWidth, kFrameHeight);
}
« no previous file with comments | « chrome/browser/chromeos/login/user_image_screen.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698