base: Remove should_leak_tasks_ from MessageLoop

The flag is no longer referenced.

BUG=61131
TEST=base_unittests

Review URL: http://codereview.chromium.org/9903003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129586 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 1fb61592c0e6b337475b0cf70fef87879f8071e4
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 13b0bb6..cc7faa3 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -130,7 +130,6 @@
       exception_restoration_(false),
       message_histogram_(NULL),
       state_(NULL),
-      should_leak_tasks_(true),
 #ifdef OS_WIN
       os_modal_loop_(false),
 #endif  // OS_WIN
@@ -509,17 +508,6 @@
 
 bool MessageLoop::DeletePendingTasks() {
   bool did_work = !work_queue_.empty();
-  // TODO(darin): Delete all tasks once it is safe to do so.
-  // Until it is totally safe, just do it when running Valgrind.
-  //
-  // See http://crbug.com/61131
-  //
-#if defined(USE_HEAPCHECKER)
-  should_leak_tasks_ = false;
-#else
-      if (RunningOnValgrind())
-        should_leak_tasks_ = false;
-#endif  // defined(OS_POSIX)
   while (!work_queue_.empty()) {
     PendingTask pending_task = work_queue_.front();
     work_queue_.pop();
@@ -541,11 +529,9 @@
   // code is replicating legacy behavior, and should not be considered
   // absolutely "correct" behavior.  See TODO above about deleting all tasks
   // when it's safe.
-  should_leak_tasks_ = false;
   while (!delayed_work_queue_.empty()) {
     delayed_work_queue_.pop();
   }
-  should_leak_tasks_ = true;
   return did_work;
 }
 
diff --git a/base/message_loop.h b/base/message_loop.h
index 355d58b..5851be1 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -509,10 +509,6 @@
 
   RunState* state_;
 
-  // The need for this variable is subtle. Please see implementation comments
-  // around where it is used.
-  bool should_leak_tasks_;
-
 #if defined(OS_WIN)
   base::TimeTicks high_resolution_timer_expiration_;
   // Should be set to true before calling Windows APIs like TrackPopupMenu, etc