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

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: Flattened components/cert_database folders. Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/net/cert_database_service_factory_chromeos.cc ('k') | chrome/browser/net/nss_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c9a9bc8d7eed125d5d0ab10464b09d21c0d73003
--- /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/cert_database_service.h"
+#include "components/cert_database/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
« no previous file with comments | « chrome/browser/net/cert_database_service_factory_chromeos.cc ('k') | chrome/browser/net/nss_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698