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

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

Issue 1539843002: Convert Pass()→std::move() in sync/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 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(

Powered by Google App Engine
This is Rietveld 408576698