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

Side by Side Diff: chrome/browser/media_galleries/win/mtp_device_delegate_impl_win.h

Issue 518743002: Media gallery fixups for scoped_refptr<T> operator T* removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add callback typedef Created 6 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
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_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ 5 #ifndef CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_
6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ 6 #define CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 virtual void ReadDirectory( 97 virtual void ReadDirectory(
98 const base::FilePath& root, 98 const base::FilePath& root,
99 const ReadDirectorySuccessCallback& success_callback, 99 const ReadDirectorySuccessCallback& success_callback,
100 const ErrorCallback& error_callback) OVERRIDE; 100 const ErrorCallback& error_callback) OVERRIDE;
101 virtual void CreateSnapshotFile( 101 virtual void CreateSnapshotFile(
102 const base::FilePath& device_file_path, 102 const base::FilePath& device_file_path,
103 const base::FilePath& local_path, 103 const base::FilePath& local_path,
104 const CreateSnapshotFileSuccessCallback& success_callback, 104 const CreateSnapshotFileSuccessCallback& success_callback,
105 const ErrorCallback& error_callback) OVERRIDE; 105 const ErrorCallback& error_callback) OVERRIDE;
106 virtual bool IsStreaming() OVERRIDE; 106 virtual bool IsStreaming() OVERRIDE;
107 virtual void ReadBytes( 107 virtual void ReadBytes(const base::FilePath& device_file_path,
108 const base::FilePath& device_file_path, 108 const scoped_refptr<net::IOBuffer>& buf,
109 net::IOBuffer* buf, int64 offset, int buf_len, 109 int64 offset,
110 const ReadBytesSuccessCallback& success_callback, 110 int buf_len,
111 const ErrorCallback& error_callback) OVERRIDE; 111 const ReadBytesSuccessCallback& success_callback,
112 const ErrorCallback& error_callback) OVERRIDE;
112 virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE; 113 virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE;
113 114
114 // Ensures the device is initialized for communication by doing a 115 // Ensures the device is initialized for communication by doing a
115 // call-and-reply to a blocking pool thread. |task_info.task| runs on a 116 // call-and-reply to a blocking pool thread. |task_info.task| runs on a
116 // blocking pool thread and |task_info.reply| runs on the IO thread. 117 // blocking pool thread and |task_info.reply| runs on the IO thread.
117 // 118 //
118 // If the device is already initialized, post the |task_info.task| 119 // If the device is already initialized, post the |task_info.task|
119 // immediately on a blocking pool thread. 120 // immediately on a blocking pool thread.
120 // 121 //
121 // If the device is uninitialized, store the |task_info| in a pending task 122 // If the device is uninitialized, store the |task_info| in a pending task
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // Used to make sure only one task is in progress at any time. 214 // Used to make sure only one task is in progress at any time.
214 bool task_in_progress_; 215 bool task_in_progress_;
215 216
216 // For callbacks that may run after destruction. 217 // For callbacks that may run after destruction.
217 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_; 218 base::WeakPtrFactory<MTPDeviceDelegateImplWin> weak_ptr_factory_;
218 219
219 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin); 220 DISALLOW_COPY_AND_ASSIGN(MTPDeviceDelegateImplWin);
220 }; 221 };
221 222
222 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_ 223 #endif // CHROME_BROWSER_MEDIA_GALLERIES_WIN_MTP_DEVICE_DELEGATE_IMPL_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698