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 // A Predictor object is instantiated once in the browser process, and manages | 5 // A Predictor object is instantiated once in the browser process, and manages |
6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected | 6 // both preresolution of hostnames, as well as TCP/IP preconnection to expected |
7 // subresources. | 7 // subresources. |
8 // Most hostname lists are provided by the renderer processes, and include URLs | 8 // Most hostname lists are provided by the renderer processes, and include URLs |
9 // that *might* be used in the near future by the browsing user. One goal of | 9 // that *might* be used in the near future by the browsing user. One goal of |
10 // this class is to cause the underlying DNS structure to lookup a hostname | 10 // this class is to cause the underlying DNS structure to lookup a hostname |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
602 : Predictor(preconnect_enabled) {} | 602 : Predictor(preconnect_enabled) {} |
603 virtual ~SimplePredictor() {} | 603 virtual ~SimplePredictor() {} |
604 virtual void InitNetworkPredictor( | 604 virtual void InitNetworkPredictor( |
605 PrefService* user_prefs, | 605 PrefService* user_prefs, |
606 PrefService* local_state, | 606 PrefService* local_state, |
607 IOThread* io_thread, | 607 IOThread* io_thread, |
608 net::URLRequestContextGetter* getter) OVERRIDE; | 608 net::URLRequestContextGetter* getter) OVERRIDE; |
609 virtual void ShutdownOnUIThread() OVERRIDE; | 609 virtual void ShutdownOnUIThread() OVERRIDE; |
610 }; | 610 }; |
611 | 611 |
612 // enum describing when to allow network predictions based on connection type. | |
jkarlin
2014/06/13 14:09:09
Comments should be complete sentences (with capita
Bence
2014/06/20 13:38:46
Done.
| |
613 // The same enum must be used by the platform-dependent UI components. | |
614 // TODO(bnc) implement as per crbug.com/334602. | |
jkarlin
2014/06/13 14:09:09
don't forget the ':', TODO(bnc):
Bence
2014/06/20 13:38:46
Done.
| |
615 enum NetworkPredictionOptions { | |
jkarlin
2014/06/13 14:09:09
Please move the enum into the Predictor class in p
Bence
2014/06/20 13:38:46
Done.
| |
616 NETWORK_PREDICTION_ALWAYS, | |
617 NETWORK_PREDICTION_WIFI_ONLY, | |
618 NETWORK_PREDICTION_NEVER | |
619 }; | |
620 | |
612 } // namespace chrome_browser_net | 621 } // namespace chrome_browser_net |
613 | 622 |
614 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ | 623 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ |
OLD | NEW |