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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 1282303002: PageLoadMetrics renderer and browser implementation (deprecated) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 #include "chrome/renderer/worker_content_settings_client_proxy.h" 57 #include "chrome/renderer/worker_content_settings_client_proxy.h"
58 #include "components/autofill/content/renderer/autofill_agent.h" 58 #include "components/autofill/content/renderer/autofill_agent.h"
59 #include "components/autofill/content/renderer/password_autofill_agent.h" 59 #include "components/autofill/content/renderer/password_autofill_agent.h"
60 #include "components/autofill/content/renderer/password_generation_agent.h" 60 #include "components/autofill/content/renderer/password_generation_agent.h"
61 #include "components/content_settings/core/common/content_settings_pattern.h" 61 #include "components/content_settings/core/common/content_settings_pattern.h"
62 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 62 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
63 #include "components/dom_distiller/core/url_constants.h" 63 #include "components/dom_distiller/core/url_constants.h"
64 #include "components/nacl/renderer/ppb_nacl_private.h" 64 #include "components/nacl/renderer/ppb_nacl_private.h"
65 #include "components/nacl/renderer/ppb_nacl_private_impl.h" 65 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h" 66 #include "components/network_hints/renderer/prescient_networking_dispatcher.h"
67 #include "components/page_load_metrics/renderer/page_load_metrics_render_frame_o bserver.h"
67 #include "components/password_manager/content/renderer/credential_manager_client .h" 68 #include "components/password_manager/content/renderer/credential_manager_client .h"
68 #include "components/pdf/renderer/pepper_pdf_host.h" 69 #include "components/pdf/renderer/pepper_pdf_host.h"
69 #include "components/plugins/renderer/mobile_youtube_plugin.h" 70 #include "components/plugins/renderer/mobile_youtube_plugin.h"
70 #include "components/signin/core/common/profile_management_switches.h" 71 #include "components/signin/core/common/profile_management_switches.h"
71 #include "components/version_info/version_info.h" 72 #include "components/version_info/version_info.h"
72 #include "components/visitedlink/renderer/visitedlink_slave.h" 73 #include "components/visitedlink/renderer/visitedlink_slave.h"
73 #include "components/web_cache/renderer/web_cache_render_process_observer.h" 74 #include "components/web_cache/renderer/web_cache_render_process_observer.h"
74 #include "content/public/common/content_constants.h" 75 #include "content/public/common/content_constants.h"
75 #include "content/public/renderer/plugin_instance_throttler.h" 76 #include "content/public/renderer/plugin_instance_throttler.h"
76 #include "content/public/renderer/render_frame.h" 77 #include "content/public/renderer/render_frame.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 new prerender::PrerenderHelper(render_frame); 553 new prerender::PrerenderHelper(render_frame);
553 } 554 }
554 } 555 }
555 556
556 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) { 557 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) {
557 // Only attach NetErrorHelper to the main frame, since only the main frame 558 // Only attach NetErrorHelper to the main frame, since only the main frame
558 // should get error pages. 559 // should get error pages.
559 new NetErrorHelper(render_frame); 560 new NetErrorHelper(render_frame);
560 } 561 }
561 562
563 if (render_frame->GetRenderView()->GetMainRenderFrame() == render_frame) {
564 // Only attach PageLoadMetricsRenderFrameObserver to the main frame, since
565 // we only want to log page load metrics for the main frame.
566 new page_load_metrics::PageLoadMetricsRenderFrameObserver(render_frame);
Randy Smith (Not in Mondays) 2015/08/17 19:31:07 This name is very long, and not particularly in ke
Randy Smith (Not in Mondays) 2015/08/17 19:31:07 Same comment about size and nature of name. Maybe
Bryan McQuade 2015/08/25 13:53:35 I'm mixed on using the Sender/Receiver name. I thi
Bryan McQuade 2015/08/25 13:53:35 Agree about shortening names. I used these very ve
Randy Smith (Not in Mondays) 2015/08/26 19:11:48 This all SG TM, though I don't consider myself the
567 }
568
562 PasswordAutofillAgent* password_autofill_agent = 569 PasswordAutofillAgent* password_autofill_agent =
563 new PasswordAutofillAgent(render_frame); 570 new PasswordAutofillAgent(render_frame);
564 PasswordGenerationAgent* password_generation_agent = 571 PasswordGenerationAgent* password_generation_agent =
565 new PasswordGenerationAgent(render_frame, password_autofill_agent); 572 new PasswordGenerationAgent(render_frame, password_autofill_agent);
566 new AutofillAgent(render_frame, password_autofill_agent, 573 new AutofillAgent(render_frame, password_autofill_agent,
567 password_generation_agent); 574 password_generation_agent);
568 } 575 }
569 576
570 void ChromeContentRendererClient::RenderViewCreated( 577 void ChromeContentRendererClient::RenderViewCreated(
571 content::RenderView* render_view) { 578 content::RenderView* render_view) {
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 WebString header_key(ASCIIToUTF16( 1634 WebString header_key(ASCIIToUTF16(
1628 data_reduction_proxy::chrome_proxy_header())); 1635 data_reduction_proxy::chrome_proxy_header()));
1629 if (!response.httpHeaderField(header_key).isNull() && 1636 if (!response.httpHeaderField(header_key).isNull() &&
1630 response.httpHeaderField(header_key).utf8().find( 1637 response.httpHeaderField(header_key).utf8().find(
1631 data_reduction_proxy::chrome_proxy_lo_fi_directive()) != 1638 data_reduction_proxy::chrome_proxy_lo_fi_directive()) !=
1632 std::string::npos) { 1639 std::string::npos) {
1633 (*properties)[data_reduction_proxy::chrome_proxy_header()] = 1640 (*properties)[data_reduction_proxy::chrome_proxy_header()] =
1634 data_reduction_proxy::chrome_proxy_lo_fi_directive(); 1641 data_reduction_proxy::chrome_proxy_lo_fi_directive();
1635 } 1642 }
1636 } 1643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698