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

Side by Side Diff: chrome/browser/devtools/browser_list_tabcontents_provider.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/devtools/browser_list_tabcontents_provider.h" 5 #include "chrome/browser/devtools/browser_list_tabcontents_provider.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "chrome/browser/extensions/extension_host.h" 8 #include "chrome/browser/extensions/extension_host.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_system.h" 10 #include "chrome/browser/extensions/extension_system.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 return kTargetTypeTab; 109 return kTargetTypeTab;
110 110
111 return kTargetTypeOther; 111 return kTargetTypeOther;
112 } 112 }
113 113
114 std::string BrowserListTabContentsProvider::GetViewDescription( 114 std::string BrowserListTabContentsProvider::GetViewDescription(
115 content::RenderViewHost* rvh) { 115 content::RenderViewHost* rvh) {
116 content::WebContents* web_contents = 116 content::WebContents* web_contents =
117 content::WebContents::FromRenderViewHost(rvh); 117 content::WebContents::FromRenderViewHost(rvh);
118 if (!web_contents) 118 if (!web_contents)
119 return ""; 119 return std::string();
120 120
121 Profile* profile = 121 Profile* profile =
122 Profile::FromBrowserContext(web_contents->GetBrowserContext()); 122 Profile::FromBrowserContext(web_contents->GetBrowserContext());
123 if (!profile) 123 if (!profile)
124 return ""; 124 return std::string();
125 125
126 extensions::ExtensionHost* extension_host = 126 extensions::ExtensionHost* extension_host =
127 extensions::ExtensionSystem::Get(profile)->process_manager()-> 127 extensions::ExtensionSystem::Get(profile)->process_manager()->
128 GetBackgroundHostForExtension(web_contents->GetURL().host()); 128 GetBackgroundHostForExtension(web_contents->GetURL().host());
129 129
130 if (!extension_host || extension_host->host_contents() != web_contents) 130 if (!extension_host || extension_host->host_contents() != web_contents)
131 return ""; 131 return std::string();
132 132
133 return extension_host->extension()->name(); 133 return extension_host->extension()->name();
134 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/mock_settings_observer.cc ('k') | chrome/browser/devtools/devtools_file_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698