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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 4957005: Move themes garbage-collection out of shutdown code. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 10 years, 1 month 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 | « no previous file | chrome/browser/themes/browser_theme_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 05c6768a9d6e3ac6ed15d2559bb06511fa6a36b3..6de568010647bc2aa692deb0761561b55cce1e15 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -21,6 +21,7 @@
#include "base/values.h"
#include "base/version.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/themes/browser_theme_provider.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/debugger/devtools_manager.h"
#include "chrome/browser/dom_ui/shown_sections_handler.h"
@@ -1460,6 +1461,11 @@ void ExtensionsService::GarbageCollectExtensions() {
NewRunnableFunction(
&extension_file_util::GarbageCollectExtensions, install_directory_,
extension_paths));
+
+ // Also garbage-collect themes.
+ if (profile_) {
asargent_no_longer_on_chrome 2010/11/16 23:13:36 I think it's safe to assume the profile_ is valid
akalin 2010/11/17 00:29:39 True, but i want to be defensive given that this m
+ profile_->GetThemeProvider()->RemoveUnusedThemes();
+ }
}
void ExtensionsService::OnLoadedInstalledExtensions() {
« no previous file with comments | « no previous file | chrome/browser/themes/browser_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698