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.
|
} |
} |