Index: chrome/browser/plugin_infobar_delegates.cc |
=================================================================== |
--- chrome/browser/plugin_infobar_delegates.cc (revision 145834) |
+++ chrome/browser/plugin_infobar_delegates.cc (working copy) |
@@ -22,6 +22,11 @@ |
#include "ui/base/resource/resource_bundle.h" |
#include "webkit/plugins/npapi/plugin_group.h" |
+#if defined(OS_WIN) |
+#include <shellapi.h> |
+#include "ui/base/win/shell.h" |
+#endif |
+ |
#if defined(ENABLE_PLUGIN_INSTALLATION) |
#include "chrome/browser/plugin_installer.h" |
#endif // defined(ENABLE_PLUGIN_INSTALLATION) |
@@ -452,8 +457,19 @@ |
} |
bool PluginMetroModeInfoBarDelegate::Accept() { |
- // TODO(cpu) switch to desktop chrome here. |
- return false; |
+ content::WebContents* web_contents = owner()->web_contents(); |
+ if (!web_contents) |
+ return false; |
+ // Note that empty urls are not valid. |
+ if (!web_contents->GetURL().is_valid()) |
+ return false; |
+ std::string url(web_contents->GetURL().spec()); |
+ // This obscure use of the 'log usage' mask for windows 8 is documented |
+ // here http://goo.gl/HBOe9. |
+ ui::win::OpenAnyViaShell(UTF8ToUTF16(url), |
+ string16(), |
+ SEE_MASK_FLAG_LOG_USAGE); |
+ return true; |
} |
string16 PluginMetroModeInfoBarDelegate::GetLinkText() const { |
@@ -464,7 +480,7 @@ |
WindowOpenDisposition disposition) { |
// TODO(cpu): replace with the final url. |
GURL url = google_util::AppendGoogleLocaleParam(GURL( |
- "https://www.google.com/support/chrome/bin/answer.py?answer=142064")); |
+ "https://support.google.com/chrome/?ib_display_in_desktop")); |
OpenURLParams params( |
url, Referrer(), |
(disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |