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

Side by Side Diff: chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h" 20 #include "chrome/browser/chromeos/login/users/avatar/user_image_loader.h"
21 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" 21 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h"
22 #include "chrome/browser/chromeos/login/users/user.h"
23 #include "chrome/browser/profiles/profile_downloader_delegate.h" 22 #include "chrome/browser/profiles/profile_downloader_delegate.h"
23 #include "components/user_manager/user.h"
24 #include "ui/gfx/image/image_skia.h" 24 #include "ui/gfx/image/image_skia.h"
25 25
26 class ProfileDownloader; 26 class ProfileDownloader;
27 27
28 namespace base { 28 namespace base {
29 class FilePath; 29 class FilePath;
30 class SequencedTaskRunner; 30 class SequencedTaskRunner;
31 } 31 }
32 32
33 namespace user_manager { 33 namespace user_manager {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Completes migration by removing the user from the old prefs 138 // Completes migration by removing the user from the old prefs
139 // dictionary. 139 // dictionary.
140 void UpdateLocalStateAfterMigration(); 140 void UpdateLocalStateAfterMigration();
141 141
142 // Create a sync observer if a user is logged in, the user's user image is 142 // Create a sync observer if a user is logged in, the user's user image is
143 // allowed to be synced and no sync observer exists yet. 143 // allowed to be synced and no sync observer exists yet.
144 void TryToCreateImageSyncObserver(); 144 void TryToCreateImageSyncObserver();
145 145
146 // Returns immutable version of user with |user_id_|. 146 // Returns immutable version of user with |user_id_|.
147 const User* GetUser() const; 147 const user_manager::User* GetUser() const;
148 148
149 // Returns mutable version of user with |user_id_|. 149 // Returns mutable version of user with |user_id_|.
150 User* GetUserAndModify() const; 150 user_manager::User* GetUserAndModify() const;
151 151
152 // Returns true if user with |user_id_| is logged in and a regular user. 152 // Returns true if user with |user_id_| is logged in and a regular user.
153 bool IsUserLoggedInAndRegular() const; 153 bool IsUserLoggedInAndRegular() const;
154 154
155 // The user manager. 155 // The user manager.
156 UserManager* user_manager_; 156 UserManager* user_manager_;
157 157
158 // Loader for JPEG user images. 158 // Loader for JPEG user images.
159 scoped_refptr<UserImageLoader> image_loader_; 159 scoped_refptr<UserImageLoader> image_loader_;
160 160
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 bool user_needs_migration_; 218 bool user_needs_migration_;
219 219
220 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_; 220 base::WeakPtrFactory<UserImageManagerImpl> weak_factory_;
221 221
222 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl); 222 DISALLOW_COPY_AND_ASSIGN(UserImageManagerImpl);
223 }; 223 };
224 224
225 } // namespace chromeos 225 } // namespace chromeos
226 226
227 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_ 227 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USERS_AVATAR_USER_IMAGE_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698