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

Side by Side Diff: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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/chromeos/login/auth/chrome_cryptohome_authenticator.h" 5 #include "chrome/browser/chromeos/login/auth/chrome_cryptohome_authenticator.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, &profile_); 147 ProfileHelper::Get()->SetUserToProfileMappingForTesting(user, &profile_);
148 148
149 CreateTransformedKey(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF, 149 CreateTransformedKey(Key::KEY_TYPE_SALTED_SHA256_TOP_HALF,
150 SystemSaltGetter::ConvertRawSaltToHexString( 150 SystemSaltGetter::ConvertRawSaltToHexString(
151 FakeCryptohomeClient::GetStubSystemSalt())); 151 FakeCryptohomeClient::GetStubSystemSalt()));
152 } 152 }
153 153
154 virtual ~CryptohomeAuthenticatorTest() {} 154 virtual ~CryptohomeAuthenticatorTest() {}
155 155
156 virtual void SetUp() { 156 virtual void SetUp() {
157 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kLoginManager); 157 base::CommandLine::ForCurrentProcess()->AppendSwitch(
158 switches::kLoginManager);
158 159
159 mock_caller_ = new cryptohome::MockAsyncMethodCaller; 160 mock_caller_ = new cryptohome::MockAsyncMethodCaller;
160 cryptohome::AsyncMethodCaller::InitializeForTesting(mock_caller_); 161 cryptohome::AsyncMethodCaller::InitializeForTesting(mock_caller_);
161 mock_homedir_methods_ = new cryptohome::MockHomedirMethods; 162 mock_homedir_methods_ = new cryptohome::MockHomedirMethods;
162 mock_homedir_methods_->SetUp(true, cryptohome::MOUNT_ERROR_NONE); 163 mock_homedir_methods_->SetUp(true, cryptohome::MOUNT_ERROR_NONE);
163 cryptohome::HomedirMethods::InitializeForTesting(mock_homedir_methods_); 164 cryptohome::HomedirMethods::InitializeForTesting(mock_homedir_methods_);
164 165
165 fake_cryptohome_client_ = new FakeCryptohomeClient; 166 fake_cryptohome_client_ = new FakeCryptohomeClient;
166 chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient( 167 chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient(
167 scoped_ptr<CryptohomeClient>(fake_cryptohome_client_)); 168 scoped_ptr<CryptohomeClient>(fake_cryptohome_client_));
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 // salt. 790 // salt.
790 ExpectGetKeyDataExCall( 791 ExpectGetKeyDataExCall(
791 make_scoped_ptr(new int64(Key::KEY_TYPE_SALTED_SHA256)), 792 make_scoped_ptr(new int64(Key::KEY_TYPE_SALTED_SHA256)),
792 scoped_ptr<std::string>()); 793 scoped_ptr<std::string>());
793 794
794 auth_->AuthenticateToLogin(NULL, user_context_); 795 auth_->AuthenticateToLogin(NULL, user_context_);
795 base::RunLoop().Run(); 796 base::RunLoop().Run();
796 } 797 }
797 798
798 } // namespace chromeos 799 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/first_run/first_run.cc ('k') | chrome/browser/chromeos/login/chrome_restart_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698