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

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

Issue 1875623002: Convert //chromecast from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « chromecast/net/connectivity_checker.h ('k') | chromecast/net/connectivity_checker_impl.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 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 #ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_ 5 #ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_
6 #define CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_ 6 #define CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chromecast/net/connectivity_checker.h" 10 #include "chromecast/net/connectivity_checker.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Sets connectivity and alerts observers if it has changed 65 // Sets connectivity and alerts observers if it has changed
66 void SetConnected(bool connected); 66 void SetConnected(bool connected);
67 67
68 // Called when URL request failed. 68 // Called when URL request failed.
69 void OnUrlRequestError(); 69 void OnUrlRequestError();
70 70
71 // Called when URL request timed out. 71 // Called when URL request timed out.
72 void OnUrlRequestTimeout(); 72 void OnUrlRequestTimeout();
73 73
74 scoped_ptr<GURL> connectivity_check_url_; 74 std::unique_ptr<GURL> connectivity_check_url_;
75 scoped_ptr<net::URLRequestContext> url_request_context_; 75 std::unique_ptr<net::URLRequestContext> url_request_context_;
76 scoped_ptr<net::URLRequest> url_request_; 76 std::unique_ptr<net::URLRequest> url_request_;
77 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 77 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
78 bool connected_; 78 bool connected_;
79 net::NetworkChangeNotifier::ConnectionType connection_type_; 79 net::NetworkChangeNotifier::ConnectionType connection_type_;
80 // Number of connectivity check errors. 80 // Number of connectivity check errors.
81 unsigned int check_errors_; 81 unsigned int check_errors_;
82 bool network_changed_pending_; 82 bool network_changed_pending_;
83 // Timeout handler for connectivity checks. 83 // Timeout handler for connectivity checks.
84 // Note: Cancelling this timeout can cause the destructor for this class to be 84 // Note: Cancelling this timeout can cause the destructor for this class to be
85 // to be called. 85 // to be called.
86 base::CancelableCallback<void()> timeout_; 86 base::CancelableCallback<void()> timeout_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(ConnectivityCheckerImpl); 88 DISALLOW_COPY_AND_ASSIGN(ConnectivityCheckerImpl);
89 }; 89 };
90 90
91 } // namespace chromecast 91 } // namespace chromecast
92 92
93 #endif // CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_ 93 #endif // CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_
OLDNEW
« no previous file with comments | « chromecast/net/connectivity_checker.h ('k') | chromecast/net/connectivity_checker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698