| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_notification_controller.h" | 5 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/system_notifier.h" | 10 #include "ash/system/system_notifier.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 : (profile && | 173 : (profile && |
| 174 profile->GetPrefs()->GetBoolean( | 174 profile->GetPrefs()->GetBoolean( |
| 175 prefs::kCaptivePortalAuthenticationIgnoresProxy)); | 175 prefs::kCaptivePortalAuthenticationIgnoresProxy)); |
| 176 | 176 |
| 177 if (use_incognito_profile) { | 177 if (use_incognito_profile) { |
| 178 if (controller_) | 178 if (controller_) |
| 179 controller_->ShowDialog(); | 179 controller_->ShowDialog(); |
| 180 } else { | 180 } else { |
| 181 if (!profile) | 181 if (!profile) |
| 182 return; | 182 return; |
| 183 chrome::ScopedTabbedBrowserDisplayer displayer( | 183 chrome::ScopedTabbedBrowserDisplayer displayer(profile, |
| 184 profile, chrome::HOST_DESKTOP_TYPE_ASH); | 184 ui::HOST_DESKTOP_TYPE_ASH); |
| 185 GURL url(captive_portal::CaptivePortalDetector::kDefaultURL); | 185 GURL url(captive_portal::CaptivePortalDetector::kDefaultURL); |
| 186 chrome::ShowSingletonTab(displayer.browser(), url); | 186 chrome::ShowSingletonTab(displayer.browser(), url); |
| 187 } | 187 } |
| 188 CloseNotification(); | 188 CloseNotification(); |
| 189 } | 189 } |
| 190 | 190 |
| 191 void NetworkPortalNotificationControllerDelegate::ButtonClick( | 191 void NetworkPortalNotificationControllerDelegate::ButtonClick( |
| 192 int button_index) { | 192 int button_index) { |
| 193 if (button_index == | 193 if (button_index == |
| 194 NetworkPortalNotificationController::kUseExtensionButtonIndex) { | 194 NetworkPortalNotificationController::kUseExtensionButtonIndex) { |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 if (dialog_) | 426 if (dialog_) |
| 427 dialog_->Close(); | 427 dialog_->Close(); |
| 428 } | 428 } |
| 429 | 429 |
| 430 const NetworkPortalWebDialog* | 430 const NetworkPortalWebDialog* |
| 431 NetworkPortalNotificationController::GetDialogForTesting() const { | 431 NetworkPortalNotificationController::GetDialogForTesting() const { |
| 432 return dialog_; | 432 return dialog_; |
| 433 } | 433 } |
| 434 | 434 |
| 435 } // namespace chromeos | 435 } // namespace chromeos |
| OLD | NEW |