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

Unified Diff: sync/internal_api/attachments/attachment_uploader_impl.cc

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/attachments/attachment_uploader_impl.cc
diff --git a/sync/internal_api/attachments/attachment_uploader_impl.cc b/sync/internal_api/attachments/attachment_uploader_impl.cc
index c2bda36f8b8e9402df4276a434b2ffcf55fffad9..a6614ef1044bdd50b3e5828a5df9397971d123c7 100644
--- a/sync/internal_api/attachments/attachment_uploader_impl.cc
+++ b/sync/internal_api/attachments/attachment_uploader_impl.cc
@@ -212,13 +212,13 @@ AttachmentUploaderImpl::AttachmentUploaderImpl(
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)
: sync_service_url_(sync_service_url),
url_request_context_getter_(url_request_context_getter),
account_id_(account_id),
scopes_(scopes),
- token_service_provider_(token_service_provider.Pass()) {
+ token_service_provider_(token_service_provider) {
DCHECK(CalledOnValidThread());
DCHECK(!account_id.empty());
DCHECK(!scopes.empty());

Powered by Google App Engine
This is Rietveld 408576698