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

Unified Diff: Source/platform/mhtml/MHTMLArchive.cpp

Issue 288733002: Kill WTF::GregorianDateTime class (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | Source/wtf/GregorianDateTime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/mhtml/MHTMLArchive.cpp
diff --git a/Source/platform/mhtml/MHTMLArchive.cpp b/Source/platform/mhtml/MHTMLArchive.cpp
index e22207361fd23399127fff7b861bb3bfe97b3784..fe1ecc39b2080e043e174b9b53cb1c837f2daf7d 100644
--- a/Source/platform/mhtml/MHTMLArchive.cpp
+++ b/Source/platform/mhtml/MHTMLArchive.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "platform/mhtml/MHTMLArchive.h"
+#include "platform/DateComponents.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/SerializedResource.h"
#include "platform/SharedBuffer.h"
@@ -39,7 +40,6 @@
#include "platform/weborigin/SchemeRegistry.h"
#include "wtf/CryptographicallyRandomNumber.h"
#include "wtf/DateMath.h"
-#include "wtf/GregorianDateTime.h"
#include "wtf/text/Base64.h"
#include "wtf/text/StringBuilder.h"
@@ -124,9 +124,9 @@ PassRefPtr<SharedBuffer> MHTMLArchive::generateMHTMLData(const Vector<Serialized
String boundary = generateRandomBoundary();
String endOfResourceBoundary = "--" + boundary + "\r\n";
- GregorianDateTime now;
- now.setToCurrentLocalTime();
- String dateString = makeRFC2822DateString(now.weekDay(), now.monthDay(), now.month(), now.year(), now.hour(), now.minute(), now.second(), now.utcOffset() / 60);
+ DateComponents now;
+ now.setMillisecondsSinceEpochForDateTime(currentTimeMS());
+ String dateString = makeRFC2822DateString(now.weekDay(), now.monthDay(), now.month(), now.fullYear(), now.hour(), now.minute(), now.second(), 0);
StringBuilder stringBuilder;
stringBuilder.append("From: <Saved by WebKit>\r\n");
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | Source/wtf/GregorianDateTime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698