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

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

Issue 2466523002: Remove some linked_ptr c/b/extension (Closed)
Patch Set: 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
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..41c34d341ee69405df8e1c6c801904177168e001 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);
+ action = active_script_actions_[extension->id()].get();
Devlin 2016/11/02 22:25:33 nit: move this above the insertion, and just do ac
limasdf 2016/11/03 15:29:23 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698