Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: chrome/browser/net/predictor.h

Issue 518973002: Remove CanPredictNetworkActionsUI from prediction_options.cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments in predictor.h. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/net/prediction_options.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 510
511 // Reference to URLRequestContextGetter from the Profile which owns the 511 // Reference to URLRequestContextGetter from the Profile which owns the
512 // predictor. Used by Preconnect. 512 // predictor. Used by Preconnect.
513 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; 513 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
514 514
515 // Status of speculative DNS resolution and speculative TCP/IP connection 515 // Status of speculative DNS resolution and speculative TCP/IP connection
516 // feature. This is false if and only if disabled by a command line switch. 516 // feature. This is false if and only if disabled by a command line switch.
517 const bool predictor_enabled_; 517 const bool predictor_enabled_;
518 518
519 // This is set by InitNetworkPredictor and used for calling 519 // This is set by InitNetworkPredictor and used for calling
520 // chrome_browser_net::CanPredictNetworkActionsUI. 520 // CanPrefetchAndPrerenderUI and CanPreresolveAndPreconnectUI.
521 PrefService* user_prefs_; 521 PrefService* user_prefs_;
522 522
523 // This is set by InitNetworkPredictor and used for calling 523 // This is set by InitNetworkPredictor and used for calling
524 // chrome_browser_net::CanPredictNetworkActionsIO. 524 // CanPrefetchAndPrerenderIO and CanPreresolveAndPreconnectIO.
525 ProfileIOData* profile_io_data_; 525 ProfileIOData* profile_io_data_;
526 526
527 // work_queue_ holds a list of names we need to look up. 527 // work_queue_ holds a list of names we need to look up.
528 HostNameQueue work_queue_; 528 HostNameQueue work_queue_;
529 529
530 // results_ contains information for existing/prior prefetches. 530 // results_ contains information for existing/prior prefetches.
531 Results results_; 531 Results results_;
532 532
533 std::set<LookupRequest*> pending_lookups_; 533 std::set<LookupRequest*> pending_lookups_;
534 534
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_
OLDNEW
« no previous file with comments | « chrome/browser/net/prediction_options.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698