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

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

Issue 2891933004: Remove raw base::DictionaryValue::Set in //content (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: 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(

Powered by Google App Engine
This is Rietveld 408576698