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

Side by Side Diff: chrome/browser/signin/chrome_signin_client.cc

Issue 205703005: Componentize SigninIdAccountHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 #include "chrome/browser/signin/chrome_signin_client.h" 5 #include "chrome/browser/signin/chrome_signin_client.h"
6 6
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/signin/local_auth.h"
9 #include "chrome/browser/signin/signin_account_id_helper.h"
8 #include "chrome/browser/webdata/web_data_service_factory.h" 10 #include "chrome/browser/webdata/web_data_service_factory.h"
11 #include "chrome/common/profile_management_switches.h"
9 #include "url/gurl.h" 12 #include "url/gurl.h"
10 13
11 #if defined(ENABLE_MANAGED_USERS) 14 #if defined(ENABLE_MANAGED_USERS)
12 #include "chrome/browser/managed_mode/managed_user_constants.h" 15 #include "chrome/browser/managed_mode/managed_user_constants.h"
13 #endif 16 #endif
14 17
15 #if defined(OS_CHROMEOS) 18 #if defined(OS_CHROMEOS)
16 #include "chrome/browser/chromeos/login/user_manager.h" 19 #include "chrome/browser/chromeos/login/user_manager.h"
17 #endif 20 #endif
18 21
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 << "token detected, ignoring."; 68 << "token detected, ignoring.";
66 return false; 69 return false;
67 } 70 }
68 #endif 71 #endif
69 return true; 72 return true;
70 } 73 }
71 74
72 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { 75 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() {
73 return profile_->GetRequestContext(); 76 return profile_->GetRequestContext();
74 } 77 }
78
79 void ChromeSigninClient::GoogleSigninSucceeded(const std::string& username,
80 const std::string& password) {
81 #if !defined(OS_ANDROID)
82 // Don't store password hash except for users of new profile features.
83 if (switches::IsNewProfileManagement())
84 chrome::SetLocalAuthCredentials(profile_, password);
85 #endif
86 }
87
88 #if !defined(OS_CHROMEOS)
89 void ChromeSigninClient::SigninManagerInitialized(SigninManager* manager) {
90 account_id_helper_.reset(new SigninAccountIdHelper(manager));
91 }
92
93 void ChromeSigninClient::SigninManagerShutdown(SigninManager* manager) {
94 account_id_helper_.reset();
95 }
96 #endif // !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698