From 5976c2db7a0101e5d9796cec4fbe5c23c4013e68 Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Tue, 8 Dec 2009 22:49:40 +0000 Subject: fix for memory leak and illegal access. (found in valgrind test) * name, values for callback seems to be on stack. i changed const char* to string so that it can copy, and also expect_eq can print string when failed. BUG=None TEST=Run unit_tests on valgrind. Review URL: http://codereview.chromium.org/470006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34099 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/chromeos/external_metrics.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chrome/browser/chromeos/external_metrics.h') diff --git a/chrome/browser/chromeos/external_metrics.h b/chrome/browser/chromeos/external_metrics.h index 2721939..55774cf 100644 --- a/chrome/browser/chromeos/external_metrics.h +++ b/chrome/browser/chromeos/external_metrics.h @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "base/compiler_specific.h" +#include "base/scoped_ptr.h" #include "base/task.h" #include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST @@ -23,6 +24,7 @@ namespace chromeos { class ExternalMetrics : public base::RefCountedThreadSafe { FRIEND_TEST(ExternalMetricsTest, ParseExternalMetricsFile); friend class base::RefCountedThreadSafe; + friend class scoped_ptr; public: ExternalMetrics() {} -- cgit v1.1