Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PROFILE_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ | 6 #define CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 virtual ShillProfileClient::TestInterface* GetTestInterface() OVERRIDE; | 46 virtual ShillProfileClient::TestInterface* GetTestInterface() OVERRIDE; |
| 47 | 47 |
| 48 // ShillProfileClient::TestInterface overrides. | 48 // ShillProfileClient::TestInterface overrides. |
| 49 virtual void AddProfile(const std::string& profile_path, | 49 virtual void AddProfile(const std::string& profile_path, |
| 50 const std::string& userhash) OVERRIDE; | 50 const std::string& userhash) OVERRIDE; |
| 51 virtual void AddEntry(const std::string& profile_path, | 51 virtual void AddEntry(const std::string& profile_path, |
| 52 const std::string& entry_path, | 52 const std::string& entry_path, |
| 53 const base::DictionaryValue& properties) OVERRIDE; | 53 const base::DictionaryValue& properties) OVERRIDE; |
| 54 virtual bool AddService(const std::string& profile_path, | 54 virtual bool AddService(const std::string& profile_path, |
| 55 const std::string& service_path) OVERRIDE; | 55 const std::string& service_path) OVERRIDE; |
| 56 virtual bool UpdateService(const std::string& profile_path, | |
| 57 const std::string& service_path) OVERRIDE; | |
| 56 virtual void GetProfilePaths(std::vector<std::string>* profiles) OVERRIDE; | 58 virtual void GetProfilePaths(std::vector<std::string>* profiles) OVERRIDE; |
| 59 virtual bool GetService(const std::string& service_path, | |
| 60 std::string* profile_path, | |
| 61 base::DictionaryValue* properties) OVERRIDE; | |
| 62 virtual void ClearProfiles() OVERRIDE; | |
| 57 | 63 |
| 58 private: | 64 private: |
| 59 struct ProfileProperties; | 65 struct ProfileProperties; |
| 60 typedef std::map<std::string, ProfileProperties*> ProfileMap; | 66 typedef std::map<std::string, ProfileProperties*> ProfileMap; |
| 61 | 67 |
| 68 bool AddOrUpdateServiceImpl(ProfileProperties* profile, | |
|
pneubeck (no reviews)
2014/05/14 08:12:17
argument order: profile (because non-const) should
stevenjb
2014/05/14 17:08:10
Done.
| |
| 69 const std::string& profile_path, | |
| 70 const std::string& service_path); | |
| 71 | |
| 62 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, | 72 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, |
| 63 const ErrorCallback& error_callback); | 73 const ErrorCallback& error_callback); |
| 64 | 74 |
| 65 // The values are owned by this class and are explicitly destroyed where | 75 // The values are owned by this class and are explicitly destroyed where |
| 66 // necessary. | 76 // necessary. |
| 67 ProfileMap profiles_; | 77 ProfileMap profiles_; |
| 68 | 78 |
| 69 DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); | 79 DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); |
| 70 }; | 80 }; |
| 71 | 81 |
| 72 } // namespace chromeos | 82 } // namespace chromeos |
| 73 | 83 |
| 74 #endif // CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ | 84 #endif // CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
| OLD | NEW |