Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / network_time / network_time.h
blob90d5a938e2aae11a557e32f5083ad5af94bf1517
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_NETWORK_TIME_NETWORK_TIME_H_
6 #define CHROME_BROWSER_NETWORK_TIME_NETWORK_TIME_H_
8 #include "base/time/time.h"
10 // NetworkTime is a wrapper for Time that indicates that the underlying Time
11 // object represents real (network) time. This is to force conversions (from
12 // local to network time and vice versa) to be explicit.
13 class NetworkTime {
14 public:
15 NetworkTime() {}
16 explicit NetworkTime(base::Time t) : time_internal_(t) {}
17 ~NetworkTime() {}
19 base::Time GetTime() const {
20 return time_internal_;
23 private:
24 // Network time value.
25 base::Time time_internal_;
28 #endif // CHROME_BROWSER_NETWORK_TIME_NETWORK_TIME_H_