From 1ad3d20858c13b6448c27e03c48c1a2157ce2127 Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Tue, 12 Nov 2013 08:21:21 +0000 Subject: ash: Remove old OEM wallpaper flags. Remove --ash-oem-wallpaper-large and --ash-oem-wallpaper-small. OEM wallpapers are now passed via the --ash-default-wallpaper-{large,small} switches in conjunction with the --ash-default-wallpaper-is-oem flag. BUG=315267 Review URL: https://codereview.chromium.org/68513005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@234456 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/ash_switches.cc | 7 ------- ash/ash_switches.h | 2 -- ash/desktop_background/desktop_background_controller.cc | 7 +------ chrome/browser/chromeos/extensions/wallpaper_private_api.cc | 12 +++--------- 4 files changed, 4 insertions(+), 24 deletions(-) diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc index 2cfa6bd..6c026e0 100644 --- a/ash/ash_switches.cc +++ b/ash/ash_switches.cc @@ -143,13 +143,6 @@ const char kAshHideNotificationsForFactory[] = // "1024x768*2" sets the scale factor to 2 for a high DPI display. const char kAshHostWindowBounds[] = "ash-host-window-bounds"; -// OEM-supplied wallpaper (as paths to trusted, non-user-writable JPEG files). -// TODO(derat): Remove these switches once OEM wallpaper is passed via -// kAshDefaultWallpaper{Large,Small} and kAshDefaultWallpaperIsOem is set -// correctly: http://crbug.com/315267 -const char kAshOemWallpaperLarge[] = "ash-oem-wallpaper-large"; -const char kAshOemWallpaperSmall[] = "ash-oem-wallpaper-small"; - // Specifies the delay in milliseconds before beginning overview mode after // getting an alt tab keypress. const char kAshOverviewDelayOnAltTab[] = "ash-overview-delay-on-alt-tab"; diff --git a/ash/ash_switches.h b/ash/ash_switches.h index 612083b..808a8c1 100644 --- a/ash/ash_switches.h +++ b/ash/ash_switches.h @@ -58,8 +58,6 @@ ASH_EXPORT extern const char kAshGuestWallpaperLarge[]; ASH_EXPORT extern const char kAshGuestWallpaperSmall[]; ASH_EXPORT extern const char kAshHideNotificationsForFactory[]; ASH_EXPORT extern const char kAshHostWindowBounds[]; -ASH_EXPORT extern const char kAshOemWallpaperLarge[]; -ASH_EXPORT extern const char kAshOemWallpaperSmall[]; ASH_EXPORT extern const char kAshOverviewDelayOnAltTab[]; ASH_EXPORT extern const char kAshSecondaryDisplayLayout[]; ASH_EXPORT extern const char kAshTouchHud[]; diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc index 5557398..2f4e633 100644 --- a/ash/desktop_background/desktop_background_controller.cc +++ b/ash/desktop_background/desktop_background_controller.cc @@ -224,13 +224,8 @@ bool DesktopBackgroundController::SetDefaultWallpaper(bool is_guest) { switch_name = use_large ? switches::kAshGuestWallpaperLarge : switches::kAshGuestWallpaperSmall; } else { - const char* oem_switch_name = use_large ? switches::kAshOemWallpaperLarge : - switches::kAshOemWallpaperSmall; - const char* default_switch_name = use_large ? - switches::kAshDefaultWallpaperLarge : + switch_name = use_large ? switches::kAshDefaultWallpaperLarge : switches::kAshDefaultWallpaperSmall; - switch_name = command_line->HasSwitch(oem_switch_name) ? oem_switch_name : - default_switch_name; } file_path = command_line->GetSwitchValuePath(switch_name); diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc index 71eb832..a27d4b4 100644 --- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc +++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc @@ -57,9 +57,7 @@ const char kWallpaperManifestBaseURL[] = "https://commondatastorage.googleapis." bool IsOEMDefaultWallpaper() { return CommandLine::ForCurrentProcess()->HasSwitch( - ash::switches::kAshDefaultWallpaperIsOem) || - CommandLine::ForCurrentProcess()->HasSwitch( - ash::switches::kAshOemWallpaperSmall); + ash::switches::kAshDefaultWallpaperIsOem); } // Saves |data| as |file_name| to directory with |key|. Return false if the @@ -622,12 +620,8 @@ bool WallpaperPrivateGetThumbnailFunction::RunImpl() { // TODO(bshe): Small resolution wallpaper is used here as wallpaper // thumbnail. We should either resize it or include a wallpaper thumbnail in // addition to large and small wallpaper resolutions. - thumbnail_path = CommandLine::ForCurrentProcess()->HasSwitch( - ash::switches::kAshDefaultWallpaperIsOem) ? - CommandLine::ForCurrentProcess()->GetSwitchValuePath( - ash::switches::kAshDefaultWallpaperSmall) : - CommandLine::ForCurrentProcess()->GetSwitchValuePath( - ash::switches::kAshOemWallpaperSmall); + thumbnail_path = CommandLine::ForCurrentProcess()->GetSwitchValuePath( + ash::switches::kAshDefaultWallpaperSmall); } sequence_token_ = BrowserThread::GetBlockingPool()-> -- cgit v1.1