From eee8cf2ca4a672e682d28a81af736fc34b48f13f Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 5 Nov 2009 21:49:48 +0000 Subject: Remove unused class (classfactory) from common project. BUG=None TEST=None Patch contributed by thiago.farina@gmail.com Review: http://codereview.chromium.org/343079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31133 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/classfactory.cc | 54 ------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 chrome/common/classfactory.cc (limited to 'chrome/common/classfactory.cc') diff --git a/chrome/common/classfactory.cc b/chrome/common/classfactory.cc deleted file mode 100644 index e03a0d7..0000000 --- a/chrome/common/classfactory.cc +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "classfactory.h" - - -GenericClassFactory::GenericClassFactory() : - reference_count_(1) -{ - InterlockedIncrement(&object_count_); -} - - -GenericClassFactory::~GenericClassFactory() { - InterlockedDecrement(&object_count_); -} - - -LONG GenericClassFactory::object_count_ = 0; - - -STDMETHODIMP GenericClassFactory::QueryInterface(REFIID riid, - LPVOID* ppobject) { - *ppobject = NULL; - - if (IsEqualIID(riid, IID_IUnknown) || - IsEqualIID(riid, IID_IClassFactory)) - *ppobject = static_cast(this); - else - return E_NOINTERFACE; - - this->AddRef(); - return S_OK; -} - - -STDMETHODIMP_(ULONG) GenericClassFactory::AddRef() { - return InterlockedIncrement(&reference_count_); -} - - -STDMETHODIMP_(ULONG) GenericClassFactory::Release() { - if(0 == InterlockedDecrement(&reference_count_)) { - delete this; - return 0; - } - return reference_count_; -} - - -STDMETHODIMP GenericClassFactory::LockServer(BOOL) { - return E_NOTIMPL; -} -- cgit v1.1