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

Unified Diff: webrtc/base/diskcache.cc

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased 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 | « webrtc/base/dbus_unittest.cc ('k') | webrtc/base/fakenetwork.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/diskcache.cc
diff --git a/webrtc/base/diskcache.cc b/webrtc/base/diskcache.cc
index a1fba6af9ad437cc1ec80e19f72ae70038b5c8f9..233d2ab43093fc0a448e02ef1c3f8ac3719690f6 100644
--- a/webrtc/base/diskcache.cc
+++ b/webrtc/base/diskcache.cc
@@ -15,6 +15,8 @@
#endif
#include <algorithm>
+#include <memory>
+
#include "webrtc/base/arraysize.h"
#include "webrtc/base/common.h"
#include "webrtc/base/diskcache.h"
@@ -123,7 +125,7 @@ StreamInterface* DiskCache::WriteResource(const std::string& id, size_t index) {
previous_size = entry->size;
}
- scoped_ptr<FileStream> file(new FileStream);
+ std::unique_ptr<FileStream> file(new FileStream);
if (!file->Open(filename, "wb", NULL)) {
LOG_F(LS_ERROR) << "Couldn't create cache file";
return NULL;
@@ -161,7 +163,7 @@ StreamInterface* DiskCache::ReadResource(const std::string& id,
if (index >= entry->streams)
return NULL;
- scoped_ptr<FileStream> file(new FileStream);
+ std::unique_ptr<FileStream> file(new FileStream);
if (!file->Open(IdToFilename(id, index), "rb", NULL))
return NULL;
« no previous file with comments | « webrtc/base/dbus_unittest.cc ('k') | webrtc/base/fakenetwork.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698