summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros/network_library.cc
diff options
context:
space:
mode:
authorstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-15 18:37:29 +0000
committerstevenjb@chromium.org <stevenjb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-15 18:37:29 +0000
commit2b3d07eea8350626954847e1435d53ed3493a951 (patch)
tree6d542cabab4f146fd2878094824209f6bd3772e9 /chrome/browser/chromeos/cros/network_library.cc
parent4f9223bc978d023e46a81c80ab3372a5ae6d943e (diff)
downloadchromium_src-2b3d07eea8350626954847e1435d53ed3493a951.zip
chromium_src-2b3d07eea8350626954847e1435d53ed3493a951.tar.gz
chromium_src-2b3d07eea8350626954847e1435d53ed3493a951.tar.bz2
Only notify Cellular connect failures when user initiated.
BUG=170011 Review URL: https://chromiumcodereview.appspot.com/11879032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/cros/network_library.cc')
-rw-r--r--chrome/browser/chromeos/cros/network_library.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/cros/network_library.cc b/chrome/browser/chromeos/cros/network_library.cc
index 121e6a5..ab07519 100644
--- a/chrome/browser/chromeos/cros/network_library.cc
+++ b/chrome/browser/chromeos/cros/network_library.cc
@@ -299,10 +299,13 @@ void Network::SetState(ConnectionState new_state) {
state_ = new_state;
if (new_state == STATE_FAILURE) {
VLOG(1) << service_path() << ": Detected Failure state.";
- if (old_state != STATE_UNKNOWN && old_state != STATE_IDLE) {
+ if (old_state != STATE_UNKNOWN && old_state != STATE_IDLE &&
+ (type() != TYPE_CELLULAR ||
+ user_connect_state() == USER_CONNECT_STARTED)) {
// New failure, the user needs to be notified.
// Transition STATE_IDLE -> STATE_FAILURE sometimes happens on resume
// but is not an actual failure as network device is not ready yet.
+ // For Cellular we only show failure notifications if user initiated.
notify_failure_ = true;
// Normally error_ should be set, but if it is not we need to set it to
// something here so that the retry logic will be triggered.