Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / download / chrome_download_manager_delegate.h
index ff89300..d3eee8f 100644 (file)
@@ -34,17 +34,6 @@ namespace user_prefs {
 class PrefRegistrySyncable;
 }
 
-#if defined(COMPILER_GCC) && defined(ENABLE_EXTENSIONS)
-namespace BASE_HASH_NAMESPACE {
-template<>
-struct hash<extensions::CrxInstaller*> {
-  std::size_t operator()(extensions::CrxInstaller* const& p) const {
-    return reinterpret_cast<std::size_t>(p);
-  }
-};
-}  // namespace BASE_HASH_NAMESPACE
-#endif
-
 // This is the Chrome side helper for the download system.
 class ChromeDownloadManagerDelegate
     : public content::DownloadManagerDelegate,
@@ -52,7 +41,7 @@ class ChromeDownloadManagerDelegate
       public DownloadTargetDeterminerDelegate {
  public:
   explicit ChromeDownloadManagerDelegate(Profile* profile);
-  virtual ~ChromeDownloadManagerDelegate();
+  ~ChromeDownloadManagerDelegate() override;
 
   // Should be called before the first call to ShouldCompleteDownload() to
   // disable SafeBrowsing checks for |item|.
@@ -65,36 +54,34 @@ class ChromeDownloadManagerDelegate
   content::DownloadIdCallback GetDownloadIdReceiverCallback();
 
   // content::DownloadManagerDelegate
-  virtual void Shutdown() OVERRIDE;
-  virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE;
-  virtual bool DetermineDownloadTarget(
+  void Shutdown() override;
+  void GetNextId(const content::DownloadIdCallback& callback) override;
+  bool DetermineDownloadTarget(
       content::DownloadItem* item,
-      const content::DownloadTargetCallback& callback) OVERRIDE;
-  virtual bool ShouldOpenFileBasedOnExtension(
-      const base::FilePath& path) OVERRIDE;
-  virtual bool ShouldCompleteDownload(
+      const content::DownloadTargetCallback& callback) override;
+  bool ShouldOpenFileBasedOnExtension(const base::FilePath& path) override;
+  bool ShouldCompleteDownload(content::DownloadItem* item,
+                              const base::Closure& complete_callback) override;
+  bool ShouldOpenDownload(
       content::DownloadItem* item,
-      const base::Closure& complete_callback) OVERRIDE;
-  virtual bool ShouldOpenDownload(
-      content::DownloadItem* item,
-      const content::DownloadOpenDelayedCallback& callback) OVERRIDE;
-  virtual bool GenerateFileHash() OVERRIDE;
-  virtual void GetSaveDir(content::BrowserContext* browser_context,
-                          base::FilePath* website_save_dir,
-                          base::FilePath* download_save_dir,
-                          bool* skip_dir_check) OVERRIDE;
-  virtual void ChooseSavePath(
+      const content::DownloadOpenDelayedCallback& callback) override;
+  bool GenerateFileHash() override;
+  void GetSaveDir(content::BrowserContext* browser_context,
+                  base::FilePath* website_save_dir,
+                  base::FilePath* download_save_dir,
+                  bool* skip_dir_check) override;
+  void ChooseSavePath(
       content::WebContents* web_contents,
       const base::FilePath& suggested_path,
       const base::FilePath::StringType& default_extension,
       bool can_save_as_complete,
-      const content::SavePackagePathPickedCallback& callback) OVERRIDE;
-  virtual void OpenDownload(content::DownloadItem* download) OVERRIDE;
-  virtual void ShowDownloadInShell(content::DownloadItem* download) OVERRIDE;
-  virtual void CheckForFileExistence(
+      const content::SavePackagePathPickedCallback& callback) override;
+  void OpenDownload(content::DownloadItem* download) override;
+  void ShowDownloadInShell(content::DownloadItem* download) override;
+  void CheckForFileExistence(
       content::DownloadItem* download,
-      const content::CheckForFileExistenceCallback& callback) OVERRIDE;
-  virtual std::string ApplicationClientIdForFileScanning() const OVERRIDE;
+      const content::CheckForFileExistenceCallback& callback) override;
+  std::string ApplicationClientIdForFileScanning() const override;
 
   // Opens a download using the platform handler. DownloadItem::OpenDownload,
   // which ends up being handled by OpenDownload(), will open a download in the
@@ -112,31 +99,26 @@ class ChromeDownloadManagerDelegate
       GetDownloadProtectionService();
 
   // DownloadTargetDeterminerDelegate. Protected for testing.
-  virtual void NotifyExtensions(
-      content::DownloadItem* download,
-      const base::FilePath& suggested_virtual_path,
-      const NotifyExtensionsCallback& callback) OVERRIDE;
-  virtual void ReserveVirtualPath(
+  void NotifyExtensions(content::DownloadItem* download,
+                        const base::FilePath& suggested_virtual_path,
+                        const NotifyExtensionsCallback& callback) override;
+  void ReserveVirtualPath(
       content::DownloadItem* download,
       const base::FilePath& virtual_path,
       bool create_directory,
       DownloadPathReservationTracker::FilenameConflictAction conflict_action,
-      const ReservedPathCallback& callback) OVERRIDE;
-  virtual void PromptUserForDownloadPath(
-      content::DownloadItem* download,
-      const base::FilePath& suggested_virtual_path,
-      const FileSelectedCallback& callback) OVERRIDE;
-  virtual void DetermineLocalPath(
-      content::DownloadItem* download,
-      const base::FilePath& virtual_path,
-      const LocalPathCallback& callback) OVERRIDE;
-  virtual void CheckDownloadUrl(
-      content::DownloadItem* download,
-      const base::FilePath& suggested_virtual_path,
-      const CheckDownloadUrlCallback& callback) OVERRIDE;
-  virtual void GetFileMimeType(
-      const base::FilePath& path,
-      const GetFileMimeTypeCallback& callback) OVERRIDE;
+      const ReservedPathCallback& callback) override;
+  void PromptUserForDownloadPath(content::DownloadItem* download,
+                                 const base::FilePath& suggested_virtual_path,
+                                 const FileSelectedCallback& callback) override;
+  void DetermineLocalPath(content::DownloadItem* download,
+                          const base::FilePath& virtual_path,
+                          const LocalPathCallback& callback) override;
+  void CheckDownloadUrl(content::DownloadItem* download,
+                        const base::FilePath& suggested_virtual_path,
+                        const CheckDownloadUrlCallback& callback) override;
+  void GetFileMimeType(const base::FilePath& path,
+                       const GetFileMimeTypeCallback& callback) override;
 
  private:
   friend class base::RefCountedThreadSafe<ChromeDownloadManagerDelegate>;
@@ -144,9 +126,9 @@ class ChromeDownloadManagerDelegate
   typedef std::vector<content::DownloadIdCallback> IdCallbackVector;
 
   // content::NotificationObserver implementation.
-  virtual void Observe(int type,
-                       const content::NotificationSource& source,
-                       const content::NotificationDetails& details) OVERRIDE;
+  void Observe(int type,
+               const content::NotificationSource& source,
+               const content::NotificationDetails& details) override;
 
   // Callback function after the DownloadProtectionService completes.
   void CheckClientDownloadDone(