Chromium Code Reviews| Index: chrome/browser/chromeos/login/session/user_session_manager.cc |
| diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc |
| index e4083e318bc9aab0931cc5bdc1ce60e408215d61..e260b7df0e519638e115ec92634cd145da441d2c 100644 |
| --- a/chrome/browser/chromeos/login/session/user_session_manager.cc |
| +++ b/chrome/browser/chromeos/login/session/user_session_manager.cc |
| @@ -34,9 +34,11 @@ |
| #include "chrome/browser/chromeos/login/users/user_manager.h" |
| #include "chrome/browser/chromeos/ownership/owner_settings_service_factory.h" |
| #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| +#include "chrome/browser/component_updater/component_updater_service.h" |
| #include "chrome/browser/first_run/first_run.h" |
| #include "chrome/browser/google/google_brand_chromeos.h" |
| #include "chrome/browser/lifetime/application_lifetime.h" |
| +#include "chrome/browser/net/crl_set_fetcher.h" |
| #include "chrome/browser/net/nss_context.h" |
| #include "chrome/browser/profiles/profile.h" |
| #include "chrome/browser/profiles/profile_manager.h" |
| @@ -284,12 +286,6 @@ void UserSessionManager::InitRlz(Profile* profile) { |
| #endif |
| } |
| -bool UserSessionManager::HasBrowserRestarted() const { |
| - CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| - return base::SysInfo::IsRunningOnChromeOS() && |
| - command_line->HasSwitch(switches::kLoginUser); |
| -} |
| - |
| OAuth2LoginManager::SessionRestoreStrategy |
| UserSessionManager::GetSigninSessionRestoreStrategy() { |
| return session_restore_strategy_; |
| @@ -710,7 +706,9 @@ void UserSessionManager::FinalizePrepareProfile(Profile* profile) { |
| if (user_manager->GetPrimaryUser() == user) |
| InitRlz(profile); |
| - // TODO(altimofeev): This pointer should probably never be NULL, but it looks |
| + InitializeCRLSetFetcherForPrimaryUser(user); |
|
Dmitry Polukhin
2014/07/28 09:32:38
Optional. I would make it InitializeCRLSetFetcher
Nikita (slow)
2014/07/29 09:27:27
Done.
|
| + |
| + // TODO(nkostylev): This pointer should probably never be NULL, but it looks |
| // like LoginUtilsImpl::OnProfileCreated() may be getting called before |
| // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is |
| // killed during shutdown in tests -- see http://crosbug.com/18269. Replace |
| @@ -827,6 +825,24 @@ void UserSessionManager::InitializeCertsForPrimaryUser(Profile* profile) { |
| } |
| } |
| +void UserSessionManager::InitializeCRLSetFetcherForPrimaryUser( |
| + const user_manager::User* user) { |
| + const user_manager::User* primary_user = UserManager::Get()->GetPrimaryUser(); |
| + if (primary_user != user) |
| + return; |
| + |
| + const std::string username_hash = user->username_hash(); |
| + if (!username_hash.empty()) { |
| + base::FilePath path; |
| + path = ProfileHelper::GetProfilePathByUserIdHash(username_hash); |
| + component_updater::ComponentUpdateService* cus = |
| + g_browser_process->component_updater(); |
| + CRLSetFetcher* crl_set = g_browser_process->crl_set_fetcher(); |
| + if (crl_set && cus) |
| + crl_set->StartInitialLoad(cus, path); |
| + } |
| +} |
| + |
| void UserSessionManager::OnRestoreActiveSessions( |
| const SessionManagerClient::ActiveSessionsMap& sessions, |
| bool success) { |