Index: chrome/browser/extensions/action_box_controller.cc |
diff --git a/chrome/browser/extensions/action_box_controller.cc b/chrome/browser/extensions/action_box_controller.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..13a8f172b6f0f86c48e3e4b7cdadd3f7f0d7fc42 |
--- /dev/null |
+++ b/chrome/browser/extensions/action_box_controller.cc |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "chrome/browser/extensions/action_box_controller.h" |
+ |
+#include <algorithm> |
+ |
+namespace extensions { |
+ |
+// static |
+void ActionBoxController::AddMissingActions( |
+ const std::set<ExtensionAction*>& actions, |
+ std::vector<ExtensionAction*>* out) { |
+ for (std::set<ExtensionAction*>::const_iterator it = actions.begin(); |
+ it != actions.end(); ++it) { |
+ ExtensionAction* action = (*it); |
+ if (!std::count(out->begin(), out->end(), action)) |
+ out->push_back(action); |
+ } |
+} |
+ |
+} // namespace extensions |