| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/sessions/tab_loader_delegate.h" | 5 #include "chrome/browser/sessions/tab_loader_delegate.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 8 #include "components/variations/variations_associated_data.h" | 9 #include "components/variations/variations_associated_data.h" |
| 9 #include "net/base/network_change_notifier.h" | 10 #include "net/base/network_change_notifier.h" |
| 10 | 11 |
| 11 namespace { | 12 namespace { |
| 12 | 13 |
| 13 // The timeout time after which the next tab gets loaded if the previous tab did | 14 // The timeout time after which the next tab gets loaded if the previous tab did |
| 14 // not finish loading yet. The used value is half of the median value of all | 15 // not finish loading yet. The used value is half of the median value of all |
| 15 // ChromeOS devices loading the 25 most common web pages. Half is chosen since | 16 // ChromeOS devices loading the 25 most common web pages. Half is chosen since |
| 16 // the loading time is a mix of server response and data bandwidth. | 17 // the loading time is a mix of server response and data bandwidth. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 type != net::NetworkChangeNotifier::CONNECTION_NONE); | 93 type != net::NetworkChangeNotifier::CONNECTION_NONE); |
| 93 } | 94 } |
| 94 } // namespace | 95 } // namespace |
| 95 | 96 |
| 96 // static | 97 // static |
| 97 scoped_ptr<TabLoaderDelegate> TabLoaderDelegate::Create( | 98 scoped_ptr<TabLoaderDelegate> TabLoaderDelegate::Create( |
| 98 TabLoaderCallback* callback) { | 99 TabLoaderCallback* callback) { |
| 99 return scoped_ptr<TabLoaderDelegate>( | 100 return scoped_ptr<TabLoaderDelegate>( |
| 100 new TabLoaderDelegateImpl(callback)); | 101 new TabLoaderDelegateImpl(callback)); |
| 101 } | 102 } |
| OLD | NEW |