Commit d087cfbd authored by James Cook's avatar James Cook Committed by Commit Bot

Revert "lacros: Move lacros app id prefix to a shared constants file"

This reverts commit 422d1749.

Reason for revert: Broke Chrome OS code search bot

https://ci.chromium.org/p/infra/builders/codesearch/codesearch-gen-chromium-chromiumos/8920

Log from good revision to bad one:
https://chromium.googlesource.com/chromium/src/+log/efb1ca9d03b346aedf67f671dca657c6af147888..6e88c372eccc90ba2353773727e94e97dc9abc64

Original change's description:
> lacros: Move lacros app id prefix to a shared constants file
>
> The ID prefix is shared between the Wayland client code in Lacros and
> the Wayland server code in ash, so share the constant.
>
> Bug: none
> Change-Id: If62550c447670e553a854ce1092cfd3d7d9aacff
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427546
> Reviewed-by: Antonio Gomes (GMT-4) <tonikitoo@igalia.com>
> Commit-Queue: James Cook <jamescook@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#810277}

TBR=jamescook@chromium.org,tonikitoo@igalia.com

Change-Id: I227d6770b7f301cf22b10c242fcbfe490d130fe9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2432084Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810613}
parent b2fe8163
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/common/channel_info.h" #include "chrome/common/channel_info.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chromeos/crosapi/cpp/crosapi_constants.h"
#include "chromeos/crosapi/mojom/crosapi.mojom.h" #include "chromeos/crosapi/mojom/crosapi.mojom.h"
#include "components/exo/shell_surface_util.h" #include "components/exo/shell_surface_util.h"
#include "components/metrics/metrics_pref_names.h" #include "components/metrics/metrics_pref_names.h"
...@@ -115,6 +114,9 @@ bool IsLacrosWindow(const aura::Window* window) { ...@@ -115,6 +114,9 @@ bool IsLacrosWindow(const aura::Window* window) {
const std::string* app_id = exo::GetShellApplicationId(window); const std::string* app_id = exo::GetShellApplicationId(window);
if (!app_id) if (!app_id)
return false; return false;
// TODO(jamescook): Move this constant to //chromeos/crosapi/cpp and share it
// with //ui/ozone/wayland.
const char kLacrosAppIdPrefix[] = "org.chromium.lacros";
return base::StartsWith(*app_id, kLacrosAppIdPrefix); return base::StartsWith(*app_id, kLacrosAppIdPrefix);
} }
......
...@@ -14,8 +14,6 @@ component("cpp") { ...@@ -14,8 +14,6 @@ component("cpp") {
"bitmap.h", "bitmap.h",
"bitmap_util.cc", "bitmap_util.cc",
"bitmap_util.h", "bitmap_util.h",
"crosapi_constants.cc",
"crosapi_constants.h",
] ]
configs += [ ":crosapi_implementation" ] configs += [ ":crosapi_implementation" ]
deps = [ deps = [
......
// Copyright 2020 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 "chromeos/crosapi/cpp/crosapi_constants.h"
namespace crosapi {
// The prefix for a Wayland app id for a Lacros browser window. The full ID is
// suffixed with a serialized unguessable token unique to each window. The
// trailing "." is intentional.
const char kLacrosAppIdPrefix[] = "org.chromium.lacros.";
} // namespace crosapi
// Copyright 2020 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.
#ifndef CHROMEOS_CROSAPI_CPP_CROSAPI_CONSTANTS_H_
#define CHROMEOS_CROSAPI_CPP_CROSAPI_CONSTANTS_H_
#include "base/component_export.h"
namespace crosapi {
COMPONENT_EXPORT(CROSAPI) extern const char kLacrosAppIdPrefix[];
} // namespace crosapi
#endif // CHROMEOS_CROSAPI_CPP_CROSAPI_CONSTANTS_H_
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
visibility = [ "//ui/ozone/*" ] visibility = [ "//ui/ozone/*" ]
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/linux/gtk/gtk.gni") import("//build/config/linux/gtk/gtk.gni")
import("//build/config/linux/pkg_config.gni") import("//build/config/linux/pkg_config.gni")
import("//gpu/vulkan/features.gni") import("//gpu/vulkan/features.gni")
...@@ -213,11 +212,6 @@ source_set("wayland") { ...@@ -213,11 +212,6 @@ source_set("wayland") {
] ]
} }
# TODO(crbug.com/1052397): Rename chromeos_is_browser_only to is_lacros.
if (chromeos_is_browser_only) {
deps += [ "//chromeos/crosapi/cpp" ]
}
defines = [ "OZONE_IMPLEMENTATION" ] defines = [ "OZONE_IMPLEMENTATION" ]
if (use_wayland_gbm) { if (use_wayland_gbm) {
......
include_rules = [
# For Lacros.
"+chromeos/crosapi/cpp/crosapi_constants.h",
]
...@@ -24,10 +24,6 @@ ...@@ -24,10 +24,6 @@
#include "ui/platform_window/extensions/wayland_extension.h" #include "ui/platform_window/extensions/wayland_extension.h"
#include "ui/platform_window/wm/wm_drop_handler.h" #include "ui/platform_window/wm/wm_drop_handler.h"
#if BUILDFLAG(IS_LACROS)
#include "chromeos/crosapi/cpp/crosapi_constants.h"
#endif
namespace ui { namespace ui {
WaylandToplevelWindow::WaylandToplevelWindow(PlatformWindowDelegate* delegate, WaylandToplevelWindow::WaylandToplevelWindow(PlatformWindowDelegate* delegate,
...@@ -342,8 +338,7 @@ bool WaylandToplevelWindow::OnInitialize( ...@@ -342,8 +338,7 @@ bool WaylandToplevelWindow::OnInitialize(
PlatformWindowInitProperties properties) { PlatformWindowInitProperties properties) {
#if BUILDFLAG(IS_LACROS) #if BUILDFLAG(IS_LACROS)
auto token = base::UnguessableToken::Create(); auto token = base::UnguessableToken::Create();
window_unique_id_ = window_unique_id_ = "org.chromium.lacros." + token.ToString();
std::string(crosapi::kLacrosAppIdPrefix) + token.ToString();
#else #else
wm_class_class_ = properties.wm_class_class; wm_class_class_ = properties.wm_class_class;
#endif #endif
......
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