Index: chrome/common/stack_sampling_configuration.cc |
diff --git a/chrome/common/stack_sampling_configuration.cc b/chrome/common/stack_sampling_configuration.cc |
index c2b0786442b1541f0c0f2ec144f5b300a16f3585..7379727e7acd7e34af1cdd262bf76c1314d3d2ef 100644 |
--- a/chrome/common/stack_sampling_configuration.cc |
+++ b/chrome/common/stack_sampling_configuration.cc |
@@ -5,6 +5,7 @@ |
#include "chrome/common/stack_sampling_configuration.h" |
#include "base/command_line.h" |
+#include "base/compiler_specific.h" |
Mark Mentovai
2017/03/16 03:08:46
I don’t know if you need this for anything, but "b
Avi (use Gerrit)
2017/03/18 03:09:28
Yes, that's the one that I meant.
|
#include "base/lazy_instance.h" |
#include "base/rand_util.h" |
#include "chrome/common/channel_info.h" |
@@ -17,16 +18,20 @@ namespace { |
base::LazyInstance<StackSamplingConfiguration>::Leaky g_configuration = |
LAZY_INSTANCE_INITIALIZER; |
-// The profiler is currently only implemented for Windows x64, and only runs on |
-// trunk, canary, and dev. |
+// The profiler is currently only implemented for Windows x64 and Mac x64. |
bool IsProfilerSupported() { |
-#if !defined(_WIN64) |
- return false; |
-#else |
+#if defined(_WIN64) |
Mark Mentovai
2017/03/16 03:08:46
This is multi-platform code, use OS_WIN now.
Avi (use Gerrit)
2017/03/18 03:09:28
Done.
|
+ // Only run on trunk, canary, and dev. |
+ const version_info::Channel channel = chrome::GetChannel(); |
+ return channel == version_info::Channel::UNKNOWN || |
+ channel == version_info::Channel::CANARY || |
+ channel == version_info::Channel::DEV; |
+#elif defined(OS_MACOSX) |
+ // This is experimental, so only run on trunk. |
Mark Mentovai
2017/03/16 03:08:46
“unknown” doesn’t really mean trunk, it just means
Avi (use Gerrit)
2017/03/18 03:09:28
Done.
|
const version_info::Channel channel = chrome::GetChannel(); |
- return (channel == version_info::Channel::UNKNOWN || |
- channel == version_info::Channel::CANARY || |
- channel == version_info::Channel::DEV); |
+ return channel == version_info::Channel::UNKNOWN; |
+#else |
+ return false; |
#endif |
} |