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

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

Issue 22612003: Warn when extensions suggest conflicting download filenames (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: @r216682 Created 7 years, 4 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_warning_set.h
diff --git a/chrome/browser/extensions/extension_warning_set.h b/chrome/browser/extensions/extension_warning_set.h
index c0510f167f09d44744c746ba26627d7d6fa02a01..9e00823f86d81c6d7d0be7353d1ad34066b1b017 100644
--- a/chrome/browser/extensions/extension_warning_set.h
+++ b/chrome/browser/extensions/extension_warning_set.h
@@ -13,6 +13,10 @@
// TODO(battre) Remove the Extension prefix.
+namespace base {
+class FilePath;
+}
+
class ExtensionSet;
namespace extensions {
@@ -37,6 +41,9 @@ class ExtensionWarning {
// The extension repeatedly flushed WebKit's in-memory cache, which slows
// down the overall performance.
kRepeatedCacheFlushes,
+ // The extension failed to determine the filename of a download because
+ // another extension with higher precedence determined a different filename.
+ kDownloadFilenameConflict,
kMaxWarningType
};
@@ -69,6 +76,11 @@ class ExtensionWarning {
const std::string& winning_extension_id);
static ExtensionWarning CreateRepeatedCacheFlushesWarning(
const std::string& extension_id);
+ static ExtensionWarning CreateDownloadFilenameConflictWarning(
+ const std::string& losing_extension_id,
+ const std::string& winning_extension_id,
+ const base::FilePath& losing_filename,
+ const base::FilePath& winning_filename);
// Returns the specific warning type.
WarningType warning_type() const { return type_; }

Powered by Google App Engine
This is Rietveld 408576698