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

Side by Side Diff: chrome/renderer/extensions/platform_keys_natives.cc

Issue 2799093006: Remove base::BinaryValue (Closed)
Patch Set: Rebase Created 3 years, 8 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer/extensions/platform_keys_natives.h" 5 #include "chrome/renderer/extensions/platform_keys_natives.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 const blink::WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGen = 55 const blink::WebCryptoRsaHashedKeyGenParams* rsaHashedKeyGen =
56 algorithm.RsaHashedKeyGenParams(); 56 algorithm.RsaHashedKeyGenParams();
57 if (rsaHashedKeyGen) { 57 if (rsaHashedKeyGen) {
58 dict->SetIntegerWithoutPathExpansion("modulusLength", 58 dict->SetIntegerWithoutPathExpansion("modulusLength",
59 rsaHashedKeyGen->ModulusLengthBits()); 59 rsaHashedKeyGen->ModulusLengthBits());
60 const blink::WebVector<unsigned char>& public_exponent = 60 const blink::WebVector<unsigned char>& public_exponent =
61 rsaHashedKeyGen->PublicExponent(); 61 rsaHashedKeyGen->PublicExponent();
62 dict->SetWithoutPathExpansion( 62 dict->SetWithoutPathExpansion(
63 "publicExponent", 63 "publicExponent",
64 base::BinaryValue::CreateWithCopiedBuffer( 64 base::Value::CreateWithCopiedBuffer(
65 reinterpret_cast<const char*>(public_exponent.Data()), 65 reinterpret_cast<const char*>(public_exponent.Data()),
66 public_exponent.size())); 66 public_exponent.size()));
67 67
68 hash = &rsaHashedKeyGen->GetHash(); 68 hash = &rsaHashedKeyGen->GetHash();
69 DCHECK(!hash->IsNull()); 69 DCHECK(!hash->IsNull());
70 } 70 }
71 71
72 const blink::WebCryptoRsaHashedImportParams* rsaHashedImport = 72 const blink::WebCryptoRsaHashedImportParams* rsaHashedImport =
73 algorithm.RsaHashedImportParams(); 73 algorithm.RsaHashedImportParams();
74 if (rsaHashedImport) { 74 if (rsaHashedImport) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 if (!algorithm_dict) 124 if (!algorithm_dict)
125 return; 125 return;
126 126
127 std::unique_ptr<content::V8ValueConverter> converter( 127 std::unique_ptr<content::V8ValueConverter> converter(
128 content::V8ValueConverter::create()); 128 content::V8ValueConverter::create());
129 call_info.GetReturnValue().Set( 129 call_info.GetReturnValue().Set(
130 converter->ToV8Value(algorithm_dict.get(), context()->v8_context())); 130 converter->ToV8Value(algorithm_dict.get(), context()->v8_context()));
131 } 131 }
132 132
133 } // namespace extensions 133 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/media/cast_rtp_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698