Remove Purify and Quantify.Doing so will reduce substantially the size of the project files.

BUG=92102
Review URL: http://codereview.chromium.org/7528010

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


CrOS-Libchrome-Original-Commit: 64e95e1c7b3e5d946a82002f6fed8f6ada4222e7
diff --git a/base/base.gypi b/base/base.gypi
index 7320979..642e47f 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -133,8 +133,6 @@
           'mach_ipc_mac.h',
           'mach_ipc_mac.mm',
           'memory/linked_ptr.h',
-          'memory/memory_debug.cc',
-          'memory/memory_debug.h',
           'memory/mru_cache.h',
           'memory/raw_scoped_refptr_mismatch_checker.h',
           'memory/ref_counted.cc',
@@ -542,7 +540,6 @@
         [ 'OS != "win"', {
             'dependencies': ['../third_party/libevent/libevent.gyp:libevent'],
             'sources!': [
-              'third_party/purify/pure_api.c',
               'event_recorder.cc',
               'resource_util.cc',
             ],
@@ -561,8 +558,6 @@
         'third_party/nspr/prcpucfg.h',
         'third_party/nspr/prcpucfg_win.h',
         'third_party/nspr/prtypes.h',
-        'third_party/purify/pure.h',
-        'third_party/purify/pure_api.c',
         'third_party/xdg_user_dirs/xdg_user_dir_lookup.cc',
         'third_party/xdg_user_dirs/xdg_user_dir_lookup.h',
         'auto_reset.h',
diff --git a/base/memory/memory_debug.cc b/base/memory/memory_debug.cc
deleted file mode 100644
index f020b94..0000000
--- a/base/memory/memory_debug.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-#include "base/memory/memory_debug.h"
-
-#ifdef PURIFY
-// this #define is used to prevent people from directly using pure.h
-// instead of memory_debug.h
-#define PURIFY_PRIVATE_INCLUDE
-#include "base/third_party/purify/pure.h"
-#endif
-
-namespace base {
-
-bool MemoryDebug::memory_in_use_ = false;
-
-void MemoryDebug::SetMemoryInUseEnabled(bool enabled) {
-  memory_in_use_ = enabled;
-}
-
-void MemoryDebug::DumpAllMemoryInUse() {
-#ifdef PURIFY
-  if (memory_in_use_)
-    PurifyAllInuse();
-#endif
-}
-
-void MemoryDebug::DumpNewMemoryInUse() {
-#ifdef PURIFY
-  if (memory_in_use_)
-    PurifyNewInuse();
-#endif
-}
-
-void MemoryDebug::DumpAllLeaks() {
-#ifdef PURIFY
-  PurifyAllLeaks();
-#endif
-}
-
-void MemoryDebug::DumpNewLeaks() {
-#ifdef PURIFY
-  PurifyNewLeaks();
-#endif
-}
-
-void MemoryDebug::MarkAsInitialized(void* addr, size_t size) {
-#ifdef PURIFY
-  PurifyMarkAsInitialized(addr, size);
-#endif
-}
-
-}  // namespace base
diff --git a/base/memory/memory_debug.h b/base/memory/memory_debug.h
deleted file mode 100644
index 740fb06..0000000
--- a/base/memory/memory_debug.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-// Functions used to debug memory usage, leaks, and other memory issues.
-// All methods are effectively no-ops unless this program is being run through
-// a supported memory tool (currently, only Purify)
-
-#ifndef BASE_MEMORY_MEMORY_DEBUG_H_
-#define BASE_MEMORY_MEMORY_DEBUG_H_
-#pragma once
-
-#include "base/base_export.h"
-#include "base/basictypes.h"
-
-namespace base {
-
-class BASE_EXPORT 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.
-  static void SetMemoryInUseEnabled(bool enabled);
-
-  // Dump information about all memory in use.
-  static void DumpAllMemoryInUse();
-  // Dump information about new memory in use since the last
-  // call to DumpAllMemoryInUse() or DumpNewMemoryInUse().
-  static void DumpNewMemoryInUse();
-
-  // Dump information about all current memory leaks.
-  static void DumpAllLeaks();
-  // Dump information about new memory leaks since the last
-  // call to DumpAllLeaks() or DumpNewLeaks()
-  static void DumpNewLeaks();
-
-  // Mark |size| bytes of memory as initialized, so it doesn't produce any UMRs
-  // or UMCs.
-  static void MarkAsInitialized(void* addr, size_t size);
-
- private:
-  static bool memory_in_use_;
-
-  DISALLOW_IMPLICIT_CONSTRUCTORS(MemoryDebug);
-};
-
-}  // namespace base
-
-#endif  // BASE_MEMORY_MEMORY_DEBUG_H_
diff --git a/base/memory/singleton_unittest.cc b/base/memory/singleton_unittest.cc
index ba10c75..068148f 100644
--- a/base/memory/singleton_unittest.cc
+++ b/base/memory/singleton_unittest.cc
@@ -223,8 +223,7 @@
 
   // Verify that only the expected callback has been called.
   VerifiesCallbacks();
-  // Delete the leaky singleton. It is interesting to note that Purify does
-  // *not* detect the leak when this call is commented out. :(
+  // Delete the leaky singleton.
   DeleteLeakySingleton();
 
   // The static singleton can't be acquired post-atexit.
diff --git a/base/message_loop.cc b/base/message_loop.cc
index 02534f5..19ce904 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -532,12 +532,11 @@
 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 Purify or
-  // Valgrind.
+  // Until it is totally safe, just do it when running Valgrind.
   //
   // See http://crbug.com/61131
   //
-#if defined(PURIFY) || defined(USE_HEAPCHECKER)
+#if defined(USE_HEAPCHECKER)
   should_leak_tasks_ = false;
 #else
       if (RunningOnValgrind())
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc
index a790add..f1ef2b0 100644
--- a/base/metrics/field_trial_unittest.cc
+++ b/base/metrics/field_trial_unittest.cc
@@ -40,7 +40,7 @@
 };
 
 // Test registration, and also check that destructors are called for trials
-// (and that Purify doesn't catch us leaking).
+// (and that Valgrind doesn't catch us leaking).
 TEST_F(FieldTrialTest, Registration) {
   const char* name1 = "name 1 test";
   const char* name2 = "name 2 test";
diff --git a/base/pickle.cc b/base/pickle.cc
index a1d2061..238c3a1 100644
--- a/base/pickle.cc
+++ b/base/pickle.cc
@@ -394,7 +394,7 @@
 }
 
 void Pickle::EndWrite(char* dest, int length) {
-  // Zero-pad to keep tools like purify from complaining about uninitialized
+  // Zero-pad to keep tools like valgrind from complaining about uninitialized
   // memory.
   if (length % sizeof(uint32))
     memset(dest + length, 0, sizeof(uint32) - (length % sizeof(uint32)));
diff --git a/base/timer_unittest.cc b/base/timer_unittest.cc
index 79d3a4e..bb0eade 100644
--- a/base/timer_unittest.cc
+++ b/base/timer_unittest.cc
@@ -289,7 +289,7 @@
 }
 
 // If underline timer does not handle properly, we will crash or fail
-// in full page heap or purify environment.
+// in full page heap environment.
 TEST(TimerTest, OneShotSelfDeletingTimer) {
   RunTest_OneShotSelfDeletingTimer(MessageLoop::TYPE_DEFAULT);
   RunTest_OneShotSelfDeletingTimer(MessageLoop::TYPE_UI);
@@ -337,7 +337,7 @@
   // This test is designed to verify that shutdown of the
   // message loop does not cause crashes if there were pending
   // timers not yet fired.  It may only trigger exceptions
-  // if debug heap checking (or purify) is enabled.
+  // if debug heap checking is enabled.
   bool did_run = false;
   {
     OneShotTimerTester a(&did_run);