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

Side by Side Diff: chrome/browser/chromeos/status/network_menu.cc

Issue 4374003: Crash fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/status/network_menu.h" 5 #include "chrome/browser/chromeos/status/network_menu.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 322 }
323 } else if (flags & FLAG_CELLULAR) { 323 } else if (flags & FLAG_CELLULAR) {
324 CellularNetwork* cellular = cros->FindCellularNetworkByPath( 324 CellularNetwork* cellular = cros->FindCellularNetworkByPath(
325 menu_items_[index].wireless_path); 325 menu_items_[index].wireless_path);
326 if (!cellular) { 326 if (!cellular) {
327 // If we are attempting to connect to a network that no longer exists, 327 // If we are attempting to connect to a network that no longer exists,
328 // display a notification. 328 // display a notification.
329 // TODO(stevenjb): Show notification. 329 // TODO(stevenjb): Show notification.
330 } else if (cellular->activation_state() != ACTIVATION_STATE_ACTIVATED) { 330 } else if (cellular->activation_state() != ACTIVATION_STATE_ACTIVATED) {
331 ActivateCellular(cellular); 331 ActivateCellular(cellular);
332 } else if (cellular->service_path() == 332 } else if (cros->cellular_network() &&
333 cros->cellular_network()->service_path()) { 333 (cellular->service_path() ==
334 cros->cellular_network()->service_path())) {
334 // Show the config settings for the cellular network. 335 // Show the config settings for the cellular network.
335 ShowCellular(cellular, false); 336 ShowCellular(cellular, false);
336 } else { 337 } else {
337 ConnectToNetworkAt(index, std::string(), std::string(), -1); 338 ConnectToNetworkAt(index, std::string(), std::string(), -1);
338 } 339 }
339 } 340 }
340 } 341 }
341 342
342 void NetworkMenu::SetFirstLevelMenuWidth(int width) { 343 void NetworkMenu::SetFirstLevelMenuWidth(int width) {
343 min_width_ = width; 344 min_width_ = width;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 chromeos::TYPE_WIFI); 691 chromeos::TYPE_WIFI);
691 browser->ShowOptionsTab(page); 692 browser->ShowOptionsTab(page);
692 } 693 }
693 } else { 694 } else {
694 const bool kFocusLogin = true; 695 const bool kFocusLogin = true;
695 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin); 696 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin);
696 } 697 }
697 } 698 }
698 699
699 } // namespace chromeos 700 } // 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