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

Side by Side Diff: chrome/browser/accessibility/browser_accessibility_win.cc

Issue 6733043: Coverity: Pass parameters by reference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/accessibility/browser_accessibility_win.h" 5 #include "chrome/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/accessibility/browser_accessibility_manager_win.h" 10 #include "chrome/browser/accessibility/browser_accessibility_manager_win.h"
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1186
1187 if (str.empty()) 1187 if (str.empty())
1188 return S_FALSE; 1188 return S_FALSE;
1189 1189
1190 *value_bstr = SysAllocString(str.c_str()); 1190 *value_bstr = SysAllocString(str.c_str());
1191 DCHECK(*value_bstr); 1191 DCHECK(*value_bstr);
1192 1192
1193 return S_OK; 1193 return S_OK;
1194 } 1194 }
1195 1195
1196 string16 BrowserAccessibilityWin::Escape(string16 str) { 1196 string16 BrowserAccessibilityWin::Escape(const string16& str) {
1197 return EscapeQueryParamValueUTF8(str, false); 1197 return EscapeQueryParamValueUTF8(str, false);
1198 } 1198 }
1199 1199
1200 const string16& BrowserAccessibilityWin::TextForIAccessibleText() { 1200 const string16& BrowserAccessibilityWin::TextForIAccessibleText() {
1201 if (role_ == WebAccessibility::ROLE_TEXT_FIELD) { 1201 if (role_ == WebAccessibility::ROLE_TEXT_FIELD) {
1202 return value_; 1202 return value_;
1203 } else { 1203 } else {
1204 return name_; 1204 return name_;
1205 } 1205 }
1206 } 1206 }
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 } 1585 }
1586 1586
1587 // The role should always be set. 1587 // The role should always be set.
1588 DCHECK(!role_name_.empty() || ia_role_); 1588 DCHECK(!role_name_.empty() || ia_role_);
1589 1589
1590 // If we didn't explicitly set the IAccessible2 role, make it the same 1590 // If we didn't explicitly set the IAccessible2 role, make it the same
1591 // as the MSAA role. 1591 // as the MSAA role.
1592 if (!ia2_role_) 1592 if (!ia2_role_)
1593 ia2_role_ = ia_role_; 1593 ia2_role_ = ia_role_;
1594 } 1594 }
OLDNEW
« no previous file with comments | « chrome/browser/accessibility/browser_accessibility_win.h ('k') | chrome/browser/accessibility_events.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698