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 1cde684e37915fcc7e10e7ccf044b49b42428b57..e93eaf450a697e1b56abf305ffde3fe5faf2d9c1 100644 |
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc |
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc |
@@ -107,7 +107,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; |
@@ -748,6 +750,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(); |
+ dist->DebugEnableSetAsDefault(); |
+ } |
+#endif |
OnTemplateURLServiceChanged(); |