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 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 content::WebContents* web_contents) | 260 content::WebContents* web_contents) |
261 : content::WebContentsObserver(web_contents) { | 261 : content::WebContentsObserver(web_contents) { |
262 is_otr_profile_ = web_contents->GetBrowserContext()->IsOffTheRecord(); | 262 is_otr_profile_ = web_contents->GetBrowserContext()->IsOffTheRecord(); |
263 } | 263 } |
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 bool is_main_frame, | 271 bool is_main_frame, |
271 const GURL& validated_url, | 272 const GURL& validated_url, |
272 bool is_error_page, | 273 bool is_error_page, |
273 content::RenderViewHost* render_view_host) { | 274 content::RenderViewHost* render_view_host) { |
274 if (!is_main_frame) | 275 if (!is_main_frame) |
275 return; | 276 return; |
276 if (!validated_url.SchemeIs("http")) | 277 if (!validated_url.SchemeIs("http")) |
277 return; | 278 return; |
278 NotifyLoadTimeStats(LoadTimeStats::SPINNER_START, render_view_host); | 279 NotifyLoadTimeStats(LoadTimeStats::SPINNER_START, render_view_host); |
279 } | 280 } |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN) | 547 if (type == ChromeURLRequestContext::CONTEXT_TYPE_MAIN) |
547 main_request_contexts_.insert(context); | 548 main_request_contexts_.insert(context); |
548 } | 549 } |
549 | 550 |
550 void LoadTimeStats::UnregisterURLRequestContext( | 551 void LoadTimeStats::UnregisterURLRequestContext( |
551 const net::URLRequestContext* context) { | 552 const net::URLRequestContext* context) { |
552 main_request_contexts_.erase(context); | 553 main_request_contexts_.erase(context); |
553 } | 554 } |
554 | 555 |
555 } // namespace chrome_browser_net | 556 } // namespace chrome_browser_net |
OLD | NEW |