Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Side by Side Diff: base/third_party/nspr/prtime.cc

Issue 1538743002: Switch to standard integer types in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DEPS roll too Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/third_party/icu/icu_utf.cc ('k') | base/third_party/symbolize/symbolize.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Portions are Copyright (C) 2011 Google Inc */ 1 /* Portions are Copyright (C) 2011 Google Inc */
2 /* ***** BEGIN LICENSE BLOCK ***** 2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * 4 *
5 * The contents of this file are subject to the Mozilla Public License Version 5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with 6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at 7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/ 8 * http://www.mozilla.org/MPL/
9 * 9 *
10 * Software distributed under the License is distributed on an "AS IS" basis, 10 * Software distributed under the License is distributed on an "AS IS" basis,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * All types and macros are defined in the base/third_party/prtime.h file. 58 * All types and macros are defined in the base/third_party/prtime.h file.
59 * These have been copied from the following nspr files. We have only copied 59 * These have been copied from the following nspr files. We have only copied
60 * over the types we need. 60 * over the types we need.
61 * 1. prtime.h 61 * 1. prtime.h
62 * 2. prtypes.h 62 * 2. prtypes.h
63 * 3. prlong.h 63 * 3. prlong.h
64 * 64 *
65 * Unit tests are in base/time/pr_time_unittest.cc. 65 * Unit tests are in base/time/pr_time_unittest.cc.
66 */ 66 */
67 67
68 #include <limits.h>
69
68 #include "base/logging.h" 70 #include "base/logging.h"
69 #include "base/third_party/nspr/prtime.h" 71 #include "base/third_party/nspr/prtime.h"
70 #include "build/build_config.h" 72 #include "build/build_config.h"
71 73
72 #if defined(OS_WIN) 74 #if defined(OS_WIN)
73 #include <windows.h> 75 #include <windows.h>
74 #elif defined(OS_MACOSX) 76 #elif defined(OS_MACOSX)
75 #include <CoreFoundation/CoreFoundation.h> 77 #include <CoreFoundation/CoreFoundation.h>
76 #elif defined(OS_ANDROID) 78 #elif defined(OS_ANDROID)
77 #include <ctype.h> 79 #include <ctype.h>
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 + 60 * localTime.tm_hour 1245 + 60 * localTime.tm_hour
1244 + 1440 * (localTime.tm_mday - 2); 1246 + 1440 * (localTime.tm_mday - 2);
1245 } 1247 }
1246 1248
1247 result->tm_params.tp_gmt_offset = zone_offset * 60; 1249 result->tm_params.tp_gmt_offset = zone_offset * 60;
1248 result->tm_params.tp_dst_offset = dst_offset * 60; 1250 result->tm_params.tp_dst_offset = dst_offset * 60;
1249 1251
1250 *result_imploded = PR_ImplodeTime(result); 1252 *result_imploded = PR_ImplodeTime(result);
1251 return PR_SUCCESS; 1253 return PR_SUCCESS;
1252 } 1254 }
OLDNEW
« no previous file with comments | « base/third_party/icu/icu_utf.cc ('k') | base/third_party/symbolize/symbolize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698