| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/json/json_writer.h" // for debug output only. | 9 #include "base/json/json_writer.h" // for debug output only. |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| 11 #include "base/stl_util.h" | 11 #include "base/stl_util.h" |
| 12 #include "base/values.h" | 12 #include "base/values.h" |
| 13 #include "chrome/browser/chromeos/cros/cros_library.h" | 13 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 14 #include "chrome/browser/chromeos/cros/native_network_constants.h" | 14 #include "chrome/browser/chromeos/cros/native_network_constants.h" |
| 15 #include "chrome/browser/chromeos/cros/native_network_parser.h" | 15 #include "chrome/browser/chromeos/cros/native_network_parser.h" |
| 16 #include "chrome/browser/chromeos/settings/cros_settings.h" | 16 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 17 #include "chrome/common/chrome_switches.h" | 17 #include "chrome/common/chrome_switches.h" |
| 18 #include "chromeos/network/cros_network_functions.h" | 18 #include "chromeos/network/cros_network_functions.h" |
| 19 #include "chromeos/network/network_state_handler.h" |
| 19 #include "chromeos/network/network_util.h" | 20 #include "chromeos/network/network_util.h" |
| 20 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 21 #include "third_party/cros_system_api/dbus/service_constants.h" | 22 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 22 | 23 |
| 23 using content::BrowserThread; | 24 using content::BrowserThread; |
| 24 | 25 |
| 25 namespace chromeos { | 26 namespace chromeos { |
| 26 | 27 |
| 27 // Structure used to pass IP parameter info to a DoSetIPParameters callback, | 28 // Structure used to pass IP parameter info to a DoSetIPParameters callback, |
| 28 // since Bind only takes up to six parameters. | 29 // since Bind only takes up to six parameters. |
| (...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 value); | 1347 value); |
| 1347 | 1348 |
| 1348 // Notify that the network changed, so that the DNS cache can be | 1349 // Notify that the network changed, so that the DNS cache can be |
| 1349 // cleared properly. | 1350 // cleared properly. |
| 1350 NotifyNetworkChanged(network); | 1351 NotifyNetworkChanged(network); |
| 1351 } | 1352 } |
| 1352 | 1353 |
| 1353 if (!something_changed) | 1354 if (!something_changed) |
| 1354 return; | 1355 return; |
| 1355 | 1356 |
| 1357 // Ensure NetworkStateHandler properties are up-to-date. |
| 1358 if (NetworkStateHandler::IsInitialized()) |
| 1359 NetworkStateHandler::Get()->RequestUpdateForNetwork(service_path); |
| 1360 |
| 1356 // Attempt to refresh its IP parameters, so that the changes to the service | 1361 // Attempt to refresh its IP parameters, so that the changes to the service |
| 1357 // properties can take effect. | 1362 // properties can take effect. |
| 1358 if (network->connecting_or_connected()) | 1363 if (network->connecting_or_connected()) |
| 1359 RefreshIPConfig(network); | 1364 RefreshIPConfig(network); |
| 1360 } | 1365 } |
| 1361 | 1366 |
| 1362 // static | 1367 // static |
| 1363 bool NetworkLibraryImplCros::AreProfilePathsEqual(const NetworkProfile& a, | 1368 bool NetworkLibraryImplCros::AreProfilePathsEqual(const NetworkProfile& a, |
| 1364 const NetworkProfile& b) { | 1369 const NetworkProfile& b) { |
| 1365 return a.path == b.path; | 1370 return a.path == b.path; |
| 1366 } | 1371 } |
| 1367 | 1372 |
| 1368 } // namespace chromeos | 1373 } // namespace chromeos |
| OLD | NEW |