Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ | 6 #define CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/common/url_loader_factory.mojom.h" | 10 #include "content/common/url_loader_factory.mojom.h" |
| 11 | 11 |
| 12 namespace mojo { | |
| 13 class AssociatedGroup; | |
| 14 } | |
| 15 | |
| 12 namespace content { | 16 namespace content { |
| 13 | 17 |
| 14 // DownloadedTempFileImpl is created on the download_to_file mode of resource | 18 // DownloadedTempFileImpl is created on the download_to_file mode of resource |
| 15 // loading. The instance is held by the client and lives until the client | 19 // loading. The instance is held by the client and lives until the client |
| 16 // destroys the interface, slightly after the URLLoader is destroyed. | 20 // destroys the interface, slightly after the URLLoader is destroyed. |
| 17 class CONTENT_EXPORT DownloadedTempFileImpl final | 21 class CONTENT_EXPORT DownloadedTempFileImpl final |
| 18 : public mojom::DownloadedTempFile { | 22 : public mojom::DownloadedTempFile { |
| 19 public: | 23 public: |
| 20 static mojo::InterfacePtr<mojom::DownloadedTempFile> Create(int child_id, | 24 static mojom::DownloadedTempFileAssociatedPtrInfo |
| 21 int request_id); | 25 Create(mojo::AssociatedGroup* associated_group, int child_id, int request_id); |
| 26 static mojom::DownloadedTempFilePtr CreateForTesting(int child_id, | |
| 27 int request_id); | |
|
mmenke
2016/12/13 20:24:06
Please put a line break between these two methods.
tzik
2016/12/14 07:08:29
Done.
| |
| 22 | 28 |
| 23 DownloadedTempFileImpl(int child_id, int request_id); | 29 DownloadedTempFileImpl(int child_id, int request_id); |
| 24 ~DownloadedTempFileImpl() override; | 30 ~DownloadedTempFileImpl() override; |
| 25 | 31 |
| 26 private: | 32 private: |
| 27 int child_id_; | 33 int child_id_; |
| 28 int request_id_; | 34 int request_id_; |
| 29 | 35 |
| 30 DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl); | 36 DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl); |
| 31 }; | 37 }; |
| 32 | 38 |
| 33 } // namespace content | 39 } // namespace content |
| 34 | 40 |
| 35 #endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ | 41 #endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ |
| OLD | NEW |