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

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

Issue 458753006: Fix use after free bug by calling GetTokenService in Core's ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update TSP comment (CANDIDATE). Created 6 years, 4 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
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 9e02c54a2dafd48bd8974ca2b79608c4108de75d..73417694525421051d0cc1985852613fddab35c1 100644
--- a/sync/internal_api/public/attachments/attachment_uploader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_uploader_impl.h
@@ -38,7 +38,7 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader,
url_request_context_getter,
const std::string& account_id,
const OAuth2TokenService::ScopeSet& scopes,
- scoped_ptr<OAuth2TokenServiceRequest::TokenServiceProvider>
+ const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
token_service_provider);
virtual ~AttachmentUploaderImpl();
@@ -61,7 +61,7 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader,
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
std::string account_id_;
OAuth2TokenService::ScopeSet scopes_;
- scoped_ptr<OAuth2TokenServiceRequest::TokenServiceProvider>
+ scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
token_service_provider_;
StateMap state_map_;
DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl);

Powered by Google App Engine
This is Rietveld 408576698