Chromium Code Reviews| Index: content/renderer/media/dtls_identity_service.h |
| diff --git a/content/renderer/media/dtls_identity_service.h b/content/renderer/media/dtls_identity_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6d3689a2a79e7babd199b23e4dbf72aafabae446 |
| --- /dev/null |
| +++ b/content/renderer/media/dtls_identity_service.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_ |
| +#define CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_ |
| + |
| + |
| +#include <string> |
| +#include "base/basictypes.h" |
| +#include "googleurl/src/gurl.h" |
| + |
| +namespace content { |
| + |
| +// This class handles DTLS identity requests by sending IPC messages to the |
| +// browser process. |
| +class DTLSIdentityService { |
| + public: |
| + DTLSIdentityService(const GURL& url); |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
explicit
|
| + virtual ~DTLSIdentityService(); |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
virtual dtor implies you expect to be subclassed (
jiayl
2013/06/06 05:10:24
It'll implement an interface defined by Libjingle
|
| + |
| + // Called on the renderer main thread to get the DTLS identity or geneate a |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
typo: geneate
|
| + // new one if not existent. |
| + // |identity_name| is the name of the identity; |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
This is uninformative, and I am left not knowing w
|
| + // |common_name| ???; |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
ditto^2
|
| + // |certificate| holds the returned certificate as a string; |
| + // |private_key| holds the returned private key as a string. |
| + virtual bool GetOrGenerateIdentity(const std::string& identity_name, |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
"bool" implies failure is possible; what can cause
jiayl
2013/06/06 05:10:24
It seems it never returns false for async msg. Cha
|
| + const std::string& common_name, |
| + std::string* certificate, |
| + std::string* private_key); |
| + |
| + private: |
| + // The frame URL of the PeerConnection which owns this DTLSIdentityService. |
| + GURL url_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DTLSIdentityService); |
|
Ami GONE FROM CHROMIUM
2013/06/04 19:29:09
DISALLOW_IMPLICIT_CONSTRUCTORS
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_MEDIA_DTLS_IDENTITY_SERVICE_H_ |