Remove lacros related no-op code in chrome/browser/ui/ash
... now that these calls always return `false` with the project termination. R=hidehiko@chromium.org, neis@chromium.org Bug: 373971535 Change-Id: Id318af3453c8c8ecb48d7f8f89780301b9f16b22 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6063664 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1391592}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
2b516fb13e
commit
3b04666c35
chrome/browser/ui/ash
@ -28,7 +28,6 @@
|
||||
#include "chrome/browser/ash/arc/arc_util.h"
|
||||
#include "chrome/browser/ash/arc/fileapi/arc_content_file_system_url_util.h"
|
||||
#include "chrome/browser/ash/arc/intent_helper/custom_tab_session_impl.h"
|
||||
#include "chrome/browser/ash/crosapi/browser_util.h"
|
||||
#include "chrome/browser/ash/file_manager/fileapi_util.h"
|
||||
#include "chrome/browser/ash/fileapi/external_file_url_util.h"
|
||||
#include "chrome/browser/ash/profiles/profile_helper.h"
|
||||
@ -266,23 +265,6 @@ void ArcOpenUrlDelegateImpl::OpenUrlFromArc(const GURL& url) {
|
||||
return;
|
||||
|
||||
GURL url_to_open = ConvertArcUrlToExternalFileUrlIfNeeded(url);
|
||||
// If Lacros is enabled, convert externalfile:// url into file:// url
|
||||
// managed by the FuseBox moniker system because Lacros cannot handle
|
||||
// externalfile:// urls.
|
||||
// TODO(crbug.com/1374575): Check if other externalfile:// urls can use the
|
||||
// same logic. If so, move this code into CrosapiNewWindowDelegate::OpenUrl()
|
||||
// which is only for Lacros.
|
||||
if (crosapi::browser_util::IsLacrosEnabled() &&
|
||||
url_to_open.SchemeIs(content::kExternalFileScheme)) {
|
||||
Profile* profile = ash::ProfileHelper::Get()->GetProfileByUser(
|
||||
user_manager::UserManager::Get()->GetPrimaryUser());
|
||||
// `profile` may be null if sign-in has happened but the profile isn't
|
||||
// loaded yet.
|
||||
if (!profile)
|
||||
return;
|
||||
url_to_open = ConvertToMonikerFileUrl(profile, url);
|
||||
}
|
||||
|
||||
ash::NewWindowDelegate::GetPrimary()->OpenUrl(
|
||||
url_to_open, ash::NewWindowDelegate::OpenUrlFrom::kArc,
|
||||
ash::NewWindowDelegate::Disposition::kNewForegroundTab);
|
||||
|
@ -11,9 +11,6 @@
|
||||
#include "base/callback_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ash/crosapi/browser_util.h"
|
||||
#include "chrome/browser/ash/crosapi/crosapi_ash.h"
|
||||
#include "chrome/browser/ash/crosapi/crosapi_manager.h"
|
||||
#include "chrome/browser/ash/crosapi/suggestion_service_ash.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/sync/session_sync_service_factory.h"
|
||||
@ -46,18 +43,6 @@ BirchTabItem::DeviceFormFactor GetTabItemFormFactor(
|
||||
}
|
||||
}
|
||||
|
||||
BirchTabItem::DeviceFormFactor FromMojomFormFactor(
|
||||
crosapi::mojom::SuggestionDeviceFormFactor form_factor) {
|
||||
switch (form_factor) {
|
||||
case crosapi::mojom::SuggestionDeviceFormFactor::kDesktop:
|
||||
return BirchTabItem::DeviceFormFactor::kDesktop;
|
||||
case crosapi::mojom::SuggestionDeviceFormFactor::kPhone:
|
||||
return BirchTabItem::DeviceFormFactor::kPhone;
|
||||
case crosapi::mojom::SuggestionDeviceFormFactor::kTablet:
|
||||
return BirchTabItem::DeviceFormFactor::kTablet;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
BirchRecentTabsProvider::BirchRecentTabsProvider(Profile* profile)
|
||||
@ -66,18 +51,6 @@ BirchRecentTabsProvider::BirchRecentTabsProvider(Profile* profile)
|
||||
BirchRecentTabsProvider::~BirchRecentTabsProvider() = default;
|
||||
|
||||
void BirchRecentTabsProvider::RequestBirchDataFetch() {
|
||||
// TODO(b/338286403): Check if ChromeSync integration is disabled on lacros
|
||||
// side.
|
||||
if (crosapi::browser_util::IsLacrosEnabled()) {
|
||||
crosapi::CrosapiManager::Get()
|
||||
->crosapi_ash()
|
||||
->suggestion_service_ash()
|
||||
->GetTabSuggestionItems(
|
||||
base::BindOnce(&BirchRecentTabsProvider::OnTabsRetrieved,
|
||||
weak_factory_.GetWeakPtr()));
|
||||
return;
|
||||
}
|
||||
|
||||
syncer::SyncService* sync_service =
|
||||
SyncServiceFactory::GetForProfile(profile_);
|
||||
// `sync_service_` can be null in some tests, so check that here.
|
||||
@ -151,17 +124,4 @@ void BirchRecentTabsProvider::OnForeignSessionsChanged() {
|
||||
RequestBirchDataFetch();
|
||||
}
|
||||
|
||||
void BirchRecentTabsProvider::OnTabsRetrieved(
|
||||
std::vector<crosapi::mojom::TabSuggestionItemPtr> items) {
|
||||
std::vector<BirchTabItem> tab_items;
|
||||
|
||||
for (auto& item : items) {
|
||||
tab_items.emplace_back(base::UTF8ToUTF16(item->title), item->url,
|
||||
item->timestamp, item->favicon_url,
|
||||
item->session_name,
|
||||
FromMojomFormFactor(item->form_factor));
|
||||
}
|
||||
Shell::Get()->birch_model()->SetRecentTabItems(std::move(tab_items));
|
||||
}
|
||||
|
||||
} // namespace ash
|
||||
|
@ -32,8 +32,6 @@ class ASH_EXPORT BirchRecentTabsProvider : public BirchDataProvider {
|
||||
// foreign sessions changed.
|
||||
void OnForeignSessionsChanged();
|
||||
|
||||
void OnTabsRetrieved(std::vector<crosapi::mojom::TabSuggestionItemPtr> items);
|
||||
|
||||
private:
|
||||
raw_ptr<Profile> profile_ = nullptr;
|
||||
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "chrome/browser/ui/tabs/tab_renderer_data.h"
|
||||
#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
||||
#include "chrome/browser/ui/views/frame/browser_view.h"
|
||||
#include "components/app_constants/constants.h"
|
||||
#include "components/app_restore/full_restore_utils.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
|
||||
@ -22,12 +21,6 @@ std::vector<ash::TabInfo> ChromeTabStripDelegate::GetTabsListForWindow(
|
||||
return {};
|
||||
}
|
||||
|
||||
const std::string app_id = full_restore::GetAppId(window);
|
||||
// Lacros will not be supported.
|
||||
if (app_id == app_constants::kLacrosAppId) {
|
||||
return {};
|
||||
}
|
||||
|
||||
// If the given `window` contains a browser frame
|
||||
auto* browser_view = BrowserView::GetBrowserViewForNativeWindow(window);
|
||||
|
||||
|
Reference in New Issue
Block a user