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

Unified Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 2858113003: Enable device-wide EAP-TLS networks (Closed)
Patch Set: initial_load only true on initial load, added tests, fixed comments. Created 3 years, 7 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/browser_process_platform_part_chromeos.cc
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index 4b63b33c1daa1e26f6c42546c58b4710352232d9..3d41fb3259be3e0e7d7713393de72a64419a3755 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -28,6 +28,7 @@
#include "chromeos/timezone/timezone_resolver.h"
#include "components/session_manager/core/session_manager.h"
#include "components/user_manager/user_manager.h"
+#include "net/cert/nss_cert_database_chromeos.h"
BrowserProcessPlatformPart::BrowserProcessPlatformPart()
: created_profile_helper_(false) {}
@@ -83,6 +84,34 @@ void BrowserProcessPlatformPart::ShutdownSessionManager() {
session_manager_.reset();
}
+void BrowserProcessPlatformPart::InitializeSystemSlotCertDatabase(
+ crypto::ScopedPK11Slot system_slot) {
+ crypto::ScopedPK11Slot system_slot_copy =
+ crypto::ScopedPK11Slot(PK11_ReferenceSlot(system_slot.get()));
+ auto database = base::MakeUnique<net::NSSCertDatabaseChromeOS>(
+ std::move(system_slot), crypto::ScopedPK11Slot());
+ database->SetSystemSlot(std::move(system_slot_copy));
+ system_token_cert_database_ = std::move(database);
+
+ // Notify clients waiting for the system token cert database to be available.
+ std::vector<base::Callback<void(net::NSSCertDatabase*)>> callbacks;
+ callbacks.swap(system_token_ready_callbacks_);
+ for (auto& callback : callbacks)
+ callback.Run(system_token_cert_database_.get());
+}
+
+void BrowserProcessPlatformPart::ShutdownSystemSlotCertDatabase() {
+ system_token_cert_database_.reset();
+}
+
+void BrowserProcessPlatformPart::GetSystemSlotCertDatabase(
+ base::Callback<void(net::NSSCertDatabase*)> callback) {
+ if (system_token_cert_database_)
+ callback.Run(system_token_cert_database_.get());
+ else
+ system_token_ready_callbacks_.push_back(callback);
+}
stevenjb 2017/05/09 17:04:02 Looking through the code, I don't see access to an
pmarko 2017/05/10 11:48:01 Good point. I expected other clients to use this g
+
void BrowserProcessPlatformPart::RegisterKeepAlive() {
DCHECK(!keep_alive_);
keep_alive_.reset(

Powered by Google App Engine
This is Rietveld 408576698