diff --git a/base/base_paths_ohos.cc b/base/base_paths_ohos.cc index e9a0459463fd641fa872d13491ef50fed421b686..6d0a42ac026f1dc3dbbd7218bc4fa474948bd60b 100644 --- a/base/base_paths_ohos.cc +++ b/base/base_paths_ohos.cc @@ -65,12 +65,8 @@ bool PathProviderOHOS(int key, FilePath* result) { NOTIMPLEMENTED(); return false; case base::DIR_CACHE: - #if BUILDFLAG(IS_OHOS) - *result = FilePath("/data/storage/el2/base/cache/web"); - #else // set to /data/local directory for W|X permission. *result = FilePath("/data/local"); - #endif // BUILDFLAG(IS_OHOS) return true; case base::DIR_ASSETS: // resource file packed to system images diff --git a/base/feature_list.cc b/base/feature_list.cc index 9e47e4ddeb9bf24180820de6f1ce569e9fd40d16..5d1fe34665cbd9c11ad79b3ad0bcc3b1a6bf9522 100644 --- a/base/feature_list.cc +++ b/base/feature_list.cc @@ -441,9 +441,7 @@ bool FeatureList::InitializeInstance( // accessor call(s) which likely returned incorrect information. if (g_initialized_from_accessor) { DEBUG_ALIAS_FOR_CSTR(accessor_name, g_initialized_from_accessor->name, 128); -#if !BUILDFLAG(IS_OHOS) CHECK(!g_initialized_from_accessor); -#endif } bool instance_existed_before = false; if (g_feature_list_instance) { diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h index fb473253f64464b525e6c6e1d22763fd0ca6f17d..d2bc6440c3f95ea67075ddae877f44c7a8e7565c 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -115,10 +115,6 @@ class StartupTabProviderImpl; class GaiaConfig; class WebEngineBrowserMainParts; -#if BUILDFLAG(IS_OHOS) -class CefCookieManagerImpl; -#endif - Profile* GetLastProfileMac(); namespace android_webview { @@ -631,9 +627,6 @@ class BASE_EXPORT ScopedAllowBaseSyncPrimitivesOutsideBlockingScope { friend class android_webview:: AwFormDatabaseService; // http://crbug.com/904431 friend class android_webview::CookieManager; -#if BUILDFLAG(IS_OHOS) - friend class ::CefCookieManagerImpl; -#endif friend class android_webview::VizCompositorThreadRunnerWebView; friend class audio::OutputDevice; friend class base::sequence_manager::internal::TaskQueueImpl; diff --git a/components/os_crypt/os_crypt_linux.cc b/components/os_crypt/os_crypt_linux.cc index bce6779bc87e4e0d3991179d2ec695c7bda86ce1..cf740919f75705fc1bb343a8627816a4c686dda6 100644 --- a/components/os_crypt/os_crypt_linux.cc +++ b/components/os_crypt/os_crypt_linux.cc @@ -102,10 +102,10 @@ std::unique_ptr GenerateEncryptionKey( std::string salt(kSalt); #if BUILDFLAG(IS_OHOS) - std::unique_ptr encryption_key( - crypto::SymmetricKey::Import( - crypto::SymmetricKey::AES, - crypto::ohos::get_symmetric_key_256("nweb_data_key"))); + std::unique_ptr encryption_key( + crypto::SymmetricKey::Import( + crypto::SymmetricKey::AES, + crypto::ohos::get_symmetric_key_256("nweb_data_key"))); #else // Create an encryption key from our password and salt. std::unique_ptr encryption_key( @@ -132,11 +132,6 @@ crypto::SymmetricKey* GetPasswordV10() { crypto::SymmetricKey* GetPasswordV11() { base::AutoLock auto_lock(g_cache.Get().lock); if (!g_cache.Get().is_password_v11_cached) { -#if BUILDFLAG(IS_OHOS) - if (!g_cache.Get().config) { - return nullptr; - } -#endif // BUILDFLAG(IS_OHOS) std::unique_ptr key_storage = g_key_storage_provider(); if (key_storage) { absl::optional key = key_storage->GetKey(); diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 317d5814337fba3c7bac2ef48f40ce23fa85a5c5..686a385828e0d134dd6846a5e4a96e98443fac26 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc @@ -1421,22 +1421,6 @@ StoragePartitionImpl::GetCookieManagerForBrowserProcess() { return cookie_manager_for_browser_process_.get(); } -#if BUILDFLAG(IS_OHOS) -network::mojom::CookieManager* -StoragePartitionImpl::GetCookieManagerForOhos() { - DCHECK(initialized_); - // Create the CookieManager as needed. - if (!cookie_manager_for_ohos_ || - !cookie_manager_for_ohos_.is_connected()) { - // Reset `cookie_manager_for_ohos_` before binding it again. - cookie_manager_for_ohos_.reset(); - GetNetworkContext()->GetCookieManager( - cookie_manager_for_ohos_.BindNewPipeAndPassReceiver()); - } - return cookie_manager_for_ohos_.get(); -} -#endif - void StoragePartitionImpl::CreateRestrictedCookieManager( network::mojom::RestrictedCookieManagerRole role, const url::Origin& origin, diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h index ba5ed586610b1fff81cd11e2520e9bcbbbf79d2b..4ba42c08a99849b7dcdbe6ead9ac11fe264f6fd5 100644 --- a/content/browser/storage_partition_impl.h +++ b/content/browser/storage_partition_impl.h @@ -149,9 +149,6 @@ class CONTENT_EXPORT StoragePartitionImpl std::unique_ptr GetURLLoaderFactoryForBrowserProcessIOThread() override; network::mojom::CookieManager* GetCookieManagerForBrowserProcess() override; -#if BUILDFLAG(IS_OHOS) - network::mojom::CookieManager* GetCookieManagerForOhos() override; -#endif void CreateHasTrustTokensAnswerer( mojo::PendingReceiver receiver, const url::Origin& top_frame_origin) override; @@ -681,9 +678,6 @@ class CONTENT_EXPORT StoragePartitionImpl bool is_test_url_loader_factory_for_browser_process_with_corb_ = false; mojo::Remote cookie_manager_for_browser_process_; -#if BUILDFLAG(IS_OHOS) - mojo::Remote cookie_manager_for_ohos_; -#endif mojo::Remote origin_policy_manager_for_browser_process_; diff --git a/content/public/browser/storage_partition.h b/content/public/browser/storage_partition.h index e2cd4e8a8c100e4c2e96db4f0baefe4879ce1d98..4eee6e8e667246dbd51ec6afe23ebb40d7a26f4b 100644 --- a/content/public/browser/storage_partition.h +++ b/content/public/browser/storage_partition.h @@ -118,9 +118,6 @@ class CONTENT_EXPORT StoragePartition { GetURLLoaderFactoryForBrowserProcessIOThread() = 0; virtual network::mojom::CookieManager* GetCookieManagerForBrowserProcess() = 0; -#if BUILDFLAG(IS_OHOS) - virtual network::mojom::CookieManager* GetCookieManagerForOhos() = 0; -#endif virtual void CreateHasTrustTokensAnswerer( mojo::PendingReceiver receiver, const url::Origin& top_frame_origin) = 0; diff --git a/ohos_nweb/include/nweb.h b/ohos_nweb/include/nweb.h index 9aae5246b3a35149dcf5905c35c47eb8b9e153cb..b433c3f6aba8dfe954af8cf1d181227ccbb311b9 100644 --- a/ohos_nweb/include/nweb.h +++ b/ohos_nweb/include/nweb.h @@ -161,8 +161,8 @@ class OHOS_NWEB_EXPORT NWeb : public std::enable_shared_from_this { virtual void OnTouchCancel() = 0; virtual void OnNavigateBack() = 0; virtual bool SendKeyEvent(int32_t keyCode, int32_t keyAction) = 0; - virtual void SendMouseWheelEvent(double x, double y, double deltaX, double deltaY) = 0; - virtual void SendMouseEvent(int x, int y, int button, int action, int count) = 0; + virtual void SendMouseWheelEvent(double x, double y, double deltaX, double deltaY); + virtual void SendMouseEvent(int x, int y, int button, int action, int count); /** * Loads the given URL. diff --git a/ohos_nweb/src/nweb_impl.cc b/ohos_nweb/src/nweb_impl.cc index 45249e27205a7b465a08ac7ddfcdee405130747f..839f3024b546f32d6af4a0953e9a5e6ce4d917f8 100644 --- a/ohos_nweb/src/nweb_impl.cc +++ b/ohos_nweb/src/nweb_impl.cc @@ -1572,15 +1572,6 @@ extern "C" OHOS_NWEB_EXPORT void InitializeWebEngine( settings.log_severity = LOGSEVERITY_INFO; settings.multi_threaded_message_loop = false; - auto& system_properties_adapter = - OHOS::NWeb::OhosAdapterHelper::GetInstance().GetSystemPropertiesInstance(); - OHOS::NWeb::ProductDeviceType deviceType = - system_properties_adapter.GetProductDeviceType(); - bool is_pc_device = - deviceType == OHOS::NWeb::ProductDeviceType::DEVICE_TYPE_TABLET || - deviceType == OHOS::NWeb::ProductDeviceType::DEVICE_TYPE_2IN1; - settings.persist_session_cookies = !is_pc_device; - #if !defined(CEF_USE_SANDBOX) settings.no_sandbox = true; #endif