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

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

Issue 448143008: Move StringToUpperASCII and LowerCaseEqualsASCII to the base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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) 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/browser_accessibility.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 } 590 }
591 591
592 return false; 592 return false;
593 } 593 }
594 594
595 bool BrowserAccessibility::GetHtmlAttribute( 595 bool BrowserAccessibility::GetHtmlAttribute(
596 const char* html_attr, std::string* value) const { 596 const char* html_attr, std::string* value) const {
597 for (size_t i = 0; i < GetHtmlAttributes().size(); ++i) { 597 for (size_t i = 0; i < GetHtmlAttributes().size(); ++i) {
598 const std::string& attr = GetHtmlAttributes()[i].first; 598 const std::string& attr = GetHtmlAttributes()[i].first;
599 if (LowerCaseEqualsASCII(attr, html_attr)) { 599 if (base::LowerCaseEqualsASCII(attr, html_attr)) {
600 *value = GetHtmlAttributes()[i].second; 600 *value = GetHtmlAttributes()[i].second;
601 return true; 601 return true;
602 } 602 }
603 } 603 }
604 604
605 return false; 605 return false;
606 } 606 }
607 607
608 bool BrowserAccessibility::GetHtmlAttribute( 608 bool BrowserAccessibility::GetHtmlAttribute(
609 const char* html_attr, base::string16* value) const { 609 const char* html_attr, base::string16* value) const {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) 674 if (GetRole() == ui::AX_ROLE_STATIC_TEXT)
675 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); 675 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size());
676 676
677 int len = 0; 677 int len = 0;
678 for (size_t i = 0; i < InternalChildCount(); ++i) 678 for (size_t i = 0; i < InternalChildCount(); ++i)
679 len += InternalGetChild(i)->GetStaticTextLenRecursive(); 679 len += InternalGetChild(i)->GetStaticTextLenRecursive();
680 return len; 680 return len;
681 } 681 }
682 682
683 } // namespace content 683 } // namespace content
OLDNEW
« no previous file with comments | « components/url_fixer/url_fixer.cc ('k') | content/browser/accessibility/browser_accessibility_state_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698