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

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

Issue 183973029: Refactoring of the NetworkPortalDetector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes. Created 6 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 | 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.h" 5 #include "chrome/browser/chromeos/net/network_portal_detector.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h" 10 #include "chrome/browser/chromeos/net/network_portal_detector_impl.h"
(...skipping 30 matching lines...) Expand all
41 observer->OnPortalDetectionCompleted(NULL, CaptivePortalState()); 41 observer->OnPortalDetectionCompleted(NULL, CaptivePortalState());
42 } 42 }
43 virtual void RemoveObserver(Observer* /* observer */) OVERRIDE {} 43 virtual void RemoveObserver(Observer* /* observer */) OVERRIDE {}
44 virtual CaptivePortalState GetCaptivePortalState( 44 virtual CaptivePortalState GetCaptivePortalState(
45 const std::string& /* service_path */) OVERRIDE { 45 const std::string& /* service_path */) OVERRIDE {
46 return CaptivePortalState(); 46 return CaptivePortalState();
47 } 47 }
48 virtual bool IsEnabled() OVERRIDE { return false; } 48 virtual bool IsEnabled() OVERRIDE { return false; }
49 virtual void Enable(bool /* start_detection */) OVERRIDE {} 49 virtual void Enable(bool /* start_detection */) OVERRIDE {}
50 virtual bool StartDetectionIfIdle() OVERRIDE { return false; } 50 virtual bool StartDetectionIfIdle() OVERRIDE { return false; }
51 virtual void EnableLazyDetection() OVERRIDE {} 51 virtual void EnableErrorScreenStrategy() OVERRIDE {}
52 virtual void DisableLazyDetection() OVERRIDE {} 52 virtual void DisableErrorScreenStrategy() OVERRIDE {}
53 }; 53 };
54 54
55 } // namespace 55 } // namespace
56 56
57 void NetworkPortalDetector::InitializeForTesting( 57 void NetworkPortalDetector::InitializeForTesting(
58 NetworkPortalDetector* network_portal_detector) { 58 NetworkPortalDetector* network_portal_detector) {
59 CHECK(!g_network_portal_detector) 59 CHECK(!g_network_portal_detector)
60 << "NetworkPortalDetector::InitializeForTesting() is called after " 60 << "NetworkPortalDetector::InitializeForTesting() is called after "
61 << "Initialize()"; 61 << "Initialize()";
62 CHECK(network_portal_detector); 62 CHECK(network_portal_detector);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return kCaptivePortalStatusPortal; 112 return kCaptivePortalStatusPortal;
113 case NetworkPortalDetectorImpl::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED: 113 case NetworkPortalDetectorImpl::CAPTIVE_PORTAL_STATUS_PROXY_AUTH_REQUIRED:
114 return kCaptivePortalStatusProxyAuthRequired; 114 return kCaptivePortalStatusProxyAuthRequired;
115 case NetworkPortalDetectorImpl::CAPTIVE_PORTAL_STATUS_COUNT: 115 case NetworkPortalDetectorImpl::CAPTIVE_PORTAL_STATUS_COUNT:
116 NOTREACHED(); 116 NOTREACHED();
117 } 117 }
118 return kCaptivePortalStatusUnrecognized; 118 return kCaptivePortalStatusUnrecognized;
119 } 119 }
120 120
121 } // namespace chromeos 121 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/net/network_portal_detector.h ('k') | chrome/browser/chromeos/net/network_portal_detector_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698