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

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

Issue 9104024: Initialized file_util variable to NULL. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 operation_context_.set_src_type(type); 779 operation_context_.set_src_type(type);
780 if (!operation_context_.src_file_util()) 780 if (!operation_context_.src_file_util())
781 operation_context_.set_src_file_util(file_util); 781 operation_context_.set_src_file_util(file_util);
782 return result; 782 return result;
783 } 783 }
784 784
785 bool FileSystemOperation::SetupSrcContextForWrite(const GURL& path, 785 bool FileSystemOperation::SetupSrcContextForWrite(const GURL& path,
786 bool create) { 786 bool create) {
787 GURL origin_url; 787 GURL origin_url;
788 FileSystemType type; 788 FileSystemType type;
789 FileSystemFileUtil* file_util; 789 FileSystemFileUtil* file_util = NULL;
790 bool result = VerifyFileSystemPathForWrite( 790 bool result = VerifyFileSystemPathForWrite(
791 path, create, &origin_url, &type, &src_virtual_path_, &file_util); 791 path, create, &origin_url, &type, &src_virtual_path_, &file_util);
792 operation_context_.set_src_origin_url(origin_url); 792 operation_context_.set_src_origin_url(origin_url);
793 operation_context_.set_src_type(type); 793 operation_context_.set_src_type(type);
794 if (!operation_context_.src_file_util()) 794 if (!operation_context_.src_file_util())
795 operation_context_.set_src_file_util(file_util); 795 operation_context_.set_src_file_util(file_util);
796 return result; 796 return result;
797 } 797 }
798 798
799 bool FileSystemOperation::SetupDestContextForWrite(const GURL& path, 799 bool FileSystemOperation::SetupDestContextForWrite(const GURL& path,
800 bool create) { 800 bool create) {
801 GURL origin_url; 801 GURL origin_url;
802 FileSystemType type; 802 FileSystemType type;
803 FileSystemFileUtil* file_util; 803 FileSystemFileUtil* file_util = NULL;
804 bool result = VerifyFileSystemPathForWrite( 804 bool result = VerifyFileSystemPathForWrite(
805 path, create, &origin_url, &type, &dest_virtual_path_, &file_util); 805 path, create, &origin_url, &type, &dest_virtual_path_, &file_util);
806 operation_context_.set_dest_origin_url(origin_url); 806 operation_context_.set_dest_origin_url(origin_url);
807 operation_context_.set_dest_type(type); 807 operation_context_.set_dest_type(type);
808 if (!operation_context_.dest_file_util()) 808 if (!operation_context_.dest_file_util())
809 operation_context_.set_dest_file_util(file_util); 809 operation_context_.set_dest_file_util(file_util);
810 return result; 810 return result;
811 } 811 }
812 812
813 } // namespace fileapi 813 } // namespace fileapi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698