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

Side by Side Diff: chromeos/dbus/fake_shill_manager_client.h

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Elim UpdateManagerProperties, feedback Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_ 6 #define CHROMEOS_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void AddTechnology(const std::string& type, bool enabled) OVERRIDE; 86 virtual void AddTechnology(const std::string& type, bool enabled) OVERRIDE;
87 virtual void RemoveTechnology(const std::string& type) OVERRIDE; 87 virtual void RemoveTechnology(const std::string& type) OVERRIDE;
88 virtual void SetTechnologyInitializing(const std::string& type, 88 virtual void SetTechnologyInitializing(const std::string& type,
89 bool initializing) OVERRIDE; 89 bool initializing) OVERRIDE;
90 virtual void AddGeoNetwork(const std::string& technology, 90 virtual void AddGeoNetwork(const std::string& technology,
91 const base::DictionaryValue& network) OVERRIDE; 91 const base::DictionaryValue& network) OVERRIDE;
92 virtual void AddProfile(const std::string& profile_path) OVERRIDE; 92 virtual void AddProfile(const std::string& profile_path) OVERRIDE;
93 virtual void ClearProperties() OVERRIDE; 93 virtual void ClearProperties() OVERRIDE;
94 virtual void SetManagerProperty(const std::string& key, 94 virtual void SetManagerProperty(const std::string& key,
95 const base::Value& value) OVERRIDE; 95 const base::Value& value) OVERRIDE;
96 virtual void AddManagerService(const std::string& service_path, 96 virtual void AddManagerService(const std::string& service_path) OVERRIDE;
97 bool add_to_visible_list) OVERRIDE; 97 virtual void RemoveManagerService(const std::string& service_path) OVERRIDE;
98 virtual void RemoveManagerService(const std::string& service_path,
99 bool remove_from_complete_list) OVERRIDE;
100 virtual void ClearManagerServices() OVERRIDE; 98 virtual void ClearManagerServices() OVERRIDE;
101 virtual void ServiceStateChanged(const std::string& service_path, 99 virtual void ServiceStateChanged(const std::string& service_path,
102 const std::string& state) OVERRIDE; 100 const std::string& state) OVERRIDE;
103 virtual void SortManagerServices() OVERRIDE; 101 virtual void SortManagerServices(bool notify) OVERRIDE;
104 virtual void SetupDefaultEnvironment() OVERRIDE; 102 virtual void SetupDefaultEnvironment() OVERRIDE;
105 virtual int GetInteractiveDelay() const OVERRIDE; 103 virtual int GetInteractiveDelay() const OVERRIDE;
106 virtual void SetBestServiceToConnect( 104 virtual void SetBestServiceToConnect(
107 const std::string& service_path) OVERRIDE; 105 const std::string& service_path) OVERRIDE;
108 106
109 // Constants used for testing. 107 // Constants used for testing.
110 static const char kFakeEthernetNetworkPath[]; 108 static const char kFakeEthernetNetworkPath[];
111 109
112 private: 110 private:
113 // |property| should be kServicesProperty or kServiceCompleteListProperty. 111 // |property| should be kServicesProperty or kServiceCompleteListProperty.
114 void SortServiceList(const std::string& property); 112 void SortServiceList(const std::string& property);
115 113
116 void SetDefaultProperties(); 114 void SetDefaultProperties();
117 void PassStubProperties(const DictionaryValueCallback& callback) const; 115 void PassStubProperties(const DictionaryValueCallback& callback) const;
118 void PassStubGeoNetworks(const DictionaryValueCallback& callback) const; 116 void PassStubGeoNetworks(const DictionaryValueCallback& callback) const;
119 void CallNotifyObserversPropertyChanged(const std::string& property); 117 void CallNotifyObserversPropertyChanged(const std::string& property);
120 void NotifyObserversPropertyChanged(const std::string& property); 118 void NotifyObserversPropertyChanged(const std::string& property);
121 base::ListValue* GetListProperty(const std::string& property); 119 base::ListValue* GetListProperty(const std::string& property);
122 bool TechnologyEnabled(const std::string& type) const; 120 bool TechnologyEnabled(const std::string& type) const;
123 void SetTechnologyEnabled(const std::string& type, 121 void SetTechnologyEnabled(const std::string& type,
124 const base::Closure& callback, 122 const base::Closure& callback,
125 bool enabled); 123 bool enabled);
126 base::ListValue* GetEnabledServiceList(const std::string& property) const;
127 void ScanCompleted(const std::string& device_path, 124 void ScanCompleted(const std::string& device_path,
128 const base::Closure& callback); 125 const base::Closure& callback);
129 126
130 // Parses the command line for Shill stub switches and sets initial states. 127 // Parses the command line for Shill stub switches and sets initial states.
131 // Uses comma-separated name-value pairs (see SplitStringIntoKeyValuePairs): 128 // Uses comma-separated name-value pairs (see SplitStringIntoKeyValuePairs):
132 // interactive={delay} - sets delay in seconds for interactive UI 129 // interactive={delay} - sets delay in seconds for interactive UI
133 // {wifi,cellular,etc}={on,off,disabled,none} - sets initial state for type 130 // {wifi,cellular,etc}={on,off,disabled,none} - sets initial state for type
134 void ParseCommandLineSwitch(); 131 void ParseCommandLineSwitch();
135 bool ParseOption(const std::string& arg0, const std::string& arg1); 132 bool ParseOption(const std::string& arg0, const std::string& arg1);
136 bool SetInitialNetworkState(std::string type_arg, std::string state_arg); 133 bool SetInitialNetworkState(std::string type_arg, std::string state_arg);
(...skipping 23 matching lines...) Expand all
160 157
161 // 'Best' service to connect to on ConnectToBestServices() calls. 158 // 'Best' service to connect to on ConnectToBestServices() calls.
162 std::string best_service_; 159 std::string best_service_;
163 160
164 DISALLOW_COPY_AND_ASSIGN(FakeShillManagerClient); 161 DISALLOW_COPY_AND_ASSIGN(FakeShillManagerClient);
165 }; 162 };
166 163
167 } // namespace chromeos 164 } // namespace chromeos
168 165
169 #endif // CHROMEOS_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_ 166 #endif // CHROMEOS_DBUS_FAKE_SHILL_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698