| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "google_apis/gaia/oauth2_revocation_fetcher.h" | 5 #include "google_apis/gaia/oauth2_revocation_fetcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 } | 147 } |
| 148 | 148 |
| 149 // static | 149 // static |
| 150 GURL OAuth2RevocationFetcher::MakeRevocationUrl() { | 150 GURL OAuth2RevocationFetcher::MakeRevocationUrl() { |
| 151 return GURL(kOAuth2RevokeTokenURL); | 151 return GURL(kOAuth2RevokeTokenURL); |
| 152 } | 152 } |
| 153 | 153 |
| 154 // static | 154 // static |
| 155 std::string OAuth2RevocationFetcher::MakeRevocationHeader( | 155 std::string OAuth2RevocationFetcher::MakeRevocationHeader( |
| 156 const std::string& access_token) { | 156 const std::string& access_token) { |
| 157 return StringPrintf(kAuthorizationHeaderFormat, access_token.c_str()); | 157 return base::StringPrintf(kAuthorizationHeaderFormat, access_token.c_str()); |
| 158 } | 158 } |
| 159 | 159 |
| 160 // static | 160 // static |
| 161 std::string OAuth2RevocationFetcher::MakeRevocationBody( | 161 std::string OAuth2RevocationFetcher::MakeRevocationBody( |
| 162 const std::string& client_id, | 162 const std::string& client_id, |
| 163 const std::string& origin) { | 163 const std::string& origin) { |
| 164 std::string enc_client_id = net::EscapeUrlEncodedData(client_id, true); | 164 std::string enc_client_id = net::EscapeUrlEncodedData(client_id, true); |
| 165 std::string enc_origin = net::EscapeUrlEncodedData(origin, true); | 165 std::string enc_origin = net::EscapeUrlEncodedData(origin, true); |
| 166 return StringPrintf( | 166 return base::StringPrintf( |
| 167 kRevocationBodyFormat, | 167 kRevocationBodyFormat, |
| 168 enc_client_id.c_str(), | 168 enc_client_id.c_str(), |
| 169 enc_origin.c_str()); | 169 enc_origin.c_str()); |
| 170 } | 170 } |
| OLD | NEW |