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

Side by Side Diff: chromeos/network/network_state_handler.h

Issue 2478573003: NetworkStateHandler::InitializeForTest() should return a std::unique_ptr. (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_NETWORK_STATE_HANDLER_H_ 5 #ifndef CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 6 #define CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 237
238 const std::string& default_network_path() const { 238 const std::string& default_network_path() const {
239 return default_network_path_; 239 return default_network_path_;
240 } 240 }
241 241
242 // Sets the |last_error_| property of the matching NetworkState for tests. 242 // Sets the |last_error_| property of the matching NetworkState for tests.
243 void SetLastErrorForTest(const std::string& service_path, 243 void SetLastErrorForTest(const std::string& service_path,
244 const std::string& error); 244 const std::string& error);
245 245
246 // Constructs and initializes an instance for testing. 246 // Constructs and initializes an instance for testing.
247 static NetworkStateHandler* InitializeForTest(); 247 static std::unique_ptr<NetworkStateHandler> InitializeForTest();
248 248
249 // Default set of comma separated interfaces on which to enable 249 // Default set of comma separated interfaces on which to enable
250 // portal checking. 250 // portal checking.
251 static const char kDefaultCheckPortalList[]; 251 static const char kDefaultCheckPortalList[];
252 252
253 protected: 253 protected:
254 friend class NetworkHandler; 254 friend class NetworkHandler;
255 NetworkStateHandler(); 255 NetworkStateHandler();
256 256
257 // ShillPropertyHandler::Listener overrides. 257 // ShillPropertyHandler::Listener overrides.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 401
402 // Ensure that Shutdown() gets called exactly once. 402 // Ensure that Shutdown() gets called exactly once.
403 bool did_shutdown_ = false; 403 bool did_shutdown_ = false;
404 404
405 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler); 405 DISALLOW_COPY_AND_ASSIGN(NetworkStateHandler);
406 }; 406 };
407 407
408 } // namespace chromeos 408 } // namespace chromeos
409 409
410 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_ 410 #endif // CHROMEOS_NETWORK_NETWORK_STATE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698