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

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

Issue 284673004: Improve functionality of FakeShillProfileClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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
« no previous file with comments | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/dbus/shill_service_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SHILL_PROFILE_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_
6 #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ 6 #define CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // Adds an entry to the profile only. |entry_path| corresponds to a 52 // Adds an entry to the profile only. |entry_path| corresponds to a
53 // 'service_path' and a corresponding entry will be added to 53 // 'service_path' and a corresponding entry will be added to
54 // ShillManagerClient ServiceCompleteList. No checking or updating of 54 // ShillManagerClient ServiceCompleteList. No checking or updating of
55 // ShillServiceClient is performed. 55 // ShillServiceClient is performed.
56 virtual void AddEntry(const std::string& profile_path, 56 virtual void AddEntry(const std::string& profile_path,
57 const std::string& entry_path, 57 const std::string& entry_path,
58 const base::DictionaryValue& properties) = 0; 58 const base::DictionaryValue& properties) = 0;
59 59
60 // Adds a service to the profile, copying properties from the 60 // Adds a service to the profile, copying properties from the
61 // ShillServiceClient entry (which must be present). Also sets the Profile 61 // ShillServiceClient entry matching |service_path|. Returns false if no
62 // property of the service in ShillServiceClient. 62 // Service entry exists or if a Profile entry already exists. Also sets
63 // the Profile property of the service in ShillServiceClient.
63 virtual bool AddService(const std::string& profile_path, 64 virtual bool AddService(const std::string& profile_path,
64 const std::string& service_path) = 0; 65 const std::string& service_path) = 0;
65 66
67 // Copies properties from the ShillServiceClient entry matching
68 // |service_path| to the profile entry matching |profile_path|. Returns
69 // false if no Service entry exits or if no Profile entry exists.
70 virtual bool UpdateService(const std::string& profile_path,
71 const std::string& service_path) = 0;
72
66 // Sets |profiles| to the current list of profile paths. 73 // Sets |profiles| to the current list of profile paths.
67 virtual void GetProfilePaths(std::vector<std::string>* profiles) = 0; 74 virtual void GetProfilePaths(std::vector<std::string>* profiles) = 0;
68 75
76 // Sets |properties| to the entry for |service_path|, sets |profile_path|
77 // to the path of the profile with the entry, and returns true if the
78 // service exists in any profile.
79 virtual bool GetService(const std::string& service_path,
80 std::string* profile_path,
81 base::DictionaryValue* properties) = 0;
82
83 // Remove all profile entries.
84 virtual void ClearProfiles() = 0;
85
69 protected: 86 protected:
70 virtual ~TestInterface() {} 87 virtual ~TestInterface() {}
71 }; 88 };
72 89
73 virtual ~ShillProfileClient(); 90 virtual ~ShillProfileClient();
74 91
75 // Factory function, creates a new instance which is owned by the caller. 92 // Factory function, creates a new instance which is owned by the caller.
76 // For normal usage, access the singleton via DBusThreadManager::Get(). 93 // For normal usage, access the singleton via DBusThreadManager::Get().
77 static ShillProfileClient* Create(); 94 static ShillProfileClient* Create();
78 95
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 // Create() should be used instead. 136 // Create() should be used instead.
120 ShillProfileClient(); 137 ShillProfileClient();
121 138
122 private: 139 private:
123 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient); 140 DISALLOW_COPY_AND_ASSIGN(ShillProfileClient);
124 }; 141 };
125 142
126 } // namespace chromeos 143 } // namespace chromeos
127 144
128 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_ 145 #endif // CHROMEOS_DBUS_SHILL_PROFILE_CLIENT_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_shill_service_client.cc ('k') | chromeos/dbus/shill_service_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698