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

Unified Diff: chrome/browser/net/predictor.h

Issue 2950533002: android: Disable the startup DNS resolutions. (Closed)
Patch Set: nit. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/predictor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor.h
diff --git a/chrome/browser/net/predictor.h b/chrome/browser/net/predictor.h
index 7023275b58856ac3a668e99a44dc0fc7d884b084..627509b402be8a975cbe6f466616f5bcd3f940e7 100644
--- a/chrome/browser/net/predictor.h
+++ b/chrome/browser/net/predictor.h
@@ -63,6 +63,7 @@ class PrefRegistrySyncable;
namespace chrome_browser_net {
+class InitialObserver;
typedef std::map<GURL, UrlInfo> Results;
// An observer for testing.
@@ -349,38 +350,6 @@ class Predictor {
DISALLOW_COPY_AND_ASSIGN(HostNameQueue);
};
- // The InitialObserver monitors navigations made by the network stack. This
- // is only used to identify startup time resolutions (for re-resolution
- // during our next process startup).
- // TODO(jar): Consider preconnecting at startup, which may be faster than
- // waiting for render process to start and request a connection.
- class InitialObserver {
- public:
- InitialObserver();
- ~InitialObserver();
- // Recording of when we observed each navigation.
- typedef std::map<GURL, base::TimeTicks> FirstNavigations;
-
- // Potentially add a new URL to our startup list.
- void Append(const GURL& url, Predictor* predictor);
-
- // Get an HTML version of our current planned first_navigations_.
- void GetFirstResolutionsHtml(std::string* output);
-
- // Persist the current first_navigations_ for storage in a list.
- void GetInitialDnsResolutionList(base::ListValue* startup_list);
-
- // Discards all initial loading history.
- void DiscardInitialNavigationHistory() { first_navigations_.clear(); }
-
- private:
- // List of the first N URL resolutions observed in this run.
- FirstNavigations first_navigations_;
-
- // The number of URLs we'll save for pre-resolving at next startup.
- static const size_t kStartupResolutionCount = 10;
- };
-
// A map that is keyed with the host/port that we've learned were the cause
// of loading additional URLs. The list of additional targets is held
// in a Referrer instance, which is a value in this map.
« no previous file with comments | « no previous file | chrome/browser/net/predictor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698