Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / apps / drive / drive_app_provider.cc
index 2bde9fe..dac04b5 100644 (file)
@@ -21,6 +21,7 @@
 #include "extensions/browser/extension_registry.h"
 #include "extensions/browser/extension_registry_factory.h"
 #include "extensions/browser/extension_system.h"
+#include "extensions/browser/uninstall_reason.h"
 #include "extensions/common/extension.h"
 
 using extensions::Extension;
@@ -82,7 +83,10 @@ void DriveAppProvider::UpdateMappingAndExtensionSystem(
   if (existing_app && is_existing_app_generated) {
     extensions::ExtensionSystem::Get(profile_)
         ->extension_service()
-        ->UninstallExtension(existing_chrome_app_id, false, NULL);
+        ->UninstallExtension(existing_chrome_app_id,
+                             extensions::UNINSTALL_REASON_SYNC,
+                             base::Bind(&base::DoNothing),
+                             NULL);
   }
 }
 
@@ -191,7 +195,10 @@ void DriveAppProvider::ProcessRemovedDriveApp(const std::string& drive_app_id) {
 
   extensions::ExtensionSystem::Get(profile_)
       ->extension_service()
-      ->UninstallExtension(chrome_app_id, false, NULL);
+      ->UninstallExtension(chrome_app_id,
+                           extensions::UNINSTALL_REASON_SYNC,
+                           base::Bind(&base::DoNothing),
+                           NULL);
 }
 
 void DriveAppProvider::OnDriveAppRegistryUpdated() {
@@ -218,7 +225,8 @@ void DriveAppProvider::OnDriveAppRegistryUpdated() {
 
 void DriveAppProvider::OnExtensionInstalled(
     content::BrowserContext* browser_context,
-    const Extension* extension) {
+    const Extension* extension,
+    bool is_update) {
   // Bail if the |extension| is installed from a converter. The post install
   // processing will be handled in OnLocalAppConverted.
   if (!pending_converters_.empty() &&
@@ -253,7 +261,8 @@ void DriveAppProvider::OnExtensionInstalled(
 
 void DriveAppProvider::OnExtensionUninstalled(
     content::BrowserContext* browser_context,
-    const Extension* extension) {
+    const Extension* extension,
+    extensions::UninstallReason reason) {
   std::string drive_app_id = mapping_->GetDriveApp(extension->id());
   if (drive_app_id.empty())
     return;