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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 671183002: Revert of Inline sign in extracts gaia id from HTTP header and seeds account tracker (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 2 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/chromeos/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 30 matching lines...) Expand all
41 #include "chrome/browser/chromeos/profiles/profile_helper.h" 41 #include "chrome/browser/chromeos/profiles/profile_helper.h"
42 #include "chrome/browser/chromeos/settings/cros_settings.h" 42 #include "chrome/browser/chromeos/settings/cros_settings.h"
43 #include "chrome/browser/first_run/first_run.h" 43 #include "chrome/browser/first_run/first_run.h"
44 #include "chrome/browser/google/google_brand_chromeos.h" 44 #include "chrome/browser/google/google_brand_chromeos.h"
45 #include "chrome/browser/lifetime/application_lifetime.h" 45 #include "chrome/browser/lifetime/application_lifetime.h"
46 #include "chrome/browser/net/crl_set_fetcher.h" 46 #include "chrome/browser/net/crl_set_fetcher.h"
47 #include "chrome/browser/net/nss_context.h" 47 #include "chrome/browser/net/nss_context.h"
48 #include "chrome/browser/profiles/profile.h" 48 #include "chrome/browser/profiles/profile.h"
49 #include "chrome/browser/profiles/profile_manager.h" 49 #include "chrome/browser/profiles/profile_manager.h"
50 #include "chrome/browser/rlz/rlz.h" 50 #include "chrome/browser/rlz/rlz.h"
51 #include "chrome/browser/signin/account_tracker_service_factory.h"
52 #include "chrome/browser/signin/easy_unlock_service.h" 51 #include "chrome/browser/signin/easy_unlock_service.h"
53 #include "chrome/browser/signin/signin_manager_factory.h" 52 #include "chrome/browser/signin/signin_manager_factory.h"
54 #include "chrome/common/chrome_switches.h" 53 #include "chrome/common/chrome_switches.h"
55 #include "chrome/common/logging_chrome.h" 54 #include "chrome/common/logging_chrome.h"
56 #include "chrome/common/pref_names.h" 55 #include "chrome/common/pref_names.h"
57 #include "chromeos/cert_loader.h" 56 #include "chromeos/cert_loader.h"
58 #include "chromeos/chromeos_switches.h" 57 #include "chromeos/chromeos_switches.h"
59 #include "chromeos/cryptohome/cryptohome_util.h" 58 #include "chromeos/cryptohome/cryptohome_util.h"
60 #include "chromeos/dbus/cryptohome_client.h" 59 #include "chromeos/dbus/cryptohome_client.h"
61 #include "chromeos/dbus/dbus_thread_manager.h" 60 #include "chromeos/dbus/dbus_thread_manager.h"
62 #include "chromeos/dbus/session_manager_client.h" 61 #include "chromeos/dbus/session_manager_client.h"
63 #include "chromeos/ime/input_method_manager.h" 62 #include "chromeos/ime/input_method_manager.h"
64 #include "chromeos/login/user_names.h" 63 #include "chromeos/login/user_names.h"
65 #include "chromeos/network/portal_detector/network_portal_detector.h" 64 #include "chromeos/network/portal_detector/network_portal_detector.h"
66 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" 65 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
67 #include "chromeos/settings/cros_settings_names.h" 66 #include "chromeos/settings/cros_settings_names.h"
68 #include "components/component_updater/component_updater_service.h" 67 #include "components/component_updater/component_updater_service.h"
69 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 68 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
70 #include "components/session_manager/core/session_manager.h" 69 #include "components/session_manager/core/session_manager.h"
71 #include "components/signin/core/browser/account_tracker_service.h"
72 #include "components/signin/core/browser/signin_manager_base.h" 70 #include "components/signin/core/browser/signin_manager_base.h"
73 #include "components/user_manager/user.h" 71 #include "components/user_manager/user.h"
74 #include "components/user_manager/user_manager.h" 72 #include "components/user_manager/user_manager.h"
75 #include "components/user_manager/user_type.h" 73 #include "components/user_manager/user_type.h"
76 #include "content/public/browser/browser_thread.h" 74 #include "content/public/browser/browser_thread.h"
77 #include "content/public/browser/notification_service.h" 75 #include "content/public/browser/notification_service.h"
78 #include "url/gurl.h" 76 #include "url/gurl.h"
79 77
80 namespace chromeos { 78 namespace chromeos {
81 79
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 724
727 if (user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()) { 725 if (user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()) {
728 user_manager::User* active_user = 726 user_manager::User* active_user =
729 user_manager::UserManager::Get()->GetActiveUser(); 727 user_manager::UserManager::Get()->GetActiveUser();
730 std::string supervised_user_sync_id = 728 std::string supervised_user_sync_id =
731 ChromeUserManager::Get()->GetSupervisedUserManager()->GetUserSyncId( 729 ChromeUserManager::Get()->GetSupervisedUserManager()->GetUserSyncId(
732 active_user->email()); 730 active_user->email());
733 profile->GetPrefs()->SetString(prefs::kSupervisedUserId, 731 profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
734 supervised_user_sync_id); 732 supervised_user_sync_id);
735 } else if (user_manager::UserManager::Get()->IsLoggedInAsRegularUser()) { 733 } else if (user_manager::UserManager::Get()->IsLoggedInAsRegularUser()) {
736 // Prime the account tracker with this combination of gaia id/display email.
737 // Don't do this unless both email and gaia_id are valid. They may not
738 // be when simply unlocking the profile.
739 if (!user_context.GetGaiaID().empty() &&
740 !user_context.GetUserID().empty()) {
741 AccountTrackerService* account_tracker =
742 AccountTrackerServiceFactory::GetForProfile(profile);
743 account_tracker->SeedAccountInfo(user_context.GetGaiaID(),
744 user_context.GetUserID());
745 }
746
747 // Make sure that the google service username is properly set (we do this 734 // Make sure that the google service username is properly set (we do this
748 // on every sign in, not just the first login, to deal with existing 735 // on every sign in, not just the first login, to deal with existing
749 // profiles that might not have it set yet). 736 // profiles that might not have it set yet).
750 SigninManagerBase* signin_manager = 737 SigninManagerBase* signin_manager =
751 SigninManagerFactory::GetForProfile(profile); 738 SigninManagerFactory::GetForProfile(profile);
752 signin_manager->SetAuthenticatedUsername(user_context.GetUserID()); 739 signin_manager->SetAuthenticatedUsername(user_context.GetUserID());
753 } 740 }
754 } 741 }
755 742
756 void UserSessionManager::UserProfileInitialized(Profile* profile, 743 void UserSessionManager::UserProfileInitialized(Profile* profile,
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 } 1149 }
1163 1150
1164 EasyUnlockKeyManager* UserSessionManager::GetEasyUnlockKeyManager() { 1151 EasyUnlockKeyManager* UserSessionManager::GetEasyUnlockKeyManager() {
1165 if (!easy_unlock_key_manager_) 1152 if (!easy_unlock_key_manager_)
1166 easy_unlock_key_manager_.reset(new EasyUnlockKeyManager); 1153 easy_unlock_key_manager_.reset(new EasyUnlockKeyManager);
1167 1154
1168 return easy_unlock_key_manager_.get(); 1155 return easy_unlock_key_manager_.get();
1169 } 1156 }
1170 1157
1171 } // namespace chromeos 1158 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/saml/saml_browsertest.cc ('k') | chrome/browser/chromeos/login/signin/oauth2_login_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698