| Index: chromeos/tpm_password_fetcher.cc
|
| diff --git a/chrome/browser/chromeos/login/auth/tpm_password_fetcher.cc b/chromeos/tpm_password_fetcher.cc
|
| similarity index 83%
|
| rename from chrome/browser/chromeos/login/auth/tpm_password_fetcher.cc
|
| rename to chromeos/tpm_password_fetcher.cc
|
| index e447a8a88b4242c18669890b5ecdf222a4e3008a..139a08133eb6958d3d2d36cf8ead7219cce1ee02 100644
|
| --- a/chrome/browser/chromeos/login/auth/tpm_password_fetcher.cc
|
| +++ b/chromeos/tpm_password_fetcher.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/chromeos/login/auth/tpm_password_fetcher.h"
|
| +#include "chromeos/tpm_password_fetcher.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/compiler_specific.h"
|
| @@ -20,8 +20,7 @@ const int kTpmCheckIntervalMs = 500;
|
| } // namespace
|
|
|
| TpmPasswordFetcher::TpmPasswordFetcher(TpmPasswordFetcherDelegate* delegate)
|
| - : weak_factory_(this),
|
| - delegate_(delegate) {
|
| + : weak_factory_(this), delegate_(delegate) {
|
| DCHECK(delegate_);
|
| }
|
|
|
| @@ -32,17 +31,15 @@ void TpmPasswordFetcher::Fetch() {
|
| // Since this method is also called directly.
|
| weak_factory_.InvalidateWeakPtrs();
|
|
|
| - DBusThreadManager::Get()->GetCryptohomeClient()->TpmIsReady(
|
| - base::Bind(&TpmPasswordFetcher::OnTpmIsReady,
|
| - weak_factory_.GetWeakPtr()));
|
| + DBusThreadManager::Get()->GetCryptohomeClient()->TpmIsReady(base::Bind(
|
| + &TpmPasswordFetcher::OnTpmIsReady, weak_factory_.GetWeakPtr()));
|
| }
|
|
|
| void TpmPasswordFetcher::OnTpmIsReady(DBusMethodCallStatus call_status,
|
| bool tpm_is_ready) {
|
| if (call_status == DBUS_METHOD_CALL_SUCCESS && tpm_is_ready) {
|
| - DBusThreadManager::Get()->GetCryptohomeClient()->TpmGetPassword(
|
| - base::Bind(&TpmPasswordFetcher::OnTpmGetPassword,
|
| - weak_factory_.GetWeakPtr()));
|
| + DBusThreadManager::Get()->GetCryptohomeClient()->TpmGetPassword(base::Bind(
|
| + &TpmPasswordFetcher::OnTpmGetPassword, weak_factory_.GetWeakPtr()));
|
| } else {
|
| // Password hasn't been acquired, reschedule fetch.
|
| RescheduleFetch();
|
|
|