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

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: Clear all WebView partitions. 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 Profile* signin_profile = ProfileHelper::GetSigninProfile(); 294 Profile* signin_profile = ProfileHelper::GetSigninProfile();
295 dialog_ = new NetworkPortalWebDialog(AsWeakPtr()); 295 dialog_ = new NetworkPortalWebDialog(AsWeakPtr());
296 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow( 296 dialog_->SetWidget(views::Widget::GetWidgetForNativeWindow(
297 chrome::ShowWebDialog(nullptr, signin_profile, dialog_))); 297 chrome::ShowWebDialog(nullptr, signin_profile, dialog_)));
298 } 298 }
299 299
300 void NetworkPortalNotificationController::OnDialogDestroyed( 300 void NetworkPortalNotificationController::OnDialogDestroyed(
301 const NetworkPortalWebDialog* dialog) { 301 const NetworkPortalWebDialog* dialog) {
302 if (dialog == dialog_) { 302 if (dialog == dialog_) {
303 dialog_ = nullptr; 303 dialog_ = nullptr;
304 ProfileHelper::Get()->ClearSigninProfile(base::Closure()); 304 ProfileHelper::Get()->ClearSigninProfile(base::Closure(), nullptr);
305 } 305 }
306 } 306 }
307 307
308 scoped_ptr<message_center::Notification> 308 scoped_ptr<message_center::Notification>
309 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification( 309 NetworkPortalNotificationController::CreateDefaultCaptivePortalNotification(
310 const NetworkState* network) { 310 const NetworkState* network) {
311 message_center::RichNotificationData data; 311 message_center::RichNotificationData data;
312 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate( 312 scoped_refptr<NetworkPortalNotificationControllerDelegate> delegate(
313 new NetworkPortalNotificationControllerDelegate( 313 new NetworkPortalNotificationControllerDelegate(
314 std::string(), network->guid(), AsWeakPtr())); 314 std::string(), network->guid(), AsWeakPtr()));
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 if (dialog_) 411 if (dialog_)
412 dialog_->Close(); 412 dialog_->Close();
413 } 413 }
414 414
415 const NetworkPortalWebDialog* 415 const NetworkPortalWebDialog*
416 NetworkPortalNotificationController::GetDialogForTesting() const { 416 NetworkPortalNotificationController::GetDialogForTesting() const {
417 return dialog_; 417 return dialog_;
418 } 418 }
419 419
420 } // namespace chromeos 420 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698