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

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

Issue 10837044: Correct const accessors in base/values.(h|cc), Part II (ListValue) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: David's comments 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/cros_network_functions.h" 5 #include "chrome/browser/chromeos/cros/cros_network_functions.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 virtual ~DataPlanUpdateWatcher() { 135 virtual ~DataPlanUpdateWatcher() {
136 DBusThreadManager::Get()->GetCashewClient()->ResetDataPlansUpdateHandler(); 136 DBusThreadManager::Get()->GetCashewClient()->ResetDataPlansUpdateHandler();
137 } 137 }
138 138
139 private: 139 private:
140 void OnDataPlansUpdate(const std::string& service, 140 void OnDataPlansUpdate(const std::string& service,
141 const base::ListValue& data_plans) { 141 const base::ListValue& data_plans) {
142 CellularDataPlanVector* data_plan_vector = new CellularDataPlanVector; 142 CellularDataPlanVector* data_plan_vector = new CellularDataPlanVector;
143 for (size_t i = 0; i != data_plans.GetSize(); ++i) { 143 for (size_t i = 0; i != data_plans.GetSize(); ++i) {
144 base::DictionaryValue* data_plan = NULL; 144 const base::DictionaryValue* data_plan = NULL;
145 if (!data_plans.GetDictionary(i, &data_plan)) { 145 if (!data_plans.GetDictionary(i, &data_plan)) {
146 LOG(ERROR) << "data_plans[" << i << "] is not a dictionary."; 146 LOG(ERROR) << "data_plans[" << i << "] is not a dictionary.";
147 continue; 147 continue;
148 } 148 }
149 CellularDataPlan* plan = new CellularDataPlan; 149 CellularDataPlan* plan = new CellularDataPlan;
150 // Plan name. 150 // Plan name.
151 GetStringProperty(*data_plan, cashew::kCellularPlanNameProperty, 151 GetStringProperty(*data_plan, cashew::kCellularPlanNameProperty,
152 &plan->plan_name); 152 &plan->plan_name);
153 // Plan type. 153 // Plan type.
154 std::string plan_type_string; 154 std::string plan_type_string;
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 return false; // No powered device found that has a 'Networks' array. 765 return false; // No powered device found that has a 'Networks' array.
766 return true; 766 return true;
767 } 767 }
768 768
769 void CrosConfigureService(const base::DictionaryValue& properties) { 769 void CrosConfigureService(const base::DictionaryValue& properties) {
770 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService( 770 DBusThreadManager::Get()->GetFlimflamManagerClient()->ConfigureService(
771 properties, base::Bind(&DoNothing)); 771 properties, base::Bind(&DoNothing));
772 } 772 }
773 773
774 } // namespace chromeos 774 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_manager_extension_api.cc ('k') | chrome/browser/chromeos/cros/onc_network_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698