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

Side by Side Diff: content/browser/background_fetch/fetch_request.h

Issue 2678273003: Initial framework setup and skeleton for BackgroundFetchContext (Closed)
Patch Set: Remove BackgroundFetchDownloadObserver until it's used. Created 3 years, 10 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698