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

Side by Side Diff: chrome/app/scoped_ole_initializer.h

Issue 17426: remove chrome dependencies from win sandboxing headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2009 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.
4
5 #ifndef CHROME_APP_SCOPED_OLE_INITIALIZER_H_
6 #define CHROME_APP_SCOPED_OLE_INITIALIZER_H_
7
8 // Wraps OLE initialization in a cross-platform class meant to be used on the
9 // stack so init/uninit is done with scoping. This class is ok for use by
10 // non-windows platforms; it just doesn't do anything.
11
12 #if defined(OS_WIN)
13
14 class ScopedOleInitializer {
15 public:
16 ScopedOleInitializer() {
17 int ole_result = OleInitialize(NULL);
18 DCHECK(ole_result == S_OK);
19 }
20 ~ScopedOleInitializer() {
21 OleUninitialize();
22 }
23 };
24
25 #else
26
27 class ScopedOleInitializer {
28 public:
29 // Empty, this class does nothing on non-win32 systems. Empty ctor is
30 // necessary to avoid "unused variable" warning on gcc.
31 ScopedOleInitializer() { };
brettw 2009/01/09 18:10:47 Nit: no semicolon.
32 };
33
34 #endif
35
36 #endif // CHROME_APP_SCOPED_OLE_INITIALIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698