summaryrefslogtreecommitdiffstats
path: root/chrome/test/testing_profile.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 00:18:15 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-25 00:18:15 +0000
commit761962cffc1fc526b4e961fdc3698b2f1ee799c3 (patch)
tree676bbc41c2b690054df749fc89a97cdbf51cb2af /chrome/test/testing_profile.cc
parentd0d639af9da992e49cd9a8fbed43953b9ec0916e (diff)
downloadchromium_src-761962cffc1fc526b4e961fdc3698b2f1ee799c3.zip
chromium_src-761962cffc1fc526b4e961fdc3698b2f1ee799c3.tar.gz
chromium_src-761962cffc1fc526b4e961fdc3698b2f1ee799c3.tar.bz2
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
Diffstat (limited to 'chrome/test/testing_profile.cc')
-rw-r--r--chrome/test/testing_profile.cc9
1 files changed, 4 insertions, 5 deletions
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<BrowserThemeProvider> themes(new GtkThemeProvider);
+ theme_provider_.reset(new GtkThemeProvider);
#else
- scoped_refptr<BrowserThemeProvider> themes(new BrowserThemeProvider);
+ theme_provider_.reset(new BrowserThemeProvider);
#endif
- themes->Init(this);
+ theme_provider_->Init(this);
created_theme_provider_ = true;
- theme_provider_.swap(themes);
}
}