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

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

Issue 1870793002: Convert //chrome/browser/chromeos 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 command_line->AppendSwitchASCII(switches::kLoginUser, cryptohome_id1_.id()); 44 command_line->AppendSwitchASCII(switches::kLoginUser, cryptohome_id1_.id());
45 command_line->AppendSwitchASCII( 45 command_line->AppendSwitchASCII(
46 switches::kLoginProfile, 46 switches::kLoginProfile,
47 CryptohomeClient::GetStubSanitizedUsername(cryptohome_id1_)); 47 CryptohomeClient::GetStubSanitizedUsername(cryptohome_id1_));
48 } 48 }
49 49
50 void SetUpInProcessBrowserTestFixture() override { 50 void SetUpInProcessBrowserTestFixture() override {
51 // Redirect session_manager DBus calls to FakeSessionManagerClient. 51 // Redirect session_manager DBus calls to FakeSessionManagerClient.
52 session_manager_client_ = new FakeSessionManagerClient; 52 session_manager_client_ = new FakeSessionManagerClient;
53 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 53 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
54 scoped_ptr<SessionManagerClient>(session_manager_client_)); 54 std::unique_ptr<SessionManagerClient>(session_manager_client_));
55 session_manager_client_->StartSession(cryptohome_id1_); 55 session_manager_client_->StartSession(cryptohome_id1_);
56 } 56 }
57 57
58 FakeSessionManagerClient* session_manager_client_; 58 FakeSessionManagerClient* session_manager_client_;
59 const AccountId account_id1_ = AccountId::FromUserEmail(kUserId1); 59 const AccountId account_id1_ = AccountId::FromUserEmail(kUserId1);
60 const AccountId account_id2_ = AccountId::FromUserEmail(kUserId2); 60 const AccountId account_id2_ = AccountId::FromUserEmail(kUserId2);
61 const AccountId account_id3_ = AccountId::FromUserEmail(kUserId3); 61 const AccountId account_id3_ = AccountId::FromUserEmail(kUserId3);
62 const cryptohome::Identification cryptohome_id1_ = 62 const cryptohome::Identification cryptohome_id1_ =
63 cryptohome::Identification(account_id1_); 63 cryptohome::Identification(account_id1_);
64 const cryptohome::Identification cryptohome_id2_ = 64 const cryptohome::Identification cryptohome_id2_ =
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 users[0]->username_hash()); 160 users[0]->username_hash());
161 EXPECT_EQ(account_id2_, users[1]->GetAccountId()); 161 EXPECT_EQ(account_id2_, users[1]->GetAccountId());
162 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(cryptohome_id2_), 162 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(cryptohome_id2_),
163 users[1]->username_hash()); 163 users[1]->username_hash());
164 EXPECT_EQ(account_id1_, users[2]->GetAccountId()); 164 EXPECT_EQ(account_id1_, users[2]->GetAccountId());
165 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(cryptohome_id1_), 165 EXPECT_EQ(CryptohomeClient::GetStubSanitizedUsername(cryptohome_id1_),
166 users[2]->username_hash()); 166 users[2]->username_hash());
167 } 167 }
168 168
169 } // namespace chromeos 169 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/auth/mount_manager.h ('k') | chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698