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

Unified Diff: chrome/browser/profile.cc

Issue 159705: Implement kCurrentThemeID so we can know what the last theme to be installed ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
===================================================================
--- chrome/browser/profile.cc (revision 22263)
+++ chrome/browser/profile.cc (working copy)
@@ -126,7 +126,8 @@
#if defined(OS_LINUX)
prefs->RegisterBooleanPref(prefs::kUsesSystemTheme, false);
#endif
- prefs->RegisterStringPref(prefs::kCurrentThemeID, L"");
+ prefs->RegisterStringPref(prefs::kCurrentThemeID,
+ UTF8ToWide(BrowserThemeProvider::kDefaultThemeID));
prefs->RegisterDictionaryPref(prefs::kCurrentThemeImages);
prefs->RegisterDictionaryPref(prefs::kCurrentThemeColors);
prefs->RegisterDictionaryPref(prefs::kCurrentThemeTints);
@@ -309,6 +310,10 @@
GetOriginalProfile()->ClearTheme();
}
+ virtual Extension* GetTheme() {
+ return GetOriginalProfile()->GetTheme();
+ }
+
virtual ThemeProvider* GetThemeProvider() {
return GetOriginalProfile()->GetThemeProvider();
}
@@ -980,6 +985,16 @@
theme_provider_.get()->UseDefaultTheme();
}
+Extension* ProfileImpl::GetTheme() {
+ InitThemes();
+
+ std::string id = theme_provider_.get()->GetThemeID();
+ if (id == BrowserThemeProvider::kDefaultThemeID)
+ return NULL;
+
+ return extensions_service_->GetExtensionById(id);
+}
+
ThemeProvider* ProfileImpl::GetThemeProvider() {
InitThemes();
return theme_provider_.get();
« 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