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

Side by Side Diff: chromeos/network/portal_detector/network_portal_detector.h

Issue 2870203003: Make Hands-Off Zero-Touch Enrollment compatibile with tests (Closed)
Patch Set: Make Hands-Off Zero-Touch Enrollment compatibile with tests Created 3 years, 7 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 #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_ 5 #ifndef CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_
6 #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_ 6 #define CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chromeos/chromeos_export.h" 9 #include "chromeos/chromeos_export.h"
10 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" 10 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 CHROMEOS_EXPORT void Shutdown(); 131 CHROMEOS_EXPORT void Shutdown();
132 132
133 CHROMEOS_EXPORT void SetNetworkPortalDetector( 133 CHROMEOS_EXPORT void SetNetworkPortalDetector(
134 NetworkPortalDetector* network_portal_detector); 134 NetworkPortalDetector* network_portal_detector);
135 135
136 // Initializes network portal detector for testing. The 136 // Initializes network portal detector for testing. The
137 // |network_portal_detector| will be owned by the internal pointer 137 // |network_portal_detector| will be owned by the internal pointer
138 // and deleted by Shutdown(). 138 // and deleted by Shutdown().
139 CHROMEOS_EXPORT void InitializeForTesting( 139 CHROMEOS_EXPORT void InitializeForTesting(
140 NetworkPortalDetector* network_portal_detector); 140 NetworkPortalDetector* network_portal_detector);
141
142 // Returns true if the network portal detector has been set for testing.
141 CHROMEOS_EXPORT bool SetForTesting(); 143 CHROMEOS_EXPORT bool SetForTesting();
142 144
145 // Make it globally known that testing is over.
146 // Should be called in the TearDown of any test where InitializeForTesting was
147 // used.
148 CHROMEOS_EXPORT void EndTest();
xiyuan 2017/05/15 17:24:23 This is not necessary and resetting the flag separ
kumarniranjan 2017/05/15 22:08:22 Thanks for catching this. I think I used to need i
xiyuan 2017/05/15 22:30:20 I am okay leaving it as-is.
kumarniranjan 2017/05/15 23:21:53 Okay, I will leave it as-is. Smaller CLs are bette
149
143 } // namespace network_portal_detector 150 } // namespace network_portal_detector
144 151
145 } // namespace chromeos 152 } // namespace chromeos
146 153
147 #endif // CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_ 154 #endif // CHROMEOS_NETWORK_PORTAL_DETECTOR_NETWORK_PORTAL_DETECTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698