OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" | 5 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper_
impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "google_apis/gaia/gaia_auth_consumer.h" | 21 #include "google_apis/gaia/gaia_auth_consumer.h" |
22 #include "google_apis/gaia/gaia_auth_fetcher.h" | 22 #include "google_apis/gaia/gaia_auth_fetcher.h" |
23 #include "google_apis/gaia/gaia_constants.h" | 23 #include "google_apis/gaia/gaia_constants.h" |
24 | 24 |
25 namespace { | 25 namespace { |
26 | 26 |
27 // A helper class that takes care of asynchronously revoking a given token. | 27 // A helper class that takes care of asynchronously revoking a given token. |
28 class TokenRevoker : public GaiaAuthConsumer { | 28 class TokenRevoker : public GaiaAuthConsumer { |
29 public: | 29 public: |
30 TokenRevoker(); | 30 TokenRevoker(); |
31 virtual ~TokenRevoker(); | 31 ~TokenRevoker() override; |
32 | 32 |
33 void Start(const std::string& token); | 33 void Start(const std::string& token); |
34 | 34 |
35 // GaiaAuthConsumer: | 35 // GaiaAuthConsumer: |
36 virtual void OnOAuth2RevokeTokenCompleted() override; | 36 void OnOAuth2RevokeTokenCompleted() override; |
37 | 37 |
38 private: | 38 private: |
39 GaiaAuthFetcher gaia_fetcher_; | 39 GaiaAuthFetcher gaia_fetcher_; |
40 | 40 |
41 DISALLOW_COPY_AND_ASSIGN(TokenRevoker); | 41 DISALLOW_COPY_AND_ASSIGN(TokenRevoker); |
42 }; | 42 }; |
43 | 43 |
44 TokenRevoker::TokenRevoker() | 44 TokenRevoker::TokenRevoker() |
45 : gaia_fetcher_(this, | 45 : gaia_fetcher_(this, |
46 GaiaConstants::kChromeOSSource, | 46 GaiaConstants::kChromeOSSource, |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 std::vector<base::Closure> callbacks_to_run; | 380 std::vector<base::Closure> callbacks_to_run; |
381 callbacks_to_run.swap(auth_clear_callbacks_); | 381 callbacks_to_run.swap(auth_clear_callbacks_); |
382 for (std::vector<base::Closure>::iterator callback(callbacks_to_run.begin()); | 382 for (std::vector<base::Closure>::iterator callback(callbacks_to_run.begin()); |
383 callback != callbacks_to_run.end(); | 383 callback != callbacks_to_run.end(); |
384 ++callback) { | 384 ++callback) { |
385 callback->Run(); | 385 callback->Run(); |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 } // namespace chromeos | 389 } // namespace chromeos |
OLD | NEW |