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

Unified Diff: chrome/browser/metrics/chrome_metrics_service_client.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/chrome_main_delegate.cc ('k') | chrome/browser/policy/policy_path_parser_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3280f6a967b18b670ea07a6ee07673d519205f18..a0599bf3c6d35043f8f26d83bc1e904f98786820 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -197,25 +197,28 @@
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());
-
- // Register the Crashpad metrics files.
+ }
+
+ // Read the Crashpad metrics files.
+ base::FilePath default_user_data_dir;
+ if (chrome::GetDefaultUserDataDirectory(&default_user_data_dir)) {
// Register the data from the previous run if crashpad_handler didn't exit
// cleanly.
RegisterOrRemovePreviousRunMetricsFile(
- metrics_reporting_enabled, user_data_dir,
+ metrics_reporting_enabled, default_user_data_dir,
kCrashpadHistogramAllocatorName, task_runner,
file_metrics_provider.get());
if (metrics_reporting_enabled) {
base::FilePath active_path;
base::GlobalHistogramAllocator::ConstructFilePaths(
- user_data_dir, kCrashpadHistogramAllocatorName, nullptr,
+ default_user_data_dir, kCrashpadHistogramAllocatorName, nullptr,
&active_path);
// Register data that will be populated for the current run.
file_metrics_provider->RegisterSource(
« no previous file with comments | « chrome/app/chrome_main_delegate.cc ('k') | chrome/browser/policy/policy_path_parser_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698