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

Side by Side Diff: chromeos/login/auth/extended_authenticator.cc

Issue 526353002: Merge cryptohome::RetrievedKeyData with cryptohome::KeyDefinition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@d_2_367847_add_get_key_data_ex_to_mount_flow
Patch Set: Rebased. Created 6 years, 3 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/login/auth/cryptohome_authenticator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/login/auth/extended_authenticator.h" 5 #include "chromeos/login/auth/extended_authenticator.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chromeos/cryptohome/async_method_caller.h" 10 #include "chromeos/cryptohome/async_method_caller.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 RecordStartMarker("MountEx"); 82 RecordStartMarker("MountEx");
83 83
84 std::string canonicalized = gaia::CanonicalizeEmail(user_id); 84 std::string canonicalized = gaia::CanonicalizeEmail(user_id);
85 cryptohome::Identification id(canonicalized); 85 cryptohome::Identification id(canonicalized);
86 cryptohome::Authorization auth(keys.front()); 86 cryptohome::Authorization auth(keys.front());
87 cryptohome::MountParameters mount(false); 87 cryptohome::MountParameters mount(false);
88 for (size_t i = 0; i < keys.size(); i++) { 88 for (size_t i = 0; i < keys.size(); i++) {
89 mount.create_keys.push_back(keys[i]); 89 mount.create_keys.push_back(keys[i]);
90 } 90 }
91 UserContext context(user_id); 91 UserContext context(user_id);
92 Key key(keys.front().key); 92 Key key(keys.front().secret);
93 key.SetLabel(keys.front().label); 93 key.SetLabel(keys.front().label);
94 context.SetKey(key); 94 context.SetKey(key);
95 95
96 cryptohome::HomedirMethods::GetInstance()->MountEx( 96 cryptohome::HomedirMethods::GetInstance()->MountEx(
97 id, 97 id,
98 auth, 98 auth,
99 mount, 99 mount,
100 base::Bind(&ExtendedAuthenticator::OnMountComplete, 100 base::Bind(&ExtendedAuthenticator::OnMountComplete,
101 this, 101 this,
102 "MountEx", 102 "MountEx",
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 if (consumer_) 352 if (consumer_)
353 consumer_->OnAuthenticationFailure(state); 353 consumer_->OnAuthenticationFailure(state);
354 354
355 if (old_consumer_) { 355 if (old_consumer_) {
356 AuthFailure failure(AuthFailure::UNLOCK_FAILED); 356 AuthFailure failure(AuthFailure::UNLOCK_FAILED);
357 old_consumer_->OnAuthFailure(failure); 357 old_consumer_->OnAuthFailure(failure);
358 } 358 }
359 } 359 }
360 360
361 } // namespace chromeos 361 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/login/auth/cryptohome_authenticator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698