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

Side by Side Diff: Source/core/fileapi/FileReader.cpp

Issue 57483002: Implement File constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed most feedback. Created 7 years, 1 month 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.idl ('k') | Source/core/html/FormDataList.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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 namespace { 47 namespace {
48 48
49 #if !LOG_DISABLED 49 #if !LOG_DISABLED
50 const CString utf8BlobUUID(Blob* blob) 50 const CString utf8BlobUUID(Blob* blob)
51 { 51 {
52 return blob->uuid().utf8(); 52 return blob->uuid().utf8();
53 } 53 }
54 54
55 const CString utf8FilePath(Blob* blob) 55 const CString utf8FilePath(Blob* blob)
56 { 56 {
57 return blob->isFile() ? toFile(blob)->path().utf8() : ""; 57 return blob->hasBackingFile() ? toFile(blob)->path().utf8() : "";
58 } 58 }
59 #endif 59 #endif
60 60
61 } // namespace 61 } // namespace
62 62
63 static const double progressNotificationIntervalMS = 50; 63 static const double progressNotificationIntervalMS = 50;
64 64
65 PassRefPtr<FileReader> FileReader::create(ExecutionContext* context) 65 PassRefPtr<FileReader> FileReader::create(ExecutionContext* context)
66 { 66 {
67 RefPtr<FileReader> fileReader(adoptRef(new FileReader(context))); 67 RefPtr<FileReader> fileReader(adoptRef(new FileReader(context)));
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } 285 }
286 286
287 String FileReader::stringResult() 287 String FileReader::stringResult()
288 { 288 {
289 if (!m_loader || m_error) 289 if (!m_loader || m_error)
290 return String(); 290 return String();
291 return m_loader->stringResult(); 291 return m_loader->stringResult();
292 } 292 }
293 293
294 } // namespace WebCore 294 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.idl ('k') | Source/core/html/FormDataList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698