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

Unified Diff: components/web_resource/web_resource_service.h

Issue 1917673002: Convert //components/[u-z]* 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: components/web_resource/web_resource_service.h
diff --git a/components/web_resource/web_resource_service.h b/components/web_resource/web_resource_service.h
index b6ad154619c884e1852d119948697fc1fa9c8c00..1c1103ab9510d51eca7d2c52a262903e4c5c0b4e 100644
--- a/components/web_resource/web_resource_service.h
+++ b/components/web_resource/web_resource_service.h
@@ -7,12 +7,12 @@
#include <stdint.h>
+#include <memory>
#include <string>
#include "base/callback_forward.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "components/web_resource/resource_request_allowed_notifier.h"
#include "net/url_request/url_fetcher_delegate.h"
@@ -39,7 +39,7 @@ class WebResourceService
public ResourceRequestAllowedNotifier::Observer {
public:
// Callbacks for JSON parsing.
- using SuccessCallback = base::Callback<void(scoped_ptr<base::Value>)>;
+ using SuccessCallback = base::Callback<void(std::unique_ptr<base::Value>)>;
using ErrorCallback = base::Callback<void(const std::string&)>;
using ParseJSONCallback = base::Callback<
void(const std::string&, const SuccessCallback&, const ErrorCallback&)>;
@@ -84,7 +84,7 @@ class WebResourceService
void EndFetch();
// Callbacks from the JSON parser.
- void OnUnpackFinished(scoped_ptr<base::Value> value);
+ void OnUnpackFinished(std::unique_ptr<base::Value> value);
void OnUnpackError(const std::string& error_message);
// Implements ResourceRequestAllowedNotifier::Observer.
@@ -95,7 +95,7 @@ class WebResourceService
ResourceRequestAllowedNotifier resource_request_allowed_notifier_;
// The tool that fetches the url data from the server.
- scoped_ptr<net::URLFetcher> url_fetcher_;
+ std::unique_ptr<net::URLFetcher> url_fetcher_;
// True if we are currently fetching or unpacking data. If we are asked to
// start a fetch when we are still fetching resource data, schedule another
« no previous file with comments | « components/web_resource/resource_request_allowed_notifier_unittest.cc ('k') | components/web_resource/web_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698