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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/files/file_util.h" 12 #include "base/files/file_util.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/prefs/pref_registry_simple.h"
18 #include "base/prefs/pref_service.h"
19 #include "base/prefs/scoped_user_pref_update.h"
20 #include "base/rand_util.h" 17 #include "base/rand_util.h"
21 #include "base/sequenced_task_runner.h" 18 #include "base/sequenced_task_runner.h"
22 #include "base/task_runner_util.h" 19 #include "base/task_runner_util.h"
23 #include "base/thread_task_runner_handle.h" 20 #include "base/thread_task_runner_handle.h"
24 #include "base/thread_task_runner_handle.h" 21 #include "base/thread_task_runner_handle.h"
25 #include "base/threading/sequenced_worker_pool.h" 22 #include "base/threading/sequenced_worker_pool.h"
26 #include "base/time/time.h" 23 #include "base/time/time.h"
27 #include "base/trace_event/trace_event.h" 24 #include "base/trace_event/trace_event.h"
28 #include "base/values.h" 25 #include "base/values.h"
29 #include "chrome/browser/browser_process.h" 26 #include "chrome/browser/browser_process.h"
30 #include "chrome/browser/chrome_notification_types.h" 27 #include "chrome/browser/chrome_notification_types.h"
31 #include "chrome/browser/chromeos/login/helper.h" 28 #include "chrome/browser/chromeos/login/helper.h"
32 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h" 29 #include "chrome/browser/chromeos/login/users/avatar/user_image_sync_observer.h"
33 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im ages.h" 30 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im ages.h"
34 #include "chrome/browser/chromeos/profiles/profile_helper.h" 31 #include "chrome/browser/chromeos/profiles/profile_helper.h"
35 #include "chrome/browser/profiles/profile_downloader.h" 32 #include "chrome/browser/profiles/profile_downloader.h"
36 #include "chrome/browser/profiles/profile_manager.h" 33 #include "chrome/browser/profiles/profile_manager.h"
37 #include "chrome/common/chrome_paths.h" 34 #include "chrome/common/chrome_paths.h"
38 #include "chrome/grit/theme_resources.h" 35 #include "chrome/grit/theme_resources.h"
36 #include "components/prefs/pref_registry_simple.h"
37 #include "components/prefs/pref_service.h"
38 #include "components/prefs/scoped_user_pref_update.h"
39 #include "components/user_manager/user_image/user_image.h" 39 #include "components/user_manager/user_image/user_image.h"
40 #include "components/user_manager/user_manager.h" 40 #include "components/user_manager/user_manager.h"
41 #include "content/public/browser/browser_thread.h" 41 #include "content/public/browser/browser_thread.h"
42 #include "content/public/browser/notification_service.h" 42 #include "content/public/browser/notification_service.h"
43 #include "policy/policy_constants.h" 43 #include "policy/policy_constants.h"
44 #include "ui/base/resource/resource_bundle.h" 44 #include "ui/base/resource/resource_bundle.h"
45 #include "ui/gfx/image/image_skia.h" 45 #include "ui/gfx/image/image_skia.h"
46 46
47 namespace chromeos { 47 namespace chromeos {
48 48
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 } 1028 }
1029 1029
1030 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const { 1030 bool UserImageManagerImpl::IsUserLoggedInAndHasGaiaAccount() const {
1031 const user_manager::User* user = GetUser(); 1031 const user_manager::User* user = GetUser();
1032 if (!user) 1032 if (!user)
1033 return false; 1033 return false;
1034 return user->is_logged_in() && user->HasGaiaAccount(); 1034 return user->is_logged_in() && user->HasGaiaAccount();
1035 } 1035 }
1036 1036
1037 } // namespace chromeos 1037 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698