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/cert_library.h" | |
14 #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 | 15 |
16 namespace views { | 16 namespace views { |
17 class WidgetDelegate; | 17 class WidgetDelegate; |
18 } | 18 } |
19 | 19 |
20 namespace chromeos { | 20 namespace chromeos { |
21 | 21 |
22 // The network login observer reshows a login dialog if there was an error. | 22 // 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. | 23 // It is also responsible for signaling Shill to when certificates are loaded. |
24 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver, | 24 class NetworkLoginObserver : public NetworkLibrary::NetworkManagerObserver, |
25 public CertLibrary::Observer { | 25 public CertLoader::Observer { |
26 public: | 26 public: |
27 NetworkLoginObserver(); | 27 NetworkLoginObserver(); |
28 virtual ~NetworkLoginObserver(); | 28 virtual ~NetworkLoginObserver(); |
29 | 29 |
30 typedef std::map<std::string, bool> NetworkFailureMap; | 30 typedef std::map<std::string, bool> NetworkFailureMap; |
31 private: | 31 private: |
32 void CreateModalPopup(views::WidgetDelegate* view); | 32 void CreateModalPopup(views::WidgetDelegate* view); |
33 | 33 |
34 // NetworkLibrary::NetworkManagerObserver | 34 // NetworkLibrary::NetworkManagerObserver |
35 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; | 35 virtual void OnNetworkManagerChanged(NetworkLibrary* obj) OVERRIDE; |
36 | 36 |
37 // CertLibrary::Observer | 37 // CertLibrary::Observer |
38 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; | 38 virtual void OnCertificatesLoaded(const net::CertificateList& cert_list, |
| 39 bool initial_load) OVERRIDE; |
39 | 40 |
40 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); | 41 DISALLOW_COPY_AND_ASSIGN(NetworkLoginObserver); |
41 }; | 42 }; |
42 | 43 |
43 } // namespace chromeos | 44 } // namespace chromeos |
44 | 45 |
45 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ | 46 #endif // CHROME_BROWSER_CHROMEOS_NETWORK_LOGIN_OBSERVER_H_ |
OLD | NEW |