Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Unified Diff: chromeos/cert_loader.h

Issue 22588002: Refactor the client certificate code in chromeos/network/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/options/network_connect.cc ('k') | chromeos/cert_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/cert_loader.h
diff --git a/chromeos/cert_loader.h b/chromeos/cert_loader.h
index ec2d7ce2de3345fc552a7324da22541d2532d6a1..75d2cd07a3d56bd6d7f7a5a59dfa027a9a47d1f3 100644
--- a/chromeos/cert_loader.h
+++ b/chromeos/cert_loader.h
@@ -7,6 +7,7 @@
#include <string>
+#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
@@ -20,6 +21,7 @@
namespace base {
class SequencedTaskRunner;
+class TaskRunner;
}
namespace crypto {
@@ -65,6 +67,8 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer,
// Returns true if the global instance has been initialized.
static bool IsInitialized();
+ static std::string GetPkcs11IdForCert(const net::X509Certificate& cert);
+
// |crypto_task_runner| is the task runner that any synchronous crypto calls
// should be made from, e.g. in Chrome this is the IO thread. Must be called
// after the thread is started. Certificate loading will not happen unless
@@ -75,7 +79,7 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer,
// Sets the task runner that any slow calls will be made from, e.g. calls
// to the NSS database. If not set, uses base::WorkerPool.
void SetSlowTaskRunnerForTest(
- const scoped_refptr<base::SequencedTaskRunner>& task_runner);
+ const scoped_refptr<base::TaskRunner>& task_runner);
void AddObserver(CertLoader::Observer* observer);
void RemoveObserver(CertLoader::Observer* observer);
@@ -86,8 +90,6 @@ class CHROMEOS_EXPORT CertLoader : public net::CertDatabase::Observer,
// Returns true if the TPM is available for hardware-backed certificates.
bool IsHardwareBacked() const;
- std::string GetPkcs11IdForCert(const net::X509Certificate& cert) const;
-
bool certificates_loaded() const { return certificates_loaded_; }
// TPM info is only valid once the TPM is available (IsHardwareBacked is
« no previous file with comments | « chrome/browser/chromeos/options/network_connect.cc ('k') | chromeos/cert_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698