| Index: chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h
|
| diff --git a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h
|
| index 983652ce2921e6a3dbb300b46c5940302e209ca0..0611528852903bdab0871213520e2c0b77bdb3da 100644
|
| --- a/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h
|
| +++ b/chrome/browser/media_galleries/fileapi/safe_picasa_albums_indexer.h
|
| @@ -10,6 +10,7 @@
|
|
|
| #include "base/callback.h"
|
| #include "base/compiler_specific.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/weak_ptr.h"
|
| #include "chrome/common/media_galleries/picasa_types.h"
|
| #include "content/public/browser/utility_process_host_client.h"
|
| @@ -24,6 +25,8 @@ class Message;
|
|
|
| namespace picasa {
|
|
|
| +extern const char kPicasaINIFilename[];
|
| +
|
| // SafePicasaAlbumsIndexer indexes the contents of Picasa Albums by parsing the
|
| // INI files found in Folders. The SafePicasaAlbumsIndexer object is ref-counted
|
| // and kept alive after Start() is called until the ParserCallback is called.
|
| @@ -31,8 +34,13 @@ namespace picasa {
|
| // utility process replies or when it dies.
|
| class SafePicasaAlbumsIndexer : public content::UtilityProcessHostClient {
|
| public:
|
| - typedef base::Callback<void(bool /* success */,
|
| - const picasa::AlbumImagesMap&)> DoneCallback;
|
| + // PicasaDataProvider keeps a reference to the last-dispatched instance of
|
| + // this class so it can ignore callbacks from 'stale' instances. The callback
|
| + // also keeps a reference so it doesn't get destroyed prematurely.
|
| + typedef base::Callback<void(scoped_refptr<SafePicasaAlbumsIndexer>,
|
| + bool parse_success,
|
| + const picasa::AlbumImagesMap&)>
|
| + DoneCallback;
|
|
|
| SafePicasaAlbumsIndexer(const AlbumMap& albums,
|
| const AlbumMap& folders,
|
|
|