1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/win/iunknown_impl.h"
10 IUnknownImpl::IUnknownImpl()
14 IUnknownImpl::~IUnknownImpl() {
17 ULONG STDMETHODCALLTYPE IUnknownImpl::AddRef() {
18 base::AtomicRefCountInc(&ref_count_);
22 ULONG STDMETHODCALLTYPE IUnknownImpl::Release() {
23 if (!base::AtomicRefCountDec(&ref_count_)) {
30 STDMETHODIMP IUnknownImpl::QueryInterface(REFIID riid, void** ppv) {
31 if (riid == IID_IUnknown) {
32 *ppv = static_cast<IUnknown*>(this);