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

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

Issue 2808423002: cros: Show dircryto migration banner (Closed)
Patch Set: update banner text Created 3 years, 8 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 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 const ProtobufMethodCallback& callback) { 608 const ProtobufMethodCallback& callback) {
609 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback); 609 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback);
610 } 610 }
611 611
612 void FakeCryptohomeClient::SetFirmwareManagementParametersInTpm( 612 void FakeCryptohomeClient::SetFirmwareManagementParametersInTpm(
613 const cryptohome::SetFirmwareManagementParametersRequest& request, 613 const cryptohome::SetFirmwareManagementParametersRequest& request,
614 const ProtobufMethodCallback& callback) { 614 const ProtobufMethodCallback& callback) {
615 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback); 615 ReturnProtobufMethodCallback(cryptohome::BaseReply(), callback);
616 } 616 }
617 617
618 void FakeCryptohomeClient::NeedsDircryptoMigration(
619 const cryptohome::Identification& cryptohome_id,
620 const BoolDBusMethodCallback& callback) {
621 base::ThreadTaskRunnerHandle::Get()->PostTask(
622 FROM_HERE, base::Bind(callback, DBUS_METHOD_CALL_SUCCESS, true));
623 }
624
618 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) { 625 void FakeCryptohomeClient::SetServiceIsAvailable(bool is_available) {
619 service_is_available_ = is_available; 626 service_is_available_ = is_available;
620 if (is_available) { 627 if (is_available) {
621 std::vector<WaitForServiceToBeAvailableCallback> callbacks; 628 std::vector<WaitForServiceToBeAvailableCallback> callbacks;
622 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_); 629 callbacks.swap(pending_wait_for_service_to_be_available_callbacks_);
623 for (size_t i = 0; i < callbacks.size(); ++i) 630 for (size_t i = 0; i < callbacks.size(); ++i)
624 callbacks[i].Run(is_available); 631 callbacks[i].Run(is_available);
625 } 632 }
626 } 633 }
627 634
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 if (!dircrypto_migration_progress_handler_.is_null()) { 703 if (!dircrypto_migration_progress_handler_.is_null()) {
697 base::ThreadTaskRunnerHandle::Get()->PostTask( 704 base::ThreadTaskRunnerHandle::Get()->PostTask(
698 FROM_HERE, base::Bind(dircrypto_migration_progress_handler_, 705 FROM_HERE, base::Bind(dircrypto_migration_progress_handler_,
699 cryptohome::DIRCRYPTO_MIGRATION_IN_PROGRESS, 706 cryptohome::DIRCRYPTO_MIGRATION_IN_PROGRESS,
700 dircrypto_migration_progress_, 707 dircrypto_migration_progress_,
701 kDircryptoMigrationMaxProgress)); 708 kDircryptoMigrationMaxProgress));
702 } 709 }
703 } 710 }
704 711
705 } // namespace chromeos 712 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698