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

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

Issue 1553503002: Convert Pass()→std::move() in //chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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_impl.h" 5 #include "chromecast/net/connectivity_checker_impl.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 53 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
54 base::CommandLine::StringType check_url_str = 54 base::CommandLine::StringType check_url_str =
55 command_line->GetSwitchValueNative(switches::kConnectivityCheckUrl); 55 command_line->GetSwitchValueNative(switches::kConnectivityCheckUrl);
56 connectivity_check_url_.reset(new GURL( 56 connectivity_check_url_.reset(new GURL(
57 check_url_str.empty() ? kDefaultConnectivityCheckUrl : check_url_str)); 57 check_url_str.empty() ? kDefaultConnectivityCheckUrl : check_url_str));
58 58
59 net::URLRequestContextBuilder builder; 59 net::URLRequestContextBuilder builder;
60 builder.set_proxy_config_service(make_scoped_ptr( 60 builder.set_proxy_config_service(make_scoped_ptr(
61 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect()))); 61 new net::ProxyConfigServiceFixed(net::ProxyConfig::CreateDirect())));
62 builder.DisableHttpCache(); 62 builder.DisableHttpCache();
63 url_request_context_ = builder.Build().Pass(); 63 url_request_context_ = builder.Build();
64 64
65 net::NetworkChangeNotifier::AddNetworkChangeObserver(this); 65 net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
66 task_runner_->PostTask(FROM_HERE, 66 task_runner_->PostTask(FROM_HERE,
67 base::Bind(&ConnectivityCheckerImpl::Check, this)); 67 base::Bind(&ConnectivityCheckerImpl::Check, this));
68 } 68 }
69 69
70 ConnectivityCheckerImpl::~ConnectivityCheckerImpl() { 70 ConnectivityCheckerImpl::~ConnectivityCheckerImpl() {
71 DCHECK(task_runner_.get()); 71 DCHECK(task_runner_.get());
72 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); 72 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
73 task_runner_->DeleteSoon(FROM_HERE, url_request_.release()); 73 task_runner_->DeleteSoon(FROM_HERE, url_request_.release());
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 void ConnectivityCheckerImpl::Cancel() { 192 void ConnectivityCheckerImpl::Cancel() {
193 if (!url_request_.get()) 193 if (!url_request_.get())
194 return; 194 return;
195 VLOG(2) << "Cancel connectivity check in progress"; 195 VLOG(2) << "Cancel connectivity check in progress";
196 timeout_.Cancel(); 196 timeout_.Cancel();
197 url_request_.reset(NULL); // URLRequest::Cancel() is called in destructor. 197 url_request_.reset(NULL); // URLRequest::Cancel() is called in destructor.
198 } 198 }
199 199
200 } // namespace chromecast 200 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/test/frame_generator_for_test.cc ('k') | chromecast/renderer/media/audio_pipeline_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698