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

Side by Side Diff: chrome/test/chromedriver/performance_logger.cc

Issue 1224553010: Replace base::str[n]casecmp with helper functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/chromedriver/performance_logger.h" 5 #include "chrome/test/chromedriver/performance_logger.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 25 matching lines...) Expand all
36 return (domain_status == 36 return (domain_status ==
37 PerfLoggingPrefs::InspectorDomainStatus::kDefaultEnabled || 37 PerfLoggingPrefs::InspectorDomainStatus::kDefaultEnabled ||
38 domain_status == 38 domain_status ==
39 PerfLoggingPrefs::InspectorDomainStatus::kExplicitlyEnabled); 39 PerfLoggingPrefs::InspectorDomainStatus::kExplicitlyEnabled);
40 } 40 }
41 41
42 // Returns whether |command| is in kRequestTraceCommands[] (case-insensitive). 42 // Returns whether |command| is in kRequestTraceCommands[] (case-insensitive).
43 bool ShouldRequestTraceEvents(const std::string& command) { 43 bool ShouldRequestTraceEvents(const std::string& command) {
44 for (size_t i_domain = 0; i_domain < arraysize(kRequestTraceCommands); 44 for (size_t i_domain = 0; i_domain < arraysize(kRequestTraceCommands);
45 ++i_domain) { 45 ++i_domain) {
46 if (base::strcasecmp(command.c_str(), kRequestTraceCommands[i_domain]) == 0) 46 if (base::EqualsCaseInsensitiveASCII(command,
47 kRequestTraceCommands[i_domain]))
47 return true; 48 return true;
48 } 49 }
49 return false; 50 return false;
50 } 51 }
51 52
52 // Returns whether the event belongs to one of kDomains. 53 // Returns whether the event belongs to one of kDomains.
53 bool ShouldLogEvent(const std::string& method) { 54 bool ShouldLogEvent(const std::string& method) {
54 for (size_t i_domain = 0; i_domain < arraysize(kDomains); ++i_domain) { 55 for (size_t i_domain = 0; i_domain < arraysize(kDomains); ++i_domain) {
55 if (base::StartsWith(method, kDomains[i_domain], 56 if (base::StartsWith(method, kDomains[i_domain],
56 base::CompareCase::SENSITIVE)) 57 base::CompareCase::SENSITIVE))
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 if (status.IsError()) 281 if (status.IsError())
281 return status; 282 return status;
282 283
283 return StartTrace(); 284 return StartTrace();
284 } 285 }
285 286
286 Status PerformanceLogger::IsTraceDone(bool* trace_done) const { 287 Status PerformanceLogger::IsTraceDone(bool* trace_done) const {
287 *trace_done = !trace_buffering_; 288 *trace_done = !trace_buffering_;
288 return Status(kOk); 289 return Status(kOk);
289 } 290 }
OLDNEW
« no previous file with comments | « chrome/service/cloud_print/cloud_print_proxy_backend.cc ('k') | components/mime_util/mime_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698