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

Unified Diff: components/crash/content/app/breakpad_win.cc

Issue 1884743002: Convert a few components from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lint 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 | components/crash/content/app/crash_keys_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/content/app/breakpad_win.cc
diff --git a/components/crash/content/app/breakpad_win.cc b/components/crash/content/app/breakpad_win.cc
index 760bf489f559200d76b763572906a13f8d6b346a..9f158ff674f169be0aea2da126e4d001cff3b0a1 100644
--- a/components/crash/content/app/breakpad_win.cc
+++ b/components/crash/content/app/breakpad_win.cc
@@ -13,6 +13,7 @@
#include <algorithm>
#include <map>
+#include <memory>
#include <vector>
#include "base/base_switches.h"
@@ -22,7 +23,6 @@
#include "base/environment.h"
#include "base/files/file_path.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string16.h"
#include "base/strings/string_split.h"
@@ -89,7 +89,7 @@ const wchar_t kGoogleUpdatePipeName[] = L"\\\\.\\pipe\\GoogleCrashServices\\";
const wchar_t kChromePipeName[] = L"\\\\.\\pipe\\ChromeCrashServices";
// This is the well known SID for the system principal.
-const wchar_t kSystemPrincipalSid[] =L"S-1-5-18";
+const wchar_t kSystemPrincipalSid[] = L"S-1-5-18";
google_breakpad::ExceptionHandler* g_breakpad = NULL;
google_breakpad::ExceptionHandler* g_dumphandler_no_crash = NULL;
@@ -466,7 +466,7 @@ static void InitTerminateProcessHooks() {
#endif
static void InitPipeNameEnvVar(bool is_per_user_install) {
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
if (env->HasVar(kPipeNameVar)) {
// The Breakpad pipe name is already configured: nothing to do.
return;
@@ -584,7 +584,7 @@ void InitCrashReporter(const std::string& process_type_switch) {
if (process_type == L"browser")
GetCrashReporterClient()->InitBrowserCrashDumpsRegKey();
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
std::string pipe_name_ascii;
if (!env->GetVar(kPipeNameVar, &pipe_name_ascii)) {
// Breakpad is not enabled. Configuration is managed or the user
@@ -671,8 +671,8 @@ void ConsumeInvalidHandleExceptions() {
// clears the environment variable, so that the restarted Chrome, which inherits
// its environment from the current Chrome, will no longer contain the variable.
extern "C" void __declspec(dllexport) __cdecl
- ClearBreakpadPipeEnvironmentVariable() {
- scoped_ptr<base::Environment> env(base::Environment::Create());
+ClearBreakpadPipeEnvironmentVariable() {
+ std::unique_ptr<base::Environment> env(base::Environment::Create());
env->UnSetVar(kPipeNameVar);
}
« no previous file with comments | « no previous file | components/crash/content/app/crash_keys_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698