禁用"Chrome已过期"通知

laz*_*oke 14 google-chrome

我有一个优化的触摸屏应用程序,并在Chrome自助服务终端模式下运行.它完全脱机运行,由于Chrome的一些更新打破了应用程序,我不得不将其锁定到固定版本的Chrome(v37.x).我已经能够使用ADM/gpedit方法阻止Chrome自动更新(http://www.wikihow.com/Completely-Disable-Google-Chrome-Update),但Chrome现在在屏幕上显示一条消息说它已经过时了.

Chrom是过时的消息

有没有人能够找到禁用此通知的方法?

iht*_*tus 24

Ubuntu+Chrome

对我有用的参数--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'

完整启动命令: google-chrome --start-fullscreen --incognito --simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT' "http://127.0.0.1/" &


小智 8

更改要执行的 Chrome 链接

"%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe" --simulate-outdated-no-au="01 Jan 2199"
Run Code Online (Sandbox Code Playgroud)

对我来说就像一种魅力。谢谢你的巧妙技巧,真的拯救了我的一天。

但是,不要忘记还要更改注册表中的 HTML 关联,例如,如果 Chrome 是您的默认浏览器。这个片段就可以解决问题:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command]
@="\"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe\" --simulate-outdated-no-au=\"01 Jan 2199\" --single-argument %1"
Run Code Online (Sandbox Code Playgroud)


osg*_*sgx 5

您可能想尝试编辑源: https://chromium.googlesource.com/chromium/src.git/+/lkcr/chrome/browser/ui/views/outdated_upgrade_bubble_view.cc(或者只是阅读它们以获取逻辑通知)

// static
void OutdatedUpgradeBubbleView::ShowBubble
Run Code Online (Sandbox Code Playgroud)

如果已经显示气泡,则不显示通知气泡:

// The currently showing bubble.
OutdatedUpgradeBubbleView* g_upgrade_bubble = nullptr;
...
  if (g_upgrade_bubble)
    return;
Run Code Online (Sandbox Code Playgroud)

该小部件在某些操作系统(基于 Linux 的桌面 Chrome 操作系统)上不可用,但在 Windows、MacOSX 和非 ChromeOS Linux 上可用:

bool OutdatedUpgradeBubbleView::IsAvailable() {
// This should only work on non-Chrome OS desktop platforms.
#if defined(OS_WIN) || defined(OS_MACOSX) || \
    (defined(OS_LINUX) && !defined(OS_CHROMEOS))
  return true;
#else
  return false;
#endif
Run Code Online (Sandbox Code Playgroud)

它们具有气泡忽略的最大计数,但这仅用于遥测(指标),而不是禁用气泡:

// The maximum number of ignored bubble we track in the NumLaterPerReinstall
// histogram.
const int kMaxIgnored = 50;
Run Code Online (Sandbox Code Playgroud)

https://chromium.googlesource.com/chromium/src.git/+/lkcr/chrome/browser/ui/views/outdated_upgrade_bubble_view.h文件

// OutdatedUpgradeBubbleView warns the user that an upgrade is long overdue.
// It is intended to be used as the content of a bubble anchored off of the
// Chrome toolbar. Don't create an OutdatedUpgradeBubbleView directly,
// instead use the static ShowBubble method.
Run Code Online (Sandbox Code Playgroud)

最简单的编辑是设置g_upgrade_bubble为非零值。可以使用代码编辑,也可以使用调试器或可能的游戏训练器(例如 Cheat Engine 或 smth)进行运行时内存编辑,或者使用“chrome.dll”修补。

气泡从src/chrome/browser/ui/views/toolbar/toolbar_view.cc https://cs.chromium.org/chromium/src/chrome/browser/ui/views/toolbar/toolbar_view.cc?q=OutdatedUpgradeBubbleView开始

  if (OutdatedUpgradeBubbleView::IsAvailable()) {
    registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL,
                   content::NotificationService::AllSources());
    registrar_.Add(this, chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU,
                   content::NotificationService::AllSources());

void ToolbarView::Observe(...
  switch (type) {
    case chrome::NOTIFICATION_OUTDATED_INSTALL:
      ShowOutdatedInstallNotification(true);
      break;
    case chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU:
      ShowOutdatedInstallNotification(false);
      break;

void ToolbarView::ShowOutdatedInstallNotification(bool auto_update_enabled) {
  if (OutdatedUpgradeBubbleView::IsAvailable()) {
    OutdatedUpgradeBubbleView::ShowBubble(app_menu_button_, browser_,
                                          auto_update_enabled);
  }
}
Run Code Online (Sandbox Code Playgroud)

由 src/chrome/browser/upgrade_detector.cc 使用“ NOTIFICATION_OUTDATED_INSTALL”触发https://cs.chromium.org/chromium/src/chrome/browser/upgrade_ detector.cc?q=NOTIFICATION_OUTDATED_INSTALL&sq=package:chromium&dr=C

void UpgradeDetector::NotifyUpgradeRecommended() {
  notify_upgrade_ = true;

  TriggerNotification(chrome::NOTIFICATION_UPGRADE_RECOMMENDED);
  if (upgrade_available_ == UPGRADE_NEEDED_OUTDATED_INSTALL) {
    TriggerNotification(chrome::NOTIFICATION_OUTDATED_INSTALL);
  } else if (upgrade_available_ == UPGRADE_NEEDED_OUTDATED_INSTALL_NO_AU) {
    TriggerNotification(chrome::NOTIFICATION_OUTDATED_INSTALL_NO_AU);
  } else if (upgrade_available_ == UPGRADE_AVAILABLE_CRITICAL ||
             critical_experiment_updates_available_) {
    TriggerCriticalUpdate();
  }
}
Run Code Online (Sandbox Code Playgroud)

从https://cs.chromium.org/chromium/src/chrome/browser/upgrade_ detector_impl.cc?rcl=0&l=455 调用void UpgradeDetectorImpl::NotifyOnUpgradeWithTimePassed

    const base::TimeDelta multiplier = IsTesting() ?
        base::TimeDelta::FromSeconds(10) : base::TimeDelta::FromDays(1);

    // 14 days when not testing, otherwise 140 seconds.
    const base::TimeDelta severe_threshold = 14 * multiplier;
    const base::TimeDelta high_threshold = 7 * multiplier;
    const base::TimeDelta elevated_threshold = 4 * multiplier;
    const base::TimeDelta low_threshold = 2 * multiplier;

    // These if statements must be sorted (highest interval first).
    if (time_passed >= severe_threshold || is_critical_or_outdated) {
      set_upgrade_notification_stage(
          is_critical_or_outdated ? UPGRADE_ANNOYANCE_CRITICAL :
                                    UPGRADE_ANNOYANCE_SEVERE);

      // We can't get any higher, baby.
      upgrade_notification_timer_.Stop();
    } else if (time_passed >= high_threshold) {
      set_upgrade_notification_stage(UPGRADE_ANNOYANCE_HIGH);
    } else if (time_passed >= elevated_threshold) {
      set_upgrade_notification_stage(UPGRADE_ANNOYANCE_ELEVATED);
    } else if (time_passed >= low_threshold) {
      set_upgrade_notification_stage(UPGRADE_ANNOYANCE_LOW);
    } else {
      return;  // Not ready to recommend upgrade.
    }
  }

  NotifyUpgradeRecommended();
Run Code Online (Sandbox Code Playgroud)


小智 5

我们遇到了同样的问题,但我的一位同事得到了答案(到目前为止还好)。

我们在启动时使用 Windows so 批处理文件,以使用隐身亭和更新间隔启动 chrome。

cd C:\Program Files (x86)\Google\Chrome\Application

start chrome.exe --incognito --window-position=0,0 --kiosk --check-for-update-interval=604800 "facebook.com"

exit    

--check-for-update-interval= 7days we are restarting the PC every day so update never tiger.
Run Code Online (Sandbox Code Playgroud)

此命令行开关在此处指定。


Twi*_*ite 0

在谷歌论坛上,有人写道,为了禁用包括通知在内的自动更新,您可以设置特定的 GPO。