OLD | NEW |
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" |
8 #include "chrome/browser/webdata/web_data_service_factory.h" | 9 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 10 #include "chrome/common/profile_management_switches.h" |
9 #include "url/gurl.h" | 11 #include "url/gurl.h" |
10 | 12 |
11 #if defined(ENABLE_MANAGED_USERS) | 13 #if defined(ENABLE_MANAGED_USERS) |
12 #include "chrome/browser/managed_mode/managed_user_constants.h" | 14 #include "chrome/browser/managed_mode/managed_user_constants.h" |
13 #endif | 15 #endif |
14 | 16 |
15 #if defined(OS_CHROMEOS) | 17 #if defined(OS_CHROMEOS) |
16 #include "chrome/browser/chromeos/login/user_manager.h" | 18 #include "chrome/browser/chromeos/login/user_manager.h" |
17 #endif | 19 #endif |
18 | 20 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 << "token detected, ignoring."; | 69 << "token detected, ignoring."; |
68 return false; | 70 return false; |
69 } | 71 } |
70 #endif | 72 #endif |
71 return true; | 73 return true; |
72 } | 74 } |
73 | 75 |
74 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { | 76 net::URLRequestContextGetter* ChromeSigninClient::GetURLRequestContext() { |
75 return profile_->GetRequestContext(); | 77 return profile_->GetRequestContext(); |
76 } | 78 } |
| 79 |
| 80 void ChromeSigninClient::GoogleSigninSucceeded(const std::string& username, |
| 81 const std::string& password) { |
| 82 #if !defined(OS_ANDROID) |
| 83 // Don't store password hash except for users of new profile features. |
| 84 if (switches::IsNewProfileManagement()) |
| 85 chrome::SetLocalAuthCredentials(profile_, password); |
| 86 #endif |
| 87 } |
OLD | NEW |