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

Unified Diff: content/browser/accessibility/accessibility_tree_formatter_win.cc

Issue 2911033002: Remove raw base::DictionaryValue::Set (Closed)
Patch Set: Proper Windows Fix 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
« no previous file with comments | « components/wifi/network_properties.cc ('k') | content/browser/tracing/etw_tracing_agent_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/accessibility/accessibility_tree_formatter_win.cc
diff --git a/content/browser/accessibility/accessibility_tree_formatter_win.cc b/content/browser/accessibility/accessibility_tree_formatter_win.cc
index 2eeb2b06b9ad5a0c850eee82c2f6674f0fbef785..7b1c36f58d90263ccf18a138777a2da15906ea2c 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_win.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_win.cc
@@ -12,11 +12,13 @@
#include <utility>
#include "base/files/file_path.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_piece.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/values.h"
#include "base/win/scoped_bstr.h"
#include "base/win/scoped_comptr.h"
#include "content/browser/accessibility/accessibility_tree_formatter_utils_win.h"
@@ -273,15 +275,15 @@ void AccessibilityTreeFormatterWin::AddProperties(
variant_self)) &&
SUCCEEDED(ToBrowserAccessibilityWin(root)->GetCOM()->accLocation(
&root_left, &root_top, &root_width, &root_height, variant_self))) {
- base::DictionaryValue* location = new base::DictionaryValue;
+ auto location = base::MakeUnique<base::DictionaryValue>();
location->SetInteger("x", left - root_left);
location->SetInteger("y", top - root_top);
- dict->Set("location", location);
+ dict->Set("location", std::move(location));
- base::DictionaryValue* size = new base::DictionaryValue;
+ auto size = base::MakeUnique<base::DictionaryValue>();
size->SetInteger("width", width);
size->SetInteger("height", height);
- dict->Set("size", size);
+ dict->Set("size", std::move(size));
}
LONG index_in_parent;
« no previous file with comments | « components/wifi/network_properties.cc ('k') | content/browser/tracing/etw_tracing_agent_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698