From 00e045c6127edcddfa12d964c163269cc9b0c0c3 Mon Sep 17 00:00:00 2001 From: bridiver Date: Sun, 17 Jun 2018 15:39:38 -0700 Subject: [PATCH] Squashed commit of the following: commit 0c4a3357350ed78eb5b1c7c3efb9e66b7cf7313a Author: bridiver Date: Sun Jun 17 15:08:27 2018 -0700 misc merge fixes commit 097bbfe62d61397adf6b6c44bde6af4c785d6d14 Author: bridiver Date: Fri Jun 15 19:04:30 2018 -0700 fix build errors commit bdc5b56fc1c12c3c61a97138f387fdaf967a11b8 Author: bridiver Date: Fri Jun 15 15:19:51 2018 -0700 remove patches that don't apply correctly commit 9867cc0bad140ba94a4e366a2c8faefbd3cb88ad Merge: 7de25657c 2527f9c39 Author: bridiver Date: Thu Jun 14 18:22:20 2018 -0700 Merge branch 'C67-rebase' commit 2527f9c3969b294dabf5db102f1b62dbff768bcc Author: bridiver Date: Tue Jun 12 19:27:57 2018 -0700 Bump v7.0.7+67.0.3396.87 commit 8e4273a6995254a00fdeea8aefd637314b0c9719 Author: bridiver Date: Mon Jun 11 16:40:19 2018 -0700 Bump v7.0.6+67.0.3396.71 commit a22badd3cc9c94d281124bd700860c6d3e7a59fd Author: bridiver Date: Mon Jun 11 16:38:40 2018 -0700 don't use spare renderer for extensions fix https://github.com/brave/browser-laptop/issues/14380 commit f3df64c20b5c86a10680aed2c00df0376538cedc Author: bridiver Date: Mon Jun 11 13:57:04 2018 -0700 enable `chrome.i18n.getAcceptLanguages` fix https://github.com/brave/browser-laptop/issues/8326 auditors: @jonathansampson commit 7ba56bd04019d8b6f7963211398df5c82b96631c Author: bridiver Date: Sun Jun 10 19:03:05 2018 -0700 Bump v7.0.6+67.0.3396.79 commit 699c819ab81115e26a3c680c6b6162fefa0e8cb0 Author: Brian Johnson Date: Sun Jun 10 19:02:15 2018 -0700 Merge pull request #606 from brave/fix-copy-paste-from-context-menu Check if web contents is attached before allowing it to be considered as focused commit 0dc2bcba36d2b42222efbcf85f6f93bce976fc3a Author: bridiver Date: Wed Jun 6 17:24:27 2018 -0700 Bump v7.0.5+67.0.3396.79 commit e2bde158162ffb822d97e9305f2b4b8e3a694246 Author: bridiver Date: Mon Jun 4 19:48:10 2018 -0700 Bump v7.0.4+67.0.3396.71 commit d249b8f3b2281ba856c89a8de3b3ce8b62985438 Author: bridiver Date: Sun Jun 3 22:16:50 2018 -0700 Bump v7.0.3+67.0.3396.48 commit 35a8d0a1dac072781fb5725032e9eec9a52e42ed Author: Anthony Tseng Date: Fri Jun 1 15:25:38 2018 -0700 RenderWidgetHostNSViewBridge::SetTargetView for legacy webview The other side of bridge (RenderWidgetHostViewCocoa) of legacy webview is not valid https://chromium.googlesource.com/chromium/src/+/98581bb30ea1eaebee3c3e4fb4c49e4a2446deca fix https://github.com/brave/browser-laptop/issues/14247 Auditor: @bridiver, @hferreiro, @ltilve commit 57b180415f0b32d2184b05f1127197836cab036b Author: bridiver Date: Thu May 31 18:49:50 2018 -0700 Bump v7.0.2+67.0.3396.48 commit bcdc2a4780cdf5b7cbcd059963bff7e42d55a9d9 Author: Brian Johnson Date: Fri Mar 30 12:26:05 2018 -0700 Merge pull request #550 from brave/fix_526 Fix #526: Adding static pins for Amazons CAs commit d7b67ac0ef23620042b3960a13fd7e3e5c712639 Author: bridiver Date: Thu May 31 12:27:37 2018 -0700 make sure the webcontents getes deleted on block even if `was_blocked` is null fix https://github.com/brave/browser-laptop/issues/14261 auditors @bsclifton @petemiller commit 7f4521d29ed8a0bade233c3de00293c4920d2dfa Author: bridiver Date: Tue May 29 17:09:35 2018 -0700 Bump v7.0.1+67.0.3396.48 commit 18a1394b743bd04b9408c9f39595eede6c55e598 Author: Anthony Tseng Date: Tue May 29 16:31:40 2018 -0700 Explicitly calling `ExtensionWebContentsObserver::Initialize` https://chromium.googlesource.com/chromium/src/+/399b6c3d211c09e1e0a003e8edb547043535bf77 fix brave/browser-laptop#14252 Auditor: @bridiver commit d507b31a3d587b13e9ba4dd2aba9ed259bdb1849 Author: bridiver Date: Tue May 29 15:37:58 2018 -0700 lint fixes commit c72746969697d95359f9076a5a0d368d1aa17e54 Author: bridiver Date: Tue May 29 15:36:38 2018 -0700 LifecycleUnits are now used for tab discarding https://crrev.com/a271a5c03ac2 auditors @hferreiro @darkdh commit b903f9b924ff19627bf1f6c6e3f34716127d30c1 Author: Henrique Ferreiro Date: Mon May 28 10:08:29 2018 +0200 Remove unused WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT commit 82f2e95688d95fc2236331e56fdeeeeffe567ea6 Author: Lorenzo Tilve Date: Fri May 25 15:06:26 2018 +0200 chromium_src: C67 Updates to content_settings_observer.cc commit af44404c9b4de4a3da677f9640c3e74d77e3b15d Author: bridiver Date: Tue May 22 19:40:42 2018 -0700 bump chromedriver version commit cc67385ea4f4d12c98affcf540bb32306d60a302 Author: bridiver Date: Tue May 22 12:17:43 2018 -0700 Bump v7.0.0+67.0.3396.48 commit ce229ea8a545bfad8f34564c9533681bf86304a1 Author: Henrique Ferreiro Date: Fri May 18 10:01:12 2018 +0200 chromium_src: Add missing blink/public/mojom:mojom_platform dep Fixes the following error: ../../content/public/browser/render_frame_host.h:18:10: fatal error: 'third_party/blink/public/mojom/page/page_visibility_state.mojom.h' file not found #include "third_party/blink/public/mojom/page/page_visibility_state.mojom.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. commit b3d7213e9922166525b039e2fa662e8eb30403a5 Author: Lorenzo Tilve Date: Thu May 17 19:22:38 2018 +0200 Fix lint issues commit 83f8c85ed1dbb004dce48607d62ea95b28836891 Author: Lorenzo Tilve Date: Wed May 16 23:24:24 2018 +0200 Add unimplemented AreServerCardsSupported override https://crrev.com/50f8f8228b96 commit c0a323cb81764fb0771816ed727fb36292d6a112 Author: Lorenzo Tilve Date: Thu May 10 10:56:33 2018 +0200 Fix win linking issues commit 07e494afd59bbdee332ba2572a3521cba709ef96 Author: Henrique Ferreiro Date: Wed May 9 13:53:38 2018 +0200 Fix linking issues with 'is_debug = true' commit 7e625a5cc3de8e16e8df6e600959366f82e82b94 Author: Henrique Ferreiro Date: Mon May 7 13:45:59 2018 +0200 chromium_src: C67 Updates to profile_io_data.cc commit 84a3d6fcdcde213aee402c23ccc29594b43072fa Author: Lorenzo Tilve Date: Thu May 3 13:35:09 2018 +0200 Change UserGestureDone to NavigatedByUser https://crrev.com/d4599909a503 commit 2665b242dfe04886af3711fc5af1cf0c03f1ba31 Author: Henrique Ferreiro Date: Wed May 2 11:39:10 2018 +0200 Stub Browser::OpenURL() Fixes a Windows compilation error: ../../chrome/browser/safe_browsing/chrome_cleaner/ chrome_cleaner_navigation_util_win.cc(56,12): error: no member named 'OpenURL' in 'Browser' browser->OpenURL(content::OpenURLParams( ~~~~~~~ ^ commit baf459239cd0d83d16c4a1534e23d7581779ddd2 Author: Henrique Ferreiro Date: Mon Apr 30 12:12:07 2018 +0200 Stub some LocationBarView static methods Fixes this linking errors: error: undefined symbol: LocationBarView::GetAvailableTextHeight() >>> referenced by chrome_typography.cc:62 (../../chrome/browser/ui/views/harmony/chrome_typography.cc:62) >>> obj/electron/chromium_src/browser/chrome_typography.o: (ApplyCommonFontStyles(int, int, int*, gfx::Font::Weight*)) error: undefined symbol: LocationBarView:: GetAvailableDecorationTextHeight() >>> referenced by chrome_typography.cc:78 (../../chrome/browser/ui/views/harmony/chrome_typography.cc:78) >>> obj/electron/chromium_src/browser/chrome_typography.o: (ApplyCommonFontStyles(int, int, int*, gfx::Font::Weight*)) commit 893ac85fba6e56ccdba703537e8217ae2506cf5d Author: Henrique Ferreiro Date: Fri Apr 27 13:17:16 2018 +0200 Add material_refresh_layout_provider.cc as a dependency Fixes the following linking error: error: undefined symbol: vtable for MaterialRefreshLayoutProvider >>> referenced by material_refresh_layout_provider.h:13 (../../chrome/browser/ui/views/harmony/ material_refresh_layout_provider.h:13) >>> obj/electron/chromium_src/browser/chrome_layout_provider.o: (ChromeLayoutProvider::CreateLayoutProvider()) commit 0be7f204be4562a8523bdda8204bb256b770da79 Author: Henrique Ferreiro Date: Wed Apr 25 13:52:19 2018 +0200 chromium_src: C67 updates to UpgradeDetectorImpl commit 9f583629372ad944fdfff32a950b482fb896c642 Author: Henrique Ferreiro Date: Fri Apr 27 12:08:46 2018 +0200 chromium_src: Stub ChromePasswordProtectionService::ShouldShowChangePasswordSettingUI() Fixes the following linking error: error: undefined symbol: safe_browsing::ChromePasswordProtectionService:: ShouldShowChangePasswordSettingUI(Profile*) >>> referenced by security_state_tab_helper.cc:277 (../../chrome/browser/ssl/security_state_tab_helper.cc:277) >>> obj/electron/chromium_src/browser/security_state_tab_helper.o: (SecurityStateTabHelper::GetMaliciousContentStatus() const) commit 57072915dd889c5381d471055466c4e225d21dde Author: Lorenzo Tilve Date: Tue Apr 24 12:39:34 2018 +0200 Add missing framework_version/framework_contents params for Mac https://crrev.com/8685feba0505 commit 324a8071ce95c27d5ea98f786086d6050e2d0829 Author: Henrique Ferreiro Date: Thu Apr 26 12:26:41 2018 +0200 TODO: Disable //extensions/browsershared_user_script_master.* It duplicated symbols in //atom/browser/extensions/shared_user_script_master.* Investigate if the upstream file can be used. They are identical besides Brave version using AtomExtensionsBrowserClient::IsIncognitoEnabled() instead of util::IsIncognitoEnabled(). The former comments "ExtensionPrefs::Get(context)->IsIncognitoEnabled(extension_id);" with a TODO. Can we make that call work? commit 335b5e48a911fc306cfb0e5792694385fd5be1e5 Author: Henrique Ferreiro Date: Wed Apr 25 14:21:39 2018 +0200 chromium_src: C67 updates to IOThread commit 708bfd35c8249fa9c795685e9ff754a4be2467e4 Author: Henrique Ferreiro Date: Wed Apr 25 11:52:15 2018 +0200 Make NativeWindow::IsVisible() a const method IsVisible() was added to ui::BaseWindow in https://crrev.com/9421d88bf70e commit f9929eddd77520f5aea3f32ce37ed3644138ae29 Author: Henrique Ferreiro Date: Wed Apr 25 08:00:00 2018 +0200 extensions/utility/ has been removed https://crrev.com/b6f2cc9ca6f6 commit 2259bf4727d0c16e1d7b6b1ed6a902766eba7fc5 Author: Henrique Ferreiro Date: Wed Apr 25 07:49:12 2018 +0200 "chrome/utility/extensions/extensions_handler.h" was removed https://crrev.com/fbc2f693490f commit 4601e5025d93e86aeff81d2bbe058bd5e8e82d78 Author: Lorenzo Tilve Date: Tue Apr 24 17:09:26 2018 +0200 Expose GetPermissionStatusForFrame through the content PermissionManager API https://crrev.com/4ead6c35d84f commit f17b676dc059a9dc472cead319825e0a334066ab Author: Henrique Ferreiro Date: Tue Apr 24 14:26:35 2018 +0200 Update Node to C67 branch commit 3334bd167f2a4d6f905cb5900f3b0a5773135853 Author: Henrique Ferreiro Date: Tue Apr 24 12:27:45 2018 +0200 Remove `process.getProcessMemoryInfo()` Platform-specific memory metrics were removed in favor of the memory_instrumentation service. https://crrev.com/d447bb62da40 https://crrev.com/07e3ce4f1317 https://crrev.com/19ad19ef88be commit 8158ec0707af8537cfa4a0cc2b999122c5eff2a5 Author: Henrique Ferreiro Date: Mon Apr 23 15:44:53 2018 +0200 ExtensionApiFrameIdMap::CacheFrameData() => InitializeRenderFrameHost() https://crrev.com/399eed41d62b https://crrev.com/8418c66bd1f8 commit 57c985eaa65a6443a45804e03b1b1cc43514b43d Author: Henrique Ferreiro Date: Mon Apr 23 14:28:39 2018 +0200 Move content script classes from chrome/ to extensions/ https://crrev.com/b96abb855efb commit 71c272d7191928e1273a40a96ed907c84b4273ca Author: Henrique Ferreiro Date: Mon Apr 23 14:23:21 2018 +0200 Allow content script requests to attach SameSite cookies https://crrev.com/13105d485c94 commit f2ac608b02058449d5c8f4bcd43ae3522d145d4b Author: Henrique Ferreiro Date: Mon Apr 23 14:09:30 2018 +0200 C67 updates for ExtensionTabUtil https://crrev.com/2f127c42d218 https://crrev.com/a271a5c03ac2 commit 439a0cebc850a663f719210bc2c0c5e0eb8c2205 Author: Henrique Ferreiro Date: Mon Apr 23 13:51:27 2018 +0200 C67 changes to BrowserProcessImpl commit 35bb4e47daf3ebc6d42d2da0dbfc3875a5099bd3 Author: Henrique Ferreiro Date: Mon Apr 23 12:46:16 2018 +0200 Rename SCHEME_WITHOUT_PORT to SCHEME_WITH_HOST https://crrev.com/123ca19dd4e7 commit 08b7fdb8ae70d3add5f3b2073ae1a9178429f281 Author: Henrique Ferreiro Date: Mon Apr 23 12:44:28 2018 +0200 Stub BravePasswordManagerClient::LogPasswordReuseDetectedEvent() https://crrev.com/da5d0c766f26 commit 70e7cf0a4ccda16ae919222c534fb80463954eaf Author: Henrique Ferreiro Date: Mon Apr 23 11:34:09 2018 +0200 Handle external protocols with the network service https://crrev.com/a67add8097a5 commit f076c1a234ca5152d6a42c2a2d0728bc05414873 Author: Henrique Ferreiro Date: Mon Apr 23 07:41:28 2018 +0200 Allow user agent to be overridden in popup webview creation https://crrev.com/c1134a866ccc commit 76b3b7a4740b1b37598249fb15a585ac74eb2d5e Author: Lorenzo Tilve Date: Sun Apr 22 12:59:29 2018 +0200 Fix lint issues for make_unique<> commit 1c00a36d211e197d732e864bc46452b49250eb31 Author: Lorenzo Tilve Date: Sun Apr 22 12:46:37 2018 +0200 Group experimental canvas features with the rest of web platform features https://crrev.com/2a7c3b2cd5c6 commit f7f991c19cc4184ca6b280369a64e15dac1090c9 Author: Lorenzo Tilve Date: Sun Apr 22 11:54:40 2018 +0200 Removed SyzyProf profiling support https://crrev.com/69d0bcdd9729 commit 128d6edd5049e886d48b75818fc707f16821cb9c Author: Lorenzo Tilve Date: Sun Apr 22 11:24:33 2018 +0200 PasswordManagerClient::GetPrefs() is changed to a const function https://crrev.com/c18a57c2b9c8 commit 597e26207babc816ef76b830d59fe6a2b979886b Author: Lorenzo Tilve Date: Sun Apr 22 11:11:21 2018 +0200 Simplify EnsureProcessTerminated() implementations https://crrev.com/c18a57c2b9c8 commit 1403f81c99c581765ecde0f19ac7a401305a15aa Author: Lorenzo Tilve Date: Sun Apr 22 11:01:52 2018 +0200 Plumb the RenderFrameHost through for CheckMediaAccessPermission https://crrev.com/ad7c24a16ce2 commit 118458c0a3e77956e2d2e9239aeb29ef334eadfe Author: Lorenzo Tilve Date: Sat Apr 21 23:51:01 2018 +0200 Report multiple reused domains in PhishGuard pings https://crrev.com/3686eccdb757 commit 4a22b15e52d042adaf673d42f4796cde7a81e0cc Author: Lorenzo Tilve Date: Sat Apr 21 23:40:57 2018 +0200 Move STHDistributor, STHObserver, and STHReporter out of //net https://crrev.com/6d00e4f36107 commit 5aa56a1a321f97481265dd63b02655912fb3f223 Author: Lorenzo Tilve Date: Sat Apr 21 23:33:06 2018 +0200 Migrate BrowserThread::IsMessageLoopValid to BrowserThread::IsThreadInitialized https://crrev.com/2983181ccb26 commit 9abf2845e0c0680da30d8424c10ee0c4cec63f35 Author: Lorenzo Tilve Date: Sat Apr 21 23:15:35 2018 +0200 Use base::Value by value instead of std::unique_ptr https://crrev.com/95facbc5d103 commit ead17124313914cf58a2687d56e39f5f17cc6846 Author: Lorenzo Tilve Date: Sat Apr 21 22:43:38 2018 +0200 Move //components/unzip_service to //components/services/unzip https://crrev.com/6a897c7180f6 commit ba6c224f5bab71cf119b749805db7a8a7c5d2ef8 Author: Henrique Ferreiro Date: Fri Apr 20 14:31:09 2018 +0200 Remove base::MakeUnique https://crrev.com/0e26b21394de commit d1cae4f3bbbb3d2451692314a49c09563b6ebbaf Author: Henrique Ferreiro Date: Fri Apr 20 14:08:03 2018 +0200 Rename various ProxyService symbols to refer to ProxyResolutionService https://crrev.com/d567e868e691 commit 20b287827de32766b6418a64f41c718a35a39691 Author: Henrique Ferreiro Date: Fri Apr 20 14:05:42 2018 +0200 Rename references to "proxy scripts" to "pac files" https://crrev.com/995978677120 commit 1cdf9a27b6c080dd00adf46356d88fa230154184 Author: Henrique Ferreiro Date: Fri Apr 20 13:59:19 2018 +0200 Replace ProxyConfigSource with ProxyConfigWithAnnotation https://crrev.com/ca8d525d49c7 commit ea820172d643c63b9f7265fc8e96cb8a9c45267c Author: Henrique Ferreiro Date: Fri Apr 20 13:24:49 2018 +0200 Rename net/proxy_resolution/{proxy_service => proxy_resolution_service}.h https://crrev.com/ffe89daa07d6 commit 9d11aa1db8f7c86555d1dc10aee528302b435330 Author: Henrique Ferreiro Date: Fri Apr 20 13:21:30 2018 +0200 SpecialStoragePolicy virtual methods changed https://crrev.com/e1e1772f872b commit 1643089a39a57751c41e1e6ca9ec322b789f7639 Author: Henrique Ferreiro Date: Fri Apr 20 13:02:01 2018 +0200 Rename ResourceDispatcherHostLoginDelegate to LoginDelegate https://crrev.com/d7502e51c35c commit 70789a2de90cea369b80df7467cae1ebd4a9ef8a Author: Henrique Ferreiro Date: Fri Apr 20 12:36:52 2018 +0200 Change atom::api::WebContents::CheckMediaAccessPermission() parameters https://crrev.com/ad7c24a16ce2 commit 47cfee7b5a0ba53d953728612c1f26985cddbdf6 Author: Henrique Ferreiro Date: Fri Apr 20 12:34:22 2018 +0200 DevTools: do not index excluded folders https://crrev.com/007878869255 commit 96bca4138a5eb6ffc06cda8f92f5483eb9aa5431 Author: Henrique Ferreiro Date: Wed Apr 18 13:46:27 2018 +0200 DevTools: deprecate devtools_protocol helpers on the chrome level, use inspector_protocol generator https://crrev.com/0aaf77db834d commit 8963e4d85696e29a8790b4a45f4b8872504a967a Author: Henrique Ferreiro Date: Wed Apr 18 12:23:33 2018 +0200 Rename buildflag_headers for consistency https://crbug.com/814485 https://crrev.com/02e38b93c348 https://crrev.com/c8240b098394 https://crrev.com/318a55fc28aa https://crrev.com/a5f7ba11e697 https://crrev.com/a35f9a482b70 https://crrev.com/d7983c5387fe https://crrev.com/0caaaf430f7c commit dd9368ce690968e5981d4550b608bf0194c75012 Author: Henrique Ferreiro Date: Wed Apr 18 13:30:42 2018 +0200 //mojo/edk/system subsumed by //mojo/edk https://crrev.com/773a51f03d60 https://crrev.com/898d796d5977 commit 517960a1adca7d287f0395811ed2244a43d96274 Author: Henrique Ferreiro Date: Wed Apr 18 13:07:42 2018 +0200 Revert "Add missing //components/proximity_auth/public/interfaces mojo dep" This reverts commit 7f017784177b00d8174acbfe901a6f2bf2f70ce2. Not needed since https://crrev.com/813085eba93e where the component was moved to chromeos/. commit 3ce0b0a4d192502bfa91de65744b9010500eeeb6 Author: Henrique Ferreiro Date: Tue Apr 17 10:54:36 2018 +0200 Switch to Debian Sid sysroot https://crrev.com/13734d4601ef commit 3665af82b497c4ec379ecd6155fe097ddf473dc9 Author: Henrique Ferreiro Date: Tue Apr 17 16:47:36 2018 +0200 Update patches to Chromium 67.0.3396.56 commit 5f68bbecb216305837b7bd7dfb9427f14075b9cc Author: Lorenzo Tilve Date: Thu Apr 26 13:28:05 2018 +0200 Pepper CDM is being deprecated in favor of mojo CDM https://crrev.com/729d804e8f8b https://crrev.com/d5b69c8251c1 https://crrev.com/de910d0e7867 commit adc20ce15024e0823a747179accb4fe5e19abc05 Author: Henrique Ferreiro Date: Tue Apr 17 18:06:34 2018 +0200 alink patch to use -filelist in Mac was added upstream https://crrev.com/0a289a6f9912 commit 4cd961762fb40d97d210acc66fb3dd8d5436c8b9 Author: Henrique Ferreiro Date: Tue Apr 17 16:56:19 2018 +0200 Revert "DROP: temporary fix for an upstream build error in Chromium" This reverts commit eb080bcfb684f317c1c9ef994655604325e7459a. commit e9ed3b6efa36cc243a54792c17f434c12fea89b8 Author: Henrique Ferreiro Date: Wed Apr 18 12:36:14 2018 +0200 The Great Blink mv https://crrev.com/a30d423812ad https://crrev.com/0aee4434a4db commit b388d882caa32e4767653c8c3990690eb9e2c5f4 Author: bridiver Date: Thu May 17 13:07:45 2018 -0700 Bump v6.0.12+66.0.3359.170 commit ff8b6f552606fb76a9e43480476eb425292b9cde Author: bridiver Date: Thu May 17 15:26:02 2018 -0700 let the order controller do all the work auditors: @petemiller @bbondy commit 67319635346db4c5548594cf045758cde99c38db Author: bridiver Date: Thu May 17 13:07:40 2018 -0700 defer calling ResumeLoadingCreatedWebContents for renderer initiated navigations auditors @petemiller @darkdh commit d7d575c309eb49cdba5505b9afca0aae6f587576 Author: bridiver Date: Fri May 18 10:33:51 2018 -0700 remove direct dependency on `request` - there is still a nested dep through mksnapshot, but we're not using those tools either auditors: @diracdeltas commit 51c159ee6e886851f829418e10ea0027f9694606 Author: bridiver Date: Tue May 15 15:10:55 2018 -0700 misc build fixes commit d7f00a428044654ef759e9b055e3d95f6fc17541 Author: bridiver Date: Mon May 14 14:41:02 2018 -0700 Bump v6.0.11+66.0.3359.170 commit 8ab70054663c469a968f9e89470a2d33012a97d5 Author: bridiver Date: Mon May 14 14:40:56 2018 -0700 background pages don't have tab helpers fix https://github.com/brave/browser-laptop/issues/14079 commit 211fce9923398f89a5c63a064317b6bf6dc431ee Author: bridiver Date: Fri May 11 12:51:49 2018 -0700 Bump v6.0.10+66.0.3359.170 commit 604cbc808da57f341062c795d05bda2959467dc5 Author: bridiver Date: Wed May 9 16:10:11 2018 -0700 Bump v6.0.9+66.0.3359.139 commit 3bb5db3032c03dfb52e048e281c0d0a2c4ec9c0a Author: bridiver Date: Wed May 9 16:09:59 2018 -0700 always pass an int to fromID/fromTabID auditors @petemiller fix https://github.com/brave/browser-laptop/issues/14075 commit ec2b1fa7f285a742e29a08610a8b1eeba48a5c4c Author: bridiver Date: Sun May 6 16:54:26 2018 -0700 Bump v6.0.8+66.0.3359.139 commit 805698330f971c976ac64d9507e7e24abd7f0d9e Author: Anthony Tseng Date: Sun May 6 16:48:23 2018 -0700 Avoid syncing muted state with owner web_contents fix https://github.com/brave/browser-laptop/issues/13979 fix https://github.com/brave/browser-laptop/issues/13996 Auditor: @bridiver commit a733a0e868d25a533f7c3b50030e907fd7ded357 Author: bridiver Date: Sun May 6 16:45:39 2018 -0700 revert deletion of https://github.com/brave/muon/commit/ebac9c9f7b64e50547afa3314ae9ff78ee741d2e and https://github.com/brave/muon/commit/554772bfab1aceb7e719a9e5d74cd22ce2e2b528 auditors @darkdh commit 1ac2b63bc26571484efe2bed0af6060f6b1a3640 Author: bridiver Date: Sat May 5 03:25:22 2018 -0700 keep track of render view switches fix https://github.com/brave/browser-laptop/issues/13810 commit 7439cdef1a8e15965e113d29aced4141153644c7 Author: bridiver Date: Thu May 3 21:43:42 2018 -0700 fix race condition for primary surface id probable fix for https://github.com/brave/browser-laptop/issues/13982 auditors @petemiller commit 4faa983fdd768e2123ab62c325e10ed2863d2605 Author: bridiver Date: Tue May 1 13:18:11 2018 -0700 Bump v6.0.7+66.0.3359.139 commit 2b20086c2d0e85f35c3a389a973feea6eb0ff3a0 Author: bridiver Date: Tue May 1 13:18:05 2018 -0700 replace finder patch lost in c66 rebase - fixes crash on find if an `about` page is open commit 504da0ed8decd43d0db56365fac96f79ece40fb8 Author: bridiver Date: Mon Apr 30 20:55:25 2018 -0700 check for -2 directly because tabs sometimes have no index commit 03759b927590b92486d6820c773158881079e1a4 Author: bridiver Date: Mon Apr 30 19:41:17 2018 -0700 Bump v6.0.6+66.0.3359.139 commit 29ba6424dbab0934bef7d51c931ffc640d17f3d1 Author: bridiver Date: Mon Apr 30 15:12:00 2018 -0700 remove log commit 872b996367368d461e55e7b54c39161cf3759dce Author: bridiver Date: Mon Apr 30 14:25:57 2018 -0700 fix webview src attribute auditors @petemill commit c684cc0c4d66f455827db944baaf93aeb83adcdc Author: bridiver Date: Fri Apr 27 13:42:16 2018 -0700 Bump v6.0.5+65.0.3325.181 commit c7b27d6ff6065ee199b665d84555ae0555145414 Author: bridiver Date: Wed Apr 25 15:38:15 2018 -0700 update surfaces on attach/detach commit 4917e2dc7885f95991607b65101d7a9db30416b7 Author: bridiver Date: Tue Apr 17 16:09:30 2018 -0700 Bump v6.0.4+65.0.3325.181 commit f8407cfc8a7af451d74ac96d70b526a1fc624ef3 Author: bridiver Date: Tue Apr 10 22:37:30 2018 -0700 Bump v6.0.3+65.0.3325.181 commit d92211ed202f9f2e43eebce24e1b88dc00da10e0 Author: bridiver Date: Tue Apr 10 21:02:30 2018 -0700 only call attach/detach from JS commit 1f5f368c06d896eb4b5a4baa846317fc2278077d Author: petemill Date: Tue Apr 10 22:14:20 2018 -0700 webview - make sure detach is looking at correct attached webcontents commit 69c6dfae2c3e7cc71ec6ecd225ad7672c06d395d Author: petemill Date: Tue Apr 10 16:51:25 2018 -0700 webview should not replace guest until previous guest has completley detached commit 7d9b0fa9cf500cff92da4099cc68da56a9526835 Author: bridiver Date: Mon Apr 9 22:47:09 2018 -0700 Bump v6.0.2+65.0.3325.181 commit dab998e5ed0843dc05eb00d4b26ec3299fd85e51 Author: petemill Date: Mon Apr 9 18:56:47 2018 -0700 webview - do not attempt to detach from a non-attached contents commit c9c03428825047c24cf323f9fc8b5f47986274b3 Author: bridiver Date: Fri Apr 6 19:02:43 2018 -0700 don't resume/block on detach/load commit 20fe01d92ebaa5dc4451bfaf74ed9a1fcc539331 Author: bridiver Date: Fri Apr 6 15:12:33 2018 -0700 fix clone commit 6c640cd2dc9f5e9f3ceb6717b75a36404e09725a Author: petemill Date: Thu Apr 5 20:15:01 2018 -0700 Revert "Window WebContents get TabHelper to preserve ExecuteScriptInTab woring for windows" This reverts commit 28bb99c8caa8bd7dc15c1701938b86c420c96a59. commit 26ab44593f8eea6a7653177c3326295ec11afb89 Author: petemill Date: Thu Apr 5 20:15:01 2018 -0700 Window WebContents get TabHelper to preserve ExecuteScriptInTab woring for windows Even though ExecuteScriptInTab probably shouldn't work on a Window's WebContent, this is existing functionality that dependent projects may use. Can consider refactoring those implementations if this causes any side effects. Auditors: @bridiver commit 3c6fb8a66badad98cfbb801383115d0f1cb84d14 Author: petemill Date: Wed Apr 4 10:39:01 2018 -0700 Use webContents.id for unique ID across different kinds of WebContents Fixes bad references in the remote registry since .getId() on non-tab contents, such as window's WebContents, will always be -1. Also adds optional logging for debugging ObjectsRegistry actions. commit 38765bbd8e051467a11c0c9ec49913374012fe31 Author: bridiver Date: Wed Apr 4 12:53:50 2018 -0700 Bump v6.0.1+65.0.3325.181 commit 90ffde3d6dd5b9d444cbce76ef1ff5c17b527c7e Author: bridiver Date: Tue Apr 3 20:57:04 2018 -0700 clone wip commit b872697b3c2e5e36ee2a7b433d9b1a8b71f33c13 Author: bridiver Date: Tue Apr 3 20:43:38 2018 -0700 keep `active_` in sync commit 4b13bfdbc6a4ad5ffc6d787056830acc9f1bc335 Author: bridiver Date: Mon Apr 2 20:53:55 2018 -0700 main window webcontents should get ZoomController and RendererPreferencesHelper fix https://github.com/brave/browser-laptop/issues/13681 commit d6353e67bf469b26247cfe07d724234bb8a0e719 Author: bridiver Date: Fri Mar 30 18:38:45 2018 -0700 Bump v6.0.0+65.0.3325.181 commit ca7c06fd9b010e2b86ba565a10c8efaa5b4ce1ae Author: bridiver Date: Fri Mar 30 18:32:53 2018 -0700 always return a value for `isDestroyed` commit f959001f8645a22058cb3872e1b608cce9319891 Author: petemill Date: Fri Mar 30 17:28:41 2018 -0700 forward tab-inserted-at to renderer commit 4260d31851d391009e7447a7760495e26052f999 Author: petemill Date: Fri Mar 30 17:28:05 2018 -0700 forward tab-moved event to renderer commit ae74375cf508960f6bcc00f8818834808c76b180 Author: petemill Date: Fri Mar 30 17:27:07 2018 -0700 handle unknown WebContents events forwarding to renderer commit 480369c024170b8e37b4a662bb5f6db1746f9cdd Author: petemill Date: Fri Mar 30 17:26:02 2018 -0700 fix: embedder tab event duplication on insert to new tab strip commit 1b6d0136f429b37d8c548ade1cec2a9d4b9a9f01 Author: petemill Date: Fri Mar 30 16:41:53 2018 -0700 webview detachGuest internal reference fix commit 4a57c2240472461d8791c5aedb419cf77cf8135b Author: bridiver Date: Wed Mar 28 17:51:55 2018 -0700 TabDetachedAt is already handled correctly in TabHelper and this fires the event sometimes when it shouldn't commit 5e452aa1a66a0161195d34b3fd370e095a71f261 Author: petemill Date: Wed Mar 28 15:22:27 2018 -0700 only register guests from window contents on tab insert commit 91b69699c8e1f9b6c14ab120ba5c95ec26412fd1 Author: bridiver Date: Wed Mar 28 12:31:37 2018 -0700 emit tab-inserted-at and tab-detached-at on tab and window webcontents commit bfb37894a2496e4d7bf16c26bdd0539ed23a0115 Author: bridiver Date: Wed Mar 28 12:24:44 2018 -0700 emit `tab-replaced-at` on old webcontents commit 9520ff3c128f3656e1c98d4580202987a64440a4 Author: bridiver Date: Tue Mar 27 19:51:37 2018 -0700 add MoveTo commit 425daab00e846d0aecb6e3fe5c6220358daf7737 Author: bridiver Date: Tue Mar 27 16:08:40 2018 -0700 add window_id to tab-detached-at only the embedder should be a tab strip observer commit 176c6ad3a120d61dfdbfa980a4cbc3d4211e6ae5 Author: petemill Date: Tue Mar 27 15:09:07 2018 -0700 forward tab-detached-at to renderer commit a65d47bbb85796c866b8a869540128617e374549 Author: petemill Date: Mon Mar 26 01:42:38 2018 -0700 remote.registerAllWindowTabEvents commit 2978ed22df66955d19deaa45ebe6f8dd90636173 Author: petemill Date: Fri Mar 23 22:14:36 2018 -0700 harden webview detach / attach against destroy timing commit 9298f7ef1d19ce1bfbba6161034102a29a28c68a Author: bridiver Date: Fri Mar 23 21:34:30 2018 -0700 don't discard discareded tabs commit 5f929ad34340933e9427f596f77e286878c85f9a Author: bridiver Date: Fri Mar 23 14:15:20 2018 -0700 only detach/attach if the replaced contents is attached commit a39f8405acebf3cb2653393f88242bbb35fd3456 Author: petemill Date: Fri Mar 23 13:05:07 2018 -0700 stop forwarding tab events to detached webview commit d4a33e7e7570a512d4a20ece6b0247af5a1b16bd Author: petemill Date: Fri Mar 23 12:10:08 2018 -0700 Ensure guest embedder gets events for replaced contents commit f3b5fb9b22fc1ccf608d2a963ce4d8df40262613 Author: bridiver Date: Fri Mar 23 08:45:06 2018 -0700 use owner instead of embedder because only the active tab has an embedder commit 8d2989867c2701a356dd6817763ed2f33a90b128 Author: bridiver Date: Thu Mar 22 19:11:59 2018 -0700 fix insertion order commit 773f2a9890d67192a1311ee86bdb8ccd26f7d11a Author: bridiver Date: Thu Mar 22 18:38:13 2018 -0700 remove unnecessary change commit d875dfe768856e090eb80ca2580b149e93dd802b Author: bridiver Date: Thu Mar 22 18:03:28 2018 -0700 allow localhost urls in webui for dev commit fb9eb68438b01838550d3c453ba9d66ff21efe1d Author: bridiver Date: Thu Mar 22 18:03:17 2018 -0700 fix discarded tabs probably commit 6d86bcaa3fee15bb706e25415352f5aec3196de0 Author: bridiver Date: Wed Mar 21 22:06:37 2018 -0700 don't check for HasWindow here because the browser has not been set yet - maybe we should call this when the browser has been set? commit 24d079344347a4e1f78b8f5b850220d215739bf0 Author: petemill Date: Wed Mar 21 16:38:55 2018 -0700 .detachGuest prevent multiple calls for same guest Also offer promise result commit 0e0cfda430eb91ecf84c4c131a3cec09cba5bec9 Author: Pete Miller Date: Fri Mar 9 00:08:24 2018 -0800 restore content events for backwards compat commit beafceaf20b0e42e13309a645352ad1442e92837 Author: Pete Miller Date: Fri Mar 9 00:02:09 2018 -0800 should not try to detach a guest of a destroyed contents commit c649c916f1ab127f100ee5f48be7c2c093210f6d Author: Pete Miller Date: Wed Mar 7 17:26:56 2018 -0800 keep sending guest events to embedder after detach from webview whilst still in window tab strip commit 3f5db317a79fc74cb14320b7036adc7efd2e56f8 Author: bridiver Date: Wed Mar 7 15:49:55 2018 -0800 tab-inserted-at tab-detached-at commit 0634ead6aa1454fc4bdb53088fb2d75f3d234cac Author: bridiver Date: Tue Mar 6 15:34:07 2018 -0800 don't replace commit 150d859505db2274f7f0065a620fb06da31fe578 Author: bridiver Date: Tue Mar 6 14:16:18 2018 -0800 replaceGuestContents commit e2666ef0a5a1604cf39795c63e6aec89783020d4 Author: Pete Miller Date: Mon Feb 26 20:09:30 2018 -0800 gets getGuestId and getId functions commit 16a665017bcae983fbbea6a91a4b05b60afe86d7 Author: bridiver Date: Fri Feb 23 21:30:01 2018 -0700 oops commit 3e76b0ed9c504894c5072dc09c89a28c75a976d2 Author: bridiver Date: Fri Feb 23 20:59:05 2018 -0700 load test commit 3707fea6733cc030f107e13494b3e12d738895dc Author: bridiver Date: Fri Feb 23 19:54:57 2018 -0700 forward `tab-replaced-at` to the renderer commit 1e80580e967eee17aa34436bc88ac14113a72b4a Author: bridiver Date: Fri Feb 23 16:26:47 2018 -0700 has window commit 8af66ae9d43c22e58afd9572d9426009ed7d6c8c Author: bridiver Date: Tue Feb 13 17:47:54 2018 -0700 fixes commit a662031475348b4cb1b24f642a5e03f2fc8b5371 Author: bridiver Date: Tue Feb 13 16:59:27 2018 -0700 add support for global tab event handler commit 8d3b1af8efe0678c8adaa9f2584b0edd01955b70 Author: bridiver Date: Tue Feb 13 16:58:48 2018 -0700 pt 2 commit 1fb518a9296c0b444b606d30871fb84a6dc37745 Author: bridiver Date: Tue Feb 13 16:58:08 2018 -0700 add support for TabReplacedAt commit 20e425b704a48da464fc83bfe52676d139e26272 Author: bridiver Date: Sun Feb 11 18:59:22 2018 -0700 wip commit d462800b4dacc4d013f6be83c491a855332357fa Author: bridiver Date: Fri Feb 9 20:45:49 2018 -0700 insert into tab strip before attach commit f5a913c7569aada55daa42a182f59a97c3f5230e Author: Brian Clifton Date: Wed Apr 25 22:20:40 2018 -0700 Bump v5.2.7+66.0.3359.117 commit 1acc7d63bf6c32f6b60ddad53282a8b271261ff2 Author: Brian Clifton Date: Wed Apr 25 22:19:50 2018 -0700 Merge pull request #579 from brave/cc_upload Disable credit card upload by default commit 617ff5a59d7e707c238939bc731da10964843a5b Author: bridiver Date: Sat Apr 21 16:55:55 2018 -0700 add PasswordWebDataService commit ce7680b063ea6ca2c4d40c389a02769eda4b3e5e Author: bridiver Date: Sat Apr 21 08:04:28 2018 -0700 Bump v5.2.6+66.0.3359.117 commit 552def024b8640b2833fc1b00069f60f5933b0a5 Author: bridiver Date: Fri Apr 20 16:00:42 2018 -0700 use WebDataServiceWrapper auditors @darkdh @hferreiro commit df6fa799bc69bdf63634ed5c8868856d4d34a4e6 Author: bridiver Date: Fri Apr 20 15:41:26 2018 -0700 use new `CreateLoginDelegate` method auditors @darkdh @ltilve commit c40ce82f8f5ecb82675c94af2a1351286bcc7619 Author: Anthony Tseng Date: Thu Apr 19 18:40:51 2018 -0700 Fix GetDevToolsURL https://chromium.googlesource.com/chromium/src/+/c8a484b5f69327d05a95c0298b1ef2a18f192532 https://chromium.googlesource.com/chromium/src/+/0648bcb737057e3fbf3d23791fb3e7758caa83f1 fix https://github.com/brave/browser-laptop/issues/13870 Auditor: @bridiver commit 85885f2c63b370f89d2c85c096b976b2115db353 Author: bridiver Date: Wed Apr 18 21:17:10 2018 -0700 Bump v5.2.5+66.0.3359.117 commit 1115ad72df67bda9506dbdaadee56e818c268180 Author: Brian Johnson Date: Wed Apr 18 21:02:57 2018 -0700 Merge pull request #575 from brave/deps-b-l-2184 Update external binaries to 1.3.0 for latest Squirrel.Mac commit 808e32a0268e17ba59e02e4de9eeb304c0876f2b Author: Anthony Tseng Date: Wed Apr 18 16:01:56 2018 -0700 Disable unified autoplay policy https://chromium.googlesource.com/chromium/src/+/12c615ca3716162f32341c597d581b3a6d6b7f95 Auditor: @bridiver commit 7a843b0b2f582d9014f17c48c508d93bff7ea76e Author: bridiver Date: Tue Apr 17 17:57:41 2018 -0700 Bump v5.2.4+66.0.3359.117 commit be33729cf6e51515c4f83023c1cb37ee6374c8da Author: Anthony Tseng Date: Tue Apr 17 16:29:29 2018 -0700 Follow up of 9b3fa42a7d8ddf2833cad4e6644f5932273e305f and 49fb698039a53bbc98d43f53a4e4b44c136d7cfc commit 8fdda7d9421946fb77d456da3564f66054b6cbb3 Author: bridiver Date: Tue Apr 17 09:04:48 2018 -0700 Bump v5.2.3+66.0.3359.81 commit 8dfaa2c2cf11ffee73b371dd54e8c50697b4d051 Author: bridiver Date: Mon Apr 16 21:18:37 2018 -0700 don't set the web_layer_ to null on detach commit 49fb698039a53bbc98d43f53a4e4b44c136d7cfc Author: Anthony Tseng Date: Mon Apr 16 16:12:00 2018 -0700 Fixup metrics_service_accessor.cc patch commit 9b3fa42a7d8ddf2833cad4e6644f5932273e305f Author: Anthony Tseng Date: Mon Apr 16 15:37:44 2018 -0700 Fix MetricsServiceAccessor::IsMetricsReportingEnabled https://chromium.googlesource.com/chromium/src/+/0176f9a3186594f2906d67418d43a786a2ccd366 fix https://github.com/brave/browser-laptop/issues/13842 Auditors: @bridiver, @hferreiro, @ltilve commit d4effccfda02d2e35cd1a3d6d68a59a9e14d9a1f Author: Anthony Tseng Date: Mon Apr 16 10:46:15 2018 -0700 Servicify unzipping and use it in the component updater. https://chromium.googlesource.com/chromium/src/+/6d76442a2acad95257d7beb62be7691f73f014c0 fix https://github.com/brave/browser-laptop/issues/13840 fix https://github.com/brave/browser-laptop/issues/13838 fix https://github.com/brave/browser-laptop/issues/13837 Auditors: @bridiver, @hferreiro, @ltilve commit 7ce5e916f2e8b3a06ca5d38e07901450e358518c Author: bridiver Date: Fri Apr 13 18:44:53 2018 -0700 Bump v5.2.2+66.0.3359.81 commit 0a64fe98199c029b0e417d23163c17a2fba6aed1 Author: bridiver Date: Thu Apr 12 18:40:34 2018 -0700 Revert "Pass correct status of network to error handler's constructor" This reverts commit 040cc785ddeac1ce018563e625f65e50b742aa28. commit bd7d4ae2c246ce26b77db5ff51385291dc94c58b Author: Brian Clifton Date: Thu Apr 12 14:10:32 2018 -0700 Merge pull request #570 from bsclifton/revert-quarantine Revert "Merge pull request #484 from brave/quarantine_downloads" commit db7f914503cf4ce0170501b3d659452501cf8396 Author: bridiver Date: Thu Apr 12 09:32:54 2018 -0700 Bump v5.2.1+66.0.3359.81 commit 7fdcb483522fbff503538ba5c6d6d623861b301e Author: Henrique Ferreiro Date: Thu Apr 12 13:14:12 2018 +0200 Implement BraveConfigurator::CreateServiceManagerConnector() https://crrev.com/29f9b94b7d8d This was missing from a previous rebase in which it wasn't needed. It fixes #567 and fixes #568. commit d1df1be286ad93e34a79b12738b3f6e838f76474 Author: Lorenzo Tilve Date: Thu Apr 12 13:06:01 2018 +0200 fixup! Remove unused elements from CopyFromSurface() API commit 70b5f858d69560c056ba6688fced19e9a1c62e74 Author: Henrique Ferreiro Date: Thu Apr 12 11:28:08 2018 +0200 fixup! Updates to ExtensionTabUtil commit 7db41e336f638422077b03e210abea83776b1cbe Author: Henrique Ferreiro Date: Thu Apr 12 11:23:46 2018 +0200 fixup! Remove SequencedWorkerPool commit 86d474306ffeca2787e04af1a78789e79e80e7a9 Author: Henrique Ferreiro Date: Thu Apr 12 11:13:33 2018 +0200 fixup! REVIEW: InspectElement() receives a RenderFrameHost commit d526fa07fc80883623e2e15f5a57fc8f3fe4076c Author: Anthony Tseng Date: Wed Apr 11 20:39:30 2018 -0700 chrome: Unship snapshot_blob.bin from Win/Mac/Linux https://chromium.googlesource.com/chromium/src/+/b550792f0f9357f380d501288f368e85d43279b8 fix https://github.com/brave/muon/issues/548 Auditors: @bridiver, @hferreiro, @ltilve commit e0532fe1d1eee960ef358d5e914635388d78e373 Author: Anthony Tseng Date: Wed Apr 11 19:38:33 2018 -0700 fixup chrome_service.cc patch commit 237242113a697ab7647aa6a262b7ec887c37a2de Author: Anthony Tseng Date: Wed Apr 11 19:08:04 2018 -0700 Fix spellchecker fix https://github.com/brave/muon/issues/566 Auditors: @bridiver, @ltilve, @hferreiro commit 662b6bef1a75883c82929379581f4f00d7cef97b Author: bridiver Date: Wed Apr 11 14:59:09 2018 -0700 bump chromedriver version cc @bsclifton commit a1a111f683706c43adee5c46a8f5fb491a87d9a0 Author: bridiver Date: Wed Apr 11 10:02:59 2018 -0700 Bump v5.2.0+66.0.3359.81 commit 8eef379943eb594052aa4c7ca0c4f111fb70752c Author: Lorenzo Tilve Date: Wed Apr 4 23:33:05 2018 +0200 Fix on avoid saving passwords when the user is signing in to Chrome https://crrev.com/80e1c6bf5b21 commit ae174b03afe91635b9c410cbd468f3a2b87e37fc Author: Henrique Ferreiro Date: Mon Mar 26 13:36:09 2018 +0200 DROP Disable chrome service Workarounds https://github.com/brave/muon/issues/547 so that we can do some testing. commit d02c605447c6ffc3ee513585506d311bbc4d47b5 Author: Henrique Ferreiro Date: Fri Mar 23 13:06:21 2018 +0100 Lint fixes commit 2aebd6c71ad000f3b97842312549c664d05f8081 Author: Henrique Ferreiro Date: Thu Mar 22 14:02:16 2018 +0100 Create ::Browser after window is initialized In the below upstream CL, a new constraint is added: the Browser object needs to be added to BrowserList after the window is initialized. This commits moves Browser creation after NativeWindow initialization. http://crrev.com/3ca12c8595fb commit 09b1e33aa38cbe37e2f189f9ee4f2a0ff08db3ad Author: Henrique Ferreiro Date: Thu Mar 22 14:02:02 2018 +0100 REVIEW: Fix linking error on Windows about attestation permissions Should we need to add webauthn prompt? https://crrev.com/85339f65 commit 32f0d10e2abb5cbe76e6779572a7053bed1c19c7 Author: Lorenzo Tilve Date: Tue Mar 20 17:53:26 2018 +0100 Fix Linux linking issues due to missing kLibsecretAndGnomeAppString https://crrev.com/c64adae0b7de commit cc34494283e109bb7a8c06cd32884ec890692938 Author: Henrique Ferreiro Date: Thu Mar 22 14:01:39 2018 +0100 Fix undefined symbol link error commit d8ebcc030723aa84f44e23e34674d7106b822f1d Author: Henrique Ferreiro Date: Thu Mar 22 14:01:10 2018 +0100 Fix ShowFolderUploadConfirmationDialog link error Copy browser_dialog.cc to chromium_src to get ShowFolderUploadConfirmationDialog() referenced from FileSelectHelper::LaunchConfirmationDialog. http://crrev.com/2a02a69e3173 commit 987cb6e3233828e311b42ba69844382a3d02a991 Author: Henrique Ferreiro Date: Thu Mar 22 14:00:43 2018 +0100 Stub UIThreadSearchTermsData::EstimateMemoryUsage() http://crrev.com/361a59325a97 commit d35741a9b95e31994b73380a62d134a02a8bc563 Author: Henrique Ferreiro Date: Thu Mar 22 14:00:01 2018 +0100 Updates to IOThread http://crrev.com/4556c6b0431a http://crrev.com/d9ec7077b9e1 commit 22a1123732bc3d4be834cfb16f0dbb038a9bc9ef Author: Henrique Ferreiro Date: Thu Mar 22 13:59:50 2018 +0100 Fix PrintPreviewMessageHandler http://crrev.com/c9a194557fcc commit bc8979e941eef1ca6052200acfca13d281b6d0c1 Author: Henrique Ferreiro Date: Thu Mar 22 13:59:19 2018 +0100 Fix stub UpgradeDetectorImpl https://crrev.com/875403e09166 https://crrev.com/ded72aba15ca commit b508517129d62c01049396d14797b10fae878c1a Author: Henrique Ferreiro Date: Mon Mar 19 13:20:49 2018 +0100 Convert PersonalDataManager to use IdentityManager https://crrev.com/fbb98d83616e commit 96ff0c455e139bd71dedc77764b0ebe965da9e4a Author: Henrique Ferreiro Date: Mon Mar 19 13:01:11 2018 +0100 TODO: ResourceDispatcherHost::ClearLoginDelegateForRequest() was removed https://crrev.com/bc561f417634 commit 6a9aff3bdaa5e7042363b4bd4d35deae6f682e3b Author: Henrique Ferreiro Date: Thu Mar 22 13:59:02 2018 +0100 Used std::unique_ptr instead of raw pointers to transfer ownership. http://crrev.com/9d35fc570a8f commit 040cc785ddeac1ce018563e625f65e50b742aa28 Author: Henrique Ferreiro Date: Fri Mar 16 21:19:37 2018 +0100 Pass correct status of network to error handler's constructor https://crrev.com/b31c30d73957 commit 44139b67349ef5858e5c45a02a82bc87f3475ed3 Author: Henrique Ferreiro Date: Fri Mar 16 12:23:45 2018 +0100 Remove UtilityMessageHandler https://crrev.com/21b7a819b054 commit 883f7f94987f4d46bc31bbae04d3fe7fffb138d5 Author: Lorenzo Tilve Date: Thu Mar 15 14:04:36 2018 +0100 Mojify spellcheck filter files to spellcheck host files https://crrev.com/384fe0f5b0c5 https://crrev.com/d9085ee1dd4b https://crrev.com/16331307f930 commit eb080bcfb684f317c1c9ef994655604325e7459a Author: Henrique Ferreiro Date: Thu Mar 15 14:07:35 2018 +0100 DROP: temporary fix for an upstream build error in Chromium commit f1dc7edfabadf2e63f88d923029a47af96271e63 Author: Henrique Ferreiro Date: Thu Mar 15 13:46:29 2018 +0100 Remove suborigin implementation https://crrev.com/5641d755098b commit 29977e86e7d8ca0170adea817c49845cd319037c Author: Henrique Ferreiro Date: Thu Mar 15 13:41:54 2018 +0100 Remove v8_helpers::SetProperty() https://crrev.com/b17e66da13e1 commit fe3f33260d79b433da19dce2f37ecdcba644ec57 Author: Henrique Ferreiro Date: Thu Mar 15 13:25:52 2018 +0100 Load resources from extension bundles in the network service https://crrev.com/8f8126680433 commit a598faaa2d336a212a277b9ba277ac5332e888e0 Author: Lorenzo Tilve Date: Thu Mar 15 10:44:01 2018 +0100 Rename IsStorageSessionOnlyOrBlocked() https://crrev.com/cb95a65980b2 commit 66a2d0945f67c1fdfa80d96e7b3af55285918c85 Author: Lorenzo Tilve Date: Thu Mar 15 10:38:41 2018 +0100 Remove unused elements from CopyFromSurface() API https://crrev.com/6a4443f04150 commit 2f58a63e0bb1d4ff7423d1f5fcb4048e6c55a4fb Author: Lorenzo Tilve Date: Thu Mar 15 10:10:58 2018 +0100 Remove InvalidationService::GetIdentityProvider() https://crrev.com/a012b4cba417 commit 501aaa7723100b1575a340c9d8797191e6856d6a Author: Lorenzo Tilve Date: Thu Mar 15 09:58:09 2018 +0100 Reland of NetworkService: Implement URLLoader::OnAuthRequired https://crrev.com/bc561f417634 commit 4833e1869d94e28dc00841b2e868666c60356c9f Author: Lorenzo Tilve Date: Wed Mar 14 22:47:38 2018 +0100 Remove unused content/public/browser/readback_types.h https://crrev.com/6a4443f04150 commit aef580e986a146730d12a7edc5c07c28a8f83fd5 Author: Lorenzo Tilve Date: Wed Mar 14 22:28:33 2018 +0100 Reporting: Check upload permissions asynchronously https://crrev.com/7b07ea496fa6 commit 788c2a3a9ff0692009c697b48ad035d5893e4a8d Author: Lorenzo Tilve Date: Wed Mar 14 16:35:30 2018 +0100 Rename media/cdm/ppapi to media/cdm/library_cdm https://crrev.com/cc32f2eded17 commit 7f993ad7f93cc882346f17f1de4af4b6c80149f4 Author: Lorenzo Tilve Date: Wed Mar 14 13:11:46 2018 +0100 Renamed buildflag_headers https://crrev.com/9ae8289311df commit 09f2360484df8122a32efbb345e8c7f35f7a0403 Author: Lorenzo Tilve Date: Mon Mar 5 22:17:24 2018 +0100 Change APIBindingsSystem to NativeExtensionBindingsSystem https://crrev.com/b15f7f04de19 commit d611ffefabb46dbb2931af07e2271f664bdfbff8 Author: Henrique Ferreiro Date: Mon Mar 5 14:28:48 2018 +0100 Stub AtomAutofillClient::GetIdentityManager() https://crrev.com/3520fb171ac7 commit 6245a73db8347bb77d8a9b6ed04784a13bb8272d Author: Henrique Ferreiro Date: Mon Mar 5 14:04:37 2018 +0100 REVIEW: InspectElement() receives a RenderFrameHost https://crrev.com/902bffab618a commit f12c6c763365a131f8a01dc80af98389af006872 Author: Lorenzo Tilve Date: Sun Mar 4 21:22:12 2018 +0100 Serveral */public/{interfaces => mojom} file moves https://crrev.com/19db638f87e6 https://crrev.com/ed7f41b809a7 commit 2ed2aa54ff4c14b13d3404302776b722d56a539c Author: Lorenzo Tilve Date: Sun Mar 4 18:56:26 2018 +0100 Move kScrubTab to ExtensionTabUtil https://crrev.com/1980f44de819 commit 96ff0ced4ae8bac4556d37f856b56dadaaf0f879 Author: Lorenzo Tilve Date: Sun Mar 4 18:46:13 2018 +0100 Give the JS dialog manager the alerting frame https://crrev.com/2fefc4bd0b63 commit 14793c41e0271b0fadbe92c70828e2c36200ffae Author: Lorenzo Tilve Date: Sun Mar 4 13:42:31 2018 +0100 Remove SequencedWorkerPool https://crrev.com/4914ec14f5ba commit bbb537e74f2c4d1a4f15b9aa0eba96cba5b3b07e Author: Lorenzo Tilve Date: Sun Mar 4 13:33:34 2018 +0100 Use scoped_refptr for the url context getter in the component updater https://crrev.com/556147da66b8 commit 311154148dcc9ca8390e1e81b1c3090ed5952561 Author: Lorenzo Tilve Date: Sun Mar 4 13:12:36 2018 +0100 Moved TOUCH_SUPPORT_* enums to TouchSupport enum classes https://crrev.com/8f12ad6e2ce3 commit 78b511d6dc4dbc3760e918bfdce57a27810ffa39 Author: Henrique Ferreiro Date: Fri Mar 2 10:11:19 2018 +0100 Do not override CancelPermissionRequest() The method was removed from PermissionManager. This commit makes it private. commit ae59935da8eafcb88fd9c0dd58cba0ee30874a99 Author: Henrique Ferreiro Date: Fri Mar 2 00:51:32 2018 +0100 Remove deprecated BrowserThread::FILE and DB https://crrev.com/9f99a202a791 https://crrev.com/7dabf71463f1 https://crrev.com/0070d4146866 https://crrev.com/c61269077f9f https://crrev.com/66bdfd838560 commit 3247af8fc85d40ad81c9aaed7bf0805de4ed14fe Author: Henrique Ferreiro Date: Fri Mar 2 11:31:05 2018 +0100 Use DoNothing() instead of Bind(&DoNothing) https://crrev.com/341e1fbe2da0 commit 50c0907f769435ff93f4af57277aadeeab81959e Author: Henrique Ferreiro Date: Thu Mar 1 13:25:32 2018 +0100 Make profile directory creation always synchronous This is also required for the BrowserThread::FILE deprecation. https://crrev.com/0b08bf2eaee2 commit acbd379fbd6cde1daf62e66743b2d0e6e96afd33 Author: Henrique Ferreiro Date: Thu Mar 1 10:20:23 2018 +0100 Remove obsolete ShouldHandleSystemCommands function https://crrev.com/e7b8d9f40641 commit a65f919b585ae17b14cfa02ed913ccc73debfe26 Author: Henrique Ferreiro Date: Thu Mar 1 01:34:50 2018 +0100 Updates to ExtensionTabUtil https://crrev.com/1980f44de819 commit 729104b861c878f9d000c9e8453da0d5ce7b7ec9 Author: Henrique Ferreiro Date: Thu Mar 1 01:02:55 2018 +0100 WebContentsObserver::WasShown() was moved to OnVisibilityChanged() https://crrev.com/fe4a1775a29f commit decec43bf0ca4c372f08371d09804e7f636aa250 Author: Henrique Ferreiro Date: Wed Feb 28 19:22:30 2018 +0100 Update parameters to WebContents::Renderer{Responsive/Unresponsive}() https://crrev.com/1572e8c3cf50 commit df1fb568ec70d46c8316481703732763562b28b8 Author: Henrique Ferreiro Date: Wed Feb 28 18:38:56 2018 +0100 Rename interfaces directory to mojom in Device Service https://crrev.com/31d0bb0369f9 commit db2a88bcdaba15372953fcc8e8e7c296ef36cb43 Author: Henrique Ferreiro Date: Mon Feb 26 21:42:51 2018 +0100 Include missing 'base/callback.h' commit af2ea63d92b407d7fb756553220dba6949a16d8b Author: Henrique Ferreiro Date: Mon Feb 26 21:15:42 2018 +0100 Stub AtomExtensionSystem::FinishDelayedInstallationIfReady() https://crrev.com/b4fbf923b1cd commit 0537c576b54cf34eca2c9cb1ef014daeadb0a9d4 Author: Henrique Ferreiro Date: Mon Feb 26 21:04:03 2018 +0100 Implement missing AtomExtensionsBrowserClient::IsAppModeForcedForApp() https://crrev.com/fc4a81a9b419 commit bb1df10e6cb7b2c6cc4b7442646de70c5a3eb89b Author: Henrique Ferreiro Date: Mon Feb 26 20:57:27 2018 +0100 Updates to BrowserProcessImpl https://crrev.com/3044d4f94d5e https://crrev.com/c9ae59c8f37d commit 93973e02376ab33afed2f53b9588267e9728f686 Author: Henrique Ferreiro Date: Thu Feb 22 14:09:17 2018 +0100 Update for debug agent removal in Node https://crrev.com/4128082eb181cd1da391c24d1481ffa1c1848da1 commit d65f39693561c6ec7cb356f6f3a2189a84aeb821 Author: Henrique Ferreiro Date: Thu Feb 22 14:06:25 2018 +0100 Add some V8 gyp files V8 removed all of its gypfiles https://crrrev.com/2c8663aa1a2d7e411bb2759dfe31d289990db135 commit 90caadd2a7f3b10ee2ceaf3ade94a8154e9959a2 Author: Lorenzo Tilve Date: Thu Feb 22 12:40:00 2018 +0100 Modernize TabContentsIterator https://crrev.com/2f97ce593ed5 commit 9e9aae98b1036dc418cd70f4c4d5a05a665b2a5e Author: Lorenzo Tilve Date: Thu Feb 22 12:36:31 2018 +0100 TODO: Check cssOrigin param https://crrev.com/9494d72752c2 commit 0ce4a5fc8b624eb89c44c2d4a7b60bb058b7b6fe Author: Lorenzo Tilve Date: Thu Feb 22 11:51:11 2018 +0100 REVIEW: Update chrome service and expose a chrome_renderer service https://crrev.com/16331307f930 https://crrev.com/02a5bf7ceac0 commit e01a137651dd7b64a251abf24f010a9603590ff0 Author: Henrique Ferreiro Date: Mon Feb 26 20:49:03 2018 +0100 Move CreateClientCertStore() to BraveContentBrowserClient https://crrev.com/9409ded1ffb6 commit 4e4b0e366d9200597da333a902e014537d1d8683 Author: Lorenzo Tilve Date: Thu Feb 22 11:16:29 2018 +0100 Moved services/proxy_resolver/public/{interfaces => mojom} https://crrev.com/26cf47486c0e commit 5d9aca6e3e4294bd9c4c00b63c91d8b4a9493ae9 Author: Lorenzo Tilve Date: Wed Feb 21 17:21:36 2018 +0100 Moved VECTOR_ICON_TEMPLATE definitions https://crrev.com/a5676deb1e67 commit 7a967ad29ade15147a1b3cf138ee35f3a0e32a9b Author: Lorenzo Tilve Date: Wed Feb 21 16:08:30 2018 +0100 Changed wm::ShadowElevation constants https://crrev.com/280f4ffbd9bf commit b9c11f5c999adbc6fad1d79532b13fde4ecda441 Author: Lorenzo Tilve Date: Wed Feb 21 14:42:54 2018 +0100 Removed UtilityMessageHandler https://crrev.com/21b7a819b054 commit 2036549c948480d9446bed5281047700ab6c8b07 Author: Henrique Ferreiro Date: Tue Feb 27 11:52:17 2018 +0100 Factor RouteFunction() calls into a separate method https://crrev.com/d9ea83498e82 commit 8ec4a3bc407dd9d20fa0205a8ff1889d83691e64 Author: Lorenzo Tilve Date: Tue Feb 20 13:02:58 2018 +0100 Remove ResourceUsageReporter https://crrev.com/f180ce175b43 commit 083f14364194d93ecde632090f6c36c196cc730b Author: Lorenzo Tilve Date: Tue Feb 20 12:04:53 2018 +0100 Add a weakly-bound RequestQuit closure to ServiceContext https://crrev.com/9b6adaeec348 commit b8827861f39da61d8b13d6e220f409008dc99ddc Author: Lorenzo Tilve Date: Mon Feb 19 21:43:54 2018 +0100 Import moved network_switches.h https://crrev.com/91243b3fec15 commit dfc0659b9904b54f75eea9134826aebfa715f445 Author: Lorenzo Tilve Date: Mon Feb 19 21:33:36 2018 +0100 Renamed ProxyService class to ProxyResolutionService https://crrev.com/8c2f97d546a7 commit 2f57bc7aceef5935cdaf769da71d656633735108 Author: Lorenzo Tilve Date: Mon Feb 19 21:23:51 2018 +0100 Renamed proxy auto config files https://crrev.com/9844d32d14c7 commit cca07210c5cace8a094d95492d066ef96544f78b Author: Lorenzo Tilve Date: Mon Feb 19 20:55:27 2018 +0100 Converted ui::AXEvent to ax::mojom::Event https://crrev.com/dcef1b73d879 commit 94b4b460fef91f49b5ad9beee35eac9b2399169b Author: Lorenzo Tilve Date: Mon Feb 19 20:44:45 2018 +0100 Unified DevTools logic for serving front-end bundles https://crrev.com/c8a484b5f693 commit 523c0a14ac9c8492612e67dbe189b41a3b490e15 Author: Lorenzo Tilve Date: Mon Feb 19 20:31:03 2018 +0100 Extracted kLogNetLog flag to network_switches.h https://crrev.com/a255e00eccc9 commit ef465ee714ead7662989deb94a749256dbcb5176 Author: Lorenzo Tilve Date: Mon Feb 19 20:10:30 2018 +0100 Moved switches::kLogNetLog to network https://crrev.com/91243b3fec15 commit 64f3dc703600d6d4695a8637cf674e9c32ee85af Author: Lorenzo Tilve Date: Mon Feb 19 16:50:54 2018 +0100 Move content/network to services/network https://crrev.com/3bbbdf9432a8 commit a65c794a0c4d8d8f59c8bf4279e908a3f0ba9368 Author: Lorenzo Tilve Date: Mon Feb 19 16:15:20 2018 +0100 Move download related files from content/ to components/download/ https://crbug.com/803135 https://crrev.com/0ca8e1eef71c https://crrev.com/a9f487874963 https://crrev.com/eb78b7a549e4 https://crrev.com/a904f3303bf7 commit 50b0fb4485957ecae2e544990720c96f96b9faaf Author: Lorenzo Tilve Date: Mon Feb 19 15:39:30 2018 +0100 Moved net/proxy to net/proxy_resolution https://crrev.com/582d462e78c5 commit 6493bac080062af5b3946cbbbeb1b1b00d6cf734 Author: Lorenzo Tilve Date: Mon Feb 19 14:26:36 2018 +0100 Moved components/download/public to components/download/public/background_service https://crrev.com/48bf2b931acb commit dd2ca23a27ce942e007fa0db2e4e629bc191cd9b Author: Lorenzo Tilve Date: Mon Feb 19 14:22:41 2018 +0100 Moved device/usb/public/interfaces to device/usb/public/mojom https://crrev.com/fa93b142ca74 commit 4656c2631f11189595a5a2c15fecfc9cd74f3524 Author: Lorenzo Tilve Date: Mon Feb 19 14:18:49 2018 +0100 Renamed media/cdm/ppapi to media/cdm/library_cdm https://crrev.com/cc32f2eded17 commit 978ef1ff908427b4efd83bfe3ebfce05e9a4a581 Author: Lorenzo Tilve Date: Sun Feb 18 21:40:30 2018 +0100 Update patches to Chromium 66.0.3359.81 commit fec8bd38380918d11f6bde6d261734cb9232d38d Author: Brian Johnson Date: Tue Mar 27 13:21:25 2018 -0700 Merge pull request #551 from brave/win-create-dist fix windows create_dist commit 6b284144bd643f437d14ea565724534c049fd381 Author: Brian Clifton Date: Mon Mar 26 16:45:31 2018 -0700 Revert "Merge pull request #531 from brave/fix_526" This reverts commit 364910b6f9d689ad3432ad68c7c69f17288aac68. commit 5f4638eb76c798f90a36fecbfebf095da9fa5281 Author: Brian Clifton Date: Mon Mar 26 10:31:50 2018 -0700 Bump v5.1.2+65.0.3325.181 commit 364910b6f9d689ad3432ad68c7c69f17288aac68 Author: Brian Clifton Date: Mon Mar 26 10:29:35 2018 -0700 Merge pull request #531 from brave/fix_526 Add Pins for Amazon CAs commit 593eaac004f610d17912c914791a028e84b1480b Author: Brian Clifton Date: Mon Mar 26 10:27:56 2018 -0700 Merge pull request #540 from brave/permission_host_muon Incorrect hosts were granted `OpenExternal` permissions commit 1aa98e5546ca058031405244696f07b273797b8e Author: Brian Clifton Date: Mon Mar 26 10:26:49 2018 -0700 Merge pull request #542 from brave/browser-laptop-issue-13521 Add filesystem `type` for dev tools commit 103f04c8ebc01dc6359df4bd5f555c046e90ce2e Author: Brian Clifton Date: Mon Mar 26 10:24:57 2018 -0700 Merge pull request #545 from brave/browser-laptop-issue-13580 Handle mouse up/down in async commit 60482b93fdf9386653e434ba8ea6cc8255ef9023 Author: Brian Clifton Date: Mon Mar 26 10:22:11 2018 -0700 Merge pull request #546 from brave/browser-laptop-13546 Fix printing service on Windows commit a7c2199dbf41bd0d62367f6a69b7023e7ac6657b Author: Brian Johnson Date: Wed Mar 21 17:39:26 2018 -0700 Merge pull request #532 from brave/clearHSTSData Add Session API to clear HSTS entries commit 7cd36f8a99fe5f33f11c0757f4856ed34d9ece84 Author: bridiver Date: Wed Mar 21 13:51:43 2018 -0700 Bump v5.1.1+65.0.3325.181 --- BUILD.gn | 26 +- DEPS | 2 +- app/mac/BUILD.gn | 27 +- app/win/BUILD.gn | 22 - atom/app/BUILD.gn | 2 +- atom/app/atom_content_client.cc | 50 +- atom/app/atom_main_delegate.cc | 9 +- atom/browser/BUILD.gn | 4 +- atom/browser/api/atom_api_app.cc | 6 +- atom/browser/api/atom_api_debugger.cc | 3 +- atom/browser/api/atom_api_protocol.cc | 2 +- atom/browser/api/atom_api_session.cc | 10 +- atom/browser/api/atom_api_web_contents.cc | 28 +- atom/browser/api/atom_api_web_contents.h | 4 +- atom/browser/api/atom_api_web_request.cc | 2 +- atom/browser/api/atom_api_window.cc | 3 +- atom/browser/api/trackable_object.cc | 5 +- atom/browser/atom_browser_client.cc | 3 +- atom/browser/atom_browser_client.h | 2 - .../atom_resource_dispatcher_host_delegate.cc | 64 -- .../atom_resource_dispatcher_host_delegate.h | 7 - atom/browser/autofill/atom_autofill_client.h | 1 + ...browser_context_keyed_service_factories.cc | 6 +- atom/browser/common_web_contents_delegate.cc | 8 +- atom/browser/common_web_contents_delegate.h | 6 +- .../api/atom_extensions_api_client.cc | 4 +- .../atom_browser_client_extensions_part.cc | 29 + .../atom_browser_client_extensions_part.h | 2 + .../atom_extension_host_delegate.cc | 2 +- .../extensions/atom_extension_host_delegate.h | 2 +- .../atom_extension_web_contents_observer.cc | 9 + .../atom_extension_web_contents_observer.h | 4 + .../atom_extensions_browser_client.cc | 9 +- .../extensions/shared_user_script_master.cc | 2 +- atom/browser/extensions/tab_helper.cc | 55 +- atom/browser/extensions/tab_helper.h | 1 + atom/browser/importer/profile_writer.cc | 4 +- atom/browser/login_handler.cc | 1 + atom/browser/login_handler.h | 6 +- atom/browser/mac/dict_util.mm | 9 +- atom/browser/native_window.h | 2 +- atom/browser/native_window_mac.h | 2 +- atom/browser/native_window_mac.mm | 2 +- atom/browser/native_window_views.cc | 2 +- atom/browser/native_window_views.h | 2 +- atom/browser/net/atom_network_delegate.cc | 2 +- atom/browser/web_contents_preferences.cc | 2 - atom/common/BUILD.gn | 8 +- atom/common/api/atom_bindings.cc | 20 - atom/common/api/remote_object_freer.cc | 2 +- atom/common/javascript_bindings.cc | 4 +- .../native_mate_converters/blink_converter.cc | 8 +- .../native_mate_converters/blink_converter.h | 4 +- .../content_converter.h | 2 +- .../v8_value_converter.cc | 3 +- atom/common/platform_util_linux.cc | 2 +- atom/renderer/content_settings_manager.cc | 4 +- atom/utility/atom_content_utility_client.cc | 16 +- atom/utility/atom_content_utility_client.h | 2 +- brave/browser/BUILD.gn | 16 +- brave/browser/brave_browser_context.cc | 2 +- brave/browser/brave_content_browser_client.cc | 83 +- brave/browser/brave_content_browser_client.h | 16 +- brave/browser/brave_permission_manager.cc | 9 + brave/browser/brave_permission_manager.h | 4 + .../widevine_cdm_component_installer.cc | 144 +--- .../tab_view/tab_view_internal_api.cc | 3 +- .../guest_view/tab_view/tab_view_guest.cc | 15 +- .../brave_password_manager_client.cc | 6 +- .../brave_password_manager_client.h | 3 +- .../resource_coordinator/guest_tab_manager.cc | 13 +- .../resource_coordinator/guest_tab_manager.h | 3 +- brave/common/converters/BUILD.gn | 2 +- brave/common/extensions/api/BUILD.gn | 1 - brave/common/extensions/file_bindings.cc | 3 +- .../renderer/brave_content_renderer_client.cc | 35 +- .../renderer/brave_content_renderer_client.h | 6 +- .../extensions/content_settings_bindings.cc | 6 +- .../renderer/extensions/web_frame_bindings.cc | 10 +- ...rave_print_render_frame_helper_delegate.cc | 6 +- .../brave_external_process_importer_bridge.cc | 5 +- .../brave_external_process_importer_bridge.h | 2 +- .../importer/brave_profile_import_impl.cc | 5 +- .../importer/brave_profile_import_impl.h | 2 +- .../importer/brave_profile_import_service.cc | 4 +- brave/utility/importer/chrome_importer.cc | 2 +- chromium_src/BUILD.gn | 93 ++- .../bookmarks/bookmark_model_factory.cc | 1 - .../chrome/browser/browser_process_impl.cc | 27 +- .../host_content_settings_map_factory.cc | 2 +- .../protocol_handler_registry.cc | 3 +- .../engagement/site_engagement_service.cc | 3 +- .../browser/extensions/extension_tab_util.cc | 14 +- .../interstitials/chrome_metrics_helper.cc | 10 +- chromium_src/chrome/browser/io_thread.cc | 38 +- .../attestation_permission_request.cc | 14 + .../permissions/permission_uma_util.cc | 4 - .../chrome/browser/profiles/profile.cc | 2 +- .../browser/profiles/profile_io_data.cc | 24 +- .../browser/profiles/profile_manager.cc | 4 +- .../chrome/browser/safe_browsing/BUILD.gn | 1 - .../chrome_password_protection_service.cc | 11 + .../template_url_service_factory.cc | 1 - chromium_src/chrome/browser/ui/browser.cc | 8 +- chromium_src/chrome/browser/ui/browser.h | 5 + .../browser/ui/page_info/page_info_ui.cc | 5 + .../views/location_bar/location_bar_view.cc | 13 + .../chrome/browser/upgrade_detector_impl.cc | 48 +- .../installer/util/muon_distribution.cc | 3 +- .../renderer/content_settings_observer.cc | 91 ++- .../renderer/content_settings_observer.h | 2 +- common.gypi | 16 +- docs-translations/jp/api/process.md | 9 - docs-translations/ko-KR/api/process.md | 14 - docs/api/process.md | 14 - lib/BUILD.gn | 2 +- muon/browser/BUILD.gn | 2 +- muon/browser/muon_browser_process_impl.cc | 4 +- muon/browser/muon_browser_process_impl.h | 6 +- package-lock.json | 2 +- package.json | 2 +- patches/master_patch.patch | 717 ++++++++++-------- patches/v8/filter.patch | 6 +- vendor/brightray/BUILD.gn | 2 +- vendor/brightray/browser/browser_context.cc | 2 +- .../brightray/browser/browser_main_parts.cc | 2 +- .../inspectable_web_contents_delegate.h | 4 +- .../browser/inspectable_web_contents_impl.cc | 25 +- .../browser/inspectable_web_contents_impl.h | 3 +- vendor/brightray/browser/net_log.cc | 3 +- .../browser/special_storage_policy.cc | 11 +- .../browser/special_storage_policy.h | 2 +- .../browser/url_request_context_getter.cc | 30 +- 133 files changed, 1151 insertions(+), 1090 deletions(-) create mode 100644 chromium_src/chrome/browser/permissions/attestation_permission_request.cc delete mode 100644 chromium_src/chrome/browser/permissions/permission_uma_util.cc create mode 100644 chromium_src/chrome/browser/safe_browsing/chrome_password_protection_service.cc create mode 100644 chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc diff --git a/BUILD.gn b/BUILD.gn index fb5ffea6fa..6b0b0eb2a9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -9,9 +9,9 @@ import("//build/config/ui.gni") import("//build/config/zip.gni") import("//build/util/branding.gni") import("//build/util/process_version.gni") -import("//extensions/features/features.gni") -import("//ppapi/features/features.gni") -import("//printing/features/features.gni") +import("//extensions/buildflags/buildflags.gni") +import("//ppapi/buildflags/buildflags.gni") +import("//printing/buildflags/buildflags.gni") import("//tools/grit/grit_rule.gni") import("//tools/grit/repack.gni") import("//ui/base/ui_features.gni") @@ -117,12 +117,12 @@ repack("packed_extra_resources") { "$root_gen_dir/brave/brave_strings.pak", "$root_gen_dir/chrome/common_resources.pak", "$root_gen_dir/chrome/component_extension_resources.pak", - "$root_gen_dir/blink/public/resources/blink_resources.pak", "$root_gen_dir/content/app/strings/content_strings_en-US.pak", "$root_gen_dir/content/browser/tracing/tracing_resources.pak", "$root_gen_dir/content/content_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", "$root_gen_dir/net/net_resources.pak", + "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", "$root_gen_dir/ui/resources/webui_resources.pak", "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", "$root_gen_dir/ui/strings/ui_strings_en-US.pak", @@ -143,8 +143,8 @@ repack("packed_extra_resources") { "//content/browser/tracing:resources", "//mojo/public/js:resources", "//net:net_resources", - "//third_party/WebKit/public:image_resources", - "//third_party/WebKit/public:resources", + "//third_party/blink/public:image_resources", + "//third_party/blink/public:resources", "//ui/resources", "//ui/strings", "//components/resources:components_resources", @@ -201,7 +201,7 @@ group("child_dependencies") { ":utility", "//base", "//content/public/child", - "//third_party/WebKit/public:blink_devtools_frontend_resources", + "//third_party/blink/public:blink_devtools_frontend_resources", ] if (use_aura) { public_deps += [ "//ui/views/mus" ] @@ -311,7 +311,7 @@ source_set("renderer") { "chromium_src:renderer", ":common", "//components/autofill/content/renderer", - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] data_deps = [ @@ -383,7 +383,7 @@ source_set("native_mate") { deps = [ "build/node", - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] } @@ -545,7 +545,7 @@ if (is_win) { chromedriver = "$chromedriver.exe" } -chromedriver_version = "2.36" +chromedriver_version = "2.37" copy("electron_chromedriver_dist_resources") { sources = [ @@ -684,7 +684,6 @@ action("create_dist") { "$electron_dist_dir/libEGL.dll", "$electron_dist_dir/libGLESv2.dll", "$electron_dist_dir/d3dcompiler_47.dll", - "$electron_dist_dir/$widevine_cdm_path/widevinecdmadapter.dll", ] } @@ -721,11 +720,6 @@ action("create_dist") { ":electron_locale_dist_resources", ] } - if (is_win) { - deps += [ - "app/win:dist_widevine_resources", - ] - } rebase_output = rebase_path(output) if (is_mac) { diff --git a/DEPS b/DEPS index 0855ae8f06..733b3339ec 100644 --- a/DEPS +++ b/DEPS @@ -1,7 +1,7 @@ use_relative_paths = True deps = { - "vendor/node": "https://github.com/brave/node.git@d94fcd8ffc8e13688a7cae35e2e57a5f484d7019", + "vendor/node": "https://github.com/brave/node.git@18f874a7222698fee07c977b84dc6082e114e185", "vendor/ad-block": "https://github.com/brave/ad-block.git@13c33eb0a9dd48c863c61c97ffe9e80414ae83d3", "vendor/tracking-protection": "https://github.com/brave/tracking-protection.git@84695a8997c6e371f8dd2ddfaeb75e641e5e8ff2", "vendor/hashset-cpp": "https://github.com/bbondy/hashset-cpp.git@728fd67bc269765f5a566fb1d2fd9b04b632e68a", diff --git a/app/mac/BUILD.gn b/app/mac/BUILD.gn index 324f41068f..d59752a6bb 100644 --- a/app/mac/BUILD.gn +++ b/app/mac/BUILD.gn @@ -19,6 +19,7 @@ import("//electron/build/config.gni") chrome_version_full = "Frameworks" chrome_framework_name = chrome_product_full_name + " Framework" chrome_helper_name = chrome_product_full_name + " Helper" +chrome_framework_version = "A" tweak_info_plist("electron_app_plist") { info_plist = "resources/app-Info.plist" @@ -87,6 +88,13 @@ tweak_info_plist("electron_framework_plist") { mac_framework_bundle("electron_framework") { output_name = chrome_framework_name + framework_version = chrome_framework_version + framework_contents = [ + "Resources", + "Libraries", + "Helpers", + ] + configs += [ "//build/config/compiler:wexit_time_destructors", ":external_binaries_config" @@ -104,7 +112,6 @@ mac_framework_bundle("electron_framework") { deps = [ "//chrome:chrome_framework_helpers", - ":widevine_cdm_adapter", ":external_binaries_resources", "//electron:electron_framework_resources", "//build/config:exe_and_shlib_deps", @@ -117,7 +124,6 @@ mac_framework_bundle("electron_framework") { ] data_deps = [ - ":widevine_cdm_adapter", ":external_binaries_resources", ] @@ -139,21 +145,6 @@ mac_framework_bundle("electron_framework") { } } -bundle_data("widevine_cdm_adapter") { - sources = [ - "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.plugin", - ] - outputs = [ - "{{bundle_contents_dir}}/Libraries/$widevine_cdm_path/{{source_file_part}}", - ] - data_deps = [ - "//third_party/widevine/cdm:widevinecdm", - ] - public_deps = [ - "//third_party/widevine/cdm:widevinecdmadapter", - ] -} - bundle_data("external_binaries_resources") { sources = [ "$root_out_dir/Squirrel.framework", @@ -363,7 +354,7 @@ group("chromedriver_dist_resources") {} # This list must be updated with the two targets' deps list below, and # the list of _dsyms in :electron_dsym_archive. _electron_symbols_sources = [ - "$root_out_dir/$chrome_framework_name.framework/$chrome_framework_name", + "$root_out_dir/$chrome_framework_name.framework/Versions/$chrome_framework_version/$chrome_framework_name", "$root_out_dir/$chrome_helper_name.app/Contents/MacOS/$chrome_helper_name", "$root_out_dir/$chrome_product_full_name.app/Contents/MacOS/$chrome_product_full_name", "$root_out_dir/crashpad_handler", diff --git a/app/win/BUILD.gn b/app/win/BUILD.gn index 8b6773587e..3111d89c46 100644 --- a/app/win/BUILD.gn +++ b/app/win/BUILD.gn @@ -99,7 +99,6 @@ executable("electron_exe") { "//content/public/app:both", "//crypto", "//sandbox", - ":widevine_cdm_adapter", ] # output filename must be node to generate the correct import library for @@ -168,15 +167,6 @@ process_version_rc_template("electron_exe_version") { output = "$target_gen_dir/electron_exe_version.rc" } -group("widevine_cdm_adapter") { - data_deps = [ - "//third_party/widevine/cdm:widevinecdm", - ] - public_deps = [ - "//third_party/widevine/cdm:widevinecdmadapter", - ] -} - copy("external_binaries") { sources = [ rebase_path("//electron/external_binaries/xinput1_3.dll"), @@ -212,18 +202,6 @@ group("symbol_dist_resources") { public_deps = [ ":generate_breakpad_symbols" ] } -copy("dist_widevine_resources") { - sources = [ - "$root_out_dir/$widevine_cdm_path/widevinecdmadapter.dll", - ] - outputs = [ - "$electron_dist_dir/$widevine_cdm_path/{{source_file_part}}" - ] - public_deps = [ - ":widevine_cdm_adapter", - ] -} - copy("dist_resources") { sources = [ "$root_out_dir/chrome_elf.dll", diff --git a/atom/app/BUILD.gn b/atom/app/BUILD.gn index 38dd4515d1..04ba9f6f25 100644 --- a/atom/app/BUILD.gn +++ b/atom/app/BUILD.gn @@ -30,7 +30,7 @@ source_set("app") { "//content/public/common", "//components/rappor/public/interfaces", "//gpu/config", - "//media:media_features", + "//media:media_buildflags", "//third_party/widevine/cdm:headers", ] } diff --git a/atom/app/atom_content_client.cc b/atom/app/atom_content_client.cc index 40e89940f3..7cd7d2fca9 100644 --- a/atom/app/atom_content_client.cc +++ b/atom/app/atom_content_client.cc @@ -31,12 +31,12 @@ #include "content/public/common/content_constants.h" #include "content/public/common/pepper_plugin_info.h" #include "content/public/common/user_agent.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "gpu/config/gpu_crash_keys.h" #include "gpu/config/gpu_info.h" #include "gpu/config/gpu_util.h" #include "media/base/video_codecs.h" -#include "media/media_features.h" +#include "media/media_buildflags.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "url/url_constants.h" @@ -48,56 +48,10 @@ #include "extensions/common/features/feature_util.h" #endif -#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS) && \ - !defined(WIDEVINE_CDM_IS_COMPONENT) -#define WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT -#include "chrome/common/widevine_cdm_constants.h" -#endif - #if BUILDFLAG(ENABLE_CDM_HOST_VERIFICATION) #include "chrome/common/media/cdm_host_file_path.h" #endif -#if defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) -bool IsWidevineAvailable(base::FilePath* adapter_path, - base::FilePath* cdm_path, - std::vector* codecs_supported, - bool* supports_persistent_license) { - static enum { - NOT_CHECKED, - FOUND, - NOT_FOUND, - } widevine_cdm_file_check = NOT_CHECKED; - // TODO(jrummell): We should add a new path for DIR_WIDEVINE_CDM and use that - // to locate the CDM and the CDM adapter. - if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, adapter_path)) { - *cdm_path = adapter_path->DirName().AppendASCII( - base::GetNativeLibraryName(kWidevineCdmLibraryName)); - if (widevine_cdm_file_check == NOT_CHECKED) { - widevine_cdm_file_check = - (base::PathExists(*adapter_path) && base::PathExists(*cdm_path)) - ? FOUND - : NOT_FOUND; - } - if (widevine_cdm_file_check == FOUND) { - // Add the supported codecs as if they came from the component manifest. - // This list must match the CDM that is being bundled with Chrome. - codecs_supported->push_back(media::VideoCodec::kCodecVP8); - codecs_supported->push_back(media::VideoCodec::kCodecVP9); -#if BUILDFLAG(USE_PROPRIETARY_CODECS) - codecs_supported->push_back(media::VideoCodec::kCodecH264); -#endif // BUILDFLAG(USE_PROPRIETARY_CODECS) - - *supports_persistent_license = false; - - return true; - } - } - - return false; -} -#endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) - namespace atom { namespace { diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 2a8b3528f8..e9569b173c 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -23,7 +23,6 @@ #include "base/path_service.h" #include "base/trace_event/trace_log.h" #include "brightray/common/application_info.h" -#include "chrome/child/child_profiling.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths_internal.h" @@ -34,10 +33,10 @@ #include "components/component_updater/component_updater_paths.h" #include "components/content_settings/core/common/content_settings_pattern.h" #include "content/public/common/content_switches.h" +#include "extensions/buildflags/buildflags.h" #include "extensions/common/constants.h" -#include "extensions/features/features.h" #include "muon/app/muon_crash_reporter_client.h" -#include "printing/features/features.h" +#include "printing/buildflags/buildflags.h" #include "services/service_manager/sandbox/switches.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" @@ -250,9 +249,6 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { chrome::common::mac::EnableCFBundleBlocker(); #endif -#if !defined(CHROME_MULTIPLE_DLL_BROWSER) - ChildProfiling::ProcessStarted(); -#endif Profiling::ProcessStarted(); base::trace_event::TraceLog::GetInstance()->SetArgumentFilterPredicate( @@ -328,7 +324,6 @@ void AtomMainDelegate::PreSandboxStartup() { #if defined(OS_POSIX) && !defined(OS_MACOSX) void AtomMainDelegate::ZygoteForked() { - ChildProfiling::ProcessStarted(); Profiling::ProcessStarted(); if (Profiling::BeingProfiled()) { base::debug::RestartProfilingAfterFork(); diff --git a/atom/browser/BUILD.gn b/atom/browser/BUILD.gn index 154573d7d6..c95727bf03 100644 --- a/atom/browser/BUILD.gn +++ b/atom/browser/BUILD.gn @@ -1,6 +1,6 @@ import("//build/config/ui.gni") import("//build/config/features.gni") -import("//extensions/features/features.gni") +import("//extensions/buildflags/buildflags.gni") import("//media/media_options.gni") source_set("browser") { @@ -19,7 +19,7 @@ source_set("browser") { "//components/autofill/content/browser:browser", "//components/password_manager/core/common", "//third_party/protobuf:protobuf_lite", - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] deps = [ diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index c541405834..35ef6a31eb 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -51,7 +51,7 @@ #include "content/public/browser/render_frame_host.h" #include "content/public/common/content_switches.h" #include "content/renderer/worker_thread_registry.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "muon/browser/muon_browser_process_impl.h" #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" @@ -413,8 +413,8 @@ int GetPathConstant(const std::string& name) { return chrome::DIR_USER_VIDEOS; else if (name == "pepperFlashSystemPlugin") return chrome::FILE_PEPPER_FLASH_SYSTEM_PLUGIN; - else if (name == "widevineCDMAdapter") - return chrome::FILE_WIDEVINE_CDM_ADAPTER; + else if (name == "widevineCDM") + return chrome::FILE_WIDEVINE_CDM; else if (name == "extensionsDir") return component_updater::DIR_COMPONENT_USER; else if (name == "sourceDir") diff --git a/atom/browser/api/atom_api_debugger.cc b/atom/browser/api/atom_api_debugger.cc index d10657d8a2..f37f0ee5c0 100644 --- a/atom/browser/api/atom_api_debugger.cc +++ b/atom/browser/api/atom_api_debugger.cc @@ -12,7 +12,6 @@ #include "atom/common/native_mate_converters/value_converter.h" #include "base/json/json_reader.h" #include "base/json/json_writer.h" -#include "base/memory/ptr_util.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/web_contents.h" #include "native_mate/dictionary.h" @@ -132,7 +131,7 @@ void Debugger::SendCommand(mate::Arguments* args) { request.SetString("method", method); if (!command_params.empty()) request.Set("params", - base::MakeUnique(command_params.Clone())); + std::make_unique(command_params.Clone())); std::string json_args; base::JSONWriter::Write(request, &json_args); diff --git a/atom/browser/api/atom_api_protocol.cc b/atom/browser/api/atom_api_protocol.cc index 604f032cda..045ab98161 100644 --- a/atom/browser/api/atom_api_protocol.cc +++ b/atom/browser/api/atom_api_protocol.cc @@ -63,7 +63,7 @@ void RegisterStandardSchemes(const std::vector& schemes) { auto* policy = content::ChildProcessSecurityPolicy::GetInstance(); for (const std::string& scheme : schemes) { - url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITHOUT_PORT); + url::AddStandardScheme(scheme.c_str(), url::SCHEME_WITH_HOST); policy->RegisterWebSafeScheme(scheme); } diff --git a/atom/browser/api/atom_api_session.cc b/atom/browser/api/atom_api_session.cc index 66c9717f17..db0a260094 100644 --- a/atom/browser/api/atom_api_session.cc +++ b/atom/browser/api/atom_api_session.cc @@ -48,7 +48,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/download_item_utils.h" #include "content/public/browser/storage_partition.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" #include "net/base/load_flags.h" @@ -58,7 +58,8 @@ #include "net/http/http_auth_preferences.h" #include "net/http/transport_security_state.h" #include "net/proxy_resolution/proxy_config_service_fixed.h" -#include "net/proxy_resolution/proxy_service.h" +#include "net/proxy_resolution/proxy_resolution_service.h" +#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_getter.h" @@ -297,8 +298,9 @@ void SetProxyInIO(scoped_refptr getter, const base::Closure& callback) { auto proxy_service = getter->GetURLRequestContext()->proxy_resolution_service(); - proxy_service->ResetConfigService(base::WrapUnique( - new net::ProxyConfigServiceFixed(config))); + proxy_service->ResetConfigService( + base::WrapUnique(new net::ProxyConfigServiceFixed( + net::ProxyConfigWithAnnotation(config, NO_TRAFFIC_ANNOTATION_YET)))); // Refetches and applies the new pac script if provided. proxy_service->ForceReloadProxyConfig(); BrowserThread::PostTask( diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 891da793ae..f8e0025bef 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -62,8 +62,8 @@ #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/printing/print_view_manager_common.h" #include "chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h" -#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/resource_coordinator/tab_manager.h" +#include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" #include "chrome/browser/spellchecker/spellcheck_service.h" #include "chrome/browser/ssl/security_state_tab_helper.h" @@ -104,8 +104,8 @@ #include "net/http/http_response_headers.h" #include "net/url_request/url_request_context.h" #include "printing/print_settings.h" -#include "third_party/WebKit/public/platform/WebInputEvent.h" -#include "third_party/WebKit/public/web/WebFindOptions.h" +#include "third_party/blink/public/platform/web_input_event.h" +#include "third_party/blink/public/web/web_find_options.h" #include "ui/base/l10n/l10n_util.h" #include "ui/display/screen.h" @@ -809,7 +809,7 @@ void WebContents::AddNewContents(content::WebContents* source, blocked = true; } - if (was_blocked && *was_blocked) { + if (blocked) { auto guest = brave::TabViewGuest::FromWebContents(new_contents); if (guest) { guest->Destroy(true); @@ -1276,7 +1276,7 @@ void WebContents::FindReply(content::WebContents* web_contents, } bool WebContents::CheckMediaAccessPermission( - content::WebContents* web_contents, + content::RenderFrameHost* render_frame_host, const GURL& security_origin, content::MediaStreamType type) { return true; @@ -1600,7 +1600,8 @@ void WebContents::WebContentsDestroyed() { if (IsRemote()) { MarkDestroyed(); - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, GetDestroyClosure()); + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, GetDestroyClosure()); return; } @@ -1681,7 +1682,7 @@ bool WebContents::Equal(const WebContents* web_contents) const { } void WebContents::Reload(bool ignore_cache) { - web_contents()->UserGestureDone(); + web_contents()->NavigatedByUser(); if (ignore_cache) web_contents()->GetController().Reload( content::ReloadType::BYPASSING_CACHE, @@ -1730,7 +1731,7 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { std::string user_agent; if (options.Get("userAgent", &user_agent)) { - web_contents()->SetUserAgentOverride(user_agent); + web_contents()->SetUserAgentOverride(user_agent, true); params.override_user_agent = content::NavigationController::UA_OVERRIDE_TRUE; } @@ -1744,7 +1745,7 @@ void WebContents::LoadURL(const GURL& url, const mate::Dictionary& options) { params.should_replace_current_entry = should_replace_current_entry; } - web_contents()->UserGestureDone(); + web_contents()->NavigatedByUser(); params.transition_type = ui::PAGE_TRANSITION_AUTO_TOPLEVEL; params.is_renderer_initiated = false; @@ -1919,7 +1920,7 @@ bool WebContents::IsCrashed() const { void WebContents::SetUserAgent(const std::string& user_agent, mate::Arguments* args) { - web_contents()->SetUserAgentOverride(user_agent); + web_contents()->SetUserAgentOverride(user_agent, true); } std::string WebContents::GetUserAgent() { @@ -2863,7 +2864,8 @@ void WebContents::OnTabCreated(const mate::Dictionary& options, } bool discarded = false; - if (tab_helper && options.Get("discarded", &discarded) && discarded && !active) { + if (tab_helper && + options.Get("discarded", &discarded) && discarded && !active) { std::string url; if (options.Get("url", &url)) { std::unique_ptr entry = @@ -3026,8 +3028,8 @@ mate::Handle WebContents::CreateFrom( return mate::CreateHandle(isolate, static_cast(existing)); } - auto handle = mate::CreateHandle(isolate, new WebContents(isolate, web_contents, - type)); + auto handle = mate::CreateHandle(isolate, new WebContents(isolate, + web_contents, type)); if (type == REMOTE) { auto existing = GetFrom(isolate, web_contents); diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 57227617bb..6bd94b35a5 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -23,7 +23,7 @@ #include "content/public/browser/web_contents_observer.h" #include "content/public/common/context_menu_params.h" #include "content/public/common/favicon_url.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "ipc/ipc_sender.h" #include "native_mate/handle.h" #include "ui/gfx/image/image.h" @@ -450,7 +450,7 @@ class WebContents : public mate::TrackableObject, int active_match_ordinal, bool final_update) override; bool CheckMediaAccessPermission( - content::WebContents* web_contents, + content::RenderFrameHost* render_frame_host, const GURL& security_origin, content::MediaStreamType type) override; void RequestMediaAccessPermission( diff --git a/atom/browser/api/atom_api_web_request.cc b/atom/browser/api/atom_api_web_request.cc index 7f21d66e0a..76173fa1c7 100644 --- a/atom/browser/api/atom_api_web_request.cc +++ b/atom/browser/api/atom_api_web_request.cc @@ -13,7 +13,7 @@ #include "base/task_scheduler/post_task.h" #include "chrome/browser/profiles/profile.h" #include "content/public/browser/browser_thread.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" #include "net/url_request/url_request_context.h" diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index f579e542f8..47ce15733e 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -118,7 +118,6 @@ Window::Window(v8::Isolate* isolate, v8::Local wrapper, create_params.window = window_.get(); window_->SetBrowser(new ::Browser(create_params)); - window_->browser()->session_id().set_id(-1); web_contents->SetOwnerWindow(window_.get()); #if defined(TOOLKIT_VIEWS) @@ -139,7 +138,7 @@ Window::Window(v8::Isolate* isolate, v8::Local wrapper, if (!parent.IsEmpty()) parent->child_windows_.Set(isolate, ID(), wrapper); - window_->browser()->session_id().set_id(ID()); + window_->browser()->set_session_id(SessionID::FromSerializedValue(ID())); Emit("initialized"); } diff --git a/atom/browser/api/trackable_object.cc b/atom/browser/api/trackable_object.cc index b3f847f655..a55a931fd3 100644 --- a/atom/browser/api/trackable_object.cc +++ b/atom/browser/api/trackable_object.cc @@ -2,11 +2,12 @@ // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. +#include + #include "atom/browser/api/trackable_object.h" #include "atom/browser/atom_browser_main_parts.h" #include "base/bind.h" -#include "base/memory/ptr_util.h" #include "base/supports_user_data.h" namespace mate { @@ -48,7 +49,7 @@ void TrackableObjectBase::Destroy() { void TrackableObjectBase::AttachAsUserData(base::SupportsUserData* wrapped) { wrapped->SetUserData(kTrackedObjectKey, - base::MakeUnique(weak_map_id_)); + std::make_unique(weak_map_id_)); } // static diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index d383c1fa56..19b30b7961 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -11,7 +11,6 @@ #include "atom/browser/atom_browser_context.h" #include "atom/browser/atom_browser_main_parts.h" #include "atom/browser/atom_quota_permission_context.h" -#include "atom/browser/atom_resource_dispatcher_host_delegate.h" #include "atom/browser/atom_speech_recognition_manager_delegate.h" #include "atom/browser/native_window.h" #include "atom/browser/web_contents_permission_helper.h" @@ -39,7 +38,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/common/content_switches.h" #include "content/public/common/web_preferences.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "net/ssl/client_cert_identity.h" #include "net/ssl/ssl_cert_request_info.h" #include "ppapi/host/ppapi_host.h" diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 4f9c4adc67..204f86fd9c 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -29,8 +29,6 @@ class SSLCertRequestInfo; namespace atom { -class AtomResourceDispatcherHostDelegate; - class AtomBrowserClient : public brightray::BrowserClient, public content::RenderProcessHostObserver { public: diff --git a/atom/browser/atom_resource_dispatcher_host_delegate.cc b/atom/browser/atom_resource_dispatcher_host_delegate.cc index e619bc75d7..a6e2fafa03 100644 --- a/atom/browser/atom_resource_dispatcher_host_delegate.cc +++ b/atom/browser/atom_resource_dispatcher_host_delegate.cc @@ -35,57 +35,6 @@ using content::ResourceType; namespace atom { -namespace { - -void OnOpenExternal(const GURL& escaped_url, - bool allowed) { - if (allowed) - platform_util::OpenExternal( -#if defined(OS_WIN) - base::UTF8ToUTF16(escaped_url.spec()), -#else - escaped_url, -#endif - true); -} - -void HandleExternalProtocolInUI( - const GURL& url, - int render_process_id, - int render_frame_id, - int frame_tree_node_id, - bool has_user_gesture) { - content::RenderFrameHost* rfh = NULL; - content::WebContents* web_contents = - content::WebContents::FromFrameTreeNodeId(frame_tree_node_id); - - if (!web_contents) { - rfh = content::RenderFrameHost::FromID(render_process_id, - render_frame_id); - if (rfh) { - web_contents = content::WebContents::FromRenderFrameHost(rfh); - } - } - - if (!web_contents) - return; - - if (!rfh) - rfh = web_contents->GetMainFrame(); - - auto permission_helper = - WebContentsPermissionHelper::FromWebContents(web_contents); - if (!permission_helper) - return; - - GURL escaped_url(net::EscapeExternalHandlerValue(url.spec())); - auto callback = base::Bind(&OnOpenExternal, escaped_url); - permission_helper->RequestOpenExternalPermission(callback, rfh, - url, has_user_gesture); -} - -} // namespace - AtomResourceDispatcherHostDelegate::AtomResourceDispatcherHostDelegate() : safe_browsing_(g_browser_process->safe_browsing_service()) { } @@ -139,17 +88,4 @@ void AtomResourceDispatcherHostDelegate::AppendStandardResourceThrottles( throttles->push_back(base::WrapUnique(first_throttle)); } -bool AtomResourceDispatcherHostDelegate::HandleExternalProtocol( - const GURL& url, - ResourceRequestInfo* info) { - BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, - base::Bind(&HandleExternalProtocolInUI, - url, - info->GetChildID(), - info->GetRenderFrameID(), - info->GetFrameTreeNodeId(), - info->HasUserGesture())); - return true; -} - } // namespace atom diff --git a/atom/browser/atom_resource_dispatcher_host_delegate.h b/atom/browser/atom_resource_dispatcher_host_delegate.h index 68681ea5ef..e510ddaf25 100644 --- a/atom/browser/atom_resource_dispatcher_host_delegate.h +++ b/atom/browser/atom_resource_dispatcher_host_delegate.h @@ -30,13 +30,6 @@ class AtomResourceDispatcherHostDelegate std::vector>* throttles) override; - - - // content::ResourceDispatcherHostDelegate: - bool HandleExternalProtocol( - const GURL& url, - content::ResourceRequestInfo* info) override; - protected: virtual void AppendStandardResourceThrottles( net::URLRequest* request, diff --git a/atom/browser/autofill/atom_autofill_client.h b/atom/browser/autofill/atom_autofill_client.h index f0a3150a16..7e95e554e0 100644 --- a/atom/browser/autofill/atom_autofill_client.h +++ b/atom/browser/autofill/atom_autofill_client.h @@ -97,6 +97,7 @@ class AtomAutofillClient const base::Closure& callback) override {}; bool ShouldShowSigninPromo() override { return false; }; bool IsAutofillSupported() override { return true; } + bool AreServerCardsSupported() override { return false; } void ExecuteCommand(int id) override {} // content::WebContentsObserver implementation. diff --git a/atom/browser/browser_context_keyed_service_factories.cc b/atom/browser/browser_context_keyed_service_factories.cc index e5e95ee239..469d6b4464 100644 --- a/atom/browser/browser_context_keyed_service_factories.cc +++ b/atom/browser/browser_context_keyed_service_factories.cc @@ -11,9 +11,9 @@ #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/password_manager/password_store_factory.h" #include "chrome/browser/spellchecker/spellcheck_factory.h" -#include "components/spellcheck/spellcheck_build_features.h" -#include "extensions/features/features.h" -#include "ppapi/features/features.h" +#include "components/spellcheck/spellcheck_buildflags.h" +#include "extensions/buildflags/buildflags.h" +#include "ppapi/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_PLUGINS) #include "chrome/browser/plugins/plugin_prefs_factory.h" #endif diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index e8882ee4f7..cae8ad0110 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -42,7 +42,7 @@ #include "content/public/browser/render_widget_host.h" #include "content/public/browser/security_style_explanation.h" #include "content/public/browser/security_style_explanations.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "net/ssl/ssl_cipher_suite_names.h" #include "net/ssl/ssl_connection_status_flags.h" #include "storage/browser/fileapi/isolated_context.h" @@ -417,7 +417,8 @@ void CommonWebContentsDelegate::DevToolsRemoveFileSystem( void CommonWebContentsDelegate::DevToolsIndexPath( int request_id, - const std::string& file_system_path) { + const std::string& file_system_path, + const std::vector& excluded_folders) { if (!IsDevToolsFileSystemAdded(GetDevToolsWebContents(), file_system_path)) { OnDevToolsIndexingDone(request_id, file_system_path); return; @@ -428,6 +429,7 @@ void CommonWebContentsDelegate::DevToolsIndexPath( scoped_refptr( devtools_file_system_indexer_->IndexPath( file_system_path, + excluded_folders, base::Bind( &CommonWebContentsDelegate::OnDevToolsIndexingWorkCalculated, base::Unretained(this), @@ -513,7 +515,7 @@ void CommonWebContentsDelegate::DevToolsAddFileSystemInteral( auto pref_service = GetPrefService(GetDevToolsWebContents()); DictionaryPrefUpdate update(pref_service, prefs::kDevToolsFileSystemPaths); update.Get()->SetWithoutPathExpansion( - path.AsUTF8Unsafe(), base::MakeUnique(type)); + path.AsUTF8Unsafe(), std::make_unique(type)); web_contents_->CallClientFunction("DevToolsAPI.fileSystemAdded", file_system_value.get(), diff --git a/atom/browser/common_web_contents_delegate.h b/atom/browser/common_web_contents_delegate.h index 16be3e50d9..f900b9588b 100644 --- a/atom/browser/common_web_contents_delegate.h +++ b/atom/browser/common_web_contents_delegate.h @@ -98,8 +98,10 @@ class CommonWebContentsDelegate const std::string& type) override; void DevToolsRemoveFileSystem( const base::FilePath& file_system_path) override; - void DevToolsIndexPath(int request_id, - const std::string& file_system_path) override; + void DevToolsIndexPath( + int request_id, + const std::string& file_system_path, + const std::vector& excluded_folders) override; void DevToolsStopIndexing(int request_id) override; void DevToolsSearchInPath(int request_id, const std::string& file_system_path, diff --git a/atom/browser/extensions/api/atom_extensions_api_client.cc b/atom/browser/extensions/api/atom_extensions_api_client.cc index 1a82554868..3203e378a5 100644 --- a/atom/browser/extensions/api/atom_extensions_api_client.cc +++ b/atom/browser/extensions/api/atom_extensions_api_client.cc @@ -173,7 +173,7 @@ void AtomExtensionsAPIClient::AddAdditionalValueStoreCaches( std::unique_ptr AtomExtensionsAPIClient::CreateGuestViewManagerDelegate( content::BrowserContext* context) const { - return base::MakeUnique(context); + return std::make_unique(context); } void AtomExtensionsAPIClient::AttachWebContentsHelpers( @@ -183,7 +183,7 @@ void AtomExtensionsAPIClient::AttachWebContentsHelpers( MessagingDelegate* AtomExtensionsAPIClient::GetMessagingDelegate() { if (!messaging_delegate_) - messaging_delegate_ = base::MakeUnique(); + messaging_delegate_ = std::make_unique(); return messaging_delegate_.get(); } diff --git a/atom/browser/extensions/atom_browser_client_extensions_part.cc b/atom/browser/extensions/atom_browser_client_extensions_part.cc index d950924b23..3d85046c5a 100644 --- a/atom/browser/extensions/atom_browser_client_extensions_part.cc +++ b/atom/browser/extensions/atom_browser_client_extensions_part.cc @@ -41,6 +41,7 @@ #include "extensions/common/constants.h" #include "extensions/common/extension_l10n_util.h" #include "extensions/common/extensions_client.h" +#include "extensions/common/manifest_handlers/app_isolation_info.h" #include "extensions/common/manifest_handlers/background_info.h" #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" #include "extensions/common/switches.h" @@ -56,6 +57,8 @@ namespace { enum RenderProcessHostPrivilege { PRIV_NORMAL, + PRIV_HOSTED, + PRIV_ISOLATED, PRIV_EXTENSION, }; @@ -74,6 +77,12 @@ RenderProcessHostPrivilege GetPrivilegeRequiredByUrl( if (!url.SchemeIs(kExtensionScheme)) return PRIV_NORMAL; + const Extension* extension = + registry->enabled_extensions().GetByID(url.host()); + if (extension && AppIsolationInfo::HasIsolatedStorage(extension)) + return PRIV_ISOLATED; + if (extension && extension->is_hosted_app()) + return PRIV_HOSTED; return PRIV_EXTENSION; } @@ -86,6 +95,15 @@ RenderProcessHostPrivilege GetProcessPrivilege( if (extension_ids.empty()) return PRIV_NORMAL; + for (const std::string& extension_id : extension_ids) { + const Extension* extension = + registry->enabled_extensions().GetByID(extension_id); + if (extension && AppIsolationInfo::HasIsolatedStorage(extension)) + return PRIV_ISOLATED; + if (extension && extension->is_hosted_app()) + return PRIV_HOSTED; + } + return PRIV_EXTENSION; } @@ -167,6 +185,17 @@ bool AtomBrowserClientExtensionsPart::IsSuitableHost( privilege_required; } +// static +bool AtomBrowserClientExtensionsPart::ShouldUseSpareRenderProcessHost( + Profile* profile, + const GURL& site_url) { + // Extensions should not use a spare process, because they require passing a + // command-line flag (switches::kExtensionProcess) to the renderer process + // when it launches. A spare process is launched earlier, before it is known + // which navigation will use it, so it lacks this flag. + return !site_url.SchemeIs(kExtensionScheme); +} + // static bool AtomBrowserClientExtensionsPart::ShouldTryToUseExistingProcessHost( diff --git a/atom/browser/extensions/atom_browser_client_extensions_part.h b/atom/browser/extensions/atom_browser_client_extensions_part.h index 75b13bee83..0355b8863a 100644 --- a/atom/browser/extensions/atom_browser_client_extensions_part.h +++ b/atom/browser/extensions/atom_browser_client_extensions_part.h @@ -55,6 +55,8 @@ class AtomBrowserClientExtensionsPart { const GURL& site_url); static bool ShouldTryToUseExistingProcessHost(Profile* profile, const GURL& url); + static bool ShouldUseSpareRenderProcessHost(Profile* profile, + const GURL& site_url); static bool ShouldSwapBrowsingInstancesForNavigation( content::SiteInstance* site_instance, const GURL& current_url, diff --git a/atom/browser/extensions/atom_extension_host_delegate.cc b/atom/browser/extensions/atom_extension_host_delegate.cc index b802c3aff1..0a9c08b3ad 100644 --- a/atom/browser/extensions/atom_extension_host_delegate.cc +++ b/atom/browser/extensions/atom_extension_host_delegate.cc @@ -69,7 +69,7 @@ void AtomExtensionHostDelegate::ProcessMediaAccessRequest( } bool AtomExtensionHostDelegate::CheckMediaAccessPermission( - content::WebContents* web_contents, + content::RenderFrameHost* render_frame_host, const GURL& security_origin, content::MediaStreamType type, const Extension* extension) { diff --git a/atom/browser/extensions/atom_extension_host_delegate.h b/atom/browser/extensions/atom_extension_host_delegate.h index ddd72945f9..c59a3bd49e 100644 --- a/atom/browser/extensions/atom_extension_host_delegate.h +++ b/atom/browser/extensions/atom_extension_host_delegate.h @@ -28,7 +28,7 @@ class AtomExtensionHostDelegate : public ExtensionHostDelegate { const content::MediaStreamRequest& request, const content::MediaResponseCallback& callback, const Extension* extension) override; - bool CheckMediaAccessPermission(content::WebContents* web_contents, + bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, const GURL& security_origin, content::MediaStreamType type, const Extension* extension) override; diff --git a/atom/browser/extensions/atom_extension_web_contents_observer.cc b/atom/browser/extensions/atom_extension_web_contents_observer.cc index b99e8dfd44..bbda68e5e5 100644 --- a/atom/browser/extensions/atom_extension_web_contents_observer.cc +++ b/atom/browser/extensions/atom_extension_web_contents_observer.cc @@ -29,6 +29,15 @@ AtomExtensionWebContentsObserver::AtomExtensionWebContentsObserver( AtomExtensionWebContentsObserver::~AtomExtensionWebContentsObserver() {} +void AtomExtensionWebContentsObserver::CreateForWebContents( + content::WebContents* web_contents) { + content::WebContentsUserData< + AtomExtensionWebContentsObserver>::CreateForWebContents(web_contents); + + // Initialize this instance if necessary. + FromWebContents(web_contents)->Initialize(); +} + void AtomExtensionWebContentsObserver::RenderFrameCreated( content::RenderFrameHost* render_frame_host) { ExtensionWebContentsObserver::RenderFrameCreated(render_frame_host); diff --git a/atom/browser/extensions/atom_extension_web_contents_observer.h b/atom/browser/extensions/atom_extension_web_contents_observer.h index 6e2f5958d1..d7140b3850 100644 --- a/atom/browser/extensions/atom_extension_web_contents_observer.h +++ b/atom/browser/extensions/atom_extension_web_contents_observer.h @@ -24,6 +24,10 @@ class AtomExtensionWebContentsObserver public: ~AtomExtensionWebContentsObserver() override; + // Creates and initializes an instance of this class for the given + // |web_contents|, if it doesn't already exist. + static void CreateForWebContents(content::WebContents* web_contents); + private: friend class content::WebContentsUserData; diff --git a/atom/browser/extensions/atom_extensions_browser_client.cc b/atom/browser/extensions/atom_extensions_browser_client.cc index 9901783a6d..a1d3b91077 100644 --- a/atom/browser/extensions/atom_extensions_browser_client.cc +++ b/atom/browser/extensions/atom_extensions_browser_client.cc @@ -22,6 +22,8 @@ #include "base/version.h" #include "brave/browser/brave_browser_context.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h" +#include "chrome/browser/extensions/api/i18n/i18n_api.h" #include "chrome/browser/extensions/chrome_component_extension_resource_manager.h" #include "chrome/browser/extensions/chrome_extension_api_frame_id_map_helper.h" #include "chrome/browser/extensions/chrome_url_request_util.h" @@ -67,9 +69,9 @@ #include "base/sha1.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" -#include "chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h" #include "extensions/common/file_util.h" #include "net/url_request/url_request_simple_job.h" + #include "electron/brave/common/extensions/api/generated_api_registration.h" #include "extensions/browser/api/generated_api_registration.h" @@ -443,6 +445,11 @@ void AtomExtensionsBrowserClient::RegisterExtensionFunctions( api::CryptotokenPrivateCanOriginAssertAppIdFunction:: histogram_value(), }, + { + NewExtensionFunction, + I18nGetAcceptLanguagesFunction::function_name(), + I18nGetAcceptLanguagesFunction::histogram_value(), + }, }; for (const auto& entry : chromeEntries) { diff --git a/atom/browser/extensions/shared_user_script_master.cc b/atom/browser/extensions/shared_user_script_master.cc index bc338204ca..ba03f79f18 100644 --- a/atom/browser/extensions/shared_user_script_master.cc +++ b/atom/browser/extensions/shared_user_script_master.cc @@ -8,9 +8,9 @@ #include "atom/browser/extensions/shared_user_script_master.h" #include "atom/browser/extensions/atom_extensions_browser_client.h" -#include "chrome/common/extensions/manifest_handlers/content_scripts_handler.h" #include "extensions/browser/extension_registry.h" #include "extensions/common/host_id.h" +#include "extensions/common/manifest_handlers/content_scripts_handler.h" namespace extensions { diff --git a/atom/browser/extensions/tab_helper.cc b/atom/browser/extensions/tab_helper.cc index d8023f530f..0880bf187f 100644 --- a/atom/browser/extensions/tab_helper.cc +++ b/atom/browser/extensions/tab_helper.cc @@ -19,7 +19,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/resource_coordinator/discard_reason.h" +#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_external.h" #include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" @@ -89,6 +89,7 @@ TabHelper::TabHelper(content::WebContents* contents) index_(TabStripModel::kNoTab), pinned_(false), discarded_(false), + auto_discardable_(true), active_(false), is_placeholder_(false), window_closing_(false), @@ -187,8 +188,10 @@ bool TabHelper::AttachGuest(int window_id, int index) { content::WebContents* TabHelper::DetachGuest() { if (guest()->attached()) { // create temporary null placeholder + content::WebContents::CreateParams + create_params(browser_->tab_strip_model()->profile()); auto null_contents = GetTabManager()->CreateNullContents( - browser_->tab_strip_model(), web_contents()); + create_params, web_contents()); null_contents->GetController().CopyStateFrom( web_contents()->GetController(), false); @@ -303,7 +306,7 @@ void TabHelper::MaybeAttachOrCreatePinnedTab() { // pinned_web_contents); // } else { SetPlaceholder(false); - web_contents()->UserGestureDone(); + web_contents()->NavigatedByUser(); guest()->Load(); // } } @@ -368,12 +371,6 @@ void TabHelper::ActiveTabChanged(content::WebContents* old_contents, void TabHelper::SetActive(bool active) { if (active) { - if (discarded_) { - discarded_ = false; - // It's safe to let the tab manager take over again - SetAutoDiscardable(true); - } - if (browser_) { browser_->tab_strip_model()->ActivateTabAt(get_index(), true); if (!IsDiscarded()) { @@ -395,7 +392,6 @@ void TabHelper::OnVisibilityChanged(content::Visibility visibility) { if (visibility == content::Visibility::VISIBLE && helper) { // load the tab if it is shown without being activate (tab preview) discarded_ = false; - SetAutoDiscardable(true); if (helper) { helper->RemoveRestoreHelper(); } @@ -463,6 +459,10 @@ void TabHelper::TabInsertedAt(TabStripModel* tab_strip_model, if (contents != web_contents()) return; + if (discarded_) { + GetTabManager()->SetTabAutoDiscardableState(web_contents(), false); + } + guest()->Load(); } @@ -470,8 +470,7 @@ void TabHelper::SetWindowId(const int32_t& id) { if (SessionTabHelper::FromWebContents(web_contents())->window_id().id() == id) return; - SessionID session; - session.set_id(id); + SessionID session = SessionID::FromSerializedValue(id); SessionTabHelper::FromWebContents(web_contents())->SetWindowID(session); } @@ -480,26 +479,28 @@ int32_t TabHelper::window_id() const { } void TabHelper::SetAutoDiscardable(bool auto_discardable) { - GetTabManager()->SetTabAutoDiscardableState(web_contents(), auto_discardable); + auto_discardable_ = auto_discardable; + if (resource_coordinator::TabLifecycleUnitExternal::FromWebContents( + web_contents())) { + GetTabManager()->SetTabAutoDiscardableState( + web_contents(), auto_discardable); + } } bool TabHelper::Discard() { if (IsDiscarded()) return false; - if (!browser_) { + if (!resource_coordinator::TabLifecycleUnitExternal::FromWebContents( + web_contents())) { discarded_ = true; content::RestoreHelper::CreateForWebContents(web_contents()); auto helper = content::RestoreHelper::FromWebContents(web_contents()); helper->ClearNeedsReload(); - // prevent the tab manager from discarding again because we're not - // registered as a discarded tab - SetAutoDiscardable(false); return true; } else { - int64_t web_contents_id = TabManager::IdFromWebContents(web_contents()); - return !!GetTabManager()->DiscardTabById( - web_contents_id, resource_coordinator::DiscardReason::kProactive); + return resource_coordinator::TabLifecycleUnitExternal::FromWebContents( + web_contents())->DiscardTab(); } } @@ -507,7 +508,11 @@ bool TabHelper::IsDiscarded() { if (discarded_) { return true; } - return GetTabManager()->IsTabDiscarded(web_contents()); + auto* tab_lifecycle_unit_external = + resource_coordinator::TabLifecycleUnitExternal::FromWebContents( + web_contents()); + return tab_lifecycle_unit_external && + tab_lifecycle_unit_external->IsDiscarded(); } void TabHelper::SetPinned(bool pinned) { @@ -609,7 +614,7 @@ void TabHelper::RenderFrameCreated(content::RenderFrameHost* host) { // Look up the extension API frame ID to force the mapping to be cached. // This is needed so that cached information is available for tabId in the // filtering callbacks. - ExtensionApiFrameIdMap::Get()->CacheFrameData(host); + ExtensionApiFrameIdMap::Get()->InitializeRenderFrameData(host); } void TabHelper::WebContentsDestroyed() { @@ -719,7 +724,7 @@ bool TabHelper::ExecuteScriptInTab(mate::Arguments* args) { } ExecuteScript(extension_id, std::move(copy), result, callback, file_url, - true, base::MakeUnique(file.empty() ? code_string : file)); + true, std::make_unique(file.empty() ? code_string : file)); return true; } @@ -822,13 +827,13 @@ content::WebContents* TabHelper::GetTabById(int32_t tab_id, // static int32_t TabHelper::IdForTab(const content::WebContents* tab) { - return SessionTabHelper::IdForTab(tab); + return SessionTabHelper::IdForTab(tab).id(); } // static int32_t TabHelper::IdForWindowContainingTab( const content::WebContents* tab) { - return SessionTabHelper::IdForWindowContainingTab(tab); + return SessionTabHelper::IdForWindowContainingTab(tab).id(); } } // namespace extensions diff --git a/atom/browser/extensions/tab_helper.h b/atom/browser/extensions/tab_helper.h index a7c9b3819b..5441c84ab6 100644 --- a/atom/browser/extensions/tab_helper.h +++ b/atom/browser/extensions/tab_helper.h @@ -209,6 +209,7 @@ class TabHelper : public content::WebContentsObserver, int index_; bool pinned_; bool discarded_; + bool auto_discardable_; bool active_; bool is_placeholder_; bool window_closing_; diff --git a/atom/browser/importer/profile_writer.cc b/atom/browser/importer/profile_writer.cc index dca5a523e8..8b398015f1 100644 --- a/atom/browser/importer/profile_writer.cc +++ b/atom/browser/importer/profile_writer.cc @@ -113,7 +113,7 @@ void ProfileWriter::AddBookmarks( imported_bookmark->SetString("title", bookmark.title); imported_bookmark->SetInteger("creation_time", bookmark.creation_time.ToDoubleT()); - auto paths = base::MakeUnique(); + auto paths = std::make_unique(); for (const base::string16& path : bookmark.path) { paths->AppendString(path); } @@ -140,7 +140,7 @@ void ProfileWriter::AddFavicons( data_url.insert(0, "data:image/png;base64,"); imported_favicon->SetString("png_data", data_url); std::set::iterator it; - auto urls = base::MakeUnique(); + auto urls = std::make_unique(); for (it = favicon.urls.begin(); it != favicon.urls.end(); ++it) { urls->AppendString(it->possibly_invalid_spec()); } diff --git a/atom/browser/login_handler.cc b/atom/browser/login_handler.cc index ceff74ed8a..0e0cb20486 100644 --- a/atom/browser/login_handler.cc +++ b/atom/browser/login_handler.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include #include "atom/browser/login_handler.h" diff --git a/atom/browser/login_handler.h b/atom/browser/login_handler.h index 174fc4a420..1a479930ec 100644 --- a/atom/browser/login_handler.h +++ b/atom/browser/login_handler.h @@ -7,7 +7,7 @@ #include "base/strings/string16.h" #include "base/synchronization/lock.h" -#include "content/public/browser/resource_dispatcher_host_login_delegate.h" +#include "content/public/browser/login_delegate.h" #include "content/public/browser/resource_request_info.h" #include "net/base/auth.h" @@ -22,7 +22,7 @@ class AuthChallengeInfo; namespace atom { // Handles the HTTP basic auth, must be created on IO thread. -class LoginHandler : public content::ResourceDispatcherHostLoginDelegate { +class LoginHandler : public content::LoginDelegate { public: LoginHandler(net::AuthChallengeInfo* auth_info, content::ResourceRequestInfo::WebContentsGetter web_contents_getter, @@ -46,7 +46,7 @@ class LoginHandler : public content::ResourceDispatcherHostLoginDelegate { protected: ~LoginHandler() override; - // content::ResourceDispatcherHostLoginDelegate: + // content::LoginDelegate: void OnRequestCancelled() override; private: diff --git a/atom/browser/mac/dict_util.mm b/atom/browser/mac/dict_util.mm index 6336936b5c..c9321194e9 100644 --- a/atom/browser/mac/dict_util.mm +++ b/atom/browser/mac/dict_util.mm @@ -5,7 +5,6 @@ #include "atom/browser/mac/dict_util.h" #include "base/json/json_writer.h" -#include "base/memory/ptr_util.h" #include "base/strings/sys_string_conversions.h" #include "base/values.h" @@ -34,14 +33,14 @@ if (sub_arr) result->Append(std::move(sub_arr)); else - result->Append(base::MakeUnique()); + result->Append(std::make_unique()); } else if ([value isKindOfClass:[NSDictionary class]]) { std::unique_ptr sub_dict = NSDictionaryToDictionaryValue(value); if (sub_dict) result->Append(std::move(sub_dict)); else - result->Append(base::MakeUnique()); + result->Append(std::make_unique()); } else { result->AppendString(base::SysNSStringToUTF8([value description])); } @@ -92,7 +91,7 @@ result->SetWithoutPathExpansion(str_key, std::move(sub_arr)); else result->SetWithoutPathExpansion(str_key, - base::MakeUnique()); + std::make_unique()); } else if ([value isKindOfClass:[NSDictionary class]]) { std::unique_ptr sub_dict = NSDictionaryToDictionaryValue(value); @@ -100,7 +99,7 @@ result->SetWithoutPathExpansion(str_key, std::move(sub_dict)); else result->SetWithoutPathExpansion(str_key, - base::MakeUnique()); + std::make_unique()); } else { result->SetKey(str_key, base::Value(base::SysNSStringToUTF8([value description]))); } diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index 9d474eeb34..b024f98b50 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -85,7 +85,7 @@ class NativeWindow : public base::SupportsUserData, virtual void Show() = 0; virtual void ShowInactive() = 0; virtual void Hide() = 0; - virtual bool IsVisible() = 0; + virtual bool IsVisible() const = 0; virtual bool IsEnabled() = 0; virtual void Maximize() = 0; virtual void Unmaximize() = 0; diff --git a/atom/browser/native_window_mac.h b/atom/browser/native_window_mac.h index 03b7d630bd..9356cffdac 100644 --- a/atom/browser/native_window_mac.h +++ b/atom/browser/native_window_mac.h @@ -41,7 +41,7 @@ class NativeWindowMac : public NativeWindow, void Show() override; void ShowInactive() override; void Hide() override; - bool IsVisible() override; + bool IsVisible() const override; bool IsEnabled() override; void Maximize() override; void Unmaximize() override; diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index d9c148b8aa..cb9dfe8d41 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -811,7 +811,7 @@ void ClearControlRegions(NSView* view) { [window_ orderOut:nil]; } -bool NativeWindowMac::IsVisible() { +bool NativeWindowMac::IsVisible() const { return [window_ isVisible]; } diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index d3be16a6d0..e8727676d0 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -438,7 +438,7 @@ void NativeWindowViews::Hide() { #endif } -bool NativeWindowViews::IsVisible() { +bool NativeWindowViews::IsVisible() const { return window_->IsVisible(); } diff --git a/atom/browser/native_window_views.h b/atom/browser/native_window_views.h index f1eb09c7a0..7936363396 100644 --- a/atom/browser/native_window_views.h +++ b/atom/browser/native_window_views.h @@ -61,7 +61,7 @@ class NativeWindowViews : public NativeWindow, void Show() override; void ShowInactive() override; void Hide() override; - bool IsVisible() override; + bool IsVisible() const override; bool IsEnabled() override; void Activate() override; void Deactivate() override; diff --git a/atom/browser/net/atom_network_delegate.cc b/atom/browser/net/atom_network_delegate.cc index 891225c1fb..6dc2689a6d 100644 --- a/atom/browser/net/atom_network_delegate.cc +++ b/atom/browser/net/atom_network_delegate.cc @@ -15,7 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/websocket_handshake_request_info.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "net/url_request/url_request.h" #include "services/network/throttling/throttling_network_transaction.h" diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index 9bf4a43ed0..fcee51a673 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -93,8 +93,6 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches( if (web_preferences.GetBoolean(options::kExperimentalFeatures, &b) && b) command_line->AppendSwitch( ::switches::kEnableExperimentalWebPlatformFeatures); - if (web_preferences.GetBoolean(options::kExperimentalCanvasFeatures, &b) && b) - command_line->AppendSwitch(::switches::kEnableExperimentalCanvasFeatures); // --background-color. std::string color; diff --git a/atom/common/BUILD.gn b/atom/common/BUILD.gn index a207947355..0f59c6f503 100644 --- a/atom/common/BUILD.gn +++ b/atom/common/BUILD.gn @@ -2,8 +2,8 @@ import("//build/buildflag_header.gni") import("//build/config/chrome_build.gni") import("//build/config/compiler/compiler.gni") import("//build/config/features.gni") -import("//extensions/features/features.gni") -import("//printing/features/features.gni") +import("//extensions/buildflags/buildflags.gni") +import("//printing/buildflags/buildflags.gni") source_set("node") { public_configs = [ @@ -65,8 +65,8 @@ source_set("node") { deps = [ "//electron/muon/app", "//content/public/common", - "//media:media_features", - "//third_party/WebKit/public:blink_headers", + "//media:media_buildflags", + "//third_party/blink/public:blink_headers", "//electron/brave/common/converters", ] } diff --git a/atom/common/api/atom_bindings.cc b/atom/common/api/atom_bindings.cc index e52844c842..6e591df58a 100644 --- a/atom/common/api/atom_bindings.cc +++ b/atom/common/api/atom_bindings.cc @@ -33,25 +33,6 @@ void Hang() { base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); } -v8::Local GetProcessMemoryInfo(v8::Isolate* isolate) { - std::unique_ptr metrics( - base::ProcessMetrics::CreateCurrentProcessMetrics()); - - mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); - dict.Set("workingSetSize", - static_cast(metrics->GetWorkingSetSize() >> 10)); - dict.Set("peakWorkingSetSize", - static_cast(metrics->GetPeakWorkingSetSize() >> 10)); - - size_t private_bytes, shared_bytes; - if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) { - dict.Set("privateBytes", static_cast(private_bytes >> 10)); - dict.Set("sharedBytes", static_cast(shared_bytes >> 10)); - } - - return dict.GetHandle(); -} - v8::Local GetSystemMemoryInfo(v8::Isolate* isolate, mate::Arguments* args) { base::SystemMemoryInfoKB mem_info; @@ -108,7 +89,6 @@ void AtomBindings::BindTo(v8::Isolate* isolate, dict.SetMethod("crash", &Crash); dict.SetMethod("hang", &Hang); dict.SetMethod("log", &Log); - dict.SetMethod("getProcessMemoryInfo", &GetProcessMemoryInfo); dict.SetMethod("getSystemMemoryInfo", &GetSystemMemoryInfo); #if defined(OS_POSIX) dict.SetMethod("setFdLimit", &base::SetFdLimit); diff --git a/atom/common/api/remote_object_freer.cc b/atom/common/api/remote_object_freer.cc index 4d88f80f63..98f688d0fe 100644 --- a/atom/common/api/remote_object_freer.cc +++ b/atom/common/api/remote_object_freer.cc @@ -8,7 +8,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "content/public/renderer/render_frame.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/blink/public/web/web_local_frame.h" using blink::WebLocalFrame; diff --git a/atom/common/javascript_bindings.cc b/atom/common/javascript_bindings.cc index 2e210466c3..b5c430d6ab 100644 --- a/atom/common/javascript_bindings.cc +++ b/atom/common/javascript_bindings.cc @@ -17,8 +17,8 @@ #include "content/public/renderer/render_frame.h" #include "extensions/renderer/console.h" #include "native_mate/dictionary.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebView.h" +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_view.h" using extensions::Feature; diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc index 1902b56997..64704d1bdc 100644 --- a/atom/common/native_mate_converters/blink_converter.cc +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -13,10 +13,10 @@ #include "base/strings/utf_string_conversions.h" #include "content/public/browser/native_web_keyboard_event.h" #include "native_mate/dictionary.h" -#include "third_party/WebKit/public/platform/WebMouseEvent.h" -#include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" -#include "third_party/WebKit/public/platform/WebSize.h" -#include "third_party/WebKit/public/web/WebFindOptions.h" +#include "third_party/blink/public/platform/web_mouse_event.h" +#include "third_party/blink/public/platform/web_mouse_wheel_event.h" +#include "third_party/blink/public/platform/web_size.h" +#include "third_party/blink/public/web/web_find_options.h" #include "ui/base/clipboard/clipboard.h" namespace { diff --git a/atom/common/native_mate_converters/blink_converter.h b/atom/common/native_mate_converters/blink_converter.h index 820043cc2b..e57eb66d75 100644 --- a/atom/common/native_mate_converters/blink_converter.h +++ b/atom/common/native_mate_converters/blink_converter.h @@ -6,8 +6,8 @@ #define ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ #include "native_mate/converter.h" -#include "third_party/WebKit/public/platform/WebInputEvent.h" -#include "third_party/WebKit/public/web/WebContextMenuData.h" +#include "third_party/blink/public/platform/web_input_event.h" +#include "third_party/blink/public/web/web_context_menu_data.h" namespace blink { class WebMouseEvent; diff --git a/atom/common/native_mate_converters/content_converter.h b/atom/common/native_mate_converters/content_converter.h index 54c9588da4..0d04c8ef92 100644 --- a/atom/common/native_mate_converters/content_converter.h +++ b/atom/common/native_mate_converters/content_converter.h @@ -14,7 +14,7 @@ #include "content/public/common/page_type.h" #include "content/public/common/stop_find_action.h" #include "native_mate/converter.h" -#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" +#include "third_party/blink/public/platform/modules/permissions/permission_status.mojom.h" #include "ui/base/page_transition_types.h" namespace content { diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 4e37938944..f41a9de321 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -10,7 +10,6 @@ #include #include "base/logging.h" -#include "base/memory/ptr_util.h" #include "base/values.h" #include "native_mate/dictionary.h" @@ -388,7 +387,7 @@ base::Value* V8ValueConverter::FromV8Array( else // JSON.stringify puts null in places where values don't serialize, for // example undefined and functions. Emulate that behavior. - result->Append(base::MakeUnique()); + result->Append(std::make_unique()); } return result; } diff --git a/atom/common/platform_util_linux.cc b/atom/common/platform_util_linux.cc index 22ecf786f7..317056d8e2 100644 --- a/atom/common/platform_util_linux.cc +++ b/atom/common/platform_util_linux.cc @@ -33,7 +33,7 @@ bool XDGUtil(const std::string& util, return false; if (!wait_for_exit) { - base::EnsureProcessGetsReaped(process.Pid()); + base::EnsureProcessGetsReaped(std::move(process)); return true; } diff --git a/atom/renderer/content_settings_manager.cc b/atom/renderer/content_settings_manager.cc index 3d722ba97b..d1fc45e16c 100644 --- a/atom/renderer/content_settings_manager.cc +++ b/atom/renderer/content_settings_manager.cc @@ -11,8 +11,8 @@ #include "components/content_settings/core/common/content_settings_pattern.h" #include "content/public/common/url_constants.h" #include "content/public/renderer/render_thread.h" -#include "third_party/WebKit/public/web/WebDocument.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/public/web/web_local_frame.h" #include "url/gurl.h" #include "url/url_constants.h" diff --git a/atom/utility/atom_content_utility_client.cc b/atom/utility/atom_content_utility_client.cc index 3957fef774..b8ed31ea59 100644 --- a/atom/utility/atom_content_utility_client.cc +++ b/atom/utility/atom_content_utility_client.cc @@ -12,14 +12,13 @@ #include "base/time/time.h" #include "brave/utility/importer/brave_profile_import_service.h" #include "chrome/common/importer/profile_import.mojom.h" -#include "chrome/utility/extensions/extensions_handler.h" -#include "components/unzip_service/public/interfaces/constants.mojom.h" -#include "components/unzip_service/unzip_service.h" +#include "components/services/unzip/public/interfaces/constants.mojom.h" +#include "components/services/unzip/unzip_service.h" #include "content/public/common/content_switches.h" #include "content/public/common/service_manager_connection.h" #include "content/public/common/simple_connection_filter.h" #include "content/public/utility/utility_thread.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_message_macros.h" #include "mojo/public/cpp/bindings/strong_binding.h" @@ -30,7 +29,6 @@ #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/common/extensions/chrome_extensions_client.h" -#include "extensions/utility/utility_handler.h" #endif #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -58,10 +56,6 @@ AtomContentUtilityClient::AtomContentUtilityClient() AtomContentUtilityClient::~AtomContentUtilityClient() = default; void AtomContentUtilityClient::UtilityThreadStarted() { -#if BUILDFLAG(ENABLE_EXTENSIONS) - extensions::utility_handler::UtilityThreadStarted(); -#endif - #if defined(OS_WIN) base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); utility_process_running_elevated_ = command_line->HasSwitch( @@ -76,7 +70,7 @@ void AtomContentUtilityClient::UtilityThreadStarted() { if (!connection) return; - auto registry = base::MakeUnique(); + auto registry = std::make_unique(); // If our process runs with elevated privileges, only add elevated Mojo // interfaces to the interface registry. if (!utility_process_running_elevated_) { @@ -90,7 +84,7 @@ void AtomContentUtilityClient::UtilityThreadStarted() { } connection->AddConnectionFilter( - base::MakeUnique(std::move(registry))); + std::make_unique(std::move(registry))); } bool AtomContentUtilityClient::OnMessageReceived( diff --git a/atom/utility/atom_content_utility_client.h b/atom/utility/atom_content_utility_client.h index eff5e144c7..73b4f77dab 100644 --- a/atom/utility/atom_content_utility_client.h +++ b/atom/utility/atom_content_utility_client.h @@ -10,7 +10,7 @@ #include "build/build_config.h" #include "content/public/utility/content_utility_client.h" -#include "printing/features/features.h" +#include "printing/buildflags/buildflags.h" namespace base { class FilePath; diff --git a/brave/browser/BUILD.gn b/brave/browser/BUILD.gn index b43c645d27..87ce63aa12 100644 --- a/brave/browser/BUILD.gn +++ b/brave/browser/BUILD.gn @@ -2,9 +2,9 @@ import("//build/buildflag_header.gni") import("//build/config/chrome_build.gni") import("//build/config/compiler/compiler.gni") import("//build/config/features.gni") -import("//extensions/features/features.gni") -import("//ppapi/features/features.gni") -import("//printing/features/features.gni") +import("//extensions/buildflags/buildflags.gni") +import("//ppapi/buildflags/buildflags.gni") +import("//printing/buildflags/buildflags.gni") source_set("browser") { configs += [ @@ -52,7 +52,7 @@ source_set("browser") { "//components/autofill/content/browser", "//components/autofill/core/browser", "//components/resources", - "//components/spellcheck:build_features", + "//components/spellcheck:buildflags", "//components/subresource_filter/content/browser", "//components/subresource_filter/core/browser", "//components/sync_preferences", @@ -66,12 +66,12 @@ source_set("browser") { "//device/usb/public/mojom", "//gpu/config", "//mojo/common", - "//mojo/edk/system", + "//mojo/edk", "//mojo/public/cpp/bindings", "//services/device/public/mojom", "//services/identity:lib", - "//third_party/WebKit/public:image_resources", - "//third_party/WebKit/public:resources", + "//third_party/blink/public:image_resources", + "//third_party/blink/public:resources", ] if (is_linux) { @@ -147,7 +147,7 @@ source_set("apis") { "//electron/muon/browser", "//v8:v8", "//v8:v8_libplatform", - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] public_deps = [ diff --git a/brave/browser/brave_browser_context.cc b/brave/browser/brave_browser_context.cc index bdfcc4b8ea..b79c3aea23 100644 --- a/brave/browser/brave_browser_context.cc +++ b/brave/browser/brave_browser_context.cc @@ -50,7 +50,7 @@ #include "content/public/browser/dom_storage_context.h" #include "content/public/browser/storage_partition.h" #include "extensions/browser/pref_names.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "net/base/escape.h" #include "net/cookies/cookie_store.h" #include "net/url_request/url_request_context.h" diff --git a/brave/browser/brave_content_browser_client.cc b/brave/browser/brave_content_browser_client.cc index 8327a0ea8f..2b7d3e5034 100644 --- a/brave/browser/brave_content_browser_client.cc +++ b/brave/browser/brave_content_browser_client.cc @@ -11,6 +11,7 @@ #include "atom/browser/web_contents_permission_helper.h" #include "atom/browser/web_contents_preferences.h" #include "atom/common/options_switches.h" +#include "atom/common/platform_util.h" #include "base/base_switches.h" #include "base/json/json_reader.h" #include "base/lazy_instance.h" @@ -48,7 +49,7 @@ #include "components/content_settings/core/common/content_settings.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/password_manager/content/browser/content_password_manager_driver_factory.h" -#include "components/unzip_service/public/interfaces/constants.mojom.h" +#include "components/services/unzip/public/interfaces/constants.mojom.h" #include "components/variations/variations_switches.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/navigation_handle.h" @@ -62,6 +63,7 @@ #include "gpu/config/gpu_switches.h" #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h" #include "muon/app/muon_crash_reporter_client.h" +#include "net/base/escape.h" #include "net/base/filename_util.h" #include "net/ssl/client_cert_store.h" #include "services/data_decoder/public/mojom/constants.mojom.h" @@ -71,7 +73,7 @@ #include "services/service_manager/public/cpp/binder_registry.h" #include "services/service_manager/public/cpp/connector.h" #include "services/service_manager/public/mojom/connector.mojom.h" -#include "third_party/WebKit/public/web/WebWindowFeatures.h" +#include "third_party/blink/public/web/web_window_features.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" @@ -219,6 +221,40 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) { io_thread_application_locale.Get() = locale; } +void OnOpenExternal(const GURL& escaped_url, bool allowed) { + if (allowed) + platform_util::OpenExternal( +#if defined(OS_WIN) + base::UTF8ToUTF16(escaped_url.spec()), +#else + escaped_url, +#endif + true); +} + +void LaunchURL( + const GURL& url, + const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter, + bool has_user_gesture) { + // If there is no longer a WebContents, the request may have raced with tab + // closing. Don't fire the external request. (It may have been a prerender.) + content::WebContents* web_contents = web_contents_getter.Run(); + if (!web_contents) + return; + + content::RenderFrameHost* rfh = web_contents->GetMainFrame(); + + auto permission_helper = + atom::WebContentsPermissionHelper::FromWebContents(web_contents); + if (!permission_helper) + return; + + GURL escaped_url(net::EscapeExternalHandlerValue(url.spec())); + auto callback = base::Bind(&OnOpenExternal, escaped_url); + permission_helper->RequestOpenExternalPermission(callback, rfh, url, + has_user_gesture); +} + } // namespace BraveContentBrowserClient::BraveContentBrowserClient() { @@ -742,6 +778,21 @@ bool BraveContentBrowserClient::DoesSiteRequireDedicatedProcess( return false; } +bool BraveContentBrowserClient::ShouldUseSpareRenderProcessHost( + content::BrowserContext* browser_context, + const GURL& site_url) { + Profile* profile = Profile::FromBrowserContext(browser_context); + if (!profile) + return false; + +#if BUILDFLAG(ENABLE_EXTENSIONS) + return AtomBrowserClientExtensionsPart:: + ShouldUseSpareRenderProcessHost(profile, site_url); +#else + return true; +#endif +} + void BraveContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( std::vector* additional_allowed_schemes) { AtomBrowserClient::GetAdditionalAllowedSchemesForFileSystem( @@ -806,7 +857,7 @@ bool BraveContentBrowserClient::ShouldSwapBrowsingInstancesForNavigation( #endif } -content::ResourceDispatcherHostLoginDelegate* +scoped_refptr BraveContentBrowserClient::CreateLoginDelegate( net::AuthChallengeInfo* auth_info, content::ResourceRequestInfo::WebContentsGetter web_contents_getter, @@ -815,8 +866,8 @@ BraveContentBrowserClient::CreateLoginDelegate( bool first_auth_attempt, const base::Callback&)>& auth_required_callback) { - return new atom::LoginHandler(auth_info, web_contents_getter, is_main_frame, - url, auth_required_callback); + return base::MakeRefCounted(auth_info, + web_contents_getter, is_main_frame, url, auth_required_callback); } std::unique_ptr @@ -850,7 +901,7 @@ BraveContentBrowserClient::CreateThrottlesForNavigation( #if BUILDFLAG(ENABLE_EXTENSIONS) if (!handle->IsInMainFrame()) throttles.push_back( - base::MakeUnique(handle)); + std::make_unique(handle)); #endif return throttles; } @@ -858,7 +909,7 @@ BraveContentBrowserClient::CreateThrottlesForNavigation( std::unique_ptr BraveContentBrowserClient::GetNavigationUIData( content::NavigationHandle* navigation_handle) { - return base::MakeUnique(navigation_handle); + return std::make_unique(navigation_handle); } std::unique_ptr @@ -885,8 +936,8 @@ BraveContentBrowserClient::GetExtraServiceManifests() { } void BraveContentBrowserClient::InitFrameInterfaces() { - frame_interfaces_ = base::MakeUnique(); - frame_interfaces_parameterized_ = base::MakeUnique< + frame_interfaces_ = std::make_unique(); + frame_interfaces_parameterized_ = std::make_unique< service_manager::BinderRegistryWithArgs>(); frame_interfaces_parameterized_->AddInterface( @@ -898,4 +949,18 @@ void BraveContentBrowserClient::InitFrameInterfaces() { base::BindRepeating(&BravePasswordManagerClient::BindCredentialManager)); } +bool BraveContentBrowserClient::HandleExternalProtocol( + const GURL& url, + content::ResourceRequestInfo::WebContentsGetter web_contents_getter, + int child_id, + content::NavigationUIData* navigation_data, + bool is_main_frame, + ui::PageTransition page_transition, + bool has_user_gesture) { + BrowserThread::PostTask( + BrowserThread::UI, FROM_HERE, + base::Bind(&LaunchURL, url, web_contents_getter, has_user_gesture)); + return true; +} + } // namespace brave diff --git a/brave/browser/brave_content_browser_client.h b/brave/browser/brave_content_browser_client.h index 37e58ce2e6..c9a3de4755 100644 --- a/brave/browser/brave_content_browser_client.h +++ b/brave/browser/brave_content_browser_client.h @@ -10,7 +10,7 @@ #include #include "atom/browser/atom_browser_client.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "services/service_manager/public/cpp/binder_registry.h" namespace content { @@ -40,6 +40,15 @@ class BraveContentBrowserClient : public atom::AtomBrowserClient { std::string GetApplicationLocale() override; static void SetApplicationLocale(std::string locale); + bool HandleExternalProtocol( + const GURL& url, + content::ResourceRequestInfo::WebContentsGetter web_contents_getter, + int child_id, + content::NavigationUIData* navigation_data, + bool is_main_frame, + ui::PageTransition page_transition, + bool has_user_gesture) override; + protected: // content::ContentBrowserClient: content::WebContentsViewDelegate* GetWebContentsViewDelegate( @@ -92,6 +101,9 @@ class BraveContentBrowserClient : public atom::AtomBrowserClient { const GURL& effective_url) override; bool DoesSiteRequireDedicatedProcess(content::BrowserContext* browser_context, const GURL& effective_site_url) override; + bool ShouldUseSpareRenderProcessHost( + content::BrowserContext* browser_context, + const GURL& site_url) override; bool ShouldLockToOrigin(content::BrowserContext* browser_context, const GURL& effective_site_url) override; bool IsSuitableHost(content::RenderProcessHost* process_host, @@ -133,7 +145,7 @@ class BraveContentBrowserClient : public atom::AtomBrowserClient { std::unique_ptr GetServiceManifestOverlay( base::StringPiece name) override; - content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( + scoped_refptr CreateLoginDelegate( net::AuthChallengeInfo* auth_info, content::ResourceRequestInfo::WebContentsGetter web_contents_getter, bool is_main_frame, diff --git a/brave/browser/brave_permission_manager.cc b/brave/browser/brave_permission_manager.cc index 6f51581251..37b163ad23 100644 --- a/brave/browser/brave_permission_manager.cc +++ b/brave/browser/brave_permission_manager.cc @@ -199,6 +199,15 @@ blink::mojom::PermissionStatus BravePermissionManager::GetPermissionStatus( return blink::mojom::PermissionStatus::GRANTED; } +blink::mojom::PermissionStatus +BravePermissionManager::GetPermissionStatusForFrame( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin) { + LOG(INFO) << __FUNCTION__ << ": " << static_cast(permission); + return blink::mojom::PermissionStatus::GRANTED; +} + int BravePermissionManager::SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, diff --git a/brave/browser/brave_permission_manager.h b/brave/browser/brave_permission_manager.h index 564f17d7ac..b590986497 100644 --- a/brave/browser/brave_permission_manager.h +++ b/brave/browser/brave_permission_manager.h @@ -65,6 +65,10 @@ class BravePermissionManager : public content::PermissionManager { content::PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; + blink::mojom::PermissionStatus GetPermissionStatusForFrame( + content::PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin) override; int SubscribePermissionStatusChange( content::PermissionType permission, const GURL& requesting_origin, diff --git a/brave/browser/component_updater/widevine_cdm_component_installer.cc b/brave/browser/component_updater/widevine_cdm_component_installer.cc index 3d649ed83e..2f2108fcd9 100644 --- a/brave/browser/component_updater/widevine_cdm_component_installer.cc +++ b/brave/browser/component_updater/widevine_cdm_component_installer.cc @@ -25,7 +25,6 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/native_library.h" -#include "base/path_service.h" #include "base/strings/string16.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" @@ -35,7 +34,6 @@ #include "base/values.h" #include "build/build_config.h" #include "chrome/common/chrome_paths.h" -#include "chrome/common/widevine_cdm_constants.h" #include "components/component_updater/component_installer.h" #include "components/component_updater/component_updater_service.h" #include "components/version_info/version_info.h" @@ -50,7 +48,6 @@ using content::BrowserThread; using content::CdmRegistry; -using content::PluginService; namespace brave { @@ -62,10 +59,6 @@ const uint8_t kSha2Hash[] = {0xe8, 0xce, 0xcf, 0x42, 0x06, 0xd0, 0x93, 0x49, 0x8f, 0xbd, 0x86, 0x12, 0xb9, 0x58, 0x9b, 0xfb, 0x4f, 0xbb, 0x1b, 0xa9, 0xd3, 0x85, 0x37, 0xef}; -// File name of the Widevine CDM adapter version file. The CDM adapter shares -// the same version number with Chromium version. -const char kCdmAdapterVersionName[] = "CdmAdapterVersion"; - // Name of the Widevine CDM OS in the component manifest. const char kWidevineCdmPlatform[] = #if defined(OS_MACOSX) @@ -117,10 +110,6 @@ const char kCdmSupportedCodecVp9[] = "vp9.0"; const char kCdmSupportedCodecAvc1[] = "avc1"; #endif -// TODO(xhwang): Move this to a common place if needed. -const base::FilePath::CharType kSignatureFileExtension[] = - FILE_PATH_LITERAL(".sig"); - // Widevine CDM is packaged as a multi-CRX. Widevine CDM binaries are located in // _platform_specific/ folder in the package. This function // returns the platform-specific subdirectory that is part of that multi-CRX. @@ -131,39 +120,6 @@ base::FilePath GetPlatformDirectory(const base::FilePath& base_path) { return base_path.AppendASCII("_platform_specific").AppendASCII(platform_arch); } -bool MakeWidevineCdmPluginInfo(const base::Version& version, - const base::FilePath& cdm_install_dir, - const std::string& codecs, - bool supports_persistent_license, - content::PepperPluginInfo* plugin_info) { - if (!version.IsValid() || - version.components().size() != - static_cast(kWidevineCdmVersionNumComponents)) { - DVLOG(1) << "Invalid version."; - return false; - } - - plugin_info->is_internal = false; - // Widevine CDM must run out of process. - plugin_info->is_out_of_process = true; - plugin_info->path = GetPlatformDirectory(cdm_install_dir) - .AppendASCII(kWidevineCdmAdapterFileName); - plugin_info->name = kWidevineCdmDisplayName; - plugin_info->description = kWidevineCdmDescription + - std::string(" (version: ") + version.GetString() + - ")"; - plugin_info->version = version.GetString(); - content::WebPluginMimeType widevine_cdm_mime_type( - kWidevineCdmPluginMimeType, - kWidevineCdmPluginExtension, - kWidevineCdmPluginMimeTypeDescription); - - plugin_info->mime_types.push_back(widevine_cdm_mime_type); - plugin_info->permissions = kWidevineCdmPluginPermissions; - - return true; -} - typedef bool (*VersionCheckFunc)(int version); bool CheckForCompatibleVersion(const base::DictionaryValue& manifest, @@ -274,14 +230,10 @@ class WidevineCdmComponentInstallerPolicy update_client::InstallerAttributes GetInstallerAttributes() const override; std::vector GetMimeTypes() const override; - // Checks and updates CDM adapter if necessary to make sure the latest CDM - // adapter is always used. - // Note: The component is ready when CDM is present, but the CDM won't be - // registered until the adapter is copied by this function (see - // VerifyInstallation). - void UpdateCdmAdapter(const base::Version& cdm_version, - const base::FilePath& cdm_install_dir, - std::unique_ptr manifest); + // Updates CDM path if necessary. + void UpdateCdmPath(const base::Version& cdm_version, + const base::FilePath& cdm_install_dir, + std::unique_ptr manifest); void RegisterWidevineCdmWithBrave( const base::Version& cdm_version, @@ -315,7 +267,7 @@ WidevineCdmComponentInstallerPolicy::OnCustomInstall( void WidevineCdmComponentInstallerPolicy::OnCustomUninstall() {} -// Once the CDM is ready, check the CDM adapter. +// Once the CDM is ready, update the CDM path. void WidevineCdmComponentInstallerPolicy::ComponentReady( const base::Version& version, const base::FilePath& path, @@ -327,7 +279,7 @@ void WidevineCdmComponentInstallerPolicy::ComponentReady( base::PostTaskWithTraits( FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, - base::BindOnce(&WidevineCdmComponentInstallerPolicy::UpdateCdmAdapter, + base::BindOnce(&WidevineCdmComponentInstallerPolicy::UpdateCdmPath, base::Unretained(this), version, path, base::Passed(&manifest))); } @@ -367,23 +319,13 @@ std::vector WidevineCdmComponentInstallerPolicy::GetMimeTypes() return std::vector(); } -static bool HasValidAdapter(const base::FilePath& adapter_version_path, - const base::FilePath& adapter_install_path, - const std::string& chromium_version) { - std::string adapter_version; - return base::ReadFileToString(adapter_version_path, &adapter_version) && - adapter_version == chromium_version && - base::PathExists(adapter_install_path); -} - -void WidevineCdmComponentInstallerPolicy::UpdateCdmAdapter( +void WidevineCdmComponentInstallerPolicy::UpdateCdmPath( const base::Version& cdm_version, const base::FilePath& cdm_install_dir, std::unique_ptr manifest) { - // On some platforms (e.g. Mac) we use symlinks for paths. Since we are - // comparing paths below, convert paths to absolute paths to avoid unexpected - // failure. base::MakeAbsoluteFilePath() requires IO so it can only be done - // in this function. + // On some platforms (e.g. Mac) we use symlinks for paths. Convert paths to + // absolute paths to avoid unexpected failure. base::MakeAbsoluteFilePath() + // requires IO so it can only be done in this function. const base::FilePath absolute_cdm_install_dir = base::MakeAbsoluteFilePath(cdm_install_dir); if (absolute_cdm_install_dir.empty()) { @@ -391,57 +333,6 @@ void WidevineCdmComponentInstallerPolicy::UpdateCdmAdapter( return; } - const base::FilePath adapter_version_path = - GetPlatformDirectory(absolute_cdm_install_dir) - .AppendASCII(kCdmAdapterVersionName); - const base::FilePath adapter_install_path = - GetPlatformDirectory(absolute_cdm_install_dir) - .AppendASCII(kWidevineCdmAdapterFileName); - - VLOG(1) << "UpdateCdmAdapter: version" << cdm_version.GetString(); - VLOG(1) << " - adapter_install_path=" << adapter_install_path.AsUTF8Unsafe(); - VLOG(1) << " - adapter_version_path=" << adapter_version_path.AsUTF8Unsafe(); - - base::FilePath adapter_source_path; - PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &adapter_source_path); - adapter_source_path = base::MakeAbsoluteFilePath(adapter_source_path); - if (adapter_source_path.empty()) { - PLOG(WARNING) << "Failed to get absolute adapter source path."; - return; - } - - const std::string chromium_version = version_info::GetVersionNumber(); - DCHECK(!chromium_version.empty()); - - // If we are not using bundled CDM and we don't have a valid adapter, create - // the version file, copy the CDM adapter signature file, and copy the CDM - // adapter. - if (adapter_install_path != adapter_source_path && - !HasValidAdapter(adapter_version_path, adapter_install_path, - chromium_version)) { - if (!base::CopyFile(adapter_source_path, adapter_install_path)) { - PLOG(WARNING) << "Failed to copy Widevine CDM adapter."; - return; - } - - // Generate the version file. - int bytes_written = base::WriteFile( - adapter_version_path, chromium_version.data(), chromium_version.size()); - if (bytes_written < 0 || - static_cast(bytes_written) != chromium_version.size()) { - PLOG(WARNING) << "Failed to write Widevine CDM adapter version file."; - // Ignore version file writing failure. - } - - // Copy Widevine CDM adapter signature file. - if (!base::CopyFile( - adapter_source_path.AddExtension(kSignatureFileExtension), - adapter_install_path.AddExtension(kSignatureFileExtension))) { - PLOG(WARNING) << "Failed to copy Widevine CDM adapter signature file."; - // The sig file may be missing or the copy failed. Ignore the failure. - } - } - content::BrowserThread::GetTaskRunnerForThread(content::BrowserThread::UI) ->PostTask( FROM_HERE, @@ -459,23 +350,8 @@ void WidevineCdmComponentInstallerPolicy::RegisterWidevineCdmWithBrave( const std::string codecs = GetCodecs(*manifest); bool supports_persistent_license = GetPersistentLicenseSupport(*manifest); - content::PepperPluginInfo plugin_info; - if (!MakeWidevineCdmPluginInfo(cdm_version, cdm_install_dir, codecs, - supports_persistent_license, &plugin_info)) { - return; - } - VLOG(1) << "Register Widevine CDM with Brave"; - // true = Add to beginning of list to override any existing registrations. - PluginService::GetInstance()->RegisterInternalPlugin( - plugin_info.ToWebPluginInfo(), true); - // Tell the browser to refresh the plugin list. Then tell all renderers to - // update their plugin list caches. - PluginService::GetInstance()->RefreshPlugins(); - PluginService::GetInstance()->PurgePluginListCache(NULL, false); - - // Also register Widevine with the CdmRegistry. const base::FilePath cdm_path = GetPlatformDirectory(cdm_install_dir) .AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName)); diff --git a/brave/browser/extensions/api/guest_view/tab_view/tab_view_internal_api.cc b/brave/browser/extensions/api/guest_view/tab_view/tab_view_internal_api.cc index 749fe195d6..e557b44fb7 100644 --- a/brave/browser/extensions/api/guest_view/tab_view/tab_view_internal_api.cc +++ b/brave/browser/extensions/api/guest_view/tab_view/tab_view_internal_api.cc @@ -4,6 +4,7 @@ #include "brave/browser/extensions/api/guest_view/tab_view/tab_view_internal_api.h" +#include #include #include "atom/browser/extensions/tab_helper.h" @@ -36,5 +37,5 @@ TabViewInternalGetTabIDFunction::~TabViewInternalGetTabIDFunction() { ExtensionFunction::ResponseAction TabViewInternalGetTabIDFunction::Run() { int tab_id = extensions::TabHelper::IdForTab(guest_->web_contents()); return RespondNow( - OneArgument(base::MakeUnique(tab_id))); + OneArgument(std::make_unique(tab_id))); } diff --git a/brave/browser/guest_view/tab_view/tab_view_guest.cc b/brave/browser/guest_view/tab_view/tab_view_guest.cc index 5c02889701..1c25131460 100644 --- a/brave/browser/guest_view/tab_view/tab_view_guest.cc +++ b/brave/browser/guest_view/tab_view/tab_view_guest.cc @@ -20,7 +20,6 @@ #include "atom/common/native_mate_converters/content_converter.h" #include "atom/common/native_mate_converters/gurl_converter.h" #include "atom/browser/extensions/api/atom_extensions_api_client.h" -#include "base/memory/ptr_util.h" #include "brave/browser/brave_browser_context.h" #include "build/build_config.h" #include "chrome/browser/browser_process.h" @@ -59,7 +58,6 @@ namespace { bool HasWindow(WebContents* web_contents) { auto tab_helper = extensions::TabHelper::FromWebContents(web_contents); return (tab_helper && tab_helper->window_id() != -1); - } } @@ -171,8 +169,7 @@ void TabViewGuest::LoadURLWithParams( void TabViewGuest::Load() { auto tab_helper = extensions::TabHelper::FromWebContents(web_contents()); - if (!tab_helper || !tab_helper->IsDiscarded()) { - + if (tab_helper && !tab_helper->IsDiscarded()) { if (!web_contents()->HasOpener()) api_web_contents_->ResumeLoadingCreatedWebContents(); @@ -209,7 +206,7 @@ void TabViewGuest::DidFinishNavigation( web_contents()->GetController().GetEntryCount()); args->SetInteger(webview::kInternalProcessId, web_contents()->GetMainFrame()->GetProcess()->GetID()); - DispatchEventToView(base::MakeUnique( + DispatchEventToView(std::make_unique( webview::kEventLoadCommit, std::move(args))); // find_helper_.CancelAllFindSessions(); @@ -225,14 +222,14 @@ void TabViewGuest::DidStartNavigation( std::unique_ptr args(new base::DictionaryValue()); args->SetString(guest_view::kUrl, navigation_handle->GetURL().spec()); args->SetBoolean(guest_view::kIsTopLevel, navigation_handle->IsInMainFrame()); - DispatchEventToView(base::MakeUnique(webview::kEventLoadStart, + DispatchEventToView(std::make_unique(webview::kEventLoadStart, std::move(args))); } void TabViewGuest::AttachGuest(int guest_instance_id) { std::unique_ptr args(new base::DictionaryValue()); args->SetInteger("guestInstanceId", guest_instance_id); - DispatchEventToView(base::MakeUnique( + DispatchEventToView(std::make_unique( "webViewInternal.onAttachGuest", std::move(args))); } @@ -240,14 +237,14 @@ void TabViewGuest::DetachGuest() { api_web_contents_->Emit("will-detach", extensions::TabHelper::IdForTab(web_contents())); std::unique_ptr args(new base::DictionaryValue()); - DispatchEventToView(base::MakeUnique( + DispatchEventToView(std::make_unique( "webViewInternal.onDetachGuest", std::move(args))); } void TabViewGuest::TabIdChanged() { std::unique_ptr args(new base::DictionaryValue()); args->SetInteger("tabID", extensions::TabHelper::IdForTab(web_contents())); - DispatchEventToView(base::MakeUnique( + DispatchEventToView(std::make_unique( "webViewInternal.onTabIdChanged", std::move(args))); } diff --git a/brave/browser/password_manager/brave_password_manager_client.cc b/brave/browser/password_manager/brave_password_manager_client.cc index 43c3ff8709..3f10ea12c3 100644 --- a/brave/browser/password_manager/brave_password_manager_client.cc +++ b/brave/browser/password_manager/brave_password_manager_client.cc @@ -61,7 +61,7 @@ #include "content/public/browser/ssl_status.h" #include "content/public/browser/web_contents.h" #include "content/public/common/origin_util.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "google_apis/gaia/gaia_urls.h" #include "net/base/url_util.h" #include "net/cert/cert_status_flags.h" @@ -92,7 +92,7 @@ void BravePasswordManagerClient::CreateForWebContentsWithAutofillClient( contents->SetUserData( UserDataKey(), - base::MakeUnique(contents, autofill_client)); + std::make_unique(contents, autofill_client)); } // static @@ -380,7 +380,7 @@ void BravePasswordManagerClient::OnInputEvent( password_reuse_detection_manager_.OnKeyPressed(key_event.text); } -PrefService* BravePasswordManagerClient::GetPrefs() { +PrefService* BravePasswordManagerClient::GetPrefs() const { return profile_->GetPrefs(); } diff --git a/brave/browser/password_manager/brave_password_manager_client.h b/brave/browser/password_manager/brave_password_manager_client.h index 703ec69e56..911389258c 100644 --- a/brave/browser/password_manager/brave_password_manager_client.h +++ b/brave/browser/password_manager/brave_password_manager_client.h @@ -104,7 +104,7 @@ class BravePasswordManagerClient const GURL& origin, const std::vector* federated_matches) const override; - PrefService* GetPrefs() override; + PrefService* GetPrefs() const override; password_manager::PasswordStore* GetPasswordStore() const override; #if defined(SAFE_BROWSING_DB_LOCAL) safe_browsing::PasswordProtectionService* GetPasswordProtectionService() @@ -115,7 +115,6 @@ class BravePasswordManagerClient bool matches_sync_password, const std::vector& matching_domains, bool password_field_exists) override; - void LogPasswordReuseDetectedEvent() override; #endif diff --git a/brave/browser/resource_coordinator/guest_tab_manager.cc b/brave/browser/resource_coordinator/guest_tab_manager.cc index c26f4eba9d..49fe43aa93 100644 --- a/brave/browser/resource_coordinator/guest_tab_manager.cc +++ b/brave/browser/resource_coordinator/guest_tab_manager.cc @@ -38,7 +38,8 @@ namespace resource_coordinator { GuestTabManager::GuestTabManager() : TabManager() {} WebContents* GuestTabManager::CreateNullContents( - TabStripModel* model, WebContents* old_contents) { + const content::WebContents::CreateParams& params, + content::WebContents* old_contents) { DCHECK_CURRENTLY_ON(BrowserThread::UI); auto guest = brave::TabViewGuest::FromWebContents(old_contents); @@ -46,9 +47,9 @@ WebContents* GuestTabManager::CreateNullContents( auto owner = guest->owner_web_contents(); DCHECK(owner); - WebContents::CreateParams params(old_contents->GetBrowserContext()); - params.initially_hidden = true; - auto contents = extensions::TabHelper::CreateTab(owner, params); + WebContents::CreateParams create_params(params); + create_params.initially_hidden = true; + auto contents = extensions::TabHelper::CreateTab(owner, create_params); content::RestoreHelper::CreateForWebContents(contents); return contents; } @@ -66,13 +67,13 @@ void GuestTabManager::TabReplacedAt(TabStripModel* tab_strip_model, content::WebContents* old_contents, content::WebContents* new_contents, int index) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - auto helper = content::RestoreHelper::FromWebContents(new_contents); // prevent the navigation controller from trying to autoload on // controller->SetActive(true) if (helper) helper->ClearNeedsReload(); + + TabManager::TabReplacedAt(tab_strip_model, old_contents, new_contents, index); } void GuestTabManager::ActiveTabChanged(content::WebContents* old_contents, diff --git a/brave/browser/resource_coordinator/guest_tab_manager.h b/brave/browser/resource_coordinator/guest_tab_manager.h index 73079d9b01..831d322132 100644 --- a/brave/browser/resource_coordinator/guest_tab_manager.h +++ b/brave/browser/resource_coordinator/guest_tab_manager.h @@ -43,7 +43,8 @@ class GuestTabManager : public TabManager { int index) override; content::WebContents* CreateNullContents( - TabStripModel* model, content::WebContents* old_contents) override; + const content::WebContents::CreateParams& params, + content::WebContents* old_contents) override; void DestroyOldContents(content::WebContents* old_contents) override; DISALLOW_COPY_AND_ASSIGN(GuestTabManager); diff --git a/brave/common/converters/BUILD.gn b/brave/common/converters/BUILD.gn index b2204dfd62..a38e93598e 100644 --- a/brave/common/converters/BUILD.gn +++ b/brave/common/converters/BUILD.gn @@ -15,6 +15,6 @@ source_set("converters") { ] deps = [ - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] } diff --git a/brave/common/extensions/api/BUILD.gn b/brave/common/extensions/api/BUILD.gn index 8cafe48368..28c3d8867d 100644 --- a/brave/common/extensions/api/BUILD.gn +++ b/brave/common/extensions/api/BUILD.gn @@ -26,7 +26,6 @@ json_schema_api("api_registration") { deps = [ ":api", - "//components/proximity_auth/public/interfaces", "//extensions/common", ] diff --git a/brave/common/extensions/file_bindings.cc b/brave/common/extensions/file_bindings.cc index b631d3b25a..b8dbeda6e2 100644 --- a/brave/common/extensions/file_bindings.cc +++ b/brave/common/extensions/file_bindings.cc @@ -9,7 +9,6 @@ #include "base/files/file_util.h" #include "base/files/important_file_writer.h" -#include "base/memory/ptr_util.h" #include "base/sequenced_task_runner.h" #include "base/task_scheduler/post_task.h" #include "base/threading/sequenced_task_runner_handle.h" @@ -113,7 +112,7 @@ void FileBindings::WriteImportantFile( base::Passed(&callback)), base::SequencedTaskRunnerHandle::Get())); - writer.WriteNow(base::MakeUnique(data)); + writer.WriteNow(std::make_unique(data)); } void FileBindings::RunCallback( diff --git a/brave/renderer/brave_content_renderer_client.cc b/brave/renderer/brave_content_renderer_client.cc index 6f2cec83fd..b35af5a95c 100644 --- a/brave/renderer/brave_content_renderer_client.cc +++ b/brave/renderer/brave_content_renderer_client.cc @@ -29,18 +29,18 @@ #include "components/network_hints/renderer/prescient_networking_dispatcher.h" #include "components/plugins/renderer/plugin_placeholder.h" #include "components/printing/renderer/print_render_frame_helper.h" -#include "components/spellcheck/spellcheck_build_features.h" +#include "components/spellcheck/spellcheck_buildflags.h" #include "components/visitedlink/renderer/visitedlink_slave.h" #include "components/web_cache/renderer/web_cache_impl.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "services/service_manager/public/cpp/service_context.h" -#include "third_party/WebKit/public/platform/URLConversion.h" -#include "third_party/WebKit/public/platform/WebSecurityOrigin.h" -#include "third_party/WebKit/public/platform/WebSocketHandshakeThrottle.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebPlugin.h" -#include "third_party/WebKit/public/web/WebPluginParams.h" -#include "third_party/WebKit/public/web/WebSecurityPolicy.h" +#include "third_party/blink/public/platform/url_conversion.h" +#include "third_party/blink/public/platform/web_security_origin.h" +#include "third_party/blink/public/platform/web_socket_handshake_throttle.h" +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_plugin.h" +#include "third_party/blink/public/web/web_plugin_params.h" +#include "third_party/blink/public/web/web_security_policy.h" #if defined(OS_WIN) #include #include "base/command_line.h" @@ -180,7 +180,7 @@ void BraveContentRendererClient::RenderFrameCreated( password_generation_agent, registry); #if BUILDFLAG(ENABLE_PRINTING) new printing::PrintRenderFrameHelper( - render_frame, base::MakeUnique()); + render_frame, std::make_unique()); #endif #if BUILDFLAG(ENABLE_SPELLCHECK) @@ -221,19 +221,18 @@ bool BraveContentRendererClient::OverrideCreatePlugin( return true; } -bool BraveContentRendererClient::WillSendRequest( +void BraveContentRendererClient::WillSendRequest( blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url, - GURL* new_url) { + const url::Origin* initiator_origin, + GURL* new_url, + bool* attach_same_site_cookies) { #if BUILDFLAG(ENABLE_EXTENSIONS) - if (ChromeExtensionsRendererClient::GetInstance()->WillSendRequest( - frame, transition_type, url, new_url)) { - return true; - } + ChromeExtensionsRendererClient::GetInstance()->WillSendRequest( + frame, transition_type, url, initiator_origin, new_url, + attach_same_site_cookies); #endif - - return false; } void BraveContentRendererClient::CreateRendererService( diff --git a/brave/renderer/brave_content_renderer_client.h b/brave/renderer/brave_content_renderer_client.h index bfea669e25..3f3299c382 100644 --- a/brave/renderer/brave_content_renderer_client.h +++ b/brave/renderer/brave_content_renderer_client.h @@ -53,11 +53,13 @@ class BraveContentRendererClient : public ChromeContentRendererClient { blink::WebPrescientNetworking* GetPrescientNetworking() override; - bool WillSendRequest( + void WillSendRequest( blink::WebLocalFrame* frame, ui::PageTransition transition_type, const blink::WebURL& url, - GURL* new_url) override; + const url::Origin* initiator_origin, + GURL* new_url, + bool* attach_same_site_cookies) override; std::unique_ptr CreateWebSocketHandshakeThrottle() override; void CreateRendererService( diff --git a/brave/renderer/extensions/content_settings_bindings.cc b/brave/renderer/extensions/content_settings_bindings.cc index dd1ab12228..0b3a8273dc 100644 --- a/brave/renderer/extensions/content_settings_bindings.cc +++ b/brave/renderer/extensions/content_settings_bindings.cc @@ -13,9 +13,9 @@ #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" #include "extensions/renderer/script_context.h" -#include "third_party/WebKit/public/web/WebView.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebDocument.h" +#include "third_party/blink/public/web/web_view.h" +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_document.h" using atom::ContentSettingsManager; diff --git a/brave/renderer/extensions/web_frame_bindings.cc b/brave/renderer/extensions/web_frame_bindings.cc index ae7ce79ab3..94dc88db88 100644 --- a/brave/renderer/extensions/web_frame_bindings.cc +++ b/brave/renderer/extensions/web_frame_bindings.cc @@ -15,11 +15,11 @@ #include "extensions/renderer/guest_view/extensions_guest_view_container.h" #include "extensions/renderer/script_context.h" #include "native_mate/scoped_persistent.h" -#include "third_party/WebKit/public/web/WebDocument.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebScriptExecutionCallback.h" -#include "third_party/WebKit/public/web/WebScriptSource.h" -#include "third_party/WebKit/public/web/WebView.h" +#include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_script_execution_callback.h" +#include "third_party/blink/public/web/web_script_source.h" +#include "third_party/blink/public/web/web_view.h" namespace brave { diff --git a/brave/renderer/printing/brave_print_render_frame_helper_delegate.cc b/brave/renderer/printing/brave_print_render_frame_helper_delegate.cc index 35fe7a8dfb..660f351025 100644 --- a/brave/renderer/printing/brave_print_render_frame_helper_delegate.cc +++ b/brave/renderer/printing/brave_print_render_frame_helper_delegate.cc @@ -12,9 +12,9 @@ #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" #include "ipc/ipc_message.h" -#include "third_party/WebKit/public/web/WebDocument.h" -#include "third_party/WebKit/public/web/WebElement.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" +#include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/public/web/web_element.h" +#include "third_party/blink/public/web/web_local_frame.h" BravePrintRenderFrameHelperDelegate::~BravePrintRenderFrameHelperDelegate() { } diff --git a/brave/utility/importer/brave_external_process_importer_bridge.cc b/brave/utility/importer/brave_external_process_importer_bridge.cc index 3a66db4d66..ca34f1237d 100644 --- a/brave/utility/importer/brave_external_process_importer_bridge.cc +++ b/brave/utility/importer/brave_external_process_importer_bridge.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include #include "brave/utility/importer/brave_external_process_importer_bridge.h" @@ -40,8 +41,8 @@ void BraveExternalProcessImporterBridge::SetCookies( } BraveExternalProcessImporterBridge::BraveExternalProcessImporterBridge( - const base::DictionaryValue& localized_strings, + base::Value localized_strings, scoped_refptr observer) - : ExternalProcessImporterBridge(localized_strings, observer) {} + : ExternalProcessImporterBridge(std::move(localized_strings), observer) {} BraveExternalProcessImporterBridge::~BraveExternalProcessImporterBridge() {} diff --git a/brave/utility/importer/brave_external_process_importer_bridge.h b/brave/utility/importer/brave_external_process_importer_bridge.h index 7ddc46b90a..b09a504960 100644 --- a/brave/utility/importer/brave_external_process_importer_bridge.h +++ b/brave/utility/importer/brave_external_process_importer_bridge.h @@ -16,7 +16,7 @@ class BraveExternalProcessImporterBridge : public: // |observer| must outlive this object. BraveExternalProcessImporterBridge( - const base::DictionaryValue& localized_strings, + base::Value localized_strings, scoped_refptr observer); diff --git a/brave/utility/importer/brave_profile_import_impl.cc b/brave/utility/importer/brave_profile_import_impl.cc index 68e53a6f7a..85bc7809a4 100644 --- a/brave/utility/importer/brave_profile_import_impl.cc +++ b/brave/utility/importer/brave_profile_import_impl.cc @@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" -#include "base/memory/ptr_util.h" #include "base/memory/ref_counted.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_util.h" @@ -35,7 +34,7 @@ BraveProfileImportImpl::~BraveProfileImportImpl() {} void BraveProfileImportImpl::StartImport( const importer::SourceProfile& source_profile, uint16_t items, - std::unique_ptr localized_strings, + base::Value localized_strings, chrome::mojom::ProfileImportObserverPtr observer) { content::UtilityThread::Get()->EnsureBlinkInitialized(); importer_ = @@ -63,7 +62,7 @@ void BraveProfileImportImpl::StartImport( ImporterCleanup(); } bridge_ = new BraveExternalProcessImporterBridge( - *localized_strings, + std::move(localized_strings), ThreadSafeProfileImportObserverPtr::Create(std::move(observer))); import_thread_->task_runner()->PostTask( FROM_HERE, base::BindOnce(&Importer::StartImport, importer_, diff --git a/brave/utility/importer/brave_profile_import_impl.h b/brave/utility/importer/brave_profile_import_impl.h index 58669e01f0..7b4a3b36d1 100644 --- a/brave/utility/importer/brave_profile_import_impl.h +++ b/brave/utility/importer/brave_profile_import_impl.h @@ -19,7 +19,7 @@ class BraveProfileImportImpl : public ProfileImportImpl { // chrome::mojom::ProfileImport: void StartImport(const importer::SourceProfile& source_profile, uint16_t items, - std::unique_ptr localized_strings, + base::Value localized_strings, chrome::mojom::ProfileImportObserverPtr observer) override; DISALLOW_COPY_AND_ASSIGN(BraveProfileImportImpl); diff --git a/brave/utility/importer/brave_profile_import_service.cc b/brave/utility/importer/brave_profile_import_service.cc index 4b58978acf..36e81c1afd 100644 --- a/brave/utility/importer/brave_profile_import_service.cc +++ b/brave/utility/importer/brave_profile_import_service.cc @@ -23,7 +23,7 @@ void OnProfileImportRequest( service_manager::ServiceContextRefFactory* ref_factory, chrome::mojom::ProfileImportRequest request) { mojo::MakeStrongBinding( - base::MakeUnique(ref_factory->CreateRef()), + std::make_unique(ref_factory->CreateRef()), std::move(request)); } @@ -36,7 +36,7 @@ BraveProfileImportService::~BraveProfileImportService() {} std::unique_ptr BraveProfileImportService::CreateService() { - return base::MakeUnique(); + return std::make_unique(); } void BraveProfileImportService::OnStart() { diff --git a/brave/utility/importer/chrome_importer.cc b/brave/utility/importer/chrome_importer.cc index f72d0d9a8b..7f05ccfcd0 100644 --- a/brave/utility/importer/chrome_importer.cc +++ b/brave/utility/importer/chrome_importer.cc @@ -290,7 +290,7 @@ void ChromeImporter::ImportCookies() { std::string value; if (!encrypted_value.empty() && delegate) { #if defined(OS_LINUX) - OSCrypt::SetConfig(base::MakeUnique()); + OSCrypt::SetConfig(std::make_unique()); #endif if (!delegate->DecryptString(encrypted_value, &value)) { continue; diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 07aefccfcd..96a89cd778 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -3,11 +3,11 @@ import("//build/config/ui.gni") import("//build/config/crypto.gni") import("//components/os_crypt/features.gni") import("//components/spellcheck/spellcheck_build_features.gni") -import("//extensions/features/features.gni") +import("//extensions/buildflags/buildflags.gni") import("//media/media_options.gni") -import("//ppapi/features/features.gni") -import("//printing/features/features.gni") -import("//rlz/features/features.gni") +import("//ppapi/buildflags/buildflags.gni") +import("//printing/buildflags/buildflags.gni") +import("//rlz/buildflags/buildflags.gni") config("chromium_src_config") { if (is_clang) { @@ -119,8 +119,8 @@ source_set("renderer") { "//content/public/common", "//chrome/renderer", "//components/content_settings/core/common", - "//components/spellcheck:build_features", - "//third_party/WebKit/public:blink_headers", + "//components/spellcheck:buildflags", + "//third_party/blink/public:blink_headers", ] if (enable_spellcheck) { @@ -145,7 +145,6 @@ source_set("browser") { ":history", ":metrics", ":password_manager", - ":permissions", ":sessions", ":web_data", "chrome/browser/safe_browsing", @@ -154,7 +153,6 @@ source_set("browser") { "//chrome/common", "//chrome/common:service_process_mojom", "//chrome/utility", - "//components/certificate_reporting:cert_logger_proto", "//components/certificate_transparency", "//components/crash/content/app", "//components/crash/core/browser", @@ -166,12 +164,14 @@ source_set("browser") { "//components/policy/core/common", "//components/prefs", "//components/ssl_config", - "//components/spellcheck:build_features", + "//components/spellcheck:buildflags", + "//components/safe_browsing:csd_proto", + "//components/safe_browsing:features", "//components/storage_monitor", "//content/public/browser", "//electron/atom/browser", "//ui/message_center", - "//net:features", + "//net:buildflags", "//pdf", ] @@ -238,6 +238,8 @@ source_set("browser") { "//chrome/browser/net/chrome_extensions_network_delegate.h", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc", "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.h", + "//chrome/browser/net/chrome_report_sender.cc", + "//chrome/browser/net/chrome_report_sender.h", "//chrome/browser/net/default_network_context_params.cc", "//chrome/browser/net/default_network_context_params.h", "//chrome/browser/net/proxy_config_monitor.cc", @@ -252,6 +254,11 @@ source_set("browser") { "//chrome/browser/offline_items_collection/offline_content_aggregator_factory.cc", "//chrome/browser/offline_items_collection/offline_content_aggregator_factory.h", + "chrome/browser/permissions/attestation_permission_request.cc", + "//chrome/browser/permissions/attestation_permission_request.h", + "chrome/browser/permissions/permission_request_manager.cc", + "//chrome/browser/permissions/permission_request_manager.h", + "//chrome/browser/prefs/chrome_command_line_pref_store.cc", "//chrome/browser/prefs/chrome_command_line_pref_store.h", "//chrome/browser/renderer_preferences_util.cc", @@ -273,6 +280,10 @@ source_set("browser") { "//chrome/browser/ui/cocoa/ui_localizer.mm", "//chrome/browser/ui/pdf/adobe_reader_info_win.cc", "//chrome/browser/ui/pdf/adobe_reader_info_win.h", + + "chrome/browser/ui/page_info/page_info_ui.cc", + "//chrome/browser/ui/page_info/page_info_ui.h", + "chrome/browser/ui/profile_error_dialog.cc", "//chrome/browser/ui/web_contents_sizer.cc", @@ -330,6 +341,7 @@ source_set("browser") { "//chrome/browser/upgrade_detector.cc", "//chrome/browser/upgrade_detector.h", "chrome/browser/upgrade_detector_impl.cc", + "//chrome/browser/upgrade_detector_impl.h", "chrome/app/vector_icons/vector_icons.cc", "chrome/app/vector_icons/vector_icons.h", "//chrome/browser/service_process/service_process_control.cc", @@ -407,6 +419,10 @@ source_set("browser") { "//chrome/browser/ui/views/harmony/harmony_layout_provider.h", "//chrome/browser/ui/views/harmony/harmony_typography_provider.cc", "//chrome/browser/ui/views/harmony/harmony_typography_provider.h", + "//chrome/browser/ui/views/harmony/material_refresh_layout_provider.cc", + "//chrome/browser/ui/views/harmony/material_refresh_layout_provider.h", + "chrome/browser/ui/views/location_bar/location_bar_view.cc", + "//chrome/browser/ui/views/location_bar/location_bar_view.h", ] deps += [ @@ -514,8 +530,6 @@ source_set("browser") { "//chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h", "//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc", "//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h", - "//chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.cc", - "//chrome/browser/renderer_host/pepper/pepper_platform_verification_message_filter.h", "//chrome/browser/pepper_flash_settings_manager.cc", "//chrome/browser/pepper_flash_settings_manager.h", "//chrome/browser/plugins/chrome_plugin_service_filter.cc", @@ -552,6 +566,8 @@ source_set("browser") { "//chrome/browser/extensions/extension_tab_util.h", "//chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc", "//chrome/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h", + "//chrome/browser/extensions/api/i18n/i18n_api.cc", + "//chrome/browser/extensions/api/i18n/i18n_api.h", "chrome/browser/extensions/api/messaging/incognito_connectability.cc", "//chrome/browser/extensions/api/messaging/incognito_connectability.h", "//chrome/browser/extensions/api/messaging/chrome_messaging_delegate.cc", @@ -588,7 +604,7 @@ source_set("browser") { deps += [ "//components/spellcheck/browser", "//extensions/browser", - "//rlz/features", + "//rlz/buildflags", ] } if (use_aura) { @@ -643,16 +659,6 @@ source_set("browser") { } } -source_set("permissions") { - configs += [ "//electron/build:electron_config" ] - configs += [ ":chromium_src_config" ] - - sources = [ - "chrome/browser/permissions/permission_uma_util.cc", - "//chrome/browser/permissions/permission_uma_util.h", - ] -} - source_set("crashes_ui") { configs += [ "//electron/build:electron_config" ] configs += [ ":chromium_src_config" ] @@ -680,10 +686,14 @@ source_set("menu_bar") { "//chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h" ] + deps = [ + "//third_party/blink/public/mojom:mojom_platform", + ] + if (use_gio) { configs += [ "//build/linux:gio_config" ] - deps = [ + deps += [ "//components/sync", "//ipc:mojom", "//third_party/protobuf:protobuf_lite", @@ -702,12 +712,8 @@ source_set("devtools") { "//chrome/browser/devtools/devtools_embedder_message_dispatcher.h", "//chrome/browser/devtools/devtools_file_system_indexer.cc", "//chrome/browser/devtools/devtools_file_system_indexer.h", - "//chrome/browser/devtools/devtools_protocol.cc", - "//chrome/browser/devtools/devtools_protocol.h", "//chrome/browser/devtools/url_constants.cc", "//chrome/browser/devtools/url_constants.h", - "$root_gen_dir/chrome/browser/devtools/devtools_protocol_constants.cc", - "$root_gen_dir/chrome/browser/devtools/devtools_protocol_constants.h", ] configs += [ @@ -720,9 +726,8 @@ source_set("devtools") { "//base", "//content/public/browser", "//net", - "//third_party/WebKit/public:features", + "//third_party/blink/public:buildflags", "//ui/events:dom_keycode_converter", - "//chrome/browser/devtools:devtools_protocol_constants", ] } @@ -919,9 +924,6 @@ source_set("downloads") { "//chrome/browser/background_fetch/background_fetch_delegate_impl.h", "//chrome/browser/background_fetch/background_fetch_download_client.cc", "//chrome/browser/background_fetch/background_fetch_download_client.h", - "chrome/browser/download/chrome_download_manager_delegate.cc", - "//chrome/browser/download/chrome_download_manager_delegate.h", - "chrome/browser/download/download_commands.cc", "//chrome/browser/download/download_commands.h", "chrome/browser/download/download_core_service.cc", "//chrome/browser/download/download_core_service.h", @@ -1134,12 +1136,29 @@ source_set("tab_manager") { "chrome/browser/engagement/site_engagement_service.cc", "//chrome/browser/memory/oom_memory_details.cc", "//chrome/browser/memory/oom_memory_details.h", - "//chrome/browser/resource_coordinator/discard_metrics_util.cc", - "//chrome/browser/resource_coordinator/discard_metrics_util.h", + "//chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer.cc", + "//chrome/browser/resource_coordinator/discard_metrics_lifecycle_unit_observer.h", + "//chrome/browser/resource_coordinator/lifecycle_unit.cc", + "//chrome/browser/resource_coordinator/lifecycle_unit.h", + "//chrome/browser/resource_coordinator/lifecycle_unit_base.cc", + "//chrome/browser/resource_coordinator/lifecycle_unit_base.h", + "//chrome/browser/resource_coordinator/lifecycle_unit_observer.cc", + "//chrome/browser/resource_coordinator/lifecycle_unit_observer.h", + "//chrome/browser/resource_coordinator/lifecycle_unit_source_base.cc", + "//chrome/browser/resource_coordinator/lifecycle_unit_source_base.h", "//chrome/browser/resource_coordinator/page_signal_receiver.cc", "//chrome/browser/resource_coordinator/page_signal_receiver.h", "//chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.cc", "//chrome/browser/resource_coordinator/resource_coordinator_web_contents_observer.h", + "//chrome/browser/resource_coordinator/tab_lifecycle_observer.h", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit.cc", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit.h", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit_external.cc", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit_external.h", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit_source.cc", + "//chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h", + "//chrome/browser/resource_coordinator/tab_load_tracker.cc", + "//chrome/browser/resource_coordinator/tab_load_tracker.h", "//chrome/browser/resource_coordinator/tab_manager.cc", "//chrome/browser/resource_coordinator/tab_manager.h", "//chrome/browser/resource_coordinator/tab_manager_features.cc", @@ -1150,8 +1169,6 @@ source_set("tab_manager") { "//chrome/browser/resource_coordinator/tab_manager_stats_collector.h", "//chrome/browser/resource_coordinator/tab_manager_web_contents_data.cc", "//chrome/browser/resource_coordinator/tab_manager_web_contents_data.h", - "//chrome/browser/resource_coordinator/tab_stats.cc", - "//chrome/browser/resource_coordinator/tab_stats.h", "//chrome/browser/resource_coordinator/time.cc", "//chrome/browser/resource_coordinator/time.h", "//chrome/browser/memory_details.cc", @@ -1217,7 +1234,7 @@ source_set("tab_manager") { public_deps = [ "//chrome/browser/engagement:mojo_bindings", "//chrome/common", - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", ] } diff --git a/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc index 32caee8711..b01179157a 100644 --- a/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc +++ b/chromium_src/chrome/browser/bookmarks/bookmark_model_factory.cc @@ -4,7 +4,6 @@ #include "chrome/browser/bookmarks/bookmark_model_factory.h" -#include "base/memory/ptr_util.h" #include "base/memory/singleton.h" #include "base/values.h" #include "build/build_config.h" diff --git a/chromium_src/chrome/browser/browser_process_impl.cc b/chromium_src/chrome/browser/browser_process_impl.cc index 7b374dd7c5..d7424ffc4d 100644 --- a/chromium_src/chrome/browser/browser_process_impl.cc +++ b/chromium_src/chrome/browser/browser_process_impl.cc @@ -23,6 +23,7 @@ #include "chrome/browser/printing/background_printing_manager.h" #include "chrome/browser/printing/print_job_manager.h" #include "chrome/browser/profiles/profile_manager.h" +#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_source.h" #include "chrome/browser/shell_integration.h" #include "chrome/browser/status_icons/status_tray.h" #include "chrome/browser/ui/user_manager.h" @@ -45,7 +46,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/common/content_switches.h" #include "content/public/common/network_connection_tracker.h" -#include "ppapi/features/features.h" +#include "ppapi/buildflags/buildflags.h" #include "ui/base/idle/idle.h" #include "ui/base/l10n/l10n_util.h" #include "ui/message_center/message_center.h" @@ -60,7 +61,6 @@ #include "chrome/browser/icon_manager.h" #include "chrome/browser/intranet_redirect_detector.h" #include "chrome/browser/io_thread.h" -#include "chrome/browser/media/webrtc/webrtc_log_uploader.h" #include "chrome/browser/media_galleries/media_file_system_registry.h" #include "chrome/browser/metrics/thread_watcher.h" #include "chrome/browser/notifications/notification_platform_bridge.h" @@ -95,6 +95,11 @@ #include "content/public/browser/plugin_service.h" #endif +#if BUILDFLAG(ENABLE_WEBRTC) +#include "chrome/browser/media/webrtc/webrtc_event_log_manager.h" +#include "chrome/browser/media/webrtc/webrtc_log_uploader.h" +#endif + #if defined(OS_WIN) #include "chrome/common/chrome_constants.h" #include "chrome/install_static/install_util.h" @@ -158,7 +163,7 @@ BrowserProcessImpl::BrowserProcessImpl( message_center::MessageCenter::Initialize(); - net_log_ = base::MakeUnique(); + net_log_ = std::make_unique(); // TODO(darkdh): support this later // if (command_line.HasSwitch(switches::kLogNetLog)) { @@ -348,8 +353,8 @@ void BrowserProcessImpl::PreCreateThreads( // TODO(mmenke): Once IOThread class is no longer needed (not the thread // itself), this can be created on first use. system_network_context_manager_ = - base::MakeUnique(); - io_thread_ = base::MakeUnique( + std::make_unique(); + io_thread_ = std::make_unique( local_state(), policy_service(), net_log_.get(), extension_event_router_forwarder(), system_network_context_manager_.get()); @@ -385,8 +390,12 @@ void BrowserProcessImpl::PreMainMessageLoopRun() { resource_coordinator::TabManager* BrowserProcessImpl::GetTabManager() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) - if (!tab_manager_.get()) - tab_manager_.reset(new resource_coordinator::GuestTabManager()); + if (!tab_manager_) { + tab_manager_ = std::make_unique(); + tab_lifecycle_unit_source_ = + std::make_unique(); + tab_lifecycle_unit_source_->AddObserver(tab_manager_.get()); + } return tab_manager_.get(); #else return nullptr; @@ -606,7 +615,7 @@ IconManager* BrowserProcessImpl::icon_manager() { GpuModeManager* BrowserProcessImpl::gpu_mode_manager() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (!gpu_mode_manager_) - gpu_mode_manager_ = base::MakeUnique(); + gpu_mode_manager_ = std::make_unique(); return gpu_mode_manager_.get(); } @@ -628,7 +637,7 @@ void BrowserProcessImpl::CreateBackgroundPrintingManager() { #if BUILDFLAG(ENABLE_PRINT_PREVIEW) DCHECK(!background_printing_manager_); background_printing_manager_ = - base::MakeUnique(); + std::make_unique(); #else NOTIMPLEMENTED(); #endif diff --git a/chromium_src/chrome/browser/content_settings/host_content_settings_map_factory.cc b/chromium_src/chrome/browser/content_settings/host_content_settings_map_factory.cc index 1828a9ae8a..8e5b54d7d2 100644 --- a/chromium_src/chrome/browser/content_settings/host_content_settings_map_factory.cc +++ b/chromium_src/chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -11,7 +11,7 @@ #include "components/content_settings/core/browser/host_content_settings_map.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "content/public/browser/browser_thread.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_EXTENSIONS) #include "atom/browser/extensions/atom_extension_system.h" diff --git a/chromium_src/chrome/browser/custom_handlers/protocol_handler_registry.cc b/chromium_src/chrome/browser/custom_handlers/protocol_handler_registry.cc index b4c9b51627..86aa8b68fe 100644 --- a/chromium_src/chrome/browser/custom_handlers/protocol_handler_registry.cc +++ b/chromium_src/chrome/browser/custom_handlers/protocol_handler_registry.cc @@ -22,7 +22,6 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/macros.h" -#include "base/memory/ptr_util.h" #include "build/build_config.h" #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/profiles/profile_io_data.h" @@ -765,7 +764,7 @@ base::Value* ProtocolHandlerRegistry::EncodeRegisteredHandlers() { j != i->second.end(); ++j) { std::unique_ptr encoded = j->Encode(); if (IsDefault(*j)) { - encoded->Set("default", base::MakeUnique(true)); + encoded->Set("default", std::make_unique(true)); } protocol_handlers->Append(std::move(encoded)); } diff --git a/chromium_src/chrome/browser/engagement/site_engagement_service.cc b/chromium_src/chrome/browser/engagement/site_engagement_service.cc index 15bf176467..ff70d62cf7 100644 --- a/chromium_src/chrome/browser/engagement/site_engagement_service.cc +++ b/chromium_src/chrome/browser/engagement/site_engagement_service.cc @@ -4,7 +4,6 @@ #include "chrome/browser/engagement/site_engagement_service.h" -#include "base/memory/ptr_util.h" #include "base/time/clock.h" #include "base/time/default_clock.h" #include "chrome/browser/engagement/site_engagement_score.h" @@ -23,6 +22,6 @@ SiteEngagementService* SiteEngagementService::Get(Profile* profile) { double SiteEngagementService::GetScoreFromSettings( HostContentSettingsMap* settings, const GURL& origin) { - auto clock = base::MakeUnique(); + auto clock = std::make_unique(); return SiteEngagementScore(clock.get(), origin, settings).GetTotalScore(); } diff --git a/chromium_src/chrome/browser/extensions/extension_tab_util.cc b/chromium_src/chrome/browser/extensions/extension_tab_util.cc index c042f9e83d..156f0443ee 100644 --- a/chromium_src/chrome/browser/extensions/extension_tab_util.cc +++ b/chromium_src/chrome/browser/extensions/extension_tab_util.cc @@ -15,6 +15,7 @@ #include "chrome/browser/extensions/api/tabs/tabs_constants.h" #include "chrome/browser/resource_coordinator/tab_manager.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/resource_coordinator/tab_lifecycle_unit_external.h" #include "chrome/browser/sessions/session_tab_helper.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -82,7 +83,7 @@ int GetTabIdForExtensions(const WebContents* web_contents) { Browser* browser = chrome::FindBrowserWithWebContents(web_contents); if (browser && !ExtensionTabUtil::BrowserSupportsTabs(browser)) return -1; - return SessionTabHelper::IdForTab(web_contents); + return SessionTabHelper::IdForTab(web_contents).id(); } } // namespace @@ -108,7 +109,7 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel( } int ExtensionTabUtil::GetTabId(const WebContents* web_contents) { - return SessionTabHelper::IdForTab(web_contents); + return SessionTabHelper::IdForTab(web_contents).id(); } std::string ExtensionTabUtil::GetTabStatusText(bool is_loading) { @@ -116,7 +117,7 @@ std::string ExtensionTabUtil::GetTabStatusText(bool is_loading) { } int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) { - return SessionTabHelper::IdForWindowContainingTab(web_contents); + return SessionTabHelper::IdForWindowContainingTab(web_contents).id(); } // static @@ -145,9 +146,12 @@ std::unique_ptr ExtensionTabUtil::CreateTabObject( tab_object->highlighted = tab_strip && tab_strip->IsTabSelected(tab_index); tab_object->pinned = tab_helper->is_pinned(); tab_object->audible = std::make_unique(contents->WasRecentlyAudible()); + auto* tab_lifeycle_unit_external = + resource_coordinator::TabLifecycleUnitExternal::FromWebContents(contents); tab_object->discarded = tab_helper->IsDiscarded(); tab_object->auto_discardable = - g_browser_process->GetTabManager()->IsTabAutoDiscardable(contents); + !tab_lifeycle_unit_external || + tab_lifeycle_unit_external->IsAutoDiscardable(); tab_object->muted_info = CreateMutedInfo(contents); tab_object->incognito = contents->GetBrowserContext()->IsOffTheRecord(); gfx::Size contents_size = contents->GetContainerBounds().size(); @@ -279,7 +283,7 @@ bool ExtensionTabUtil::GetTabById(int tab_id, TabStripModel* target_tab_strip = target_browser->tab_strip_model(); for (int i = 0; i < target_tab_strip->count(); ++i) { WebContents* target_contents = target_tab_strip->GetWebContentsAt(i); - if (SessionTabHelper::IdForTab(target_contents) == tab_id) { + if (SessionTabHelper::IdForTab(target_contents).id() == tab_id) { if (browser) *browser = target_browser; if (tab_strip) diff --git a/chromium_src/chrome/browser/interstitials/chrome_metrics_helper.cc b/chromium_src/chrome/browser/interstitials/chrome_metrics_helper.cc index bc800f2266..7e7c15d53a 100644 --- a/chromium_src/chrome/browser/interstitials/chrome_metrics_helper.cc +++ b/chromium_src/chrome/browser/interstitials/chrome_metrics_helper.cc @@ -4,8 +4,9 @@ #include "chrome/browser/interstitials/chrome_metrics_helper.h" +#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) #include "chrome/browser/ssl/captive_portal_metrics_recorder.h" -#include "content/public/browser/web_contents.h" +#endif ChromeMetricsHelper::ChromeMetricsHelper( content::WebContents* web_contents, @@ -14,7 +15,12 @@ ChromeMetricsHelper::ChromeMetricsHelper( : security_interstitials::MetricsHelper( request_url, settings, - nullptr) {} + nullptr), +#if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) + web_contents_(web_contents), +#endif + request_url_(request_url) { +} ChromeMetricsHelper::~ChromeMetricsHelper() {} diff --git a/chromium_src/chrome/browser/io_thread.cc b/chromium_src/chrome/browser/io_thread.cc index 3b8be45a7f..c616c468c8 100644 --- a/chromium_src/chrome/browser/io_thread.cc +++ b/chromium_src/chrome/browser/io_thread.cc @@ -26,17 +26,18 @@ #include "content/public/browser/network_service_instance.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #include "net/cert/cert_verifier.h" #include "net/cert/ct_known_logs.h" #include "net/cert/ct_log_verifier.h" #include "net/cert/ct_verifier.h" -#include "net/cert/sth_distributor.h" -#include "net/cert/sth_observer.h" +#include "components/certificate_transparency/sth_distributor.h" +#include "components/certificate_transparency/sth_observer.h" #include "net/cert/multi_log_ct_verifier.h" #include "net/dns/mapped_host_resolver.h" #include "net/http/http_auth_handler_factory.h" #include "net/http/http_auth_preferences.h" +#include "net/nqe/network_quality_estimator.h" #include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context_getter.h" #include "services/network/ignore_errors_cert_verifier.h" @@ -127,7 +128,7 @@ IOThread::IOThread( pac_https_url_stripping_enabled_.MoveToThread(io_thread_proxy); chrome_browser_net::SetGlobalSTHDistributor( - std::make_unique()); + std::make_unique()); BrowserThread::SetIOThreadDelegate(this); @@ -198,10 +199,6 @@ void IOThread::Init() { TRACE_EVENT0("startup", "IOThread::InitAsync"); DCHECK_CURRENTLY_ON(BrowserThread::IO); -#if defined(USE_NSS_CERTS) - net::SetMessageLoopForNSSHttpIO(); -#endif - DCHECK(!globals_); globals_ = new Globals; @@ -242,10 +239,6 @@ void IOThread::Init() { } void IOThread::CleanUp() { -#if defined(USE_NSS_CERTS) - net::ShutdownNSSHttpIO(); -#endif - system_url_request_context_getter_ = nullptr; // Unlink the ct_tree_tracker_ from the global cert_transparency_verifier @@ -362,11 +355,13 @@ void IOThread::UpdateDnsClientEnabled() { *dns_client_enabled_); } -void IOThread::RegisterSTHObserver(net::ct::STHObserver* observer) { +void IOThread::RegisterSTHObserver( + certificate_transparency::STHObserver* observer) { chrome_browser_net::GetGlobalSTHDistributor()->RegisterObserver(observer); } -void IOThread::UnregisterSTHObserver(net::ct::STHObserver* observer) { +void IOThread::UnregisterSTHObserver( + certificate_transparency::STHObserver* observer) { chrome_browser_net::GetGlobalSTHDistributor()->UnregisterObserver(observer); } @@ -432,7 +427,7 @@ void IOThread::SetUpProxyService( void IOThread::ConstructSystemRequestContext() { std::unique_ptr builder = - base::MakeUnique(); + std::make_unique(); builder->set_user_agent(GetUserAgent()); std::unique_ptr @@ -458,7 +453,7 @@ void IOThread::ConstructSystemRequestContext() { command_line, switches::kUserDataDir, std::move(cert_verifier))); std::unique_ptr ct_verifier = - base::MakeUnique(); + std::make_unique(); // Add built-in logs ct_verifier->AddLogs(globals_->ct_logs); @@ -469,9 +464,14 @@ void IOThread::ConstructSystemRequestContext() { globals_->quic_disabled = true; if (base::FeatureList::IsEnabled(network::features::kNetworkService)) { - globals_->system_request_context_owner = - std::move(builder)->Create(std::move(network_context_params_).get(), - !is_quic_allowed_on_init_, net_log_); + globals_->deprecated_network_quality_estimator = + std::make_unique( + std::make_unique( + std::map()), + net_log_); + globals_->system_request_context_owner = std::move(builder)->Create( + std::move(network_context_params_).get(), !is_quic_allowed_on_init_, + net_log_, globals_->deprecated_network_quality_estimator.get()); globals_->system_request_context = globals_->system_request_context_owner.url_request_context_getter ->GetURLRequestContext(); diff --git a/chromium_src/chrome/browser/permissions/attestation_permission_request.cc b/chromium_src/chrome/browser/permissions/attestation_permission_request.cc new file mode 100644 index 0000000000..e2209d8d07 --- /dev/null +++ b/chromium_src/chrome/browser/permissions/attestation_permission_request.cc @@ -0,0 +1,14 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/permissions/attestation_permission_request.h" + +#include "base/callback.h" + +PermissionRequest* NewAttestationPermissionRequest( + const url::Origin& origin, + base::OnceCallback callback) { + return nullptr; +} + diff --git a/chromium_src/chrome/browser/permissions/permission_uma_util.cc b/chromium_src/chrome/browser/permissions/permission_uma_util.cc deleted file mode 100644 index 2983e2a591..0000000000 --- a/chromium_src/chrome/browser/permissions/permission_uma_util.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "chrome/browser/permissions/permission_uma_util.h" - -PermissionReportInfo::PermissionReportInfo( - const PermissionReportInfo& other) = default; diff --git a/chromium_src/chrome/browser/profiles/profile.cc b/chromium_src/chrome/browser/profiles/profile.cc index 64aa46270f..434638d133 100644 --- a/chromium_src/chrome/browser/profiles/profile.cc +++ b/chromium_src/chrome/browser/profiles/profile.cc @@ -19,7 +19,7 @@ #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/browser/pref_names.h" diff --git a/chromium_src/chrome/browser/profiles/profile_io_data.cc b/chromium_src/chrome/browser/profiles/profile_io_data.cc index 3cee87b079..3ea44f8484 100644 --- a/chromium_src/chrome/browser/profiles/profile_io_data.cc +++ b/chromium_src/chrome/browser/profiles/profile_io_data.cc @@ -30,8 +30,8 @@ #include "content/public/browser/notification_service.h" #include "content/public/browser/resource_context.h" #include "content/public/common/url_constants.h" -#include "extensions/features/features.h" -#include "net/net_features.h" +#include "extensions/buildflags/buildflags.h" +#include "net/net_buildflags.h" #include "net/url_request/data_protocol_handler.h" #include "net/url_request/file_protocol_handler.h" #include "net/url_request/ftp_protocol_handler.h" @@ -51,6 +51,12 @@ #include "extensions/common/constants.h" #endif +// static +ProfileIOData* ProfileIOData::FromResourceContext( + content::ResourceContext* rc) { + return (static_cast(rc))->io_data_; +} + // static bool ProfileIOData::IsHandledProtocol(const std::string& scheme) { DCHECK_EQ(scheme, base::ToLowerASCII(scheme)); @@ -105,3 +111,17 @@ void ProfileIOData::InstallProtocolHandlers( } protocol_handlers->clear(); } + +extensions::InfoMap* ProfileIOData::GetExtensionInfoMap() const { + DCHECK(initialized_) << "ExtensionSystem not initialized"; +#if BUILDFLAG(ENABLE_EXTENSIONS) + return extension_info_map_.get(); +#else + return nullptr; +#endif +} + +bool ProfileIOData::IsOffTheRecord() const { + return profile_type() == Profile::INCOGNITO_PROFILE + || profile_type() == Profile::GUEST_PROFILE; +} diff --git a/chromium_src/chrome/browser/profiles/profile_manager.cc b/chromium_src/chrome/browser/profiles/profile_manager.cc index 99243d0769..185761c84c 100644 --- a/chromium_src/chrome/browser/profiles/profile_manager.cc +++ b/chromium_src/chrome/browser/profiles/profile_manager.cc @@ -33,7 +33,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/common/content_switches.h" -#include "extensions/features/features.h" +#include "extensions/buildflags/buildflags.h" #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/browser/extension_system.h" @@ -301,7 +301,7 @@ ProfileManager::ProfileInfo* ProfileManager::RegisterProfile( Profile* profile, bool created) { TRACE_EVENT0("browser", "ProfileManager::RegisterProfile"); - auto info = base::MakeUnique(profile, created); + auto info = std::make_unique(profile, created); ProfileInfo* info_raw = info.get(); profiles_info_.insert( std::make_pair(profile->GetPath(), std::move(info))); diff --git a/chromium_src/chrome/browser/safe_browsing/BUILD.gn b/chromium_src/chrome/browser/safe_browsing/BUILD.gn index e7fdb41991..21859678c8 100644 --- a/chromium_src/chrome/browser/safe_browsing/BUILD.gn +++ b/chromium_src/chrome/browser/safe_browsing/BUILD.gn @@ -29,7 +29,6 @@ source_set("ui_extensions") { deps = [ "//chrome/common:mojo_bindings", - "//printing/features", ] } diff --git a/chromium_src/chrome/browser/safe_browsing/chrome_password_protection_service.cc b/chromium_src/chrome/browser/safe_browsing/chrome_password_protection_service.cc new file mode 100644 index 0000000000..31ffe796ca --- /dev/null +++ b/chromium_src/chrome/browser/safe_browsing/chrome_password_protection_service.cc @@ -0,0 +1,11 @@ +#include "chrome/browser/safe_browsing/chrome_password_protection_service.h" + +namespace safe_browsing { + +// static +bool ChromePasswordProtectionService::ShouldShowChangePasswordSettingUI( + Profile* profile) { + return false; +} + +} // namespace safe_browsing diff --git a/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc b/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc index bbcfd89deb..de74bbd4d1 100644 --- a/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc +++ b/chromium_src/chrome/browser/search_engines/template_url_service_factory.cc @@ -7,7 +7,6 @@ #include #include "base/bind.h" -#include "base/memory/ptr_util.h" #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" diff --git a/chromium_src/chrome/browser/ui/browser.cc b/chromium_src/chrome/browser/ui/browser.cc index 56ab8673c0..66f9021bf6 100644 --- a/chromium_src/chrome/browser/ui/browser.cc +++ b/chromium_src/chrome/browser/ui/browser.cc @@ -52,13 +52,11 @@ Browser::Browser(const CreateParams& params) params.profile)), app_name_(params.app_name), is_trusted_source_(params.trusted_source), + session_id_(SessionID::FromSerializedValue(-1)), initial_show_state_(params.initial_show_state), is_session_restore_(params.is_session_restore), weak_factory_(this) { BrowserList::AddBrowser(this); - content::NotificationService::current()->Notify( - chrome::NOTIFICATION_BROWSER_WINDOW_READY, content::Source(this), - content::NotificationService::NoDetails()); } Browser::~Browser() { @@ -87,6 +85,10 @@ void Browser::UnregisterKeepAlive() { keep_alive_.reset(); } +content::WebContents* Browser::OpenURL(const content::OpenURLParams& params) { + return nullptr; +} + bool Browser::SupportsWindowFeature(WindowFeature feature) const { return SupportsWindowFeatureImpl(feature, true); } diff --git a/chromium_src/chrome/browser/ui/browser.h b/chromium_src/chrome/browser/ui/browser.h index c45c98bb69..dd962a0fd0 100644 --- a/chromium_src/chrome/browser/ui/browser.h +++ b/chromium_src/chrome/browser/ui/browser.h @@ -32,6 +32,10 @@ class ScopedKeepAlive; class TabStripModel; class TabStripModelDelegate; +namespace content { +struct OpenURLParams; +} + class Browser : public content::WebContentsDelegate { public: // SessionService::WindowType mirrors these values. If you add to this @@ -130,6 +134,7 @@ class Browser : public content::WebContentsDelegate { BrowserWindow* window() const { return window_; } TabStripModel* tab_strip_model() const { return tab_strip_model_.get(); } SessionID& session_id() { return session_id_; } + void set_session_id(const SessionID& session_id) { session_id_ = session_id; } // OnBeforeUnload handling ////////////////////////////////////////////////// diff --git a/chromium_src/chrome/browser/ui/page_info/page_info_ui.cc b/chromium_src/chrome/browser/ui/page_info/page_info_ui.cc index e990714c44..cd2416872d 100644 --- a/chromium_src/chrome/browser/ui/page_info/page_info_ui.cc +++ b/chromium_src/chrome/browser/ui/page_info/page_info_ui.cc @@ -1,6 +1,11 @@ +// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + #include "chrome/browser/ui/page_info/page_info_ui.h" // static bool PageInfoUI::ContentSettingsTypeInPageInfo(ContentSettingsType type) { return false; } + diff --git a/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc new file mode 100644 index 0000000000..a78b5b404d --- /dev/null +++ b/chromium_src/chrome/browser/ui/views/location_bar/location_bar_view.cc @@ -0,0 +1,13 @@ +#include "chrome/browser/ui/views/location_bar/location_bar_view.h" + +// static +int LocationBarView::GetAvailableTextHeight() { + NOTREACHED(); + return 0; +} + +// static +int LocationBarView::GetAvailableDecorationTextHeight() { + NOTREACHED(); + return 0; +} diff --git a/chromium_src/chrome/browser/upgrade_detector_impl.cc b/chromium_src/chrome/browser/upgrade_detector_impl.cc index f32c71b760..f9fd9ed808 100644 --- a/chromium_src/chrome/browser/upgrade_detector_impl.cc +++ b/chromium_src/chrome/browser/upgrade_detector_impl.cc @@ -2,25 +2,39 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/upgrade_detector.h" - -namespace { -class UpgradeDetectorImpl : public UpgradeDetector { - private: - // UpgradeDetector overrides: - // Not used in Brave. - base::TimeDelta GetHighAnnoyanceLevelDelta() override { - return base::TimeDelta(); - } - - base::TimeTicks GetHighAnnoyanceDeadline() override { - return base::TimeTicks(); - } -}; +#include "chrome/browser/upgrade_detector_impl.h" + +#include "base/no_destructor.h" +#include "base/time/default_tick_clock.h" + +UpgradeDetectorImpl::UpgradeDetectorImpl(const base::TickClock* tick_clock) + : UpgradeDetector(tick_clock), + simulating_outdated_(false), + is_testing_(false), + weak_factory_(this) {} + +UpgradeDetectorImpl::~UpgradeDetectorImpl() {} + +base::TimeDelta UpgradeDetectorImpl::GetHighAnnoyanceLevelDelta() { + return base::TimeDelta(); +} + +base::TimeTicks UpgradeDetectorImpl::GetHighAnnoyanceDeadline() { + return base::TimeTicks(); +} + +void UpgradeDetectorImpl::OnRelaunchNotificationPeriodPrefChanged() {} + +void UpgradeDetectorImpl::OnExperimentChangesDetected(Severity severity) {} + +// static +UpgradeDetectorImpl* UpgradeDetectorImpl::GetInstance() { + static base::NoDestructor instance( + base::DefaultTickClock::GetInstance()); + return instance.get(); } // static UpgradeDetector* UpgradeDetector::GetInstance() { - static auto* const instance = new UpgradeDetectorImpl(); - return instance; + return UpgradeDetectorImpl::GetInstance(); } diff --git a/chromium_src/chrome/installer/util/muon_distribution.cc b/chromium_src/chrome/installer/util/muon_distribution.cc index 1b9ab0e447..1934484304 100644 --- a/chromium_src/chrome/installer/util/muon_distribution.cc +++ b/chromium_src/chrome/installer/util/muon_distribution.cc @@ -4,10 +4,9 @@ #include "chrome/installer/util/muon_distribution.h" -#include "base/memory/ptr_util.h" #include "chrome/installer/util/app_registration_data.h" #include "chrome/installer/util/non_updating_app_registration_data.h" MuonDistribution::MuonDistribution() - : BrowserDistribution(base::MakeUnique( + : BrowserDistribution(std::make_unique( L"Software\\Muon")) {} diff --git a/chromium_src/chrome/renderer/content_settings_observer.cc b/chromium_src/chrome/renderer/content_settings_observer.cc index 6a85897c91..f5d07eb003 100644 --- a/chromium_src/chrome/renderer/content_settings_observer.cc +++ b/chromium_src/chrome/renderer/content_settings_observer.cc @@ -17,15 +17,15 @@ #include "content/public/renderer/document_state.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" -#include "extensions/features/features.h" -#include "third_party/WebKit/public/platform/URLConversion.h" -#include "third_party/WebKit/public/platform/WebContentSettingCallbacks.h" -#include "third_party/WebKit/public/platform/WebSecurityOrigin.h" -#include "third_party/WebKit/public/platform/WebURL.h" -#include "third_party/WebKit/public/web/WebDocument.h" -#include "third_party/WebKit/public/web/WebFrameClient.h" -#include "third_party/WebKit/public/web/WebLocalFrame.h" -#include "third_party/WebKit/public/web/WebView.h" +#include "extensions/buildflags/buildflags.h" +#include "third_party/blink/public/platform/url_conversion.h" +#include "third_party/blink/public/platform/web_content_setting_callbacks.h" +#include "third_party/blink/public/platform/web_security_origin.h" +#include "third_party/blink/public/platform/web_url.h" +#include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/public/web/web_frame_client.h" +#include "third_party/blink/public/web/web_local_frame.h" +#include "third_party/blink/public/web/web_view.h" #include "url/url_constants.h" #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -334,29 +334,74 @@ bool ContentSettingsObserver::AllowIndexedDB(const WebString& name, return allow; } +GURL GetOriginOrURL(const WebFrame* frame) { + url::Origin top_origin = url::Origin(frame->Top()->GetSecurityOrigin()); + // The |top_origin| is unique ("null") e.g., for file:// URLs. Use the + // document URL as the primary URL in those cases. + // TODO(alexmos): This is broken for --site-per-process, since top() can be a + // WebRemoteFrame which does not have a document(), and the WebRemoteFrame's + // URL is not replicated. See https://crbug.com/628759. + if (top_origin.unique() && frame->Top()->IsWebLocalFrame()) + return frame->Top()->ToWebLocalFrame()->GetDocument().Url(); + return top_origin.GetURL(); +} + +// Allow passing both WebURL and GURL here, so that we can early return without +// allocating a new backing string if only the default rule matches. +template +ContentSetting GetContentSettingFromRules( + const ContentSettingsForOneType& rules, + const WebFrame* frame, + const URL& secondary_url) { + // If there is only one rule, it's the default rule and we don't need to match + // the patterns. + if (rules.size() == 1) { + DCHECK(rules[0].primary_pattern == ContentSettingsPattern::Wildcard()); + DCHECK(rules[0].secondary_pattern == ContentSettingsPattern::Wildcard()); + return rules[0].GetContentSetting(); + } + const GURL& primary_url = GetOriginOrURL(frame); + const GURL& secondary_gurl = secondary_url; + for (const auto& rule : rules) { + if (rule.primary_pattern.Matches(primary_url) && + rule.secondary_pattern.Matches(secondary_gurl)) { + return rule.GetContentSetting(); + } + } + NOTREACHED(); + return CONTENT_SETTING_DEFAULT; +} + +bool IsScriptDisabledForPreview(const content::RenderFrame* render_frame) { + return render_frame->GetPreviewsState() & content::NOSCRIPT_ON; +} + bool ContentSettingsObserver::AllowScript(bool enabled_per_settings) { - if (IsWhitelistedForContentSettings()) + if (!enabled_per_settings) + return false; + if (IsScriptDisabledForPreview(render_frame())) + return false; + if (is_interstitial_page_) return true; - WebFrame* frame = render_frame()->GetWebFrame(); - std::map::const_iterator it = - cached_script_permissions_.find(frame); + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + const auto it = cached_script_permissions_.find(frame); if (it != cached_script_permissions_.end()) return it->second; - bool allow = enabled_per_settings; - if (content_settings_manager_->content_settings()) { - allow = - content_settings_manager_->GetSetting( - ContentSettingsManager::GetOriginOrURL(frame), - GURL(), - "javascript", - allow) != CONTENT_SETTING_BLOCK; + // Evaluate the content setting rules before + // IsWhitelistedForContentSettings(); if there is only the default rule + // allowing all scripts, it's quicker this way. + bool allow = true; + if (content_setting_rules_) { + ContentSetting setting = GetContentSettingFromRules( + content_setting_rules_->script_rules, frame, + url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL()); + allow = setting != CONTENT_SETTING_BLOCK; } + allow = allow || IsWhitelistedForContentSettings(); cached_script_permissions_[frame] = allow; - if (!allow) - DidBlockContentType("javascript"); return allow; } diff --git a/chromium_src/chrome/renderer/content_settings_observer.h b/chromium_src/chrome/renderer/content_settings_observer.h index 7cbfc24493..119e435427 100644 --- a/chromium_src/chrome/renderer/content_settings_observer.h +++ b/chromium_src/chrome/renderer/content_settings_observer.h @@ -13,7 +13,7 @@ #include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_observer_tracker.h" #include "services/service_manager/public/cpp/binder_registry.h" -#include "third_party/WebKit/public/platform/WebContentSettingsClient.h" +#include "third_party/blink/public/platform/web_content_settings_client.h" class GURL; diff --git a/common.gypi b/common.gypi index 2d1e2053f1..b445ffe6d2 100644 --- a/common.gypi +++ b/common.gypi @@ -313,19 +313,19 @@ # incorrect results when passed to pkg-config 'conditions': [ ['target_arch=="arm"', { - 'sysroot%': 'SetDelegate( resource_dispatcher_host_delegate_.get()); } diff --git a/muon/browser/muon_browser_process_impl.h b/muon/browser/muon_browser_process_impl.h index 8ede9598ef..3e7cba17df 100644 --- a/muon/browser/muon_browser_process_impl.h +++ b/muon/browser/muon_browser_process_impl.h @@ -16,8 +16,8 @@ class App; } } // namespace atom -namespace atom { -class AtomResourceDispatcherHostDelegate; +namespace content { +class ResourceDispatcherHostDelegate; } // Real implementation of BrowserProcess that creates and returns the services. @@ -36,7 +36,7 @@ class MuonBrowserProcessImpl : public BrowserProcessImpl { private: atom::api::App* app_; // not owned - std::unique_ptr + std::unique_ptr resource_dispatcher_host_delegate_; std::unique_ptr diff --git a/package-lock.json b/package-lock.json index c3d3a8212b..f1814316da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "6.0.10+66.0.3359.170", + "version": "7.0.6+67.0.3396.71", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7f32261588..b9356297a7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "electron", - "version": "6.0.11+66.0.3359.170", + "version": "7.0.7+67.0.3396.87", "devDependencies": { "asar": "^0.11.0", "electabul": "~0.0.4", diff --git a/patches/master_patch.patch b/patches/master_patch.patch index 42c69db8fc..ce53752a2c 100644 --- a/patches/master_patch.patch +++ b/patches/master_patch.patch @@ -1,5 +1,5 @@ diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h -index e63c406810b4deca5a9770fd196bd50f3a3a4070..14927de39b63a16e28f7c53d64396b2e97124fc9 100644 +index e3d70e31083e2f2e137bcfbda271d2ab4fe2ed57..cdfa701757bb4e8a52df75bbf4c953a6ba39800e 100644 --- a/base/threading/thread_restrictions.h +++ b/base/threading/thread_restrictions.h @@ -34,6 +34,13 @@ class StatisticsProviderImpl; @@ -16,7 +16,7 @@ index e63c406810b4deca5a9770fd196bd50f3a3a4070..14927de39b63a16e28f7c53d64396b2e namespace content { class BrowserGpuChannelHostFactory; class BrowserGpuMemoryBufferManager; -@@ -430,6 +437,9 @@ class BASE_EXPORT ThreadRestrictions { +@@ -438,6 +445,9 @@ class BASE_EXPORT ThreadRestrictions { friend class ui::CommandBufferLocal; friend class ui::GpuState; @@ -27,7 +27,7 @@ index e63c406810b4deca5a9770fd196bd50f3a3a4070..14927de39b63a16e28f7c53d64396b2e // BEGIN USAGE THAT NEEDS TO BE FIXED. friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index 7d60dd920904d3f98573680e311096f0b9cb252e..e20be4554ef50dd52fa28e23d4de361fe2bb12f6 100644 +index 9e38ee0e592b64f2457dd48110aceafff95164cd..d3d67d38394c1234c1f3f93a76850165f4951ce2 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -152,6 +152,8 @@ declare_args() { @@ -39,10 +39,10 @@ index 7d60dd920904d3f98573680e311096f0b9cb252e..e20be4554ef50dd52fa28e23d4de361f } declare_args() { -@@ -535,6 +537,13 @@ default_compiler_configs = [ - "//build/config/coverage:default_coverage", +@@ -541,6 +543,14 @@ default_compiler_configs = [ "//build/config/sanitizers:default_sanitizer_flags", ] + +if (!muon_chromium_build) { + default_compiler_configs -= [ "//build/config/compiler:default_include_dirs" ] + default_compiler_configs += [ @@ -50,6 +50,7 @@ index 7d60dd920904d3f98573680e311096f0b9cb252e..e20be4554ef50dd52fa28e23d4de361f + "//build/config/compiler:default_include_dirs" + ] +} ++ if (is_win) { default_compiler_configs += [ "//build/config/win:default_crt", @@ -76,29 +77,8 @@ index 4bb4a043cbbcb562aed8926867660547cd7f018c..769bc73607b600d549b6185a37d6b0cc branding_path_component = "chromium" } +} -diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn -index 7fa01dcbe6daf97d1afea6141f34ecce02a9837b..14649ee85015cd199403f4ecabc688f018a0032d 100644 ---- a/build/toolchain/mac/BUILD.gn -+++ b/build/toolchain/mac/BUILD.gn -@@ -234,13 +234,15 @@ template("mac_toolchain") { - } - - tool("alink") { -+ rspfile = "{{output}}.rsp" - script = - rebase_path("//build/toolchain/mac/filter_libtool.py", root_build_dir) -- command = "$env_wrapper rm -f {{output}} && TOOL_VERSION=${tool_versions.filter_libtool} python $script libtool -static {{arflags}} -o {{output}} {{inputs}}" -+ command = "$env_wrapper rm -f {{output}} && TOOL_VERSION=${tool_versions.filter_libtool} python $script libtool -static {{arflags}} -o {{output}} -filelist \"$rspfile\"" - description = "LIBTOOL-STATIC {{output}}" - outputs = [ - "{{output_dir}}/{{target_output_name}}{{output_extension}}", - ] -+ rspfile_content = "{{inputs_newline}}" - default_output_dir = "{{target_out_dir}}" - default_output_extension = ".a" - output_prefix = "lib" diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn -index 53f767a0bddb274ad6b46098d45c703914f712f6..5b48281c1d944763053f237e618bf688778e269b 100644 +index f8eb453e400fd645a48f7d1ca2f92cdb2213ffd2..c4a63e44099cf1baa4f574cd29c126f01936a0d5 100644 --- a/build/toolchain/win/BUILD.gn +++ b/build/toolchain/win/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/clang/clang.gni") @@ -119,10 +99,10 @@ index 53f767a0bddb274ad6b46098d45c703914f712f6..5b48281c1d944763053f237e618bf688 goma_prefix = "" } diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index fbcf20cd0411d39a99642acf2674bf7de2804608..6b07c8f2e0827d17b97aa1cfeb24d7b7d513e539 100644 +index 4304cc82494f57b7bbc4d1f3dff0fab96e30aef3..77130b344ba1e03e34e5faa752cd2590b8797869 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -38,6 +38,11 @@ if (is_android) { +@@ -40,6 +40,11 @@ if (is_android) { import("//build/util/version.gni") import("//media/cdm/library_cdm/cdm_paths.gni") import("//third_party/icu/config.gni") @@ -135,12 +115,12 @@ index fbcf20cd0411d39a99642acf2674bf7de2804608..6b07c8f2e0827d17b97aa1cfeb24d7b7 assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome") diff --git a/chrome/browser/chrome_content_browser_manifest_overlay.json b/chrome/browser/chrome_content_browser_manifest_overlay.json -index b016c0546d9af6301427a926a050da3bb0c15e59..bfa5786a2dd7376ecfff98a80e5a38359db79668 100644 +index cd82cd63bfff860abdd765ad6e35355caffc3a43..9d24c0c3a7b315c10b519e0ae5b0eea04a880ddc 100644 --- a/chrome/browser/chrome_content_browser_manifest_overlay.json +++ b/chrome/browser/chrome_content_browser_manifest_overlay.json -@@ -13,7 +13,7 @@ +@@ -12,7 +12,7 @@ + "extensions::StashService", "metrics::mojom::CallStackProfileCollector", - "metrics::mojom::LeakDetector", "mojom::ModuleEventSink", - "rappor::mojom::RapporRecorder", +// "rappor::mojom::RapporRecorder", @@ -148,7 +128,7 @@ index b016c0546d9af6301427a926a050da3bb0c15e59..bfa5786a2dd7376ecfff98a80e5a3835 "translate::mojom::ContentTranslateDriver" ], diff --git a/chrome/browser/chrome_service.cc b/chrome/browser/chrome_service.cc -index 10faefae1df8921bcdf0f7a43b0b3a279c171880..270ebefdc5fd892ca4badbd2b8beb2998cfe0abb 100644 +index a6e8369996c9538a1969a8eef3091c00eecb5ec1..eff895a8593ad0edaaa6e38e1c6f013af5fb3c46 100644 --- a/chrome/browser/chrome_service.cc +++ b/chrome/browser/chrome_service.cc @@ -46,8 +46,10 @@ class ChromeService::IOThreadContext : public service_manager::Service { @@ -225,10 +205,10 @@ index 2592dea8c30aa5e7b9daf614a63fe964471bab7a..5fede5d8ee00b4b06d437b4272ec19a0 callback_fn.Run(updated_pref); } diff --git a/chrome/browser/password_manager/password_store_factory.cc b/chrome/browser/password_manager/password_store_factory.cc -index cb8bd43871271083038b0555340d4c328f9b8bae..1b442fbf4dfebfc709e90021bb1600a9fa80c67b 100644 +index b90b23305c0bedf47da5c8f5605377e3b8dfaa0d..fa0db0a824df3313be6ac2e4f14ebb26a8715057 100644 --- a/chrome/browser/password_manager/password_store_factory.cc +++ b/chrome/browser/password_manager/password_store_factory.cc -@@ -113,8 +113,10 @@ PasswordStoreFactory::PasswordStoreFactory() +@@ -112,8 +112,10 @@ PasswordStoreFactory::PasswordStoreFactory() #if defined(SYNC_PASSWORD_REUSE_DETECTION_ENABLED) // TODO(crbug.com/715987). Remove when PasswordReuseDetector is decoupled // from PasswordStore. @@ -240,8 +220,8 @@ index cb8bd43871271083038b0555340d4c328f9b8bae..1b442fbf4dfebfc709e90021bb1600a9 PasswordStoreFactory::~PasswordStoreFactory() {} @@ -264,12 +266,14 @@ PasswordStoreFactory::BuildServiceInstanceFor( - ps.get(), profile->GetPrefs(), - base::WrapRefCounted(profile->GetRequestContext())); + password_manager_util::CleanUserDataInBlacklistedCredentials( + ps.get(), profile->GetPrefs(), 60); +#if defined(MUON_CHROMIUM_BUILD) #if defined(OS_WIN) || defined(OS_MACOSX) || \ @@ -255,7 +235,7 @@ index cb8bd43871271083038b0555340d4c328f9b8bae..1b442fbf4dfebfc709e90021bb1600a9 return ps; diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index ba01494ae09d034d139c6fdfa03e9468dfad6829..0ce699084f61594bba83eee9cf8f1b4517d281be 100644 +index 9f0672828c18a8421e9f62a6d8a9bb252c9fb510..4cea961ac506c9eea9e7f88deb8c75ae48d1cbc3 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -73,13 +73,13 @@ using PrintSettingsCallback = @@ -391,10 +371,10 @@ index 30897fe6780343110f48a05b56827bd8476342b6..aef7d7b993743037776eccc62df09c92 + return false; } diff --git a/chrome/browser/renderer_host/chrome_extension_message_filter.h b/chrome/browser/renderer_host/chrome_extension_message_filter.h -index 663cda3f3413e5495f8ec77eaaf33c835cc00711..8c9b1fd5abe7fd3e17a3e98c479f056ccbe14a5b 100644 +index 9f0003bc2d80d7c76ab9dd17393d0188fe1ac6fd..88d75d4091fb3dc282998a5d44e63cbfc2f29d2f 100644 --- a/chrome/browser/renderer_host/chrome_extension_message_filter.h +++ b/chrome/browser/renderer_host/chrome_extension_message_filter.h -@@ -54,6 +54,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, +@@ -55,6 +55,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, const std::string& main_extension_id, const std::string& default_locale, IPC::Message* reply_msg); @@ -402,7 +382,7 @@ index 663cda3f3413e5495f8ec77eaaf33c835cc00711..8c9b1fd5abe7fd3e17a3e98c479f056c void OnAddAPIActionToExtensionActivityLog( const std::string& extension_id, const ExtensionHostMsg_APIActionOrEvent_Params& params); -@@ -66,6 +67,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, +@@ -67,6 +68,7 @@ class ChromeExtensionMessageFilter : public content::BrowserMessageFilter, void OnAddEventToExtensionActivityLog( const std::string& extension_id, const ExtensionHostMsg_APIActionOrEvent_Params& params); @@ -410,127 +390,100 @@ index 663cda3f3413e5495f8ec77eaaf33c835cc00711..8c9b1fd5abe7fd3e17a3e98c479f056c // content::NotificationObserver implementation. void Observe(int type, -diff --git a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc -index a5ea92f2878459b49f88d4895c7d18f2e157dd6c..9cffca0352713bce12b4035c02612cd7e2976aad 100644 ---- a/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc -+++ b/chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc -@@ -57,13 +57,13 @@ ChromeBrowserPepperHostFactory::CreateResourceHost( - return std::unique_ptr(new MessageFilterHost( - host_->GetPpapiHost(), instance, resource, pv_filter)); - } -- case PpapiHostMsg_OutputProtection_Create::ID: { -- scoped_refptr output_protection_filter( -- new PepperOutputProtectionMessageFilter(host_, instance)); -- return std::unique_ptr( -- new MessageFilterHost(host_->GetPpapiHost(), instance, resource, -- output_protection_filter)); -- } -+ // case PpapiHostMsg_OutputProtection_Create::ID: { -+ // scoped_refptr output_protection_filter( -+ // new PepperOutputProtectionMessageFilter(host_, instance)); -+ // return std::unique_ptr( -+ // new MessageFilterHost(host_->GetPpapiHost(), instance, resource, -+ // output_protection_filter)); -+ // } - } - } +diff --git a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc +index 1b5026face136534578062e4d3c9c0c955dadd20..8dabdbd4f67a0af777f7136963ef18eaf5283584 100644 +--- a/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc ++++ b/chrome/browser/resource_coordinator/tab_lifecycle_unit.cc +@@ -7,10 +7,12 @@ + #include "base/logging.h" + #include "base/metrics/histogram_macros.h" + #include "base/process/process_metrics.h" ++#include "chrome/browser/browser_process.h" + #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" + #include "chrome/browser/media/webrtc/media_stream_capture_indicator.h" + #include "chrome/browser/profiles/profile.h" + #include "chrome/browser/resource_coordinator/tab_lifecycle_observer.h" ++#include "chrome/browser/resource_coordinator/tab_manager.h" + #include "chrome/browser/resource_coordinator/time.h" + #include "chrome/browser/ui/tabs/tab_strip_model.h" + #include "content/public/browser/favicon_status.h" +@@ -228,7 +230,7 @@ bool TabLifecycleUnitSource::TabLifecycleUnit::Discard( + create_params.initially_hidden = + old_contents->GetVisibility() == content::Visibility::HIDDEN; + content::WebContents* const null_contents = +- content::WebContents::Create(create_params); ++ g_browser_process->GetTabManager()->CreateNullContents(create_params, old_contents); + // Copy over the state from the navigation controller to preserve the + // back/forward history and to continue to display the correct title/favicon. + // +@@ -279,7 +281,7 @@ bool TabLifecycleUnitSource::TabLifecycleUnit::Discard( + // TODO(jamescook): This breaks script connections with other tabs. Find a + // different approach that doesn't do that, perhaps based on + // RenderFrameProxyHosts. +- delete old_contents; ++ g_browser_process->GetTabManager()->DestroyOldContents(old_contents); + SetState(State::DISCARDED); + ++discard_count_; diff --git a/chrome/browser/resource_coordinator/tab_manager.cc b/chrome/browser/resource_coordinator/tab_manager.cc -index 7bcce4951f872e0c68f39abbebab736ccc54509f..0b55725bef29558e8a9f98069f99983a091f2daa 100644 +index 20126aa6e705c72a857e7d52744a33e123bd611e..7c137c593caca72da37186edb0b9aeb4560f1d03 100644 --- a/chrome/browser/resource_coordinator/tab_manager.cc +++ b/chrome/browser/resource_coordinator/tab_manager.cc -@@ -660,7 +660,8 @@ void TabManager::AddTabStats(const BrowserInfo& browser_info, - TabStripModel* tab_strip_model = browser_info.tab_strip_model; - for (int i = 0; i < tab_strip_model->count(); i++) { - WebContents* contents = tab_strip_model->GetWebContentsAt(i); -- if (!contents->IsCrashed()) { -+ // TODO(bridiver) - temporary workaround for pinned and unloaded tabs -+ if (contents && !contents->IsCrashed()) { - TabStats stats; - stats.is_app = browser_info.browser_is_app; - stats.is_internal_page = IsInternalPage(contents->GetLastCommittedURL()); -@@ -765,6 +766,17 @@ void TabManager::PurgeBackgroundedTabsIfNeeded() { +@@ -516,6 +516,17 @@ void TabManager::PurgeBackgroundedTabsIfNeeded() { } } +// MUON(bridiver): see tab_manager.h -+WebContents* TabManager::CreateNullContents( -+ TabStripModel* model, WebContents* old_contents) { -+ return WebContents::Create(WebContents::CreateParams(model->profile())); ++content::WebContents* TabManager::CreateNullContents( ++ const content::WebContents::CreateParams& params, content::WebContents* old_contents) { ++ return content::WebContents::Create(params); +} + +// MUON(bridiver): see tab_manager.h -+void TabManager::DestroyOldContents(WebContents* old_contents) { ++void TabManager::DestroyOldContents(content::WebContents* old_contents) { + delete old_contents; +} + - WebContents* TabManager::DiscardWebContentsAt(int index, - TabStripModel* model, - DiscardReason reason) { -@@ -780,8 +792,7 @@ WebContents* TabManager::DiscardWebContentsAt(int index, - "TabManager.Discarding.DiscardedTabHasBeforeUnloadHandler", - old_contents->NeedToFireBeforeUnload()); - -- WebContents* null_contents = -- WebContents::Create(WebContents::CreateParams(model->profile())); -+ WebContents* null_contents = CreateNullContents(model, old_contents); - // Copy over the state from the navigation controller to preserve the - // back/forward history and to continue to display the correct title/favicon. - // -@@ -841,7 +852,8 @@ WebContents* TabManager::DiscardWebContentsAt(int index, - // TODO(jamescook): This breaks script connections with other tabs. - // Find a different approach that doesn't do that, perhaps based on - // RenderFrameProxyHosts. -- delete old_contents; -+ // MUON(bridiver): see tab_manager.h -+ DestroyOldContents(old_contents); - - return null_contents; - } + void TabManager::PauseBackgroundTabOpeningIfNeeded() { + TRACE_EVENT_INSTANT0("navigation", + "TabManager::PauseBackgroundTabOpeningIfNeeded", diff --git a/chrome/browser/resource_coordinator/tab_manager.h b/chrome/browser/resource_coordinator/tab_manager.h -index 440fdf8df66efce1b68a0463189986a6a0b0353a..7cc8fb11ecb5e2caa67e4e92d6d4526edb2d2001 100644 +index 462ea07d0073906b1068316163b48ea1636488e3..b66ba1e93f1c7fcc86bd50bae2f261a1368c5a62 100644 --- a/chrome/browser/resource_coordinator/tab_manager.h +++ b/chrome/browser/resource_coordinator/tab_manager.h -@@ -93,6 +93,11 @@ class TabManager : public TabStripModelObserver, public BrowserListObserver { +@@ -30,6 +30,7 @@ + #include "chrome/browser/ui/browser_tab_strip_tracker.h" + #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" + #include "content/public/browser/navigation_throttle.h" ++#include "content/public/browser/web_contents.h" + #include "ui/gfx/native_widget_types.h" + + class GURL; +@@ -89,6 +90,11 @@ class TabManager : public LifecycleUnitObserver, TabManager(); ~TabManager() override; + // MUON(bridiver): override to create/destroy guests webcontents + virtual content::WebContents* CreateNullContents( -+ TabStripModel* model, content::WebContents* old_contents); ++ const content::WebContents::CreateParams& params, content::WebContents* old_contents); + virtual void DestroyOldContents(content::WebContents* old_contents); + - // Number of discard events since Chrome started. - int discard_count() const { return discard_count_; } - -@@ -300,6 +305,8 @@ class TabManager : public TabStripModelObserver, public BrowserListObserver { - // min time to purge times this value. - const int kDefaultMinMaxTimeToPurgeRatio = 4; + // Start/Stop the Tab Manager. + void Start(); + void Stop(); +@@ -202,6 +208,7 @@ class TabManager : public LifecycleUnitObserver, + const TabLoadTracker& tab_load_tracker() const { return tab_load_tracker_; } + private: + friend class GuestTabManager; -+ - // Finds TabStripModel which has a WebContents whose id is the given - // |tab_id|, and returns the WebContents index and the TabStripModel. - int FindTabStripModelById(int32_t tab_id, TabStripModel** model) const; -diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc -index 83f3da7fdd43a0534e49bc75b4744222e17f164d..65c416743295548667c1d2c33fe895231f8c3e0b 100644 ---- a/chrome/browser/safe_browsing/ui_manager.cc -+++ b/chrome/browser/safe_browsing/ui_manager.cc -@@ -100,7 +100,9 @@ void SafeBrowsingUIManager::CreateAndSendHitReport( - - void SafeBrowsingUIManager::ShowBlockingPageForResource( - const UnsafeResource& resource) { -+#if defined(MUON_CHROMIUM_BUILD) - SafeBrowsingBlockingPage::ShowBlockingPage(this, resource); -+#endif - } + friend class TabManagerStatsCollectorTest; - // static + FRIEND_TEST_ALL_PREFIXES(TabManagerTest, PurgeBackgroundRenderer); diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn -index 7ca361112ae6553b5d55c0118868b6592466e466..b3cbde0364a0de8e75fe06fdf86a72321078145a 100644 +index eb650f8aa7009371e31077e0f4a754807efd7613..a2f4a1345789a15ff70f34f7a405ed8310dc4685 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn -@@ -503,6 +503,12 @@ static_library("common") { +@@ -494,6 +494,12 @@ static_library("common") { ] public_deps += [ "//chrome/common:version_header" ] } @@ -721,7 +674,7 @@ index c172f8a5bc534465ff4d063a52f9bb510b7e36af..437026ae26eec5dce80edb73929a0fbc #if defined(OS_MACOSX) TYPE_SAFARI = 3, diff --git a/chrome/common/importer/profile_import.mojom b/chrome/common/importer/profile_import.mojom -index ce703fd88ae73abd0d1cb91247adbc802d43993a..f39b4ee9a95b435e7ec4b5bb2eecb4e94c4a2139 100644 +index e37446ad30a9c86b480ec389ff7aab0cd12269f8..e4ccc03d7d7f5fd868e6e9ccd60d3aabe65420f1 100644 --- a/chrome/common/importer/profile_import.mojom +++ b/chrome/common/importer/profile_import.mojom @@ -17,6 +17,9 @@ struct ImportedBookmarkEntry; @@ -801,10 +754,10 @@ index efd272e706ba56b748e4b76b96d76cbd03aa07ac..051851c40e6b721035c6b57ed5b35962 @"Google Chrome Canary": @"Google Chrome", }; diff --git a/chrome/common/media/cdm_host_file_path.cc b/chrome/common/media/cdm_host_file_path.cc -index 7d8030b41998f5075c39554763edca87b8120230..29fdd5664b5231647ee34c7331ef864682e97187 100644 +index f0621d868dfc6cfc5a8738dbf61679b315107b01..7567113a190be2bfe6b40b6d6de54c1bef5b58aa 100644 --- a/chrome/common/media/cdm_host_file_path.cc +++ b/chrome/common/media/cdm_host_file_path.cc -@@ -18,7 +18,7 @@ +@@ -17,7 +17,7 @@ #include "chrome/common/chrome_constants.h" #endif @@ -908,10 +861,10 @@ index d7734d8883c3e438ece3d509b7bb331931831178..6e6cdda19c271de7e5429db02b3e17b2 } # Note: Update the test expectations in GetBaseMessageIdForMode.GoogleStringIds diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn -index 1ec9a536a3784808f4bdb948c85c6a169088c347..c28e2377769fd916e1b51b01426d5651dc80ac81 100644 +index 0903a45209399ebe0de9eb0397d0fbd601faa2b1..3f4d4100bd23b7920e9f97e35ac29ae92aa0d69a 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn -@@ -414,6 +414,19 @@ static_library("renderer") { +@@ -415,6 +415,19 @@ static_library("renderer") { "searchbox/searchbox_extension.h", ] } @@ -932,10 +885,10 @@ index 1ec9a536a3784808f4bdb948c85c6a169088c347..c28e2377769fd916e1b51b01426d5651 static_library("test_support") { diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc -index 910bf38b9c46f42edc29693af2df93b6878c9fcf..597104088e0b2062a4357365623e71644f6fb1c2 100644 +index 1cd2e64b9eb9858e40f7a5914edfd162fc4dcb58..759bfb6a90817f5d235aa449c4b881b47b0a1310 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc -@@ -1510,6 +1510,7 @@ ChromeContentRendererClient::CreateBrowserPluginDelegate( +@@ -1508,6 +1508,7 @@ ChromeContentRendererClient::CreateBrowserPluginDelegate( #endif } @@ -943,7 +896,7 @@ index 910bf38b9c46f42edc29693af2df93b6878c9fcf..597104088e0b2062a4357365623e7164 void ChromeContentRendererClient::RecordRappor(const std::string& metric, const std::string& sample) { if (!rappor_recorder_) { -@@ -1527,6 +1528,7 @@ void ChromeContentRendererClient::RecordRapporURL(const std::string& metric, +@@ -1525,6 +1526,7 @@ void ChromeContentRendererClient::RecordRapporURL(const std::string& metric, } rappor_recorder_->RecordRapporURL(metric, url); } @@ -952,11 +905,11 @@ index 910bf38b9c46f42edc29693af2df93b6878c9fcf..597104088e0b2062a4357365623e7164 void ChromeContentRendererClient::AddImageContextMenuProperties( const WebURLResponse& response, diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h -index a7d4d8906d5d7c3a9fdbb2939a2008c8e3f7752d..5041ab3c30f1b0679413fa382b7d6503c743d951 100644 +index 5f9de171e4ec238bc8fef097e2b2ed896f3f72a8..f76f92ae6ff554e3f7ed780c8154b97ec156b8fb 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h -@@ -193,9 +193,9 @@ class ChromeContentRendererClient - content::RenderFrame* render_frame, +@@ -198,9 +198,9 @@ class ChromeContentRendererClient + const content::WebPluginInfo& info, const std::string& mime_type, const GURL& original_url) override; - void RecordRappor(const std::string& metric, @@ -969,10 +922,10 @@ index a7d4d8906d5d7c3a9fdbb2939a2008c8e3f7752d..5041ab3c30f1b0679413fa382b7d6503 const blink::WebURLResponse& response, bool is_image_in_context_a_placeholder_image, diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -index 611d2b865e6c0ee90bedca8395c1a884fd5e5698..babf86d7d83a8692e0e0549f4c18eb7f5fb04894 100644 +index d63e90b6c5079ab3237c4bad3d5e63ce2f99c657..a11bccc62f9ed847013903a48c826bd8737b5604 100644 --- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc +++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc -@@ -100,11 +100,11 @@ ChromeRendererPepperHostFactory::CreateResourceHost( +@@ -99,11 +99,11 @@ ChromeRendererPepperHostFactory::CreateResourceHost( // time of the corresponding instance's method calls. Currently these // interfaces are available only for whitelisted apps which may not have // access to the other private interfaces. @@ -990,10 +943,10 @@ index 611d2b865e6c0ee90bedca8395c1a884fd5e5698..babf86d7d83a8692e0e0549f4c18eb7f return nullptr; } diff --git a/chrome/utility/importer/external_process_importer_bridge.h b/chrome/utility/importer/external_process_importer_bridge.h -index 7e05c4e04f8e61b418d373a73bd8901347df4c76..e7e6d9fa5e0d54c7755fe3a38eca6f70a902411c 100644 +index d137743e4b8f522340126a31563133d8b005bcf6..4f40e98168ab1e4f4f95c82018cdb8fdaddc414c 100644 --- a/chrome/utility/importer/external_process_importer_bridge.h +++ b/chrome/utility/importer/external_process_importer_bridge.h -@@ -86,6 +86,7 @@ class ExternalProcessImporterBridge : public ImporterBridge { +@@ -83,6 +83,7 @@ class ExternalProcessImporterBridge : public ImporterBridge { private: ~ExternalProcessImporterBridge() override; @@ -1002,10 +955,10 @@ index 7e05c4e04f8e61b418d373a73bd8901347df4c76..e7e6d9fa5e0d54c7755fe3a38eca6f70 // Holds strings needed by the external importer because the resource // bundle isn't available to the external process. diff --git a/chrome/utility/importer/firefox_importer.cc b/chrome/utility/importer/firefox_importer.cc -index 528b73ffb2a3c667f8cfd7ef01b65b34236765a3..7b1c9b38ac9bf2bb8dae76afd50de7ef10b0148d 100644 +index 21442ff4561a43c96b2e34dbadd7af30fb321b07..b0cfd80e7befd9c7e6c55b520ae1b632707c3de9 100644 --- a/chrome/utility/importer/firefox_importer.cc +++ b/chrome/utility/importer/firefox_importer.cc -@@ -161,14 +161,12 @@ void FirefoxImporter::StartImport(const importer::SourceProfile& source_profile, +@@ -160,14 +160,12 @@ void FirefoxImporter::StartImport(const importer::SourceProfile& source_profile, if ((items & importer::PASSWORDS) && !cancelled()) { bridge_->NotifyItemStarted(importer::PASSWORDS); ImportPasswords(); @@ -1035,7 +988,7 @@ index 8c6dafc83d25a697a6ca235faf4e0dc386a8828b..f6465167a32f27c496caaa4015a9cd10 FRIEND_TEST_ALL_PREFIXES(FirefoxImporterTest, ImportBookmarksV25); void ImportBookmarks(); diff --git a/chrome/utility/importer/profile_import_impl.h b/chrome/utility/importer/profile_import_impl.h -index e37c604f04ca527f4949442ada1872bd48697cf4..e990a6ebe2e1fa1ef7c4c88e7bf4829373653651 100644 +index effad1751c42f70e2c657204345777f58b038a4e..50e0bd6b27cf120435f8d5e40107fa95393e2154 100644 --- a/chrome/utility/importer/profile_import_impl.h +++ b/chrome/utility/importer/profile_import_impl.h @@ -34,6 +34,7 @@ class ProfileImportImpl : public chrome::mojom::ProfileImport { @@ -1059,10 +1012,10 @@ index c4c5f83886574956b3abdfa77a07500a2ee6de9e..edbfde3c41a1e38bcdedd09aaa41d8a1 std::unique_ptr ref_factory_; service_manager::BinderRegistry registry_; diff --git a/components/autofill/core/browser/credit_card_save_manager.cc b/components/autofill/core/browser/credit_card_save_manager.cc -index e3935b3c4bef67e779d7463f7745100f3f341579..dcc57d6fe5f8447a7d755174945beea1f43acdb6 100644 +index 140ca98f97b60dcc9d147458efdbc13ad53436d2..1cd74f11035327a376fa071b03007588ac35c99a 100644 --- a/components/autofill/core/browser/credit_card_save_manager.cc +++ b/components/autofill/core/browser/credit_card_save_manager.cc -@@ -204,12 +204,17 @@ void CreditCardSaveManager::AttemptToOfferCardUploadSave( +@@ -210,12 +210,17 @@ void CreditCardSaveManager::AttemptToOfferCardUploadSave( } bool CreditCardSaveManager::IsCreditCardUploadEnabled() { @@ -1081,7 +1034,7 @@ index e3935b3c4bef67e779d7463f7745100f3f341579..dcc57d6fe5f8447a7d755174945beea1 void CreditCardSaveManager::OnDidUploadCard( diff --git a/components/crash/content/app/breakpad_linux.cc b/components/crash/content/app/breakpad_linux.cc -index 460f7ac4defaca672afc97884c5f35e58f21836e..a440df43d423ca414053a7b2167258c93e89c223 100644 +index 1dde47fb6bba92deb9ef49f72b0410412ab8198f..31e8cda19cbc690e904ee277d42e7312f6a99762 100644 --- a/components/crash/content/app/breakpad_linux.cc +++ b/components/crash/content/app/breakpad_linux.cc @@ -86,8 +86,10 @@ namespace breakpad { @@ -1096,7 +1049,7 @@ index 460f7ac4defaca672afc97884c5f35e58f21836e..a440df43d423ca414053a7b2167258c9 #endif bool g_is_crash_reporter_enabled = false; -@@ -1346,6 +1348,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, +@@ -1343,6 +1345,7 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info, header_content_type, post_file, kUploadURL, @@ -1104,7 +1057,7 @@ index 460f7ac4defaca672afc97884c5f35e58f21836e..a440df43d423ca414053a7b2167258c9 "--timeout=10", // Set a timeout so we don't hang forever. "--tries=1", // Don't retry if the upload fails. "-O", // Output reply to the file descriptor path. -@@ -1888,6 +1891,7 @@ void HandleCrashDump(const BreakpadInfo& info) { +@@ -1898,6 +1901,7 @@ void HandleCrashDump(const BreakpadInfo& info) { const size_t kCrashIdLength = 16; char id_buf[kCrashIdLength + 1]; @@ -1113,10 +1066,10 @@ index 460f7ac4defaca672afc97884c5f35e58f21836e..a440df43d423ca414053a7b2167258c9 WaitForCrashReportUploadProcess(fds[0], kCrashIdLength, id_buf); HandleCrashReportId(id_buf, bytes_read, kCrashIdLength); diff --git a/components/crash/content/app/crashpad_mac.mm b/components/crash/content/app/crashpad_mac.mm -index 6508c2a067609897ea14b96b3852fa3bcf31cc65..27c0545722cf50d2a0a46f36d5e2b9f35d52406f 100644 +index eb82f44053cec67f7e98c798d8e1e58228aa7fe6..5ab4abe28b41f5af346e263f0a4573b79dd4c40c 100644 --- a/components/crash/content/app/crashpad_mac.mm +++ b/components/crash/content/app/crashpad_mac.mm -@@ -54,6 +54,8 @@ base::FilePath PlatformCrashpadInitialization( +@@ -55,6 +55,8 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client, // Only allow the possibility of report upload in official builds. This // crash server won't have symbols for any other build types. std::string url = "https://clients2.google.com/cr/report"; @@ -1126,10 +1079,10 @@ index 6508c2a067609897ea14b96b3852fa3bcf31cc65..27c0545722cf50d2a0a46f36d5e2b9f3 std::string url; #endif diff --git a/components/crash/content/app/crashpad_win.cc b/components/crash/content/app/crashpad_win.cc -index a5d1afc409f4186f2cb93a40c30fa8329e1622fa..e20d203e8161cd40d2a50e0201ab95d367cbba6b 100644 +index 8b0edef1b59403f819e3c1b4d3b378f849c68f26..637e32fd295b6bd513b33899414f36c2dac22464 100644 --- a/components/crash/content/app/crashpad_win.cc +++ b/components/crash/content/app/crashpad_win.cc -@@ -82,6 +82,8 @@ base::FilePath PlatformCrashpadInitialization( +@@ -82,6 +82,8 @@ base::FilePath PlatformCrashpadInitialization(bool initial_client, #if defined(GOOGLE_CHROME_BUILD) std::string url = "https://clients2.google.com/cr/report"; @@ -1155,10 +1108,10 @@ index dbd2ae8df59756c61d28091cff70098c897db8f4..84fbc695c817c87deb902d8b6f69d3f1 link.href = href; link.target = '_blank'; diff --git a/components/guest_view/browser/guest_view_base.cc b/components/guest_view/browser/guest_view_base.cc -index 865dec78f433ae6e526b10a6e0fce4631a944342..e8d0153df7f48135f77c6783ecf8e423d04822b3 100644 +index 8f31866db03f908536dce6ca8e41b24ef40c21c7..3df51bf2e70929f065bda77d5dcd84fa354092a8 100644 --- a/components/guest_view/browser/guest_view_base.cc +++ b/components/guest_view/browser/guest_view_base.cc -@@ -416,8 +416,10 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) { +@@ -419,8 +419,10 @@ void GuestViewBase::DidAttach(int guest_proxy_routing_id) { SetUpSizing(*attach_params()); @@ -1169,7 +1122,7 @@ index 865dec78f433ae6e526b10a6e0fce4631a944342..e8d0153df7f48135f77c6783ecf8e423 // Give the derived class an opportunity to perform some actions. DidAttachToEmbedder(); -@@ -437,8 +439,12 @@ void GuestViewBase::DidDetach() { +@@ -440,8 +442,12 @@ void GuestViewBase::DidDetach() { owner_web_contents()->GetRenderViewHost()->Send( new GuestViewMsg_GuestDetached(element_instance_id_)); element_instance_id_ = kInstanceIDNone; @@ -1307,10 +1260,10 @@ index bd0ba311df28f87bf464175e5b2eb3e926c3fa83..e6c06ede9c5e77eb0769fc308388a117 rev_checking_required_local_anchors_.GetValue(); config->sha1_local_anchors_enabled = sha1_local_anchors_enabled_.GetValue(); diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc -index 00864253f7c97b98d1e66eb67e717588523559a1..847d20b9a6eefbd50616e8d746bef19bb025cbd1 100644 +index d1e6e7d28d46a4543079482d0eab6e6b9a305d70..957c5545b9fc127a5d8b6ffdab5cb1dc444b2782 100644 --- a/content/app/content_main_runner.cc +++ b/content/app/content_main_runner.cc -@@ -627,7 +627,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { +@@ -836,7 +836,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { InitializeV8IfNeeded(command_line, process_type); @@ -1319,7 +1272,7 @@ index 00864253f7c97b98d1e66eb67e717588523559a1..847d20b9a6eefbd50616e8d746bef19b #if defined(OS_WIN) bool should_enable_stack_dump = !process_type.empty(); #else -@@ -643,7 +643,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { +@@ -852,7 +852,7 @@ class ContentMainRunnerImpl : public ContentMainRunner { service_manager::switches::kDisableInProcessStackTraces)) { base::debug::EnableInProcessStackDumping(); } @@ -1329,10 +1282,10 @@ index 00864253f7c97b98d1e66eb67e717588523559a1..847d20b9a6eefbd50616e8d746bef19b if (delegate_) delegate_->PreSandboxStartup(); diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc -index 3e1786aa6901be8316e7db490e839a27fb138260..b2cdb1950d5328a82a8690b1f4d01d91a4327477 100644 +index 15994d5dada4e7092260ef57ef458157ec2e1103..b233051fb79df27fb22a605e97d56de8e5dcf802 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc -@@ -850,6 +850,8 @@ void BrowserPluginGuest::OnDetach(int browser_plugin_instance_id) { +@@ -843,6 +843,8 @@ void BrowserPluginGuest::OnDetach(int browser_plugin_instance_id) { } delegate_->DidDetach(); @@ -1365,10 +1318,10 @@ index b1d214c35f075d16acfcd71576842e6b751d0697..8e9fb9fc6f5d27a106b13aad0412fc84 FrameTreeNode* node = static_cast(from_rfh)->frame_tree_node(); diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc -index b3653373a51f62844978f96abc5d358cf32e35d9..f2ab809102b4805e0ed3257010e522882e5ba94b 100644 +index 80fd7cf8957865e62186f394a318f912c6da4e20..a189c82b5a2d6ca6fdfb38c6eadffebd518999ea 100644 --- a/content/browser/frame_host/render_frame_message_filter.cc +++ b/content/browser/frame_host/render_frame_message_filter.cc -@@ -578,7 +578,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( +@@ -584,7 +584,7 @@ void RenderFrameMessageFilter::GetPluginsCallback( PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); std::vector plugins; @@ -1377,11 +1330,30 @@ index b3653373a51f62844978f96abc5d358cf32e35d9..f2ab809102b4805e0ed3257010e52288 int routing_id = MSG_ROUTING_NONE; // In this loop, copy the WebPluginInfo (and do not use a reference) because // the filter might mutate it. +diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc +index 839017d8feedabd9b558f0d90bb5374ba0d50306..5c95d66f3f4c6715e220e3d8b93d2e8b0a5dbc6d 100644 +--- a/content/browser/frame_host/render_widget_host_view_guest.cc ++++ b/content/browser/frame_host/render_widget_host_view_guest.cc +@@ -574,7 +574,14 @@ void RenderWidgetHostViewGuest::ShowDefinitionForSelection() { + // overlay (it will open Dictionary.app), so the target NSView need not be + // specified. + // https://crbug.com/152438 ++#if defined(MUON_CHROMIUM_BUILD) + platform_view_->ShowDefinitionForSelection(); ++#else ++ if (!guest_) ++ return; ++ RenderWidgetHostView* rwhv = guest_->GetOwnerRenderWidgetHostView(); ++ platform_view_->ShowDefinitionForSelection(rwhv); ++#endif + } + + void RenderWidgetHostViewGuest::SpeakSelection() { diff --git a/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm b/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm -index 36c25c462ad15a7c023f118879aaba556381da66..c0aff85c5d3daa62c3f3f8162d43d06d6fe6dbf2 100644 +index 71b3c5906b61728dfad31bd743fb9f9c6c214c68..66b6951c21a06c2313ac5e7080741b9782139262 100644 --- a/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm +++ b/content/browser/renderer_host/input/synthetic_gesture_target_mac.mm -@@ -22,7 +22,7 @@ +@@ -23,7 +23,7 @@ // Filled with default values. @property(readonly) CGFloat deltaX; @property(readonly) CGFloat deltaY; @@ -1390,11 +1362,101 @@ index 36c25c462ad15a7c023f118879aaba556381da66..c0aff85c5d3daa62c3f3f8162d43d06d @property(readonly) NSTimeInterval timestamp; @end +diff --git a/content/browser/renderer_host/render_widget_host_ns_view_bridge.h b/content/browser/renderer_host/render_widget_host_ns_view_bridge.h +index e0ffad96974e38133117f809f3f80b4d94f2e928..094491fc8132ceabefad99822337b0a0279bbc10 100644 +--- a/content/browser/renderer_host/render_widget_host_ns_view_bridge.h ++++ b/content/browser/renderer_host/render_widget_host_ns_view_bridge.h +@@ -23,6 +23,7 @@ class Rect; + + namespace content { + ++class RenderWidgetHostView; + class RenderWidgetHostNSViewClient; + class WebCursor; + +@@ -92,6 +93,10 @@ class RenderWidgetHostNSViewBridge { + const mac::AttributedStringCoder::EncodedString& encoded_string, + gfx::Point baseline_point) = 0; + ++#if !defined(MUON_CHROMIUM_BUILD) ++ virtual void SetTargetView(RenderWidgetHostView* target_view) = 0; ++#endif ++ + private: + DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridge); + }; +diff --git a/content/browser/renderer_host/render_widget_host_ns_view_bridge.mm b/content/browser/renderer_host/render_widget_host_ns_view_bridge.mm +index ce3cc68af90d5b2d8be070e1a4eed3352ed50bb6..46461e13b8a26012da7a90289561ae31bfd32c55 100644 +--- a/content/browser/renderer_host/render_widget_host_ns_view_bridge.mm ++++ b/content/browser/renderer_host/render_widget_host_ns_view_bridge.mm +@@ -11,6 +11,9 @@ + #include "base/strings/sys_string_conversions.h" + #import "content/browser/renderer_host/popup_window_mac.h" + #import "content/browser/renderer_host/render_widget_host_view_cocoa.h" ++#if !defined(MUON_CHROMIUM_BUILD) ++#include "content/browser/renderer_host/render_widget_host_view_mac.h" ++#endif + #include "content/common/cursors/webcursor.h" + #import "skia/ext/skia_utils_mac.h" + #import "ui/base/cocoa/animation_utils.h" +@@ -50,6 +53,11 @@ class RenderWidgetHostViewNSViewBridgeLocal + void DisplayCursor(const WebCursor& cursor) override; + void SetCursorLocked(bool locked) override; + void ShowDictionaryOverlayForSelection() override; ++#if !defined(MUON_CHROMIUM_BUILD) ++ void ShowDictionaryOverlayForSelection(RenderWidgetHostView* target_view); ++ void SetTargetView(RenderWidgetHostView* target_view) override { ++ target_view_ = static_cast(target_view); }; ++#endif + void ShowDictionaryOverlay( + const mac::AttributedStringCoder::EncodedString& encoded_string, + gfx::Point baseline_point) override; +@@ -78,6 +86,10 @@ class RenderWidgetHostViewNSViewBridgeLocal + // Cached copy of the tooltip text, to avoid redundant calls. + base::string16 tooltip_text_; + ++#if !defined(MUON_CHROMIUM_BUILD) ++ RenderWidgetHostViewMac* target_view_; ++#endif ++ + DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewNSViewBridgeLocal); + }; + +@@ -90,6 +102,9 @@ RenderWidgetHostViewNSViewBridgeLocal::RenderWidgetHostViewNSViewBridgeLocal( + background_layer_.reset([[CALayer alloc] init]); + [cocoa_view_ setLayer:background_layer_]; + [cocoa_view_ setWantsLayer:YES]; ++#if !defined(MUON_CHROMIUM_BUILD) ++ target_view_ = NULL; ++#endif + } + + RenderWidgetHostViewNSViewBridgeLocal:: +@@ -268,10 +283,17 @@ void RenderWidgetHostViewNSViewBridgeLocal::ShowDictionaryOverlay( + mac::AttributedStringCoder::Decode(&encoded_string); + if ([string length] == 0) + return; ++ NSView* view = cocoa_view_; ++#if !defined(MUON_CHROMIUM_BUILD) ++ if (target_view_) { ++ view = target_view_->cocoa_view(); ++ } ++#endif ++ + NSPoint flipped_baseline_point = { +- baseline_point.x(), [cocoa_view_ frame].size.height - baseline_point.y(), ++ baseline_point.x(), [view frame].size.height - baseline_point.y(), + }; +- [cocoa_view_ showDefinitionForAttributedString:string ++ [view showDefinitionForAttributedString:string + atPoint:flipped_baseline_point]; + } + diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index 00bcfa03587014930c3974d8c42544b7cfe175a6..3a406ab6418ee3e2c8e05ff413a4cde652422717 100644 +index ebf2d257e64fe80e5f95dd236e8a848efe36e721..2c60d9a60f3dc6efb55bc215a722f5baad0f4ecd 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -1670,8 +1670,23 @@ bool RenderWidgetHostViewAura::TransformPointToLocalCoordSpace( +@@ -1610,8 +1610,23 @@ bool RenderWidgetHostViewAura::TransformPointToLocalCoordSpace( !delegated_frame_host_->TransformPointToLocalCoordSpace( point_in_pixels, original_surface, transformed_point)) return false; @@ -1420,11 +1482,11 @@ index 00bcfa03587014930c3974d8c42544b7cfe175a6..3a406ab6418ee3e2c8e05ff413a4cde6 return true; } -diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 6e947778990cd828f0124b0f70ba9fc77a687e62..04c6e680085162264c6b34a292ae8ebf0524b519 100644 ---- a/content/browser/renderer_host/render_widget_host_view_mac.mm -+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm -@@ -137,6 +137,12 @@ RenderWidgetHostView* GetRenderWidgetHostViewToUse( +diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm +index 8ee84cdafbde9114cf6ef5036b214f81184fdc44..1bd0b9bf90bee8ee0ca586a477985025fa420fb1 100644 +--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm ++++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm +@@ -178,6 +178,12 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -1437,18 +1499,7 @@ index 6e947778990cd828f0124b0f70ba9fc77a687e62..04c6e680085162264c6b34a292ae8ebf // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -1637,6 +1643,10 @@ void RenderWidgetHostViewMac::SetActive(bool active) { - if (render_widget_host_) { - render_widget_host_->SetActive(active); - if (active) { -+ // RenderWidgetHostViewGuest doesn't send Show/Hide to the platform_view so -+ // make sure the browser compositor is activated for guest views -+ // when the host is initially hidden -+ browser_compositor_->SetRenderWidgetHostIsHidden(false); - if (HasFocus()) - render_widget_host_->Focus(); - } else { -@@ -1909,7 +1919,14 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() { +@@ -355,7 +361,14 @@ void ExtractUnderlines(NSAttributedString* string, } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -1463,31 +1514,76 @@ index 6e947778990cd828f0124b0f70ba9fc77a687e62..04c6e680085162264c6b34a292ae8ebf } - (void)setCloseOnDeactivate:(BOOL)b { -@@ -2142,8 +2159,10 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() { +@@ -618,8 +631,10 @@ void ExtractUnderlines(NSAttributedString* string, if (EventIsReservedBySystem(theEvent)) return; +#ifdef MUON_CHROMIUM_BUILD - DCHECK([theEvent type] != NSKeyDown || - !equiv == !([theEvent modifierFlags] & NSCommandKeyMask)); + DCHECK(eventType != NSKeyDown || + !equiv == !(modifierFlags & NSCommandKeyMask)); +#endif // MUON_CHROMIUM_BUILD - if ([theEvent type] == NSFlagsChanged) { + if (eventType == NSFlagsChanged) { // Ignore NSFlagsChanged events from the NumLock and Fn keys as -@@ -3007,6 +3026,11 @@ Class GetRenderWidgetHostViewCocoaClassForTesting() { - // move) for the given event. Customize here to be more selective about which - // key presses to autohide on. - - (BOOL)shouldAutohideCursorForEvent:(NSEvent*)event { +@@ -663,6 +678,12 @@ void ExtractUnderlines(NSAttributedString* string, + bool shouldAutohideCursor = textInputType != ui::TEXT_INPUT_TYPE_NONE && + eventType == NSKeyDown && + !(modifierFlags & NSCommandKeyMask); +#ifndef MUON_CHROMIUM_BUILD -+ if ([event.window respondsToSelector:@selector(disableAutoHideCursor)] && -+ [event.window disableAutoHideCursor]) -+ return NO; ++ shouldAutohideCursor = ++ !([self.window respondsToSelector:@selector(disableAutoHideCursor)] && ++ [self.window disableAutoHideCursor]) && ++ shouldAutohideCursor; +#endif // MUON_CHROMIUM_BUILD - return (renderWidgetHostView_->GetTextInputType() != - ui::TEXT_INPUT_TYPE_NONE && - [event type] == NSKeyDown && + + // We only handle key down events and just simply forward other events. + if (eventType != NSKeyDown) { +diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h +index d4b8dadb129c8af19b306e591ae1913228d7f522..7ed24becd075a2754901d2188d55da28512ae516 100644 +--- a/content/browser/renderer_host/render_widget_host_view_mac.h ++++ b/content/browser/renderer_host/render_widget_host_view_mac.h +@@ -103,6 +103,9 @@ class CONTENT_EXPORT RenderWidgetHostViewMac + gfx::Rect GetViewBounds() const override; + void SetActive(bool active) override; + void ShowDefinitionForSelection() override; ++#if !defined(MUON_CHROMIUM_BUILD) ++ void ShowDefinitionForSelection(RenderWidgetHostView* target_view) override; ++#endif + void SpeakSelection() override; + void SetBackgroundColor(SkColor color) override; + SkColor background_color() const override; +diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm +index 6a161f0f36c6ebb400a0785a303fd40f8c58e9e7..df8a49c604c26dded69de0e14cd424d69f8969ba 100644 +--- a/content/browser/renderer_host/render_widget_host_view_mac.mm ++++ b/content/browser/renderer_host/render_widget_host_view_mac.mm +@@ -1085,6 +1085,10 @@ void RenderWidgetHostViewMac::SetActive(bool active) { + if (host()) { + host()->SetActive(active); + if (active) { ++ // RenderWidgetHostViewGuest doesn't send Show/Hide to the platform_view so ++ // make sure the browser compositor is activated for guest views ++ // when the host is initially hidden ++ browser_compositor_->SetRenderWidgetHostIsHidden(false); + if (HasFocus()) + host()->Focus(); + } else { +@@ -1102,6 +1106,14 @@ void RenderWidgetHostViewMac::ShowDefinitionForSelection() { + ns_view_bridge_->ShowDictionaryOverlayForSelection(); + } + ++#if !defined(MUON_CHROMIUM_BUILD) ++void RenderWidgetHostViewMac::ShowDefinitionForSelection( ++ RenderWidgetHostView* target_view) { ++ ns_view_bridge_->SetTargetView(target_view); ++ ShowDefinitionForSelection(); ++} ++#endif ++ + void RenderWidgetHostViewMac::SetBackgroundColor(SkColor color) { + // This is called by the embedding code prior to the first frame appearing, + // to set a reasonable color to show before the web content generates its diff --git a/content/browser/renderer_host/render_widget_targeter.cc b/content/browser/renderer_host/render_widget_targeter.cc -index 2282465f5cc8271a2098bb88cf4de56955972f21..f83d76ee5a382c49de66fed4b50fa1549f7c641e 100644 +index 9e0e5b96b8e38a6c29e601d091941dad28eec900..1463daf2462cfb3d8208a91f3fb3b0f15e6710ff 100644 --- a/content/browser/renderer_host/render_widget_targeter.cc +++ b/content/browser/renderer_host/render_widget_targeter.cc @@ -5,6 +5,7 @@ @@ -1524,20 +1620,22 @@ index 2282465f5cc8271a2098bb88cf4de56955972f21..f83d76ee5a382c49de66fed4b50fa154 void RenderWidgetTargeter::ViewWillBeDestroyed(RenderWidgetHostViewBase* view) { diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index c5f0ba58549cfe8e030d58d2e21e13151a7c5264..3d5dbce10e18ab39ffa988875e92cab9fbe5870f 100644 +index 942a35d355acc1cff8762c1e5a4961c6f022f4b2..182887b23f1b8b969cf68302673a7f94139b7ba3 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -1727,7 +1727,8 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -1758,8 +1758,9 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { // This is set before initializing the render manager since // RenderFrameHostManager::Init calls back into us via its delegate to ask if // it should be hidden. -- should_normally_be_visible_ = !params.initially_hidden; -+ // should_normally_be_visible_ = !params.initially_hidden; -+ should_normally_be_visible_ = true; +- visibility_ = +- params.initially_hidden ? Visibility::HIDDEN : Visibility::VISIBLE; ++ // visibility_ = ++ // params.initially_hidden ? Visibility::HIDDEN : Visibility::VISIBLE; ++ visibility_ = Visibility::VISIBLE; // The routing ids must either all be set or all be unset. DCHECK((params.routing_id == MSG_ROUTING_NONE && -@@ -2272,7 +2273,8 @@ void WebContentsImpl::CreateNewWindow( +@@ -2354,7 +2355,8 @@ void WebContentsImpl::CreateNewWindow( DCHECK(!params.opener_suppressed || render_view_route_id == MSG_ROUTING_NONE); scoped_refptr site_instance = @@ -1548,10 +1646,10 @@ index c5f0ba58549cfe8e030d58d2e21e13151a7c5264..3d5dbce10e18ab39ffa988875e92cab9 : source_site_instance; diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm -index d3533591027d3e51955f495805c7ebb6e93c7972..0ccf890bfabe6d0df11ce362104446cebc06c39c 100644 +index 6a9ee15776b6b4ec988cb9717a3ce71ac8dd9057..89d5bc930f04fcc06239149679dc49d771724c4f 100644 --- a/content/browser/web_contents/web_contents_view_mac.mm +++ b/content/browser/web_contents/web_contents_view_mac.mm -@@ -586,6 +586,7 @@ void WebContentsViewMac::CloseTab() { +@@ -584,6 +584,7 @@ void WebContentsViewMac::CloseTab() { endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation { [dragSource_ endDragAt:screenPoint operation:operation]; @@ -1574,7 +1672,7 @@ index c81c2a89ab8ea8c0018a6eecfdcf21219f1b0d8d..fa09b9cd19ddacf5b73d07560405fd06 // over. This enforces that same-page, cross-site drags are not allowed. See // crbug.com/666858. diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 35c4ee35242ac1e21beb94ae6b844dff14e04580..fdfc3b0ac56774fc5fd6a591ccad052c8cbec0cb 100644 +index cec3bd8a97b8b9bcab176a9bd2c296ec12aba838..a00a391c96fc1f04be189c41cb285a66772260e8 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm @@ -347,6 +347,12 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint @@ -1619,10 +1717,10 @@ index 0a6b0176a982782fd1472f607f811dd6c183c3fe..052ca73677cad3b10b494bf2ab823a04 (*map_type)[key] = value; ResetKeyIterator(); diff --git a/content/public/app/mojo/content_renderer_manifest.json b/content/public/app/mojo/content_renderer_manifest.json -index e8d2800c34367edc70ba29c7077bc1037f7b96df..bea186f8b8eae0e9f210d441a02fe2d62718405e 100644 +index 9c5f03aad4269e814e11523c6a80f5d179c08e93..e56b9626d24ec403ae8f65b950d9f1331e385f32 100644 --- a/content/public/app/mojo/content_renderer_manifest.json +++ b/content/public/app/mojo/content_renderer_manifest.json -@@ -48,6 +48,7 @@ +@@ -49,6 +49,7 @@ "navigation:frame": { "provides": { "browser": [ @@ -1630,11 +1728,25 @@ index e8d2800c34367edc70ba29c7077bc1037f7b96df..bea186f8b8eae0e9f210d441a02fe2d6 "blink::mojom::AppBannerController", "blink::mojom::EngagementClient", "blink::mojom::InstallationService", +diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h +index 1ced1c489b4d88d392038cc203d043c85203bb6d..b4d490f537e835d8dc6ed57824bee3a44b5230e4 100644 +--- a/content/public/browser/render_widget_host_view.h ++++ b/content/public/browser/render_widget_host_view.h +@@ -248,6 +248,9 @@ class CONTENT_EXPORT RenderWidgetHostView { + + // Brings up the dictionary showing a definition for the selected text. + virtual void ShowDefinitionForSelection() = 0; ++#if !defined(MUON_CHROMIUM_BUILD) ++ virtual void ShowDefinitionForSelection(RenderWidgetHostView* view) {}; ++#endif + + // Tells the view to speak the currently selected text. + virtual void SpeakSelection() = 0; diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc -index 973f835727b6d0050669a1bea76c84f53be85340..c23edc1ff21a341bc30e9e3bd95003b1b1f2e0bf 100644 +index c5fe59a523776ab12f23a58350ab816c22bd3495..2ae931624a84d2bd20769759e952951a31ae1113 100644 --- a/content/renderer/browser_plugin/browser_plugin.cc +++ b/content/renderer/browser_plugin/browser_plugin.cc -@@ -103,6 +103,7 @@ BrowserPlugin::BrowserPlugin( +@@ -104,6 +104,7 @@ BrowserPlugin::BrowserPlugin( delegate_->SetElementInstanceID(browser_plugin_instance_id_); enable_surface_synchronization_ = features::IsSurfaceSynchronizationEnabled(); @@ -1642,20 +1754,21 @@ index 973f835727b6d0050669a1bea76c84f53be85340..c23edc1ff21a341bc30e9e3bd95003b1 } BrowserPlugin::~BrowserPlugin() { -@@ -214,7 +215,11 @@ void BrowserPlugin::Detach() { +@@ -218,7 +219,12 @@ void BrowserPlugin::Detach() { attached_ = false; guest_crashed_ = false; - web_layer_ = nullptr; + // web_layer_ = nullptr; -+ compositing_helper_->SetPrimarySurfaceId(viz::SurfaceId(), -+ frame_rect().size()); ++ compositing_helper_->SetPrimarySurfaceId( ++ viz::SurfaceId(), screen_space_rect().size(), ++ cc::DeadlinePolicy::UseDefaultDeadline()); + compositing_helper_->SetFallbackSurfaceId(viz::SurfaceId(), -+ frame_rect().size()); ++ screen_space_rect().size()); BrowserPluginManager::Get()->Send( new BrowserPluginHostMsg_Detach(browser_plugin_instance_id_)); -@@ -596,8 +601,6 @@ blink::WebInputEventResult BrowserPlugin::HandleInputEvent( +@@ -625,8 +631,6 @@ blink::WebInputEventResult BrowserPlugin::HandleInputEvent( if (blink::WebInputEvent::IsGestureEventType(event.GetType())) { auto gesture_event = static_cast(event); @@ -1665,7 +1778,7 @@ index 973f835727b6d0050669a1bea76c84f53be85340..c23edc1ff21a341bc30e9e3bd95003b1 // We shouldn't be forwarding GestureEvents to the Guest anymore. Indicate // we handled this only if it's a non-resent event. diff --git a/device/geolocation/BUILD.gn b/device/geolocation/BUILD.gn -index 7f891466af42491131dd78d4f247fa2af3e37224..06d53eb0d270afc22c235ae6c6affc8d05019932 100644 +index a69729c616a6359bfaa41a9bb97069578bbd8702..49a80e4fe931c772a80bddebe823a3f364e9152a 100644 --- a/device/geolocation/BUILD.gn +++ b/device/geolocation/BUILD.gn @@ -11,6 +11,7 @@ if (is_android) { @@ -1693,11 +1806,26 @@ index a9a739e4f9a707faaf195f0747b560197b97a1be..2c34b71205886e239151ba56e5c8f7f8 const char kLocationString[] = "location"; const char kLatitudeString[] = "lat"; +diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn +index e1dcd075672fa1a92c88cf60cee70ef263da7be7..4c11e78cede0d3e688677087330ddcff2f7a183d 100644 +--- a/extensions/browser/BUILD.gn ++++ b/extensions/browser/BUILD.gn +@@ -325,8 +325,8 @@ jumbo_source_set("browser_sources") { + "service_worker_task_queue.h", + "service_worker_task_queue_factory.cc", + "service_worker_task_queue_factory.h", +- "shared_user_script_master.cc", +- "shared_user_script_master.h", ++ #"shared_user_script_master.cc", ++ #"shared_user_script_master.h", + "state_store.cc", + "state_store.h", + "suggest_permission_util.cc", diff --git a/extensions/browser/api/messaging/message_service.cc b/extensions/browser/api/messaging/message_service.cc -index 596684b290c090c74fc142c8f1d53ec161b633a3..6064b6d3c8ace9f576e8b7dd2f8b304f2ca888ac 100644 +index 3d39acbf3ac8333ea9bdc750f163e147615f00b8..dea52ee7434646c9efafe5750b2ae425bf1c1119 100644 --- a/extensions/browser/api/messaging/message_service.cc +++ b/extensions/browser/api/messaging/message_service.cc -@@ -124,6 +124,11 @@ namespace { +@@ -123,6 +123,11 @@ namespace { static content::RenderProcessHost* GetExtensionProcess( BrowserContext* context, const std::string& extension_id) { @@ -1725,10 +1853,10 @@ index 1661c0c65821de8e8e8ac5dbabaa582590c8f0cb..93340b7ce3db2718f64c983a2f688271 content::WebContents* owner = guest->owner_web_contents(); if (!owner) diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc -index 964cde2efecc21b72e96327dc50f1875aae80c58..858bda41501f8c5098f2801c5fd5d8a79f6da3a3 100644 +index 122bd3cfed8e127d4b0194451601369ae5902a36..e1661fc1b9902a973188165f971b7bbd5439d908 100644 --- a/extensions/browser/guest_view/web_view/web_view_guest.cc +++ b/extensions/browser/guest_view/web_view/web_view_guest.cc -@@ -308,7 +308,7 @@ std::string WebViewGuest::GetPartitionID( +@@ -307,7 +307,7 @@ std::string WebViewGuest::GetPartitionID( } // static @@ -1738,19 +1866,19 @@ index 964cde2efecc21b72e96327dc50f1875aae80c58..858bda41501f8c5098f2801c5fd5d8a7 // static int WebViewGuest::GetOrGenerateRulesRegistryID( diff --git a/extensions/common/BUILD.gn b/extensions/common/BUILD.gn -index c1cb28cd43ee686296510b3f30e7e8282527a7ad..f44345210d8666bae88627dfcb027e3a4b6561bf 100644 +index b3559030e96b0b1e740ab8272061608d6f8ca4b3..200cffddfd496bafc453380697b72ac19fa2de66 100644 --- a/extensions/common/BUILD.gn +++ b/extensions/common/BUILD.gn -@@ -297,6 +297,7 @@ if (enable_extensions) { - "//components/crx_file", - "//components/nacl/common:buildflags", +@@ -313,6 +313,7 @@ if (enable_extensions) { + "//components/url_formatter", "//components/url_matcher", + "//components/version_info", + "//content/public/common", "//crypto", "//device/bluetooth", "//device/usb", diff --git a/extensions/common/api/_api_features.json b/extensions/common/api/_api_features.json -index 24ba9fd2be824110b84ac82700989c2e86b48ffb..0f11dbc0e84c2d63f839fc086feab3e11ab4372b 100644 +index 5c57352617aaaf5b79195fe5e499d35636f98ba9..6ed27bb45ceb781d6a217d54244e417f6dbc3fe1 100644 --- a/extensions/common/api/_api_features.json +++ b/extensions/common/api/_api_features.json @@ -189,7 +189,10 @@ @@ -1765,7 +1893,7 @@ index 24ba9fd2be824110b84ac82700989c2e86b48ffb..0f11dbc0e84c2d63f839fc086feab3e1 }, { "internal": true, "channel": "stable", -@@ -555,6 +558,7 @@ +@@ -556,6 +559,7 @@ "internal": true, "contexts": ["webui"], "matches": [ @@ -1773,9 +1901,9 @@ index 24ba9fd2be824110b84ac82700989c2e86b48ffb..0f11dbc0e84c2d63f839fc086feab3e1 "chrome://chrome-signin/*", "chrome://media-router/*", "chrome://mobilesetup/*", -@@ -575,6 +579,13 @@ - "chrome://mobilesetup/*", - "chrome://oobe/*" +@@ -578,6 +582,14 @@ + "chrome://oobe/*", + "chrome://assistant-optin/*" ] + }, { + "internal": true, @@ -1784,10 +1912,11 @@ index 24ba9fd2be824110b84ac82700989c2e86b48ffb..0f11dbc0e84c2d63f839fc086feab3e1 + "matches": [ + "chrome://brave/*" + ] ++ }], "webViewRequest": [{ "dependencies": ["permission:webview"], -@@ -583,6 +594,7 @@ +@@ -586,6 +598,7 @@ "channel": "stable", "contexts": ["webui"], "matches": [ @@ -1796,7 +1925,7 @@ index 24ba9fd2be824110b84ac82700989c2e86b48ffb..0f11dbc0e84c2d63f839fc086feab3e1 "chrome://media-router/*", "chrome://mobilesetup/*", diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc -index 47f6a07065a0ae1146ed87ba6a016d820d78c535..929529081badd7bfac68224aa8af66866feb6d14 100644 +index a83c07e09f7217bf0a02a13edba1cdc1cf6bd973..9df5031df2f275fd3e898f1a3a6a41ce7fb7cc3e 100644 --- a/extensions/renderer/module_system.cc +++ b/extensions/renderer/module_system.cc @@ -416,11 +416,13 @@ void ModuleSystem::LazyFieldGetterInner( @@ -1838,24 +1967,11 @@ index d985c0df7a9cb9543003ac32751f3fc80633248a..02bd6daf7e48de8345ce3be506e02110 }; proto.attachedCallback = function() { -diff --git a/gin/converter.h b/gin/converter.h -index c47ec0af00087ca113f45465523c383f8aa18eb0..40a8b39e74d145f26c124eb438548e9e9147d828 100644 ---- a/gin/converter.h -+++ b/gin/converter.h -@@ -231,7 +231,7 @@ struct ToV8Traits { - static bool TryConvertToV8(v8::Isolate* isolate, - T input, - v8::Local* output) { -- auto maybe = ConvertToV8(isolate->GetCurrentContext(), input); -+ auto maybe = ConvertToV8(isolate, input); - if (maybe.IsEmpty()) - return false; - *output = maybe.ToLocalChecked(); diff --git a/media/base/media_switches.cc b/media/base/media_switches.cc -index 94b9cc352bccb74a6830ac5daea6c94ce693e511..177afce2d683bf7a04051c4c1f3fd56ef95cef32 100644 +index 45334f8bb6b461b2d7c1ba7ff5bd73a6ea735420..28cb4a29b53fb1d4dcedcaca9e36798a69fad252 100644 --- a/media/base/media_switches.cc +++ b/media/base/media_switches.cc -@@ -351,7 +351,7 @@ std::string GetEffectiveAutoplayPolicy(const base::CommandLine& command_line) { +@@ -353,7 +353,7 @@ std::string GetEffectiveAutoplayPolicy(const base::CommandLine& command_line) { return switches::autoplay::kDocumentUserActivationRequiredPolicy; // The default value is platform dependent. @@ -1958,27 +2074,6 @@ index a5ee6bda3ff542624b484b7a11811b708fec3e11..0d635e6dd1242382bd5845f6cb7674dc // If |host_| represents an IPv6 address, this string will not contain // brackets around the address. std::string host_; -diff --git a/net/base/proxy_server.cc b/net/base/proxy_server.cc -index a6fb7788ea7c947b69d17f3a642b5a67ab29469a..54f170a448845bbf479b5d4e22c8b2eadd821db4 100644 ---- a/net/base/proxy_server.cc -+++ b/net/base/proxy_server.cc -@@ -8,6 +8,7 @@ - - #include "base/strings/string_util.h" - #include "base/trace_event/memory_usage_estimator.h" -+#include "net/base/url_auth_util.h" - #include "net/base/url_util.h" - #include "net/http/http_util.h" - -@@ -244,7 +245,7 @@ ProxyServer ProxyServer::FromSchemeHostAndPort( - std::string host; - int port = -1; - // If the scheme has a host/port, parse it. -- bool ok = ParseHostAndPort(begin, end, &host, &port); -+ bool ok = ParseAuthHostAndPort(begin, end, &host, &port); - if (!ok) - return ProxyServer(); // Invalid -- failed parsing [":"] - diff --git a/net/http/BUILD.gn b/net/http/BUILD.gn index d00da41da1d8bbc40d8a85d582c1966ed22eaaf1..c308acaeabef9e90161aeef293fc1a2f743dbe07 100644 --- a/net/http/BUILD.gn @@ -1995,10 +2090,10 @@ index d00da41da1d8bbc40d8a85d582c1966ed22eaaf1..c308acaeabef9e90161aeef293fc1a2f ] outputs = [ diff --git a/net/http/http_util.cc b/net/http/http_util.cc -index 9361272ce0d539dd4bfa1b66b07cb416fe867b14..2df550bc5c628f9029f44328922dac267bbc17b1 100644 +index e26c7d78b7d379dd010ba6ac6afdf494ecd5c563..3e827a41f18577b1f1f4f9744cfab83f9b33a4c7 100644 --- a/net/http/http_util.cc +++ b/net/http/http_util.cc -@@ -57,8 +57,8 @@ size_t FindStringEnd(const std::string& line, size_t start, char delim) { +@@ -41,8 +41,8 @@ void TrimLWSImplementation(ConstIterator* begin, ConstIterator* end) { // static std::string HttpUtil::SpecForRequest(const GURL& url) { // We may get ftp scheme when fetching ftp resources through proxy. @@ -2010,7 +2105,7 @@ index 9361272ce0d539dd4bfa1b66b07cb416fe867b14..2df550bc5c628f9029f44328922dac26 } diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc -index cd4e9c74a31c648b1944b51613481fb031a2ced7..43b35c2e962f008ed3e32204e715229a860334c3 100644 +index 3802937bc0c472cb72d38958ccbe9d5b25da6cbb..79f05f7f57f2547b50c9755dd363ab478a4c5ee8 100644 --- a/net/http/transport_security_state.cc +++ b/net/http/transport_security_state.cc @@ -760,6 +760,10 @@ TransportSecurityState::TransportSecurityState() @@ -2196,10 +2291,10 @@ index 389315a25d7da30d71b59e3803ab795bc4c18e1c..79797fe7e674f9f6d2a65de542f262a9 // Called to read raw (pre-filtered) data from this Job. Reads at most // |buf_size| bytes into |buf|. // Possible return values: -diff --git a/third_party/WebKit/Source/core/editing/EditingBehavior.h b/third_party/WebKit/Source/core/editing/EditingBehavior.h -index 023555bcd3b56fd12c3319096deff07fa9854388..5b75bfaa858cead732a701029f45f5492a19549e 100644 ---- a/third_party/WebKit/Source/core/editing/EditingBehavior.h -+++ b/third_party/WebKit/Source/core/editing/EditingBehavior.h +diff --git a/third_party/blink/renderer/core/editing/editing_behavior.h b/third_party/blink/renderer/core/editing/editing_behavior.h +index 90f13baf5daa216c0832b39137ba87f60aa2ccd2..643caf4e6825e3da6678af6a1a981c42d2bb782b 100644 +--- a/third_party/blink/renderer/core/editing/editing_behavior.h ++++ b/third_party/blink/renderer/core/editing/editing_behavior.h @@ -42,7 +42,7 @@ class CORE_EXPORT EditingBehavior { // area, maintain the horizontal position on Windows and Android but extend it // to the boundary of the editable content on Mac and Linux. @@ -2209,11 +2304,11 @@ index 023555bcd3b56fd12c3319096deff07fa9854388..5b75bfaa858cead732a701029f45f549 } bool ShouldSelectReplacement() const { -diff --git a/third_party/WebKit/Source/core/exported/WebViewImpl.cpp b/third_party/WebKit/Source/core/exported/WebViewImpl.cpp -index 494a9bc0f29407192a4c2091eb21b553779a2615..ffd7b3557457beb4833c1520850a4d612393ba5f 100644 ---- a/third_party/WebKit/Source/core/exported/WebViewImpl.cpp -+++ b/third_party/WebKit/Source/core/exported/WebViewImpl.cpp -@@ -3232,6 +3232,7 @@ void WebViewImpl::DidCloseContextMenu() { +diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc +index 580b48c703eee1d4389b875ece6abcdfe1b607a0..7b8111ec1b4a61bc6f483a7c57079f395834408d 100644 +--- a/third_party/blink/renderer/core/exported/web_view_impl.cc ++++ b/third_party/blink/renderer/core/exported/web_view_impl.cc +@@ -3224,6 +3224,7 @@ void WebViewImpl::DidCloseContextMenu() { LocalFrame* frame = page_->GetFocusController().FocusedFrame(); if (frame) frame->Selection().SetCaretBlinkingSuspended(false); @@ -2221,11 +2316,11 @@ index 494a9bc0f29407192a4c2091eb21b553779a2615..ffd7b3557457beb4833c1520850a4d61 } void WebViewImpl::HidePopups() { -diff --git a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp -index c8fb3957f4d0c681e9bd81478da3ded2110f1a6f..89f1953453c036ebeed78199506b9f4d942d6b92 100644 ---- a/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp -+++ b/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp -@@ -323,6 +323,12 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked() +diff --git a/third_party/blink/renderer/core/html/media/autoplay_policy.cc b/third_party/blink/renderer/core/html/media/autoplay_policy.cc +index b46d047161d41aae70b8485a2b95a38bbb8c3e4d..3366a0caf800f86898e8a444fad314a5a005b73e 100644 +--- a/third_party/blink/renderer/core/html/media/autoplay_policy.cc ++++ b/third_party/blink/renderer/core/html/media/autoplay_policy.cc +@@ -341,6 +341,12 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked() if (element_->GetLoadType() == WebMediaPlayer::kLoadTypeMediaStream) return false; @@ -2238,7 +2333,7 @@ index c8fb3957f4d0c681e9bd81478da3ded2110f1a6f..89f1953453c036ebeed78199506b9f4d // We want to allow muted video to autoplay if: // - the flag is enabled; // - Data Saver is not enabled; -@@ -339,6 +345,12 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked() +@@ -357,6 +363,12 @@ bool AutoplayPolicy::IsGestureNeededForPlaybackIfPendingUserGestureIsLocked() IsAutoplayAllowedPerSettings()) { return false; } @@ -2251,10 +2346,10 @@ index c8fb3957f4d0c681e9bd81478da3ded2110f1a6f..89f1953453c036ebeed78199506b9f4d return true; } -diff --git a/third_party/WebKit/Source/platform/bindings/V8PerIsolateData.cpp b/third_party/WebKit/Source/platform/bindings/V8PerIsolateData.cpp -index 30400494164b2d2cc5d1fa5726914e965633ea55..0c982379766e07267f54d7e19f03f1e3d0fd0887 100644 ---- a/third_party/WebKit/Source/platform/bindings/V8PerIsolateData.cpp -+++ b/third_party/WebKit/Source/platform/bindings/V8PerIsolateData.cpp +diff --git a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc +index a05468a6fd0cefa3f9ad6ab478427db7a64fe06d..0d057af72cc40aba676e97921d71cd57396f7a85 100644 +--- a/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc ++++ b/third_party/blink/renderer/platform/bindings/v8_per_isolate_data.cc @@ -49,7 +49,8 @@ v8::Isolate* MainThreadIsolate() { static V8PerIsolateData* g_main_thread_per_isolate_data = nullptr; @@ -2295,7 +2390,7 @@ index 8a29de654c00602ec79913b86c33c7c7b32d4a81..e60d66b96961291f36b0a13e1cdd8fb6 "ios-aarch64/crypto/chacha/chacha-armv8.S", "ios-aarch64/crypto/fipsmodule/aesv8-armx64.S", diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 731952483ebe35a93001c7fa3f6918b6b3dffc4f..6a0a87ec770524ddf6a7c6fef96435169609ab6b 100644 +index 64de69286bc96b6ae2f290b49b9c1b1f372609ba..a9aea42b087361e0f7abdee90b8a1e9fef80a5d1 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -44,7 +44,7 @@ config("no_asm_config") { @@ -2308,10 +2403,10 @@ index 731952483ebe35a93001c7fa3f6918b6b3dffc4f..6a0a87ec770524ddf6a7c6fef9643516 # Windows' assembly is built with Yasm. The other platforms use the platform # assembler. diff --git a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc b/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -index 7505524b693b24d9028447929d881232a0483561..03eea7522154c40691405ec43e07303b3e80e277 100644 +index 715c533a2756506cc3151739fe458efd2dc5323d..30608c6852d0845566f2a05d620f6c86a5560161 100644 --- a/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc +++ b/third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -@@ -207,7 +207,11 @@ void CrashReportUploadThread::ProcessPendingReport( +@@ -170,7 +170,11 @@ void CrashReportUploadThread::ProcessPendingReport( // If the most recent upload attempt occurred within the past hour, // don’t attempt to upload the new report. If it happened longer ago, // attempt to upload the report. @@ -2323,27 +2418,11 @@ index 7505524b693b24d9028447929d881232a0483561..03eea7522154c40691405ec43e07303b if (now - last_upload_attempt_time < kUploadAttemptIntervalSeconds) { database_->SkipReportUpload( report.uuid, Metrics::CrashSkippedReason::kUploadThrottled); -diff --git a/third_party/widevine/cdm/stub/manifest.json b/third_party/widevine/cdm/stub/manifest.json -index d466ccd1e02ed8c158fda545fe2175c135018da5..16ae2a357b21de66b1558939f9333b3c22e9cff2 100644 ---- a/third_party/widevine/cdm/stub/manifest.json -+++ b/third_party/widevine/cdm/stub/manifest.json -@@ -24,6 +24,11 @@ - "os": "mac", - "arch": "x64", - "sub_package_path": "_platform_specific/mac_x64/" -+ }, -+ { -+ "os": "linux", -+ "arch": "x64", -+ "sub_package_path": "_platform_specific/linux_x64/" - } - ] - } diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc -index 4feb2cd4b2e71f2a2c325c626f9146779d5bfb0d..442283f0ddf2687c24f6e65d55aa763b744a8bfb 100644 +index 46713d7170a66e38c2ecb21b7b7d914c9dcac872..758f3aa16efea24e9f00af8e1c4e3f34b60a776f 100644 --- a/ui/views/controls/menu/menu_controller.cc +++ b/ui/views/controls/menu/menu_controller.cc -@@ -614,6 +614,7 @@ bool MenuController::OnMouseDragged(SubmenuView* source, +@@ -616,6 +616,7 @@ bool MenuController::OnMouseDragged(SubmenuView* source, return true; } MenuItemView* mouse_menu = NULL; @@ -2351,7 +2430,7 @@ index 4feb2cd4b2e71f2a2c325c626f9146779d5bfb0d..442283f0ddf2687c24f6e65d55aa763b if (part.type == MenuPart::MENU_ITEM) { // If there is no menu target, but a submenu target, then we are interacting // with an empty menu item within a submenu. These cannot become selection -@@ -638,7 +639,10 @@ bool MenuController::OnMouseDragged(SubmenuView* source, +@@ -640,7 +641,10 @@ bool MenuController::OnMouseDragged(SubmenuView* source, } } } diff --git a/patches/v8/filter.patch b/patches/v8/filter.patch index 9d355ffdff..02ed624ced 100644 --- a/patches/v8/filter.patch +++ b/patches/v8/filter.patch @@ -1,8 +1,8 @@ diff --git a/BUILD.gn b/BUILD.gn -index 72a19b2ca450fa01c1eab14d3baa9a9e90544199..8a129684bf12fc11def5349d5e0f7bd2211cc018 100644 +index 4b48f7d6874df9617aedf59ee40bb5a1b2737ca2..7c94a120058dbfb587dce340cec1215ce9c1ee49 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -183,7 +183,13 @@ config("internal_config") { +@@ -192,7 +192,13 @@ config("internal_config") { include_dirs = [ "." ] @@ -18,7 +18,7 @@ index 72a19b2ca450fa01c1eab14d3baa9a9e90544199..8a129684bf12fc11def5349d5e0f7bd2 } } diff --git a/src/profiler/profiler-listener.cc b/src/profiler/profiler-listener.cc -index cec71d70e000c55d3cb908b829f174daec816022..9723c8a267058920ee52f90e6223bbcea690ecf6 100644 +index 16ec9d883a1f7fc097faf2f3f37e330b8294a5f2..c5d01e0f6ab1f03c92db6c77f969c04ba1868bfa 100644 --- a/src/profiler/profiler-listener.cc +++ b/src/profiler/profiler-listener.cc @@ -98,7 +98,7 @@ void ProfilerListener::CodeCreateEvent(CodeEventListener::LogEventsAndTags tag, diff --git a/vendor/brightray/BUILD.gn b/vendor/brightray/BUILD.gn index 4b6b9b30d2..5b2aecc416 100644 --- a/vendor/brightray/BUILD.gn +++ b/vendor/brightray/BUILD.gn @@ -144,7 +144,7 @@ source_set("browser") { ] deps = [ - "//third_party/WebKit/public:blink_headers", + "//third_party/blink/public:blink_headers", "//components/cookie_config", "//content/shell:resources", "//net", diff --git a/vendor/brightray/browser/browser_context.cc b/vendor/brightray/browser/browser_context.cc index e6d43e1816..9c0dc3a5e6 100644 --- a/vendor/brightray/browser/browser_context.cc +++ b/vendor/brightray/browser/browser_context.cc @@ -88,7 +88,7 @@ BrowserContext::BrowserContext(const std::string& partition, bool in_memory) } BrowserContext::~BrowserContext() { - if (BrowserThread::IsMessageLoopValid(BrowserThread::IO)) { + if (BrowserThread::IsThreadInitialized(BrowserThread::IO)) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::BindOnce(&URLRequestContextGetter::NotifyContextShuttingDown, diff --git a/vendor/brightray/browser/browser_main_parts.cc b/vendor/brightray/browser/browser_main_parts.cc index 180963f175..e3763dc576 100644 --- a/vendor/brightray/browser/browser_main_parts.cc +++ b/vendor/brightray/browser/browser_main_parts.cc @@ -175,7 +175,7 @@ void BrowserMainParts::ToolkitInitialized() { #endif #if defined(TOOLKIT_VIEWS) - views_delegate_ = base::MakeUnique(); + views_delegate_ = std::make_unique(); if (!views::LayoutProvider::Get()) layout_provider_ = ChromeLayoutProvider::CreateLayoutProvider(); #endif diff --git a/vendor/brightray/browser/inspectable_web_contents_delegate.h b/vendor/brightray/browser/inspectable_web_contents_delegate.h index f4ce36b422..ef5bca5dac 100644 --- a/vendor/brightray/browser/inspectable_web_contents_delegate.h +++ b/vendor/brightray/browser/inspectable_web_contents_delegate.h @@ -22,7 +22,9 @@ class InspectableWebContentsDelegate { virtual void DevToolsRemoveFileSystem( const base::FilePath& file_system_path) {} virtual void DevToolsIndexPath( - int request_id, const std::string& file_system_path) {} + int request_id, + const std::string& file_system_path, + const std::vector& excluded_folders) {} virtual void DevToolsStopIndexing(int request_id) {} virtual void DevToolsSearchInPath( int request_id, diff --git a/vendor/brightray/browser/inspectable_web_contents_impl.cc b/vendor/brightray/browser/inspectable_web_contents_impl.cc index 7b06211c82..3ee4cafc84 100644 --- a/vendor/brightray/browser/inspectable_web_contents_impl.cc +++ b/vendor/brightray/browser/inspectable_web_contents_impl.cc @@ -10,7 +10,6 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/json/string_escape.h" -#include "base/memory/ptr_util.h" #include "base/metrics/histogram.h" #include "base/metrics/histogram_macros.h" #include "base/strings/pattern.h" @@ -697,9 +696,25 @@ void InspectableWebContentsImpl::UpgradeDraggedFileSystemPermissions( } void InspectableWebContentsImpl::IndexPath( - int request_id, const std::string& file_system_path) { - if (delegate_) - delegate_->DevToolsIndexPath(request_id, file_system_path); + int request_id, + const std::string& file_system_path, + const std::string& excluded_folders_message) { + if (delegate_) { + std::vector excluded_folders; + std::unique_ptr parsed_excluded_folders = + base::JSONReader::Read(excluded_folders_message); + if (parsed_excluded_folders && parsed_excluded_folders->is_list()) { + const std::vector& folder_paths = + parsed_excluded_folders->GetList(); + for (const base::Value& folder_path : folder_paths) { + if (folder_path.is_string()) + excluded_folders.push_back(folder_path.GetString()); + } + } + + delegate_->DevToolsIndexPath(request_id, file_system_path, + excluded_folders); + } } void InspectableWebContentsImpl::StopIndexing(int request_id) { @@ -948,7 +963,7 @@ void InspectableWebContentsImpl::OnURLFetchComplete(const net::URLFetcher* sourc DCHECK(it != pending_requests_.end()); base::DictionaryValue response; - auto headers = base::MakeUnique(); + auto headers = std::make_unique(); net::HttpResponseHeaders* rh = source->GetResponseHeaders(); response.SetInteger("statusCode", rh ? rh->response_code() : 200); diff --git a/vendor/brightray/browser/inspectable_web_contents_impl.h b/vendor/brightray/browser/inspectable_web_contents_impl.h index f2edb91e19..78c2bb8528 100644 --- a/vendor/brightray/browser/inspectable_web_contents_impl.h +++ b/vendor/brightray/browser/inspectable_web_contents_impl.h @@ -120,7 +120,8 @@ class InspectableWebContentsImpl : void UpgradeDraggedFileSystemPermissions( const std::string& file_system_url) override; void IndexPath(int index_request_id, - const std::string& file_system_path) override; + const std::string& file_system_path, + const std::string& excluded_folders) override; void StopIndexing(int index_request_id) override; void SearchInPath(int search_request_id, const std::string& file_system_path, diff --git a/vendor/brightray/browser/net_log.cc b/vendor/brightray/browser/net_log.cc index 74aa33dde4..749180b1e7 100644 --- a/vendor/brightray/browser/net_log.cc +++ b/vendor/brightray/browser/net_log.cc @@ -6,7 +6,6 @@ #include "base/command_line.h" #include "base/files/file_path.h" -#include "base/memory/ptr_util.h" #include "base/values.h" #include "content/public/common/content_switches.h" #include "net/log/file_net_log_observer.h" @@ -22,7 +21,7 @@ std::unique_ptr GetConstants() { std::unique_ptr constants = net::GetNetConstants(); // Adding client information to constants dictionary. - auto client_info = base::MakeUnique(); + auto client_info = std::make_unique(); client_info->SetString( "command_line", base::CommandLine::ForCurrentProcess()->GetCommandLineString()); diff --git a/vendor/brightray/browser/special_storage_policy.cc b/vendor/brightray/browser/special_storage_policy.cc index eebfa30b91..73690b9fd9 100644 --- a/vendor/brightray/browser/special_storage_policy.cc +++ b/vendor/brightray/browser/special_storage_policy.cc @@ -4,6 +4,8 @@ #include "browser/special_storage_policy.h" +#include "base/callback.h" + namespace brightray { SpecialStoragePolicy::SpecialStoragePolicy() { @@ -28,10 +30,6 @@ bool SpecialStoragePolicy::IsStorageSessionOnly(const GURL& origin) { return false; } -bool SpecialStoragePolicy::ShouldDeleteCookieOnExit(const GURL& origin) { - return false; -} - bool SpecialStoragePolicy::HasSessionOnlyOrigins() { return false; } @@ -40,4 +38,9 @@ bool SpecialStoragePolicy::HasIsolatedStorage(const GURL& origin) { return false; } +storage::SpecialStoragePolicy::DeleteCookiePredicate +SpecialStoragePolicy::CreateDeleteCookieOnExitPredicate() { + return DeleteCookiePredicate(); +} + } // namespace brightray diff --git a/vendor/brightray/browser/special_storage_policy.h b/vendor/brightray/browser/special_storage_policy.h index 7723dfaa25..fd0da1d0de 100644 --- a/vendor/brightray/browser/special_storage_policy.h +++ b/vendor/brightray/browser/special_storage_policy.h @@ -18,9 +18,9 @@ class SpecialStoragePolicy : public storage::SpecialStoragePolicy { bool IsStorageUnlimited(const GURL& origin) override; bool IsStorageDurable(const GURL& origin) override; bool IsStorageSessionOnly(const GURL& origin) override; - bool ShouldDeleteCookieOnExit(const GURL& origin) override; bool HasIsolatedStorage(const GURL& origin) override; bool HasSessionOnlyOrigins() override; + DeleteCookiePredicate CreateDeleteCookieOnExitPredicate() override; protected: ~SpecialStoragePolicy() override; diff --git a/vendor/brightray/browser/url_request_context_getter.cc b/vendor/brightray/browser/url_request_context_getter.cc index aa74cf1efb..2fe3d3cdcb 100644 --- a/vendor/brightray/browser/url_request_context_getter.cc +++ b/vendor/brightray/browser/url_request_context_getter.cc @@ -37,10 +37,11 @@ #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service.h" #include "net/proxy_resolution/pac_file_fetcher_impl.h" -#include "net/proxy_resolution/proxy_service.h" +#include "net/proxy_resolution/proxy_resolution_service.h" #include "net/ssl/channel_id_service.h" #include "net/ssl/default_channel_id_store.h" #include "net/ssl/ssl_config_service_defaults.h" +#include "net/traffic_annotation/network_traffic_annotation.h" #include "net/url_request/data_protocol_handler.h" #include "net/url_request/file_protocol_handler.h" #include "net/url_request/static_http_user_agent_settings.h" @@ -227,28 +228,33 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { command_line.GetSwitchValueASCII(switches::kProxyServer)); proxy_config.proxy_rules().bypass_rules.ParseFromString( command_line.GetSwitchValueASCII(switches::kProxyBypassList)); - storage_->set_proxy_resolution_service(net::ProxyResolutionService::CreateFixed(proxy_config)); + storage_->set_proxy_resolution_service( + net::ProxyResolutionService::CreateFixed( + net::ProxyConfigWithAnnotation(proxy_config, + NO_TRAFFIC_ANNOTATION_YET))); } else if (command_line.HasSwitch(switches::kProxyPacUrl)) { auto proxy_config = net::ProxyConfig::CreateFromCustomPacURL( GURL(command_line.GetSwitchValueASCII(switches::kProxyPacUrl))); proxy_config.set_pac_mandatory(true); - storage_->set_proxy_resolution_service(net::ProxyResolutionService::CreateFixed( - proxy_config)); + storage_->set_proxy_resolution_service( + net::ProxyResolutionService::CreateFixed( + net::ProxyConfigWithAnnotation(proxy_config, + NO_TRAFFIC_ANNOTATION_YET))); } else { bool use_v8 = !command_line.HasSwitch(::switches::kWinHttpProxyResolver); std::unique_ptr proxy_service; if (use_v8) { - std::unique_ptr dhcp_proxy_script_fetcher; - net::DhcpProxyScriptFetcherFactory dhcp_factory; - dhcp_proxy_script_fetcher = dhcp_factory.Create(url_request_context_.get()); + std::unique_ptr dhcp_pac_file_fetcher; + net::DhcpPacFileFetcherFactory dhcp_factory; + dhcp_pac_file_fetcher = dhcp_factory.Create(url_request_context_.get()); - proxy_service = network::CreateProxyServiceUsingMojoFactory( + proxy_service = network::CreateProxyResolutionServiceUsingMojoFactory( ChromeMojoProxyResolverFactory::CreateWithStrongBinding(), std::move(proxy_config_service_), - std::make_unique( + std::make_unique( url_request_context_.get()), - std::move(dhcp_proxy_script_fetcher), host_resolver.get(), net_log_, + std::move(dhcp_pac_file_fetcher), host_resolver.get(), net_log_, url_request_context_->network_delegate()); } else { proxy_service = net::ProxyResolutionService::CreateUsingSystemProxyResolver( @@ -302,10 +308,10 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { storage_->set_http_server_properties(std::move(server_properties)); std::unique_ptr ct_verifier = - base::MakeUnique(); + std::make_unique(); ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs()); storage_->set_cert_transparency_verifier(std::move(ct_verifier)); - storage_->set_ct_policy_enforcer(base::MakeUnique()); + storage_->set_ct_policy_enforcer(std::make_unique()); net::HttpNetworkSession::Params network_session_params; network_session_params.ignore_certificate_errors = false;