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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 1525263003: Revert of Remove ScopedVector from url_request_context_builder (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
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index dc7bca07a00cdee04d2f2428aaf6cf7e571a6736..83ea66fa896ad1d9489727c9d7270dc681adbf4d 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -5,12 +5,10 @@
#include "net/url_request/url_request_context_builder.h"
#include <string>
-#include <vector>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/thread_task_runner_handle.h"
@@ -253,8 +251,8 @@
}
void URLRequestContextBuilder::SetInterceptors(
- std::vector<scoped_ptr<URLRequestInterceptor>> url_request_interceptors) {
- url_request_interceptors_ = std::move(url_request_interceptors);
+ ScopedVector<URLRequestInterceptor> url_request_interceptors) {
+ url_request_interceptors_ = url_request_interceptors.Pass();
}
void URLRequestContextBuilder::SetCookieAndChannelIdStores(
@@ -460,17 +458,18 @@
if (!url_request_interceptors_.empty()) {
// Set up interceptors in the reverse order.
- for (auto i = url_request_interceptors_.rbegin();
+ for (ScopedVector<net::URLRequestInterceptor>::reverse_iterator i =
+ url_request_interceptors_.rbegin();
i != url_request_interceptors_.rend(); ++i) {
top_job_factory.reset(new net::URLRequestInterceptingJobFactory(
- std::move(top_job_factory), std::move(*i)));
+ top_job_factory.Pass(), make_scoped_ptr(*i)));
}
- url_request_interceptors_.clear();
- }
- storage->set_job_factory(std::move(top_job_factory));
+ url_request_interceptors_.weak_clear();
+ }
+ storage->set_job_factory(top_job_factory.Pass());
// TODO(willchan): Support sdch.
- return std::move(context);
+ return context.Pass();
}
} // namespace net
« no previous file with comments | « net/url_request/url_request_context_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698