OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/net/cert_database_service_factory.h" |
| 6 |
| 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "components/cert_database/public/cert_database_service.h" |
| 9 #include "components/cert_database/public/linux/cert_database_service_io_part_li
nux.h" |
| 10 #include "content/public/browser/browser_thread.h" |
| 11 |
| 12 namespace cert_database { |
| 13 |
| 14 KeyedService* CertDatabaseServiceFactory::BuildServiceInstanceFor( |
| 15 content::BrowserContext* context) const { |
| 16 scoped_ptr<CertDatabaseServiceIOPart> io_part( |
| 17 new CertDatabaseServiceIOPartLinux()); |
| 18 |
| 19 scoped_ptr<CertDatabaseService> service(new CertDatabaseService( |
| 20 content::BrowserThread::GetMessageLoopProxyForThread( |
| 21 content::BrowserThread::IO))); |
| 22 |
| 23 // After this point, the IOPart must only be accessed from the IO thread! |
| 24 service->SetIOPart(io_part.Pass()); |
| 25 |
| 26 return service.release(); |
| 27 } |
| 28 |
| 29 } // namespace cert_database |
OLD | NEW |