Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: chromeos/network/network_profile_handler.h

Issue 181413006: Replace misc. network stub flags with more flexible ones (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elim. shill_stub_helper and move functions to clients. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 const NetworkProfile* GetProfileForPath( 50 const NetworkProfile* GetProfileForPath(
51 const std::string& profile_path) const; 51 const std::string& profile_path) const;
52 const NetworkProfile* GetProfileForUserhash( 52 const NetworkProfile* GetProfileForUserhash(
53 const std::string& userhash) const; 53 const std::string& userhash) const;
54 54
55 // Returns the first profile entry with a non-empty userhash. 55 // Returns the first profile entry with a non-empty userhash.
56 // TODO(stevenjb): Replace with GetProfileForUserhash() with the correct 56 // TODO(stevenjb): Replace with GetProfileForUserhash() with the correct
57 // userhash. 57 // userhash.
58 const NetworkProfile* GetDefaultUserProfile() const; 58 const NetworkProfile* GetDefaultUserProfile() const;
59 59
60 static const char kSharedProfilePath[]; 60 static const char* GetSharedProfilePath();
61 61
62 protected: 62 protected:
63 friend class ClientCertResolverTest; 63 friend class ClientCertResolverTest;
64 friend class NetworkHandler; 64 friend class NetworkHandler;
65 NetworkProfileHandler(); 65 NetworkProfileHandler();
66 66
67 // Add ShillManagerClient property observer and request initial list. 67 // Add ShillManagerClient property observer and request initial list.
68 // Sets |network_state_handler_| for triggering Manager updates (can be NULL). 68 // Sets |network_state_handler_| for triggering Manager updates (can be NULL).
69 void Init(NetworkStateHandler* network_state_handler); 69 void Init(NetworkStateHandler* network_state_handler);
70 70
71 void AddProfile(const NetworkProfile& profile); 71 void AddProfile(const NetworkProfile& profile);
72 void RemoveProfile(const std::string& profile_path); 72 void RemoveProfile(const std::string& profile_path);
73 73
74 private: 74 private:
75 NetworkStateHandler* network_state_handler_; 75 NetworkStateHandler* network_state_handler_;
76 ProfileList profiles_; 76 ProfileList profiles_;
77 ObserverList<NetworkProfileObserver> observers_; 77 ObserverList<NetworkProfileObserver> observers_;
78 78
79 // For Shill client callbacks 79 // For Shill client callbacks
80 base::WeakPtrFactory<NetworkProfileHandler> weak_ptr_factory_; 80 base::WeakPtrFactory<NetworkProfileHandler> weak_ptr_factory_;
81 81
82 private: 82 private:
83 DISALLOW_COPY_AND_ASSIGN(NetworkProfileHandler); 83 DISALLOW_COPY_AND_ASSIGN(NetworkProfileHandler);
84 }; 84 };
85 85
86 } // namespace chromeos 86 } // namespace chromeos
87 87
88 #endif // CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_ 88 #endif // CHROMEOS_NETWORK_NETWORK_PROFILE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698