summaryrefslogtreecommitdiff
path: root/chromium/content/browser/media/webrtc_identity_store_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/browser/media/webrtc_identity_store_backend.h')
-rw-r--r--chromium/content/browser/media/webrtc_identity_store_backend.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/chromium/content/browser/media/webrtc_identity_store_backend.h b/chromium/content/browser/media/webrtc_identity_store_backend.h
index ab4e1ed7e1e..e660c732cda 100644
--- a/chromium/content/browser/media/webrtc_identity_store_backend.h
+++ b/chromium/content/browser/media/webrtc_identity_store_backend.h
@@ -11,8 +11,7 @@
#include "base/time/time.h"
#include "sql/connection.h"
#include "sql/meta_table.h"
-
-class GURL;
+#include "url/gurl.h"
namespace base {
class FilePath;
@@ -88,7 +87,44 @@ class WebRTCIdentityStoreBackend
};
struct PendingFindRequest;
struct IdentityKey;
- struct Identity;
+
+ struct IdentityKey {
+ IdentityKey(const GURL& origin, const std::string& identity_name)
+ : origin(origin), identity_name(identity_name) {}
+
+ bool operator<(const IdentityKey& other) const {
+ return origin < other.origin ||
+ (origin == other.origin && identity_name < other.identity_name);
+ }
+
+ GURL origin;
+ std::string identity_name;
+ };
+
+ struct Identity {
+ Identity(const std::string& common_name,
+ const std::string& certificate,
+ const std::string& private_key)
+ : common_name(common_name),
+ certificate(certificate),
+ private_key(private_key),
+ creation_time(base::Time::Now().ToInternalValue()) {}
+
+ Identity(const std::string& common_name,
+ const std::string& certificate,
+ const std::string& private_key,
+ int64 creation_time)
+ : common_name(common_name),
+ certificate(certificate),
+ private_key(private_key),
+ creation_time(creation_time) {}
+
+ std::string common_name;
+ std::string certificate;
+ std::string private_key;
+ int64 creation_time;
+ };
+
typedef std::map<IdentityKey, Identity> IdentityMap;
~WebRTCIdentityStoreBackend();