OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/cros/network_library.h" | 5 #include "chrome/browser/chromeos/cros/network_library.h" |
6 | 6 |
7 #include <dbus/dbus-glib.h> | 7 #include <dbus/dbus-glib.h> |
8 #include <dbus/dbus-gtype-specialized.h> | 8 #include <dbus/dbus-gtype-specialized.h> |
9 #include <glib-object.h> | 9 #include <glib-object.h> |
10 | 10 |
(...skipping 2849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2860 std::string key = | 2860 std::string key = |
2861 NativeNetworkParser::property_mapper()->GetKey(props->first); | 2861 NativeNetworkParser::property_mapper()->GetKey(props->first); |
2862 if (!key.empty()) | 2862 if (!key.empty()) |
2863 dict.SetWithoutPathExpansion(key, props->second->DeepCopy()); | 2863 dict.SetWithoutPathExpansion(key, props->second->DeepCopy()); |
2864 else | 2864 else |
2865 VLOG(2) << "Property " << props->first << " will not be sent"; | 2865 VLOG(2) << "Property " << props->first << " will not be sent"; |
2866 } | 2866 } |
2867 | 2867 |
2868 CallConfigureService(network->unique_id(), &dict); | 2868 CallConfigureService(network->unique_id(), &dict); |
2869 } | 2869 } |
2870 return parser.GetNetworkConfigsSize() != 0; | 2870 return (parser.GetNetworkConfigsSize() != 0 || |
achuithb
2011/12/08 19:34:17
nit: don't need the outer parens.
kmixter1
2011/12/08 20:17:12
True - I find they make multi-line expressions lik
| |
2871 parser.GetCertificatesSize() != 0); | |
2871 } | 2872 } |
2872 | 2873 |
2873 //////////////////////////////////////////////////////////////////////////// | 2874 //////////////////////////////////////////////////////////////////////////// |
2874 // Testing functions. | 2875 // Testing functions. |
2875 | 2876 |
2876 bool NetworkLibraryImplBase::SetActiveNetwork( | 2877 bool NetworkLibraryImplBase::SetActiveNetwork( |
2877 ConnectionType type, const std::string& service_path) { | 2878 ConnectionType type, const std::string& service_path) { |
2878 Network* network = NULL; | 2879 Network* network = NULL; |
2879 if (!service_path.empty()) | 2880 if (!service_path.empty()) |
2880 network = FindNetworkByPath(service_path); | 2881 network = FindNetworkByPath(service_path); |
(...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5341 return impl; | 5342 return impl; |
5342 } | 5343 } |
5343 | 5344 |
5344 ///////////////////////////////////////////////////////////////////////////// | 5345 ///////////////////////////////////////////////////////////////////////////// |
5345 | 5346 |
5346 } // namespace chromeos | 5347 } // namespace chromeos |
5347 | 5348 |
5348 // Allows InvokeLater without adding refcounting. This class is a Singleton and | 5349 // Allows InvokeLater without adding refcounting. This class is a Singleton and |
5349 // won't be deleted until its last InvokeLater is run. | 5350 // won't be deleted until its last InvokeLater is run. |
5350 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImplBase); | 5351 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::NetworkLibraryImplBase); |
OLD | NEW |