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

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

Issue 3859003: FBTF: Even more ctor/virtual deinlining. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 UrlInfo object is used to store prediction related information about a host 5 // A UrlInfo object is used to store prediction related information about a host
6 // port and scheme triplet. When performing DNS pre-resolution of the host/port 6 // port and scheme triplet. When performing DNS pre-resolution of the host/port
7 // pair, its state is monitored as it is resolved. 7 // pair, its state is monitored as it is resolved.
8 // It includes progress, from placement in the Predictor's queue, to resolution 8 // It includes progress, from placement in the Predictor's queue, to resolution
9 // by the DNS service as either FOUND or NO_SUCH_NAME. Each instance may also 9 // by the DNS service as either FOUND or NO_SUCH_NAME. Each instance may also
10 // hold records of previous resolution times, which might later be shown to be 10 // hold records of previous resolution times, which might later be shown to be
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // The number of OS cache entries we can guarantee(?) before cache eviction 67 // The number of OS cache entries we can guarantee(?) before cache eviction
68 // might likely take place. 68 // might likely take place.
69 static const int kMaxGuaranteedDnsCacheSize = 50; 69 static const int kMaxGuaranteedDnsCacheSize = 50;
70 70
71 typedef std::vector<UrlInfo> UrlInfoTable; 71 typedef std::vector<UrlInfo> UrlInfoTable;
72 72
73 static const base::TimeDelta kNullDuration; 73 static const base::TimeDelta kNullDuration;
74 74
75 // UrlInfo are usually made by the default constructor during 75 // UrlInfo are usually made by the default constructor during
76 // initializing of the Predictor's map (of info for Hostnames). 76 // initializing of the Predictor's map (of info for Hostnames).
77 UrlInfo() 77 UrlInfo();
78 : state_(PENDING),
79 old_prequeue_state_(state_),
80 resolve_duration_(kNullDuration),
81 queue_duration_(kNullDuration),
82 sequence_number_(0),
83 motivation_(NO_PREFETCH_MOTIVATION),
84 was_linked_(false) {
85 }
86 78
87 ~UrlInfo() {} 79 ~UrlInfo();
88 80
89 // NeedDnsUpdate decides, based on our internal info, 81 // NeedDnsUpdate decides, based on our internal info,
90 // if it would be valuable to attempt to update (prefectch) 82 // if it would be valuable to attempt to update (prefectch)
91 // DNS data for hostname. This decision is based 83 // DNS data for hostname. This decision is based
92 // on how recently we've done DNS prefetching for hostname. 84 // on how recently we've done DNS prefetching for hostname.
93 bool NeedsDnsUpdate(); 85 bool NeedsDnsUpdate();
94 86
95 // FOR TEST ONLY: The following access the otherwise constant values. 87 // FOR TEST ONLY: The following access the otherwise constant values.
96 static void set_cache_expiration(base::TimeDelta time); 88 static void set_cache_expiration(base::TimeDelta time);
97 static base::TimeDelta get_cache_expiration(); 89 static base::TimeDelta get_cache_expiration();
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 GURL referring_url_; 184 GURL referring_url_;
193 185
194 // We put these objects into a std::map, and hence we 186 // We put these objects into a std::map, and hence we
195 // need some "evil" constructors. 187 // need some "evil" constructors.
196 // DISALLOW_COPY_AND_ASSIGN(UrlInfo); 188 // DISALLOW_COPY_AND_ASSIGN(UrlInfo);
197 }; 189 };
198 190
199 } // namespace chrome_browser_net 191 } // namespace chrome_browser_net
200 192
201 #endif // CHROME_BROWSER_NET_URL_INFO_H_ 193 #endif // CHROME_BROWSER_NET_URL_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698