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

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: 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
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 namespace { 47 namespace {
48 48
49 const CString utf8BlobUUID(Blob* blob) 49 const CString utf8BlobUUID(Blob* blob)
50 { 50 {
51 return blob->uuid().utf8(); 51 return blob->uuid().utf8();
52 } 52 }
53 53
54 const CString utf8FilePath(Blob* blob) 54 const CString utf8FilePath(Blob* blob)
55 { 55 {
56 return blob->isFile() ? toFile(blob)->path().utf8() : ""; 56 return blob->isOnFilesystem() ? toFile(blob)->path().utf8() : "";
57 } 57 }
58 58
59 } // namespace 59 } // namespace
60 60
61 static const double progressNotificationIntervalMS = 50; 61 static const double progressNotificationIntervalMS = 50;
62 62
63 PassRefPtr<FileReader> FileReader::create(ExecutionContext* context) 63 PassRefPtr<FileReader> FileReader::create(ExecutionContext* context)
64 { 64 {
65 RefPtr<FileReader> fileReader(adoptRef(new FileReader(context))); 65 RefPtr<FileReader> fileReader(adoptRef(new FileReader(context)));
66 fileReader->suspendIfNeeded(); 66 fileReader->suspendIfNeeded();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 284
285 String FileReader::stringResult() 285 String FileReader::stringResult()
286 { 286 {
287 if (!m_loader || m_error) 287 if (!m_loader || m_error)
288 return String(); 288 return String();
289 return m_loader->stringResult(); 289 return m_loader->stringResult();
290 } 290 }
291 291
292 } // namespace WebCore 292 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698