Chromium Code Reviews

Side by Side Diff: chrome/common/crash_keys.cc

Issue 1220963005: Update base::StartsWith calls to new form (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@starts_with
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 "chrome/common/crash_keys.h" 5 #include "chrome/common/crash_keys.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 326 matching lines...)
337 "login-user", 337 "login-user",
338 "max-tiles-for-interest-area", 338 "max-tiles-for-interest-area",
339 "max-unused-resource-memory-usage-percentage", 339 "max-unused-resource-memory-usage-percentage",
340 "termination-message-file", 340 "termination-message-file",
341 "use-cras", 341 "use-cras",
342 #endif 342 #endif
343 }; 343 };
344 344
345 #if defined(OS_WIN) 345 #if defined(OS_WIN)
346 // Just about everything has this, don't bother. 346 // Just about everything has this, don't bother.
347 if (base::StartsWithASCII(flag, "/prefetch:", true)) 347 if (base::StartsWith(flag, "/prefetch:", base::CompareCase::SENSITIVE))
348 return true; 348 return true;
349 #endif 349 #endif
350 350
351 if (!base::StartsWithASCII(flag, "--", true)) 351 if (!base::StartsWith(flag, "--", base::CompareCase::SENSITIVE))
352 return false; 352 return false;
353 size_t end = flag.find("="); 353 size_t end = flag.find("=");
354 size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2; 354 size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2;
355 for (size_t i = 0; i < arraysize(kIgnoreSwitches); ++i) { 355 for (size_t i = 0; i < arraysize(kIgnoreSwitches); ++i) {
356 if (flag.compare(2, len, kIgnoreSwitches[i]) == 0) 356 if (flag.compare(2, len, kIgnoreSwitches[i]) == 0)
357 return true; 357 return true;
358 } 358 }
359 return false; 359 return false;
360 } 360 }
361 361
(...skipping 84 matching lines...)
446 } 446 }
447 447
448 ScopedPrinterInfo::~ScopedPrinterInfo() { 448 ScopedPrinterInfo::~ScopedPrinterInfo() {
449 for (size_t i = 0; i < kPrinterInfoCount; ++i) { 449 for (size_t i = 0; i < kPrinterInfoCount; ++i) {
450 std::string key = base::StringPrintf(kPrinterInfo, i + 1); 450 std::string key = base::StringPrintf(kPrinterInfo, i + 1);
451 base::debug::ClearCrashKey(key); 451 base::debug::ClearCrashKey(key);
452 } 452 }
453 } 453 }
454 454
455 } // namespace crash_keys 455 } // namespace crash_keys
OLDNEW

Powered by Google App Engine