Commit 06c0a384 authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

Use channel constants for crash telemetry initialization gating.

The use of a string literal for the channel makes it harder than it
should be to see what this is doing. Using the channel constants also
allows easy string searching for the use of the concept.

Bug: 806661
Change-Id: I1711539886f74549f4ac5db1a16108907b679bd4
Reviewed-on: https://chromium-review.googlesource.com/953071Reviewed-by: default avatarWill Harris <wfh@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Sigurður Ásgeirsson <siggi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541835}
parent fee6a987
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
#include "chrome/browser/win/browser_util.h" #include "chrome/browser/win/browser_util.h"
#include "chrome/browser/win/chrome_elf_init.h" #include "chrome/browser/win/chrome_elf_init.h"
#include "chrome/chrome_watcher/chrome_watcher_main_api.h" #include "chrome/chrome_watcher/chrome_watcher_main_api.h"
#include "chrome/common/channel_info.h"
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_features.h" #include "chrome/common/chrome_features.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
...@@ -72,6 +73,7 @@ ...@@ -72,6 +73,7 @@
#include "components/crash/content/app/crash_export_thunks.h" #include "components/crash/content/app/crash_export_thunks.h"
#include "components/crash/content/app/dump_hung_process_with_ptype.h" #include "components/crash/content/app/dump_hung_process_with_ptype.h"
#include "components/crash/core/common/crash_key.h" #include "components/crash/core/common/crash_key.h"
#include "components/version_info/channel.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
...@@ -493,7 +495,7 @@ int ChromeBrowserMainPartsWin::PreCreateThreads() { ...@@ -493,7 +495,7 @@ int ChromeBrowserMainPartsWin::PreCreateThreads() {
static crash_reporter::CrashKeyString<32> update_cohort_name("cohort-name"); static crash_reporter::CrashKeyString<32> update_cohort_name("cohort-name");
update_cohort_name.Set(base::UTF16ToUTF8(details.update_cohort_name())); update_cohort_name.Set(base::UTF16ToUTF8(details.update_cohort_name()));
if (details.channel().find(L"canary") == 0) { if (chrome::GetChannel() == version_info::Channel::CANARY) {
content::RenderProcessHost::SetHungRendererAnalysisFunction( content::RenderProcessHost::SetHungRendererAnalysisFunction(
&DumpHungRendererProcessImpl); &DumpHungRendererProcessImpl);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment