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

Side by Side Diff: chrome/browser/chromeos/cros/network_library_impl_cros.cc

Issue 10960047: Crash fix for daisy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/json/json_writer.h" // for debug output only. 10 #include "base/json/json_writer.h" // for debug output only.
(...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1175 UpdateCellularDeviceStatus(device, PROPERTY_INDEX_CELLULAR_ALLOW_ROAMING); 1175 UpdateCellularDeviceStatus(device, PROPERTY_INDEX_CELLULAR_ALLOW_ROAMING);
1176 1176
1177 NotifyNetworkManagerChanged(false); // Not forced. 1177 NotifyNetworkManagerChanged(false); // Not forced.
1178 AddNetworkDeviceObserver(device_path, network_device_observer_.get()); 1178 AddNetworkDeviceObserver(device_path, network_device_observer_.get());
1179 } 1179 }
1180 1180
1181 void NetworkLibraryImplCros::SetIPParametersCallback( 1181 void NetworkLibraryImplCros::SetIPParametersCallback(
1182 const IPParameterInfo& info, 1182 const IPParameterInfo& info,
1183 const std::string& service_path, 1183 const std::string& service_path,
1184 const base::DictionaryValue* properties) { 1184 const base::DictionaryValue* properties) {
1185 // crbug.com/146616 will fix this once we have better
1186 // handling of shill errors.
1187 if (!properties)
1188 return;
1189
1185 // Find the properties we're going to set, and minimize the DBus calls below 1190 // Find the properties we're going to set, and minimize the DBus calls below
1186 // by not clearing if it's already cleared, and not setting if it's already 1191 // by not clearing if it's already cleared, and not setting if it's already
1187 // set to the same value. Also, don't reconnect at the end if nothing changed. 1192 // set to the same value. Also, don't reconnect at the end if nothing changed.
1188 bool something_changed = false; 1193 bool something_changed = false;
1189 std::string current_address; 1194 std::string current_address;
1190 int32 current_prefixlen = -1; 1195 int32 current_prefixlen = -1;
1191 std::string current_gateway; 1196 std::string current_gateway;
1192 std::string current_name_servers; 1197 std::string current_name_servers;
1193 bool address_exists = properties->GetStringWithoutPathExpansion( 1198 bool address_exists = properties->GetStringWithoutPathExpansion(
1194 shill::kStaticIPAddressProperty, 1199 shill::kStaticIPAddressProperty,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 // Find the network associated with this service path, and attempt to refresh 1296 // Find the network associated with this service path, and attempt to refresh
1292 // its IP parameters, so that the changes to the service properties can take 1297 // its IP parameters, so that the changes to the service properties can take
1293 // effect. 1298 // effect.
1294 Network* network = FindNetworkByPath(service_path); 1299 Network* network = FindNetworkByPath(service_path);
1295 1300
1296 if (network && network->connecting_or_connected()) 1301 if (network && network->connecting_or_connected())
1297 RefreshIPConfig(network); 1302 RefreshIPConfig(network);
1298 } 1303 }
1299 1304
1300 } // namespace chromeos 1305 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698