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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/loader/resource_dispatcher_host_impl.h" | 7 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <set> | 10 #include <set> |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 | 464 |
465 ANNOTATE_BENIGN_RACE( | 465 ANNOTATE_BENIGN_RACE( |
466 &last_user_gesture_time_, | 466 &last_user_gesture_time_, |
467 "We don't care about the precise value, see http://crbug.com/92889"); | 467 "We don't care about the precise value, see http://crbug.com/92889"); |
468 | 468 |
469 BrowserThread::PostTask(BrowserThread::IO, | 469 BrowserThread::PostTask(BrowserThread::IO, |
470 FROM_HERE, | 470 FROM_HERE, |
471 base::Bind(&ResourceDispatcherHostImpl::OnInit, | 471 base::Bind(&ResourceDispatcherHostImpl::OnInit, |
472 base::Unretained(this))); | 472 base::Unretained(this))); |
473 | 473 |
474 update_load_states_timer_.reset( | 474 update_load_states_timer_.reset(new base::RepeatingTimer()); |
475 new base::RepeatingTimer<ResourceDispatcherHostImpl>()); | |
476 } | 475 } |
477 | 476 |
478 ResourceDispatcherHostImpl::~ResourceDispatcherHostImpl() { | 477 ResourceDispatcherHostImpl::~ResourceDispatcherHostImpl() { |
479 DCHECK(outstanding_requests_stats_map_.empty()); | 478 DCHECK(outstanding_requests_stats_map_.empty()); |
480 DCHECK(g_resource_dispatcher_host); | 479 DCHECK(g_resource_dispatcher_host); |
481 g_resource_dispatcher_host = NULL; | 480 g_resource_dispatcher_host = NULL; |
482 } | 481 } |
483 | 482 |
484 // static | 483 // static |
485 ResourceDispatcherHostImpl* ResourceDispatcherHostImpl::Get() { | 484 ResourceDispatcherHostImpl* ResourceDispatcherHostImpl::Get() { |
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 load_flags |= net::LOAD_PREFETCH; | 2416 load_flags |= net::LOAD_PREFETCH; |
2418 } | 2417 } |
2419 | 2418 |
2420 if (is_sync_load) | 2419 if (is_sync_load) |
2421 load_flags |= net::LOAD_IGNORE_LIMITS; | 2420 load_flags |= net::LOAD_IGNORE_LIMITS; |
2422 | 2421 |
2423 return load_flags; | 2422 return load_flags; |
2424 } | 2423 } |
2425 | 2424 |
2426 } // namespace content | 2425 } // namespace content |
OLD | NEW |