| 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 "chrome/browser/extensions/api/identity/identity_api.h" | 5 #include "chrome/browser/extensions/api/identity/identity_api.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 base::ListValue* infos = new base::ListValue(); | 269 base::ListValue* infos = new base::ListValue(); |
| 270 | 270 |
| 271 for (std::vector<std::string>::const_iterator it = gaia_ids.begin(); | 271 for (std::vector<std::string>::const_iterator it = gaia_ids.begin(); |
| 272 it != gaia_ids.end(); | 272 it != gaia_ids.end(); |
| 273 ++it) { | 273 ++it) { |
| 274 api::identity::AccountInfo account_info; | 274 api::identity::AccountInfo account_info; |
| 275 account_info.id = *it; | 275 account_info.id = *it; |
| 276 infos->Append(account_info.ToValue().release()); | 276 infos->Append(account_info.ToValue().release()); |
| 277 } | 277 } |
| 278 | 278 |
| 279 return RespondNow(MultipleArguments(infos)); | 279 return RespondNow(SingleArgument(infos)); |
| 280 } | 280 } |
| 281 | 281 |
| 282 IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction() | 282 IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction() |
| 283 : OAuth2TokenService::Consumer("extensions_identity_api"), | 283 : OAuth2TokenService::Consumer("extensions_identity_api"), |
| 284 should_prompt_for_scopes_(false), | 284 should_prompt_for_scopes_(false), |
| 285 should_prompt_for_signin_(false) {} | 285 should_prompt_for_signin_(false) {} |
| 286 | 286 |
| 287 IdentityGetAuthTokenFunction::~IdentityGetAuthTokenFunction() {} | 287 IdentityGetAuthTokenFunction::~IdentityGetAuthTokenFunction() {} |
| 288 | 288 |
| 289 bool IdentityGetAuthTokenFunction::RunAsync() { | 289 bool IdentityGetAuthTokenFunction::RunAsync() { |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( | 829 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( |
| 830 const GURL& redirect_url) { | 830 const GURL& redirect_url) { |
| 831 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { | 831 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { |
| 832 SetResult(new base::StringValue(redirect_url.spec())); | 832 SetResult(new base::StringValue(redirect_url.spec())); |
| 833 SendResponse(true); | 833 SendResponse(true); |
| 834 Release(); // Balanced in RunAsync. | 834 Release(); // Balanced in RunAsync. |
| 835 } | 835 } |
| 836 } | 836 } |
| 837 | 837 |
| 838 } // namespace extensions | 838 } // namespace extensions |
| OLD | NEW |