mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 47f145b53f | |||
| b8f64f5647 | |||
| d1c61d67f6 | |||
| 8c8ba4780b | |||
| fd4ebb9451 | |||
| 3ef1b41ede | |||
| 3f5b4b7412 | |||
| 6fd9b6bece | |||
| dd2e11f361 |
@@ -1 +1 @@
|
||||
145.0.7632.109
|
||||
145.0.7632.116
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -32,6 +32,8 @@ namespace helium {
|
||||
constexpr const char kHeliumNoiseCanvasCommandLine[] = "helium-noise-canvas";
|
||||
constexpr const char kHeliumNoiseAudioCommandLine[] = "helium-noise-audio";
|
||||
@@ -34,6 +34,8 @@ namespace helium {
|
||||
constexpr const char kHeliumNoiseCpuCoresCommandLine[] =
|
||||
"helium-noise-hw-concurrency";
|
||||
|
||||
+ constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
|
||||
+
|
||||
@@ -11,10 +11,10 @@
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_CHOICES_H_ */
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -28,4 +28,8 @@
|
||||
"[Helium Noise] Jitter audio context data",
|
||||
"Adds insignificant jitter to audio data to deceive AudioContext-based fingerprinting. Helium flag.",
|
||||
kOsAll, FEATURE_VALUE_TYPE(blink::features::kHeliumNoiseAudio)},
|
||||
@@ -33,4 +33,8 @@
|
||||
"Randomizes the number of cores returned by "
|
||||
"`navigator.hardwareConcurrency` in a reasonable range. Helium flag.",
|
||||
kOsAll, FEATURE_VALUE_TYPE(blink::features::kHeliumNoiseCpuCores)},
|
||||
+ {helium::kMiddleClickAutoscrollCommandLine,
|
||||
+ "Middle Click Autoscroll",
|
||||
+ "Enables autoscroll on middle click. Helium flag, Chromium feature.",
|
||||
@@ -22,9 +22,9 @@
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -44,6 +44,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCanvas);
|
||||
@@ -45,6 +45,8 @@ BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseAudio);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCpuCores);
|
||||
|
||||
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumMiddleClickAutoscroll);
|
||||
+
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -11902,6 +11902,9 @@ Check your passwords anytime in <ph name
|
||||
<message name="IDS_TAB_CXMENU_DUPLICATE" desc="The label of the 'Duplicate' Tab context menu item.">
|
||||
Duplicate
|
||||
</message>
|
||||
+ <message name="IDS_TAB_CXMENU_HIBERNATE" desc="The label of the 'Hibernate' Tab context menu item.">
|
||||
+ Hibernate
|
||||
+ </message>
|
||||
<message name="IDS_TAB_CXMENU_CLOSETAB" desc="The label of the tab context menu item for closing one or more tabs.">
|
||||
Close
|
||||
</message>
|
||||
@@ -12021,6 +12024,9 @@ Check your passwords anytime in <ph name
|
||||
<message name="IDS_TAB_CXMENU_DUPLICATE" desc="In Title Case: The label of the 'Duplicate' Tab context menu item.">
|
||||
Duplicate
|
||||
</message>
|
||||
+ <message name="IDS_TAB_CXMENU_HIBERNATE" desc="In Title Case: The label of the 'Hibernate' Tab context menu item.">
|
||||
+ Hibernate
|
||||
+ </message>
|
||||
<message name="IDS_TAB_CXMENU_CLOSETAB" desc="In Title Case: The label of the tab context menu item for closing one or more tabs.">
|
||||
Close
|
||||
</message>
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.h
|
||||
@@ -790,6 +790,7 @@ class TabStripModel {
|
||||
CommandGlicSwitchToRecentConversation,
|
||||
CommandGlicUnshare,
|
||||
#endif
|
||||
+ CommandDiscard,
|
||||
CommandLast
|
||||
};
|
||||
// LINT.ThenChange(//tools/metrics/histograms/metadata/tab/histograms.xml:TabContextMenuCommand)
|
||||
--- a/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_strip_model.cc
|
||||
@@ -45,8 +45,11 @@
|
||||
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
||||
#include "chrome/browser/extensions/tab_helper.h"
|
||||
#include "chrome/browser/lifetime/browser_shutdown.h"
|
||||
+#include "chrome/browser/performance_manager/policies/discard_eligibility_policy.h"
|
||||
+#include "chrome/browser/performance_manager/public/user_tuning/user_tuning_utils.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/reading_list/reading_list_model_factory.h"
|
||||
+#include "chrome/browser/resource_coordinator/lifecycle_unit_state.mojom.h"
|
||||
#include "chrome/browser/resource_coordinator/tab_helper.h"
|
||||
#include "chrome/browser/send_tab_to_self/send_tab_to_self_util.h"
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
|
||||
@@ -91,6 +94,7 @@
|
||||
#include "components/content_settings/core/common/content_settings.h"
|
||||
#include "components/content_settings/core/common/content_settings_types.h"
|
||||
#include "components/feature_engagement/public/feature_constants.h"
|
||||
+#include "components/performance_manager/public/performance_manager.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/reading_list/core/reading_list_model.h"
|
||||
#include "components/tab_groups/tab_group_id.h"
|
||||
@@ -164,6 +168,53 @@ bool ShouldForgetOpenersForTransition(ui
|
||||
ui::PAGE_TRANSITION_AUTO_TOPLEVEL);
|
||||
}
|
||||
|
||||
+using DiscardEligibilityPolicy =
|
||||
+ performance_manager::policies::DiscardEligibilityPolicy;
|
||||
+using CanDiscardResult = performance_manager::policies::CanDiscardResult;
|
||||
+
|
||||
+DiscardEligibilityPolicy* GetDiscardEligibilityPolicy() {
|
||||
+ if (!performance_manager::PerformanceManager::IsAvailable()) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ return DiscardEligibilityPolicy::GetFromGraph(
|
||||
+ performance_manager::PerformanceManager::GetGraph());
|
||||
+}
|
||||
+
|
||||
+base::WeakPtr<performance_manager::PageNode> GetDiscardCandidatePageNode(
|
||||
+ const TabStripModel* tab_strip_model,
|
||||
+ int index,
|
||||
+ DiscardEligibilityPolicy* eligibility_policy) {
|
||||
+ CHECK(eligibility_policy);
|
||||
+
|
||||
+ // The active tab can't be discarded.
|
||||
+ if (index == tab_strip_model->active_index()) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ WebContents* const contents = tab_strip_model->GetWebContentsAt(index);
|
||||
+ if (!contents || contents->WasDiscarded()) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ base::WeakPtr<performance_manager::PageNode> page_node =
|
||||
+ performance_manager::PerformanceManager::
|
||||
+ GetPrimaryPageNodeForWebContents(contents);
|
||||
+
|
||||
+ if (!page_node) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ CanDiscardResult can_discard_result = eligibility_policy->CanDiscard(
|
||||
+ page_node.get(), ::mojom::LifecycleUnitDiscardReason::PROACTIVE,
|
||||
+ base::TimeDelta());
|
||||
+
|
||||
+ if (can_discard_result != CanDiscardResult::kEligible) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ return page_node;
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
TabGroupModelFactory::TabGroupModelFactory() {
|
||||
@@ -2488,6 +2539,21 @@ bool TabStripModel::IsContextMenuCommand
|
||||
case CommandReload:
|
||||
return delegate_->CanReload();
|
||||
|
||||
+ case CommandDiscard: {
|
||||
+ auto* const eligibility_policy = GetDiscardEligibilityPolicy();
|
||||
+ if (!eligibility_policy) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ const std::vector<int> indices = GetIndicesForCommand(context_index);
|
||||
+ for (int index : indices) {
|
||||
+ if (GetDiscardCandidatePageNode(this, index, eligibility_policy)) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
case CommandCloseOtherTabs:
|
||||
case CommandCloseTabsToRight: {
|
||||
return !GetIndicesClosedByCommand(context_index, command_id).empty();
|
||||
@@ -2668,6 +2734,27 @@ void TabStripModel::ExecuteContextMenuCo
|
||||
}
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ case CommandDiscard: {
|
||||
+ auto* const eligibility_policy = GetDiscardEligibilityPolicy();
|
||||
+ if (!eligibility_policy) {
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ const std::vector<int> indices = GetIndicesForCommand(context_index);
|
||||
+ for (int index : indices) {
|
||||
+ base::WeakPtr<performance_manager::PageNode> page_node =
|
||||
+ GetDiscardCandidatePageNode(this, index, eligibility_policy);
|
||||
+ if (!page_node) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ performance_manager::user_tuning::DiscardPage(
|
||||
+ page_node.get(), ::mojom::LifecycleUnitDiscardReason::PROACTIVE,
|
||||
+ /*ignore_minimum_time_in_background=*/true);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
case CommandCloseTab: {
|
||||
base::UmaHistogramCounts1000("Tab.ContextMenu.CloseTab.SelectedTabsCount",
|
||||
--- a/chrome/browser/ui/tabs/tab_menu_model.cc
|
||||
+++ b/chrome/browser/ui/tabs/tab_menu_model.cc
|
||||
@@ -375,6 +375,9 @@ void TabMenuModel::Build(TabStripModel*
|
||||
}
|
||||
|
||||
AddSeparator(ui::NORMAL_SEPARATOR);
|
||||
+
|
||||
+ AddItemWithStringId(TabStripModel::CommandDiscard, IDS_TAB_CXMENU_HIBERNATE);
|
||||
+
|
||||
AddItemWithStringId(TabStripModel::CommandCloseTab, IDS_TAB_CXMENU_CLOSETAB);
|
||||
AddItemWithStringId(TabStripModel::CommandCloseOtherTabs,
|
||||
IDS_TAB_CXMENU_CLOSEOTHERTABS);
|
||||
@@ -0,0 +1,169 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -31,6 +31,8 @@ namespace helium {
|
||||
constexpr const char kHeliumNoiseCommandLine[] = "helium-noise";
|
||||
constexpr const char kHeliumNoiseCanvasCommandLine[] = "helium-noise-canvas";
|
||||
constexpr const char kHeliumNoiseAudioCommandLine[] = "helium-noise-audio";
|
||||
+ constexpr const char kHeliumNoiseCpuCoresCommandLine[] =
|
||||
+ "helium-noise-hw-concurrency";
|
||||
|
||||
} // namespace helium
|
||||
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -28,4 +28,9 @@
|
||||
"[Helium Noise] Jitter audio context data",
|
||||
"Adds insignificant jitter to audio data to deceive AudioContext-based fingerprinting. Helium flag.",
|
||||
kOsAll, FEATURE_VALUE_TYPE(blink::features::kHeliumNoiseAudio)},
|
||||
+ {helium::kHeliumNoiseCpuCoresCommandLine,
|
||||
+ "[Helium Noise] Randomize number of CPU cores",
|
||||
+ "Randomizes the number of cores returned by "
|
||||
+ "`navigator.hardwareConcurrency` in a reasonable range. Helium flag.",
|
||||
+ kOsAll, FEATURE_VALUE_TYPE(blink::features::kHeliumNoiseCpuCores)},
|
||||
#endif /* CHROME_BROWSER_HELIUM_FLAG_ENTRIES_H_ */
|
||||
--- a/content/browser/helium_noise/noise_token_data.cc
|
||||
+++ b/content/browser/helium_noise/noise_token_data.cc
|
||||
@@ -65,6 +65,8 @@ HeliumNoiseTokenData::HeliumNoiseTokenDa
|
||||
blink::HeliumNoiseToken(base::RandUint64());
|
||||
session_tokens_[blink::HeliumNoiseFeature::kAudio] =
|
||||
blink::HeliumNoiseToken(base::RandUint64());
|
||||
+ session_tokens_[blink::HeliumNoiseFeature::kHardware] =
|
||||
+ blink::HeliumNoiseToken(base::RandUint64());
|
||||
}
|
||||
|
||||
// static
|
||||
--- a/third_party/blink/common/features.cc
|
||||
+++ b/third_party/blink/common/features.cc
|
||||
@@ -51,6 +51,9 @@ BASE_FEATURE(kHeliumNoiseCanvas,
|
||||
BASE_FEATURE(kHeliumNoiseAudio,
|
||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
+// navigator.hardwareConcurrency noising for fingerprint protection.
|
||||
+BASE_FEATURE(kHeliumNoiseCpuCores, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+
|
||||
// Controls whether to include information about the page's open popup in
|
||||
// AIPageContent.
|
||||
BASE_FEATURE(kAIPageContentIncludePopupWindows,
|
||||
--- a/third_party/blink/public/common/features.h
|
||||
+++ b/third_party/blink/public/common/features.h
|
||||
@@ -43,6 +43,7 @@ BLINK_COMMON_EXPORT extern const base::F
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoise);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCanvas);
|
||||
BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseAudio);
|
||||
+BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kHeliumNoiseCpuCores);
|
||||
|
||||
// Controls whether to include information about the page's open popup in
|
||||
// AIPageContent.
|
||||
--- a/third_party/blink/public/common/helium_noise/noise_token.h
|
||||
+++ b/third_party/blink/public/common/helium_noise/noise_token.h
|
||||
@@ -23,6 +23,7 @@ namespace blink {
|
||||
enum class HeliumNoiseFeature {
|
||||
kCanvas,
|
||||
kAudio,
|
||||
+ kHardware,
|
||||
};
|
||||
|
||||
// A wrapper class for a uint64_t noise token.
|
||||
--- a/third_party/blink/public/mojom/helium_noise/noise_token.mojom
|
||||
+++ b/third_party/blink/public/mojom/helium_noise/noise_token.mojom
|
||||
@@ -8,6 +8,7 @@ module blink.mojom;
|
||||
enum HeliumNoiseFeature {
|
||||
kCanvas,
|
||||
kAudio,
|
||||
+ kHardware,
|
||||
};
|
||||
|
||||
// Typemapped to blink::HeliumNoiseToken
|
||||
--- a/third_party/blink/renderer/core/execution_context/navigator_base.cc
|
||||
+++ b/third_party/blink/renderer/core/execution_context/navigator_base.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
||||
#include "third_party/blink/renderer/core/frame/navigator_concurrent_hardware.h"
|
||||
+#include "third_party/blink/renderer/core/helium_noise/helium_noise_hash.h"
|
||||
#include "third_party/blink/renderer/core/probe/core_probes.h"
|
||||
#include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
|
||||
|
||||
@@ -40,6 +41,52 @@ String GetReducedNavigatorPlatform() {
|
||||
#endif
|
||||
}
|
||||
|
||||
+constexpr const unsigned kMinNoisedCores = 2;
|
||||
+constexpr const unsigned kMaxNoisedCores = 16;
|
||||
+
|
||||
+std::vector<unsigned> PossibleValuesForCoreCount(unsigned n) {
|
||||
+ // Clamp the number of cores between [2..=16], as other
|
||||
+ // configurations are less common.
|
||||
+ n = std::clamp(n, kMinNoisedCores, kMaxNoisedCores);
|
||||
+
|
||||
+ // A machine with a odd number of CPUs is very uncommon.
|
||||
+ // Floor it to the lower even number.
|
||||
+ if (n % 2) {
|
||||
+ n -= 1;
|
||||
+ }
|
||||
+
|
||||
+ // If we can subtract some amount and still end up with
|
||||
+ // a common CPU count (which is the case for most configurations)
|
||||
+ // let's add it to the list of possible values.
|
||||
+ std::vector<unsigned> candidates = {n};
|
||||
+ if (n > 4) {
|
||||
+ candidates.push_back(n - 4);
|
||||
+ }
|
||||
+
|
||||
+ if (n > 2) {
|
||||
+ candidates.push_back(n - 2);
|
||||
+ }
|
||||
+
|
||||
+ return candidates;
|
||||
+}
|
||||
+
|
||||
+unsigned MaybeNoiseCoreCount(ExecutionContext* execution_context, unsigned n) {
|
||||
+ if (!base::FeatureList::IsEnabled(blink::features::kHeliumNoiseCpuCores) ||
|
||||
+ !execution_context ||
|
||||
+ !execution_context->GetHeliumNoiseTokens().contains(
|
||||
+ HeliumNoiseFeature::kHardware)) {
|
||||
+ return n;
|
||||
+ }
|
||||
+
|
||||
+ auto token_hash =
|
||||
+ HeliumNoiseHash(execution_context->GetHeliumNoiseTokens().at(
|
||||
+ HeliumNoiseFeature::kHardware));
|
||||
+ token_hash.Update(n);
|
||||
+
|
||||
+ auto values = PossibleValuesForCoreCount(n);
|
||||
+ return values[token_hash.GetValueBelow(values.size())];
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
NavigatorBase::NavigatorBase(ExecutionContext* context)
|
||||
@@ -81,7 +128,7 @@ unsigned int NavigatorBase::hardwareConc
|
||||
|
||||
probe::ApplyHardwareConcurrencyOverride(
|
||||
probe::ToCoreProbeSink(GetExecutionContext()), hardware_concurrency);
|
||||
- return hardware_concurrency;
|
||||
+ return MaybeNoiseCoreCount(GetExecutionContext(), hardware_concurrency);
|
||||
}
|
||||
|
||||
ExecutionContext* NavigatorBase::GetUAExecutionContext() const {
|
||||
--- a/third_party/blink/public/common/helium_noise/noise_token_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/helium_noise/noise_token_mojom_traits.h
|
||||
@@ -27,6 +27,8 @@ struct BLINK_COMMON_EXPORT
|
||||
return blink::mojom::HeliumNoiseFeature::kCanvas;
|
||||
case blink::HeliumNoiseFeature::kAudio:
|
||||
return blink::mojom::HeliumNoiseFeature::kAudio;
|
||||
+ case blink::HeliumNoiseFeature::kHardware:
|
||||
+ return blink::mojom::HeliumNoiseFeature::kHardware;
|
||||
}
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -40,6 +42,9 @@ struct BLINK_COMMON_EXPORT
|
||||
case blink::mojom::HeliumNoiseFeature::kAudio:
|
||||
*out = blink::HeliumNoiseFeature::kAudio;
|
||||
return true;
|
||||
+ case blink::mojom::HeliumNoiseFeature::kHardware:
|
||||
+ *out = blink::HeliumNoiseFeature::kHardware;
|
||||
+ return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/chrome/common/chrome_features.cc
|
||||
+++ b/chrome/common/chrome_features.cc
|
||||
@@ -1237,7 +1237,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
|
||||
@@ -1243,7 +1243,7 @@ BASE_FEATURE(kHttpsFirstBalancedMode, ba
|
||||
// Automatically enables HTTPS-First Mode in a balanced configuration when
|
||||
// possible.
|
||||
BASE_FEATURE(kHttpsFirstBalancedModeAutoEnable,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/chrome/browser/helium_flag_choices.h
|
||||
+++ b/chrome/browser/helium_flag_choices.h
|
||||
@@ -33,6 +33,8 @@ namespace helium {
|
||||
constexpr const char kHeliumNoiseAudioCommandLine[] = "helium-noise-audio";
|
||||
@@ -35,6 +35,8 @@ namespace helium {
|
||||
"helium-noise-hw-concurrency";
|
||||
|
||||
constexpr const char kMiddleClickAutoscrollCommandLine[] = "middle-click-autoscroll";
|
||||
+ constexpr const char kHeliumCompactLocationWidthCommandLine[] =
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
--- a/chrome/browser/helium_flag_entries.h
|
||||
+++ b/chrome/browser/helium_flag_entries.h
|
||||
@@ -32,4 +32,8 @@
|
||||
@@ -37,4 +37,8 @@
|
||||
"Middle Click Autoscroll",
|
||||
"Enables autoscroll on middle click. Helium flag, Chromium feature.",
|
||||
kOsDesktop, FEATURE_VALUE_TYPE(blink::features::kHeliumMiddleClickAutoscroll)},
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
@@ -130,6 +130,7 @@ input {
|
||||
@@ -131,6 +131,7 @@ input {
|
||||
padding: 0 4px;
|
||||
text-align: center;
|
||||
width: 5ch;
|
||||
@@ -93,13 +93,12 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
@@ -53,7 +54,8 @@ viewer-toolbar {
|
||||
@@ -53,7 +54,7 @@ viewer-toolbar {
|
||||
overflow: hidden;
|
||||
transition: transform 250ms cubic-bezier(.6, 0, 0, 1), visibility 250ms;
|
||||
visibility: visible;
|
||||
- width: var(--viewer-pdf-sidenav-width);
|
||||
+ max-width: var(--viewer-pdf-sidenav-width);
|
||||
+ min-width: var(--viewer-pdf-sidenav-min-width);
|
||||
}
|
||||
|
||||
#sidenav-container.floating {
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
};
|
||||
--- a/chrome/app/generated_resources.grd
|
||||
+++ b/chrome/app/generated_resources.grd
|
||||
@@ -13684,6 +13684,9 @@ Check your passwords anytime in <ph name
|
||||
@@ -13690,6 +13690,9 @@ Check your passwords anytime in <ph name
|
||||
<message name="IDS_EXTENSIONS_INSTALL_LOCATION_SHARED_MODULE" desc="The text explaining the the installation of the extension was because of extensions that depend on this shared module">
|
||||
Installed because of dependent extension(s).
|
||||
</message>
|
||||
|
||||
@@ -214,6 +214,7 @@ helium/core/increase-incognito-storage-quota.patch
|
||||
helium/core/noise/core.patch
|
||||
helium/core/noise/canvas.patch
|
||||
helium/core/noise/audio.patch
|
||||
helium/core/noise/hardware-concurrency.patch
|
||||
|
||||
helium/core/reduce-accept-language-headers.patch
|
||||
helium/core/disable-ad-topics-and-etc.patch
|
||||
@@ -231,6 +232,7 @@ helium/core/tab-cycling-mru.patch
|
||||
helium/core/component-updates.patch
|
||||
helium/core/fixups-component-setup.patch
|
||||
helium/core/fixups-chrome-webstore-script.patch
|
||||
helium/core/hibernate-tab-context-menu.patch
|
||||
|
||||
helium/settings/settings-page-icons.patch
|
||||
helium/settings/move-search-suggest.patch
|
||||
|
||||
@@ -267,6 +267,100 @@
|
||||
|
||||
RegisterCommerceHeuristicsComponent(cus);
|
||||
|
||||
--- a/chrome/browser/contextual_cueing/contextual_cueing_helper.cc
|
||||
+++ b/chrome/browser/contextual_cueing/contextual_cueing_helper.cc
|
||||
@@ -382,35 +382,6 @@ void ContextualCueingHelper::OnCueingDec
|
||||
return;
|
||||
}
|
||||
|
||||
- // Handle side panel auto-open case: bypass nudge and open panel directly.
|
||||
- // If auto-open fails or is disabled, falls through to standard nudge.
|
||||
- const bool should_open_side_panel =
|
||||
- decision_result->auto_open_eligible &&
|
||||
- base::FeatureList::IsEnabled(kEnableAutoOpenGlicSidePanel);
|
||||
-
|
||||
- if (should_open_side_panel) {
|
||||
- auto* tab_interface = tabs::TabInterface::GetFromContents(web_contents());
|
||||
- auto* browser_window_interface = tab_interface->GetBrowserWindowInterface();
|
||||
- Profile* profile =
|
||||
- Profile::FromBrowserContext(web_contents()->GetBrowserContext());
|
||||
- auto* glic_service =
|
||||
- glic::GlicKeyedServiceFactory::GetGlicKeyedService(profile);
|
||||
- if (glic_service && browser_window_interface) {
|
||||
- const bool auto_send_prompt =
|
||||
- decision_result->auto_send_params.has_value() &&
|
||||
- decision_result->auto_send_params->auto_send_eligible &&
|
||||
- !prompt_suggestion.empty();
|
||||
- glic_service->ToggleUI(
|
||||
- browser_window_interface,
|
||||
- /*prevent_close=*/true,
|
||||
- glic::mojom::InvocationSource::kAutoOpenedByContextualCue,
|
||||
- prompt_suggestion.empty() ? std::nullopt
|
||||
- : std::make_optional(prompt_suggestion),
|
||||
- auto_send_prompt);
|
||||
- return;
|
||||
- }
|
||||
- // Fall through to nudge if side panel open fails.
|
||||
- }
|
||||
|
||||
GetGlicNudgeController()->UpdateNudgeLabel(
|
||||
web_contents(), cue_label,
|
||||
--- a/chrome/browser/extensions/api/pdf_viewer_private/BUILD.gn
|
||||
+++ b/chrome/browser/extensions/api/pdf_viewer_private/BUILD.gn
|
||||
@@ -18,7 +18,6 @@ source_set("pdf_viewer_private") {
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
- "//chrome/browser/glic",
|
||||
"//chrome/browser/pdf",
|
||||
"//chrome/browser/pdf:pdf_pref_names",
|
||||
"//chrome/browser/profiles:profile",
|
||||
@@ -48,8 +47,6 @@ source_set("browser_tests") {
|
||||
# sources = [ "pdf_viewer_private_browsertest.cc" ]
|
||||
deps = [
|
||||
":pdf_viewer_private",
|
||||
- "//chrome/browser/glic",
|
||||
- "//chrome/browser/glic/test_support",
|
||||
"//chrome/test:test_support",
|
||||
"//content/test:test_support",
|
||||
]
|
||||
--- a/chrome/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc
|
||||
+++ b/chrome/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc
|
||||
@@ -12,9 +12,6 @@
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/values.h"
|
||||
-#include "chrome/browser/glic/public/glic_enabling.h"
|
||||
-#include "chrome/browser/glic/public/glic_keyed_service.h"
|
||||
-#include "chrome/browser/glic/public/glic_keyed_service_factory.h"
|
||||
#include "chrome/browser/pdf/pdf_pref_names.h"
|
||||
#include "chrome/browser/pdf/pdf_viewer_stream_manager.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -306,24 +303,7 @@ ExtensionFunction::ResponseAction PdfVie
|
||||
return RespondNow(Error("No tab."));
|
||||
}
|
||||
|
||||
- if (!glic::GlicEnabling::IsEnabledForProfile(
|
||||
- Profile::FromBrowserContext(contents->GetBrowserContext()))) {
|
||||
return RespondNow(Error("Glic is not enabled."));
|
||||
- }
|
||||
-
|
||||
- glic::GlicKeyedService* glic_service =
|
||||
- glic::GlicKeyedServiceFactory::GetGlicKeyedService(
|
||||
- contents->GetBrowserContext());
|
||||
- CHECK(glic_service);
|
||||
-
|
||||
- glic_service->ToggleUI(tab_interface->GetBrowserWindowInterface(),
|
||||
- /*prevent_close=*/true,
|
||||
- glic::mojom::InvocationSource::kPdfSummarizeButton,
|
||||
- /*prompt_suggestion=*/"summarize the pdf",
|
||||
- /*auto_send=*/true);
|
||||
-
|
||||
- success = true;
|
||||
- return RespondNow(NoArguments());
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
--- a/chrome/browser/navigation_predictor/navigation_predictor.cc
|
||||
+++ b/chrome/browser/navigation_predictor/navigation_predictor.cc
|
||||
@@ -17,8 +17,6 @@
|
||||
@@ -389,9 +483,19 @@
|
||||
}
|
||||
|
||||
void PasswordChangeDelegateImpl::OnLoginStateCheckResult(
|
||||
--- a/chrome/browser/pdf/BUILD.gn
|
||||
+++ b/chrome/browser/pdf/BUILD.gn
|
||||
@@ -32,7 +32,6 @@ source_set("pdf") {
|
||||
"//build:chromeos_buildflags",
|
||||
"//chrome/browser:browser_process",
|
||||
"//chrome/browser:resources",
|
||||
- "//chrome/browser/glic",
|
||||
"//chrome/browser/pdf:pdf_pref_names",
|
||||
"//chrome/browser/profiles:profile",
|
||||
"//chrome/browser/resources/pdf:resources",
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -121,7 +121,6 @@ base::Value::Dict GetPdfViewerStrings()
|
||||
@@ -126,7 +126,6 @@ base::Value::Dict GetPdfViewerStrings()
|
||||
{"rotationStateLabel90", IDS_PDF_ROTATION_STATE_LABEL_90},
|
||||
{"rotationStateLabel180", IDS_PDF_ROTATION_STATE_LABEL_180},
|
||||
{"rotationStateLabel270", IDS_PDF_ROTATION_STATE_LABEL_270},
|
||||
@@ -635,7 +739,7 @@
|
||||
|
||||
--- a/chrome/browser/resources/pdf/pdf_viewer.html
|
||||
+++ b/chrome/browser/resources/pdf/pdf_viewer.html
|
||||
@@ -105,10 +105,6 @@ import {AnnotationMode} from './constant
|
||||
@@ -108,10 +108,6 @@ import {AnnotationMode} from './constant
|
||||
</cr-page-selector>
|
||||
` : ''}
|
||||
</if>
|
||||
@@ -683,9 +787,11 @@
|
||||
|
||||
source_set("pdf") {
|
||||
sources = [
|
||||
@@ -16,7 +15,6 @@ source_set("pdf") {
|
||||
@@ -15,9 +14,7 @@ source_set("pdf") {
|
||||
]
|
||||
deps = [
|
||||
"//chrome/browser/download",
|
||||
- "//chrome/browser/glic",
|
||||
"//chrome/browser/pdf",
|
||||
- "//chrome/browser/screen_ai:screen_ai_install_state",
|
||||
"//chrome/browser/ui/tab_contents",
|
||||
@@ -693,7 +799,46 @@
|
||||
"//chrome/common",
|
||||
--- a/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
|
||||
+++ b/chrome/browser/ui/pdf/chrome_pdf_document_helper_client.cc
|
||||
@@ -113,22 +113,3 @@ void ChromePDFDocumentHelperClient::SetP
|
||||
@@ -58,22 +58,6 @@ void MaybeHideSearchifyFeaturePromo(tabs
|
||||
}
|
||||
}
|
||||
|
||||
-void LogGlicSummarizeMetrics(content::RenderFrameHost* render_frame_host) {
|
||||
- content::WebContents* web_contents_to_use =
|
||||
- GetWebContentsToUse(render_frame_host);
|
||||
- if (!web_contents_to_use) {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- bool glic_enabled = glic::GlicEnabling::IsEnabledForProfile(
|
||||
- Profile::FromBrowserContext(web_contents_to_use->GetBrowserContext()));
|
||||
- base::UmaHistogramBoolean("PDF.GlicEnabled", glic_enabled);
|
||||
- bool glic_summarize_button_enabled =
|
||||
- pdf_extension_util::ShouldShowGlicSummarizeButton(
|
||||
- web_contents_to_use->GetBrowserContext());
|
||||
- base::UmaHistogramBoolean("PDF.GlicSummarizeButtonEnabled",
|
||||
- glic_summarize_button_enabled);
|
||||
-}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -86,15 +70,6 @@ void ChromePDFDocumentHelperClient::OnDo
|
||||
MaybeShowFeaturePromo(feature_engagement::kIPHPdfInkSignaturesFeature,
|
||||
GetWebContentsToUse(render_frame_host));
|
||||
|
||||
- auto* parent = render_frame_host->GetParent();
|
||||
- bool is_pdf_viewer =
|
||||
- parent && parent->GetLastCommittedURL().GetWithEmptyPath() ==
|
||||
- base::FilePath(ChromeContentClient::kPDFExtensionPluginPath)
|
||||
- .MaybeAsASCII();
|
||||
-
|
||||
- if (is_pdf_viewer) {
|
||||
- LogGlicSummarizeMetrics(render_frame_host);
|
||||
- }
|
||||
}
|
||||
|
||||
void ChromePDFDocumentHelperClient::UpdateContentRestrictions(
|
||||
@@ -146,22 +121,3 @@ void ChromePDFDocumentHelperClient::SetP
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1011,7 +1156,7 @@
|
||||
"//services/service_manager/public/cpp",
|
||||
"//services/strings",
|
||||
"//services/test/echo/public/mojom",
|
||||
@@ -7297,9 +7292,6 @@ test("unit_tests") {
|
||||
@@ -7298,9 +7293,6 @@ test("unit_tests") {
|
||||
"//components/safe_browsing/content/browser",
|
||||
"//components/safe_browsing/content/browser:client_side_detection_images_cache",
|
||||
"//components/safe_browsing/content/browser:credit_card_form_event",
|
||||
@@ -1021,7 +1166,7 @@
|
||||
"//components/safe_browsing/content/browser/password_protection",
|
||||
"//components/safe_browsing/content/browser/password_protection:mock_password_protection",
|
||||
"//components/safe_browsing/content/browser/web_ui",
|
||||
@@ -8652,7 +8644,6 @@ test("unit_tests") {
|
||||
@@ -8653,7 +8645,6 @@ test("unit_tests") {
|
||||
#
|
||||
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
|
||||
deps += [
|
||||
@@ -1029,7 +1174,7 @@
|
||||
"//chrome:packed_resources_integrity_header",
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
@@ -8687,7 +8678,6 @@ test("unit_tests") {
|
||||
@@ -8688,7 +8679,6 @@ test("unit_tests") {
|
||||
"//chrome/browser/page_content_annotations",
|
||||
"//chrome/browser/profile_resetter:fake_profile_resetter",
|
||||
"//chrome/browser/resources/new_tab_page_instant:resources_grit",
|
||||
|
||||
@@ -2040,7 +2040,7 @@
|
||||
"//components/safe_browsing/content/browser:credit_card_form_event",
|
||||
"//components/safe_browsing/content/browser:safe_browsing_service",
|
||||
"//components/safe_browsing/content/browser/password_protection",
|
||||
@@ -7290,7 +7289,6 @@ test("unit_tests") {
|
||||
@@ -7291,7 +7290,6 @@ test("unit_tests") {
|
||||
"//components/resources",
|
||||
"//components/safe_browsing:buildflags",
|
||||
"//components/safe_browsing/content/browser",
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3
|
||||
4
|
||||
|
||||
Reference in New Issue
Block a user