diff options
author | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 22:17:35 +0000 |
---|---|---|
committer | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-15 22:17:35 +0000 |
commit | d6016a4b1581e93208d305ccb06e07d983a4f9d7 (patch) | |
tree | b8cae868f0e003cd22c6dfc3acd382c2b58cdb6b | |
parent | 39f31bdd23cfcdad842fd63b4f1211d06cd25670 (diff) | |
download | chromium_src-d6016a4b1581e93208d305ccb06e07d983a4f9d7.zip chromium_src-d6016a4b1581e93208d305ccb06e07d983a4f9d7.tar.gz chromium_src-d6016a4b1581e93208d305ccb06e07d983a4f9d7.tar.bz2 |
Merge 243717 "Properly launch the connectivity diagnostics app f..."
> Properly launch the connectivity diagnostics app from the offline page
>
> BUG=332175
> R=xiyuan@chromium.org
>
> Review URL: https://codereview.chromium.org/129693002
TBR=zork@chromium.org
Review URL: https://codereview.chromium.org/136703004
git-svn-id: svn://svn.chromium.org/chrome/branches/1750/src@244988 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/offline/offline_load_page.cc | 9 | ||||
-rw-r--r-- | chrome/browser/resources/chromeos/neterror.js | 7 | ||||
-rw-r--r-- | chrome/browser/resources/chromeos/offline_net_load.html | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/offline/offline_load_page.cc b/chrome/browser/chromeos/offline/offline_load_page.cc index f78a07a..84ee635 100644 --- a/chrome/browser/chromeos/offline/offline_load_page.cc +++ b/chrome/browser/chromeos/offline/offline_load_page.cc @@ -4,6 +4,7 @@ #include "chrome/browser/chromeos/offline/offline_load_page.h" +#include "apps/launcher.h" #include "ash/shell.h" #include "ash/shell_delegate.h" #include "ash/system/tray/system_tray_delegate.h" @@ -137,6 +138,14 @@ void OfflineLoadPage::CommandReceived(const std::string& cmd) { // TODO(oshima): record action for metrics. if (command == "open_network_settings") { ash::Shell::GetInstance()->system_tray_delegate()->ShowNetworkSettings(""); + } else if (command == "open_connectivity_diagnostics") { + Profile* profile = Profile::FromBrowserContext( + web_contents_->GetBrowserContext()); + const extensions::Extension* extension = profile->GetExtensionService()-> + GetInstalledExtension("kodldpbjkkmmnilagfdheibampofhaom"); + apps::LaunchPlatformAppWithUrl(profile, extension, "", + GURL::EmptyGURL(), GURL::EmptyGURL()); + } else { LOG(WARNING) << "Unknown command:" << cmd; } diff --git a/chrome/browser/resources/chromeos/neterror.js b/chrome/browser/resources/chromeos/neterror.js index 0c8fcc0..ec69eb3 100644 --- a/chrome/browser/resources/chromeos/neterror.js +++ b/chrome/browser/resources/chromeos/neterror.js @@ -14,11 +14,8 @@ function toggleHelpBox() { } function diagnoseErrors() { - var extensionId = 'idddmepepmjcgiedknnmlbadcokidhoa'; - var diagnoseFrame = $('diagnose-frame'); - diagnoseFrame.innerHTML = - '<iframe src="chrome-extension://' + extensionId + - '/index.html"></iframe>'; + window.domAutomationController.setAutomationId(1); + window.domAutomationController.send('open_connectivity_diagnostics'); } // Subframes use a different layout but the same html file. This is to make it diff --git a/chrome/browser/resources/chromeos/offline_net_load.html b/chrome/browser/resources/chromeos/offline_net_load.html index 2ee8f9a..ddd5ce8 100644 --- a/chrome/browser/resources/chromeos/offline_net_load.html +++ b/chrome/browser/resources/chromeos/offline_net_load.html @@ -38,7 +38,6 @@ </div> <button id="diagnose-button" onclick="diagnoseErrors()" jscontent="diagnose" jsdisplay="diagnose"></button> - <div id="diagnose-frame" class="hidden"></div> <div class="error-code" jscontent="errorCode"></div> </div> </div> |