| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/webui/identity_internals/identity_internals_token_re
voker.h" |
| 6 |
| 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/webui/identity_internals/identity_internals_ui_handl
er.h" |
| 9 #include "google_apis/gaia/gaia_constants.h" |
| 10 |
| 11 IdentityInternalsTokenRevoker::IdentityInternalsTokenRevoker( |
| 12 const std::string& extension_id, |
| 13 const std::string& access_token, |
| 14 const mojo::Callback<void()>& callback, |
| 15 Profile* profile, |
| 16 IdentityInternalsUIHandler* consumer) |
| 17 : fetcher_(this, GaiaConstants::kChromeSource, |
| 18 profile->GetRequestContext()), |
| 19 extension_id_(extension_id), |
| 20 access_token_(access_token), |
| 21 callback_(callback), |
| 22 consumer_(consumer) { |
| 23 DCHECK(consumer_); |
| 24 fetcher_.StartRevokeOAuth2Token(access_token); |
| 25 } |
| 26 |
| 27 IdentityInternalsTokenRevoker::~IdentityInternalsTokenRevoker() {} |
| 28 |
| 29 void IdentityInternalsTokenRevoker::OnOAuth2RevokeTokenCompleted() { |
| 30 consumer_->OnTokenRevokerDone(this); |
| 31 } |
| OLD | NEW |