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

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

Issue 15829004: Update net/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: license twerk 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_cache_unittest.cc ('k') | net/http/http_network_layer_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_layer.h" 5 #include "net/http/http_network_layer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return ERR_NETWORK_IO_SUSPENDED; 55 return ERR_NETWORK_IO_SUSPENDED;
56 56
57 trans->reset(new HttpNetworkTransaction(priority, GetSession())); 57 trans->reset(new HttpNetworkTransaction(priority, GetSession()));
58 return OK; 58 return OK;
59 } 59 }
60 60
61 HttpCache* HttpNetworkLayer::GetCache() { 61 HttpCache* HttpNetworkLayer::GetCache() {
62 return NULL; 62 return NULL;
63 } 63 }
64 64
65 HttpNetworkSession* HttpNetworkLayer::GetSession() { 65 HttpNetworkSession* HttpNetworkLayer::GetSession() { return session_.get(); }
66 return session_;
67 }
68 66
69 void HttpNetworkLayer::OnSuspend() { 67 void HttpNetworkLayer::OnSuspend() {
70 suspended_ = true; 68 suspended_ = true;
71 69
72 if (session_) 70 if (session_.get())
73 session_->CloseIdleConnections(); 71 session_->CloseIdleConnections();
74 } 72 }
75 73
76 void HttpNetworkLayer::OnResume() { 74 void HttpNetworkLayer::OnResume() {
77 suspended_ = false; 75 suspended_ = false;
78 } 76 }
79 77
80 } // namespace net 78 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_network_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698