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

Unified Diff: chrome/browser/net/cert_database_service_factory_linux.cc

Issue 419013003: Replace c/b/nss_context by a KeyedService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, format. Created 6 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/net/cert_database_service_factory_linux.cc
diff --git a/chrome/browser/net/cert_database_service_factory_linux.cc b/chrome/browser/net/cert_database_service_factory_linux.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2b07450409ade0cfaa78752b3f2f44b25fbd0618
--- /dev/null
+++ b/chrome/browser/net/cert_database_service_factory_linux.cc
@@ -0,0 +1,29 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/net/cert_database_service_factory.h"
+
+#include "base/memory/scoped_ptr.h"
+#include "components/cert_database/public/cert_database_service.h"
+#include "components/cert_database/public/linux/cert_database_service_io_part_linux.h"
+#include "content/public/browser/browser_thread.h"
+
+namespace cert_database {
+
+KeyedService* CertDatabaseServiceFactory::BuildServiceInstanceFor(
+ content::BrowserContext* context) const {
+ scoped_ptr<CertDatabaseServiceIOPart> io_part(
+ new CertDatabaseServiceIOPartLinux());
+
+ scoped_ptr<CertDatabaseService> service(new CertDatabaseService(
+ content::BrowserThread::GetMessageLoopProxyForThread(
+ content::BrowserThread::IO)));
+
+ // After this point, the IOPart must only be accessed from the IO thread!
+ service->SetIOPart(io_part.Pass());
+
+ return service.release();
+}
+
+} // namespace cert_database

Powered by Google App Engine
This is Rietveld 408576698