diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-08 22:49:40 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-08 22:49:40 +0000 |
commit | 5976c2db7a0101e5d9796cec4fbe5c23c4013e68 (patch) | |
tree | 6063d0eab1ad8ca549c694eac3984297423a9ee8 /chrome/browser/chromeos/external_metrics.h | |
parent | 01638de5a849f18e3796564f33af771b037dbb32 (diff) | |
download | chromium_src-5976c2db7a0101e5d9796cec4fbe5c23c4013e68.zip chromium_src-5976c2db7a0101e5d9796cec4fbe5c23c4013e68.tar.gz chromium_src-5976c2db7a0101e5d9796cec4fbe5c23c4013e68.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/chromeos/external_metrics.h')
-rw-r--r-- | chrome/browser/chromeos/external_metrics.h | 2 |
1 files changed, 2 insertions, 0 deletions
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<ExternalMetrics> { FRIEND_TEST(ExternalMetricsTest, ParseExternalMetricsFile); friend class base::RefCountedThreadSafe<ExternalMetrics>; + friend class scoped_ptr<ExternalMetrics>; public: ExternalMetrics() {} |