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

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

Issue 11092066: [Panels] Fix favicon crash from using deleted WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix NoticePanelChanges test 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
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 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 break; 699 break;
700 } 700 }
701 } 701 }
702 break; 702 break;
703 } 703 }
704 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED: 704 case content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED:
705 { 705 {
706 for (PanelResourceMap::iterator iter = resources_.begin(); 706 for (PanelResourceMap::iterator iter = resources_.begin();
707 iter != resources_.end(); ++iter) { 707 iter != resources_.end(); ++iter) {
708 Panel* panel = iter->first; 708 Panel* panel = iter->first;
709 if (panel->GetWebContents() == web_contents) { 709 if (!panel->GetWebContents()) {
710 Remove(panel); 710 Remove(panel);
711 break; 711 break;
712 } 712 }
713 } 713 }
714 break; 714 break;
715 } 715 }
716 default: 716 default:
717 NOTREACHED() << "Unexpected notificiation."; 717 NOTREACHED() << "Unexpected notificiation.";
718 break; 718 break;
719 } 719 }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 1687
1688 return &resource_; 1688 return &resource_;
1689 } 1689 }
1690 1690
1691 void TaskManagerBrowserProcessResourceProvider::StartUpdating() { 1691 void TaskManagerBrowserProcessResourceProvider::StartUpdating() {
1692 task_manager_->AddResource(&resource_); 1692 task_manager_->AddResource(&resource_);
1693 } 1693 }
1694 1694
1695 void TaskManagerBrowserProcessResourceProvider::StopUpdating() { 1695 void TaskManagerBrowserProcessResourceProvider::StopUpdating() {
1696 } 1696 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/panel_host.cc » ('j') | chrome/browser/ui/panels/panel_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698