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

Side by Side Diff: chrome/browser/ui/webui/profile_info_watcher.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/webui/profile_info_watcher.h" 5 #include "chrome/browser/ui/webui/profile_info_watcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/profiles/profile_info_cache.h" 11 #include "chrome/browser/profiles/profile_info_cache.h"
13 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/signin/signin_manager_factory.h" 13 #include "chrome/browser/signin/signin_manager_factory.h"
15 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "components/prefs/pref_service.h"
16 #include "components/signin/core/browser/signin_manager.h" 16 #include "components/signin/core/browser/signin_manager.h"
17 #include "components/signin/core/common/signin_pref_names.h" 17 #include "components/signin/core/common/signin_pref_names.h"
18 18
19 ProfileInfoWatcher::ProfileInfoWatcher( 19 ProfileInfoWatcher::ProfileInfoWatcher(
20 Profile* profile, const base::Closure& callback) 20 Profile* profile, const base::Closure& callback)
21 : profile_(profile), callback_(callback) { 21 : profile_(profile), callback_(callback) {
22 DCHECK(profile_); 22 DCHECK(profile_);
23 DCHECK(!callback_.is_null()); 23 DCHECK(!callback_.is_null());
24 24
25 ProfileManager* profile_manager = g_browser_process->profile_manager(); 25 ProfileManager* profile_manager = g_browser_process->profile_manager();
(...skipping 26 matching lines...) Expand all
52 } 52 }
53 53
54 SigninManagerBase* ProfileInfoWatcher::GetSigninManager() const { 54 SigninManagerBase* ProfileInfoWatcher::GetSigninManager() const {
55 return SigninManagerFactory::GetForProfile(profile_); 55 return SigninManagerFactory::GetForProfile(profile_);
56 } 56 }
57 57
58 void ProfileInfoWatcher::RunCallback() { 58 void ProfileInfoWatcher::RunCallback() {
59 if (GetSigninManager()) 59 if (GetSigninManager())
60 callback_.Run(); 60 callback_.Run();
61 } 61 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/profile_info_watcher.h ('k') | chrome/browser/ui/webui/set_as_default_browser_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698