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

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

Issue 252593003: Improve UI for unpacked extensions failing to load (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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.cc
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 4ef84138f36907c2f7e5039dfda2d96aec26c886..ac49c1dfce81fa2e55807059079e5a576445332f 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -2066,35 +2066,18 @@ bool ExtensionService::OnExternalExtensionFileFound(
void ExtensionService::ReportExtensionLoadError(
const base::FilePath& extension_path,
- const std::string &error,
- bool be_noisy) {
+ const std::string &error) {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTENSION_LOAD_ERROR,
content::Source<Profile>(profile_),
content::Details<const std::string>(&error));
std::string path_str = base::UTF16ToUTF8(extension_path.LossyDisplayName());
- bool retry = false;
- std::string retry_prompt;
- if (be_noisy)
- retry_prompt = "\n\nWould you like to retry?";
-
base::string16 message = base::UTF8ToUTF16(
- base::StringPrintf("Could not load extension from '%s'. %s%s",
+ base::StringPrintf("Could not load extension from '%s'. %s",
path_str.c_str(),
- error.c_str(),
- retry_prompt.c_str()));
- ExtensionErrorReporter::GetInstance()->ReportError(message, be_noisy, &retry);
- NotifyLoadRetry(retry, extension_path);
-}
-
-void ExtensionService::NotifyLoadRetry(bool retry,
- const base::FilePath& extension_path) {
- std::pair<bool, const base::FilePath&> details(retry, extension_path);
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_LOAD_RETRY,
- content::Source<Profile>(profile_),
- content::Details<std::pair<bool, const base::FilePath&> >(&details));
+ error.c_str()));
+ ExtensionErrorReporter::GetInstance()->ReportError(message, false);
}
void ExtensionService::DidCreateRenderViewForBackgroundPage(

Powered by Google App Engine
This is Rietveld 408576698