1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HELPER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HELPER_H_
11 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h"
13 // Mock for BrowsingDataServerBoundCertHelper.
14 class MockBrowsingDataServerBoundCertHelper
15 : public BrowsingDataServerBoundCertHelper
{
17 explicit MockBrowsingDataServerBoundCertHelper();
19 // BrowsingDataServerBoundCertHelper methods.
20 virtual void StartFetching(const FetchResultCallback
& callback
) OVERRIDE
;
21 virtual void DeleteServerBoundCert(const std::string
& server_id
) OVERRIDE
;
23 // Adds a server_bound_cert sample.
24 void AddServerBoundCertSample(const std::string
& server_id
);
26 // Notifies the callback.
29 // Marks all server_bound_certs as existing.
32 // Returns true if all server_bound_certs since the last Reset() invocation
37 virtual ~MockBrowsingDataServerBoundCertHelper();
39 FetchResultCallback callback_
;
41 net::ServerBoundCertStore::ServerBoundCertList server_bound_cert_list_
;
43 // Stores which server_bound_certs exist.
44 std::map
<const std::string
, bool> server_bound_certs_
;
47 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HELPER_H_