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

Side by Side Diff: chrome/browser/ui/auto_login_prompter.cc

Issue 12502017: signin: pull basic SigninManager functionality into new SigninManagerBase class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deal with new enterprise_platform_keys_private_api Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/app_list/chrome_signin_delegate.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/auto_login_prompter.h" 5 #include "chrome/browser/ui/auto_login_prompter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 24 matching lines...) Expand all
35 // In an incognito window, there may not be a profile sync service and/or 35 // In an incognito window, there may not be a profile sync service and/or
36 // signin manager. 36 // signin manager.
37 if (!ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService( 37 if (!ProfileSyncServiceFactory::GetInstance()->HasProfileSyncService(
38 profile)) { 38 profile)) {
39 return false; 39 return false;
40 } 40 }
41 41
42 if (!TokenServiceFactory::GetForProfile(profile)->AreCredentialsValid()) 42 if (!TokenServiceFactory::GetForProfile(profile)->AreCredentialsValid())
43 return false; 43 return false;
44 44
45 SigninManager* signin_manager = 45 SigninManagerBase* signin_manager =
46 SigninManagerFactory::GetInstance()->GetForProfile(profile); 46 SigninManagerFactory::GetInstance()->GetForProfile(profile);
47 if (!signin_manager) 47 if (!signin_manager)
48 return false; 48 return false;
49 49
50 *output = signin_manager->GetAuthenticatedUsername(); 50 *output = signin_manager->GetAuthenticatedUsername();
51 return true; 51 return true;
52 } 52 }
53 53
54 } // namespace 54 } // namespace
55 55
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return; 147 return;
148 148
149 InfoBarService* infobar_service = 149 InfoBarService* infobar_service =
150 InfoBarService::FromWebContents(web_contents()); 150 InfoBarService::FromWebContents(web_contents());
151 // |infobar_service| is NULL for WebContents hosted in WebDialog. 151 // |infobar_service| is NULL for WebContents hosted in WebDialog.
152 if (infobar_service) { 152 if (infobar_service) {
153 AutoLoginInfoBarDelegate::Create(infobar_service, params_); 153 AutoLoginInfoBarDelegate::Create(infobar_service, params_);
154 infobar_shown_ = true; 154 infobar_shown_ = true;
155 } 155 }
156 } 156 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/chrome_signin_delegate.cc ('k') | chrome/browser/ui/chrome_pages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698