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

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

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 years, 7 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_response_headers.cc ('k') | net/http/http_stream_factory_impl_job.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_server_properties_impl.h" 5 #include "net/http/http_server_properties_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 std::string alternative_service_string(alternative_service_info.ToString()); 405 std::string alternative_service_string(alternative_service_info.ToString());
406 AlternativeService alternative_service( 406 AlternativeService alternative_service(
407 alternative_service_info.alternative_service); 407 alternative_service_info.alternative_service);
408 if (alternative_service.host.empty()) { 408 if (alternative_service.host.empty()) {
409 alternative_service.host = host_port_pair.host(); 409 alternative_service.host = host_port_pair.host();
410 } 410 }
411 if (IsAlternativeServiceBroken(alternative_service)) { 411 if (IsAlternativeServiceBroken(alternative_service)) {
412 alternative_service_string.append(" (broken)"); 412 alternative_service_string.append(" (broken)");
413 } 413 }
414 414
415 base::DictionaryValue* dict = new base::DictionaryValue(); 415 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
416 dict->SetString("host_port_pair", host_port_pair.ToString()); 416 dict->SetString("host_port_pair", host_port_pair.ToString());
417 dict->SetString("alternative_service", alternative_service_string); 417 dict->SetString("alternative_service", alternative_service_string);
418 dict_list->Append(dict); 418 dict_list->Append(dict.Pass());
419 } 419 }
420 return dict_list; 420 return dict_list;
421 } 421 }
422 422
423 const SettingsMap& HttpServerPropertiesImpl::GetSpdySettings( 423 const SettingsMap& HttpServerPropertiesImpl::GetSpdySettings(
424 const HostPortPair& host_port_pair) { 424 const HostPortPair& host_port_pair) {
425 SpdySettingsMap::iterator it = spdy_settings_map_.Get(host_port_pair); 425 SpdySettingsMap::iterator it = spdy_settings_map_.Get(host_port_pair);
426 if (it == spdy_settings_map_.end()) { 426 if (it == spdy_settings_map_.end()) {
427 CR_DEFINE_STATIC_LOCAL(SettingsMap, kEmptySettingsMap, ()); 427 CR_DEFINE_STATIC_LOCAL(SettingsMap, kEmptySettingsMap, ());
428 return kEmptySettingsMap; 428 return kEmptySettingsMap;
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 base::TimeDelta delay = when > now ? when - now : base::TimeDelta(); 594 base::TimeDelta delay = when > now ? when - now : base::TimeDelta();
595 base::MessageLoop::current()->PostDelayedTask( 595 base::MessageLoop::current()->PostDelayedTask(
596 FROM_HERE, 596 FROM_HERE,
597 base::Bind( 597 base::Bind(
598 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings, 598 &HttpServerPropertiesImpl::ExpireBrokenAlternateProtocolMappings,
599 weak_ptr_factory_.GetWeakPtr()), 599 weak_ptr_factory_.GetWeakPtr()),
600 delay); 600 delay);
601 } 601 }
602 602
603 } // namespace net 603 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_response_headers.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698