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

Side by Side Diff: chrome/browser/extensions/plugin_manager.cc

Issue 856393002: Fix for plugin id is showing instead of plugin path in chrome://plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes path to url of extension. Created 5 years, 11 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
« no previous file with comments | « no previous file | 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/files/file_path.h" 5 #include "base/files/file_path.h"
6 #include "base/lazy_instance.h" 6 #include "base/lazy_instance.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/plugin_manager.h" 10 #include "chrome/browser/extensions/plugin_manager.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 #endif 84 #endif
85 85
86 const MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension); 86 const MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
87 if (handler && !handler->handler_url().empty()) { 87 if (handler && !handler->handler_url().empty()) {
88 plugins_or_nacl_changed = true; 88 plugins_or_nacl_changed = true;
89 89
90 content::WebPluginInfo info; 90 content::WebPluginInfo info;
91 info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN; 91 info.type = content::WebPluginInfo::PLUGIN_TYPE_BROWSER_PLUGIN;
92 info.name = base::UTF8ToUTF16(extension->name()); 92 info.name = base::UTF8ToUTF16(extension->name());
93 info.path = base::FilePath::FromUTF8Unsafe(handler->extension_id()); 93 info.path = base::FilePath::FromUTF8Unsafe(extension->url().spec());
94 94
95 for (std::set<std::string>::const_iterator mime_type = 95 for (std::set<std::string>::const_iterator mime_type =
96 handler->mime_type_set().begin(); 96 handler->mime_type_set().begin();
97 mime_type != handler->mime_type_set().end(); ++mime_type) { 97 mime_type != handler->mime_type_set().end(); ++mime_type) {
98 content::WebPluginMimeType mime_type_info; 98 content::WebPluginMimeType mime_type_info;
99 mime_type_info.mime_type = *mime_type; 99 mime_type_info.mime_type = *mime_type;
100 base::FilePath::StringType file_extension; 100 base::FilePath::StringType file_extension;
101 if (net::GetPreferredExtensionForMimeType(*mime_type, &file_extension)) { 101 if (net::GetPreferredExtensionForMimeType(*mime_type, &file_extension)) {
102 mime_type_info.file_extensions.push_back( 102 mime_type_info.file_extensions.push_back(
103 base::FilePath(file_extension).AsUTF8Unsafe()); 103 base::FilePath(file_extension).AsUTF8Unsafe());
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 iter != nacl_module_list_.end(); ++iter) { 225 iter != nacl_module_list_.end(); ++iter) {
226 if (iter->url == url) 226 if (iter->url == url)
227 return iter; 227 return iter;
228 } 228 }
229 return nacl_module_list_.end(); 229 return nacl_module_list_.end();
230 } 230 }
231 231
232 #endif // !defined(DISABLE_NACL) 232 #endif // !defined(DISABLE_NACL)
233 233
234 } // namespace extensions 234 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698