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

Side by Side Diff: crypto/scoped_test_nss_chromeos_user.cc

Issue 560303002: Remove unused user email argument from nss_util. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « crypto/nss_util_internal.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "crypto/scoped_test_nss_chromeos_user.h" 5 #include "crypto/scoped_test_nss_chromeos_user.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "crypto/nss_util.h" 8 #include "crypto/nss_util.h"
9 #include "crypto/nss_util_internal.h" 9 #include "crypto/nss_util_internal.h"
10 10
11 namespace crypto { 11 namespace crypto {
12 12
13 ScopedTestNSSChromeOSUser::ScopedTestNSSChromeOSUser( 13 ScopedTestNSSChromeOSUser::ScopedTestNSSChromeOSUser(
14 const std::string& username_hash) 14 const std::string& username_hash)
15 : username_hash_(username_hash), constructed_successfully_(false) { 15 : username_hash_(username_hash), constructed_successfully_(false) {
16 if (!temp_dir_.CreateUniqueTempDir()) 16 if (!temp_dir_.CreateUniqueTempDir())
17 return; 17 return;
18 // This opens a software DB in the given folder. In production code that is in 18 // This opens a software DB in the given folder. In production code that is in
19 // the home folder, but for testing the temp folder is used. 19 // the home folder, but for testing the temp folder is used.
20 constructed_successfully_ = InitializeNSSForChromeOSUser( 20 constructed_successfully_ =
21 username_hash, username_hash, temp_dir_.path()); 21 InitializeNSSForChromeOSUser(username_hash, temp_dir_.path());
22 } 22 }
23 23
24 ScopedTestNSSChromeOSUser::~ScopedTestNSSChromeOSUser() { 24 ScopedTestNSSChromeOSUser::~ScopedTestNSSChromeOSUser() {
25 if (constructed_successfully_) 25 if (constructed_successfully_)
26 CloseChromeOSUserForTesting(username_hash_); 26 CloseChromeOSUserForTesting(username_hash_);
27 } 27 }
28 28
29 void ScopedTestNSSChromeOSUser::FinishInit() { 29 void ScopedTestNSSChromeOSUser::FinishInit() {
30 DCHECK(constructed_successfully_); 30 DCHECK(constructed_successfully_);
31 if (!ShouldInitializeTPMForChromeOSUser(username_hash_)) 31 if (!ShouldInitializeTPMForChromeOSUser(username_hash_))
32 return; 32 return;
33 WillInitializeTPMForChromeOSUser(username_hash_); 33 WillInitializeTPMForChromeOSUser(username_hash_);
34 InitializePrivateSoftwareSlotForChromeOSUser(username_hash_); 34 InitializePrivateSoftwareSlotForChromeOSUser(username_hash_);
35 } 35 }
36 36
37 } // namespace crypto 37 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/nss_util_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698