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

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

Issue 43503003: chromeos: Remove SystemSaltGetter::GetSystemSaltSync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "crypto/nss_util.h" 10 #include "crypto/nss_util.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 const AsyncMethodCallback& callback) { 73 const AsyncMethodCallback& callback) {
74 ReturnAsyncMethodResult(callback, false); 74 ReturnAsyncMethodResult(callback, false);
75 } 75 }
76 76
77 void FakeCryptohomeClient::AsyncRemove( 77 void FakeCryptohomeClient::AsyncRemove(
78 const std::string& username, 78 const std::string& username,
79 const AsyncMethodCallback& callback) { 79 const AsyncMethodCallback& callback) {
80 ReturnAsyncMethodResult(callback, false); 80 ReturnAsyncMethodResult(callback, false);
81 } 81 }
82 82
83 bool FakeCryptohomeClient::GetSystemSalt(std::vector<uint8>* salt) { 83 void FakeCryptohomeClient::GetSystemSalt(
84 *salt = system_salt_; 84 const GetSystemSaltCallback& callback) {
85 return true; 85 base::MessageLoop::current()->PostTask(
86 FROM_HERE,
87 base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, system_salt_));
86 } 88 }
87 89
88 void FakeCryptohomeClient::GetSanitizedUsername( 90 void FakeCryptohomeClient::GetSanitizedUsername(
89 const std::string& username, 91 const std::string& username,
90 const StringDBusMethodCallback& callback) { 92 const StringDBusMethodCallback& callback) {
91 // Even for stub implementation we have to return different values so that 93 // Even for stub implementation we have to return different values so that
92 // multi-profiles would work. 94 // multi-profiles would work.
93 std::string sanitized_username = GetStubSanitizedUsername(username); 95 std::string sanitized_username = GetStubSanitizedUsername(username);
94 base::MessageLoop::current()->PostTask( 96 base::MessageLoop::current()->PostTask(
95 FROM_HERE, 97 FROM_HERE,
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 FROM_HERE, 426 FROM_HERE,
425 base::Bind(async_call_status_data_handler_, 427 base::Bind(async_call_status_data_handler_,
426 async_call_id_, 428 async_call_id_,
427 true, 429 true,
428 std::string())); 430 std::string()));
429 } 431 }
430 ++async_call_id_; 432 ++async_call_id_;
431 } 433 }
432 434
433 } // namespace chromeos 435 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698