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

Side by Side Diff: webkit/fileapi/file_system_operation.cc

Issue 7038032: Fix PP_FileOpenFlags_Dev handling: (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Make changes according to Darin's suggestions. Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/fileapi/file_system_operation.h" 5 #include "webkit/fileapi/file_system_operation.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "net/base/escape.h" 9 #include "net/base/escape.h"
10 #include "net/url_request/url_request_context.h" 10 #include "net/url_request/url_request_context.h"
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 FileSystemType type; 539 FileSystemType type;
540 FileSystemFileUtil* file_system_file_util; 540 FileSystemFileUtil* file_system_file_util;
541 if (file_flags & ( 541 if (file_flags & (
542 (base::PLATFORM_FILE_ENUMERATE | base::PLATFORM_FILE_TEMPORARY | 542 (base::PLATFORM_FILE_ENUMERATE | base::PLATFORM_FILE_TEMPORARY |
543 base::PLATFORM_FILE_HIDDEN))) { 543 base::PLATFORM_FILE_HIDDEN))) {
544 delete this; 544 delete this;
545 return; 545 return;
546 } 546 }
547 if (file_flags & 547 if (file_flags &
548 (base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_OPEN_ALWAYS | 548 (base::PLATFORM_FILE_CREATE | base::PLATFORM_FILE_OPEN_ALWAYS |
549 base::PLATFORM_FILE_CREATE_ALWAYS | 549 base::PLATFORM_FILE_CREATE_ALWAYS | base::PLATFORM_FILE_OPEN_TRUNCATED |
550 base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE | 550 base::PLATFORM_FILE_WRITE | base::PLATFORM_FILE_EXCLUSIVE_WRITE |
551 base::PLATFORM_FILE_DELETE_ON_CLOSE | base::PLATFORM_FILE_TRUNCATE | 551 base::PLATFORM_FILE_DELETE_ON_CLOSE |
552 base::PLATFORM_FILE_WRITE_ATTRIBUTES)) { 552 base::PLATFORM_FILE_WRITE_ATTRIBUTES)) {
553 if (!VerifyFileSystemPathForWrite(path, true /* create */, &origin_url, 553 if (!VerifyFileSystemPathForWrite(path, true /* create */, &origin_url,
554 &type, &virtual_path, &file_system_file_util)) { 554 &type, &virtual_path, &file_system_file_util)) {
555 delete this; 555 delete this;
556 return; 556 return;
557 } 557 }
558 } else { 558 } else {
559 if (!VerifyFileSystemPathForRead(path, &origin_url, &type, &virtual_path, 559 if (!VerifyFileSystemPathForRead(path, &origin_url, &type, &virtual_path,
560 &file_system_file_util)) { 560 &file_system_file_util)) {
561 delete this; 561 delete this;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 } 868 }
869 DCHECK(file_system_file_util); 869 DCHECK(file_system_file_util);
870 *file_system_file_util = 870 *file_system_file_util =
871 file_system_context()->path_manager()->GetFileSystemFileUtil(*type); 871 file_system_context()->path_manager()->GetFileSystemFileUtil(*type);
872 DCHECK(*file_system_file_util); 872 DCHECK(*file_system_file_util);
873 873
874 return true; 874 return true;
875 } 875 }
876 876
877 } // namespace fileapi 877 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698