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

Unified Diff: chrome/browser/ui/webui/md_downloads/downloads_list_tracker.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/md_downloads/downloads_list_tracker.cc
diff --git a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
index 24d5d16adbbad926beb2037f522d19a357693901..e2dd721e7ada64593240403c734d6a0fd4a68ec0 100644
--- a/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
+++ b/chrome/browser/ui/webui/md_downloads/downloads_list_tracker.cc
@@ -70,7 +70,7 @@ const char* GetDangerTypeString(content::DownloadDangerType danger_type) {
// TODO(dbeam): if useful elsewhere, move to base/i18n/time_formatting.h?
base::string16 TimeFormatLongDate(const base::Time& time) {
- scoped_ptr<icu::DateFormat> formatter(
+ std::unique_ptr<icu::DateFormat> formatter(
icu::DateFormat::createDateInstance(icu::DateFormat::kLong));
icu::UnicodeString date_string;
formatter->format(static_cast<UDate>(time.ToDoubleT() * 1000), date_string);
@@ -185,7 +185,8 @@ DownloadsListTracker::DownloadsListTracker(
Init();
}
-scoped_ptr<base::DictionaryValue> DownloadsListTracker::CreateDownloadItemValue(
+std::unique_ptr<base::DictionaryValue>
+DownloadsListTracker::CreateDownloadItemValue(
content::DownloadItem* download_item) const {
// TODO(asanka): Move towards using download_model here for getting status and
// progress. The difference currently only matters to Drive downloads and
@@ -196,7 +197,7 @@ scoped_ptr<base::DictionaryValue> DownloadsListTracker::CreateDownloadItemValue(
// chrome/browser/resources/downloads/downloads.js in @typedef for
// BackendDownloadObject. Please update it whenever you add or remove
// any keys in file_value.
- scoped_ptr<base::DictionaryValue> file_value(new base::DictionaryValue);
+ std::unique_ptr<base::DictionaryValue> file_value(new base::DictionaryValue);
file_value->SetInteger(
"started", static_cast<int>(download_item->GetStartTime().ToTimeT()));

Powered by Google App Engine
This is Rietveld 408576698