Index: chrome/browser/ui/webui/options/browser_options_handler.cc |
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc |
index 99ef39a8ee2f2f7c19c61c232ff67027457e1ae4..161ffa844d75f8e5c1dea9d66425512da12c5dba 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -108,7 +108,9 @@ |
#endif // defined(OS_CHROMEOS) |
#if defined(OS_WIN) |
+#include <windows.h> |
#include "chrome/installer/util/auto_launch_util.h" |
+#include "chrome/installer/util/browser_distribution.h" |
#endif // defined(OS_WIN) |
using content::BrowserContext; |
@@ -761,6 +763,15 @@ void BrowserOptionsHandler::InitializeHandler() { |
void BrowserOptionsHandler::InitializePage() { |
page_initialized_ = true; |
+#if defined(OS_WIN) |
+ // On Windows, allow a magic key combination to enable SxS distributions to |
+ // be set as the default browser. This allows testing scenarios which were |
+ // previously not possible on Windows 8. |
+ if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F12)) { |
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
James Hawkins
2013/08/26 21:19:09
Why does this need to be in the settings page?
zturner
2013/08/26 21:31:18
The full context of this is in the linked bug. It'
|
+ dist->DebugEnableSetAsDefault(); |
+ } |
+#endif |
OnTemplateURLServiceChanged(); |