| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/policy/policy_oauth2_token_fetcher.h" | 5 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
| 12 #include "content/public/browser/browser_thread.h" | 12 #include "content/public/browser/browser_thread.h" |
| 13 #include "google_apis/gaia/gaia_auth_fetcher.h" | 13 #include "google_apis/gaia/gaia_auth_fetcher.h" |
| 14 #include "google_apis/gaia/gaia_constants.h" | 14 #include "google_apis/gaia/gaia_constants.h" |
| 15 #include "google_apis/gaia/gaia_urls.h" | 15 #include "google_apis/gaia/gaia_urls.h" |
| 16 #include "google_apis/gaia/google_service_auth_error.h" | 16 #include "google_apis/gaia/google_service_auth_error.h" |
| 17 #include "google_apis/gaia/oauth2_access_token_fetcher.h" | 17 #include "google_apis/gaia/oauth2_access_token_fetcher.h" |
| 18 #include "net/url_request/url_request_context_getter.h" | 18 #include "net/url_request/url_request_context_getter.h" |
| 19 | 19 |
| 20 using content::BrowserThread; | 20 using content::BrowserThread; |
| 21 | 21 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // So don't rely on |this| still being valid after ForwardPolicyToken() | 135 // So don't rely on |this| still being valid after ForwardPolicyToken() |
| 136 // returns i.e. don't write to |failed_| or other fields. | 136 // returns i.e. don't write to |failed_| or other fields. |
| 137 ForwardPolicyToken(EmptyString()); | 137 ForwardPolicyToken(EmptyString()); |
| 138 } | 138 } |
| 139 | 139 |
| 140 void PolicyOAuth2TokenFetcher::ForwardPolicyToken(const std::string& token) { | 140 void PolicyOAuth2TokenFetcher::ForwardPolicyToken(const std::string& token) { |
| 141 callback_.Run(token); | 141 callback_.Run(token); |
| 142 } | 142 } |
| 143 | 143 |
| 144 } // namespace policy | 144 } // namespace policy |
| OLD | NEW |