diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 22:52:05 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-17 22:52:05 +0000 |
commit | d410efc3d8d188b6999222d68fff4f63444219e1 (patch) | |
tree | ae7292168ea356547748cb047072749bc614b956 /chrome/browser/profile.cc | |
parent | e52bc1e0d760a3a4829ab1cf8adfcb5a634c3914 (diff) | |
download | chromium_src-d410efc3d8d188b6999222d68fff4f63444219e1.zip chromium_src-d410efc3d8d188b6999222d68fff4f63444219e1.tar.gz chromium_src-d410efc3d8d188b6999222d68fff4f63444219e1.tar.bz2 |
Uninstall themes when all theme infobars are gone; not on each infobar's destruction.
There are multiple problems with the current implementation:
- It handles multiple tabs with theme install infobars badly.
- It has a subtle race condition where installing a second theme, and then
installing the original theme (note: not clicking undo) uninstalled both
themes.
Instead, only uninstall unused themes when all infobars are closed down.
BUG=none
TEST=Install theme A. Install theme B. Install theme A. Restart chrome. Theme A should show.
TEST=Install theme A in window 1. Install theme B in window 2. Install theme C in window 3. Clicking undo in any of those windows in any order should work.
Review URL: http://codereview.chromium.org/504052
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34890 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profile.cc')
-rw-r--r-- | chrome/browser/profile.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/profile.cc b/chrome/browser/profile.cc index e61ae5a..7b1b80e 100644 --- a/chrome/browser/profile.cc +++ b/chrome/browser/profile.cc @@ -464,7 +464,7 @@ class OffTheRecordProfileImpl : public Profile, return GetOriginalProfile()->GetTheme(); } - virtual ThemeProvider* GetThemeProvider() { + virtual BrowserThemeProvider* GetThemeProvider() { return GetOriginalProfile()->GetThemeProvider(); } @@ -1228,7 +1228,7 @@ Extension* ProfileImpl::GetTheme() { return extensions_service_->GetExtensionById(id, false); } -ThemeProvider* ProfileImpl::GetThemeProvider() { +BrowserThemeProvider* ProfileImpl::GetThemeProvider() { InitThemes(); return theme_provider_.get(); } |