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

Side by Side Diff: Source/core/html/FormDataList.cpp

Issue 900773003: Revert of Upgrade Blink to milliseconds-based last modified filetimes, part 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sof-fileinfo-modtime-in-ms-1
Patch Set: Created 5 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
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/core/html/forms/FileInputTypeTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 if (value.blob()->isFile()) { 131 if (value.blob()->isFile()) {
132 File* file = toFile(value.blob()); 132 File* file = toFile(value.blob());
133 if (value.filename().isNull()) 133 if (value.filename().isNull())
134 return Entry(name, file); 134 return Entry(name, file);
135 return Entry(name, file->clone(value.filename())); 135 return Entry(name, file->clone(value.filename()));
136 } 136 }
137 137
138 String filename = value.filename(); 138 String filename = value.filename();
139 if (filename.isNull()) 139 if (filename.isNull())
140 filename = "blob"; 140 filename = "blob";
141 return Entry(name, File::create(filename, currentTimeMS(), value.blob()->blo bDataHandle())); 141 return Entry(name, File::create(filename, currentTime(), value.blob()->blobD ataHandle()));
142 } 142 }
143 143
144 bool FormDataList::hasEntry(const String& key) const 144 bool FormDataList::hasEntry(const String& key) const
145 { 145 {
146 const CString keyData = encodeAndNormalize(key); 146 const CString keyData = encodeAndNormalize(key);
147 const FormDataListItems& items = this->items(); 147 const FormDataListItems& items = this->items();
148 size_t formDataListSize = items.size(); 148 size_t formDataListSize = items.size();
149 ASSERT(!(formDataListSize % 2)); 149 ASSERT(!(formDataListSize % 2));
150 for (size_t i = 0; i < formDataListSize; i += 2) { 150 for (size_t i = 0; i < formDataListSize; i += 2) {
151 const FormDataList::Item& key = items[i]; 151 const FormDataList::Item& key = items[i];
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 { 298 {
299 visitor->trace(m_file); 299 visitor->trace(m_file);
300 } 300 }
301 301
302 void FormDataList::Item::trace(Visitor* visitor) 302 void FormDataList::Item::trace(Visitor* visitor)
303 { 303 {
304 visitor->trace(m_blob); 304 visitor->trace(m_blob);
305 } 305 }
306 306
307 } // namespace blink 307 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.cpp ('k') | Source/core/html/forms/FileInputTypeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698