Chromium Code Reviews| 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 2915296d9f1bf88fca9d8c13ceffa83594bbaf2a..997833bf9fb778b37473e5d9b3508ecf5792afe9 100644 |
| --- a/sync/internal_api/attachments/attachment_downloader_impl.cc |
| +++ b/sync/internal_api/attachments/attachment_downloader_impl.cc |
| @@ -2,7 +2,7 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "sync/internal_api/public/attachments/attachment_downloader_impl.h" |
| +#include <utility> |
| #include "base/base64.h" |
| #include "base/bind.h" |
| @@ -18,6 +18,7 @@ |
| #include "net/http/http_util.h" |
| #include "net/url_request/url_fetcher.h" |
| #include "net/url_request/url_request_status.h" |
| +#include "sync/internal_api/public/attachments/attachment_downloader_impl.h" |
| #include "sync/internal_api/public/attachments/attachment_uploader_impl.h" |
|
Nicolas Zea
2015/12/18 23:46:54
This should remain up top
dcheng
2015/12/20 00:27:53
Hmm. I have a script that does this all automatica
|
| #include "sync/internal_api/public/attachments/attachment_util.h" |
| #include "sync/protocol/sync.pb.h" |
| @@ -88,7 +89,7 @@ void AttachmentDownloaderImpl::DownloadAttachment( |
| // DownloadState and request access token for it. |
| scoped_ptr<DownloadState> new_download_state( |
| new DownloadState(attachment_id, url)); |
| - iter = state_map_.add(url, new_download_state.Pass()).first; |
| + iter = state_map_.add(url, std::move(new_download_state)).first; |
| RequestAccessToken(iter->second); |
| } |
| DownloadState* download_state = iter->second; |
| @@ -111,7 +112,7 @@ void AttachmentDownloaderImpl::OnGetTokenSuccess( |
| DownloadState* download_state = *iter; |
| download_state->access_token = access_token; |
| download_state->url_fetcher = |
| - CreateFetcher(download_state->attachment_url, access_token).Pass(); |
| + CreateFetcher(download_state->attachment_url, access_token); |
| download_state->start_time = base::TimeTicks::Now(); |
| download_state->url_fetcher->Start(); |
| } |
| @@ -211,7 +212,7 @@ scoped_ptr<net::URLFetcher> AttachmentDownloaderImpl::CreateFetcher( |
| AttachmentUploaderImpl::ConfigureURLFetcherCommon( |
| url_fetcher.get(), access_token, raw_store_birthday_, model_type_, |
| url_request_context_getter_.get()); |
| - return url_fetcher.Pass(); |
| + return url_fetcher; |
| } |
| void AttachmentDownloaderImpl::RequestAccessToken( |