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

Unified Diff: chrome/common/logging_chrome.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/importer/importer_test_registry_overrider_win.cc ('k') | chrome/common/mac/mock_launchd.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/logging_chrome.cc
diff --git a/chrome/common/logging_chrome.cc b/chrome/common/logging_chrome.cc
index 5702c50857761321e87a4b99266079bca02f4f47..1194522f6c0bb45d7f4e9f4566e0a269282d6e8e 100644
--- a/chrome/common/logging_chrome.cc
+++ b/chrome/common/logging_chrome.cc
@@ -29,6 +29,7 @@
#include "chrome/common/logging_chrome.h"
#include <fstream> // NOLINT
+#include <memory> // NOLINT
#include <string> // NOLINT
#include "base/base_switches.h"
@@ -39,7 +40,6 @@
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
-#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -192,7 +192,7 @@ void RemoveSymlinkAndLog(const base::FilePath& link_path,
base::FilePath GetSessionLogDir(const base::CommandLine& command_line) {
base::FilePath log_dir;
std::string log_dir_str;
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
if (env->GetVar(env_vars::kSessionLogDir, &log_dir_str) &&
!log_dir_str.empty()) {
log_dir = base::FilePath(log_dir_str);
@@ -331,7 +331,7 @@ void InitChromeLogging(const base::CommandLine& command_line,
// headless mode to be configured either by the Environment
// Variable or by the Command Line Switch. This is for
// automated test purposes.
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
if (env->HasVar(env_vars::kHeadless) ||
command_line.HasSwitch(switches::kNoErrorDialogs))
SuppressDialogs();
@@ -380,7 +380,7 @@ void CleanupChromeLogging() {
base::FilePath GetLogFileName() {
std::string filename;
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
if (env->GetVar(env_vars::kLogFileName, &filename) && !filename.empty())
return base::FilePath::FromUTF8Unsafe(filename);
« no previous file with comments | « chrome/common/importer/importer_test_registry_overrider_win.cc ('k') | chrome/common/mac/mock_launchd.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698