Index: chrome/browser/extensions/extension_service.cc |
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
index f17b67b981e42548028cce69dd871dd9fdc1b444..03e6a9c3343386f6cc852ebdc4a56d3ab47c6cbc 100644 |
--- a/chrome/browser/extensions/extension_service.cc |
+++ b/chrome/browser/extensions/extension_service.cc |
@@ -230,6 +230,15 @@ bool ExtensionService::OnExternalExtensionUpdateUrlFound( |
return true; |
} |
+void ExtensionService::ReloadExtension(const std::string& extension_id) { |
Devlin
2014/07/09 19:53:17
In theory, methods should be defined in the .cc fi
gpdavis
2014/07/09 21:16:25
Done.
|
+ ReloadExtensionImpl(extension_id, true /* be_noisy */); |
+} |
+ |
+void ExtensionService::ReloadExtensionWithQuietFailure( |
+ const std::string& extension_id) { |
+ ReloadExtensionImpl(extension_id, false /* be_noisy */); |
+} |
+ |
// static |
// This function is used to uninstall an extension via sync. The LOG statements |
// within this function are used to inform the user if the uninstall cannot be |
@@ -596,10 +605,11 @@ bool ExtensionService::UpdateExtension(const std::string& id, |
#endif |
} |
-void ExtensionService::ReloadExtension( |
+void ExtensionService::ReloadExtensionImpl( |
Devlin
2014/07/09 19:53:17
We can make an exception for the method definition
gpdavis
2014/07/09 21:16:25
Done.
|
// "transient" because the process of reloading may cause the reference |
// to become invalid. Instead, use |extension_id|, a copy. |
- const std::string& transient_extension_id) { |
+ const std::string& transient_extension_id, |
+ bool be_noisy) { |
#if defined(ENABLE_EXTENSIONS) |
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -683,7 +693,10 @@ void ExtensionService::ReloadExtension( |
// We should always be able to remember the extension's path. If it's not in |
// the map, someone failed to update |unloaded_extension_paths_|. |
CHECK(!path.empty()); |
- extensions::UnpackedInstaller::Create(this)->Load(path); |
+ scoped_refptr<extensions::UnpackedInstaller> unpacked_installer = |
+ extensions::UnpackedInstaller::Create(this); |
+ unpacked_installer->set_be_noisy_on_failure(be_noisy); |
+ unpacked_installer->Load(path); |
} |
// When reloading is done, mark this extension as done reloading. |
SetBeingReloaded(extension_id, false); |