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

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

Issue 2708943002: Create the BackgroundFetchBatchManager and initiate a download. (Closed)
Patch Set: Moved JobData into a stand-alone class and renamed to BackgroundFetchJobData Created 3 years, 9 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_BACKGROUND_FETCH_JOB_INFO_H
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_JOB_INFO_H
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "content/common/content_export.h"
13 #include "content/common/service_worker/service_worker_types.h"
14 #include "url/origin.h"
15
16 namespace content {
17
18 // Class to encapsulate a batch of FetchRequests into a single grouping which is
19 // what the developer requested.
20 class CONTENT_EXPORT BackgroundFetchJobInfo {
21 public:
22 BackgroundFetchJobInfo();
Peter Beverloo 2017/02/28 03:32:54 This constructor is unused, delete it?
harkness 2017/02/28 11:31:08 Done.
23 BackgroundFetchJobInfo(const std::string& tag,
24 const url::Origin& origin,
25 int64_t service_worker_registration_id);
26 ~BackgroundFetchJobInfo();
27
28 const std::string& guid() const { return guid_; }
29 const std::string& tag() const { return tag_; }
30 const url::Origin& origin() const { return origin_; }
31 int64_t service_worker_registration_id() const {
32 return service_worker_registration_id_;
33 }
34
35 const std::vector<std::string>& request_guids() const {
36 return request_guids_;
37 }
38
39 private:
40 std::string guid_;
41 std::string tag_;
42 url::Origin origin_;
43 int64_t service_worker_registration_id_ = kInvalidServiceWorkerRegistrationId;
44 std::vector<std::string> request_guids_;
45
46 // TODO(harkness): Other things this class should track: estimated download
47 // size, current download size, total number of files, number of complete
48 // files, (possibly) data to show the notification, (possibly) list of in
49 // progress FetchRequests.
50
51 DISALLOW_COPY(BackgroundFetchJobInfo);
Peter Beverloo 2017/02/28 03:32:54 why not DISALLOW_COPY_AND_ASSIGN?
harkness 2017/02/28 11:31:08 Done.
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_JOB_INFO_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698