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

Side by Side Diff: net/quic/crypto/properties_based_quic_server_info.cc

Issue 2041863002: Remove HttpServerProperies::GetWeakPtr(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/quic/crypto/properties_based_quic_server_info.h" 5 #include "net/quic/crypto/properties_based_quic_server_info.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 #include "net/http/http_server_properties.h" 9 #include "net/http/http_server_properties.h"
10 10
11 using std::string; 11 using std::string;
12 12
13 namespace net { 13 namespace net {
14 14
15 PropertiesBasedQuicServerInfo::PropertiesBasedQuicServerInfo( 15 PropertiesBasedQuicServerInfo::PropertiesBasedQuicServerInfo(
16 const QuicServerId& server_id, 16 const QuicServerId& server_id,
17 base::WeakPtr<HttpServerProperties> http_server_properties) 17 HttpServerProperties* http_server_properties)
18 : QuicServerInfo(server_id), 18 : QuicServerInfo(server_id),
19 http_server_properties_(http_server_properties) { 19 http_server_properties_(http_server_properties) {
20 DCHECK(http_server_properties_); 20 DCHECK(http_server_properties_);
21 } 21 }
22 22
23 PropertiesBasedQuicServerInfo::~PropertiesBasedQuicServerInfo() {} 23 PropertiesBasedQuicServerInfo::~PropertiesBasedQuicServerInfo() {}
24 24
25 void PropertiesBasedQuicServerInfo::Start() {} 25 void PropertiesBasedQuicServerInfo::Start() {}
26 26
27 int PropertiesBasedQuicServerInfo::WaitForDataReady( 27 int PropertiesBasedQuicServerInfo::WaitForDataReady(
(...skipping 20 matching lines...) Expand all
48 48
49 void PropertiesBasedQuicServerInfo::Persist() { 49 void PropertiesBasedQuicServerInfo::Persist() {
50 string encoded; 50 string encoded;
51 base::Base64Encode(Serialize(), &encoded); 51 base::Base64Encode(Serialize(), &encoded);
52 http_server_properties_->SetQuicServerInfo(server_id_, encoded); 52 http_server_properties_->SetQuicServerInfo(server_id_, encoded);
53 } 53 }
54 54
55 void PropertiesBasedQuicServerInfo::OnExternalCacheHit() {} 55 void PropertiesBasedQuicServerInfo::OnExternalCacheHit() {}
56 56
57 PropertiesBasedQuicServerInfoFactory::PropertiesBasedQuicServerInfoFactory( 57 PropertiesBasedQuicServerInfoFactory::PropertiesBasedQuicServerInfoFactory(
58 base::WeakPtr<HttpServerProperties> http_server_properties) 58 HttpServerProperties* http_server_properties)
59 : http_server_properties_(http_server_properties) {} 59 : http_server_properties_(http_server_properties) {}
60 60
61 PropertiesBasedQuicServerInfoFactory::~PropertiesBasedQuicServerInfoFactory() {} 61 PropertiesBasedQuicServerInfoFactory::~PropertiesBasedQuicServerInfoFactory() {}
62 62
63 QuicServerInfo* PropertiesBasedQuicServerInfoFactory::GetForServer( 63 QuicServerInfo* PropertiesBasedQuicServerInfoFactory::GetForServer(
64 const QuicServerId& server_id) { 64 const QuicServerId& server_id) {
65 return new PropertiesBasedQuicServerInfo(server_id, http_server_properties_); 65 return new PropertiesBasedQuicServerInfo(server_id, http_server_properties_);
66 } 66 }
67 67
68 } // namespace net 68 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/properties_based_quic_server_info.h ('k') | net/quic/crypto/properties_based_quic_server_info_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698