ash: Remove crosapi::lacros_startup_state
The only remaining function is IsLacrosEnabled, which always return false. Bug: b:365741912 Change-Id: I7445999c192c9e7eaca89f01a7aededd53ab9588 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6109873 Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Auto-Submit: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/main@{#1399965}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
3b21af7e99
commit
bd821dc9ed
ash
drag_drop
webui
shortcut_customization_ui
chrome/browser/ash/crosapi
chromeos/crosapi/cpp
@ -22,7 +22,6 @@
|
||||
#include "ash/wm/wm_metrics.h"
|
||||
#include "base/pickle.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chromeos/crosapi/cpp/lacros_startup_state.h"
|
||||
#include "chromeos/ui/base/window_properties.h"
|
||||
#include "ui/base/clipboard/clipboard_format_type.h"
|
||||
#include "ui/base/clipboard/custom_data_helper.h"
|
||||
|
@ -32,11 +32,10 @@ static_library("backend") {
|
||||
"//ash/webui/shortcut_customization_ui/mojom",
|
||||
"//base",
|
||||
"//chromeos/ash/components/local_search_service:local_search_service",
|
||||
"//chromeos/ash/components/local_search_service/public/cpp:cpp",
|
||||
"//chromeos/ash/components/local_search_service/public/cpp",
|
||||
"//chromeos/ash/components/local_search_service/public/mojom",
|
||||
"//chromeos/crosapi/cpp:cpp",
|
||||
"//chromeos/strings",
|
||||
"//components/prefs:prefs",
|
||||
"//components/prefs",
|
||||
"//ui/base/ime/ash",
|
||||
"//ui/events/ash",
|
||||
"//ui/events/devices",
|
||||
|
@ -444,10 +444,6 @@ std::string GetUuid(mojom::AcceleratorSource source,
|
||||
// or specific device property.
|
||||
bool ShouldExcludeItem(const AcceleratorLayoutDetails& details) {
|
||||
switch (details.action_id) {
|
||||
// Hide user switching shortcuts for lacros builds.
|
||||
case kSwitchToNextUser:
|
||||
case kSwitchToPreviousUser:
|
||||
return crosapi::lacros_startup_state::IsLacrosEnabled();
|
||||
case kPrivacyScreenToggle:
|
||||
return !accelerators::CanTogglePrivacyScreen();
|
||||
case kTilingWindowResizeLeft:
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "base/observer_list.h"
|
||||
#include "base/task/sequenced_task_runner.h"
|
||||
#include "chromeos/crosapi/cpp/lacros_startup_state.h"
|
||||
#include "components/prefs/pref_member.h"
|
||||
#include "mojo/public/cpp/bindings/pending_receiver.h"
|
||||
#include "mojo/public/cpp/bindings/pending_remote.h"
|
||||
|
@ -71,7 +71,6 @@
|
||||
#include "chromeos/ash/components/browser_context_helper/browser_context_helper.h"
|
||||
#include "chromeos/ash/components/standalone_browser/channel_util.h"
|
||||
#include "chromeos/crosapi/cpp/crosapi_constants.h"
|
||||
#include "chromeos/crosapi/cpp/lacros_startup_state.h"
|
||||
#include "chromeos/crosapi/mojom/crosapi.mojom-shared.h"
|
||||
#include "components/account_id/account_id.h"
|
||||
#include "components/component_updater/ash/component_manager_ash.h"
|
||||
@ -152,7 +151,6 @@ void BrowserManager::InitializeAndStartIfNeeded() {
|
||||
// Ensure this isn't run multiple times.
|
||||
session_manager::SessionManager::Get()->RemoveObserver(this);
|
||||
|
||||
crosapi::lacros_startup_state::SetLacrosStartupState(false);
|
||||
SetState(State::UNAVAILABLE);
|
||||
ClearLacrosData();
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
|
||||
# C++ components used by both lacros-chrome and ash-chrome.
|
||||
config("crosapi_implementation") {
|
||||
defines = [ "IS_CROSAPI_IMPL" ]
|
||||
@ -25,13 +23,6 @@ component("cpp") {
|
||||
"//components/version_info",
|
||||
"//mojo/public/cpp/bindings",
|
||||
]
|
||||
|
||||
if (is_chromeos_ash) {
|
||||
sources += [
|
||||
"lacros_startup_state.cc",
|
||||
"lacros_startup_state.h",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
static_library("crosapi_constants") {
|
||||
|
@ -1,27 +0,0 @@
|
||||
// Copyright 2021 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "chromeos/crosapi/cpp/lacros_startup_state.h"
|
||||
|
||||
namespace {
|
||||
|
||||
bool g_is_lacros_enabled = false;
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace crosapi {
|
||||
|
||||
namespace lacros_startup_state {
|
||||
|
||||
void SetLacrosStartupState(bool is_enabled) {
|
||||
g_is_lacros_enabled = is_enabled;
|
||||
}
|
||||
|
||||
bool IsLacrosEnabled() {
|
||||
return g_is_lacros_enabled;
|
||||
}
|
||||
|
||||
} // namespace lacros_startup_state
|
||||
|
||||
} // namespace crosapi
|
@ -1,32 +0,0 @@
|
||||
// Copyright 2021 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef CHROMEOS_CROSAPI_CPP_LACROS_STARTUP_STATE_H_
|
||||
#define CHROMEOS_CROSAPI_CPP_LACROS_STARTUP_STATE_H_
|
||||
|
||||
#include "base/component_export.h"
|
||||
|
||||
namespace crosapi {
|
||||
|
||||
namespace lacros_startup_state {
|
||||
|
||||
// Transfers the Lacros startup state from the browser level to lower levels
|
||||
// like components. If |is_lacros_enabled| is true, Lacros is enabled, which
|
||||
// means that Lacros is the only browser and Ash is only used for system
|
||||
// operations.
|
||||
// Note: As the state cannot state wile Ash is running (profile migration,
|
||||
// browser restart and other things required) this will be set when Ash
|
||||
// determines if Lacros should get launched or not.
|
||||
COMPONENT_EXPORT(CROSAPI)
|
||||
void SetLacrosStartupState(bool is_lacros_enabled);
|
||||
|
||||
// Mirroring the Lacros enabled flag for components and other lower than browser
|
||||
// components for dependent feature development.
|
||||
COMPONENT_EXPORT(CROSAPI) bool IsLacrosEnabled();
|
||||
|
||||
} // namespace lacros_startup_state
|
||||
|
||||
} // namespace crosapi
|
||||
|
||||
#endif // CHROMEOS_CROSAPI_CPP_LACROS_STARTUP_STATE_H_
|
Reference in New Issue
Block a user