Index: chrome/browser/extensions/component_loader.cc |
diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc |
index 4d065c3104e4b9b40a2724b7647ff2b034ba61a8..6a1402bde9076df77ef5649c11255bb2b14dd8f4 100644 |
--- a/chrome/browser/extensions/component_loader.cc |
+++ b/chrome/browser/extensions/component_loader.cc |
@@ -23,6 +23,7 @@ |
#include "chrome/common/pref_names.h" |
#include "content/public/browser/notification_details.h" |
#include "content/public/browser/notification_source.h" |
+#include "content/public/browser/plugin_service.h" |
#include "extensions/common/extension.h" |
#include "extensions/common/id_util.h" |
#include "extensions/common/manifest_constants.h" |
@@ -560,6 +561,15 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages( |
AddNetworkSpeechSynthesisExtension(); |
#endif |
#endif // defined(GOOGLE_CHROME_BUILD) |
+ |
+ base::FilePath pdf_path; |
+ content::PluginService* plugin_service = |
+ content::PluginService::GetInstance(); |
+ PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); |
tapted
2013/12/05 03:34:37
nit: maybe include this in the `if` condition, so
|
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kOutOfProcessPdf) && |
+ plugin_service->GetRegisteredPpapiPluginInfo(pdf_path)) { |
+ Add(IDR_PDF_MANIFEST, base::FilePath(FILE_PATH_LITERAL("pdf"))); |
+ } |
} |
void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { |