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_REQUEST_INFO_H_ |
| 6 #define CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_ |
| 7 |
| 8 #include <vector> |
| 9 |
| 10 #include "content/common/content_export.h" |
| 11 #include "url/gurl.h" |
| 12 |
| 13 namespace content { |
| 14 |
| 15 // Simple class to encapsulate the components of a fetch request. |
| 16 class CONTENT_EXPORT BackgroundFetchRequestInfo { |
| 17 public: |
| 18 BackgroundFetchRequestInfo(); |
| 19 BackgroundFetchRequestInfo(const GURL& url, const std::string& tag); |
| 20 // TODO(harkness): Remove copy constructor once the final (non-map-based) |
| 21 // state management is in place. |
| 22 BackgroundFetchRequestInfo(const BackgroundFetchRequestInfo& request); |
| 23 ~BackgroundFetchRequestInfo(); |
| 24 |
| 25 const std::string& guid() const { return guid_; } |
| 26 const GURL& url() const { return url_; } |
| 27 const std::string& tag() const { return tag_; } |
| 28 |
| 29 bool complete() const { return complete_; } |
| 30 void set_complete(bool complete) { complete_ = complete; } |
| 31 |
| 32 private: |
| 33 std::string guid_; |
| 34 GURL url_; |
| 35 std::string tag_; |
| 36 bool complete_ = false; |
| 37 }; |
| 38 |
| 39 using BackgroundFetchRequestInfos = std::vector<BackgroundFetchRequestInfo>; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_BROWSER_BACKGROUND_FETCH_REQUEST_INFO_H_ |
OLD | NEW |