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

Side by Side Diff: chrome/app/chrome_crash_reporter_client.cc

Issue 1008523002: Call RegisterCrashKeys for chrome.exe in static build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NOTREACHED. Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/app/chrome_crash_reporter_client.h" 5 #include "chrome/app/chrome_crash_reporter_client.h"
6 6
7 #include "base/atomicops.h" 7 #include "base/atomicops.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) { 314 if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) {
315 base::FilePath crash_dumps_dir_path = 315 base::FilePath crash_dumps_dir_path =
316 base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location); 316 base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location);
317 PathService::Override(chrome::DIR_CRASH_DUMPS, crash_dumps_dir_path); 317 PathService::Override(chrome::DIR_CRASH_DUMPS, crash_dumps_dir_path);
318 } 318 }
319 319
320 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir); 320 return PathService::Get(chrome::DIR_CRASH_DUMPS, crash_dir);
321 } 321 }
322 322
323 size_t ChromeCrashReporterClient::RegisterCrashKeys() { 323 size_t ChromeCrashReporterClient::RegisterCrashKeys() {
324 // Note: This is not called on Windows because Breakpad is initialized in the 324 // Note: On Windows this only affects the EXE. A separate invocation from
325 // EXE module, but code that uses crash keys is in the DLL module. 325 // child_process_logging_win.cc registers crash keys for Chrome.dll.
326 // RegisterChromeCrashKeys() will be called after the DLL is loaded. 326 #if defined(COMPONENT_BUILD)
327 // On Windows, this is not called in a component build, as in that case a
328 // single copy of 'base' is shared by the EXE and the various DLLs, and that
329 // copy is configured by child_process_logging_win.cc.
330 NOTREACHED();
331 return 0;
332 #else
327 return crash_keys::RegisterChromeCrashKeys(); 333 return crash_keys::RegisterChromeCrashKeys();
334 #endif
328 } 335 }
329 336
330 bool ChromeCrashReporterClient::IsRunningUnattended() { 337 bool ChromeCrashReporterClient::IsRunningUnattended() {
331 scoped_ptr<base::Environment> env(base::Environment::Create()); 338 scoped_ptr<base::Environment> env(base::Environment::Create());
332 return env->HasVar(env_vars::kHeadless); 339 return env->HasVar(env_vars::kHeadless);
333 } 340 }
334 341
335 bool ChromeCrashReporterClient::GetCollectStatsConsent() { 342 bool ChromeCrashReporterClient::GetCollectStatsConsent() {
336 #if defined(GOOGLE_CHROME_BUILD) 343 #if defined(GOOGLE_CHROME_BUILD)
337 bool is_official_chrome_build = true; 344 bool is_official_chrome_build = true;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 bool ChromeCrashReporterClient::EnableBreakpadForProcess( 376 bool ChromeCrashReporterClient::EnableBreakpadForProcess(
370 const std::string& process_type) { 377 const std::string& process_type) {
371 return process_type == switches::kRendererProcess || 378 return process_type == switches::kRendererProcess ||
372 process_type == switches::kPluginProcess || 379 process_type == switches::kPluginProcess ||
373 process_type == switches::kPpapiPluginProcess || 380 process_type == switches::kPpapiPluginProcess ||
374 process_type == switches::kZygoteProcess || 381 process_type == switches::kZygoteProcess ||
375 process_type == switches::kGpuProcess; 382 process_type == switches::kGpuProcess;
376 } 383 }
377 384
378 } // namespace chrome 385 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | components/crash/app/breakpad_win.cc » ('j') | components/crash/app/breakpad_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698