OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/renderer_host/pepper/pepper_platform_verification_messa
ge_filter.h" | 5 #include "chrome/browser/renderer_host/pepper/pepper_platform_verification_messa
ge_filter.h" |
6 | 6 |
7 #include "base/bind_helpers.h" | 7 #include "base/bind_helpers.h" |
8 #include "content/public/browser/browser_ppapi_host.h" | 8 #include "content/public/browser/browser_ppapi_host.h" |
9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
10 #include "content/public/browser/render_frame_host.h" | 10 #include "content/public/browser/render_frame_host.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 ppapi::host::ReplyMessageContext reply_context = | 64 ppapi::host::ReplyMessageContext reply_context = |
65 context->MakeReplyMessageContext(); | 65 context->MakeReplyMessageContext(); |
66 reply_context.params.set_result(PP_ERROR_FAILED); | 66 reply_context.params.set_result(PP_ERROR_FAILED); |
67 SendReply( | 67 SendReply( |
68 reply_context, | 68 reply_context, |
69 PpapiHostMsg_PlatformVerification_ChallengePlatformReply( | 69 PpapiHostMsg_PlatformVerification_ChallengePlatformReply( |
70 std::vector<uint8_t>(), std::vector<uint8_t>(), std::string())); | 70 std::vector<uint8_t>(), std::vector<uint8_t>(), std::string())); |
71 return PP_OK_COMPLETIONPENDING; | 71 return PP_OK_COMPLETIONPENDING; |
72 } | 72 } |
73 | 73 |
74 if (!pv_) | 74 if (!pv_.get()) |
75 pv_ = new PlatformVerificationFlow(); | 75 pv_ = new PlatformVerificationFlow(); |
76 | 76 |
77 pv_->ChallengePlatformKey( | 77 pv_->ChallengePlatformKey( |
78 content::WebContents::FromRenderFrameHost(rfh), | 78 content::WebContents::FromRenderFrameHost(rfh), |
79 service_id, | 79 service_id, |
80 std::string(challenge.begin(), challenge.end()), | 80 std::string(challenge.begin(), challenge.end()), |
81 base::Bind( | 81 base::Bind( |
82 &PepperPlatformVerificationMessageFilter::ChallengePlatformCallback, | 82 &PepperPlatformVerificationMessageFilter::ChallengePlatformCallback, |
83 this, | 83 this, |
84 context->MakeReplyMessageContext())); | 84 context->MakeReplyMessageContext())); |
(...skipping 19 matching lines...) Expand all Loading... |
104 } | 104 } |
105 | 105 |
106 SendReply(reply_context, | 106 SendReply(reply_context, |
107 PpapiHostMsg_PlatformVerification_ChallengePlatformReply( | 107 PpapiHostMsg_PlatformVerification_ChallengePlatformReply( |
108 std::vector<uint8_t>(signed_data.begin(), signed_data.end()), | 108 std::vector<uint8_t>(signed_data.begin(), signed_data.end()), |
109 std::vector<uint8_t>(signature.begin(), signature.end()), | 109 std::vector<uint8_t>(signature.begin(), signature.end()), |
110 platform_key_certificate)); | 110 platform_key_certificate)); |
111 } | 111 } |
112 | 112 |
113 } // namespace chrome | 113 } // namespace chrome |
OLD | NEW |