| Index: chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc
|
| ===================================================================
|
| --- chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc (revision 176443)
|
| +++ chrome/browser/ui/webui/options/chromeos/wallpaper_source.cc (working copy)
|
| @@ -10,6 +10,7 @@
|
| #include "base/synchronization/cancellation_flag.h"
|
| #include "base/threading/worker_pool.h"
|
| #include "chrome/browser/chromeos/login/user_manager.h"
|
| +#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
|
| #include "chrome/common/url_constants.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "grit/ui_resources.h"
|
| @@ -94,13 +95,16 @@
|
| };
|
|
|
| WallpaperImageSource::WallpaperImageSource()
|
| - : DataSource(chrome::kChromeUIWallpaperImageHost, NULL),
|
| - weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
|
| + : weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
|
| }
|
|
|
| WallpaperImageSource::~WallpaperImageSource() {
|
| }
|
|
|
| +std::string WallpaperImageSource::GetSource() {
|
| + return chrome::kChromeUIWallpaperImageHost;
|
| +}
|
| +
|
| void WallpaperImageSource::StartDataRequest(const std::string& email,
|
| bool is_incognito,
|
| int request_id) {
|
| @@ -163,7 +167,7 @@
|
| // Set canceled flag of previous request to skip unneeded encoding.
|
| if (wallpaper_encoding_op_.get()) {
|
| wallpaper_encoding_op_->Cancel();
|
| - SendResponse(wallpaper_encoding_op_->request_id(), NULL);
|
| + url_data_source()->SendResponse(wallpaper_encoding_op_->request_id(), NULL);
|
| TRACE_EVENT_ASYNC_END0("SCREEN_LOCK", "GetUserWallpaper",
|
| wallpaper_encoding_op_->request_id());
|
| }
|
| @@ -175,7 +179,7 @@
|
| void WallpaperImageSource::SendCurrentUserWallpaper(int request_id,
|
| scoped_refptr<base::RefCountedBytes> data) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
|
| - SendResponse(request_id, data);
|
| + url_data_source()->SendResponse(request_id, data);
|
| TRACE_EVENT_ASYNC_END0("SCREEN_LOCK", "GetUserWallpaper", request_id);
|
| }
|
|
|
|
|