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

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

Issue 2805813006: Set the Content-Type and Content-Length headers for BG Fetch (Closed)
Patch Set: Set the Content-Type and Content-Length headers for BG Fetch Created 3 years, 8 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 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_ 5 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_
6 #define CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_ 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Returns the absolute path to the file in which the response is stored. 54 // Returns the absolute path to the file in which the response is stored.
55 const base::FilePath& GetFilePath() const; 55 const base::FilePath& GetFilePath() const;
56 56
57 // Returns the size of the file containing the response, in bytes. 57 // Returns the size of the file containing the response, in bytes.
58 int64_t GetFileSize() const; 58 int64_t GetFileSize() const;
59 59
60 // Returns the time at which the response was completed. 60 // Returns the time at which the response was completed.
61 const base::Time& GetResponseTime() const; 61 const base::Time& GetResponseTime() const;
62 62
63 // Returns the mime type describing the response, as indicated by the server.
64 const std::string& GetResponseType() const;
65
63 private: 66 private:
64 friend class base::RefCountedThreadSafe<BackgroundFetchRequestInfo>; 67 friend class base::RefCountedThreadSafe<BackgroundFetchRequestInfo>;
65 68
66 ~BackgroundFetchRequestInfo(); 69 ~BackgroundFetchRequestInfo();
67 70
68 // ---- Data associated with the request ------------------------------------- 71 // ---- Data associated with the request -------------------------------------
69 72
70 int request_index_ = kInvalidBackgroundFetchRequestIndex; 73 int request_index_ = kInvalidBackgroundFetchRequestIndex;
71 ServiceWorkerFetchRequest fetch_request_; 74 ServiceWorkerFetchRequest fetch_request_;
72 75
73 // ---- Data associated with the in-progress download ------------------------ 76 // ---- Data associated with the in-progress download ------------------------
74 77
75 // Indicates whether download progress data has been populated. 78 // Indicates whether download progress data has been populated.
76 bool download_state_populated_ = false; 79 bool download_state_populated_ = false;
77 80
78 std::string download_guid_; 81 std::string download_guid_;
79 DownloadItem::DownloadState download_state_ = DownloadItem::IN_PROGRESS; 82 DownloadItem::DownloadState download_state_ = DownloadItem::IN_PROGRESS;
80 83
81 // ---- Data associated with the response ------------------------------------ 84 // ---- Data associated with the response ------------------------------------
82 85
83 // Indicates whether response data has been populated. 86 // Indicates whether response data has been populated.
84 bool response_data_populated_ = false; 87 bool response_data_populated_ = false;
85 88
86 std::vector<GURL> url_chain_; 89 std::vector<GURL> url_chain_;
87 base::FilePath file_path_; 90 base::FilePath file_path_;
88 int64_t file_size_ = 0; 91 int64_t file_size_ = 0;
89 base::Time response_time_; 92 base::Time response_time_;
93 std::string response_type_;
90 94
91 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchRequestInfo); 95 DISALLOW_COPY_AND_ASSIGN(BackgroundFetchRequestInfo);
92 }; 96 };
93 97
94 } // namespace content 98 } // namespace content
95 99
96 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_ 100 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698