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

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_file_system_backend.h

Issue 206253002: Revert of Add mechanism to auto mount file systems in response to a URL request. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "webkit/browser/fileapi/file_system_backend.h" 10 #include "webkit/browser/fileapi/file_system_backend.h"
11 11
12 namespace base { 12 namespace base {
13 class SequencedTaskRunner; 13 class SequencedTaskRunner;
14 } 14 }
15 15
16 namespace net {
17 class URLRequest;
18 }
19
20 class MediaPathFilter; 16 class MediaPathFilter;
21 17
22 class DeviceMediaAsyncFileUtil; 18 class DeviceMediaAsyncFileUtil;
23 19
24 class MediaFileSystemBackend : public fileapi::FileSystemBackend { 20 class MediaFileSystemBackend : public fileapi::FileSystemBackend {
25 public: 21 public:
26 static const char kMediaTaskRunnerName[]; 22 static const char kMediaTaskRunnerName[];
27 23
28 MediaFileSystemBackend( 24 MediaFileSystemBackend(
29 const base::FilePath& profile_path, 25 const base::FilePath& profile_path,
30 base::SequencedTaskRunner* media_task_runner); 26 base::SequencedTaskRunner* media_task_runner);
31 virtual ~MediaFileSystemBackend(); 27 virtual ~MediaFileSystemBackend();
32 28
33 static bool CurrentlyOnMediaTaskRunnerThread(); 29 static bool CurrentlyOnMediaTaskRunnerThread();
34 static scoped_refptr<base::SequencedTaskRunner> MediaTaskRunner(); 30 static scoped_refptr<base::SequencedTaskRunner> MediaTaskRunner();
35 31
36 static bool AttemptAutoMountForURLRequest(
37 const net::URLRequest* url_request,
38 const fileapi::FileSystemURL& filesystem_url,
39 const std::string& storage_domain,
40 const base::Callback<void(base::File::Error result)>& callback);
41
42 // FileSystemBackend implementation. 32 // FileSystemBackend implementation.
43 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE; 33 virtual bool CanHandleType(fileapi::FileSystemType type) const OVERRIDE;
44 virtual void Initialize(fileapi::FileSystemContext* context) OVERRIDE; 34 virtual void Initialize(fileapi::FileSystemContext* context) OVERRIDE;
45 virtual void ResolveURL(const fileapi::FileSystemURL& url, 35 virtual void ResolveURL(const fileapi::FileSystemURL& url,
46 fileapi::OpenFileSystemMode mode, 36 fileapi::OpenFileSystemMode mode,
47 const OpenFileSystemCallback& callback) OVERRIDE; 37 const OpenFileSystemCallback& callback) OVERRIDE;
48 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil( 38 virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
49 fileapi::FileSystemType type) OVERRIDE; 39 fileapi::FileSystemType type) OVERRIDE;
50 virtual fileapi::CopyOrMoveFileValidatorFactory* 40 virtual fileapi::CopyOrMoveFileValidatorFactory*
51 GetCopyOrMoveFileValidatorFactory( 41 GetCopyOrMoveFileValidatorFactory(
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 scoped_ptr<fileapi::AsyncFileUtil> itunes_file_util_; 75 scoped_ptr<fileapi::AsyncFileUtil> itunes_file_util_;
86 #endif // defined(OS_WIN) || defined(OS_MACOSX) 76 #endif // defined(OS_WIN) || defined(OS_MACOSX)
87 #if defined(OS_MACOSX) 77 #if defined(OS_MACOSX)
88 scoped_ptr<fileapi::AsyncFileUtil> iphoto_file_util_; 78 scoped_ptr<fileapi::AsyncFileUtil> iphoto_file_util_;
89 #endif // defined(OS_MACOSX) 79 #endif // defined(OS_MACOSX)
90 80
91 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend); 81 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend);
92 }; 82 };
93 83
94 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ 84 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698