summaryrefslogtreecommitdiffstats
path: root/chrome/browser/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/browser/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/browser/profile.cc')
-rw-r--r--chrome/browser/profile.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 8655eae..208bd0c 100644
--- a/chrome/browser/profile.cc
+++ b/chrome/browser/profile.cc
@@ -536,8 +536,6 @@ class OffTheRecordProfileImpl : public Profile,
// The download manager that only stores downloaded items in memory.
scoped_refptr<DownloadManager> download_manager_;
- scoped_refptr<BrowserThemeProvider> theme_provider_;
-
// Use a special WebKit context for OTR browsing.
scoped_refptr<WebKitContext> webkit_context_;
@@ -725,7 +723,7 @@ ProfileImpl::~ProfileImpl() {
download_manager_ = NULL;
// The theme provider provides bitmaps to whoever wants them.
- theme_provider_ = NULL;
+ theme_provider_.reset();
// The ThumbnailStore saves thumbnails used by the NTP. Call Shutdown to
// save any new thumbnails to disk and release its reference to the
@@ -1112,13 +1110,12 @@ bool ProfileImpl::HasCreatedDownloadManager() const {
void ProfileImpl::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);
}
}