Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 12260046: Show notification when activating with no connection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index f2333c97e7d02ac61cfe0d31d52610c6ca66137e..5329494cb04f773fb74415fbc40a8c3ec673e3c0 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -14,6 +14,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/chromeos/accessibility/magnification_manager.h"
#include "chrome/browser/chromeos/login/screen_locker.h"
@@ -50,9 +51,12 @@
#if defined(OS_CHROMEOS)
#include "ash/keyboard_overlay/keyboard_overlay_view.h"
+#include "ash/system/tray/system_tray_notifier.h"
#include "base/chromeos/chromeos_version.h"
#include "chrome/browser/chromeos/accessibility/accessibility_util.h"
#include "chrome/browser/chromeos/background/ash_user_wallpaper_delegate.h"
+#include "chrome/browser/chromeos/cros/cros_library.h"
+#include "chrome/browser/chromeos/cros/network_library.h"
#include "chrome/browser/chromeos/extensions/media_player_api.h"
#include "chrome/browser/chromeos/extensions/media_player_event_router.h"
#include "chrome/browser/chromeos/login/user_manager.h"
@@ -252,6 +256,21 @@ void ChromeShellDelegate::OpenCrosh() {
void ChromeShellDelegate::OpenMobileSetup(const std::string& service_path) {
#if defined(OS_CHROMEOS)
+ chromeos::NetworkLibrary* cros =
+ chromeos::CrosLibrary::Get()->GetNetworkLibrary();
+ const chromeos::CellularNetwork* cellular = cros->cellular_network();
+ if (cellular && !cellular->activate_over_non_cellular_network() &&
rkc 2013/02/14 23:32:12 so I'm reading this as, 1.) (cellular &&) if we ha
stevenjb 2013/02/14 23:43:17 Thank you, yes, I got the logic backward (test ima
+ (!cros->connected_network() || !cros->connected_network()->online())) {
+ ash::Shell::GetInstance()->system_tray_notifier()->NotifySetNetworkMessage(
+ NULL,
+ ash::NetworkObserver::ERROR_CONNECT_FAILED,
+ ash::NetworkObserver::NETWORK_CELLULAR,
+ l10n_util::GetStringUTF16(IDS_NETWORK_ACTIVATION_ERROR_TITLE),
+ l10n_util::GetStringFUTF16(IDS_NETWORK_ACTIVATION_NEEDS_CONNECTION,
+ UTF8ToUTF16((cellular->name()))),
+ std::vector<string16>());
+ return;
+ }
MobileSetupDialog::Show(service_path);
#endif
}
« ash/system/chromeos/network/tray_sms.cc ('K') | « chrome/app/chromeos_strings.grdp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698