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

Unified Diff: chrome/installer/util/google_chrome_distribution.cc

Issue 2487783002: Make Crashpad use the user data dir, rather than always default location (Closed)
Patch Set: . Created 4 years, 1 month 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
Index: chrome/installer/util/google_chrome_distribution.cc
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc
index 223f7d64d6f02a8985fca1c65cc8dbedccc85ca8..82c0182da6e31adca947f05d960d5069d74baee7 100644
--- a/chrome/installer/util/google_chrome_distribution.cc
+++ b/chrome/installer/util/google_chrome_distribution.cc
@@ -22,6 +22,7 @@
#include "base/win/windows_version.h"
#include "chrome/common/chrome_icon_resources_win.h"
#include "chrome/common/chrome_paths_internal.h"
+#include "chrome/install_static/install_util.h"
#include "chrome/installer/util/app_registration_data.h"
#include "chrome/installer/util/channel_info.h"
#include "chrome/installer/util/google_update_constants.h"
@@ -241,12 +242,9 @@ base::string16 GoogleChromeDistribution::GetDistributionData(HKEY root_key) {
// rather than for the browser. For per-user installs they are the same, yet
// for system-level installs the installer uses the system temp directory (see
// setup/installer_crash_reporting.cc's ConfigureCrashReporting).
- // TODO(grt): use install_static::GetDefaultCrashDumpLocation (with an option
- // to suppress creating the directory) once setup.exe uses
- // install_static::InstallDetails.
- base::FilePath crash_dir;
- if (chrome::GetDefaultUserDataDirectory(&crash_dir)) {
- crash_dir = crash_dir.Append(FILE_PATH_LITERAL("Crashpad"));
+ base::string16 crash_dump_location;
+ if (install_static::GetCrashDumpLocation(&crash_dump_location)) {
+ base::FilePath crash_dir = base::FilePath(crash_dump_location);
crashpad::UUID client_id;
std::unique_ptr<crashpad::CrashReportDatabase> database(
crashpad::CrashReportDatabase::InitializeWithoutCreating(crash_dir));

Powered by Google App Engine
This is Rietveld 408576698