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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_auralinux.cc

Issue 2740143002: Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Rebase Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/accessibility/accessibility_tree_formatter.h" 5 #include "content/browser/accessibility/accessibility_tree_formatter.h"
6 6
7 #include <atk/atk.h> 7 #include <atk/atk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 node.GetString("description", &description_value); 82 node.GetString("description", &description_value);
83 WriteAttribute( 83 WriteAttribute(
84 false, base::StringPrintf("description='%s'", description_value.c_str()), 84 false, base::StringPrintf("description='%s'", description_value.c_str()),
85 &line); 85 &line);
86 86
87 const base::ListValue* states_value; 87 const base::ListValue* states_value;
88 node.GetList("states", &states_value); 88 node.GetList("states", &states_value);
89 for (base::ListValue::const_iterator it = states_value->begin(); 89 for (base::ListValue::const_iterator it = states_value->begin();
90 it != states_value->end(); ++it) { 90 it != states_value->end(); ++it) {
91 std::string state_value; 91 std::string state_value;
92 if ((*it)->GetAsString(&state_value)) 92 if (it->GetAsString(&state_value))
93 WriteAttribute(true, state_value, &line); 93 WriteAttribute(true, state_value, &line);
94 } 94 }
95 95
96 int id_value; 96 int id_value;
97 node.GetInteger("id", &id_value); 97 node.GetInteger("id", &id_value);
98 WriteAttribute(false, base::StringPrintf("id=%d", id_value), &line); 98 WriteAttribute(false, base::StringPrintf("id=%d", id_value), &line);
99 99
100 return line + base::ASCIIToUTF16("\n"); 100 return line + base::ASCIIToUTF16("\n");
101 } 101 }
102 102
103 const base::FilePath::StringType 103 const base::FilePath::StringType
104 AccessibilityTreeFormatterAuraLinux::GetExpectedFileSuffix() { 104 AccessibilityTreeFormatterAuraLinux::GetExpectedFileSuffix() {
105 return FILE_PATH_LITERAL("-expected-auralinux.txt"); 105 return FILE_PATH_LITERAL("-expected-auralinux.txt");
106 } 106 }
107 107
108 const std::string AccessibilityTreeFormatterAuraLinux::GetAllowEmptyString() { 108 const std::string AccessibilityTreeFormatterAuraLinux::GetAllowEmptyString() {
109 return "@AURALINUX-ALLOW-EMPTY:"; 109 return "@AURALINUX-ALLOW-EMPTY:";
110 } 110 }
111 111
112 const std::string AccessibilityTreeFormatterAuraLinux::GetAllowString() { 112 const std::string AccessibilityTreeFormatterAuraLinux::GetAllowString() {
113 return "@AURALINUX-ALLOW:"; 113 return "@AURALINUX-ALLOW:";
114 } 114 }
115 115
116 const std::string AccessibilityTreeFormatterAuraLinux::GetDenyString() { 116 const std::string AccessibilityTreeFormatterAuraLinux::GetDenyString() {
117 return "@AURALINUX-DENY:"; 117 return "@AURALINUX-DENY:";
118 } 118 }
119 119
120 } 120 }
OLDNEW
« no previous file with comments | « components/url_matcher/url_matcher_factory.cc ('k') | content/browser/accessibility/accessibility_tree_formatter_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698