diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-19 20:10:23 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-19 20:10:23 +0000 |
commit | 793ee1ad634fb9e0d86c8b6625c600d0bc202f22 (patch) | |
tree | f600e4981ad32e32d511e5d80f4d0dd1d9dc38e9 /chrome/browser/views/about_chrome_view.cc | |
parent | 6fe676ae6572a0289e2f33ade575ba852d0479c8 (diff) | |
download | chromium_src-793ee1ad634fb9e0d86c8b6625c600d0bc202f22.zip chromium_src-793ee1ad634fb9e0d86c8b6625c600d0bc202f22.tar.gz chromium_src-793ee1ad634fb9e0d86c8b6625c600d0bc202f22.tar.bz2 |
Landing a patch for Adam. See http://codereview.chromium.org/3136 for details.
TBR=abarth
Review URL: http://codereview.chromium.org/2996
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/about_chrome_view.cc')
-rw-r--r-- | chrome/browser/views/about_chrome_view.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index 6ee840c..da99ff9 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -42,12 +42,11 @@ AboutChromeView::AboutChromeView(Profile* profile) about_title_label_(NULL), version_label_(NULL), main_text_label_(NULL), - check_button_status_(CHECKBUTTON_HIDDEN), - google_updater_(NULL) { + check_button_status_(CHECKBUTTON_HIDDEN) { DCHECK(profile); Init(); - google_updater_ = new GoogleUpdate(); // This object deletes itself. + google_updater_ = new GoogleUpdate(); google_updater_->AddStatusChangeListener(this); } @@ -342,7 +341,7 @@ bool AboutChromeView::Accept() { // that an update is available, at which point this pointer should have been // null-ed out. DCHECK(!google_updater_); - google_updater_ = new GoogleUpdate(); // This object deletes itself. + google_updater_ = new GoogleUpdate(); google_updater_->AddStatusChangeListener(this); google_updater_->CheckForUpdate(true); // true=upgrade if new version found. @@ -359,8 +358,7 @@ ChromeViews::View* AboutChromeView::GetContentsView() { void AboutChromeView::OnReportResults(GoogleUpdateUpgradeResult result, GoogleUpdateErrorCode error_code, const std::wstring& version) { - // The object will free itself after reporting its status, so we should - // no longer refer to it. + // Drop the last reference to the object so that it gets cleaned up here. google_updater_ = NULL; // Make a note of which version Google Update is reporting is the latest |