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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h

Issue 1873263002: Convert //components/data_reduction_proxy from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address feedback 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/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
index c44c51d3f0f1a59b090f137ae9d482a21392167c..d54113d2eb53c690bcc8a7c9149c674616a0d11c 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_event_store.h
@@ -8,10 +8,10 @@
#include <stdint.h>
#include <deque>
+#include <memory>
#include <string>
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/threading/thread_checker.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_event_storage_delegate.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
@@ -45,22 +45,23 @@ class DataReductionProxyEventStore
base::Value* GetSummaryValue() const;
// Adds DATA_REDUCTION_PROXY event with no parameters to the event store.
- void AddEvent(scoped_ptr<base::Value> event) override;
+ void AddEvent(std::unique_ptr<base::Value> event) override;
// Override of DataReductionProxyEventStorageDelegate.
// Put |entry| on the deque of stored events and set |current_configuration_|.
- void AddEnabledEvent(scoped_ptr<base::Value> entry, bool enabled) override;
+ void AddEnabledEvent(std::unique_ptr<base::Value> entry,
+ bool enabled) override;
// Override of DataReductionProxyEventStorageDelegate.
// Put |entry| on a deque of events to store and set
// |secure_proxy_check_state_|
- void AddEventAndSecureProxyCheckState(scoped_ptr<base::Value> entry,
+ void AddEventAndSecureProxyCheckState(std::unique_ptr<base::Value> entry,
SecureProxyCheckState state) override;
// Override of DataReductionProxyEventStorageDelegate.
// Put |entry| on a deque of events to store and set |last_bypass_event_| and
// |expiration_ticks_|
- void AddAndSetLastBypassEvent(scoped_ptr<base::Value> entry,
+ void AddAndSetLastBypassEvent(std::unique_ptr<base::Value> entry,
int64_t expiration_ticks) override;
// Returns the list of proxy servers for HTTP origins.
@@ -81,11 +82,11 @@ class DataReductionProxyEventStore
// Whether the data reduction proxy is enabled or not.
bool enabled_;
// The current data reduction proxy configuration.
- scoped_ptr<base::Value> current_configuration_;
+ std::unique_ptr<base::Value> current_configuration_;
// The state based on the last secure proxy check.
SecureProxyCheckState secure_proxy_check_state_;
// The last seen data reduction proxy bypass event.
- scoped_ptr<base::Value> last_bypass_event_;
+ std::unique_ptr<base::Value> last_bypass_event_;
// The expiration time of the |last_bypass_event_|.
int64_t expiration_ticks_;

Powered by Google App Engine
This is Rietveld 408576698