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

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

Issue 2111043003: Storage manager: Show the disk usage of other users. (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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 98 }
99 99
100 void FakeCryptohomeClient::RenameCryptohome( 100 void FakeCryptohomeClient::RenameCryptohome(
101 const cryptohome::Identification& cryptohome_id_from, 101 const cryptohome::Identification& cryptohome_id_from,
102 const cryptohome::Identification& cryptohome_id_to, 102 const cryptohome::Identification& cryptohome_id_to,
103 const ProtobufMethodCallback& callback) { 103 const ProtobufMethodCallback& callback) {
104 cryptohome::BaseReply reply; 104 cryptohome::BaseReply reply;
105 ReturnProtobufMethodCallback(reply, callback); 105 ReturnProtobufMethodCallback(reply, callback);
106 } 106 }
107 107
108 void FakeCryptohomeClient::GetAccountDiskUsage(
109 const cryptohome::Identification& account_id,
110 const ProtobufMethodCallback& callback) {
111 cryptohome::BaseReply reply;
Darren Krahn 2016/06/30 16:35:26 Create the extension and return a fake size?
fukino 2016/06/30 18:54:37 I set 100MB as a fake usage for each user. Thanks!
112 ReturnProtobufMethodCallback(reply, callback);
113 }
114
108 void FakeCryptohomeClient::GetSystemSalt( 115 void FakeCryptohomeClient::GetSystemSalt(
109 const GetSystemSaltCallback& callback) { 116 const GetSystemSaltCallback& callback) {
110 base::ThreadTaskRunnerHandle::Get()->PostTask( 117 base::ThreadTaskRunnerHandle::Get()->PostTask(
111 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, system_salt_)); 118 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, system_salt_));
112 } 119 }
113 120
114 void FakeCryptohomeClient::GetSanitizedUsername( 121 void FakeCryptohomeClient::GetSanitizedUsername(
115 const cryptohome::Identification& cryptohome_id, 122 const cryptohome::Identification& cryptohome_id,
116 const StringDBusMethodCallback& callback) { 123 const StringDBusMethodCallback& callback) {
117 // Even for stub implementation we have to return different values so that 124 // Even for stub implementation we have to return different values so that
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 cryptohome::MOUNT_ERROR_NONE)); 602 cryptohome::MOUNT_ERROR_NONE));
596 } else if (returns_data && !async_call_status_data_handler_.is_null()) { 603 } else if (returns_data && !async_call_status_data_handler_.is_null()) {
597 base::ThreadTaskRunnerHandle::Get()->PostTask( 604 base::ThreadTaskRunnerHandle::Get()->PostTask(
598 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_, 605 FROM_HERE, base::Bind(async_call_status_data_handler_, async_call_id_,
599 true, std::string())); 606 true, std::string()));
600 } 607 }
601 ++async_call_id_; 608 ++async_call_id_;
602 } 609 }
603 610
604 } // namespace chromeos 611 } // 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