Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1692)

Unified Diff: chrome/browser/profile.cc

Issue 223027: Convert the BrowerThemeProvider pointer from being ref counted to (Closed)
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/test/testing_profile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profile.cc
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc
index 8655eae02007bb8b4efb6ac9f5b4954c4349355a..208bd0cf9baa3890c540166fcf0313f7af77881d 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);
}
}
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/test/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698