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

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

Issue 1353933002: NetworkPortalDetectorInterface class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@portal_refactor
Patch Set: rebase Created 5 years, 2 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 230
231 // static 231 // static
232 const char NetworkPortalNotificationController::kNotificationMetric[] = 232 const char NetworkPortalNotificationController::kNotificationMetric[] =
233 "CaptivePortal.Notification.Status"; 233 "CaptivePortal.Notification.Status";
234 234
235 // static 235 // static
236 const char NetworkPortalNotificationController::kUserActionMetric[] = 236 const char NetworkPortalNotificationController::kUserActionMetric[] =
237 "CaptivePortal.Notification.UserAction"; 237 "CaptivePortal.Notification.UserAction";
238 238
239 NetworkPortalNotificationController::NetworkPortalNotificationController( 239 NetworkPortalNotificationController::NetworkPortalNotificationController(
240 NetworkPortalDetector* network_portal_detector) 240 NetworkPortalDetectorInterface* network_portal_detector)
241 : network_portal_detector_(network_portal_detector), weak_factory_(this) { 241 : network_portal_detector_(network_portal_detector), weak_factory_(this) {
242 if (NetworkHandler::IsInitialized()) { // NULL for unit tests. 242 if (NetworkHandler::IsInitialized()) { // NULL for unit tests.
243 NetworkHandler::Get()->network_state_handler()->AddObserver(this, 243 NetworkHandler::Get()->network_state_handler()->AddObserver(this,
244 FROM_HERE); 244 FROM_HERE);
245 } 245 }
246 if (network_portal_detector_) 246 if (network_portal_detector_)
247 network_portal_detector_->AddObserver(this); 247 network_portal_detector_->AddObserver(this);
248 } 248 }
249 249
250 NetworkPortalNotificationController::~NetworkPortalNotificationController() { 250 NetworkPortalNotificationController::~NetworkPortalNotificationController() {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 if (dialog_) 440 if (dialog_)
441 dialog_->Close(); 441 dialog_->Close();
442 } 442 }
443 443
444 const NetworkPortalWebDialog* 444 const NetworkPortalWebDialog*
445 NetworkPortalNotificationController::GetDialogForTesting() const { 445 NetworkPortalNotificationController::GetDialogForTesting() const {
446 return dialog_; 446 return dialog_;
447 } 447 }
448 448
449 } // namespace chromeos 449 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_notification_controller.h ('k') | chromeos/chromeos.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698