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

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

Issue 516763002: Fix userVisibility for files in ChromeOS filesystems. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/modules/filesystem/DOMFileSystemBase.h » ('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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 File::File(const String& name, double modificationTime, PassRefPtr<BlobDataHandl e> blobDataHandle) 130 File::File(const String& name, double modificationTime, PassRefPtr<BlobDataHandl e> blobDataHandle)
131 : Blob(blobDataHandle) 131 : Blob(blobDataHandle)
132 , m_hasBackingFile(false) 132 , m_hasBackingFile(false)
133 , m_userVisibility(File::IsNotUserVisible) 133 , m_userVisibility(File::IsNotUserVisible)
134 , m_name(name) 134 , m_name(name)
135 , m_snapshotSize(Blob::size()) 135 , m_snapshotSize(Blob::size())
136 , m_snapshotModificationTime(modificationTime) 136 , m_snapshotModificationTime(modificationTime)
137 { 137 {
138 } 138 }
139 139
140 File::File(const String& name, const FileMetadata& metadata) 140 File::File(const String& name, const FileMetadata& metadata, UserVisibility user Visibility)
141 : Blob(BlobDataHandle::create(createBlobDataForFileWithMetadata(name, metada ta), metadata.length)) 141 : Blob(BlobDataHandle::create(createBlobDataForFileWithMetadata(name, metada ta), metadata.length))
142 , m_hasBackingFile(true) 142 , m_hasBackingFile(true)
143 , m_userVisibility(File::IsNotUserVisible) 143 , m_userVisibility(userVisibility)
144 , m_path(metadata.platformPath) 144 , m_path(metadata.platformPath)
145 , m_name(name) 145 , m_name(name)
146 , m_snapshotSize(metadata.length) 146 , m_snapshotSize(metadata.length)
147 , m_snapshotModificationTime(metadata.modificationTime) 147 , m_snapshotModificationTime(metadata.modificationTime)
148 { 148 {
149 } 149 }
150 150
151 File::File(const KURL& fileSystemURL, const FileMetadata& metadata) 151 File::File(const KURL& fileSystemURL, const FileMetadata& metadata)
152 : Blob(BlobDataHandle::create(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length)) 152 : Blob(BlobDataHandle::create(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length))
153 , m_hasBackingFile(true) 153 , m_hasBackingFile(true)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 captureSnapshot(size, modificationTime); 290 captureSnapshot(size, modificationTime);
291 if (!m_fileSystemURL.isEmpty()) { 291 if (!m_fileSystemURL.isEmpty()) {
292 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime) ; 292 blobData.appendFileSystemURL(m_fileSystemURL, 0, size, modificationTime) ;
293 return; 293 return;
294 } 294 }
295 ASSERT(!m_path.isEmpty()); 295 ASSERT(!m_path.isEmpty());
296 blobData.appendFile(m_path, 0, size, modificationTime); 296 blobData.appendFile(m_path, 0, size, modificationTime);
297 } 297 }
298 298
299 } // namespace blink 299 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fileapi/File.h ('k') | Source/modules/filesystem/DOMFileSystemBase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698