| OLD | NEW |
| 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/page_load_histograms.h" | 5 #include "chrome/renderer/page_load_histograms.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 URLPattern::SchemeMasks scheme_type = | 874 URLPattern::SchemeMasks scheme_type = |
| 875 GetSupportedSchemeType(frame->document().url()); | 875 GetSupportedSchemeType(frame->document().url()); |
| 876 | 876 |
| 877 DocumentState* document_state = | 877 DocumentState* document_state = |
| 878 DocumentState::FromDataSource(frame->dataSource()); | 878 DocumentState::FromDataSource(frame->dataSource()); |
| 879 | 879 |
| 880 bool data_reduction_proxy_was_used = false; | 880 bool data_reduction_proxy_was_used = false; |
| 881 data_reduction_proxy::LoFiStatus lofi_status = | 881 data_reduction_proxy::LoFiStatus lofi_status = |
| 882 data_reduction_proxy::LOFI_STATUS_TEMPORARILY_OFF; | 882 data_reduction_proxy::LOFI_STATUS_TEMPORARILY_OFF; |
| 883 if (!document_state->proxy_server().IsEmpty()) { | 883 if (!document_state->proxy_server().IsEmpty()) { |
| 884 Send(new DataReductionProxyViewHostMsg_DataReductionProxyStatus( | 884 bool handled = |
| 885 document_state->proxy_server(), &data_reduction_proxy_was_used, | 885 Send(new DataReductionProxyViewHostMsg_DataReductionProxyStatus( |
| 886 &lofi_status)); | 886 document_state->proxy_server(), &data_reduction_proxy_was_used, |
| 887 &lofi_status)); |
| 888 // If the IPC call is not handled, then |data_reduction_proxy_was_used| |
| 889 // should remain |false|. |
| 890 DCHECK(handled || !data_reduction_proxy_was_used); |
| 887 } | 891 } |
| 888 | 892 |
| 889 bool came_from_websearch = | 893 bool came_from_websearch = |
| 890 IsFromGoogleSearchResult(frame->document().url(), | 894 IsFromGoogleSearchResult(frame->document().url(), |
| 891 GURL(frame->document().referrer())); | 895 GURL(frame->document().referrer())); |
| 892 int websearch_chrome_joint_experiment_id = kNoExperiment; | 896 int websearch_chrome_joint_experiment_id = kNoExperiment; |
| 893 bool is_preview = false; | 897 bool is_preview = false; |
| 894 if (came_from_websearch) { | 898 if (came_from_websearch) { |
| 895 websearch_chrome_joint_experiment_id = | 899 websearch_chrome_joint_experiment_id = |
| 896 GetQueryStringBasedExperiment(GURL(frame->document().referrer())); | 900 GetQueryStringBasedExperiment(GURL(frame->document().referrer())); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 | 1020 |
| 1017 DCHECK(document_state); | 1021 DCHECK(document_state); |
| 1018 DCHECK(ds); | 1022 DCHECK(ds); |
| 1019 GURL url(ds->request().url()); | 1023 GURL url(ds->request().url()); |
| 1020 Time start = document_state->start_load_time(); | 1024 Time start = document_state->start_load_time(); |
| 1021 Time finish = document_state->finish_load_time(); | 1025 Time finish = document_state->finish_load_time(); |
| 1022 // TODO(mbelshe): should we log more stats? | 1026 // TODO(mbelshe): should we log more stats? |
| 1023 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 1027 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
| 1024 << url.spec(); | 1028 << url.spec(); |
| 1025 } | 1029 } |
| OLD | NEW |