Commit 326d7cd2 authored by Manu Cornet's avatar Manu Cornet Committed by Commit Bot

CrOS Shelf: Remove app sync UI that changes the home button's tooltip

Bug: 971426
Change-Id: I4ecaea02e61908297ee366c99f7dba0db8ee3595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1661079
Commit-Queue: Manu Cornet <manucornet@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#669724}
parent de03c1ce
......@@ -30,7 +30,6 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/app_list/app_list_client_impl.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service_factory.h"
#include "chrome/browser/ui/app_list/app_sync_ui_state.h"
#include "chrome/browser/ui/app_list/arc/arc_app_icon_loader.h"
#include "chrome/browser/ui/app_list/arc/arc_app_utils.h"
#include "chrome/browser/ui/app_list/crostini/crostini_app_icon_loader.h"
......@@ -222,10 +221,6 @@ ChromeLauncherController::ChromeLauncherController(Profile* profile,
profile = ProfileManager::GetActiveUserProfile();
if (!profile->IsGuestSession() && !profile->IsSystemProfile())
profile = profile->GetOriginalProfile();
app_sync_ui_state_ = AppSyncUIState::Get(profile);
if (app_sync_ui_state_)
app_sync_ui_state_->AddObserver(this);
}
// All profile relevant settings get bound to the current profile.
......@@ -1185,9 +1180,6 @@ void ChromeLauncherController::AttachProfile(Profile* profile_to_attach) {
}
void ChromeLauncherController::ReleaseProfile() {
if (app_sync_ui_state_)
app_sync_ui_state_->RemoveObserver(this);
app_updaters_.clear();
pref_change_registrar_.RemoveAll();
......@@ -1275,22 +1267,3 @@ void ChromeLauncherController::ShelfItemChanged(
RemovePinPosition(profile(), old_item.id);
}
///////////////////////////////////////////////////////////////////////////////
// AppSyncUIStateObserver:
void ChromeLauncherController::OnAppSyncUIStatusChanged() {
// Update the app list button title to reflect the syncing status.
base::string16 title = l10n_util::GetStringUTF16(
app_sync_ui_state_->status() == AppSyncUIState::STATUS_SYNCING
? IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE
: IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE);
const int app_list_index =
model_->GetItemIndexForType(ash::TYPE_APP_LIST_DEPRECATED);
DCHECK_GE(app_list_index, 0);
ash::ShelfItem item = model_->items()[app_list_index];
if (item.title != title) {
item.title = title;
model_->Set(app_list_index, item);
}
}
......@@ -17,7 +17,6 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/app_icon_loader_delegate.h"
#include "chrome/browser/ui/app_list/app_list_syncable_service.h"
#include "chrome/browser/ui/app_list/app_sync_ui_state_observer.h"
#include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/crostini_app_window_shelf_controller.h"
#include "chrome/browser/ui/ash/launcher/discover_window_observer.h"
......@@ -28,7 +27,6 @@
#include "components/sync_preferences/pref_service_syncable_observer.h"
class AppIconLoader;
class AppSyncUIState;
class AppWindowLauncherController;
class BrowserShortcutLauncherItemController;
class BrowserStatusMonitor;
......@@ -66,7 +64,6 @@ class ChromeLauncherController
: public LauncherAppUpdater::Delegate,
public AppIconLoaderDelegate,
private ash::ShelfModelObserver,
private AppSyncUIStateObserver,
private app_list::AppListSyncableService::Observer,
private sync_preferences::PrefServiceSyncableObserver {
public:
......@@ -340,9 +337,6 @@ class ChromeLauncherController
void ShelfItemMoved(int start_index, int target_index) override;
void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override;
// AppSyncUIStateObserver:
void OnAppSyncUIStatusChanged() override;
// app_list::AppListSyncableService::Observer:
void OnSyncModelUpdated() override;
......@@ -409,8 +403,6 @@ class ChromeLauncherController
PrefChangeRegistrar pref_change_registrar_;
AppSyncUIState* app_sync_ui_state_ = nullptr;
// The owned browser status monitor.
std::unique_ptr<BrowserStatusMonitor> browser_status_monitor_;
......
......@@ -184,9 +184,6 @@ Try tapping the mic to ask me anything.
<message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_TITLE" desc="The title used for the Ash Launcher in the Shelf (not mentioning 'Apps' since this is a general launcher).">
Launcher
</message>
<message name="IDS_ASH_SHELF_APP_LIST_LAUNCHER_SYNCING_TITLE" desc="The title used for the Ash Launcher in the Shelf to indicate loading/syncinc apps.">
Launcher (syncing apps...)
</message>
<!-- Password expiry notifications -->
<message name="IDS_PASSWORD_EXPIRY_DAYS_BODY" desc="Message body for a notification that tells the user their password will expire in less than some number of days (where 0 days means it has expired).">
......
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