Allow CertStore to be mocked by making its method virtual.

BUG=none
TEST=none


Review URL: http://codereview.chromium.org/9545011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124952 0039d316-1c4b-4281-b951-d872f2087c98
parent 95f072f9
......@@ -35,24 +35,25 @@ class CONTENT_EXPORT CertStore : public content::NotificationObserver {
// When all the RenderProcessHosts associated with a cert have exited, the
// cert is removed from the store.
// Note: ids starts at 1.
int StoreCert(net::X509Certificate* cert, int render_process_host_id);
virtual int StoreCert(net::X509Certificate* cert, int render_process_host_id);
// Tries to retrieve the previously stored cert associated with the specified
// |cert_id|. Returns whether the cert could be found, and, if |cert| is
// |cert_id|. Returns whether the cert could be found, and, if |cert| is
// non-NULL, copies it in.
bool RetrieveCert(int cert_id, scoped_refptr<net::X509Certificate>* cert);
virtual bool RetrieveCert(int cert_id,
scoped_refptr<net::X509Certificate>* cert);
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
protected:
CertStore();
virtual ~CertStore();
private:
friend struct DefaultSingletonTraits<CertStore>;
CertStore();
virtual ~CertStore();
void RegisterForNotification();
// Remove the specified cert from id_to_cert_ and cert_to_id_.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment