Remove stl_util's deletion function use from crypto/.
BUG=555865 Review-Url: https://codereview.chromium.org/2477463002 Cr-Commit-Position: refs/heads/master@{#429606}
This commit is contained in:
@ -42,9 +42,9 @@
|
||||
#include "base/files/file_util.h"
|
||||
#include "base/lazy_instance.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ptr_util.h"
|
||||
#include "base/native_library.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/stl_util.h"
|
||||
#include "base/strings/stringprintf.h"
|
||||
#include "base/synchronization/lock.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
@ -493,7 +493,7 @@ class NSSInitSingleton {
|
||||
"%s %s", kUserNSSDatabaseName, username_hash.c_str());
|
||||
ScopedPK11Slot public_slot(OpenPersistentNSSDBForPath(db_name, path));
|
||||
chromeos_user_map_[username_hash] =
|
||||
new ChromeOSUserData(std::move(public_slot));
|
||||
base::MakeUnique<ChromeOSUserData>(std::move(public_slot));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -600,9 +600,8 @@ class NSSInitSingleton {
|
||||
|
||||
void CloseChromeOSUserForTesting(const std::string& username_hash) {
|
||||
DCHECK(thread_checker_.CalledOnValidThread());
|
||||
ChromeOSUserMap::iterator i = chromeos_user_map_.find(username_hash);
|
||||
auto i = chromeos_user_map_.find(username_hash);
|
||||
DCHECK(i != chromeos_user_map_.end());
|
||||
delete i->second;
|
||||
chromeos_user_map_.erase(i);
|
||||
}
|
||||
|
||||
@ -752,7 +751,7 @@ class NSSInitSingleton {
|
||||
// down.
|
||||
~NSSInitSingleton() {
|
||||
#if defined(OS_CHROMEOS)
|
||||
base::STLDeleteValues(&chromeos_user_map_);
|
||||
chromeos_user_map_.clear();
|
||||
#endif
|
||||
tpm_slot_.reset();
|
||||
if (root_) {
|
||||
@ -822,8 +821,7 @@ class NSSInitSingleton {
|
||||
crypto::ScopedPK11Slot tpm_slot_;
|
||||
SECMODModule* root_;
|
||||
#if defined(OS_CHROMEOS)
|
||||
typedef std::map<std::string, ChromeOSUserData*> ChromeOSUserMap;
|
||||
ChromeOSUserMap chromeos_user_map_;
|
||||
std::map<std::string, std::unique_ptr<ChromeOSUserData>> chromeos_user_map_;
|
||||
ScopedPK11Slot test_system_slot_;
|
||||
#endif
|
||||
// TODO(davidben): When https://bugzilla.mozilla.org/show_bug.cgi?id=564011
|
||||
|
Reference in New Issue
Block a user