Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: sync/internal_api/public/attachments/attachment_uploader_impl.h

Issue 556083002: Eliminate use of 'delete self' pattern in AttachmentUploaderImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@persistentuploads-retry
Patch Set: Merge with master. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/attachments/attachment_uploader_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/attachments/attachment_uploader_impl.h
diff --git a/sync/internal_api/public/attachments/attachment_uploader_impl.h b/sync/internal_api/public/attachments/attachment_uploader_impl.h
index 73417694525421051d0cc1985852613fddab35c1..a88c96750894992a08342ce602dd963d41194b7a 100644
--- a/sync/internal_api/public/attachments/attachment_uploader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_uploader_impl.h
@@ -55,7 +55,7 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader,
typedef std::string UniqueId;
typedef base::ScopedPtrHashMap<UniqueId, UploadState> StateMap;
- void DeleteUploadStateFor(const UniqueId& unique_id);
+ void OnUploadStateStopped(const UniqueId& unique_id);
GURL sync_service_url_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
@@ -64,6 +64,10 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader,
scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
token_service_provider_;
StateMap state_map_;
+
+ // Must be last data member.
+ base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl);
};
« no previous file with comments | « sync/internal_api/attachments/attachment_uploader_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698