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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/login/tpm_password_fetcher.h" 5 #include "chrome/browser/chromeos/login/tpm_password_fetcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chromeos/dbus/cryptohome_client.h" 10 #include "chromeos/dbus/cryptohome_client.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 LOG(ERROR) << "TPM returned an empty password."; 59 LOG(ERROR) << "TPM returned an empty password.";
60 } 60 }
61 delegate_->OnPasswordFetched(password); 61 delegate_->OnPasswordFetched(password);
62 } else { 62 } else {
63 // Password hasn't been acquired, reschedule fetch. 63 // Password hasn't been acquired, reschedule fetch.
64 RescheduleFetch(); 64 RescheduleFetch();
65 } 65 }
66 } 66 }
67 67
68 void TpmPasswordFetcher::RescheduleFetch() { 68 void TpmPasswordFetcher::RescheduleFetch() {
69 MessageLoop::current()->PostDelayedTask( 69 base::MessageLoop::current()->PostDelayedTask(
70 FROM_HERE, 70 FROM_HERE,
71 base::Bind(&TpmPasswordFetcher::Fetch, weak_factory_.GetWeakPtr()), 71 base::Bind(&TpmPasswordFetcher::Fetch, weak_factory_.GetWeakPtr()),
72 base::TimeDelta::FromMilliseconds(kTpmCheckIntervalMs)); 72 base::TimeDelta::FromMilliseconds(kTpmCheckIntervalMs));
73 } 73 }
74 74
75 } // namespace chromeos 75 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.cc ('k') | chrome/browser/chromeos/login/user_flow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698