| Index: chrome/browser/ui/webui/help/help_handler.h
|
| diff --git a/chrome/browser/ui/webui/help/help_handler.h b/chrome/browser/ui/webui/help/help_handler.h
|
| index 82b088bb8a06db762d4d519807ded3b7d5c13c77..5aea40c2f0c98baf57918f59c507d4194cd509fa 100644
|
| --- a/chrome/browser/ui/webui/help/help_handler.h
|
| +++ b/chrome/browser/ui/webui/help/help_handler.h
|
| @@ -13,9 +13,8 @@
|
| #include "base/strings/string16.h"
|
| #include "build/build_config.h"
|
| #include "chrome/browser/ui/webui/help/version_updater.h"
|
| +#include "chrome/browser/upgrade_observer.h"
|
| #include "components/policy/core/common/policy_service.h"
|
| -#include "content/public/browser/notification_observer.h"
|
| -#include "content/public/browser/notification_registrar.h"
|
| #include "content/public/browser/web_ui_message_handler.h"
|
|
|
| #if defined(OS_CHROMEOS)
|
| @@ -32,7 +31,7 @@ class ListValue;
|
|
|
| // WebUI message handler for the help page.
|
| class HelpHandler : public content::WebUIMessageHandler,
|
| - public content::NotificationObserver {
|
| + public UpgradeObserver {
|
| public:
|
| HelpHandler();
|
| ~HelpHandler() override;
|
| @@ -43,10 +42,8 @@ class HelpHandler : public content::WebUIMessageHandler,
|
| // Adds string values for the UI to |localized_strings|.
|
| static void GetLocalizedValues(base::DictionaryValue* localized_strings);
|
|
|
| - // NotificationObserver implementation.
|
| - void Observe(int type,
|
| - const content::NotificationSource& source,
|
| - const content::NotificationDetails& details) override;
|
| + // UpgradeObserver implementation.
|
| + void OnUpgradeRecommended() override;
|
|
|
| // Returns the browser version as a string.
|
| static base::string16 BuildBrowserVersionString();
|
| @@ -124,12 +121,12 @@ class HelpHandler : public content::WebUIMessageHandler,
|
| // Specialized instance of the VersionUpdater used to update the browser.
|
| std::unique_ptr<VersionUpdater> version_updater_;
|
|
|
| - // Used to observe notifications.
|
| - content::NotificationRegistrar registrar_;
|
| -
|
| // Used to observe changes in the |kDeviceAutoUpdateDisabled| policy.
|
| policy::PolicyChangeRegistrar policy_registrar_;
|
|
|
| + // If true changes to UpgradeObserver are applied, if false they are ignored.
|
| + bool apply_changes_from_upgrade_observer_;
|
| +
|
| // Used for callbacks.
|
| base::WeakPtrFactory<HelpHandler> weak_factory_;
|
|
|
|
|