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

Unified Diff: chrome/common/importer/importer_test_registry_overrider_win.cc

Issue 1880143002: Convert chrome/common to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/value_counter_unittest.cc ('k') | chrome/common/logging_chrome.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/importer/importer_test_registry_overrider_win.cc
diff --git a/chrome/common/importer/importer_test_registry_overrider_win.cc b/chrome/common/importer/importer_test_registry_overrider_win.cc
index d4f3f473b7a491068d132de1bb77aa0e331f1f36..0f881968259327a9d2fc00be2644afb3853c0518 100644
--- a/chrome/common/importer/importer_test_registry_overrider_win.cc
+++ b/chrome/common/importer/importer_test_registry_overrider_win.cc
@@ -6,11 +6,11 @@
#include <windows.h>
+#include <memory>
#include <string>
#include "base/environment.h"
#include "base/guid.h"
-#include "base/memory/scoped_ptr.h"
#include "base/strings/utf_string_conversions.h"
#include "base/win/registry.h"
@@ -26,7 +26,7 @@ const char kTestHKCUOverrideEnvironmentVariable[] =
// SetTestRegistryOverride() into |key| if it exists and |key| is not NULL.
// Returns true if the variable was successfully read.
bool GetTestKeyFromEnvironment(base::string16* key) {
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string value;
bool result = env->GetVar(kTestHKCUOverrideEnvironmentVariable, &value);
if (result)
@@ -44,7 +44,7 @@ ImporterTestRegistryOverrider::ImporterTestRegistryOverrider()
base::UTF8ToUTF16(base::GenerateGUID())) {
DCHECK(!GetTestKeyFromEnvironment(NULL));
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
bool success = env->SetVar(kTestHKCUOverrideEnvironmentVariable,
base::UTF16ToUTF8(temporary_key_));
DCHECK(success);
@@ -56,7 +56,7 @@ ImporterTestRegistryOverrider::~ImporterTestRegistryOverrider() {
DCHECK(reg_key.Valid());
reg_key.DeleteKey(L"");
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
bool success = env->UnSetVar(kTestHKCUOverrideEnvironmentVariable);
DCHECK(success);
}
« no previous file with comments | « chrome/common/extensions/value_counter_unittest.cc ('k') | chrome/common/logging_chrome.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698