| Index: chrome/browser/chromeos/login/user_image_loader.h
|
| diff --git a/chrome/browser/chromeos/login/user_image_loader.h b/chrome/browser/chromeos/login/user_image_loader.h
|
| index a5a8b4589c29016c79a2a2b9351f7516f923e010..e07760056cea9b752c9e53413760a460d9b0ff6f 100644
|
| --- a/chrome/browser/chromeos/login/user_image_loader.h
|
| +++ b/chrome/browser/chromeos/login/user_image_loader.h
|
| @@ -11,6 +11,8 @@
|
| #include "base/callback.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/ref_counted.h"
|
| +#include "base/synchronization/lock.h"
|
| +#include "base/threading/sequenced_worker_pool.h"
|
| #include "chrome/browser/image_decoder.h"
|
|
|
| class MessageLoop;
|
| @@ -28,6 +30,8 @@ class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>,
|
| // Callback used to indicate that image has been loaded.
|
| typedef base::Callback<void(const UserImage& user_image)> LoadedCallback;
|
|
|
| + typedef base::SequencedWorkerPool::SequenceToken SequenceToken;
|
| +
|
| explicit UserImageLoader(ImageDecoder::ImageCodec image_codec);
|
|
|
| // Start reading the image from |filepath| on the file thread. Calls
|
| @@ -55,7 +59,9 @@ class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>,
|
|
|
| // Method that reads the file on the file thread and starts decoding it in
|
| // sandboxed process.
|
| - void LoadImage(const std::string& filepath, const ImageInfo& image_info);
|
| + void LoadImage(const std::string& filepath,
|
| + const ImageInfo& image_info,
|
| + const SequenceToken& sequence_token);
|
|
|
| // ImageDecoder::Delegate implementation.
|
| virtual void OnImageDecoded(const ImageDecoder* decoder,
|
| @@ -68,6 +74,9 @@ class UserImageLoader : public base::RefCountedThreadSafe<UserImageLoader>,
|
| // Specify how the file should be decoded in the utility process.
|
| const ImageDecoder::ImageCodec image_codec_;
|
|
|
| + // Proctect image_info_map_
|
| + base::Lock lock_;
|
| +
|
| // Holds info structures about all images we're trying to decode.
|
| // Accessed only on FILE thread.
|
| ImageInfoMap image_info_map_;
|
|
|