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

Side by Side Diff: gpu/config/gpu_control_list.cc

Issue 448853002: Move StringToLowerASCII to 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
« no previous file with comments | « gpu/command_buffer/service/test_helper.cc ('k') | net/base/data_url.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "gpu/config/gpu_control_list.h" 5 #include "gpu/config/gpu_control_list.h"
6 6
7 #include "base/cpu.h" 7 #include "base/cpu.h"
8 #include "base/json/json_reader.h" 8 #include "base/json/json_reader.h"
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 else if (os == "chromeos") 257 else if (os == "chromeos")
258 return kOsChromeOS; 258 return kOsChromeOS;
259 else if (os == "any") 259 else if (os == "any")
260 return kOsAny; 260 return kOsAny;
261 return kOsUnknown; 261 return kOsUnknown;
262 } 262 }
263 263
264 GpuControlList::StringInfo::StringInfo(const std::string& string_op, 264 GpuControlList::StringInfo::StringInfo(const std::string& string_op,
265 const std::string& string_value) { 265 const std::string& string_value) {
266 op_ = StringToOp(string_op); 266 op_ = StringToOp(string_op);
267 value_ = StringToLowerASCII(string_value); 267 value_ = base::StringToLowerASCII(string_value);
268 } 268 }
269 269
270 bool GpuControlList::StringInfo::Contains(const std::string& value) const { 270 bool GpuControlList::StringInfo::Contains(const std::string& value) const {
271 std::string my_value = StringToLowerASCII(value); 271 std::string my_value = base::StringToLowerASCII(value);
272 switch (op_) { 272 switch (op_) {
273 case kContains: 273 case kContains:
274 return strstr(my_value.c_str(), value_.c_str()) != NULL; 274 return strstr(my_value.c_str(), value_.c_str()) != NULL;
275 case kBeginWith: 275 case kBeginWith:
276 return StartsWithASCII(my_value, value_, false); 276 return StartsWithASCII(my_value, value_, false);
277 case kEndWith: 277 case kEndWith:
278 return EndsWith(my_value, value_, false); 278 return EndsWith(my_value, value_, false);
279 case kEQ: 279 case kEQ:
280 return value_ == my_value; 280 return value_ == my_value;
281 default: 281 default:
(...skipping 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 const std::string& feature_name, int feature_id) { 1578 const std::string& feature_name, int feature_id) {
1579 feature_map_[feature_name] = feature_id; 1579 feature_map_[feature_name] = feature_id;
1580 } 1580 }
1581 1581
1582 void GpuControlList::set_supports_feature_type_all(bool supported) { 1582 void GpuControlList::set_supports_feature_type_all(bool supported) {
1583 supports_feature_type_all_ = supported; 1583 supports_feature_type_all_ = supported;
1584 } 1584 }
1585 1585
1586 } // namespace gpu 1586 } // namespace gpu
1587 1587
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.cc ('k') | net/base/data_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698