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

Side by Side Diff: content/browser/accessibility/accessibility_tree_formatter_mac.mm

Issue 1131113004: Convert JsonWriter::Write to taking a const ref for the in-param (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another rebase Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 WriteAttribute([defaultAttributes containsObject:requestedAttribute], 260 WriteAttribute([defaultAttributes containsObject:requestedAttribute],
261 StringPrintf("%s='%s'", 261 StringPrintf("%s='%s'",
262 requestedAttributeUTF8.c_str(), 262 requestedAttributeUTF8.c_str(),
263 s_value.c_str()), 263 s_value.c_str()),
264 &line); 264 &line);
265 continue; 265 continue;
266 } 266 }
267 const base::Value* value; 267 const base::Value* value;
268 if (dict.Get(requestedAttributeUTF8, &value)) { 268 if (dict.Get(requestedAttributeUTF8, &value)) {
269 std::string json_value; 269 std::string json_value;
270 base::JSONWriter::Write(value, &json_value); 270 base::JSONWriter::Write(*value, &json_value);
271 WriteAttribute( 271 WriteAttribute(
272 [defaultAttributes containsObject:requestedAttribute], 272 [defaultAttributes containsObject:requestedAttribute],
273 StringPrintf("%s=%s", 273 StringPrintf("%s=%s",
274 requestedAttributeUTF8.c_str(), 274 requestedAttributeUTF8.c_str(),
275 json_value.c_str()), 275 json_value.c_str()),
276 &line); 276 &line);
277 } 277 }
278 } 278 }
279 const base::DictionaryValue* d_value = NULL; 279 const base::DictionaryValue* d_value = NULL;
280 if (dict.GetDictionary(kPositionDictAttr, &d_value)) { 280 if (dict.GetDictionary(kPositionDictAttr, &d_value)) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 const string AccessibilityTreeFormatter::GetAllowString() { 315 const string AccessibilityTreeFormatter::GetAllowString() {
316 return "@MAC-ALLOW:"; 316 return "@MAC-ALLOW:";
317 } 317 }
318 318
319 // static 319 // static
320 const string AccessibilityTreeFormatter::GetDenyString() { 320 const string AccessibilityTreeFormatter::GetDenyString() {
321 return "@MAC-DENY:"; 321 return "@MAC-DENY:";
322 } 322 }
323 323
324 } // namespace content 324 } // namespace content
OLDNEW
« no previous file with comments | « components/webcrypto/test/test_helpers.cc ('k') | content/browser/accessibility/accessibility_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698