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

Side by Side Diff: third_party/WebKit/Source/wtf/DateMath.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * Copyright (C) 2007-2009 Torch Mobile, Inc. 5 * Copyright (C) 2007-2009 Torch Mobile, Inc.
6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net) 6 * Copyright (C) 2010 &yet, LLC. (nate@andyet.net)
7 * 7 *
8 * The Original Code is Mozilla Communicator client code, released 8 * The Original Code is Mozilla Communicator client code, released
9 * March 31, 1998. 9 * March 31, 1998.
10 * 10 *
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 ++dateString; // skip the ':' 740 ++dateString; // skip the ':'
741 int o2; 741 int o2;
742 if (!parseInt(dateString, &newPosStr, 10, &o2)) 742 if (!parseInt(dateString, &newPosStr, 10, &o2))
743 return std::numeric_limits<double>::quiet_NaN(); 743 return std::numeric_limits<double>::quiet_NaN();
744 dateString = newPosStr; 744 dateString = newPosStr;
745 offset = (o * 60 + o2) * sgn; 745 offset = (o * 60 + o2) * sgn;
746 } 746 }
747 haveTZ = true; 747 haveTZ = true;
748 } else { 748 } else {
749 for (size_t i = 0; i < WTF_ARRAY_LENGTH(known_zones); ++i) { 749 for (size_t i = 0; i < WTF_ARRAY_LENGTH(known_zones); ++i) {
750 if (0 == strncasecmp(dateString, known_zones[i].tzName, 750 if (0 ==
751 strlen(known_zones[i].tzName))) { 751 strncasecmp(dateString, known_zones[i].tzName,
752 strlen(known_zones[i].tzName))) {
752 offset = known_zones[i].tzOffset; 753 offset = known_zones[i].tzOffset;
753 dateString += strlen(known_zones[i].tzName); 754 dateString += strlen(known_zones[i].tzName);
754 haveTZ = true; 755 haveTZ = true;
755 break; 756 break;
756 } 757 }
757 } 758 }
758 } 759 }
759 } 760 }
760 761
761 skipSpacesAndComments(dateString); 762 skipSpacesAndComments(dateString);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 return stringBuilder.toString(); 834 return stringBuilder.toString();
834 } 835 }
835 836
836 double convertToLocalTime(double ms) { 837 double convertToLocalTime(double ms) {
837 double utcOffset = calculateUTCOffset(); 838 double utcOffset = calculateUTCOffset();
838 double dstOffset = calculateDSTOffset(ms, utcOffset); 839 double dstOffset = calculateDSTOffset(ms, utcOffset);
839 return (ms + utcOffset + dstOffset); 840 return (ms + utcOffset + dstOffset);
840 } 841 }
841 842
842 } // namespace WTF 843 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WebViewTest.cpp ('k') | third_party/WebKit/Source/wtf/InstanceCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698