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 |