| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ |
| 6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Return a FileStream if successful. | 40 // Return a FileStream if successful. |
| 41 CONTENT_EXPORT net::FileStream* CreateFileStreamForDrop(FilePath* file_path); | 41 CONTENT_EXPORT net::FileStream* CreateFileStreamForDrop(FilePath* file_path); |
| 42 | 42 |
| 43 // Implementation of DownloadFileObserver to finalize the download process. | 43 // Implementation of DownloadFileObserver to finalize the download process. |
| 44 class CONTENT_EXPORT PromiseFileFinalizer : public ui::DownloadFileObserver { | 44 class CONTENT_EXPORT PromiseFileFinalizer : public ui::DownloadFileObserver { |
| 45 public: | 45 public: |
| 46 explicit PromiseFileFinalizer(DragDownloadFile* drag_file_downloader); | 46 explicit PromiseFileFinalizer(DragDownloadFile* drag_file_downloader); |
| 47 virtual ~PromiseFileFinalizer(); | 47 virtual ~PromiseFileFinalizer(); |
| 48 | 48 |
| 49 // DownloadFileObserver methods. | 49 // DownloadFileObserver methods. |
| 50 virtual void OnDownloadCompleted(const FilePath& file_path); | 50 virtual void OnDownloadCompleted(const FilePath& file_path) OVERRIDE; |
| 51 virtual void OnDownloadAborted(); | 51 virtual void OnDownloadAborted() OVERRIDE; |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 void Cleanup(); | 54 void Cleanup(); |
| 55 | 55 |
| 56 scoped_refptr<DragDownloadFile> drag_file_downloader_; | 56 scoped_refptr<DragDownloadFile> drag_file_downloader_; |
| 57 | 57 |
| 58 DISALLOW_COPY_AND_ASSIGN(PromiseFileFinalizer); | 58 DISALLOW_COPY_AND_ASSIGN(PromiseFileFinalizer); |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace drag_download_util | 61 } // namespace drag_download_util |
| 62 | 62 |
| 63 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ | 63 #endif // CONTENT_BROWSER_DOWNLOAD_DRAG_DOWNLOAD_UTIL_H_ |
| OLD | NEW |