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

Side by Side Diff: content/browser/file_system/file_system_dispatcher_host.cc

Issue 7470037: [Refactor] to rename and re-layer the file_util stack layers. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased on the svn tree. Created 9 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/file_system/file_system_dispatcher_host.h" 5 #include "content/browser/file_system/file_system_dispatcher_host.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 const GURL& path, FilePath* platform_path) { 287 const GURL& path, FilePath* platform_path) {
288 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 288 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
289 DCHECK(platform_path); 289 DCHECK(platform_path);
290 *platform_path = FilePath(); 290 *platform_path = FilePath();
291 base::PlatformFileInfo info; 291 base::PlatformFileInfo info;
292 GURL origin_url; 292 GURL origin_url;
293 fileapi::FileSystemType type; 293 fileapi::FileSystemType type;
294 FilePath virtual_path; 294 FilePath virtual_path;
295 if (!CrackFileSystemURL(path, &origin_url, &type, &virtual_path)) 295 if (!CrackFileSystemURL(path, &origin_url, &type, &virtual_path))
296 return; 296 return;
297 FileSystemFileUtil* file_util = 297 FileSystemFileUtil* file_util = context_->path_manager()->GetFileUtil(type);
298 context_->path_manager()->GetFileSystemFileUtil(type);
299 if (!file_util) 298 if (!file_util)
300 return; 299 return;
301 FileSystemOperationContext operation_context(context_, file_util); 300 FileSystemOperationContext operation_context(context_, file_util);
302 operation_context.set_src_origin_url(origin_url); 301 operation_context.set_src_origin_url(origin_url);
303 operation_context.set_src_type(type); 302 operation_context.set_src_type(type);
304 file_util->GetFileInfo(&operation_context, virtual_path, 303 file_util->GetFileInfo(&operation_context, virtual_path,
305 &info, platform_path); 304 &info, platform_path);
306 } 305 }
307 306
308 FileSystemOperation* FileSystemDispatcherHost::GetNewOperation( 307 FileSystemOperation* FileSystemDispatcherHost::GetNewOperation(
309 int request_id) { 308 int request_id) {
310 BrowserFileSystemCallbackDispatcher* dispatcher = 309 BrowserFileSystemCallbackDispatcher* dispatcher =
311 new BrowserFileSystemCallbackDispatcher(this, request_id); 310 new BrowserFileSystemCallbackDispatcher(this, request_id);
312 FileSystemOperation* operation = new FileSystemOperation( 311 FileSystemOperation* operation = new FileSystemOperation(
313 dispatcher, 312 dispatcher,
314 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 313 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
315 context_, 314 context_,
316 NULL); 315 NULL);
317 operations_.AddWithID(operation, request_id); 316 operations_.AddWithID(operation, request_id);
318 return operation; 317 return operation;
319 } 318 }
320 319
321 void FileSystemDispatcherHost::UnregisterOperation(int request_id) { 320 void FileSystemDispatcherHost::UnregisterOperation(int request_id) {
322 DCHECK(operations_.Lookup(request_id)); 321 DCHECK(operations_.Lookup(request_id));
323 operations_.Remove(request_id); 322 operations_.Remove(request_id);
324 } 323 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_file_browser_private_api.cc ('k') | webkit/chromeos/fileapi/cros_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698