OLD | NEW |
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 bool HasUrl(const GURL& url) const { | 117 bool HasUrl(const GURL& url) const { |
118 return url_ == url; | 118 return url_ == url; |
119 } | 119 } |
120 | 120 |
121 base::TimeDelta resolve_duration() const { return resolve_duration_;} | 121 base::TimeDelta resolve_duration() const { return resolve_duration_;} |
122 base::TimeDelta queue_duration() const { return queue_duration_;} | 122 base::TimeDelta queue_duration() const { return queue_duration_;} |
123 | 123 |
124 void DLogResultsStats(const char* message) const; | 124 void DLogResultsStats(const char* message) const; |
125 | 125 |
126 static void GetHtmlTable(const UrlInfoTable host_infos, | 126 static void GetHtmlTable(const UrlInfoTable& host_infos, |
127 const char* description, | 127 const char* description, |
128 const bool brief, | 128 bool brief, |
129 std::string* output); | 129 std::string* output); |
130 | 130 |
131 // For testing, and use in printing tables of info, we sometimes need to | 131 // For testing, and use in printing tables of info, we sometimes need to |
132 // adjust the time manually. Usually, this value is maintained by state | 132 // adjust the time manually. Usually, this value is maintained by state |
133 // transition, and this call is not made. | 133 // transition, and this call is not made. |
134 void set_time(const base::TimeTicks& time) { time_ = time; } | 134 void set_time(const base::TimeTicks& time) { time_ = time; } |
135 | 135 |
136 private: | 136 private: |
137 base::TimeDelta GetDuration() { | 137 base::TimeDelta GetDuration() { |
138 base::TimeTicks old_time = time_; | 138 base::TimeTicks old_time = time_; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 GURL referring_url_; | 184 GURL referring_url_; |
185 | 185 |
186 // We put these objects into a std::map, and hence we | 186 // We put these objects into a std::map, and hence we |
187 // need some "evil" constructors. | 187 // need some "evil" constructors. |
188 // DISALLOW_COPY_AND_ASSIGN(UrlInfo); | 188 // DISALLOW_COPY_AND_ASSIGN(UrlInfo); |
189 }; | 189 }; |
190 | 190 |
191 } // namespace chrome_browser_net | 191 } // namespace chrome_browser_net |
192 | 192 |
193 #endif // CHROME_BROWSER_NET_URL_INFO_H_ | 193 #endif // CHROME_BROWSER_NET_URL_INFO_H_ |
OLD | NEW |