| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 4893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4904 begin_to_finish_all_loads); | 4904 begin_to_finish_all_loads); |
| 4905 } | 4905 } |
| 4906 UMA_HISTOGRAM_ENUMERATION(FieldTrial::MakeName("PLT.Abandoned", "Prefetch"), | 4906 UMA_HISTOGRAM_ENUMERATION(FieldTrial::MakeName("PLT.Abandoned", "Prefetch"), |
| 4907 abandoned_page ? 1 : 0, 2); | 4907 abandoned_page ? 1 : 0, 2); |
| 4908 PLT_HISTOGRAM(FieldTrial::MakeName("PLT.BeginToFinishDoc", "Prefetch"), | 4908 PLT_HISTOGRAM(FieldTrial::MakeName("PLT.BeginToFinishDoc", "Prefetch"), |
| 4909 begin_to_finish_doc); | 4909 begin_to_finish_doc); |
| 4910 PLT_HISTOGRAM(FieldTrial::MakeName("PLT.BeginToFinish", "Prefetch"), | 4910 PLT_HISTOGRAM(FieldTrial::MakeName("PLT.BeginToFinish", "Prefetch"), |
| 4911 begin_to_finish_all_loads); | 4911 begin_to_finish_all_loads); |
| 4912 } | 4912 } |
| 4913 | 4913 |
| 4914 // Histograms to determine if backup connection jobs have an impact on PLT. |
| 4915 static const bool connect_backup_jobs_fieldtrial( |
| 4916 FieldTrialList::Find("ConnnectBackupJobs") && |
| 4917 !FieldTrialList::Find("ConnnectBackupJobs")->group_name().empty()); |
| 4918 if (connect_backup_jobs_fieldtrial) { |
| 4919 UMA_HISTOGRAM_ENUMERATION( |
| 4920 FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"), |
| 4921 abandoned_page ? 1 : 0, 2); |
| 4922 UMA_HISTOGRAM_ENUMERATION( |
| 4923 FieldTrial::MakeName("PLT.LoadType", "ConnnectBackupJobs"), |
| 4924 load_type, NavigationState::kLoadTypeMax); |
| 4925 switch (load_type) { |
| 4926 case NavigationState::NORMAL_LOAD: |
| 4927 PLT_HISTOGRAM(FieldTrial::MakeName( |
| 4928 "PLT.BeginToFinish_NormalLoad", "ConnnectBackupJobs"), |
| 4929 begin_to_finish_all_loads); |
| 4930 break; |
| 4931 case NavigationState::LINK_LOAD_NORMAL: |
| 4932 PLT_HISTOGRAM(FieldTrial::MakeName( |
| 4933 "PLT.BeginToFinish_LinkLoadNormal", "ConnnectBackupJobs"), |
| 4934 begin_to_finish_all_loads); |
| 4935 break; |
| 4936 case NavigationState::LINK_LOAD_RELOAD: |
| 4937 PLT_HISTOGRAM(FieldTrial::MakeName( |
| 4938 "PLT.BeginToFinish_LinkLoadReload", "ConnnectBackupJobs"), |
| 4939 begin_to_finish_all_loads); |
| 4940 break; |
| 4941 case NavigationState::LINK_LOAD_CACHE_STALE_OK: |
| 4942 PLT_HISTOGRAM(FieldTrial::MakeName( |
| 4943 "PLT.BeginToFinish_LinkLoadStaleOk", "ConnnectBackupJobs"), |
| 4944 begin_to_finish_all_loads); |
| 4945 break; |
| 4946 default: |
| 4947 break; |
| 4948 } |
| 4949 } |
| 4950 |
| 4914 // Histograms to determine if the number of connections has an | 4951 // Histograms to determine if the number of connections has an |
| 4915 // impact on PLT. | 4952 // impact on PLT. |
| 4916 // TODO(jar): Consider removing the per-link-type versions. We | 4953 // TODO(jar): Consider removing the per-link-type versions. We |
| 4917 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. | 4954 // really only need LINK_LOAD_NORMAL and NORMAL_LOAD. |
| 4918 static bool use_connection_impact_histogram( | 4955 static bool use_connection_impact_histogram( |
| 4919 FieldTrialList::Find("ConnCountImpact") && | 4956 FieldTrialList::Find("ConnCountImpact") && |
| 4920 !FieldTrialList::Find("ConnCountImpact")->group_name().empty()); | 4957 !FieldTrialList::Find("ConnCountImpact")->group_name().empty()); |
| 4921 if (use_connection_impact_histogram) { | 4958 if (use_connection_impact_histogram) { |
| 4922 UMA_HISTOGRAM_ENUMERATION( | 4959 UMA_HISTOGRAM_ENUMERATION( |
| 4923 FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), | 4960 FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"), |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5566 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( | 5603 PendingOpenFileSystem* request = pending_file_system_requests_.Lookup( |
| 5567 request_id); | 5604 request_id); |
| 5568 DCHECK(request); | 5605 DCHECK(request); |
| 5569 if (accepted) | 5606 if (accepted) |
| 5570 request->callbacks->didOpenFileSystem(name, root_path); | 5607 request->callbacks->didOpenFileSystem(name, root_path); |
| 5571 else | 5608 else |
| 5572 request->callbacks->didFail(WebKit::WebFileErrorSecurity); | 5609 request->callbacks->didFail(WebKit::WebFileErrorSecurity); |
| 5573 request->callbacks = NULL; | 5610 request->callbacks = NULL; |
| 5574 pending_file_system_requests_.Remove(request_id); | 5611 pending_file_system_requests_.Remove(request_id); |
| 5575 } | 5612 } |
| OLD | NEW |