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

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

Issue 10544185: Order the script badges in the location bar consistently (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: revert scoped_ptr change, rebase Created 8 years, 6 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/extensions/page_action_controller.cc
diff --git a/chrome/browser/extensions/page_action_controller.cc b/chrome/browser/extensions/page_action_controller.cc
index 9ba6f5428a0984a372fcf25ab88c620a4efa7b02..59157a893c120a0dc74f12717317a0ddd87878f5 100644
--- a/chrome/browser/extensions/page_action_controller.cc
+++ b/chrome/browser/extensions/page_action_controller.cc
@@ -21,22 +21,20 @@ PageActionController::PageActionController(TabContents* tab_contents)
PageActionController::~PageActionController() {}
-scoped_ptr<std::vector<ExtensionAction*> >
-PageActionController::GetCurrentActions() {
- scoped_ptr<std::vector<ExtensionAction*> > current_actions(
- new std::vector<ExtensionAction*>());
-
+std::vector<ExtensionAction*> PageActionController::GetCurrentActions() {
ExtensionService* service = GetExtensionService();
if (!service)
- return current_actions.Pass();
+ return std::vector<ExtensionAction*>();
+
+ std::vector<ExtensionAction*> current_actions;
for (ExtensionSet::const_iterator i = service->extensions()->begin();
i != service->extensions()->end(); ++i) {
ExtensionAction* action = (*i)->page_action();
if (action)
- current_actions->push_back(action);
+ current_actions.push_back(action);
}
- return current_actions.Pass();
+ return current_actions;
}
LocationBarController::Action PageActionController::OnClicked(
« no previous file with comments | « chrome/browser/extensions/page_action_controller.h ('k') | chrome/browser/extensions/script_badge_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698