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

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

Issue 1966133002: Run RemoveArcData after a user has opted out (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adressed comments Created 4 years, 6 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 const user_manager::User* user = 1150 const user_manager::User* user =
1151 ProfileHelper::Get()->GetUserByProfile(profile); 1151 ProfileHelper::Get()->GetUserByProfile(profile);
1152 if (user_manager->GetPrimaryUser() == user) { 1152 if (user_manager->GetPrimaryUser() == user) {
1153 InitRlz(profile); 1153 InitRlz(profile);
1154 InitializeCerts(profile); 1154 InitializeCerts(profile);
1155 InitializeCRLSetFetcher(user); 1155 InitializeCRLSetFetcher(user);
1156 InitializeCertificateTransparencyComponents(user); 1156 InitializeCertificateTransparencyComponents(user);
1157 1157
1158 if (arc::ArcBridgeService::GetEnabled( 1158 if (arc::ArcBridgeService::GetEnabled(
1159 base::CommandLine::ForCurrentProcess())) { 1159 base::CommandLine::ForCurrentProcess())) {
1160 const AccountId& account_id =
1161 multi_user_util::GetAccountIdFromProfile(profile);
1162 std::unique_ptr<BooleanPrefMember> arc_enabled_pref =
1163 base::MakeUnique<BooleanPrefMember>();
1164 arc_enabled_pref->Init(prefs::kArcEnabled, profile->GetPrefs());
1160 DCHECK(arc::ArcServiceManager::Get()); 1165 DCHECK(arc::ArcServiceManager::Get());
1161 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared( 1166 arc::ArcServiceManager::Get()->OnPrimaryUserProfilePrepared(
1162 multi_user_util::GetAccountIdFromProfile(profile)); 1167 account_id, std::move(arc_enabled_pref));
1163 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); 1168 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
1164 DCHECK(arc_auth_service); 1169 DCHECK(arc_auth_service);
1165 arc_auth_service->OnPrimaryUserProfilePrepared(profile); 1170 arc_auth_service->OnPrimaryUserProfilePrepared(profile);
1166 } 1171 }
1167 } 1172 }
1168 1173
1169 UpdateEasyUnlockKeys(user_context_); 1174 UpdateEasyUnlockKeys(user_context_);
1170 user_context_.ClearSecrets(); 1175 user_context_.ClearSecrets();
1171 if (TokenHandlesEnabled()) { 1176 if (TokenHandlesEnabled()) {
1172 CreateTokenUtilIfMissing(); 1177 CreateTokenUtilIfMissing();
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 token_handle_util_.reset(); 1837 token_handle_util_.reset();
1833 first_run::GoodiesDisplayer::Delete(); 1838 first_run::GoodiesDisplayer::Delete();
1834 } 1839 }
1835 1840
1836 void UserSessionManager::CreateTokenUtilIfMissing() { 1841 void UserSessionManager::CreateTokenUtilIfMissing() {
1837 if (!token_handle_util_.get()) 1842 if (!token_handle_util_.get())
1838 token_handle_util_.reset(new TokenHandleUtil()); 1843 token_handle_util_.reset(new TokenHandleUtil());
1839 } 1844 }
1840 1845
1841 } // namespace chromeos 1846 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698