diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 20:50:52 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 20:50:52 +0000 |
commit | 81e824d4d74c074e03ca642c9277d1e6ac5d4e25 (patch) | |
tree | d308740ce5334eecf74e41e3432d3468b6d69200 | |
parent | 7ff3a7eac5506ccd4ae1e50ee09b3280636457d4 (diff) | |
download | chromium_src-81e824d4d74c074e03ca642c9277d1e6ac5d4e25.zip chromium_src-81e824d4d74c074e03ca642c9277d1e6ac5d4e25.tar.gz chromium_src-81e824d4d74c074e03ca642c9277d1e6ac5d4e25.tar.bz2 |
Crash fix due to uninitialized pointers.
BUG=chromium-os:7619
TEST=none
Review URL: http://codereview.chromium.org/4110009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64481 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chromeos/options/network_config_view.cc | 13 | ||||
-rw-r--r-- | chrome/browser/chromeos/options/network_config_view.h | 6 |
2 files changed, 5 insertions, 14 deletions
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc index 46f9cc8..0c65eb6 100644 --- a/chrome/browser/chromeos/options/network_config_view.cc +++ b/chrome/browser/chromeos/options/network_config_view.cc @@ -59,9 +59,6 @@ NetworkConfigView::NetworkConfigView(const CellularNetwork* cellular) NetworkConfigView::NetworkConfigView() : browser_mode_(true), flags_(FLAG_WIFI | FLAG_LOGIN_ONLY | FLAG_OTHER_NETWORK), - ethernet_(NULL), - wifi_(NULL), - cellular_(NULL), cellularconfig_view_(NULL), wificonfig_view_(NULL), ipconfig_view_(NULL), @@ -69,12 +66,6 @@ NetworkConfigView::NetworkConfigView() } NetworkConfigView::~NetworkConfigView() { - if (ethernet_) - delete ethernet_; - if (wifi_) - delete wifi_; - if (cellular_) - delete cellular_; } gfx::NativeWindow NetworkConfigView::GetNativeWindow() const { @@ -189,7 +180,7 @@ void NetworkConfigView::Init() { AddChildView(tabs_); if (flags_ & FLAG_CELLULAR) { - cellularconfig_view_ = new CellularConfigView(this, cellular_); + cellularconfig_view_ = new CellularConfigView(this, cellular_.get()); tabs_->AddTab( l10n_util::GetString(IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_USAGE), cellularconfig_view_); @@ -198,7 +189,7 @@ void NetworkConfigView::Init() { if (flags_ & FLAG_OTHER_NETWORK) wificonfig_view_ = new WifiConfigView(this); else - wificonfig_view_ = new WifiConfigView(this, wifi_); + wificonfig_view_ = new WifiConfigView(this, wifi_.get()); tabs_->AddTab( l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_NETWORK_CONFIG), wificonfig_view_); diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h index f5fa19c..b6f13be 100644 --- a/chrome/browser/chromeos/options/network_config_view.h +++ b/chrome/browser/chromeos/options/network_config_view.h @@ -116,9 +116,9 @@ class NetworkConfigView : public views::View, // NetworkConfigFlags to specify which UIs to show. int flags_; - EthernetNetwork* ethernet_; - WifiNetwork* wifi_; - CellularNetwork* cellular_; + scoped_ptr<EthernetNetwork> ethernet_; + scoped_ptr<WifiNetwork> wifi_; + scoped_ptr<CellularNetwork> cellular_; CellularConfigView* cellularconfig_view_; WifiConfigView* wificonfig_view_; |