OLD | NEW |
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 #include "chrome/browser/chromeos/login/captive_portal_view.h" | 5 #include "chrome/browser/chromeos/login/captive_portal_view.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/captive_portal/captive_portal_detector.h" | 8 #include "chrome/browser/captive_portal/captive_portal_detector.h" |
9 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" | 9 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h" |
10 #include "chromeos/network/network_handler.h" | 10 #include "chromeos/network/network_handler.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 bool CaptivePortalView::CanResize() const { | 43 bool CaptivePortalView::CanResize() const { |
44 return false; | 44 return false; |
45 } | 45 } |
46 | 46 |
47 ui::ModalType CaptivePortalView::GetModalType() const { | 47 ui::ModalType CaptivePortalView::GetModalType() const { |
48 return ui::MODAL_TYPE_SYSTEM; | 48 return ui::MODAL_TYPE_SYSTEM; |
49 } | 49 } |
50 | 50 |
51 string16 CaptivePortalView::GetWindowTitle() const { | 51 string16 CaptivePortalView::GetWindowTitle() const { |
52 string16 network_name; | 52 base::string16 network_name; |
53 const NetworkState* default_network = | 53 const NetworkState* default_network = |
54 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); | 54 NetworkHandler::Get()->network_state_handler()->DefaultNetwork(); |
55 std::string default_network_name = | 55 std::string default_network_name = |
56 default_network ? default_network->name() : std::string(); | 56 default_network ? default_network->name() : std::string(); |
57 if (!default_network_name.empty()) { | 57 if (!default_network_name.empty()) { |
58 network_name = ASCIIToUTF16(default_network_name); | 58 network_name = ASCIIToUTF16(default_network_name); |
59 } else { | 59 } else { |
60 DLOG(ERROR) | 60 DLOG(ERROR) |
61 << "No active/default network, but captive portal window is shown."; | 61 << "No active/default network, but captive portal window is shown."; |
62 } | 62 } |
(...skipping 30 matching lines...) Expand all Loading... |
93 void CaptivePortalView::LoadingStateChanged(content::WebContents* source) { | 93 void CaptivePortalView::LoadingStateChanged(content::WebContents* source) { |
94 SimpleWebViewDialog::LoadingStateChanged(source); | 94 SimpleWebViewDialog::LoadingStateChanged(source); |
95 // TODO(nkostylev): Fix case of no connectivity, check HTTP code returned. | 95 // TODO(nkostylev): Fix case of no connectivity, check HTTP code returned. |
96 // Disable this heuristic as it has false positives. | 96 // Disable this heuristic as it has false positives. |
97 // Relying on just shill portal check to close dialog is fine. | 97 // Relying on just shill portal check to close dialog is fine. |
98 // if (!is_loading && !redirected_) | 98 // if (!is_loading && !redirected_) |
99 // proxy_->OnOriginalURLLoaded(); | 99 // proxy_->OnOriginalURLLoaded(); |
100 } | 100 } |
101 | 101 |
102 } // namespace chromeos | 102 } // namespace chromeos |
OLD | NEW |