Index: chromecast/crash/android/cast_crash_reporter_client_android.cc |
diff --git a/chromecast/crash/android/cast_crash_reporter_client_android.cc b/chromecast/crash/android/cast_crash_reporter_client_android.cc |
index d914767e8501f8bd13c02325218f198b1aec24cf..6e690dd80e32feef70aec0c7a5be8e4648ff2d98 100644 |
--- a/chromecast/crash/android/cast_crash_reporter_client_android.cc |
+++ b/chromecast/crash/android/cast_crash_reporter_client_android.cc |
@@ -16,7 +16,9 @@ |
namespace chromecast { |
-CastCrashReporterClientAndroid::CastCrashReporterClientAndroid() { |
+CastCrashReporterClientAndroid::CastCrashReporterClientAndroid( |
+ const std::string& process_type) |
+ : process_type_(process_type) { |
} |
CastCrashReporterClientAndroid::~CastCrashReporterClientAndroid() { |
@@ -45,9 +47,12 @@ bool CastCrashReporterClientAndroid::GetCrashDumpLocation( |
} |
crash_dir_local = crash_dir_local.Append("crashes"); |
- if (!base::DirectoryExists(crash_dir_local)) { |
- if (!base::CreateDirectory(crash_dir_local)) { |
- return false; |
+ // Only try to create the directory in the browser process (empty value). |
+ if (process_type_.empty()) { |
+ if (!base::DirectoryExists(crash_dir_local)) { |
+ if (!base::CreateDirectory(crash_dir_local)) { |
+ return false; |
+ } |
} |
} |