OLD | NEW |
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 #include "chrome/browser/net/url_info.h" | 5 #include "chrome/browser/net/url_info.h" |
6 | 6 |
7 #include <ctype.h> | 7 #include <ctype.h> |
8 #include <math.h> | 8 #include <math.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 UrlInfo::UrlInfo() | 73 UrlInfo::UrlInfo() |
74 : state_(PENDING), | 74 : state_(PENDING), |
75 old_prequeue_state_(state_), | 75 old_prequeue_state_(state_), |
76 resolve_duration_(NullDuration()), | 76 resolve_duration_(NullDuration()), |
77 queue_duration_(NullDuration()), | 77 queue_duration_(NullDuration()), |
78 sequence_number_(0), | 78 sequence_number_(0), |
79 motivation_(NO_PREFETCH_MOTIVATION), | 79 motivation_(NO_PREFETCH_MOTIVATION), |
80 was_linked_(false) { | 80 was_linked_(false) { |
81 } | 81 } |
82 | 82 |
| 83 UrlInfo::UrlInfo(const UrlInfo& other) = default; |
| 84 |
83 UrlInfo::~UrlInfo() {} | 85 UrlInfo::~UrlInfo() {} |
84 | 86 |
85 bool UrlInfo::NeedsDnsUpdate() { | 87 bool UrlInfo::NeedsDnsUpdate() { |
86 switch (state_) { | 88 switch (state_) { |
87 case PENDING: // Just now created info. | 89 case PENDING: // Just now created info. |
88 return true; | 90 return true; |
89 | 91 |
90 case QUEUED: // In queue. | 92 case QUEUED: // In queue. |
91 case ASSIGNED: // It's being resolved. | 93 case ASSIGNED: // It's being resolved. |
92 case ASSIGNED_BUT_MARKED: // It's being resolved. | 94 case ASSIGNED_BUT_MARKED: // It's being resolved. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 | 372 |
371 case LEARNED_REFERAL_MOTIVATED: | 373 case LEARNED_REFERAL_MOTIVATED: |
372 return RemoveJs(referring_url_.spec()); | 374 return RemoveJs(referring_url_.spec()); |
373 | 375 |
374 default: | 376 default: |
375 return std::string(); | 377 return std::string(); |
376 } | 378 } |
377 } | 379 } |
378 | 380 |
379 } // namespace chrome_browser_net | 381 } // namespace chrome_browser_net |
OLD | NEW |