1 // Copyright 2024 The Chromium Authors 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 "net/device_bound_sessions/session_store.h" 6 7 #include <memory> 8 9 #include "base/files/file_path.h" 10 #include "net/base/features.h" 11 #include "net/device_bound_sessions/session_store_impl.h" 12 #include "net/device_bound_sessions/unexportable_key_service_factory.h" 13 14 namespace net::device_bound_sessions { 15 Create(const base::FilePath & db_storage_path)16std::unique_ptr<SessionStore> SessionStore::Create( 17 const base::FilePath& db_storage_path) { 18 unexportable_keys::UnexportableKeyService* key_service = 19 UnexportableKeyServiceFactory::GetInstance()->GetShared(); 20 if (!key_service || db_storage_path.empty()) { 21 return nullptr; 22 } 23 24 return std::make_unique<SessionStoreImpl>(db_storage_path, *key_service); 25 } 26 27 } // namespace net::device_bound_sessions 28