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

Side by Side Diff: chrome/browser/chromeos/login/oauth_login_manager.cc

Issue 23678007: OAuth2LoginManager+MergeSessionThrottle hardening, multi-profle support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/oauth_login_manager.h"
6
7 #include "base/command_line.h"
8 #include "chrome/browser/chromeos/login/oauth2_login_manager.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/signin/token_service.h"
11 #include "chrome/browser/signin/token_service_factory.h"
12 #include "chrome/common/chrome_switches.h"
13 #include "content/public/browser/browser_thread.h"
14
15 using content::BrowserThread;
16
17 namespace chromeos {
18
19 // OAuthLoginManager.
20
21 // static.
22 OAuthLoginManager* OAuthLoginManager::Create(
23 OAuthLoginManager::Delegate* delegate) {
24 return new OAuth2LoginManager(delegate);
25 }
26
27 void OAuthLoginManager::CompleteAuthentication() {
28 delegate_->OnCompletedAuthentication(user_profile_);
29 TokenService* token_service =
30 TokenServiceFactory::GetForProfile(user_profile_);
31 if (token_service->AreCredentialsValid())
32 token_service->StartFetchingTokens();
33 }
34
35 OAuthLoginManager::OAuthLoginManager(Delegate* delegate)
36 : delegate_(delegate),
37 user_profile_(NULL),
38 restore_strategy_(RESTORE_FROM_COOKIE_JAR),
39 state_(SESSION_RESTORE_NOT_STARTED) {
40 }
41
42 OAuthLoginManager::~OAuthLoginManager() {
43 }
44
45 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/oauth_login_manager.h ('k') | chrome/browser/chromeos/login/test_login_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698