summaryrefslogtreecommitdiffstats
path: root/base/tracked_objects.h
diff options
context:
space:
mode:
authorpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-08 20:03:42 +0000
committerpaulg@google.com <paulg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-08 20:03:42 +0000
commit764be58b4a7cc20271571be59118d260aad13966 (patch)
tree3d9d35e2ad584e0ce12893e4eb1d1f3230153642 /base/tracked_objects.h
parent9bc6ce1d3c1a78b8a6997e67cd8bbd3497f081fb (diff)
downloadchromium_src-764be58b4a7cc20271571be59118d260aad13966.zip
chromium_src-764be58b4a7cc20271571be59118d260aad13966.tar.gz
chromium_src-764be58b4a7cc20271571be59118d260aad13966.tar.bz2
Stub out unused Windows specific code.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/tracked_objects.h')
-rw-r--r--base/tracked_objects.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/base/tracked_objects.h b/base/tracked_objects.h
index 23638e1..62a106a 100644
--- a/base/tracked_objects.h
+++ b/base/tracked_objects.h
@@ -173,7 +173,12 @@ class Snapshot {
class DataCollector {
public:
+#if defined(__GNUC__)
+ // gcc won't compile with 'const Snapshot'.
+ typedef std::vector<Snapshot> Collection;
+#else
typedef std::vector<const Snapshot> Collection;
+#endif
// Construct with a list of how many threads should contribute. This helps us
// determine (in the async case) when we are done with all contributions.
@@ -387,6 +392,7 @@ class ThreadData {
static bool StartTracking(bool status);
static bool IsActive();
+#ifdef OS_WIN
// WARNING: ONLY call this function when all MessageLoops are still intact for
// all registered threads. IF you call it later, you will crash.
// Note: You don't need to call it at all, and you can wait till you are
@@ -398,6 +404,7 @@ class ThreadData {
// it Posts a Task to all registered threads to be sure they are aware that no
// more accumulation can take place.
static void ShutdownMultiThreadTracking();
+#endif
// WARNING: ONLY call this function when you are running single threaded
// (again) and all message loops and threads have terminated. Until that
@@ -432,6 +439,7 @@ class ThreadData {
Lock lock_; // protect access to remaining_count_.
};
+#ifdef OS_WIN
// A Task class that runs a static method supplied, and checks to see if this
// is the last tasks instance (on last thread) that will run the method.
// IF this is the last run, then the supplied event is signalled.
@@ -452,6 +460,7 @@ class ThreadData {
DISALLOW_EVIL_CONSTRUCTORS(RunTheStatic);
};
+#endif
// Each registered thread is called to set status_ to SHUTDOWN.
// This is done redundantly on every registered thread because it is not