| Index: chrome/browser/profiles/profile_io_data.cc
|
| diff --git a/chrome/browser/profiles/profile_io_data.cc b/chrome/browser/profiles/profile_io_data.cc
|
| index 99f3793c0157f18618222399755b10c33e6dcb0b..3a37b5ce1f497b68401185928fc5e0461fd5c52e 100644
|
| --- a/chrome/browser/profiles/profile_io_data.cc
|
| +++ b/chrome/browser/profiles/profile_io_data.cc
|
| @@ -88,6 +88,8 @@
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "chrome/browser/chromeos/drive/drive_protocol_handler.h"
|
| +#include "chrome/browser/chromeos/login/user.h"
|
| +#include "chrome/browser/chromeos/login/user_manager.h"
|
| #include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
|
| #include "chrome/browser/chromeos/settings/cros_settings.h"
|
| #include "chrome/browser/policy/profile_policy_connector.h"
|
| @@ -296,6 +298,14 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
|
| #endif
|
| #if defined(OS_CHROMEOS)
|
| params->cert_verifier = CreatePolicyCertVerifier(profile);
|
| + chromeos::UserManager* user_manager = chromeos::UserManager::Get();
|
| + if (user_manager) {
|
| + chromeos::User* user = user_manager->GetUserByProfile(profile);
|
| + if (user)
|
| + params->user_name = user->email();
|
| + }
|
| + if (params->user_name.empty())
|
| + LOG(WARNING) << "no username";
|
| #endif
|
|
|
| params->profile = profile;
|
| @@ -828,6 +838,9 @@ void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const {
|
| profile_params_->cert_verifier->InitializeOnIOThread();
|
| cert_verifier_ = profile_params_->cert_verifier.Pass();
|
| main_request_context_->set_cert_verifier(cert_verifier_.get());
|
| +
|
| + user_name_ = profile_params_->user_name;
|
| + profile_path_ = profile_params_->path;
|
| #else
|
| main_request_context_->set_cert_verifier(
|
| io_thread_globals->cert_verifier.get());
|
|
|