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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 23532065: Add NetworkState::RequiresActivation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | chromeos/network/network_connection_handler.cc » ('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/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 return; 263 return;
264 } 264 }
265 265
266 if (network->type() == flimflam::kTypeWimax || 266 if (network->type() == flimflam::kTypeWimax ||
267 network->type() == flimflam::kTypeVPN) { 267 network->type() == flimflam::kTypeVPN) {
268 NetworkConfigView::Show(service_path, parent_window); 268 NetworkConfigView::Show(service_path, parent_window);
269 return; 269 return;
270 } 270 }
271 271
272 if (network->type() == flimflam::kTypeCellular) { 272 if (network->type() == flimflam::kTypeCellular) {
273 if (network->activation_state() != flimflam::kActivationStateActivated) { 273 if (network->RequiresActivation()) {
274 ash::network_connect::ActivateCellular(service_path); 274 ash::network_connect::ActivateCellular(service_path);
275 return; 275 return;
276 } 276 }
277 if (network->cellular_out_of_credits()) { 277 if (network->cellular_out_of_credits()) {
278 ash::network_connect::ShowMobileSetup(service_path); 278 ash::network_connect::ShowMobileSetup(service_path);
279 return; 279 return;
280 } 280 }
281 // No special configure or setup for |network|, show the settings UI. 281 // No special configure or setup for |network|, show the settings UI.
282 if (LoginState::Get()->IsUserLoggedIn()) 282 if (LoginState::Get()->IsUserLoggedIn())
283 ShowNetworkSettingsPage(service_path); 283 ShowNetworkSettingsPage(service_path);
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1339 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1340 }; 1340 };
1341 1341
1342 } // namespace 1342 } // namespace
1343 1343
1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { 1344 ash::SystemTrayDelegate* CreateSystemTrayDelegate() {
1345 return new chromeos::SystemTrayDelegate(); 1345 return new chromeos::SystemTrayDelegate();
1346 } 1346 }
1347 1347
1348 } // namespace chromeos 1348 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/network/network_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698