| OLD | NEW |
| 1 // Copyright (c) 2006-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 |
| 11 // savings relative to resolution time during a navigation. | 11 // savings relative to resolution time during a navigation. |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void SetUrl(const GURL& url); | 103 void SetUrl(const GURL& url); |
| 104 | 104 |
| 105 bool was_linked() const { return was_linked_; } | 105 bool was_linked() const { return was_linked_; } |
| 106 | 106 |
| 107 GURL referring_url() const { return referring_url_; } | 107 GURL referring_url() const { return referring_url_; } |
| 108 void SetReferringHostname(const GURL& url) { | 108 void SetReferringHostname(const GURL& url) { |
| 109 referring_url_ = url; | 109 referring_url_ = url; |
| 110 } | 110 } |
| 111 | 111 |
| 112 bool was_found() const { return FOUND == state_; } | 112 bool was_found() const { return FOUND == state_; } |
| 113 bool was_nonexistant() const { return NO_SUCH_NAME == state_; } | 113 bool was_nonexistent() const { return NO_SUCH_NAME == state_; } |
| 114 bool is_assigned() const { | 114 bool is_assigned() const { |
| 115 return ASSIGNED == state_ || ASSIGNED_BUT_MARKED == state_; | 115 return ASSIGNED == state_ || ASSIGNED_BUT_MARKED == state_; |
| 116 } | 116 } |
| 117 bool is_marked_to_delete() const { return ASSIGNED_BUT_MARKED == state_; } | 117 bool is_marked_to_delete() const { return ASSIGNED_BUT_MARKED == state_; } |
| 118 const GURL url() const { return url_; } | 118 const GURL url() const { return url_; } |
| 119 | 119 |
| 120 bool HasUrl(const GURL& url) const { | 120 bool HasUrl(const GURL& url) const { |
| 121 return url_ == url; | 121 return url_ == url; |
| 122 } | 122 } |
| 123 | 123 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 GURL referring_url_; | 187 GURL referring_url_; |
| 188 | 188 |
| 189 // We put these objects into a std::map, and hence we | 189 // We put these objects into a std::map, and hence we |
| 190 // need some "evil" constructors. | 190 // need some "evil" constructors. |
| 191 // DISALLOW_COPY_AND_ASSIGN(UrlInfo); | 191 // DISALLOW_COPY_AND_ASSIGN(UrlInfo); |
| 192 }; | 192 }; |
| 193 | 193 |
| 194 } // namespace chrome_browser_net | 194 } // namespace chrome_browser_net |
| 195 | 195 |
| 196 #endif // CHROME_BROWSER_NET_URL_INFO_H_ | 196 #endif // CHROME_BROWSER_NET_URL_INFO_H_ |
| OLD | NEW |