Commit fd130d18 authored by Oscar Johansson's avatar Oscar Johansson Committed by Commit Bot

Remove namespace alias (chrome/browser/extensions)

When using Jumbo build, the namespace alias Create in
/api/context_menus/context_menus_api.cc conflicts
with the function Create called from
api/desktop_capture/desktop_capture_base.cc.
This commits solves the issue by removing the namespace
alias. It also removes the namespace aliases
Update and Remove in the same file to avoid
this issue in the future.

Bug: 850484
Change-Id: Ibdb940e153a89b7120c670e806be34fc4e95ab90
Reviewed-on: https://chromium-review.googlesource.com/1099062Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567164}
parent 8a0dfde2
......@@ -27,14 +27,11 @@ const char kIdRequiredError[] = "Extensions using event pages must pass an "
namespace extensions {
namespace Create = api::context_menus::Create;
namespace Remove = api::context_menus::Remove;
namespace Update = api::context_menus::Update;
ExtensionFunction::ResponseAction ContextMenusCreateFunction::Run() {
MenuItem::Id id(browser_context()->IsOffTheRecord(),
MenuItem::ExtensionKey(extension_id()));
std::unique_ptr<Create::Params> params(Create::Params::Create(*args_));
std::unique_ptr<api::context_menus::Create::Params> params(
api::context_menus::Create::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
if (params->create_properties.id.get()) {
......@@ -62,7 +59,8 @@ ExtensionFunction::ResponseAction ContextMenusCreateFunction::Run() {
ExtensionFunction::ResponseAction ContextMenusUpdateFunction::Run() {
MenuItem::Id item_id(browser_context()->IsOffTheRecord(),
MenuItem::ExtensionKey(extension_id()));
std::unique_ptr<Update::Params> params(Update::Params::Create(*args_));
std::unique_ptr<api::context_menus::Update::Params> params(
api::context_menus::Update::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
if (params->id.as_string)
......@@ -82,7 +80,8 @@ ExtensionFunction::ResponseAction ContextMenusUpdateFunction::Run() {
}
ExtensionFunction::ResponseAction ContextMenusRemoveFunction::Run() {
std::unique_ptr<Remove::Params> params(Remove::Params::Create(*args_));
std::unique_ptr<api::context_menus::Remove::Params> params(
api::context_menus::Remove::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
MenuManager* manager = MenuManager::Get(browser_context());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment