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

Unified Diff: chrome/browser/ui/webui/options/clear_browser_data_handler.cc

Issue 1865213004: Convert //chrome/browser/ui 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/ui/webui/options/clear_browser_data_handler.cc
diff --git a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
index 54e5ffe771c7ca38d6720b4e5220efd65c6cd908..1fb5441946e16c9cb2d156e2d142da3c9f481c5a 100644
--- a/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
+++ b/chrome/browser/ui/webui/options/clear_browser_data_handler.cc
@@ -5,11 +5,13 @@
#include "chrome/browser/ui/webui/options/clear_browser_data_handler.h"
#include <stddef.h>
+
#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
#include "base/strings/string16.h"
@@ -88,10 +90,10 @@ void ClearBrowserDataHandler::InitializeHandler() {
base::Unretained(this)));
if (AreCountersEnabled()) {
- AddCounter(make_scoped_ptr(new PasswordsCounter()));
- AddCounter(make_scoped_ptr(new HistoryCounter()));
- AddCounter(make_scoped_ptr(new CacheCounter()));
- AddCounter(make_scoped_ptr(new AutofillCounter()));
+ AddCounter(base::WrapUnique(new PasswordsCounter()));
+ AddCounter(base::WrapUnique(new HistoryCounter()));
+ AddCounter(base::WrapUnique(new CacheCounter()));
+ AddCounter(base::WrapUnique(new AutofillCounter()));
sync_service_ =
ProfileSyncServiceFactory::GetForProfile(Profile::FromWebUI(web_ui()));
@@ -358,7 +360,7 @@ void ClearBrowserDataHandler::OnBrowsingHistoryPrefChanged() {
}
void ClearBrowserDataHandler::AddCounter(
- scoped_ptr<BrowsingDataCounter> counter) {
+ std::unique_ptr<BrowsingDataCounter> counter) {
DCHECK(AreCountersEnabled());
counter->Init(
@@ -369,7 +371,7 @@ void ClearBrowserDataHandler::AddCounter(
}
void ClearBrowserDataHandler::UpdateCounterText(
- scoped_ptr<BrowsingDataCounter::Result> result) {
+ std::unique_ptr<BrowsingDataCounter::Result> result) {
DCHECK(AreCountersEnabled());
web_ui()->CallJavascriptFunction(
"ClearBrowserDataOverlay.updateCounter",

Powered by Google App Engine
This is Rietveld 408576698