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

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

Issue 1001723002: media: Refactor PlatformVerificationFlow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unittest Created 5 years, 9 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_dialog.cc
diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
index a4c3fab6f1bcf7db9b25c3f83e59b00a054c3063..f2ec4e9784211747f07b5255b8c197fee44ed690 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc
@@ -40,7 +40,7 @@ const int kDialogMaxWidthInPixel = 400;
views::Widget* PlatformVerificationDialog::ShowDialog(
content::WebContents* web_contents,
const GURL& requesting_origin,
- const PlatformVerificationFlow::Delegate::ConsentCallback& callback) {
+ const ConsentCallback& callback) {
// In the case of an extension or hosted app, the origin of the request is
// best described by the extension / app name.
const extensions::Extension* extension =
@@ -74,7 +74,7 @@ PlatformVerificationDialog::~PlatformVerificationDialog() {
PlatformVerificationDialog::PlatformVerificationDialog(
content::WebContents* web_contents,
const base::string16& domain,
- const PlatformVerificationFlow::Delegate::ConsentCallback& callback)
+ const ConsentCallback& callback)
: content::WebContentsObserver(web_contents),
domain_(domain),
callback_(callback) {
@@ -93,19 +93,19 @@ PlatformVerificationDialog::PlatformVerificationDialog(
}
bool PlatformVerificationDialog::Cancel() {
- callback_.Run(PlatformVerificationFlow::CONSENT_RESPONSE_DENY);
+ callback_.Run(CONSENT_RESPONSE_DENY);
return true;
}
bool PlatformVerificationDialog::Accept() {
- callback_.Run(PlatformVerificationFlow::CONSENT_RESPONSE_ALLOW);
+ callback_.Run(CONSENT_RESPONSE_ALLOW);
return true;
}
bool PlatformVerificationDialog::Close() {
// This method is called when the tab is closed and in that case the decision
// hasn't been made yet.
- callback_.Run(PlatformVerificationFlow::CONSENT_RESPONSE_NONE);
+ callback_.Run(CONSENT_RESPONSE_NONE);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698