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

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

Issue 10456045: Refactored mobile activation engine outside of WebUI handler in order to expose its state to other … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « ash/test/test_shell_delegate.cc ('k') | chrome/browser/chromeos/mobile/mobile_activator.h » ('j') | 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_stub.h" 5 #include "chrome/browser/chromeos/cros/network_library_impl_stub.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "content/public/browser/browser_thread.h" 8 #include "content/public/browser/browser_thread.h"
9 9
10 using content::BrowserThread; 10 using content::BrowserThread;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 CellularNetwork* cellular1 = new CellularNetwork("cellular1"); 163 CellularNetwork* cellular1 = new CellularNetwork("cellular1");
164 cellular1->set_name("Fake Cellular 1"); 164 cellular1->set_name("Fake Cellular 1");
165 cellular1->set_strength(100); 165 cellular1->set_strength(100);
166 cellular1->set_connected(true); 166 cellular1->set_connected(true);
167 cellular1->set_activation_state(ACTIVATION_STATE_ACTIVATED); 167 cellular1->set_activation_state(ACTIVATION_STATE_ACTIVATED);
168 cellular1->set_payment_url(std::string("http://www.google.com")); 168 cellular1->set_payment_url(std::string("http://www.google.com"));
169 cellular1->set_usage_url(std::string("http://www.google.com")); 169 cellular1->set_usage_url(std::string("http://www.google.com"));
170 cellular1->set_network_technology(NETWORK_TECHNOLOGY_EVDO); 170 cellular1->set_network_technology(NETWORK_TECHNOLOGY_EVDO);
171 AddStubNetwork(cellular1, PROFILE_NONE); 171 AddStubNetwork(cellular1, PROFILE_NONE);
172 172
173 CellularNetwork* cellular2 = new CellularNetwork("cellular2"); 173 CellularNetwork* cellular2 = new CellularNetwork("/cellular2");
174 cellular2->set_name("Fake Cellular 2"); 174 cellular2->set_name("Fake Cellular 2");
175 cellular2->set_strength(50); 175 cellular2->set_strength(50);
176 cellular2->set_activation_state(ACTIVATION_STATE_NOT_ACTIVATED); 176 cellular2->set_activation_state(ACTIVATION_STATE_NOT_ACTIVATED);
177 cellular2->set_network_technology(NETWORK_TECHNOLOGY_UMTS); 177 cellular2->set_network_technology(NETWORK_TECHNOLOGY_UMTS);
178 cellular2->set_roaming_state(ROAMING_STATE_ROAMING); 178 cellular2->set_roaming_state(ROAMING_STATE_ROAMING);
179 cellular2->set_payment_url(std::string("http://www.google.com"));
180 cellular2->set_usage_url(std::string("http://www.google.com"));
179 AddStubNetwork(cellular2, PROFILE_NONE); 181 AddStubNetwork(cellular2, PROFILE_NONE);
180 182
181 CellularNetwork* cellular3 = new CellularNetwork("cellular3"); 183 CellularNetwork* cellular3 = new CellularNetwork("cellular3");
182 cellular3->set_name("Fake Cellular 3 (policy-managed)"); 184 cellular3->set_name("Fake Cellular 3 (policy-managed)");
183 cellular3->set_device_path(cellular->device_path()); 185 cellular3->set_device_path(cellular->device_path());
184 cellular3->set_activation_state(ACTIVATION_STATE_ACTIVATED); 186 cellular3->set_activation_state(ACTIVATION_STATE_ACTIVATED);
185 cellular3->set_network_technology(NETWORK_TECHNOLOGY_EVDO); 187 cellular3->set_network_technology(NETWORK_TECHNOLOGY_EVDO);
186 NetworkUIData cellular3_ui_data; 188 NetworkUIData cellular3_ui_data;
187 cellular3_ui_data.set_onc_source(NetworkUIData::ONC_SOURCE_USER_POLICY); 189 cellular3_ui_data.set_onc_source(NetworkUIData::ONC_SOURCE_USER_POLICY);
188 cellular3->set_ui_data(cellular3_ui_data); 190 cellular3->set_ui_data(cellular3_ui_data);
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 HardwareAddressFormat format) { 665 HardwareAddressFormat format) {
664 *hardware_address = hardware_address_; 666 *hardware_address = hardware_address_;
665 return ip_configs_; 667 return ip_configs_;
666 } 668 }
667 669
668 void NetworkLibraryImplStub::SetIPConfig(const NetworkIPConfig& ipconfig) { 670 void NetworkLibraryImplStub::SetIPConfig(const NetworkIPConfig& ipconfig) {
669 ip_configs_.push_back(ipconfig); 671 ip_configs_.push_back(ipconfig);
670 } 672 }
671 673
672 } // namespace chromeos 674 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | chrome/browser/chromeos/mobile/mobile_activator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698