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

Unified Diff: sync/internal_api/attachments/attachment_downloader.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.cc
diff --git a/sync/internal_api/attachments/attachment_downloader.cc b/sync/internal_api/attachments/attachment_downloader.cc
index d9adc226cb9081b7de7a85604f25332a483c03fd..a3c780f648ad063c24250da6a1c846bdc7e1a710 100644
--- a/sync/internal_api/attachments/attachment_downloader.cc
+++ b/sync/internal_api/attachments/attachment_downloader.cc
@@ -20,14 +20,14 @@ scoped_ptr<AttachmentDownloader> AttachmentDownloader::Create(
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) {
return scoped_ptr<AttachmentDownloader>(
new AttachmentDownloaderImpl(sync_service_url,
url_request_context_getter,
account_id,
scopes,
- token_service_provider.Pass()));
+ token_service_provider));
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698