Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 2a090f7e authored by uazo's avatar uazo Committed by GitHub
Browse files

[AUTO][FILECONTROL] - version 140.0.7339.81 (#2293)

[AUTO][FILECONTROL] - version 140.0.7339.81
parents 73b86425 82fe6e28
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
139.0.7258.158
140.0.7339.81
+35 −31
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@
#include "android_webview/common/url_constants.h"
#include "base/android/build_info.h"
#include "base/android/locale_utils.h"
#include "base/android/yield_to_looper_checker.h"
#include "base/base_paths_android.h"
#include "base/base_switches.h"
#include "base/command_line.h"
@@ -142,6 +143,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/resources/grit/ui_resources.h"

using base::android::YieldToLooperChecker;
using content::BrowserThread;
using content::FrameType;
using content::WebContents;
@@ -334,8 +336,8 @@ void AwContentBrowserClient::ConfigureNetworkContextParams(
      std::move(cookie_manager_remote));
}

AwBrowserContext* AwContentBrowserClient::InitBrowserContext() {
  return AwBrowserContextStore::GetOrCreateInstance()->GetDefault();
void AwContentBrowserClient::InitBrowserContextStore() {
  AwBrowserContextStore::GetOrCreateInstance();
}

std::unique_ptr<content::BrowserMainParts>
@@ -343,10 +345,10 @@ AwContentBrowserClient::CreateBrowserMainParts(bool /* is_integration_test */) {
  return std::make_unique<AwBrowserMainParts>(this);
}

bool IsStartupTaskExperimentEnabled() {
  auto* command_line = base::CommandLine::ForCurrentProcess();
bool IsAnyStartupTaskExperimentEnabled() {
  return AwBrowserMainParts::isWebViewStartupTasksExperimentEnabled() ||
         command_line->HasSwitch(switches::kWebViewUseStartupTasksLogic);
         AwBrowserMainParts::isWebViewStartupTasksExperimentEnabledP2() ||
         AwBrowserMainParts::isStartupTaskYieldToNativeExperimentEnabled();
}

void AwContentBrowserClient::PostAfterStartupTask(
@@ -354,7 +356,7 @@ void AwContentBrowserClient::PostAfterStartupTask(
    const scoped_refptr<base::SequencedTaskRunner>& task_runner,
    base::OnceClosure task) {
  DCHECK_CURRENTLY_ON(BrowserThread::UI);
  if (!IsStartupTaskExperimentEnabled()) {
  if (!IsAnyStartupTaskExperimentEnabled()) {
    task_runner->PostTask(from_here, std::move(task));
    return;
  }
@@ -376,6 +378,10 @@ void AwContentBrowserClient::OnStartupComplete() {
  DCHECK(!startup_info_.startup_complete);

  startup_info_.startup_complete = true;
  if (AwBrowserMainParts::isStartupTaskYieldToNativeExperimentEnabled()) {
    YieldToLooperChecker::GetInstance().SetStartupRunning(false);
  }

  // if the native ui task execution isn't enabled already, enable it.
  if (!startup_info_.enable_native_task_execution_callback.is_null()) {
    std::move(startup_info_.enable_native_task_execution_callback).Run();
@@ -391,13 +397,17 @@ void AwContentBrowserClient::OnStartupComplete() {

void AwContentBrowserClient::OnUiTaskRunnerReady(
    base::OnceClosure enable_native_task_execution_callback) {
  if (!IsStartupTaskExperimentEnabled()) {
  if (!IsAnyStartupTaskExperimentEnabled()) {
    std::move(enable_native_task_execution_callback).Run();
    return;
  }

  startup_info_.enable_native_task_execution_callback =
      std::move(enable_native_task_execution_callback);

  if (AwBrowserMainParts::isStartupTaskYieldToNativeExperimentEnabled()) {
    YieldToLooperChecker::GetInstance().SetStartupRunning(true);
  }
}

std::unique_ptr<content::WebContentsViewDelegate>
@@ -608,25 +618,6 @@ AwContentBrowserClient::GetLocalTracesDirectory() {
  return user_data_dir;
}

void AwContentBrowserClient::DidCreatePpapiPlugin(
    content::BrowserPpapiHost* browser_host) {
  NOTREACHED() << "Android WebView does not support plugins";
}

bool AwContentBrowserClient::AllowPepperSocketAPI(
    content::BrowserContext* browser_context,
    const GURL& url,
    bool private_api,
    const content::SocketPermissionRequest* params) {
  NOTREACHED() << "Android WebView does not support plugins";
}

bool AwContentBrowserClient::IsPepperVpnProviderAPIAllowed(
    content::BrowserContext* browser_context,
    const GURL& url) {
  NOTREACHED() << "Android WebView does not support plugins";
}

std::unique_ptr<content::TracingDelegate>
AwContentBrowserClient::CreateTracingDelegate() {
  return std::make_unique<AwTracingDelegate>();
@@ -712,7 +703,7 @@ void AwContentBrowserClient::CreateThrottlesForNavigation(
  if ((navigation_handle.GetNavigatingFrameType() ==
           FrameType::kPrimaryMainFrame ||
       navigation_handle.GetNavigatingFrameType() == FrameType::kSubframe) &&
      navigation_handle.GetURL().SchemeIsHTTPOrHTTPS()) {
      registry.IsHTTPOrHTTPS()) {
    AwSupervisedUserUrlClassifier* urlClassifier =
        AwSupervisedUserUrlClassifier::GetInstance();
    if (urlClassifier->ShouldCreateThrottle()) {
@@ -891,11 +882,14 @@ bool AwContentBrowserClient::SupportsAvoidUnnecessaryBeforeUnloadCheckSync() {
  return false;
}

bool AwContentBrowserClient::ShouldAllowSameSiteRenderFrameHostChange(
content::ContentBrowserClient::ShouldAllowSameSiteRenderFrameHostChangeResult
AwContentBrowserClient::ShouldAllowSameSiteRenderFrameHostChange(
    const content::RenderFrameHost& rfh) {
  if (!base::FeatureList::IsEnabled(features::kWebViewRenderDocument)) {
    return false;
    return content::ContentBrowserClient::
        ShouldAllowSameSiteRenderFrameHostChangeResult::kNotAllowed;
  }

  content::RenderFrameHost* rfh_ptr =
      const_cast<content::RenderFrameHost*>(&rfh);
  content::WebContents* web_contents =
@@ -904,8 +898,18 @@ bool AwContentBrowserClient::ShouldAllowSameSiteRenderFrameHostChange(
  // Don't allow same-site RFH swap on non-crashed frames if the initial page
  // scale is non-default. See the comment in `AwSettings` about this for more
  // details.
  return !aw_settings || !rfh_ptr->IsRenderFrameLive() ||
         !aw_settings->initial_page_scale_is_non_default();
  if (aw_settings && rfh_ptr->IsRenderFrameLive() &&
      aw_settings->initial_page_scale_is_non_default()) {
    return content::ContentBrowserClient::
        ShouldAllowSameSiteRenderFrameHostChangeResult::kNotAllowed;
  }

  // The WebViewRenderDocument flag is enabled and we're not in an unsupported
  // case. Force the same-site RenderFrameHost change regardless of the state
  // of the RenderDocument flag, so that we only need to enable the
  // WebViewRenderDocument flag to enable RenderDocument on all frames.
  return content::ContentBrowserClient::
      ShouldAllowSameSiteRenderFrameHostChangeResult::kAllowedOverrideLevel;
}

std::unique_ptr<content::LoginDelegate>
+16 −6
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@
#include "components/viz/common/features.h"
#include "content/public/common/content_features.h"
#include "gpu/config/gpu_finch_features.h"
#include "media/audio/audio_features.h"
#include "media/base/media_switches.h"
#include "mojo/public/cpp/bindings/features.h"
#include "net/base/features.h"
@@ -63,10 +64,6 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
  aw_feature_overrides.DisableFeature(
      blink::features::kEnforceNoopenerOnBlobURLNavigation);

  // TODO(crbug.com/421547429): Temporarily disabled to address crashes.
  aw_feature_overrides.DisableFeature(
      network::features::kMaskedDomainListFlatbufferImpl);

#if BUILDFLAG(ENABLE_VALIDATING_COMMAND_DECODER)
  // Disable the passthrough on WebView.
  aw_feature_overrides.DisableFeature(
@@ -76,6 +73,9 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
  // HDR does not support webview yet. See crbug.com/1493153 for an explanation.
  aw_feature_overrides.DisableFeature(ui::kAndroidHDR);

  // Disable launch_handler on WebView.
  aw_feature_overrides.DisableFeature(::features::kAndroidWebAppLaunchHandler);

  // Disable Reducing User Agent minor version on WebView.
  aw_feature_overrides.DisableFeature(
      blink::features::kReduceUserAgentMinorVersion);
@@ -125,6 +125,9 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
  aw_feature_overrides.DisableFeature(
      blink::features::kSecurePaymentConfirmationAvailabilityAPI);

  // WebView does not support handling payment links.
  aw_feature_overrides.DisableFeature(blink::features::kPaymentLinkDetection);

  // WebView does not support overlay fullscreen yet for video overlays.
  aw_feature_overrides.DisableFeature(media::kOverlayFullscreenVideo);

@@ -221,9 +224,8 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
  // Disabling the permission element as it needs embedder support in order to
  // function and the webview permission manager cannot support it.
  aw_feature_overrides.DisableFeature(blink::features::kPermissionElement);
  aw_feature_overrides.DisableFeature(blink::features::kGeolocationElement);

  // Feature parameters can only be set via a field trial.
  // Note: Performing a field trial here means we cannot include
  // |kBtmTtl| in the testing config json.
  {
    const char kDipsWebViewExperiment[] = "DipsWebViewExperiment";
@@ -290,4 +292,12 @@ void AwFieldTrials::RegisterFeatureOverrides(base::FeatureList* feature_list) {
  // Explicitly disable PrefetchProxy instead of relying only on passing an
  // empty URL.
  aw_feature_overrides.DisableFeature(features::kPrefetchProxy);

  // Document Picture-in-Picture API is not supported on WebView.
  aw_feature_overrides.DisableFeature(
      blink::features::kDocumentPictureInPictureAPI);

  // AAudio per-stream device selection is not supported on WebView.
  aw_feature_overrides.DisableFeature(
      features::kAAudioPerStreamDeviceSelection);
}
+41 −3
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ by a child template that "extends" this file.
    tools:ignore="MissingVersion">
    <!-- android:versionCode and android:versionName is set through gyp. See build/common.gypi -->

    <uses-feature android:glEsVersion="0x00020000" />
    <uses-feature android:glEsVersion="0x00030000" />

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
@@ -67,6 +67,7 @@ by a child template that "extends" this file.
    <uses-permission-sdk-23 android:name="android.permission.REQUEST_INSTALL_PACKAGES"/>

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.CAPTURE_KEYBOARD" />
    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
    {% set is_desktop_android = is_desktop_android|default(0) %}
@@ -96,6 +97,12 @@ by a child template that "extends" this file.
    <uses-permission-sdk-23 android:name="android.permission.READ_MEDIA_VIDEO"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <!--
      The REPOSITION_SELF_WINDOWS permission is needed for Window Popup Web API to allow Chrome to
      move windows when the |window.moveTo| JavaScript call is executed (also |window.{resizeBy,
      resizeTo, moveBy}|).
    -->
    <uses-permission android:name="android.permission.REPOSITION_SELF_WINDOWS"/>
    <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
    <uses-permission-sdk-23 android:name="android.permission.USE_BIOMETRIC"/>
    <uses-permission-sdk-23 android:name="android.permission.USE_FINGERPRINT"/>
@@ -597,7 +604,7 @@ by a child template that "extends" this file.
            android:autoRemoveFromRecents="true">
        </activity>
        <activity android:name="org.chromium.chrome.browser.firstrun.LightweightFirstRunActivity"
            android:theme="@style/Theme.BrowserUI.AlertDialog.NoActionBar.DayNight"
            android:theme="@style/Theme.BrowserUI.DayNight.AlertDialog.NoActionBar"
            android:launchMode="singleInstance"
            {{ self.first_run_activity_common() }}>
        </activity>
@@ -951,7 +958,7 @@ by a child template that "extends" this file.
        <activity android:name="org.chromium.chrome.browser.searchwidget.SearchActivity"
            android:theme="@style/Theme.Chromium.SearchActivity"
            android:label="Search"
            android:exported="false"
            android:exported="true"
            android:launchMode="singleTask"
            android:taskAffinity=""
            android:clearTaskOnLaunch="true"
@@ -1180,6 +1187,16 @@ by a child template that "extends" this file.
        <service android:name="org.chromium.chrome.browser.app.usb.UsbNotificationService"
            android:exported="false"/>

        <service android:name="org.chromium.chrome.browser.data_import.DataImporterService"
            android:exported="true" tools:ignore="ExportedService">
          <intent-filter>
            <action android:name="io.grpc.action.BIND" />
            <data android:host=""
                android:path="/com.google.osmigration.systemappapi.TargetService"
                android:scheme="grpc" />
          </intent-filter>
        </service>

        <meta-data android:name="org.chromium.content.browser.SMART_CLIP_PROVIDER"
            android:value="org.chromium.content_public.browser.SmartClipProvider"/>

@@ -1251,6 +1268,27 @@ by a child template that "extends" this file.
          android:visibleToInstantApps="true"
          {% endif %} />
      {% endfor %}
      {% if javaless_renderers is defined %}
      <!-- Restricting to just 2 native-only services, one for zygote and one for non-zygote. -->
      {% for i in range(2) %}
      <!-- For now, the name of a native-only service must be prefixed with "NativeService". This is
           only for the prototype, and once it actually lands in the Android tree, there will be a
           better mechanism than this. -->
      <service android:name="org.chromium.content.app.NativeServiceSandboxedProcessService{{ i }}"
          android:process=":sandboxed_process{{ i }}"
          android:permission="{{ manifest_package }}.permission.CHILD_SERVICE"
          android:isolatedProcess="true"
          android:exported="{{sandboxed_service_exported|default(false)}}"
          {% if (sandboxed_service_exported|default(false)) == 'true' %}
          android:externalService="true"
          tools:ignore="ExportedService"
          android:visibleToInstantApps="true"
          {% endif %} >
          <meta-data android:name="android.app.lib_name" android:value="{{ library_name }}"/>
          <meta-data android:name="android.app.func_name" android:value="NativeChildProcessService_onCreate"/>
      </service>
      {% endfor %}
      {% endif %}

      {% set num_privileged_services = 10 %}
      <meta-data android:name="org.chromium.content.browser.NUM_PRIVILEGED_SERVICES"
+5 −40
Original line number Diff line number Diff line
@@ -114,8 +114,6 @@
#include "components/language/core/browser/url_language_histogram.h"
#include "components/lens/lens_features.h"
#include "components/media_device_salt/media_device_salt_service.h"
#include "components/nacl/browser/nacl_browser.h"
#include "components/nacl/browser/pnacl_host.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
#include "components/omnibox/browser/omnibox_prefs.h"
#include "components/open_from_clipboard/clipboard_recent_content.h"
@@ -126,7 +124,7 @@
#include "components/password_manager/core/browser/password_store/smart_bubble_stats_store.h"
#include "components/payments/content/browser_binding/browser_bound_keys_deleter.h"
#include "components/payments/content/browser_binding/browser_bound_keys_deleter_factory.h"
#include "components/payments/content/payment_manifest_web_data_service.h"
#include "components/payments/content/web_payments_web_data_service.h"
#include "components/performance_manager/public/user_tuning/prefs.h"
#include "components/permissions/permission_actions_history.h"
#include "components/permissions/permission_decision_auto_blocker.h"
@@ -243,16 +241,6 @@ namespace {
// Timeout after which the histogram for slow tasks is recorded.
const base::TimeDelta kSlowTaskTimeout = base::Seconds(180);

// Generic functions but currently only used when ENABLE_NACL.
#if BUILDFLAG(ENABLE_NACL)
// Convenience method to create a callback that can be run on any thread and
// will post the given |callback| back to the UI thread.
base::OnceClosure UIThreadTrampoline(base::OnceClosure callback) {
  return base::BindPostTask(content::GetUIThreadTaskRunner({}),
                            std::move(callback));
}
#endif  // BUILDFLAG(ENABLE_NACL)

// Returned by ChromeBrowsingDataRemoverDelegate::GetOriginTypeMatcher().
bool DoesOriginMatchEmbedderMask(uint64_t origin_type_mask,
                                 const url::Origin& origin,
@@ -942,13 +930,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
    host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
        ContentSettingsType::INTENT_PICKER_DISPLAY, delete_begin_, delete_end_,
        website_settings_filter);

    host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
        ContentSettingsType::PRIVATE_NETWORK_GUARD, delete_begin_, delete_end_,
        website_settings_filter);
    host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
        ContentSettingsType::PRIVATE_NETWORK_CHOOSER_DATA, delete_begin_,
        delete_end_, website_settings_filter);
#endif

    host_content_settings_map_->ClearSettingsForOneTypeWithPredicate(
@@ -1134,10 +1115,10 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
       base::FeatureList::IsEnabled(browsing_data::features::kDbdRevampDesktop))
#endif  // !BUILDFLAG(IS_ANDROID)
  ) {
    scoped_refptr<payments::PaymentManifestWebDataService>
    scoped_refptr<payments::WebPaymentsWebDataService>
        payment_web_data_service =
            webdata_services::WebDataServiceWrapperFactory::
                GetPaymentManifestWebDataServiceForBrowserContext(
                GetWebPaymentsWebDataServiceForBrowserContext(
                    profile_, ServiceAccessType::EXPLICIT_ACCESS);
    if (payment_web_data_service) {
      payment_web_data_service->ClearSecurePaymentConfirmationCredentials(
@@ -1171,18 +1152,6 @@ void ChromeBrowsingDataRemoverDelegate::RemoveEmbedderData(
      }
    }

#if BUILDFLAG(ENABLE_NACL)
    if (filter_builder->MatchesMostOriginsAndDomains()) {
      nacl::NaClBrowser::GetInstance()->ClearValidationCache(UIThreadTrampoline(
          CreateTaskCompletionClosure(TracingDataType::kNaclCache)));

      pnacl::PnaclHost::GetInstance()->ClearTranslationCacheEntriesBetween(
          delete_begin_, delete_end_,
          UIThreadTrampoline(
              CreateTaskCompletionClosure(TracingDataType::kPnaclCache)));
    }
#endif

    if (filter_builder->MatchesMostOriginsAndDomains()) {
      browsing_data::RemovePrerenderCacheData(
          prerender::NoStatePrefetchManagerFactory::GetForBrowserContext(
@@ -1661,10 +1630,6 @@ const char* ChromeBrowsingDataRemoverDelegate::GetHistogramSuffix(
      return "Synchronous";
    case TracingDataType::kHistory:
      return "History";
    case TracingDataType::kNaclCache:
      return "NaclCache";
    case TracingDataType::kPnaclCache:
      return "PnaclCache";
    case TracingDataType::kAutofillData:
      return "AutofillData";
    case TracingDataType::kAutofillOrigins:
@@ -1827,8 +1792,8 @@ void ChromeBrowsingDataRemoverDelegate::DisablePasswordsAutoSignin(
        CreateTaskCompletionClosure(
            TracingDataType::kDisableAutoSigninForProfilePasswords));
  }
  if (account_store && password_manager::features_util::IsAccountStorageEnabled(
                           profile_->GetPrefs(), sync_service)) {
  if (account_store &&
      password_manager::features_util::IsAccountStorageEnabled(sync_service)) {
    account_store->DisableAutoSignInForOrigins(
        url_filter,
        CreateTaskCompletionClosure(
Loading