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

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

Issue 171423005: Added in-session captive portal notification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deleted useless NotificaionDisplayed(). Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_detector_impl.h" 5 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 portal_state_map_[network->path()] = state; 481 portal_state_map_[network->path()] = state;
482 } 482 }
483 NotifyPortalDetectionCompleted(network, state); 483 NotifyPortalDetectionCompleted(network, state);
484 } 484 }
485 485
486 void NetworkPortalDetectorImpl::NotifyPortalDetectionCompleted( 486 void NetworkPortalDetectorImpl::NotifyPortalDetectionCompleted(
487 const NetworkState* network, 487 const NetworkState* network,
488 const CaptivePortalState& state) { 488 const CaptivePortalState& state) {
489 FOR_EACH_OBSERVER(Observer, observers_, 489 FOR_EACH_OBSERVER(Observer, observers_,
490 OnPortalDetectionCompleted(network, state)); 490 OnPortalDetectionCompleted(network, state));
491 notification_controller_.OnPortalDetectionCompleted(network, state);
491 } 492 }
492 493
493 base::TimeTicks NetworkPortalDetectorImpl::GetCurrentTimeTicks() const { 494 base::TimeTicks NetworkPortalDetectorImpl::GetCurrentTimeTicks() const {
494 if (time_ticks_for_testing_.is_null()) 495 if (time_ticks_for_testing_.is_null())
495 return base::TimeTicks::Now(); 496 return base::TimeTicks::Now();
496 return time_ticks_for_testing_; 497 return time_ticks_for_testing_;
497 } 498 }
498 499
499 bool NetworkPortalDetectorImpl::DetectionTimeoutIsCancelledForTesting() const { 500 bool NetworkPortalDetectorImpl::DetectionTimeoutIsCancelledForTesting() const {
500 return detection_timeout_.IsCancelled(); 501 return detection_timeout_.IsCancelled();
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 if (network->connection_state() != shill::kStateOnline) 548 if (network->connection_state() != shill::kStateOnline)
548 RecordDiscrepancyWithShill(network, status); 549 RecordDiscrepancyWithShill(network, status);
549 break; 550 break;
550 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT: 551 case NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_COUNT:
551 NOTREACHED(); 552 NOTREACHED();
552 break; 553 break;
553 } 554 }
554 } 555 }
555 556
556 } // namespace chromeos 557 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698