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

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

Issue 19632004: FileAPI: Add Initialize() function to FileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove const qualifier Created 7 years, 5 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 case fileapi::kFileSystemTypeDrive: 99 case fileapi::kFileSystemTypeDrive:
100 case fileapi::kFileSystemTypeRestrictedNativeLocal: 100 case fileapi::kFileSystemTypeRestrictedNativeLocal:
101 case fileapi::kFileSystemTypeNativeLocal: 101 case fileapi::kFileSystemTypeNativeLocal:
102 case fileapi::kFileSystemTypeNativeForPlatformApp: 102 case fileapi::kFileSystemTypeNativeForPlatformApp:
103 return true; 103 return true;
104 default: 104 default:
105 return false; 105 return false;
106 } 106 }
107 } 107 }
108 108
109 void FileSystemBackend::InitializeFileSystem( 109 void FileSystemBackend::Initialize(fileapi::FileSystemContext* context) {
110 }
111
112 void FileSystemBackend::OpenFileSystem(
110 const GURL& origin_url, 113 const GURL& origin_url,
111 fileapi::FileSystemType type, 114 fileapi::FileSystemType type,
112 fileapi::OpenFileSystemMode mode, 115 fileapi::OpenFileSystemMode mode,
113 fileapi::FileSystemContext* context, 116 const OpenFileSystemCallback& callback) {
114 const InitializeFileSystemCallback& callback) {
115 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type)); 117 DCHECK(fileapi::IsolatedContext::IsIsolatedType(type));
116 // Nothing to validate for external filesystem. 118 // Nothing to validate for external filesystem.
117 callback.Run(GetFileSystemRootURI(origin_url, type), 119 callback.Run(GetFileSystemRootURI(origin_url, type),
118 GetFileSystemName(origin_url, type), 120 GetFileSystemName(origin_url, type),
119 base::PLATFORM_FILE_OK); 121 base::PLATFORM_FILE_OK);
120 } 122 }
121 123
122 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() { 124 fileapi::FileSystemQuotaUtil* FileSystemBackend::GetQuotaUtil() {
123 // No quota support. 125 // No quota support.
124 return NULL; 126 return NULL;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 std::string mount_name = url.filesystem_id(); 315 std::string mount_name = url.filesystem_id();
314 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) && 316 if (!mount_points_->GetRegisteredPath(mount_name, &root_path) &&
315 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) { 317 !system_mount_points_->GetRegisteredPath(mount_name, &root_path)) {
316 return base::FilePath(); 318 return base::FilePath();
317 } 319 }
318 320
319 return root_path.DirName(); 321 return root_path.DirName();
320 } 322 }
321 323
322 } // namespace chromeos 324 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698