OLD | NEW |
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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class MediaFileSystemBackend : public storage::FileSystemBackend { | 37 class MediaFileSystemBackend : public storage::FileSystemBackend { |
38 public: | 38 public: |
39 static const char kMediaTaskRunnerName[]; | 39 static const char kMediaTaskRunnerName[]; |
40 | 40 |
41 MediaFileSystemBackend( | 41 MediaFileSystemBackend( |
42 const base::FilePath& profile_path, | 42 const base::FilePath& profile_path, |
43 base::SequencedTaskRunner* media_task_runner); | 43 base::SequencedTaskRunner* media_task_runner); |
44 ~MediaFileSystemBackend() override; | 44 ~MediaFileSystemBackend() override; |
45 | 45 |
46 static bool CurrentlyOnMediaTaskRunnerThread(); | 46 // Asserts that the current task is sequenced with any other task that calls |
| 47 // this. |
| 48 static void AssertCurrentlyOnMediaSequence(); |
| 49 |
47 static scoped_refptr<base::SequencedTaskRunner> MediaTaskRunner(); | 50 static scoped_refptr<base::SequencedTaskRunner> MediaTaskRunner(); |
48 | 51 |
49 // Construct the mount point for the gallery specified by |pref_id| in | 52 // Construct the mount point for the gallery specified by |pref_id| in |
50 // the profile located in |profile_path|. | 53 // the profile located in |profile_path|. |
51 static std::string ConstructMountName(const base::FilePath& profile_path, | 54 static std::string ConstructMountName(const base::FilePath& profile_path, |
52 const std::string& extension_id, | 55 const std::string& extension_id, |
53 MediaGalleryPrefId pref_id); | 56 MediaGalleryPrefId pref_id); |
54 | 57 |
55 static bool AttemptAutoMountForURLRequest( | 58 static bool AttemptAutoMountForURLRequest( |
56 const net::URLRequest* url_request, | 59 const net::URLRequest* url_request, |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 117 |
115 // Used for usage UMA tracking. | 118 // Used for usage UMA tracking. |
116 bool picasa_file_util_used_; | 119 bool picasa_file_util_used_; |
117 bool itunes_file_util_used_; | 120 bool itunes_file_util_used_; |
118 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 121 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
119 | 122 |
120 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend); | 123 DISALLOW_COPY_AND_ASSIGN(MediaFileSystemBackend); |
121 }; | 124 }; |
122 | 125 |
123 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ | 126 #endif // CHROME_BROWSER_MEDIA_GALLERIES_FILEAPI_MEDIA_FILE_SYSTEM_BACKEND_H_ |
OLD | NEW |