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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/ui/webui/nacl_ui.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | 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/webui/net_internals/net_internals_ui.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <list> 8 #include <list>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 662
663 //////////////////////////////////////////////////////////////////////////////// 663 ////////////////////////////////////////////////////////////////////////////////
664 // 664 //
665 // NetInternalsMessageHandler 665 // NetInternalsMessageHandler
666 // 666 //
667 //////////////////////////////////////////////////////////////////////////////// 667 ////////////////////////////////////////////////////////////////////////////////
668 668
669 NetInternalsMessageHandler::NetInternalsMessageHandler() {} 669 NetInternalsMessageHandler::NetInternalsMessageHandler() {}
670 670
671 NetInternalsMessageHandler::~NetInternalsMessageHandler() { 671 NetInternalsMessageHandler::~NetInternalsMessageHandler() {
672 if (proxy_) { 672 if (proxy_.get()) {
673 proxy_.get()->OnWebUIDeleted(); 673 proxy_.get()->OnWebUIDeleted();
674 // Notify the handler on the IO thread that the renderer is gone. 674 // Notify the handler on the IO thread that the renderer is gone.
675 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, 675 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
676 base::Bind(&IOThreadImpl::Detach, proxy_.get())); 676 base::Bind(&IOThreadImpl::Detach, proxy_.get()));
677 } 677 }
678 } 678 }
679 679
680 void NetInternalsMessageHandler::RegisterMessages() { 680 void NetInternalsMessageHandler::RegisterMessages() {
681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 681 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
682 682
(...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after
1995 } 1995 }
1996 1996
1997 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1997 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1998 : WebUIController(web_ui) { 1998 : WebUIController(web_ui) {
1999 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 1999 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
2000 2000
2001 // Set up the chrome://net-internals/ source. 2001 // Set up the chrome://net-internals/ source.
2002 Profile* profile = Profile::FromWebUI(web_ui); 2002 Profile* profile = Profile::FromWebUI(web_ui);
2003 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 2003 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
2004 } 2004 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698