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

Unified Diff: base/win/scoped_comptr.h

Issue 2865713002: Remove ScopedComPtr::IsSameObject() (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/scoped_comptr.h
diff --git a/base/win/scoped_comptr.h b/base/win/scoped_comptr.h
index 527efeead14c298feee56438bb19b739b9d0912e..e1535ca7b792c157d7b24724f34d3e80e90b4506 100644
--- a/base/win/scoped_comptr.h
+++ b/base/win/scoped_comptr.h
@@ -133,23 +133,6 @@ class ScopedComPtr {
return hr;
}
- // Checks if the identity of |other| and this object is the same.
- bool IsSameObject(IUnknown* other) {
- if (!other && !ptr_)
- return true;
-
- if (!other || !ptr_)
- return false;
-
- ScopedComPtr<IUnknown> my_identity;
- CopyTo(IID_PPV_ARGS(my_identity.Receive()));
-
- ScopedComPtr<IUnknown> other_identity;
- other->QueryInterface(IID_PPV_ARGS(other_identity.Receive()));
-
- return my_identity == other_identity;
- }
-
// Provides direct access to the interface.
// Here we use a well known trick to make sure we block access to
// IUnknown methods so that something bad like this doesn't happen:
« no previous file with comments | « no previous file | base/win/scoped_comptr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698