#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"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/browser/tab_contents/tab_util.h"
-#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
+#include "extensions/browser/extension_system.h"
+#include "extensions/common/extension.h"
#include "grit/browser_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
using content::InterstitialPage;
using content::WebContents;
-namespace {
-
-// A utility function to set the dictionary's value given by |resource_id|.
-void SetString(DictionaryValue* strings, const char* name, int resource_id) {
- strings->SetString(name, l10n_util::GetStringUTF16(resource_id));
-}
-
-} // namespace
-
namespace chromeos {
OfflineLoadPage::OfflineLoadPage(WebContents* web_contents,
const std::string accept_languages =
profile->GetPrefs()->GetString(prefs::kAcceptLanguages);
LocalizedError::GetStrings(net::ERR_INTERNET_DISCONNECTED,
- net::kErrorDomain, url_, false, locale,
+ net::kErrorDomain, url_, false, false, locale,
accept_languages, &error_strings);
resource_id = IDR_OFFLINE_NET_LOAD_HTML;
}
// 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;
}