Index: content/browser/accessibility/accessibility_tree_formatter_auralinux.cc |
diff --git a/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc b/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc |
index f1512552bc4361499c3ae23daa1614c276657b91..65b9f6966e12fa4d147f3bae905b084bb9dd06ca 100644 |
--- a/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc |
+++ b/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc |
@@ -6,11 +6,15 @@ |
#include <atk/atk.h> |
+#include <utility> |
+ |
#include "base/logging.h" |
+#include "base/memory/ptr_util.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
#include "base/strings/utf_string_conversions.h" |
+#include "base/values.h" |
#include "content/browser/accessibility/browser_accessibility_auralinux.h" |
namespace content { |
@@ -60,13 +64,13 @@ void AccessibilityTreeFormatterAuraLinux::AddProperties( |
dict->SetString("description", std::string(description)); |
AtkStateSet* state_set = atk_object_ref_state_set(atk_object); |
- base::ListValue* states = new base::ListValue; |
+ auto states = base::MakeUnique<base::ListValue>(); |
for (int i = ATK_STATE_INVALID; i < ATK_STATE_LAST_DEFINED; i++) { |
AtkStateType state_type = static_cast<AtkStateType>(i); |
if (atk_state_set_contains_state(state_set, state_type)) |
states->AppendString(atk_state_type_get_name(state_type)); |
} |
- dict->Set("states", states); |
+ dict->Set("states", std::move(states)); |
} |
base::string16 AccessibilityTreeFormatterAuraLinux::ToString( |