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

Unified Diff: base/base_drag_source.cc

Issue 351029: Support dragging a virtual file out of the browser. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/base_drag_source.h ('k') | base/base_drop_target.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_drag_source.cc
===================================================================
--- base/base_drag_source.cc (revision 35459)
+++ base/base_drag_source.cc (working copy)
@@ -7,7 +7,7 @@
///////////////////////////////////////////////////////////////////////////////
// BaseDragSource, public:
-BaseDragSource::BaseDragSource() : ref_count_(0), cancel_drag_(false) {
+BaseDragSource::BaseDragSource() : cancel_drag_(false) {
}
///////////////////////////////////////////////////////////////////////////////
@@ -51,13 +51,11 @@
}
ULONG BaseDragSource::AddRef() {
- return ++ref_count_;
+ base::RefCountedThreadSafe<BaseDragSource>::AddRef();
+ return 0;
}
ULONG BaseDragSource::Release() {
- if (--ref_count_ == 0) {
- delete this;
- return 0U;
- }
- return ref_count_;
+ base::RefCountedThreadSafe<BaseDragSource>::Release();
+ return 0;
}
« no previous file with comments | « base/base_drag_source.h ('k') | base/base_drop_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698