diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 18:49:58 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 18:49:58 +0000 |
commit | 6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1 (patch) | |
tree | 8e833c393312e866250077c15bc1d90464fe99d7 /base/base_drag_source.cc | |
parent | 963dfb5a05c5b0e3fa8ed74d803f01cb10fd455e (diff) | |
download | chromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.zip chromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.tar.gz chromium_src-6aa4a1c041ca9bd2c3087c3c059a87193b1a82e1.tar.bz2 |
Support dragging a virtual file out of the browser.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/351029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/base_drag_source.cc')
-rw-r--r-- | base/base_drag_source.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/base/base_drag_source.cc b/base/base_drag_source.cc index bc81395..9b335a7 100644 --- a/base/base_drag_source.cc +++ b/base/base_drag_source.cc @@ -7,7 +7,7 @@ /////////////////////////////////////////////////////////////////////////////// // BaseDragSource, public: -BaseDragSource::BaseDragSource() : ref_count_(0), cancel_drag_(false) { +BaseDragSource::BaseDragSource() : cancel_drag_(false) { } /////////////////////////////////////////////////////////////////////////////// @@ -51,13 +51,11 @@ HRESULT BaseDragSource::QueryInterface(const IID& iid, void** object) { } 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; } |