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

Unified Diff: chrome/browser/media_gallery/media_file_system_registry.cc

Issue 11275121: Cleanup: Remove an unneeded variable from ScopedMtpDeviceMapEntry. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: update Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media_gallery/media_file_system_registry.cc
===================================================================
--- chrome/browser/media_gallery/media_file_system_registry.cc (revision 166313)
+++ chrome/browser/media_gallery/media_file_system_registry.cc (working copy)
@@ -139,14 +139,13 @@
ScopedMTPDeviceMapEntry(const FilePath::StringType& device_location,
const base::Closure& no_references_callback)
: device_location_(device_location),
- delegate_(new MTPDeviceDelegateImpl(device_location)),
no_references_callback_(no_references_callback) {
- DCHECK(delegate_);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
Bind(&MTPDeviceMapService::AddDelegate,
base::Unretained(MTPDeviceMapService::GetInstance()),
- device_location_, make_scoped_refptr(delegate_)));
+ device_location_,
+ make_scoped_refptr(new MTPDeviceDelegateImpl(device_location))));
}
private:
@@ -166,12 +165,6 @@
// Store the MTP or PTP device location.
const FilePath::StringType device_location_;
- // Store a raw pointer of MTPDeviceDelegateImpl object.
- // MTPDeviceDelegateImpl is ref-counted and owned by MTPDeviceMapService.
- // This class tells MTPDeviceMapService to dispose of it when the last
- // reference to |this| goes away.
- MTPDeviceDelegateImpl* delegate_;
-
// A callback to call when the last reference of this object goes away.
base::Closure no_references_callback_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698