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

Side by Side Diff: chrome/browser/chromeos/login/screens/user_image_screen.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: iwyu fixes Created 4 years, 8 months 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 (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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/time/time.h" 12 #include "base/time/time.h"
12 #include "chrome/browser/chromeos/camera_presence_notifier.h" 13 #include "chrome/browser/chromeos/camera_presence_notifier.h"
13 #include "chrome/browser/chromeos/login/screens/base_screen.h" 14 #include "chrome/browser/chromeos/login/screens/base_screen.h"
14 #include "chrome/browser/chromeos/login/screens/user_image_model.h" 15 #include "chrome/browser/chromeos/login/screens/user_image_model.h"
15 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" 16 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
16 #include "chrome/browser/image_decoder.h" 17 #include "chrome/browser/image_decoder.h"
17 #include "components/user_manager/user.h" 18 #include "components/user_manager/user.h"
18 #include "content/public/browser/notification_observer.h" 19 #include "content/public/browser/notification_observer.h"
19 #include "content/public/browser/notification_registrar.h" 20 #include "content/public/browser/notification_registrar.h"
20 21
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void HideCurtain(); 111 void HideCurtain();
111 112
112 // Closes the screen. 113 // Closes the screen.
113 void ExitScreen(); 114 void ExitScreen();
114 115
115 // Reports sync duration and result to UMA. 116 // Reports sync duration and result to UMA.
116 void ReportSyncResult(SyncResult timed_out) const; 117 void ReportSyncResult(SyncResult timed_out) const;
117 118
118 content::NotificationRegistrar notification_registrar_; 119 content::NotificationRegistrar notification_registrar_;
119 120
120 scoped_ptr<policy::PolicyChangeRegistrar> policy_registrar_; 121 std::unique_ptr<policy::PolicyChangeRegistrar> policy_registrar_;
121 122
122 UserImageView* view_; 123 UserImageView* view_;
123 124
124 // Last user photo, if taken. 125 // Last user photo, if taken.
125 gfx::ImageSkia user_photo_; 126 gfx::ImageSkia user_photo_;
126 127
127 // If |true|, decoded photo should be immediately accepted (i.e., both 128 // If |true|, decoded photo should be immediately accepted (i.e., both
128 // HandleTakePhoto and HandleImageAccepted have already been called but we're 129 // HandleTakePhoto and HandleImageAccepted have already been called but we're
129 // still waiting for photo image decoding to finish. 130 // still waiting for photo image decoding to finish.
130 bool accept_photo_after_decoding_; 131 bool accept_photo_after_decoding_;
131 132
132 // Index of the selected user image. 133 // Index of the selected user image.
133 int selected_image_; 134 int selected_image_;
134 135
135 // Timer used for waiting for user image sync. 136 // Timer used for waiting for user image sync.
136 scoped_ptr<base::Timer> sync_timer_; 137 std::unique_ptr<base::Timer> sync_timer_;
137 138
138 // If screen ready to be shown. 139 // If screen ready to be shown.
139 bool is_screen_ready_; 140 bool is_screen_ready_;
140 141
141 // True if user has explicitly selected some image. 142 // True if user has explicitly selected some image.
142 bool user_has_selected_image_; 143 bool user_has_selected_image_;
143 144
144 // The time when we started wait for user image sync. 145 // The time when we started wait for user image sync.
145 base::Time sync_waiting_start_time_; 146 base::Time sync_waiting_start_time_;
146 147
147 DISALLOW_COPY_AND_ASSIGN(UserImageScreen); 148 DISALLOW_COPY_AND_ASSIGN(UserImageScreen);
148 }; 149 };
149 150
150 } // namespace chromeos 151 } // namespace chromeos
151 152
152 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_ 153 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_IMAGE_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698