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/extensions/api/messaging/message_property_provider.h" | 5 #include "chrome/browser/extensions/api/messaging/message_property_provider.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_piece.h" | 11 #include "base/strings/string_piece.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
16 #include "crypto/ec_private_key.h" | 16 #include "crypto/ec_private_key.h" |
17 #include "extensions/common/api/runtime.h" | 17 #include "extensions/common/api/runtime.h" |
18 #include "net/base/completion_callback.h" | 18 #include "net/base/completion_callback.h" |
19 #include "net/cert/asn1_util.h" | 19 #include "net/cert/asn1_util.h" |
20 #include "net/cert/jwk_serializer.h" | 20 #include "net/cert/jwk_serializer.h" |
21 #include "net/ssl/channel_id_service.h" | 21 #include "net/ssl/channel_id_service.h" |
22 #include "net/url_request/url_request_context.h" | 22 #include "net/url_request/url_request_context.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 if (!net::JwkSerializer::ConvertSpkiFromDerToJwk(spki, &jwk_value)) { | 98 if (!net::JwkSerializer::ConvertSpkiFromDerToJwk(spki, &jwk_value)) { |
99 original_task_runner->PostTask(FROM_HERE, no_tls_channel_id_closure); | 99 original_task_runner->PostTask(FROM_HERE, no_tls_channel_id_closure); |
100 return; | 100 return; |
101 } | 101 } |
102 std::string jwk_str; | 102 std::string jwk_str; |
103 base::JSONWriter::Write(jwk_value, &jwk_str); | 103 base::JSONWriter::Write(jwk_value, &jwk_str); |
104 original_task_runner->PostTask(FROM_HERE, base::Bind(reply, jwk_str)); | 104 original_task_runner->PostTask(FROM_HERE, base::Bind(reply, jwk_str)); |
105 } | 105 } |
106 | 106 |
107 } // namespace extensions | 107 } // namespace extensions |
OLD | NEW |