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

Side by Side Diff: chrome/common/classfactory.cc

Issue 39206: NO CODE CHANGE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « chrome/common/classfactory.h ('k') | chrome/common/ipc_channel_win.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 // 1 //
2 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 2 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "classfactory.h" 6 #include "classfactory.h"
7 7
8 8
9 GenericClassFactory::GenericClassFactory() : 9 GenericClassFactory::GenericClassFactory() :
10 reference_count_(1) 10 reference_count_(1)
11 { 11 {
12 InterlockedIncrement(&object_count_); 12 InterlockedIncrement(&object_count_);
13 } 13 }
14 14
15 15
16 GenericClassFactory::~GenericClassFactory() { 16 GenericClassFactory::~GenericClassFactory() {
17 InterlockedDecrement(&object_count_); 17 InterlockedDecrement(&object_count_);
18 } 18 }
19 19
20 20
21 LONG GenericClassFactory::object_count_ = 0; 21 LONG GenericClassFactory::object_count_ = 0;
22 22
23 23
24 STDMETHODIMP GenericClassFactory::QueryInterface(REFIID riid, LPVOID* ppobject) { 24 STDMETHODIMP GenericClassFactory::QueryInterface(REFIID riid,
25 LPVOID* ppobject) {
25 *ppobject = NULL; 26 *ppobject = NULL;
26 27
27 if (IsEqualIID(riid, IID_IUnknown) || 28 if (IsEqualIID(riid, IID_IUnknown) ||
28 IsEqualIID(riid, IID_IClassFactory)) 29 IsEqualIID(riid, IID_IClassFactory))
29 *ppobject = static_cast<IClassFactory*>(this); 30 *ppobject = static_cast<IClassFactory*>(this);
30 else 31 else
31 return E_NOINTERFACE; 32 return E_NOINTERFACE;
32 33
33 this->AddRef(); 34 this->AddRef();
34 return S_OK; 35 return S_OK;
(...skipping 11 matching lines...) Expand all
46 return 0; 47 return 0;
47 } 48 }
48 return reference_count_; 49 return reference_count_;
49 } 50 }
50 51
51 52
52 STDMETHODIMP GenericClassFactory::LockServer(BOOL) { 53 STDMETHODIMP GenericClassFactory::LockServer(BOOL) {
53 return E_NOTIMPL; 54 return E_NOTIMPL;
54 } 55 }
55 56
OLDNEW
« no previous file with comments | « chrome/common/classfactory.h ('k') | chrome/common/ipc_channel_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698