diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-10-29 12:15:29 +0100 |
---|---|---|
committer | Zeno Albisser <zeno.albisser@digia.com> | 2013-10-29 12:26:04 +0100 |
commit | eca36f26ad3765fdaf954735bd5744e2a16154f1 (patch) | |
tree | 823cfb158c4d26b825dea6387b0a348ebb936ddc /chromium/content/browser/media/webrtc_identity_store_backend.h | |
parent | 8db32b21af616e363072d88f73b89359b1dc713a (diff) | |
download | qtwebengine-chromium-eca36f26ad3765fdaf954735bd5744e2a16154f1.tar.gz |
Do not forward declare UIResourceRequest, Identity and IdentityKey.
Clang / libc++ does not support incomplete types in templates.
See: http://clang.llvm.org/compatibility.html#undep_incomplete
This patch will be squashed into the next chromium update.
Change-Id: I46131d53494007548444bc4d158c2208a012ece4
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/content/browser/media/webrtc_identity_store_backend.h')
-rw-r--r-- | chromium/content/browser/media/webrtc_identity_store_backend.h | 42 |
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(); |