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

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

Issue 398083002: Add "UninstallReason" parameter to ExtensionRegistryObserver::OnExtensionUninstalled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix header file. Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_H_ 5 #ifndef EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_
6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ 6 #define EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "components/keyed_service/core/keyed_service.h" 13 #include "components/keyed_service/core/keyed_service.h"
14 #include "extensions/browser/uninstall_reason.h"
14 #include "extensions/common/extension_set.h" 15 #include "extensions/common/extension_set.h"
15 16
16 namespace content { 17 namespace content {
17 class BrowserContext; 18 class BrowserContext;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
21 class Extension; 22 class Extension;
22 class ExtensionRegistryObserver; 23 class ExtensionRegistryObserver;
23 24
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool from_ephemeral, 87 bool from_ephemeral,
87 const std::string& old_name); 88 const std::string& old_name);
88 89
89 // Invokes the observer method OnExtensionInstalled(). The extension must be 90 // Invokes the observer method OnExtensionInstalled(). The extension must be
90 // contained in one of the registry's extension sets. 91 // contained in one of the registry's extension sets.
91 void TriggerOnInstalled(const Extension* extension, 92 void TriggerOnInstalled(const Extension* extension,
92 bool is_update); 93 bool is_update);
93 94
94 // Invokes the observer method OnExtensionUninstalled(). The extension must 95 // Invokes the observer method OnExtensionUninstalled(). The extension must
95 // not be any installed extension with |extension|'s ID. 96 // not be any installed extension with |extension|'s ID.
96 void TriggerOnUninstalled(const Extension* extension); 97 void TriggerOnUninstalled(const Extension* extension, UninstallReason reason);
97 98
98 // Find an extension by ID using |include_mask| to pick the sets to search: 99 // Find an extension by ID using |include_mask| to pick the sets to search:
99 // * enabled_extensions() --> ExtensionRegistry::ENABLED 100 // * enabled_extensions() --> ExtensionRegistry::ENABLED
100 // * disabled_extensions() --> ExtensionRegistry::DISABLED 101 // * disabled_extensions() --> ExtensionRegistry::DISABLED
101 // * terminated_extensions() --> ExtensionRegistry::TERMINATED 102 // * terminated_extensions() --> ExtensionRegistry::TERMINATED
102 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED 103 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED
103 // Returns NULL if the extension is not found in the selected sets. 104 // Returns NULL if the extension is not found in the selected sets.
104 const Extension* GetExtensionById(const std::string& id, 105 const Extension* GetExtensionById(const std::string& id,
105 int include_mask) const; 106 int include_mask) const;
106 107
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 ObserverList<ExtensionRegistryObserver> observers_; 161 ObserverList<ExtensionRegistryObserver> observers_;
161 162
162 content::BrowserContext* const browser_context_; 163 content::BrowserContext* const browser_context_;
163 164
164 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); 165 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry);
165 }; 166 };
166 167
167 } // namespace extensions 168 } // namespace extensions
168 169
169 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ 170 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/app_launcher_handler.cc ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698