Chromium Code Reviews| Index: chrome/browser/captive_portal/captive_portal_service.h |
| =================================================================== |
| --- chrome/browser/captive_portal/captive_portal_service.h (revision 148357) |
| +++ chrome/browser/captive_portal/captive_portal_service.h (working copy) |
| @@ -76,6 +76,13 @@ |
| // checks return INTERNET_CONNECTED. |
| bool enabled() const { return enabled_; } |
| + // Used to disable captive portal detection so it doesn't interfere with |
| + // tests. Should be called before the service is created. |
| + static void set_is_disabled_for_tests(bool is_disabled_for_tests) { |
|
jam
2012/07/26 21:47:53
nit: name this set_is_disabled_for_testing. there
mmenke
2012/07/26 22:08:28
Done.
|
| + is_disabled_for_tests_ = is_disabled_for_tests; |
| + } |
| + static bool is_disabled_for_tests() { return is_disabled_for_tests_; } |
| + |
| private: |
| friend class CaptivePortalServiceTest; |
| friend class CaptivePortalBrowserTest; |
| @@ -211,6 +218,8 @@ |
| base::OneShotTimer<CaptivePortalService> check_captive_portal_timer_; |
| + static bool is_disabled_for_tests_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(CaptivePortalService); |
| }; |