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/browser/metrics/chrome_metrics_service_client.cc

Issue 2487783002: Make Crashpad use the user data dir, rather than always default location (Closed)
Patch Set: install_static for swarming 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/browser/metrics/chrome_metrics_service_client.cc
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index a0599bf3c6d35043f8f26d83bc1e904f98786820..3280f6a967b18b670ea07a6ee07673d519205f18 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -197,28 +197,25 @@ std::unique_ptr<metrics::FileMetricsProvider> CreateFileMetricsProvider(
new metrics::FileMetricsProvider(task_runner,
g_browser_process->local_state()));
- // Register the file holding browser metrics.
base::FilePath user_data_dir;
if (base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
+ // Register the file holding browser metrics.
RegisterOrRemovePreviousRunMetricsFile(
metrics_reporting_enabled, user_data_dir,
ChromeMetricsServiceClient::kBrowserMetricsName, task_runner,
file_metrics_provider.get());
- }
- // Read the Crashpad metrics files.
- base::FilePath default_user_data_dir;
- if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir)) {
+ // Register the Crashpad metrics files.
// Register the data from the previous run if crashpad_handler didn't exit
// cleanly.
RegisterOrRemovePreviousRunMetricsFile(
- metrics_reporting_enabled, default_user_data_dir,
+ metrics_reporting_enabled, user_data_dir,
kCrashpadHistogramAllocatorName, task_runner,
file_metrics_provider.get());
if (metrics_reporting_enabled) {
base::FilePath active_path;
base::GlobalHistogramAllocator::ConstructFilePaths(
- default_user_data_dir, kCrashpadHistogramAllocatorName, nullptr,
+ user_data_dir, kCrashpadHistogramAllocatorName, nullptr,
&active_path);
// Register data that will be populated for the current run.
file_metrics_provider->RegisterSource(

Powered by Google App Engine
This is Rietveld 408576698