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

Side by Side Diff: chrome/browser/ui/auto_login_info_bar_delegate.cc

Issue 10701080: Prevent crash when trying to dismiss an already dismissed infobar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Follow review. Created 8 years, 5 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 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/auto_login_info_bar_delegate.h" 5 #include "chrome/browser/ui/auto_login_info_bar_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 void AutoLoginInfoBarDelegate::RecordHistogramAction(int action) { 217 void AutoLoginInfoBarDelegate::RecordHistogramAction(int action) {
218 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action, HISTOGRAM_MAX); 218 UMA_HISTOGRAM_ENUMERATION("AutoLogin.Regular", action, HISTOGRAM_MAX);
219 } 219 }
220 220
221 void AutoLoginInfoBarDelegate::Observe(int type, 221 void AutoLoginInfoBarDelegate::Observe(int type,
222 const NotificationSource& source, 222 const NotificationSource& source,
223 const NotificationDetails& details) { 223 const NotificationDetails& details) {
224 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type); 224 DCHECK_EQ(chrome::NOTIFICATION_GOOGLE_SIGNED_OUT, type);
225 owner()->RemoveInfoBar(this); 225 // owner() can be NULL when InfoBarTabHelper removes us. See
226 // |InfoBarDelegate::clear_owner|.
227 if (owner())
228 owner()->RemoveInfoBar(this);
226 } 229 }
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