Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / extension_test_notification_observer.cc
index d81b093..9844642 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "base/callback_list.h"
 #include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
@@ -14,6 +13,7 @@
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_view_host.h"
 #include "content/public/test/test_utils.h"
+#include "extensions/browser/extension_system.h"
 #include "extensions/browser/process_manager.h"
 #include "extensions/common/extension.h"
 
@@ -198,7 +198,7 @@ bool ExtensionTestNotificationObserver::WaitForExtensionInstallError() {
 }
 
 void ExtensionTestNotificationObserver::WaitForExtensionLoad() {
-  WaitForNotification(chrome::NOTIFICATION_EXTENSION_LOADED);
+  WaitForNotification(chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED);
 }
 
 void ExtensionTestNotificationObserver::WaitForExtensionAndViewLoad() {
@@ -253,37 +253,37 @@ void ExtensionTestNotificationObserver::Observe(
     const content::NotificationSource& source,
     const content::NotificationDetails& details) {
   switch (type) {
-  case chrome::NOTIFICATION_EXTENSION_LOADED:
+    case chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED:
       last_loaded_extension_id_ =
         content::Details<const Extension>(details).ptr()->id();
       VLOG(1) << "Got EXTENSION_LOADED notification.";
       break;
 
-  case chrome::NOTIFICATION_CRX_INSTALLER_DONE:
-    VLOG(1) << "Got CRX_INSTALLER_DONE notification.";
-    {
-        const Extension* extension =
-          content::Details<const Extension>(details).ptr();
-        if (extension)
-          last_loaded_extension_id_ = extension->id();
-        else
-          last_loaded_extension_id_.clear();
-    }
-    ++crx_installers_done_observed_;
-    break;
-
-  case chrome::NOTIFICATION_EXTENSION_INSTALLED:
-    VLOG(1) << "Got EXTENSION_INSTALLED notification.";
-    ++extension_installs_observed_;
-    break;
-
-  case chrome::NOTIFICATION_EXTENSION_LOAD_ERROR:
-    VLOG(1) << "Got EXTENSION_LOAD_ERROR notification.";
-    ++extension_load_errors_observed_;
-    break;
-
-  default:
-    NOTREACHED();
-    break;
+    case chrome::NOTIFICATION_CRX_INSTALLER_DONE:
+      VLOG(1) << "Got CRX_INSTALLER_DONE notification.";
+      {
+          const Extension* extension =
+            content::Details<const Extension>(details).ptr();
+          if (extension)
+            last_loaded_extension_id_ = extension->id();
+          else
+            last_loaded_extension_id_.clear();
+      }
+      ++crx_installers_done_observed_;
+      break;
+
+    case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+      VLOG(1) << "Got EXTENSION_INSTALLED notification.";
+      ++extension_installs_observed_;
+      break;
+
+    case chrome::NOTIFICATION_EXTENSION_LOAD_ERROR:
+      VLOG(1) << "Got EXTENSION_LOAD_ERROR notification.";
+      ++extension_load_errors_observed_;
+      break;
+
+    default:
+      NOTREACHED();
+      break;
   }
 }