Index: chrome/browser/image_decoder.h |
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h |
index 24f4d89bad6070486eb3b985f6a22b52143744f3..7c006b0dc640f7306ea5b9e63ad050ce27a3ec37 100644 |
--- a/chrome/browser/image_decoder.h |
+++ b/chrome/browser/image_decoder.h |
@@ -42,9 +42,13 @@ class ImageDecoder : public content::UtilityProcessHostClient { |
const std::string& image_data, |
ImageCodec image_codec); |
- // Starts image decoding. |
+ // Starts image decoding on well-known threads. |
void Start(); |
+ // Starts image decoding on a sequence worker thread with a sequence token |
+ // associated with |sequence_token_name|. |
+ void Start(std::string sequence_token_name); |
+ |
const std::vector<unsigned char>& get_image_data() const { |
return image_data_; |
} |
@@ -58,6 +62,10 @@ class ImageDecoder : public content::UtilityProcessHostClient { |
// Overidden from UtilityProcessHostClient: |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
+ // True if on valid thread or named worker thread associated with |
+ // |sequence_token_name_|. |
+ bool CalledOnValidThreadOrWorkerThread(); |
+ |
// IPC message handlers. |
void OnDecodeImageSucceeded(const SkBitmap& decoded_image); |
void OnDecodeImageFailed(); |
@@ -69,6 +77,7 @@ class ImageDecoder : public content::UtilityProcessHostClient { |
std::vector<unsigned char> image_data_; |
const ImageCodec image_codec_; |
content::BrowserThread::ID target_thread_id_; |
+ std::string sequence_token_name_; |
DISALLOW_COPY_AND_ASSIGN(ImageDecoder); |
}; |