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

Unified Diff: chrome/app/chrome_crash_reporter_client.cc

Issue 637023002: Misc. cleanup, primarily removing unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove macros.h change Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/devtools_ui.cc » ('j') | net/disk_cache/cache_util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_crash_reporter_client.cc
diff --git a/chrome/app/chrome_crash_reporter_client.cc b/chrome/app/chrome_crash_reporter_client.cc
index 6782522e8da1a387c393e5ef243de7c3297b6de1..e1ef266f6a95238d3424987137ad8c47562533e3 100644
--- a/chrome/app/chrome_crash_reporter_client.cc
+++ b/chrome/app/chrome_crash_reporter_client.cc
@@ -216,12 +216,11 @@ void ChromeCrashReporterClient::InitBrowserCrashDumpsRegKey() {
// browser process might have the same process id and tick count, but crash
// before consuming the signal (overwriting the signal with an identical one).
// For now, we're willing to live with that risk.
- int length = base::strings::SafeSPrintf(g_browser_crash_dump_prefix,
- kBrowserCrashDumpPrefixTemplate,
- chrome::kChromeVersion,
- ::GetCurrentProcessId(),
- ::GetTickCount());
- if (length <= 0) {
+ if (base::strings::SafeSPrintf(g_browser_crash_dump_prefix,
+ kBrowserCrashDumpPrefixTemplate,
+ chrome::kChromeVersion,
+ ::GetCurrentProcessId(),
+ ::GetTickCount()) <= 0) {
NOTREACHED();
g_browser_crash_dump_prefix[0] = '\0';
return;
@@ -241,13 +240,10 @@ void ChromeCrashReporterClient::RecordCrashDumpAttempt(bool is_real_crash) {
// base value name).
const size_t kMaxValueSize = 2 * kBrowserCrashDumpPrefixLength;
char value_name[kMaxValueSize + 1] = {};
- int length = base::strings::SafeSPrintf(
- value_name,
- "%s-%x",
- g_browser_crash_dump_prefix,
- base::subtle::NoBarrier_AtomicIncrement(&g_browser_crash_dump_count, 1));
-
- if (length > 0) {
+ if (base::strings::SafeSPrintf(
+ value_name, "%s-%x", g_browser_crash_dump_prefix,
+ base::subtle::NoBarrier_AtomicIncrement(&g_browser_crash_dump_count,
+ 1)) > 0) {
DWORD value_dword = is_real_crash ? 1 : 0;
::RegSetValueExA(g_browser_crash_dump_regkey, value_name, 0, REG_DWORD,
reinterpret_cast<BYTE*>(&value_dword),
« no previous file with comments | « no previous file | chrome/browser/ui/webui/devtools_ui.cc » ('j') | net/disk_cache/cache_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698