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

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

Issue 1638063003: [MD] Remove new incognito styling from guest mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
Index: chrome/browser/themes/theme_service.cc
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index dc413c3b490ee1650736fd02a29b3afc6da9bce7..b96dd330d9efd53e5683929990f1bc6d8c363fb2 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -744,18 +744,18 @@ const ui::ThemeProvider& ThemeService::GetThemeProviderForProfile(
// in incognito. Since the OSX version of ThemeService caches colors, and
// both ThemeProviders use the same ThemeService some code needs to be
// rearranged.
- bool off_the_record = false;
+ bool incognito = false;
#else
- bool off_the_record = profile->IsOffTheRecord();
+ bool incognito = profile->GetProfileType() == Profile::INCOGNITO_PROFILE;
Peter Kasting 2016/01/26 23:05:29 Nit: You might want to explicitly note why calling
#endif
- return off_the_record ? service->otr_theme_provider_
- : service->original_theme_provider_;
+ return incognito ? service->otr_theme_provider_
+ : service->original_theme_provider_;
}
ThemeService::BrowserThemeProvider::BrowserThemeProvider(
const ThemeService& theme_service,
- bool off_the_record)
- : theme_service_(theme_service), off_the_record_(off_the_record) {}
+ bool incognito)
+ : theme_service_(theme_service), incognito_(incognito) {}
ThemeService::BrowserThemeProvider::~BrowserThemeProvider() {}
@@ -765,7 +765,7 @@ gfx::ImageSkia* ThemeService::BrowserThemeProvider::GetImageSkiaNamed(
}
SkColor ThemeService::BrowserThemeProvider::GetColor(int id) const {
- return theme_service_.GetColor(id, off_the_record_);
+ return theme_service_.GetColor(id, incognito_);
}
int ThemeService::BrowserThemeProvider::GetDisplayProperty(int id) const {
« no previous file with comments | « chrome/browser/themes/theme_service.h ('k') | chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698