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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_tracker.h

Issue 2952343004: Adding previews information to PLM UKM (Closed)
Patch Set: comment on BroadcastEventToObservers Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ 5 #ifndef CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_
6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ 6 #define CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 15 matching lines...) Expand all
26 class WebInputEvent; 26 class WebInputEvent;
27 } // namespace blink 27 } // namespace blink
28 28
29 namespace content { 29 namespace content {
30 class NavigationHandle; 30 class NavigationHandle;
31 } // namespace content 31 } // namespace content
32 32
33 namespace page_load_metrics { 33 namespace page_load_metrics {
34 34
35 class PageLoadMetricsEmbedderInterface; 35 class PageLoadMetricsEmbedderInterface;
36 class PageLoadMetricsObserver;
37 36
38 namespace internal { 37 namespace internal {
39 38
40 extern const char kErrorEvents[]; 39 extern const char kErrorEvents[];
41 extern const char kAbortChainSizeReload[]; 40 extern const char kAbortChainSizeReload[];
42 extern const char kAbortChainSizeForwardBack[]; 41 extern const char kAbortChainSizeForwardBack[];
43 extern const char kAbortChainSizeNewNavigation[]; 42 extern const char kAbortChainSizeNewNavigation[];
44 extern const char kAbortChainSizeNoCommit[]; 43 extern const char kAbortChainSizeNoCommit[];
45 extern const char kAbortChainSizeSameURL[]; 44 extern const char kAbortChainSizeSameURL[];
46 extern const char kPageLoadCompletedAfterAppBackground[]; 45 extern const char kPageLoadCompletedAfterAppBackground[];
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 void MediaStartedPlaying( 262 void MediaStartedPlaying(
264 const content::WebContentsObserver::MediaPlayerInfo& video_type, 263 const content::WebContentsObserver::MediaPlayerInfo& video_type,
265 bool is_in_main_frame); 264 bool is_in_main_frame);
266 265
267 // Invoked on navigations where a navigation delay was added by the 266 // Invoked on navigations where a navigation delay was added by the
268 // DelayNavigationThrottle. This is a temporary method that will be removed 267 // DelayNavigationThrottle. This is a temporary method that will be removed
269 // once the experiment is complete. 268 // once the experiment is complete.
270 void OnNavigationDelayComplete(base::TimeDelta scheduled_delay, 269 void OnNavigationDelayComplete(base::TimeDelta scheduled_delay,
271 base::TimeDelta actual_delay); 270 base::TimeDelta actual_delay);
272 271
272 // Informs the observers that the event corresponding to |event_key| has
273 // occurred.
274 void BroadcastEventToObservers(const void* const event_key);
275
273 private: 276 private:
274 // This function converts a TimeTicks value taken in the browser process 277 // This function converts a TimeTicks value taken in the browser process
275 // to navigation_start_ if: 278 // to navigation_start_ if:
276 // - base::TimeTicks is not comparable across processes because the clock 279 // - base::TimeTicks is not comparable across processes because the clock
277 // is not system wide monotonic. 280 // is not system wide monotonic.
278 // - *event_time < navigation_start_ 281 // - *event_time < navigation_start_
279 void ClampBrowserTimestampIfInterProcessTimeTickSkew( 282 void ClampBrowserTimestampIfInterProcessTimeTickSkew(
280 base::TimeTicks* event_time); 283 base::TimeTicks* event_time);
281 284
282 void UpdatePageEndInternal(PageEndReason page_end_reason, 285 void UpdatePageEndInternal(PageEndReason page_end_reason,
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 PageLoadMetricsUpdateDispatcher metrics_update_dispatcher_; 372 PageLoadMetricsUpdateDispatcher metrics_update_dispatcher_;
370 373
371 const ukm::SourceId source_id_; 374 const ukm::SourceId source_id_;
372 375
373 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker); 376 DISALLOW_COPY_AND_ASSIGN(PageLoadTracker);
374 }; 377 };
375 378
376 } // namespace page_load_metrics 379 } // namespace page_load_metrics
377 380
378 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_ 381 #endif // CHROME_BROWSER_PAGE_LOAD_METRICS_PAGE_LOAD_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698