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

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

Issue 4237001: Add support for different type of encyrption when adding a network.... (Closed) Base URL: svn://chrome-svn/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
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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 } else if (flags & FLAG_CELLULAR) { 231 } else if (flags & FLAG_CELLULAR) {
232 CellularNetwork* cellular = cros->FindCellularNetworkByPath( 232 CellularNetwork* cellular = cros->FindCellularNetworkByPath(
233 menu_items_[index].wireless_path); 233 menu_items_[index].wireless_path);
234 if (cellular) { 234 if (cellular) {
235 // TODO(zelidrag): Start activation process if needed. 235 // TODO(zelidrag): Start activation process if needed.
236 // Connect or reconnect. 236 // Connect or reconnect.
237 cros->ConnectToCellularNetwork(cellular); 237 cros->ConnectToCellularNetwork(cellular);
238 } 238 }
239 } else if (flags & FLAG_OTHER_NETWORK) { 239 } else if (flags & FLAG_OTHER_NETWORK) {
240 bool favorite = remember == 0 ? false : true; // default is true 240 bool favorite = remember == 0 ? false : true; // default is true
241 cros->ConnectToWifiNetwork(ssid, passphrase, std::string(), std::string(), 241 cros->ConnectToWifiNetwork(
242 favorite); 242 passphrase.empty() ? SECURITY_NONE : SECURITY_UNKNOWN,
243 ssid, passphrase, std::string(), std::string(), favorite);
243 } 244 }
244 return true; 245 return true;
245 } 246 }
246 247
247 //////////////////////////////////////////////////////////////////////////////// 248 ////////////////////////////////////////////////////////////////////////////////
248 // NetworkMenu, menus::MenuModel implementation: 249 // NetworkMenu, menus::MenuModel implementation:
249 250
250 int NetworkMenu::GetItemCount() const { 251 int NetworkMenu::GetItemCount() const {
251 return static_cast<int>(menu_items_.size()); 252 return static_cast<int>(menu_items_.size());
252 } 253 }
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 chromeos::TYPE_WIFI); 685 chromeos::TYPE_WIFI);
685 browser->ShowOptionsTab(page); 686 browser->ShowOptionsTab(page);
686 } 687 }
687 } else { 688 } else {
688 const bool kFocusLogin = true; 689 const bool kFocusLogin = true;
689 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin); 690 ShowNetworkConfigView(new NetworkConfigView(), kFocusLogin);
690 } 691 }
691 } 692 }
692 693
693 } // namespace chromeos 694 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698