| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "chrome/browser/chromeos/cros/network_library.h" | 13 #include "chrome/browser/chromeos/cros/network_library.h" |
| 14 #include "chromeos/network/cert_loader.h" | |
| 15 | 14 |
| 16 namespace views { | 15 namespace views { |
| 17 class WidgetDelegate; | 16 class WidgetDelegate; |
| 18 } | 17 } |
| 19 | 18 |
| 20 namespace chromeos { | 19 namespace chromeos { |
| 21 | 20 |
| 22 // The network login observer reshows a login dialog if there was an error. | 21 // The network login observer reshows a login dialog if there was an error. |
| 23 // It is also responsible for signaling Shill to when certificates are loaded. | 22 // It is also responsible for signaling Shill to when certificates are loaded. |
| 24 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver, | 23 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver { |
| 25 public CertLoader::Observer { | |
| 26 public: | 24 public: |
| 27 NetworkLoginObserver(); | 25 NetworkLoginObserver(); |
| 28 virtual ~NetworkLoginObserver(); | 26 virtual ~NetworkLoginObserver(); |
| 29 | 27 |
| 30 typedef std::map<std::string, bool> NetworkFailureMap; | 28 typedef std::map<std::string, bool> NetworkFailureMap; |
| 31 private: | 29 private: |
| 32 void CreateModalPopup(views::WidgetDelegate* view); | 30 void CreateModalPopup(views::WidgetDelegate* view); |
| 33 | 31 |
| 34 // NetworkLibrary::NetworkManagerObserver | 32 // NetworkLibrary::NetworkManagerObserver |
| 35 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; | 33 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; |
| 36 | 34 |
| 37 // CertLibrary::Observer | |
| 38 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, | |
| 39 bool initial_load) OVERRIDE; | |
| 40 | |
| 41 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); | 35 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); |
| 42 }; | 36 }; |
| 43 | 37 |
| 44 } // namespace chromeos | 38 } // namespace chromeos |
| 45 | 39 |
| 46 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 40 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
| OLD | NEW |