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

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

Issue 2708943002: Create the BackgroundFetchBatchManager and initiate a download. (Closed)
Patch Set: Integrated code review comments and added BackgroundFetchDataManager::BatchData which feeds FetchRe… 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 #include "content/browser/background_fetch/fetch_request.h" 5 #include "content/browser/background_fetch/fetch_request.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/guid.h" 9 #include "base/guid.h"
10 #include "content/public/browser/download_item.h" 10 #include "content/public/browser/download_item.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 FetchRequest::FetchRequest() = default; 14 FetchRequest::FetchRequest() = default;
15 15
16 FetchRequest::FetchRequest(const url::Origin& origin, 16 FetchRequest::FetchRequest(const GURL& url, const std::string& tag)
17 const GURL& url, 17 : guid_(base::GenerateGUID()), url_(url), tag_(tag) {}
18 int64_t service_worker_registration_id,
19 const std::string& tag)
20 : guid_(base::GenerateGUID()),
21 origin_(origin),
22 url_(url),
23 service_worker_registration_id_(service_worker_registration_id),
24 tag_(tag) {}
25 18
26 FetchRequest::FetchRequest(const FetchRequest& request) 19 FetchRequest::FetchRequest(const FetchRequest& request)
27 : guid_(request.guid_), 20 : guid_(request.guid_),
28 origin_(request.origin_),
29 url_(request.url_), 21 url_(request.url_),
30 service_worker_registration_id_(request.service_worker_registration_id()),
31 tag_(request.tag_) {} 22 tag_(request.tag_) {}
32 23
33 FetchRequest::~FetchRequest() = default; 24 FetchRequest::~FetchRequest() = default;
34 25
35 } // namespace content 26 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698