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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_test_utils.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/signin/signin_promo.h" 5 #include "chrome/browser/signin/signin_promo.h"
6 #include "chrome/browser/signin/signin_tracker_factory.h" 6 #include "chrome/browser/signin/signin_tracker_factory.h"
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/browser/ui/webui/signin/get_auth_frame.h" 9 #include "chrome/browser/ui/webui/signin/get_auth_frame.h"
10 #include "chrome/test/base/ui_test_utils.h" 10 #include "chrome/test/base/ui_test_utils.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 SigninInOldGaiaFlow(browser, email, password); 202 SigninInOldGaiaFlow(browser, email, password);
203 } 203 }
204 204
205 bool SignInWithUI(Browser* browser, 205 bool SignInWithUI(Browser* browser,
206 const std::string& username, 206 const std::string& username,
207 const std::string& password, 207 const std::string& password,
208 bool wait_for_account_cookies, 208 bool wait_for_account_cookies,
209 signin_metrics::AccessPoint access_point, 209 signin_metrics::AccessPoint access_point,
210 signin_metrics::Reason signin_reason) { 210 signin_metrics::Reason signin_reason) {
211 SignInObserver signin_observer(wait_for_account_cookies); 211 SignInObserver signin_observer(wait_for_account_cookies);
212 scoped_ptr<SigninTracker> tracker = 212 std::unique_ptr<SigninTracker> tracker =
213 SigninTrackerFactory::CreateForProfile(browser->profile(), 213 SigninTrackerFactory::CreateForProfile(browser->profile(),
214 &signin_observer); 214 &signin_observer);
215 215
216 GURL signin_url = signin::GetPromoURL(access_point, signin_reason, false); 216 GURL signin_url = signin::GetPromoURL(access_point, signin_reason, false);
217 DVLOG(1) << "Navigating to " << signin_url; 217 DVLOG(1) << "Navigating to " << signin_url;
218 // For some tests, the window is not shown yet and this might be the first tab 218 // For some tests, the window is not shown yet and this might be the first tab
219 // navigation, so GetActiveWebContents() for CURRENT_TAB is NULL. That's why 219 // navigation, so GetActiveWebContents() for CURRENT_TAB is NULL. That's why
220 // we use NEW_FOREGROUND_TAB rather than the CURRENT_TAB used by default in 220 // we use NEW_FOREGROUND_TAB rather than the CURRENT_TAB used by default in
221 // ui_test_utils::NavigateToURL(). 221 // ui_test_utils::NavigateToURL().
222 ui_test_utils::NavigateToURLWithDisposition( 222 ui_test_utils::NavigateToURLWithDisposition(
(...skipping 13 matching lines...) Expand all
236 bool SignInWithUI(Browser* browser, 236 bool SignInWithUI(Browser* browser,
237 const std::string& username, 237 const std::string& username,
238 const std::string& password) { 238 const std::string& password) {
239 return SignInWithUI(browser, username, password, 239 return SignInWithUI(browser, username, password,
240 false /* wait_for_account_cookies */, 240 false /* wait_for_account_cookies */,
241 signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE, 241 signin_metrics::AccessPoint::ACCESS_POINT_START_PAGE,
242 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT); 242 signin_metrics::Reason::REASON_SIGNIN_PRIMARY_ACCOUNT);
243 } 243 }
244 244
245 } // namespace login_ui_test_utils 245 } // namespace login_ui_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698