[M130] Tizen path refactoring 65/320065/17
authorSatyaveer Singh <satyaveer.s@samsung.com>
Fri, 21 Feb 2025 10:29:46 +0000 (15:59 +0530)
committerBot Blink <blinkbot@samsung.com>
Mon, 17 Mar 2025 02:59:09 +0000 (02:59 +0000)
This commit refactors paths_efl.cc to provide common path dictionary
for efl/tizen environment.

Change-Id: I4a05a24c322421d8bf3b7f8e2a336d3ff8d23752
Signed-off-by: Satyaveer Singh <satyaveer.s@samsung.com>
41 files changed:
base/base_paths.h
base/base_paths_posix.cc
base/path_service.cc
content/browser/web_contents/web_contents_impl.cc
tizen_src/chromium_impl/base/BUILD.gn
tizen_src/chromium_impl/base/base_efl.gni
tizen_src/chromium_impl/base/base_paths_efl.cc [new file with mode: 0644]
tizen_src/chromium_impl/base/base_paths_efl.h [new file with mode: 0644]
tizen_src/chromium_impl/content/browser/input_picker/input_picker_base.cc
tizen_src/chromium_impl/content/browser/javascript_dialog/javascript_modal_dialog.cc
tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc
tizen_src/chromium_impl/content/browser/select_picker/form_navigable_picker.cc
tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.cc
tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc
tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc
tizen_src/chromium_impl/content/common/BUILD.gn
tizen_src/chromium_impl/content/common/common_efl.gni
tizen_src/chromium_impl/content/common/locale_efl.cc
tizen_src/chromium_impl/content/common/paths_efl.cc [deleted file]
tizen_src/chromium_impl/content/common/paths_efl.h [deleted file]
tizen_src/chromium_impl/efl/init.cc
tizen_src/ewk/efl_integration/authentication_challenge_popup.cc
tizen_src/ewk/efl_integration/browser/autofill_popup_view_efl.cc
tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc
tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc
tizen_src/ewk/efl_integration/browser/password_manager/password_store_factory.cc
tizen_src/ewk/efl_integration/browser/webdata/web_data_service_factory.cc
tizen_src/ewk/efl_integration/browser_context_efl.cc
tizen_src/ewk/efl_integration/content_main_delegate_efl.cc
tizen_src/ewk/efl_integration/context_menu_controller_efl.cc
tizen_src/ewk/efl_integration/download_manager_delegate_efl.cc
tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc
wrt/src/browser/native_web_runtime.cc
wrt/src/browser/tv/decorator_window.cc
wrt/src/browser/tv/native_web_runtime_delegate_tv.cc
wrt/src/browser/tv/popup_tv.cc
wrt/src/browser/wrt_native_window_off_screen.cc
wrt/src/browser/wrt_notification.cc
wrt/src/common/api/wrt_api_web_runtime_common.cc [changed mode: 0755->0644]
wrt/src/common/wrt_content_client.cc [changed mode: 0755->0644]
wrt/src/service/wrt_service.cc

index c327c2e1af977c39ece5ec629d2d5105e50734d3..9e45f5eb4416a73ecf8617cfb24d63b444161f3a 100644 (file)
 #include "base/base_paths_posix.h"
 #endif
 
+#if BUILDFLAG(IS_EFL)
+#include "base/base_paths_efl.h"
+#endif
+
 namespace base {
 
 enum BasePathKey {
index be93d7a2fc6804d22f9972c95847a0f38a9e147a..8dadc5f231a0dd2cf2e8bf2174136cd2969ba08a 100644 (file)
 #include <stdlib.h>
 #endif
 
-#if BUILDFLAG(IS_TIZEN)
-#include <appfw/app.h>
-#include "base/command_line.h"
-#include "base/memory/free_deleter.h"
-#endif
-
 namespace base {
 
 bool PathProviderPosix(int key, FilePath* result) {
@@ -47,13 +41,9 @@ bool PathProviderPosix(int key, FilePath* result) {
     case FILE_MODULE: {  // TODO(evanm): is this correct?
 #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
       FilePath bin_dir;
-#if BUILDFLAG(IS_TIZEN)
-      bin_dir = base::CommandLine::ForCurrentProcess()->GetProgram();
-#else
       if (!ReadSymbolicLink(FilePath(kProcSelfExe), &bin_dir)) {
         NOTREACHED() << "Unable to resolve " << kProcSelfExe << ".";
       }
-#endif
       *result = bin_dir;
       return true;
 #elif BUILDFLAG(IS_FREEBSD)
@@ -101,14 +91,6 @@ bool PathProviderPosix(int key, FilePath* result) {
       std::unique_ptr<Environment> env(Environment::Create());
       FilePath cache_dir(
           nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache"));
-#if BUILDFLAG(IS_TIZEN)
-      char* app_id = nullptr;
-      if (APP_ERROR_NONE == app_get_id(&app_id)) {
-        std::unique_ptr<char, FreeDeleter> cache_path(app_get_cache_path());
-        cache_dir = base::FilePath(cache_path.get());
-        free(app_id);
-      }
-#endif
       *result = cache_dir;
       return true;
     }
index 06dda434ef2376f01ade885e082a049c7e463bdd..d1eb1481ca6d665f37ac8ac00c4a326ba4466536 100644 (file)
@@ -48,6 +48,9 @@ bool PathProviderFuchsia(int key, FilePath* result);
 // PathProviderPosix is the default path provider on POSIX OSes other than
 // Mac and Android.
 bool PathProviderPosix(int key, FilePath* result);
+#if BUILDFLAG(IS_EFL)
+bool PathProviderEfl(int key, FilePath* result);
+#endif
 #endif
 
 namespace {
@@ -142,8 +145,14 @@ Provider base_provider_posix = {EnvOverridePathProvider, &posix_provider,
                                 PATH_START, PATH_END,
 #endif
                                 true};
+#if BUILDFLAG(IS_EFL)
+Provider base_provider_efl = {PathProviderEfl, &base_provider_posix,
+#ifndef NDEBUG
+                              PATH_EFL_START, PATH_EFL_END,
+#endif
+                              true};
+#endif
 #endif
-
 
 struct PathData {
   Lock lock;
@@ -163,6 +172,8 @@ struct PathData {
     providers = &base_provider_android;
 #elif BUILDFLAG(IS_FUCHSIA)
     providers = &base_provider_fuchsia;
+#elif BUILDFLAG(IS_EFL)
+    providers = &base_provider_efl;
 #elif BUILDFLAG(IS_POSIX)
     providers = &base_provider_posix;
 #endif
index 03f69b6a706ecaaafe7b4f08c7b097f2c475f1d4..4f1f2939495572999f266519bcbb33a7db27a970 100644 (file)
 #include "base/base_switches.h"
 #include "base/path_service.h"
 #include "content/browser/web_contents/web_contents_impl_efl.h"
-#include "content/common/paths_efl.h"
 #include "efl/window_factory.h"
 #include "ui/gl/gl_shared_context_efl.h"
 #include "ui/ozone/platform/efl/efl_screen.h"
@@ -11494,7 +11493,7 @@ void WebContentsImpl::CreateEflMainLayout() {
   efl_main_layout_ = elm_layout_add(root_window);
 
   base::FilePath edj_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
 
   base::FilePath main_edj = edj_dir.Append(FILE_PATH_LITERAL("MainLayout.edj"));
   elm_layout_file_set(efl_main_layout_, main_edj.AsUTF8Unsafe().c_str(),
index 0864461835ca5394ee5cf7efb2dd39e5ab047b76..21efc6d3293b4f1d8cc6416592b2d41b3d84e0dd 100644 (file)
@@ -2,6 +2,8 @@
 # use of this source code is governed by a bsd-style license that can be
 # found in the license file.
 
+import("//tizen_src/build/config/tizen_features.gni")
+
 static_library("trace_event_ttrace") {
   configs += [ "//tizen_src/build:libttrace" ]
   sources = [
@@ -9,3 +11,21 @@ static_library("trace_event_ttrace") {
     "//tizen_src/chromium_impl/base/trace_event/ttrace.h",
   ]
 }
+
+config("external_base_efl_config") {
+  if (is_tizen) {
+    defines = [ "LIB_RO_ROOT_DIR=\"$lib_ro_root_dir\"" ]
+    if (tizen_product_tv) {
+      defines += [ "LIB_UPGRADE_ROOT_DIR=\"$lib_upgrade_root_dir\"",
+      ]
+    }
+  } else {
+    outdir = rebase_path("$root_out_dir")
+    defines = [
+      "EDJE_DIR=\"$outdir/resources\"",
+      "IMAGE_DIR=\"$image_dir\"",
+      "LOCALE_DIR=\"$outdir/locale\"",
+    ]
+  }
+  defines += [ "CHROMIUM_IMPL_LIB_FILE=\"$chromium_impl_lib_name\"" ]
+}
index 850ab102d5b5ee3757126ecb767ec43a89d2ea66..414b2c06e834c79f78e77bf1d902608c3060887f 100644 (file)
@@ -14,6 +14,7 @@ if (use_ttrace) {
 external_base_configs = [
   "//tizen_src/build:ecore",
   "//tizen_src/build:libecore",
+  "//tizen_src/chromium_impl/base:external_base_efl_config",
 ]
 
 if (is_tizen) {
@@ -24,6 +25,8 @@ if (is_tizen) {
 }
 
 external_base_sources = [
+  "//tizen_src/chromium_impl/base/base_paths_efl.cc",
+  "//tizen_src/chromium_impl/base/base_paths_efl.h",
   "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.cc",
   "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.h",
   "//tizen_src/chromium_impl/base/message_loop/message_pump_for_ui_efl.cc",
diff --git a/tizen_src/chromium_impl/base/base_paths_efl.cc b/tizen_src/chromium_impl/base/base_paths_efl.cc
new file mode 100644 (file)
index 0000000..80e2788
--- /dev/null
@@ -0,0 +1,350 @@
+// Copyright 2025 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base_paths_efl.h"
+
+#include <cstdlib>
+
+#include "base/base_switches.h"
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/files/file_path.h"
+#include "base/files/file_util.h"
+#include "base/logging.h"
+#include "base/memory/free_deleter.h"
+#include "base/nix/xdg_util.h"
+#include "base/notreached.h"
+#include "base/path_service.h"
+#include "base/process/process_metrics.h"
+#include "build/tizen_version.h"
+
+#if BUILDFLAG(IS_TIZEN)
+#include <appfw/app.h>
+#include <dlfcn.h>
+#include <tzplatform_config.h>
+
+#if !defined(_GNU_SOURCE)
+#define _GNU_SOURCE
+#endif
+#endif
+
+using namespace base;
+
+namespace {
+
+const FilePath::CharType kApplicationName[] = FILE_PATH_LITERAL("chromium-efl");
+const FilePath::CharType kApplicationDataBaseDir[] = FILE_PATH_LITERAL("db");
+
+#if BUILDFLAG(IS_TIZEN_TV)
+const FilePath::CharType kCertListFile[] =
+    FILE_PATH_LITERAL("clientcert/ClientCertList");
+#endif
+
+#if !BUILDFLAG(IS_TIZEN)
+const FilePath::CharType kEdjePath[] = FILE_PATH_LITERAL(EDJE_DIR);
+const FilePath::CharType kLocalePath[] = FILE_PATH_LITERAL(LOCALE_DIR);
+const FilePath::CharType kImagePath[] = FILE_PATH_LITERAL(IMAGE_DIR);
+#else
+const FilePath::CharType kRootPath[] = FILE_PATH_LITERAL(LIB_RO_ROOT_DIR);
+const FilePath::CharType kBinDir[] = FILE_PATH_LITERAL("/usr/bin");
+const FilePath::CharType kApplicationDataDir[] = FILE_PATH_LITERAL("data");
+const FilePath::CharType kApplicationCacheDir[] = FILE_PATH_LITERAL("cache");
+const FilePath::CharType kExeDir[] = FILE_PATH_LITERAL("bin");
+const FilePath::CharType kDataDir[] = FILE_PATH_LITERAL("res");
+const FilePath::CharType kLocaleDir[] = FILE_PATH_LITERAL("locale");
+const FilePath::CharType kEdjeDir[] = FILE_PATH_LITERAL("themes");
+const FilePath::CharType kImageDir[] = FILE_PATH_LITERAL("images");
+const FilePath::CharType kChromiumLibPath[] =
+    FILE_PATH_LITERAL("lib/" CHROMIUM_IMPL_LIB_FILE);
+const FilePath::CharType kNotificationIconDir[] = FILE_PATH_LITERAL("noti");
+
+bool GetDirAppDataTizen(FilePath& result) {
+  char* buffer;
+
+  if (!(buffer = app_get_data_path())) {
+    return false;
+  }
+
+  result = FilePath(buffer);
+  free(buffer);
+  return true;
+}
+
+bool GetDirSharedDataTizen(FilePath& result) {
+  char* buffer = app_get_shared_data_path();
+
+  if (!buffer) {
+    LOG(ERROR) << "Failed to get shared/data path. "
+               << get_error_message(get_last_result());
+    return false;
+  }
+
+  result = FilePath(buffer);
+  free(buffer);
+  return true;
+}
+
+bool GetDirChromiumPrivateTizen(FilePath& result) {
+  std::unique_ptr<char, FreeDeleter> data_path(app_get_data_path());
+  if (data_path) {
+    result = FilePath(data_path.get());
+  } else if (!GetDirAppDataTizen(result)) {
+    return false;
+  }
+  result = result.Append(kApplicationName);
+  return true;
+}
+
+FilePath GetDirUserDataTizen() {
+  FilePath path;
+  if (GetDirChromiumPrivateTizen(path)) {
+    path = path.Append(kApplicationDataDir);
+  }
+  return path;
+}
+
+FilePath GetDirCacheTizen() {
+  FilePath path;
+  if (GetDirChromiumPrivateTizen(path)) {
+    path = path.Append(kApplicationCacheDir);
+  }
+  return path;
+}
+#endif
+
+FilePath GetDirDownloads() {
+#if !BUILDFLAG(IS_TIZEN)
+  return FilePath(FILE_PATH_LITERAL("/tmp/"));
+#else
+  return FilePath(FILE_PATH_LITERAL(tzplatform_getenv(TZ_USER_DOWNLOADS)));
+#endif
+}
+
+FilePath GetDirImages() {
+#if !BUILDFLAG(IS_TIZEN)
+  return FilePath(FILE_PATH_LITERAL("/tmp/"));
+#else
+  return FilePath(FILE_PATH_LITERAL(tzplatform_getenv(TZ_USER_IMAGES)));
+#endif
+}
+
+void GetDirUserData(FilePath& result) {
+#if BUILDFLAG(IS_TIZEN)
+  result = GetDirUserDataTizen();
+  if (result.empty()) {
+    std::unique_ptr<Environment> env(Environment::Create());
+    FilePath config_dir(nix::GetXDGDirectory(
+        env.get(), nix::kXdgConfigHomeEnvVar, nix::kDotConfigDir));
+    char* app_id = NULL;
+    if (APP_ERROR_NONE == app_get_id(&app_id)) {
+      std::unique_ptr<char, FreeDeleter> app_name(app_id);
+      result = config_dir.Append(app_name.get());
+    } else {
+      result = config_dir.Append(kApplicationName);
+    }
+  }
+#else
+  std::unique_ptr<Environment> env(Environment::Create());
+  FilePath config_dir(nix::GetXDGDirectory(env.get(), nix::kXdgConfigHomeEnvVar,
+                                           nix::kDotConfigDir));
+  result = config_dir.Append(kApplicationName);
+#endif
+}
+
+void GetDirCache(FilePath& result) {
+#if BUILDFLAG(IS_TIZEN)
+  result = GetDirCacheTizen();
+  if (result.empty()) {
+    std::unique_ptr<Environment> env(Environment::Create());
+    FilePath cache_dir(
+        nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache"));
+    char* app_id = NULL;
+    if (APP_ERROR_NONE == app_get_id(&app_id)) {
+      std::unique_ptr<char, FreeDeleter> app_name(app_id);
+      result = cache_dir.Append(app_name.get());
+    } else {
+      result = cache_dir.Append(kApplicationName);
+    }
+  }
+#else
+  std::unique_ptr<Environment> env(Environment::Create());
+  FilePath cache_dir(
+      nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache"));
+  result = cache_dir.Append(kApplicationName);
+#endif
+}
+}  // namespace
+
+namespace base {
+
+#if BUILDFLAG(IS_TIZEN)
+FilePath GetLibRootPath(void) {
+  Dl_info dl_info;
+  if (!dladdr((void*)GetLibRootPath, &dl_info)) {
+    LOG(ERROR) << "dladdr failed";
+    return FilePath();
+  }
+  FilePath lib_root_path(dl_info.dli_fname);
+  lib_root_path = MakeAbsoluteFilePath(lib_root_path);
+
+  if (PathExists(lib_root_path)) {
+    // Remove "lib/chromium-ewk.so" in full path
+    lib_root_path = lib_root_path.DirName().DirName();
+  } else {
+    LOG(WARNING) << "Failed to get libchromium-ewk path : "
+                 << lib_root_path.value();
+    lib_root_path = FilePath(kRootPath);
+  }
+
+  LOG(INFO) << "Library Path : " << lib_root_path.value();
+  return lib_root_path;
+}
+#endif
+
+bool PathProviderEfl(int key, FilePath* result) {
+  DCHECK(result);
+  FilePath cur;
+  bool read_only = false;
+  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+  bool isChrome = command_line->HasSwitch(switches::kEnableChrome);
+  switch (key) {
+#if BUILDFLAG(IS_TIZEN)
+    case DIR_LIB_ROOT:
+      *result = GetLibRootPath();
+      return true;
+    case DIR_EXE:
+    case DIR_MODULE:
+      if (isChrome) {
+        cur = command_line->GetProgram();
+        cur = cur.DirName();
+      } else {
+        if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+          return false;
+        }
+        cur = cur.Append(kExeDir);
+      }
+      read_only = true;
+      break;
+    case DIR_BIN:
+      cur = cur.Append(kBinDir);
+      read_only = true;
+      break;
+#endif
+    case DIR_LOCALE:
+#if BUILDFLAG(IS_TIZEN)
+      if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kDataDir).Append(kLocaleDir);
+      read_only = true;
+      break;
+#else
+      *result = FilePath(kLocalePath);
+      return true;
+#endif
+    case EDJE_RESOURCE_DIR:
+#if BUILDFLAG(IS_TIZEN)
+      if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kDataDir).Append(kEdjeDir);
+      read_only = true;
+      break;
+#else
+      *result = FilePath(kEdjePath);
+      return true;
+#endif
+    case DIR_DOWNLOADS:
+      *result = GetDirDownloads();
+      return true;
+    case DIR_DOWNLOAD_IMAGE:
+      *result = GetDirImages();
+      return true;
+    case DIR_USER_DATA:
+      GetDirUserData(cur);
+      break;
+    case DIR_CACHE:
+      if (isChrome) {
+#if BUILDFLAG(IS_TIZEN)
+        char* app_id = nullptr;
+        if (APP_ERROR_NONE != app_get_id(&app_id)) {
+          return false;
+        }
+        std::unique_ptr<char, FreeDeleter> cache_path(app_get_cache_path());
+        *result = base::FilePath(cache_path.get());
+        free(app_id);
+        return true;
+#endif
+      } else {
+        GetDirCache(cur);
+        break;
+      }
+    case WEB_DATABASE_DIR:
+      if (!PathService::Get(DIR_USER_DATA, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kApplicationDataBaseDir);
+      break;
+    case IMAGE_RESOURCE_DIR:
+#if BUILDFLAG(IS_TIZEN)
+      if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kDataDir).Append(kImageDir);
+      read_only = true;
+      break;
+#else
+      *result = FilePath(kImagePath);
+      return true;
+#endif
+#if BUILDFLAG(IS_TIZEN)
+    case DIR_SHARED:
+      if (!GetDirSharedDataTizen(cur)) {
+        return false;
+      }
+      break;
+    case DIR_SHARED_NOTI_ICON:
+      if (!PathService::Get(DIR_SHARED, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kNotificationIconDir);
+      break;
+    case FILE_CHROMIUM_LIB:
+      if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kChromiumLibPath);
+      read_only = true;
+      break;
+#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+    case FILE_CERT_LIST:
+      if (!PathService::Get(DIR_LIB_ROOT, &cur)) {
+        return false;
+      }
+      cur = cur.Append(kDataDir).Append(kCertListFile);
+      read_only = true;
+      break;
+#endif
+    case FILE_EXE:
+    case FILE_MODULE: {  // TODO(evanm): is this correct?
+#if BUILDFLAG(IS_TIZEN)
+      *result = base::CommandLine::ForCurrentProcess()->GetProgram();
+      return true;
+#endif
+    }
+    default:
+      return false;
+  }
+
+  if (!PathExists(cur) && (read_only || !CreateDirectory(cur))) {
+    LOG(ERROR) << cur.value() << " does not exists!";
+    return false;
+  }
+
+  *result = cur;
+  return true;
+}
+
+}  // namespace base
diff --git a/tizen_src/chromium_impl/base/base_paths_efl.h b/tizen_src/chromium_impl/base/base_paths_efl.h
new file mode 100644 (file)
index 0000000..7ff3eb0
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright 2025 Samsung Electronics. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_PATHS_EFL_H_
+#define BASE_PATHS_EFL_H_
+
+#include "base/base_paths.h"
+
+namespace base {
+
+enum {
+  PATH_EFL_START = 2000,
+  EDJE_RESOURCE_DIR,
+  IMAGE_RESOURCE_DIR,
+  WEB_DATABASE_DIR,
+  DIR_USER_DATA,
+  DIR_DATA_PATH,
+  DIR_DOWNLOADS,
+  DIR_DOWNLOAD_IMAGE,
+  DIR_LIB_ROOT,
+  DIR_LOCALE,
+  DIR_SHARED,
+  DIR_SHARED_NOTI_ICON,
+  DIR_BIN,
+#if BUILDFLAG(IS_TIZEN)
+  FILE_CHROMIUM_LIB,
+#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+  FILE_CERT_LIST,
+#endif
+  PATH_EFL_END
+};
+
+}  // namespace base
+
+#endif  // BASE_PATHS_EFL_H_
index 46eef64177022d141376f3ef815dfe7bd38c7bc9..2d5f225bb0841f438626ae18f10536f99fc2ed43 100644 (file)
@@ -13,7 +13,6 @@
 #include "base/logging.h"
 #include "base/path_service.h"
 #include "content/browser/date_time_chooser_efl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/web_contents.h"
 #include "tizen/system_info.h"
 
@@ -359,7 +358,7 @@ bool InputPickerBase::Layout::AddBaseLayout(const char* title,
   elm_object_content_set(popup_, layout_);
   base::FilePath edj_dir;
   base::FilePath control_path;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   control_path = edj_dir.Append(FILE_PATH_LITERAL("control.edj"));
   elm_layout_file_set(layout_, control_path.AsUTF8Unsafe().c_str(),
                       layout_group);
index e4eef40c4dfea1d4419a4aa5cd6b57b632697172..6e7558390addbf47faa76da4eb382270750f26b0 100644 (file)
@@ -11,7 +11,6 @@
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/web_contents.h"
 #include "tizen_src/chromium_impl/tizen/system_info.h"
 #include "ui/display/device_display_info_efl.h"
@@ -377,7 +376,7 @@ std::string JavaScriptModalDialog::GetPopupMessage(const std::string& str) {
 
 std::string JavaScriptModalDialog::GetEdjPath() {
   base::FilePath edj_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   return edj_dir.Append(FILE_PATH_LITERAL("JavaScriptPopup.edj"))
       .AsUTF8Unsafe();
 }
@@ -476,7 +475,7 @@ Evas_Object* JavaScriptModalDialog::AddButtonIcon(Evas_Object* btn,
     return nullptr;
 
   base::FilePath img_dir;
-  base::PathService::Get(PathsEfl::IMAGE_RESOURCE_DIR, &img_dir);
+  base::PathService::Get(base::IMAGE_RESOURCE_DIR, &img_dir);
   std::string file_path = img_dir.Append(FILE_PATH_LITERAL(img)).AsUTF8Unsafe();
   if (!elm_image_file_set(icon, file_path.c_str(), nullptr))
     return nullptr;
index 75cb3d2bf6360adb00c87cbcb58236fff0b92bce..ee2991a15909e5087de234cacf2db105a7dd23bb 100644 (file)
@@ -32,7 +32,6 @@
 #include "base/files/file_path.h"
 #include "base/logging.h"
 #include "base/path_service.h"
-#include "content/common/paths_efl.h"
 
 namespace content {
 
@@ -72,7 +71,7 @@ EdgeEffect::EdgeEffect(Evas_Object* parent) : parent_view_(parent) {
 
   base::FilePath edj_dir;
   base::FilePath edge_edj;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   edge_edj = edj_dir.Append(FILE_PATH_LITERAL("Edge.edj"));
   CHECK(edje_object_file_set(edge_object_,
       edge_edj.AsUTF8Unsafe().c_str(), "edge_effect"));
index 49463c5139abcba07692c6846f8b5fefa2af2906..f1242a23728ecb363f10f8e0be77239099d702dc 100644 (file)
@@ -7,7 +7,6 @@
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
-#include "content/common/paths_efl.h"
 #include "tizen_src/ewk/efl_integration/common/web_contents_utils.h"
 
 #if BUILDFLAG(IS_TIZEN)
@@ -107,7 +106,7 @@ void FormNavigablePicker::UpdateNavigationButtons() {
 void FormNavigablePicker::RegisterCallbacks(const char* edj, bool overlay) {
   base::FilePath edj_dir;
   base::FilePath control_edj;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   control_edj = edj_dir.Append(FILE_PATH_LITERAL(edj));
   if (!elm_layout_file_set(layout_, control_edj.AsUTF8Unsafe().c_str(),
                            "elm/picker")) {
index df680881de13270c111c2292b9f4d0a79b9c81ea..d377e55fc69d97358fe38ca81eb18567a7190569 100644 (file)
@@ -15,7 +15,6 @@
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/selection/selection_controller_efl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/paths_efl.h"
 
 namespace content {
 
@@ -52,7 +51,7 @@ SelectionHandleEfl::SelectionHandleEfl(SelectionControllerEfl& controller,
   handle_ = edje_object_add(evas);
 
   base::FilePath edj_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   base::FilePath selection_handles_edj =
       edj_dir.Append(FILE_PATH_LITERAL("SelectionHandles.edj"));
 
index 09ee4dcd835bd858698302020c231495d09b2d53..7969a48328f7c297b60538447222cfb30379c0fd 100644 (file)
@@ -14,7 +14,6 @@
 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/selection/selection_controller_efl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_thread.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 
@@ -32,7 +31,7 @@ SelectionMagnifierEfl::SelectionMagnifierEfl(
 
   base::FilePath edj_dir;
   base::FilePath magnifier_edj;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   magnifier_edj = edj_dir.Append(FILE_PATH_LITERAL("Magnifier.edj"));
 
   container_ =
index ed3bde1b7e2967230ffc51d74436bc7deee69431..cf06d60419cabacb5d7b1a9cfa0fd898b9ec0115 100644 (file)
@@ -10,7 +10,6 @@
 #include "content/browser/download/drag_download_util.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/common/drop_data.h"
 #include "third_party/skia/include/core/SkPixelRef.h"
 #include "ui/base/dragdrop/drag_drop_types.h"
@@ -187,7 +186,7 @@ Evas_Object* WebDragSourceEfl::DragIconCreate(Evas_Object* win,
     w = kDefaultDragIconWidth;
     h = kDefaultDragIconHeight;
     base::FilePath path;
-    base::PathService::Get(PathsEfl::IMAGE_RESOURCE_DIR, &path);
+    base::PathService::Get(base::IMAGE_RESOURCE_DIR, &path);
     path = path.Append(FILE_PATH_LITERAL(kDefaultDragIcon));
     evas_object_image_file_set(icon, path.AsUTF8Unsafe().c_str(), nullptr);
   }
index 93bce0ddf29f6ee28712b22521008ff429a66d4b..28474cac2856f9b0c9bc1f4b4b44f24f80f51520 100644 (file)
@@ -9,21 +9,4 @@ config("content_common_efl") {
     "//content/*",
     "//tizen_src/chromium_impl/content/common/common_efl.gni",
   ]
-
-  if (is_tizen) {
-    defines = [ "LIB_RO_ROOT_DIR=\"$lib_ro_root_dir\"" ]
-    if (tizen_product_tv) {
-      defines += [
-        "LIB_UPGRADE_ROOT_DIR=\"$lib_upgrade_root_dir\"",
-      ]
-    }
-  } else {
-    outdir = rebase_path("$root_out_dir")
-    defines = [
-      "EDJE_DIR=\"$outdir/resources\"",
-      "IMAGE_DIR=\"$image_dir\"",
-      "LOCALE_DIR=\"$outdir/locale\"",
-    ]
-  }
-  defines += [ "CHROMIUM_IMPL_LIB_FILE=\"$chromium_impl_lib_name\"" ]
 }
index 71e2ded1320794c101a47093391cb4ed000a2785..07da58a95c6d928fa38a7dd6175957de33e7c6d8 100644 (file)
@@ -59,8 +59,6 @@ external_content_common_efl_sources = [
   "//tizen_src/chromium_impl/content/common/locale_efl.h",
   "//tizen_src/chromium_impl/content/common/message_generator_efl.cc",
   "//tizen_src/chromium_impl/content/common/message_generator_efl.h",
-  "//tizen_src/chromium_impl/content/common/paths_efl.cc",
-  "//tizen_src/chromium_impl/content/common/paths_efl.h",
   "//tizen_src/chromium_impl/content/common/render_messages_efl.h",
   "//tizen_src/chromium_impl/content/common/wrt/wrt_url_parse.h",
 ]
index 7cac7ef94a6e825eeb980334b8e2cfb1f9d17e14..66349c4503f610387a7a2b2eb7cec86c62fc65d6 100644 (file)
@@ -12,7 +12,6 @@
 #include "base/files/file_path.h"
 #include "base/logging.h"
 #include "base/path_service.h"
-#include "content/common/paths_efl.h"
 #include "content/public/common/content_switches.h"
 #include "ui/base/resource/resource_bundle.h"
 
@@ -106,7 +105,7 @@ void PlatformLanguageChanged(keynode_t* keynode, void* data) {
 
 void Initialize() {
   base::FilePath locale_dir;
-  base::PathService::Get(PathsEfl::DIR_LOCALE, &locale_dir);
+  base::PathService::Get(base::DIR_LOCALE, &locale_dir);
   bindtextdomain("WebKit", locale_dir.value().c_str());
 
   PlatformLanguageChanged(0, 0);
diff --git a/tizen_src/chromium_impl/content/common/paths_efl.cc b/tizen_src/chromium_impl/content/common/paths_efl.cc
deleted file mode 100644 (file)
index cb9e93c..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-// Copyright 2014 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "paths_efl.h"
-
-#include <cstdlib>
-
-#include "base/command_line.h"
-#include "base/environment.h"
-#include "base/files/file_path.h"
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "base/memory/free_deleter.h"
-#include "base/nix/xdg_util.h"
-#include "base/path_service.h"
-#include "build/tizen_version.h"
-
-#if BUILDFLAG(IS_TIZEN)
-#include <appfw/app.h>
-#include <dlfcn.h>
-#include <tzplatform_config.h>
-
-#if !defined(_GNU_SOURCE)
-#define _GNU_SOURCE
-#endif
-#endif
-
-using namespace base;
-
-namespace {
-
-const FilePath::CharType kApplicationName[] = FILE_PATH_LITERAL("chromium-efl");
-const FilePath::CharType kApplicationDataBaseDir[] = FILE_PATH_LITERAL("db");
-
-#if BUILDFLAG(IS_TIZEN_TV)
-const FilePath::CharType kCertListFile[] =
-    FILE_PATH_LITERAL("clientcert/ClientCertList");
-#endif
-
-#if !BUILDFLAG(IS_TIZEN)
-const FilePath::CharType kEdjePath[] = FILE_PATH_LITERAL(EDJE_DIR);
-const FilePath::CharType kLocalePath[] = FILE_PATH_LITERAL(LOCALE_DIR);
-const FilePath::CharType kImagePath[] = FILE_PATH_LITERAL(IMAGE_DIR);
-#else
-const FilePath::CharType kRootPath[] = FILE_PATH_LITERAL(LIB_RO_ROOT_DIR);
-const FilePath::CharType kBinDir[] = FILE_PATH_LITERAL("/usr/bin");
-const FilePath::CharType kApplicationDataDir[] = FILE_PATH_LITERAL("data");
-const FilePath::CharType kApplicationCacheDir[] = FILE_PATH_LITERAL("cache");
-const FilePath::CharType kExeDir[] = FILE_PATH_LITERAL("bin");
-const FilePath::CharType kDataDir[] = FILE_PATH_LITERAL("res");
-const FilePath::CharType kLocaleDir[] = FILE_PATH_LITERAL("locale");
-const FilePath::CharType kEdjeDir[] = FILE_PATH_LITERAL("themes");
-const FilePath::CharType kImageDir[] = FILE_PATH_LITERAL("images");
-const FilePath::CharType kChromiumLibPath[] =
-    FILE_PATH_LITERAL("lib/" CHROMIUM_IMPL_LIB_FILE);
-const FilePath::CharType kNotificationIconDir[] = FILE_PATH_LITERAL("noti");
-
-bool GetDirAppDataTizen(FilePath& result) {
-  char* buffer;
-
-  if (!(buffer = app_get_data_path()))
-    return false;
-
-  result = FilePath(buffer);
-  free(buffer);
-  return true;
-}
-
-bool GetDirSharedDataTizen(FilePath& result) {
-  char* buffer = app_get_shared_data_path();
-
-  if (!buffer) {
-    LOG(ERROR) << "Failed to get shared/data path. "
-               << get_error_message(get_last_result());
-    return false;
-  }
-
-  result = FilePath(buffer);
-  free(buffer);
-  return true;
-}
-
-bool GetDirChromiumPrivateTizen(FilePath& result) {
-  std::unique_ptr<char, FreeDeleter> data_path(app_get_data_path());
-  if (data_path) {
-    result = FilePath(data_path.get());
-  } else if (!GetDirAppDataTizen(result)) {
-    return false;
-  }
-  result = result.Append(kApplicationName);
-  return true;
-}
-
-FilePath GetDirUserDataTizen() {
-  FilePath path;
-  if (GetDirChromiumPrivateTizen(path))
-    path = path.Append(kApplicationDataDir);
-  return path;
-}
-
-FilePath GetDirCacheTizen() {
-  FilePath path;
-  if (GetDirChromiumPrivateTizen(path))
-    path = path.Append(kApplicationCacheDir);
-  return path;
-}
-#endif
-
-FilePath GetDirDownloads() {
-#if !BUILDFLAG(IS_TIZEN)
-  return FilePath(FILE_PATH_LITERAL("/tmp/"));
-#else
-  return FilePath(FILE_PATH_LITERAL(tzplatform_getenv(TZ_USER_DOWNLOADS)));
-#endif
-}
-
-FilePath GetDirImages() {
-#if !BUILDFLAG(IS_TIZEN)
-  return FilePath(FILE_PATH_LITERAL("/tmp/"));
-#else
-  return FilePath(FILE_PATH_LITERAL(tzplatform_getenv(TZ_USER_IMAGES)));
-#endif
-}
-
-void GetDirUserData(FilePath& result) {
-#if BUILDFLAG(IS_TIZEN)
-  result = GetDirUserDataTizen();
-  if (result.empty()) {
-    std::unique_ptr<Environment> env(Environment::Create());
-    FilePath config_dir(nix::GetXDGDirectory(
-        env.get(), nix::kXdgConfigHomeEnvVar, nix::kDotConfigDir));
-    char* app_id = NULL;
-    if (APP_ERROR_NONE == app_get_id(&app_id)) {
-      std::unique_ptr<char, FreeDeleter> app_name(app_id);
-      result = config_dir.Append(app_name.get());
-    } else {
-      result = config_dir.Append(kApplicationName);
-    }
-  }
-#else
-  std::unique_ptr<Environment> env(Environment::Create());
-  FilePath config_dir(nix::GetXDGDirectory(env.get(), nix::kXdgConfigHomeEnvVar,
-                                           nix::kDotConfigDir));
-  result = config_dir.Append(kApplicationName);
-#endif
-}
-
-void GetDirCache(FilePath& result) {
-#if BUILDFLAG(IS_TIZEN)
-  result = GetDirCacheTizen();
-  if (result.empty()) {
-    std::unique_ptr<Environment> env(Environment::Create());
-    FilePath cache_dir(
-        nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache"));
-    char* app_id = NULL;
-    if (APP_ERROR_NONE == app_get_id(&app_id)) {
-      std::unique_ptr<char, FreeDeleter> app_name(app_id);
-      result = cache_dir.Append(app_name.get());
-    } else {
-      result = cache_dir.Append(kApplicationName);
-    }
-  }
-#else
-  std::unique_ptr<Environment> env(Environment::Create());
-  FilePath cache_dir(
-      nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache"));
-  result = cache_dir.Append(kApplicationName);
-#endif
-}
-} // namespace
-
-namespace PathsEfl {
-
-#if BUILDFLAG(IS_TIZEN)
-FilePath GetLibRootPath(void) {
-  Dl_info dl_info;
-  if (!dladdr((void*)GetLibRootPath, &dl_info)) {
-    LOG(ERROR) << "dladdr failed";
-    return FilePath();
-  }
-  FilePath lib_root_path(dl_info.dli_fname);
-  lib_root_path = MakeAbsoluteFilePath(lib_root_path);
-
-  if (PathExists(lib_root_path)) {
-    // Remove "lib/chromium-ewk.so" in full path
-    lib_root_path = lib_root_path.DirName().DirName();
-  } else {
-    LOG(WARNING) << "Failed to get libchromium-ewk path : "
-                 << lib_root_path.value();
-    lib_root_path = FilePath(kRootPath);
-  }
-
-  LOG(INFO) << "Library Path : " << lib_root_path.value();
-  return lib_root_path;
-}
-#endif
-
-bool PathProvider(int key, FilePath* result) {
-  DCHECK(result);
-  FilePath cur;
-  bool read_only = false;
-  switch (key) {
-#if BUILDFLAG(IS_TIZEN)
-    case DIR_LIB_ROOT:
-      *result = GetLibRootPath();
-      return true;
-    case DIR_EXE:
-    case DIR_MODULE:
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kExeDir);
-      read_only = true;
-      break;
-    case DIR_BIN:
-      cur = cur.Append(kBinDir);
-      read_only = true;
-      break;
-#endif
-    case DIR_LOCALE:
-#if BUILDFLAG(IS_TIZEN)
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kDataDir).Append(kLocaleDir);
-      read_only = true;
-      break;
-#else
-      *result = FilePath(kLocalePath);
-      return true;
-#endif
-    case EDJE_RESOURCE_DIR:
-#if BUILDFLAG(IS_TIZEN)
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kDataDir).Append(kEdjeDir);
-      read_only = true;
-      break;
-#else
-      *result = FilePath(kEdjePath);
-      return true;
-#endif
-    case DIR_DOWNLOADS:
-      *result = GetDirDownloads();
-      return true;
-    case DIR_DOWNLOAD_IMAGE:
-      *result = GetDirImages();
-      return true;
-    case DIR_USER_DATA:
-      GetDirUserData(cur);
-      break;
-    case DIR_CACHE:
-      GetDirCache(cur);
-      break;
-    case WEB_DATABASE_DIR:
-      if (!PathService::Get(DIR_USER_DATA, &cur))
-        return false;
-      cur = cur.Append(kApplicationDataBaseDir);
-      break;
-    case IMAGE_RESOURCE_DIR:
-#if BUILDFLAG(IS_TIZEN)
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kDataDir).Append(kImageDir);
-      read_only = true;
-      break;
-#else
-      *result = FilePath(kImagePath);
-      return true;
-#endif
-#if BUILDFLAG(IS_TIZEN)
-    case DIR_SHARED:
-      if (!GetDirSharedDataTizen(cur))
-        return false;
-      break;
-    case DIR_SHARED_NOTI_ICON:
-      if (!PathService::Get(DIR_SHARED, &cur))
-        return false;
-      cur = cur.Append(kNotificationIconDir);
-      break;
-    case FILE_CHROMIUM_LIB:
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kChromiumLibPath);
-      read_only = true;
-      break;
-#endif
-#if BUILDFLAG(IS_TIZEN_TV)
-    case FILE_CERT_LIST:
-      if (!PathService::Get(DIR_LIB_ROOT, &cur))
-        return false;
-      cur = cur.Append(kDataDir).Append(kCertListFile);
-      read_only = true;
-      break;
-#endif
-    default:
-      return false;
-  }
-
-  if (!PathExists(cur) && (read_only || !CreateDirectory(cur))) {
-    LOG(ERROR) << cur.value() << " does not exists!";
-    return false;
-  }
-
-  *result = cur;
-  return true;
-}
-
-void Register() {
-  PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
-}
-} // namespace PathsEfl
diff --git a/tizen_src/chromium_impl/content/common/paths_efl.h b/tizen_src/chromium_impl/content/common/paths_efl.h
deleted file mode 100644 (file)
index e2128a3..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2014 Samsung Electronics. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef _PATHS_EFL_H_
-#define _PATHS_EFL_H_
-
-#include "base/base_paths.h"
-#include "content/common/content_export.h"
-
-namespace PathsEfl {
-enum {
-  PATH_START = 2000,
-  EDJE_RESOURCE_DIR,
-  IMAGE_RESOURCE_DIR,
-  WEB_DATABASE_DIR,
-  DIR_USER_DATA,
-  DIR_DATA_PATH,
-  DIR_DOWNLOADS,
-  DIR_DOWNLOAD_IMAGE,
-  DIR_LIB_ROOT,
-  DIR_LOCALE,
-  DIR_SHARED,
-  DIR_SHARED_NOTI_ICON,
-  DIR_BIN,
-#if BUILDFLAG(IS_TIZEN)
-  FILE_CHROMIUM_LIB,
-#endif
-#if BUILDFLAG(IS_TIZEN_TV)
-  FILE_CERT_LIST,
-#endif
-  PATH_END
-};
-
-// Call once per each process type to register the provider for the
-// path keys defined above
-CONTENT_EXPORT void Register();
-}
-
-#endif // _PATHS_EFL_H_
index 2ce18b5a54522af9d7247b1ad11f72f9e249e5f9..be50fe06734c23829f2829cb1e741ca16f93e5a5 100644 (file)
@@ -10,7 +10,6 @@
 #include "base/logging.h"
 #include "base/message_loop/message_pump_ecore.h"
 #include "chromium_impl/build/tizen_version.h"
-#include "content/common/paths_efl.h"
 #include "content/public/common/content_switches.h"
 #include "efl/ecore_x_wayland_wrapper.h"
 #include "tizen/system_info.h"
@@ -78,8 +77,6 @@ int Initialize(int argc, const char* argv[]) {
   ui::OzonePlatform::InitializeForUI(params);
 #endif
 
-  PathsEfl::Register();
-
   return 0;
 }
 
index b30f60b61e9aca74e8f0872c226eae3cab18478b..d2bf5ee9536ebf73eb932e3ee58553267d3e3b1f 100644 (file)
@@ -11,7 +11,6 @@
 #include "base/files/file_path.h"
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
-#include "content/common/paths_efl.h"
 #include "ewk/efl_integration/eweb_view.h"
 #include "public/ewk_view.h"
 
@@ -156,7 +155,7 @@ Evas_Object* AuthenticationChallengePopup::CreateContainerBox() {
   if (!CreateTextLabel(dgettext("WebKit", "IDS_WEBVIEW_BODY_USERNAME"), box))
     return nullptr;
   base::FilePath edj_dir, authentication_edj;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   authentication_edj =
       edj_dir.Append(FILE_PATH_LITERAL("AuthenticationPopup.edj"));
 
index de11f18da2860863ef5356c0505433df0972af9f..4e22792177eed7bf677d2395d39dac13794698fb 100644 (file)
@@ -13,7 +13,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/paths_efl.h"
 #include "eweb_view.h"
 #include "tizen/system_info.h"
 #include "ui/display/screen.h"
@@ -61,7 +60,7 @@ AutofillPopupViewEfl::AutofillPopupViewEfl(EWebView* view)
   elm_object_part_content_set(smart_parent, "autofill_popup", autofill_popup_);
   base::FilePath edj_dir;
   base::FilePath autofill_edj;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edj_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edj_dir);
   autofill_edj = edj_dir.Append(FILE_PATH_LITERAL("AutofillPopup.edj"));
   elm_layout_file_set(autofill_popup_,
       autofill_edj.AsUTF8Unsafe().c_str(),
index 3c7faf1f8353401bed489aff15bd00c0f7e4f18c..811b5697f46e8012f2293e2c562738727a1e037b 100644 (file)
@@ -10,7 +10,6 @@
 #include "base/path_service.h"
 #include "base/task/bind_post_task.h"
 #include "base/task/thread_pool.h"
-#include "content/common/paths_efl.h"
 #include "favicon_commands.h"
 
 const char * const FaviconDatabasePrivate::pageUrlToFaviconUrlTable = "url_to_favicon_url";
@@ -29,7 +28,7 @@ FaviconDatabasePrivate::FaviconDatabasePrivate()
       sqlite(0),
       weakPtrFactory(this) {
   base::FilePath db_path;
-  if (base::PathService::Get(PathsEfl::WEB_DATABASE_DIR, &db_path))
+  if (base::PathService::Get(base::WEB_DATABASE_DIR, &db_path))
     path = db_path.Append(FILE_PATH_LITERAL(defaultFilename));
   else
     LOG(ERROR) << "[favicon] Could not get web database directory";
index 23f9335c820c42536878e4a846736afd88471dfe..5a7d5831474552bdd38e897ef4eaf5f5138a20fc 100644 (file)
@@ -15,7 +15,6 @@
 #include "base/strings/utf_string_conversions.h"
 #include "browser_context_efl.h"
 #include "common/web_contents_utils.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/persistent_notification_status.h"
 #include "eweb_view.h"
@@ -72,7 +71,7 @@ bool SetNotificationImage(notification_h noti,
 
 void RemoveImageFiles(const std::string& tag) {
   base::FilePath image_path;
-  if (!base::PathService::Get(PathsEfl::DIR_SHARED_NOTI_ICON, &image_path)) {
+  if (!base::PathService::Get(base::DIR_SHARED_NOTI_ICON, &image_path)) {
     LOG(ERROR) << "Failed to retrieve the notification resource path";
     return;
   }
@@ -157,7 +156,7 @@ bool PermissionHandler::InitializePermissionDatabase(bool clear) {
     return true;
 
   base::FilePath db_path;
-  if (!base::PathService::Get(PathsEfl::WEB_DATABASE_DIR, &db_path)) {
+  if (!base::PathService::Get(base::WEB_DATABASE_DIR, &db_path)) {
     LOG(ERROR) << "Could not get web database directory.";
     return false;
   }
@@ -339,7 +338,7 @@ bool DefaultCallback::ShowCallback(uint64_t tag,
   }
 
   base::FilePath noti_path;
-  if (base::PathService::Get(PathsEfl::DIR_SHARED_NOTI_ICON, &noti_path)) {
+  if (base::PathService::Get(base::DIR_SHARED_NOTI_ICON, &noti_path)) {
     bool has_images = false;
     const std::string tag_str = std::to_string(tag);
 
index cbbe3ee94d1a878ae422a4ed398a5b4f1394acb5..1df0e99abadebe7a67564110adb14899fc389b1d 100644 (file)
@@ -17,7 +17,6 @@
 #include "components/password_manager/core/browser/password_store/password_store.h"
 #include "components/password_manager/core/browser/password_store/password_store_built_in_backend.h"
 #include "components/sync/model/syncable_service.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_thread.h"
 
 using namespace password_manager;
@@ -55,7 +54,7 @@ PasswordStoreFactory::~PasswordStoreFactory() {}
 
 void PasswordStoreFactory::Init() {
   base::FilePath db_path;
-  if (!base::PathService::Get(PathsEfl::WEB_DATABASE_DIR, &db_path)) {
+  if (!base::PathService::Get(base::WEB_DATABASE_DIR, &db_path)) {
     LOG(ERROR) << "Could not access login database path.";
     return;
   }
index 54e18233004fc0772c1fab7cfb4999d5972743a9..7c535121ab33ec69b26cc4391c685a7e11a6c2cb 100644 (file)
@@ -17,7 +17,6 @@
 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
 #include "components/autofill/core/browser/webdata/payments/payments_autofill_table.h"
 #include "components/webdata/common/webdata_constants.h"
-#include "content/common/paths_efl.h"
 #include "eweb_view.h"
 
 using autofill::AutofillWebDataService;
@@ -46,7 +45,7 @@ WebDataServiceWrapperEfl* WebDataServiceWrapperEfl::GetInstance() {
 
 WebDataServiceWrapperEfl::WebDataServiceWrapperEfl() {
   base::FilePath db_path;
-  base::PathService::Get(PathsEfl::WEB_DATABASE_DIR, &db_path);
+  base::PathService::Get(base::WEB_DATABASE_DIR, &db_path);
   base::FilePath path = db_path.Append(FILE_PATH_LITERAL(".FormData.db"));
 
   auto ui_task_runner = base::SingleThreadTaskRunner::GetCurrentDefault();
index b663ddf001e3ab7da0ad796c23c1a68cf44c99ff..12f5571dd6584e003687dd699dd5b2f174c6ce06 100644 (file)
@@ -25,7 +25,6 @@
 #include "components/prefs/pref_service_factory.h"
 #include "components/user_prefs/user_prefs.h"
 #include "components/visitedlink/browser/visitedlink_writer.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_process_host.h"
@@ -269,7 +268,7 @@ base::FilePath BrowserContextEfl::GetPath() {
 
   static base::FilePath path;
   if (path.empty())
-    base::PathService::Get(PathsEfl::DIR_USER_DATA, &path);
+    base::PathService::Get(base::DIR_USER_DATA, &path);
   return path;
 }
 
index 6029f7bca6696d2a2f7b21415672d20c9ffef320..5e4d8b2292c5e93fe5587d717b4526d5639dea4c 100644 (file)
@@ -11,7 +11,6 @@
 #include "content/browser/gpu/gpu_main_thread_factory.h"
 #include "content/browser/gpu/gpu_process_host.h"
 #include "content/common/locale_efl.h"
-#include "content/common/paths_efl.h"
 #include "content/gpu/in_process_gpu_thread.h"
 #include "content/public/common/content_switches.h"
 #include "content_browser_client_efl.h"
@@ -32,7 +31,7 @@ namespace {
 std::string SubProcessPath() {
   base::FilePath sub_process_path;
 #if BUILDFLAG(IS_TIZEN)
-  base::PathService::Get(PathsEfl::DIR_BIN, &sub_process_path);
+  base::PathService::Get(base::DIR_BIN, &sub_process_path);
 #else
   base::PathService::Get(base::DIR_EXE, &sub_process_path);
 #endif
@@ -48,10 +47,10 @@ void InitializeUserDataDir() {
   base::FilePath user_data_dir = command_line->GetSwitchValuePath("user-data-dir");
   if (!user_data_dir.empty() &&
       !base::PathService::OverrideAndCreateIfNeeded(
-          PathsEfl::DIR_USER_DATA, user_data_dir, true, true)) {
+          base::DIR_USER_DATA, user_data_dir, true, true)) {
     DLOG(WARNING) << "Could not set user data directory to " << user_data_dir.value();
 
-    if (!base::PathService::Get(PathsEfl::DIR_USER_DATA, &user_data_dir))
+    if (!base::PathService::Get(base::DIR_USER_DATA, &user_data_dir))
       CHECK(false) << "Could not get default user data directory";
 
     command_line->AppendSwitchPath("user-data-dir", user_data_dir);
@@ -141,7 +140,6 @@ ContentBrowserClient* ContentMainDelegateEfl::CreateContentBrowserClient() {
 
 std::optional<int> ContentMainDelegateEfl::BasicStartupComplete() {
   content::SetContentClient(&content_client_);
-  PathsEfl::Register();
   return std::nullopt;
 }
 
index c2e24799e9c6a137ecd8d53fdb434fc5a15b8e2a..35314e64ae6aa5c17942f47b9b8f14e916fee83d 100644 (file)
@@ -13,7 +13,6 @@
 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
 #include "content/browser/selection/selection_controller_efl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/download_manager.h"
 #include "content/public/browser/render_view_host.h"
@@ -553,7 +552,7 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
     case EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_LINK_TO_DISK: {
       if (!TriggerDownloadCb(GURL(params_.link_url.spec()))) {
         base::FilePath path;
-        if (!base::PathService::Get(PathsEfl::DIR_DOWNLOADS, &path)) {
+        if (!base::PathService::Get(base::DIR_DOWNLOADS, &path)) {
           LOG(ERROR) << "Could not get downloads directory.";
           break;
         }
@@ -566,7 +565,7 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item)
     case EWK_CONTEXT_MENU_ITEM_TAG_DOWNLOAD_IMAGE_TO_DISK: {
       if (!TriggerDownloadCb(GURL(params_.src_url.spec()))) {
         base::FilePath path;
-        if (!base::PathService::Get(PathsEfl::DIR_DOWNLOAD_IMAGE, &path)) {
+        if (!base::PathService::Get(base::DIR_DOWNLOAD_IMAGE, &path)) {
           LOG(ERROR) << "Could not get image downloads directory.";
           break;
         }
index 7c869114541dd9044c2360999bdf6195e93dd0b0..d7571587d15c9e5e5e7a78b12a4639c62be7ce8a 100644 (file)
@@ -8,7 +8,6 @@
 #include "base/path_service.h"
 #include "components/download/public/common/download_danger_type.h"
 #include "components/download/public/common/download_item.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/download_manager.h"
 #include "ewk/efl_integration/browser_context_efl.h"
 #include "ewk/efl_integration/eweb_view.h"
@@ -44,12 +43,12 @@ base::FilePath DownloadManagerDelegateEfl::GetPlatformDownloadPath(
     download::DownloadItem* item) const {
   base::FilePath path;
   if (blink::IsSupportedImageMimeType(item->GetMimeType())) {
-    if (!base::PathService::Get(PathsEfl::DIR_DOWNLOAD_IMAGE, &path)) {
+    if (!base::PathService::Get(base::DIR_DOWNLOAD_IMAGE, &path)) {
       LOG(ERROR) << "Could not get image directory.";
       return base::FilePath();
     }
   } else {
-    if (!base::PathService::Get(PathsEfl::DIR_DOWNLOADS, &path)) {
+    if (!base::PathService::Get(base::DIR_DOWNLOADS, &path)) {
       LOG(ERROR) << "Could not get download directory.";
       return base::FilePath();
     }
index 9f90dcb46a4465c0cd26dc5428f07e44cae24306..f01d0845183d0bdc6fc534318ffc09eb2e491d0e 100644 (file)
@@ -22,7 +22,6 @@
 #include "common/render_messages_ewk.h"
 #include "components/visitedlink/renderer/visitedlink_reader.h"
 #include "content/common/locale_efl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/common/content_plugin_info.h"
 #include "content/public/renderer/content_renderer_client.h"
index 6ff0a18695e424e6d8ca5f3266bc9a93562b46da..cefc3e87754ddc5d83a79ab5471aa2d12e122345 100644 (file)
@@ -8,7 +8,6 @@
 #include "base/path_service.h"
 #include "chrome/common/chrome_paths.h"
 #include "content/browser/web_contents/web_contents_impl.h"
-#include "content/common/paths_efl.h"
 #include "content/public/browser/browser_main_runner.h"
 #include "electron/shell/browser/api/electron_api_browser_window.h"
 #include "electron/shell/browser/browser.h"
@@ -551,7 +550,7 @@ void NativeWebRuntime::SetLocaleDir() {
 
     // For IDS_WEBVIEW_* strings.
     base::FilePath locale_dir;
-    base::PathService::Get(PathsEfl::DIR_LOCALE, &locale_dir);
+    base::PathService::Get(base::DIR_LOCALE, &locale_dir);
     bindtextdomain("WebKit", locale_dir.value().c_str());
   }
 }
index 82c0b01a51a3f9115955f7aa21cdabce8307ad2f..50e5d64af1f8b3a97a3c5b5edd4f4ed3da7af98d 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "base/logging.h"
 #include "base/path_service.h"
-#include "tizen_src/chromium_impl/content/common/paths_efl.h"
 #include "wrt/src/browser/native_web_runtime.h"
 #include "wrt/src/browser/tv/native_web_runtime_delegate_tv.h"
 #include "wrt/src/browser/tv/wrt_native_window_tv.h"
@@ -99,7 +98,7 @@ void DecoratorWindow::SetDecoratorWindow(Evas_Object* top_window) {
 
   top_window_ = top_window;
   base::FilePath edje_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edje_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edje_dir);
   elm_theme_overlay_add(NULL,
                         (edje_dir.value() + "/" + kDecoratorEdjeFile).c_str());
   ea_policy_handle_desktop_mode(top_window_, EINA_TRUE);
index f9b9066eddcbf9bf910ac570f3606c3ca0d50088..05044b74dcc147b6f6800f95517671eafb9fcae1 100644 (file)
@@ -24,7 +24,6 @@
 #include "base/strings/string_split.h"
 #include "base/task/task_traits.h"
 #include "base/task/thread_pool.h"
-#include "content/common/paths_efl.h"
 #include "content/common/zygote/zygote_communication_linux.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
@@ -41,7 +40,6 @@
 #include "sandbox/linux/services/credentials.h"
 #include "services/network/public/mojom/clear_data_filter.mojom.h"
 #include "tizen_src/chromium_impl/components/xwalk_extensions/browser/xwalk_extension_manager.h"
-#include "tizen_src/chromium_impl/content/common/paths_efl.h"
 #include "tizen_src/chromium_impl/content/public/browser/certificates_utils.h"
 #include "tizen_src/chromium_impl/tizen/vconf_handle.h"
 #include "v8/include/v8.h"
@@ -565,7 +563,6 @@ bool NativeWebRuntimeDelegateTV::IsSpatialNavigationMetaTagSet() {
 }
 
 void NativeWebRuntimeDelegateTV::PostEarlyInitialization() {
-  PathsEfl::Register();
   if (!base::i18n::InitializeICU())
     LOG(ERROR) << "base::i18n::InitializeICU fail";
 
@@ -700,7 +697,7 @@ void NativeWebRuntimeDelegateTV::SetLocaleDir() {
 
   base::AutoLock lock(worker_thread_lock);
   base::FilePath locale_dir;
-  base::PathService::Get(PathsEfl::DIR_LOCALE, &locale_dir);
+  base::PathService::Get(base::DIR_LOCALE, &locale_dir);
   auto dir = locale_dir.value().c_str();
   LOG(INFO) << "locale dir:" << dir;
   bindtextdomain(kTextDomainRuntime, dir);
index b205c95df8570ec9577f311a678e49df65edf499..d57c8a17b885e7490008d561f0db684ee2cbc271 100644 (file)
@@ -20,7 +20,6 @@
 
 #include "base/files/file_path.h"
 #include "base/path_service.h"
-#include "tizen_src/chromium_impl/content/common/paths_efl.h"
 #include "wrt/src/browser/popup_string.h"
 #include "wrt/src/browser/wrt_native_window.h"
 #include "wrt/src/common/locale_manager.h"
@@ -277,7 +276,7 @@ void PopupTV::SetCheckBox(const std::string& id) {
 
 Evas_Object* PopupTV::AddEntry(const char* id, Popup::EntryType type) {
   base::FilePath edje_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edje_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edje_dir);
   edjeFilePath_ = edje_dir.value() + "/" + kWRTEdjeFile;
 
   Evas_Object* entry = Popup::AddEntry(id, type);
index 64727a5102bd81b48fde74410a55729006015bb4..a0ae26db77af36b0445c9888b27a2434d16b5005 100644 (file)
@@ -19,7 +19,6 @@
 
 #if BUILDFLAG(IS_TIZEN_TV)
 #include "base/path_service.h"
-#include "tizen_src/chromium_impl/content/common/paths_efl.h"
 #else
 #include <inputmethod.h>
 #include <watch_app_efl.h>
@@ -107,7 +106,7 @@ Evas_Object* WRTNativeWindowOffScreen::CreateElmWindow() {
   layout_ = elm_layout_add(container);
 #if BUILDFLAG(IS_TIZEN_TV)
   base::FilePath edje_dir;
-  base::PathService::Get(PathsEfl::EDJE_RESOURCE_DIR, &edje_dir);
+  base::PathService::Get(base::EDJE_RESOURCE_DIR, &edje_dir);
   elm_layout_file_set(layout_, (edje_dir.value() + "/" + kEdjeFile).c_str(),
                       "web-application");
 #else
index e1dfa2c3a64c33a1e39f4d7a844ed520fe6aa72e..3880f2fa6a87425c67f270da059b774d713002de 100644 (file)
@@ -13,7 +13,6 @@
 #include "base/path_service.h"
 #include "base/strings/utf_string_conversions.h"
 #include "electron/shell/browser/notifications/notification_delegate.h"
-#include "tizen_src/chromium_impl/content/common/paths_efl.h"
 #include "tizen_src/ewk/efl_integration/common/web_contents_utils.h"
 #include "ui/gfx/codec/png_codec.h"
 
@@ -110,7 +109,7 @@ void WRTNotification::Show(const electron::NotificationOptions& options) {
   }
 
   base::FilePath noti_path;
-  if (base::PathService::Get(PathsEfl::DIR_SHARED_NOTI_ICON, &noti_path)) {
+  if (base::PathService::Get(base::DIR_SHARED_NOTI_ICON, &noti_path)) {
     bool has_images = false;
     const std::string tag_str = options.tag;
 
@@ -163,7 +162,7 @@ void WRTNotification::Dismiss() {
 
 void WRTNotification::RemoveImageFiles(const std::string& tag) {
   base::FilePath image_path;
-  if (!base::PathService::Get(PathsEfl::DIR_SHARED_NOTI_ICON, &image_path)) {
+  if (!base::PathService::Get(base::DIR_SHARED_NOTI_ICON, &image_path)) {
     LOG(ERROR) << "Failed to retrieve the notification resource path";
     return;
   }
old mode 100755 (executable)
new mode 100644 (file)
index 74836bd..9f7a6df
@@ -4,7 +4,6 @@
 #include "base/files/file_path.h"
 #include "base/logging.h"
 #include "base/path_service.h"
-#include "content/common/paths_efl.h"
 #include "content/public/common/content_switches.h"
 #include "electron/shell/common/gin_helper/object_template_builder.h"
 #include "wrt/src/common/application_data.h"
old mode 100755 (executable)
new mode 100644 (file)
index 5e42ba4..8911811
@@ -21,7 +21,6 @@
 #include "components/nacl/common/nacl_constants.h"
 #include "components/nacl/common/nacl_process_type.h"
 #include "components/nacl/renderer/plugin/ppapi_entrypoints.h"
-#include "content/common/paths_efl.h"
 #include "ppapi/shared_impl/ppapi_permissions.h"
 #endif
 
@@ -65,7 +64,7 @@ void WRTContentClient::AddPlugins(
 
 #if BUILDFLAG(ENABLE_NACL)
   base::FilePath path;
-  if (base::PathService::Get(PathsEfl::FILE_NACL_PLUGIN, &path)) {
+  if (base::PathService::Get(base::FILE_NACL_PLUGIN, &path)) {
     content::ContentPluginInfo nacl;
 
     // The nacl plugin is now built into the binary.
index 1916926bb7b7f666ea838457c8a8349c8fe06846..9a5cdba5bd3098cfd44f92d077623173ef42acf4 100644 (file)
@@ -12,7 +12,6 @@
 #include "base/logging.h"
 #include "base/path_service.h"
 #include "base/strings/string_split.h"
-#include "content/common/paths_efl.h"
 #include "electron/shell/app/node_main.h"
 #include "tizen_src/ewk/efl_integration/command_line_efl.h"
 #include "wrt/src/common/application_data.h"
@@ -98,7 +97,6 @@ int WRTService::Main(int argc, char** argv) {
   ApplicationData::SetServiceApp();
 
   base::PathService::DisableCache();
-  PathsEfl::Register();
   _register_wrt();
   _register_wrt_xwalk_extension();