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

Unified Diff: extensions/browser/process_manager.cc

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: address comments Created 4 years, 4 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
« no previous file with comments | « extensions/browser/lazy_background_task_queue.cc ('k') | extensions/browser/updater/extension_downloader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/process_manager.cc
diff --git a/extensions/browser/process_manager.cc b/extensions/browser/process_manager.cc
index 1689bb34e220e56ddd5ccde1f57aefdde6da51de..0def1d2e6262cf775e5d3d7a0918a6787e267678 100644
--- a/extensions/browser/process_manager.cc
+++ b/extensions/browser/process_manager.cc
@@ -142,7 +142,7 @@ struct ProcessManager::BackgroundPageData {
uint64_t close_sequence_id;
// Keeps track of when this page was last suspended. Used for perf metrics.
- linked_ptr<base::ElapsedTimer> since_suspended;
+ std::unique_ptr<base::ElapsedTimer> since_suspended;
BackgroundPageData()
: lazy_keepalive_count(0),
@@ -714,9 +714,8 @@ void ProcessManager::OnBackgroundHostCreated(ExtensionHost* host) {
background_hosts_.insert(host);
if (BackgroundInfo::HasLazyBackgroundPage(host->extension())) {
- linked_ptr<base::ElapsedTimer> since_suspended(
- background_page_data_[host->extension()->id()].
- since_suspended.release());
+ std::unique_ptr<base::ElapsedTimer> since_suspended = std::move(
+ background_page_data_[host->extension()->id()].since_suspended);
if (since_suspended.get()) {
UMA_HISTOGRAM_LONG_TIMES("Extensions.EventPageIdleTime",
since_suspended->Elapsed());
« no previous file with comments | « extensions/browser/lazy_background_task_queue.cc ('k') | extensions/browser/updater/extension_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698