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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_resource_cache.cc

Issue 23614007: Use the normal Google logo for managed users for --enable-instant-extended-api (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed mac compile failure Created 7 years, 4 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/ui/webui/ntp/ntp_resource_cache.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
index 73ccf8d3d4f9286d253a9829d6a99b43236d647c..2ecaebf50bbf68c4b3d6870b77d855c4b508d504 100644
--- a/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_resource_cache.cc
@@ -127,10 +127,6 @@ SkColor GetThemeColor(ui::ThemeProvider* tp, int id) {
// states when the bar is attached or detached.
std::string GetNewTabBackgroundCSS(const ui::ThemeProvider* theme_provider,
bool bar_attached) {
- int alignment;
- theme_provider->GetDisplayProperty(
- ThemeProperties::NTP_BACKGROUND_ALIGNMENT, &alignment);
-
// TODO(glen): This is a quick workaround to hide the notused.png image when
// no image is provided - we don't have time right now to figure out why
// this is painting as white.
@@ -139,6 +135,9 @@ std::string GetNewTabBackgroundCSS(const ui::ThemeProvider* theme_provider,
return "-64px";
}
+ int alignment = theme_provider->GetDisplayProperty(
+ ThemeProperties::NTP_BACKGROUND_ALIGNMENT);
+
if (bar_attached)
return ThemeProperties::AlignmentToString(alignment);
@@ -161,9 +160,8 @@ std::string GetNewTabBackgroundCSS(const ui::ThemeProvider* theme_provider,
// masks in theme_service.h).
std::string GetNewTabBackgroundTilingCSS(
const ui::ThemeProvider* theme_provider) {
- int repeat_mode;
- theme_provider->GetDisplayProperty(
- ThemeProperties::NTP_BACKGROUND_TILING, &repeat_mode);
+ int repeat_mode = theme_provider->GetDisplayProperty(
+ ThemeProperties::NTP_BACKGROUND_TILING);
return ThemeProperties::TilingToString(repeat_mode);
}
@@ -506,10 +504,9 @@ void NTPResourceCache::CreateNewTabHTML() {
// Control fade and resize animations.
load_time_data.SetBoolean("anim", ui::Animation::ShouldRenderRichAnimation());
- int alignment;
ui::ThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_);
- tp->GetDisplayProperty(ThemeProperties::NTP_BACKGROUND_ALIGNMENT,
- &alignment);
+ int alignment = tp->GetDisplayProperty(
+ ThemeProperties::NTP_BACKGROUND_ALIGNMENT);
load_time_data.SetString("themegravity",
(alignment & ThemeProperties::ALIGN_RIGHT) ? "right" : "");
« no previous file with comments | « chrome/browser/ui/views/frame/browser_desktop_root_window_host_win.cc ('k') | ui/base/default_theme_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698