| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HELPER
_H_ | 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_ | 6 #define CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HELPER
_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" | 11 #include "chrome/browser/browsing_data/browsing_data_server_bound_cert_helper.h" |
| 12 | 12 |
| 13 // Mock for BrowsingDataServerBoundCertHelper. | 13 // Mock for BrowsingDataServerBoundCertHelper. |
| 14 class MockBrowsingDataServerBoundCertHelper | 14 class MockBrowsingDataServerBoundCertHelper |
| 15 : public BrowsingDataServerBoundCertHelper { | 15 : public BrowsingDataServerBoundCertHelper { |
| 16 public: | 16 public: |
| 17 explicit MockBrowsingDataServerBoundCertHelper(); | 17 MockBrowsingDataServerBoundCertHelper(); |
| 18 | 18 |
| 19 // BrowsingDataServerBoundCertHelper methods. | 19 // BrowsingDataServerBoundCertHelper methods. |
| 20 virtual void StartFetching(const FetchResultCallback& callback) OVERRIDE; | 20 virtual void StartFetching(const FetchResultCallback& callback) OVERRIDE; |
| 21 virtual void DeleteServerBoundCert(const std::string& server_id) OVERRIDE; | 21 virtual void DeleteServerBoundCert(const std::string& server_id) OVERRIDE; |
| 22 | 22 |
| 23 // Adds a server_bound_cert sample. | 23 // Adds a server_bound_cert sample. |
| 24 void AddServerBoundCertSample(const std::string& server_id); | 24 void AddServerBoundCertSample(const std::string& server_id); |
| 25 | 25 |
| 26 // Notifies the callback. | 26 // Notifies the callback. |
| 27 void Notify(); | 27 void Notify(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 FetchResultCallback callback_; | 39 FetchResultCallback callback_; |
| 40 | 40 |
| 41 net::ServerBoundCertStore::ServerBoundCertList server_bound_cert_list_; | 41 net::ServerBoundCertStore::ServerBoundCertList server_bound_cert_list_; |
| 42 | 42 |
| 43 // Stores which server_bound_certs exist. | 43 // Stores which server_bound_certs exist. |
| 44 std::map<const std::string, bool> server_bound_certs_; | 44 std::map<const std::string, bool> server_bound_certs_; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HEL
PER_H_ | 47 #endif // CHROME_BROWSER_BROWSING_DATA_MOCK_BROWSING_DATA_SERVER_BOUND_CERT_HEL
PER_H_ |
| OLD | NEW |