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

Side by Side Diff: chrome/browser/chromeos/drive/file_system_backend_delegate.cc

Issue 18667002: Pass BrowserContext to drive::MountPointProviderDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/drive/file_system_backend_delegate.h" 5 #include "chrome/browser/chromeos/drive/file_system_backend_delegate.h"
6 6
7 #include "chrome/browser/chromeos/drive/remote_file_stream_writer.h" 7 #include "chrome/browser/chromeos/drive/remote_file_stream_writer.h"
8 #include "chrome/browser/chromeos/fileapi/remote_file_system_operation.h" 8 #include "chrome/browser/chromeos/fileapi/remote_file_system_operation.h"
9 #include "content/public/browser/browser_context.h"
9 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
10 #include "webkit/browser/blob/file_stream_reader.h" 11 #include "webkit/browser/blob/file_stream_reader.h"
11 #include "webkit/browser/fileapi/external_mount_points.h" 12 #include "webkit/browser/fileapi/external_mount_points.h"
12 #include "webkit/browser/fileapi/file_system_task_runners.h" 13 #include "webkit/browser/fileapi/file_system_task_runners.h"
13 #include "webkit/browser/fileapi/remote_file_system_proxy.h" 14 #include "webkit/browser/fileapi/remote_file_system_proxy.h"
14 15
15 using content::BrowserThread; 16 using content::BrowserThread;
16 17
17 namespace drive { 18 namespace drive {
18 19
19 FileSystemBackendDelegate::FileSystemBackendDelegate( 20 FileSystemBackendDelegate::FileSystemBackendDelegate(
20 fileapi::ExternalMountPoints* mount_points) 21 content::BrowserContext* browser_context)
21 : mount_points_(mount_points) { 22 : mount_points_(content::BrowserContext::GetMountPoints(browser_context)) {
22 } 23 }
23 24
24 FileSystemBackendDelegate::~FileSystemBackendDelegate() { 25 FileSystemBackendDelegate::~FileSystemBackendDelegate() {
25 } 26 }
26 27
27 fileapi::AsyncFileUtil* FileSystemBackendDelegate::GetAsyncFileUtil( 28 fileapi::AsyncFileUtil* FileSystemBackendDelegate::GetAsyncFileUtil(
28 fileapi::FileSystemType type) { 29 fileapi::FileSystemType type) {
29 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 30 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
30 DCHECK_EQ(fileapi::kFileSystemTypeDrive, type); 31 DCHECK_EQ(fileapi::kFileSystemTypeDrive, type);
31 32
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 mount_points_->GetRemoteFileSystemProxy(url.filesystem_id()); 84 mount_points_->GetRemoteFileSystemProxy(url.filesystem_id());
84 if (!proxy) { 85 if (!proxy) {
85 *error_code = base::PLATFORM_FILE_ERROR_NOT_FOUND; 86 *error_code = base::PLATFORM_FILE_ERROR_NOT_FOUND;
86 return NULL; 87 return NULL;
87 } 88 }
88 89
89 return new chromeos::RemoteFileSystemOperation(proxy); 90 return new chromeos::RemoteFileSystemOperation(proxy);
90 } 91 }
91 92
92 } // namespace drive 93 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_backend_delegate.h ('k') | content/browser/fileapi/browser_file_system_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698