Update to Chromium version 89.0.4389.0 (#843830)

- SSE3 is now required on x86 processors (see https://crbug.com/1123353).
This commit is contained in:
Marshall Greenblatt
2021-01-27 18:13:12 -05:00
parent 119415b8e9
commit 5ef0fb8ac8
118 changed files with 879 additions and 1355 deletions

View File

@@ -1,16 +1,16 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index 69a0e4c0e6fb..6751d51b8435 100644
index 4e04a86c2d06..6d82d55acd15 100644
--- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc
@@ -23,6 +23,7 @@
#include "base/strings/sys_string_conversions.h"
@@ -24,6 +24,7 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/download/chrome_download_manager_delegate.h"
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/download/download_core_service_impl.h"
@@ -57,6 +58,10 @@
@@ -58,6 +59,10 @@
#include "chrome/browser/ui/pdf/adobe_reader_info_win.h"
#endif
@@ -21,7 +21,7 @@ index 69a0e4c0e6fb..6751d51b8435 100644
using content::BrowserContext;
using content::BrowserThread;
using content::DownloadManager;
@@ -357,6 +362,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
@@ -358,6 +363,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
// static
DownloadPrefs* DownloadPrefs::FromBrowserContext(
content::BrowserContext* context) {
@@ -34,18 +34,18 @@ index 69a0e4c0e6fb..6751d51b8435 100644
}
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
index 3fadaba3336f..5ef67b35883d 100644
index 97cae92b96fa..6acf5188e1d6 100644
--- chrome/browser/printing/print_preview_dialog_controller.cc
+++ chrome/browser/printing/print_preview_dialog_controller.cc
@@ -16,6 +16,7 @@
#include "base/strings/utf_string_conversions.h"
@@ -17,6 +17,7 @@
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/printing/print_view_manager.h"
@@ -451,8 +452,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
@@ -452,8 +453,11 @@ WebContents* PrintPreviewDialogController::CreatePrintPreviewDialog(
content::HostZoomMap::Get(preview_dialog->GetSiteInstance())
->SetZoomLevelForHostAndScheme(print_url.scheme(), print_url.host(), 0);
PrintViewManager::CreateForWebContents(preview_dialog);
@@ -58,13 +58,13 @@ index 3fadaba3336f..5ef67b35883d 100644
// Add an entry to the map.
preview_dialog_map_[preview_dialog] = initiator;
diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc
index 277f2ca033d1..06465c4616a3 100644
index ae1ab34986d1..b742e9fffaf3 100644
--- chrome/browser/printing/print_view_manager_base.cc
+++ chrome/browser/printing/print_view_manager_base.cc
@@ -21,6 +21,7 @@
#include "base/threading/thread_task_runner_handle.h"
@@ -22,6 +22,7 @@
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
@@ -79,8 +79,8 @@ index 277f2ca033d1..06465c4616a3 100644
+
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
#include "chrome/browser/printing/print_error_dialog.h"
#endif
@@ -196,8 +201,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
#include "chrome/browser/printing/print_view_manager.h"
@@ -201,8 +206,11 @@ PrintViewManager* GetPrintViewManager(int render_process_id,
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::WebContents* web_contents =
GetWebContentsForRenderFrame(render_process_id, render_frame_id);
@@ -95,10 +95,10 @@ index 277f2ca033d1..06465c4616a3 100644
void NotifySystemDialogCancelled(int render_process_id, int routing_id) {
diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h
index e22cff218a56..6cff432e4f08 100644
index 93103940036e..1b12b91cdf4b 100644
--- chrome/browser/printing/print_view_manager_base.h
+++ chrome/browser/printing/print_view_manager_base.h
@@ -118,9 +118,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
@@ -122,9 +122,6 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Manages the low-level talk to the printer.
scoped_refptr<PrintJob> print_job_;
@@ -108,22 +108,12 @@ index e22cff218a56..6cff432e4f08 100644
// content::NotificationObserver implementation.
void Observe(int type,
const content::NotificationSource& source,
@@ -132,6 +129,9 @@ class PrintViewManagerBase : public content::NotificationObserver,
// Cancels the print job.
void NavigationStopped() override;
+ private:
+ friend class TestPrintViewManager;
+
// printing::PrintManager:
void OnDidPrintDocument(
content::RenderFrameHost* render_frame_host,
diff --git chrome/browser/resources/print_preview/ui/destination_dialog.html chrome/browser/resources/print_preview/ui/destination_dialog.html
index 01ac8b5153e1..20f5e5b9d099 100644
index df858712d3be..cd146ea0f26b 100644
--- chrome/browser/resources/print_preview/ui/destination_dialog.html
+++ chrome/browser/resources/print_preview/ui/destination_dialog.html
@@ -133,10 +133,7 @@
</print-preview-provisional-destination-resolver>
@@ -25,10 +25,7 @@
</print-preview-destination-list>
</div>
<div slot="button-container">
- <cr-button on-click="onManageButtonClick_">
@@ -174,18 +164,18 @@ index 3d415a60d436..807ab41ee6ef 100644
ConstrainedWebDialogUI::~ConstrainedWebDialogUI() {
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
index c48314e52e83..f0a64a0be931 100644
index 181a4132f1be..4344ceaf83e5 100644
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
@@ -20,6 +20,7 @@
#include "base/task/thread_pool.h"
@@ -21,6 +21,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/download_prefs.h"
@@ -53,6 +54,10 @@
@@ -54,6 +55,10 @@
#include "chrome/browser/chromeos/drive/drive_integration_service.h"
#endif
@@ -196,7 +186,7 @@ index c48314e52e83..f0a64a0be931 100644
namespace printing {
namespace {
@@ -376,10 +381,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
@@ -377,10 +382,27 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
// If the directory is empty there is no reason to create it or use the
// default location.
if (path.empty()) {
@@ -224,7 +214,7 @@ index c48314e52e83..f0a64a0be931 100644
// Get default download directory. This will be used as a fallback if the
// save directory does not exist.
DownloadPrefs* download_prefs = DownloadPrefs::FromBrowserContext(profile_);
@@ -387,8 +409,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
@@ -388,8 +410,7 @@ void PdfPrinterHandler::SelectFile(const base::FilePath& default_filename,
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
base::BindOnce(&SelectSaveDirectory, path, default_path),
@@ -234,7 +224,7 @@ index c48314e52e83..f0a64a0be931 100644
}
void PdfPrinterHandler::PostPrintToPdfTask() {
@@ -429,6 +450,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
@@ -430,6 +451,40 @@ void PdfPrinterHandler::OnDirectorySelected(const base::FilePath& filename,
platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), NULL);
}
@@ -273,21 +263,21 @@ index c48314e52e83..f0a64a0be931 100644
+#endif // BUILDFLAG(ENABLE_CEF)
+
base::FilePath PdfPrinterHandler::GetSaveLocation() const {
#if defined(OS_CHROMEOS)
#if BUILDFLAG(IS_CHROMEOS_ASH)
drive::DriveIntegrationService* drive_service =
diff --git chrome/browser/ui/webui/print_preview/pdf_printer_handler.h chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
index 26954aeae08f..48afeb608f83 100644
index d796486f6b74..1a7b0d23128d 100644
--- chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
+++ chrome/browser/ui/webui/print_preview/pdf_printer_handler.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/ui/webui/print_preview/printer_handler.h"
#include "ui/shell_dialogs/select_file_dialog.h"
@@ -88,6 +89,15 @@ class PdfPrinterHandler : public PrinterHandler,
@@ -89,6 +90,15 @@ class PdfPrinterHandler : public PrinterHandler,
void OnDirectorySelected(const base::FilePath& filename,
const base::FilePath& directory);
@@ -304,27 +294,27 @@ index 26954aeae08f..48afeb608f83 100644
base::FilePath GetSaveLocation() const;
diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index adf2433423a5..6bfa66b75b93 100644
index 67aa6bc0d76e..0fecbd87423b 100644
--- chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -24,6 +24,7 @@
#include "base/memory/ref_counted_memory.h"
@@ -25,6 +25,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/bad_message.h"
#include "chrome/browser/browser_process.h"
@@ -1258,7 +1259,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
@@ -1080,7 +1081,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
}
return extension_printer_handler_.get();
}
-#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY)
+#if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) && !BUILDFLAG(ENABLE_CEF)
if (printer_type == PrinterType::kPrivet &&
(base::FeatureList::IsEnabled(features::kForceEnablePrivetPrinting) ||
GetPrefs()->GetBoolean(
@@ -1269,6 +1270,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
GetPrefs()->GetBoolean(prefs::kForceEnablePrivetPrinting)) {
if (!privet_printer_handler_) {
@@ -1089,6 +1090,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler(
}
return privet_printer_handler_.get();
}
@@ -334,7 +324,7 @@ index adf2433423a5..6bfa66b75b93 100644
#endif
if (printer_type == PrinterType::kPdf) {
if (!pdf_printer_handler_) {
@@ -1341,6 +1345,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
@@ -1151,6 +1155,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id,
}
void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
@@ -342,7 +332,7 @@ index adf2433423a5..6bfa66b75b93 100644
DCHECK(!identity_manager_);
cloud_print_enabled_ =
!base::Contains(printer_type_deny_list_, PrinterType::kCloud) &&
@@ -1358,6 +1363,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
@@ -1167,6 +1172,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() {
identity_manager_ = IdentityManagerFactory::GetForProfile(profile);
identity_manager_->AddObserver(this);
@@ -351,18 +341,18 @@ index adf2433423a5..6bfa66b75b93 100644
void PrintPreviewHandler::UnregisterForGaiaCookieChanges() {
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index a1ddf703d113..b0b1f0272dd3 100644
index fb3328d0d75b..4dd94d59e195 100644
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -28,6 +28,7 @@
#include "base/synchronization/lock.h"
@@ -29,6 +29,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/pdf/pdf_extension_util.h"
#include "chrome/browser/printing/background_printing_manager.h"
@@ -81,12 +82,16 @@ namespace printing {
@@ -85,12 +86,16 @@ namespace printing {
namespace {
@@ -372,7 +362,7 @@ index a1ddf703d113..b0b1f0272dd3 100644
#if defined(OS_MAC)
// U+0028 U+21E7 U+2318 U+0050 U+0029 in UTF8
const char kBasicPrintShortcut[] = "\x28\xE2\x8c\xA5\xE2\x8C\x98\x50\x29";
#elif !defined(OS_CHROMEOS)
#elif !BUILDFLAG(IS_CHROMEOS_ASH)
const char kBasicPrintShortcut[] = "(Ctrl+Shift+P)";
#endif
+#endif // !BUILDFLAG(ENABLE_CEF)