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

Unified Diff: chrome/browser/extensions/extension_service.h

Issue 342003005: Show alert failure for reloading unpacked extensions with bad manifest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added ReloadExtensionImpl, enhanced loader handler to send ListValue of failures Created 6 years, 6 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/extensions/extension_service.h
diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
index 943e3e379605fd5b47114c3c38d0a469770c50f3..7b6ec945d70f945d52534e3d8a74ed188afe3b4a 100644
--- a/chrome/browser/extensions/extension_service.h
+++ b/chrome/browser/extensions/extension_service.h
@@ -237,7 +237,15 @@ class ExtensionService
// Reloads the specified extension, sending the onLaunched() event to it if it
// currently has any window showing.
- void ReloadExtension(const std::string& extension_id);
+ // Public method for ReloadExtensionImpl. Allows noisy failures.
Devlin 2014/07/07 20:44:21 No point in saying "Public method for x". Just sa
gpdavis 2014/07/09 01:35:56 Done.
+ void ReloadExtension(const std::string& extension_id) {
+ ReloadExtensionImpl(extension_id, true /* be_noisy */);
Devlin 2014/07/07 20:44:21 These calls should actually be in the .cc file.
gpdavis 2014/07/09 01:35:56 Done.
+ }
+
+ // Public method for ReloadExtensionImpl. Suppresses noisy failures.
+ void ReloadExtensionWithQuietFailure(const std::string& extension_id) {
+ ReloadExtensionImpl(extension_id, false /* be_noisy */);
+ }
// Uninstalls the specified extension. Callers should only call this method
// with extensions that exist. |external_uninstall| is a magical parameter
@@ -442,6 +450,11 @@ class ExtensionService
private:
+ // Reloads the specified extension, sending the onLaunched() event to it if it
+ // currently has any window showing. |be_noisy| determines whether noisy
+ // failures are allowed for unpacked extension installs.
+ void ReloadExtensionImpl(const std::string& extension_id, bool be_noisy);
+
// content::NotificationObserver implementation:
virtual void Observe(int type,
const content::NotificationSource& source,

Powered by Google App Engine
This is Rietveld 408576698