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

Unified Diff: extensions/browser/guest_view/web_view/web_view_find_helper.cc

Issue 2899743002: Remove raw base::DictionaryValue::Set in //extensions (Closed)
Patch Set: Rebase Created 3 years, 7 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: extensions/browser/guest_view/web_view/web_view_find_helper.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_find_helper.cc b/extensions/browser/guest_view/web_view/web_view_find_helper.cc
index dc4c5828151960d384fca0d520f5406816ec9fcf..0ef4e96a2711fb3ba417c32253f569a4b5a86053 100644
--- a/extensions/browser/guest_view/web_view/web_view_find_helper.cc
+++ b/extensions/browser/guest_view/web_view/web_view_find_helper.cc
@@ -221,7 +221,8 @@ void WebViewFindHelper::FindResults::PrepareResults(
rect.SetInteger(webview::kFindRectTop, selection_rect_.y());
rect.SetInteger(webview::kFindRectWidth, selection_rect_.width());
rect.SetInteger(webview::kFindRectHeight, selection_rect_.height());
- results->Set(webview::kFindSelectionRect, rect.DeepCopy());
+ results->Set(webview::kFindSelectionRect,
+ base::MakeUnique<base::Value>(rect));
Devlin 2017/06/02 15:38:48 This was wrong before, but let's fix it :) |rect|
vabr (Chromium) 2017/06/03 11:14:52 My suggestion is to keep |rect| just a DictionaryV
Devlin 2017/06/05 13:27:33 That's fine, too - either way, we avoid the copy,
jdoerrie 2017/06/06 12:40:23 I added a call to std::move to avoid the copy here
}
WebViewFindHelper::FindUpdateEvent::FindUpdateEvent(

Powered by Google App Engine
This is Rietveld 408576698