| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // stack. | 466 // stack. |
| 467 base::TimeTicks SanitizeNavigationTiming( | 467 base::TimeTicks SanitizeNavigationTiming( |
| 468 blink::WebFrameLoadType load_type, | 468 blink::WebFrameLoadType load_type, |
| 469 const base::TimeTicks& browser_navigation_start, | 469 const base::TimeTicks& browser_navigation_start, |
| 470 const base::TimeTicks& renderer_navigation_start) { | 470 const base::TimeTicks& renderer_navigation_start) { |
| 471 if (load_type != blink::WebFrameLoadType::Standard) | 471 if (load_type != blink::WebFrameLoadType::Standard) |
| 472 return base::TimeTicks(); | 472 return base::TimeTicks(); |
| 473 DCHECK(!browser_navigation_start.is_null()); | 473 DCHECK(!browser_navigation_start.is_null()); |
| 474 base::TimeTicks navigation_start = | 474 base::TimeTicks navigation_start = |
| 475 std::min(browser_navigation_start, renderer_navigation_start); | 475 std::min(browser_navigation_start, renderer_navigation_start); |
| 476 // TODO(csharrison) Investigate how big a problem the cross process | 476 base::TimeDelta difference = |
| 477 // monotonicity really is and on what platforms. Log UMA for: | 477 renderer_navigation_start - browser_navigation_start; |
| 478 // |renderer_navigation_start - browser_navigation_start| | 478 if (difference > base::TimeDelta()) { |
| 479 UMA_HISTOGRAM_TIMES("Navigation.Start.RendererBrowserDifference.Positive", |
| 480 difference); |
| 481 } else { |
| 482 UMA_HISTOGRAM_TIMES("Navigation.Start.RendererBrowserDifference.Negative", |
| 483 -difference); |
| 484 } |
| 479 return navigation_start; | 485 return navigation_start; |
| 480 } | 486 } |
| 481 | 487 |
| 482 // PlzNavigate | 488 // PlzNavigate |
| 483 CommonNavigationParams MakeCommonNavigationParams( | 489 CommonNavigationParams MakeCommonNavigationParams( |
| 484 blink::WebURLRequest* request, | 490 blink::WebURLRequest* request, |
| 485 bool should_replace_current_entry) { | 491 bool should_replace_current_entry) { |
| 486 const RequestExtraData kEmptyData; | 492 const RequestExtraData kEmptyData; |
| 487 const RequestExtraData* extra_data = | 493 const RequestExtraData* extra_data = |
| 488 static_cast<RequestExtraData*>(request->extraData()); | 494 static_cast<RequestExtraData*>(request->extraData()); |
| (...skipping 4863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5352 mojo::ServiceProviderPtr service_provider; | 5358 mojo::ServiceProviderPtr service_provider; |
| 5353 mojo::URLRequestPtr request(mojo::URLRequest::New()); | 5359 mojo::URLRequestPtr request(mojo::URLRequest::New()); |
| 5354 request->url = mojo::String::From(url); | 5360 request->url = mojo::String::From(url); |
| 5355 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), | 5361 mojo_shell_->ConnectToApplication(request.Pass(), GetProxy(&service_provider), |
| 5356 nullptr, nullptr, | 5362 nullptr, nullptr, |
| 5357 base::Bind(&OnGotContentHandlerID)); | 5363 base::Bind(&OnGotContentHandlerID)); |
| 5358 return service_provider.Pass(); | 5364 return service_provider.Pass(); |
| 5359 } | 5365 } |
| 5360 | 5366 |
| 5361 } // namespace content | 5367 } // namespace content |
| OLD | NEW |