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

Side by Side Diff: ios/chrome/browser/signin/signin_manager_factory.cc

Issue 2762973002: [ios] Add TODO to record usages of "return std::move(foo)" pattern. (Closed)
Patch Set: Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/chrome/browser/signin/signin_manager_factory.h" 5 #include "ios/chrome/browser/signin/signin_manager_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 std::unique_ptr<SigninManager> service(new SigninManager( 86 std::unique_ptr<SigninManager> service(new SigninManager(
87 SigninClientFactory::GetForBrowserState(chrome_browser_state), 87 SigninClientFactory::GetForBrowserState(chrome_browser_state),
88 OAuth2TokenServiceFactory::GetForBrowserState(chrome_browser_state), 88 OAuth2TokenServiceFactory::GetForBrowserState(chrome_browser_state),
89 ios::AccountTrackerServiceFactory::GetForBrowserState( 89 ios::AccountTrackerServiceFactory::GetForBrowserState(
90 chrome_browser_state), 90 chrome_browser_state),
91 ios::GaiaCookieManagerServiceFactory::GetForBrowserState( 91 ios::GaiaCookieManagerServiceFactory::GetForBrowserState(
92 chrome_browser_state))); 92 chrome_browser_state)));
93 service->Initialize(GetApplicationContext()->GetLocalState()); 93 service->Initialize(GetApplicationContext()->GetLocalState());
94 for (auto& observer : observer_list_) 94 for (auto& observer : observer_list_)
95 observer.SigninManagerCreated(service.get()); 95 observer.SigninManagerCreated(service.get());
96 // TODO(crbug.com/703565): remove std::move() once Xcode 9.0+ is required.
96 return std::move(service); 97 return std::move(service);
97 } 98 }
98 99
99 void SigninManagerFactory::BrowserStateShutdown(web::BrowserState* context) { 100 void SigninManagerFactory::BrowserStateShutdown(web::BrowserState* context) {
100 SigninManager* manager = 101 SigninManager* manager =
101 static_cast<SigninManager*>(GetServiceForBrowserState(context, false)); 102 static_cast<SigninManager*>(GetServiceForBrowserState(context, false));
102 if (manager) { 103 if (manager) {
103 for (auto& observer : observer_list_) 104 for (auto& observer : observer_list_)
104 observer.SigninManagerShutdown(manager); 105 observer.SigninManagerShutdown(manager);
105 } 106 }
106 BrowserStateKeyedServiceFactory::BrowserStateShutdown(context); 107 BrowserStateKeyedServiceFactory::BrowserStateShutdown(context);
107 } 108 }
108 109
109 } // namespace ios 110 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/signin_client_impl.mm ('k') | ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698