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

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

Issue 289073008: Add TriggerOnUninstalled to ExtensionRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 years, 7 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"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 UnloadedExtensionInfo::Reason reason); 75 UnloadedExtensionInfo::Reason reason);
76 76
77 // If this is a fresh install then |is_update| is false and there must not be 77 // If this is a fresh install then |is_update| is false and there must not be
78 // any installed extension with |extension|'s ID. If this is an update then 78 // any installed extension with |extension|'s ID. If this is an update then
79 // |is_update| is true and must be an installed extension with |extension|'s 79 // |is_update| is true and must be an installed extension with |extension|'s
80 // ID, and |old_name| must be non-empty. 80 // ID, and |old_name| must be non-empty.
81 void TriggerOnWillBeInstalled(const Extension* extension, 81 void TriggerOnWillBeInstalled(const Extension* extension,
82 bool is_update, 82 bool is_update,
83 const std::string& old_name); 83 const std::string& old_name);
84 84
85 // Invokes the observer method OnExtensionUninstalled(). The extension must
86 // not be any installed extension with |extension|'s ID.
87 void TriggerOnUninstalled(const Extension* extension);
88
85 // Find an extension by ID using |include_mask| to pick the sets to search: 89 // Find an extension by ID using |include_mask| to pick the sets to search:
86 // * enabled_extensions() --> ExtensionRegistry::ENABLED 90 // * enabled_extensions() --> ExtensionRegistry::ENABLED
87 // * disabled_extensions() --> ExtensionRegistry::DISABLED 91 // * disabled_extensions() --> ExtensionRegistry::DISABLED
88 // * terminated_extensions() --> ExtensionRegistry::TERMINATED 92 // * terminated_extensions() --> ExtensionRegistry::TERMINATED
89 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED 93 // * blacklisted_extensions() --> ExtensionRegistry::BLACKLISTED
90 // Returns NULL if the extension is not found in the selected sets. 94 // Returns NULL if the extension is not found in the selected sets.
91 const Extension* GetExtensionById(const std::string& id, 95 const Extension* GetExtensionById(const std::string& id,
92 int include_mask) const; 96 int include_mask) const;
93 97
94 // Adds the specified extension to the enabled set. The registry becomes an 98 // Adds the specified extension to the enabled set. The registry becomes an
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ObserverList<ExtensionRegistryObserver> observers_; 151 ObserverList<ExtensionRegistryObserver> observers_;
148 152
149 content::BrowserContext* const browser_context_; 153 content::BrowserContext* const browser_context_;
150 154
151 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry); 155 DISALLOW_COPY_AND_ASSIGN(ExtensionRegistry);
152 }; 156 };
153 157
154 } // namespace extensions 158 } // namespace extensions
155 159
156 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_ 160 #endif // EXTENSIONS_BROWSER_EXTENSION_REGISTRY_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698