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

Side by Side Diff: content/browser/loader/downloaded_temp_file_impl.h

Issue 2503813002: Fix and refactor downloaded file handling in the loading stack (Closed)
Patch Set: revert an unrelated change Created 4 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
7
8 #include "base/files/file_path.h"
9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h"
11 #include "content/common/content_export.h"
12 #include "content/common/url_loader_factory.mojom.h"
13 #include "mojo/public/cpp/bindings/binding.h"
14
15 namespace storage {
16 class ShareableFileReference;
17 }
18
19 namespace content {
20
21 class ResourceDispatcherHostImpl;
22
23 class CONTENT_EXPORT DownloadedTempFileImpl final
mmenke 2016/11/15 15:59:05 Docs?
tzik 2016/11/16 09:14:56 Done.
24 : public mojom::DownloadedTempFile {
25 public:
26 DownloadedTempFileImpl(ResourceDispatcherHostImpl* rdh,
27 int child_id,
28 int request_id,
29 const base::FilePath& path);
30 ~DownloadedTempFileImpl() override;
31
32 // mojo::DownloadedTempFile implementation.
33 void Release() override;
34
35 mojo::InterfacePtr<mojom::DownloadedTempFile> CreateInterfacePtrAndBind();
36
37 int child_id() const { return child_id_; }
38 int request_id() const { return request_id_; }
39 const base::FilePath& path() const { return path_; }
yhirano 2016/11/15 13:15:26 Not used
tzik 2016/11/16 09:14:56 Done.
40 const scoped_refptr<storage::ShareableFileReference>& reference() const {
41 return reference_;
42 }
43
44 private:
45 mojo::Binding<DownloadedTempFile> binding_;
46
47 ResourceDispatcherHostImpl* rdh_;
48 int child_id_;
49 int request_id_;
50 base::FilePath path_;
yhirano 2016/11/15 13:15:26 ditto
tzik 2016/11/16 09:14:56 Done.
51
52 scoped_refptr<storage::ShareableFileReference> reference_;
53
54 DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl);
55 };
56
57 } // namespace content
58
59 #endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698