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

Side by Side Diff: chrome/browser/chromeos/fileapi/file_system_backend.cc

Issue 23601005: Deprecate FileSystemBackend::GetFileUtil() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fileapi/file_system_backend.h" 5 #include "chrome/browser/chromeos/fileapi/file_system_backend.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 std::vector<fileapi::MountPoints::MountPointInfo> mount_points; 207 std::vector<fileapi::MountPoints::MountPointInfo> mount_points;
208 mount_points_->AddMountPointInfosTo(&mount_points); 208 mount_points_->AddMountPointInfosTo(&mount_points);
209 system_mount_points_->AddMountPointInfosTo(&mount_points); 209 system_mount_points_->AddMountPointInfosTo(&mount_points);
210 210
211 std::vector<base::FilePath> root_dirs; 211 std::vector<base::FilePath> root_dirs;
212 for (size_t i = 0; i < mount_points.size(); ++i) 212 for (size_t i = 0; i < mount_points.size(); ++i)
213 root_dirs.push_back(mount_points[i].path); 213 root_dirs.push_back(mount_points[i].path);
214 return root_dirs; 214 return root_dirs;
215 } 215 }
216 216
217 fileapi::FileSystemFileUtil* FileSystemBackend::GetFileUtil(
218 fileapi::FileSystemType type) {
219 DCHECK(type == fileapi::kFileSystemTypeNativeLocal ||
220 type == fileapi::kFileSystemTypeRestrictedNativeLocal);
221 return local_file_util_->sync_file_util();
222 }
223
224 fileapi::AsyncFileUtil* FileSystemBackend::GetAsyncFileUtil( 217 fileapi::AsyncFileUtil* FileSystemBackend::GetAsyncFileUtil(
225 fileapi::FileSystemType type) { 218 fileapi::FileSystemType type) {
226 if (type == fileapi::kFileSystemTypeDrive) 219 if (type == fileapi::kFileSystemTypeDrive)
227 return drive_delegate_->GetAsyncFileUtil(type); 220 return drive_delegate_->GetAsyncFileUtil(type);
228 221
229 DCHECK(type == fileapi::kFileSystemTypeNativeLocal || 222 DCHECK(type == fileapi::kFileSystemTypeNativeLocal ||
230 type == fileapi::kFileSystemTypeRestrictedNativeLocal); 223 type == fileapi::kFileSystemTypeRestrictedNativeLocal);
231 return local_file_util_.get(); 224 return local_file_util_.get();
232 } 225 }
233 226
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 std::string mount_name = url.filesystem_id(); 313 std::string mount_name = url.filesystem_id();
321 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && 314 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) &&
322 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { 315 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) {
323 return base::FilePath(); 316 return base::FilePath();
324 } 317 }
325 318
326 return root_path.DirName(); 319 return root_path.DirName();
327 } 320 }
328 321
329 } // namespace chromeos 322 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698