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/browser/net/load_time_stats.h" | 5 #include "chrome/browser/net/load_time_stats.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 | 264 |
265 LoadTimeStatsTabHelper::~LoadTimeStatsTabHelper() { | 265 LoadTimeStatsTabHelper::~LoadTimeStatsTabHelper() { |
266 } | 266 } |
267 | 267 |
268 void LoadTimeStatsTabHelper::DidStartProvisionalLoadForFrame( | 268 void LoadTimeStatsTabHelper::DidStartProvisionalLoadForFrame( |
269 int64 frame_id, | 269 int64 frame_id, |
270 int64 parent_frame_id, | 270 int64 parent_frame_id, |
271 bool is_main_frame, | 271 bool is_main_frame, |
272 const GURL& validated_url, | 272 const GURL& validated_url, |
273 bool is_error_page, | 273 bool is_error_page, |
| 274 bool is_iframe_srcdoc, |
274 content::RenderViewHost* render_view_host) { | 275 content::RenderViewHost* render_view_host) { |
275 if (!is_main_frame) | 276 if (!is_main_frame) |
276 return; | 277 return; |
277 if (!validated_url.SchemeIs("http")) | 278 if (!validated_url.SchemeIs("http")) |
278 return; | 279 return; |
279 NotifyLoadTimeStats(LoadTimeStats::SPINNER_START, render_view_host); | 280 NotifyLoadTimeStats(LoadTimeStats::SPINNER_START, render_view_host); |
280 } | 281 } |
281 | 282 |
282 void LoadTimeStatsTabHelper::DidStopLoading(RenderViewHost* render_view_host) { | 283 void LoadTimeStatsTabHelper::DidStopLoading(RenderViewHost* render_view_host) { |
283 NotifyLoadTimeStats(LoadTimeStats::SPINNER_STOP, render_view_host); | 284 NotifyLoadTimeStats(LoadTimeStats::SPINNER_STOP, render_view_host); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN) | 548 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN) |
548 main_request_contexts_.insert(context); | 549 main_request_contexts_.insert(context); |
549 } | 550 } |
550 | 551 |
551 void LoadTimeStats::UnregisterURLRequestContext( | 552 void LoadTimeStats::UnregisterURLRequestContext( |
552 const net::URLRequestContext* context) { | 553 const net::URLRequestContext* context) { |
553 main_request_contexts_.erase(context); | 554 main_request_contexts_.erase(context); |
554 } | 555 } |
555 | 556 |
556 } // namespace chrome_browser_net | 557 } // namespace chrome_browser_net |
OLD | NEW |