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

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

Issue 744723002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/enterprise_platform_keys_natives.h" 5 #include "chrome/renderer/extensions/enterprise_platform_keys_natives.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/renderer/extensions/chrome_v8_context.h" 10 #include "chrome/renderer/extensions/chrome_v8_context.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 blink::WebCryptoOperation operation; 90 blink::WebCryptoOperation operation;
91 if (!StringToWebCryptoOperation(*v8::String::Utf8Value(call_info[1]), 91 if (!StringToWebCryptoOperation(*v8::String::Utf8Value(call_info[1]),
92 &operation)) { 92 &operation)) {
93 return; 93 return;
94 } 94 }
95 95
96 blink::WebString error_details; 96 blink::WebString error_details;
97 int exception_code = 0; 97 int exception_code = 0;
98 98
99 blink::WebCryptoAlgorithm algorithm = 99 blink::WebCryptoAlgorithm algorithm = blink::normalizeCryptoAlgorithm(
100 blink::normalizeCryptoAlgorithm(call_info[0]->ToObject(), 100 v8::Local<v8::Object>::Cast(call_info[0]), operation, &exception_code,
101 operation, 101 &error_details, call_info.GetIsolate());
102 &exception_code,
103 &error_details,
104 call_info.GetIsolate());
105 102
106 scoped_ptr<base::DictionaryValue> algorithm_dict; 103 scoped_ptr<base::DictionaryValue> algorithm_dict;
107 if (!algorithm.isNull()) 104 if (!algorithm.isNull())
108 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm); 105 algorithm_dict = WebCryptoAlgorithmToBaseValue(algorithm);
109 106
110 if (!algorithm_dict) 107 if (!algorithm_dict)
111 return; 108 return;
112 109
113 scoped_ptr<content::V8ValueConverter> converter( 110 scoped_ptr<content::V8ValueConverter> converter(
114 content::V8ValueConverter::create()); 111 content::V8ValueConverter::create());
115 call_info.GetReturnValue().Set( 112 call_info.GetReturnValue().Set(
116 converter->ToV8Value(algorithm_dict.get(), context()->v8_context())); 113 converter->ToV8Value(algorithm_dict.get(), context()->v8_context()));
117 } 114 }
118 115
119 } // namespace extensions 116 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/renderer/benchmarking_extension.cc ('k') | content/renderer/chrome_object_extensions_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698