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

Side by Side Diff: content/browser/renderer_host/media/dtls_identity_service_host.h

Issue 15969025: Generates the DTLS identity in browser process and returns it to render process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_DTLS_IDENTITY_SERVICE_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_DTLS_IDENTITY_SERVICE_HOST_H_
7
8 #include <map>
9 #include <string>
10
11 #include "base/basictypes.h"
12 #include "content/browser/media/dtls_identity_store.h"
13 #include "content/public/browser/browser_message_filter.h"
14
15 class GURL;
16
17 namespace content {
18
19 // This class is the host for DTLSIdentityService in the browser process.
20 class DTLSIdentityServiceHost : public BrowserMessageFilter {
21 public:
22 explicit DTLSIdentityServiceHost(DTLSIdentityStore* dtls_identity_store);
23
24 private:
25 virtual ~DTLSIdentityServiceHost();
26 // content::BrowserMessageFilter override.
27 virtual bool OnMessageReceived(const IPC::Message& message,
28 bool* message_was_ok) OVERRIDE;
29
30 // Requests a DTLS identity from the DTLS identity store for the given
31 // |origin| and |identity_name|. If no such identity exists, a new one will be
32 // generated using the given |common_name|.
33 // |request_id| is a unique id chosen by the client and used to cancel a
34 // pending request.
35 void OnRequestIdentity(int request_id,
36 const GURL& origin,
37 const std::string& identity_name,
38 const std::string& common_name);
39 void OnCancelRequest(int request_id);
40
41 virtual void OnComplete(int request_id,
Ryan Sleevi 2013/06/17 23:08:34 DESIGN: Why is this virtual?
jiayl 2013/06/18 01:07:55 Removed. On 2013/06/17 23:08:34, Ryan Sleevi wrote
42 int error,
43 const std::string& certificate,
44 const std::string& private_key);
45
46 typedef std::map<int, base::Closure> RequestCancellerMap;
47 RequestCancellerMap pending_request_canceller_map_;
48 DTLSIdentityStore* dtls_identity_store_;
49
50 DISALLOW_COPY_AND_ASSIGN(DTLSIdentityServiceHost);
51 };
52
53 } // namespace content
54
55 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_DTLS_IDENTITY_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698