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

Unified Diff: extensions/browser/api/web_request/upload_data_presenter.h

Issue 1902873002: Convert //extensions/browser/api from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: extensions/browser/api/web_request/upload_data_presenter.h
diff --git a/extensions/browser/api/web_request/upload_data_presenter.h b/extensions/browser/api/web_request/upload_data_presenter.h
index 90e3d44796b727970f4032ea81a4a80a2dd271b1..05630f3dcbc4be912b01f673f13ac1acb45b7326 100644
--- a/extensions/browser/api/web_request/upload_data_presenter.h
+++ b/extensions/browser/api/web_request/upload_data_presenter.h
@@ -7,12 +7,12 @@
#include <stddef.h>
+#include <memory>
#include <string>
#include <vector>
#include "base/gtest_prod_util.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
namespace base {
class DictionaryValue;
@@ -57,7 +57,7 @@ class UploadDataPresenter {
virtual ~UploadDataPresenter();
virtual void FeedNext(const net::UploadElementReader& reader) = 0;
virtual bool Succeeded() = 0;
- virtual scoped_ptr<base::Value> Result() = 0;
+ virtual std::unique_ptr<base::Value> Result() = 0;
protected:
UploadDataPresenter() {}
@@ -77,7 +77,7 @@ class RawDataPresenter : public UploadDataPresenter {
// Implementation of UploadDataPresenter.
void FeedNext(const net::UploadElementReader& reader) override;
bool Succeeded() override;
- scoped_ptr<base::Value> Result() override;
+ std::unique_ptr<base::Value> Result() override;
private:
void FeedNextBytes(const char* bytes, size_t size);
@@ -85,7 +85,7 @@ class RawDataPresenter : public UploadDataPresenter {
FRIEND_TEST_ALL_PREFIXES(WebRequestUploadDataPresenterTest, RawData);
bool success_;
- scoped_ptr<base::ListValue> list_;
+ std::unique_ptr<base::ListValue> list_;
DISALLOW_COPY_AND_ASSIGN(RawDataPresenter);
};
@@ -107,12 +107,12 @@ class ParsedDataPresenter : public UploadDataPresenter {
// Implementation of UploadDataPresenter.
void FeedNext(const net::UploadElementReader& reader) override;
bool Succeeded() override;
- scoped_ptr<base::Value> Result() override;
+ std::unique_ptr<base::Value> Result() override;
// Allows to create ParsedDataPresenter without the URLRequest. Uses the
// parser for "application/x-www-form-urlencoded" form encoding. Only use this
// in tests.
- static scoped_ptr<ParsedDataPresenter> CreateForTests();
+ static std::unique_ptr<ParsedDataPresenter> CreateForTests();
private:
// This constructor is used in CreateForTests.
@@ -120,9 +120,9 @@ class ParsedDataPresenter : public UploadDataPresenter {
// Clears resources and the success flag.
void Abort();
- scoped_ptr<FormDataParser> parser_;
+ std::unique_ptr<FormDataParser> parser_;
bool success_;
- scoped_ptr<base::DictionaryValue> dictionary_;
+ std::unique_ptr<base::DictionaryValue> dictionary_;
DISALLOW_COPY_AND_ASSIGN(ParsedDataPresenter);
};

Powered by Google App Engine
This is Rietveld 408576698