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

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

Issue 10823273: Integrate external mount points to IsolatedContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove too strict DCHECK Created 8 years, 4 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 (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_context.h" 5 #include "webkit/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 return mount_point_provider->GetFileUtil(type); 106 return mount_point_provider->GetFileUtil(type);
107 } 107 }
108 108
109 FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider( 109 FileSystemMountPointProvider* FileSystemContext::GetMountPointProvider(
110 FileSystemType type) const { 110 FileSystemType type) const {
111 switch (type) { 111 switch (type) {
112 case kFileSystemTypeTemporary: 112 case kFileSystemTypeTemporary:
113 case kFileSystemTypePersistent: 113 case kFileSystemTypePersistent:
114 return sandbox_provider_.get(); 114 return sandbox_provider_.get();
115 case kFileSystemTypeExternal: 115 case kFileSystemTypeExternal:
116 case kFileSystemTypeDrive:
116 return external_provider_.get(); 117 return external_provider_.get();
117 case kFileSystemTypeIsolated: 118 case kFileSystemTypeIsolated:
118 case kFileSystemTypeDragged: 119 case kFileSystemTypeDragged:
119 case kFileSystemTypeNativeMedia: 120 case kFileSystemTypeNativeMedia:
120 case kFileSystemTypeDeviceMedia: 121 case kFileSystemTypeDeviceMedia:
121 return isolated_provider_.get(); 122 return isolated_provider_.get();
123 case kFileSystemTypeNativeLocal:
124 #if defined(OS_CHROMEOS)
125 return external_provider_.get();
126 #else
127 return isolated_provider_.get();
128 #endif
122 default: 129 default:
123 if (provider_map_.find(type) != provider_map_.end()) 130 if (provider_map_.find(type) != provider_map_.end())
124 return provider_map_.find(type)->second; 131 return provider_map_.find(type)->second;
125 // Fall through. 132 // Fall through.
126 case kFileSystemTypeUnknown: 133 case kFileSystemTypeUnknown:
127 NOTREACHED(); 134 NOTREACHED();
128 return NULL; 135 return NULL;
129 } 136 }
130 } 137 }
131 138
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() && 219 if (!task_runners_->io_task_runner()->RunsTasksOnCurrentThread() &&
213 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) { 220 task_runners_->io_task_runner()->DeleteSoon(FROM_HERE, this)) {
214 return; 221 return;
215 } 222 }
216 STLDeleteContainerPairSecondPointers(provider_map_.begin(), 223 STLDeleteContainerPairSecondPointers(provider_map_.begin(),
217 provider_map_.end()); 224 provider_map_.end());
218 delete this; 225 delete this;
219 } 226 }
220 227
221 } // namespace fileapi 228 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/chromeos/fileapi/cros_mount_point_provider.cc ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698