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

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

Issue 2397863003: Move free disk space check to session_manager. (Closed)
Patch Set: Address comment. Created 4 years, 2 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
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_SESSION_MANAGER_CLIENT_H_ 5 #ifndef CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_
6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ 6 #define CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Asynchronously checks if starting the ARC instance is available. 226 // Asynchronously checks if starting the ARC instance is available.
227 // The result of the operation is reported through |callback|. 227 // The result of the operation is reported through |callback|.
228 // If the operation fails, it is reported as unavailable. 228 // If the operation fails, it is reported as unavailable.
229 virtual void CheckArcAvailability(const ArcCallback& callback) = 0; 229 virtual void CheckArcAvailability(const ArcCallback& callback) = 0;
230 230
231 // Asynchronously starts the ARC instance for the user whose cryptohome is 231 // Asynchronously starts the ARC instance for the user whose cryptohome is
232 // located by |cryptohome_id|. Flag |disable_boot_completed_broadcast| 232 // located by |cryptohome_id|. Flag |disable_boot_completed_broadcast|
233 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications. 233 // blocks Android ACTION_BOOT_COMPLETED broadcast for 3rd party applications.
234 // Upon completion, invokes |callback| with the result; true on success, false 234 // Upon completion, invokes |callback| with the result; true on success, false
235 // on failure (either session manager failed to start an instance or session 235 // on failure (either session manager failed to start an instance or session
236 // manager can not be reached). 236 // manager can not be reached). On Failure, the error is passed to the second
Daniel Erat 2016/10/06 14:53:54 nit: s/Failure/failure/
hidehiko 2016/10/07 05:28:38 Acknowledged.
237 // argument of the callback. The error may be empty even on failure, if the
238 // reponse is not received at all. The error looks like, e.g.,
Daniel Erat 2016/10/06 14:53:53 nit: s/reponse/response/
hidehiko 2016/10/07 05:28:38 Acknowledged.
239 // "org.freedesktop.DBus.Error.ServiceUnknown".
240 // TODO(hidehiko): Replace "typedef" by "using".
241 typedef base::Callback<void(bool success, const std::string& error)>
Daniel Erat 2016/10/06 14:53:53 is there any reason you can't perform this TODO in
hidehiko 2016/10/07 05:28:38 Other "Callback"s defined above use typedef for no
242 StartArcInstanceCallback;
237 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, 243 virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id,
238 bool disable_boot_completed_broadcast, 244 bool disable_boot_completed_broadcast,
239 const ArcCallback& callback) = 0; 245 const StartArcInstanceCallback& callback) = 0;
240 246
241 // Asynchronously stops the ARC instance. Upon completion, invokes 247 // Asynchronously stops the ARC instance. Upon completion, invokes
242 // |callback| with the result; true on success, false on failure (either 248 // |callback| with the result; true on success, false on failure (either
243 // session manager failed to stop an instance or session manager can not be 249 // session manager failed to stop an instance or session manager can not be
244 // reached). 250 // reached).
245 virtual void StopArcInstance(const ArcCallback& callback) = 0; 251 virtual void StopArcInstance(const ArcCallback& callback) = 0;
246 252
247 // Prioritizes the ARC instance by removing cgroups restrictions that 253 // Prioritizes the ARC instance by removing cgroups restrictions that
248 // session_manager applies to the instance by default. Upon completion, 254 // session_manager applies to the instance by default. Upon completion,
249 // invokes |callback| with the result; true on success, false on failure. 255 // invokes |callback| with the result; true on success, false on failure.
(...skipping 24 matching lines...) Expand all
274 // Create() should be used instead. 280 // Create() should be used instead.
275 SessionManagerClient(); 281 SessionManagerClient();
276 282
277 private: 283 private:
278 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient); 284 DISALLOW_COPY_AND_ASSIGN(SessionManagerClient);
279 }; 285 };
280 286
281 } // namespace chromeos 287 } // namespace chromeos
282 288
283 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_ 289 #endif // CHROMEOS_DBUS_SESSION_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698