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

Unified Diff: chrome/browser/chromeos/options/wifi_config_view.cc

Issue 2010001: Refactor WifiNetwork, CellularNetwork, and EthernetNetwork into classes to ma... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/options/wifi_config_view.cc
===================================================================
--- chrome/browser/chromeos/options/wifi_config_view.cc (revision 46522)
+++ chrome/browser/chromeos/options/wifi_config_view.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -129,16 +129,16 @@
bool changed = false;
bool auto_connect = autoconnect_checkbox_->checked();
- if (auto_connect != wifi_.auto_connect) {
- wifi_.auto_connect = auto_connect;
+ if (auto_connect != wifi_.auto_connect()) {
+ wifi_.set_auto_connect(auto_connect);
changed = true;
}
if (passphrase_textfield_) {
const std::string& passphrase =
UTF16ToUTF8(passphrase_textfield_->text());
- if (passphrase != wifi_.passphrase) {
- wifi_.passphrase = passphrase;
+ if (passphrase != wifi_.passphrase()) {
+ wifi_.set_passphrase(passphrase);
changed = true;
}
}
@@ -190,7 +190,7 @@
ssid_textfield_->SetController(this);
layout->AddView(ssid_textfield_);
} else {
- views::Label* label = new views::Label(ASCIIToWide(wifi_.ssid));
+ views::Label* label = new views::Label(ASCIIToWide(wifi_.name()));
label->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
layout->AddView(label);
}
@@ -201,7 +201,7 @@
// in general, but very common. WPA Supplicant doesn't report the
// EAP type because it's unknown until the process begins, and we'd
// need some kind of callback.
- if (wifi_.encrypted && wifi_.encryption == SECURITY_8021X) {
+ if (wifi_.encrypted() && wifi_.encryption() == SECURITY_8021X) {
layout->StartRow(0, column_view_set_id);
layout->AddView(new views::Label(l10n_util::GetString(
IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT_IDENTITY)));
@@ -221,10 +221,10 @@
}
// Add passphrase if other_network or wifi is encrypted.
- if (other_network_ || wifi_.encrypted) {
+ if (other_network_ || wifi_.encrypted()) {
layout->StartRow(0, column_view_set_id);
int label_text_id;
- if (wifi_.encryption == SECURITY_8021X)
+ if (wifi_.encryption() == SECURITY_8021X)
label_text_id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_CERT;
else
label_text_id = IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PASSPHRASE;
@@ -232,8 +232,8 @@
passphrase_textfield_ = new views::Textfield(
views::Textfield::STYLE_PASSWORD);
passphrase_textfield_->SetController(this);
- if (!wifi_.passphrase.empty())
- passphrase_textfield_->SetText(UTF8ToUTF16(wifi_.passphrase));
+ if (!wifi_.passphrase().empty())
+ passphrase_textfield_->SetText(UTF8ToUTF16(wifi_.passphrase()));
layout->AddView(passphrase_textfield_);
// Password visible button.
passphrase_visible_button_ = new views::ImageButton(this);
@@ -250,7 +250,7 @@
autoconnect_checkbox_ = new views::Checkbox(
l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT));
// For other network, default to autoconnect.
- bool autoconnect = other_network_ || wifi_.auto_connect;
+ bool autoconnect = other_network_ || wifi_.auto_connect();
autoconnect_checkbox_->SetChecked(autoconnect);
layout->StartRow(0, column_view_set_id);
layout->AddView(autoconnect_checkbox_, 3, 1);

Powered by Google App Engine
This is Rietveld 408576698