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

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

Issue 2827203002: cros: Mount the existing eCryptfs vault to start migration. (Closed)
Patch Set: 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
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/cryptohome_client.h" 5 #include "chromeos/dbus/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 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 } 915 }
916 916
917 void SetFirmwareManagementParametersInTpm( 917 void SetFirmwareManagementParametersInTpm(
918 const cryptohome::SetFirmwareManagementParametersRequest& request, 918 const cryptohome::SetFirmwareManagementParametersRequest& request,
919 const ProtobufMethodCallback& callback) override { 919 const ProtobufMethodCallback& callback) override {
920 CallCryptohomeMethod(cryptohome::kCryptohomeSetFirmwareManagementParameters, 920 CallCryptohomeMethod(cryptohome::kCryptohomeSetFirmwareManagementParameters,
921 request, callback); 921 request, callback);
922 } 922 }
923 923
924 void MigrateToDircrypto(const cryptohome::Identification& cryptohome_id, 924 void MigrateToDircrypto(const cryptohome::Identification& cryptohome_id,
925 const cryptohome::AuthorizationRequest& auth,
926 const VoidDBusMethodCallback& callback) override { 925 const VoidDBusMethodCallback& callback) override {
927 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface, 926 dbus::MethodCall method_call(cryptohome::kCryptohomeInterface,
928 cryptohome::kCryptohomeMigrateToDircrypto); 927 cryptohome::kCryptohomeMigrateToDircrypto);
929 928
930 cryptohome::AccountIdentifier id_proto; 929 cryptohome::AccountIdentifier id_proto;
931 FillIdentificationProtobuf(cryptohome_id, &id_proto); 930 FillIdentificationProtobuf(cryptohome_id, &id_proto);
932 931
933 dbus::MessageWriter writer(&method_call); 932 dbus::MessageWriter writer(&method_call);
934 writer.AppendProtoAsArrayOfBytes(id_proto); 933 writer.AppendProtoAsArrayOfBytes(id_proto);
935 writer.AppendProtoAsArrayOfBytes(auth);
936 934
937 // The migration progress takes unpredicatable time depending on the 935 // The migration progress takes unpredicatable time depending on the
938 // user file size and the number. Setting the time limit to infinite. 936 // user file size and the number. Setting the time limit to infinite.
939 proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT, 937 proxy_->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
940 base::Bind(&CryptohomeClientImpl::OnVoidMethod, 938 base::Bind(&CryptohomeClientImpl::OnVoidMethod,
941 weak_ptr_factory_.GetWeakPtr(), callback)); 939 weak_ptr_factory_.GetWeakPtr(), callback));
942 } 940 }
943 941
944 void NeedsDircryptoMigration( 942 void NeedsDircryptoMigration(
945 const cryptohome::Identification& cryptohome_id, 943 const cryptohome::Identification& cryptohome_id,
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 return new CryptohomeClientImpl(); 1295 return new CryptohomeClientImpl();
1298 } 1296 }
1299 1297
1300 // static 1298 // static
1301 std::string CryptohomeClient::GetStubSanitizedUsername( 1299 std::string CryptohomeClient::GetStubSanitizedUsername(
1302 const cryptohome::Identification& cryptohome_id) { 1300 const cryptohome::Identification& cryptohome_id) {
1303 return cryptohome_id.id() + kUserIdStubHashSuffix; 1301 return cryptohome_id.id() + kUserIdStubHashSuffix;
1304 } 1302 }
1305 1303
1306 } // namespace chromeos 1304 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/cryptohome_client.h ('k') | chromeos/dbus/fake_cryptohome_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698