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

Unified Diff: chrome/renderer/extensions/notifications_native_handler.cc

Issue 2931393003: [Content] Update V8ValueConverter::create to return a std::unique_ptr (Closed)
Patch Set: Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « chrome/renderer/extensions/cast_streaming_native_handler.cc ('k') | chrome/renderer/extensions/platform_keys_natives.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698