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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

Issue 18121007: *WIP* Store NSS slots per profile. Move keygen to chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cert manager basics working Created 7 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 side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/resources/options/certificate_manager.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698