Index: chrome/browser/ui/toolbar/wrench_menu_model.cc |
diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
index 2028512925d8e5cf7101b77cc257a2d1c4a72562..3ac7b07f5c16bb84439c740f1c0cb7a7054750b5 100644 |
--- a/chrome/browser/ui/toolbar/wrench_menu_model.cc |
+++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
@@ -30,6 +30,7 @@ |
#include "chrome/common/notification_source.h" |
#include "chrome/common/notification_type.h" |
#include "chrome/common/pref_names.h" |
+#include "chrome/common/profiling.h" |
#include "grit/chromium_strings.h" |
#include "grit/generated_resources.h" |
#include "grit/theme_resources.h" |
@@ -184,6 +185,11 @@ void ToolsMenuModel::Build(Browser* browser) { |
AddItemWithStringId(IDC_DEV_TOOLS, IDS_DEV_TOOLS); |
AddItemWithStringId(IDC_DEV_TOOLS_CONSOLE, IDS_DEV_TOOLS_CONSOLE); |
} |
+ |
+#if defined(ENABLE_PROFILING) || !defined(NO_TCMALLOC) |
+ AddSeparator(); |
+ AddCheckItemWithStringId(IDC_PROFILING_ENABLED, IDS_PROFILING_ENABLED); |
+#endif |
} |
//////////////////////////////////////////////////////////////////////////////// |
@@ -279,6 +285,8 @@ void WrenchMenuModel::ExecuteCommand(int command_id) { |
bool WrenchMenuModel::IsCommandIdChecked(int command_id) const { |
if (command_id == IDC_SHOW_BOOKMARK_BAR) { |
return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar); |
+ } else if (command_id == IDC_PROFILING_ENABLED) { |
+ return Profiling::BeingProfiled(); |
} |
return false; |