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

Side by Side Diff: chrome/browser/task_manager/task_manager_resource_providers.cc

Issue 11246005: [Panels] Fix crash when killing panel extension from TaskManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | 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/task_manager/task_manager_resource_providers.h" 5 #include "chrome/browser/task_manager/task_manager_resource_providers.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 break; 705 break;
706 } 706 }
707 } 707 }
708 break; 708 break;
709 } 709 }
710 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 710 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
711 { 711 {
712 for (PanelResourceMap::iterator iter = resources_.begin(); 712 for (PanelResourceMap::iterator iter = resources_.begin();
713 iter != resources_.end(); ++iter) { 713 iter != resources_.end(); ++iter) {
714 Panel* panel = iter->first; 714 Panel* panel = iter->first;
715 if (!panel->GetWebContents()) { 715 WebContents* panel_contents = panel->GetWebContents();
716 if (!panel_contents || panel_contents == web_contents) {
716 Remove(panel); 717 Remove(panel);
717 break; 718 break;
718 } 719 }
719 } 720 }
720 break; 721 break;
721 } 722 }
722 default: 723 default:
723 NOTREACHED() << "Unexpected notificiation."; 724 NOTREACHED() << "Unexpected notificiation.";
724 break; 725 break;
725 } 726 }
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
1869 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED: 1870 case content::NOTIFICATION_WEB_CONTENTS_CONNECTED:
1870 Add(web_contents->GetRenderViewHost()); 1871 Add(web_contents->GetRenderViewHost());
1871 break; 1872 break;
1872 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 1873 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
1873 Remove(web_contents->GetRenderViewHost()); 1874 Remove(web_contents->GetRenderViewHost());
1874 break; 1875 break;
1875 default: 1876 default:
1876 NOTREACHED() << "Unexpected notification."; 1877 NOTREACHED() << "Unexpected notification.";
1877 } 1878 }
1878 } 1879 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698