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

Side by Side Diff: chrome/browser/chromeos/login/parallel_authenticator.cc

Issue 5108001: [Chrome OS] Fix data migration on PW change in parallel auth pathway (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/login/parallel_authenticator.h" 5 #include "chrome/browser/chromeos/login/parallel_authenticator.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 BrowserThread::PostTask( 351 BrowserThread::PostTask(
352 BrowserThread::UI, FROM_HERE, 352 BrowserThread::UI, FROM_HERE,
353 NewRunnableMethod(this, &ParallelAuthenticator::OnLoginFailure, 353 NewRunnableMethod(this, &ParallelAuthenticator::OnLoginFailure,
354 current_state_->online_outcome())); 354 current_state_->online_outcome()));
355 break; 355 break;
356 case HAVE_NEW_PW: 356 case HAVE_NEW_PW:
357 key_migrator_ = 357 key_migrator_ =
358 CryptohomeOp::CreateMigrateAttempt(reauth_state_.get(), 358 CryptohomeOp::CreateMigrateAttempt(reauth_state_.get(),
359 this, 359 this,
360 false, 360 true,
361 reauth_state_->ascii_hash); 361 current_state_->ascii_hash);
362 BrowserThread::PostTask( 362 BrowserThread::PostTask(
363 BrowserThread::UI, FROM_HERE, 363 BrowserThread::UI, FROM_HERE,
364 NewRunnableMethod(key_migrator_.get(), &CryptohomeOp::Initiate)); 364 NewRunnableMethod(key_migrator_.get(), &CryptohomeOp::Initiate));
365 break; 365 break;
366 case OFFLINE_LOGIN: 366 case OFFLINE_LOGIN:
367 request_pending = !current_state_->online_complete(); 367 request_pending = !current_state_->online_complete();
368 // Fall through. 368 // Fall through.
369 case UNLOCK: 369 case UNLOCK:
370 // Fall through. 370 // Fall through.
371 case ONLINE_LOGIN: 371 case ONLINE_LOGIN:
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 const unsigned int len) { 624 const unsigned int len) {
625 if (len < 2*binary_len) 625 if (len < 2*binary_len)
626 return false; 626 return false;
627 memset(hex_string, 0, len); 627 memset(hex_string, 0, len);
628 for (uint i = 0, j = 0; i < binary_len; i++, j+=2) 628 for (uint i = 0, j = 0; i < binary_len; i++, j+=2)
629 snprintf(hex_string + j, len - j, "%02x", binary[i]); 629 snprintf(hex_string + j, len - j, "%02x", binary[i]);
630 return true; 630 return true;
631 } 631 }
632 632
633 } // namespace chromeos 633 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/cryptohome_op.cc ('k') | chrome/browser/chromeos/login/parallel_authenticator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698