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

Side by Side Diff: extensions/browser/extension_registry_observer.h

Issue 1497193002: Remove all the ephemeral apps code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review, Devlin review. Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
7 7
8 #include "extensions/browser/uninstall_reason.h" 8 #include "extensions/browser/uninstall_reason.h"
9 #include "extensions/common/extension.h" 9 #include "extensions/common/extension.h"
10 10
(...skipping 27 matching lines...) Expand all
38 // Called after an extension is unloaded. The extension no longer exists in 38 // Called after an extension is unloaded. The extension no longer exists in
39 // the set |ExtensionRegistry::enabled_extensions()|, but it can still be a 39 // the set |ExtensionRegistry::enabled_extensions()|, but it can still be a
40 // member of one of the other sets, like disabled, blacklisted or terminated. 40 // member of one of the other sets, like disabled, blacklisted or terminated.
41 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context, 41 virtual void OnExtensionUnloaded(content::BrowserContext* browser_context,
42 const Extension* extension, 42 const Extension* extension,
43 UnloadedExtensionInfo::Reason reason) {} 43 UnloadedExtensionInfo::Reason reason) {}
44 44
45 // Called when |extension| is about to be installed. |is_update| is true if 45 // Called when |extension| is about to be installed. |is_update| is true if
46 // the installation is the result of it updating, in which case |old_name| is 46 // the installation is the result of it updating, in which case |old_name| is
47 // the name of the extension's previous version. 47 // the name of the extension's previous version.
48 // If true, |from_ephemeral| indicates that the extension was previously
49 // installed ephemerally and has been promoted to a regular installed
50 // extension. |is_update| will be true, although the version has not
51 // necessarily changed.
52 // The ExtensionRegistry will not be tracking |extension| at the time this 48 // The ExtensionRegistry will not be tracking |extension| at the time this
53 // event is fired, but will be immediately afterwards (note: not necessarily 49 // event is fired, but will be immediately afterwards (note: not necessarily
54 // enabled; it might be installed in the disabled or even blacklisted sets, 50 // enabled; it might be installed in the disabled or even blacklisted sets,
55 // for example). 51 // for example).
56 // Note that it's much more common to care about extensions being loaded 52 // Note that it's much more common to care about extensions being loaded
57 // (OnExtensionLoaded). 53 // (OnExtensionLoaded).
58 // 54 //
59 // TODO(tmdiep): We should stash the state of the previous extension version 55 // TODO(tmdiep): We should stash the state of the previous extension version
60 // somewhere and have observers retrieve it. |is_update|, |from_ephemeral| 56 // somewhere and have observers retrieve it. |is_update|, and |old_name| can
61 // and |old_name| can be removed when this is done. 57 // be removed when this is done.
62 virtual void OnExtensionWillBeInstalled( 58 virtual void OnExtensionWillBeInstalled(
63 content::BrowserContext* browser_context, 59 content::BrowserContext* browser_context,
64 const Extension* extension, 60 const Extension* extension,
65 bool is_update, 61 bool is_update,
66 bool from_ephemeral,
67 const std::string& old_name) {} 62 const std::string& old_name) {}
68 63
69 // Called when the installation of |extension| is complete. At this point the 64 // Called when the installation of |extension| is complete. At this point the
70 // extension is tracked in one of the ExtensionRegistry sets, but is not 65 // extension is tracked in one of the ExtensionRegistry sets, but is not
71 // necessarily enabled. 66 // necessarily enabled.
72 virtual void OnExtensionInstalled(content::BrowserContext* browser_context, 67 virtual void OnExtensionInstalled(content::BrowserContext* browser_context,
73 const Extension* extension, 68 const Extension* extension,
74 bool is_update) {} 69 bool is_update) {}
75 70
76 // Called after an extension is uninstalled. The extension no longer exists in 71 // Called after an extension is uninstalled. The extension no longer exists in
77 // any of the ExtensionRegistry sets (enabled, disabled, etc.). 72 // any of the ExtensionRegistry sets (enabled, disabled, etc.).
78 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, 73 virtual void OnExtensionUninstalled(content::BrowserContext* browser_context,
79 const Extension* extension, 74 const Extension* extension,
80 UninstallReason reason) {} 75 UninstallReason reason) {}
81 76
82 // Notifies observers that the observed object is going away. 77 // Notifies observers that the observed object is going away.
83 virtual void OnShutdown(ExtensionRegistry* registry) {} 78 virtual void OnShutdown(ExtensionRegistry* registry) {}
84 }; 79 };
85 80
86 } // namespace extensions 81 } // namespace extensions
87 82
88 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_ 83 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_OBSERVER_H_
OLDNEW
« no previous file with comments | « extensions/browser/extension_registry.cc ('k') | extensions/browser/extension_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698