| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/time.h" | 13 #include "base/time.h" |
| 14 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
| 15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 16 #include "chrome/renderer/chrome_content_renderer_client.h" | 16 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 17 #include "content/public/common/content_constants.h" | 17 #include "content/public/common/content_constants.h" |
| 18 #include "content/public/renderer/document_state.h" | 18 #include "content/public/renderer/document_state.h" |
| 19 #include "content/public/renderer/render_thread.h" | 19 #include "content/public/renderer/render_thread.h" |
| 20 #include "content/public/renderer/render_view.h" | 20 #include "content/public/renderer/render_view.h" |
| 21 #include "extensions/common/url_pattern.h" | 21 #include "extensions/common/url_pattern.h" |
| 22 #include "googleurl/src/gurl.h" | 22 #include "googleurl/src/gurl.h" |
| 23 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLRequest.h" | 23 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 24 #include "third_party/WebKit/Source/Platform/chromium/public/WebURLResponse.h" | 24 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPerformance.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPerformance.h" |
| 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 28 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 29 | 29 |
| 30 using WebKit::WebDataSource; | 30 using WebKit::WebDataSource; |
| 31 using WebKit::WebFrame; | 31 using WebKit::WebFrame; |
| 32 using WebKit::WebPerformance; | 32 using WebKit::WebPerformance; |
| 33 using WebKit::WebString; | 33 using WebKit::WebString; |
| 34 using base::Time; | 34 using base::Time; |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 | 749 |
| 750 DCHECK(document_state); | 750 DCHECK(document_state); |
| 751 DCHECK(ds); | 751 DCHECK(ds); |
| 752 GURL url(ds->request().url()); | 752 GURL url(ds->request().url()); |
| 753 Time start = document_state->start_load_time(); | 753 Time start = document_state->start_load_time(); |
| 754 Time finish = document_state->finish_load_time(); | 754 Time finish = document_state->finish_load_time(); |
| 755 // TODO(mbelshe): should we log more stats? | 755 // TODO(mbelshe): should we log more stats? |
| 756 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 756 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
| 757 << url.spec(); | 757 << url.spec(); |
| 758 } | 758 } |
| OLD | NEW |