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

Unified Diff: sync/internal_api/attachments/attachment_downloader_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_downloader_impl.cc
diff --git a/sync/internal_api/attachments/attachment_downloader_impl.cc b/sync/internal_api/attachments/attachment_downloader_impl.cc
index 1b32e79d6d78858a754cd58d88a54bcdb4ef1903..ab34c8338904be48c13d5b6e1d261603cf540a7e 100644
--- a/sync/internal_api/attachments/attachment_downloader_impl.cc
+++ b/sync/internal_api/attachments/attachment_downloader_impl.cc
@@ -41,14 +41,14 @@ AttachmentDownloaderImpl::AttachmentDownloaderImpl(
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)
: OAuth2TokenService::Consumer("attachment-downloader-impl"),
sync_service_url_(sync_service_url),
url_request_context_getter_(url_request_context_getter),
account_id_(account_id),
oauth2_scopes_(scopes),
- token_service_provider_(token_service_provider.Pass()) {
+ token_service_provider_(token_service_provider) {
DCHECK(!account_id.empty());
DCHECK(!scopes.empty());
DCHECK(token_service_provider_);

Powered by Google App Engine
This is Rietveld 408576698