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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko@ nits Created 4 years, 4 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
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_navigation_throttle.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" 46 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h"
47 #include "chrome/browser/download/download_prefs.h" 47 #include "chrome/browser/download/download_prefs.h"
48 #include "chrome/browser/engagement/site_engagement_eviction_policy.h" 48 #include "chrome/browser/engagement/site_engagement_eviction_policy.h"
49 #include "chrome/browser/font_family_cache.h" 49 #include "chrome/browser/font_family_cache.h"
50 #include "chrome/browser/media/media_capture_devices_dispatcher.h" 50 #include "chrome/browser/media/media_capture_devices_dispatcher.h"
51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" 51 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h"
52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" 52 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h"
53 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" 53 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
54 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" 54 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h"
55 #include "chrome/browser/notifications/platform_notification_service_impl.h" 55 #include "chrome/browser/notifications/platform_notification_service_impl.h"
56 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h"
56 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 57 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
57 #include "chrome/browser/permissions/permission_context_base.h" 58 #include "chrome/browser/permissions/permission_context_base.h"
58 #include "chrome/browser/platform_util.h" 59 #include "chrome/browser/platform_util.h"
59 #include "chrome/browser/prerender/prerender_final_status.h" 60 #include "chrome/browser/prerender/prerender_final_status.h"
60 #include "chrome/browser/prerender/prerender_manager.h" 61 #include "chrome/browser/prerender/prerender_manager.h"
61 #include "chrome/browser/prerender/prerender_manager_factory.h" 62 #include "chrome/browser/prerender/prerender_manager_factory.h"
62 #include "chrome/browser/prerender/prerender_message_filter.h" 63 #include "chrome/browser/prerender/prerender_message_filter.h"
63 #include "chrome/browser/printing/printing_message_filter.h" 64 #include "chrome/browser/printing/printing_message_filter.h"
64 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h" 65 #include "chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.h"
65 #include "chrome/browser/profiles/profile.h" 66 #include "chrome/browser/profiles/profile.h"
(...skipping 2828 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 if (url.is_valid()) { 2895 if (url.is_valid()) {
2895 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(), 2896 rappor::SampleDomainAndRegistryFromGURL(g_browser_process->rappor_service(),
2896 metric, url); 2897 metric, url);
2897 } 2898 }
2898 } 2899 }
2899 2900
2900 ScopedVector<content::NavigationThrottle> 2901 ScopedVector<content::NavigationThrottle>
2901 ChromeContentBrowserClient::CreateThrottlesForNavigation( 2902 ChromeContentBrowserClient::CreateThrottlesForNavigation(
2902 content::NavigationHandle* handle) { 2903 content::NavigationHandle* handle) {
2903 ScopedVector<content::NavigationThrottle> throttles; 2904 ScopedVector<content::NavigationThrottle> throttles;
2905 if (handle->IsInMainFrame()) {
2906 throttles.push_back(
2907 page_load_metrics::MetricsNavigationThrottle::Create(handle));
2908 }
2909
2904 #if defined(OS_ANDROID) 2910 #if defined(OS_ANDROID)
2905 // TODO(davidben): This is insufficient to integrate with prerender properly. 2911 // TODO(davidben): This is insufficient to integrate with prerender properly.
2906 // https://crbug.com/370595 2912 // https://crbug.com/370595
2907 prerender::PrerenderContents* prerender_contents = 2913 prerender::PrerenderContents* prerender_contents =
2908 prerender::PrerenderContents::FromWebContents(handle->GetWebContents()); 2914 prerender::PrerenderContents::FromWebContents(handle->GetWebContents());
2909 if (!prerender_contents && handle->IsInMainFrame()) { 2915 if (!prerender_contents && handle->IsInMainFrame()) {
2910 throttles.push_back( 2916 throttles.push_back(
2911 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor( 2917 navigation_interception::InterceptNavigationDelegate::CreateThrottleFor(
2912 handle)); 2918 handle));
2913 } 2919 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
3049 if (channel <= kMaxDisableEncryptionChannel) { 3055 if (channel <= kMaxDisableEncryptionChannel) {
3050 static const char* const kWebRtcDevSwitchNames[] = { 3056 static const char* const kWebRtcDevSwitchNames[] = {
3051 switches::kDisableWebRtcEncryption, 3057 switches::kDisableWebRtcEncryption,
3052 }; 3058 };
3053 to_command_line->CopySwitchesFrom(from_command_line, 3059 to_command_line->CopySwitchesFrom(from_command_line,
3054 kWebRtcDevSwitchNames, 3060 kWebRtcDevSwitchNames,
3055 arraysize(kWebRtcDevSwitchNames)); 3061 arraysize(kWebRtcDevSwitchNames));
3056 } 3062 }
3057 } 3063 }
3058 #endif // defined(ENABLE_WEBRTC) 3064 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698