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

Unified Diff: components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h

Issue 2145743002: Changing the TimeDeltas in DRPPageLoadTiming to Optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 5 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: components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h
diff --git a/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h b/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h
index d2d8416ac65aa5180d599cd9c722874c7499bced..0d6981b626c9e2981677de6ba745c22b41cc5430 100644
--- a/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h
+++ b/components/data_reduction_proxy/core/common/data_reduction_proxy_page_load_timing.h
@@ -1,45 +1,44 @@
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_PAGE_LOAD_TIMING_H
#define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_PAGE_LOAD_TIMING_H
+#include "base/optional.h"
#include "base/time/time.h"
namespace data_reduction_proxy {
// The timing information that is relevant to the Pageload metrics pingback.
struct DataReductionProxyPageLoadTiming {
DataReductionProxyPageLoadTiming(
const base::Time& navigation_start,
- const base::TimeDelta& response_start,
- const base::TimeDelta& load_event_start,
- const base::TimeDelta& first_image_paint,
- const base::TimeDelta& first_contentful_paint)
- : navigation_start(navigation_start),
- response_start(response_start),
- load_event_start(load_event_start),
- first_image_paint(first_image_paint),
- first_contentful_paint(first_contentful_paint) {}
+ const base::Optional<base::TimeDelta>& response_start,
+ const base::Optional<base::TimeDelta>& load_event_start,
+ const base::Optional<base::TimeDelta>& first_image_paint,
+ const base::Optional<base::TimeDelta>& first_contentful_paint);
+
+ DataReductionProxyPageLoadTiming(
+ const DataReductionProxyPageLoadTiming& other);
// Time that the navigation for the associated page was initiated.
const base::Time navigation_start;
// All TimeDeltas are relative to navigation_start
// Time that the first byte of the response is received.
- const base::TimeDelta response_start;
+ const base::Optional<base::TimeDelta> response_start;
// Time immediately before the load event is fired.
- const base::TimeDelta load_event_start;
+ const base::Optional<base::TimeDelta> load_event_start;
// Time when the first image is painted.
- const base::TimeDelta first_image_paint;
+ const base::Optional<base::TimeDelta> first_image_paint;
// Time when the first contentful thing (image, text, etc.) is painted.
- const base::TimeDelta first_contentful_paint;
+ const base::Optional<base::TimeDelta> first_contentful_paint;
};
} // namespace data_reduction_proxy
#endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_PAGE_LOAD_TIMING_H

Powered by Google App Engine
This is Rietveld 408576698