OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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_BACKGROUND_FETCH_FETCH_REQUEST_H_ | |
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_FETCH_REQUEST_H_ | |
7 | |
Peter Beverloo
2017/02/13 18:35:06
nit: <string>
harkness
2017/02/14 13:52:47
Done.
| |
8 #include "content/common/content_export.h" | |
9 #include "url/origin.h" | |
10 | |
11 namespace content { | |
12 | |
13 class DownloadItem; | |
14 | |
15 // Simple class to encapsulate the components of a fetch request. | |
16 class CONTENT_EXPORT FetchRequest { | |
Peter Beverloo
2017/02/13 18:35:06
We're really going to have to think about this cla
harkness
2017/02/14 13:52:47
Yes, how that registration is divided between the
| |
17 public: | |
18 FetchRequest(); | |
19 FetchRequest(const url::Origin& origin, | |
20 const url::Origin& url, | |
Peter Beverloo
2017/02/13 18:35:06
Why is |url| a url::Origin? At the very least it n
harkness
2017/02/14 13:52:47
Good point.
| |
21 const std::string& tag, | |
22 DownloadItem* download_item); | |
23 FetchRequest(const FetchRequest& request); | |
Peter Beverloo
2017/02/13 18:35:06
q: where would we copy instances of this object?
harkness
2017/02/14 13:52:47
map uses it
Peter Beverloo
2017/02/14 15:05:52
Let's add a TODO to get rid of it since the map is
| |
24 ~FetchRequest(); | |
25 | |
26 const std::string& guid() const { return guid_; } | |
27 const url::Origin& origin() const { return origin_; } | |
28 const url::Origin& url() const { return url_; } | |
29 const std::string& tag() const { return tag_; } | |
30 const DownloadItem* download_item() const { return download_item_; } | |
31 | |
32 private: | |
33 std::string guid_; | |
34 url::Origin origin_; | |
35 url::Origin url_; | |
36 std::string tag_; | |
37 DownloadItem* download_item_; | |
Peter Beverloo
2017/02/13 18:35:06
nit: document what the ownership model is
harkness
2017/02/14 13:52:46
I removed this, since I don't need DownloadItems u
| |
38 }; | |
39 | |
40 } // namespace content | |
41 | |
42 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_FETCH_REQUEST_H_ | |
OLD | NEW |