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

Side by Side Diff: chrome/browser/file_system/file_system_operation.cc

Issue 3293009: Add recursive flag to file_util_proxy::CreateDirectory (Closed)
Patch Set: rebased Created 10 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
« no previous file with comments | « base/file_util_proxy.cc ('k') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/file_system/file_system_operation.h" 5 #include "chrome/browser/file_system/file_system_operation.h"
6 6
7 #include "chrome/browser/chrome_thread.h" 7 #include "chrome/browser/chrome_thread.h"
8 #include "chrome/browser/file_system/file_system_operation_client.h" 8 #include "chrome/browser/file_system/file_system_operation_client.h"
9 #include "third_party/WebKit/WebKit/chromium/public/WebFileError.h" 9 #include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 exclusive ? &FileSystemOperation::DidCreateFileExclusive 46 exclusive ? &FileSystemOperation::DidCreateFileExclusive
47 : &FileSystemOperation::DidCreateFileNonExclusive)); 47 : &FileSystemOperation::DidCreateFileNonExclusive));
48 } 48 }
49 49
50 void FileSystemOperation::CreateDirectory(const FilePath& path, 50 void FileSystemOperation::CreateDirectory(const FilePath& path,
51 bool exclusive) { 51 bool exclusive) {
52 DCHECK(!operation_pending_); 52 DCHECK(!operation_pending_);
53 operation_pending_ = true; 53 operation_pending_ = true;
54 base::FileUtilProxy::CreateDirectory( 54 base::FileUtilProxy::CreateDirectory(
55 ChromeThread::GetMessageLoopProxyForThread( 55 ChromeThread::GetMessageLoopProxyForThread(
56 ChromeThread::FILE), path, exclusive, 56 ChromeThread::FILE), path, exclusive, false, /* recursive */
57 callback_factory_.NewCallback( 57 callback_factory_.NewCallback(
58 &FileSystemOperation::DidFinishFileOperation)); 58 &FileSystemOperation::DidFinishFileOperation));
59 } 59 }
60 60
61 void FileSystemOperation::Copy(const FilePath& src_path, 61 void FileSystemOperation::Copy(const FilePath& src_path,
62 const FilePath& dest_path) { 62 const FilePath& dest_path) {
63 DCHECK(!operation_pending_); 63 DCHECK(!operation_pending_);
64 operation_pending_ = true; 64 operation_pending_ = true;
65 base::FileUtilProxy::Copy( 65 base::FileUtilProxy::Copy(
66 ChromeThread::GetMessageLoopProxyForThread( 66 ChromeThread::GetMessageLoopProxyForThread(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 void FileSystemOperation::DidReadDirectory( 199 void FileSystemOperation::DidReadDirectory(
200 base::PlatformFileError rv, 200 base::PlatformFileError rv,
201 const std::vector<base::file_util_proxy::Entry>& entries) { 201 const std::vector<base::file_util_proxy::Entry>& entries) {
202 if (rv == base::PLATFORM_FILE_OK) 202 if (rv == base::PLATFORM_FILE_OK)
203 client_->DidReadDirectory( 203 client_->DidReadDirectory(
204 entries, false /* has_more */ , request_id_); 204 entries, false /* has_more */ , request_id_);
205 else 205 else
206 client_->DidFail(PlatformToWebkitError(rv), request_id_); 206 client_->DidFail(PlatformToWebkitError(rv), request_id_);
207 } 207 }
OLDNEW
« no previous file with comments | « base/file_util_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698