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

Unified Diff: chrome/browser/plugins/plugin_finder.cc

Issue 10917189: Remove PluginFinder async interface (Closed) Base URL: http://git.chromium.org/chromium/src.git@separate_finder_thread_safety
Patch Set: ... Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/plugins/plugin_finder.h ('k') | chrome/browser/plugins/plugin_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_finder.cc
diff --git a/chrome/browser/plugins/plugin_finder.cc b/chrome/browser/plugins/plugin_finder.cc
index cbb17df488012c9af6a4c829d7d678a53d34ab6c..be73b16db959c07fb7706aaadc5a26ea8da7d157 100644
--- a/chrome/browser/plugins/plugin_finder.cc
+++ b/chrome/browser/plugins/plugin_finder.cc
@@ -12,7 +12,7 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/plugins/plugin_installer.h"
+#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
@@ -56,14 +56,6 @@ static string16 GetGroupName(const webkit::WebPluginInfo& plugin) {
} // namespace
-// TODO(ibraaaa): DELETE. http://crbug.com/124396
-// static
-void PluginFinder::Get(const base::Callback<void(PluginFinder*)>& cb) {
- // At a later point we might want to do intialization here that needs to be
- // done asynchronously, like loading the plug-in list from disk or from a URL.
- MessageLoop::current()->PostTask(FROM_HERE, base::Bind(cb, GetInstance()));
-}
-
// static
PluginFinder* PluginFinder::GetInstance() {
// PluginFinder::GetInstance() is the only method that's allowed to call
@@ -180,15 +172,16 @@ PluginInstaller* PluginFinder::FindPluginWithIdentifier(
}
#endif
-PluginMetadata* PluginFinder::FindPluginMetadataWithIdentifier(
+string16 PluginFinder::FindPluginNameWithIdentifier(
const std::string& identifier) {
base::AutoLock lock(mutex_);
std::map<std::string, PluginMetadata*>::const_iterator it =
identifier_plugin_.find(identifier);
+ string16 name;
if (it != identifier_plugin_.end())
- return it->second;
+ name = it->second->name();
- return NULL;
+ return name.empty() ? UTF8ToUTF16(identifier) : name;
}
PluginMetadata* PluginFinder::CreatePluginMetadata(
« no previous file with comments | « chrome/browser/plugins/plugin_finder.h ('k') | chrome/browser/plugins/plugin_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698