OLD | NEW |
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/infobars/infobar_tab_helper.h" | 5 #include "chrome/browser/infobars/infobar_tab_helper.h" |
6 | 6 |
7 #include "chrome/browser/api/infobars/infobar_delegate.h" | 7 #include "chrome/browser/api/infobars/infobar_delegate.h" |
8 #include "chrome/browser/infobars/infobar.h" | 8 #include "chrome/browser/infobars/infobar.h" |
9 #include "chrome/browser/infobars/insecure_content_infobar_delegate.h" | 9 #include "chrome/browser/infobars/insecure_content_infobar_delegate.h" |
10 #include "chrome/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 } | 212 } |
213 | 213 |
214 return; | 214 return; |
215 } | 215 } |
216 | 216 |
217 DCHECK_EQ(type, content::NOTIFICATION_WEB_CONTENTS_DESTROYED); | 217 DCHECK_EQ(type, content::NOTIFICATION_WEB_CONTENTS_DESTROYED); |
218 // The WebContents is going away; be aggressively paranoid and delete | 218 // The WebContents is going away; be aggressively paranoid and delete |
219 // ourselves lest other parts of the system attempt to add infobars or use | 219 // ourselves lest other parts of the system attempt to add infobars or use |
220 // us otherwise during the destruction. | 220 // us otherwise during the destruction. |
221 DCHECK_EQ(web_contents(), content::Source<WebContents>(source).ptr()); | 221 DCHECK_EQ(web_contents(), content::Source<WebContents>(source).ptr()); |
222 web_contents()->RemoveUserData(&kLocatorKey); | 222 web_contents()->RemoveUserData(UserDataKey()); |
223 // That was the equivalent of "delete this". This object is now destroyed; | 223 // That was the equivalent of "delete this". This object is now destroyed; |
224 // returning from this function is the only safe thing to do. | 224 // returning from this function is the only safe thing to do. |
225 return; | 225 return; |
226 } | 226 } |
OLD | NEW |