OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ | 5 #ifndef CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ |
6 #define CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ | 6 #define CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 static std::string GetSharedProfilePath(); | 60 static std::string GetSharedProfilePath(); |
61 | 61 |
62 protected: | 62 protected: |
63 friend class ClientCertResolverTest; | 63 friend class ClientCertResolverTest; |
64 friend class NetworkConnectionHandlerTest; | 64 friend class NetworkConnectionHandlerTest; |
65 friend class NetworkHandler; | 65 friend class NetworkHandler; |
66 NetworkProfileHandler(); | 66 NetworkProfileHandler(); |
67 | 67 |
68 // Add ShillManagerClient property observer and request initial list. | 68 // Add ShillManagerClient property observer and request initial list. |
69 // Sets |network_state_handler_| for triggering Manager updates (can be NULL). | 69 void Init(); |
70 void Init(NetworkStateHandler* network_state_handler); | |
71 | 70 |
72 void AddProfile(const NetworkProfile& profile); | 71 void AddProfile(const NetworkProfile& profile); |
73 void RemoveProfile(const std::string& profile_path); | 72 void RemoveProfile(const std::string& profile_path); |
74 | 73 |
75 private: | 74 private: |
76 NetworkStateHandler* network_state_handler_; | |
77 ProfileList profiles_; | 75 ProfileList profiles_; |
78 ObserverList<NetworkProfileObserver> observers_; | 76 ObserverList<NetworkProfileObserver> observers_; |
79 | 77 |
80 // For Shill client callbacks | 78 // For Shill client callbacks |
81 base::WeakPtrFactory<NetworkProfileHandler> weak_ptr_factory_; | 79 base::WeakPtrFactory<NetworkProfileHandler> weak_ptr_factory_; |
82 | 80 |
83 private: | 81 private: |
84 DISALLOW_COPY_AND_ASSIGN(NetworkProfileHandler); | 82 DISALLOW_COPY_AND_ASSIGN(NetworkProfileHandler); |
85 }; | 83 }; |
86 | 84 |
87 } // namespace chromeos | 85 } // namespace chromeos |
88 | 86 |
89 #endif // CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ | 87 #endif // CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ |
OLD | NEW |