| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/file_manager/filesystem_api_util.h" | 5 #include "chrome/browser/chromeos/file_manager/filesystem_api_util.h" |
| 6 | 6 |
| 7 #include "base/callback.h" | 7 #include "base/callback.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/chromeos/drive/file_errors.h" | 10 #include "chrome/browser/chromeos/drive/file_errors.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 void IsNonNativeLocalPathDirectory( | 121 void IsNonNativeLocalPathDirectory( |
| 122 Profile* profile, | 122 Profile* profile, |
| 123 const base::FilePath& path, | 123 const base::FilePath& path, |
| 124 const base::Callback<void(bool)>& callback) { | 124 const base::Callback<void(bool)>& callback) { |
| 125 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 125 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 126 | 126 |
| 127 // TODO(kinaba): support other types of volumes besides Drive. | 127 // TODO(kinaba): support other types of volumes besides Drive. |
| 128 drive::util::CheckDirectoryExists( | 128 drive::util::CheckDirectoryExists( |
| 129 profile, | 129 profile, path, base::Bind(&CheckDirectoryAfterDriveCheck, callback)); |
| 130 path, | |
| 131 base::Bind(&CheckDirectoryAfterDriveCheck, callback)); | |
| 132 } | 130 } |
| 133 | 131 |
| 134 void PrepareNonNativeLocalPathWritableFile( | 132 void PrepareNonNativeLocalPathWritableFile( |
| 135 Profile* profile, | 133 Profile* profile, |
| 136 const base::FilePath& path, | 134 const base::FilePath& path, |
| 137 const base::Callback<void(bool)>& callback) { | 135 const base::Callback<void(bool)>& callback) { |
| 138 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 136 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 139 | 137 |
| 140 // TODO(kinaba): support other types of volumes besides Drive. | 138 // TODO(kinaba): support other types of volumes besides Drive. |
| 141 drive::util::PrepareWritableFileAndRun( | 139 drive::util::PrepareWritableFileAndRun( |
| 142 profile, | 140 profile, path, base::Bind(&CheckWritableAfterDriveCheck, callback)); |
| 143 path, | |
| 144 base::Bind(&CheckWritableAfterDriveCheck, callback)); | |
| 145 } | 141 } |
| 146 | 142 |
| 147 } // namespace util | 143 } // namespace util |
| 148 } // namespace file_manager | 144 } // namespace file_manager |
| OLD | NEW |