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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 2336863003: Change more base::ListValue methods to use std::unique_ptr. (Closed)
Patch Set: . Created 4 years, 3 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ptr_util.h"
14 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
15 #include "base/run_loop.h" 16 #include "base/run_loop.h"
16 #include "chrome/browser/chrome_notification_types.h" 17 #include "chrome/browser/chrome_notification_types.h"
17 #include "chrome/browser/chromeos/login/existing_user_controller.h" 18 #include "chrome/browser/chromeos/login/existing_user_controller.h"
18 #include "chrome/browser/chromeos/login/help_app_launcher.h" 19 #include "chrome/browser/chromeos/login/help_app_launcher.h"
19 #include "chrome/browser/chromeos/login/helper.h" 20 #include "chrome/browser/chromeos/login/helper.h"
20 #include "chrome/browser/chromeos/login/screens/mock_base_screen_delegate.h" 21 #include "chrome/browser/chromeos/login/screens/mock_base_screen_delegate.h"
21 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 22 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
22 #include "chrome/browser/chromeos/login/session/user_session_manager_test_api.h" 23 #include "chrome/browser/chromeos/login/session/user_session_manager_test_api.h"
23 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h" 24 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 1, 192 1,
192 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) 193 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT))
193 .Times(1); 194 .Times(1);
194 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) 195 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true))
195 .Times(1); 196 .Times(1);
196 } 197 }
197 198
198 void RegisterUser(const std::string& user_id) { 199 void RegisterUser(const std::string& user_id) {
199 ListPrefUpdate users_pref(g_browser_process->local_state(), 200 ListPrefUpdate users_pref(g_browser_process->local_state(),
200 "LoggedInUsers"); 201 "LoggedInUsers");
201 users_pref->AppendIfNotPresent(new base::StringValue(user_id)); 202 users_pref->AppendIfNotPresent(
203 base::MakeUnique<base::StringValue>(user_id));
202 } 204 }
203 205
204 // ExistingUserController private member accessors. 206 // ExistingUserController private member accessors.
205 base::OneShotTimer* auto_login_timer() { 207 base::OneShotTimer* auto_login_timer() {
206 return existing_user_controller()->auto_login_timer_.get(); 208 return existing_user_controller()->auto_login_timer_.get();
207 } 209 }
208 210
209 AccountId auto_login_account_id() const { 211 AccountId auto_login_account_id() const {
210 return existing_user_controller()->public_session_auto_login_account_id_; 212 return existing_user_controller()->public_session_auto_login_account_id_;
211 } 213 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 PRE_TestLoadingPublicUsersFromLocalState) { 754 PRE_TestLoadingPublicUsersFromLocalState) {
753 // First run propagates public accounts and stores them in Local State. 755 // First run propagates public accounts and stores them in Local State.
754 } 756 }
755 757
756 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, 758 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest,
757 TestLoadingPublicUsersFromLocalState) { 759 TestLoadingPublicUsersFromLocalState) {
758 // Second run loads list of public accounts from Local State. 760 // Second run loads list of public accounts from Local State.
759 } 761 }
760 762
761 } // namespace chromeos 763 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698