| 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 <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 void AddProfile(const std::string& profile_path, | 49 void AddProfile(const std::string& profile_path, |
| 50 const std::string& userhash) override; | 50 const std::string& userhash) override; |
| 51 void AddEntry(const std::string& profile_path, | 51 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 bool AddService(const std::string& profile_path, | 54 bool AddService(const std::string& profile_path, |
| 55 const std::string& service_path) override; | 55 const std::string& service_path) override; |
| 56 bool UpdateService(const std::string& profile_path, | 56 bool UpdateService(const std::string& profile_path, |
| 57 const std::string& service_path) override; | 57 const std::string& service_path) override; |
| 58 void GetProfilePaths(std::vector<std::string>* profiles) override; | 58 void GetProfilePaths(std::vector<std::string>* profiles) override; |
| 59 void GetProfilePathsContainingService( |
| 60 const std::string& service_path, |
| 61 std::vector<std::string>* profiles) override; |
| 59 bool GetService(const std::string& service_path, | 62 bool GetService(const std::string& service_path, |
| 60 std::string* profile_path, | 63 std::string* profile_path, |
| 61 base::DictionaryValue* properties) override; | 64 base::DictionaryValue* properties) override; |
| 62 void ClearProfiles() override; | 65 void ClearProfiles() override; |
| 63 | 66 |
| 64 private: | 67 private: |
| 65 struct ProfileProperties; | 68 struct ProfileProperties; |
| 66 using ProfileMap = std::map<std::string, std::unique_ptr<ProfileProperties>>; | 69 using ProfileMap = std::map<std::string, std::unique_ptr<ProfileProperties>>; |
| 67 | 70 |
| 68 bool AddOrUpdateServiceImpl(const std::string& profile_path, | 71 bool AddOrUpdateServiceImpl(const std::string& profile_path, |
| 69 const std::string& service_path, | 72 const std::string& service_path, |
| 70 ProfileProperties* profile); | 73 ProfileProperties* profile); |
| 71 | 74 |
| 72 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, | 75 ProfileProperties* GetProfile(const dbus::ObjectPath& profile_path, |
| 73 const ErrorCallback& error_callback); | 76 const ErrorCallback& error_callback); |
| 74 | 77 |
| 78 bool GetServiceDataFromProfile(const ProfileMap::iterator& iter, |
| 79 const std::string& service_path, |
| 80 std::string* profile_path, |
| 81 base::DictionaryValue* properties); |
| 82 |
| 75 ProfileMap profiles_; | 83 ProfileMap profiles_; |
| 76 | 84 |
| 77 DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); | 85 DISALLOW_COPY_AND_ASSIGN(FakeShillProfileClient); |
| 78 }; | 86 }; |
| 79 | 87 |
| 80 } // namespace chromeos | 88 } // namespace chromeos |
| 81 | 89 |
| 82 #endif // CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ | 90 #endif // CHROMEOS_DBUS_FAKE_SHILL_PROFILE_CLIENT_H_ |
| OLD | NEW |