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

Unified Diff: chrome/browser/themes/browser_theme_provider.cc

Issue 6546072: Clean up how we handle themes in the extensions system and management API.... Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 10 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/profiles/profile_impl.cc ('k') | chrome/browser/ui/gtk/gtk_theme_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/themes/browser_theme_provider.cc
===================================================================
--- chrome/browser/themes/browser_theme_provider.cc (revision 75613)
+++ chrome/browser/themes/browser_theme_provider.cc (working copy)
@@ -316,9 +316,14 @@
return;
std::string current_theme = GetThemeID();
std::vector<std::string> remove_list;
- const ExtensionList* extensions = service->extensions();
- for (ExtensionList::const_iterator it = extensions->begin();
- it != extensions->end(); ++it) {
+ const ExtensionList* enabled = service->extensions();
+ const ExtensionList* disabled = service->disabled_extensions();
+ ExtensionList extensions;
+ extensions.insert(extensions.end(), enabled->begin(), enabled->end());
+ extensions.insert(extensions.end(), disabled->begin(), disabled->end());
+
+ for (ExtensionList::const_iterator it = extensions.begin();
+ it != extensions.end(); ++it) {
if ((*it)->is_theme() && (*it)->id() != current_theme) {
remove_list.push_back((*it)->id());
}
@@ -587,6 +592,11 @@
}
void BrowserThemeProvider::NotifyThemeChanged(const Extension* extension) {
+ FilePath profile_basename = profile_->GetPath().BaseName();
+
+ LOG(INFO) << profile_basename.value() << " theme changed to: "
+ << (extension ? extension->id() : "null");
+
VLOG(1) << "Sending BROWSER_THEME_CHANGED";
// Redraw!
NotificationService* service = NotificationService::current();
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/gtk/gtk_theme_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698