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

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

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 void IdentityAPI::OnAccountSignInChanged(const gaia::AccountIds& ids, 242 void IdentityAPI::OnAccountSignInChanged(const gaia::AccountIds& ids,
243 bool is_signed_in) { 243 bool is_signed_in) {
244 api::identity::AccountInfo account_info; 244 api::identity::AccountInfo account_info;
245 account_info.id = ids.gaia; 245 account_info.id = ids.gaia;
246 246
247 scoped_ptr<base::ListValue> args = 247 scoped_ptr<base::ListValue> args =
248 api::identity::OnSignInChanged::Create(account_info, is_signed_in); 248 api::identity::OnSignInChanged::Create(account_info, is_signed_in);
249 scoped_ptr<Event> event(new Event(events::IDENTITY_ON_SIGN_IN_CHANGED, 249 scoped_ptr<Event> event(new Event(events::IDENTITY_ON_SIGN_IN_CHANGED,
250 api::identity::OnSignInChanged::kEventName, 250 api::identity::OnSignInChanged::kEventName,
251 args.Pass(), browser_context_)); 251 std::move(args), browser_context_));
252 252
253 EventRouter::Get(browser_context_)->BroadcastEvent(event.Pass()); 253 EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event));
254 } 254 }
255 255
256 void IdentityAPI::AddShutdownObserver(ShutdownObserver* observer) { 256 void IdentityAPI::AddShutdownObserver(ShutdownObserver* observer) {
257 shutdown_observer_list_.AddObserver(observer); 257 shutdown_observer_list_.AddObserver(observer);
258 } 258 }
259 259
260 void IdentityAPI::RemoveShutdownObserver(ShutdownObserver* observer) { 260 void IdentityAPI::RemoveShutdownObserver(ShutdownObserver* observer) {
261 shutdown_observer_list_.RemoveObserver(observer); 261 shutdown_observer_list_.RemoveObserver(observer);
262 } 262 }
263 263
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) { 1011 if (redirect_url.GetWithEmptyPath() == final_url_prefix_) {
1012 SetResult(new base::StringValue(redirect_url.spec())); 1012 SetResult(new base::StringValue(redirect_url.spec()));
1013 SendResponse(true); 1013 SendResponse(true);
1014 if (auth_flow_) 1014 if (auth_flow_)
1015 auth_flow_.release()->DetachDelegateAndDelete(); 1015 auth_flow_.release()->DetachDelegateAndDelete();
1016 Release(); // Balanced in RunAsync. 1016 Release(); // Balanced in RunAsync.
1017 } 1017 }
1018 } 1018 }
1019 1019
1020 } // namespace extensions 1020 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698