1 // Copyright 2017 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 #ifndef IOS_WEB_SESSION_SESSION_CERTIFICATE_POLICY_CACHE_STORAGE_BUILDER_H_ 6 #define IOS_WEB_SESSION_SESSION_CERTIFICATE_POLICY_CACHE_STORAGE_BUILDER_H_ 7 8 #include <memory> 9 10 @class CRWSessionCertificatePolicyCacheStorage; 11 12 namespace web { 13 14 class BrowserState; 15 class SessionCertificatePolicyCacheImpl; 16 17 // Class that converts between model objects and their serializable versions. 18 class SessionCertificatePolicyCacheStorageBuilder { 19 public: 20 // Creates a CRWSessionCertificatePolicyCacheStorage from |cache|. 21 CRWSessionCertificatePolicyCacheStorage* BuildStorage( 22 SessionCertificatePolicyCacheImpl* cache) const; 23 // Creates a SessionCertificatePolicyCache from |cache_storage|. 24 std::unique_ptr<SessionCertificatePolicyCacheImpl> 25 BuildSessionCertificatePolicyCache( 26 CRWSessionCertificatePolicyCacheStorage* cache_storage, 27 BrowserState* browser_state) const; 28 }; 29 30 } // namespace web 31 32 #endif // IOS_WEB_SESSION_SESSION_CERTIFICATE_POLICY_CACHE_STORAGE_BUILDER_H_ 33