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

Side by Side Diff: net/http/http_network_transaction.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/format_macros.h" 14 #include "base/format_macros.h"
14 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
15 #include "base/metrics/field_trial.h" 16 #include "base/metrics/field_trial.h"
16 #include "base/metrics/histogram_macros.h" 17 #include "base/metrics/histogram_macros.h"
17 #include "base/metrics/sparse_histogram.h" 18 #include "base/metrics/sparse_histogram.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 SSLFailureState ssl_failure_state, 112 SSLFailureState ssl_failure_state,
112 uint16_t version_before, 113 uint16_t version_before,
113 uint16_t version_after, 114 uint16_t version_after,
114 NetLogCaptureMode /* capture_mode */) { 115 NetLogCaptureMode /* capture_mode */) {
115 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 116 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
116 dict->SetString("host_and_port", GetHostAndPort(*url)); 117 dict->SetString("host_and_port", GetHostAndPort(*url));
117 dict->SetInteger("net_error", net_error); 118 dict->SetInteger("net_error", net_error);
118 dict->SetInteger("ssl_failure_state", ssl_failure_state); 119 dict->SetInteger("ssl_failure_state", ssl_failure_state);
119 dict->SetInteger("version_before", version_before); 120 dict->SetInteger("version_before", version_before);
120 dict->SetInteger("version_after", version_after); 121 dict->SetInteger("version_after", version_after);
121 return dict.Pass(); 122 return std::move(dict);
122 } 123 }
123 124
124 scoped_ptr<base::Value> NetLogSSLCipherFallbackCallback( 125 scoped_ptr<base::Value> NetLogSSLCipherFallbackCallback(
125 const GURL* url, 126 const GURL* url,
126 int net_error, 127 int net_error,
127 NetLogCaptureMode /* capture_mode */) { 128 NetLogCaptureMode /* capture_mode */) {
128 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 129 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
129 dict->SetString("host_and_port", GetHostAndPort(*url)); 130 dict->SetString("host_and_port", GetHostAndPort(*url));
130 dict->SetInteger("net_error", net_error); 131 dict->SetInteger("net_error", net_error);
131 return dict.Pass(); 132 return std::move(dict);
132 } 133 }
133 134
134 } // namespace 135 } // namespace
135 136
136 //----------------------------------------------------------------------------- 137 //-----------------------------------------------------------------------------
137 138
138 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority, 139 HttpNetworkTransaction::HttpNetworkTransaction(RequestPriority priority,
139 HttpNetworkSession* session) 140 HttpNetworkSession* session)
140 : pending_auth_target_(HttpAuth::AUTH_NONE), 141 : pending_auth_target_(HttpAuth::AUTH_NONE),
141 io_callback_(base::Bind(&HttpNetworkTransaction::OnIOComplete, 142 io_callback_(base::Bind(&HttpNetworkTransaction::OnIOComplete,
(...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after
1708 DCHECK(stream_request_); 1709 DCHECK(stream_request_);
1709 1710
1710 // Since the transaction can restart with auth credentials, it may create a 1711 // Since the transaction can restart with auth credentials, it may create a
1711 // stream more than once. Accumulate all of the connection attempts across 1712 // stream more than once. Accumulate all of the connection attempts across
1712 // those streams by appending them to the vector: 1713 // those streams by appending them to the vector:
1713 for (const auto& attempt : stream_request_->connection_attempts()) 1714 for (const auto& attempt : stream_request_->connection_attempts())
1714 connection_attempts_.push_back(attempt); 1715 connection_attempts_.push_back(attempt);
1715 } 1716 }
1716 1717
1717 } // namespace net 1718 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/http/http_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698