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

Side by Side Diff: chromeos/dbus/fake_cryptohome_client.cc

Issue 2101853002: Add signal handler for low disk notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chromeos/dbus/fake_cryptohome_client.h ('k') | chromeos/dbus/mock_cryptohome_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 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 #include "chromeos/dbus/fake_cryptohome_client.h" 5 #include "chromeos/dbus/fake_cryptohome_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const AsyncCallStatusWithDataHandler& data_handler) { 45 const AsyncCallStatusWithDataHandler& data_handler) {
46 async_call_status_handler_ = handler; 46 async_call_status_handler_ = handler;
47 async_call_status_data_handler_ = data_handler; 47 async_call_status_data_handler_ = data_handler;
48 } 48 }
49 49
50 void FakeCryptohomeClient::ResetAsyncCallStatusHandlers() { 50 void FakeCryptohomeClient::ResetAsyncCallStatusHandlers() {
51 async_call_status_handler_.Reset(); 51 async_call_status_handler_.Reset();
52 async_call_status_data_handler_.Reset(); 52 async_call_status_data_handler_.Reset();
53 } 53 }
54 54
55 void FakeCryptohomeClient::SetLowDiskSpaceHandler(
56 const LowDiskSpaceHandler& handler) {
57 low_disk_space_handler_ = handler;
satorux1 2016/06/28 00:48:29 low_disk_space_handler_ is set but won't be used?
dspaid 2016/06/28 00:57:08 Done.
58 }
59
55 void FakeCryptohomeClient::WaitForServiceToBeAvailable( 60 void FakeCryptohomeClient::WaitForServiceToBeAvailable(
56 const WaitForServiceToBeAvailableCallback& callback) { 61 const WaitForServiceToBeAvailableCallback& callback) {
57 if (service_is_available_) { 62 if (service_is_available_) {
58 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 63 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
59 base::Bind(callback, true)); 64 base::Bind(callback, true));
60 } else { 65 } else {
61 pending_wait_for_service_to_be_available_callbacks_.push_back(callback); 66 pending_wait_for_service_to_be_available_callbacks_.push_back(callback);
62 } 67 }
63 } 68 }
64 69
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 cryptohome::MOUNT_ERROR_NONE)); 597 cryptohome::MOUNT_ERROR_NONE));
593 } else if (returns_data && !async_call_status_data_handler_.is_null()) { 598 } else if (returns_data && !async_call_status_data_handler_.is_null()) {
594 base::ThreadTaskRunnerHandle::Get()->PostTask( 599 base::ThreadTaskRunnerHandle::Get()->PostTask(
595 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, 600 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_,
596 true, std::string())); 601 true, std::string()));
597 } 602 }
598 ++async_call_id_; 603 ++async_call_id_;
599 } 604 }
600 605
601 } // namespace chromeos 606 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_cryptohome_client.h ('k') | chromeos/dbus/mock_cryptohome_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698