OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 // Windows specific time functions. | 5 // Windows specific time functions. |
6 | 6 |
7 #include <time.h> | 7 #include <time.h> |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "chrome/browser/sync/notifier/base/time.h" | 10 #include "chrome/common/net/notifier/base/time.h" |
11 | 11 |
12 #include "chrome/browser/sync/notifier/base/utils.h" | 12 #include "chrome/common/net/notifier/base/utils.h" |
13 #include "talk/base/common.h" | 13 #include "talk/base/common.h" |
14 #include "talk/base/logging.h" | 14 #include "talk/base/logging.h" |
15 | 15 |
16 namespace notifier { | 16 namespace notifier { |
17 | 17 |
18 time64 FileTimeToTime64(const FILETIME& file_time) { | 18 time64 FileTimeToTime64(const FILETIME& file_time) { |
19 return static_cast<time64>(file_time.dwHighDateTime) << 32 | | 19 return static_cast<time64>(file_time.dwHighDateTime) << 32 | |
20 file_time.dwLowDateTime; | 20 file_time.dwLowDateTime; |
21 } | 21 } |
22 | 22 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 if (!::FileTimeToSystemTime(&file_time, &sys_time)) { | 95 if (!::FileTimeToSystemTime(&file_time, &sys_time)) { |
96 return false; | 96 return false; |
97 } | 97 } |
98 | 98 |
99 SystemTimeToTmTime(sys_time, tm); | 99 SystemTimeToTmTime(sys_time, tm); |
100 | 100 |
101 return true; | 101 return true; |
102 } | 102 } |
103 | 103 |
104 } // namespace notifier | 104 } // namespace notifier |
OLD | NEW |