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

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

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 4 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 unified diff | Download patch
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const AsyncMethodCallback& callback) { 86 const AsyncMethodCallback& callback) {
87 ReturnAsyncMethodResult(callback, false); 87 ReturnAsyncMethodResult(callback, false);
88 } 88 }
89 89
90 void FakeCryptohomeClient::AsyncRemove( 90 void FakeCryptohomeClient::AsyncRemove(
91 const std::string& username, 91 const std::string& username,
92 const AsyncMethodCallback& callback) { 92 const AsyncMethodCallback& callback) {
93 ReturnAsyncMethodResult(callback, false); 93 ReturnAsyncMethodResult(callback, false);
94 } 94 }
95 95
96 void FakeCryptohomeClient::RenameCryptohome(
97 const cryptohome::AccountIdentifier& id_from,
98 const cryptohome::AccountIdentifier& id_to,
99 const ProtobufMethodCallback& callback) {
100 cryptohome::BaseReply reply;
101 ReturnProtobufMethodCallback(reply, callback);
102 }
103
96 void FakeCryptohomeClient::GetSystemSalt( 104 void FakeCryptohomeClient::GetSystemSalt(
97 const GetSystemSaltCallback& callback) { 105 const GetSystemSaltCallback& callback) {
98 base::MessageLoop::current()->PostTask( 106 base::MessageLoop::current()->PostTask(
99 FROM_HERE, 107 FROM_HERE,
100 base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, system_salt_)); 108 base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, system_salt_));
101 } 109 }
102 110
103 void FakeCryptohomeClient::GetSanitizedUsername( 111 void FakeCryptohomeClient::GetSanitizedUsername(
104 const std::string& username, 112 const std::string& username,
105 const StringDBusMethodCallback& callback) { 113 const StringDBusMethodCallback& callback) {
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 } 490 }
483 491
484 void FakeCryptohomeClient::MountEx( 492 void FakeCryptohomeClient::MountEx(
485 const cryptohome::AccountIdentifier& id, 493 const cryptohome::AccountIdentifier& id,
486 const cryptohome::AuthorizationRequest& auth, 494 const cryptohome::AuthorizationRequest& auth,
487 const cryptohome::MountRequest& request, 495 const cryptohome::MountRequest& request,
488 const ProtobufMethodCallback& callback) { 496 const ProtobufMethodCallback& callback) {
489 cryptohome::BaseReply reply; 497 cryptohome::BaseReply reply;
490 cryptohome::MountReply* mount = 498 cryptohome::MountReply* mount =
491 reply.MutableExtension(cryptohome::MountReply::reply); 499 reply.MutableExtension(cryptohome::MountReply::reply);
492 mount->set_sanitized_username(GetStubSanitizedUsername(id.email())); 500 mount->set_sanitized_username(GetStubSanitizedUsername(id.account_id()));
493 ReturnProtobufMethodCallback(reply, callback); 501 ReturnProtobufMethodCallback(reply, callback);
494 } 502 }
495 503
496 void FakeCryptohomeClient::AddKeyEx( 504 void FakeCryptohomeClient::AddKeyEx(
497 const cryptohome::AccountIdentifier& id, 505 const cryptohome::AccountIdentifier& id,
498 const cryptohome::AuthorizationRequest& auth, 506 const cryptohome::AuthorizationRequest& auth,
499 const cryptohome::AddKeyRequest& request, 507 const cryptohome::AddKeyRequest& request,
500 const ProtobufMethodCallback& callback) { 508 const ProtobufMethodCallback& callback) {
501 cryptohome::BaseReply reply; 509 cryptohome::BaseReply reply;
502 ReturnProtobufMethodCallback(reply, callback); 510 ReturnProtobufMethodCallback(reply, callback);
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 FROM_HERE, 607 FROM_HERE,
600 base::Bind(async_call_status_data_handler_, 608 base::Bind(async_call_status_data_handler_,
601 async_call_id_, 609 async_call_id_,
602 true, 610 true,
603 std::string())); 611 std::string()));
604 } 612 }
605 ++async_call_id_; 613 ++async_call_id_;
606 } 614 }
607 615
608 } // namespace chromeos 616 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698