Commit 1302dcf9 authored by sail@chromium.org's avatar sail@chromium.org

Fix leak in ProfileInfoCache::SetGAIAPictureOfProfileAtIndex

The problem was that some memory allocated by the file thread wasn't being cleaned up. Fix was to stop the file thread and then process all the pending messages on the UI thread.

BUG=105864
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112297 0039d316-1c4b-4281-b951-d872f2087c98
parent faaa5a2a
......@@ -36,6 +36,12 @@ void ProfileInfoCacheTest::SetUp() {
ASSERT_TRUE(testing_profile_manager_.SetUp());
}
void ProfileInfoCacheTest::TearDown() {
// Drain the UI thread to make sure all tasks are completed. This prevents
// memory leaks.
ui_loop_.RunAllPending();
}
ProfileInfoCache* ProfileInfoCacheTest::GetCache() {
return testing_profile_manager_.profile_info_cache();
}
......
......@@ -19,6 +19,7 @@ class ProfileInfoCacheTest : public testing::Test {
virtual ~ProfileInfoCacheTest();
virtual void SetUp() OVERRIDE;
virtual void TearDown() OVERRIDE;
ProfileInfoCache* GetCache();
FilePath GetProfilePath(const std::string& base_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment