OLD | NEW |
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 "login-user", | 332 "login-user", |
333 "max-tiles-for-interest-area", | 333 "max-tiles-for-interest-area", |
334 "max-unused-resource-memory-usage-percentage", | 334 "max-unused-resource-memory-usage-percentage", |
335 "termination-message-file", | 335 "termination-message-file", |
336 "use-cras", | 336 "use-cras", |
337 #endif | 337 #endif |
338 }; | 338 }; |
339 | 339 |
340 #if defined(OS_WIN) | 340 #if defined(OS_WIN) |
341 // Just about everything has this, don't bother. | 341 // Just about everything has this, don't bother. |
342 if (StartsWithASCII(flag, "/prefetch:", true)) | 342 if (base::StartsWithASCII(flag, "/prefetch:", true)) |
343 return true; | 343 return true; |
344 #endif | 344 #endif |
345 | 345 |
346 if (!StartsWithASCII(flag, "--", true)) | 346 if (!base::StartsWithASCII(flag, "--", true)) |
347 return false; | 347 return false; |
348 size_t end = flag.find("="); | 348 size_t end = flag.find("="); |
349 size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2; | 349 size_t len = (end == std::string::npos) ? flag.length() - 2 : end - 2; |
350 for (size_t i = 0; i < arraysize(kIgnoreSwitches); ++i) { | 350 for (size_t i = 0; i < arraysize(kIgnoreSwitches); ++i) { |
351 if (flag.compare(2, len, kIgnoreSwitches[i]) == 0) | 351 if (flag.compare(2, len, kIgnoreSwitches[i]) == 0) |
352 return true; | 352 return true; |
353 } | 353 } |
354 return false; | 354 return false; |
355 } | 355 } |
356 | 356 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 } | 441 } |
442 | 442 |
443 ScopedPrinterInfo::~ScopedPrinterInfo() { | 443 ScopedPrinterInfo::~ScopedPrinterInfo() { |
444 for (size_t i = 0; i < kPrinterInfoCount; ++i) { | 444 for (size_t i = 0; i < kPrinterInfoCount; ++i) { |
445 std::string key = base::StringPrintf(kPrinterInfo, i + 1); | 445 std::string key = base::StringPrintf(kPrinterInfo, i + 1); |
446 base::debug::ClearCrashKey(key); | 446 base::debug::ClearCrashKey(key); |
447 } | 447 } |
448 } | 448 } |
449 | 449 |
450 } // namespace crash_keys | 450 } // namespace crash_keys |
OLD | NEW |