Added condition that checks if ephemeral user has GAIA account (not a public session...
[chromium-blink-merge.git] / extensions / browser / extension_prefs_observer.h
blobc127979a002f8f6685c687108e683241c1fffa18
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_
8 #include <string>
10 #include "base/time/time.h"
12 namespace extensions {
14 class ExtensionPrefs;
16 class ExtensionPrefsObserver {
17 public:
18 // Called when the reasons for an extension being disabled have changed.
19 // This is *not* called when the disable reasons change due to the extension
20 // being enabled/disabled.
21 virtual void OnExtensionDisableReasonsChanged(const std::string& extension_id,
22 int disabled_reasons) {}
24 // Called when an extension is registered with ExtensionPrefs.
25 virtual void OnExtensionRegistered(const std::string& extension_id,
26 const base::Time& install_time,
27 bool is_enabled) {}
29 // Called when an extension's prefs have been loaded.
30 virtual void OnExtensionPrefsLoaded(const std::string& extension_id,
31 const ExtensionPrefs* prefs) {}
33 // Called when an extension's prefs are deleted.
34 virtual void OnExtensionPrefsDeleted(const std::string& extension_id) {}
36 // Called when an extension's enabled state pref is changed.
37 // Note: This does not necessarily correspond to the extension being loaded/
38 // unloaded. For that, observe the ExtensionRegistry, and reconcile that the
39 // events might not match up.
40 virtual void OnExtensionStateChanged(const std::string& extension_id,
41 bool state) {}
44 } // namespace extensions
46 #endif // EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_