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

Unified Diff: chrome/browser/extensions/api/sessions/session_id.cc

Issue 1871713002: Convert //chrome/browser/extensions from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and fix header 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
Index: chrome/browser/extensions/api/sessions/session_id.cc
diff --git a/chrome/browser/extensions/api/sessions/session_id.cc b/chrome/browser/extensions/api/sessions/session_id.cc
index 37201a08680675d2562e6285533ffd1e52928793..1862a3da22c8f54381e8ffafd43ff6f524354aa1 100644
--- a/chrome/browser/extensions/api/sessions/session_id.cc
+++ b/chrome/browser/extensions/api/sessions/session_id.cc
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
namespace extensions {
@@ -13,7 +14,7 @@ namespace extensions {
const char kIdSeparator = '.';
// static
-scoped_ptr<SessionId> SessionId::Parse(const std::string& session_id) {
+std::unique_ptr<SessionId> SessionId::Parse(const std::string& session_id) {
std::string session_tag;
// Populate session_tag if the |session_id| represents a foreign SessionId.
@@ -28,9 +29,9 @@ scoped_ptr<SessionId> SessionId::Parse(const std::string& session_id) {
if (!base::StringToInt(
session_tag.empty() ? session_id : session_id.substr(separator + 1),
&id)) {
- return scoped_ptr<SessionId>();
+ return std::unique_ptr<SessionId>();
}
- return make_scoped_ptr(new SessionId(session_tag, id));
+ return base::WrapUnique(new SessionId(session_tag, id));
}
SessionId::SessionId(const std::string& session_tag, int id)
« no previous file with comments | « chrome/browser/extensions/api/sessions/session_id.h ('k') | chrome/browser/extensions/api/sessions/sessions_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698