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

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 protected:
25 virtual ~DTLSIdentityServiceHost();
jam 2013/06/14 23:33:13 why is this in protected instead of private?
jiayl 2013/06/17 17:54:49 Changed to private.
26
27 private:
28 // content::BrowserMessageFilter override.
29 virtual bool OnMessageReceived(const IPC::Message& message,
30 bool* message_was_ok) OVERRIDE;
31
32 // Requests a DTLS identity from the DTLS identity store for the given
33 // |origin| and |identity_name|. If no such identity exists, a new one will be
34 // generated using the given |common_name|.
35 // |request_id| is a unique id chosen by the client and used to cancel a
36 // pending request.
37 void OnRequestIdentity(int request_id,
38 const GURL& origin,
39 const std::string& identity_name,
40 const std::string& common_name);
41 void OnCancelRequest(int request_id);
42
43 virtual void OnComplete(int request_id,
44 int error,
45 const std::string& certificate,
46 const std::string& private_key);
47
48 typedef std::map<int, DTLSIdentityStore::RequestHandle*> RequestMap;
49 RequestMap pending_request_map_;
50 DTLSIdentityStore* dtls_identity_store_;
51
52 DISALLOW_COPY_AND_ASSIGN(DTLSIdentityServiceHost);
53 };
54
55 } // namespace content
56
57 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_DTLS_IDENTITY_SERVICE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698