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

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

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 4 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
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/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"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 const base::DictionaryValue* properties) { 719 const base::DictionaryValue* properties) {
720 if (!properties) { 720 if (!properties) {
721 LOG(ERROR) << "Error retrieving manager properties: " << manager_path; 721 LOG(ERROR) << "Error retrieving manager properties: " << manager_path;
722 return; 722 return;
723 } 723 }
724 VLOG(1) << "Received NetworkManagerUpdate."; 724 VLOG(1) << "Received NetworkManagerUpdate.";
725 725
726 for (DictionaryValue::key_iterator iter = properties->begin_keys(); 726 for (DictionaryValue::key_iterator iter = properties->begin_keys();
727 iter != properties->end_keys(); ++iter) { 727 iter != properties->end_keys(); ++iter) {
728 const std::string& key = *iter; 728 const std::string& key = *iter;
729 Value* value; 729 const Value* value;
730 bool res = properties->GetWithoutPathExpansion(key, &value); 730 bool res = properties->GetWithoutPathExpansion(key, &value);
731 CHECK(res); 731 CHECK(res);
732 if (!NetworkManagerStatusChanged(key, value)) { 732 if (!NetworkManagerStatusChanged(key, value)) {
733 LOG(ERROR) << "Invalid key-value pair, key: " << key << " type: " 733 LOG(ERROR) << "Invalid key-value pair, key: " << key << " type: "
734 << value->GetType(); 734 << value->GetType();
735 } 735 }
736 } 736 }
737 // If there is no Profiles entry, request remembered networks here. 737 // If there is no Profiles entry, request remembered networks here.
738 if (!properties->HasKey(flimflam::kProfilesProperty)) 738 if (!properties->HasKey(flimflam::kProfilesProperty))
739 RequestRememberedNetworksUpdate(); 739 RequestRememberedNetworksUpdate();
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 } 990 }
991 991
992 void NetworkLibraryImplCros::UpdateProfile( 992 void NetworkLibraryImplCros::UpdateProfile(
993 const std::string& profile_path, 993 const std::string& profile_path,
994 const base::DictionaryValue* properties) { 994 const base::DictionaryValue* properties) {
995 if (!properties) { 995 if (!properties) {
996 LOG(ERROR) << "Error retrieving profile: " << profile_path; 996 LOG(ERROR) << "Error retrieving profile: " << profile_path;
997 return; 997 return;
998 } 998 }
999 VLOG(1) << "UpdateProfile for path: " << profile_path; 999 VLOG(1) << "UpdateProfile for path: " << profile_path;
1000 ListValue* profile_entries(NULL); 1000 const ListValue* profile_entries(NULL);
1001 properties->GetList(flimflam::kEntriesProperty, &profile_entries); 1001 properties->GetList(flimflam::kEntriesProperty, &profile_entries);
1002 if (!profile_entries) { 1002 if (!profile_entries) {
1003 LOG(ERROR) << "'Entries' property is missing."; 1003 LOG(ERROR) << "'Entries' property is missing.";
1004 return; 1004 return;
1005 } 1005 }
1006 1006
1007 NetworkProfileList::iterator iter1; 1007 NetworkProfileList::iterator iter1;
1008 for (iter1 = profile_list_.begin(); iter1 != profile_list_.end(); ++iter1) { 1008 for (iter1 = profile_list_.begin(); iter1 != profile_list_.end(); ++iter1) {
1009 if (iter1->path == profile_path) 1009 if (iter1->path == profile_path)
1010 break; 1010 break;
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1181 // Switch back to signed settings value. 1181 // Switch back to signed settings value.
1182 SetCellularDataRoamingAllowed(settings_value); 1182 SetCellularDataRoamingAllowed(settings_value);
1183 } 1183 }
1184 } 1184 }
1185 } 1185 }
1186 NotifyNetworkManagerChanged(false); // Not forced. 1186 NotifyNetworkManagerChanged(false); // Not forced.
1187 AddNetworkDeviceObserver(device_path, network_device_observer_.get()); 1187 AddNetworkDeviceObserver(device_path, network_device_observer_.get());
1188 } 1188 }
1189 1189
1190 } // namespace chromeos 1190 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/native_network_parser.cc ('k') | chrome/browser/chromeos/cros/network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698