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

Side by Side Diff: chrome/browser/captive_portal/captive_portal_detector.h

Issue 11419070: Added detection timeouts and usage of Retry-After HTTP header. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 8 years, 1 month 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 | « no previous file | chrome/browser/captive_portal/captive_portal_detector.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 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_ 5 #ifndef CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_
6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_ 6 #define CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // blank page with a 204 status code. When behind a captive portal, 52 // blank page with a 204 status code. When behind a captive portal,
53 // requests for this URL should get an HTTP redirect or a login 53 // requests for this URL should get an HTTP redirect or a login
54 // page. When neither is true, no server should respond to requests 54 // page. When neither is true, no server should respond to requests
55 // for this URL. 55 // for this URL.
56 static const char kDefaultURL[]; 56 static const char kDefaultURL[];
57 57
58 explicit CaptivePortalDetector( 58 explicit CaptivePortalDetector(
59 const scoped_refptr<net::URLRequestContextGetter>& request_context); 59 const scoped_refptr<net::URLRequestContextGetter>& request_context);
60 virtual ~CaptivePortalDetector(); 60 virtual ~CaptivePortalDetector();
61 61
62 static std::string CaptivePortalResultToString(Result result);
63
62 // Triggers a check for a captive portal. After completion, runs the 64 // Triggers a check for a captive portal. After completion, runs the
63 // |callback|. 65 // |callback|.
64 void DetectCaptivePortal(const GURL& url, const DetectionCallback& callback); 66 void DetectCaptivePortal(const GURL& url, const DetectionCallback& callback);
65 67
66 // Cancels captive portal check. 68 // Cancels captive portal check.
67 void Cancel(); 69 void Cancel();
68 70
69 private: 71 private:
70 friend class CaptivePortalDetectorTestBase; 72 friend class CaptivePortalDetectorTestBase;
71 73
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 108
107 // Test time used by unit tests. 109 // Test time used by unit tests.
108 base::Time time_for_testing_; 110 base::Time time_for_testing_;
109 111
110 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetector); 112 DISALLOW_COPY_AND_ASSIGN(CaptivePortalDetector);
111 }; 113 };
112 114
113 } // namespace captive_portal 115 } // namespace captive_portal
114 116
115 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_ 117 #endif // CHROME_BROWSER_CAPTIVE_PORTAL_CAPTIVE_PORTAL_DETECTOR_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/captive_portal/captive_portal_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698