Chromium Code Reviews| Index: chrome/renderer/extensions/notifications_native_handler.cc |
| diff --git a/chrome/renderer/extensions/notifications_native_handler.cc b/chrome/renderer/extensions/notifications_native_handler.cc |
| index b45b540c0fc21b577cef2922bc891e10e4321765..58d8ee8b6d3846ddf5ae1ce46e1afdfcf7ab610e 100644 |
| --- a/chrome/renderer/extensions/notifications_native_handler.cc |
| +++ b/chrome/renderer/extensions/notifications_native_handler.cc |
| @@ -31,6 +31,7 @@ void NotificationsNativeHandler::GetNotificationImageSizes( |
| float scale_factor = |
| ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactors().back()); |
| + // TODO(devlin): Prefer gin::DataObjectBuilder here. |
|
Devlin
2017/06/12 20:22:16
(If https://codereview.chromium.org/2937543002/ la
|
| std::unique_ptr<base::DictionaryValue> dict(new base::DictionaryValue); |
| dict->SetDouble("scaleFactor", scale_factor); |
| dict->SetInteger("icon.width", bitmap_sizes.icon_size.width()); |
| @@ -44,10 +45,8 @@ void NotificationsNativeHandler::GetNotificationImageSizes( |
| dict->SetInteger("appIconMask.height", |
| bitmap_sizes.app_icon_mask_size.height()); |
| - std::unique_ptr<content::V8ValueConverter> converter( |
| - content::V8ValueConverter::create()); |
| - args.GetReturnValue().Set( |
| - converter->ToV8Value(dict.get(), context()->v8_context())); |
| + args.GetReturnValue().Set(content::V8ValueConverter::Create()->ToV8Value( |
| + dict.get(), context()->v8_context())); |
| } |
| } // namespace extensions |