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

Unified Diff: chrome/browser/extensions/location_bar_controller.cc

Issue 2466523002: Remove some linked_ptr c/b/extension (Closed)
Patch Set: review Created 4 years, 1 month 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 | « chrome/browser/extensions/location_bar_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/location_bar_controller.cc
diff --git a/chrome/browser/extensions/location_bar_controller.cc b/chrome/browser/extensions/location_bar_controller.cc
index 1c26709c09ab37eea9933f6b8c59bf4554688968..2d1467de4a158e28f9cb30f2c7c03f7fb4e00dd5 100644
--- a/chrome/browser/extensions/location_bar_controller.cc
+++ b/chrome/browser/extensions/location_bar_controller.cc
@@ -56,13 +56,14 @@ std::vector<ExtensionAction*> LocationBarController::GetCurrentActions() {
if (existing != active_script_actions_.end()) {
action = existing->second.get();
} else {
- linked_ptr<ExtensionAction> active_script_action(
- ExtensionActionManager::Get(browser_context_)->
- GetBestFitAction(*extension, ActionInfo::TYPE_PAGE).release());
+ std::unique_ptr<ExtensionAction> active_script_action =
+ ExtensionActionManager::Get(browser_context_)
+ ->GetBestFitAction(*extension, ActionInfo::TYPE_PAGE);
active_script_action->SetIsVisible(
ExtensionAction::kDefaultTabId, true);
- active_script_actions_[extension->id()] = active_script_action;
action = active_script_action.get();
+ active_script_actions_[extension->id()] =
+ std::move(active_script_action);
}
}
« no previous file with comments | « chrome/browser/extensions/location_bar_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698