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

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

Issue 15662008: Make net and ipc explicitly use the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/http_stream_parser.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_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 24 matching lines...) Expand all
35 #include "net/socket/ssl_client_socket.h" 35 #include "net/socket/ssl_client_socket.h"
36 #include "net/socket/ssl_client_socket_pool.h" 36 #include "net/socket/ssl_client_socket_pool.h"
37 #include "net/spdy/spdy_http_stream.h" 37 #include "net/spdy/spdy_http_stream.h"
38 #include "net/spdy/spdy_session.h" 38 #include "net/spdy/spdy_session.h"
39 #include "net/spdy/spdy_session_pool.h" 39 #include "net/spdy/spdy_session_pool.h"
40 #include "net/ssl/ssl_cert_request_info.h" 40 #include "net/ssl/ssl_cert_request_info.h"
41 41
42 namespace net { 42 namespace net {
43 43
44 // Returns parameters associated with the start of a HTTP stream job. 44 // Returns parameters associated with the start of a HTTP stream job.
45 Value* NetLogHttpStreamJobCallback(const GURL* original_url, 45 base::Value* NetLogHttpStreamJobCallback(const GURL* original_url,
46 const GURL* url, 46 const GURL* url,
47 RequestPriority priority, 47 RequestPriority priority,
48 NetLog::LogLevel /* log_level */) { 48 NetLog::LogLevel /* log_level */) {
49 DictionaryValue* dict = new DictionaryValue(); 49 base::DictionaryValue* dict = new base::DictionaryValue();
50 dict->SetString("original_url", original_url->GetOrigin().spec()); 50 dict->SetString("original_url", original_url->GetOrigin().spec());
51 dict->SetString("url", url->GetOrigin().spec()); 51 dict->SetString("url", url->GetOrigin().spec());
52 dict->SetInteger("priority", priority); 52 dict->SetInteger("priority", priority);
53 return dict; 53 return dict;
54 } 54 }
55 55
56 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP 56 // Returns parameters associated with the Proto (with NPN negotiation) of a HTTP
57 // stream. 57 // stream.
58 Value* NetLogHttpStreamProtoCallback( 58 base::Value* NetLogHttpStreamProtoCallback(
59 const SSLClientSocket::NextProtoStatus status, 59 const SSLClientSocket::NextProtoStatus status,
60 const std::string* proto, 60 const std::string* proto,
61 const std::string* server_protos, 61 const std::string* server_protos,
62 NetLog::LogLevel /* log_level */) { 62 NetLog::LogLevel /* log_level */) {
63 DictionaryValue* dict = new DictionaryValue(); 63 base::DictionaryValue* dict = new base::DictionaryValue();
64 64
65 dict->SetString("next_proto_status", 65 dict->SetString("next_proto_status",
66 SSLClientSocket::NextProtoStatusToString(status)); 66 SSLClientSocket::NextProtoStatusToString(status));
67 dict->SetString("proto", *proto); 67 dict->SetString("proto", *proto);
68 dict->SetString("server_protos", 68 dict->SetString("server_protos",
69 SSLClientSocket::ServerProtosToString(*server_protos)); 69 SSLClientSocket::ServerProtosToString(*server_protos));
70 return dict; 70 return dict;
71 } 71 }
72 72
73 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory, 73 HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH | 1375 (net::LOAD_MAIN_FRAME | net::LOAD_SUB_FRAME | net::LOAD_PREFETCH |
1376 net::LOAD_IS_DOWNLOAD)) { 1376 net::LOAD_IS_DOWNLOAD)) {
1377 // Avoid pipelining resources that may be streamed for a long time. 1377 // Avoid pipelining resources that may be streamed for a long time.
1378 return false; 1378 return false;
1379 } 1379 }
1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining( 1380 return stream_factory_->http_pipelined_host_pool_.IsKeyEligibleForPipelining(
1381 *http_pipelining_key_.get()); 1381 *http_pipelining_key_.get());
1382 } 1382 }
1383 1383
1384 } // namespace net 1384 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties_impl.cc ('k') | net/http/http_stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698