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

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_flow.cc

Issue 29943003: Remove CanChallengePlatform() and CheckPlatformState(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove 0.1 usage. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
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..0ffdf4abd75d46cdc5f028c181e7f36ee411dc8f 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) {
@@ -143,28 +139,6 @@ void PlatformVerificationFlow::ChallengePlatformKey(
cryptohome_client_->TpmAttestationIsEnrolled(dbus_callback);
}
-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);
-}
-
void PlatformVerificationFlow::CheckConsent(content::WebContents* web_contents,
const std::string& service_id,
const std::string& challenge,

Powered by Google App Engine
This is Rietveld 408576698