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

Unified Diff: chrome/app/chrome_crash_reporter_client_win.cc

Issue 2549593002: Revert of Make Crashpad use the user data dir, rather than always default location (Closed)
Patch Set: Created 4 years 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 | « chrome/app/BUILD.gn ('k') | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_crash_reporter_client_win.cc
diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc
index b44fc84ac5f80e00baf5f73307ae71a5636714bd..ac089d5373a24ceac726b49b35c4d72ef104e7ea 100644
--- a/chrome/app/chrome_crash_reporter_client_win.cc
+++ b/chrome/app/chrome_crash_reporter_client_win.cc
@@ -19,7 +19,6 @@
#include "chrome/common/chrome_result_codes.h"
#include "chrome/install_static/install_details.h"
#include "chrome/install_static/install_util.h"
-#include "chrome/install_static/user_data_dir.h"
#include "components/crash/content/app/crashpad.h"
#include "components/crash/core/common/crash_keys.h"
@@ -253,12 +252,12 @@
instance = new ChromeCrashReporterClient();
ANNOTATE_LEAKING_OBJECT_PTR(instance);
- std::wstring process_type = install_static::GetSwitchValueFromCommandLine(
- ::GetCommandLine(), install_static::kProcessType);
+ std::string process_type = install_static::GetSwitchValueFromCommandLine(
+ ::GetCommandLineA(), install_static::kProcessType);
if (process_type != install_static::kCrashpadHandler) {
crash_reporter::SetCrashReporterClient(instance);
- crash_reporter::InitializeCrashpadWithEmbeddedHandler(
- process_type.empty(), install_static::UTF16ToUTF8(process_type));
+ crash_reporter::InitializeCrashpadWithEmbeddedHandler(process_type.empty(),
+ process_type);
}
}
#endif // NACL_WIN64
@@ -371,13 +370,14 @@
if (GetAlternativeCrashDumpLocation(crash_dir))
return true;
- *crash_dir = install_static::GetCrashDumpLocation();
- return true;
+ // TODO(scottmg): Consider supporting --user-data-dir. See
+ // https://crbug.com/565446.
+ return install_static::GetDefaultCrashDumpLocation(crash_dir);
}
bool ChromeCrashReporterClient::GetCrashMetricsLocation(
base::string16* metrics_dir) {
- return install_static::GetUserDataDirectory(metrics_dir, nullptr);
+ return install_static::GetDefaultUserDataDirectory(metrics_dir);
}
// TODO(ananta)
@@ -401,7 +401,7 @@
bool ChromeCrashReporterClient::EnableBreakpadForProcess(
const std::string& process_type) {
- // This is not used by Crashpad (at least on Windows).
- NOTREACHED();
- return true;
-}
+ return process_type == install_static::kRendererProcess ||
+ process_type == install_static::kPpapiPluginProcess ||
+ process_type == install_static::kGpuProcess;
+}
« no previous file with comments | « chrome/app/BUILD.gn ('k') | chrome/app/chrome_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698