| OLD | NEW |
| 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 "tpm_password_fetcher.h" | 5 #include "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/location.h" | 9 #include "base/location.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
| 12 #include "chromeos/dbus/cryptohome_client.h" | 12 #include "chromeos/dbus/cryptohome_client.h" |
| 13 #include "chromeos/dbus/dbus_thread_manager.h" | 13 #include "chromeos/dbus/dbus_thread_manager.h" |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // Interval between TPM password checks. | 19 // Interval between TPM password checks. |
| 20 const int kTpmCheckIntervalMs = 500; | 20 const int kTpmCheckIntervalMs = 500; |
| 21 | 21 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 void TpmPasswordFetcher::RescheduleFetch() { | 67 void TpmPasswordFetcher::RescheduleFetch() { |
| 68 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 68 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 69 FROM_HERE, | 69 FROM_HERE, |
| 70 base::Bind(&TpmPasswordFetcher::Fetch, weak_factory_.GetWeakPtr()), | 70 base::Bind(&TpmPasswordFetcher::Fetch, weak_factory_.GetWeakPtr()), |
| 71 base::TimeDelta::FromMilliseconds(kTpmCheckIntervalMs)); | 71 base::TimeDelta::FromMilliseconds(kTpmCheckIntervalMs)); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace chromeos | 74 } // namespace chromeos |
| OLD | NEW |