From 761962cffc1fc526b4e961fdc3698b2f1ee799c3 Mon Sep 17 00:00:00 2001 From: "tony@chromium.org" Date: Fri, 25 Sep 2009 00:18:15 +0000 Subject: Convert the BrowerThemeProvider pointer from being ref counted to not being ref counted. It's owned by the profile and it doesn't need to be ref counted. Review URL: http://codereview.chromium.org/223027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27152 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/testing_profile.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome/test/testing_profile.cc') diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc index bddfc7f..2f417cf 100644 --- a/chrome/test/testing_profile.cc +++ b/chrome/test/testing_profile.cc @@ -175,19 +175,18 @@ void TestingProfile::CreateTemplateURLModel() { void TestingProfile::UseThemeProvider(BrowserThemeProvider* theme_provider) { theme_provider->Init(this); created_theme_provider_ = true; - theme_provider_ = theme_provider; + theme_provider_.reset(theme_provider); } void TestingProfile::InitThemes() { if (!created_theme_provider_) { #if defined(OS_LINUX) && !defined(TOOLKIT_VIEWS) - scoped_refptr themes(new GtkThemeProvider); + theme_provider_.reset(new GtkThemeProvider); #else - scoped_refptr themes(new BrowserThemeProvider); + theme_provider_.reset(new BrowserThemeProvider); #endif - themes->Init(this); + theme_provider_->Init(this); created_theme_provider_ = true; - theme_provider_.swap(themes); } } -- cgit v1.1