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

Unified Diff: chromecast/net/connectivity_checker_impl.h

Issue 1169163002: Add timeout check for connectivity_checker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add timeout check for connectivity_checker Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromecast/net/connectivity_checker_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/net/connectivity_checker_impl.h
diff --git a/chromecast/net/connectivity_checker_impl.h b/chromecast/net/connectivity_checker_impl.h
index f356234f2ab6b23f93031b81cd6e12641d17e8b6..da15039de75b52a13c7866e2c5f1ed1880ff2811 100644
--- a/chromecast/net/connectivity_checker_impl.h
+++ b/chromecast/net/connectivity_checker_impl.h
@@ -5,6 +5,7 @@
#ifndef CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_
#define CHROMECAST_NET_CONNECTIVITY_CHECKER_IMPL_H_
+#include "base/cancelable_callback.h"
#include "chromecast/net/connectivity_checker.h"
#include "net/base/network_change_notifier.h"
#include "net/url_request/url_request.h"
@@ -64,6 +65,9 @@ class ConnectivityCheckerImpl
// Called when URL request failed.
void OnUrlRequestError();
+ // Called when URL request timed out.
+ void OnUrlRequestTimeout();
+
scoped_ptr<GURL> connectivity_check_url_;
scoped_ptr<net::URLRequestContext> url_request_context_;
scoped_ptr<net::URLRequest> url_request_;
@@ -71,6 +75,7 @@ class ConnectivityCheckerImpl
bool connected_;
// Number of connectivity check errors.
unsigned int check_errors_;
+ base::CancelableCallback<void()> timeout_;
DISALLOW_COPY_AND_ASSIGN(ConnectivityCheckerImpl);
};
« no previous file with comments | « no previous file | chromecast/net/connectivity_checker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698