OLD | NEW |
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 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h" | 5 #include "chrome/browser/chromeos/cros/network_library_impl_cros.h" |
6 | 6 |
7 #include <dbus/dbus-glib.h> | 7 #include <dbus/dbus-glib.h> |
8 #include "base/json/json_writer.h" // for debug output only. | 8 #include "base/json/json_writer.h" // for debug output only. |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 << " Error: " << error << " Message: " << error_message; | 358 << " Error: " << error << " Message: " << error_message; |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 void NetworkLibraryImplCros::CallConfigureService(const std::string& identifier, | 362 void NetworkLibraryImplCros::CallConfigureService(const std::string& identifier, |
363 const DictionaryValue* info) { | 363 const DictionaryValue* info) { |
364 GHashTable* ghash = ConvertDictionaryValueToGValueMap(info); | 364 GHashTable* ghash = ConvertDictionaryValueToGValueMap(info); |
365 if (VLOG_IS_ON(2)) { | 365 if (VLOG_IS_ON(2)) { |
366 scoped_ptr<DictionaryValue> dict(ConvertGHashTable(ghash)); | 366 scoped_ptr<DictionaryValue> dict(ConvertGHashTable(ghash)); |
367 std::string dict_json; | 367 std::string dict_json; |
368 base::JSONWriter::Write(static_cast<Value*>(dict.get()), true, &dict_json); | 368 base::JSONWriter::WriteWithOptions(static_cast<Value*>(dict.get()), |
| 369 base::JSONWriter::OPTIONS_PRETTY_PRINT, |
| 370 &dict_json); |
369 VLOG(2) << "ConfigureService will be called on:" << dict_json; | 371 VLOG(2) << "ConfigureService will be called on:" << dict_json; |
370 } | 372 } |
371 CrosConfigureService(identifier.c_str(), ghash, | 373 CrosConfigureService(identifier.c_str(), ghash, |
372 ConfigureServiceCallback, this); | 374 ConfigureServiceCallback, this); |
373 } | 375 } |
374 | 376 |
375 // static callback | 377 // static callback |
376 void NetworkLibraryImplCros::NetworkConnectCallback( | 378 void NetworkLibraryImplCros::NetworkConnectCallback( |
377 void* object, | 379 void* object, |
378 const char* service_path, | 380 const char* service_path, |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 // Switch back to signed settings value. | 1473 // Switch back to signed settings value. |
1472 SetCellularDataRoamingAllowed(settings_value); | 1474 SetCellularDataRoamingAllowed(settings_value); |
1473 } | 1475 } |
1474 } | 1476 } |
1475 } | 1477 } |
1476 NotifyNetworkManagerChanged(false); // Not forced. | 1478 NotifyNetworkManagerChanged(false); // Not forced. |
1477 AddNetworkDeviceObserver(device_path, network_device_observer_.get()); | 1479 AddNetworkDeviceObserver(device_path, network_device_observer_.get()); |
1478 } | 1480 } |
1479 | 1481 |
1480 } // namespace chromeos | 1482 } // namespace chromeos |
OLD | NEW |