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

Unified Diff: chrome/common/auto_start_linux.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 | « no previous file | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/auto_start_linux.cc
diff --git a/chrome/common/auto_start_linux.cc b/chrome/common/auto_start_linux.cc
index 6076e277fe31f61da838169f119fdb783b1a0ef9..66b6739bfb4385d959044fa807c62f9919a194a8 100644
--- a/chrome/common/auto_start_linux.cc
+++ b/chrome/common/auto_start_linux.cc
@@ -6,11 +6,12 @@
#include <stddef.h>
+#include <memory>
+
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/nix/xdg_util.h"
#include "base/strings/string_tokenizer.h"
@@ -33,7 +34,7 @@ bool AutoStart::AddApplication(const std::string& autostart_filename,
const std::string& application_name,
const std::string& command_line,
bool is_terminal_app) {
- scoped_ptr<base::Environment> environment(base::Environment::Create());
+ std::unique_ptr<base::Environment> environment(base::Environment::Create());
base::FilePath autostart_directory = GetAutostartDirectory(environment.get());
if (!base::DirectoryExists(autostart_directory) &&
!base::CreateDirectory(autostart_directory)) {
@@ -60,7 +61,7 @@ bool AutoStart::AddApplication(const std::string& autostart_filename,
}
bool AutoStart::Remove(const std::string& autostart_filename) {
- scoped_ptr<base::Environment> environment(base::Environment::Create());
+ std::unique_ptr<base::Environment> environment(base::Environment::Create());
base::FilePath autostart_directory = GetAutostartDirectory(environment.get());
base::FilePath autostart_file =
autostart_directory.Append(autostart_filename);
@@ -69,7 +70,7 @@ bool AutoStart::Remove(const std::string& autostart_filename) {
bool AutoStart::GetAutostartFileContents(
const std::string& autostart_filename, std::string* contents) {
- scoped_ptr<base::Environment> environment(base::Environment::Create());
+ std::unique_ptr<base::Environment> environment(base::Environment::Create());
base::FilePath autostart_directory = GetAutostartDirectory(environment.get());
base::FilePath autostart_file =
autostart_directory.Append(autostart_filename);
« no previous file with comments | « no previous file | chrome/common/child_process_logging_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698