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

Unified Diff: base/base_paths_posix.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/android/record_histogram.cc ('k') | base/base_paths_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_posix.cc
diff --git a/base/base_paths_posix.cc b/base/base_paths_posix.cc
index a436a4dcfcc6ad92188a5524d603a73860863de3..a60e1121c95986c1e5e4569efdf17d4e9734dce8 100644
--- a/base/base_paths_posix.cc
+++ b/base/base_paths_posix.cc
@@ -6,18 +6,19 @@
// don't have their own base_paths_OS.cc implementation (i.e. all but Mac and
// Android).
+#include "base/base_paths.h"
+
#include <limits.h>
#include <stddef.h>
+#include <memory>
#include <ostream>
#include <string>
-#include "base/base_paths.h"
#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/path_service.h"
#include "base/process/process_metrics.h"
@@ -79,7 +80,7 @@ bool PathProviderPosix(int key, FilePath* result) {
case base::DIR_SOURCE_ROOT: {
// Allow passing this in the environment, for more flexibility in build
// tree configurations (sub-project builds, gyp --output_dir, etc.)
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string cr_source_root;
if (env->GetVar("CR_SOURCE_ROOT", &cr_source_root)) {
path = FilePath(cr_source_root);
@@ -106,7 +107,7 @@ bool PathProviderPosix(int key, FilePath* result) {
*result = base::nix::GetXDGUserDirectory("DESKTOP", "Desktop");
return true;
case base::DIR_CACHE: {
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME",
".cache"));
*result = cache_dir;
« no previous file with comments | « base/android/record_histogram.cc ('k') | base/base_paths_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698