summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_operation_context.h
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 09:25:14 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-12-13 09:25:14 +0000
commit0c04ab11c5d3d24fef53ad968547b15441247f02 (patch)
tree288767ad1bdecd52d5789540f7eeca385cb92161 /webkit/fileapi/file_system_operation_context.h
parentf11a1c804589e468701b0dfca0117ee8ad94c08d (diff)
downloadchromium_src-0c04ab11c5d3d24fef53ad968547b15441247f02.zip
chromium_src-0c04ab11c5d3d24fef53ad968547b15441247f02.tar.gz
chromium_src-0c04ab11c5d3d24fef53ad968547b15441247f02.tar.bz2
Media Galleries: Simplify the MTP delegates so they mostly live on one thread.
Review URL: https://chromiumcodereview.appspot.com/11474017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172845 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/fileapi/file_system_operation_context.h')
-rw-r--r--webkit/fileapi/file_system_operation_context.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/webkit/fileapi/file_system_operation_context.h b/webkit/fileapi/file_system_operation_context.h
index 9c9c59a..0c79629 100644
--- a/webkit/fileapi/file_system_operation_context.h
+++ b/webkit/fileapi/file_system_operation_context.h
@@ -39,16 +39,14 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemOperationContext {
int64 allowed_bytes_growth() const { return allowed_bytes_growth_; }
#if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
- // Called on IO thread.
- void set_mtp_device_delegate(
- const base::WeakPtr<MTPDeviceDelegate>& delegate) {
- mtp_device_delegate_ = delegate;
+ // Initializes |mtp_device_delegate_url_| on the IO thread.
+ void set_mtp_device_delegate_url(const std::string& delegate_url) {
+ mtp_device_delegate_url_ = delegate_url;
}
- // Caller of this function should dereference the delegate only on media
- // sequenced task runner thread.
- base::WeakPtr<MTPDeviceDelegate> mtp_device_delegate() const {
- return mtp_device_delegate_;
+ // Reads |mtp_device_delegate_url_| on |task_runner_|.
+ const std::string& mtp_device_delegate_url() const {
+ return mtp_device_delegate_url_;
}
#endif
@@ -96,9 +94,9 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemOperationContext {
UpdateObserverList update_observers_;
#if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
- // The media transfer protocol (MTP) device delegate.
- // Set on IO thread and dereferenced on media sequenced task runner thread.
- base::WeakPtr<MTPDeviceDelegate> mtp_device_delegate_;
+ // URL for the media transfer protocol (MTP) device delegate.
+ // Initialized on IO thread and used on |task_runner_|.
+ std::string mtp_device_delegate_url_;
#endif
};