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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 class SimplePredictor : public Predictor { | 603 class SimplePredictor : public Predictor { |
604 public: | 604 public: |
605 explicit SimplePredictor(bool preconnect_enabled, bool predictor_enabled) | 605 explicit SimplePredictor(bool preconnect_enabled, bool predictor_enabled) |
606 : Predictor(preconnect_enabled, predictor_enabled) {} | 606 : Predictor(preconnect_enabled, predictor_enabled) {} |
607 virtual ~SimplePredictor() {} | 607 virtual ~SimplePredictor() {} |
608 virtual void InitNetworkPredictor( | 608 virtual void InitNetworkPredictor( |
609 PrefService* user_prefs, | 609 PrefService* user_prefs, |
610 PrefService* local_state, | 610 PrefService* local_state, |
611 IOThread* io_thread, | 611 IOThread* io_thread, |
612 net::URLRequestContextGetter* getter, | 612 net::URLRequestContextGetter* getter, |
613 ProfileIOData* profile_io_data) OVERRIDE; | 613 ProfileIOData* profile_io_data) override; |
614 virtual void ShutdownOnUIThread() OVERRIDE; | 614 virtual void ShutdownOnUIThread() override; |
615 private: | 615 private: |
616 // These member functions return True for unittests. | 616 // These member functions return True for unittests. |
617 virtual bool CanPrefetchAndPrerender() const OVERRIDE; | 617 virtual bool CanPrefetchAndPrerender() const override; |
618 virtual bool CanPreresolveAndPreconnect() const OVERRIDE; | 618 virtual bool CanPreresolveAndPreconnect() const override; |
619 }; | 619 }; |
620 | 620 |
621 } // namespace chrome_browser_net | 621 } // namespace chrome_browser_net |
622 | 622 |
623 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ | 623 #endif // CHROME_BROWSER_NET_PREDICTOR_H_ |
OLD | NEW |