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

Unified Diff: chrome/browser/chromeos/arc/arc_wallpaper_service.cc

Issue 2332063004: cheets: remove setWallpaper from ArcIntentHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Instead of removing SetWallpaper, rename it to SetWallpaperDeprecated. Created 4 years, 3 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/chromeos/arc/arc_wallpaper_service.cc
diff --git a/chrome/browser/chromeos/arc/arc_wallpaper_service.cc b/chrome/browser/chromeos/arc/arc_wallpaper_service.cc
index eed1507ce6235391d64740e1c17cd76a1ddd94df..f6a12cdb5a1eaba07ac09ec039de27a4aba85917 100644
--- a/chrome/browser/chromeos/arc/arc_wallpaper_service.cc
+++ b/chrome/browser/chromeos/arc/arc_wallpaper_service.cc
@@ -74,8 +74,6 @@ std::vector<uint8_t> EncodeImagePng(const gfx::ImageSkia image) {
ArcWallpaperService::ArcWallpaperService(ArcBridgeService* bridge_service)
: ArcService(bridge_service), binding_(this) {
arc_bridge_service()->wallpaper()->AddObserver(this);
- DCHECK(!ArcWallpaperService::instance());
- ArcWallpaperService::set_instance(this);
}
ArcWallpaperService::~ArcWallpaperService() {
@@ -84,8 +82,6 @@ ArcWallpaperService::~ArcWallpaperService() {
// call Cancel() even when there is no in-flight request.
ImageDecoder::Cancel(this);
arc_bridge_service()->wallpaper()->RemoveObserver(this);
- DCHECK(ArcWallpaperService::instance() == this);
- ArcWallpaperService::set_instance(nullptr);
}
void ArcWallpaperService::OnInstanceReady() {
@@ -116,16 +112,6 @@ void ArcWallpaperService::GetWallpaper(const GetWallpaperCallback& callback) {
base::Bind(&EncodeImagePng, wallpaper), callback);
}
-void ArcWallpaperService::SetWallpaperJpeg(
- const std::vector<uint8_t>& jpeg_data) {
- DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
- // If there is an in-flight request, cancel it. It is safe to call Cancel()
- // even when there is no in-flight request.
- ImageDecoder::Cancel(this);
- ImageDecoder::StartWithOptions(this, std::move(jpeg_data),
- ImageDecoder::ROBUST_JPEG_CODEC, true);
-}
-
void ArcWallpaperService::OnImageDecoded(const SkBitmap& bitmap) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
SetBitmapAsWallpaper(bitmap);

Powered by Google App Engine
This is Rietveld 408576698