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

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: Remove obsolete mock method 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
55 void FakeCryptohomeClient::WaitForServiceToBeAvailable( 58 void FakeCryptohomeClient::WaitForServiceToBeAvailable(
56 const WaitForServiceToBeAvailableCallback& callback) { 59 const WaitForServiceToBeAvailableCallback& callback) {
57 if (service_is_available_) { 60 if (service_is_available_) {
58 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, 61 base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
59 base::Bind(callback, true)); 62 base::Bind(callback, true));
60 } else { 63 } else {
61 pending_wait_for_service_to_be_available_callbacks_.push_back(callback); 64 pending_wait_for_service_to_be_available_callbacks_.push_back(callback);
62 } 65 }
63 } 66 }
64 67
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 cryptohome::MOUNT_ERROR_NONE)); 595 cryptohome::MOUNT_ERROR_NONE));
593 } else if (returns_data && !async_call_status_data_handler_.is_null()) { 596 } else if (returns_data && !async_call_status_data_handler_.is_null()) {
594 base::ThreadTaskRunnerHandle::Get()->PostTask( 597 base::ThreadTaskRunnerHandle::Get()->PostTask(
595 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, 598 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_,
596 true, std::string())); 599 true, std::string()));
597 } 600 }
598 ++async_call_id_; 601 ++async_call_id_;
599 } 602 }
600 603
601 } // namespace chromeos 604 } // 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