OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/chromeos/net/network_portal_detector_impl.h" | 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
14 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
15 #include "chromeos/dbus/dbus_thread_manager.h" | 15 #include "chromeos/dbus/dbus_thread_manager.h" |
16 #include "chromeos/dbus/shill_profile_client.h" | 16 #include "chromeos/dbus/shill_profile_client.h" |
17 #include "chromeos/login/login_state.h" | 17 #include "chromeos/login/login_state.h" |
18 #include "chromeos/network/network_state.h" | 18 #include "chromeos/network/network_state.h" |
19 #include "chromeos/network/network_state_handler.h" | 19 #include "chromeos/network/network_state_handler.h" |
20 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
21 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
22 #include "grit/generated_resources.h" | |
23 #include "net/http/http_status_code.h" | 22 #include "net/http/http_status_code.h" |
24 #include "third_party/cros_system_api/dbus/service_constants.h" | 23 #include "third_party/cros_system_api/dbus/service_constants.h" |
25 #include "ui/base/l10n/l10n_util.h" | |
26 | 24 |
27 using captive_portal::CaptivePortalDetector; | 25 using captive_portal::CaptivePortalDetector; |
28 | 26 |
29 namespace chromeos { | 27 namespace chromeos { |
30 | 28 |
31 namespace { | 29 namespace { |
32 | 30 |
33 // Delay before portal detection caused by changes in proxy settings. | 31 // Delay before portal detection caused by changes in proxy settings. |
34 const int kProxyChangeDelaySec = 1; | 32 const int kProxyChangeDelaySec = 1; |
35 | 33 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 } | 632 } |
635 | 633 |
636 void NetworkPortalDetectorImpl::ResetStrategyAndCounters() { | 634 void NetworkPortalDetectorImpl::ResetStrategyAndCounters() { |
637 last_detection_result_ = CAPTIVE_PORTAL_STATUS_UNKNOWN; | 635 last_detection_result_ = CAPTIVE_PORTAL_STATUS_UNKNOWN; |
638 same_detection_result_count_ = 0; | 636 same_detection_result_count_ = 0; |
639 no_response_result_count_ = 0; | 637 no_response_result_count_ = 0; |
640 strategy_->Reset(); | 638 strategy_->Reset(); |
641 } | 639 } |
642 | 640 |
643 } // namespace chromeos | 641 } // namespace chromeos |
OLD | NEW |