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

Unified Diff: chrome/browser/ui/webui/identity_internals/identity_internals_token_revoker.cc

Issue 365513002: Port identity_internals to mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT for commit Created 6 years, 5 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/ui/webui/identity_internals/identity_internals_token_revoker.cc
diff --git a/chrome/browser/ui/webui/identity_internals/identity_internals_token_revoker.cc b/chrome/browser/ui/webui/identity_internals/identity_internals_token_revoker.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f40401d6019f52dffd6b55a43be949995c3cb547
--- /dev/null
+++ b/chrome/browser/ui/webui/identity_internals/identity_internals_token_revoker.cc
@@ -0,0 +1,31 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/identity_internals/identity_internals_token_revoker.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/identity_internals/identity_internals_ui_handler.h"
+#include "google_apis/gaia/gaia_constants.h"
+
+IdentityInternalsTokenRevoker::IdentityInternalsTokenRevoker(
+ const std::string& extension_id,
+ const std::string& access_token,
+ const mojo::Callback<void()>& callback,
+ Profile* profile,
+ IdentityInternalsUIHandler* consumer)
+ : fetcher_(this, GaiaConstants::kChromeSource,
+ profile->GetRequestContext()),
+ extension_id_(extension_id),
+ access_token_(access_token),
+ callback_(callback),
+ consumer_(consumer) {
+ DCHECK(consumer_);
+ fetcher_.StartRevokeOAuth2Token(access_token);
+}
+
+IdentityInternalsTokenRevoker::~IdentityInternalsTokenRevoker() {}
+
+void IdentityInternalsTokenRevoker::OnOAuth2RevokeTokenCompleted() {
+ consumer_->OnTokenRevokerDone(this);
+}

Powered by Google App Engine
This is Rietveld 408576698