Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(936)

Unified Diff: chrome/browser/chromeos/policy/app_pack_updater.h

Issue 23494053: Remove NOTIFICATION_SYSTEM_SETTING_CHANGED, switch CrosSettings to base::CallbackRegistry. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: trailing space Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/policy/app_pack_updater.h
diff --git a/chrome/browser/chromeos/policy/app_pack_updater.h b/chrome/browser/chromeos/policy/app_pack_updater.h
index cd22b9c6ed59ccf3b7f96d77903f528cd28084c0..54b43740580b75a86e8c82a63d53d66216750da2 100644
--- a/chrome/browser/chromeos/policy/app_pack_updater.h
+++ b/chrome/browser/chromeos/policy/app_pack_updater.h
@@ -11,9 +11,10 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/extensions/external_cache.h"
-#include "content/public/browser/notification_observer.h"
+#include "chrome/browser/chromeos/settings/cros_settings.h"
namespace extensions {
class ExternalLoader;
@@ -31,8 +32,7 @@ class EnterpriseInstallAttributes;
// The AppPackUpdater manages a set of extensions that are configured via a
// device policy to be locally cached and installed into the Demo user account
// at login time.
-class AppPackUpdater : public content::NotificationObserver,
- public chromeos::ExternalCache::Delegate {
+class AppPackUpdater : public chromeos::ExternalCache::Delegate {
public:
// Callback to listen for updates to the screensaver extension's path.
typedef base::Callback<void(const base::FilePath&)> ScreenSaverUpdateCallback;
@@ -63,15 +63,13 @@ class AppPackUpdater : public content::NotificationObserver,
void OnDamagedFileDetected(const base::FilePath& path);
private:
- // content::NotificationObserver:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
// Implementation of ExternalCache::Delegate:
virtual void OnExtensionListsUpdated(
const base::DictionaryValue* prefs) OVERRIDE;
+ // Called when the app pack device setting changes.
+ void AppPackChanged();
+
// Loads the current policy and schedules a cache update.
void LoadPolicy();
@@ -105,6 +103,9 @@ class AppPackUpdater : public content::NotificationObserver,
// Extension cache.
chromeos::ExternalCache external_cache_;
+ scoped_ptr<chromeos::CrosSettings::ObserverSubscription>
+ app_pack_subscription_;
+
DISALLOW_COPY_AND_ASSIGN(AppPackUpdater);
};
« no previous file with comments | « chrome/browser/chromeos/login/wallpaper_manager.cc ('k') | chrome/browser/chromeos/policy/app_pack_updater.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698