Chromium Code Reviews| Index: base/time.h |
| diff --git a/base/time.h b/base/time.h |
| index aa97f0ab4f422c807247e5c226b565fff21ac6c8..95ecd1c46ea87590cfd4039743137433280b181d 100644 |
| --- a/base/time.h |
| +++ b/base/time.h |
| @@ -492,6 +492,13 @@ class BASE_EXPORT TimeTicks { |
| return ticks_; |
| } |
| + // Converts an integer value representing TimeTicks to a class. This is used |
| + // when deserializing a |TimeTicks| structure, using a value that originated |
| + // from |TimeTicks::ToInternalValue()|. |
| + static TimeTicks FromInternalValue(int64 ticks) { |
| + return TimeTicks(ticks); |
| + } |
|
wtc
2011/08/26 21:55:41
It is safe to deserialize this way only if all the
James Simonsen
2011/08/26 22:34:29
Pavel and I discussed this earlier. All of the pla
wtc
2011/08/26 23:39:15
If you are relying on this fact, and are deseriali
|
| + |
| TimeTicks& operator=(TimeTicks other) { |
| ticks_ = other.ticks_; |
| return *this; |