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

Unified Diff: sync/internal_api/public/util/weak_handle.h

Issue 11624037: [sync] Componentize sync: Part 6: Add more SYNC_EXPORTs to files in src/sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix linker errors from component build (enabled in another patch) Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/public/util/syncer_error.h ('k') | sync/internal_api/sync_encryption_handler_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/util/weak_handle.h
diff --git a/sync/internal_api/public/util/weak_handle.h b/sync/internal_api/public/util/weak_handle.h
index bac7c379230f5e23886b78a35eb45f1810554a0e..dcf1ef5743e90c02737d994387551f59bebd4250 100644
--- a/sync/internal_api/public/util/weak_handle.h
+++ b/sync/internal_api/public/util/weak_handle.h
@@ -58,6 +58,7 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "sync/base/sync_export.h"
namespace base {
class MessageLoopProxy;
@@ -99,7 +100,7 @@ struct ParamTraits<T[]> {
// Base class for WeakHandleCore<T> to avoid template bloat. Handles
// the interaction with the owner thread and its message loop.
-class WeakHandleCoreBase {
+class SYNC_EXPORT WeakHandleCoreBase {
Raghu Simha 2012/12/26 08:02:38 Unfortunately, WeakHandleCoreBase must be exported
public:
// Assumes the current thread is the owner thread.
WeakHandleCoreBase();
@@ -109,7 +110,7 @@ class WeakHandleCoreBase {
protected:
// May be destroyed on any thread.
- ~WeakHandleCoreBase();
+ virtual ~WeakHandleCoreBase();
// May be called on any thread.
void PostToOwnerThread(const tracked_objects::Location& from_here,
@@ -125,7 +126,7 @@ class WeakHandleCoreBase {
// WeakHandleCore<T> contains all the logic for WeakHandle<T>.
template <typename T>
class WeakHandleCore
- : public NON_EXPORTED_BASE(WeakHandleCoreBase),
+ : public WeakHandleCoreBase,
public base::RefCountedThreadSafe<WeakHandleCore<T> > {
public:
// Must be called on |ptr|'s owner thread, which is assumed to be
@@ -199,7 +200,7 @@ class WeakHandleCore
friend class base::RefCountedThreadSafe<WeakHandleCore<T> >;
// May be destroyed on any thread.
- ~WeakHandleCore() {}
+ virtual ~WeakHandleCore() {}
// GCC 4.2.1 on OS X gets confused if all the DoCall functions are
// named the same, so we distinguish them.
@@ -291,6 +292,8 @@ class WeakHandle {
new internal::WeakHandleCore<T>(other.Get()) :
NULL) {}
+ virtual ~WeakHandle() {}
+
// Returns true iff this WeakHandle is initialized. Note that being
// initialized isn't a guarantee that the underlying object is still
// alive.
« no previous file with comments | « sync/internal_api/public/util/syncer_error.h ('k') | sync/internal_api/sync_encryption_handler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698