summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 23:48:44 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 23:48:44 +0000
commit9493ee95cd8475d2ce39276fddca3b4b3d3ae73e (patch)
treec9888c464ba0261f5daf7caaa6534c5510a12289
parent34ca58555bb67f8f72b84ba07b5c935928e2db3d (diff)
downloadchromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.zip
chromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.tar.gz
chromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.tar.bz2
Base: Last set of files to use BASE_API (for base.dll)
Note that a bunck of these files have no unit tests :( BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6747014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79633 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base.gypi1
-rw-r--r--base/base_api.h8
-rw-r--r--base/crypto/capi_util.h14
-rw-r--r--base/crypto/encryptor.h5
-rw-r--r--base/crypto/rsa_private_key.h5
-rw-r--r--base/crypto/secure_hash.h3
-rw-r--r--base/crypto/signature_creator.h3
-rw-r--r--base/crypto/signature_verifier.h5
-rw-r--r--base/crypto/symmetric_key.h5
-rw-r--r--base/debug/trace_event_win.h12
-rw-r--r--base/event_recorder.h4
-rw-r--r--base/file_util_proxy.h3
-rw-r--r--base/logging_win.h6
-rw-r--r--base/md5.h16
-rw-r--r--base/memory/memory_debug.h3
-rw-r--r--base/memory/ref_counted_memory.h8
-rw-r--r--base/resource_util.h7
-rw-r--r--base/sync_socket.h6
-rw-r--r--base/synchronization/cancellation_flag.h3
-rw-r--r--base/synchronization/condition_variable.h3
-rw-r--r--base/synchronization/waitable_event_watcher.h4
-rw-r--r--base/threading/non_thread_safe.h2
-rw-r--r--base/threading/thread_checker_impl.h3
-rw-r--r--base/threading/thread_collision_warner.h4
-rw-r--r--base/threading/thread_local.h5
-rw-r--r--base/threading/watchdog.h3
-rw-r--r--base/threading/worker_pool.h5
-rw-r--r--base/value_conversions.h6
-rw-r--r--base/win/event_trace_controller.h8
-rw-r--r--base/win/event_trace_provider.h6
-rw-r--r--base/win/i18n.h9
-rw-r--r--base/win/object_watcher.h3
-rw-r--r--base/win/registry.h7
-rw-r--r--base/win/scoped_bstr.h5
-rw-r--r--base/win/scoped_variant.h5
-rw-r--r--base/win/win_util.h29
-rw-r--r--base/win/wrapped_window_proc.h7
37 files changed, 138 insertions, 93 deletions
diff --git a/base/base.gypi b/base/base.gypi
index 7777cba8..502ebbd 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -110,6 +110,7 @@
'logging.cc',
'logging.h',
'logging_win.cc',
+ 'logging_win.h',
'mac/cocoa_protocols.h',
'mac/foundation_util.h',
'mac/foundation_util.mm',
diff --git a/base/base_api.h b/base/base_api.h
index e3cfd28..83b4bdf 100644
--- a/base/base_api.h
+++ b/base/base_api.h
@@ -6,16 +6,12 @@
#define BASE_BASE_API_H_
#pragma once
-#if !defined(BASE_IMPLEMENTATION)
-#define BASE_IMPLEMENTATION 0
-#endif
-
#if defined(WIN32) && defined(BASE_DLL)
-#if BASE_IMPLEMENTATION
+#if defined(BASE_IMPLEMENTATION)
#define BASE_API __declspec(dllexport)
#else
#define BASE_API __declspec(dllimport)
-#endif
+#endif // defined(BASE_IMPLEMENTATION)
#else
#define BASE_API
#endif
diff --git a/base/crypto/capi_util.h b/base/crypto/capi_util.h
index df7f749..f4b7e68 100644
--- a/base/crypto/capi_util.h
+++ b/base/crypto/capi_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,8 @@
#include <windows.h>
#include <wincrypt.h>
+#include "base/base_api.h"
+
namespace base {
// CryptAcquireContext when passed CRYPT_NEWKEYSET or CRYPT_DELETEKEYSET in
@@ -21,11 +23,11 @@ namespace base {
// "The CryptAcquireContext function is generally thread safe unless
// CRYPT_NEWKEYSET or CRYPT_DELETEKEYSET is specified in the dwFlags
// parameter."
-BOOL CryptAcquireContextLocked(HCRYPTPROV* prov,
- LPCWSTR container,
- LPCWSTR provider,
- DWORD prov_type,
- DWORD flags);
+BASE_API BOOL CryptAcquireContextLocked(HCRYPTPROV* prov,
+ LPCWSTR container,
+ LPCWSTR provider,
+ DWORD prov_type,
+ DWORD flags);
} // namespace base
diff --git a/base/crypto/encryptor.h b/base/crypto/encryptor.h
index 7718240..360a333 100644
--- a/base/crypto/encryptor.h
+++ b/base/crypto/encryptor.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,6 +8,7 @@
#include <string>
+#include "base/base_api.h"
#include "build/build_config.h"
#if defined(USE_NSS)
@@ -20,7 +21,7 @@ namespace base {
class SymmetricKey;
-class Encryptor {
+class BASE_API Encryptor {
public:
enum Mode {
CBC
diff --git a/base/crypto/rsa_private_key.h b/base/crypto/rsa_private_key.h
index 5357adc..1f32982 100644
--- a/base/crypto/rsa_private_key.h
+++ b/base/crypto/rsa_private_key.h
@@ -22,6 +22,7 @@ struct SECKEYPublicKeyStr;
#include <list>
#include <vector>
+#include "base/base_api.h"
#include "base/basictypes.h"
#if defined(OS_WIN)
@@ -35,7 +36,7 @@ namespace base {
// Used internally by RSAPrivateKey for serializing and deserializing
// PKCS #8 PrivateKeyInfo and PublicKeyInfo.
-class PrivateKeyInfoCodec {
+class BASE_API PrivateKeyInfoCodec {
public:
// ASN.1 encoding of the AlgorithmIdentifier from PKCS #8.
@@ -170,7 +171,7 @@ class PrivateKeyInfoCodec {
// Encapsulates an RSA private key. Can be used to generate new keys, export
// keys to other formats, or to extract a public key.
// TODO(hclam): This class should be ref-counted so it can be reused easily.
-class RSAPrivateKey {
+class BASE_API RSAPrivateKey {
public:
~RSAPrivateKey();
diff --git a/base/crypto/secure_hash.h b/base/crypto/secure_hash.h
index 3759218..904d163 100644
--- a/base/crypto/secure_hash.h
+++ b/base/crypto/secure_hash.h
@@ -6,13 +6,14 @@
#define BASE_CRYPTO_SECURE_HASH_H_
#pragma once
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
// A wrapper to calculate secure hashes incrementally, allowing to
// be used when the full input is not known in advance.
-class SecureHash {
+class BASE_API SecureHash {
public:
enum Algorithm {
SHA256,
diff --git a/base/crypto/signature_creator.h b/base/crypto/signature_creator.h
index 3e3afd2..93cf83c 100644
--- a/base/crypto/signature_creator.h
+++ b/base/crypto/signature_creator.h
@@ -20,6 +20,7 @@ struct SGNContextStr;
#include <vector>
+#include "base/base_api.h"
#include "base/basictypes.h"
#include "base/crypto/rsa_private_key.h"
@@ -31,7 +32,7 @@ namespace base {
// Signs data using a bare private key (as opposed to a full certificate).
// Currently can only sign data using SHA-1 with RSA encryption.
-class SignatureCreator {
+class BASE_API SignatureCreator {
public:
~SignatureCreator();
diff --git a/base/crypto/signature_verifier.h b/base/crypto/signature_verifier.h
index e2b61af..1a2c3e7 100644
--- a/base/crypto/signature_verifier.h
+++ b/base/crypto/signature_verifier.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,6 +16,7 @@
#include <vector>
+#include "base/base_api.h"
#include "base/basictypes.h"
#if defined(OS_WIN)
@@ -26,7 +27,7 @@ namespace base {
// The SignatureVerifier class verifies a signature using a bare public key
// (as opposed to a certificate).
-class SignatureVerifier {
+class BASE_API SignatureVerifier {
public:
SignatureVerifier();
~SignatureVerifier();
diff --git a/base/crypto/symmetric_key.h b/base/crypto/symmetric_key.h
index ce98fa6..b72c840 100644
--- a/base/crypto/symmetric_key.h
+++ b/base/crypto/symmetric_key.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,6 +8,7 @@
#include <string>
+#include "base/base_api.h"
#include "base/basictypes.h"
#if defined(USE_NSS)
@@ -22,7 +23,7 @@ namespace base {
// Wraps a platform-specific symmetric key and allows it to be held in a
// scoped_ptr.
-class SymmetricKey {
+class BASE_API SymmetricKey {
public:
// Defines the algorithm that a key will be used with. See also
// classs Encrptor.
diff --git a/base/debug/trace_event_win.h b/base/debug/trace_event_win.h
index a1c79ba..9049bdb 100644
--- a/base/debug/trace_event_win.h
+++ b/base/debug/trace_event_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,6 +8,8 @@
#pragma once
#include <string>
+
+#include "base/base_api.h"
#include "base/win/event_trace_provider.h"
#define TRACE_EVENT_BEGIN(name, id, extra) \
@@ -40,7 +42,7 @@ namespace debug {
// This EtwTraceProvider subclass implements ETW logging
// for the macros above on Windows.
-class TraceLog : public base::win::EtwTraceProvider {
+class BASE_API TraceLog : public base::win::EtwTraceProvider {
public:
enum EventType {
EVENT_BEGIN,
@@ -117,13 +119,13 @@ class TraceLog : public base::win::EtwTraceProvider {
};
// The ETW trace provider GUID.
-extern const GUID kChromeTraceProviderName;
+BASE_API extern const GUID kChromeTraceProviderName;
// The ETW event class GUID for 32 bit events.
-extern const GUID kTraceEventClass32;
+BASE_API extern const GUID kTraceEventClass32;
// The ETW event class GUID for 64 bit events.
-extern const GUID kTraceEventClass64;
+BASE_API extern const GUID kTraceEventClass64;
// The ETW event types, IDs 0x00-0x09 are reserved, so start at 0x10.
const base::win::EtwEventType kTraceEventTypeBegin = 0x10;
diff --git a/base/event_recorder.h b/base/event_recorder.h
index e4d8907..21e2922 100644
--- a/base/event_recorder.h
+++ b/base/event_recorder.h
@@ -10,6 +10,8 @@
#include <windows.h>
#include <stdio.h>
#endif
+
+#include "base/base_api.h"
#include "base/basictypes.h"
class FilePath;
@@ -29,7 +31,7 @@ namespace base {
// Why? Imagine if the product had a "record a macro" feature.
// You might be recording globally, while recording or playing back
// a macro. I don't think two playbacks make sense.
-class EventRecorder {
+class BASE_API EventRecorder {
public:
// Get the singleton EventRecorder.
// We can only handle one recorder/player at a time.
diff --git a/base/file_util_proxy.h b/base/file_util_proxy.h
index f975dac..08df57b 100644
--- a/base/file_util_proxy.h
+++ b/base/file_util_proxy.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "base/base_api.h"
#include "base/callback.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -20,7 +21,7 @@ class MessageLoopProxy;
class Time;
// This class provides asynchronous access to common file routines.
-class FileUtilProxy {
+class BASE_API FileUtilProxy {
public:
// Holds metadata for file or directory entry. Used by ReadDirectoryCallback.
struct Entry {
diff --git a/base/logging_win.h b/base/logging_win.h
index 9058c84..bd69df9 100644
--- a/base/logging_win.h
+++ b/base/logging_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -7,6 +7,8 @@
#pragma once
#include <string>
+
+#include "base/base_api.h"
#include "base/basictypes.h"
#include "base/win/event_trace_provider.h"
#include "base/logging.h"
@@ -48,7 +50,7 @@ enum LogMessageTypes {
// Trace provider class to drive log control and transport
// with Event Tracing for Windows.
-class LogEventProvider : public base::win::EtwTraceProvider {
+class BASE_API LogEventProvider : public base::win::EtwTraceProvider {
public:
static LogEventProvider* GetInstance();
diff --git a/base/md5.h b/base/md5.h
index 5ab6e32..10e2a35 100644
--- a/base/md5.h
+++ b/base/md5.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -8,6 +8,8 @@
#include <string>
+#include "base/base_api.h"
+
// MD5 stands for Message Digest algorithm 5.
// MD5 is a robust hash function, designed for cyptography, but often used
// for file checksums. The code is complex and slow, but has few
@@ -42,25 +44,25 @@ typedef char MD5Context[88];
// Computes the MD5 sum of the given data buffer with the given length.
// The given 'digest' structure will be filled with the result data.
-void MD5Sum(const void* data, size_t length, MD5Digest* digest);
+BASE_API void MD5Sum(const void* data, size_t length, MD5Digest* digest);
// Initializes the given MD5 context structure for subsequent calls to
// MD5Update().
-void MD5Init(MD5Context* context);
+BASE_API void MD5Init(MD5Context* context);
// For the given buffer of data, updates the given MD5 context with the sum of
// the data. You can call this any number of times during the computation,
// except that MD5Init() must have been called first.
-void MD5Update(MD5Context* context, const void* buf, size_t len);
+BASE_API void MD5Update(MD5Context* context, const void* buf, size_t len);
// Finalizes the MD5 operation and fills the buffer with the digest.
-void MD5Final(MD5Digest* digest, MD5Context* pCtx);
+BASE_API void MD5Final(MD5Digest* digest, MD5Context* pCtx);
// Converts a digest into human-readable hexadecimal.
-std::string MD5DigestToBase16(const MD5Digest& digest);
+BASE_API std::string MD5DigestToBase16(const MD5Digest& digest);
// Returns the MD5 (in hexadecimal) of a string.
-std::string MD5String(const std::string& str);
+BASE_API std::string MD5String(const std::string& str);
#endif // BASE_MD5_H_
diff --git a/base/memory/memory_debug.h b/base/memory/memory_debug.h
index 9cc6c61..d094edb 100644
--- a/base/memory/memory_debug.h
+++ b/base/memory/memory_debug.h
@@ -10,11 +10,12 @@
#define BASE_MEMORY_MEMORY_DEBUG_H_
#pragma once
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
-class MemoryDebug {
+class BASE_API MemoryDebug {
public:
// Since MIU messages are a lot of data, and we don't always want this data,
// we have a global switch. If disabled, *MemoryInUse are no-ops.
diff --git a/base/memory/ref_counted_memory.h b/base/memory/ref_counted_memory.h
index db15792..1a0f51ee 100644
--- a/base/memory/ref_counted_memory.h
+++ b/base/memory/ref_counted_memory.h
@@ -8,6 +8,7 @@
#include <vector>
+#include "base/base_api.h"
#include "base/memory/ref_counted.h"
// TODO(erg): The contents of this file should be in a namespace. This would
@@ -16,7 +17,8 @@
// A generic interface to memory. This object is reference counted because one
// of its two subclasses own the data they carry, and we need to have
// heterogeneous containers of these two types of memory.
-class RefCountedMemory : public base::RefCountedThreadSafe<RefCountedMemory> {
+class BASE_API RefCountedMemory
+ : public base::RefCountedThreadSafe<RefCountedMemory> {
public:
// Retrieves a pointer to the beginning of the data we point to. If the data
// is empty, this will return NULL.
@@ -33,7 +35,7 @@ class RefCountedMemory : public base::RefCountedThreadSafe<RefCountedMemory> {
// An implementation of RefCountedMemory, where the ref counting does not
// matter.
-class RefCountedStaticMemory : public RefCountedMemory {
+class BASE_API RefCountedStaticMemory : public RefCountedMemory {
public:
RefCountedStaticMemory()
: data_(NULL), length_(0) {}
@@ -53,7 +55,7 @@ class RefCountedStaticMemory : public RefCountedMemory {
// An implementation of RefCountedMemory, where we own our the data in a
// vector.
-class RefCountedBytes : public RefCountedMemory {
+class BASE_API RefCountedBytes : public RefCountedMemory {
public:
RefCountedBytes();
diff --git a/base/resource_util.h b/base/resource_util.h
index 8a37f95..c867abc 100644
--- a/base/resource_util.h
+++ b/base/resource_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -11,6 +11,7 @@
#include <windows.h>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -18,8 +19,8 @@ namespace base {
// Function for getting a data resource (BINDATA) from a dll. Some
// resources are optional, especially in unit tests, so this returns false
// but doesn't raise an error if the resource can't be loaded.
-bool GetDataResourceFromModule(HMODULE module, int resource_id,
- void** data, size_t* length);
+bool BASE_API GetDataResourceFromModule(HMODULE module, int resource_id,
+ void** data, size_t* length);
} // namespace base
#endif // BASE_RESOURCE_UTIL_H__
diff --git a/base/sync_socket.h b/base/sync_socket.h
index 1408b47..bcebbdfa 100644
--- a/base/sync_socket.h
+++ b/base/sync_socket.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,9 +16,11 @@
#endif
#include <sys/types.h>
+#include "base/base_api.h"
+
namespace base {
-class SyncSocket {
+class BASE_API SyncSocket {
public:
#if defined(OS_WIN)
typedef HANDLE Handle;
diff --git a/base/synchronization/cancellation_flag.h b/base/synchronization/cancellation_flag.h
index 29ecd89..5738929 100644
--- a/base/synchronization/cancellation_flag.h
+++ b/base/synchronization/cancellation_flag.h
@@ -6,6 +6,7 @@
#define BASE_SYNCHRONIZATION_CANCELLATION_FLAG_H_
#pragma once
+#include "base/base_api.h"
#include "base/atomicops.h"
#include "base/threading/platform_thread.h"
@@ -16,7 +17,7 @@ namespace base {
// is thread-safe.
//
// This class IS NOT intended for synchronization between threads.
-class CancellationFlag {
+class BASE_API CancellationFlag {
public:
CancellationFlag() : flag_(false) {
#if !defined(NDEBUG)
diff --git a/base/synchronization/condition_variable.h b/base/synchronization/condition_variable.h
index db75a49..d70d4cd 100644
--- a/base/synchronization/condition_variable.h
+++ b/base/synchronization/condition_variable.h
@@ -74,6 +74,7 @@
#include <pthread.h>
#endif
+#include "base/base_api.h"
#include "base/basictypes.h"
#include "base/synchronization/lock.h"
@@ -81,7 +82,7 @@ namespace base {
class TimeDelta;
-class ConditionVariable {
+class BASE_API ConditionVariable {
public:
// Construct a cv for use with ONLY one user lock.
explicit ConditionVariable(Lock* user_lock);
diff --git a/base/synchronization/waitable_event_watcher.h b/base/synchronization/waitable_event_watcher.h
index 1b93b66..aa16d0b 100644
--- a/base/synchronization/waitable_event_watcher.h
+++ b/base/synchronization/waitable_event_watcher.h
@@ -15,6 +15,8 @@
#include "base/synchronization/waitable_event.h"
#endif
+#include "base/base_api.h"
+
namespace base {
class Flag;
@@ -58,7 +60,7 @@ class WaitableEvent;
// it with a Watcher. It will act as if the event was never signaled.
// -----------------------------------------------------------------------------
-class WaitableEventWatcher
+class BASE_API WaitableEventWatcher
#if defined(OS_POSIX)
: public MessageLoop::DestructionObserver
#endif
diff --git a/base/threading/non_thread_safe.h b/base/threading/non_thread_safe.h
index 83a2178..e4a1c07 100644
--- a/base/threading/non_thread_safe.h
+++ b/base/threading/non_thread_safe.h
@@ -45,7 +45,7 @@ class NonThreadSafeDoNothing {
// In Release mode, CalledOnValidThread will always return true.
//
#ifndef NDEBUG
-class BASE_API NonThreadSafe : public NonThreadSafeImpl {
+class NonThreadSafe : public NonThreadSafeImpl {
};
#else
class NonThreadSafe : public NonThreadSafeDoNothing {
diff --git a/base/threading/thread_checker_impl.h b/base/threading/thread_checker_impl.h
index 6d41fdc..02ecebf 100644
--- a/base/threading/thread_checker_impl.h
+++ b/base/threading/thread_checker_impl.h
@@ -6,6 +6,7 @@
#define BASE_THREADING_THREAD_CHECKER_IMPL_H_
#pragma once
+#include "base/base_api.h"
#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
@@ -17,7 +18,7 @@ namespace base {
//
// Note: You should almost always use the ThreadChecker class to get the
// right version for your build configuration.
-class ThreadCheckerImpl {
+class BASE_API ThreadCheckerImpl {
public:
ThreadCheckerImpl();
~ThreadCheckerImpl();
diff --git a/base/threading/thread_collision_warner.h b/base/threading/thread_collision_warner.h
index 38294a3..b26568d 100644
--- a/base/threading/thread_collision_warner.h
+++ b/base/threading/thread_collision_warner.h
@@ -131,12 +131,12 @@ namespace base {
// AsserterBase is the interfaces and DCheckAsserter is the default asserter
// used. During the unit tests is used another class that doesn't "DCHECK"
// in case of collision (check thread_collision_warner_unittests.cc)
-struct AsserterBase {
+struct BASE_API AsserterBase {
virtual ~AsserterBase() {}
virtual void warn() = 0;
};
-struct DCheckAsserter : public AsserterBase {
+struct BASE_API DCheckAsserter : public AsserterBase {
virtual ~DCheckAsserter() {}
virtual void warn();
};
diff --git a/base/threading/thread_local.h b/base/threading/thread_local.h
index 069543f..4bacf92 100644
--- a/base/threading/thread_local.h
+++ b/base/threading/thread_local.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -49,6 +49,7 @@
#define BASE_THREADING_THREAD_LOCAL_H_
#pragma once
+#include "base/base_api.h"
#include "base/basictypes.h"
#if defined(OS_POSIX)
@@ -60,7 +61,7 @@ namespace base {
namespace internal {
// Helper functions that abstract the cross-platform APIs. Do not use directly.
-struct ThreadLocalPlatform {
+struct BASE_API ThreadLocalPlatform {
#if defined(OS_WIN)
typedef unsigned long SlotType;
#elif defined(OS_POSIX)
diff --git a/base/threading/watchdog.h b/base/threading/watchdog.h
index 4af45dc..fafda43 100644
--- a/base/threading/watchdog.h
+++ b/base/threading/watchdog.h
@@ -21,6 +21,7 @@
#include <string>
+#include "base/base_api.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
#include "base/threading/platform_thread.h"
@@ -28,7 +29,7 @@
namespace base {
-class Watchdog {
+class BASE_API Watchdog {
public:
// Constructor specifies how long the Watchdog will wait before alarming.
Watchdog(const TimeDelta& duration,
diff --git a/base/threading/worker_pool.h b/base/threading/worker_pool.h
index 9a02acc..12b50b4 100644
--- a/base/threading/worker_pool.h
+++ b/base/threading/worker_pool.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -6,6 +6,7 @@
#define BASE_THREADING_WORKER_POOL_H_
#pragma once
+#include "base/base_api.h"
#include "base/tracked.h"
class Task;
@@ -20,7 +21,7 @@ namespace base {
// inside the pool must be extremely careful about other objects they access
// (MessageLoops, Singletons, etc). During shutdown these object may no longer
// exist.
-class WorkerPool {
+class BASE_API WorkerPool {
public:
// This function posts |task| to run on a worker thread. |task_is_slow|
// should be used for tasks that will take a long time to execute. Returns
diff --git a/base/value_conversions.h b/base/value_conversions.h
index 9678fc1..75246d1 100644
--- a/base/value_conversions.h
+++ b/base/value_conversions.h
@@ -8,6 +8,8 @@
// This file contains methods to convert a |FilePath| to a |Value| and back.
+#include "base/base_api.h"
+
class FilePath;
class StringValue;
class Value;
@@ -15,8 +17,8 @@ class Value;
namespace base {
// The caller takes ownership of the returned value.
-StringValue* CreateFilePathValue(const FilePath& in_value);
-bool GetValueAsFilePath(const Value& value, FilePath* file_path);
+BASE_API StringValue* CreateFilePathValue(const FilePath& in_value);
+BASE_API bool GetValueAsFilePath(const Value& value, FilePath* file_path);
} // namespace
diff --git a/base/win/event_trace_controller.h b/base/win/event_trace_controller.h
index 8eb172ed..6cc7e69 100644
--- a/base/win/event_trace_controller.h
+++ b/base/win/event_trace_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
@@ -25,6 +25,8 @@
#include <wmistr.h>
#include <evntrace.h>
#include <string>
+
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -33,7 +35,7 @@ namespace win {
// Utility class to make it easier to work with EVENT_TRACE_PROPERTIES.
// The EVENT_TRACE_PROPERTIES structure contains information about an
// event tracing session.
-class EtwTraceProperties {
+class BASE_API EtwTraceProperties {
public:
EtwTraceProperties();
@@ -83,7 +85,7 @@ class EtwTraceProperties {
// This class implements an ETW controller, which knows how to start and
// stop event tracing sessions, as well as controlling ETW provider
// log levels and enable bit masks under the session.
-class EtwTraceController {
+class BASE_API EtwTraceController {
public:
EtwTraceController();
~EtwTraceController();
diff --git a/base/win/event_trace_provider.h b/base/win/event_trace_provider.h
index 6614c91..7173025 100644
--- a/base/win/event_trace_provider.h
+++ b/base/win/event_trace_provider.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
//
@@ -11,6 +11,8 @@
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>
+
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -80,7 +82,7 @@ template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
// a particular trace level, and whether particular enable flags are set,
// before other resources are consumed to generate and issue the log
// messages themselves.
-class EtwTraceProvider {
+class BASE_API EtwTraceProvider {
public:
// Creates an event trace provider identified by provider_name, which
// will be the name registered with Event Tracing for Windows (ETW).
diff --git a/base/win/i18n.h b/base/win/i18n.h
index ba0f74d..0159fd0 100644
--- a/base/win/i18n.h
+++ b/base/win/i18n.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -18,12 +19,14 @@ namespace i18n {
// Adds to |languages| the list of user preferred UI languages from MUI, if
// available, falling-back on the user default UI language otherwise. Returns
// true if at least one language is added.
-bool GetUserPreferredUILanguageList(std::vector<std::wstring>* languages);
+BASE_API bool GetUserPreferredUILanguageList(
+ std::vector<std::wstring>* languages);
// Adds to |languages| the list of thread, process, user, and system preferred
// UI languages from MUI, if available, falling-back on the user default UI
// language otherwise. Returns true if at least one language is added.
-bool GetThreadPreferredUILanguageList(std::vector<std::wstring>* languages);
+BASE_API bool GetThreadPreferredUILanguageList(
+ std::vector<std::wstring>* languages);
} // namespace i18n
} // namespace win
diff --git a/base/win/object_watcher.h b/base/win/object_watcher.h
index 16534c2..0eef022 100644
--- a/base/win/object_watcher.h
+++ b/base/win/object_watcher.h
@@ -8,6 +8,7 @@
#include <windows.h>
+#include "base/base_api.h"
#include "base/message_loop.h"
namespace base {
@@ -41,7 +42,7 @@ namespace win {
// scope, the watcher_ will be destroyed, and there is no need to worry about
// OnObjectSignaled being called on a deleted MyClass pointer. Easy!
//
-class ObjectWatcher : public MessageLoop::DestructionObserver {
+class BASE_API ObjectWatcher : public MessageLoop::DestructionObserver {
public:
class Delegate {
public:
diff --git a/base/win/registry.h b/base/win/registry.h
index cd5421d..86785cfa 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -9,6 +9,7 @@
#include <windows.h>
#include <string>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -21,7 +22,7 @@ namespace win {
// Note:
// ReadValue family of functions guarantee that the return arguments
// are not touched in case of failure.
-class RegKey {
+class BASE_API RegKey {
public:
RegKey();
RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
@@ -98,7 +99,7 @@ class RegKey {
// For this application I happen to know I wont need data size larger
// than MAX_PATH, but in real life this wouldn't neccessarily be
// adequate.
-class RegistryValueIterator {
+class BASE_API RegistryValueIterator {
public:
RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
@@ -138,7 +139,7 @@ class RegistryValueIterator {
DISALLOW_COPY_AND_ASSIGN(RegistryValueIterator);
};
-class RegistryKeyIterator {
+class BASE_API RegistryKeyIterator {
public:
RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key);
diff --git a/base/win/scoped_bstr.h b/base/win/scoped_bstr.h
index 944562e..61b8969 100644
--- a/base/win/scoped_bstr.h
+++ b/base/win/scoped_bstr.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,7 @@
#include <windows.h>
#include <oleauto.h>
+#include "base/base_api.h"
#include "base/logging.h"
#include "base/string16.h"
@@ -17,7 +18,7 @@ namespace win {
// Manages a BSTR string pointer.
// The class interface is based on scoped_ptr.
-class ScopedBstr {
+class BASE_API ScopedBstr {
public:
ScopedBstr() : bstr_(NULL) {
}
diff --git a/base/win/scoped_variant.h b/base/win/scoped_variant.h
index 6c4d23f..11ffa3e 100644
--- a/base/win/scoped_variant.h
+++ b/base/win/scoped_variant.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -9,6 +9,7 @@
#include <windows.h>
#include <oleauto.h>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -20,7 +21,7 @@ namespace win {
// Instead of inheriting from VARIANT, we take the containment approach
// in order to have more control over the usage of the variant and guard
// against memory leaks.
-class ScopedVariant {
+class BASE_API ScopedVariant {
public:
// Declaration of a global variant variable that's always VT_EMPTY
static const VARIANT kEmptyVariant;
diff --git a/base/win/win_util.h b/base/win/win_util.h
index c9bdce80..847c434 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -27,6 +27,7 @@
#include <string>
+#include "base/base_api.h"
#include "base/string16.h"
struct IPropertyStore;
@@ -36,19 +37,19 @@ typedef _tagpropertykey PROPERTYKEY;
namespace base {
namespace win {
-void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
+BASE_API void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
// Returns the string representing the current user sid.
-bool GetUserSidString(std::wstring* user_sid);
+BASE_API bool GetUserSidString(std::wstring* user_sid);
// Returns true if the shift key is currently pressed.
-bool IsShiftPressed();
+BASE_API bool IsShiftPressed();
// Returns true if the ctrl key is currently pressed.
-bool IsCtrlPressed();
+BASE_API bool IsCtrlPressed();
// Returns true if the alt key is currently pressed.
-bool IsAltPressed();
+BASE_API bool IsAltPressed();
// Returns false if user account control (UAC) has been disabled with the
// EnableLUA registry flag. Returns true if user account control is enabled.
@@ -56,27 +57,27 @@ bool IsAltPressed();
// machines, might still exist and be set to 0 (UAC disabled), in which case
// this function will return false. You should therefore check this flag only
// if the OS is Vista or later.
-bool UserAccountControlIsEnabled();
+BASE_API bool UserAccountControlIsEnabled();
// Sets the application id in given IPropertyStore. The function is intended
// for tagging application/chromium shortcut, browser window and jump list for
// Win7.
-bool SetAppIdForPropertyStore(IPropertyStore* property_store,
- const wchar_t* app_id);
+BASE_API bool SetAppIdForPropertyStore(IPropertyStore* property_store,
+ const wchar_t* app_id);
// Adds the specified |command| using the specified |name| to the AutoRun key.
// |root_key| could be HKCU or HKLM or the root of any user hive.
-bool AddCommandToAutoRun(HKEY root_key, const string16& name,
- const string16& command);
+BASE_API bool AddCommandToAutoRun(HKEY root_key, const string16& name,
+ const string16& command);
// Removes the command specified by |name| from the AutoRun key. |root_key|
// could be HKCU or HKLM or the root of any user hive.
-bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
+BASE_API bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
// Reads the command specified by |name| from the AutoRun key. |root_key|
// could be HKCU or HKLM or the root of any user hive. Used for unit-tests.
-bool ReadCommandFromAutoRun(HKEY root_key,
- const string16& name,
- string16* command);
+BASE_API bool ReadCommandFromAutoRun(HKEY root_key,
+ const string16& name,
+ string16* command);
} // namespace win
} // namespace base
diff --git a/base/win/wrapped_window_proc.h b/base/win/wrapped_window_proc.h
index 0515044..eac150e 100644
--- a/base/win/wrapped_window_proc.h
+++ b/base/win/wrapped_window_proc.h
@@ -13,6 +13,8 @@
#include <windows.h>
+#include "base/base_api.h"
+
namespace base {
namespace win {
@@ -26,10 +28,11 @@ typedef int (__cdecl *WinProcExceptionFilter)(EXCEPTION_POINTERS* info);
// Sets the filter to deal with exceptions inside a WindowProc. Returns the old
// exception filter, if any.
// This function should be called before any window is created.
-WinProcExceptionFilter SetWinProcExceptionFilter(WinProcExceptionFilter filter);
+BASE_API WinProcExceptionFilter SetWinProcExceptionFilter(
+ WinProcExceptionFilter filter);
// Calls the registered exception filter.
-int CallExceptionFilter(EXCEPTION_POINTERS* info);
+BASE_API int CallExceptionFilter(EXCEPTION_POINTERS* info);
// Wrapper that supplies a standard exception frame for the provided WindowProc.
// The normal usage is something like this: