Index: chrome/browser/chromeos/attestation/platform_verification_flow.cc |
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.cc b/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
index ab2a53b151bb88ad5a57cc0d2b57cf27548b28af..49142c2c4c4c9e579f3b8093cfb32d9f9dd907ca 100644 |
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
@@ -18,7 +18,6 @@ |
#include "chromeos/cryptohome/async_method_caller.h" |
#include "chromeos/dbus/cryptohome_client.h" |
#include "chromeos/dbus/dbus_thread_manager.h" |
-#include "chromeos/system/statistics_provider.h" |
#include "components/user_prefs/pref_registry_syncable.h" |
#include "components/user_prefs/user_prefs.h" |
#include "content/public/browser/browser_thread.h" |
@@ -84,7 +83,6 @@ PlatformVerificationFlow::PlatformVerificationFlow() |
async_caller_(cryptohome::AsyncMethodCaller::GetInstance()), |
cryptohome_client_(DBusThreadManager::Get()->GetCryptohomeClient()), |
user_manager_(UserManager::Get()), |
- statistics_provider_(system::StatisticsProvider::GetInstance()), |
delegate_(NULL), |
testing_prefs_(NULL), |
weak_factory_(this) { |
@@ -104,13 +102,11 @@ PlatformVerificationFlow::PlatformVerificationFlow( |
cryptohome::AsyncMethodCaller* async_caller, |
CryptohomeClient* cryptohome_client, |
UserManager* user_manager, |
- system::StatisticsProvider* statistics_provider, |
Delegate* delegate) |
: attestation_flow_(attestation_flow), |
async_caller_(async_caller), |
cryptohome_client_(cryptohome_client), |
user_manager_(user_manager), |
- statistics_provider_(statistics_provider), |
delegate_(delegate), |
testing_prefs_(NULL), |
weak_factory_(this) { |
@@ -146,23 +142,12 @@ void PlatformVerificationFlow::ChallengePlatformKey( |
void PlatformVerificationFlow::CheckPlatformState( |
const base::Callback<void(bool result)>& callback) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
- std::string stat_value; |
- if (!statistics_provider_->GetMachineStatistic(system::kDevSwitchBootMode, |
- &stat_value)) { |
- LOG(ERROR) << __func__ << ": Failed to get boot mode statistic."; |
- callback.Run(false); |
- return; |
- } |
- if (stat_value != "0") { |
- LOG(INFO) << __func__ << ": Statistic indicates developer mode."; |
- callback.Run(false); |
- return; |
- } |
- BoolDBusMethodCallback dbus_callback = base::Bind( |
- &DBusCallback, |
- callback, |
- base::Bind(callback, false)); |
- cryptohome_client_->TpmAttestationIsPrepared(dbus_callback); |
+ // The implementation of this method has been removed for two reasons: |
+ // 1. It may be wrong and when it is a poor UX will follow. |
+ // 2. It leaks platform state information which should stay internal. |
+ // TODO(dkrahn): Remove the method once all callers have been cleaned up. |
+ // crbug.com/307707 |
+ callback.Run(true); |
} |
void PlatformVerificationFlow::CheckConsent(content::WebContents* web_contents, |