Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/extensions/api/identity/identity_api.cc

Issue 291453002: Make ExtensionFunction::ArgumentList (PKA MultipleArguments) take a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reabse Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 base::ListValue* infos = new base::ListValue(); 268 base::ListValue* infos = new base::ListValue();
269 269
270 for (std::vector<std::string>::const_iterator it = gaia_ids.begin(); 270 for (std::vector<std::string>::const_iterator it = gaia_ids.begin();
271 it != gaia_ids.end(); 271 it != gaia_ids.end();
272 ++it) { 272 ++it) {
273 api::identity::AccountInfo account_info; 273 api::identity::AccountInfo account_info;
274 account_info.id = *it; 274 account_info.id = *it;
275 infos->Append(account_info.ToValue().release()); 275 infos->Append(account_info.ToValue().release());
276 } 276 }
277 277
278 return RespondNow(SingleArgument(infos)); 278 return RespondNow(OneArgument(infos));
279 } 279 }
280 280
281 IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction() 281 IdentityGetAuthTokenFunction::IdentityGetAuthTokenFunction()
282 : OAuth2TokenService::Consumer("extensions_identity_api"), 282 : OAuth2TokenService::Consumer("extensions_identity_api"),
283 should_prompt_for_scopes_(false), 283 should_prompt_for_scopes_(false),
284 should_prompt_for_signin_(false) {} 284 should_prompt_for_signin_(false) {}
285 285
286 IdentityGetAuthTokenFunction::~IdentityGetAuthTokenFunction() {} 286 IdentityGetAuthTokenFunction::~IdentityGetAuthTokenFunction() {}
287 287
288 bool IdentityGetAuthTokenFunction::RunAsync() { 288 bool IdentityGetAuthTokenFunction::RunAsync() {
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange( 828 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowURLChange(
829 const GURL& redirect_url) { 829 const GURL& redirect_url) {
830 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { 830 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) {
831 SetResult(new base::StringValue(redirect_url.spec())); 831 SetResult(new base::StringValue(redirect_url.spec()));
832 SendResponse(true); 832 SendResponse(true);
833 Release(); // Balanced in RunAsync. 833 Release(); // Balanced in RunAsync.
834 } 834 }
835 } 835 }
836 836
837 } // namespace extensions 837 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698