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

Unified Diff: net/log/write_to_file_net_log_observer.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu 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 | « net/log/trace_net_log_observer_unittest.cc ('k') | net/log/write_to_file_net_log_observer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/write_to_file_net_log_observer.cc
diff --git a/net/log/write_to_file_net_log_observer.cc b/net/log/write_to_file_net_log_observer.cc
index 3bc78141b387cfc3498d1d95170436fef8ae8ca2..f724da49efabb9541970484f272db549db8f980f 100644
--- a/net/log/write_to_file_net_log_observer.cc
+++ b/net/log/write_to_file_net_log_observer.cc
@@ -5,12 +5,13 @@
#include "net/log/write_to_file_net_log_observer.h"
#include <stdio.h>
+
+#include <memory>
#include <set>
#include <utility>
#include "base/json/json_writer.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "net/log/net_log_util.h"
#include "net/url_request/url_request_context.h"
@@ -90,7 +91,7 @@ void WriteToFileNetLogObserver::OnAddEntry(const NetLog::Entry& entry) {
// Add a comma and newline for every event but the first. Newlines are needed
// so can load partial log files by just ignoring the last line. For this to
// work, lines cannot be pretty printed.
- scoped_ptr<base::Value> value(entry.ToValue());
+ std::unique_ptr<base::Value> value(entry.ToValue());
std::string json;
base::JSONWriter::Write(*value, &json);
fprintf(file_.get(), "%s%s", (added_events_ ? ",\n" : ""), json.c_str());
« no previous file with comments | « net/log/trace_net_log_observer_unittest.cc ('k') | net/log/write_to_file_net_log_observer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698