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

Unified Diff: chrome/browser/chromeos/policy/system_log_uploader.h

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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/chromeos/policy/system_log_uploader.h
diff --git a/chrome/browser/chromeos/policy/system_log_uploader.h b/chrome/browser/chromeos/policy/system_log_uploader.h
index 2da536515f867d742ead20b62a84f1e8199fa6c5..8d6b032bc29df4c0cf1f0817206745d402a06f4a 100644
--- a/chrome/browser/chromeos/policy/system_log_uploader.h
+++ b/chrome/browser/chromeos/policy/system_log_uploader.h
@@ -7,10 +7,11 @@
#include <stdint.h>
+#include <memory>
+
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_memory.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_checker.h"
#include "base/time/time.h"
@@ -49,7 +50,7 @@ class SystemLogUploader : public UploadJob::Delegate {
// from the disk and create an upload job.
class Delegate {
public:
- typedef base::Callback<void(scoped_ptr<SystemLogs> system_logs)>
+ typedef base::Callback<void(std::unique_ptr<SystemLogs> system_logs)>
LogUploadCallback;
virtual ~Delegate() {}
@@ -59,7 +60,7 @@ class SystemLogUploader : public UploadJob::Delegate {
// Creates a new fully configured instance of an UploadJob. This method
// will be called exactly once per every system log upload.
- virtual scoped_ptr<UploadJob> CreateUploadJob(
+ virtual std::unique_ptr<UploadJob> CreateUploadJob(
const GURL& upload_url,
UploadJob::Delegate* delegate) = 0;
};
@@ -67,7 +68,7 @@ class SystemLogUploader : public UploadJob::Delegate {
// Constructor. Callers can inject their own Delegate. A nullptr can be passed
// for |syslog_delegate| to use the default implementation.
explicit SystemLogUploader(
- scoped_ptr<Delegate> syslog_delegate,
+ std::unique_ptr<Delegate> syslog_delegate,
const scoped_refptr<base::SequencedTaskRunner>& task_runner);
~SystemLogUploader() override;
@@ -97,7 +98,7 @@ class SystemLogUploader : public UploadJob::Delegate {
// The callback is invoked by the Delegate if system logs have been loaded
// from disk, uploads system logs.
- void UploadSystemLogs(scoped_ptr<SystemLogs> system_logs);
+ void UploadSystemLogs(std::unique_ptr<SystemLogs> system_logs);
// Helper method that figures out when the next system log upload should
// be scheduled.
@@ -116,10 +117,10 @@ class SystemLogUploader : public UploadJob::Delegate {
const scoped_refptr<base::SequencedTaskRunner> task_runner_;
// The upload job that is re-created on every system log upload.
- scoped_ptr<UploadJob> upload_job_;
+ std::unique_ptr<UploadJob> upload_job_;
// The Delegate is used to load system logs and create UploadJobs.
- scoped_ptr<Delegate> syslog_delegate_;
+ std::unique_ptr<Delegate> syslog_delegate_;
// True if system log upload is enabled. Kept cached in this object because
// CrosSettings can switch to an unstrusted state temporarily, and we want to
@@ -127,7 +128,7 @@ class SystemLogUploader : public UploadJob::Delegate {
bool upload_enabled_;
// Observer to changes in system log upload settings.
- scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
+ std::unique_ptr<chromeos::CrosSettings::ObserverSubscription>
upload_enabled_observer_;
base::ThreadChecker thread_checker_;
« no previous file with comments | « chrome/browser/chromeos/policy/status_uploader_unittest.cc ('k') | chrome/browser/chromeos/policy/system_log_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698