summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_service.cc
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 22:44:33 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-26 22:44:33 +0000
commit500c7bb138ff686dfd395d70f09e4c990b0b69f4 (patch)
treedbe42a54643000eb8e2abe97b6639fba12467bfb /chrome/browser/extensions/extension_service.cc
parent58de77d09564a43ae1934e2cee4543bc028c25c6 (diff)
downloadchromium_src-500c7bb138ff686dfd395d70f09e4c990b0b69f4.zip
chromium_src-500c7bb138ff686dfd395d70f09e4c990b0b69f4.tar.gz
chromium_src-500c7bb138ff686dfd395d70f09e4c990b0b69f4.tar.bz2
Improve UI for unpacked extensions failing to load.
TBR=jochen@chromium.org for chrome/browser/chrome_notification_types.h (*removing* a notification type). BUG=358710 Review URL: https://codereview.chromium.org/252593003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266395 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_service.cc')
-rw-r--r--chrome/browser/extensions/extension_service.cc25
1 files changed, 4 insertions, 21 deletions
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 4ef8413..ac49c1d 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(