Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into master.lion
  • Loading branch information
bluebox authored and bluebox committed Oct 6, 2020
2 parents 2359f3e + f23173d commit 8f675e6
Show file tree
Hide file tree
Showing 1,038 changed files with 19,992 additions and 8,290 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ Robert Goldberg <[email protected]>
Robert Hogan <[email protected]>
Robert Nagy <[email protected]>
Robert Sesek <[email protected]>
Roger Zanoni <[email protected]>
Roland Takacs <[email protected]>
Romain Pokrzywka <[email protected]>
Rosen Dash <[email protected]>
Expand Down
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,6 @@ if (!is_ios) {
"//third_party/catapult/common/py_utils/",
"//third_party/catapult/devil/",
"//third_party/catapult/dependency_manager/",
"//third_party/catapult/third_party/zipfile/",
"//third_party/catapult/third_party/typ/",
"//third_party/depot_tools/pylint",
"//third_party/depot_tools/pylint-1.5",
Expand Down
38 changes: 24 additions & 14 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,23 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling Skia
# and whatever else without interference from each other.
'skia_revision': 'e61500059aa7471a65631da81aae70bd1111e5be',
'skia_revision': '41d906752d13effa0d76eb1f34e576ee64e50953',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
'v8_revision': '8c06327064717567a0723117ea9e45ad0e0e98e5',
'v8_revision': 'f3c9f8a5fcd9c5f6f0f939da9bf00484e107136d',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling swarming_client
# and whatever else without interference from each other.
'swarming_revision': '44c13d73156581ea09b9389001e58c23a4b8d70a',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling ANGLE
# and whatever else without interference from each other.
'angle_revision': '34445b29ae408853f241346312f1ef1052abf198',
'angle_revision': '0ff24ae00769a812ea8e062f783939b475210551',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling SwiftShader
# and whatever else without interference from each other.
'swiftshader_revision': '6d93a63356e12fc9945ba0cd40a2125cc8802416',
'swiftshader_revision': 'afe6ca45b6da79f52d02b76bce03fc72cc322920',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling PDFium
# and whatever else without interference from each other.
Expand Down Expand Up @@ -258,15 +258,15 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling catapult
# and whatever else without interference from each other.
'catapult_revision': '83c2cb1060772ddd0e096c49918785afb11148b4',
'catapult_revision': '532e564f622742fc93a7f91dd3556d711e778a7e',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libFuzzer
# and whatever else without interference from each other.
'libfuzzer_revision': 'debe7d2d1982e540fbd6bd78604bf001753f9e74',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling devtools-frontend
# and whatever else without interference from each other.
'devtools_frontend_revision': 'c9e3d3e3a7e06e18fec7ef2599c397ecbbefa0da',
'devtools_frontend_revision': 'd93ee76664c71ffb1985078a6e0507f0ad275e0c',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling libprotobuf-mutator
# and whatever else without interference from each other.
Expand Down Expand Up @@ -318,7 +318,7 @@ vars = {
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
'dawn_revision': 'df909306835aaac8326dd6a06bac2efdca43ee01',
'dawn_revision': '326e14f34bb57e6b31a207831f1944f5c0f4ba55',
# Three lines of non-changing comments so that
# the commit queue can handle CLs rolling feed
# and whatever else without interference from each other.
Expand Down Expand Up @@ -901,7 +901,7 @@ deps = {
},

'src/third_party/depot_tools':
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '422c039e8e1b95402a10734e1c1e376084fbd15e',
Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd0b4e1976ca16b4090e79946f97d277acd124b5e',

'src/third_party/devtools-frontend/src':
Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'),
Expand Down Expand Up @@ -1154,7 +1154,7 @@ deps = {
},

'src/third_party/libvpx/source/libvpx':
Var('chromium_git') + '/webm/libvpx.git' + '@' + '97356acb50e212fcfb7c91715718ec70953f780c',
Var('chromium_git') + '/webm/libvpx.git' + '@' + '7e8ea22e4056a3da04b139fcc812a3f6937bbed7',

'src/third_party/libwebm/source':
Var('chromium_git') + '/webm/libwebm.git' + '@' + '51ca718c3adf0ddedacd7df25fe45f67dc5a9ce1',
Expand Down Expand Up @@ -1237,7 +1237,7 @@ deps = {
Var('chromium_git') + '/external/github.com/cisco/openh264' + '@' + '3dd5b80bc4f172dd82925bb259cb7c82348409c5',

'src/third_party/openscreen/src':
Var('chromium_git') + '/openscreen' + '@' + 'dee4a03873a1ee6e09a5c4c43faa653470eba795',
Var('chromium_git') + '/openscreen' + '@' + 'eee0513a73bc7ef3f913865f1b359ec6d29e4308',

'src/third_party/openxr/src': {
'url': Var('chromium_git') + '/external/github.com/KhronosGroup/OpenXR-SDK' + '@' + '9e97b73e7dd2bfc07745489d728f6a36665c648f',
Expand Down Expand Up @@ -1332,7 +1332,7 @@ deps = {
'packages': [
{
'package': 'fuchsia/third_party/aemu/linux-amd64',
'version': 'FgthknmEoQugl3GqOyqz_RsAjIMmeLsa960mZcmhE9UC'
'version': 'vFlac1-1kjZ_y-SJ2-rayRbMMsk39UWcF3yB3Z_UbB8C'
},
],
'condition': 'host_os == "linux" and checkout_fuchsia',
Expand Down Expand Up @@ -1486,7 +1486,7 @@ deps = {
},

'src/third_party/webrtc':
Var('webrtc_git') + '/src.git' + '@' + '9f0c89bd56603927d4032c314610636f1f2cb504',
Var('webrtc_git') + '/src.git' + '@' + 'eacbd972ab7e85e9d61851ced57aba1eb194de3d',

'src/third_party/libgifcodec':
Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'),
Expand Down Expand Up @@ -1558,7 +1558,7 @@ deps = {
Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'),

'src-internal': {
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@745402dd650a2ba8dc319f14a3db4351ae5269dc',
'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@df9f8642fc277854db10def19c8ce46e94f70eb7',
'condition': 'checkout_src_internal',
},

Expand Down Expand Up @@ -4931,12 +4931,22 @@ hooks = [
},

{
'name': 'fuchsia_sdk',
'name': 'Download Fuchsia SDK',
'pattern': '.',
'condition': 'checkout_fuchsia',
'action': [
'python',
'src/build/fuchsia/update_sdk.py',
],
},

{
'name': 'Download Fuchsia system images',
'pattern': '.',
'condition': 'checkout_fuchsia',
'action': [
'python',
'src/build/fuchsia/update_images.py',
'--boot-images={checkout_fuchsia_boot_images}',
],
},
Expand Down
3 changes: 2 additions & 1 deletion android_webview/browser/aw_feature_list_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ void AwFeatureListCreator::SetUpFieldTrials() {
client_ = std::make_unique<AwVariationsServiceClient>();
auto seed_store = std::make_unique<variations::VariationsSeedStore>(
local_state_.get(), /*initial_seed=*/std::move(seed),
/*signature_verification_enabled=*/g_signature_verification_enabled);
/*signature_verification_enabled=*/g_signature_verification_enabled,
/*use_first_run_prefs=*/false);

if (!seed_date.is_null())
seed_store->RecordLastFetchTime(seed_date);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "base/metrics/histogram_macros.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/content/browser/threat_details.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_browsing/core/common/safebrowsing_constants.h"
#include "components/safe_browsing/core/features.h"
#include "components/safe_browsing/core/triggers/trigger_manager.h"
Expand Down Expand Up @@ -96,6 +97,8 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsingBlockingPage::CreateBlockingPage(
AwBrowserContext* browser_context =
AwBrowserContext::FromWebContents(web_contents);
PrefService* pref_service = browser_context->GetPrefService();
// TODO(crbug.com/1134678): Set is_enhanced_protection_message_enabled once
// enhanced protection is supported on aw.
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options =
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions(
IsMainPageLoadBlocked(unsafe_resources),
Expand All @@ -105,8 +108,10 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsingBlockingPage::CreateBlockingPage(
safe_browsing::IsExtendedReportingPolicyManaged(*pref_service),
safe_browsing::IsEnhancedProtectionEnabled(*pref_service),
pref_service->GetBoolean(::prefs::kSafeBrowsingProceedAnywayDisabled),
false, // should_open_links_in_new_tab
false, // always_show_back_to_safety
false, // should_open_links_in_new_tab
false, // always_show_back_to_safety
false, // is_enhanced_protection_message_enabled
safe_browsing::IsSafeBrowsingPolicyManaged(*pref_service),
"cpn_safe_browsing_wv"); // help_center_article_link

ErrorUiType errorType =
Expand Down
1 change: 0 additions & 1 deletion android_webview/tools/run_cts.pydeps
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@
//third_party/catapult/devil/devil/utils/timeout_retry.py
//third_party/catapult/devil/devil/utils/watchdog_timer.py
//third_party/catapult/devil/devil/utils/zip_utils.py
//third_party/catapult/third_party/zipfile/zipfile_2_7_13.py
4 changes: 2 additions & 2 deletions ash/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ component("ash") {
"quick_answers/ui/quick_answers_pre_target_handler.h",
"quick_answers/ui/quick_answers_view.cc",
"quick_answers/ui/quick_answers_view.h",
"quick_answers/ui/user_consent_view.cc",
"quick_answers/ui/user_consent_view.h",
"quick_answers/ui/user_notice_view.cc",
"quick_answers/ui/user_notice_view.h",
"root_window_controller.cc",
"root_window_settings.cc",
"root_window_settings.h",
Expand Down
10 changes: 5 additions & 5 deletions ash/ash_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -2828,19 +2828,19 @@ Here are some things you can try to get started.
<message name="IDS_ASH_QUICK_ANSWERS_UNIT_CONVERSION_INTENT" desc="Display text of unit conversion intent. This is used in the title of Quick Answers user consent dialog.">
conversion
</message>
<message name="IDS_ASH_QUICK_ANSWERS_USER_CONSENT_VIEW_TITLE_TEXT" desc="Title text of the dialog that opens up to seek user-consent for the Quick Answers feature.">
<message name="IDS_ASH_QUICK_ANSWERS_USER_NOTICE_VIEW_TITLE_TEXT" desc="Title text of the dialog that opens up to seek user-consent for the Quick Answers feature.">
Get info related to your selection
</message>
<message name="IDS_ASH_QUICK_ANSWERS_USER_CONSENT_VIEW_TITLE_TEXT_WITH_INTENT" desc="Title text of the dialog that opens up to seek user-consent for the Quick Answers feature when supported intent is generated.">
<message name="IDS_ASH_QUICK_ANSWERS_USER_NOTICE_VIEW_TITLE_TEXT_WITH_INTENT" desc="Title text of the dialog that opens up to seek user-consent for the Quick Answers feature when supported intent is generated.">
Get the <ph name="intent">$1<ex>definition</ex></ph> for "<ph name="query">$2<ex>unfathomable</ex></ph>"
</message>
<message name="IDS_ASH_QUICK_ANSWERS_USER_CONSENT_VIEW_DESC_TEXT" desc="Description in the dialog that opens up to seek user-consent for the Quick Answers feature.">
<message name="IDS_ASH_QUICK_ANSWERS_USER_NOTICE_VIEW_DESC_TEXT" desc="Description in the dialog that opens up to seek user-consent for the Quick Answers feature.">
With a right-click or a long press, Assistant shows info such as the definition or unit conversion for your selection.
</message>
<message name="IDS_ASH_QUICK_ANSWERS_USER_CONSENT_VIEW_MANAGE_SETTINGS_BUTTON" desc="Display text on the Manage-Settings button in the dialog that opens up to seek user-consent for the Quick Answers feature.">
<message name="IDS_ASH_QUICK_ANSWERS_USER_NOTICE_VIEW_MANAGE_SETTINGS_BUTTON" desc="Display text on the Manage-Settings button in the dialog that opens up to seek user-consent for the Quick Answers feature.">
Manage Settings
</message>
<message name="IDS_ASH_QUICK_ANSWERS_USER_CONSENT_VIEW_GRANT_CONSENT_BUTTON" desc="Display text on the Grant-Consent button in the dialog that opens up to seek user-consent for the Quick Answers feature.">
<message name="IDS_ASH_QUICK_ANSWERS_USER_NOTICE_VIEW_ACCEPT_BUTTON" desc="Display text on the accept button in the dialog that opens up to seek user-consent for the Quick Answers feature.">
Got it
</message>

Expand Down
60 changes: 60 additions & 0 deletions ash/display/window_tree_host_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
#include "ash/public/cpp/ash_features.h"
#include "ash/root_window_controller.h"
#include "ash/root_window_settings.h"
#include "ash/session/session_controller_impl.h"
#include "ash/shell.h"
#include "ash/system/status_area_widget.h"
#include "ash/system/unified/unified_system_tray.h"
#include "ash/wm/window_util.h"
#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_functions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
Expand Down Expand Up @@ -67,6 +69,12 @@ int64_t primary_display_id = -1;
// The default memory limit: 512mb.
const char kUICompositorDefaultMemoryLimitMB[] = "512";

// An UMA signal for the current effective resolution is sent at this rate. This
// keeps track of the effective resolution most used on internal display by the
// user.
constexpr base::TimeDelta kEffectiveResolutionRepeatingDelay =
base::TimeDelta::FromMinutes(30);

display::DisplayManager* GetDisplayManager() {
return Shell::Get()->display_manager();
}
Expand Down Expand Up @@ -98,6 +106,47 @@ aura::Window* GetWindow(AshWindowTreeHost* ash_host) {
return ash_host->AsWindowTreeHost()->window();
}

// Returns the index to the enum - |EffectiveResolution|. The enum value
// represents the resolution that exactly matches the primary display's
// effective resolution.
int GetEffectiveResolutionUMAIndex(const display::Display& display) {
const gfx::Size effective_size = display.size();

// The UMA enum index for portrait mode has 1 subtracted from itself. This
// differentiates it from the landscape mode.
return effective_size.width() > effective_size.height()
? effective_size.width() * effective_size.height()
: effective_size.width() * effective_size.height() - 1;
}

void RepeatingEffectiveResolutionUMA(base::RepeatingTimer* timer,
bool is_first_run) {
display::Display internal_display;
const auto* session_controller = Shell::Get()->session_controller();

// Record the UMA only when this is an active user session and the
// internal display is present.
if (display::Display::HasInternalDisplay() &&
display::Screen::GetScreen()->GetDisplayWithDisplayId(
display::Display::InternalDisplayId(), &internal_display) &&
session_controller->IsActiveUserSessionStarted() &&
session_controller->GetSessionState() ==
session_manager::SessionState::ACTIVE) {
base::UmaHistogramSparse(
"Ash.Display.InternalDisplay.ActiveEffectiveResolution",
GetEffectiveResolutionUMAIndex(internal_display));
}

// The first run of the repeating timer is half the actual delay. Reset the
// timer after the first run with the correct delay.
if (is_first_run && timer) {
timer->Start(
FROM_HERE, kEffectiveResolutionRepeatingDelay,
base::BindRepeating(&RepeatingEffectiveResolutionUMA,
nullptr /*timer=*/, false /*is_first_run=*/));
}
}

} // namespace

// A utility class to store/restore focused/active window
Expand Down Expand Up @@ -191,12 +240,23 @@ void WindowTreeHostManager::Start() {
->content_protection_manager()
->AddObserver(this);
Shell::Get()->display_manager()->set_delegate(this);

// Start a repeating timer to send UMA at fixed intervals. The first run is at
// half the delay time.
effective_resolution_UMA_timer_ = std::make_unique<base::RepeatingTimer>();
effective_resolution_UMA_timer_->Start(
FROM_HERE, kEffectiveResolutionRepeatingDelay / 2,
base::BindRepeating(&RepeatingEffectiveResolutionUMA,
effective_resolution_UMA_timer_.get(),
true /*is_first_run=*/));
}

void WindowTreeHostManager::Shutdown() {
for (auto& observer : observers_)
observer.OnWindowTreeHostManagerShutdown();

effective_resolution_UMA_timer_->Reset();

// Unset the display manager's delegate here because
// DisplayManager outlives WindowTreeHostManager.
Shell::Get()->display_manager()->set_delegate(nullptr);
Expand Down
5 changes: 5 additions & 0 deletions ash/display/window_tree_host_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host_observer.h"
#include "ui/base/ime/input_method.h"
Expand Down Expand Up @@ -205,6 +206,10 @@ class ASH_EXPORT WindowTreeHostManager
// should be moved after a display configuration change.
int64_t cursor_display_id_for_restore_;

// A repeating timer to trigger sending UMA metrics for primary display's
// effective resolution at fixed intervals.
std::unique_ptr<base::RepeatingTimer> effective_resolution_UMA_timer_;

base::WeakPtrFactory<WindowTreeHostManager> weak_ptr_factory_{this};

DISALLOW_COPY_AND_ASSIGN(WindowTreeHostManager);
Expand Down
6 changes: 4 additions & 2 deletions ash/login/ui/login_big_user_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

#include "ash/public/cpp/login_constants.h"
#include "ash/shell.h"
#include "ash/style/ash_color_provider.h"
#include "ash/style/default_color_constants.h"
#include "ash/style/default_colors.h"
#include "ash/wallpaper/wallpaper_controller_impl.h"
#include "components/account_id/account_id.h"
#include "ui/views/background.h"
Expand Down Expand Up @@ -119,7 +120,8 @@ void LoginBigUserView::OnWallpaperBlurChanged() {
layer()->SetFillsBoundsOpaquely(false);
SetBackground(views::CreateBackgroundFromPainter(
views::Painter::CreateSolidRoundRectPainter(
SkColorSetA(AshColorProvider::Get()->GetLoginBackgroundBaseColor(),
SkColorSetA(DeprecatedGetLoginBackgroundBaseColor(
kLoginBackgroundBaseColor),
login_constants::kNonBlurredWallpaperBackgroundAlpha),
login_constants::kNonBlurredWallpaperBackgroundRadiusDp)));
}
Expand Down
Loading

0 comments on commit 8f675e6

Please sign in to comment.