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

Unified Diff: base/test/launcher/test_launcher.cc

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 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 | « base/test/launcher/test_launcher.h ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/launcher/test_launcher.cc
diff --git a/base/test/launcher/test_launcher.cc b/base/test/launcher/test_launcher.cc
index 65471c7c406e2310ac04d762e74c9436da6a48d9..df5ca0a40ecf1c6c29f60787cc496b15e0e93f83 100644
--- a/base/test/launcher/test_launcher.cc
+++ b/base/test/launcher/test_launcher.cc
@@ -4,6 +4,8 @@
#include "base/test/launcher/test_launcher.h"
+#include <memory>
+
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
@@ -17,7 +19,6 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/process/kill.h"
#include "base/process/launch.h"
@@ -170,7 +171,7 @@ class SignalFDWatcher : public MessageLoopForIO::Watcher {
// true. If it is set, unsets it then converts it to Int32 before
// returning it in |result|. Returns true on success.
bool TakeInt32FromEnvironment(const char* const var, int32_t* result) {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
std::string str_val;
if (!env->GetVar(var, &str_val))
@@ -192,7 +193,7 @@ bool TakeInt32FromEnvironment(const char* const var, int32_t* result) {
// Unsets the environment variable |name| and returns true on success.
// Also returns true if the variable just doesn't exist.
bool UnsetEnvironmentVariableIfExists(const std::string& name) {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
std::string str_val;
if (!env->GetVar(name.c_str(), &str_val))
@@ -205,7 +206,7 @@ bool UnsetEnvironmentVariableIfExists(const std::string& name) {
// for continuous integration bots. This way developers don't have to remember
// special command-line flags.
bool BotModeEnabled() {
- scoped_ptr<Environment> env(Environment::Create());
+ std::unique_ptr<Environment> env(Environment::Create());
return CommandLine::ForCurrentProcess()->HasSwitch(
switches::kTestLauncherBotMode) ||
env->HasVar("CHROMIUM_TEST_LAUNCHER_BOT_MODE");
« no previous file with comments | « base/test/launcher/test_launcher.h ('k') | base/test/launcher/test_results_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698