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

Side by Side Diff: sync/internal_api/attachments/attachment_downloader_impl.cc

Issue 503903002: Remove implicit conversions from scoped_refptr to T* in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sync/internal_api/public/attachments/attachment_downloader_impl.h" 5 #include "sync/internal_api/public/attachments/attachment_downloader_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "net/base/load_flags.h" 9 #include "net/base/load_flags.h"
10 #include "net/http/http_status_code.h" 10 #include "net/http/http_status_code.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>& 44 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
45 token_service_provider) 45 token_service_provider)
46 : OAuth2TokenService::Consumer("attachment-downloader-impl"), 46 : OAuth2TokenService::Consumer("attachment-downloader-impl"),
47 sync_service_url_(sync_service_url), 47 sync_service_url_(sync_service_url),
48 url_request_context_getter_(url_request_context_getter), 48 url_request_context_getter_(url_request_context_getter),
49 account_id_(account_id), 49 account_id_(account_id),
50 oauth2_scopes_(scopes), 50 oauth2_scopes_(scopes),
51 token_service_provider_(token_service_provider) { 51 token_service_provider_(token_service_provider) {
52 DCHECK(!account_id.empty()); 52 DCHECK(!account_id.empty());
53 DCHECK(!scopes.empty()); 53 DCHECK(!scopes.empty());
54 DCHECK(token_service_provider_); 54 DCHECK(token_service_provider_.get());
55 DCHECK(url_request_context_getter_); 55 DCHECK(url_request_context_getter_.get());
56 } 56 }
57 57
58 AttachmentDownloaderImpl::~AttachmentDownloaderImpl() { 58 AttachmentDownloaderImpl::~AttachmentDownloaderImpl() {
59 } 59 }
60 60
61 void AttachmentDownloaderImpl::DownloadAttachment( 61 void AttachmentDownloaderImpl::DownloadAttachment(
62 const AttachmentId& attachment_id, 62 const AttachmentId& attachment_id,
63 const DownloadCallback& callback) { 63 const DownloadCallback& callback) {
64 DCHECK(CalledOnValidThread()); 64 DCHECK(CalledOnValidThread());
65 65
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 attachment.reset(new Attachment(Attachment::CreateWithId( 193 attachment.reset(new Attachment(Attachment::CreateWithId(
194 download_state.attachment_id, attachment_data))); 194 download_state.attachment_id, attachment_data)));
195 } 195 }
196 196
197 base::MessageLoop::current()->PostTask( 197 base::MessageLoop::current()->PostTask(
198 FROM_HERE, base::Bind(*iter, result, base::Passed(&attachment))); 198 FROM_HERE, base::Bind(*iter, result, base::Passed(&attachment)));
199 } 199 }
200 } 200 }
201 201
202 } // namespace syncer 202 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/engine/syncer_unittest.cc ('k') | sync/internal_api/attachments/attachment_service_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698