| Index: chrome/browser/extensions/api/downloads/downloads_api.h
|
| diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h
|
| index a6fda46a07de3433650ce90f29f80a300a6cd3cb..e7db6d0f899b2313c3ecbd664be080c8af104b8e 100644
|
| --- a/chrome/browser/extensions/api/downloads/downloads_api.h
|
| +++ b/chrome/browser/extensions/api/downloads/downloads_api.h
|
| @@ -17,6 +17,7 @@
|
| #include "chrome/browser/download/download_path_reservation_tracker.h"
|
| #include "chrome/browser/extensions/event_router.h"
|
| #include "chrome/browser/extensions/extension_function.h"
|
| +#include "chrome/browser/extensions/extension_warning_set.h"
|
| #include "chrome/common/extensions/api/downloads.h"
|
| #include "content/public/browser/download_item.h"
|
| #include "content/public/browser/download_manager.h"
|
| @@ -298,6 +299,21 @@ class ExtensionDownloadsEventRouter : public extensions::EventRouter::Observer,
|
| DownloadPathReservationTracker::FilenameConflictAction)>
|
| FilenameChangedCallback;
|
|
|
| + // The logic for how to handle conflicting filename suggestions from multiple
|
| + // extensions is split out here for testing.
|
| + static void DetermineFilenameInternal(
|
| + const base::FilePath& filename,
|
| + extensions::api::downloads::FilenameConflictAction conflict_action,
|
| + const std::string& suggesting_extension_id,
|
| + const base::Time& suggesting_install_time,
|
| + const std::string& incumbent_extension_id,
|
| + const base::Time& incumbent_install_time,
|
| + std::string* winner_extension_id,
|
| + base::FilePath* determined_filename,
|
| + extensions::api::downloads::FilenameConflictAction*
|
| + determined_conflict_action,
|
| + extensions::ExtensionWarningSet* warnings);
|
| +
|
| // A downloads.onDeterminingFilename listener has returned. If the extension
|
| // wishes to override the download's filename, then |filename| will be
|
| // non-empty. |filename| will be interpreted as a relative path, appended to
|
|
|