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

Side by Side Diff: base/base_drag_source.cc

Issue 4273: Fix some issues found looking at the code. I have made two posts about it:... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « AUTHORS ('k') | base/base_drop_target.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include <atlbase.h> 5 #include <atlbase.h>
6 6
7 #include "base/base_drag_source.h" 7 #include "base/base_drag_source.h"
8 8
9 /////////////////////////////////////////////////////////////////////////////// 9 ///////////////////////////////////////////////////////////////////////////////
10 // BaseDragSource, public: 10 // BaseDragSource, public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 AddRef(); 48 AddRef();
49 return S_OK; 49 return S_OK;
50 } 50 }
51 51
52 ULONG BaseDragSource::AddRef() { 52 ULONG BaseDragSource::AddRef() {
53 return InterlockedIncrement(&ref_count_); 53 return InterlockedIncrement(&ref_count_);
54 } 54 }
55 55
56 ULONG BaseDragSource::Release() { 56 ULONG BaseDragSource::Release() {
57 if (InterlockedDecrement(&ref_count_) == 0) { 57 if (InterlockedDecrement(&ref_count_) == 0) {
58 ULONG copied_refcnt = ref_count_;
59 delete this; 58 delete this;
60 return copied_refcnt; 59 return 0U;
61 } 60 }
62 return ref_count_; 61 return ref_count_;
63 } 62 }
64 63
OLDNEW
« no previous file with comments | « AUTHORS ('k') | base/base_drop_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698