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

Side by Side Diff: content/browser/download/download_file_impl.h

Issue 11150027: Handle the case where IAttachmentExecute::Save() deletes a downloaded file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_DOWNLOAD_FILE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
7 7
8 #include "content/browser/download/download_file.h" 8 #include "content/browser/download/download_file.h"
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 scoped_ptr<content::PowerSaveBlocker> power_save_blocker, 48 scoped_ptr<content::PowerSaveBlocker> power_save_blocker,
49 base::WeakPtr<content::DownloadDestinationObserver> observer); 49 base::WeakPtr<content::DownloadDestinationObserver> observer);
50 50
51 virtual ~DownloadFileImpl(); 51 virtual ~DownloadFileImpl();
52 52
53 // DownloadFile functions. 53 // DownloadFile functions.
54 virtual void Initialize(const InitializeCallback& callback) OVERRIDE; 54 virtual void Initialize(const InitializeCallback& callback) OVERRIDE;
55 virtual void Rename(const FilePath& full_path, 55 virtual void Rename(const FilePath& full_path,
56 bool overwrite_existing_file, 56 bool overwrite_existing_file,
57 const RenameCompletionCallback& callback) OVERRIDE; 57 const RenameCompletionCallback& callback) OVERRIDE;
58 virtual void Detach(base::Closure callback) OVERRIDE; 58 virtual void Detach(const DetachCompletionCallback& callback) OVERRIDE;
59 virtual void Cancel() OVERRIDE; 59 virtual void Cancel() OVERRIDE;
60 virtual void AnnotateWithSourceInformation() OVERRIDE;
61 virtual FilePath FullPath() const OVERRIDE; 60 virtual FilePath FullPath() const OVERRIDE;
62 virtual bool InProgress() const OVERRIDE; 61 virtual bool InProgress() const OVERRIDE;
63 virtual int64 BytesSoFar() const OVERRIDE; 62 virtual int64 BytesSoFar() const OVERRIDE;
64 virtual int64 CurrentSpeed() const OVERRIDE; 63 virtual int64 CurrentSpeed() const OVERRIDE;
65 virtual bool GetHash(std::string* hash) OVERRIDE; 64 virtual bool GetHash(std::string* hash) OVERRIDE;
66 virtual std::string GetHashState() OVERRIDE; 65 virtual std::string GetHashState() OVERRIDE;
67 66
68 protected: 67 protected:
69 // For test class overrides. 68 // For test class overrides.
70 virtual content::DownloadInterruptReason AppendDataToFile( 69 virtual content::DownloadInterruptReason AppendDataToFile(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 103
105 base::WeakPtrFactory<DownloadFileImpl> weak_factory_; 104 base::WeakPtrFactory<DownloadFileImpl> weak_factory_;
106 105
107 // RAII handle to keep the system from sleeping while we're downloading. 106 // RAII handle to keep the system from sleeping while we're downloading.
108 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_; 107 scoped_ptr<content::PowerSaveBlocker> power_save_blocker_;
109 108
110 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl); 109 DISALLOW_COPY_AND_ASSIGN(DownloadFileImpl);
111 }; 110 };
112 111
113 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_ 112 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_FILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698