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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h

Issue 2837943006: [WIP] Support PerformanceResourceTiming for Service Worker Navigation Preload (Closed)
Patch Set: clean up 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h
index 78fd05086edd3b9d17b12155a6197239f2e9c546..a0e009e4c93ebc5ea8447232e93ce78a85ff9751 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h
@@ -104,15 +104,16 @@ class PLATFORM_EXPORT ResourceTimingInfo
redirect.SetResourceLoadTiming(nullptr);
}
+ void SetNegativeAllowed(bool negative_allowed) {
+ negative_allowed_ = negative_allowed;
+ }
+ bool NegativeAllowed() const { return negative_allowed_; }
+
private:
ResourceTimingInfo(const AtomicString& type,
const double time,
bool is_main_resource)
- : type_(type),
- initial_time_(time),
- transfer_size_(0),
- is_main_resource_(is_main_resource),
- has_cross_origin_redirect_(false) {}
+ : type_(type), initial_time_(time), is_main_resource_(is_main_resource) {}
AtomicString type_;
AtomicString original_timing_allow_origin_;
@@ -121,9 +122,10 @@ class PLATFORM_EXPORT ResourceTimingInfo
KURL initial_url_;
ResourceResponse final_response_;
Vector<ResourceResponse> redirect_chain_;
- long long transfer_size_;
+ long long transfer_size_ = 0;
bool is_main_resource_;
- bool has_cross_origin_redirect_;
+ bool has_cross_origin_redirect_ = false;
+ bool negative_allowed_ = false;
};
struct CrossThreadResourceTimingInfoData {
@@ -142,6 +144,7 @@ struct CrossThreadResourceTimingInfoData {
Vector<std::unique_ptr<CrossThreadResourceResponseData>> redirect_chain_;
long long transfer_size_;
bool is_main_resource_;
+ bool negative_allowed_;
};
template <>

Powered by Google App Engine
This is Rietveld 408576698