Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / plugin_manager.cc
index b018c6d..86bbe93 100644 (file)
@@ -21,7 +21,9 @@
 
 using content::PluginService;
 
+#if !defined(DISABLE_NACL)
 static const char kNaClPluginMimeType[] = "application/x-nacl";
+#endif
 
 namespace extensions {
 
@@ -67,6 +69,7 @@ void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context,
     }
   }
 
+#if !defined(DISABLE_NACL)
   const NaClModuleInfo::List* nacl_modules =
       NaClModuleInfo::GetNaClModules(extension);
   if (nacl_modules) {
@@ -78,6 +81,7 @@ void PluginManager::OnExtensionLoaded(content::BrowserContext* browser_context,
     }
     UpdatePluginListWithNaClModules();
   }
+#endif
 
   const MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
   if (handler && !handler->handler_url().empty()) {
@@ -122,6 +126,7 @@ void PluginManager::OnExtensionUnloaded(
     }
   }
 
+#if !defined(DISABLE_NACL)
   const NaClModuleInfo::List* nacl_modules =
       NaClModuleInfo::GetNaClModules(extension);
   if (nacl_modules) {
@@ -133,6 +138,7 @@ void PluginManager::OnExtensionUnloaded(
     }
     UpdatePluginListWithNaClModules();
   }
+#endif
 
   const MimeTypesHandler* handler = MimeTypesHandler::GetHandler(extension);
   if (handler && !handler->handler_url().empty()) {
@@ -148,6 +154,8 @@ void PluginManager::OnExtensionUnloaded(
     PluginService::GetInstance()->PurgePluginListCache(profile_, false);
 }
 
+#if !defined(DISABLE_NACL)
+
 void PluginManager::RegisterNaClModule(const NaClModuleInfo& info) {
   DCHECK(FindNaClModule(info.url) == nacl_module_list_.end());
   nacl_module_list_.push_front(info);
@@ -216,4 +224,6 @@ NaClModuleInfo::List::iterator PluginManager::FindNaClModule(const GURL& url) {
   return nacl_module_list_.end();
 }
 
+#endif  // !defined(DISABLE_NACL)
+
 }  // namespace extensions