| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 : (profile && | 175 : (profile && |
| 176 profile->GetPrefs()->GetBoolean( | 176 profile->GetPrefs()->GetBoolean( |
| 177 prefs::kCaptivePortalAuthenticationIgnoresProxy)); | 177 prefs::kCaptivePortalAuthenticationIgnoresProxy)); |
| 178 | 178 |
| 179 if (use_incognito_profile) { | 179 if (use_incognito_profile) { |
| 180 if (controller_) | 180 if (controller_) |
| 181 controller_->ShowDialog(); | 181 controller_->ShowDialog(); |
| 182 } else { | 182 } else { |
| 183 if (!profile) | 183 if (!profile) |
| 184 return; | 184 return; |
| 185 chrome::ScopedTabbedBrowserDisplayer displayer( | 185 chrome::ScopedTabbedBrowserDisplayer displayer(profile); |
| 186 profile, chrome::HOST_DESKTOP_TYPE_ASH); | |
| 187 GURL url(captive_portal::CaptivePortalDetector::kDefaultURL); | 186 GURL url(captive_portal::CaptivePortalDetector::kDefaultURL); |
| 188 chrome::ShowSingletonTab(displayer.browser(), url); | 187 chrome::ShowSingletonTab(displayer.browser(), url); |
| 189 } | 188 } |
| 190 CloseNotification(); | 189 CloseNotification(); |
| 191 } | 190 } |
| 192 | 191 |
| 193 void NetworkPortalNotificationControllerDelegate::ButtonClick( | 192 void NetworkPortalNotificationControllerDelegate::ButtonClick( |
| 194 int button_index) { | 193 int button_index) { |
| 195 if (button_index == | 194 if (button_index == |
| 196 NetworkPortalNotificationController::kUseExtensionButtonIndex) { | 195 NetworkPortalNotificationController::kUseExtensionButtonIndex) { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (dialog_) | 440 if (dialog_) |
| 442 dialog_->Close(); | 441 dialog_->Close(); |
| 443 } | 442 } |
| 444 | 443 |
| 445 const NetworkPortalWebDialog* | 444 const NetworkPortalWebDialog* |
| 446 NetworkPortalNotificationController::GetDialogForTesting() const { | 445 NetworkPortalNotificationController::GetDialogForTesting() const { |
| 447 return dialog_; | 446 return dialog_; |
| 448 } | 447 } |
| 449 | 448 |
| 450 } // namespace chromeos | 449 } // namespace chromeos |
| OLD | NEW |