Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / runtime / runtime_api.cc
index 11631ca..682b62c 100644 (file)
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/extensions/extension_host.h"
 #include "chrome/browser/extensions/extension_service.h"
-#include "chrome/browser/extensions/extension_system.h"
 #include "chrome/browser/extensions/updater/extension_updater.h"
+#include "chrome/browser/omaha_query_params/omaha_query_params.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/browser_navigator.h"
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/common/extensions/api/runtime.h"
-#include "chrome/common/omaha_query_params/omaha_query_params.h"
 #include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/notification_service.h"
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_view_host.h"
 #include "extensions/browser/event_router.h"
 #include "extensions/browser/extension_registry.h"
+#include "extensions/browser/extension_system.h"
 #include "extensions/browser/extensions_browser_client.h"
 #include "extensions/browser/lazy_background_task_queue.h"
 #include "extensions/browser/process_manager.h"
@@ -90,8 +90,7 @@ void DispatchOnStartupEventImpl(BrowserContext* browser_context,
   if (ExtensionsBrowserClient::Get()->IsShuttingDown() ||
       !ExtensionsBrowserClient::Get()->IsValidContext(browser_context))
     return;
-  ExtensionSystem* system =
-      ExtensionSystem::GetForBrowserContext(browser_context);
+  ExtensionSystem* system = ExtensionSystem::Get(browser_context);
   if (!system)
     return;
 
@@ -160,7 +159,7 @@ RuntimeAPI::RuntimeAPI(content::BrowserContext* context)
 
 RuntimeAPI::~RuntimeAPI() {
   if (registered_for_updates_) {
-    ExtensionSystem::GetForBrowserContext(browser_context_)->
+    ExtensionSystem::Get(browser_context_)->
         extension_service()->RemoveUpdateObserver(this);
   }
 }
@@ -203,7 +202,7 @@ void RuntimeAPI::OnExtensionsReady() {
 
   registered_for_updates_ = true;
 
-  ExtensionSystem::GetForBrowserContext(browser_context_)->extension_service()->
+  ExtensionSystem::Get(browser_context_)->extension_service()->
       AddUpdateObserver(this);
 }
 
@@ -228,7 +227,7 @@ void RuntimeAPI::OnExtensionInstalled(const Extension* extension) {
     return;
 
   // Get the previous version to check if this is an upgrade.
-  ExtensionService* service = ExtensionSystem::GetForBrowserContext(
+  ExtensionService* service = ExtensionSystem::Get(
       browser_context_)->extension_service();
   const Extension* old = service->GetExtensionById(extension->id(), true);
   Version old_version;
@@ -283,7 +282,7 @@ void RuntimeEventRouter::DispatchOnInstalledEvent(
     bool chrome_updated) {
   if (!ExtensionsBrowserClient::Get()->IsValidContext(context))
     return;
-  ExtensionSystem* system = ExtensionSystem::GetForBrowserContext(context);
+  ExtensionSystem* system = ExtensionSystem::Get(context);
   if (!system)
     return;
 
@@ -522,7 +521,7 @@ bool RuntimeRestartFunction::RunImpl() {
 bool RuntimeGetPlatformInfoFunction::RunImpl() {
   GetPlatformInfo::Results::PlatformInfo info;
 
-  const char* os = chrome::OmahaQueryParams::getOS();
+  const char* os = chrome::OmahaQueryParams::GetOS();
   if (strcmp(os, "mac") == 0) {
     info.os = GetPlatformInfo::Results::PlatformInfo::OS_MAC_;
   } else if (strcmp(os, "win") == 0) {
@@ -540,7 +539,7 @@ bool RuntimeGetPlatformInfoFunction::RunImpl() {
     return false;
   }
 
-  const char* arch = chrome::OmahaQueryParams::getArch();
+  const char* arch = chrome::OmahaQueryParams::GetArch();
   if (strcmp(arch, "arm") == 0) {
     info.arch = GetPlatformInfo::Results::PlatformInfo::ARCH_ARM;
   } else if (strcmp(arch, "x86") == 0) {
@@ -552,7 +551,7 @@ bool RuntimeGetPlatformInfoFunction::RunImpl() {
     return false;
   }
 
-  const char* nacl_arch = chrome::OmahaQueryParams::getNaclArch();
+  const char* nacl_arch = chrome::OmahaQueryParams::GetNaclArch();
   if (strcmp(nacl_arch, "arm") == 0) {
     info.nacl_arch = GetPlatformInfo::Results::PlatformInfo::NACL_ARCH_ARM;
   } else if (strcmp(nacl_arch, "x86-32") == 0) {