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

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

Issue 2964503003: Move NetworkService mojom files to content/public/common. (Closed)
Patch Set: Merge Created 3 years, 5 months 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
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/public/common/url_loader_factory.mojom.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // DownloadedTempFileImpl is created on the download_to_file mode of resource 14 // 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 15 // loading. The instance is held by the client and lives until the client
16 // destroys the interface, slightly after the URLLoader is destroyed. 16 // destroys the interface, slightly after the URLLoader is destroyed.
17 class CONTENT_EXPORT DownloadedTempFileImpl final 17 class CONTENT_EXPORT DownloadedTempFileImpl final
18 : public mojom::DownloadedTempFile { 18 : public mojom::DownloadedTempFile {
19 public: 19 public:
20 // Creates a DownloadedTempFileImpl, binds it as a strong interface, and 20 // Creates a DownloadedTempFileImpl, binds it as a strong interface, and
21 // returns the interface ptr to be passed to the client. 21 // returns the interface ptr to be passed to the client.
22 // That means: 22 // That means:
23 // * The DownloadedTempFile object created here is essentially owned by the 23 // * The DownloadedTempFile object created here is essentially owned by the
24 // client. It keeps alive until the client destroys the other endpoint. 24 // client. It keeps alive until the client destroys the other endpoint.
25 static mojom::DownloadedTempFilePtr Create(int child_id, int request_id); 25 static mojom::DownloadedTempFilePtr Create(int child_id, int request_id);
26 26
27 DownloadedTempFileImpl(int child_id, int request_id); 27 DownloadedTempFileImpl(int child_id, int request_id);
28 ~DownloadedTempFileImpl() override; 28 ~DownloadedTempFileImpl() override;
29 29
30 private: 30 private:
31 const int child_id_; 31 const int child_id_;
32 const int request_id_; 32 const int request_id_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl); 34 DISALLOW_COPY_AND_ASSIGN(DownloadedTempFileImpl);
35 }; 35 };
36 36
37 } // namespace content 37 } // namespace content
38 38
39 #endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_ 39 #endif // CONTENT_BROWSER_LOADER_DOWNLOADED_TEMP_FILE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698