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

Unified Diff: service.cc

Issue 6598074: DoAutomaticFreeDiskSpaceControl() introduced (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: service.cc
diff --git a/service.cc b/service.cc
index a7b17ed448101374d5bb9609cbc45744ca6b34f3..dd66f122b2434695fdb773038c780fe6e13e6e9e 100644
--- a/service.cc
+++ b/service.cc
@@ -493,6 +493,29 @@ gboolean Service::AsyncRemoveTrackedSubdirectories(gint *OUT_async_id,
return TRUE;
}
+gboolean Service::DoAutomaticFreeDiskSpaceControl(gboolean *OUT_result,
+ GError **error) {
+ MountTaskResult result;
+ base::WaitableEvent event(true, false);
+ MountTaskAutomaticFreeDiskSpace* mount_task =
+ new MountTaskAutomaticFreeDiskSpace(this, mount_);
+ mount_task->set_result(&result);
+ mount_task->set_complete_event(&event);
+ mount_thread_.message_loop()->PostTask(FROM_HERE, mount_task);
+ event.Wait();
+ *OUT_result = result.return_status();
+ return TRUE;
+}
+
+gboolean Service::AsyncDoAutomaticFreeDiskSpaceControl(gint *OUT_async_id,
+ GError **error) {
+ MountTaskAutomaticFreeDiskSpace* mount_task =
+ new MountTaskAutomaticFreeDiskSpace(this, mount_);
+ *OUT_async_id = mount_task->sequence_id();
+ mount_thread_.message_loop()->PostTask(FROM_HERE, mount_task);
+ return TRUE;
+}
+
gboolean Service::TpmIsReady(gboolean* OUT_ready, GError** error) {
*OUT_ready = tpm_init_->IsTpmReady();
return TRUE;
« no previous file with comments | « service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698