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

Unified Diff: components/webdata/common/web_data_request_manager.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/webdata/common/web_data_request_manager.h
diff --git a/components/webdata/common/web_data_request_manager.h b/components/webdata/common/web_data_request_manager.h
index 695d310933fe515dc06c3d9fb157dc7856343e76..97ac227328f88094ce5e94357756669fdd0c043d 100644
--- a/components/webdata/common/web_data_request_manager.h
+++ b/components/webdata/common/web_data_request_manager.h
@@ -10,6 +10,7 @@
#define COMPONENTS_WEBDATA_COMMON_WEB_DATA_REQUEST_MANAGER_H__
#include <map>
+#include <memory>
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -59,11 +60,11 @@ class WebDataRequest {
void OnComplete();
// The result is owned by the request.
- void SetResult(scoped_ptr<WDTypedResult> r);
+ void SetResult(std::unique_ptr<WDTypedResult> r);
// Transfers ownership pof result to caller. Should only be called once per
// result.
- scoped_ptr<WDTypedResult> GetResult();
+ std::unique_ptr<WDTypedResult> GetResult();
private:
// Used to notify manager if request is cancelled. Uses a raw ptr instead of
@@ -84,7 +85,7 @@ class WebDataRequest {
// The originator of the service request.
WebDataServiceConsumer* consumer_;
- scoped_ptr<WDTypedResult> result_;
+ std::unique_ptr<WDTypedResult> result_;
DISALLOW_COPY_AND_ASSIGN(WebDataRequest);
};
@@ -106,7 +107,7 @@ class WebDataRequestManager
void CancelRequest(WebDataServiceBase::Handle h);
// Invoked by the WebDataService when |request| has been completed.
- void RequestCompleted(scoped_ptr<WebDataRequest> request);
+ void RequestCompleted(std::unique_ptr<WebDataRequest> request);
// Register the request as a pending request.
void RegisterRequest(WebDataRequest* request);
@@ -121,7 +122,7 @@ class WebDataRequestManager
// This will notify the consumer in whatever thread was used to create this
// request.
- void RequestCompletedOnThread(scoped_ptr<WebDataRequest> request);
+ void RequestCompletedOnThread(std::unique_ptr<WebDataRequest> request);
// A lock to protect pending requests and next request handle.
base::Lock pending_lock_;
« no previous file with comments | « components/web_resource/web_resource_service.cc ('k') | components/webdata/common/web_data_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698