diff options
author | nkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-18 17:06:57 +0000 |
---|---|---|
committer | nkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-18 17:06:57 +0000 |
commit | 06a7a1a48f1d70b0b47f7014d73680e2a520a13f (patch) | |
tree | 25a8d6647c775a16914edf8eb6d515bf496579d6 /chrome/browser/chromeos/options | |
parent | f985b9c9f8a3bd0aa21b9717cd7533e8a9335caf (diff) | |
download | chromium_src-06a7a1a48f1d70b0b47f7014d73680e2a520a13f.zip chromium_src-06a7a1a48f1d70b0b47f7014d73680e2a520a13f.tar.gz chromium_src-06a7a1a48f1d70b0b47f7014d73680e2a520a13f.tar.bz2 |
Wait for network connection on welcome screen.
Don't ask twice for secure network credentials if connection is not yet in "connecting" state by the time "Continue" is pressed
BUG= http://crosbug.com/3999
TEST=Manually. Select secure network, enter credentials and hit "Continue" immediately.
Review URL: http://codereview.chromium.org/2871012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options')
-rw-r--r-- | chrome/browser/chromeos/options/network_config_view.cc | 9 | ||||
-rw-r--r-- | chrome/browser/chromeos/options/network_config_view.h | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc index e3ea604..d854954 100644 --- a/chrome/browser/chromeos/options/network_config_view.cc +++ b/chrome/browser/chromeos/options/network_config_view.cc @@ -89,13 +89,16 @@ bool NetworkConfigView::Cancel() { } bool NetworkConfigView::Accept() { + bool result = true; if (flags_ & FLAG_WIFI) { if (flags_ & FLAG_LOGIN_ONLY) - return wificonfig_view_->Login(); + result = wificonfig_view_->Login(); else - return wificonfig_view_->Save(); + result = wificonfig_view_->Save(); } - return true; + if (result && delegate_) + delegate_->OnDialogAccepted(); + return result; } std::wstring NetworkConfigView::GetWindowTitle() const { diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h index 6a2653e..9a3b771 100644 --- a/chrome/browser/chromeos/options/network_config_view.h +++ b/chrome/browser/chromeos/options/network_config_view.h @@ -30,8 +30,12 @@ class NetworkConfigView : public views::View, public: class Delegate { public: + // Called when dialog "OK" button is pressed. + virtual void OnDialogAccepted() = 0; + // Called when dialog "Cancel" button is pressed. virtual void OnDialogCancelled() = 0; + protected: virtual ~Delegate() {} }; |