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

Side by Side Diff: chromecast/net/connectivity_checker.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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 "chromecast/net/connectivity_checker.h" 5 #include "chromecast/net/connectivity_checker.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "chromecast/net/net_switches.h" 10 #include "chromecast/net/net_switches.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 DCHECK(url_request_context_.get()); 106 DCHECK(url_request_context_.get());
107 107
108 // If url_request_ is non-null, there is already a check going on. Don't 108 // If url_request_ is non-null, there is already a check going on. Don't
109 // start another. 109 // start another.
110 if (url_request_.get()) 110 if (url_request_.get())
111 return; 111 return;
112 112
113 VLOG(1) << "Connectivity check: url=" << *connectivity_check_url_; 113 VLOG(1) << "Connectivity check: url=" << *connectivity_check_url_;
114 url_request_ = url_request_context_->CreateRequest( 114 url_request_ = url_request_context_->CreateRequest(
115 *connectivity_check_url_, net::MAXIMUM_PRIORITY, this, NULL); 115 *connectivity_check_url_, net::MAXIMUM_PRIORITY, this);
116 url_request_->set_method("HEAD"); 116 url_request_->set_method("HEAD");
117 url_request_->Start(); 117 url_request_->Start();
118 } 118 }
119 119
120 void ConnectivityChecker::OnConnectionTypeChanged( 120 void ConnectivityChecker::OnConnectionTypeChanged(
121 net::NetworkChangeNotifier::ConnectionType type) { 121 net::NetworkChangeNotifier::ConnectionType type) {
122 VLOG(2) << "OnConnectionTypeChanged " << type; 122 VLOG(2) << "OnConnectionTypeChanged " << type;
123 if (type == net::NetworkChangeNotifier::CONNECTION_NONE) 123 if (type == net::NetworkChangeNotifier::CONNECTION_NONE)
124 SetConnectivity(false); 124 SetConnectivity(false);
125 125
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 170 }
171 171
172 void ConnectivityChecker::Cancel() { 172 void ConnectivityChecker::Cancel() {
173 if (url_request_.get()) { 173 if (url_request_.get()) {
174 VLOG(2) << "Cancel connectivity check in progress"; 174 VLOG(2) << "Cancel connectivity check in progress";
175 url_request_.reset(NULL); // URLRequest::Cancel() is called in destructor. 175 url_request_.reset(NULL); // URLRequest::Cancel() is called in destructor.
176 } 176 }
177 } 177 }
178 178
179 } // namespace chromecast 179 } // namespace chromecast
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/ssl_client_certificate_selector_browsertest.cc ('k') | cloud_print/service/service_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698