summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_child_process_host.cc
diff options
context:
space:
mode:
authormnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 12:20:40 +0000
committermnissler@chromium.org <mnissler@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 12:20:40 +0000
commit3e008d48b2f2defc32272f430f3f31bf45cb300b (patch)
tree70f824343aadb5ffe5ba4edb64bfabb875bba465 /chrome/browser/browser_child_process_host.cc
parentb358bba5374a066a9cd75a9962a7cf74145158b2 (diff)
downloadchromium_src-3e008d48b2f2defc32272f430f3f31bf45cb300b.zip
chromium_src-3e008d48b2f2defc32272f430f3f31bf45cb300b.tar.gz
chromium_src-3e008d48b2f2defc32272f430f3f31bf45cb300b.tar.bz2
[MAC] Disable crash reporting if configuration management says so.
BUG=49662 TEST=Configure MetricsReportingEnabled policy, crash browser/renderer and check whether crash dumps get generated. Review URL: http://codereview.chromium.org/2832090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_child_process_host.cc')
-rw-r--r--chrome/browser/browser_child_process_host.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/browser_child_process_host.cc b/chrome/browser/browser_child_process_host.cc
index 8dbf668..7f8018b 100644
--- a/chrome/browser/browser_child_process_host.cc
+++ b/chrome/browser/browser_child_process_host.cc
@@ -14,13 +14,17 @@
#include "base/stl_util-inl.h"
#include "base/string_util.h"
#include "base/waitable_event.h"
+#include "chrome/app/breakpad_mac.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_thread.h"
+#include "chrome/browser/pref_service.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/notification_service.h"
#include "chrome/common/plugin_messages.h"
+#include "chrome/common/pref_names.h"
#include "chrome/common/process_watcher.h"
#include "chrome/common/result_codes.h"
#include "chrome/installer/util/google_update_settings.h"
@@ -94,9 +98,11 @@ void BrowserChildProcessHost::SetCrashReporterCommandLine(
base::GetLinuxDistro());
}
#elif defined(OS_MACOSX)
- if (GoogleUpdateSettings::GetCollectStatsConsent())
- command_line->AppendSwitchASCII(switches::kEnableCrashReporter,
- google_update::posix_guid);
+ if (IsCrashReporterEnabled()) {
+ std::string client_id =
+ g_browser_process->local_state()->GetString(prefs::kMetricsClientID);
+ command_line->AppendSwitchASCII(switches::kEnableCrashReporter, client_id);
+ }
#endif // OS_MACOSX
}