Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: chrome/browser/chromeos/net/network_portal_notification_controller.cc

Issue 1012083002: Resolve new GAIA flow's infinite loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test. Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 Profile* signin_profile = ProfileHelper::GetSigninProfile(); 304 Profile* signin_profile = ProfileHelper::GetSigninProfile();
305 dialog_ = new NetworkPortalWebDialog(AsWeakPtr()); 305 dialog_ = new NetworkPortalWebDialog(AsWeakPtr());
306 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow( 306 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow(
307 chrome::ShowWebDialog(nullptr, signin_profile, dialog_))); 307 chrome::ShowWebDialog(nullptr, signin_profile, dialog_)));
308 } 308 }
309 309
310 void NetworkPortalNotificationController::OnDialogDestroyed( 310 void NetworkPortalNotificationController::OnDialogDestroyed(
311 const NetworkPortalWebDialog* dialog) { 311 const NetworkPortalWebDialog* dialog) {
312 if (dialog == dialog_) { 312 if (dialog == dialog_) {
313 dialog_ = nullptr; 313 dialog_ = nullptr;
314 ProfileHelper::Get()->ClearSigninProfile(base::Closure()); 314 ProfileHelper::Get()->ClearSigninProfile(base::Closure(), nullptr);
315 } 315 }
316 } 316 }
317 317
318 scoped_ptr<message_center::Notification> 318 scoped_ptr<message_center::Notification>
319 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification( 319 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification(
320 const NetworkState* network) { 320 const NetworkState* network) {
321 message_center::RichNotificationData data; 321 message_center::RichNotificationData data;
322 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate( 322 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate(
323 new NetworkPortalNotificationControllerDelegate( 323 new NetworkPortalNotificationControllerDelegate(
324 std::string(), network->guid(), AsWeakPtr())); 324 std::string(), network->guid(), AsWeakPtr()));
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/ui/webui_login_display.cc ('k') | chrome/browser/chromeos/profiles/profile_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698