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

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

Issue 13035003: Added a PolicyCertVerifier that uses the trust anchors from the ONC policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed comments Created 7 years, 9 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 2cbc148d2fd20a841769a934bad406b25667d6ea..966070a3a5d2e7e8a8f88a81957b40be1608b563 100644
--- a/chrome/browser/profiles/profile_io_data.cc
+++ b/chrome/browser/profiles/profile_io_data.cc
@@ -58,6 +58,7 @@
#include "content/public/browser/notification_service.h"
#include "content/public/browser/resource_context.h"
#include "extensions/common/constants.h"
+#include "net/cert/cert_verifier.h"
#include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_monster.h"
#include "net/http/http_transaction_factory.h"
@@ -82,9 +83,11 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/drive/drive_protocol_handler.h"
+#include "chrome/browser/chromeos/policy/policy_cert_verifier.h"
#include "chrome/browser/chromeos/proxy_config_service_impl.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/chromeos/settings/cros_settings_names.h"
+#include "chrome/browser/policy/browser_policy_connector.h"
#endif // defined(OS_CHROMEOS)
using content::BrowserContext;
@@ -264,6 +267,11 @@ void ProfileIOData::InitializeOnUIThread(Profile* profile) {
params->managed_mode_url_filter =
managed_user_service->GetURLFilterForIOThread();
#endif
+#if defined(OS_CHROMEOS)
+ policy::BrowserPolicyConnector* connector =
+ g_browser_process->browser_policy_connector();
+ params->trust_anchor_provider = connector->GetCertTrustAnchorProvider();
+#endif
params->profile = profile;
profile_params_.reset(params.release());
@@ -373,6 +381,9 @@ ProfileIOData::ProfileParams::ProfileParams()
#if defined(ENABLE_NOTIFICATIONS)
notification_service(NULL),
#endif
+#if defined(OS_CHROMEOS)
+ trust_anchor_provider(NULL),
+#endif
profile(NULL) {
}
@@ -695,6 +706,15 @@ void ProfileIOData::Init(content::ProtocolHandlerMap* protocol_handlers) const {
managed_mode_url_filter_ = profile_params_->managed_mode_url_filter;
#endif
+#if defined(OS_CHROMEOS)
+ cert_verifier_.reset(new policy::PolicyCertVerifier(
+ profile_params_->profile, profile_params_->trust_anchor_provider));
+ main_request_context_->set_cert_verifier(cert_verifier_.get());
+#else
+ main_request_context_->set_cert_verifier(
+ io_thread_globals->cert_verifier.get());
+#endif
+
InitializeInternal(profile_params_.get(), protocol_handlers);
profile_params_.reset();
« no previous file with comments | « chrome/browser/profiles/profile_io_data.h ('k') | chrome/browser/ui/webui/net_internals/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698