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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 extensions::ExtensionSystem::Get(profile); 902 extensions::ExtensionSystem::Get(profile);
903 if (extension_system) { 903 if (extension_system) {
904 ExtensionService* extension_service = extension_system->extension_service(); 904 ExtensionService* extension_service = extension_system->extension_service();
905 if (extension_service) { 905 if (extension_service) {
906 scoped_ptr<const ExtensionSet> extensions( 906 scoped_ptr<const ExtensionSet> extensions(
907 extension_service->GenerateInstalledExtensionsSet()); 907 extension_service->GenerateInstalledExtensionsSet());
908 for (ExtensionSet::const_iterator it = extensions->begin(); 908 for (ExtensionSet::const_iterator it = extensions->begin();
909 it != extensions->end(); ++it) { 909 it != extensions->end(); ++it) {
910 DictionaryValue* extension_info = new DictionaryValue(); 910 DictionaryValue* extension_info = new DictionaryValue();
911 bool enabled = extension_service->IsExtensionEnabled((*it)->id()); 911 bool enabled = extension_service->IsExtensionEnabled((*it)->id());
912 extensions::GetExtensionBasicInfo(*it, enabled, extension_info); 912 extensions::GetExtensionBasicInfo(it->get(), enabled, extension_info);
913 extension_list->Append(extension_info); 913 extension_list->Append(extension_info);
914 } 914 }
915 } 915 }
916 } 916 }
917 SendJavascriptCommand("receivedExtensionInfo", extension_list); 917 SendJavascriptCommand("receivedExtensionInfo", extension_list);
918 } 918 }
919 919
920 #if defined(OS_CHROMEOS) 920 #if defined(OS_CHROMEOS)
921 //////////////////////////////////////////////////////////////////////////////// 921 ////////////////////////////////////////////////////////////////////////////////
922 // 922 //
(...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 } 1996 }
1997 1997
1998 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui) 1998 NetInternalsUI::NetInternalsUI(content::WebUI* web_ui)
1999 : WebUIController(web_ui) { 1999 : WebUIController(web_ui) {
2000 web_ui->AddMessageHandler(new NetInternalsMessageHandler()); 2000 web_ui->AddMessageHandler(new NetInternalsMessageHandler());
2001 2001
2002 // Set up the chrome://net-internals/ source. 2002 // Set up the chrome://net-internals/ source.
2003 Profile* profile = Profile::FromWebUI(web_ui); 2003 Profile* profile = Profile::FromWebUI(web_ui);
2004 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource()); 2004 content::WebUIDataSource::Add(profile, CreateNetInternalsHTMLSource());
2005 } 2005 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/nacl_ui.cc ('k') | chrome/browser/ui/webui/options/certificate_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698