| Index: chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
|
| index 846731690321a8045cd29eefb0cf06cc30338e80..b673a23f2b60c35bf4d0aae030802abab26026b9 100644
|
| --- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| @@ -25,6 +25,7 @@
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| #include "chrome/common/url_constants.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/web_ui.h"
|
| #include "content/public/common/url_constants.h"
|
| @@ -36,6 +37,8 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/views/widget/widget.h"
|
|
|
| +using content::BrowserThread;
|
| +
|
| namespace chromeos {
|
| namespace options {
|
|
|
| @@ -178,6 +181,7 @@ void ChangePictureOptionsHandler::HandleChooseFile(const ListValue* args) {
|
|
|
| void ChangePictureOptionsHandler::HandlePhotoTaken(
|
| const base::ListValue* args) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| std::string image_url;
|
| if (!args || args->GetSize() != 1 || !args->GetString(0, &image_url))
|
| NOTREACHED();
|
| @@ -195,7 +199,9 @@ void ChangePictureOptionsHandler::HandlePhotoTaken(
|
| image_decoder_->set_delegate(NULL);
|
| image_decoder_ = new ImageDecoder(this, raw_data,
|
| ImageDecoder::DEFAULT_CODEC);
|
| - image_decoder_->Start();
|
| + scoped_refptr<base::MessageLoopProxy> task_runner =
|
| + BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI);
|
| + image_decoder_->Start(task_runner);
|
| }
|
|
|
| void ChangePictureOptionsHandler::HandleCheckCameraPresence(
|
|
|