| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "content/public/renderer/render_view.h" | 21 #include "content/public/renderer/render_view.h" |
| 22 #include "extensions/common/url_pattern.h" | 22 #include "extensions/common/url_pattern.h" |
| 23 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 23 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 24 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 24 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 25 #include "third_party/WebKit/public/web/WebDocument.h" | 25 #include "third_party/WebKit/public/web/WebDocument.h" |
| 26 #include "third_party/WebKit/public/web/WebFrame.h" | 26 #include "third_party/WebKit/public/web/WebFrame.h" |
| 27 #include "third_party/WebKit/public/web/WebPerformance.h" | 27 #include "third_party/WebKit/public/web/WebPerformance.h" |
| 28 #include "third_party/WebKit/public/web/WebView.h" | 28 #include "third_party/WebKit/public/web/WebView.h" |
| 29 #include "url/gurl.h" | 29 #include "url/gurl.h" |
| 30 | 30 |
| 31 using WebKit::WebDataSource; | 31 using blink::WebDataSource; |
| 32 using WebKit::WebFrame; | 32 using blink::WebFrame; |
| 33 using WebKit::WebPerformance; | 33 using blink::WebPerformance; |
| 34 using WebKit::WebString; | 34 using blink::WebString; |
| 35 using base::Time; | 35 using base::Time; |
| 36 using base::TimeDelta; | 36 using base::TimeDelta; |
| 37 using content::DocumentState; | 37 using content::DocumentState; |
| 38 | 38 |
| 39 const size_t kPLTCount = 100; | 39 const size_t kPLTCount = 100; |
| 40 | 40 |
| 41 namespace { | 41 namespace { |
| 42 | 42 |
| 43 TimeDelta kPLTMin() { | 43 TimeDelta kPLTMin() { |
| 44 return TimeDelta::FromMilliseconds(10); | 44 return TimeDelta::FromMilliseconds(10); |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 | 855 |
| 856 DCHECK(document_state); | 856 DCHECK(document_state); |
| 857 DCHECK(ds); | 857 DCHECK(ds); |
| 858 GURL url(ds->request().url()); | 858 GURL url(ds->request().url()); |
| 859 Time start = document_state->start_load_time(); | 859 Time start = document_state->start_load_time(); |
| 860 Time finish = document_state->finish_load_time(); | 860 Time finish = document_state->finish_load_time(); |
| 861 // TODO(mbelshe): should we log more stats? | 861 // TODO(mbelshe): should we log more stats? |
| 862 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " | 862 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " |
| 863 << url.spec(); | 863 << url.spec(); |
| 864 } | 864 } |
| OLD | NEW |