diff --git a/.gitignore b/.gitignore index 9752fac9..4b75891 100644 --- a/.gitignore +++ b/.gitignore
@@ -112,6 +112,7 @@ /chrome/browser/spellchecker/internal /chrome/browser/ui/media_router/internal /chrome/browser_tests_run.xml +/chrome/chrome_cleaner/internal /chrome/chrome_run.xml /chrome/chrome_user32_delay_imports.xml /chrome/chrome_version_resources.xml
diff --git a/DEPS b/DEPS index 5dd249ad..59b9afd5 100644 --- a/DEPS +++ b/DEPS
@@ -145,11 +145,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'e89768469dea381a4aa226a52902ac940a7b0a68', + 'skia_revision': '8d1b0bceedd630e6915f4c9eb518f4fdc583337f', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '2cb722f7a9261c5c679bf21cad56facac9c2b6df', + 'v8_revision': 'c9196fe710de1f245c6e93c9ab3b9472aadce594', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -157,15 +157,15 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': 'efa898aca21d771802f274df8afd28d73ab9aaa3', + 'angle_revision': 'd7500aa800b662eafe0b8a43ff513b45287503e1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. - 'swiftshader_revision': '0b79e98b8bf7dbe8479e3d4625e35bf4c7587360', + 'swiftshader_revision': '34c59c9b88b76564cf534aad2f0033a472182d87', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': '3c168bba58d8bc96bd35a821cf77b81b0bb4d5e0', + 'pdfium_revision': 'f97fd060af464f10755b274620d1b8c78bc3b913', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling BoringSSL # and whatever else without interference from each other. @@ -208,7 +208,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'e00548aa79c77afbe796d78ab7b97576b49d8159', + 'catapult_revision': '5d664a903af312b74a49b67c52fdd38646868234', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -264,7 +264,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'spv_tools_revision': '22ce39c8e1ec6da68f60dc7c9ef47069676ba9c2', + 'spv_tools_revision': '95386f9e45a29e079d55b044ad96009677364bbd', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -280,11 +280,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'dawn_revision': '8cb23933b12e61a5a66bce75d37e8f62dbe97f0d', + 'dawn_revision': '74e4834d3d2583abf5c24e7de83980e536809718', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'quiche_revision': '05984adaf39cf75e8b3a7c3db1e406708bb48350', + 'quiche_revision': '4ff606217c21e4498176a096566278466a758aa5', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ios_webkit # and whatever else without interference from each other. @@ -814,7 +814,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'cc2856f2b4ac6cd1cf421e52df62ca4b0ad74af6', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '36eb20a7aba893f5e9ed548f17e4921455311fb6', 'condition': 'checkout_linux', }, @@ -839,7 +839,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '6d98232fdea6ac40a3955ca66c660c5b3cdd5def', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '192e8a67cfe4d1b7b0cb8e70b12b5a45f7a9221d', 'src/third_party/devtools-node-modules': Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), @@ -908,7 +908,7 @@ }, 'src/third_party/glslang/src': - Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '3cea2e5882e3455731a8b6657fb06db913eb3aa1', + Var('chromium_git') + '/external/github.com/KhronosGroup/glslang.git' + '@' + '37fc4d27d612d3b0c916933e16dab3da5bb7ab34', 'src/third_party/google_toolbox_for_mac/src': { 'url': Var('chromium_git') + '/external/github.com/google/google-toolbox-for-mac.git' + '@' + Var('google_toolbox_for_mac_revision'), @@ -1078,7 +1078,7 @@ }, 'src/third_party/libjpeg_turbo': - Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '81aef9014e059f9bf4838db49ba4fd47fd9d14ce', + Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'cd241207cb905ff768837208e84bd0808835089d', 'src/third_party/liblouis/src': { 'url': Var('chromium_git') + '/external/liblouis-github.git' + '@' + '97ce1c67fccbd3668291b7e63c06161c095d49f2', @@ -1212,7 +1212,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'f1487e4ce2295eca7430d1f0707d1c50c552c418', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '4a4990f4c78cc7e5b16498996762cdd6055646b6', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1380,7 +1380,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'abaae129d9a0c6e1e092067e0b105475df43352e', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'e427996c6174be0ce25d08d32da3c7be4f3792db', + Var('webrtc_git') + '/src.git' + '@' + '412282acf9a979b51808d50b27c3c7333ced05d2', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1421,7 +1421,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@d3f2cdbb53a7ed516cbf394de29264d0ca229981', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@0bcb0bef60932ddfc9c7deef44e6a76b5ded5d7c', 'condition': 'checkout_src_internal', },
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc index 7d85a1b..ec58136 100644 --- a/android_webview/browser/aw_browser_context.cc +++ b/android_webview/browser/aw_browser_context.cc
@@ -222,8 +222,9 @@ user_pref_service_ = pref_service_factory.Create(pref_registry); - // TODO(amalova): Do not call this method for non-default profile. - MigrateLocalStatePrefs(); + if (IsDefaultBrowserContext()) { + MigrateLocalStatePrefs(); + } user_prefs::UserPrefs::Set(this, user_pref_service_.get()); } @@ -354,7 +355,7 @@ download::InProgressDownloadManager* AwBrowserContext::RetriveInProgressDownloadManager() { return new download::InProgressDownloadManager( - nullptr, base::FilePath(), nullptr, + nullptr, base::FilePath(), base::BindRepeating(&IgnoreOriginSecurityCheck), base::BindRepeating(&content::DownloadRequestUtils::IsURLSafe), nullptr); } @@ -447,7 +448,8 @@ AwBrowserContext::GetJavaBrowserContext() { if (!obj_) { JNIEnv* env = base::android::AttachCurrentThread(); - obj_ = Java_AwBrowserContext_create(env, reinterpret_cast<intptr_t>(this)); + obj_ = Java_AwBrowserContext_create(env, reinterpret_cast<intptr_t>(this), + IsDefaultBrowserContext()); } return base::android::ScopedJavaLocalRef<jobject>(obj_); }
diff --git a/android_webview/browser/aw_browser_context.h b/android_webview/browser/aw_browser_context.h index c3d9129c..3dcb225 100644 --- a/android_webview/browser/aw_browser_context.h +++ b/android_webview/browser/aw_browser_context.h
@@ -79,6 +79,9 @@ AwFormDatabaseService* GetFormDatabaseService(); autofill::AutocompleteHistoryManager* GetAutocompleteHistoryManager(); + // TODO(amalova): implement for non-default browser context + bool IsDefaultBrowserContext() { return true; } + // content::BrowserContext implementation. base::FilePath GetPath() override; bool IsOffTheRecord() override;
diff --git a/android_webview/browser/aw_pdf_exporter.cc b/android_webview/browser/aw_pdf_exporter.cc index 4900765..c944137 100644 --- a/android_webview/browser/aw_pdf_exporter.cc +++ b/android_webview/browser/aw_pdf_exporter.cc
@@ -4,6 +4,10 @@ #include "android_webview/browser/aw_pdf_exporter.h" +#include <memory> +#include <utility> +#include <vector> + #include "android_webview/browser/aw_print_manager.h" #include "android_webview/native_jni/AwPdfExporter_jni.h" #include "base/android/jni_android.h" @@ -60,12 +64,13 @@ const JavaParamRef<jintArray>& pages, const JavaParamRef<jobject>& cancel_signal) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - printing::PrintSettings print_settings; + auto print_settings = std::make_unique<printing::PrintSettings>(); printing::PageRanges page_ranges; JNI_AwPdfExporter_GetPageRanges(env, pages, &page_ranges); - InitPdfSettings(env, obj, page_ranges, print_settings); + // TODO(crbug.com/964948) make InitPdfSettings() return PrintSettings. + InitPdfSettings(env, obj, page_ranges, print_settings.get()); AwPrintManager* print_manager = AwPrintManager::CreateForWebContents( - web_contents_, print_settings, fd, + web_contents_, std::move(print_settings), fd, base::Bind(&AwPdfExporter::DidExportPdf, base::Unretained(this))); if (!print_manager->PrintNow()) @@ -82,7 +87,7 @@ void AwPdfExporter::InitPdfSettings(JNIEnv* env, const JavaRef<jobject>& obj, const printing::PageRanges& page_ranges, - printing::PrintSettings& settings) { + printing::PrintSettings* settings) { int dpi = Java_AwPdfExporter_getDpi(env, obj); int width = Java_AwPdfExporter_getPageWidth(env, obj); int height = Java_AwPdfExporter_getPageHeight(env, obj); @@ -96,13 +101,13 @@ printable_area_device_units.SetRect(0, 0, width_in_dots, height_in_dots); if (!page_ranges.empty()) - settings.set_ranges(page_ranges); + settings->set_ranges(page_ranges); - settings.set_dpi(dpi); + settings->set_dpi(dpi); // TODO(sgurun) verify that the value for newly added parameter for // (i.e. landscape_needs_flip) is correct. - settings.SetPrinterPrintableArea(physical_size_device_units, - printable_area_device_units, true); + settings->SetPrinterPrintableArea(physical_size_device_units, + printable_area_device_units, true); printing::PageMargins margins; margins.left = MilsToDots(Java_AwPdfExporter_getLeftMargin(env, obj), dpi); @@ -110,8 +115,8 @@ margins.top = MilsToDots(Java_AwPdfExporter_getTopMargin(env, obj), dpi); margins.bottom = MilsToDots(Java_AwPdfExporter_getBottomMargin(env, obj), dpi); - settings.SetCustomMargins(margins); - settings.set_should_print_backgrounds(true); + settings->SetCustomMargins(margins); + settings->set_should_print_backgrounds(true); } void AwPdfExporter::DidExportPdf(int page_count) {
diff --git a/android_webview/browser/aw_pdf_exporter.h b/android_webview/browser/aw_pdf_exporter.h index 4735aaa..587d2fa 100644 --- a/android_webview/browser/aw_pdf_exporter.h +++ b/android_webview/browser/aw_pdf_exporter.h
@@ -39,7 +39,7 @@ void InitPdfSettings(JNIEnv* env, const base::android::JavaRef<jobject>& obj, const printing::PageRanges& page_ranges, - printing::PrintSettings& settings); + printing::PrintSettings* settings); void DidExportPdf(int page_count); JavaObjectWeakGlobalRef java_ref_;
diff --git a/android_webview/browser/aw_print_manager.cc b/android_webview/browser/aw_print_manager.cc index 89bbbc9..5c9d4dc 100644 --- a/android_webview/browser/aw_print_manager.cc +++ b/android_webview/browser/aw_print_manager.cc
@@ -4,6 +4,8 @@ #include "android_webview/browser/aw_print_manager.h" +#include <utility> + #include "base/bind.h" #include "base/files/file_util.h" #include "base/memory/ptr_util.h" @@ -36,20 +38,24 @@ // static AwPrintManager* AwPrintManager::CreateForWebContents( content::WebContents* contents, - const printing::PrintSettings& settings, + std::unique_ptr<printing::PrintSettings> settings, int file_descriptor, PrintManager::PdfWritingDoneCallback callback) { AwPrintManager* print_manager = new AwPrintManager( - contents, settings, file_descriptor, std::move(callback)); + contents, std::move(settings), file_descriptor, std::move(callback)); contents->SetUserData(UserDataKey(), base::WrapUnique(print_manager)); return print_manager; } -AwPrintManager::AwPrintManager(content::WebContents* contents, - const printing::PrintSettings& settings, - int file_descriptor, - PdfWritingDoneCallback callback) - : PrintManager(contents), settings_(settings), fd_(file_descriptor) { +AwPrintManager::AwPrintManager( + content::WebContents* contents, + std::unique_ptr<printing::PrintSettings> settings, + int file_descriptor, + PdfWritingDoneCallback callback) + : PrintManager(contents), + settings_(std::move(settings)), + fd_(file_descriptor) { + DCHECK(settings_); pdf_writing_done_callback_ = std::move(callback); cookie_ = 1; // Set a valid dummy cookie value. } @@ -75,7 +81,7 @@ // Unlike the printing_message_filter, we do process this in UI thread. DCHECK_CURRENTLY_ON(content::BrowserThread::UI); PrintMsg_Print_Params params; - printing::RenderParamsFromPrintSettings(settings_, ¶ms); + printing::RenderParamsFromPrintSettings(*settings_, ¶ms); params.document_cookie = cookie_; PrintHostMsg_GetDefaultPrintSettings::WriteReplyParams(reply_msg, params); render_frame_host->Send(reply_msg); @@ -87,9 +93,9 @@ IPC::Message* reply_msg) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); PrintMsg_PrintPages_Params params; - printing::RenderParamsFromPrintSettings(settings_, ¶ms.params); + printing::RenderParamsFromPrintSettings(*settings_, ¶ms.params); params.params.document_cookie = scripted_params.cookie; - params.pages = printing::PageRange::GetPages(settings_.ranges()); + params.pages = printing::PageRange::GetPages(settings_->ranges()); PrintHostMsg_ScriptedPrint::WriteReplyParams(reply_msg, params); render_frame_host->Send(reply_msg); }
diff --git a/android_webview/browser/aw_print_manager.h b/android_webview/browser/aw_print_manager.h index 80b1430..6609496 100644 --- a/android_webview/browser/aw_print_manager.h +++ b/android_webview/browser/aw_print_manager.h
@@ -5,6 +5,8 @@ #ifndef ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ #define ANDROID_WEBVIEW_BROWSER_AW_PRINT_MANAGER_H_ +#include <memory> + #include "base/macros.h" #include "components/printing/browser/print_manager.h" #include "components/printing/common/print_messages.h" @@ -21,7 +23,7 @@ // The returned pointer is owned by |contents|. static AwPrintManager* CreateForWebContents( content::WebContents* contents, - const printing::PrintSettings& settings, + std::unique_ptr<printing::PrintSettings> settings, int file_descriptor, PdfWritingDoneCallback callback); @@ -36,7 +38,7 @@ friend class content::WebContentsUserData<AwPrintManager>; AwPrintManager(content::WebContents* contents, - const printing::PrintSettings& settings, + std::unique_ptr<printing::PrintSettings> settings, int file_descriptor, PdfWritingDoneCallback callback); @@ -50,7 +52,7 @@ const PrintHostMsg_ScriptedPrint_Params& params, IPC::Message* reply_msg) override; - printing::PrintSettings settings_; + const std::unique_ptr<printing::PrintSettings> settings_; // The file descriptor into which the PDF of the document will be written. int fd_;
diff --git a/android_webview/glue/BUILD.gn b/android_webview/glue/BUILD.gn index d4882c7..5906de6 100644 --- a/android_webview/glue/BUILD.gn +++ b/android_webview/glue/BUILD.gn
@@ -47,6 +47,9 @@ "java/src/com/android/webview/chromium/ServiceWorkerSettingsAdapter.java", "java/src/com/android/webview/chromium/SharedStatics.java", "java/src/com/android/webview/chromium/SharedTracingControllerAdapter.java", + "java/src/com/android/webview/chromium/SharedWebViewChromium.java", + "java/src/com/android/webview/chromium/SharedWebViewContentsClientAdapter.java", + "java/src/com/android/webview/chromium/SharedWebViewRendererClientAdapter.java", "java/src/com/android/webview/chromium/SplitApkWorkaround.java", "java/src/com/android/webview/chromium/TracingControllerAdapter.java", "java/src/com/android/webview/chromium/WebBackForwardListChromium.java", @@ -56,19 +59,16 @@ "java/src/com/android/webview/chromium/WebResourceErrorAdapter.java", "java/src/com/android/webview/chromium/WebResourceRequestAdapter.java", "java/src/com/android/webview/chromium/WebStorageAdapter.java", - "java/src/com/android/webview/chromium/WebkitToSharedGlueConverter.java", - "java/src/com/android/webview/chromium/WebViewChromiumAwInit.java", "java/src/com/android/webview/chromium/WebViewChromium.java", + "java/src/com/android/webview/chromium/WebViewChromiumAwInit.java", "java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java", "java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForO.java", "java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForOMR1.java", "java/src/com/android/webview/chromium/WebViewChromiumFactoryProviderForP.java", - "java/src/com/android/webview/chromium/SharedWebViewChromium.java", - "java/src/com/android/webview/chromium/SharedWebViewContentsClientAdapter.java", - "java/src/com/android/webview/chromium/SharedWebViewRendererClientAdapter.java", "java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java", "java/src/com/android/webview/chromium/WebViewDatabaseAdapter.java", "java/src/com/android/webview/chromium/WebViewDelegateFactory.java", + "java/src/com/android/webview/chromium/WebkitToSharedGlueConverter.java", ] android_manifest_for_lint = system_webview_android_manifest
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java index 0e8e156..411e938 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java +++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
@@ -25,7 +25,7 @@ */ @JNINamespace("android_webview") public class AwBrowserContext { - private static final String CHROMIUM_PREFS_NAME = "WebViewChromiumPrefs"; + private static final String CHROMIUM_PREFS_NAME = "WebViewProfilePrefs/Default"; private static final String TAG = "AwBrowserContext"; private final SharedPreferences mSharedPreferences; @@ -37,11 +37,18 @@ /** Pointer to the Native-side AwBrowserContext. */ private long mNativeAwBrowserContext; + private final boolean mIsDefault; - public AwBrowserContext(SharedPreferences sharedPreferences, long nativeAwBrowserContext) { + public AwBrowserContext( + SharedPreferences sharedPreferences, long nativeAwBrowserContext, boolean isDefault) { mNativeAwBrowserContext = nativeAwBrowserContext; mSharedPreferences = sharedPreferences; + mIsDefault = isDefault; + if (isDefaultAwBrowserContext()) { + migrateGeolocationPreferences(); + } + PlatformServiceBridge.getInstance().setSafeBrowsingHandler(); // Register MemoryPressureMonitor callbacks and make sure it polls only if there is at @@ -94,6 +101,14 @@ return mQuotaManagerBridge; } + private void migrateGeolocationPreferences() { + final String oldGlobalPrefsName = "WebViewChromiumPrefs"; + SharedPreferences oldGlobalPrefs = + ContextUtils.getApplicationContext().getSharedPreferences( + oldGlobalPrefsName, Context.MODE_PRIVATE); + AwGeolocationPermissions.migrateGeolocationPreferences(oldGlobalPrefs, mSharedPreferences); + } + /** * @see android.webkit.WebView#pauseTimers() */ @@ -112,6 +127,10 @@ return mNativeAwBrowserContext; } + public boolean isDefaultAwBrowserContext() { + return mIsDefault; + } + private static AwBrowserContext sInstance; public static AwBrowserContext getDefault() { if (sInstance == null) { @@ -121,12 +140,12 @@ } @CalledByNative - public static AwBrowserContext create(long nativeAwBrowserContext) { + public static AwBrowserContext create(long nativeAwBrowserContext, boolean isDefault) { SharedPreferences sharedPreferences = ContextUtils.getApplicationContext().getSharedPreferences( CHROMIUM_PREFS_NAME, Context.MODE_PRIVATE); - return new AwBrowserContext(sharedPreferences, nativeAwBrowserContext); + return new AwBrowserContext(sharedPreferences, nativeAwBrowserContext, isDefault); } private static native AwBrowserContext nativeGetDefaultJava();
diff --git a/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java b/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java index 15e0365..bc85228 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java +++ b/android_webview/java/src/org/chromium/android_webview/AwGeolocationPermissions.java
@@ -128,4 +128,19 @@ return PREF_PREFIX + origin; } + + /* package */ + static void migrateGeolocationPreferences( + SharedPreferences oldPrefs, SharedPreferences newPrefs) { + SharedPreferences.Editor oldPrefsEditor = oldPrefs.edit(); + + SharedPreferences.Editor newPrefsEditor = newPrefs.edit(); + + for (String name : oldPrefs.getAll().keySet()) { + if (name.startsWith(AwGeolocationPermissions.PREF_PREFIX)) { + newPrefsEditor.putBoolean(name, oldPrefs.getBoolean(name, false)).apply(); + oldPrefsEditor.remove(name).apply(); + } + } + } }
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java index 4011006..f082f1e 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwActivityTestRule.java
@@ -101,7 +101,7 @@ public AwBrowserContext createAwBrowserContextOnUiThread(InMemorySharedPreferences prefs) { // Native pointer is initialized later in startBrowserProcess if needed. - return new AwBrowserContext(prefs, 0); + return new AwBrowserContext(prefs, 0, false); } public TestDependencyFactory createTestDependencyFactory() {
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java index cc505a8..fc093d7 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
@@ -201,7 +201,7 @@ */ private static class MockAwBrowserContext extends AwBrowserContext { public MockAwBrowserContext(SharedPreferences sharedPreferences) { - super(sharedPreferences, 0); + super(sharedPreferences, 0, false); SafeBrowsingApiBridge.setSafeBrowsingHandlerType(MockSafeBrowsingApiHandler.class); } }
diff --git a/android_webview/support_library/boundary_interfaces/BUILD.gn b/android_webview/support_library/boundary_interfaces/BUILD.gn index 7cf5f2c..fd289baa 100644 --- a/android_webview/support_library/boundary_interfaces/BUILD.gn +++ b/android_webview/support_library/boundary_interfaces/BUILD.gn
@@ -17,7 +17,6 @@ "src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java", "src/org/chromium/support_lib_boundary/TracingControllerBoundaryInterface.java", "src/org/chromium/support_lib_boundary/VisualStateCallbackBoundaryInterface.java", - "src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebMessageBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebMessageCallbackBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebMessagePortBoundaryInterface.java", @@ -29,6 +28,7 @@ "src/org/chromium/support_lib_boundary/WebViewProviderFactoryBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebViewRendererBoundaryInterface.java", "src/org/chromium/support_lib_boundary/WebViewRendererClientBoundaryInterface.java", + "src/org/chromium/support_lib_boundary/WebkitToCompatConverterBoundaryInterface.java", "src/org/chromium/support_lib_boundary/util/BoundaryInterfaceReflectionUtil.java", "src/org/chromium/support_lib_boundary/util/Features.java", ]
diff --git a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java index 67a44ac9..01920c0 100644 --- a/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java +++ b/android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java
@@ -198,7 +198,7 @@ getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); if (mBrowserContext == null) { mBrowserContext = new AwBrowserContext( - sharedPreferences, AwBrowserContext.getDefault().getNativePointer()); + sharedPreferences, AwBrowserContext.getDefault().getNativePointer(), false); } final AwSettings awSettings = new AwSettings(this /* context */, false /* isAccessFromFileURLsGrantedByDefault */,
diff --git a/apps/saved_files_service.cc b/apps/saved_files_service.cc index 1047ef6..26bfb1c 100644 --- a/apps/saved_files_service.cc +++ b/apps/saved_files_service.cc
@@ -307,6 +307,18 @@ SavedFileEntry* file_entry = it->second.get(); int old_sequence_number = file_entry->sequence_number; + +#if defined(OS_CHROMEOS) + // crbug.com/983844 Convert path from legacy Download/ to MyFiles/Downloads/ + // so entries saved before MyFiles don't fail. TODO(lucmult): Remove this + // after M-83. + const auto legacy_downloads = context_->GetPath().AppendASCII("Downloads"); + auto to_myfiles = + context_->GetPath().AppendASCII("MyFiles").AppendASCII("Downloads"); + if (legacy_downloads.AppendRelativePath(file_entry->path, &to_myfiles)) + file_entry->path = to_myfiles; +#endif + if (!saved_file_lru_.empty()) { // Get the sequence number after the last file entry in the LRU. std::map<int, SavedFileEntry*>::reverse_iterator it =
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index fd8d213..b8cadd9 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -181,8 +181,6 @@ "ash_service.cc", "assistant/assistant_alarm_timer_controller.cc", "assistant/assistant_alarm_timer_controller.h", - "assistant/assistant_cache_controller.cc", - "assistant/assistant_cache_controller.h", "assistant/assistant_controller.cc", "assistant/assistant_controller.h", "assistant/assistant_controller_observer.h", @@ -199,6 +197,8 @@ "assistant/assistant_settings.cc", "assistant/assistant_setup_controller.cc", "assistant/assistant_setup_controller.h", + "assistant/assistant_suggestions_controller.cc", + "assistant/assistant_suggestions_controller.h", "assistant/assistant_ui_controller.cc", "assistant/assistant_ui_controller.h", "assistant/assistant_view_delegate_impl.cc", @@ -743,6 +743,8 @@ "system/message_center/notifier_settings_view.h", "system/message_center/session_state_notification_blocker.cc", "system/message_center/session_state_notification_blocker.h", + "system/message_center/unified_message_center_bubble.cc", + "system/message_center/unified_message_center_bubble.h", "system/message_center/unified_message_center_view.cc", "system/message_center/unified_message_center_view.h", "system/message_center/unified_message_list_view.cc", @@ -1787,6 +1789,7 @@ "system/message_center/message_center_ui_controller_unittest.cc", "system/message_center/notifier_settings_view_unittest.cc", "system/message_center/session_state_notification_blocker_unittest.cc", + "system/message_center/unified_message_center_bubble_unittest.cc", "system/message_center/unified_message_center_view_unittest.cc", "system/message_center/unified_message_list_view_unittest.cc", "system/network/active_network_icon_unittest.cc",
diff --git a/ash/app_list/views/app_list_page.cc b/ash/app_list/views/app_list_page.cc index c08711bb..d5c310dd 100644 --- a/ash/app_list/views/app_list_page.cc +++ b/ash/app_list/views/app_list_page.cc
@@ -21,18 +21,6 @@ void AppListPage::OnWillBeHidden() {} -void AppListPage::OnAnimationStarted(ash::AppListState from_state, - ash::AppListState to_state) { - gfx::Rect from_rect = GetPageBoundsForState(from_state); - gfx::Rect to_rect = GetPageBoundsForState(to_state); - if (from_rect == to_rect) - return; - - SetBoundsRect(from_rect); - auto settings = contents_view()->CreateTransitionAnimationSettings(layer()); - SetBoundsRect(to_rect); -} - void AppListPage::OnAnimationUpdated(double progress, ash::AppListState from_state, ash::AppListState to_state) {}
diff --git a/ash/app_list/views/app_list_page.h b/ash/app_list/views/app_list_page.h index 393b388..b38116b 100644 --- a/ash/app_list/views/app_list_page.h +++ b/ash/app_list/views/app_list_page.h
@@ -33,7 +33,7 @@ // Triggered when the page transition animation started. virtual void OnAnimationStarted(ash::AppListState from_state, - ash::AppListState to_state); + ash::AppListState to_state) = 0; // Triggered after the page transition animation has updated. virtual void OnAnimationUpdated(double progress,
diff --git a/ash/app_list/views/app_list_view.cc b/ash/app_list/views/app_list_view.cc index 3b372667..0c80649 100644 --- a/ash/app_list/views/app_list_view.cc +++ b/ash/app_list/views/app_list_view.cc
@@ -384,22 +384,25 @@ // The view for the app list background shield which changes color and radius. class AppListBackgroundShieldView : public views::View { public: - AppListBackgroundShieldView() - : color_(AppListView::kDefaultBackgroundColor) {} + AppListBackgroundShieldView() : color_(AppListView::kDefaultBackgroundColor) { + SetPaintToLayer(ui::LAYER_SOLID_COLOR); + layer()->SetFillsBoundsOpaquely(false); + layer()->SetRoundedCornerRadius( + {AppListConfig::instance().background_radius(), + AppListConfig::instance().background_radius(), 0, 0}); + layer()->SetColor(color_); + } ~AppListBackgroundShieldView() override = default; void UpdateBackground(bool use_blur) { - DestroyLayer(); - SetPaintToLayer(use_blur ? ui::LAYER_SOLID_COLOR : ui::LAYER_TEXTURED); - layer()->SetFillsBoundsOpaquely(false); + if (blur_value_ == use_blur) + return; + blur_value_ = use_blur; + if (use_blur) { - layer()->SetColor(color_); layer()->SetBackgroundBlur(AppListConfig::instance().blur_radius()); layer()->SetBackdropFilterQuality(kAppListBlurQuality); - layer()->SetRoundedCornerRadius( - {AppListConfig::instance().background_radius(), - AppListConfig::instance().background_radius(), 0, 0}); } else { layer()->SetBackgroundBlur(0); } @@ -410,10 +413,7 @@ return; color_ = color; - if (layer()->type() == ui::LAYER_SOLID_COLOR) - layer()->SetColor(color); - else - SchedulePaint(); + layer()->SetColor(color); } void UpdateBounds(const gfx::Rect& bounds) { @@ -427,15 +427,6 @@ SetBoundsRect(new_bounds); } - // Overridden from views::View: - void OnPaint(gfx::Canvas* canvas) override { - cc::PaintFlags flags; - flags.setStyle(cc::PaintFlags::kFill_Style); - flags.setColor(color_); - canvas->DrawRoundRect(GetContentsBounds(), - AppListConfig::instance().background_radius(), flags); - } - SkColor GetColorForTest() const { return color_; } const char* GetClassName() const override { @@ -443,6 +434,9 @@ } private: + // Whether the background blur has been set on the background shield. + bool blur_value_ = false; + SkColor color_; DISALLOW_COPY_AND_ASSIGN(AppListBackgroundShieldView);
diff --git a/ash/app_list/views/app_list_view_unittest.cc b/ash/app_list/views/app_list_view_unittest.cc index 9521b2c..b04fe4b5 100644 --- a/ash/app_list/views/app_list_view_unittest.cc +++ b/ash/app_list/views/app_list_view_unittest.cc
@@ -1762,7 +1762,10 @@ Show(false /*is_tablet_mode*/, true /*is_side_shelf*/); EXPECT_EQ(ash::AppListViewState::kFullscreenAllApps, view_->app_list_state()); // The rounded corners should be off screen in side shelf. - EXPECT_EQ(gfx::Transform(), + gfx::Transform translation; + translation.Translate(0, -AppListConfig::instance().background_radius()); + // The rounded corners should be off screen in side shelf. + EXPECT_EQ(translation, view_->GetAppListBackgroundShieldForTest()->GetTransform()); }
diff --git a/ash/app_list/views/assistant/assistant_page_view.cc b/ash/app_list/views/assistant/assistant_page_view.cc index 83a5a0f3..5cb6760 100644 --- a/ash/app_list/views/assistant/assistant_page_view.cc +++ b/ash/app_list/views/assistant/assistant_page_view.cc
@@ -183,6 +183,13 @@ } } +void AssistantPageView::OnAnimationStarted(ash::AppListState from_state, + ash::AppListState to_state) { + if (to_state != ash::AppListState::kStateEmbeddedAssistant) + return; + SetBoundsRect(GetPageBoundsForState(to_state)); +} + gfx::Rect AssistantPageView::GetPageBoundsForState( ash::AppListState state) const { gfx::Rect bounds = AppListPage::GetSearchBoxBounds();
diff --git a/ash/app_list/views/assistant/assistant_page_view.h b/ash/app_list/views/assistant/assistant_page_view.h index f702666..934b3da 100644 --- a/ash/app_list/views/assistant/assistant_page_view.h +++ b/ash/app_list/views/assistant/assistant_page_view.h
@@ -48,6 +48,8 @@ void OnGestureEvent(ui::GestureEvent* event) override; // AppListPage: + void OnAnimationStarted(ash::AppListState from_state, + ash::AppListState to_state) override; gfx::Rect GetPageBoundsForState(ash::AppListState state) const override; views::View* GetFirstFocusableView() override; views::View* GetLastFocusableView() override;
diff --git a/ash/app_list/views/horizontal_page_container.cc b/ash/app_list/views/horizontal_page_container.cc index 5625ab5..4859925 100644 --- a/ash/app_list/views/horizontal_page_container.cc +++ b/ash/app_list/views/horizontal_page_container.cc
@@ -81,21 +81,27 @@ void HorizontalPageContainer::OnAnimationStarted(ash::AppListState from_state, ash::AppListState to_state) { - AppListPage::OnAnimationStarted(from_state, to_state); + const gfx::Rect from_rect = GetPageBoundsForState(from_state); + const gfx::Rect to_rect = GetPageBoundsForState(to_state); + if (from_rect != to_rect) { + SetBoundsRect(from_rect); + auto settings = contents_view()->CreateTransitionAnimationSettings(layer()); + SetBoundsRect(to_rect); + } for (size_t i = 0; i < horizontal_pages_.size(); ++i) { HorizontalPage* page = horizontal_pages_[i]; - gfx::Rect to_rect = page->GetPageBoundsForState(to_state); - gfx::Rect from_rect = page->GetPageBoundsForState(from_state); + gfx::Rect page_to_rect = page->GetPageBoundsForState(to_state); + gfx::Rect page_from_rect = page->GetPageBoundsForState(from_state); - if (to_rect == from_rect) + if (page_to_rect == page_from_rect) continue; - to_rect.Offset(GetOffsetForPageIndex(i)); + page_to_rect.Offset(GetOffsetForPageIndex(i)); auto settings = contents_view()->CreateTransitionAnimationSettings(page->layer()); - page->SetBoundsRect(to_rect); + page->SetBoundsRect(page_to_rect); } }
diff --git a/ash/assistant/assistant_cache_controller.h b/ash/assistant/assistant_cache_controller.h deleted file mode 100644 index 78b022f1..0000000 --- a/ash/assistant/assistant_cache_controller.h +++ /dev/null
@@ -1,60 +0,0 @@ -// 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. - -#ifndef ASH_ASSISTANT_ASSISTANT_CACHE_CONTROLLER_H_ -#define ASH_ASSISTANT_ASSISTANT_CACHE_CONTROLLER_H_ - -#include "ash/assistant/assistant_controller_observer.h" -#include "ash/assistant/model/assistant_cache_model.h" -#include "ash/assistant/model/assistant_ui_model_observer.h" -#include "ash/public/cpp/assistant/default_voice_interaction_observer.h" -#include "ash/public/mojom/voice_interaction_controller.mojom.h" -#include "base/macros.h" - -namespace ash { - -class AssistantCacheModelObserver; -class AssistantController; - -class AssistantCacheController : public AssistantControllerObserver, - public AssistantUiModelObserver, - public DefaultVoiceInteractionObserver { - public: - explicit AssistantCacheController(AssistantController* assistant_controller); - ~AssistantCacheController() override; - - // Returns a reference to the underlying model. - const AssistantCacheModel* model() const { return &model_; } - - // Adds/removes the specified cache model |observer|. - void AddModelObserver(AssistantCacheModelObserver* observer); - void RemoveModelObserver(AssistantCacheModelObserver* observer); - - // AssistantControllerObserver: - void OnAssistantControllerConstructed() override; - void OnAssistantControllerDestroying() override; - - // AssistantUiModelObserver: - void OnUiVisibilityChanged( - AssistantVisibility new_visibility, - AssistantVisibility old_visibility, - base::Optional<AssistantEntryPoint> entry_point, - base::Optional<AssistantExitPoint> exit_point) override; - - private: - // DefaultVoiceInteractionObserver: - void OnVoiceInteractionContextEnabled(bool enabled) override; - - void UpdateConversationStarters(); - - AssistantController* const assistant_controller_; // Owned by Shell. - - AssistantCacheModel model_; - - DISALLOW_COPY_AND_ASSIGN(AssistantCacheController); -}; - -} // namespace ash - -#endif // ASH_ASSISTANT_ASSISTANT_CACHE_CONTROLLER_H_
diff --git a/ash/assistant/assistant_controller.cc b/ash/assistant/assistant_controller.cc index 98039a01..3a6f20da 100644 --- a/ash/assistant/assistant_controller.cc +++ b/ash/assistant/assistant_controller.cc
@@ -35,12 +35,12 @@ AssistantController::AssistantController() : assistant_volume_control_binding_(this), assistant_alarm_timer_controller_(this), - assistant_cache_controller_(this), assistant_interaction_controller_(this), assistant_notification_controller_(this), assistant_prefs_controller_(), assistant_screen_context_controller_(this), assistant_setup_controller_(this), + assistant_suggestions_controller_(this), assistant_ui_controller_(this), view_delegate_(this), weak_factory_(this) {
diff --git a/ash/assistant/assistant_controller.h b/ash/assistant/assistant_controller.h index c4c501b..ec9143c3 100644 --- a/ash/assistant/assistant_controller.h +++ b/ash/assistant/assistant_controller.h
@@ -13,13 +13,13 @@ #include "ash/accessibility/accessibility_observer.h" #include "ash/ash_export.h" #include "ash/assistant/assistant_alarm_timer_controller.h" -#include "ash/assistant/assistant_cache_controller.h" #include "ash/assistant/assistant_controller_observer.h" #include "ash/assistant/assistant_interaction_controller.h" #include "ash/assistant/assistant_notification_controller.h" #include "ash/assistant/assistant_prefs_controller.h" #include "ash/assistant/assistant_screen_context_controller.h" #include "ash/assistant/assistant_setup_controller.h" +#include "ash/assistant/assistant_suggestions_controller.h" #include "ash/assistant/assistant_ui_controller.h" #include "ash/assistant/assistant_view_delegate_impl.h" #include "ash/assistant/ui/assistant_view_delegate.h" @@ -44,12 +44,12 @@ namespace ash { class AssistantAlarmTimerController; -class AssistantCacheController; class AssistantInteractionController; class AssistantNotificationController; class AssistantPrefsController; class AssistantScreenContextController; class AssistantSetupController; +class AssistantSuggestionsController; class AssistantUiController; class ASH_EXPORT AssistantController @@ -121,10 +121,6 @@ return &assistant_alarm_timer_controller_; } - AssistantCacheController* cache_controller() { - return &assistant_cache_controller_; - } - AssistantInteractionController* interaction_controller() { return &assistant_interaction_controller_; } @@ -141,6 +137,10 @@ return &assistant_setup_controller_; } + AssistantSuggestionsController* suggestions_controller() { + return &assistant_suggestions_controller_; + } + AssistantUiController* ui_controller() { return &assistant_ui_controller_; } AssistantViewDelegate* view_delegate() { return &view_delegate_; } @@ -175,12 +175,12 @@ // Assistant sub-controllers. AssistantAlarmTimerController assistant_alarm_timer_controller_; - AssistantCacheController assistant_cache_controller_; AssistantInteractionController assistant_interaction_controller_; AssistantNotificationController assistant_notification_controller_; AssistantPrefsController assistant_prefs_controller_; AssistantScreenContextController assistant_screen_context_controller_; AssistantSetupController assistant_setup_controller_; + AssistantSuggestionsController assistant_suggestions_controller_; AssistantUiController assistant_ui_controller_; AssistantViewDelegateImpl view_delegate_;
diff --git a/ash/assistant/assistant_cache_controller.cc b/ash/assistant/assistant_suggestions_controller.cc similarity index 87% rename from ash/assistant/assistant_cache_controller.cc rename to ash/assistant/assistant_suggestions_controller.cc index bee96b283..80f0459 100644 --- a/ash/assistant/assistant_cache_controller.cc +++ b/ash/assistant/assistant_suggestions_controller.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/assistant/assistant_cache_controller.h" +#include "ash/assistant/assistant_suggestions_controller.h" #include <utility> #include <vector> @@ -60,9 +60,9 @@ } // namespace -// AssistantCacheController ---------------------------------------------------- +// AssistantSuggestionsController ---------------------------------------------- -AssistantCacheController::AssistantCacheController( +AssistantSuggestionsController::AssistantSuggestionsController( AssistantController* assistant_controller) : assistant_controller_(assistant_controller) { UpdateConversationStarters(); @@ -70,30 +70,30 @@ VoiceInteractionController::Get()->AddLocalObserver(this); } -AssistantCacheController::~AssistantCacheController() { +AssistantSuggestionsController::~AssistantSuggestionsController() { assistant_controller_->RemoveObserver(this); VoiceInteractionController::Get()->RemoveLocalObserver(this); } -void AssistantCacheController::AddModelObserver( - AssistantCacheModelObserver* observer) { +void AssistantSuggestionsController::AddModelObserver( + AssistantSuggestionsModelObserver* observer) { model_.AddObserver(observer); } -void AssistantCacheController::RemoveModelObserver( - AssistantCacheModelObserver* observer) { +void AssistantSuggestionsController::RemoveModelObserver( + AssistantSuggestionsModelObserver* observer) { model_.RemoveObserver(observer); } -void AssistantCacheController::OnAssistantControllerConstructed() { +void AssistantSuggestionsController::OnAssistantControllerConstructed() { assistant_controller_->ui_controller()->AddModelObserver(this); } -void AssistantCacheController::OnAssistantControllerDestroying() { +void AssistantSuggestionsController::OnAssistantControllerDestroying() { assistant_controller_->ui_controller()->RemoveModelObserver(this); } -void AssistantCacheController::OnUiVisibilityChanged( +void AssistantSuggestionsController::OnUiVisibilityChanged( AssistantVisibility new_visibility, AssistantVisibility old_visibility, base::Optional<AssistantEntryPoint> entry_point, @@ -104,13 +104,14 @@ UpdateConversationStarters(); } -void AssistantCacheController::OnVoiceInteractionContextEnabled(bool enabled) { +void AssistantSuggestionsController::OnVoiceInteractionContextEnabled( + bool enabled) { UpdateConversationStarters(); } // TODO(dmblack): The conversation starter cache should receive its contents // from the server. Hard-coding for the time being. -void AssistantCacheController::UpdateConversationStarters() { +void AssistantSuggestionsController::UpdateConversationStarters() { if (!base::FeatureList::IsEnabled(kConversationStartersFeature)) return;
diff --git a/ash/assistant/assistant_suggestions_controller.h b/ash/assistant/assistant_suggestions_controller.h new file mode 100644 index 0000000..62b676b --- /dev/null +++ b/ash/assistant/assistant_suggestions_controller.h
@@ -0,0 +1,61 @@ +// 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. + +#ifndef ASH_ASSISTANT_ASSISTANT_SUGGESTIONS_CONTROLLER_H_ +#define ASH_ASSISTANT_ASSISTANT_SUGGESTIONS_CONTROLLER_H_ + +#include "ash/assistant/assistant_controller_observer.h" +#include "ash/assistant/model/assistant_suggestions_model.h" +#include "ash/assistant/model/assistant_ui_model_observer.h" +#include "ash/public/cpp/assistant/default_voice_interaction_observer.h" +#include "ash/public/mojom/voice_interaction_controller.mojom.h" +#include "base/macros.h" + +namespace ash { + +class AssistantController; +class AssistantSuggestionsModelObserver; + +class AssistantSuggestionsController : public AssistantControllerObserver, + public AssistantUiModelObserver, + public DefaultVoiceInteractionObserver { + public: + explicit AssistantSuggestionsController( + AssistantController* assistant_controller); + ~AssistantSuggestionsController() override; + + // Returns a reference to the underlying model. + const AssistantSuggestionsModel* model() const { return &model_; } + + // Adds/removes the specified suggestions model |observer|. + void AddModelObserver(AssistantSuggestionsModelObserver* observer); + void RemoveModelObserver(AssistantSuggestionsModelObserver* observer); + + // AssistantControllerObserver: + void OnAssistantControllerConstructed() override; + void OnAssistantControllerDestroying() override; + + // AssistantUiModelObserver: + void OnUiVisibilityChanged( + AssistantVisibility new_visibility, + AssistantVisibility old_visibility, + base::Optional<AssistantEntryPoint> entry_point, + base::Optional<AssistantExitPoint> exit_point) override; + + private: + // DefaultVoiceInteractionObserver: + void OnVoiceInteractionContextEnabled(bool enabled) override; + + void UpdateConversationStarters(); + + AssistantController* const assistant_controller_; // Owned by Shell. + + AssistantSuggestionsModel model_; + + DISALLOW_COPY_AND_ASSIGN(AssistantSuggestionsController); +}; + +} // namespace ash + +#endif // ASH_ASSISTANT_ASSISTANT_SUGGESTIONS_CONTROLLER_H_
diff --git a/ash/assistant/assistant_view_delegate_impl.cc b/ash/assistant/assistant_view_delegate_impl.cc index 9c38e6b..0ef7324c 100644 --- a/ash/assistant/assistant_view_delegate_impl.cc +++ b/ash/assistant/assistant_view_delegate_impl.cc
@@ -4,12 +4,12 @@ #include "ash/assistant/assistant_view_delegate_impl.h" -#include "ash/assistant/assistant_cache_controller.h" #include "ash/assistant/assistant_controller.h" #include "ash/assistant/assistant_controller_observer.h" #include "ash/assistant/assistant_interaction_controller.h" #include "ash/assistant/assistant_notification_controller.h" #include "ash/assistant/assistant_prefs_controller.h" +#include "ash/assistant/assistant_suggestions_controller.h" #include "ash/shell.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" @@ -21,10 +21,6 @@ AssistantViewDelegateImpl::~AssistantViewDelegateImpl() = default; -const AssistantCacheModel* AssistantViewDelegateImpl::GetCacheModel() const { - return assistant_controller_->cache_controller()->model(); -} - const AssistantInteractionModel* AssistantViewDelegateImpl::GetInteractionModel() const { return assistant_controller_->interaction_controller()->model(); @@ -35,6 +31,11 @@ return assistant_controller_->notification_controller()->model(); } +const AssistantSuggestionsModel* +AssistantViewDelegateImpl::GetSuggestionsModel() const { + return assistant_controller_->suggestions_controller()->model(); +} + const AssistantUiModel* AssistantViewDelegateImpl::GetUiModel() const { return assistant_controller_->ui_controller()->model(); } @@ -49,14 +50,14 @@ view_delegate_observers_.RemoveObserver(observer); } -void AssistantViewDelegateImpl::AddCacheModelObserver( - AssistantCacheModelObserver* observer) { - assistant_controller_->cache_controller()->AddModelObserver(observer); +void AssistantViewDelegateImpl::AddStateObserver( + AssistantStateObserver* observer) { + assistant_controller_->state()->AddObserver(observer); } -void AssistantViewDelegateImpl::RemoveCacheModelObserver( - AssistantCacheModelObserver* observer) { - assistant_controller_->cache_controller()->RemoveModelObserver(observer); +void AssistantViewDelegateImpl::RemoveStateObserver( + AssistantStateObserver* observer) { + assistant_controller_->state()->RemoveObserver(observer); } void AssistantViewDelegateImpl::AddInteractionModelObserver( @@ -81,14 +82,15 @@ observer); } -void AssistantViewDelegateImpl::AddStateObserver( - AssistantStateObserver* observer) { - assistant_controller_->state()->AddObserver(observer); +void AssistantViewDelegateImpl::AddSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) { + assistant_controller_->suggestions_controller()->AddModelObserver(observer); } -void AssistantViewDelegateImpl::RemoveStateObserver( - AssistantStateObserver* observer) { - assistant_controller_->state()->RemoveObserver(observer); +void AssistantViewDelegateImpl::RemoveSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) { + assistant_controller_->suggestions_controller()->RemoveModelObserver( + observer); } void AssistantViewDelegateImpl::AddUiModelObserver(
diff --git a/ash/assistant/assistant_view_delegate_impl.h b/ash/assistant/assistant_view_delegate_impl.h index 7b43659..a0970ea 100644 --- a/ash/assistant/assistant_view_delegate_impl.h +++ b/ash/assistant/assistant_view_delegate_impl.h
@@ -23,14 +23,14 @@ const std::map<std::string, std::string>& params); // AssistantViewDelegate: - const AssistantCacheModel* GetCacheModel() const override; const AssistantInteractionModel* GetInteractionModel() const override; const AssistantNotificationModel* GetNotificationModel() const override; + const AssistantSuggestionsModel* GetSuggestionsModel() const override; const AssistantUiModel* GetUiModel() const override; void AddObserver(AssistantViewDelegateObserver* observer) override; void RemoveObserver(AssistantViewDelegateObserver* observer) override; - void AddCacheModelObserver(AssistantCacheModelObserver* observer) override; - void RemoveCacheModelObserver(AssistantCacheModelObserver* observer) override; + void AddStateObserver(AssistantStateObserver* observer) override; + void RemoveStateObserver(AssistantStateObserver* observer) override; void AddInteractionModelObserver( AssistantInteractionModelObserver* observer) override; void RemoveInteractionModelObserver( @@ -39,8 +39,10 @@ AssistantNotificationModelObserver* observer) override; void RemoveNotificationModelObserver( AssistantNotificationModelObserver* observer) override; - void AddStateObserver(AssistantStateObserver* observer) override; - void RemoveStateObserver(AssistantStateObserver* observer) override; + void AddSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) override; + void RemoveSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) override; void AddUiModelObserver(AssistantUiModelObserver* observer) override; void RemoveUiModelObserver(AssistantUiModelObserver* observer) override; CaptionBarDelegate* GetCaptionBarDelegate() override;
diff --git a/ash/assistant/model/BUILD.gn b/ash/assistant/model/BUILD.gn index 767e5ef..dd18c20 100644 --- a/ash/assistant/model/BUILD.gn +++ b/ash/assistant/model/BUILD.gn
@@ -13,9 +13,6 @@ "assistant_alarm_timer_model.cc", "assistant_alarm_timer_model.h", "assistant_alarm_timer_model_observer.h", - "assistant_cache_model.cc", - "assistant_cache_model.h", - "assistant_cache_model_observer.h", "assistant_interaction_model.cc", "assistant_interaction_model.h", "assistant_interaction_model_observer.h", @@ -31,6 +28,9 @@ "assistant_screen_context_model.cc", "assistant_screen_context_model.h", "assistant_screen_context_model_observer.h", + "assistant_suggestions_model.cc", + "assistant_suggestions_model.h", + "assistant_suggestions_model_observer.h", "assistant_ui_element.cc", "assistant_ui_element.h", "assistant_ui_model.cc",
diff --git a/ash/assistant/model/assistant_cache_model.cc b/ash/assistant/model/assistant_suggestions_model.cc similarity index 63% rename from ash/assistant/model/assistant_cache_model.cc rename to ash/assistant/model/assistant_suggestions_model.cc index 6b301c0d..6eee1db0 100644 --- a/ash/assistant/model/assistant_cache_model.cc +++ b/ash/assistant/model/assistant_suggestions_model.cc
@@ -2,26 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/assistant/model/assistant_cache_model.h" +#include "ash/assistant/model/assistant_suggestions_model.h" -#include "ash/assistant/model/assistant_cache_model_observer.h" +#include "ash/assistant/model/assistant_suggestions_model_observer.h" namespace ash { -AssistantCacheModel::AssistantCacheModel() = default; +AssistantSuggestionsModel::AssistantSuggestionsModel() = default; -AssistantCacheModel::~AssistantCacheModel() = default; +AssistantSuggestionsModel::~AssistantSuggestionsModel() = default; -void AssistantCacheModel::AddObserver(AssistantCacheModelObserver* observer) { +void AssistantSuggestionsModel::AddObserver( + AssistantSuggestionsModelObserver* observer) { observers_.AddObserver(observer); } -void AssistantCacheModel::RemoveObserver( - AssistantCacheModelObserver* observer) { +void AssistantSuggestionsModel::RemoveObserver( + AssistantSuggestionsModelObserver* observer) { observers_.RemoveObserver(observer); } -void AssistantCacheModel::SetConversationStarters( +void AssistantSuggestionsModel::SetConversationStarters( std::vector<AssistantSuggestionPtr> conversation_starters) { conversation_starters_.clear(); conversation_starters_.swap(conversation_starters); @@ -30,7 +31,7 @@ } const chromeos::assistant::mojom::AssistantSuggestion* -AssistantCacheModel::GetConversationStarterById(int id) const { +AssistantSuggestionsModel::GetConversationStarterById(int id) const { // We consider the index of a conversation starter within our backing vector // to be its unique id. DCHECK_GE(id, 0); @@ -39,7 +40,7 @@ } std::map<int, const chromeos::assistant::mojom::AssistantSuggestion*> -AssistantCacheModel::GetConversationStarters() const { +AssistantSuggestionsModel::GetConversationStarters() const { std::map<int, const AssistantSuggestion*> conversation_starters; // We use index within our backing vector to represent unique id. @@ -50,11 +51,11 @@ return conversation_starters; } -void AssistantCacheModel::NotifyConversationStartersChanged() { +void AssistantSuggestionsModel::NotifyConversationStartersChanged() { const std::map<int, const AssistantSuggestion*> conversation_starters = GetConversationStarters(); - for (AssistantCacheModelObserver& observer : observers_) + for (AssistantSuggestionsModelObserver& observer : observers_) observer.OnConversationStartersChanged(conversation_starters); }
diff --git a/ash/assistant/model/assistant_cache_model.h b/ash/assistant/model/assistant_suggestions_model.h similarity index 62% rename from ash/assistant/model/assistant_cache_model.h rename to ash/assistant/model/assistant_suggestions_model.h index 814b133..8c535bd 100644 --- a/ash/assistant/model/assistant_cache_model.h +++ b/ash/assistant/model/assistant_suggestions_model.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_H_ -#define ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_H_ +#ifndef ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_H_ +#define ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_H_ #include <map> #include <vector> @@ -15,20 +15,20 @@ namespace ash { -class AssistantCacheModelObserver; +class AssistantSuggestionsModelObserver; -class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantCacheModel { +class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantSuggestionsModel { public: using AssistantSuggestion = chromeos::assistant::mojom::AssistantSuggestion; using AssistantSuggestionPtr = chromeos::assistant::mojom::AssistantSuggestionPtr; - AssistantCacheModel(); - ~AssistantCacheModel(); + AssistantSuggestionsModel(); + ~AssistantSuggestionsModel(); - // Adds/removes the specified cache model |observer|. - void AddObserver(AssistantCacheModelObserver* observer); - void RemoveObserver(AssistantCacheModelObserver* observer); + // Adds/removes the specified suggestions model |observer|. + void AddObserver(AssistantSuggestionsModelObserver* observer); + void RemoveObserver(AssistantSuggestionsModelObserver* observer); // Sets the cache of conversation starters. void SetConversationStarters( @@ -45,11 +45,11 @@ std::vector<AssistantSuggestionPtr> conversation_starters_; - base::ObserverList<AssistantCacheModelObserver> observers_; + base::ObserverList<AssistantSuggestionsModelObserver> observers_; - DISALLOW_COPY_AND_ASSIGN(AssistantCacheModel); + DISALLOW_COPY_AND_ASSIGN(AssistantSuggestionsModel); }; } // namespace ash -#endif // ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_H_ +#endif // ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_H_
diff --git a/ash/assistant/model/assistant_cache_model_observer.h b/ash/assistant/model/assistant_suggestions_model_observer.h similarity index 68% rename from ash/assistant/model/assistant_cache_model_observer.h rename to ash/assistant/model/assistant_suggestions_model_observer.h index 571ee95a..4cdb9a3 100644 --- a/ash/assistant/model/assistant_cache_model_observer.h +++ b/ash/assistant/model/assistant_suggestions_model_observer.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_OBSERVER_H_ -#define ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_OBSERVER_H_ +#ifndef ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_ +#define ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_ #include <map> @@ -15,8 +15,8 @@ namespace ash { // A checked observer which receives notification of changes to the Assistant -// cache. -class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantCacheModelObserver +// suggestions model. +class COMPONENT_EXPORT(ASSISTANT_MODEL) AssistantSuggestionsModelObserver : public base::CheckedObserver { public: using AssistantSuggestion = chromeos::assistant::mojom::AssistantSuggestion; @@ -26,9 +26,9 @@ const std::map<int, const AssistantSuggestion*>& conversation_starters) {} protected: - ~AssistantCacheModelObserver() override = default; + ~AssistantSuggestionsModelObserver() override = default; }; } // namespace ash -#endif // ASH_ASSISTANT_MODEL_ASSISTANT_CACHE_MODEL_OBSERVER_H_ +#endif // ASH_ASSISTANT_MODEL_ASSISTANT_SUGGESTIONS_MODEL_OBSERVER_H_
diff --git a/ash/assistant/ui/assistant_view_delegate.h b/ash/assistant/ui/assistant_view_delegate.h index 4a59cd24..6fa120a8 100644 --- a/ash/assistant/ui/assistant_view_delegate.h +++ b/ash/assistant/ui/assistant_view_delegate.h
@@ -9,12 +9,12 @@ #include <string> #include "ash/assistant/assistant_prefs_controller.h" -#include "ash/assistant/model/assistant_cache_model.h" -#include "ash/assistant/model/assistant_cache_model_observer.h" #include "ash/assistant/model/assistant_interaction_model.h" #include "ash/assistant/model/assistant_interaction_model_observer.h" #include "ash/assistant/model/assistant_notification_model.h" #include "ash/assistant/model/assistant_notification_model_observer.h" +#include "ash/assistant/model/assistant_suggestions_model.h" +#include "ash/assistant/model/assistant_suggestions_model_observer.h" #include "ash/assistant/model/assistant_ui_model.h" #include "ash/assistant/model/assistant_ui_model_observer.h" #include "ash/assistant/ui/assistant_mini_view.h" @@ -74,15 +74,15 @@ virtual ~AssistantViewDelegate() {} - // Gets the cache model associated with the view delegate. - virtual const AssistantCacheModel* GetCacheModel() const = 0; - // Gets the interaction model associated with the view delegate. virtual const AssistantInteractionModel* GetInteractionModel() const = 0; // Gets the notification model associated with the view delegate. virtual const AssistantNotificationModel* GetNotificationModel() const = 0; + // Gets the suggestions model associated with the view delegate. + virtual const AssistantSuggestionsModel* GetSuggestionsModel() const = 0; + // Gets the ui model associated with the view delegate. virtual const AssistantUiModel* GetUiModel() const = 0; @@ -90,10 +90,9 @@ virtual void AddObserver(AssistantViewDelegateObserver* observer) = 0; virtual void RemoveObserver(AssistantViewDelegateObserver* observer) = 0; - // Adds/removes the cache model observer associated with the view delegate. - virtual void AddCacheModelObserver(AssistantCacheModelObserver* observer) = 0; - virtual void RemoveCacheModelObserver( - AssistantCacheModelObserver* observer) = 0; + // Adds/removes the state observer associated with the view delegate. + virtual void AddStateObserver(AssistantStateObserver* observer) = 0; + virtual void RemoveStateObserver(AssistantStateObserver* observer) = 0; // Adds/removes the interaction model observer associated with the view // delegate. @@ -109,14 +108,17 @@ virtual void RemoveNotificationModelObserver( AssistantNotificationModelObserver* observer) = 0; + // Adds/removes the suggestions model observer associated with the view + // delegate. + virtual void AddSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) = 0; + virtual void RemoveSuggestionsModelObserver( + AssistantSuggestionsModelObserver* observer) = 0; + // Adds/removes the ui model observer associated with the view delegate. virtual void AddUiModelObserver(AssistantUiModelObserver* observer) = 0; virtual void RemoveUiModelObserver(AssistantUiModelObserver* observer) = 0; - // Adds/removes the state observer associated with the view delegate. - virtual void AddStateObserver(AssistantStateObserver* observer) = 0; - virtual void RemoveStateObserver(AssistantStateObserver* observer) = 0; - // Gets the caption bar delegate associated with the view delegate. virtual CaptionBarDelegate* GetCaptionBarDelegate() = 0;
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc index fc3e270..a7fb9db 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -34,15 +34,15 @@ InitLayout(); // The AssistantViewDelegate should outlive SuggestionContainerView. - delegate_->AddCacheModelObserver(this); delegate_->AddInteractionModelObserver(this); + delegate_->AddSuggestionsModelObserver(this); delegate_->AddUiModelObserver(this); } SuggestionContainerView::~SuggestionContainerView() { delegate_->RemoveUiModelObserver(this); + delegate_->RemoveSuggestionsModelObserver(this); delegate_->RemoveInteractionModelObserver(this); - delegate_->RemoveCacheModelObserver(this); } const char* SuggestionContainerView::GetClassName() const { @@ -82,13 +82,6 @@ views::BoxLayout::MainAxisAlignment::kCenter); } -void SuggestionContainerView::OnConversationStartersChanged( - const std::map<int, const AssistantSuggestion*>& conversation_starters) { - // TODO(dmblack): If UI is visible, we may want to animate this transition. - OnSuggestionsCleared(); - OnSuggestionsChanged(conversation_starters); -} - void SuggestionContainerView::OnResponseChanged( const std::shared_ptr<AssistantResponse>& response) { has_received_response_ = true; @@ -109,6 +102,12 @@ OnSuggestionsCleared(); } +void SuggestionContainerView::OnConversationStartersChanged( + const std::map<int, const AssistantSuggestion*>& conversation_starters) { + OnSuggestionsCleared(); + OnSuggestionsChanged(conversation_starters); +} + void SuggestionContainerView::OnSuggestionsChanged( const std::map<int, const AssistantSuggestion*>& suggestions) { using AssistantSuggestion = chromeos::assistant::mojom::AssistantSuggestion; @@ -175,8 +174,8 @@ // If we haven't yet received a query response, the suggestion chip that was // pressed was a conversation starter. if (!has_received_response_) { - suggestion = - delegate_->GetCacheModel()->GetConversationStarterById(sender->GetID()); + suggestion = delegate_->GetSuggestionsModel()->GetConversationStarterById( + sender->GetID()); } else { // Otherwise, the suggestion chip belonged to the interaction response. suggestion = @@ -197,7 +196,7 @@ // Show conversation starters at the start of a new Assistant session except // when the user already started a query in Launcher quick search box (QSB). OnConversationStartersChanged( - delegate_->GetCacheModel()->GetConversationStarters()); + delegate_->GetSuggestionsModel()->GetConversationStarters()); return; }
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.h b/ash/assistant/ui/main_stage/suggestion_container_view.h index 0f8883a..8747566 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.h +++ b/ash/assistant/ui/main_stage/suggestion_container_view.h
@@ -8,8 +8,8 @@ #include <map> #include <memory> -#include "ash/assistant/model/assistant_cache_model_observer.h" #include "ash/assistant/model/assistant_interaction_model_observer.h" +#include "ash/assistant/model/assistant_suggestions_model_observer.h" #include "ash/assistant/model/assistant_ui_model_observer.h" #include "ash/assistant/ui/base/assistant_scroll_view.h" #include "ash/assistant/ui/main_stage/suggestion_chip_view.h" @@ -31,8 +31,8 @@ // suggestion events. class COMPONENT_EXPORT(ASSISTANT_UI) SuggestionContainerView : public AssistantScrollView, - public AssistantCacheModelObserver, public AssistantInteractionModelObserver, + public AssistantSuggestionsModelObserver, public AssistantUiModelObserver, public views::ButtonListener { public: @@ -49,16 +49,16 @@ int GetHeightForWidth(int width) const override; void OnContentsPreferredSizeChanged(views::View* content_view) override; - // AssistantCacheModelObserver: - void OnConversationStartersChanged( - const std::map<int, const AssistantSuggestion*>& conversation_starters) - override; - // AssistantInteractionModelObserver: void OnResponseChanged( const std::shared_ptr<AssistantResponse>& response) override; void OnResponseCleared() override; + // AssistantSuggestionsModelObserver: + void OnConversationStartersChanged( + const std::map<int, const AssistantSuggestion*>& conversation_starters) + override; + // AssistantUiModelObserver: void OnUiVisibilityChanged( AssistantVisibility new_visibility,
diff --git a/ash/login/login_screen_controller.cc b/ash/login/login_screen_controller.cc index 38f7714a..1f3a4904 100644 --- a/ash/login/login_screen_controller.cc +++ b/ash/login/login_screen_controller.cc
@@ -199,11 +199,12 @@ bool LoginScreenController::ValidateParentAccessCode( const AccountId& account_id, - const std::string& code) { + const std::string& code, + base::Time validation_time) { if (!client_) return false; - return client_->ValidateParentAccessCode(account_id, code); + return client_->ValidateParentAccessCode(account_id, code, validation_time); } void LoginScreenController::HardlockPod(const AccountId& account_id) { @@ -370,11 +371,12 @@ void LoginScreenController::ShowParentAccessWidget( const AccountId& child_account_id, - base::RepeatingCallback<void(bool success)> callback, + OnParentAccessWidgetFinished callback, ParentAccessRequestReason reason, - bool extra_dimmer) { + bool extra_dimmer, + base::Time validation_time) { parent_access_widget_ = std::make_unique<ash::ParentAccessWidget>( - child_account_id, callback, reason, extra_dimmer); + child_account_id, callback, reason, extra_dimmer, validation_time); } void LoginScreenController::SetAllowLoginAsGuest(bool allow_guest) {
diff --git a/ash/login/login_screen_controller.h b/ash/login/login_screen_controller.h index 122ca7f7..a990c2c 100644 --- a/ash/login/login_screen_controller.h +++ b/ash/login/login_screen_controller.h
@@ -14,6 +14,7 @@ #include "ash/public/cpp/system_tray_focus_observer.h" #include "base/macros.h" #include "base/optional.h" +#include "base/time/time.h" #include "mojo/public/cpp/bindings/binding_set.h" class PrefRegistrySimple; @@ -45,10 +46,11 @@ // succeeded/failed. using OnAuthenticateCallback = base::OnceCallback<void(base::Optional<bool> success)>; - // Callback for parent access code validation. |success| is nullopt if - // validation did not run, otherwise it contains validation result. - using OnParentAccessValidation = - base::OnceCallback<void(base::Optional<bool> success)>; + // Callback for Parent Access Code validations. It is called when the widget + // is about to be dismissed. |success| tells whether the validation was + // successful. + using OnParentAccessWidgetFinished = + base::RepeatingCallback<void(bool success)>; explicit LoginScreenController(SystemTrayNotifier* system_tray_notifier); ~LoginScreenController() override; @@ -73,7 +75,8 @@ void AuthenticateUserWithChallengeResponse(const AccountId& account_id, OnAuthenticateCallback callback); bool ValidateParentAccessCode(const AccountId& account_id, - const std::string& code); + const std::string& code, + base::Time validation_time); void HardlockPod(const AccountId& account_id); void OnFocusPod(const AccountId& account_id); void OnNoPodFocused(); @@ -116,11 +119,11 @@ void EnableShutdownButton(bool enable) override; void ShowGuestButtonInOobe(bool show) override; void ShowParentAccessButton(bool show) override; - void ShowParentAccessWidget( - const AccountId& child_account_id, - base::RepeatingCallback<void(bool success)> callback, - ParentAccessRequestReason reason, - bool extra_dimmer) override; + void ShowParentAccessWidget(const AccountId& child_account_id, + OnParentAccessWidgetFinished callback, + ParentAccessRequestReason reason, + bool extra_dimmer, + base::Time validation_time) override; void SetAllowLoginAsGuest(bool allow_guest) override; std::unique_ptr<ScopedGuestButtonBlocker> GetScopedGuestButtonBlocker() override;
diff --git a/ash/login/mock_login_screen_client.cc b/ash/login/mock_login_screen_client.cc index 99a34282..bd4b9e3 100644 --- a/ash/login/mock_login_screen_client.cc +++ b/ash/login/mock_login_screen_client.cc
@@ -63,8 +63,9 @@ bool MockLoginScreenClient::ValidateParentAccessCode( const AccountId& account_id, - const std::string& code) { - ValidateParentAccessCode_(account_id, code); + const std::string& code, + base::Time validation_time) { + ValidateParentAccessCode_(account_id, code, validation_time); return validate_parent_access_code_result_; }
diff --git a/ash/login/mock_login_screen_client.h b/ash/login/mock_login_screen_client.h index 7008fbfd..5f0cc32 100644 --- a/ash/login/mock_login_screen_client.h +++ b/ash/login/mock_login_screen_client.h
@@ -6,6 +6,7 @@ #define ASH_LOGIN_MOCK_LOGIN_SCREEN_CLIENT_H_ #include "ash/public/cpp/login_screen_client.h" +#include "base/time/time.h" #include "components/password_manager/core/browser/hash_password_manager.h" #include "testing/gmock/include/gmock/gmock.h" @@ -29,9 +30,10 @@ MOCK_METHOD2(AuthenticateUserWithChallengeResponse_, void(const AccountId& account_id, base::OnceCallback<void(bool)>& callback)); - MOCK_METHOD2(ValidateParentAccessCode_, + MOCK_METHOD3(ValidateParentAccessCode_, bool(const AccountId& account_id, - const std::string& access_code)); + const std::string& access_code, + base::Time validation_time)); // Set the result that should be passed to |callback| in // |AuthenticateUserWithPasswordOrPin| or @@ -76,7 +78,8 @@ const AccountId& account_id, base::OnceCallback<void(bool)> callback) override; bool ValidateParentAccessCode(const AccountId& account_id, - const std::string& code) override; + const std::string& code, + base::Time validation_time) override; MOCK_METHOD1(AuthenticateUserWithEasyUnlock, void(const AccountId& account_id)); MOCK_METHOD1(HardlockPod, void(const AccountId& account_id));
diff --git a/ash/login/ui/lock_contents_view.cc b/ash/login/ui/lock_contents_view.cc index d3f4e48..e71051e9 100644 --- a/ash/login/ui/lock_contents_view.cc +++ b/ash/login/ui/lock_contents_view.cc
@@ -1497,7 +1497,8 @@ } } -void LockContentsView::OnAuthenticate(bool auth_success) { +void LockContentsView::OnAuthenticate(bool auth_success, + bool display_error_messages) { if (auth_success) { if (auth_error_bubble_->GetVisible()) auth_error_bubble_->Hide(); @@ -1517,7 +1518,8 @@ } } else { ++unlock_attempt_; - ShowAuthErrorMessage(); + if (display_error_messages) + ShowAuthErrorMessage(); } }
diff --git a/ash/login/ui/lock_contents_view.h b/ash/login/ui/lock_contents_view.h index 6c34ce8..0bd50c8 100644 --- a/ash/login/ui/lock_contents_view.h +++ b/ash/login/ui/lock_contents_view.h
@@ -277,7 +277,7 @@ void SwapActiveAuthBetweenPrimaryAndSecondary(bool is_primary); // Called when an authentication check is complete. - void OnAuthenticate(bool auth_success); + void OnAuthenticate(bool auth_success, bool display_error_messages); // Tries to lookup the stored state for |user|. Returns an unowned pointer // that is invalidated whenver |users_| changes.
diff --git a/ash/login/ui/login_auth_user_view.cc b/ash/login/ui/login_auth_user_view.cc index 94ba792f..8013578c 100644 --- a/ash/login/ui/login_auth_user_view.cc +++ b/ash/login/ui/login_auth_user_view.cc
@@ -72,6 +72,9 @@ // Distance from the top of the user view to the user icon. constexpr int kDistanceFromTopOfBigUserViewToUserIconDp = 54; +constexpr SkColor kChallengeResponseErrorColor = + SkColorSetRGB(0xEE, 0x67, 0x5C); + // The color of the online sign-in message text. constexpr SkColor kOnlineSignInMessageColor = SkColorSetRGB(0xE6, 0x7C, 0x73); @@ -93,6 +96,12 @@ constexpr int kFingerprintFailedAnimationDurationMs = 700; constexpr int kFingerprintFailedAnimationNumFrames = 45; +constexpr base::TimeDelta kChallengeResponseResetAfterFailureDelay = + base::TimeDelta::FromSeconds(5); +constexpr int kSpacingBetweenChallengeResponseIconAndLabelDp = 15; +constexpr int kChallengeResponseIconSizeDp = 32; +constexpr int kDistanceBetweenPasswordFieldAndChallengeResponseViewDp = 50; + constexpr int kDisabledAuthMessageVerticalBorderDp = 16; constexpr int kDisabledAuthMessageHorizontalBorderDp = 16; constexpr int kDisabledAuthMessageChildrenSpacingDp = 4; @@ -437,6 +446,113 @@ DISALLOW_COPY_AND_ASSIGN(FingerprintView); }; +// Consists of challenge-response icon view and a label. +class LoginAuthUserView::ChallengeResponseView : public views::View, + public views::ButtonListener { + public: + enum class State { kInitial, kAuthenticating, kFailure }; + + explicit ChallengeResponseView(base::RepeatingClosure on_start_tap) + : on_start_tap_(std::move(on_start_tap)) { + SetPaintToLayer(); + layer()->SetFillsBoundsOpaquely(false); + + auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, gfx::Insets(), + kSpacingBetweenChallengeResponseIconAndLabelDp)); + layout->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::kCenter); + + image_button_ = AddChildView(std::make_unique<views::ImageButton>( + /*listener=*/this)); + image_button_->SetImage(views::Button::STATE_NORMAL, + GetIconForImageButton()); + + label_button_ = AddChildView(std::make_unique<views::LabelButton>( + /*listener=*/this, /*text=*/base::string16())); + for (auto button_state : + {views::Button::STATE_NORMAL, views::Button::STATE_HOVERED, + views::Button::STATE_PRESSED, views::Button::STATE_DISABLED}) { + label_button_->SetTextColor(button_state, SK_ColorWHITE); + } + label_button_->SetText(GetTextForLabelButton()); + } + + ~ChallengeResponseView() override = default; + + // views::ButtonListener: + void ButtonPressed(views::Button* sender, const ui::Event& event) override { + if (sender == image_button_ || sender == label_button_) { + if (state_ == State::kInitial) + on_start_tap_.Run(); + else if (state_ == State::kFailure) + SetState(State::kInitial); + else + NOTREACHED(); + } else { + NOTREACHED(); + } + } + + void SetState(State state) { + if (state_ == state) + return; + state_ = state; + + reset_state_timer_.Stop(); + if (state == State::kFailure) { + reset_state_timer_.Start( + FROM_HERE, kChallengeResponseResetAfterFailureDelay, + base::BindRepeating(&ChallengeResponseView::SetState, + base::Unretained(this), State::kInitial)); + } + + image_button_->SetImage(views::Button::STATE_NORMAL, + GetIconForImageButton()); + image_button_->SetEnabled(state_ != State::kAuthenticating); + + label_button_->SetText(GetTextForLabelButton()); + label_button_->SetEnabled(state_ != State::kAuthenticating); + + Layout(); + } + + private: + gfx::ImageSkia GetIconForImageButton() const { + switch (state_) { + case State::kInitial: + case State::kAuthenticating: + return gfx::CreateVectorIcon(kLockScreenSmartCardIcon, + kChallengeResponseIconSizeDp, + SK_ColorWHITE); + case State::kFailure: + return gfx::CreateVectorIcon(kLockScreenSmartCardFailureIcon, + kChallengeResponseIconSizeDp, + kChallengeResponseErrorColor); + } + } + + base::string16 GetTextForLabelButton() const { + // TODO(crbug.com/983103): Put localized strings after the string review. + switch (state_) { + case State::kInitial: + case State::kAuthenticating: + return base::ASCIIToUTF16("Unlock with smart card"); + case State::kFailure: + return base::UTF8ToUTF16( + "Couldn’t recognize your smart card. Try again."); + } + } + + base::RepeatingClosure on_start_tap_; + State state_ = State::kInitial; + views::ImageButton* image_button_ = nullptr; + views::LabelButton* label_button_ = nullptr; + base::OneShotTimer reset_state_timer_; + + DISALLOW_COPY_AND_ASSIGN(ChallengeResponseView); +}; + // The message shown to user when the auth method is |AUTH_DISABLED|. class LoginAuthUserView::DisabledAuthMessageView : public views::View { public: @@ -643,6 +759,12 @@ auto fingerprint_view = std::make_unique<FingerprintView>(); fingerprint_view_ = fingerprint_view.get(); + auto challenge_response_view = + std::make_unique<ChallengeResponseView>(base::BindRepeating( + &LoginAuthUserView::AttemptAuthenticateWithChallengeResponse, + weak_factory_.GetWeakPtr())); + challenge_response_view_ = challenge_response_view.get(); + // TODO(jdufault): Implement real UI. external_binary_auth_button_ = views::MdTextButton::Create( @@ -653,12 +775,6 @@ this, base::ASCIIToUTF16("Enroll with external binary")) .release(); - // TODO(crbug.com/983103): Replace with the real UI. - challenge_response_auth_button_ = - views::MdTextButton::Create(this, - base::ASCIIToUTF16("Unlock with smart card")) - .release(); - SetPaintToLayer(ui::LayerType::LAYER_NOT_DRAWN); // Build layout. @@ -681,15 +797,15 @@ login_views_utils::WrapViewForPreferredSize(std::move(pin_view)); auto wrapped_fingerprint_view = login_views_utils::WrapViewForPreferredSize(std::move(fingerprint_view)); + auto wrapped_challenge_response_view = + login_views_utils::WrapViewForPreferredSize( + std::move(challenge_response_view)); auto wrapped_external_binary_view = login_views_utils::WrapViewForPreferredSize( base::WrapUnique(external_binary_auth_button_)); auto wrapped_external_binary_enrollment_view = login_views_utils::WrapViewForPreferredSize( base::WrapUnique(external_binary_enrollment_button_)); - auto wrapped_challenge_response_view = - login_views_utils::WrapViewForPreferredSize( - base::WrapUnique(challenge_response_auth_button_)); auto wrapped_padding_below_password_view = login_views_utils::WrapViewForPreferredSize( std::move(padding_below_password_view)); @@ -704,12 +820,12 @@ views::View* wrapped_pin_view_ptr = AddChildView(std::move(wrapped_pin_view)); views::View* wrapped_fingerprint_view_ptr = AddChildView(std::move(wrapped_fingerprint_view)); + views::View* wrapped_challenge_response_view_ptr = + AddChildView(std::move(wrapped_challenge_response_view)); views::View* wrapped_external_binary_view_ptr = AddChildView(std::move(wrapped_external_binary_view)); views::View* wrapped_external_binary_enrollment_view_ptr = AddChildView(std::move(wrapped_external_binary_enrollment_view)); - views::View* wrapped_challenge_response_view_ptr = - AddChildView(std::move(wrapped_challenge_response_view)); views::View* wrapped_user_view_ptr = AddChildView(std::move(wrapped_user_view)); views::View* wrapped_padding_below_password_view_ptr = @@ -741,9 +857,9 @@ add_view(wrapped_padding_below_password_view_ptr); add_view(wrapped_pin_view_ptr); add_view(wrapped_fingerprint_view_ptr); + add_view(wrapped_challenge_response_view_ptr); add_view(wrapped_external_binary_view_ptr); add_view(wrapped_external_binary_enrollment_view_ptr); - add_view(wrapped_challenge_response_view_ptr); add_padding(kDistanceFromPinKeyboardToBigUserViewBottomDp); // Update authentication UI. @@ -811,9 +927,9 @@ pin_view_->SetVisible(has_pin); fingerprint_view_->SetVisible(has_fingerprint); + challenge_response_view_->SetVisible(has_challenge_response); external_binary_auth_button_->SetVisible(has_external_binary); external_binary_enrollment_button_->SetVisible(has_external_binary); - challenge_response_auth_button_->SetVisible(has_challenge_response); if (has_external_binary) { power_manager_client_observer_.Add(chromeos::PowerManagerClient::Get()); @@ -822,6 +938,9 @@ int padding_view_height = kDistanceBetweenPasswordFieldAndPinKeyboardDp; if (has_fingerprint && !has_pin) { padding_view_height = kDistanceBetweenPasswordFieldAndFingerprintViewDp; + } else if (has_challenge_response && !has_pin) { + padding_view_height = + kDistanceBetweenPasswordFieldAndChallengeResponseViewDp; } padding_below_password_view_->SetPreferredSize( gfx::Size(kNonEmptyWidthDp, padding_view_height)); @@ -1066,8 +1185,7 @@ const ui::Event& event) { DCHECK(sender == online_sign_in_message_ || sender == external_binary_auth_button_ || - sender == external_binary_enrollment_button_ || - sender == challenge_response_auth_button_); + sender == external_binary_enrollment_button_); if (sender == online_sign_in_message_) { OnOnlineSignInMessageTap(); } else if (sender == external_binary_auth_button_) { @@ -1079,8 +1197,6 @@ Shell::Get()->login_screen_controller()->EnrollUserWithExternalBinary( base::BindOnce(&LoginAuthUserView::OnEnrollmentComplete, weak_factory_.GetWeakPtr())); - } else if (sender == challenge_response_auth_button_) { - AttemptAuthenticateWithChallengeResponse(); } } @@ -1123,10 +1239,20 @@ password_view_->SetReadOnly(false); external_binary_auth_button_->SetEnabled(true); external_binary_enrollment_button_->SetEnabled(true); - challenge_response_auth_button_->SetEnabled(true); } - on_auth_.Run(auth_success.value()); + on_auth_.Run(auth_success.value(), /*display_error_messages=*/true); +} + +void LoginAuthUserView::OnChallengeResponseAuthComplete( + base::Optional<bool> auth_success) { + if (!auth_success.has_value() || !auth_success.value()) { + password_view_->Clear(); + password_view_->SetReadOnly(false); + challenge_response_view_->SetState(ChallengeResponseView::State::kFailure); + } + + on_auth_.Run(auth_success.value_or(false), /*display_error_messages=*/false); } void LoginAuthUserView::OnEnrollmentComplete( @@ -1180,12 +1306,13 @@ } void LoginAuthUserView::AttemptAuthenticateWithChallengeResponse() { - challenge_response_auth_button_->SetEnabled(false); + challenge_response_view_->SetState( + ChallengeResponseView::State::kAuthenticating); Shell::Get() ->login_screen_controller() ->AuthenticateUserWithChallengeResponse( current_user().basic_user_info.account_id, - base::BindOnce(&LoginAuthUserView::OnAuthComplete, + base::BindOnce(&LoginAuthUserView::OnChallengeResponseAuthComplete, weak_factory_.GetWeakPtr())); }
diff --git a/ash/login/ui/login_auth_user_view.h b/ash/login/ui/login_auth_user_view.h index 24282b33..49740f6da 100644 --- a/ash/login/ui/login_auth_user_view.h +++ b/ash/login/ui/login_auth_user_view.h
@@ -61,7 +61,9 @@ LoginAuthUserView* const view_; }; - using OnAuthCallback = base::RepeatingCallback<void(bool auth_success)>; + using OnAuthCallback = + base::RepeatingCallback<void(bool auth_success, + bool display_error_messages)>; using OnEasyUnlockIconTapped = base::RepeatingClosure; using OnEasyUnlockIconHovered = base::RepeatingClosure; @@ -160,12 +162,17 @@ private: struct AnimationState; class FingerprintView; + class ChallengeResponseView; class DisabledAuthMessageView; // Called when the user submits an auth method. Runs mojo call. void OnAuthSubmit(const base::string16& password); - // Called with the result of the request started in |OnAuthSubmit|. + // Called with the result of the request started in |OnAuthSubmit| or + // |AttemptAuthenticateWithExternalBinary|. void OnAuthComplete(base::Optional<bool> auth_success); + // Called with the result of the request started in + // |AttemptAuthenticateWithChallengeResponse|. + void OnChallengeResponseAuthComplete(base::Optional<bool> auth_success); // Called with the result of the external binary enrollment request. void OnEnrollmentComplete(base::Optional<bool> enrollment_success); @@ -203,9 +210,9 @@ views::LabelButton* online_sign_in_message_ = nullptr; DisabledAuthMessageView* disabled_auth_message_ = nullptr; FingerprintView* fingerprint_view_ = nullptr; + ChallengeResponseView* challenge_response_view_ = nullptr; views::LabelButton* external_binary_auth_button_ = nullptr; views::LabelButton* external_binary_enrollment_button_ = nullptr; - views::LabelButton* challenge_response_auth_button_ = nullptr; // Displays padding between: // 1. Password field and pin keyboard
diff --git a/ash/login/ui/login_big_user_view.cc b/ash/login/ui/login_big_user_view.cc index 130fc8ad..f318ba5d 100644 --- a/ash/login/ui/login_big_user_view.cc +++ b/ash/login/ui/login_big_user_view.cc
@@ -90,7 +90,8 @@ DCHECK(IsChildAccountUser(auth_user_->current_user())); parent_access_ = new ParentAccessView( auth_user_->current_user().basic_user_info.account_id, - parent_access_callbacks_, ParentAccessRequestReason::kUnlockTimeLimits); + parent_access_callbacks_, ParentAccessRequestReason::kUnlockTimeLimits, + base::Time()); RemoveChildView(auth_user_); AddChildView(parent_access_); RequestFocus();
diff --git a/ash/login/ui/login_expanded_public_account_view.cc b/ash/login/ui/login_expanded_public_account_view.cc index 7e663f6..44428a1 100644 --- a/ash/login/ui/login_expanded_public_account_view.cc +++ b/ash/login/ui/login_expanded_public_account_view.cc
@@ -438,9 +438,16 @@ show_advanced_changed_by_user_ = true; Layout(); } else if (sender == submit_button_) { - Shell::Get()->login_screen_controller()->LaunchPublicSession( - current_user_.basic_user_info.account_id, - selected_language_item_.value, selected_keyboard_item_.value); + // TODO(crbug.com/984021) change to LaunchSamlPublicSession which would + // take selected_language_item_.value, selected_keyboard_item_.value too. + if (current_user_.public_account_info->using_saml) { + Shell::Get()->login_screen_controller()->ShowGaiaSignin( + true /*can_close*/, current_user_.basic_user_info.account_id); + } else { + Shell::Get()->login_screen_controller()->LaunchPublicSession( + current_user_.basic_user_info.account_id, + selected_language_item_.value, selected_keyboard_item_.value); + } } else if (sender == language_selection_) { DCHECK(language_menu_view_); if (language_menu_view_->GetVisible()) {
diff --git a/ash/login/ui/login_user_menu_view.cc b/ash/login/ui/login_user_menu_view.cc index 1adaba4c..7263964 100644 --- a/ash/login/ui/login_user_menu_view.cc +++ b/ash/login/ui/login_user_menu_view.cc
@@ -12,6 +12,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/display/display.h" #include "ui/display/screen.h" +#include "ui/views/accessibility/view_accessibility.h" #include "ui/views/controls/separator.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/fill_layout.h" @@ -93,24 +94,6 @@ DISALLOW_COPY_AND_ASSIGN(RemoveUserButton); }; -// A view that has a customizable accessible name. -class ViewWithAccessibleName : public views::View { - public: - ViewWithAccessibleName(const base::string16& accessible_name) - : accessible_name_(accessible_name) {} - ~ViewWithAccessibleName() override = default; - - // views::View: - void GetAccessibleNodeData(ui::AXNodeData* node_data) override { - node_data->role = ax::mojom::Role::kStaticText; - node_data->SetName(accessible_name_); - } - - private: - const base::string16 accessible_name_; - DISALLOW_COPY_AND_ASSIGN(ViewWithAccessibleName); -}; - LoginUserMenuView::TestApi::TestApi(LoginUserMenuView* bubble) : bubble_(bubble) {} @@ -221,8 +204,10 @@ base::string16 part2 = l10n_util::GetStringFUTF16( IDS_ASH_LOGIN_POD_NON_OWNER_USER_REMOVE_WARNING_PART_2, email); - remove_user_confirm_data_ = setup_horizontal_margin_container( - new ViewWithAccessibleName(part1 + base::ASCIIToUTF16(" ") + part2)); + warning_message_ = part1 + base::ASCIIToUTF16(" ") + part2; + + remove_user_confirm_data_ = + setup_horizontal_margin_container(new views::View()); remove_user_confirm_data_->SetVisible(false); // Account for margin that was removed below the separator for the add @@ -258,6 +243,9 @@ if (remove_user_confirm_data_) { remove_user_confirm_data_->SetVisible(false); remove_user_label_->SetEnabledColor(kRemoveUserInitialColor); + // Reset button's description to none. + remove_user_button_->GetViewAccessibility().OverrideDescription( + base::string16()); } } @@ -275,13 +263,10 @@ Layout(); - // Fire an accessibility alert to make ChromeVox read the warning message - // and remove button. - remove_user_confirm_data_->NotifyAccessibilityEvent( - ax::mojom::Event::kAlert, true /*send_native_event*/); - remove_user_button_->NotifyAccessibilityEvent(ax::mojom::Event::kAlert, - true /*send_native_event*/); - + // Change the node's description to force assistive technologies, like + // ChromeVox, to report the updated description. + remove_user_button_->GetViewAccessibility().OverrideDescription( + warning_message_); if (on_remove_user_warning_shown_) std::move(on_remove_user_warning_shown_).Run(); return;
diff --git a/ash/login/ui/login_user_menu_view.h b/ash/login/ui/login_user_menu_view.h index 2bd29a3..bb52fff 100644 --- a/ash/login/ui/login_user_menu_view.h +++ b/ash/login/ui/login_user_menu_view.h
@@ -69,6 +69,8 @@ RemoveUserButton* remove_user_button_ = nullptr; views::Label* username_label_ = nullptr; + base::string16 warning_message_; + DISALLOW_COPY_AND_ASSIGN(LoginUserMenuView); };
diff --git a/ash/login/ui/parent_access_view.cc b/ash/login/ui/parent_access_view.cc index 2f89aff..16659bb7 100644 --- a/ash/login/ui/parent_access_view.cc +++ b/ash/login/ui/parent_access_view.cc
@@ -458,8 +458,12 @@ ParentAccessView::ParentAccessView(const AccountId& account_id, const Callbacks& callbacks, - ParentAccessRequestReason reason) - : callbacks_(callbacks), account_id_(account_id), request_reason_(reason) { + ParentAccessRequestReason reason, + base::Time validation_time) + : callbacks_(callbacks), + account_id_(account_id), + request_reason_(reason), + validation_time_(validation_time) { DCHECK(callbacks.on_finished); // Main view contains all other views aligned vertically and centered. @@ -714,7 +718,8 @@ bool result = Shell::Get()->login_screen_controller()->ValidateParentAccessCode( - account_id_, *code); + account_id_, *code, + validation_time_.is_null() ? base::Time::Now() : validation_time_); if (result) { VLOG(1) << "Parent access code successfully validated";
diff --git a/ash/login/ui/parent_access_view.h b/ash/login/ui/parent_access_view.h index 605bbe9c..3c7863f 100644 --- a/ash/login/ui/parent_access_view.h +++ b/ash/login/ui/parent_access_view.h
@@ -15,6 +15,7 @@ #include "base/memory/weak_ptr.h" #include "base/optional.h" #include "base/scoped_observer.h" +#include "base/time/time.h" #include "components/account_id/account_id.h" #include "ui/views/controls/button/button.h" #include "ui/views/window/dialog_delegate.h" @@ -84,10 +85,13 @@ // device, when it is empty. |callbacks| will be called when user performs // certain actions. |reason| contains information about why the parent access // view is necessary, it is used to modify the view appearance by changing the - // title and description strings and background color. + // title and description strings and background color. |validation_time| is + // the time that will be used to validate the code, if null the system's + // current time will be used. ParentAccessView(const AccountId& account_id, const Callbacks& callbacks, - ParentAccessRequestReason reason); + ParentAccessRequestReason reason, + base::Time validation_time); ~ParentAccessView() override; // views::View: @@ -140,6 +144,10 @@ // The appearance of the view depends on |request_reason_|. const ParentAccessRequestReason request_reason_; + // Time used to validate the code. When this is null, the current system time + // is used. + const base::Time validation_time_; + State state_ = State::kNormal; views::Label* title_label_ = nullptr;
diff --git a/ash/login/ui/parent_access_view_unittest.cc b/ash/login/ui/parent_access_view_unittest.cc index 356ec45..e1cbc7c 100644 --- a/ash/login/ui/parent_access_view_unittest.cc +++ b/ash/login/ui/parent_access_view_unittest.cc
@@ -20,6 +20,7 @@ #include "base/macros.h" #include "base/optional.h" #include "base/test/bind_test_util.h" +#include "base/time/time.h" #include "components/account_id/account_id.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" @@ -92,7 +93,9 @@ callbacks.on_finished = base::BindRepeating( &ParentAccessViewTest::OnFinished, base::Unretained(this)); - view_ = new ParentAccessView(account_id_, callbacks, reason); + validation_time_ = base::Time::Now(); + view_ = + new ParentAccessView(account_id_, callbacks, reason, validation_time_); SetWidget(CreateWidgetWithContent(view_)); } @@ -105,6 +108,9 @@ // Number of times the view was dismissed after successful validation. int successful_validation_ = 0; + // Time that will be used on the code validation. + base::Time validation_time_; + ParentAccessView* view_ = nullptr; // Owned by test widget view hierarchy. private: @@ -161,7 +167,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button()); @@ -182,7 +189,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button()); @@ -205,7 +213,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345", + validation_time_)) .Times(1); generator->PressKey(ui::KeyboardCode::VKEY_RETURN, ui::EF_NONE); @@ -242,7 +251,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012349")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012349", + validation_time_)) .Times(1); // Now the code should be submitted with enter key. @@ -291,7 +301,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "111123")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "111123", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button()); @@ -315,7 +326,8 @@ EXPECT_TRUE(test_api.submit_button()->GetEnabled()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button()); @@ -353,7 +365,8 @@ // Error should be shown after unsuccessful validation. login_client_->set_validate_parent_access_code_result(false); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012345", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button()); @@ -372,7 +385,8 @@ EXPECT_EQ(ParentAccessView::State::kNormal, test_api.state()); login_client_->set_validate_parent_access_code_result(true); - EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012346")) + EXPECT_CALL(*login_client_, ValidateParentAccessCode_(account_id_, "012346", + validation_time_)) .Times(1); SimulateButtonPress(test_api.submit_button());
diff --git a/ash/login/ui/parent_access_widget.cc b/ash/login/ui/parent_access_widget.cc index e8a3a117..17b5491 100644 --- a/ash/login/ui/parent_access_widget.cc +++ b/ash/login/ui/parent_access_widget.cc
@@ -19,7 +19,8 @@ ParentAccessWidget::ParentAccessWidget(const AccountId& account_id, const OnExitCallback& callback, ParentAccessRequestReason reason, - bool use_extra_dimmer) + bool extra_dimmer, + base::Time validation_time) : callback_(callback) { views::Widget::InitParams widget_params; // Using window frameless to be able to get focus on the view input fields, @@ -41,9 +42,10 @@ ParentAccessView::Callbacks callbacks; callbacks.on_finished = base::BindRepeating(&ParentAccessWidget::OnExit, weak_factory_.GetWeakPtr()); - widget_params.delegate = new ParentAccessView(account_id, callbacks, reason); + widget_params.delegate = + new ParentAccessView(account_id, callbacks, reason, validation_time); - if (use_extra_dimmer) { + if (extra_dimmer) { dimmer_ = std::make_unique<WindowDimmer>(widget_params.parent); dimmer_->window()->Show(); }
diff --git a/ash/login/ui/parent_access_widget.h b/ash/login/ui/parent_access_widget.h index 499f466..ec94263 100644 --- a/ash/login/ui/parent_access_widget.h +++ b/ash/login/ui/parent_access_widget.h
@@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/optional.h" +#include "base/time/time.h" class AccountId; @@ -37,11 +38,15 @@ // about why the parent access view is necessary, it is used to modify the // widget appearance by changing the title and description strings and // background color. The parent access widget is a modal and already contains - // a dimmer, use |extra_dimmer| when another modal needs to instantiate it. + // a dimmer, however when another modal is the parent of the widget, the + // dimmer will be placed behind the two windows. |extra_dimmer| will create an + // extra dimmer between the two. |validation_time| is the time that will be + // used to validate the code, if null the system's current time will be used. ParentAccessWidget(const AccountId& account_id, const OnExitCallback& callback, ParentAccessRequestReason reason, - bool use_extra_dimmer); + bool extra_dimmer, + base::Time validation_time); ~ParentAccessWidget();
diff --git a/ash/public/cpp/login_screen.h b/ash/public/cpp/login_screen.h index a33a3a0..0ccefc8 100644 --- a/ash/public/cpp/login_screen.h +++ b/ash/public/cpp/login_screen.h
@@ -10,6 +10,7 @@ #include "ash/public/cpp/ash_public_export.h" #include "ash/public/cpp/login_types.h" #include "base/callback_forward.h" +#include "base/time/time.h" class AccountId; @@ -68,14 +69,19 @@ // |reason| contains information about why the parent access view is // necessary, it is used to modify the view appearance by changing the title // and description strings and background color. The parent access widget is a - // modal and already contains a dimmer, use |extra_dimmer| when another modal - // needs to instantiate it. Note: this is intended for children only. If a non - // child account id is provided, the validation will necessarily fail. + // modal and already contains a dimmer, however when another modal is the + // parent of the widget, the dimmer will be placed behind the two windows. + // |extra_dimmer| will create an extra dimmer between the two. + // |validation_time| is the time that will be used to validate the code, if + // null the system's time will be used. Note: this is intended for children + // only. If a non child account id is provided, the validation will + // necessarily fail. virtual void ShowParentAccessWidget( const AccountId& child_account_id, base::RepeatingCallback<void(bool success)> callback, ParentAccessRequestReason reason, - bool extra_dimmer = false) = 0; + bool extra_dimmer, + base::Time validation_time) = 0; // Sets if the guest button on the login shelf can be shown. Even if set to // true the button may still not be visible.
diff --git a/ash/public/cpp/login_screen_client.h b/ash/public/cpp/login_screen_client.h index 801d3bf..d4d7eb0 100644 --- a/ash/public/cpp/login_screen_client.h +++ b/ash/public/cpp/login_screen_client.h
@@ -9,6 +9,7 @@ #include "ash/public/cpp/ash_public_export.h" #include "base/callback_forward.h" +#include "base/time/time.h" class AccountId; @@ -64,12 +65,14 @@ // Validates parent access code for the user identified by |account_id|. When // |account_id| is empty it tries to validate the access code for any child - // that is signed in the device. Returns validation result. - // Note: This should only be used for child user, it will always return false - // when a non-child id is used. + // that is signed in the device. Returns validation result. |validation_time| + // is the time that will be used to validate the code, validation will succeed + // if the code was valid this given time. Note: This should only be used for + // child user, it will always return false when a non-child id is used. // TODO(crbug.com/965479): move this to a more appropriate place. virtual bool ValidateParentAccessCode(const AccountId& account_id, - const std::string& access_code) = 0; + const std::string& access_code, + base::Time validation_time) = 0; // Request to hard lock the user pod. // |account_id|: The account id of the user in the user pod.
diff --git a/ash/public/cpp/login_types.h b/ash/public/cpp/login_types.h index ae83bb0..9dae63c 100644 --- a/ash/public/cpp/login_types.h +++ b/ash/public/cpp/login_types.h
@@ -210,6 +210,9 @@ // A list of available keyboard layouts. std::vector<InputMethodItem> keyboard_layouts; + + // Whether public account uses SAML authentication. + bool using_saml = false; }; // Info about a user in login/lock screen.
diff --git a/ash/resources/vector_icons/BUILD.gn b/ash/resources/vector_icons/BUILD.gn index 3abd5451..642b926a 100644 --- a/ash/resources/vector_icons/BUILD.gn +++ b/ash/resources/vector_icons/BUILD.gn
@@ -50,6 +50,8 @@ "lock_screen_caps_lock.icon", "lock_screen_dropdown.icon", "lock_screen_fingerprint.icon", + "lock_screen_smart_card.icon", + "lock_screen_smart_card_failure.icon", "lock_screen_fingerprint_success.icon", "lock_screen_time_limit_lock.icon", "lock_screen_time_limit_moon.icon",
diff --git a/ash/resources/vector_icons/lock_screen_smart_card.icon b/ash/resources/vector_icons/lock_screen_smart_card.icon new file mode 100644 index 0000000..c235acb --- /dev/null +++ b/ash/resources/vector_icons/lock_screen_smart_card.icon
@@ -0,0 +1,48 @@ +// Copyright 2019 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. + +CANVAS_DIMENSIONS, 54, +MOVE_TO, 45.4f, 10, +LINE_TO, 8.6f, 10, +CUBIC_TO, 6.05f, 10, 4.02f, 12, 4.02f, 14.5f, +LINE_TO, 4, 41.5f, +CUBIC_TO, 4, 44, 6.05f, 46, 8.6f, 46, +LINE_TO, 45.4f, 46, +CUBIC_TO, 47.95f, 46, 50, 44, 50, 41.5f, +LINE_TO, 50, 14.5f, +CUBIC_TO, 50, 12, 47.95f, 10, 45.4f, 10, +CLOSE, +MOVE_TO, 46, 42, +LINE_TO, 8, 42, +LINE_TO, 8, 14, +LINE_TO, 46, 14, +LINE_TO, 46, 42, +CLOSE, +MOVE_TO, 36, 36, +LINE_TO, 36, 42, +LINE_TO, 30, 42, +LINE_TO, 30, 14, +LINE_TO, 36, 14, +LINE_TO, 36, 22, +LINE_TO, 46, 22, +LINE_TO, 46, 26, +LINE_TO, 36, 26, +LINE_TO, 36, 32, +LINE_TO, 48, 32, +LINE_TO, 48, 36, +LINE_TO, 36, 36, +CLOSE, +MOVE_TO, 18, 36, +LINE_TO, 6, 36, +LINE_TO, 6, 32, +LINE_TO, 18, 32, +LINE_TO, 18, 26, +LINE_TO, 6, 26, +LINE_TO, 6, 22, +LINE_TO, 18, 22, +LINE_TO, 24, 22, +LINE_TO, 24, 42, +LINE_TO, 18, 42, +LINE_TO, 18, 36, +CLOSE
diff --git a/ash/resources/vector_icons/lock_screen_smart_card_failure.icon b/ash/resources/vector_icons/lock_screen_smart_card_failure.icon new file mode 100644 index 0000000..e0f25b0 --- /dev/null +++ b/ash/resources/vector_icons/lock_screen_smart_card_failure.icon
@@ -0,0 +1,27 @@ +// Copyright 2019 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. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 11, 15, +R_H_LINE_TO, 2, +R_V_LINE_TO, 2, +R_H_LINE_TO, -2, +CLOSE, +R_MOVE_TO, 0, -8, +R_H_LINE_TO, 2, +R_V_LINE_TO, 6, +R_H_LINE_TO, -2, +CLOSE, +R_MOVE_TO, 0.99f, -5, +CUBIC_TO, 6.47f, 2, 2, 6.48f, 2, 12, +R_CUBIC_TO, 0, 5.52f, 4.47f, 10, 9.99f, 10, +CUBIC_TO, 17.52f, 22, 22, 17.52f, 22, 12, +CUBIC_TO_SHORTHAND, 17.52f, 2, 11.99f, 2, +CLOSE, +MOVE_TO, 12, 20, +R_CUBIC_TO, -4.42f, 0, -8, -3.58f, -8, -8, +R_CUBIC_TO, 0, -4.42f, 3.58f, -8, 8, -8, +R_CUBIC_TO, 4.42f, 0, 8, 3.58f, 8, 8, +R_CUBIC_TO, 0, 4.42f, -3.58f, 8, -8, 8, +CLOSE
diff --git a/ash/shelf/login_shelf_view.cc b/ash/shelf/login_shelf_view.cc index 41e861f..37acf67f 100644 --- a/ash/shelf/login_shelf_view.cc +++ b/ash/shelf/login_shelf_view.cc
@@ -218,6 +218,12 @@ return ink_drop; } + base::string16 GetTooltipText(const gfx::Point& p) const override { + if (label()->IsDisplayTextTruncated()) + return label()->GetText(); + return base::string16(); + } + void PaintDarkColors() { SetEnabledTextColors(gfx::kGoogleGrey600); SetImage(views::Button::STATE_NORMAL,
diff --git a/ash/shelf/overflow_bubble_view.cc b/ash/shelf/overflow_bubble_view.cc index c97e282..d12977f 100644 --- a/ash/shelf/overflow_bubble_view.cc +++ b/ash/shelf/overflow_bubble_view.cc
@@ -12,6 +12,7 @@ #include "ash/shelf/shelf_constants.h" #include "ash/shelf/shelf_view.h" #include "ash/shelf/shelf_widget.h" +#include "ash/system/status_area_widget.h" #include "ash/wm/window_util.h" #include "base/i18n/rtl.h" #include "ui/compositor/scoped_layer_animation_settings.h" @@ -745,11 +746,14 @@ return false; // Do not activate the bubble unless the current active window is the shelf - // window. + // window or the status widget window. aura::Window* active_window = window_util::GetActiveWindow(); aura::Window* bubble_window = GetWidget()->GetNativeWindow(); aura::Window* shelf_window = shelf_->shelf_widget()->GetNativeWindow(); - return active_window == bubble_window || active_window == shelf_window; + aura::Window* status_area_window = + shelf_->shelf_widget()->status_area_widget()->GetNativeWindow(); + return active_window == bubble_window || active_window == shelf_window || + active_window == status_area_window; } bool OverflowBubbleView::ShouldCloseOnPressDown() {
diff --git a/ash/shelf/shelf_button.cc b/ash/shelf/shelf_button.cc index 9b74bc9..6b4714b 100644 --- a/ash/shelf/shelf_button.cc +++ b/ash/shelf/shelf_button.cc
@@ -22,7 +22,7 @@ set_hide_ink_drop_when_showing_context_menu(false); set_ink_drop_base_color(kShelfInkDropBaseColor); set_ink_drop_visible_opacity(kShelfInkDropVisibleOpacity); - SetFocusBehavior(FocusBehavior::ACCESSIBLE_ONLY); + SetFocusBehavior(FocusBehavior::ALWAYS); SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); SetFocusPainter(views::Painter::CreateSolidFocusPainter( kShelfFocusBorderColor, kFocusBorderThickness, gfx::InsetsF()));
diff --git a/ash/shelf/shelf_focus_cycler.cc b/ash/shelf/shelf_focus_cycler.cc index 9b5a932..0f3c9922 100644 --- a/ash/shelf/shelf_focus_cycler.cc +++ b/ash/shelf/shelf_focus_cycler.cc
@@ -19,6 +19,8 @@ ShelfFocusCycler::ShelfFocusCycler(Shelf* shelf) : shelf_(shelf) {} void ShelfFocusCycler::FocusOut(bool reverse, SourceView source_view) { + // TODO(manucornet): Once the non-views-based shelf is gone, make this a + // simple cycling logic instead of a long switch. switch (source_view) { case SourceView::kShelfNavigationView: if (reverse) @@ -27,8 +29,18 @@ FocusShelf(reverse); break; case SourceView::kShelfView: - if (reverse) + if (reverse) { FocusNavigation(reverse); + } else { + if (shelf_->shelf_widget()->IsShowingOverflowBubble()) + FocusOverflowShelf(reverse); + else + FocusStatusArea(reverse); + } + break; + case SourceView::kShelfOverflowView: + if (reverse) + FocusShelf(reverse); else FocusStatusArea(reverse); break; @@ -44,7 +56,10 @@ // Login/lock screen or OOBE. Shell::Get()->system_tray_notifier()->NotifyFocusOut(reverse); } else if (reverse) { - FocusShelf(reverse); + if (shelf_->shelf_widget()->IsShowingOverflowBubble()) + FocusOverflowShelf(reverse); + else + FocusShelf(reverse); } else { FocusNavigation(reverse); } @@ -67,6 +82,10 @@ shelf_widget->FocusFirstOrLastFocusableChild(last_element); } +void ShelfFocusCycler::FocusOverflowShelf(bool last_element) { + shelf_->shelf_widget()->FocusOverflowShelf(last_element); +} + void ShelfFocusCycler::FocusStatusArea(bool last_element) { StatusAreaWidget* status_area_widget = shelf_->GetStatusAreaWidget(); status_area_widget->status_area_widget_delegate()
diff --git a/ash/shelf/shelf_focus_cycler.h b/ash/shelf/shelf_focus_cycler.h index 7733d5f..169a087 100644 --- a/ash/shelf/shelf_focus_cycler.h +++ b/ash/shelf/shelf_focus_cycler.h
@@ -15,6 +15,7 @@ enum class SourceView { kShelfNavigationView = 0, kShelfView, + kShelfOverflowView, kStatusAreaView, }; @@ -36,6 +37,9 @@ // Focuses the shelf widget (app shortcuts). void FocusShelf(bool last_element); + // Focuses the overflow shelf (app shortcuts in the overflow menu). + void FocusOverflowShelf(bool last_element); + // Focuses the status area widget. void FocusStatusArea(bool last_element);
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc index 2c84a70..eee5448 100644 --- a/ash/shelf/shelf_view.cc +++ b/ash/shelf/shelf_view.cc
@@ -159,21 +159,15 @@ // Build a list of all views that we are able to focus: 1) items from the // main shelf, 2) overflow button, 3) items from overflow if applicable. std::vector<views::View*> focusable_views; - ShelfView* main_shelf = shelf_view_->main_shelf(); - ShelfView* overflow_shelf = shelf_view_->overflow_shelf(); - for (int i = main_shelf->first_visible_index(); - i <= main_shelf->last_visible_index(); ++i) { - focusable_views.push_back(main_shelf->view_model()->view_at(i)); + for (int i = shelf_view_->first_visible_index(); + i <= shelf_view_->last_visible_index(); ++i) { + focusable_views.push_back(shelf_view_->view_model()->view_at(i)); } - if (main_shelf->GetOverflowButton()->GetVisible()) - focusable_views.push_back(main_shelf->GetOverflowButton()); - const int overflow_cutoff = static_cast<int>(focusable_views.size()); - if (main_shelf->IsShowingOverflowBubble() && overflow_shelf) { - for (int i = overflow_shelf->first_visible_index(); - i <= overflow_shelf->last_visible_index(); ++i) { - focusable_views.push_back(overflow_shelf->view_model()->view_at(i)); - } + + if (!shelf_view_->is_overflow_mode() && + shelf_view_->GetOverflowButton()->GetVisible()) { + focusable_views.push_back(shelf_view_->GetOverflowButton()); } // Where are we starting from? @@ -193,8 +187,6 @@ else if (new_index >= static_cast<int>(focusable_views.size())) new_index = 0; - if (new_index >= overflow_cutoff) - shelf_view_->shelf_widget()->set_activated_from_overflow_bubble(true); return focusable_views[new_index]; } @@ -588,14 +580,11 @@ void ShelfView::OnShelfButtonAboutToRequestFocusFromTabTraversal( ShelfButton* button, bool reverse) { - if (is_overflow_mode()) { - main_shelf()->OnShelfButtonAboutToRequestFocusFromTabTraversal(button, - reverse); - return; + if (ShouldFocusOut(reverse, button)) { + shelf_->shelf_focus_cycler()->FocusOut( + reverse, is_overflow_mode() ? SourceView::kShelfOverflowView + : SourceView::kShelfView); } - - if (ShouldFocusOut(reverse, button)) - shelf_->shelf_focus_cycler()->FocusOut(reverse, SourceView::kShelfView); } void ShelfView::ButtonPressed(views::Button* sender, @@ -846,19 +835,15 @@ } views::View* ShelfView::FindFirstFocusableChild() { - if (is_overflow_mode()) - return main_shelf()->FindFirstFocusableChild(); if (view_model_->view_size() == 0) return nullptr; return view_model_->view_at(first_visible_index()); } views::View* ShelfView::FindLastFocusableChild() { - if (IsShowingOverflowBubble()) - return overflow_shelf()->FindLastFocusableChild(); if (view_model_->view_size() == 0) return nullptr; - return overflow_button_->GetVisible() + return (!is_overflow_mode() && overflow_button_->GetVisible()) ? overflow_button_ : view_model_->view_at(last_visible_index()); } @@ -1776,8 +1761,8 @@ bool ShelfView::ShouldFocusOut(bool reverse, views::View* button) { // The logic here seems backwards, but is actually correct. For instance if // the ShelfView's internal focus cycling logic attemmpts to focus the first - // child (e.g. home button) after hitting Tab, we intercept that and - // instead, advance through to the status area. + // child after hitting Tab, we intercept that and instead, advance through + // to the status area. return (reverse && button == FindLastFocusableChild()) || (!reverse && button == FindFirstFocusableChild()); } @@ -1952,23 +1937,8 @@ } void ShelfView::OnGestureEvent(ui::GestureEvent* event) { - // Convert the event location from current view to screen, since swiping up on - // the shelf can open the fullscreen app list. Updating the bounds of the app - // list during dragging is based on screen coordinate space. - gfx::Point location_in_screen(event->location()); - View::ConvertPointToScreen(this, &location_in_screen); - event->set_location(location_in_screen); - if (shelf_->ProcessGestureEvent(*event)) - event->StopPropagation(); - else if (is_overflow_mode()) { - // If the event hasn't been processed yet and the overflow shelf is showing, - // give the bubble a chance to process the event. - if (main_shelf_->overflow_bubble()->bubble_view()->ProcessGestureEvent( - *event)) { - event->StopPropagation(); - return; - } - } + if (overflow_mode_ || ShouldHandleGestures(*event)) + HandleGestureEvent(event); } void ShelfView::OnMouseEvent(ui::MouseEvent* event) { @@ -2407,4 +2377,36 @@ drag_image_->layer()->SetBackgroundBlur(blur_radius); } +bool ShelfView::ShouldHandleGestures(const ui::GestureEvent& event) const { + if (event.type() == ui::ET_GESTURE_SCROLL_BEGIN) { + float x_offset = event.details().scroll_x_hint(); + float y_offset = event.details().scroll_y_hint(); + if (!shelf_->IsHorizontalAlignment()) + std::swap(x_offset, y_offset); + + return std::abs(x_offset) < std::abs(y_offset); + } + + return true; +} + +void ShelfView::HandleGestureEvent(ui::GestureEvent* event) { + // Convert the event location from current view to screen, since swiping up on + // the shelf can open the fullscreen app list. Updating the bounds of the app + // list during dragging is based on screen coordinate space. + gfx::Point location_in_screen(event->location()); + View::ConvertPointToScreen(this, &location_in_screen); + event->set_location(location_in_screen); + if (shelf_->ProcessGestureEvent(*event)) + event->StopPropagation(); + else if (is_overflow_mode()) { + // If the event hasn't been processed yet and the overflow shelf is showing, + // give the bubble a chance to process the event. + if (main_shelf_->overflow_bubble()->bubble_view()->ProcessGestureEvent( + *event)) { + event->StopPropagation(); + } + } +} + } // namespace ash
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h index 7dc3bf5..b1e4abc 100644 --- a/ash/shelf/shelf_view.h +++ b/ash/shelf/shelf_view.h
@@ -537,6 +537,11 @@ // Set background blur to the dragged image. |size| is the image size. void SetDragImageBlur(const gfx::Size& size, int blur_radius); + bool ShouldHandleGestures(const ui::GestureEvent& event) const; + + // Handles the gesture event. + void HandleGestureEvent(ui::GestureEvent* event); + // The model; owned by Launcher. ShelfModel* model_;
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc index 738ca87..07a4ebd 100644 --- a/ash/shelf/shelf_widget.cc +++ b/ash/shelf/shelf_widget.cc
@@ -448,6 +448,17 @@ return shelf_view_->IsShowingOverflowBubble(); } +void ShelfWidget::FocusOverflowShelf(bool last_element) { + if (!IsShowingOverflowBubble()) + return; + Shell::Get()->focus_cycler()->FocusWidget( + shelf_view_->overflow_bubble()->bubble_view()->GetWidget()); + views::View* to_focus = + shelf_view_->overflow_shelf()->FindFirstOrLastFocusableChild( + last_element); + to_focus->RequestFocus(); +} + void ShelfWidget::SetFocusCycler(FocusCycler* focus_cycler) { delegate_view_->set_focus_cycler(focus_cycler); if (focus_cycler) @@ -504,16 +515,8 @@ bool ShelfWidget::OnNativeWidgetActivationChanged(bool active) { if (!Widget::OnNativeWidgetActivationChanged(active)) return false; - if (active) { - // Do not focus the default element if the widget activation came from the - // overflow bubble's focus cycling. The setter of - // |activated_from_overflow_bubble_| should handle focusing the correct - // view. - if (activated_from_overflow_bubble_) - activated_from_overflow_bubble_ = false; - else - delegate_view_->SetPaneFocusAndFocusDefault(); - } + if (active) + delegate_view_->SetPaneFocusAndFocusDefault(); return true; }
diff --git a/ash/shelf/shelf_widget.h b/ash/shelf/shelf_widget.h index 5c4176ac..be5a489 100644 --- a/ash/shelf/shelf_widget.h +++ b/ash/shelf/shelf_widget.h
@@ -85,6 +85,10 @@ bool IsShowingMenu() const; bool IsShowingOverflowBubble() const; + // Focuses the first or the last app shortcut inside the overflow shelf. + // Does nothing if the overflow shelf is not currently shown. + void FocusOverflowShelf(bool last_element); + // Sets the focus cycler. Also adds the shelf to the cycle. void SetFocusCycler(FocusCycler* focus_cycler); FocusCycler* GetFocusCycler(); @@ -137,10 +141,6 @@ return &background_animator_; } - void set_activated_from_overflow_bubble(bool val) { - activated_from_overflow_bubble_ = val; - } - private: class DelegateView; friend class DelegateView; @@ -175,11 +175,6 @@ // Owned by the views hierarchy. LoginShelfView* login_shelf_view_; - // Set to true when the widget is activated from another widget. Do not - // focus the default element in this case. This should be set when - // cycling focus from another widget to the shelf. - bool activated_from_overflow_bubble_ = false; - ScopedSessionObserver scoped_session_observer_; DISALLOW_COPY_AND_ASSIGN(ShelfWidget);
diff --git a/ash/style/ash_color_provider.cc b/ash/style/ash_color_provider.cc index 797bd85..ff878b9 100644 --- a/ash/style/ash_color_provider.cc +++ b/ash/style/ash_color_provider.cc
@@ -4,6 +4,8 @@ #include "ash/style/ash_color_provider.h" +#include <math.h> + #include "ash/public/cpp/ash_switches.h" #include "ash/shell.h" #include "base/command_line.h" @@ -20,6 +22,9 @@ constexpr float kLightInkRippleOpacity = 0.08f; constexpr float kDarkInkRippleOpacity = 0.06f; +// The disabled color is always 38% opacity of the enabled color. +constexpr float kDisabledColorOpacity = 0.38f; + // Gets the color mode value from feature flag "--ash-color-mode". AshColorProvider::AshColorMode GetColorModeFromCommandLine() { const base::CommandLine* cl = base::CommandLine::ForCurrentProcess(); @@ -113,6 +118,11 @@ return RippleAttributes(base_color, opacity, opacity); } +SkColor AshColorProvider::GetDisabledColor(SkColor enabled_color) const { + return SkColorSetA(enabled_color, std::round(SkColorGetA(enabled_color) * + kDisabledColorOpacity)); +} + SkColor AshColorProvider::GetShieldLayerColorImpl( ShieldLayerType type, AshColorMode color_mode) const {
diff --git a/ash/style/ash_color_provider.h b/ash/style/ash_color_provider.h index abbf37f9..d65e4539 100644 --- a/ash/style/ash_color_provider.h +++ b/ash/style/ash_color_provider.h
@@ -113,6 +113,10 @@ // color of the UI element that wants to show inkdrop. RippleAttributes GetRippleAttributes(SkColor bg_color) const; + // Gets the disabled color on |enabled_color|. It can be disabled background, + // an disabled icon, etc. + SkColor GetDisabledColor(SkColor enabled_color) const; + AshColorMode color_mode() const { return color_mode_; } private:
diff --git a/ash/system/message_center/unified_message_center_bubble.cc b/ash/system/message_center/unified_message_center_bubble.cc new file mode 100644 index 0000000..25459691 --- /dev/null +++ b/ash/system/message_center/unified_message_center_bubble.cc
@@ -0,0 +1,116 @@ +// Copyright 2019 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 "ash/system/message_center/unified_message_center_bubble.h" + +#include <memory> + +#include "ash/shelf/shelf.h" +#include "ash/system/message_center/unified_message_center_view.h" +#include "ash/system/tray/tray_bubble_view.h" +#include "ash/system/tray/tray_constants.h" +#include "ash/system/tray/tray_event_filter.h" +#include "ash/system/unified/unified_system_tray.h" +#include "ash/system/unified/unified_system_tray_bubble.h" +#include "ui/views/widget/widget.h" + +namespace ash { + +UnifiedMessageCenterBubble::UnifiedMessageCenterBubble(UnifiedSystemTray* tray) + : tray_(tray) { + TrayBubbleView::InitParams init_params; + init_params.delegate = tray; + // Anchor within the overlay container. + init_params.parent_window = tray->GetBubbleWindowContainer(); + init_params.anchor_mode = TrayBubbleView::AnchorMode::kRect; + init_params.min_width = kTrayMenuWidth; + init_params.max_width = kTrayMenuWidth; + init_params.corner_radius = kUnifiedTrayCornerRadius; + init_params.has_shadow = false; + + bubble_view_ = new TrayBubbleView(init_params); + + message_center_view_ = + bubble_view_->AddChildView(std::make_unique<UnifiedMessageCenterView>( + nullptr /* parent */, tray->model())); + + message_center_view_->AddObserver(this); + + bubble_widget_ = views::BubbleDialogDelegateView::CreateBubble(bubble_view_); + bubble_widget_->AddObserver(this); + TrayBackgroundView::InitializeBubbleAnimations(bubble_widget_); + + bubble_view_->InitializeAndShowBubble(); + + tray->tray_event_filter()->AddBubble(this); + + UpdatePosition(); + + if (!message_center_view_->GetVisible()) { + bubble_widget_->Hide(); + } +} + +UnifiedMessageCenterBubble::~UnifiedMessageCenterBubble() { + tray_->tray_event_filter()->RemoveBubble(this); + + if (bubble_widget_) { + CHECK(message_center_view_); + message_center_view_->RemoveObserver(this); + + bubble_widget_->RemoveObserver(this); + bubble_widget_->Close(); + } +} + +void UnifiedMessageCenterBubble::UpdatePosition() { + int available_height = tray_->bubble()->CalculateMaxHeight() - + tray_->bubble()->GetCurrentTrayHeight() - + kUnifiedMessageCenterBubbleSpacing; + + message_center_view_->SetMaxHeight(available_height); + message_center_view_->SetAvailableHeight(available_height); + + gfx::Rect resting_bounds = tray_->shelf()->GetSystemTrayAnchorRect(); + resting_bounds.set_y(resting_bounds.y() - + tray_->bubble()->GetCurrentTrayHeight() - + kUnifiedMessageCenterBubbleSpacing); + + bubble_widget_->SetBounds(resting_bounds); + bubble_view_->ChangeAnchorRect(resting_bounds); +} + +TrayBackgroundView* UnifiedMessageCenterBubble::GetTray() const { + return tray_; +} + +TrayBubbleView* UnifiedMessageCenterBubble::GetBubbleView() const { + return bubble_view_; +} + +views::Widget* UnifiedMessageCenterBubble::GetBubbleWidget() const { + return bubble_widget_; +} + +void UnifiedMessageCenterBubble::OnViewVisibilityChanged( + views::View* observed_view, + views::View* starting_view) { + if (message_center_view_->GetVisible()) + bubble_widget_->Show(); + else + bubble_widget_->Hide(); +} + +void UnifiedMessageCenterBubble::OnWidgetDestroying(views::Widget* widget) { + CHECK_EQ(bubble_widget_, widget); + bubble_widget_->RemoveObserver(this); + bubble_widget_ = nullptr; +} + +void UnifiedMessageCenterBubble::OnExpandedAmountChanged() { + UpdatePosition(); + bubble_view_->Layout(); +} + +} // namespace ash \ No newline at end of file
diff --git a/ash/system/message_center/unified_message_center_bubble.h b/ash/system/message_center/unified_message_center_bubble.h new file mode 100644 index 0000000..618c556 --- /dev/null +++ b/ash/system/message_center/unified_message_center_bubble.h
@@ -0,0 +1,61 @@ +// Copyright 2019 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. + +#ifndef ASH_SYSTEM_MESSAGE_CENTER_UNIFIED_MESSAGE_CENTER_BUBBLE_H_ +#define ASH_SYSTEM_MESSAGE_CENTER_UNIFIED_MESSAGE_CENTER_BUBBLE_H_ + +#include "ash/system/tray/tray_bubble_base.h" +#include "ui/views/view_observer.h" +#include "ui/views/widget/widget_observer.h" + +namespace views { +class Widget; +} // namespace views + +namespace ash { + +class TrayBubbleView; +class UnifiedSystemTray; +class UnifiedMessageCenterView; + +// Manages the bubble that contains UnifiedMessageCenterView. +// Shows the bubble on the constructor, and closes the bubble on the destructor. +class ASH_EXPORT UnifiedMessageCenterBubble : public TrayBubbleBase, + public views::ViewObserver, + public views::WidgetObserver { + public: + explicit UnifiedMessageCenterBubble(UnifiedSystemTray* tray); + ~UnifiedMessageCenterBubble() override; + + void UpdatePosition(); + + // TrayBubbleBase: + TrayBackgroundView* GetTray() const override; + TrayBubbleView* GetBubbleView() const override; + views::Widget* GetBubbleWidget() const override; + + // views::ViewObserver: + void OnViewVisibilityChanged(views::View* observed_view, + views::View* starting_view) override; + + // views::WidgetObserver: + void OnWidgetDestroying(views::Widget* widget) override; + + // Called when the system tray expanded amount is changed. Required to + // position the message center right above the tray when it is moving. + void OnExpandedAmountChanged(); + + private: + UnifiedSystemTray* const tray_; + + views::Widget* bubble_widget_ = nullptr; + TrayBubbleView* bubble_view_ = nullptr; + UnifiedMessageCenterView* message_center_view_ = nullptr; + + DISALLOW_COPY_AND_ASSIGN(UnifiedMessageCenterBubble); +}; + +} // namespace ash + +#endif // ASH_SYSTEM_MESSAGE_CENTER_UNIFIED_MESSAGE_CENTER_BUBBLE_H_
diff --git a/ash/system/message_center/unified_message_center_bubble_unittest.cc b/ash/system/message_center/unified_message_center_bubble_unittest.cc new file mode 100644 index 0000000..15dfde9 --- /dev/null +++ b/ash/system/message_center/unified_message_center_bubble_unittest.cc
@@ -0,0 +1,84 @@ +// Copyright 2019 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 "ash/system/message_center/unified_message_center_bubble.h" + +#include <memory> + +#include "ash/public/cpp/ash_features.h" +#include "ash/system/unified/unified_system_tray.h" +#include "ash/test/ash_test_base.h" +#include "base/test/scoped_feature_list.h" +#include "ui/message_center/message_center.h" + +using message_center::MessageCenter; +using message_center::Notification; + +namespace ash { + +class UnifiedMessageCenterBubbleTest : public AshTestBase { + public: + UnifiedMessageCenterBubbleTest() = default; + ~UnifiedMessageCenterBubbleTest() override = default; + + // AshTestBase: + void SetUp() override { + scoped_feature_list_ = std::make_unique<base::test::ScopedFeatureList>(); + scoped_feature_list_->InitAndEnableFeature( + features::kUnifiedMessageCenterRefactor); + AshTestBase::SetUp(); + tray_ = GetPrimaryUnifiedSystemTray(); + tray_->ShowBubble(true); + message_center_bubble_ = + std::make_unique<UnifiedMessageCenterBubble>(tray_); + } + + void TearDown() override { + // message_center_bubble_ needs to be destroyed before + // the UnifiedSystemTray and TrayEventFilter. Need to do it + // manually since we manually created it in SetUp. + message_center_bubble_.reset(); + AshTestBase::TearDown(); + } + + protected: + std::string AddNotification() { + std::string id = base::NumberToString(id_++); + MessageCenter::Get()->AddNotification(std::make_unique<Notification>( + message_center::NOTIFICATION_TYPE_BASE_FORMAT, id, + base::UTF8ToUTF16("test title"), base::UTF8ToUTF16("test message"), + gfx::Image(), base::string16() /* display_source */, GURL(), + message_center::NotifierId(), message_center::RichNotificationData(), + new message_center::NotificationDelegate())); + return id; + } + + UnifiedSystemTray* tray() { return tray_; } + + UnifiedMessageCenterBubble* message_center_bubble() { + return message_center_bubble_.get(); + } + + private: + int id_ = 0; + std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_; + UnifiedSystemTray* tray_ = nullptr; + std::unique_ptr<UnifiedMessageCenterBubble> message_center_bubble_; + + DISALLOW_COPY_AND_ASSIGN(UnifiedMessageCenterBubbleTest); +}; + +TEST_F(UnifiedMessageCenterBubbleTest, VisibileOnlyWithNotifications) { + // UnifiedMessageCenterBubble should not be visible when there are no + // notifications. + EXPECT_FALSE(message_center_bubble()->GetBubbleWidget()->IsVisible()); + + AddNotification(); + + // UnifiedMessageCenterBubble should become visible after a notification is + // added. + EXPECT_TRUE(message_center_bubble()->GetBubbleWidget()->IsVisible()); +} + +} // namespace ash
diff --git a/ash/system/tray/tray_constants.h b/ash/system/tray/tray_constants.h index 02d19531..8ea7572e 100644 --- a/ash/system/tray/tray_constants.h +++ b/ash/system/tray/tray_constants.h
@@ -146,6 +146,7 @@ constexpr int kUnifiedSliderViewSpacing = 12; constexpr int kUnifiedMenuPadding = 8; +constexpr int kUnifiedMessageCenterBubbleSpacing = 8; constexpr int kUnifiedNotificationCenterSpacing = 16; constexpr int kUnifiedTrayIconSize = 20; constexpr int kUnifiedTraySpacingBetweenIcons = 6;
diff --git a/ash/system/unified/unified_system_tray.h b/ash/system/unified/unified_system_tray.h index 51ac2cd4..feb48f1 100644 --- a/ash/system/unified/unified_system_tray.h +++ b/ash/system/unified/unified_system_tray.h
@@ -108,6 +108,7 @@ const char* GetClassName() const override; UnifiedSystemTrayModel* model() { return model_.get(); } + UnifiedSystemTrayBubble* bubble() { return bubble_.get(); } private: static const base::TimeDelta kNotificationCountUpdateDelay;
diff --git a/ash/system/unified/unified_system_tray_bubble.cc b/ash/system/unified/unified_system_tray_bubble.cc index 5f7c808b..9fda6e15 100644 --- a/ash/system/unified/unified_system_tray_bubble.cc +++ b/ash/system/unified/unified_system_tray_bubble.cc
@@ -236,6 +236,10 @@ return bubble_widget_; } +int UnifiedSystemTrayBubble::GetCurrentTrayHeight() const { + return unified_view_->GetCurrentHeight(); +} + int UnifiedSystemTrayBubble::CalculateMaxHeight() const { gfx::Rect anchor_bounds = tray_->shelf()->GetSystemTrayAnchorView()->GetBoundsInScreen();
diff --git a/ash/system/unified/unified_system_tray_bubble.h b/ash/system/unified/unified_system_tray_bubble.h index a3fae0f..c36af6ac 100644 --- a/ash/system/unified/unified_system_tray_bubble.h +++ b/ash/system/unified/unified_system_tray_bubble.h
@@ -36,13 +36,14 @@ // Shows the bubble on the constructor, and closes the bubble on the destructor. // It is possible that the bubble widget is closed on deactivation. In such // case, this class calls UnifiedSystemTray::CloseBubble() to delete itself. -class UnifiedSystemTrayBubble : public TrayBubbleBase, - public ash::ScreenLayoutObserver, - public views::WidgetObserver, - public ShelfObserver, - public ::wm::ActivationChangeObserver, - public TimeToClickRecorder::Delegate, - public TabletModeObserver { +class ASH_EXPORT UnifiedSystemTrayBubble + : public TrayBubbleBase, + public ash::ScreenLayoutObserver, + public views::WidgetObserver, + public ShelfObserver, + public ::wm::ActivationChangeObserver, + public TimeToClickRecorder::Delegate, + public TabletModeObserver { public: explicit UnifiedSystemTrayBubble(UnifiedSystemTray* tray, bool show_by_click); @@ -75,6 +76,14 @@ // resizing of the bubble during animation. void UpdateTransform(); + // Return the maximum height available for both the system tray and + // the message center. + int CalculateMaxHeight() const; + + // Return the current visible height of the tray, even when partially + // collapsed / expanded. + int GetCurrentTrayHeight() const; + // TrayBubbleBase: TrayBackgroundView* GetTray() const override; TrayBubbleView* GetBubbleView() const override; @@ -141,9 +150,6 @@ TrayBubbleView* bubble_view_ = nullptr; UnifiedSystemTrayView* unified_view_ = nullptr; - private: - int CalculateMaxHeight() const; - DISALLOW_COPY_AND_ASSIGN(UnifiedSystemTrayBubble); };
diff --git a/ash/wallpaper/wallpaper_controller_unittest.cc b/ash/wallpaper/wallpaper_controller_unittest.cc index 3be21e3e..090e67a 100644 --- a/ash/wallpaper/wallpaper_controller_unittest.cc +++ b/ash/wallpaper/wallpaper_controller_unittest.cc
@@ -23,11 +23,11 @@ #include "ash/wm/window_state.h" #include "base/command_line.h" #include "base/files/scoped_temp_dir.h" -#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/task/post_task.h" +#include "base/task/task_observer.h" #include "base/task/thread_pool/thread_pool.h" #include "base/test/bind_test_util.h" #include "base/time/time_override.h" @@ -189,12 +189,12 @@ } // Monitors if any task is processed by the message loop. -class TaskObserver : public base::MessageLoop::TaskObserver { +class TaskObserver : public base::TaskObserver { public: TaskObserver() : processed_(false) {} ~TaskObserver() override = default; - // MessageLoop::TaskObserver: + // TaskObserver: void WillProcessTask(const base::PendingTask& pending_task) override {} void DidProcessTask(const base::PendingTask& pending_task) override { processed_ = true;
diff --git a/ash/wm/desks/new_desk_button.cc b/ash/wm/desks/new_desk_button.cc index 4408ae7..6b90c4d 100644 --- a/ash/wm/desks/new_desk_button.cc +++ b/ash/wm/desks/new_desk_button.cc
@@ -9,6 +9,7 @@ #include "ash/resources/vector_icons/vector_icons.h" #include "ash/shell.h" #include "ash/strings/grit/ash_strings.h" +#include "ash/style/ash_color_provider.h" #include "ash/wm/desks/desks_bar_view.h" #include "ash/wm/desks/desks_controller.h" #include "ash/wm/desks/desks_util.h" @@ -43,13 +44,6 @@ constexpr SkColor kDisabledTextAndIconColor = SkColorSetA(kTextAndIconColor, 0x61); -// The background color when the new desk button is enabled/disabled. The -// disabled color is 38% opacity of the enabled color. -// TODO(minch): Migrate to use ControlsLayerType::kInactiveControlBackground in -// AshColorProvider. -constexpr SkColor kBackgroundColor = SkColorSetA(SK_ColorWHITE, 0x1A); -constexpr SkColor kDisabledBackgroundColor = SkColorSetA(SK_ColorWHITE, 0xA); - } // namespace NewDeskButton::NewDeskButton(views::ButtonListener* listener) @@ -86,8 +80,15 @@ overview_session->highlight_controller()->OnViewDestroyingOrDisabling(this); } SetEnabled(enabled); + + const SkColor background_color = + AshColorProvider::Get()->GetControlsLayerColor( + AshColorProvider::ControlsLayerType::kInactiveControlBackground, + AshColorProvider::AshColorMode::kDark); + const SkColor disabled_background_color = + AshColorProvider::Get()->GetDisabledColor(background_color); SetBackground(views::CreateRoundedRectBackground( - enabled ? kBackgroundColor : kDisabledBackgroundColor, kCornerRadius)); + enabled ? background_color : disabled_background_color, kCornerRadius)); } void NewDeskButton::OnButtonPressed() {
diff --git a/ash/wm/gestures/overview_gesture_handler.cc b/ash/wm/gestures/overview_gesture_handler.cc index 3a905db..b10ca85 100644 --- a/ash/wm/gestures/overview_gesture_handler.cc +++ b/ash/wm/gestures/overview_gesture_handler.cc
@@ -26,75 +26,120 @@ OverviewGestureHandler::~OverviewGestureHandler() = default; bool OverviewGestureHandler::ProcessScrollEvent(const ui::ScrollEvent& event) { - const int finger_count = event.finger_count(); - if (event.type() == ui::ET_SCROLL_FLING_START || - event.type() == ui::ET_SCROLL_FLING_CANCEL || - (finger_count != 3 && finger_count != 4)) { - scroll_x_ = scroll_y_ = 0; + if (event.type() == ui::ET_SCROLL_FLING_CANCEL) { + scroll_data_ = base::make_optional(ScrollData()); return false; } - scroll_x_ += event.x_offset(); - scroll_y_ += event.y_offset(); + if (event.type() == ui::ET_SCROLL_FLING_START) { + bool success = EndScroll(); + DCHECK(!scroll_data_); + return success; + } + + if (!scroll_data_) + return false; + + // Only three or four finger scrolls are supported. + const int finger_count = event.finger_count(); + if (finger_count != 3 && finger_count != 4) { + scroll_data_.reset(); + return false; + } + + if (scroll_data_->finger_count != 0 && + scroll_data_->finger_count != finger_count) { + scroll_data_.reset(); + return false; + } + + scroll_data_->scroll_x += event.x_offset(); + scroll_data_->scroll_y += event.y_offset(); + // If the requirements to move the overview selector are met, reset + // |scroll_data_|. + const bool moved = MoveOverviewSelection(finger_count, scroll_data_->scroll_x, + scroll_data_->scroll_y); + if (moved) + scroll_data_ = base::make_optional(ScrollData()); + scroll_data_->finger_count = finger_count; + return moved; +} + +bool OverviewGestureHandler::EndScroll() { + if (!scroll_data_) + return false; + + const float scroll_x = scroll_data_->scroll_x; + const float scroll_y = scroll_data_->scroll_y; + const int finger_count = scroll_data_->finger_count; + scroll_data_.reset(); + + if (finger_count == 0) + return false; // Horizontal 4-finger scroll switches desks if possible. if (finger_count == 4) { - if (std::fabs(scroll_x_) >= std::fabs(scroll_y_)) { - if (std::fabs(scroll_x_) < horizontal_threshold_pixels_) - return false; - - const bool going_left = scroll_x_ > 0; - scroll_x_ = scroll_y_ = 0; - - // This does not invert if the user changes their touchpad settings - // currently. The scroll works Australian way (scroll left to go to the - // desk on the right and vice versa). - DesksController::Get()->ActivateAdjacentDesk( - going_left, DesksSwitchSource::kDeskSwitchTouchpad); - return true; - } - } - - OverviewController* overview_controller = Shell::Get()->overview_controller(); - - // Horizontal 3-finger scroll moves selection when already in overview mode. - if (std::fabs(scroll_x_) >= std::fabs(scroll_y_)) { - if (!overview_controller->InOverviewSession()) { - scroll_x_ = scroll_y_ = 0; - return false; - } - if (std::fabs(scroll_x_) < horizontal_threshold_pixels_) + if (std::fabs(scroll_x) < std::fabs(scroll_y)) return false; - const int increment = scroll_x_ > 0 ? 1 : -1; - scroll_x_ = scroll_y_ = 0; - overview_controller->IncrementSelection(increment); + if (std::fabs(scroll_x) < horizontal_threshold_pixels_) + return false; + + // This does not invert if the user changes their touchpad settings + // currently. The scroll works Australian way (scroll left to go to the + // desk on the right and vice versa). + DesksController::Get()->ActivateAdjacentDesk( + /*going_left=*/scroll_x > 0, DesksSwitchSource::kDeskSwitchTouchpad); return true; } - // Use vertical 3-finger scroll gesture up to enter overview, down to exit. - if (overview_controller->InOverviewSession()) { - if (scroll_y_ < 0) - scroll_x_ = scroll_y_ = 0; - if (scroll_y_ < vertical_threshold_pixels_) - return false; - } else { - if (scroll_y_ > 0) - scroll_x_ = scroll_y_ = 0; - if (scroll_y_ > -vertical_threshold_pixels_) - return false; - } + DCHECK_EQ(3, finger_count); + // Horizontal 3-finger scroll moves selection when already in overview mode. + if (MoveOverviewSelection(finger_count, scroll_x, scroll_y)) + return true; - // Reset scroll amount on toggling. - scroll_x_ = scroll_y_ = 0; - base::RecordAction(base::UserMetricsAction("Touchpad_Gesture_Overview")); - if (overview_controller->InOverviewSession()) { + if (std::fabs(scroll_x) >= std::fabs(scroll_y)) + return false; + + auto* overview_controller = Shell::Get()->overview_controller(); + const bool in_overview = overview_controller->InOverviewSession(); + // Use vertical 3-finger scroll gesture up to enter overview, down to exit. + if (in_overview) { + if (scroll_y < 0 || scroll_y < vertical_threshold_pixels_) + return false; + + base::RecordAction(base::UserMetricsAction("Touchpad_Gesture_Overview")); if (overview_controller->AcceptSelection()) return true; overview_controller->EndOverview(); } else { + if (scroll_y > 0 || scroll_y > -vertical_threshold_pixels_) + return false; + + base::RecordAction(base::UserMetricsAction("Touchpad_Gesture_Overview")); overview_controller->StartOverview(); } + + return true; +} + +bool OverviewGestureHandler::MoveOverviewSelection(int finger_count, + float scroll_x, + float scroll_y) { + if (finger_count != 3) + return false; + + auto* overview_controller = Shell::Get()->overview_controller(); + const bool in_overview = overview_controller->InOverviewSession(); + // Dominantly vertical scrolls and horizontal scrolls do not move the + // overview selector. + if (!in_overview || std::fabs(scroll_x) < std::fabs(scroll_y)) + return false; + + if (std::fabs(scroll_x) < horizontal_threshold_pixels_) + return false; + + overview_controller->IncrementSelection(/*forward=*/scroll_x > 0); return true; }
diff --git a/ash/wm/gestures/overview_gesture_handler.h b/ash/wm/gestures/overview_gesture_handler.h index 216e322..bbac30e 100644 --- a/ash/wm/gestures/overview_gesture_handler.h +++ b/ash/wm/gestures/overview_gesture_handler.h
@@ -7,6 +7,7 @@ #include "ash/ash_export.h" #include "base/macros.h" +#include "base/optional.h" namespace ui { class ScrollEvent; @@ -31,11 +32,22 @@ private: friend class OverviewGestureHandlerTest; - // The total distance scrolled with three fingers up to the point when an - // action is triggered. When the action (enter / exit overview mode or move - // selection in overview) is triggered those values are reset to zero. - float scroll_x_ = 0.f; - float scroll_y_ = 0.f; + // A struct containing the relevant data during a scroll session. + struct ScrollData { + int finger_count = 0; + float scroll_x = 0.f; + float scroll_y = 0.f; + }; + + // Called when a scroll is ended. Returns true if the scroll is processed. + bool EndScroll(); + + // Tries to move the overview selector. Returns true if successful. Called in + // the middle of scrolls and when scrolls have ended. + bool MoveOverviewSelection(int finger_count, float scroll_x, float scroll_y); + + // Contains the data during a scroll session. Empty is no scroll is underway. + base::Optional<ScrollData> scroll_data_; // The threshold before engaging overview with a touchpad three-finger scroll. static const float vertical_threshold_pixels_;
diff --git a/ash/wm/gestures/overview_gesture_handler_unittest.cc b/ash/wm/gestures/overview_gesture_handler_unittest.cc index e077a1a..b776995 100644 --- a/ash/wm/gestures/overview_gesture_handler_unittest.cc +++ b/ash/wm/gestures/overview_gesture_handler_unittest.cc
@@ -5,7 +5,6 @@ #include "ash/wm/gestures/overview_gesture_handler.h" #include "ash/public/cpp/ash_features.h" -#include "ash/root_window_controller.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" #include "ash/wm/desks/desk.h" @@ -13,43 +12,36 @@ #include "ash/wm/desks/desks_histogram_enums.h" #include "ash/wm/desks/desks_test_util.h" #include "ash/wm/overview/overview_controller.h" -#include "ash/wm/overview/overview_highlight_controller.h" -#include "ash/wm/overview/overview_item.h" +#include "ash/wm/overview/overview_test_util.h" #include "ash/wm/window_util.h" #include "base/test/scoped_feature_list.h" -#include "ui/aura/test/test_window_delegate.h" -#include "ui/aura/test/test_windows.h" #include "ui/aura/window.h" -#include "ui/aura/window_event_dispatcher.h" #include "ui/events/test/event_generator.h" #include "ui/views/widget/widget.h" namespace ash { +namespace { + +bool InOverviewSession() { + return Shell::Get()->overview_controller()->InOverviewSession(); +} + +} // namespace + class OverviewGestureHandlerTest : public AshTestBase { public: OverviewGestureHandlerTest() = default; ~OverviewGestureHandlerTest() override = default; - aura::Window* CreateWindow(const gfx::Rect& bounds) { - return CreateTestWindowInShellWithDelegate(&delegate_, -1, bounds); - } - - bool InOverviewSession() { - return Shell::Get()->overview_controller()->InOverviewSession(); - } - const aura::Window* GetHighlightedWindow() { - auto* controller = Shell::Get()->overview_controller(); - if (!controller->InOverviewSession()) - return nullptr; + return InOverviewSession() ? GetOverviewHighlightedWindow() : nullptr; + } - auto* overview_session = controller->overview_session(); - OverviewItem* item = - overview_session->highlight_controller()->GetHighlightedItem(); - if (!item) - return nullptr; - return item->GetWindow(); + void Scroll(float x_offset, float y_offset, int fingers) { + GetEventGenerator()->ScrollSequence( + gfx::Point(), base::TimeDelta::FromMilliseconds(5), x_offset, y_offset, + /*steps=*/100, fingers); } float vertical_threshold_pixels() const { @@ -61,50 +53,37 @@ } private: - aura::test::TestWindowDelegate delegate_; - DISALLOW_COPY_AND_ASSIGN(OverviewGestureHandlerTest); }; // Tests a three fingers upwards scroll gesture to enter and a scroll down to // exit overview. TEST_F(OverviewGestureHandlerTest, VerticalScrolls) { - gfx::Rect bounds(0, 0, 400, 400); - aura::Window* root_window = Shell::GetPrimaryRootWindow(); - std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); - ui::test::EventGenerator generator(root_window, root_window); const float long_scroll = 2 * vertical_threshold_pixels(); - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - 0, -long_scroll, 100, 3); + Scroll(0, -long_scroll, 3); EXPECT_TRUE(InOverviewSession()); // Swiping up again does nothing. - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - 0, -long_scroll, 100, 3); + Scroll(0, -long_scroll, 3); EXPECT_TRUE(InOverviewSession()); // Swiping down exits. - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - 0, long_scroll, 100, 3); + Scroll(0, long_scroll, 3); EXPECT_FALSE(InOverviewSession()); // Swiping down again does nothing. - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - 0, long_scroll, 100, 3); + Scroll(0, long_scroll, 3); EXPECT_FALSE(InOverviewSession()); } // Tests three finger horizontal scroll gesture to move selection left or right. TEST_F(OverviewGestureHandlerTest, HorizontalScrollInOverview) { - gfx::Rect bounds(0, 0, 400, 400); - aura::Window* root_window = Shell::GetPrimaryRootWindow(); - std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window3(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window4(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window5(CreateWindow(bounds)); - ui::test::EventGenerator generator(root_window, root_window); + const gfx::Rect bounds(0, 0, 400, 400); + std::unique_ptr<aura::Window> window1 = CreateTestWindow(bounds); + std::unique_ptr<aura::Window> window2 = CreateTestWindow(bounds); + std::unique_ptr<aura::Window> window3 = CreateTestWindow(bounds); + std::unique_ptr<aura::Window> window4 = CreateTestWindow(bounds); + std::unique_ptr<aura::Window> window5 = CreateTestWindow(bounds); const float vertical_scroll = 2 * vertical_threshold_pixels(); const float horizontal_scroll = horizontal_threshold_pixels(); // Enter overview mode as if using an accelerator. @@ -114,13 +93,10 @@ EXPECT_TRUE(InOverviewSession()); // Scrolls until a window is highlight, ignoring any desks items (if any). - auto scroll_until_window_highlighted = [&generator, this](float x_offset, - float y_offset) { + auto scroll_until_window_highlighted = [this](float x_offset, + float y_offset) { do { - generator.ScrollSequence(gfx::Point(), - base::TimeDelta::FromMilliseconds(5), x_offset, - y_offset, - /*steps=*/100, /*num_fingers=*/3); + Scroll(x_offset, y_offset, /*num_fingers=*/3); } while (!GetHighlightedWindow()); }; @@ -140,8 +116,7 @@ EXPECT_TRUE(InOverviewSession()); // Swiping down exits and selects the currently-highlighted window. - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - 0, vertical_scroll, 100, 3); + Scroll(0, vertical_scroll, 3); EXPECT_FALSE(InOverviewSession()); // Second MRU window is selected (i.e. |window4|). @@ -150,59 +125,38 @@ // Tests that a mostly horizontal three-finger scroll does not trigger overview. TEST_F(OverviewGestureHandlerTest, HorizontalScrolls) { - gfx::Rect bounds(0, 0, 400, 400); - aura::Window* root_window = Shell::GetPrimaryRootWindow(); - std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); - ui::test::EventGenerator generator(root_window, root_window); const float long_scroll = 2 * vertical_threshold_pixels(); - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - long_scroll + 100, -long_scroll, 100, 3); + Scroll(long_scroll + 100, -long_scroll, 3); EXPECT_FALSE(InOverviewSession()); - generator.ScrollSequence(gfx::Point(), base::TimeDelta::FromMilliseconds(5), - -long_scroll - 100, -long_scroll, 100, 3); + Scroll(-long_scroll - 100, -long_scroll, 3); EXPECT_FALSE(InOverviewSession()); } -// Tests a scroll up with three fingers without releasing followed by a scroll -// down by a lesser amount which should still be enough to exit. -TEST_F(OverviewGestureHandlerTest, ScrollUpDownWithoutReleasing) { - gfx::Rect bounds(0, 0, 400, 400); - aura::Window* root_window = Shell::GetPrimaryRootWindow(); - std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); - std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); - ui::test::EventGenerator generator(root_window, root_window); +// Tests that we only enter overview after a scroll has ended. +TEST_F(OverviewGestureHandlerTest, EnterOverviewOnScrollEnd) { base::TimeTicks timestamp = base::TimeTicks::Now(); - gfx::Point start; - int num_fingers = 3; + const int num_fingers = 3; base::TimeDelta step_delay(base::TimeDelta::FromMilliseconds(5)); - ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL, start, timestamp, 0, - 0, 0, 0, 0, num_fingers); - generator.Dispatch(&fling_cancel); + ui::ScrollEvent fling_cancel(ui::ET_SCROLL_FLING_CANCEL, gfx::Point(), + timestamp, 0, 0, 0, 0, 0, num_fingers); + GetEventGenerator()->Dispatch(&fling_cancel); - // Scroll up by 1000px. + // Scroll up by 1000px. We are not in overview yet, because the scroll is + // still ongoing. for (int i = 0; i < 100; ++i) { timestamp += step_delay; - ui::ScrollEvent move(ui::ET_SCROLL, start, timestamp, 0, 0, -10, 0, -10, - num_fingers); - generator.Dispatch(&move); + ui::ScrollEvent move(ui::ET_SCROLL, gfx::Point(), timestamp, 0, 0, -10, 0, + -10, num_fingers); + GetEventGenerator()->Dispatch(&move); } + ASSERT_FALSE(InOverviewSession()); + timestamp += step_delay; + ui::ScrollEvent fling_start(ui::ET_SCROLL_FLING_START, gfx::Point(), + timestamp, 0, 0, 10, 0, 10, num_fingers); + GetEventGenerator()->Dispatch(&fling_start); EXPECT_TRUE(InOverviewSession()); - - // Without releasing scroll back down by 600px. - for (int i = 0; i < 60; ++i) { - timestamp += step_delay; - ui::ScrollEvent move(ui::ET_SCROLL, start, timestamp, 0, 0, 10, 0, 10, - num_fingers); - generator.Dispatch(&move); - } - - EXPECT_FALSE(InOverviewSession()); - ui::ScrollEvent fling_start(ui::ET_SCROLL_FLING_START, start, timestamp, 0, 0, - 10, 0, 10, num_fingers); - generator.Dispatch(&fling_start); } class DesksGestureHandlerTest : public OverviewGestureHandlerTest { @@ -216,17 +170,11 @@ OverviewGestureHandlerTest::SetUp(); } - void Scroll(float x_offset, float y_offset) { - GetEventGenerator()->ScrollSequence(gfx::Point(), - base::TimeDelta::FromMilliseconds(5), - x_offset, y_offset, 100, 4); - } - void ScrollToSwitchDesks(bool scroll_left) { DeskSwitchAnimationWaiter waiter; const float x_offset = (scroll_left ? -1 : 1) * horizontal_threshold_pixels(); - Scroll(x_offset, 0); + Scroll(x_offset, 0, 4); waiter.Wait(); } @@ -254,7 +202,7 @@ // Tests that since there is no previous desk, we remain on the same desk when // scrolling right. const float long_scroll = horizontal_threshold_pixels(); - Scroll(long_scroll, 0.f); + Scroll(long_scroll, 0.f, 4); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); } @@ -269,17 +217,33 @@ const float short_scroll = horizontal_threshold_pixels() - 10.f; const float long_scroll = horizontal_threshold_pixels(); // Tests that a short horizontal scroll does not switch desks. - Scroll(short_scroll, 0.f); + Scroll(short_scroll, 0.f, 4); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); // Tests that a scroll that meets the horizontal requirements, but is mostly // vertical does not switch desks. - Scroll(long_scroll, long_scroll + 10.f); + Scroll(long_scroll, long_scroll + 10.f, 4); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); // Tests that a vertical scroll does not switch desks. - Scroll(0.f, vertical_threshold_pixels()); + Scroll(0.f, vertical_threshold_pixels(), 4); EXPECT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); } +// Tests that a large scroll only moves to the next desk. +TEST_F(DesksGestureHandlerTest, NoDoubleDeskChange) { + auto* desk_controller = DesksController::Get(); + desk_controller->NewDesk(DesksCreationRemovalSource::kButton); + desk_controller->NewDesk(DesksCreationRemovalSource::kButton); + desk_controller->NewDesk(DesksCreationRemovalSource::kButton); + ASSERT_EQ(4u, desk_controller->desks().size()); + ASSERT_EQ(desk_controller->desks()[0].get(), desk_controller->active_desk()); + + const float long_scroll = horizontal_threshold_pixels() * 3; + DeskSwitchAnimationWaiter waiter; + Scroll(-long_scroll, 0, 4); + waiter.Wait(); + EXPECT_EQ(desk_controller->desks()[1].get(), desk_controller->active_desk()); +} + } // namespace ash
diff --git a/ash/wm/overview/overview_controller.cc b/ash/wm/overview/overview_controller.cc index 483ba7f8..8fb4318 100644 --- a/ash/wm/overview/overview_controller.cc +++ b/ash/wm/overview/overview_controller.cc
@@ -304,9 +304,9 @@ return overview_session_ && !overview_session_->is_shutting_down(); } -void OverviewController::IncrementSelection(int increment) { +void OverviewController::IncrementSelection(bool forward) { DCHECK(InOverviewSession()); - overview_session_->IncrementSelection(increment); + overview_session_->IncrementSelection(forward); } bool OverviewController::AcceptSelection() {
diff --git a/ash/wm/overview/overview_controller.h b/ash/wm/overview/overview_controller.h index f6e6d18c..971bfe281 100644 --- a/ash/wm/overview/overview_controller.h +++ b/ash/wm/overview/overview_controller.h
@@ -40,9 +40,8 @@ // Returns true if overview mode is active. bool InOverviewSession() const; - // Moves the current selection by |increment| items. Positive values of - // |increment| move the selection forward, negative values move it backward. - void IncrementSelection(int increment); + // Moves the current selection forward or backward. + void IncrementSelection(bool forward); // Accepts current selection if any. Returns true if a selection was made, // false otherwise.
diff --git a/ash/wm/overview/overview_session.cc b/ash/wm/overview/overview_session.cc index 507958f..600ace1 100644 --- a/ash/wm/overview/overview_session.cc +++ b/ash/wm/overview/overview_session.cc
@@ -357,8 +357,8 @@ EndOverview(); } -void OverviewSession::IncrementSelection(int increment) { - Move(increment < 0); +void OverviewSession::IncrementSelection(bool forward) { + Move(/*reverse=*/!forward); } bool OverviewSession::AcceptSelection() {
diff --git a/ash/wm/overview/overview_session.h b/ash/wm/overview/overview_session.h index b21ec95..1d6450ef4 100644 --- a/ash/wm/overview/overview_session.h +++ b/ash/wm/overview/overview_session.h
@@ -112,9 +112,8 @@ // Called when the last overview item from a grid is deleted. void OnGridEmpty(); - // Moves the current selection by |increment| items. Positive values of - // |increment| move the selection forward, negative values move it backward. - void IncrementSelection(int increment); + // Moves the current selection forwards or backwards. + void IncrementSelection(bool forward); // Accepts current selection if any. Returns true if a selection was made, // false otherwise.
diff --git a/base/android/java_handler_thread.cc b/base/android/java_handler_thread.cc index 52c0c53..ecbbc0e 100644 --- a/base/android/java_handler_thread.cc +++ b/base/android/java_handler_thread.cc
@@ -42,22 +42,22 @@ JavaHandlerThread::~JavaHandlerThread() { JNIEnv* env = base::android::AttachCurrentThread(); DCHECK(!Java_JavaHandlerThread_isAlive(env, java_thread_)); - DCHECK(!task_environment_ || task_environment_->pump->IsAborted()); + DCHECK(!state_ || state_->pump->IsAborted()); // TODO(mthiesse): We shouldn't leak the MessageLoop as this could affect // future tests. - if (task_environment_ && task_environment_->pump->IsAborted()) { + if (state_ && state_->pump->IsAborted()) { // When the Pump has been aborted due to a crash, we intentionally leak the // SequenceManager because the SequenceManager hasn't been shut down // properly and would trigger DCHECKS. This should only happen in tests, // where we handle the exception instead of letting it take down the // process. - task_environment_.release(); + state_.release(); } } void JavaHandlerThread::Start() { // Check the thread has not already been started. - DCHECK(!task_environment_); + DCHECK(!state_); JNIEnv* env = base::android::AttachCurrentThread(); base::WaitableEvent initialize_event( @@ -90,14 +90,14 @@ if (name_) PlatformThread::SetName(name_); - task_environment_ = std::make_unique<TaskEnvironment>(); + state_ = std::make_unique<State>(); Init(); reinterpret_cast<base::WaitableEvent*>(event)->Signal(); } void JavaHandlerThread::OnLooperStopped(JNIEnv* env) { DCHECK(task_runner()->BelongsToCurrentThread()); - task_environment_.reset(); + state_.reset(); CleanUp(); @@ -132,8 +132,8 @@ void JavaHandlerThread::StopOnThread() { DCHECK(task_runner()->BelongsToCurrentThread()); - DCHECK(task_environment_); - task_environment_->pump->QuitWhenIdle(base::BindOnce( + DCHECK(state_); + state_->pump->QuitWhenIdle(base::BindOnce( &JavaHandlerThread::QuitThreadSafely, base::Unretained(this))); } @@ -144,7 +144,7 @@ reinterpret_cast<intptr_t>(this)); } -JavaHandlerThread::TaskEnvironment::TaskEnvironment() +JavaHandlerThread::State::State() : sequence_manager(sequence_manager::CreateUnboundSequenceManager( sequence_manager::SequenceManager::Settings::Builder() .SetMessagePumpType(base::MessagePumpType::JAVA) @@ -164,7 +164,7 @@ sequence_manager->BindToMessagePump(std::move(message_pump)); } -JavaHandlerThread::TaskEnvironment::~TaskEnvironment() = default; +JavaHandlerThread::State::~State() = default; } // namespace android } // namespace base
diff --git a/base/android/java_handler_thread.h b/base/android/java_handler_thread.h index 5e8b865..aee6d4b 100644 --- a/base/android/java_handler_thread.h +++ b/base/android/java_handler_thread.h
@@ -42,9 +42,7 @@ // Gets the TaskRunner associated with the message loop. // Called from any thread. scoped_refptr<SingleThreadTaskRunner> task_runner() const { - return task_environment_ - ? task_environment_->default_task_queue->task_runner() - : nullptr; + return state_ ? state_->default_task_queue->task_runner() : nullptr; } // Called from the parent thread. @@ -72,16 +70,16 @@ protected: // Struct exists so JavaHandlerThread destructor can intentionally leak in an // abort scenario. - struct TaskEnvironment { - TaskEnvironment(); - ~TaskEnvironment(); + struct State { + State(); + ~State(); std::unique_ptr<sequence_manager::SequenceManager> sequence_manager; scoped_refptr<sequence_manager::TaskQueue> default_task_queue; MessagePumpForUI* pump = nullptr; }; - TaskEnvironment* task_environment() const { return task_environment_.get(); } + State* state() const { return state_.get(); } // Semantically the same as base::Thread#Init(), but unlike base::Thread the // Android Looper will already be running. This Init() call will still run @@ -92,7 +90,7 @@ // loop ends. The Android Looper will also have been quit by this point. virtual void CleanUp() {} - std::unique_ptr<TaskEnvironment> task_environment_; + std::unique_ptr<State> state_; private: void StartMessageLoop();
diff --git a/base/android/java_handler_thread_unittest.cc b/base/android/java_handler_thread_unittest.cc index 66ab184..d53d4e20 100644 --- a/base/android/java_handler_thread_unittest.cc +++ b/base/android/java_handler_thread_unittest.cc
@@ -6,6 +6,7 @@ #include "base/synchronization/waitable_event.h" #include "base/task/sequence_manager/sequence_manager_impl.h" +#include "base/task/task_observer.h" #include "base/test/android/java_handler_thread_helpers.h" #include "base/test/bind_test_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -20,11 +21,11 @@ base::ThreadPriority priority = base::ThreadPriority::NORMAL) : android::JavaHandlerThread(name, priority) {} - using android::JavaHandlerThread::task_environment; - using android::JavaHandlerThread::TaskEnvironment; + using android::JavaHandlerThread::state; + using android::JavaHandlerThread::State; }; -class DummyTaskObserver : public MessageLoop::TaskObserver { +class DummyTaskObserver : public TaskObserver { public: explicit DummyTaskObserver(int num_tasks) : num_tasks_started_(0), num_tasks_processed_(0), num_tasks_(num_tasks) {} @@ -128,7 +129,7 @@ sequence_manager::internal::SequenceManagerImpl* sequence_manager = static_cast<sequence_manager::internal::SequenceManagerImpl*>( - java_thread->task_environment()->sequence_manager.get()); + java_thread->state()->sequence_manager.get()); java_thread->task_runner()->PostTask( FROM_HERE, BindLambdaForTesting([&]() {
diff --git a/base/memory/memory_pressure_monitor_win_unittest.cc b/base/memory/memory_pressure_monitor_win_unittest.cc index 8599f246..175f6f1c 100644 --- a/base/memory/memory_pressure_monitor_win_unittest.cc +++ b/base/memory/memory_pressure_monitor_win_unittest.cc
@@ -9,9 +9,14 @@ #include "base/memory/memory_pressure_listener.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" +#include "build/build_config.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_WIN) +#include <windows.h> +#endif + namespace base { namespace win {
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h index 0a62dfe5..b8b3142 100644 --- a/base/message_loop/message_loop.h +++ b/base/message_loop/message_loop.h
@@ -13,7 +13,6 @@ #include "base/gtest_prod_util.h" #include "base/macros.h" #include "base/memory/scoped_refptr.h" -#include "base/message_loop/message_loop_current.h" #include "base/message_loop/message_pump_type.h" #include "base/message_loop/timer_slack.h" #include "base/pending_task.h" @@ -25,11 +24,12 @@ namespace base { namespace internal { -class MessageLoopTaskEnvironment; +class MessageLoopThreadDelegate; } // namespace internal class MessageLoopImpl; class MessagePump; +class TaskObserver; namespace sequence_manager { class TaskQueue; @@ -123,9 +123,6 @@ // Gets the TaskRunner associated with this message loop. scoped_refptr<SingleThreadTaskRunner> task_runner() const; - // TODO(yutak): Replace all the use sites with base::TaskObserver. - using TaskObserver = MessageLoopCurrent::TaskObserver; - // These functions can only be called on the same thread that |this| is // running on. // These functions must not be called from a TaskObserver callback. @@ -175,7 +172,7 @@ friend class MessageLoopTypedTest; friend class ScheduleWorkTest; friend class Thread; - friend class internal::MessageLoopTaskEnvironment; + friend class internal::MessageLoopThreadDelegate; friend class sequence_manager::internal::SequenceManagerImpl; FRIEND_TEST_ALL_PREFIXES(MessageLoopTest, DeleteUnboundLoop);
diff --git a/base/message_loop/message_loop_current.h b/base/message_loop/message_loop_current.h index 31b33840..ea5e4495 100644 --- a/base/message_loop/message_loop_current.h +++ b/base/message_loop/message_loop_current.h
@@ -110,10 +110,6 @@ // instance should replace its TaskRunner. void SetTaskRunner(scoped_refptr<SingleThreadTaskRunner> task_runner); - // This alias is deprecated. Use base::TaskObserver instead. - // TODO(yutak): Replace all the use sites with base::TaskObserver. - using TaskObserver = base::TaskObserver; - // Forwards to MessageLoop::(Add|Remove)TaskObserver. // DEPRECATED(https://crbug.com/825327): only owners of the MessageLoop // instance should add task observers on it.
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc index 9f2e58d..7a1fcda 100644 --- a/base/message_loop/message_loop_unittest.cc +++ b/base/message_loop/message_loop_unittest.cc
@@ -22,6 +22,7 @@ #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/synchronization/waitable_event.h" +#include "base/task/task_observer.h" #include "base/task/thread_pool/thread_pool.h" #include "base/test/bind_test_util.h" #include "base/test/gtest_util.h" @@ -206,7 +207,7 @@ std::vector<TaskItem> task_list_; }; -class DummyTaskObserver : public MessageLoop::TaskObserver { +class DummyTaskObserver : public TaskObserver { public: explicit DummyTaskObserver(int num_tasks) : num_tasks_started_(0), num_tasks_processed_(0), num_tasks_(num_tasks) {}
diff --git a/base/message_loop/message_pump_kqueue_unittest.cc b/base/message_loop/message_pump_kqueue_unittest.cc index 7eef541..7e32675 100644 --- a/base/message_loop/message_pump_kqueue_unittest.cc +++ b/base/message_loop/message_pump_kqueue_unittest.cc
@@ -12,6 +12,7 @@ #include "base/bind.h" #include "base/memory/ptr_util.h" #include "base/message_loop/message_loop.h" +#include "base/single_thread_task_runner.h" #include "testing/gtest/include/gtest/gtest.h" namespace base {
diff --git a/base/message_loop/message_pump_perftest.cc b/base/message_loop/message_pump_perftest.cc index d70b46c..1af026f 100644 --- a/base/message_loop/message_pump_perftest.cc +++ b/base/message_loop/message_pump_perftest.cc
@@ -37,8 +37,8 @@ explicit JavaHandlerThreadForTest(const char* name) : android::JavaHandlerThread(name, base::ThreadPriority::NORMAL) {} - using android::JavaHandlerThread::task_environment; - using android::JavaHandlerThread::TaskEnvironment; + using android::JavaHandlerThread::state; + using android::JavaHandlerThread::State; }; #endif @@ -102,8 +102,8 @@ std::unique_ptr<MessageLoop> message_loop = MessageLoop::CreateUnbound(target_type); message_loop_ = message_loop.get(); - options.task_environment = - new internal::MessageLoopTaskEnvironment(std::move(message_loop)); + options.delegate = + new internal::MessageLoopThreadDelegate(std::move(message_loop)); target_->StartWithOptions(options); // Without this, it's possible for the scheduling threads to start and run @@ -195,7 +195,7 @@ #if defined(OS_ANDROID) if (java_thread_) { return static_cast<sequence_manager::internal::SequenceManagerImpl*>( - java_thread_->task_environment()->sequence_manager.get()); + java_thread_->state()->sequence_manager.get()); } #endif return MessageLoopCurrent::Get()->GetCurrentSequenceManagerImpl();
diff --git a/base/power_monitor/power_monitor_device_source_win.cc b/base/power_monitor/power_monitor_device_source_win.cc index 9aa677e..f735135 100644 --- a/base/power_monitor/power_monitor_device_source_win.cc +++ b/base/power_monitor/power_monitor_device_source_win.cc
@@ -4,12 +4,12 @@ #include "base/power_monitor/power_monitor_device_source.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/power_monitor/power_monitor.h" #include "base/power_monitor/power_monitor_source.h" -#include "base/win/wrapped_window_proc.h" #include "base/strings/string16.h" #include "base/strings/string_util.h" +#include "base/win/wrapped_window_proc.h" namespace base {
diff --git a/base/supports_user_data.cc b/base/supports_user_data.cc index b3b21bb0..8060543 100644 --- a/base/supports_user_data.cc +++ b/base/supports_user_data.cc
@@ -16,6 +16,9 @@ sequence_checker_.DetachFromSequence(); } +SupportsUserData::SupportsUserData(SupportsUserData&&) = default; +SupportsUserData& SupportsUserData::operator=(SupportsUserData&&) = default; + SupportsUserData::Data* SupportsUserData::GetUserData(const void* key) const { DCHECK(sequence_checker_.CalledOnValidSequence()); // Avoid null keys; they are too vulnerable to collision.
diff --git a/base/supports_user_data.h b/base/supports_user_data.h index cb97a23..f8aa492c 100644 --- a/base/supports_user_data.h +++ b/base/supports_user_data.h
@@ -20,6 +20,8 @@ class BASE_EXPORT SupportsUserData { public: SupportsUserData(); + SupportsUserData(SupportsUserData&&); + SupportsUserData& operator=(SupportsUserData&&); // Derive from this class and add your own data members to associate extra // information with this object. Alternatively, add this as a public base
diff --git a/base/supports_user_data_unittest.cc b/base/supports_user_data_unittest.cc index 2e0a724..b30ede02 100644 --- a/base/supports_user_data_unittest.cc +++ b/base/supports_user_data_unittest.cc
@@ -36,5 +36,23 @@ // Destruction of supports_user_data runs the actual test. } +struct TestData : public SupportsUserData::Data {}; + +TEST(SupportsUserDataTest, Movable) { + TestSupportsUserData supports_user_data_1; + char key1 = 0; + supports_user_data_1.SetUserData(&key1, std::make_unique<TestData>()); + void* data_1_ptr = supports_user_data_1.GetUserData(&key1); + + TestSupportsUserData supports_user_data_2; + char key2 = 0; + supports_user_data_2.SetUserData(&key2, std::make_unique<TestData>()); + + supports_user_data_2 = std::move(supports_user_data_1); + + EXPECT_EQ(data_1_ptr, supports_user_data_2.GetUserData(&key1)); + EXPECT_EQ(nullptr, supports_user_data_2.GetUserData(&key2)); +} + } // namespace } // namespace base
diff --git a/base/test/launcher/test_launcher_unittest.cc b/base/test/launcher/test_launcher_unittest.cc index 3fbb76a..0efd407 100644 --- a/base/test/launcher/test_launcher_unittest.cc +++ b/base/test/launcher/test_launcher_unittest.cc
@@ -676,7 +676,7 @@ } // Basic Test to crash TEST(MockUnitTests, DISABLED_CrashTest) { - CHECK(false); + IMMEDIATE_CRASH(); } // Using UnitTestLauncherDelegate and TestLauncher (with minor mocks) @@ -725,7 +725,7 @@ // We expect the result to be stripped of disabled prefix. ValidateTestResult(iteration_val, "MockUnitTests.PassTest", "SUCCESS", 0u); ValidateTestResult(iteration_val, "MockUnitTests.FailTest", "FAILURE", 1u); - ValidateTestResult(iteration_val, "MockUnitTests.CrashTest", "CRASH", 1u); + ValidateTestResult(iteration_val, "MockUnitTests.CrashTest", "CRASH", 0u); } } // namespace
diff --git a/base/test/scoped_task_environment.cc b/base/test/scoped_task_environment.cc index 5bd74838..198568c6 100644 --- a/base/test/scoped_task_environment.cc +++ b/base/test/scoped_task_environment.cc
@@ -547,6 +547,11 @@ void ScopedTaskEnvironment::RunUntilIdle() { DCHECK_CALLED_ON_VALID_THREAD(main_thread_checker_); + if (threading_mode_ == ThreadingMode::MAIN_THREAD_ONLY) { + RunLoop(RunLoop::Type::kNestableTasksAllowed).RunUntilIdle(); + return; + } + // TODO(gab): This can be heavily simplified to essentially: // bool HasMainThreadTasks() { // if (message_loop_) @@ -635,7 +640,7 @@ DCHECK(mock_time_domain_); DCHECK_GE(delta, TimeDelta()); - const bool could_run_tasks = task_tracker_->AllowRunTasks(); + const bool could_run_tasks = task_tracker_ && task_tracker_->AllowRunTasks(); const TimeTicks fast_forward_until = mock_time_domain_->NowTicks() + delta; do { @@ -643,7 +648,7 @@ } while (mock_time_domain_->FastForwardToNextTaskOrCap(fast_forward_until) != MockTimeDomain::NextTaskSource::kNone); - if (!could_run_tasks) + if (task_tracker_ && !could_run_tasks) task_tracker_->DisallowRunTasks(); }
diff --git a/base/test/scoped_task_environment_unittest.cc b/base/test/scoped_task_environment_unittest.cc index 8e69931..e42b3a6b 100644 --- a/base/test/scoped_task_environment_unittest.cc +++ b/base/test/scoped_task_environment_unittest.cc
@@ -20,6 +20,7 @@ #include "base/task/sequence_manager/time_domain.h" #include "base/task/thread_pool/thread_pool.h" #include "base/test/bind_test_util.h" +#include "base/test/gtest_util.h" #include "base/test/mock_callback.h" #include "base/test/mock_log.h" #include "base/test/test_timeouts.h" @@ -311,12 +312,6 @@ ScopedTaskEnvironment::TimeSource::MOCK_TIME); } -TEST_F(ScopedTaskEnvironmentTest, SingleThreadShouldNotInitializeThreadPool) { - ScopedTaskEnvironment scoped_task_environment( - ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY); - EXPECT_THAT(ThreadPoolInstance::Get(), IsNull()); -} - // Verify that the right MessagePump is instantiated under each MainThreadType. // This avoids having to run all other ScopedTaskEnvironmentTests in every // MainThreadType which is redundant (message loop and message pump tests @@ -1119,5 +1114,49 @@ EXPECT_EQ(Time::Now(), start_time + kDelay); } +TEST_F(ScopedTaskEnvironmentTest, SingleThread) { + ScopedTaskEnvironment scoped_task_environment( + ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY); + EXPECT_THAT(ThreadPoolInstance::Get(), IsNull()); + + bool ran = false; + ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindLambdaForTesting([&]() { ran = true; })); + RunLoop().RunUntilIdle(); + EXPECT_TRUE(ran); + + EXPECT_DCHECK_DEATH(PostTask(FROM_HERE, {ThreadPool()}, DoNothing())); +} + +// Verify that traits other than ThreadingMode can be applied to +// ScopedTaskEnvironment. +TEST_F(ScopedTaskEnvironmentTest, SingleThreadMockTime) { + ScopedTaskEnvironment scoped_task_environment( + ScopedTaskEnvironment::ThreadingMode::MAIN_THREAD_ONLY, + ScopedTaskEnvironment::TimeSource::MOCK_TIME); + + const TimeTicks start_time = TimeTicks::Now(); + + constexpr TimeDelta kDelay = TimeDelta::FromSeconds(100); + + int counter = 0; + ThreadTaskRunnerHandle::Get()->PostDelayedTask( + FROM_HERE, base::BindLambdaForTesting([&]() { counter += 1; }), kDelay); + ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindLambdaForTesting([&]() { counter += 2; })); + + int expected_value = 0; + EXPECT_EQ(expected_value, counter); + + scoped_task_environment.RunUntilIdle(); + expected_value += 2; + EXPECT_EQ(expected_value, counter); + + scoped_task_environment.FastForwardUntilNoTasksRemain(); + expected_value += 1; + EXPECT_EQ(expected_value, counter); + EXPECT_EQ(TimeTicks::Now(), start_time + kDelay); +} + } // namespace test } // namespace base
diff --git a/base/test/test_message_loop.h b/base/test/test_message_loop.h index be23936ac..952c195 100644 --- a/base/test/test_message_loop.h +++ b/base/test/test_message_loop.h
@@ -7,6 +7,7 @@ #include "base/message_loop/message_loop.h" #include "base/message_loop/message_pump_type.h" +#include "base/single_thread_task_runner.h" namespace base {
diff --git a/base/threading/thread.cc b/base/threading/thread.cc index 447bdaeb..a411bb8 100644 --- a/base/threading/thread.cc +++ b/base/threading/thread.cc
@@ -79,7 +79,7 @@ bool Thread::StartWithOptions(const Options& options) { DCHECK(owning_sequence_checker_.CalledOnValidSequence()); - DCHECK(!task_environment_); + DCHECK(!delegate_); DCHECK(!IsRunning()); DCHECK(!stopping_) << "Starting a non-joinable thread a second time? That's " << "not allowed!"; @@ -96,14 +96,14 @@ timer_slack_ = options.timer_slack; - if (options.task_environment) { + if (options.delegate) { DCHECK(!options.message_pump_factory); - task_environment_ = WrapUnique(options.task_environment); + delegate_ = WrapUnique(options.delegate); } else if (options.message_pump_factory) { - task_environment_ = std::make_unique<internal::MessageLoopTaskEnvironment>( + delegate_ = std::make_unique<internal::MessageLoopThreadDelegate>( MessageLoop::CreateUnbound(options.message_pump_factory.Run())); } else { - task_environment_ = std::make_unique<internal::MessageLoopTaskEnvironment>( + delegate_ = std::make_unique<internal::MessageLoopThreadDelegate>( MessageLoop::CreateUnbound(options.message_pump_type)); } @@ -142,7 +142,7 @@ bool Thread::WaitUntilThreadStarted() const { DCHECK(owning_sequence_checker_.CalledOnValidSequence()); - if (!task_environment_) + if (!delegate_) return false; // https://crbug.com/918039 base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope allow_wait; @@ -152,7 +152,7 @@ void Thread::FlushForTesting() { DCHECK(owning_sequence_checker_.CalledOnValidSequence()); - if (!task_environment_) + if (!delegate_) return; WaitableEvent done(WaitableEvent::ResetPolicy::AUTOMATIC, @@ -179,14 +179,14 @@ // Wait for the thread to exit. // - // TODO(darin): Unfortunately, we need to keep |task_environment_| around + // TODO(darin): Unfortunately, we need to keep |delegate_| around // until the thread exits. Some consumers are abusing the API. Make them stop. PlatformThread::Join(thread_); thread_ = base::PlatformThreadHandle(); - // The thread should release |task_environment_| on exit (note: Join() adds + // The thread should release |delegate_| on exit (note: Join() adds // an implicit memory barrier and no lock is thus required for this check). - DCHECK(!task_environment_); + DCHECK(!delegate_); stopping_ = false; } @@ -196,7 +196,7 @@ // enable this check. // DCHECK(owning_sequence_checker_.CalledOnValidSequence()); - if (stopping_ || !task_environment_) + if (stopping_ || !delegate_) return; stopping_ = true; @@ -222,11 +222,11 @@ // enable this check. // DCHECK(owning_sequence_checker_.CalledOnValidSequence()); - // If the thread's already started (i.e. |task_environment_| is non-null) and + // If the thread's already started (i.e. |delegate_| is non-null) and // not yet requested to stop (i.e. |stopping_| is false) we can just return // true. (Note that |stopping_| is touched only on the same sequence that // starts / started the new thread so we need no locking here.) - if (task_environment_ && !stopping_) + if (delegate_ && !stopping_) return true; // Otherwise check the |running_| flag, which is set to true by the new thread // only while it is inside Run(). @@ -273,9 +273,9 @@ ANNOTATE_THREAD_NAME(name_.c_str()); // Tell the name to race detector. // Lazily initialize the |message_loop| so that it can run on this thread. - DCHECK(task_environment_); + DCHECK(delegate_); // This binds MessageLoopCurrent and ThreadTaskRunnerHandle. - task_environment_->BindToCurrentThread(timer_slack_); + delegate_->BindToCurrentThread(timer_slack_); DCHECK(MessageLoopCurrent::Get()); DCHECK(ThreadTaskRunnerHandle::IsSet()); @@ -284,7 +284,7 @@ std::unique_ptr<FileDescriptorWatcher> file_descriptor_watcher; if (MessageLoopCurrentForIO::IsSet()) { file_descriptor_watcher.reset( - new FileDescriptorWatcher(task_environment_->GetDefaultTaskRunner())); + new FileDescriptorWatcher(delegate_->GetDefaultTaskRunner())); } #endif @@ -327,7 +327,7 @@ // We can't receive messages anymore. // (The message loop is destructed at the end of this block) - task_environment_.reset(); + delegate_.reset(); run_loop_ = nullptr; } @@ -339,18 +339,18 @@ namespace internal { -MessageLoopTaskEnvironment::MessageLoopTaskEnvironment( +MessageLoopThreadDelegate::MessageLoopThreadDelegate( std::unique_ptr<MessageLoop> message_loop) : message_loop_(std::move(message_loop)) {} -MessageLoopTaskEnvironment::~MessageLoopTaskEnvironment() {} +MessageLoopThreadDelegate::~MessageLoopThreadDelegate() {} scoped_refptr<SingleThreadTaskRunner> -MessageLoopTaskEnvironment::GetDefaultTaskRunner() { +MessageLoopThreadDelegate::GetDefaultTaskRunner() { return message_loop_->task_runner(); } -void MessageLoopTaskEnvironment::BindToCurrentThread(TimerSlack timer_slack) { +void MessageLoopThreadDelegate::BindToCurrentThread(TimerSlack timer_slack) { message_loop_->BindToCurrentThread(); message_loop_->SetTimerSlack(timer_slack); }
diff --git a/base/threading/thread.h b/base/threading/thread.h index e1a5227..73a444f 100644 --- a/base/threading/thread.h +++ b/base/threading/thread.h
@@ -60,9 +60,9 @@ // Thread object (including ~Thread()). class BASE_EXPORT Thread : PlatformThread::Delegate { public: - class BASE_EXPORT TaskEnvironment { + class BASE_EXPORT Delegate { public: - virtual ~TaskEnvironment() {} + virtual ~Delegate() {} virtual scoped_refptr<SingleThreadTaskRunner> GetDefaultTaskRunner() = 0; @@ -85,10 +85,10 @@ // This is ignored if message_pump_factory.is_null() is false. MessagePumpType message_pump_type = MessagePumpType::DEFAULT; - // An unbound TaskEnvironment that will be bound to the thread. Ownership - // of |task_environment| will be transferred to the thread. + // An unbound Delegate that will be bound to the thread. Ownership + // of |delegate| will be transferred to the thread. // TODO(alexclarke): This should be a std::unique_ptr - TaskEnvironment* task_environment = nullptr; + Delegate* delegate = nullptr; // Specifies timer slack for thread message loop. TimerSlack timer_slack = TIMER_SLACK_NONE; @@ -97,7 +97,7 @@ // on the thread. If message_pump_factory.is_null(), then a MessagePump // appropriate for |message_pump_type| is created. Setting this forces the // MessagePumpType to TYPE_CUSTOM. This is not compatible with a non-null - // |task_environment|. + // |delegate|. MessagePumpFactory message_pump_factory; // Specifies the maximum stack size that the thread is allowed to use. @@ -138,7 +138,7 @@ // init_com_with_mta(false) and then StartWithOptions() with any message loop // type other than TYPE_UI. void init_com_with_mta(bool use_mta) { - DCHECK(!task_environment_); + DCHECK(!delegate_); com_status_ = use_mta ? MTA : STA; } #endif @@ -231,9 +231,8 @@ // Start(). DCHECK(owning_sequence_checker_.CalledOnValidSequence() || (id_event_.IsSignaled() && id_ == PlatformThread::CurrentId()) || - task_environment_); - return task_environment_ ? task_environment_->GetDefaultTaskRunner() - : nullptr; + delegate_); + return delegate_ ? delegate_->GetDefaultTaskRunner() : nullptr; } // Returns the name of this thread (for display in debugger too). @@ -310,9 +309,9 @@ // Protects |id_| which must only be read while it's signaled. mutable WaitableEvent id_event_; - // The thread's TaskEnvironment and RunLoop are valid only while the thread is + // The thread's Delegate and RunLoop are valid only while the thread is // alive. Set by the created thread. - std::unique_ptr<TaskEnvironment> task_environment_; + std::unique_ptr<Delegate> delegate_; RunLoop* run_loop_ = nullptr; // Stores Options::timer_slack_ until the sequence manager has been bound to @@ -334,14 +333,13 @@ namespace internal { -class BASE_EXPORT MessageLoopTaskEnvironment : public Thread::TaskEnvironment { +class BASE_EXPORT MessageLoopThreadDelegate : public Thread::Delegate { public: - explicit MessageLoopTaskEnvironment( - std::unique_ptr<MessageLoop> message_loop); + explicit MessageLoopThreadDelegate(std::unique_ptr<MessageLoop> message_loop); - ~MessageLoopTaskEnvironment() override; + ~MessageLoopThreadDelegate() override; - // Thread::TaskEnvironment: + // Thread::Delegate: scoped_refptr<SingleThreadTaskRunner> GetDefaultTaskRunner() override; void BindToCurrentThread(TimerSlack timer_slack) override;
diff --git a/base/threading/thread_perftest.cc b/base/threading/thread_perftest.cc index ead2d2b5..e19b18b 100644 --- a/base/threading/thread_perftest.cc +++ b/base/threading/thread_perftest.cc
@@ -12,12 +12,12 @@ #include "base/command_line.h" #include "base/location.h" #include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" #include "base/single_thread_task_runner.h" #include "base/strings/stringprintf.h" #include "base/synchronization/condition_variable.h" #include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" +#include "base/task/task_observer.h" #include "base/threading/thread.h" #include "base/time/time.h" #include "build/build_config.h" @@ -150,7 +150,7 @@ // Same as above, but add observers to test their perf impact. -class MessageLoopObserver : public base::MessageLoop::TaskObserver { +class MessageLoopObserver : public base::TaskObserver { public: void WillProcessTask(const base::PendingTask& pending_task) override {} void DidProcessTask(const base::PendingTask& pending_task) override {}
diff --git a/base/threading/thread_unittest.cc b/base/threading/thread_unittest.cc index 22880e6..bdb57cc 100644 --- a/base/threading/thread_unittest.cc +++ b/base/threading/thread_unittest.cc
@@ -524,9 +524,9 @@ namespace { -class SequenceManagerTaskEnvironment : public Thread::TaskEnvironment { +class SequenceManagerThreadDelegate : public Thread::Delegate { public: - SequenceManagerTaskEnvironment() + SequenceManagerThreadDelegate() : sequence_manager_( base::sequence_manager::CreateUnboundSequenceManager()), task_queue_( @@ -536,7 +536,9 @@ sequence_manager_->SetDefaultTaskRunner(GetDefaultTaskRunner()); } - ~SequenceManagerTaskEnvironment() override {} + ~SequenceManagerThreadDelegate() override {} + + // Thread::Delegate: scoped_refptr<base::SingleThreadTaskRunner> GetDefaultTaskRunner() override { return task_queue_->task_runner(); @@ -552,20 +554,20 @@ std::unique_ptr<base::sequence_manager::SequenceManager> sequence_manager_; scoped_refptr<base::sequence_manager::TaskQueue> task_queue_; - DISALLOW_COPY_AND_ASSIGN(SequenceManagerTaskEnvironment); + DISALLOW_COPY_AND_ASSIGN(SequenceManagerThreadDelegate); }; } // namespace -TEST_F(ThreadTest, ProvidedTaskEnvironment) { - Thread thread("TaskEnvironment"); +TEST_F(ThreadTest, ProvidedThreadDelegate) { + Thread thread("ThreadDelegate"); base::Thread::Options options; - options.task_environment = new SequenceManagerTaskEnvironment(); + options.delegate = new SequenceManagerThreadDelegate(); thread.StartWithOptions(options); base::WaitableEvent event; - options.task_environment->GetDefaultTaskRunner()->PostTask( + options.delegate->GetDefaultTaskRunner()->PostTask( FROM_HERE, base::BindOnce(&base::WaitableEvent::Signal, base::Unretained(&event))); event.Wait();
diff --git a/base/trace_event/auto_open_close_event.h b/base/trace_event/auto_open_close_event.h index 2c985ca..fb88db8 100644 --- a/base/trace_event/auto_open_close_event.h +++ b/base/trace_event/auto_open_close_event.h
@@ -34,7 +34,7 @@ // must be pointers to indefinitely lived strings (e.g. hard-coded string // literals are okay, but not strings created by c_str()) AutoOpenCloseEvent(Type type, const char* event_name) - : event_name_(event_name), weak_factory_(this) { + : event_name_(event_name) { base::trace_event::TraceLog::GetInstance()->AddAsyncEnabledStateObserver( weak_factory_.GetWeakPtr()); } @@ -70,7 +70,7 @@ const char* const event_name_; base::TimeTicks start_time_; base::ThreadChecker thread_checker_; - WeakPtrFactory<AutoOpenCloseEvent> weak_factory_; + WeakPtrFactory<AutoOpenCloseEvent> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AutoOpenCloseEvent); };
diff --git a/build/config/android/config.gni b/build/config/android/config.gni index bed796e..8129327 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni
@@ -220,11 +220,6 @@ # Move Trichrome assets to the shared library APK. This will be removed # once P builds are no longer supported. https://crbug.com/943637 trichrome_shared_assets = android_sdk_release == "q" - - # Whether Developer UIs should be split into a separate DFM. - # TODO(huangs): Move this flag to its own buildflags.gni file once we - # determine where the file should go. - dfmify_dev_ui = false } if (notouch_build && defined(extra_keymappings)) {
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index deb86fa..b17fc21 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -192,6 +192,9 @@ } } +assert(!(llvm_force_head_revision && use_goma), + "can't use goma with trunk clang") + # default_include_dirs --------------------------------------------------------- # # This is a separate config so that third_party code (which would not use the
diff --git a/build/config/ios/ios_sdk.gni b/build/config/ios/ios_sdk.gni index 0a829d6..962e836 100644 --- a/build/config/ios/ios_sdk.gni +++ b/build/config/ios/ios_sdk.gni
@@ -56,7 +56,8 @@ } # Official builds may not use goma. -assert(!(is_chrome_branded && is_official_build && target_cpu == "arm64"), +assert(!(use_goma && is_chrome_branded && is_official_build && + target_cpu == "arm64"), "goma use is forbidden for official iOS builds.") assert(custom_toolchain == "" || additional_target_cpus == [],
diff --git a/build/config/linux/gtk/gtk.gni b/build/config/linux/gtk/gtk.gni index e10cd9d..0a3f35d 100644 --- a/build/config/linux/gtk/gtk.gni +++ b/build/config/linux/gtk/gtk.gni
@@ -6,7 +6,7 @@ declare_args() { # Whether or not we should use libgtk. - use_gtk = is_desktop_linux && !is_chromeos && !is_chromecast && !use_ozone + use_gtk = is_desktop_linux && !is_chromecast # The (major) version of GTK to build against. gtk_version = 3
diff --git a/build/config/linux/pangocairo/pangocairo.gni b/build/config/linux/pangocairo/pangocairo.gni index ca99445..65cf4d81 100644 --- a/build/config/linux/pangocairo/pangocairo.gni +++ b/build/config/linux/pangocairo/pangocairo.gni
@@ -4,4 +4,4 @@ import("//build/config/ui.gni") -use_pangocairo = is_linux && !use_ozone +use_pangocairo = is_linux && !is_chromeos
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index c7fed86..c0815e3 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -8905602942646600496 \ No newline at end of file +8905335047073912512 \ No newline at end of file
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 4893766..9a63489 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -8905605558660323920 \ No newline at end of file +8905335940747516928 \ No newline at end of file
diff --git a/build/mac_toolchain.py b/build/mac_toolchain.py index 776b379..ea62f280 100755 --- a/build/mac_toolchain.py +++ b/build/mac_toolchain.py
@@ -94,7 +94,7 @@ # also ensures that there will be no conflicts of cipd root. binaries_root = os.path.join(TOOLCHAIN_ROOT, 'xcode_binaries') if not os.path.exists(binaries_root): - os.mkdir(binaries_root) + os.makedirs(binaries_root) # 'cipd ensure' is idempotent. args = [
diff --git a/cc/input/scrollbar.h b/cc/input/scrollbar.h index 7d0647f..c63c800 100644 --- a/cc/input/scrollbar.h +++ b/cc/input/scrollbar.h
@@ -24,7 +24,6 @@ enum ScrollbarOrientation { HORIZONTAL, VERTICAL }; enum ScrollDirection { SCROLL_BACKWARD, SCROLL_FORWARD }; -enum AutoScrollState { NO_AUTOSCROLL, AUTOSCROLL_FORWARD, AUTOSCROLL_BACKWARD }; enum ScrollbarPart { THUMB,
diff --git a/cc/input/scrollbar_controller.cc b/cc/input/scrollbar_controller.cc index 1550731..4a27d72 100644 --- a/cc/input/scrollbar_controller.cc +++ b/cc/input/scrollbar_controller.cc
@@ -25,19 +25,39 @@ LayerTreeHostImpl* layer_tree_host_impl) : layer_tree_host_impl_(layer_tree_host_impl), scrollbar_scroll_is_active_(false), - autoscroll_state_(AutoScrollState::NO_AUTOSCROLL), currently_captured_scrollbar_(nullptr), previous_pointer_position_(gfx::PointF(0, 0)), cancelable_autoscroll_task_(nullptr) {} void ScrollbarController::WillBeginImplFrame() { + // Since this function deals only with autoscrolling (for now), early out if + // there's no autoscroll in progress. + if (!autoscroll_state_.has_value()) + return; + // TODO(arakeri): Revisit this when addressing crbug.com/967004. The // animations need to be aborted/restarted based on the pointer location (i.e // leaving/entering the track/arrows, reaching the track end etc). The // autoscroll_state_ however, needs to be reset on pointer changes. - if (autoscroll_state_ != AutoScrollState::NO_AUTOSCROLL && - ShouldCancelTrackAutoscroll()) + if (ShouldCancelTrackAutoscroll()) layer_tree_host_impl_->mutator_host()->ScrollAnimationAbort(); + + // When the scroller is autoscrolling forward, its dimensions need to be + // monitored. If the length of the scroller layer increases, the old one needs + // to be aborted and a new autoscroll animation needs to start. This needs to + // be done only for the "autoscroll forward" case. Autoscrolling backward + // always has a constant value to animate to (which is '0'. See the function + // ScrollbarController::StartAutoScrollAnimation). + if (autoscroll_state_->direction == AutoScrollDirection::AUTOSCROLL_FORWARD) { + const float scroll_layer_length = + currently_captured_scrollbar_->scroll_layer_length(); + if (autoscroll_state_->scroll_layer_length != scroll_layer_length) { + layer_tree_host_impl_->mutator_host()->ScrollAnimationAbort(); + StartAutoScrollAnimation( + autoscroll_state_->velocity, + currently_captured_scrollbar_->scroll_element_id()); + } + } } gfx::Vector2dF ScrollbarController::GetThumbRelativePoint( @@ -93,10 +113,12 @@ // have the potential of initiating an autoscroll (if held down for long // enough). DCHECK(scrollbar_part != ScrollbarPart::THUMB); - cancelable_autoscroll_task_ = std::make_unique<base::CancelableClosure>( - base::Bind(&ScrollbarController::StartAutoScrollAnimation, - base::Unretained(this), scroll_result.scroll_offset, - currently_captured_scrollbar_->scroll_element_id())); + cancelable_autoscroll_task_ = + std::make_unique<base::CancelableClosure>(base::Bind( + &ScrollbarController::StartAutoScrollAnimation, + base::Unretained(this), + InitialDeltaToAutoscrollVelocity(scroll_result.scroll_offset), + currently_captured_scrollbar_->scroll_element_id())); layer_tree_host_impl_->task_runner_provider() ->ImplThreadTaskRunner() ->PostDelayedTask(FROM_HERE, cancelable_autoscroll_task_->callback(), @@ -252,8 +274,8 @@ } bool ScrollbarController::ShouldCancelTrackAutoscroll() { - // Should only ever be called if an autoscroll is in progress. - DCHECK(autoscroll_state_ != AutoScrollState::NO_AUTOSCROLL); + // This function should only ever be called if an autoscroll is in progress. + DCHECK(autoscroll_state_.has_value()); layer_tree_host_impl_->active_tree()->UpdateScrollbarGeometries(); const ScrollbarOrientation orientation = @@ -284,18 +306,34 @@ pointer_position = scroller_relative_position.x(); } - if ((autoscroll_state_ == AutoScrollState::AUTOSCROLL_FORWARD && + if ((autoscroll_state_->direction == + AutoScrollDirection::AUTOSCROLL_FORWARD && thumb_end > pointer_position) || - (autoscroll_state_ == AutoScrollState::AUTOSCROLL_BACKWARD && + (autoscroll_state_->direction == + AutoScrollDirection::AUTOSCROLL_BACKWARD && thumb_start < pointer_position)) return true; return false; } -void ScrollbarController::StartAutoScrollAnimation( - gfx::ScrollOffset scroll_offset, - ElementId element_id) { +// Helper to calculate the autoscroll velocity. +float ScrollbarController::InitialDeltaToAutoscrollVelocity( + gfx::ScrollOffset scroll_offset) const { + const float scroll_delta = currently_captured_scrollbar_->orientation() == + ScrollbarOrientation::VERTICAL + ? scroll_offset.y() + : scroll_offset.x(); + return scroll_delta * kAutoscrollMultiplier; +} + +void ScrollbarController::StartAutoScrollAnimation(const float velocity, + ElementId element_id) { + // Autoscroll and thumb drag are mutually exclusive. Both can't be active at + // the same time. + DCHECK(!drag_anchor_relative_to_thumb_.has_value()); + DCHECK_NE(velocity, 0); + // scroll_node is set up while handling GSB. If there's no node to scroll, we // don't need to create any animation for it. ScrollTree& scroll_tree = @@ -306,8 +344,7 @@ return; layer_tree_host_impl_->active_tree()->UpdateScrollbarGeometries(); - ScrollbarOrientation orientation = - currently_captured_scrollbar_->orientation(); + // TODO(arakeri): The animation needs to be readjusted if the scroller length // changes. Tracked here: crbug.com/972485 float scroll_layer_length = @@ -315,29 +352,26 @@ gfx::ScrollOffset current_offset = scroll_tree.current_scroll_offset(scroll_node->element_id); - gfx::Vector2dF target_offset; // Determine the max offset for the scroll based on the scrolling direction. - // Negative scroll_delta indicates backwards scrolling whereas a positive - // scroll_delta indicates forwards scrolling. - float scroll_delta = 0; - if (orientation == ScrollbarOrientation::VERTICAL) { - DCHECK_NE(scroll_offset.y(), 0); - scroll_delta = scroll_offset.y(); - float final_offset = scroll_delta < 0 ? 0 : scroll_layer_length; - target_offset = gfx::Vector2dF(current_offset.x(), final_offset); - } else { - DCHECK_NE(scroll_offset.x(), 0); - scroll_delta = scroll_offset.x(); - float final_offset = scroll_delta < 0 ? 0 : scroll_layer_length; - target_offset = gfx::Vector2dF(final_offset, current_offset.y()); - } + // Negative scroll velocity indicates backwards scrolling whereas a positive + // value indicates forwards scrolling. + const float target_offset = velocity < 0 ? 0 : scroll_layer_length; + const gfx::Vector2dF target_offset_vector = + currently_captured_scrollbar_->orientation() == + ScrollbarOrientation::VERTICAL + ? gfx::Vector2dF(current_offset.x(), target_offset) + : gfx::Vector2dF(target_offset, current_offset.y()); - autoscroll_state_ = scroll_delta < 0 ? AutoScrollState::AUTOSCROLL_BACKWARD - : AutoScrollState::AUTOSCROLL_FORWARD; - float autoscroll_velocity = std::abs(scroll_delta) * kAutoscrollMultiplier; - layer_tree_host_impl_->AutoScrollAnimationCreate(scroll_node, target_offset, - autoscroll_velocity); + autoscroll_state_ = AutoScrollState(); + autoscroll_state_->velocity = velocity; + autoscroll_state_->scroll_layer_length = scroll_layer_length; + autoscroll_state_->direction = velocity < 0 + ? AutoScrollDirection::AUTOSCROLL_BACKWARD + : AutoScrollDirection::AUTOSCROLL_FORWARD; + + layer_tree_host_impl_->AutoScrollAnimationCreate( + scroll_node, target_offset_vector, std::abs(velocity)); } // Performs hit test and prepares scroll deltas that will be used by GSE. @@ -352,7 +386,7 @@ // TODO(arakeri): This needs to be moved to ScrollOffsetAnimationsImpl as it // has knowledge about what type of animation is running. crbug.com/976353 // Only abort the animation if it is an "autoscroll" animation. - if (autoscroll_state_ != AutoScrollState::NO_AUTOSCROLL) + if (autoscroll_state_.has_value()) layer_tree_host_impl_->mutator_host()->ScrollAnimationAbort(); if (cancelable_autoscroll_task_) { @@ -361,7 +395,7 @@ } drag_anchor_relative_to_thumb_ = base::nullopt; - autoscroll_state_ = AutoScrollState::NO_AUTOSCROLL; + autoscroll_state_ = base::nullopt; return scroll_result; }
diff --git a/cc/input/scrollbar_controller.h b/cc/input/scrollbar_controller.h index f45a045..bd6cdc0 100644 --- a/cc/input/scrollbar_controller.h +++ b/cc/input/scrollbar_controller.h
@@ -12,7 +12,6 @@ #include "cc/layers/painted_scrollbar_layer_impl.h" namespace cc { - // This class is responsible for hit testing composited scrollbars, event // handling and creating gesture scroll deltas. class CC_EXPORT ScrollbarController { @@ -26,11 +25,11 @@ const gfx::PointF position_in_widget); InputHandlerPointerResult HandleMouseUp(const gfx::PointF position_in_widget); - // scroll_offset is the delta from the initial click. This is needed to - // determine whether we should set up the autoscrolling in the forwards or the - // backwards direction and the speed of the animation. - void StartAutoScrollAnimation(gfx::ScrollOffset scroll_offset, - ElementId element_id); + // "velocity" here is calculated based on the initial scroll delta (See + // InitialDeltaToAutoscrollVelocity). This value carries a "sign" which is + // needed to determine whether we should set up the autoscrolling in the + // forwards or the backwards direction. + void StartAutoScrollAnimation(float velocity, ElementId element_id); bool ScrollbarScrollIsActive() { return scrollbar_scroll_is_active_; } ScrollbarOrientation orientation() { return currently_captured_scrollbar_->orientation(); @@ -39,6 +38,26 @@ void WillBeginImplFrame(); private: + // "Autoscroll" here means the continuous scrolling that occurs when the + // pointer is held down on a hit-testable area of the scrollbar such as an + // arrows of the track itself. + enum AutoScrollDirection { AUTOSCROLL_FORWARD, AUTOSCROLL_BACKWARD }; + + struct CC_EXPORT AutoScrollState { + // Can only be either AUTOSCROLL_FORWARD or AUTOSCROLL_BACKWARD. + AutoScrollDirection direction = AutoScrollDirection::AUTOSCROLL_FORWARD; + + // Stores the autoscroll velocity. The sign is used to set the "direction". + float velocity = 0.f; + + // Used to track the scroller length while autoscrolling. Helpful for + // setting up infinite scrolling. + float scroll_layer_length = 0.f; + }; + + // Helper to convert scroll offset to autoscroll velocity. + float InitialDeltaToAutoscrollVelocity(gfx::ScrollOffset scroll_offset) const; + // Returns the hit tested ScrollbarPart based on the position_in_widget. ScrollbarPart GetScrollbarPartFromPointerDown( const gfx::PointF position_in_widget); @@ -69,25 +88,23 @@ // Returns the ratio of the scroller length to the scrollbar length. This is // needed to scale the scroll delta for thumb drag. float GetScrollerToScrollbarRatio(); - LayerTreeHostImpl* layer_tree_host_impl_; // Used to safeguard against firing GSE without firing GSB and GSU. For // example, if mouse is pressed outside the scrollbar but released after // moving inside the scrollbar, a GSE will get queued up without this flag. bool scrollbar_scroll_is_active_; - - // "Autoscroll" here means the continuous scrolling that occurs when the - // pointer is held down on a hit-testable area of the scrollbar such as an - // arrows of the track itself. - AutoScrollState autoscroll_state_; const ScrollbarLayerImplBase* currently_captured_scrollbar_; // This is relative to the RenderWidget's origin. gfx::PointF previous_pointer_position_; + // Holds information pertaining to autoscrolling. This member is empty if and + // only if an autoscroll is *not* in progress. + base::Optional<AutoScrollState> autoscroll_state_; + // This is used to track the pointer location relative to the thumb origin - // when a drag has started. + // when a drag has started. It is empty if a thumb drag is *not* in progress. base::Optional<gfx::Vector2dF> drag_anchor_relative_to_thumb_; std::unique_ptr<base::CancelableClosure> cancelable_autoscroll_task_;
diff --git a/cc/paint/image_transfer_cache_entry.cc b/cc/paint/image_transfer_cache_entry.cc index da4c2d6..16dda2c 100644 --- a/cc/paint/image_transfer_cache_entry.cc +++ b/cc/paint/image_transfer_cache_entry.cc
@@ -16,7 +16,6 @@ #include "cc/paint/paint_op_writer.h" #include "third_party/skia/include/core/SkColorSpace.h" #include "third_party/skia/include/core/SkImage.h" -#include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkPixmap.h" #include "third_party/skia/include/core/SkYUVAIndex.h" #include "third_party/skia/include/gpu/GrBackendSurface.h" @@ -326,10 +325,10 @@ GrContext* context, std::vector<sk_sp<SkImage>> plane_images, YUVDecodeFormat plane_images_format, + SkYUVColorSpace yuv_color_space, size_t buffer_byte_size, bool needs_mips) { context_ = context; - yuv_color_space_ = SkYUVColorSpace::kJPEG_SkYUVColorSpace; // 1) Generate mipmap chains if requested. if (needs_mips) { @@ -344,13 +343,14 @@ } plane_images_ = std::move(plane_images); plane_images_format_ = plane_images_format; + yuv_color_space_ = yuv_color_space; // 2) Create a SkImage backed by |plane_images|. // TODO(andrescj): support embedded color profiles for hardware decodes and // pass the color space to MakeYUVImageFromUploadedPlanes. - image_ = MakeYUVImageFromUploadedPlanes( - context_, plane_images_, plane_images_format_, yuv_color_space_, - SkColorSpace::MakeSRGB()); + image_ = MakeYUVImageFromUploadedPlanes(context_, plane_images_, + plane_images_format_, yuv_color_space, + SkColorSpace::MakeSRGB()); if (!image_) return false; @@ -454,9 +454,9 @@ // unit tests. plane_images_.push_back(std::move(plane)); } - + DCHECK(yuv_color_space_.has_value()); image_ = MakeYUVImageFromUploadedPlanes( - context_, plane_images_, plane_images_format_, yuv_color_space_, + context_, plane_images_, plane_images_format_, yuv_color_space_.value(), decoded_color_space); return !!image_; } @@ -570,7 +570,7 @@ if (is_yuv()) { DCHECK(image_); - DCHECK_LE(yuv_color_space_, SkYUVColorSpace::kLastEnum_SkYUVColorSpace); + DCHECK(yuv_color_space_.has_value()); DCHECK_NE(YUVDecodeFormat::kUnknown, plane_images_format_); DCHECK_EQ(NumberOfPlanesForYUVDecodeFormat(plane_images_format_), plane_images_.size()); @@ -590,7 +590,7 @@ } mipped_planes.clear(); image_ = MakeYUVImageFromUploadedPlanes( - context_, plane_images_, plane_images_format_, yuv_color_space_, + context_, plane_images_, plane_images_format_, yuv_color_space_.value(), image_->refColorSpace() /* image_color_space */); has_mips_ = true; return;
diff --git a/cc/paint/image_transfer_cache_entry.h b/cc/paint/image_transfer_cache_entry.h index 7aa5bf8..f4975a5 100644 --- a/cc/paint/image_transfer_cache_entry.h +++ b/cc/paint/image_transfer_cache_entry.h
@@ -12,7 +12,9 @@ #include "base/atomic_sequence_num.h" #include "base/containers/span.h" +#include "base/optional.h" #include "cc/paint/transfer_cache_entry.h" +#include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkRefCnt.h" #include "third_party/skia/include/core/SkYUVASizeInfo.h" @@ -106,13 +108,15 @@ // // - The backing textures don't have mipmaps. We will generate the mipmaps if // |needs_mips| is true. - // - The conversion from YUV to RGB will be performed assuming a JPEG image. + // - The conversion from YUV to RGB will be performed according to + // |yuv_color_space|. // - The colorspace of the resulting RGB image is sRGB. // // Returns true if the entry can be built, false otherwise. bool BuildFromHardwareDecodedImage(GrContext* context, std::vector<sk_sp<SkImage>> plane_images, YUVDecodeFormat plane_images_format, + SkYUVColorSpace yuv_color_space, size_t buffer_byte_size, bool needs_mips); @@ -148,7 +152,7 @@ YUVDecodeFormat plane_images_format_ = YUVDecodeFormat::kUnknown; std::vector<size_t> plane_sizes_; sk_sp<SkImage> image_; - SkYUVColorSpace yuv_color_space_; + base::Optional<SkYUVColorSpace> yuv_color_space_; bool has_mips_ = false; size_t size_ = 0; bool fits_on_gpu_ = false;
diff --git a/cc/paint/image_transfer_cache_entry_unittest.cc b/cc/paint/image_transfer_cache_entry_unittest.cc index 87adbdf..ac1819d 100644 --- a/cc/paint/image_transfer_cache_entry_unittest.cc +++ b/cc/paint/image_transfer_cache_entry_unittest.cc
@@ -37,6 +37,9 @@ namespace cc { namespace { +constexpr SkYUVColorSpace kJpegYUVColorSpace = + SkYUVColorSpace::kJPEG_SkYUVColorSpace; + void MarkTextureAsReleased(SkImage::ReleaseContext context) { auto* released = static_cast<bool*>(context); DCHECK(!*released); @@ -206,8 +209,8 @@ auto entry(std::make_unique<ServiceImageTransferCacheEntry>()); EXPECT_TRUE(entry->BuildFromHardwareDecodedImage( gr_context(), std::move(plane_images), - GetParam() /* plane_images_format */, 0u /* buffer_byte_size */, - false /* needs_mips */)); + GetParam() /* plane_images_format */, kJpegYUVColorSpace, + 0u /* buffer_byte_size */, false /* needs_mips */)); // We didn't request generating mipmap chains, so the textures we created // above should stay alive until after the cache entry is deleted. @@ -238,8 +241,8 @@ auto entry(std::make_unique<ServiceImageTransferCacheEntry>()); EXPECT_TRUE(entry->BuildFromHardwareDecodedImage( gr_context(), std::move(plane_images), - GetParam() /* plane_images_format */, 0u /* buffer_byte_size */, - true /* needs_mips */)); + GetParam() /* plane_images_format */, kJpegYUVColorSpace, + 0u /* buffer_byte_size */, true /* needs_mips */)); // We requested generating mipmap chains at creation time, so the textures we // created above should be released by now. @@ -275,8 +278,8 @@ auto entry(std::make_unique<ServiceImageTransferCacheEntry>()); EXPECT_TRUE(entry->BuildFromHardwareDecodedImage( gr_context(), std::move(plane_images), - GetParam() /* plane_images_format */, 0u /* buffer_byte_size */, - false /* needs_mips */)); + GetParam() /* plane_images_format */, kJpegYUVColorSpace, + 0u /* buffer_byte_size */, false /* needs_mips */)); // We didn't request generating mip chains, so the textures we created above // should stay alive for now.
diff --git a/cc/paint/paint_image.cc b/cc/paint/paint_image.cc index dbd8754c..68d9928 100644 --- a/cc/paint/paint_image.cc +++ b/cc/paint/paint_image.cc
@@ -286,20 +286,25 @@ } bool PaintImage::IsYuv(SkYUVASizeInfo* yuva_size_info, - SkYUVAIndex* plane_indices) const { + SkYUVAIndex* plane_indices, + SkYUVColorSpace* yuv_color_space) const { SkYUVASizeInfo temp_yuva_size_info; SkYUVAIndex temp_plane_indices[SkYUVAIndex::kIndexCount]; + SkYUVColorSpace temp_yuv_color_space; if (!yuva_size_info) { yuva_size_info = &temp_yuva_size_info; } if (!plane_indices) { plane_indices = temp_plane_indices; } - // We pass nullptr for color_space because QueryYUVA8 hardcodes it to - // kJPEG_SkYUVColorSpace when it should be kRec601_SkYUVColorSpace for WebP. + if (!yuv_color_space) { + yuv_color_space = &temp_yuv_color_space; + } + // ImageDecoder will fill out the value of |yuv_color_space| depending on + // the codec's specification. return CanDecodeFromGenerator() && paint_image_generator_->QueryYUVA8(yuva_size_info, plane_indices, - nullptr /* color_space */); + yuv_color_space); } const std::vector<FrameMetadata>& PaintImage::GetFrameMetadata() const {
diff --git a/cc/paint/paint_image.h b/cc/paint/paint_image.h index f3d574a..1e92f0d 100644 --- a/cc/paint/paint_image.h +++ b/cc/paint/paint_image.h
@@ -237,10 +237,12 @@ } // Returns whether this image will be decoded and rendered from YUV data - // and fills out plane size and plane index information respectively in - // |yuva_size_info| and |plane_indices|, if provided. + // and fills out plane size info, plane index info, and the matrix for + // conversion from YUV to RGB in, respectively, |yuva_size_info|, + // |plane_indices|, and |yuv_color_space| if any are provided. bool IsYuv(SkYUVASizeInfo* yuva_size_info = nullptr, - SkYUVAIndex* plane_indices = nullptr) const; + SkYUVAIndex* plane_indices = nullptr, + SkYUVColorSpace* yuv_color_space = nullptr) const; // Returns the color type of this image. SkColorType GetColorType() const;
diff --git a/cc/tiles/gpu_image_decode_cache.cc b/cc/tiles/gpu_image_decode_cache.cc index 8cb5728..08ba92f5 100644 --- a/cc/tiles/gpu_image_decode_cache.cc +++ b/cc/tiles/gpu_image_decode_cache.cc
@@ -869,7 +869,8 @@ bool needs_mips, bool is_bitmap_backed, bool do_hardware_accelerated_decode, - bool is_yuv_format) + bool is_yuv_format, + SkYUVColorSpace yuv_cs) : paint_image_id(paint_image_id), mode(mode), size(size), @@ -879,7 +880,14 @@ needs_mips(needs_mips), is_bitmap_backed(is_bitmap_backed), is_yuv(is_yuv_format), - decode(is_bitmap_backed, do_hardware_accelerated_decode) {} + decode(is_bitmap_backed, do_hardware_accelerated_decode) { + // Only fill out the base::Optional |yuv_color_space| if doing YUV decoding. + // Otherwise it was filled out with a default "identity" value by the decoder. + if (is_yuv) { + DCHECK_LE(yuv_cs, SkYUVColorSpace::kLastEnum_SkYUVColorSpace); + yuv_color_space = yuv_cs; + } +} GpuImageDecodeCache::ImageData::~ImageData() { // We should never delete ImageData while it is in use or before it has been @@ -2027,6 +2035,7 @@ // Non-hardware-accelerated path. if (image_data->is_yuv) { + DCHECK(image_data->yuv_color_space); SkPixmap y_pixmap; SkPixmap u_pixmap; SkPixmap v_pixmap; @@ -2035,14 +2044,9 @@ !image_data->decode.v_image()->peekPixels(&v_pixmap)) { return; } - // WebP documentation says to use Rec 601 for converting to RGB. - // TODO(crbug.com/915707): Change QueryYUVA8 to set the colorspace based - // on image type. - SkYUVColorSpace yuva_color_space = - SkYUVColorSpace::kRec601_SkYUVColorSpace; ClientImageTransferCacheEntry image_entry( &y_pixmap, &u_pixmap, &v_pixmap, decoded_target_colorspace.get(), - yuva_color_space, image_data->needs_mips); + image_data->yuv_color_space.value(), image_data->needs_mips); InsertTransferCacheEntry(image_entry, image_data); } else { SkPixmap pixmap; @@ -2066,6 +2070,7 @@ image_data->needs_mips ? GrMipMapped::kYes : GrMipMapped::kNo; if (image_data->is_yuv) { + DCHECK(image_data->yuv_color_space.has_value()); // Grab a reference to our decoded image. For the kCpu path, we will use // this directly as our "uploaded" data. sk_sp<SkImage> uploaded_y_image = image_data->decode.y_image(); @@ -2076,13 +2081,6 @@ if (image_data->mode == DecodedDataMode::kGpu) { DCHECK(!use_transfer_cache_); base::AutoUnlock unlock(lock_); - - // WebP documentation says to use Rec 601 for converting to RGB. - // TODO(crbug.com/915707): Change QueryYUVA8 to set the colorspace based - // on image type. - SkYUVColorSpace yuva_color_space = - SkYUVColorSpace::kRec601_SkYUVColorSpace; - uploaded_y_image = uploaded_y_image->makeTextureImage( context_->GrContext(), nullptr /* colorspace */, image_needs_mips); uploaded_u_image = uploaded_u_image->makeTextureImage( @@ -2098,8 +2096,9 @@ size_t image_height = uploaded_y_image->height(); uploaded_image = CreateImageFromYUVATexturesInternal( uploaded_y_image.get(), uploaded_u_image.get(), - uploaded_v_image.get(), image_width, image_height, &yuva_color_space, - color_space, decoded_target_colorspace); + uploaded_v_image.get(), image_width, image_height, + image_data->yuv_color_space.value(), color_space, + decoded_target_colorspace); } // At-raster may have decoded this while we were unlocked. If so, ignore our @@ -2300,13 +2299,16 @@ // If draw_image.paint_image().IsEligibleForAcceleratedDecoding() returns // true, the image should not be backed by a bitmap. DCHECK(!do_hardware_accelerated_decode || !is_bitmap_backed); - SkYUVASizeInfo target_yuva_size_info; - const bool is_yuv = !do_hardware_accelerated_decode && - draw_image.paint_image().IsYuv(&target_yuva_size_info) && - mode != DecodedDataMode::kCpu && - !image_larger_than_max_texture; - + // We fill out a default value for |yuv_color_space| but only fill out the + // base::Optional member in ImageData if it is YUV. + SkYUVColorSpace yuv_color_space = SkYUVColorSpace::kIdentity_SkYUVColorSpace; + const bool is_yuv = + !do_hardware_accelerated_decode && + draw_image.paint_image().IsYuv(&target_yuva_size_info, + nullptr /* plane_indices */, + &yuv_color_space) && + mode != DecodedDataMode::kCpu && !image_larger_than_max_texture; // TODO(crbug.com/910276): Change after alpha support. if (is_yuv) { size_t y_size_bytes = image_info.width() * image_info.height(); @@ -2327,11 +2329,12 @@ data_size = y_size_bytes + u_size_bytes + v_size_bytes; } - return base::WrapRefCounted(new ImageData( - draw_image.paint_image().stable_id(), mode, data_size, - draw_image.target_color_space(), - CalculateDesiredFilterQuality(draw_image), upload_scale_mip_level, - needs_mips, is_bitmap_backed, do_hardware_accelerated_decode, is_yuv)); + return base::WrapRefCounted( + new ImageData(draw_image.paint_image().stable_id(), mode, data_size, + draw_image.target_color_space(), + CalculateDesiredFilterQuality(draw_image), + upload_scale_mip_level, needs_mips, is_bitmap_backed, + do_hardware_accelerated_decode, is_yuv, yuv_color_space)); } void GpuImageDecodeCache::WillAddCacheEntry(const DrawImage& draw_image) { @@ -2770,13 +2773,12 @@ const SkImage* uploaded_v_image, const size_t image_width, const size_t image_height, - const SkYUVColorSpace* yuva_color_space, + const SkYUVColorSpace& yuv_color_space, sk_sp<SkColorSpace> target_color_space, sk_sp<SkColorSpace> decoded_color_space) const { DCHECK(uploaded_y_image); DCHECK(uploaded_u_image); DCHECK(uploaded_v_image); - DCHECK(yuva_color_space); GrSurfaceOrigin origin_temp = kTopLeft_GrSurfaceOrigin; GrBackendTexture yuv_textures[3]{}; yuv_textures[0] = uploaded_y_image->getBackendTexture(false); @@ -2795,7 +2797,7 @@ } sk_sp<SkImage> yuva_image = SkImage::MakeFromYUVATextures( - context_->GrContext(), *yuva_color_space, yuv_textures, indices, + context_->GrContext(), yuv_color_space, yuv_textures, indices, SkISize::Make(image_width, image_height), origin_temp, std::move(decoded_color_space)); if (target_color_space) @@ -2872,10 +2874,6 @@ return; } - // WebP documentation says to use Rec 601 for converting to RGB. - // TODO(crbug.com/915707): Change QueryYUVA8 to set the colorspace based - // on image type. - SkYUVColorSpace yuva_color_space = SkYUVColorSpace::kRec601_SkYUVColorSpace; size_t width = image_y_with_mips_owned->width(); size_t height = image_y_with_mips_owned->height(); sk_sp<SkColorSpace> color_space = @@ -2885,11 +2883,13 @@ : nullptr; sk_sp<SkColorSpace> decoded_color_space = ColorSpaceForImageDecode(draw_image, image_data->mode); + DCHECK(image_data->yuv_color_space.has_value()); sk_sp<SkImage> yuv_image_with_mips_owned = CreateImageFromYUVATexturesInternal( image_y_with_mips_owned.get(), image_u_with_mips_owned.get(), - image_v_with_mips_owned.get(), width, height, &yuva_color_space, - color_space, decoded_color_space); + image_v_with_mips_owned.get(), width, height, + image_data->yuv_color_space.value(), color_space, + decoded_color_space); // In case of lost context if (!yuv_image_with_mips_owned) { DLOG(WARNING) << "TODO(crbug.com/740737): Context was lost. Early out.";
diff --git a/cc/tiles/gpu_image_decode_cache.h b/cc/tiles/gpu_image_decode_cache.h index 4b832070..466ee2d 100644 --- a/cc/tiles/gpu_image_decode_cache.h +++ b/cc/tiles/gpu_image_decode_cache.h
@@ -13,6 +13,7 @@ #include "base/containers/mru_cache.h" #include "base/memory/discardable_memory.h" #include "base/memory/memory_pressure_listener.h" +#include "base/optional.h" #include "base/synchronization/lock.h" #include "base/trace_event/memory_dump_provider.h" #include "cc/cc_export.h" @@ -314,6 +315,9 @@ const bool is_bitmap_backed_; std::unique_ptr<base::DiscardableMemory> data_; sk_sp<SkImage> image_; // RGBX (or null in YUV decode path) + // Only fill out the base::Optional |yuv_color_space| if doing YUV decoding. + // Otherwise it was filled out with a default "identity" value by the + // decoder. base::Optional<YUVSkImages> image_yuv_planes_; // |do_hardware_accelerated_decode_| keeps track of images that should go @@ -491,7 +495,8 @@ bool needs_mips, bool is_bitmap_backed, bool do_hardware_accelerated_decode, - bool is_yuv_format); + bool is_yuv_format, + SkYUVColorSpace yuv_cs); bool IsGpuOrTransferCache() const; bool HasUploadedData() const; @@ -507,6 +512,7 @@ bool is_bitmap_backed; bool is_yuv; bool is_budgeted = false; + base::Optional<SkYUVColorSpace> yuv_color_space; // If true, this image is no longer in our |persistent_cache_| and will be // deleted as soon as its ref count reaches zero. @@ -599,7 +605,7 @@ const SkImage* uploaded_v_image, const size_t image_width, const size_t image_height, - const SkYUVColorSpace* yuva_color_space, + const SkYUVColorSpace& yuva_color_space, sk_sp<SkColorSpace> target_color_space, sk_sp<SkColorSpace> decoded_color_space) const;
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn index 1e1ecb1..cc6c294 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -1572,7 +1572,7 @@ } if (!is_android && !is_chromeos) { - public_deps += [ "//chrome/browser/resources:onboarding_welcome_resources" ] + public_deps += [ "//chrome/browser/resources:welcome_resources" ] } if (enable_extensions) {
diff --git a/chrome/VERSION b/chrome/VERSION index e7ae934..c0db578e 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=78 MINOR=0 -BUILD=3879 +BUILD=3881 PATCH=0
diff --git a/chrome/android/features/dev_ui/BUILD.gn b/chrome/android/features/dev_ui/BUILD.gn index 191f898..3c7dcaa 100644 --- a/chrome/android/features/dev_ui/BUILD.gn +++ b/chrome/android/features/dev_ui/BUILD.gn
@@ -2,8 +2,16 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/buildflag_header.gni") import("//build/config/android/rules.gni") import("//chrome/common/features.gni") +import("dev_ui_module.gni") + +# Generate a buildflag header for compile-time checking of Developer Tools DFM. +buildflag_header("buildflags") { + header = "buildflags.h" + flags = [ "DFMIFY_DEV_UI=$dfmify_dev_ui" ] +} android_library("java") { java_files =
diff --git a/chrome/android/features/dev_ui/dev_ui_module.gni b/chrome/android/features/dev_ui/dev_ui_module.gni index a23ce68..d4625da 100644 --- a/chrome/android/features/dev_ui/dev_ui_module.gni +++ b/chrome/android/features/dev_ui/dev_ui_module.gni
@@ -2,9 +2,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/android/config.gni") - -assert(dfmify_dev_ui) +declare_args() { + # Whether Developer UI (chrome:// pages) should be split into a separate DFM. + dfmify_dev_ui = false +} dev_ui_module_desc = { name = "dev_ui"
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java index 415172b1..d91296c6 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListCoordinator.java
@@ -212,7 +212,8 @@ * @return Whether a valid {@link Rect} is obtained. */ boolean updateThumbnailLocation() { - Rect rect = mRecyclerView.getRectOfCurrentThumbnail(mMediator.indexOfSelected()); + Rect rect = mRecyclerView.getRectOfCurrentThumbnail( + mMediator.indexOfSelected(), mMediator.selectedTabId()); if (rect == null) return false; mThumbnailLocationOfCurrentTab.set(rect); return true;
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java index 2ea769d..9c8a74e4 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java
@@ -224,6 +224,8 @@ private final TabActionListener mTabSelectedListener = new TabActionListener() { @Override public void run(int tabId) { + if (mModel.indexFromId(tabId) == TabModel.INVALID_TAB_INDEX) return; + mNextTabId = tabId; if (!mActionsOnAllRelatedTabs) { @@ -592,6 +594,9 @@ mTabClosedListener = new TabActionListener() { @Override public void run(int tabId) { + // TODO(crbug.com/990698): Consider disabling all touch events during animation. + if (mModel.indexFromId(tabId) == TabModel.INVALID_TAB_INDEX) return; + RecordUserAction.record("MobileTabClosed." + mComponentName); if (mActionsOnAllRelatedTabs) { @@ -709,6 +714,7 @@ * The selected border should re-appear in the final fading-in stage. */ void prepareOverview() { + if (!FeatureUtilities.isTabToGtsAnimationEnabled()) return; assert mVisible; int count = 0; for (int i = 0; i < mModel.size(); i++) { @@ -961,6 +967,14 @@ return createGroupButtonOnClickListener; } + int selectedTabId() { + if (mNextTabId != Tab.INVALID_TAB_ID) { + return mNextTabId; + } + + return mTabModelSelector.getCurrentTabId(); + } + int indexOfSelected() { if (mNextTabId != Tab.INVALID_TAB_ID) { return getIndexOfTab(
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java index fa59647..b69b02e4 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java
@@ -401,15 +401,17 @@ } /** - * @param currentTabIndex The the current tab's index in the model. + * @param selectedTabIndex The index in the RecyclerView of the selected tab. + * @param selectedTabId The tab ID of the selected tab. * @return The {@link Rect} of the thumbnail of the current tab, relative to the * {@link TabListRecyclerView} coordinates. */ @Nullable - Rect getRectOfCurrentThumbnail(int currentTabIndex) { + Rect getRectOfCurrentThumbnail(int selectedTabIndex, int selectedTabId) { TabGridViewHolder holder = - (TabGridViewHolder) findViewHolderForAdapterPosition(currentTabIndex); + (TabGridViewHolder) findViewHolderForAdapterPosition(selectedTabIndex); if (holder == null) return null; + assert holder.getTabId() == selectedTabId; return getRectOfComponent(holder.thumbnail); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java index 833c898..5761d46 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java
@@ -105,7 +105,7 @@ mMoreIcon.setVisibility(GONE); if (mReorderBookmarksEnabled && mDelegate.getDragStateDelegate().getDragActive()) { - mDragHandle.setVisibility(bookmarkItem.isEditable() ? VISIBLE : GONE); + mDragHandle.setVisibility(bookmarkItem.isMovable() ? VISIBLE : GONE); mDragHandle.setEnabled(isItemSelected()); } else { mMoreIcon.setVisibility(bookmarkItem.isEditable() ? VISIBLE : GONE); @@ -154,8 +154,9 @@ new Item(getContext(), R.string.bookmark_item_delete, true))); if (mReorderBookmarksEnabled && mDelegate.getCurrentState() == BookmarkUIState.STATE_FOLDER) { - // Only add move up / move down buttons if there is more than 1 item - if (mLocation != Location.SOLO) { + // Only add move up / move down buttons if there is more than 1 item, + // and the bookmark item is moveable. + if (mLocation != Location.SOLO && canMove) { if (mLocation != Location.TOP) { menuItems.add(new Item(getContext(), R.string.menu_item_move_up, true)); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java index 26ef6ad..cee21133 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ReorderBookmarkItemsAdapter.java
@@ -469,7 +469,7 @@ private int getBookmarkItemEndIndex() { int endIndex = mElements.size() - 1; - if (!mElements.get(endIndex).isEditable()) { + if (!mElements.get(endIndex).isMovable()) { endIndex--; } return endIndex;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java index 79bf610..d4faba48 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHost.java
@@ -214,7 +214,7 @@ ImagesDecodedCallback callback) { DecoderServiceParams params = new DecoderServiceParams(uri, size, fileType, callback); mHighPriorityRequests.put(uri.getPath(), params); - if (mHighPriorityRequests.size() == 1) dispatchNextDecodeRequest(); + if (mProcessingRequests.size() == 0) dispatchNextDecodeRequest(); } /**
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPaymentMethodsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPaymentMethodsFragment.java index c8618dbb2..e6956925 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPaymentMethodsFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillPaymentMethodsFragment.java
@@ -87,7 +87,7 @@ for (CreditCard card : PersonalDataManager.getInstance().getCreditCardsForSettings()) { // Add a preference for the credit card. - Preference card_pref = new Preference(getActivity()); + Preference card_pref = new Preference(getStyledContext()); card_pref.setTitle(card.getObfuscatedNumber()); card_pref.setSummary(card.getFormattedExpirationDate(getActivity())); card_pref.setIcon( @@ -108,7 +108,7 @@ // Add 'Add credit card' button. Tap of it brings up card editor which allows users type in // new credit cards. if (PersonalDataManager.isAutofillCreditCardEnabled()) { - Preference add_card_pref = new Preference(getActivity()); + Preference add_card_pref = new Preference(getStyledContext()); Drawable plusIcon = ApiCompatibilityUtils.getDrawable(getResources(), R.drawable.plus); plusIcon.mutate(); plusIcon.setColorFilter(
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sms/SmsReceiverDialog.java b/chrome/android/java/src/org/chromium/chrome/browser/sms/SmsReceiverDialog.java index 1ba79bc..66c8ba7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sms/SmsReceiverDialog.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sms/SmsReceiverDialog.java
@@ -40,16 +40,18 @@ private ImageView mDoneIcon; private TextView mStatus; private Button mConfirmButton; + private String mOrigin; @VisibleForTesting @CalledByNative - static SmsReceiverDialog create(long nativeSmsDialogAndroid) { + static SmsReceiverDialog create(long nativeSmsDialogAndroid, String origin) { if (DEBUG) Log.d(TAG, "SmsReceiverDialog.create()"); - return new SmsReceiverDialog(nativeSmsDialogAndroid); + return new SmsReceiverDialog(nativeSmsDialogAndroid, origin); } - private SmsReceiverDialog(long nativeSmsDialogAndroid) { + private SmsReceiverDialog(long nativeSmsDialogAndroid, String origin) { mNativeSmsDialogAndroid = nativeSmsDialogAndroid; + mOrigin = origin; } private void createAndShowDialog(WindowAndroid windowAndroid) { @@ -58,6 +60,9 @@ LinearLayout dialogContainer = (LinearLayout) LayoutInflater.from(mActivity).inflate( R.layout.sms_receiver_dialog, null); + TextView title = (TextView) dialogContainer.findViewById(R.id.dialog_title); + title.setText(mActivity.getResources().getString(R.string.sms_dialog_title, mOrigin)); + mProgressBar = (ProgressBar) dialogContainer.findViewById(R.id.progress); mDoneIcon = (ImageView) dialogContainer.findViewById(R.id.done_icon);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java index 8b8dc7c..4721855 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArCoreJavaUtils.java
@@ -66,11 +66,10 @@ } @CalledByNative - private void destroyArImmersiveOverlay() { - if (DEBUG_LOGS) Log.i(TAG, "destroyArImmersiveOverlay"); + private void endSession() { + if (DEBUG_LOGS) Log.i(TAG, "endSession"); if (mArImmersiveOverlay != null) { - mArImmersiveOverlay.destroyDialog(); - mArImmersiveOverlay = null; + mArImmersiveOverlay.cleanupAndExit(); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArImmersiveOverlay.java b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArImmersiveOverlay.java index 4e1d901..d447ba2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/vr/ArImmersiveOverlay.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr/ArImmersiveOverlay.java
@@ -9,68 +9,97 @@ import android.content.DialogInterface; import android.content.pm.ActivityInfo; import android.support.annotation.NonNull; +import android.view.Gravity; import android.view.MotionEvent; import android.view.SurfaceHolder; import android.view.View; import android.view.ViewGroup; -import android.view.WindowManager; import org.chromium.base.Log; +import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeActivity; import org.chromium.content_public.browser.ScreenOrientationDelegate; import org.chromium.content_public.browser.ScreenOrientationProvider; +import org.chromium.ui.widget.Toast; /** * Provides a fullscreen overlay for immersive AR mode. */ -public class ArImmersiveOverlay implements SurfaceHolder.Callback2, - DialogInterface.OnCancelListener, View.OnTouchListener, - ScreenOrientationDelegate { +public class ArImmersiveOverlay + implements SurfaceHolder.Callback2, View.OnTouchListener, ScreenOrientationDelegate { private static final String TAG = "ArImmersiveOverlay"; private static final boolean DEBUG_LOGS = false; - // Android supports multiple variants of fullscreen applications. Currently, we use a fullscreen - // layout with translucent navigation bar, where the content shows behind the navigation bar. - // Alternatively, we could add FLAG_HIDE_NAVIGATION and FLAG_IMMERSIVE_STICKY to hide the - // navigation bar, but then we'd need to show a "pull from top and press back button to exit" - // prompt. - private static final int VISIBILITY_FLAGS_IMMERSIVE = View.SYSTEM_UI_FLAG_LAYOUT_STABLE - | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION; - private ArCoreJavaUtils mArCoreJavaUtils; private ChromeActivity mActivity; private boolean mSurfaceReportedReady; - private Dialog mDialog; private Integer mRestoreOrientation; private boolean mCleanupInProgress; + private SurfaceUiWrapper mSurfaceUi; public void show(@NonNull ChromeActivity activity, @NonNull ArCoreJavaUtils caller) { if (DEBUG_LOGS) Log.i(TAG, "constructor"); mArCoreJavaUtils = caller; mActivity = activity; - // Create a fullscreen dialog and set the system / navigation bars translucent. - mDialog = new Dialog(activity, android.R.style.Theme_NoTitleBar_Fullscreen); - mDialog.getWindow().setBackgroundDrawable(null); - int wmFlags = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS - | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION; - mDialog.getWindow().addFlags(wmFlags); - - mDialog.getWindow().takeSurface(this); - - View view = mDialog.getWindow().getDecorView(); - view.setSystemUiVisibility(VISIBILITY_FLAGS_IMMERSIVE); - view.setOnTouchListener(this); - mDialog.setOnCancelListener(this); - - mDialog.getWindow().setLayout( - ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); - mDialog.show(); + // Choose a concrete implementation to create a drawable Surface and make it fullscreen. + // It forwards SurfaceHolder callbacks and touch events to this ArImmersiveOverlay object. + mSurfaceUi = new SurfaceUiDialog(this); } - public void destroyDialog() { - if (DEBUG_LOGS) Log.i(TAG, "destroyDialog"); - cleanupAndExit(); + private interface SurfaceUiWrapper { + public void onSurfaceVisible(); + public void destroy(); + } + + private class SurfaceUiDialog implements SurfaceUiWrapper, DialogInterface.OnCancelListener { + private Toast mNotificationToast; + private Dialog mDialog; + // Android supports multiple variants of fullscreen applications. Use fully-immersive + // "sticky" mode without navigation or status bars, and show a toast with a "pull from top + // and press back button to exit" prompt. + private static final int VISIBILITY_FLAGS_IMMERSIVE = View.SYSTEM_UI_FLAG_LAYOUT_STABLE + | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION + | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; + + public SurfaceUiDialog(ArImmersiveOverlay parent) { + // Create a fullscreen dialog and use its backing Surface for drawing. + mDialog = new Dialog(mActivity, android.R.style.Theme_NoTitleBar_Fullscreen); + mDialog.getWindow().setBackgroundDrawable(null); + mDialog.getWindow().takeSurface(parent); + View view = mDialog.getWindow().getDecorView(); + view.setSystemUiVisibility(VISIBILITY_FLAGS_IMMERSIVE); + view.setOnTouchListener(parent); + mDialog.setOnCancelListener(this); + mDialog.getWindow().setLayout( + ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); + mDialog.show(); + } + + @Override // SurfaceUiWrapper + public void onSurfaceVisible() { + if (mNotificationToast == null) { + int resId = R.string.immersive_fullscreen_api_notification; + mNotificationToast = Toast.makeText(mActivity, resId, Toast.LENGTH_LONG); + mNotificationToast.setGravity(Gravity.TOP | Gravity.CENTER, 0, 0); + } + mNotificationToast.show(); + } + + @Override // SurfaceUiWrapper + public void destroy() { + if (mNotificationToast != null) { + mNotificationToast.cancel(); + } + mDialog.dismiss(); + } + + @Override // DialogInterface.OnCancelListener + public void onCancel(DialogInterface dialog) { + if (DEBUG_LOGS) Log.i(TAG, "onCancel"); + cleanupAndExit(); + } } @Override // View.OnTouchListener @@ -137,6 +166,9 @@ Log.i(TAG, "surfaceChanged size=" + width + "x" + height + " rotation=" + rotation); mArCoreJavaUtils.onDrawingSurfaceReady(holder.getSurface(), rotation, width, height); mSurfaceReportedReady = true; + + // Show a toast with instructions how to exit fullscreen mode now if necessary. + mSurfaceUi.onSurfaceVisible(); } @Override // SurfaceHolder.Callback2 @@ -145,20 +177,21 @@ cleanupAndExit(); } - @Override // DialogInterface.OnCancelListener - public void onCancel(DialogInterface dialog) { - if (DEBUG_LOGS) Log.i(TAG, "onCancel"); - cleanupAndExit(); - } - public void cleanupAndExit() { if (DEBUG_LOGS) Log.i(TAG, "cleanupAndExit"); - // Avoid duplicate cleanup if we're exiting via destroyDialog, that - // triggers cleanupAndExit -> dismiss -> surfaceDestroyed -> cleanupAndExit. + // Avoid duplicate cleanup if we're exiting via ArCoreJavaUtils's endSession. + // That triggers cleanupAndExit -> remove SurfaceView -> surfaceDestroyed -> cleanupAndExit. if (mCleanupInProgress) return; mCleanupInProgress = true; + mSurfaceUi.destroy(); + + // The JS app may have put an element into fullscreen mode during the immersive session, + // even if this wasn't visible to the user. Ensure that we fully exit out of any active + // fullscreen state on session end to avoid being left in a confusing state. + mActivity.getActivityTab().exitFullscreenMode(); + // Restore orientation. ScreenOrientationProvider.getInstance().setOrientationDelegate(null); if (mRestoreOrientation != null) mActivity.setRequestedOrientation(mRestoreOrientation); @@ -166,9 +199,8 @@ // The surface is destroyed when exiting via "back" button, but also in other lifecycle // situations such as switching apps or toggling the phone's power button. Treat each of - // these as exiting the immersive session. We need to dismiss the dialog to ensure + // these as exiting the immersive session. We need to run the destroy callbacks to ensure // consistent state after non-exiting lifecycle events. - mDialog.dismiss(); mArCoreJavaUtils.onDrawingSurfaceDestroyed(); } }
diff --git a/chrome/android/java/strings/android_chrome_strings.grd b/chrome/android/java/strings/android_chrome_strings.grd index 7ce2c03..4fca145 100644 --- a/chrome/android/java/strings/android_chrome_strings.grd +++ b/chrome/android/java/strings/android_chrome_strings.grd
@@ -3947,7 +3947,7 @@ <!-- SMS strings --> <message name="IDS_SMS_DIALOG_TITLE" desc="Title shown when Chrome is waiting for an SMS on the user's behalf"> - Phone number verification + <ph name="ORIGIN">%1$s<ex>example.com</ex></ph> sent a text message to your phone number. If you confirm, the site will be able to know it's you. </message> <message name="IDS_SMS_DIALOG_STATUS_WAITING" desc="Message shown when Chrome is waiting for an SMS on the user's behalf"> Waiting for text message
diff --git a/chrome/android/java/strings/android_chrome_strings_grd/IDS_SMS_DIALOG_TITLE.png.sha1 b/chrome/android/java/strings/android_chrome_strings_grd/IDS_SMS_DIALOG_TITLE.png.sha1 index eb85055..5776234 100644 --- a/chrome/android/java/strings/android_chrome_strings_grd/IDS_SMS_DIALOG_TITLE.png.sha1 +++ b/chrome/android/java/strings/android_chrome_strings_grd/IDS_SMS_DIALOG_TITLE.png.sha1
@@ -1 +1 @@ -9a38cd3599c74c36b46f3bf4edf565fa8280eb9d \ No newline at end of file +ef2666b60a9adfb774b327ecec89f1ef090a78a4 \ No newline at end of file
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHostTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHostTest.java index b811aca..158ce63 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHostTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/photo_picker/DecoderServiceHostTest.java
@@ -144,14 +144,14 @@ Assert.assertTrue(mLastDecodedPath.contains(fileName1)); Assert.assertEquals(true, mLastIsVideo); Assert.assertEquals("00:00", mLastVideoDuration); - Assert.assertEquals(20, mLastFrameCount); + Assert.assertEquals(10, mLastFrameCount); // Remaining frames of video 2. waitForThumbnailDecode(); Assert.assertTrue(mLastDecodedPath.contains(fileName2)); Assert.assertEquals(true, mLastIsVideo); Assert.assertEquals("00:00", mLastVideoDuration); - Assert.assertEquals(20, mLastFrameCount); + Assert.assertEquals(10, mLastFrameCount); host.unbind(mContext); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sms/SmsReceiverDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sms/SmsReceiverDialogTest.java index 286c256..dcf7d5e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sms/SmsReceiverDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sms/SmsReceiverDialogTest.java
@@ -71,7 +71,8 @@ private SmsReceiverDialog createDialog() { return TestThreadUtils.runOnUiThreadBlockingNoException(() -> { - SmsReceiverDialog dialog = SmsReceiverDialog.create(/*nativeSmsDialogAndroid=*/42); + SmsReceiverDialog dialog = + SmsReceiverDialog.create(/*nativeSmsDialogAndroid=*/42, "https://example.com"); mWindowAndroid = new ActivityWindowAndroid(mActivityTestRule.getActivity()); dialog.open(mWindowAndroid); return dialog;
diff --git a/chrome/android/modules/chrome_feature_modules.gni b/chrome/android/modules/chrome_feature_modules.gni index 15c9469..7912a15 100644 --- a/chrome/android/modules/chrome_feature_modules.gni +++ b/chrome/android/modules/chrome_feature_modules.gni
@@ -5,6 +5,7 @@ import("//build/config/android/config.gni") import( "//chrome/android/features/autofill_assistant/autofill_assistant_module.gni") +import("//chrome/android/features/dev_ui/dev_ui_module.gni") import("//chrome/android/features/tab_ui/tab_ui_module.gni") import("//chrome/android/modules/buildflags.gni") import("//chrome/android/modules/test_dummy/test_dummy_module.gni") @@ -16,9 +17,6 @@ if (enable_arcore) { import("//chrome/android/features/ar/ar_module.gni") } -if (dfmify_dev_ui) { - import("//chrome/android/features/dev_ui/dev_ui_module.gni") -} # Mapping that controls package IDs assigned to modules. The package IDs have to # be unique and lower than 0x7f.
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn index 7081675b..bda589a 100644 --- a/chrome/app/BUILD.gn +++ b/chrome/app/BUILD.gn
@@ -563,29 +563,16 @@ "//services/service_manager/public/cpp", ] - if (enable_basic_printing) { - deps += [ "//components/services/pdf_compositor/public/cpp:manifest" ] - } - - if (is_win) { - deps += [ "//chrome/services/wifi_util_win/public/cpp:manifest" ] - } - if (is_chromeos) { deps += [ "//ash/public/cpp:manifest", - "//chromeos/services/cellular_setup/public/cpp:manifest", - "//chromeos/services/ime/public/cpp:manifest", "//chromeos/services/network_config/public/cpp:manifest", "//chromeos/services/secure_channel/public/cpp:manifest", ] } if (!is_android) { - deps += [ - "//chrome/utility:profile_import_manifest", - "//components/mirroring/service:manifest", - ] + deps += [ "//components/mirroring/service:manifest" ] } }
diff --git a/chrome/app/DEPS b/chrome/app/DEPS index 18e3d8aa..a66f2a2f 100644 --- a/chrome/app/DEPS +++ b/chrome/app/DEPS
@@ -82,15 +82,9 @@ "+third_party/blink/public/mojom", ], "builtin_service_manifests\.cc": [ - "+chrome/services/printing/public", - "+chrome/services/wifi_util_win/public", - "+chrome/utility/importer/profile_import_manifest.h", - "+chromeos/services/cellular_setup", - "+chromeos/services/ime", "+chromeos/services/network_config", "+chromeos/services/secure_channel", "+components/mirroring/service", - "+components/services/pdf_compositor", "+components/services/quarantine", "+components/startup_metric_utils/common", "+extensions/buildflags",
diff --git a/chrome/app/OWNERS b/chrome/app/OWNERS index 423a023..bf719a3 100644 --- a/chrome/app/OWNERS +++ b/chrome/app/OWNERS
@@ -23,7 +23,7 @@ per-file media_router_strings.grdp=file://chrome/browser/media/router/OWNERS -per-file onboarding_welcome_strings.grdp=file://chrome/browser/ui/webui/welcome/OWNERS +per-file welcome_strings.grdp=file://chrome/browser/ui/webui/welcome/OWNERS per-file printing_strings.grdp=file://printing/OWNERS
diff --git a/chrome/app/builtin_service_manifests.cc b/chrome/app/builtin_service_manifests.cc index ebd6807..f4978a9 100644 --- a/chrome/app/builtin_service_manifests.cc +++ b/chrome/app/builtin_service_manifests.cc
@@ -13,44 +13,27 @@ #if defined(OS_CHROMEOS) #include "ash/public/cpp/manifest.h" -#include "chromeos/services/cellular_setup/public/cpp/manifest.h" -#include "chromeos/services/ime/public/cpp/manifest.h" #include "chromeos/services/network_config/public/cpp/manifest.h" #include "chromeos/services/secure_channel/public/cpp/manifest.h" #endif #if defined(OS_WIN) #include "base/feature_list.h" -#include "chrome/services/wifi_util_win/public/cpp/manifest.h" #endif #if !defined(OS_ANDROID) -#include "chrome/utility/importer/profile_import_manifest.h" #include "components/mirroring/service/manifest.h" // nogncheck #endif -#if BUILDFLAG(ENABLE_PRINTING) -#include "components/services/pdf_compositor/public/cpp/manifest.h" // nogncheck -#endif - const std::vector<service_manager::Manifest>& GetChromeBuiltinServiceManifests() { static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{ quarantine::GetQuarantineManifest(), -#if BUILDFLAG(ENABLE_PRINTING) - printing::GetPdfCompositorManifest(), -#endif -#if defined(OS_WIN) - GetWifiUtilWinManifest(), -#endif #if !defined(OS_ANDROID) mirroring::GetManifest(), - GetProfileImportManifest(), #endif #if defined(OS_CHROMEOS) ash::GetManifest(), - chromeos::cellular_setup::GetManifest(), - chromeos::ime::GetManifest(), chromeos::network_config::GetManifest(), chromeos::secure_channel::GetManifest(), #endif
diff --git a/chrome/app/chrome_content_browser_overlay_manifest.cc b/chrome/app/chrome_content_browser_overlay_manifest.cc index f98223f..7f51365 100644 --- a/chrome/app/chrome_content_browser_overlay_manifest.cc +++ b/chrome/app/chrome_content_browser_overlay_manifest.cc
@@ -136,7 +136,6 @@ .RequireCapability("nacl_loader", "browser") .RequireCapability("noop", "noop") .RequireCapability("patch", "patch_file") - .RequireCapability("pdf_compositor", "compositor") .RequireCapability("preferences", "pref_client") .RequireCapability("preferences", "pref_control") .RequireCapability("profile_import", "import") @@ -150,7 +149,6 @@ .RequireCapability("ui", "window_manager") .RequireCapability("unzip", "unzip_file") .RequireCapability("util_win", "util_win") - .RequireCapability("wifi_util_win", "wifi_credentials") .RequireCapability("xr_device_service", "xr_device_provider") .RequireCapability("xr_device_service", "xr_device_test_hook") #if defined(OS_CHROMEOS) @@ -162,7 +160,6 @@ chromeos::network_config::mojom::kNetworkConfigCapability, service_manager::Manifest::InterfaceList< chromeos::network_config::mojom::CrosNetworkConfig>()) - .RequireCapability("cellular_setup", "cellular_setup") .ExposeInterfaceFilterCapability_Deprecated( "navigation:frame", "cellular_setup", service_manager::Manifest::InterfaceList<
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c313e1a..ae36181 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -216,9 +216,9 @@ <part file="extensions_strings.grdp" /> </if> - <!-- NUX Welcome onboarding experience strings --> + <!-- Welcome strings --> <if expr="not chromeos and not is_android"> - <part file="onboarding_welcome_strings.grdp" /> + <part file="welcome_strings.grdp" /> </if> <!-- Printing specific strings -->
diff --git a/chrome/app/onboarding_welcome_strings.grdp b/chrome/app/onboarding_welcome_strings.grdp deleted file mode 100644 index ca34a69..0000000 --- a/chrome/app/onboarding_welcome_strings.grdp +++ /dev/null
@@ -1,118 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<grit-part> - <!-- Shared strings --> - <message name="IDS_ONBOARDING_WELCOME_NEXT" desc="Label for a button to confirm and continue from the current onboarding step."> - Next - </message> - <message name="IDS_ONBOARDING_WELCOME_SKIP" desc="Label for a button to skip the current onboarding step."> - Skip - </message> - <message name="IDS_ONBOARDING_WELCOME_BOOKMARK_ADDED" desc="String read for accessibility to inform the user a bookmark was added."> - Bookmark added - </message> - <message name="IDS_ONBOARDING_WELCOME_BOOKMARKS_ADDED" desc="String read for accessibility to inform the user that several bookmarks were added."> - Bookmarks added - </message> - <message name="IDS_ONBOARDING_WELCOME_BOOKMARK_REMOVED" desc="String read for accessibility to inform the user a bookmark was removed."> - Bookmark removed - </message> - <message name="IDS_ONBOARDING_WELCOME_BOOKMARKS_REMOVED" desc="String read for accessibility to inform the user that several bookmarks were removed."> - Bookmarks removed - </message> - <message name="IDS_ONBOARDING_DEFAULT_BROWSER_CHANGED" desc="text notifying users that their default browser is successfully changed to Chrome"> - Chrome is your default browser - </message> - - <!-- NUX Google apps selection module --> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_DESCRIPTION" desc="Description of what this section in the onboarding workflow does."> - Add bookmarks to your favorite Google Apps - </message> - <if expr="_google_chrome"> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_SEARCH" desc="Label for a button that creates a bookmark to google.com, this should be the name of the brand."> - Google - </message> - </if> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_GMAIL" desc="Label for a button that creates a bookmark to gmail.com, this should be the name of the brand."> - Gmail - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_MAPS" desc="Label for a button that creates a bookmark to maps.google.com, this should be the name of the brand."> - Maps - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_NEWS" desc="Label for a button that creates a bookmark to news.google.com, this should be the name of the brand."> - News - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_TRANSLATE" desc="Label for a button that creates a bookmark to translate.google.com, this should be the name of the brand."> - Translate - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_YOUTUBE" desc="Label for a button that creates a bookmark to youtube.com, this should be the name of the brand."> - YouTube - </message> - - <!-- NUX NTP background selection module --> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_DESCRIPTION" desc="Description of what this section in the onboarding workflow does. This section lets a user change the background for the New Tab Page"> - Pick a background - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_DEFAULT_TITLE" desc="Label for the default option when selecting a background. The default is to not have a background."> - Default - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_ART_TITLE" desc="Label for choosing a background/wallpaper from the 'Art' category"> - Art - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_LANDSCAPE_TITLE" desc="Label for choosing a background/wallpaper from the 'Landscape' category, as in a category of photos of scenery and large outdoor spaces."> - Landscape - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_CITYSCAPE_TITLE" desc="Label for choosing a background/wallpaper from the 'Cityscape' category"> - Cityscape - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_EARTH_TITLE" desc="Label for choosing a background/wallpaper from the 'Earth' category, as in a category of photos of planets and outer space."> - Earth - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_GEOMETRIC_SHAPES_TITLE" desc="Label for choosing a background/wallpaper from the 'Geometric Shapes' category"> - Geometric shapes - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL" desc="Label indicating who the background/wallpaper is created or photographed by"> - Photo by <ph name="NAME">$1<ex>John Doe</ex></ph> - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PREVIEW_UPDATED" desc="String read for accessibility to inform the user that the background of the New Tab Page (referred to as 'start page') has been changed to a specific photo."> - Start page background has been changed to <ph name="CATEGORY">$1<ex>Geometric shapes</ex></ph>. - </message> - <message name="IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_RESET" desc="String read for accessibility to inform the user that the background of the New Tab Page (referred to as 'start page') has been reset to the default background."> - Start page background has been reset to the default background. - </message> - - <!-- NUX set default module --> - <message name="IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_HEADER" desc="Header for the page that prompts user to set Chrome as their default browser."> - Set Chrome as your default browser - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SUB_HEADER" desc="Sub-header for the page that prompts user to set Chrome as their default browser."> - Get Google Search and Google smarts everytime you browse - </message> - <message name="IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SET_AS_DEFAULT" desc="The label for a button to confirm setting Chrome as their default browser."> - Set as default - </message> - - <!-- Landing view --> - <message name="IDS_ONBOARDING_WELCOME_LANDING_TITLE" desc="Title for the page that prompts user to start setting up their new Chrome."> - Make Chrome your own - </message> - <message name="IDS_ONBOARDING_WELCOME_LANDING_DESCRIPTION" desc="Description for the page that prompts user to start setting up their new Chrome."> - Set up your browser in a few simple steps - </message> - <message name="IDS_ONBOARDING_WELCOME_LANDING_NEW_USER" desc="Label for a button that prompts new users to start setting up their new Chrome."> - Get Started - </message> - <message name="IDS_ONBOARDING_WELCOME_LANDING_EXISTING_USER" desc="Label for a button that prompts existing users to sign in."> - Already a Chrome user? Sign in - </message> - - <!-- Sign-in view --> - <message name="IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_HEADER" desc="Header for the page that prompts user to sign in to chrome."> - Your Chrome, Everywhere - </message> - <message name="IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SUB_HEADER" desc="Sub-header for the page that prompts user to sign in to chrome."> - Sign in and turn on sync to get your bookmarks, passwords and more on all devices - </message> - <message name="IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SIGNIN" desc="The label for a button to let users sign in to chrome."> - Continue - </message> -</grit-part>
diff --git a/chrome/app/os_settings_strings.grdp b/chrome/app/os_settings_strings.grdp index 4083803..912e45a9 100644 --- a/chrome/app/os_settings_strings.grdp +++ b/chrome/app/os_settings_strings.grdp
@@ -28,7 +28,7 @@ Open the wallpaper app </message> <message name="IDS_OS_SETTINGS_CHANGE_PICTURE_TITLE" desc="Label for row in settings page that shows the user image picker."> - Change account image + Change device account image </message> <!-- Search and Assistant section. -->
diff --git a/chrome/app/settings_chromium_strings.grdp b/chrome/app/settings_chromium_strings.grdp index 82e048f..8c241b1 100644 --- a/chrome/app/settings_chromium_strings.grdp +++ b/chrome/app/settings_chromium_strings.grdp
@@ -122,14 +122,7 @@ </if> <!-- Languages Page --> - <if expr="chromeos"> - <message name="IDS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE" desc="The label for a language that is currently used as the UI display language."> - This language is used to display the Chromium OS UI - </message> - <message name="IDS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE" desc="The label used for a button that changes the UI language."> - Display Chromium OS in this language - </message> - </if> + <!-- Chrome OS string is in settings_strings.grdp. --> <if expr="not chromeos"> <message name="IDS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE" desc="The label for a language that is currently used as the UI display language."> This language is used to display the Chromium UI
diff --git a/chrome/app/settings_google_chrome_strings.grdp b/chrome/app/settings_google_chrome_strings.grdp index 73c36697..da4dae48 100644 --- a/chrome/app/settings_google_chrome_strings.grdp +++ b/chrome/app/settings_google_chrome_strings.grdp
@@ -122,14 +122,7 @@ </if> <!-- Languages Page --> - <if expr="chromeos"> - <message name="IDS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE" desc="The label for a language that is currently used as the UI display language."> - This language is used to display the Chrome OS UI - </message> - <message name="IDS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE" desc="The label used for a button that changes the UI language."> - Display Chrome OS in this language - </message> - </if> + <!-- Chrome OS string is in settings_strings.grdp. --> <if expr="not chromeos"> <message name="IDS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE" desc="The label for a language that is currently used as the UI display language."> This language is used to display the Google Chrome UI
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index ecb193c..3eb2e90 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -2731,6 +2731,13 @@ <message name="IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_ORDERING_INSTRUCTIONS" desc="Explanatory message about ordering the list of languages."> Add languages or reorder list </message> + <!-- The non-Chrome OS string is in settings_google_chrome_strings.grdp --> + <message name="IDS_SETTINGS_LANGUAGES_IS_DISPLAYED_IN_THIS_LANGUAGE" desc="The label for a language that is currently used as the UI display language."> + System text is shown in this language + </message> + <message name="IDS_SETTINGS_LANGUAGES_DISPLAY_IN_THIS_LANGUAGE" desc="The label used for a button that changes the UI language."> + Show system text in this language + </message> </if> <if expr="not chromeos"> <message name="IDS_SETTINGS_LANGUAGES_LANGUAGES_LIST_ORDERING_INSTRUCTIONS" desc="Explanatory message about ordering the list of languages.">
diff --git a/chrome/app/welcome_strings.grdp b/chrome/app/welcome_strings.grdp new file mode 100644 index 0000000..6e37085 --- /dev/null +++ b/chrome/app/welcome_strings.grdp
@@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="utf-8"?> +<grit-part> + <!-- Shared strings --> + <message name="IDS_WELCOME_NEXT" desc="Label for a button to confirm and continue from the current welcome step."> + Next + </message> + <message name="IDS_WELCOME_SKIP" desc="Label for a button to skip the current welcome step."> + Skip + </message> + <message name="IDS_WELCOME_BOOKMARK_ADDED" desc="String read for accessibility to inform the user a bookmark was added."> + Bookmark added + </message> + <message name="IDS_WELCOME_BOOKMARKS_ADDED" desc="String read for accessibility to inform the user that several bookmarks were added."> + Bookmarks added + </message> + <message name="IDS_WELCOME_BOOKMARK_REMOVED" desc="String read for accessibility to inform the user a bookmark was removed."> + Bookmark removed + </message> + <message name="IDS_WELCOME_BOOKMARKS_REMOVED" desc="String read for accessibility to inform the user that several bookmarks were removed."> + Bookmarks removed + </message> + <message name="IDS_DEFAULT_BROWSER_CHANGED" desc="text notifying users that their default browser is successfully changed to Chrome"> + Chrome is your default browser + </message> + + <!-- Google apps selection module --> + <message name="IDS_WELCOME_GOOGLE_APPS_DESCRIPTION" desc="Description of what this section does in the welcome workflow. This section lets a user bookmark popular Google apps."> + Add bookmarks to your favorite Google Apps + </message> + <if expr="_google_chrome"> + <message name="IDS_WELCOME_GOOGLE_SEARCH" desc="Label for a button that creates a bookmark to google.com, this should be the name of the brand."> + Google + </message> + </if> + <message name="IDS_WELCOME_GOOGLE_GMAIL" desc="Label for a button that creates a bookmark to gmail.com, this should be the name of the brand."> + Gmail + </message> + <message name="IDS_WELCOME_GOOGLE_APPS_MAPS" desc="Label for a button that creates a bookmark to maps.google.com, this should be the name of the brand."> + Maps + </message> + <message name="IDS_WELCOME_GOOGLE_APPS_NEWS" desc="Label for a button that creates a bookmark to news.google.com, this should be the name of the brand."> + News + </message> + <message name="IDS_WELCOME_GOOGLE_APPS_TRANSLATE" desc="Label for a button that creates a bookmark to translate.google.com, this should be the name of the brand."> + Translate + </message> + <message name="IDS_WELCOME_GOOGLE_APPS_YOUTUBE" desc="Label for a button that creates a bookmark to youtube.com, this should be the name of the brand."> + YouTube + </message> + + <!-- NTP background selection module --> + <message name="IDS_WELCOME_NTP_BACKGROUND_DESCRIPTION" desc="Description of what this section does in the welcome workflow. This section lets a user change the background for the New Tab Page"> + Pick a background + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_DEFAULT_TITLE" desc="Label for the default option when selecting a background. The default is to not have a background."> + Default + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_ART_TITLE" desc="Label for choosing a background/wallpaper from the 'Art' category"> + Art + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_LANDSCAPE_TITLE" desc="Label for choosing a background/wallpaper from the 'Landscape' category, as in a category of photos of scenery and large outdoor spaces."> + Landscape + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_CITYSCAPE_TITLE" desc="Label for choosing a background/wallpaper from the 'Cityscape' category"> + Cityscape + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_EARTH_TITLE" desc="Label for choosing a background/wallpaper from the 'Earth' category, as in a category of photos of planets and outer space."> + Earth + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_GEOMETRIC_SHAPES_TITLE" desc="Label for choosing a background/wallpaper from the 'Geometric Shapes' category"> + Geometric shapes + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL" desc="Label indicating who the background/wallpaper is created or photographed by"> + Photo by <ph name="NAME">$1<ex>John Doe</ex></ph> + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_PREVIEW_UPDATED" desc="String read for accessibility to inform the user that the background of the New Tab Page (referred to as 'start page') has been changed to a specific photo."> + Start page background has been changed to <ph name="CATEGORY">$1<ex>Geometric shapes</ex></ph>. + </message> + <message name="IDS_WELCOME_NTP_BACKGROUND_RESET" desc="String read for accessibility to inform the user that the background of the New Tab Page (referred to as 'start page') has been reset to the default background."> + Start page background has been reset to the default background. + </message> + + <!-- set default module --> + <message name="IDS_WELCOME_SET_AS_DEFAULT_HEADER" desc="Header for the page that prompts user to set Chrome as their default browser."> + Set Chrome as your default browser + </message> + <message name="IDS_WELCOME_SET_AS_DEFAULT_SUB_HEADER" desc="Sub-header for the page that prompts user to set Chrome as their default browser."> + Get Google Search and Google smarts everytime you browse + </message> + <message name="IDS_WELCOME_SET_AS_DEFAULT_SET_AS_DEFAULT" desc="The label for a button to confirm setting Chrome as their default browser."> + Set as default + </message> + + <!-- Landing view --> + <message name="IDS_WELCOME_LANDING_TITLE" desc="Title for the page that prompts user to start setting up their new Chrome."> + Make Chrome your own + </message> + <message name="IDS_WELCOME_LANDING_DESCRIPTION" desc="Description for the page that prompts user to start setting up their new Chrome."> + Set up your browser in a few simple steps + </message> + <message name="IDS_WELCOME_LANDING_NEW_USER" desc="Label for a button that prompts new users to start setting up their new Chrome."> + Get Started + </message> + <message name="IDS_WELCOME_LANDING_EXISTING_USER" desc="Label for a button that prompts existing users to sign in."> + Already a Chrome user? Sign in + </message> + + <!-- Sign-in view --> + <message name="IDS_WELCOME_SIGNIN_VIEW_HEADER" desc="Header for the page that prompts user to sign in to chrome."> + Your Chrome, Everywhere + </message> + <message name="IDS_WELCOME_SIGNIN_VIEW_SUB_HEADER" desc="Sub-header for the page that prompts user to sign in to chrome."> + Sign in and turn on sync to get your bookmarks, passwords and more on all devices + </message> + <message name="IDS_WELCOME_SIGNIN_VIEW_SIGNIN" desc="The label for a button to let users sign in to chrome."> + Continue + </message> +</grit-part>
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index dc50ca3..27b467d 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -546,6 +546,8 @@ "hang_monitor/hang_crash_dump.h", "hang_monitor/hang_crash_dump_mac.cc", "hang_monitor/hang_crash_dump_win.cc", + "heavy_ad_intervention/heavy_ad_helper.cc", + "heavy_ad_intervention/heavy_ad_helper.h", "history/chrome_history_backend_client.cc", "history/chrome_history_backend_client.h", "history/chrome_history_client.cc", @@ -3294,8 +3296,8 @@ "search/background/ntp_background_service_factory.cc", "search/background/ntp_background_service_factory.h", "search/background/ntp_background_service_observer.h", - "search/background/onboarding_ntp_backgrounds.cc", - "search/background/onboarding_ntp_backgrounds.h", + "search/background/ntp_backgrounds.cc", + "search/background/ntp_backgrounds.h", "search/chrome_colors/chrome_colors_factory.cc", "search/chrome_colors/chrome_colors_factory.h", "search/chrome_colors/chrome_colors_service.cc", @@ -3355,15 +3357,15 @@ "serial/serial_chooser_context_factory.h", "sharing/click_to_call/click_to_call_context_menu_observer.cc", "sharing/click_to_call/click_to_call_context_menu_observer.h", - "sharing/click_to_call/click_to_call_sharing_dialog_controller.cc", - "sharing/click_to_call/click_to_call_sharing_dialog_controller.h", + "sharing/click_to_call/click_to_call_ui_controller.cc", + "sharing/click_to_call/click_to_call_ui_controller.h", "sharing/click_to_call/click_to_call_utils.cc", "sharing/click_to_call/click_to_call_utils.h", "sharing/shared_clipboard/shared_clipboard_ui_controller.cc", "sharing/shared_clipboard/shared_clipboard_ui_controller.h", "sharing/sharing_dialog.h", - "sharing/sharing_dialog_controller.cc", - "sharing/sharing_dialog_controller.h", + "sharing/sharing_ui_controller.cc", + "sharing/sharing_ui_controller.h", "signin/signin_promo.cc", "signin/signin_promo.h", "signin/signin_ui_util.cc", @@ -3643,7 +3645,6 @@ "//chromeos/services/cellular_setup", "//chromeos/services/device_sync", "//chromeos/services/device_sync/public/mojom", - "//chromeos/services/ime/public/mojom", "//chromeos/services/multidevice_setup", "//chromeos/services/multidevice_setup/public/cpp:first_run_field_trial", "//chromeos/services/multidevice_setup/public/mojom", @@ -3868,6 +3869,8 @@ "platform_util_linux.cc", "shell_integration_linux.cc", "shell_integration_linux.h", + "themes/theme_service_aura_linux.cc", + "themes/theme_service_aura_linux.h", ] if (use_dbus) { @@ -3885,14 +3888,6 @@ sources += [ "fullscreen_aurax11.cc", "media/webrtc/window_icon_util_x11.cc", - - # ThemeServiceAuraX11 does not depend on X11, although its - # instantiation/inclusion in theme_service_factory.cc is conditioned - # by USE_X11. - # TODO(tonikitoo): Check if non-x11 could benefit from it. If so, - # rename and use it. - "themes/theme_service_aurax11.cc", - "themes/theme_service_aurax11.h", ] } @@ -4174,6 +4169,7 @@ ] deps += [ "//components/printing/browser", + "//components/services/pdf_compositor/public/cpp", "//components/services/pdf_compositor/public/mojom", "//printing", ]
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index 730fa4f..076ca38 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS
@@ -19,7 +19,6 @@ "+chrome/services/printing/public", "+chrome/services/removable_storage_writer/public", "+chrome/services/util_win/public", - "+chrome/services/wifi_util_win/public", "+chromeos", "+components/about_ui", "+components/account_id", @@ -195,8 +194,7 @@ "+components/services/heap_profiling", "+components/services/patch/content", "+components/services/patch/public", - "+components/services/pdf_compositor/public/cpp", - "+components/services/pdf_compositor/public/mojom", + "+components/services/pdf_compositor/public", "+components/services/quarantine", "+components/services/unzip", "+components/session_manager",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index cae9577..fa47f61 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -2518,7 +2518,7 @@ kEnableAutofillCreditCardUploadEditableCardholderNameName, flag_descriptions:: kEnableAutofillCreditCardUploadEditableCardholderNameDescription, - kOsAll | kExpireM77, + kOsAll, FEATURE_VALUE_TYPE( autofill::features::kAutofillUpstreamEditableCardholderName)}, {"enable-autofill-credit-card-upload-editable-expiration-date", @@ -2526,19 +2526,18 @@ kEnableAutofillCreditCardUploadEditableExpirationDateName, flag_descriptions:: kEnableAutofillCreditCardUploadEditableExpirationDateDescription, - kOsAll | kExpireM77, + kOsAll, FEATURE_VALUE_TYPE( autofill::features::kAutofillUpstreamEditableExpirationDate)}, {"enable-autofill-import-dynamic-forms", flag_descriptions::kEnableAutofillImportDynamicFormsName, - flag_descriptions::kEnableAutofillImportDynamicFormsDescription, - kOsAll | kExpireM77, + flag_descriptions::kEnableAutofillImportDynamicFormsDescription, kOsAll, FEATURE_VALUE_TYPE(autofill::features::kAutofillImportDynamicForms)}, {"enable-autofill-local-card-migration-uses-strike-system-v2", flag_descriptions::kEnableAutofillLocalCardMigrationUsesStrikeSystemV2Name, flag_descriptions:: kEnableAutofillLocalCardMigrationUsesStrikeSystemV2Description, - kOsAll | kExpireM77, + kOsAll, FEATURE_VALUE_TYPE( autofill::features::kAutofillLocalCardMigrationUsesStrikeSystemV2)}, @@ -2592,6 +2591,9 @@ {"file-manager-piex-wasm", flag_descriptions::kFileManagerPiexWasmName, flag_descriptions::kFileManagerPiexWasmDescription, kOsCrOS, FEATURE_VALUE_TYPE(chromeos::features::kEnableFileManagerPiexWasm)}, + {"files-ng", flag_descriptions::kFilesNGName, + flag_descriptions::kFilesNGDescription, kOsCrOS, + FEATURE_VALUE_TYPE(chromeos::features::kFilesNG)}, #endif // OS_CHROMEOS #if defined(OS_WIN) @@ -3620,6 +3622,12 @@ #endif // defined(OS_ANDROID) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) + {"click-to-call-context-menu-selected-text", + flag_descriptions::kClickToCallContextMenuForSelectedTextName, + flag_descriptions::kClickToCallContextMenuForSelectedTextDescription, + kOsWin | kOsMac | kOsLinux, + FEATURE_VALUE_TYPE(kClickToCallContextMenuForSelectedText)}, + {"click-to-call-ui", flag_descriptions::kClickToCallUIName, flag_descriptions::kClickToCallUIDescription, kOsWin | kOsMac | kOsLinux, FEATURE_VALUE_TYPE(kClickToCallUI)}, @@ -3917,7 +3925,7 @@ flag_descriptions::kAutofillEnableLocalCardMigrationForNonSyncUserName, flag_descriptions:: kAutofillEnableLocalCardMigrationForNonSyncUserDescription, - kOsDesktop | kExpireM77, + kOsDesktop, FEATURE_VALUE_TYPE( autofill::features::kAutofillEnableLocalCardMigrationForNonSyncUser)},
diff --git a/chrome/browser/accessibility/accessibility_extension_api.cc b/chrome/browser/accessibility/accessibility_extension_api.cc index 135b4ca..2731857 100644 --- a/chrome/browser/accessibility/accessibility_extension_api.cc +++ b/chrome/browser/accessibility/accessibility_extension_api.cc
@@ -20,7 +20,6 @@ #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/common/extensions/api/accessibility_private.h" #include "chrome/common/extensions/extension_constants.h" @@ -92,8 +91,6 @@ if (chrome::IsOSSettingsSubPage(params->subpage)) { chrome::SettingsWindowManager::GetInstance()->ShowOSSettings( profile, params->subpage); - } else { - chrome::ShowSettingsSubPageForProfile(profile, params->subpage); } #else // This function should only be available on ChromeOS.
diff --git a/chrome/browser/accessibility/accessibility_extension_api_browsertest.cc b/chrome/browser/accessibility/accessibility_extension_api_browsertest.cc index 6877107..e5d387f9 100644 --- a/chrome/browser/accessibility/accessibility_extension_api_browsertest.cc +++ b/chrome/browser/accessibility/accessibility_extension_api_browsertest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/extensions/extension_apitest.h" #include "chrome/browser/ui/browser_list.h" +#include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/web_applications/system_web_app_manager.h" @@ -51,7 +52,7 @@ WaitForLoadStop(web_contents); - EXPECT_EQ(GURL("chrome://settings/manageAccessibility/tts"), + EXPECT_EQ(GURL(chrome::GetOSSettingsUrl("manageAccessibility/tts")), web_contents->GetLastCommittedURL()); } @@ -71,15 +72,9 @@ chrome::SettingsWindowManager* settings_manager = chrome::SettingsWindowManager::GetInstance(); + // Invalid subpage should not open settings window. Browser* settings_browser = settings_manager->FindBrowserForProfile(profile); - EXPECT_NE(nullptr, settings_browser); - - content::WebContents* web_contents = - settings_browser->tab_strip_model()->GetWebContentsAt(0); - - WaitForLoadStop(web_contents); - - EXPECT_EQ(GURL("chrome://settings"), web_contents->GetLastCommittedURL()); + EXPECT_EQ(nullptr, settings_browser); } } // namespace extensions
diff --git a/chrome/browser/android/feed/feed_host_service_factory.cc b/chrome/browser/android/feed/feed_host_service_factory.cc index 86afd94f..73aa242 100644 --- a/chrome/browser/android/feed/feed_host_service_factory.cc +++ b/chrome/browser/android/feed/feed_host_service_factory.cc
@@ -125,7 +125,7 @@ auto logging_metrics = std::make_unique<FeedLoggingMetrics>( base::BindRepeating(&FeedHistoryHelper::CheckURL, std::move(history_helper)), - base::DefaultClock::GetInstance()); + base::DefaultClock::GetInstance(), scheduler_host.get()); return new FeedHostService( std::move(logging_metrics), std::move(networking_host),
diff --git a/chrome/browser/android/tab_web_contents_delegate_android.cc b/chrome/browser/android/tab_web_contents_delegate_android.cc index b7e20fb1..2dbc50f78 100644 --- a/chrome/browser/android/tab_web_contents_delegate_android.cc +++ b/chrome/browser/android/tab_web_contents_delegate_android.cc
@@ -64,6 +64,7 @@ #include "third_party/blink/public/common/mediastream/media_stream_request.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/rect_f.h" +#include "url/origin.h" #if BUILDFLAG(ENABLE_PRINTING) #include "components/printing/browser/print_composite_client.h" @@ -163,8 +164,8 @@ } std::unique_ptr<content::SmsDialog> -TabWebContentsDelegateAndroid::CreateSmsDialog() { - return std::make_unique<SmsDialogAndroid>(); +TabWebContentsDelegateAndroid::CreateSmsDialog(const url::Origin& origin) { + return std::make_unique<SmsDialogAndroid>(origin); } std::unique_ptr<content::BluetoothScanningPrompt>
diff --git a/chrome/browser/android/tab_web_contents_delegate_android.h b/chrome/browser/android/tab_web_contents_delegate_android.h index 8af9d16..31426a1d 100644 --- a/chrome/browser/android/tab_web_contents_delegate_android.h +++ b/chrome/browser/android/tab_web_contents_delegate_android.h
@@ -26,6 +26,10 @@ class RectF; } +namespace url { +class Origin; +} + namespace android { // Chromium Android specific WebContentsDelegate. @@ -44,7 +48,8 @@ std::unique_ptr<content::BluetoothChooser> RunBluetoothChooser( content::RenderFrameHost* frame, const content::BluetoothChooser::EventHandler& event_handler) override; - std::unique_ptr<content::SmsDialog> CreateSmsDialog() override; + std::unique_ptr<content::SmsDialog> CreateSmsDialog( + const url::Origin& origin) override; std::unique_ptr<content::BluetoothScanningPrompt> ShowBluetoothScanningPrompt( content::RenderFrameHost* frame, const content::BluetoothScanningPrompt::EventHandler& event_handler)
diff --git a/chrome/browser/android/vr/arcore_device/arcore_device.cc b/chrome/browser/android/vr/arcore_device/arcore_device.cc index 205e130c..e62ef10 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_device.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_device.cc
@@ -231,8 +231,8 @@ void ArCoreDevice::OnSessionEnded() { DVLOG(1) << __func__; - // This may be a no-op in case it's destroyed already. - arcore_session_utils_->DestroyDrawingSurface(); + // This may be a no-op in case session end was initiated from the Java side. + arcore_session_utils_->EndSession(); // The GL thread had initialized its context with a drawing_widget based on // the ArImmersiveOverlay's Surface, and the one it has is no longer valid.
diff --git a/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc b/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc index 72706d61..b69ab6c 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_device_unittest.cc
@@ -97,7 +97,7 @@ std::move(ready_callback) .Run(nullptr, display::Display::Rotation::ROTATE_0, {1024, 512}); } - void DestroyDrawingSurface() override {} + void EndSession() override {} bool EnsureLoaded() override { return true; }
diff --git a/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc b/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc index 54392cd..e8f1dc0 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc +++ b/chrome/browser/android/vr/arcore_device/arcore_java_utils.cc
@@ -57,11 +57,11 @@ getTabFromRenderer(render_process_id, render_frame_id)); } -void ArCoreJavaUtils::DestroyDrawingSurface() { +void ArCoreJavaUtils::EndSession() { DVLOG(1) << __func__; JNIEnv* env = AttachCurrentThread(); - Java_ArCoreJavaUtils_destroyArImmersiveOverlay(env, j_arcore_java_utils_); + Java_ArCoreJavaUtils_endSession(env, j_arcore_java_utils_); } void ArCoreJavaUtils::OnDrawingSurfaceReady(
diff --git a/chrome/browser/android/vr/arcore_device/arcore_java_utils.h b/chrome/browser/android/vr/arcore_device/arcore_java_utils.h index 9e9ac15b..ecd5e2d6 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_java_utils.h +++ b/chrome/browser/android/vr/arcore_device/arcore_java_utils.h
@@ -26,7 +26,7 @@ SurfaceReadyCallback ready_callback, SurfaceTouchCallback touch_callback, SurfaceDestroyedCallback destroyed_callback) override; - void DestroyDrawingSurface() override; + void EndSession() override; bool EnsureLoaded() override; base::android::ScopedJavaLocalRef<jobject> GetApplicationContext() override;
diff --git a/chrome/browser/android/vr/arcore_device/arcore_session_utils.h b/chrome/browser/android/vr/arcore_device/arcore_session_utils.h index 1573fbe4..e22027fb 100644 --- a/chrome/browser/android/vr/arcore_device/arcore_session_utils.h +++ b/chrome/browser/android/vr/arcore_device/arcore_session_utils.h
@@ -42,7 +42,7 @@ SurfaceReadyCallback ready_callback, SurfaceTouchCallback touch_callback, SurfaceDestroyedCallback destroyed_callback) = 0; - virtual void DestroyDrawingSurface() = 0; + virtual void EndSession() = 0; }; } // namespace vr
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm index a3ae2b5..f728b392 100644 --- a/chrome/browser/app_controller_mac_browsertest.mm +++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -472,8 +472,7 @@ class AppControllerOpenShortcutBrowserTest : public InProcessBrowserTest { protected: AppControllerOpenShortcutBrowserTest() { - scoped_feature_list_.InitWithFeatures({welcome::kOnboardingForceEnabled}, - {}); + scoped_feature_list_.InitWithFeatures({welcome::kForceEnabled}, {}); } void SetUpInProcessBrowserTestFixture() override {
diff --git a/chrome/browser/apps/app_service/app_icon_factory.cc b/chrome/browser/apps/app_service/app_icon_factory.cc index 24dda84..9d1e4b1 100644 --- a/chrome/browser/apps/app_service/app_icon_factory.cc +++ b/chrome/browser/apps/app_service/app_icon_factory.cc
@@ -27,6 +27,7 @@ #include "extensions/grit/extensions_browser_resources.h" #include "services/data_decoder/public/cpp/decode_image.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/geometry/size.h" #include "ui/gfx/image/image.h" #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia_operations.h" @@ -116,7 +117,6 @@ void RunCallbackWithCompressedDataFromExtension( const extensions::Extension* extension, - extensions::ExtensionResource ext_resource, int size_hint_in_dip, int default_icon_resource, bool is_placeholder_icon, @@ -128,10 +128,21 @@ // disk. // // For the kUncompressed case, RunCallbackWithUncompressedImage - // calls extensions::ImageLoader::LoadImageAsync, which already handles - // that distinction. We can't use LoadImageAsync here, because the - // caller has asked for compressed icons (i.e. PNG-formatted data), not - // uncompressed (i.e. a gfx::ImageSkia). + // calls extensions::ImageLoader::LoadImageAtEveryScaleFactorAsync, which + // already handles that distinction. We can't use + // LoadImageAtEveryScaleFactorAsync here, because the caller has asked for + // compressed icons (i.e. PNG-formatted data), not uncompressed + // (i.e. a gfx::ImageSkia). + + const gfx::Size dip_size = gfx::Size(size_hint_in_dip, size_hint_in_dip); + float scale = + ui::GetScaleForScaleFactor(apps_util::GetPrimaryDisplayUIScaleFactor()); + int size_hint_in_px = gfx::ScaleToFlooredSize(dip_size, scale).width(); + + extensions::ExtensionResource ext_resource = + extensions::IconsInfo::GetIconResource(extension, size_hint_in_px, + ExtensionIconSet::MATCH_BIGGER); + if (extension && extension->location() == extensions::Manifest::COMPONENT) { int resource_id = 0; const extensions::ComponentExtensionResourceManager* manager = @@ -274,18 +285,13 @@ ->extension_service() ->GetInstalledExtension(extension_id); if (extension) { - extensions::ExtensionResource ext_resource = - extensions::IconsInfo::GetIconResource(extension, size_hint_in_dip, - ExtensionIconSet::MATCH_BIGGER); - switch (icon_compression) { case apps::mojom::IconCompression::kUnknown: break; case apps::mojom::IconCompression::kUncompressed: { - extensions::ImageLoader::Get(context)->LoadImageAsync( - extension, std::move(ext_resource), - gfx::Size(size_hint_in_dip, size_hint_in_dip), + extensions::ImageLoader::Get(context)->LoadImageAtEveryScaleFactorAsync( + extension, gfx::Size(size_hint_in_dip, size_hint_in_dip), base::BindOnce(&RunCallbackWithUncompressedImage, size_hint_in_dip, default_icon_resource, is_placeholder_icon, icon_effects, std::move(callback))); @@ -294,9 +300,8 @@ case apps::mojom::IconCompression::kCompressed: { RunCallbackWithCompressedDataFromExtension( - extension, std::move(ext_resource), size_hint_in_dip, - default_icon_resource, is_placeholder_icon, icon_effects, - std::move(callback)); + extension, size_hint_in_dip, default_icon_resource, + is_placeholder_icon, icon_effects, std::move(callback)); return; } }
diff --git a/chrome/browser/apps/app_service/app_service_proxy_factory.cc b/chrome/browser/apps/app_service/app_service_proxy_factory.cc index c576d416..7ef67e8 100644 --- a/chrome/browser/apps/app_service/app_service_proxy_factory.cc +++ b/chrome/browser/apps/app_service/app_service_proxy_factory.cc
@@ -6,12 +6,14 @@ #include "base/feature_list.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" +#include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_features.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/crostini/crostini_registry_service_factory.h" +#include "chrome/browser/chromeos/profiles/profile_helper.h" #include "extensions/browser/extension_prefs_factory.h" #include "extensions/browser/extension_registry_factory.h" #endif // OS_CHROMEOS @@ -20,7 +22,7 @@ // static AppServiceProxy* AppServiceProxyFactory::GetForProfile(Profile* profile) { - // TODO: decide the right behaviour in incognito: + // TODO: decide the right behaviour in incognito (non-guest) profiles: // - return nullptr (means we need to null check the service at call sites // OR ensure it's never accessed from an incognito profile), // - return the service attached to the Profile that the incognito profile @@ -62,6 +64,28 @@ return new AppServiceProxy(Profile::FromBrowserContext(context)); } +content::BrowserContext* AppServiceProxyFactory::GetBrowserContextToUse( + content::BrowserContext* context) const { + Profile* const profile = Profile::FromBrowserContext(context); + if (!profile || profile->IsSystemProfile()) { + return nullptr; + } + +#if defined(OS_CHROMEOS) + if (chromeos::ProfileHelper::IsSigninProfile(profile)) { + return nullptr; + } + + // We must have a proxy in guest mode to ensure default extension-based apps + // are served. Otherwise, don't create the app service for incognito profiles. + if (profile->IsGuestSession()) { + return chrome::GetBrowserContextOwnInstanceInIncognito(context); + } +#endif // OS_CHROMEOS + + return BrowserContextKeyedServiceFactory::GetBrowserContextToUse(context); +} + bool AppServiceProxyFactory::ServiceIsCreatedWithBrowserContext() const { return true; }
diff --git a/chrome/browser/apps/app_service/app_service_proxy_factory.h b/chrome/browser/apps/app_service/app_service_proxy_factory.h index 23fe2aa..d39c000 100644 --- a/chrome/browser/apps/app_service/app_service_proxy_factory.h +++ b/chrome/browser/apps/app_service/app_service_proxy_factory.h
@@ -33,6 +33,8 @@ // BrowserContextKeyedServiceFactory overrides. KeyedService* BuildServiceInstanceFor( content::BrowserContext* context) const override; + content::BrowserContext* GetBrowserContextToUse( + content::BrowserContext* context) const override; bool ServiceIsCreatedWithBrowserContext() const override; DISALLOW_COPY_AND_ASSIGN(AppServiceProxyFactory);
diff --git a/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_apitest.cc b/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_apitest.cc index 68d235c..028f902 100644 --- a/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_apitest.cc +++ b/chrome/browser/apps/platform_apps/api/arc_apps_private/arc_apps_private_apitest.cc
@@ -7,6 +7,7 @@ #include "base/macros.h" #include "base/path_service.h" #include "base/test/metrics/histogram_tester.h" +#include "build/build_config.h" #include "chrome/browser/chromeos/arc/arc_util.h" #include "chrome/browser/chromeos/login/demo_mode/demo_session.h" #include "chrome/browser/extensions/extension_apitest.h" @@ -101,7 +102,13 @@ EXPECT_TRUE(app_instance->launch_requests()[0]->IsForApp(launchable_app)); } -IN_PROC_BROWSER_TEST_F(ArcAppsPrivateApiTest, OnInstalled) { +// TODO(crbug/992839) Fix flake on linux-chromeos-rel +#if defined(OS_LINUX) +#define MAYBE_OnInstalled DISABLED_OnInstalled +#else +#define MAYBE_OnInstalled OnInstalled +#endif +IN_PROC_BROWSER_TEST_F(ArcAppsPrivateApiTest, MAYBE_OnInstalled) { ArcAppListPrefs* prefs = ArcAppListPrefs::Get(browser()->profile()); ASSERT_TRUE(prefs); std::unique_ptr<arc::FakeAppInstance> app_instance = CreateAppInstance(prefs);
diff --git a/chrome/browser/browsing_data/counters/sync_aware_counter_browsertest.cc b/chrome/browser/browsing_data/counters/sync_aware_counter_browsertest.cc index 6f380e3..cff119e 100644 --- a/chrome/browser/browsing_data/counters/sync_aware_counter_browsertest.cc +++ b/chrome/browser/browsing_data/counters/sync_aware_counter_browsertest.cc
@@ -30,6 +30,8 @@ namespace { +static const int kFirstProfileIndex = 0; + // A test for the sync behavior of several BrowsingDataCounters. class SyncAwareCounterTest : public SyncTest { public: @@ -119,7 +121,7 @@ // We stop syncing autofill in particular. This restarts the counter. syncer::UserSelectableTypeSet everything_except_autofill = - syncer::UserSelectableTypeSet::All(); + GetRegisteredSelectableTypes(kFirstProfileIndex); everything_except_autofill.Remove(syncer::UserSelectableType::kAutofill); auto sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( @@ -134,14 +136,16 @@ // If autofill sync is not affected, the counter is not restarted. sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( - /*sync_everything=*/false, {syncer::UserSelectableType::kHistory}); + /*sync_everything=*/false, + /*types=*/{syncer::UserSelectableType::kHistory}); sync_blocker.reset(); EXPECT_FALSE(CountingFinishedSinceLastAsked()); // We start syncing autofill again. This restarts the counter. sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( - /*sync_everything=*/false, syncer::UserSelectableTypeSet::All()); + /*sync_everything=*/false, + GetRegisteredSelectableTypes(kFirstProfileIndex)); sync_blocker.reset(); WaitForCounting(); EXPECT_TRUE(IsSyncEnabled()); @@ -157,7 +161,6 @@ IN_PROC_BROWSER_TEST_F(SyncAwareCounterTest, PasswordCounter) { // Set up the Sync client. ASSERT_TRUE(SetupClients()); - static const int kFirstProfileIndex = 0; syncer::SyncService* sync_service = GetSyncService(kFirstProfileIndex); Profile* profile = GetProfile(kFirstProfileIndex); // Set up the counter. @@ -182,7 +185,7 @@ // We stop syncing passwords in particular. This restarts the counter. syncer::UserSelectableTypeSet everything_except_passwords = - syncer::UserSelectableTypeSet::All(); + GetRegisteredSelectableTypes(kFirstProfileIndex); everything_except_passwords.Remove(syncer::UserSelectableType::kPasswords); auto sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( @@ -209,7 +212,8 @@ // We start syncing passwords again. This restarts the counter. sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( - /*sync_everything=*/false, syncer::UserSelectableTypeSet::All()); + /*sync_everything=*/false, + GetRegisteredSelectableTypes(kFirstProfileIndex)); sync_blocker.reset(); WaitForCounting(); EXPECT_TRUE(IsSyncEnabled()); @@ -256,7 +260,7 @@ // We stop syncing history deletion in particular. This restarts the counter. syncer::UserSelectableTypeSet everything_except_history = - syncer::UserSelectableTypeSet::All(); + GetRegisteredSelectableTypes(kFirstProfileIndex); everything_except_history.Remove(syncer::UserSelectableType::kHistory); auto sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( @@ -282,8 +286,8 @@ syncer::UserSelectableType::kAutofill, syncer::UserSelectableType::kPasswords); sync_blocker = sync_service->GetSetupInProgressHandle(); - sync_service->GetUserSettings()->SetSelectedTypes(/*sync_everything=*/false, - autofill_and_passwords); + sync_service->GetUserSettings()->SetSelectedTypes( + /*sync_everything=*/false, autofill_and_passwords); sync_blocker.reset(); EXPECT_FALSE(counter.HasTrackedTasks()); EXPECT_FALSE(CountingFinishedSinceLastAsked()); @@ -291,7 +295,8 @@ // We start syncing history deletion again. This restarts the counter. sync_blocker = sync_service->GetSetupInProgressHandle(); sync_service->GetUserSettings()->SetSelectedTypes( - /*sync_everything=*/false, syncer::UserSelectableTypeSet::All()); + /*sync_everything=*/false, + GetRegisteredSelectableTypes(kFirstProfileIndex)); sync_blocker.reset(); WaitForCounting(); EXPECT_TRUE(IsSyncEnabled());
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 6a6942a4..d5b16a4 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -175,6 +175,7 @@ #include "chrome/common/logging_chrome.h" #include "chrome/common/pepper_permission_util.h" #include "chrome/common/pref_names.h" +#include "chrome/common/pref_names_util.h" #include "chrome/common/prerender_url_loader_throttle.h" #include "chrome/common/prerender_util.h" #include "chrome/common/render_messages.h" @@ -369,7 +370,6 @@ #include "chrome/browser/win/conflicts/module_database.h" #include "chrome/browser/win/conflicts/module_event_sink_impl.h" #include "chrome/install_static/install_util.h" -#include "chrome/services/wifi_util_win/public/mojom/constants.mojom.h" #include "components/services/quarantine/public/cpp/quarantine_features_win.h" #include "sandbox/win/src/sandbox_policy.h" #elif defined(OS_MACOSX) @@ -404,10 +404,6 @@ #include "chromeos/constants/chromeos_constants.h" #include "chromeos/constants/chromeos_features.h" #include "chromeos/constants/chromeos_switches.h" -#include "chromeos/services/cellular_setup/cellular_setup_service.h" -#include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h" -#include "chromeos/services/cellular_setup/public/mojom/constants.mojom.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" #include "chromeos/services/network_config/network_config_service.h" #include "chromeos/services/network_config/public/mojom/constants.mojom.h" #include "chromeos/services/secure_channel/public/mojom/constants.mojom.h" @@ -571,7 +567,6 @@ #if BUILDFLAG(ENABLE_PRINTING) #include "chrome/browser/printing/printing_message_filter.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" #endif #if BUILDFLAG(ENABLE_LIBRARY_CDMS) @@ -2953,39 +2948,6 @@ #endif } -base::Optional<ui::CaptionStyle> GetCaptionStyleFromPrefs(PrefService* prefs) { - if (!prefs) { - return base::nullopt; - } - - ui::CaptionStyle style; - - style.text_size = prefs->GetString(prefs::kAccessibilityCaptionsTextSize); - style.font_family = prefs->GetString(prefs::kAccessibilityCaptionsTextFont); - if (!prefs->GetString(prefs::kAccessibilityCaptionsTextColor).empty()) { - style.text_color = base::StringPrintf( - "rgba(%s,%s)", - prefs->GetString(prefs::kAccessibilityCaptionsTextColor).c_str(), - base::NumberToString( - prefs->GetInteger(prefs::kAccessibilityCaptionsTextOpacity) / 100.0) - .c_str()); - } - - if (!prefs->GetString(prefs::kAccessibilityCaptionsBackgroundColor).empty()) { - style.background_color = base::StringPrintf( - "rgba(%s,%s)", - prefs->GetString(prefs::kAccessibilityCaptionsBackgroundColor).c_str(), - base::NumberToString( - prefs->GetInteger(prefs::kAccessibilityCaptionsBackgroundOpacity) / - 100.0) - .c_str()); - } - - style.text_shadow = prefs->GetString(prefs::kAccessibilityCaptionsTextShadow); - - return style; -} - void ChromeContentBrowserClient::OverrideWebkitPrefs( RenderViewHost* rvh, WebPreferences* web_prefs) { Profile* profile = Profile::FromBrowserContext( @@ -3336,7 +3298,7 @@ // Apply caption style from preferences if system caption style is undefined. if (!style && base::FeatureList::IsEnabled(features::kCaptionSettings)) { - style = GetCaptionStyleFromPrefs(prefs); + style = pref_names_util::GetCaptionStyleFromPrefs(prefs); } if (style) { @@ -3917,15 +3879,6 @@ #endif #if defined(OS_CHROMEOS) - if (base::FeatureList::IsEnabled( - chromeos::features::kUpdatedCellularActivationUi) && - service_name == chromeos::cellular_setup::mojom::kServiceName) { - service_manager::Service::RunAsyncUntilTermination( - std::make_unique<chromeos::cellular_setup::CellularSetupService>( - std::move(*receiver))); - return; - } - if (service_name == chromeos::secure_channel::mojom::kServiceName) { service_manager::Service::RunAsyncUntilTermination( std::make_unique<chromeos::secure_channel::SecureChannelService>(
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 2cd2b42c..63bd2773 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -129,6 +129,7 @@ "//chromeos/services/cros_healthd/public/mojom", "//chromeos/services/device_sync/public/cpp", "//chromeos/services/ime:constants", + "//chromeos/services/ime/public/cpp:buildflags", "//chromeos/services/ime/public/mojom", "//chromeos/services/machine_learning/public/cpp", "//chromeos/services/machine_learning/public/mojom",
diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc index 15bc2e0..d85ed2fe 100644 --- a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc +++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.cc
@@ -15,6 +15,8 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs_factory.h" #include "chrome/common/extensions/api/accessibility_private.h" +#include "chrome/common/pref_names.h" +#include "chrome/common/pref_names_util.h" #include "chromeos/constants/chromeos_features.h" #include "components/arc/arc_browser_context_keyed_service_factory_base.h" #include "components/arc/arc_service_manager.h" @@ -25,6 +27,9 @@ #include "components/exo/shell_surface_util.h" #include "components/exo/surface.h" #include "components/exo/wm_helper.h" +#include "components/language/core/browser/pref_names.h" +#include "components/prefs/pref_change_registrar.h" +#include "components/prefs/pref_service.h" #include "ui/accessibility/ax_action_data.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/window.h" @@ -130,11 +135,82 @@ return ArcAccessibilityHelperBridgeFactory::GetForBrowserContext(context); } +static constexpr const char* kTextShadowRaised = + "-2px -2px 4px rgba(0, 0, 0, 0.5)"; +static constexpr const char* kTextShadowDepressed = + "2px 2px 4px rgba(0, 0, 0, 0.5)"; +static constexpr const char* kTextShadowUniform = + "-1px 0px 0px black, 0px -1px 0px black, 1px 0px 0px black, 0px 1px 0px " + "black"; +static constexpr const char* kTextShadowDropShadow = + "0px 0px 2px rgba(0, 0, 0, 0.5), 2px 2px 2px black"; + +void ArcAccessibilityHelperBridge::UpdateCaptionSettings() const { + base::Optional<ui::CaptionStyle> prefs_caption_style = + pref_names_util::GetCaptionStyleFromPrefs(profile_->GetPrefs()); + + if (!prefs_caption_style) + return; + + auto* instance = ARC_GET_INSTANCE_FOR_METHOD( + arc_bridge_service_->accessibility_helper(), SetCaptionStyle); + + if (!instance) + return; + + arc::mojom::CaptionStylePtr caption_style = arc::mojom::CaptionStyle::New(); + caption_style->text_size = prefs_caption_style->text_size.c_str(); + caption_style->background_color = prefs_caption_style->background_color; + caption_style->text_color = prefs_caption_style->text_color; + caption_style->user_locale = + profile_->GetPrefs()->GetString(language::prefs::kApplicationLocale); + + // Convert the text shadow CSS string to a mojom::CaptionTextShadowType enum. + if (prefs_caption_style->text_shadow == kTextShadowRaised) { + caption_style->text_shadow_type = arc::mojom::CaptionTextShadowType::RAISED; + } else if (prefs_caption_style->text_shadow == kTextShadowDepressed) { + caption_style->text_shadow_type = + arc::mojom::CaptionTextShadowType::DEPRESSED; + } else if (prefs_caption_style->text_shadow == kTextShadowUniform) { + caption_style->text_shadow_type = + arc::mojom::CaptionTextShadowType::UNIFORM; + } else if (prefs_caption_style->text_shadow == kTextShadowDropShadow) { + caption_style->text_shadow_type = + arc::mojom::CaptionTextShadowType::DROP_SHADOW; + } else { + caption_style->text_shadow_type = arc::mojom::CaptionTextShadowType::NONE; + } + + instance->SetCaptionStyle(std::move(caption_style)); +} + +// The list of prefs we want to observe. +const char* const kCaptionStylePrefsToObserve[] = { + prefs::kAccessibilityCaptionsTextSize, + prefs::kAccessibilityCaptionsTextFont, + prefs::kAccessibilityCaptionsTextColor, + prefs::kAccessibilityCaptionsTextOpacity, + prefs::kAccessibilityCaptionsBackgroundColor, + prefs::kAccessibilityCaptionsTextShadow, + prefs::kAccessibilityCaptionsBackgroundOpacity, + language::prefs::kApplicationLocale}; + ArcAccessibilityHelperBridge::ArcAccessibilityHelperBridge( content::BrowserContext* browser_context, ArcBridgeService* arc_bridge_service) : profile_(Profile::FromBrowserContext(browser_context)), arc_bridge_service_(arc_bridge_service) { + pref_change_registrar_ = std::make_unique<PrefChangeRegistrar>(); + pref_change_registrar_->Init( + Profile::FromBrowserContext(browser_context)->GetPrefs()); + + for (const char* const pref_name : kCaptionStylePrefsToObserve) { + pref_change_registrar_->Add( + pref_name, + base::Bind(&ArcAccessibilityHelperBridge::UpdateCaptionSettings, + base::Unretained(this))); + } + arc_bridge_service_->accessibility_helper()->SetHost(this); arc_bridge_service_->accessibility_helper()->AddObserver(this); @@ -218,6 +294,7 @@ void ArcAccessibilityHelperBridge::OnConnectionReady() { UpdateFilterType(); + UpdateCaptionSettings(); chromeos::AccessibilityManager* accessibility_manager = chromeos::AccessibilityManager::Get();
diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h index d85294c..92d7b97 100644 --- a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h +++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h
@@ -114,6 +114,9 @@ virtual extensions::EventRouter* GetEventRouter() const; private: + std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; + void UpdateCaptionSettings() const; + // wm::ActivationChangeObserver overrides. void OnWindowActivated(ActivationReason reason, aura::Window* gained_active,
diff --git a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.cc b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.cc index cb52254..97519c11e 100644 --- a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.cc +++ b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.cc
@@ -9,8 +9,6 @@ #include "base/logging.h" #include "base/no_destructor.h" -#include "base/time/clock.h" -#include "base/time/default_clock.h" #include "base/timer/timer.h" #include "chrome/common/chrome_features.h" #include "chrome/common/pref_names.h" @@ -63,19 +61,19 @@ } } -ParentAccessService::ParentAccessService() - : clock_(base::DefaultClock::GetInstance()) {} +ParentAccessService::ParentAccessService() = default; ParentAccessService::~ParentAccessService() = default; bool ParentAccessService::ValidateParentAccessCode( const AccountId& account_id, - const std::string& access_code) { + const std::string& access_code, + base::Time validation_time) { bool validation_result = false; for (const auto& map_entry : config_source_.config_map()) { if (!account_id.is_valid() || account_id == map_entry.first) { for (const auto& validator : map_entry.second) { - if (validator->Validate(access_code, clock_->Now())) { + if (validator->Validate(access_code, validation_time)) { validation_result = true; break; } @@ -103,9 +101,5 @@ observers_.RemoveObserver(observer); } -void ParentAccessService::SetClockForTesting(base::Clock* clock) { - clock_ = clock; -} - } // namespace parent_access } // namespace chromeos
diff --git a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h index 08bc22f..259c508 100644 --- a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h +++ b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h
@@ -16,10 +16,6 @@ class PrefRegistrySimple; -namespace base { -class Clock; -} // namespace base - namespace chromeos { namespace parent_access { @@ -60,9 +56,12 @@ // Checks if |access_code| is valid for the user identified by |account_id|. // When account_id is empty, this method checks if the |access_code| is valid - // for any child that was added to this device. + // for any child that was added to this device. |validation_time| is the time + // that will be used to validate the code, it will succeed if the code was + // valid this given time. bool ValidateParentAccessCode(const AccountId& account_id, - const std::string& access_code); + const std::string& access_code, + base::Time validation_time); // Reloads config for the provided user. void LoadConfigForUser(const user_manager::User* user); @@ -70,9 +69,6 @@ void AddObserver(Observer* observer); void RemoveObserver(Observer* observer); - // Allows to override the time for testing purposes. - void SetClockForTesting(base::Clock* clock); - private: friend class base::NoDestructor<ParentAccessService>; @@ -82,9 +78,6 @@ // Provides configurations to be used for validation of access codes. ConfigSource config_source_; - // Points to the base::DefaultClock by default. - const base::Clock* clock_; - base::ObserverList<Observer> observers_; DISALLOW_COPY_AND_ASSIGN(ParentAccessService);
diff --git a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service_browsertest.cc b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service_browsertest.cc index f40410e..1fd9588 100644 --- a/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service_browsertest.cc +++ b/chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service_browsertest.cc
@@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/json/json_writer.h" #include "base/macros.h" -#include "base/test/simple_test_clock.h" #include "chrome/browser/chromeos/child_accounts/child_account_test_utils.h" #include "chrome/browser/chromeos/child_accounts/parent_access_code/config_source.h" #include "chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h" @@ -102,7 +101,6 @@ void SetUpOnMainThread() override { ASSERT_NO_FATAL_FAILURE(GetTestAccessCodeValues(&test_values_)); ParentAccessService::Get().AddObserver(test_observer_.get()); - ParentAccessService::Get().SetClockForTesting(&test_clock_); SupervisedUserTestBase::SetUpOnMainThread(); } @@ -134,10 +132,11 @@ std::move(policy), base::DictionaryValue(), child_profile); } - // Performs |code| validation on ParentAccessCode singleton and returns the - // result. - bool ValidateAccessCode(const std::string& code) { - return ParentAccessService::Get().ValidateParentAccessCode(child_, code); + // Performs |code| validation on ParentAccessService singleton using the + // |validation time| and returns the result. + bool ValidateAccessCode(const std::string& code, base::Time validation_time) { + return ParentAccessService::Get().ValidateParentAccessCode(child_, code, + validation_time); } // Checks if ParentAccessServiceObserver and ValidateParentAccessCodeCallback @@ -149,7 +148,6 @@ } const AccountId child_ = AccountId::FromUserEmail(kAccountId); - base::SimpleTestClock test_clock_; AccessCodeValues test_values_; std::unique_ptr<TestParentAccessServiceObserver> test_observer_; @@ -161,9 +159,7 @@ LogInUser(LogInType::kChild); auto test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_FALSE(ValidateAccessCode(test_value->second)); + EXPECT_FALSE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(0, 1); } @@ -176,10 +172,8 @@ UpdatePolicy(PolicyFromConfigs(GetInvalidTestConfig(), GetInvalidTestConfig(), old_configs)); - const AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_FALSE(ValidateAccessCode(test_value->second)); + auto test_value = test_values_.begin(); + EXPECT_FALSE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(0, 1); } @@ -192,10 +186,8 @@ UpdatePolicy(PolicyFromConfigs(GetDefaultTestConfig(), GetInvalidTestConfig(), old_configs)); - const AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_TRUE(ValidateAccessCode(test_value->second)); + auto test_value = test_values_.begin(); + EXPECT_TRUE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(1, 0); } @@ -208,10 +200,8 @@ UpdatePolicy(PolicyFromConfigs(GetInvalidTestConfig(), GetDefaultTestConfig(), old_configs)); - const AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_TRUE(ValidateAccessCode(test_value->second)); + auto test_value = test_values_.begin(); + EXPECT_TRUE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(1, 0); } @@ -225,10 +215,8 @@ UpdatePolicy(PolicyFromConfigs(GetInvalidTestConfig(), GetInvalidTestConfig(), old_configs)); - const AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_TRUE(ValidateAccessCode(test_value->second)); + auto test_value = test_values_.begin(); + EXPECT_TRUE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(1, 0); } @@ -237,26 +225,22 @@ LogInUser(LogInType::kChild); AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); // No config - validation should fail. - EXPECT_FALSE(ValidateAccessCode(test_value->second)); + EXPECT_FALSE(ValidateAccessCode(test_value->second, test_value->first)); UpdatePolicy( PolicyFromConfigs(GetInvalidTestConfig(), GetDefaultTestConfig(), {})); // Valid config - validation should pass. - for (auto& value : test_values_) { - test_clock_.SetNow(value.first); - EXPECT_TRUE(ValidateAccessCode(value.second)); - } + for (auto& value : test_values_) + EXPECT_TRUE(ValidateAccessCode(value.second, value.first)); UpdatePolicy( PolicyFromConfigs(GetInvalidTestConfig(), GetInvalidTestConfig(), {})); // Invalid config - validation should fail. - test_clock_.SetNow(test_value->first); - EXPECT_FALSE(ValidateAccessCode(test_value->second)); + EXPECT_FALSE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(test_values_.size(), 2); } @@ -269,10 +253,8 @@ UpdatePolicy( PolicyFromConfigs(GetInvalidTestConfig(), GetDefaultTestConfig(), {})); - AccessCodeValues::iterator test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); - - EXPECT_TRUE(ValidateAccessCode(test_value->second)); + auto test_value = test_values_.begin(); + EXPECT_TRUE(ValidateAccessCode(test_value->second, test_value->first)); ExpectResults(0, 0); } @@ -286,10 +268,9 @@ PolicyFromConfigs(GetInvalidTestConfig(), GetDefaultTestConfig(), {})); auto test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); EXPECT_TRUE(ParentAccessService::Get().ValidateParentAccessCode( - EmptyAccountId(), test_value->second)); + EmptyAccountId(), test_value->second, test_value->first)); } IN_PROC_BROWSER_TEST_F(ParentAccessServiceTest, InvalidAccountId) { @@ -301,11 +282,10 @@ PolicyFromConfigs(GetInvalidTestConfig(), GetDefaultTestConfig(), {})); auto test_value = test_values_.begin(); - test_clock_.SetNow(test_value->first); AccountId other_child = AccountId::FromUserEmail("otherchild@gmail.com"); EXPECT_FALSE(ParentAccessService::Get().ValidateParentAccessCode( - other_child, test_value->second)); + other_child, test_value->second, test_value->first)); } } // namespace parent_access
diff --git a/chrome/browser/chromeos/crostini/crostini_manager.cc b/chrome/browser/chromeos/crostini/crostini_manager.cc index 1c002f9..9ec4e99 100644 --- a/chrome/browser/chromeos/crostini/crostini_manager.cc +++ b/chrome/browser/chromeos/crostini/crostini_manager.cc
@@ -1765,7 +1765,16 @@ return; } - // Any pending backup or restore callbacks can be marked as failed. + // If the vm is already marked "running" run the callback. + if (response->status() == vm_tools::concierge::VM_STATUS_RUNNING) { + running_vms_[vm_name] = + VmInfo{VmState::STARTED, std::move(response->vm_info())}; + std::move(callback).Run(/*success=*/true); + return; + } + + // Any pending callbacks must exist from a previously running VM, and should + // be marked as failed. InvokeAndErasePendingCallbacks( &export_lxd_container_callbacks_, vm_name, CrostiniResult::CONTAINER_EXPORT_IMPORT_FAILED_VM_STARTED); @@ -1783,14 +1792,6 @@ return; } - // If the vm is already marked "running" run the callback. - if (response->status() == vm_tools::concierge::VM_STATUS_RUNNING) { - running_vms_[vm_name] = - VmInfo{VmState::STARTED, std::move(response->vm_info())}; - std::move(callback).Run(/*success=*/true); - return; - } - // Otherwise, record the container start and run the callback after the VM // starts. DCHECK_EQ(response->status(), vm_tools::concierge::VM_STATUS_STARTING);
diff --git a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.cc b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.cc index b6a43f6b..d4fc9b3 100644 --- a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.cc +++ b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.cc
@@ -11,9 +11,11 @@ #include "ash/public/cpp/toast_manager.h" #include "base/logging.h" #include "base/optional.h" +#include "base/strings/utf_string_conversions.h" #include "chrome/grit/generated_resources.h" #include "components/exo/wm_helper.h" #include "ui/aura/client/aura_constants.h" +#include "ui/base/ime/chromeos/input_method_util.h" #include "ui/base/l10n/l10n_util.h" namespace crostini { @@ -26,26 +28,20 @@ : delegate_(std::move(delegate)) { delegate_->AddTabletModeObserver(this); delegate_->AddFocusObserver(this); + delegate_->AddInputMethodObserver(this); } CrostiniUnsupportedActionNotifier::~CrostiniUnsupportedActionNotifier() { delegate_->RemoveTabletModeObserver(this); delegate_->RemoveFocusObserver(this); + delegate_->RemoveInputMethodObserver(this); } -void CrostiniUnsupportedActionNotifier:: - ShowVirtualKeyboardUnsupportedNotifictionIfNeeded() { - if (!virtual_keyboard_unsupported_message_shown_ && - delegate_->IsInTabletMode() && delegate_->IsFocusedWindowCrostini()) { - ash::ToastData data = { - /*id=*/"VKUnsupportedInCrostini", - /*text=*/ - l10n_util::GetStringUTF16(IDS_CROSTINI_UNSUPPORTED_VIRTUAL_KEYBOARD), - /*timeout_ms=*/5000, - /*dismiss_text=*/base::Optional<base::string16>()}; - delegate_->ShowToast(data); - virtual_keyboard_unsupported_message_shown_ = true; - } +// Testing on using Debian/stretch on Eve shows Crostini supports all tested xkb +// IMEs but no non-xkb IMEs. +bool CrostiniUnsupportedActionNotifier::IsIMESupportedByCrostini( + const chromeos::input_method::InputMethodDescriptor& method) { + return method.id().find("xkb:") != std::string::npos; } void CrostiniUnsupportedActionNotifier::OnTabletModeStarted() { @@ -56,6 +52,52 @@ aura::Window* gained_focus, aura::Window* lost_focus) { ShowVirtualKeyboardUnsupportedNotifictionIfNeeded(); + ShowIMEUnsupportedNotifictionIfNeeded(); +} + +void CrostiniUnsupportedActionNotifier::InputMethodChanged( + chromeos::input_method::InputMethodManager* manager, + Profile* profile, + bool show_message) { + ShowIMEUnsupportedNotifictionIfNeeded(); +} + +void CrostiniUnsupportedActionNotifier:: + ShowVirtualKeyboardUnsupportedNotifictionIfNeeded() { + if (virtual_keyboard_unsupported_message_shown_) { + return; + } + if (delegate_->IsInTabletMode() && delegate_->IsFocusedWindowCrostini()) { + ash::ToastData data = { + /*id=*/"VKUnsupportedInCrostini", + /*text=*/ + l10n_util::GetStringUTF16(IDS_CROSTINI_UNSUPPORTED_VIRTUAL_KEYBOARD), + /*timeout_ms=*/5000, + /*dismiss_text=*/base::nullopt}; + delegate_->ShowToast(data); + virtual_keyboard_unsupported_message_shown_ = true; + } +} + +void CrostiniUnsupportedActionNotifier:: + ShowIMEUnsupportedNotifictionIfNeeded() { + if (ime_unsupported_message_shown_) { + return; + } + auto method = delegate_->GetCurrentInputMethod(); + if (!IsIMESupportedByCrostini(method) && + delegate_->IsFocusedWindowCrostini()) { + auto ime_name = + base::UTF8ToUTF16(delegate_->GetLocalizedDisplayName(method)); + ash::ToastData data = { + /*id=*/"IMEUnsupportedInCrostini", + /*text=*/ + l10n_util::GetStringFUTF16(IDS_CROSTINI_UNSUPPORTED_IME, ime_name), + /*timeout_ms=*/5000, + /*dismiss_text=*/base::nullopt}; + delegate_->ShowToast(data); + ime_unsupported_message_shown_ = true; + } } CrostiniUnsupportedActionNotifier::Delegate::Delegate() = default; @@ -75,11 +117,26 @@ static_cast<int>(ash::AppType::CROSTINI_APP); } +chromeos::input_method::InputMethodDescriptor +CrostiniUnsupportedActionNotifier::Delegate::GetCurrentInputMethod() { + return chromeos::input_method::InputMethodManager::Get() + ->GetActiveIMEState() + ->GetCurrentInputMethod(); +} + void CrostiniUnsupportedActionNotifier::Delegate::ShowToast( const ash::ToastData& toast_data) { ash::ToastManager::Get()->Show(toast_data); } +std::string +CrostiniUnsupportedActionNotifier::Delegate::GetLocalizedDisplayName( + const chromeos::input_method::InputMethodDescriptor& descriptor) { + return chromeos::input_method::InputMethodManager::Get() + ->GetInputMethodUtil() + ->GetLocalizedDisplayName(descriptor); +} + void CrostiniUnsupportedActionNotifier::Delegate::AddFocusObserver( aura::client::FocusChangeObserver* observer) { if (exo::WMHelper::HasInstance()) { @@ -108,4 +165,14 @@ client->RemoveObserver(observer); } +void CrostiniUnsupportedActionNotifier::Delegate::AddInputMethodObserver( + chromeos::input_method::InputMethodManager::Observer* observer) { + chromeos::input_method::InputMethodManager::Get()->AddObserver(observer); +} + +void CrostiniUnsupportedActionNotifier::Delegate::RemoveInputMethodObserver( + chromeos::input_method::InputMethodManager::Observer* observer) { + chromeos::input_method::InputMethodManager::Get()->RemoveObserver(observer); +} + } // namespace crostini
diff --git a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.h b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.h index f7c28b6f..1ab095c 100644 --- a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.h +++ b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.h
@@ -6,10 +6,13 @@ #define CHROME_BROWSER_CHROMEOS_CROSTINI_CROSTINI_UNSUPPORTED_ACTION_NOTIFIER_H_ #include <memory> +#include <string> #include "ash/public/cpp/tablet_mode_observer.h" #include "ash/public/cpp/toast_data.h" +#include "chrome/browser/profiles/profile.h" #include "ui/aura/client/focus_change_observer.h" +#include "ui/base/ime/chromeos/input_method_manager.h" namespace crostini { @@ -19,7 +22,8 @@ // we can prioritise appropriately. class CrostiniUnsupportedActionNotifier : public ash::TabletModeObserver, - public aura::client::FocusChangeObserver { + public aura::client::FocusChangeObserver, + public chromeos::input_method::InputMethodManager::Observer { public: // Adapter around external integrations which we can mock out for testing, // stateless. @@ -34,14 +38,27 @@ // doesn't count the terminal. virtual bool IsFocusedWindowCrostini(); - // Shows a toast to the user + // Gets the descriptor for the currently active input method. + virtual chromeos::input_method::InputMethodDescriptor + GetCurrentInputMethod(); + + // Shows a toast to the user. virtual void ShowToast(const ash::ToastData& toast_data); + // Gets a human-friendly name for the given input method descriptor + // in the current display language. + virtual std::string GetLocalizedDisplayName( + const chromeos::input_method::InputMethodDescriptor& descriptor); + virtual void AddFocusObserver(aura::client::FocusChangeObserver* observer); virtual void RemoveFocusObserver( aura::client::FocusChangeObserver* observer); virtual void AddTabletModeObserver(ash::TabletModeObserver* observer); virtual void RemoveTabletModeObserver(ash::TabletModeObserver* observer); + virtual void AddInputMethodObserver( + chromeos::input_method::InputMethodManager::Observer* observer); + virtual void RemoveInputMethodObserver( + chromeos::input_method::InputMethodManager::Observer* observer); }; CrostiniUnsupportedActionNotifier(); @@ -49,13 +66,18 @@ std::unique_ptr<Delegate> delegate); ~CrostiniUnsupportedActionNotifier() override; - // ash::TabletModeObserver + // ash::TabletModeObserver: void OnTabletModeStarted() override; - // aura::client::FocusChangeObserver + // aura::client::FocusChangeObserver: void OnWindowFocused(aura::Window* gained_focus, aura::Window* lost_focus) override; + // chromeos::input_method::InputMethodManager::Observer: + void InputMethodChanged(chromeos::input_method::InputMethodManager* manager, + Profile* profile, + bool show_message) override; + Delegate* get_delegate_for_testing() { return delegate_.get(); } private: @@ -64,8 +86,19 @@ // supported, notify them. void ShowVirtualKeyboardUnsupportedNotifictionIfNeeded(); + // If the user is trying to use an unsupported IME with a crostini app and if + // they haven't already been notified that its not supported, notify them. + // Generally Crostini supports IMEs with 2:1 mappings betweens keys and glyphs + // e.g. Armenian, and simple combinations like US International, but doesn't + // support CJK, handwriting, completion, etc. + void ShowIMEUnsupportedNotifictionIfNeeded(); + + bool IsIMESupportedByCrostini( + const chromeos::input_method::InputMethodDescriptor& method); + std::unique_ptr<Delegate> delegate_; bool virtual_keyboard_unsupported_message_shown_ = false; + bool ime_unsupported_message_shown_ = false; DISALLOW_COPY_AND_ASSIGN(CrostiniUnsupportedActionNotifier); };
diff --git a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier_unittest.cc b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier_unittest.cc index 162b791..65c3002 100644 --- a/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier_unittest.cc +++ b/chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/crostini/crostini_unsupported_action_notifier.h" #include <memory> +#include <string> #include <tuple> #include "testing/gmock/include/gmock/gmock.h" @@ -14,16 +15,23 @@ using ::testing::_; using ::testing::Bool; -using ::testing::Exactly; -using ::testing::InSequence; +using ::testing::Combine; using ::testing::NiceMock; using ::testing::Return; +using ::testing::Truly; + +using chromeos::input_method::InputMethodDescriptor; class MockDelegate : public CrostiniUnsupportedActionNotifier::Delegate { public: MOCK_METHOD(bool, IsInTabletMode, (), (override)); MOCK_METHOD(bool, IsFocusedWindowCrostini, (), (override)); MOCK_METHOD(void, ShowToast, (const ash::ToastData& toast_data), (override)); + MOCK_METHOD(std::string, + GetLocalizedDisplayName, + (const InputMethodDescriptor& descriptor), + (override)); + MOCK_METHOD(InputMethodDescriptor, GetCurrentInputMethod, (), (override)); MOCK_METHOD(void, AddFocusObserver, (aura::client::FocusChangeObserver * observer), @@ -40,10 +48,29 @@ RemoveTabletModeObserver, (ash::TabletModeObserver * observer), (override)); + MOCK_METHOD(void, + AddInputMethodObserver, + (chromeos::input_method::InputMethodManager::Observer * observer), + (override)); + MOCK_METHOD(void, + RemoveInputMethodObserver, + (chromeos::input_method::InputMethodManager::Observer * observer), + (override)); }; +namespace { +constexpr char supported_ime_id[] = + "_comp_ime_jkghodnilhceideoidjikpgommlajknkxkb:am:phonetic:arm"; +constexpr char unsupported_ime_id[] = + "_comp_ime_jkghodnilhceideoidjikpgommlajknkvkd_ethi"; +const InputMethodDescriptor + supported(supported_ime_id, {}, {}, {}, {}, {}, {}, {}); +const InputMethodDescriptor + unsupported(unsupported_ime_id, {}, {}, {}, {}, {}, {}, {}); +} // namespace + class CrostiniUnsupportedActionNotifierTest - : public testing::TestWithParam<std::tuple<bool, bool>> { + : public testing::TestWithParam<std::tuple<bool, bool, bool>> { public: CrostiniUnsupportedActionNotifierTest() : notifier(std::make_unique<NiceMock<MockDelegate>>()) {} @@ -57,42 +84,76 @@ // RTTI so have to use a static cast. return static_cast<NiceMock<MockDelegate>&>(*ptr); } + bool is_tablet_mode() const { return std::get<0>(GetParam()); } bool is_crostini_focused() const { return std::get<1>(GetParam()); } + bool is_ime_unsupported() const { return std::get<2>(GetParam()); } + InputMethodDescriptor ime_descriptor() const { + return is_ime_unsupported() ? unsupported : supported; + } + static bool IsIMEToast(const ash::ToastData& data) { + return data.id.compare(0, 3, "IME") == 0; + } + + static bool IsVKToast(const ash::ToastData& data) { + return data.id.compare(0, 2, "VK") == 0; + } + + void SetExpectations(bool show_tablet_toast, bool show_ime_toast) { + int num_tablet_toasts = show_tablet_toast ? 1 : 0; + int num_ime_toasts = show_ime_toast ? 1 : 0; + + EXPECT_CALL(get_delegate(), IsInTabletMode) + .WillRepeatedly(Return(is_tablet_mode())); + EXPECT_CALL(get_delegate(), IsFocusedWindowCrostini) + .WillRepeatedly(Return(is_crostini_focused())); + EXPECT_CALL(get_delegate(), GetCurrentInputMethod) + .WillRepeatedly(Return(ime_descriptor())); + ON_CALL(get_delegate(), GetLocalizedDisplayName).WillByDefault(Return("")); + + EXPECT_CALL(get_delegate(), ShowToast(Truly(IsVKToast))) + .Times(num_tablet_toasts); + EXPECT_CALL(get_delegate(), ShowToast(Truly(IsIMEToast))) + .Times(num_ime_toasts); + } CrostiniUnsupportedActionNotifier notifier; }; TEST_P(CrostiniUnsupportedActionNotifierTest, - ToastShownOnceOnlyWhenEnteringTabletModeWhileCrostiniAppFocused) { - EXPECT_CALL(get_delegate(), IsInTabletMode) - .WillRepeatedly(Return(is_tablet_mode())); - EXPECT_CALL(get_delegate(), IsFocusedWindowCrostini) - .WillRepeatedly(Return(is_crostini_focused())); - EXPECT_CALL(get_delegate(), ShowToast(_)) - .Times((is_tablet_mode() && is_crostini_focused()) ? 1 : 0); + ToastShownOnceOnlyWhenEnteringTabletMode) { + bool show_tablet_toast = is_tablet_mode() && is_crostini_focused(); + bool show_ime_toast = false; + SetExpectations(show_tablet_toast, show_ime_toast); notifier.OnTabletModeStarted(); notifier.OnTabletModeStarted(); - notifier.OnTabletModeStarted(); } TEST_P(CrostiniUnsupportedActionNotifierTest, - ToastShownOnceOnlyWhenFocusingCrostiniWhileInTabletMode) { - EXPECT_CALL(get_delegate(), IsInTabletMode) - .WillRepeatedly(Return(is_tablet_mode())); - EXPECT_CALL(get_delegate(), IsFocusedWindowCrostini) - .WillRepeatedly(Return(is_crostini_focused())); - EXPECT_CALL(get_delegate(), ShowToast(_)) - .Times((is_tablet_mode() && is_crostini_focused()) ? 1 : 0); + ToastShownOnceOnlyWhenChangingIME) { + bool show_tablet_toast = false; + bool show_ime_toast = is_ime_unsupported() && is_crostini_focused(); - notifier.OnWindowFocused(nullptr, nullptr); - notifier.OnWindowFocused(nullptr, nullptr); - notifier.OnWindowFocused(nullptr, nullptr); + SetExpectations(show_tablet_toast, show_ime_toast); + + notifier.InputMethodChanged({}, {}, {}); + notifier.InputMethodChanged({}, {}, {}); +} + +TEST_P(CrostiniUnsupportedActionNotifierTest, + ToastsShownOnceOnlyWhenFocusingCrostiniApp) { + bool show_tablet_toast = is_tablet_mode() && is_crostini_focused(); + bool show_ime_toast = is_ime_unsupported() && is_crostini_focused(); + + SetExpectations(show_tablet_toast, show_ime_toast); + + notifier.OnWindowFocused({}, {}); + notifier.OnWindowFocused({}, {}); } INSTANTIATE_TEST_CASE_P(CrostiniUnsupportedActionNotifierTestCombination, CrostiniUnsupportedActionNotifierTest, - ::testing::Combine(Bool(), Bool())); + Combine(Bool(), Bool(), Bool())); } // namespace crostini
diff --git a/chrome/browser/chromeos/extensions/default_web_app_ids.h b/chrome/browser/chromeos/extensions/default_web_app_ids.h index 7ee5270..14f9673f 100644 --- a/chrome/browser/chromeos/extensions/default_web_app_ids.h +++ b/chrome/browser/chromeos/extensions/default_web_app_ids.h
@@ -22,7 +22,7 @@ // Generated as // web_app::GenerateAppIdFromURL(GURL( // "https://google.com/chromebook/whatsnew/embedded/")). -constexpr char kReleaseNotesAppId[] = "kddjchdmnnpakappplfnloipgcbioilo"; +constexpr char kReleaseNotesAppId[] = "lddhblppcjmenljhdleiahjighahdcje"; // Generated as web_app::GenerateAppIdFromURL(GURL("chrome://settings/")). constexpr char kSettingsAppId[] = "inogagmajamaleonmanpkpkkigmklfad";
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc index 8ad3b038..e3f20e0 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc
@@ -70,6 +70,8 @@ dict->SetBoolean("PLUGIN_VM_ENABLED", plugin_vm::IsPluginVmEnabled( Profile::FromBrowserContext(browser_context()))); + dict->SetBoolean("FILES_NG_ENABLED", + base::FeatureList::IsEnabled(chromeos::features::kFilesNG)); dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault()); return RespondNow(OneArgument(std::move(dict)));
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc index 28fd679..65e1403 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.cc
@@ -115,11 +115,12 @@ } void FileManagerPrivateInternalExecuteTaskFunction::OnTaskExecuted( - extensions::api::file_manager_private::TaskResult result) { + extensions::api::file_manager_private::TaskResult result, + std::string failure_reason) { auto result_list = extensions::api::file_manager_private_internal:: ExecuteTask::Results::Create(result); if (result == extensions::api::file_manager_private::TASK_RESULT_FAILED) { - Respond(Error("Task result failed")); + Respond(Error("Task result failed: " + failure_reason)); } else { Respond(ArgumentList(std::move(result_list))); }
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h index 1127fec..f19b406 100644 --- a/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h +++ b/chrome/browser/chromeos/extensions/file_manager/private_api_tasks.h
@@ -43,8 +43,8 @@ ResponseAction Run() override; private: - void OnTaskExecuted( - extensions::api::file_manager_private::TaskResult success); + void OnTaskExecuted(extensions::api::file_manager_private::TaskResult success, + std::string failure_reason); const ChromeExtensionFunctionDetails chrome_details_; };
diff --git a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc index 9a23338..999eab2f 100644 --- a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc +++ b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
@@ -263,7 +263,8 @@ for (size_t i = 0; i < content_urls.size(); ++i) { if (!content_urls[i].is_valid()) { std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_FAILED); + extensions::api::file_manager_private::TASK_RESULT_FAILED, + "Invalid url: " + content_urls[i].possibly_invalid_spec()); return; } } @@ -271,14 +272,16 @@ // File manager in secondary profile cannot access ARC. if (!chromeos::ProfileHelper::IsPrimaryProfile(profile)) { std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_FAILED); + extensions::api::file_manager_private::TASK_RESULT_FAILED, + "Not primary profile"); return; } auto* arc_service_manager = arc::ArcServiceManager::Get(); if (!arc_service_manager) { std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_FAILED); + extensions::api::file_manager_private::TASK_RESULT_FAILED, + "No ArcServiceManager"); return; } @@ -292,7 +295,7 @@ arc_file_system->OpenUrlsWithPermission(std::move(request), base::DoNothing()); std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT); + extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT, ""); UMA_HISTOGRAM_ENUMERATION( "Arc.UserInteraction", @@ -316,7 +319,7 @@ AppIdToActivityName(task.app_id), FileTaskActionIdToArcActionType(task.action_id)); std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT); + extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT, ""); UMA_HISTOGRAM_ENUMERATION( "Arc.UserInteraction", @@ -325,8 +328,8 @@ return; } - std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_FAILED); + std::move(done).Run(extensions::api::file_manager_private::TASK_RESULT_FAILED, + "No android app to run task"); } } // namespace
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc index 9864f93f..4036e3f 100644 --- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc +++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -176,7 +176,7 @@ const scoped_refptr<const Extension>& handler_extension, const std::vector<FileSystemURL>& file_urls); - void ExecuteDoneOnUIThread(bool success); + void ExecuteDoneOnUIThread(bool success, std::string failure_reason); void ExecuteAfterSetupFileAccess( std::unique_ptr<FileDefinitionList> file_list); void ExecuteFileActionsOnUIThread( @@ -303,13 +303,16 @@ std::move(file_definition_list))); } -void FileBrowserHandlerExecutor::ExecuteDoneOnUIThread(bool success) { +void FileBrowserHandlerExecutor::ExecuteDoneOnUIThread( + bool success, + std::string failure_reason) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (done_) { std::move(done_).Run( success ? extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT - : extensions::api::file_manager_private::TASK_RESULT_FAILED); + : extensions::api::file_manager_private::TASK_RESULT_FAILED, + failure_reason); } delete this; } @@ -320,14 +323,14 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); if (file_definition_list->empty() || entry_definition_list->empty()) { - ExecuteDoneOnUIThread(false); + ExecuteDoneOnUIThread(false, "File list empty"); return; } int handler_pid = ExtractProcessFromExtensionId(profile_, extension_->id()); if (handler_pid <= 0 && !extensions::BackgroundInfo::HasLazyBackgroundPage(extension_.get())) { - ExecuteDoneOnUIThread(false); + ExecuteDoneOnUIThread(false, "No app running or with background page"); return; } @@ -340,7 +343,7 @@ const extensions::LazyContextId context_id(profile_, extension_->id()); extensions::LazyContextTaskQueue* queue = context_id.GetTaskQueue(); if (!queue->ShouldEnqueueTask(profile_, extension_.get())) { - ExecuteDoneOnUIThread(false); + ExecuteDoneOnUIThread(false, "Could not queue task for app"); return; } queue->AddPendingTask( @@ -363,13 +366,13 @@ : handler_pid_in; if (handler_pid <= 0) { - ExecuteDoneOnUIThread(false); + ExecuteDoneOnUIThread(false, "No app available"); return; } extensions::EventRouter* router = extensions::EventRouter::Get(profile_); if (!router) { - ExecuteDoneOnUIThread(false); + ExecuteDoneOnUIThread(false, "Could not send task to app"); return; } @@ -391,7 +394,7 @@ "fileBrowserHandler.onExecute", std::move(event_args), profile_); router->DispatchEventToExtension(extension_->id(), std::move(event)); - ExecuteDoneOnUIThread(true); + ExecuteDoneOnUIThread(true, ""); } void FileBrowserHandlerExecutor::SetupHandlerHostFileAccessPermissions(
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.cc b/chrome/browser/chromeos/file_manager/file_tasks.cc index 2d22b6e..de1244ff 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks.cc +++ b/chrome/browser/chromeos/file_manager/file_tasks.cc
@@ -396,7 +396,7 @@ OpenFilesWithBrowser(profile, file_urls, task.action_id); if (result && done) { std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_OPENED); + extensions::api::file_manager_private::TASK_RESULT_OPENED, ""); } return result; } @@ -438,7 +438,7 @@ } if (!done.is_null()) std::move(done).Run( - extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT); + extensions::api::file_manager_private::TASK_RESULT_MESSAGE_SENT, ""); return true; } NOTREACHED();
diff --git a/chrome/browser/chromeos/file_manager/file_tasks.h b/chrome/browser/chromeos/file_manager/file_tasks.h index 709b34c..3f8d994 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks.h +++ b/chrome/browser/chromeos/file_manager/file_tasks.h
@@ -240,10 +240,10 @@ // "task_id" looks like. bool ParseTaskID(const std::string& task_id, TaskDescriptor* task); -// The callback is used for ExecuteFileTask(). Will be called with true if -// the file task execution is successful, or false if unsuccessful. +// The callback is used for ExecuteFileTask(). typedef base::OnceCallback<void( - extensions::api::file_manager_private::TaskResult result)> + extensions::api::file_manager_private::TaskResult result, + std::string error_message)> FileTaskFinishedCallback; // Executes file handler task for each element of |file_urls|.
diff --git a/chrome/browser/chromeos/file_manager/open_util.cc b/chrome/browser/chromeos/file_manager/open_util.cc index 217782b..6558df9 100644 --- a/chrome/browser/chromeos/file_manager/open_util.cc +++ b/chrome/browser/chromeos/file_manager/open_util.cc
@@ -40,7 +40,8 @@ bool shell_operations_allowed = true; void IgnoreFileTaskExecuteResult( - extensions::api::file_manager_private::TaskResult result) {} + extensions::api::file_manager_private::TaskResult result, + std::string failure_reason) {} // Executes the |task| for the file specified by |url|. void ExecuteFileTaskForUrl(Profile* profile,
diff --git a/chrome/browser/chromeos/input_method/ime_service_connector.cc b/chrome/browser/chromeos/input_method/ime_service_connector.cc index 78ab9d5..2bd414a 100644 --- a/chrome/browser/chromeos/input_method/ime_service_connector.cc +++ b/chrome/browser/chromeos/input_method/ime_service_connector.cc
@@ -10,9 +10,9 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "chromeos/services/ime/constants.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" -#include "content/public/browser/system_connector.h" - +#include "chromeos/services/ime/public/cpp/buildflags.h" +#include "chromeos/strings/grit/chromeos_strings.h" +#include "content/public/browser/service_process_host.h" #include "net/base/load_flags.h" #include "net/http/http_status_code.h" #include "net/traffic_annotation/network_traffic_annotation.h" @@ -25,6 +25,12 @@ namespace { +#if BUILDFLAG(ENABLE_CROS_IME_DECODER) +constexpr auto kImeServiceSandboxType = service_manager::SANDBOX_TYPE_IME; +#else +constexpr auto kImeServiceSandboxType = service_manager::SANDBOX_TYPE_UTILITY; +#endif + constexpr net::NetworkTrafficAnnotationTag traffic_annotation = net::DefineNetworkTrafficAnnotation("ime_url_downloader", R"( semantics { @@ -65,10 +71,7 @@ } // namespace ImeServiceConnector::ImeServiceConnector(Profile* profile) - : profile_(profile), - url_loader_factory_(profile->GetURLLoaderFactory()), - instance_id_(base::Token::CreateRandom()), - access_(this) {} + : profile_(profile), url_loader_factory_(profile->GetURLLoaderFactory()) {} ImeServiceConnector::~ImeServiceConnector() = default; @@ -110,27 +113,21 @@ void ImeServiceConnector::SetupImeService( mojo::PendingReceiver<chromeos::ime::mojom::InputEngineManager> receiver) { - auto* connector = content::GetSystemConnector(); - auto per_id_filter = service_manager::ServiceFilter::ByNameWithId( - chromeos::ime::mojom::kServiceName, instance_id_); + if (!remote_service_) { + content::ServiceProcessHost::Launch( + remote_service_.BindNewPipeAndPassReceiver(), + content::ServiceProcessHost::Options() + .WithDisplayName(IDS_IME_SERVICE_DISPLAY_NAME) + .WithSandboxType(kImeServiceSandboxType) + .Pass()); + remote_service_.reset_on_disconnect(); - // Connect to the ChromeOS IME service. - if (!access_client_.is_bound()) { - // Connect service as a PlatformAccessClient interface. - connector->Connect(per_id_filter, - access_client_.BindNewPipeAndPassReceiver()); - - access_client_->SetPlatformAccessProvider( - access_.BindNewPipeAndPassRemote()); + platform_access_receiver_.reset(); + remote_service_->SetPlatformAccessProvider( + platform_access_receiver_.BindNewPipeAndPassRemote()); } - // Connect to the same service as a InputEngineManager interface. - connector->Connect(per_id_filter, std::move(receiver)); -} - -void ImeServiceConnector::OnPlatformAccessConnectionLost() { - // Reset the access_client_ - access_client_.reset(); + remote_service_->BindInputEngineManager(std::move(receiver)); } void ImeServiceConnector::OnFileDownloadComplete(
diff --git a/chrome/browser/chromeos/input_method/ime_service_connector.h b/chrome/browser/chromeos/input_method/ime_service_connector.h index c68f30c..37bcdf4b 100644 --- a/chrome/browser/chromeos/input_method/ime_service_connector.h +++ b/chrome/browser/chromeos/input_method/ime_service_connector.h
@@ -7,13 +7,11 @@ #include "base/base_paths.h" #include "base/files/file_path.h" -#include "base/token.h" #include "chrome/browser/profiles/profile.h" #include "chromeos/services/ime/public/mojom/input_engine.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" - #include "services/network/public/cpp/simple_url_loader.h" #include "url/gurl.h" @@ -44,22 +42,17 @@ base::FilePath path); private: - void OnPlatformAccessConnectionLost(); - - Profile* profile_; + Profile* const profile_; scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; // The current request in progress, or NULL. std::unique_ptr<network::SimpleURLLoader> url_loader_; - // There is 1:1 mapping from the instance IDs to IME services running out of - // process. - const base::Token instance_id_; - - mojo::Receiver<chromeos::ime::mojom::PlatformAccessProvider> access_; - - mojo::Remote<chromeos::ime::mojom::PlatformAccessClient> access_client_; + // Persistent connection to the IME service process. + mojo::Remote<chromeos::ime::mojom::ImeService> remote_service_; + mojo::Receiver<chromeos::ime::mojom::PlatformAccessProvider> + platform_access_receiver_{this}; DISALLOW_COPY_AND_ASSIGN(ImeServiceConnector); };
diff --git a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc index 691aa45..832798e 100644 --- a/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_engine_unittest.cc
@@ -19,7 +19,6 @@ #include "chrome/browser/ui/ash/keyboard/chrome_keyboard_controller_client_test_helper.h" #include "chrome/browser/ui/input_method/input_method_engine_base.h" #include "content/public/test/test_browser_thread_bundle.h" -#include "content/public/test/test_service_manager_context.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ime/chromeos/extension_ime_util.h" #include "ui/base/ime/chromeos/mock_component_extension_ime_manager_delegate.h" @@ -191,7 +190,6 @@ GURL input_view_; content::TestBrowserThreadBundle thread_bundle_; - content::TestServiceManagerContext service_manager_context_; std::unique_ptr<ui::MockIMEInputContextHandler> mock_ime_input_context_handler_; std::unique_ptr<ChromeKeyboardControllerClientTestHelper>
diff --git a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc index 24d5f459..5bd2a4dc 100644 --- a/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_manager_impl_unittest.cc
@@ -26,7 +26,6 @@ #include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" -#include "content/public/test/test_service_manager_context.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/ime/chromeos/extension_ime_util.h" @@ -362,7 +361,6 @@ ime_list_.push_back(ext2); } - content::TestServiceManagerContext service_manager_context_; std::unique_ptr<ChromeKeyboardControllerClientTestHelper> chrome_keyboard_controller_client_test_helper_; std::unique_ptr<InputMethodManagerImpl> manager_;
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc index ccd92ca..c58157eb 100644 --- a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc +++ b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
@@ -8,6 +8,7 @@ #include "base/json/string_escape.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/stringprintf.h" #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/login/enrollment/enrollment_screen.h" @@ -535,16 +536,18 @@ test::GetOobeElementPath({kEnrollmentUI, kWebview}) + kPartitionAttribute; std::string webview_partition_name_1 = test::OobeJS().GetString(webview_partition_path); + EXPECT_FALSE(webview_partition_name_1.empty()); // Simulate navigating over the enrollment screen a second time (without using // 'Back' and 'Next' buttons). ShowEnrollmentScreen(); ExecutePendingJavaScript(); - std::string webview_partition_name_2 = - test::OobeJS().GetString(webview_partition_path); - // Check that the partition was updated. - EXPECT_NE(webview_partition_name_1, webview_partition_name_2); + // Verify that the partition name changes. + const std::string partition_valid_and_changed_condition = base::StringPrintf( + "%s && (%s != '%s')", webview_partition_path.c_str(), + webview_partition_path.c_str(), webview_partition_name_1.c_str()); + test::OobeJS().CreateWaiter(partition_valid_and_changed_condition)->Wait(); } // Shows the enrollment screen and mocks the enrollment helper to show Active
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc index c6b9c867..1cc13d2 100644 --- a/chrome/browser/chromeos/login/lock/screen_locker.cc +++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -27,6 +27,9 @@ #include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_helper.h" +#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" +#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.h" +#include "chrome/browser/chromeos/certificate_provider/pin_dialog_manager.h" #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_service.h" #include "chrome/browser/chromeos/login/helper.h" #include "chrome/browser/chromeos/login/lock/views_screen_locker.h" @@ -43,6 +46,7 @@ #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" #include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/lifetime/application_lifetime.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/login_screen_client.h" #include "chrome/browser/ui/ash/session_controller_client_impl.h" #include "chrome/common/chrome_switches.h" @@ -151,6 +155,14 @@ ScreenLockObserver* g_screen_lock_observer = nullptr; +PinDialogManager* GetLoginScreenPinDialogManager() { + DCHECK(ProfileHelper::IsSigninProfileInitialized()); + CertificateProviderService* certificate_provider_service = + CertificateProviderServiceFactory::GetForBrowserContext( + ProfileHelper::GetSigninProfile()); + return certificate_provider_service->pin_dialog_manager(); +} + } // namespace // static @@ -183,6 +195,9 @@ device::mojom::FingerprintObserverPtr observer; fingerprint_observer_binding_.Bind(mojo::MakeRequest(&observer)); fp_service_->AddFingerprintObserver(std::move(observer)); + + GetLoginScreenPinDialogManager()->AddPinDialogHost( + &security_token_pin_dialog_host_ash_impl_); } void ScreenLocker::Init() { @@ -671,6 +686,9 @@ VLOG(1) << "Destroying ScreenLocker " << this; DCHECK(base::MessageLoopCurrentForUI::IsSet()); + GetLoginScreenPinDialogManager()->RemovePinDialogHost( + &security_token_pin_dialog_host_ash_impl_); + if (authenticator_) authenticator_->SetConsumer(nullptr); if (extended_authenticator_)
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc index 79fafcec..62e06d7 100644 --- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -857,6 +857,8 @@ if (GetEnterpriseDomain(&domain)) user_info.public_account_info->enterprise_domain = domain; + user_info.public_account_info->using_saml = user->using_saml(); + const std::vector<std::string>* public_session_recommended_locales = public_session_recommended_locales_.find(account_id) == public_session_recommended_locales_.end()
diff --git a/chrome/browser/chromeos/login/security_token_pin_dialog_host_ash_impl.cc b/chrome/browser/chromeos/login/security_token_pin_dialog_host_ash_impl.cc index 783a5bb1..26f6fcbc 100644 --- a/chrome/browser/chromeos/login/security_token_pin_dialog_host_ash_impl.cc +++ b/chrome/browser/chromeos/login/security_token_pin_dialog_host_ash_impl.cc
@@ -11,33 +11,14 @@ #include "ash/public/cpp/login_types.h" #include "base/bind.h" #include "base/logging.h" -#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" -#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.h" -#include "chrome/browser/chromeos/certificate_provider/pin_dialog_manager.h" -#include "chrome/browser/chromeos/profiles/profile_helper.h" -#include "chrome/browser/profiles/profile.h" namespace chromeos { -namespace { +SecurityTokenPinDialogHostAshImpl::SecurityTokenPinDialogHostAshImpl() = + default; -PinDialogManager* GetLoginScreenPinDialogManager() { - DCHECK(ProfileHelper::IsSigninProfileInitialized()); - CertificateProviderService* certificate_provider_service = - CertificateProviderServiceFactory::GetForBrowserContext( - ProfileHelper::GetSigninProfile()); - return certificate_provider_service->pin_dialog_manager(); -} - -} // namespace - -SecurityTokenPinDialogHostAshImpl::SecurityTokenPinDialogHostAshImpl() { - GetLoginScreenPinDialogManager()->AddPinDialogHost(this); -} - -SecurityTokenPinDialogHostAshImpl::~SecurityTokenPinDialogHostAshImpl() { - GetLoginScreenPinDialogManager()->RemovePinDialogHost(this); -} +SecurityTokenPinDialogHostAshImpl::~SecurityTokenPinDialogHostAshImpl() = + default; void SecurityTokenPinDialogHostAshImpl::ShowSecurityTokenPinDialog( const std::string& /*caller_extension_name*/,
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc index 5de9007..c04a354 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc
@@ -9,7 +9,11 @@ #include "ash/public/cpp/login_screen.h" #include "base/bind.h" #include "base/callback.h" +#include "base/logging.h" #include "base/threading/thread_task_runner_handle.h" +#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service.h" +#include "chrome/browser/chromeos/certificate_provider/certificate_provider_service_factory.h" +#include "chrome/browser/chromeos/certificate_provider/pin_dialog_manager.h" #include "chrome/browser/chromeos/login/existing_user_controller.h" #include "chrome/browser/chromeos/login/mojo_system_info_dispatcher.h" #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" @@ -17,6 +21,8 @@ #include "chrome/browser/chromeos/login/ui/login_display_mojo.h" #include "chrome/browser/chromeos/login/user_board_view_mojo.h" #include "chrome/browser/chromeos/login/wizard_controller.h" +#include "chrome/browser/chromeos/profiles/profile_helper.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/ash/login_screen_client.h" #include "chrome/browser/ui/ash/wallpaper_controller_client.h" #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" @@ -35,6 +41,14 @@ constexpr char kAccelSendFeedback[] = "send_feedback"; constexpr char kAccelReset[] = "reset"; +PinDialogManager* GetLoginScreenPinDialogManager() { + DCHECK(ProfileHelper::IsSigninProfileInitialized()); + CertificateProviderService* certificate_provider_service = + CertificateProviderServiceFactory::GetForBrowserContext( + ProfileHelper::GetSigninProfile()); + return certificate_provider_service->pin_dialog_manager(); +} + } // namespace LoginDisplayHostMojo::AuthState::AuthState( @@ -55,9 +69,14 @@ // Preload webui-based OOBE for add user, kiosk apps, etc. LoadOobeDialog(); + + GetLoginScreenPinDialogManager()->AddPinDialogHost( + &security_token_pin_dialog_host_ash_impl_); } LoginDisplayHostMojo::~LoginDisplayHostMojo() { + GetLoginScreenPinDialogManager()->RemovePinDialogHost( + &security_token_pin_dialog_host_ash_impl_); LoginScreenClient::Get()->SetDelegate(nullptr); if (dialog_) { dialog_->GetOobeUI()->signin_screen_handler()->SetDelegate(nullptr);
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h index 946912d0..78b995f1 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h
@@ -14,6 +14,7 @@ #include "base/memory/weak_ptr.h" #include "base/optional.h" #include "chrome/browser/chromeos/login/challenge_response_auth_keys_loader.h" +#include "chrome/browser/chromeos/login/security_token_pin_dialog_host_ash_impl.h" #include "chrome/browser/chromeos/login/ui/login_display_host_common.h" #include "chrome/browser/chromeos/login/ui/oobe_ui_dialog_delegate.h" #include "chrome/browser/ui/ash/login_screen_client.h" @@ -178,6 +179,8 @@ ChallengeResponseAuthKeysLoader challenge_response_auth_keys_loader_; + SecurityTokenPinDialogHostAshImpl security_token_pin_dialog_host_ash_impl_; + base::WeakPtrFactory<LoginDisplayHostMojo> weak_factory_; DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostMojo);
diff --git a/chrome/browser/chromeos/smb_client/discovery/netbios_client.cc b/chrome/browser/chromeos/smb_client/discovery/netbios_client.cc index 9be51925..62a8ef3 100644 --- a/chrome/browser/chromeos/smb_client/discovery/netbios_client.cc +++ b/chrome/browser/chromeos/smb_client/discovery/netbios_client.cc
@@ -49,11 +49,11 @@ NetBiosClient::NetBiosClient(network::mojom::NetworkContext* network_context) : bind_address_(net::IPAddress::IPv4AllZeros(), 0 /* port */), - receiver_binding_(this) { + listener_binding_(this) { DCHECK(network_context); - network::mojom::UDPSocketReceiverPtr rec_int_ptr; - receiver_binding_.Bind(mojo::MakeRequest(&rec_int_ptr)); + network::mojom::UDPSocketListenerPtr rec_int_ptr; + listener_binding_.Bind(mojo::MakeRequest(&rec_int_ptr)); network_context->CreateUDPSocket(mojo::MakeRequest(&server_socket_), std::move(rec_int_ptr));
diff --git a/chrome/browser/chromeos/smb_client/discovery/netbios_client.h b/chrome/browser/chromeos/smb_client/discovery/netbios_client.h index 6e91bec..627a062 100644 --- a/chrome/browser/chromeos/smb_client/discovery/netbios_client.h +++ b/chrome/browser/chromeos/smb_client/discovery/netbios_client.h
@@ -48,7 +48,7 @@ // The socket remains open and receives response as long as the instance of this // class is alive. Upon destruction, the socket and corresponding firewall hole // are closed. -class NetBiosClient : public network::mojom::UDPSocketReceiver, +class NetBiosClient : public network::mojom::UDPSocketListener, public NetBiosClientInterface, public base::SupportsWeakPtr<NetBiosClient> { public: @@ -90,7 +90,7 @@ // Callback handler for SendPacket. void OnSendCompleted(int32_t result); - // network::mojom::UDPSocketReceiver implementation. + // network::mojom::UDPSocketListener implementation. void OnReceived(int32_t result, const base::Optional<net::IPEndPoint>& src_ip, base::Optional<base::span<const uint8_t>> data) override; @@ -107,7 +107,7 @@ NetBiosResponseCallback callback_; std::unique_ptr<FirewallHole> firewall_hole_; network::mojom::UDPSocketPtr server_socket_; - mojo::Binding<network::mojom::UDPSocketReceiver> receiver_binding_; + mojo::Binding<network::mojom::UDPSocketListener> listener_binding_; DISALLOW_COPY_AND_ASSIGN(NetBiosClient); };
diff --git a/chrome/browser/component_updater/safety_tips_component_installer.cc b/chrome/browser/component_updater/safety_tips_component_installer.cc index aa45151..af65569 100644 --- a/chrome/browser/component_updater/safety_tips_component_installer.cc +++ b/chrome/browser/component_updater/safety_tips_component_installer.cc
@@ -101,7 +101,7 @@ FROM_HERE, {base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}, base::BindOnce(&LoadSafetyTipsProtoFromDisk, pb_path), - base::BindOnce(&safety_tips::SetProto)); + base::BindOnce(&safety_tips::SetRemoteConfigProto)); } // Called during startup and installation before ComponentReady().
diff --git a/chrome/browser/content_index/content_index_browsertest.cc b/chrome/browser/content_index/content_index_browsertest.cc index e21ce82..79eb7175 100644 --- a/chrome/browser/content_index/content_index_browsertest.cc +++ b/chrome/browser/content_index/content_index_browsertest.cc
@@ -211,6 +211,7 @@ } IN_PROC_BROWSER_TEST_F(ContentIndexTest, GetVisuals) { + provider()->SetIconSizesForTesting({{92, 92}}); RunScript("AddContent('my-id')"); base::RunLoop().RunUntilIdle(); // Wait for the provider to get the content. @@ -230,7 +231,6 @@ run_loop.Run(); EXPECT_FALSE(icon.isNull()); - EXPECT_FALSE(icon.drawsNothing()); } IN_PROC_BROWSER_TEST_F(ContentIndexTest, LaunchUrl) {
diff --git a/chrome/browser/content_index/content_index_provider_impl.cc b/chrome/browser/content_index/content_index_provider_impl.cc index edc58bd5..7a20ac6 100644 --- a/chrome/browser/content_index/content_index_provider_impl.cc +++ b/chrome/browser/content_index/content_index_provider_impl.cc
@@ -138,9 +138,8 @@ ContentIndexProviderImpl::ContentIndexProviderImpl(Profile* profile) : profile_(profile), metrics_(ukm::UkmBackgroundRecorderFactory::GetForProfile(profile)), - aggregator_( - OfflineContentAggregatorFactory::GetForKey(profile->GetProfileKey())), - weak_ptr_factory_(this) { + aggregator_(OfflineContentAggregatorFactory::GetForKey( + profile->GetProfileKey())) { aggregator_->RegisterProvider(kProviderNamespace, this); } @@ -154,6 +153,21 @@ aggregator_ = nullptr; } +std::vector<gfx::Size> ContentIndexProviderImpl::GetIconSizes( + blink::mojom::ContentCategory category) { + DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + + if (icon_sizes_for_testing_) + return *icon_sizes_for_testing_; + +#if defined(OS_ANDROID) + // Recommended notification icon size for Android. + return {{192, 192}}; +#else + return {}; +#endif +} + void ContentIndexProviderImpl::OnContentAdded( content::ContentIndexEntry entry) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -342,8 +356,10 @@ std::vector<SkBitmap> icons) { auto visuals = std::make_unique<offline_items_collection::OfflineItemVisuals>(); - if (!icons.empty()) + if (!icons.empty()) { + DCHECK_EQ(icons.size(), 1u); visuals->icon = gfx::Image::CreateFrom1xBitmap(std::move(icons.front())); + } std::move(callback).Run(id, std::move(visuals)); }
diff --git a/chrome/browser/content_index/content_index_provider_impl.h b/chrome/browser/content_index/content_index_provider_impl.h index aac2b1ab..7d53ae8 100644 --- a/chrome/browser/content_index/content_index_provider_impl.h +++ b/chrome/browser/content_index/content_index_provider_impl.h
@@ -39,6 +39,8 @@ void Shutdown() override; // ContentIndexProvider implementation. + std::vector<gfx::Size> GetIconSizes( + blink::mojom::ContentCategory category) override; void OnContentAdded(content::ContentIndexEntry entry) override; void OnContentDeleted(int64_t service_worker_registration_id, const url::Origin& origin, @@ -66,9 +68,11 @@ void AddObserver(Observer* observer) override; void RemoveObserver(Observer* observer) override; - private: - friend class ContentIndexProviderImplTest; + void SetIconSizesForTesting(std::vector<gfx::Size> icon_sizes) { + icon_sizes_for_testing_ = std::move(icon_sizes); + } + private: void DidGetIcons(const offline_items_collection::ContentId& id, VisualsCallback callback, std::vector<SkBitmap> icons); @@ -80,7 +84,8 @@ ContentIndexMetrics metrics_; offline_items_collection::OfflineContentAggregator* aggregator_; base::ObserverList<Observer>::Unchecked observers_; - base::WeakPtrFactory<ContentIndexProviderImpl> weak_ptr_factory_; + base::Optional<std::vector<gfx::Size>> icon_sizes_for_testing_; + base::WeakPtrFactory<ContentIndexProviderImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ContentIndexProviderImpl); };
diff --git a/chrome/browser/content_settings/content_settings_browsertest.cc b/chrome/browser/content_settings/content_settings_browsertest.cc index 35f8704..679bbbe 100644 --- a/chrome/browser/content_settings/content_settings_browsertest.cc +++ b/chrome/browser/content_settings/content_settings_browsertest.cc
@@ -150,6 +150,8 @@ void SetUpCommandLine(base::CommandLine* cmd) override { // Get access to CookieStore API. + // Also enables SameSiteByDefaultCookies and + // CookiesWithoutSameSiteMustBeSecure. cmd->AppendSwitch(switches::kEnableExperimentalWebPlatformFeatures); ContentSettingsTest::SetUpCommandLine(cmd); }
diff --git a/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc b/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc index ca73480..3143bb4a 100644 --- a/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc +++ b/chrome/browser/dom_distiller/distillable_page_utils_browsertest.cc
@@ -30,7 +30,7 @@ // This is essentially an "enum" with human-readable strings (e.g. "adaboost", // "none") as values. -using namespace switches::reader_mode_heuristics; +using namespace switches::reader_mode_heuristics; // NOLINT const char kSimpleArticlePath[] = "/dom_distiller/simple_article.html"; const char kSimpleArticleIFramePath[] =
diff --git a/chrome/browser/download/download_manager_utils.cc b/chrome/browser/download/download_manager_utils.cc index 32240c9..1657c464 100644 --- a/chrome/browser/download/download_manager_utils.cc +++ b/chrome/browser/download/download_manager_utils.cc
@@ -27,7 +27,8 @@ // A map for owning InProgressDownloadManagers before DownloadManagerImpl gets // created. using InProgressManagerMap = - std::map<ProfileKey*, std::unique_ptr<download::InProgressDownloadManager>>; + std::map<SimpleFactoryKey*, + std::unique_ptr<download::InProgressDownloadManager>>; InProgressManagerMap& GetInProgressManagerMap() { static base::NoDestructor<InProgressManagerMap> map; @@ -54,14 +55,15 @@ // static download::InProgressDownloadManager* DownloadManagerUtils::RetrieveInProgressDownloadManager(Profile* profile) { - ProfileKey* key = profile->GetProfileKey(); + SimpleFactoryKey* key = profile->GetProfileKey(); GetInProgressDownloadManager(key); auto& map = GetInProgressManagerMap(); return map[key].release(); } // static -void DownloadManagerUtils::InitializeSimpleDownloadManager(ProfileKey* key) { +void DownloadManagerUtils::InitializeSimpleDownloadManager( + SimpleFactoryKey* key) { #if defined(OS_ANDROID) if (!g_browser_process) { GetInProgressDownloadManager(key); @@ -80,7 +82,7 @@ // static download::InProgressDownloadManager* -DownloadManagerUtils::GetInProgressDownloadManager(ProfileKey* key) { +DownloadManagerUtils::GetInProgressDownloadManager(SimpleFactoryKey* key) { auto& map = GetInProgressManagerMap(); auto it = map.find(key); // Create the InProgressDownloadManager if it hasn't been created yet. @@ -89,7 +91,6 @@ auto in_progress_manager = std::make_unique<download::InProgressDownloadManager>( nullptr, key->IsOffTheRecord() ? base::FilePath() : key->GetPath(), - key->GetProtoDatabaseProvider(), base::BindRepeating(&IgnoreOriginSecurityCheck), base::BindRepeating(&content::DownloadRequestUtils::IsURLSafe), connector);
diff --git a/chrome/browser/download/download_manager_utils.h b/chrome/browser/download/download_manager_utils.h index 79dc4a1..d9294070 100644 --- a/chrome/browser/download/download_manager_utils.h +++ b/chrome/browser/download/download_manager_utils.h
@@ -8,7 +8,7 @@ #include "base/macros.h" class Profile; -class ProfileKey; +class SimpleFactoryKey; namespace download { class InProgressDownloadManager; @@ -22,12 +22,12 @@ // Initializes the SimpleDownloadManager that is associated with |key| whenver // possible. - static void InitializeSimpleDownloadManager(ProfileKey* key); + static void InitializeSimpleDownloadManager(SimpleFactoryKey* key); // Creates an InProgressDownloadManager for a particular |key| if it doesn't // exist and return the pointer. static download::InProgressDownloadManager* GetInProgressDownloadManager( - ProfileKey* key); + SimpleFactoryKey* key); private: DISALLOW_COPY_AND_ASSIGN(DownloadManagerUtils);
diff --git a/chrome/browser/download/download_offline_content_provider.cc b/chrome/browser/download/download_offline_content_provider.cc index b16f4203..b251d5c 100644 --- a/chrome/browser/download/download_offline_content_provider.cc +++ b/chrome/browser/download/download_offline_content_provider.cc
@@ -87,14 +87,14 @@ const std::string& guid); DownloadOfflineContentProvider* provider_; - base::WeakPtrFactory<AllDownloadObserver> weak_ptr_factory_; + base::WeakPtrFactory<AllDownloadObserver> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AllDownloadObserver); }; AllDownloadObserver::AllDownloadObserver( DownloadOfflineContentProvider* provider) - : provider_(provider), weak_ptr_factory_(this) {} + : provider_(provider) {} AllDownloadObserver::~AllDownloadObserver() {}
diff --git a/chrome/browser/download/download_service_factory.cc b/chrome/browser/download/download_service_factory.cc index 16678267..5d9f825 100644 --- a/chrome/browser/download/download_service_factory.cc +++ b/chrome/browser/download/download_service_factory.cc
@@ -185,7 +185,7 @@ // and cause the download service to fail. Call // InitializeSimpleDownloadManager() to initialize the DownloadManager // whenever profile becomes available. - DownloadManagerUtils::InitializeSimpleDownloadManager(profile_key); + DownloadManagerUtils::InitializeSimpleDownloadManager(key); leveldb_proto::ProtoDatabaseProvider* proto_db_provider = profile_key->GetProtoDatabaseProvider(); return download::BuildDownloadService(
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn index 9699236..cc062bbe 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn
@@ -1097,7 +1097,6 @@ if (is_win) { deps += [ - "//chrome/services/wifi_util_win/public/mojom", "//third_party/iaccessible2", "//third_party/isimpledom", ]
diff --git a/chrome/browser/extensions/api/socket/udp_socket_unittest.cc b/chrome/browser/extensions/api/socket/udp_socket_unittest.cc index 5baa299e..10356bc 100644 --- a/chrome/browser/extensions/api/socket/udp_socket_unittest.cc +++ b/chrome/browser/extensions/api/socket/udp_socket_unittest.cc
@@ -38,13 +38,13 @@ content::BrowserContext::GetDefaultStoragePartition(profile()) ->GetNetworkContext(); network::mojom::UDPSocketPtrInfo socket; - network::mojom::UDPSocketReceiverPtr receiver_ptr; - network::mojom::UDPSocketReceiverRequest receiver_request = - mojo::MakeRequest(&receiver_ptr); + network::mojom::UDPSocketListenerPtr listener_ptr; + network::mojom::UDPSocketListenerRequest listener_request = + mojo::MakeRequest(&listener_ptr); network_context->CreateUDPSocket(mojo::MakeRequest(&socket), - std::move(receiver_ptr)); + std::move(listener_ptr)); return std::make_unique<UDPSocket>( - std::move(socket), std::move(receiver_request), "abcdefghijklmnopqrst"); + std::move(socket), std::move(listener_request), "abcdefghijklmnopqrst"); } }; @@ -174,7 +174,7 @@ std::unique_ptr<UDPSocket> src = CreateSocket(); std::unique_ptr<UDPSocket> dest = CreateSocket(); - // Receiver + // Listener { net::TestCompletionCallback callback; dest->Bind("0.0.0.0", kPort, callback.callback());
diff --git a/chrome/browser/extensions/browsertest_util.cc b/chrome/browser/extensions/browsertest_util.cc index bb117a9..86b7ef8 100644 --- a/chrome/browser/extensions/browsertest_util.cc +++ b/chrome/browser/extensions/browsertest_util.cc
@@ -14,6 +14,7 @@ #include "chrome/browser/apps/app_service/app_launch_params.h" #include "chrome/browser/apps/launch_service/launch_service.h" #include "chrome/browser/extensions/launch_util.h" +#include "chrome/browser/installable/installable_metrics.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" @@ -22,7 +23,7 @@ #include "chrome/browser/web_applications/components/web_app_constants.h" #include "chrome/browser/web_applications/components/web_app_helpers.h" #include "chrome/browser/web_applications/components/web_app_provider_base.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/common/chrome_features.h" #include "chrome/common/web_application_info.h" #include "chrome/test/base/ui_test_utils.h" @@ -62,8 +63,10 @@ web_app::AppId app_id; auto* provider = web_app::WebAppProviderBase::GetProviderBase(profile); DCHECK(provider); - provider->install_manager().InstallWebAppForTesting( + provider->install_manager().InstallWebAppFromInfo( std::make_unique<WebApplicationInfo>(info), + /*no_network_install=*/false, + /*install_source=*/WebappInstallSource::DEVTOOLS, base::BindLambdaForTesting([&](const web_app::AppId& installed_app_id, web_app::InstallResultCode code) { DCHECK_EQ(web_app::InstallResultCode::kSuccess, code); @@ -109,8 +112,8 @@ AppLaunchSource::kSourceTest)); DCHECK(web_contents); - web_app::WebAppTabHelperBase* tab_helper = - web_app::WebAppTabHelperBase::FromWebContents(web_contents); + web_app::WebAppTabHelper* tab_helper = + web_app::WebAppTabHelper::FromWebContents(web_contents); DCHECK(tab_helper); DCHECK_EQ(extension_app->id(), tab_helper->app_id());
diff --git a/chrome/browser/extensions/chrome_extensions_interface_registration.cc b/chrome/browser/extensions/chrome_extensions_interface_registration.cc index 0463e5f..385d9180 100644 --- a/chrome/browser/extensions/chrome_extensions_interface_registration.cc +++ b/chrome/browser/extensions/chrome_extensions_interface_registration.cc
@@ -26,7 +26,6 @@ #if defined(OS_CHROMEOS) #include "base/task/post_task.h" #include "chrome/common/pref_names.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" #include "chromeos/services/ime/public/mojom/input_engine.mojom.h" #include "chromeos/services/media_perception/public/mojom/media_perception.mojom.h" #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc index f8f3933..512a9e3 100644 --- a/chrome/browser/extensions/extension_util.cc +++ b/chrome/browser/extensions/extension_util.cc
@@ -21,7 +21,6 @@ #include "chrome/browser/extensions/shared_module_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/webui/extensions/extension_icon_source.h" #include "chrome/browser/web_applications/extensions/bookmark_app_util.h" #include "chrome/common/chrome_features.h" @@ -366,12 +365,5 @@ web_contents->GetMainFrame()->GetLastCommittedURL()); } -bool IsWebContentsInAppWindow(content::WebContents* web_contents) { - // TODO(loyso): Unify this check as a util (including - // MaybeCreateHostedAppController). - Browser* browser = chrome::FindBrowserWithWebContents(web_contents); - return browser && browser->app_controller(); -} - } // namespace util } // namespace extensions
diff --git a/chrome/browser/extensions/extension_util.h b/chrome/browser/extensions/extension_util.h index 00484af..72bf82f 100644 --- a/chrome/browser/extensions/extension_util.h +++ b/chrome/browser/extensions/extension_util.h
@@ -17,7 +17,6 @@ namespace content { class BrowserContext; -class WebContents; } namespace gfx { @@ -118,10 +117,6 @@ // if there are none or the tab's is not secure. const Extension* GetPwaForSecureActiveTab(Browser* browser); -// Returns true if the |web_contents| belongs to a browser that is a windowed -// app. -bool IsWebContentsInAppWindow(content::WebContents* web_contents); - } // namespace util } // namespace extensions
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc index 2646817..25c7ef8 100644 --- a/chrome/browser/extensions/updater/extension_updater.cc +++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -554,7 +554,7 @@ std::set<int> request_ids; while (!fetched_crx_files_.empty() && !crx_install_is_running_) { - const FetchedCRXFile& crx_file = fetched_crx_files_.top(); + const FetchedCRXFile& crx_file = fetched_crx_files_.front(); VLOG(2) << "updating " << crx_file.info.extension_id << " with " << crx_file.info.path.value();
diff --git a/chrome/browser/extensions/updater/extension_updater.h b/chrome/browser/extensions/updater/extension_updater.h index d09c9a2..89a5e10 100644 --- a/chrome/browser/extensions/updater/extension_updater.h +++ b/chrome/browser/extensions/updater/extension_updater.h
@@ -8,12 +8,12 @@ #include <list> #include <map> #include <memory> +#include <queue> #include <set> #include <string> #include "base/callback_forward.h" #include "base/compiler_specific.h" -#include "base/containers/stack.h" #include "base/files/file_path.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" @@ -284,7 +284,7 @@ bool crx_install_is_running_; // Fetched CRX files waiting to be installed. - std::stack<FetchedCRXFile> fetched_crx_files_; + std::queue<FetchedCRXFile> fetched_crx_files_; FetchedCRXFile current_crx_file_; ExtensionCache* extension_cache_;
diff --git a/chrome/browser/external_protocol/external_protocol_handler.cc b/chrome/browser/external_protocol/external_protocol_handler.cc index 1bf4b63..e7cbd88 100644 --- a/chrome/browser/external_protocol/external_protocol_handler.cc +++ b/chrome/browser/external_protocol/external_protocol_handler.cc
@@ -25,7 +25,7 @@ #include "url/gurl.h" #if !defined(OS_ANDROID) -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/sharing/click_to_call/click_to_call_utils.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -157,8 +157,8 @@ ShouldOfferClickToCall(web_contents->GetBrowserContext(), escaped_url)) { // Handle tel links by opening the Click to Call dialog. This will call back // into LaunchUrlWithoutSecurityCheck if the user selects a system handler. - ClickToCallSharingDialogController::ShowDialog(web_contents, escaped_url, - chrome_is_default_handler); + ClickToCallUiController::ShowDialog(web_contents, escaped_url, + chrome_is_default_handler); return; } #endif
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index e64d6723..31e5fe8 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -393,6 +393,11 @@ "owners": [ "dullweber" ], "expiry_milestone": 78 }, + { + "name": "click-to-call-context-menu-selected-text", + "owners": [ "//chrome/browser/sharing/OWNERS" ], + "expiry_milestone": 80 + }, { "name": "click-to-call-receiver", "owners": [ "//chrome/browser/sharing/OWNERS" ], @@ -2006,6 +2011,11 @@ "expiry_milestone": 79 }, { + "name": "files-ng", + "owners": [ "adanilo", "noel" ], + "expiry_milestone": 82 + }, + { "name": "fill-on-account-select", "owners": [ "jdoerrie" ], "expiry_milestone": 80
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 1b38b1a5..8c69f3dc 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -3297,6 +3297,10 @@ const char kFileManagerTouchModeDescription[] = "Touchscreen-specific interactions of the Files app."; +const char kFilesNGName[] = "Enable Files App. NG."; +const char kFilesNGDescription[] = + "Enable the next generation UI style of the file manager."; + const char kFirstRunUiTransitionsName[] = "Animated transitions in the first-run tutorial"; const char kFirstRunUiTransitionsDescription[] = @@ -3531,6 +3535,12 @@ "If enabled, Chrome will animate a pill with identity information around " "the avatar button on start-up and on sign-in."; +const char kClickToCallContextMenuForSelectedTextName[] = + "Enable click to call feature on desktop when a phone number is selected"; +const char kClickToCallContextMenuForSelectedTextDescription[] = + "Enables click to call feature to be shown in context menu when the user " + "right clicks after selecting a phone number."; + const char kClickToCallUIName[] = "Enable click to call feature signals to be handled on desktop"; const char kClickToCallUIDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index d085dee..d14738bb 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1973,6 +1973,9 @@ extern const char kFileManagerTouchModeName[]; extern const char kFileManagerTouchModeDescription[]; +extern const char kFilesNGName[]; +extern const char kFilesNGDescription[]; + extern const char kFirstRunUiTransitionsName[]; extern const char kFirstRunUiTransitionsDescription[]; @@ -2128,6 +2131,9 @@ extern const char kAnimatedAvatarButtonName[]; extern const char kAnimatedAvatarButtonDescription[]; +extern const char kClickToCallContextMenuForSelectedTextName[]; +extern const char kClickToCallContextMenuForSelectedTextDescription[]; + extern const char kClickToCallUIName[]; extern const char kClickToCallUIDescription[];
diff --git a/chrome/browser/heavy_ad_intervention/OWNERS b/chrome/browser/heavy_ad_intervention/OWNERS new file mode 100644 index 0000000..f7aa57d --- /dev/null +++ b/chrome/browser/heavy_ad_intervention/OWNERS
@@ -0,0 +1,4 @@ +johnidel@chromium.org +csharrison@chromium.org + +# COMPONENT: UI>Browser>AdFilter
diff --git a/chrome/browser/heavy_ad_intervention/heavy_ad_helper.cc b/chrome/browser/heavy_ad_intervention/heavy_ad_helper.cc new file mode 100644 index 0000000..61c0376 --- /dev/null +++ b/chrome/browser/heavy_ad_intervention/heavy_ad_helper.cc
@@ -0,0 +1,64 @@ +// Copyright 2019 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/heavy_ad_intervention/heavy_ad_helper.h" + +#include "base/logging.h" +#include "base/strings/string_piece.h" +#include "chrome/browser/browser_process.h" +#include "chrome/grit/generated_resources.h" +#include "components/grit/components_resources.h" +#include "components/security_interstitials/core/common_string_util.h" +#include "third_party/zlib/google/compression_utils.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/base/resource/resource_bundle.h" +#include "ui/base/webui/jstemplate_builder.h" +#include "ui/base/webui/web_ui_util.h" + +namespace heavy_ads { + +std::string PrepareHeavyAdPage() { + int resource_id = IDR_SECURITY_INTERSTITIAL_QUIET_HTML; + std::string uncompressed; + base::StringPiece template_html( + ui::ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id)); + if (ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id)) { + bool success = compression::GzipUncompress(template_html, &uncompressed); + DCHECK(success); + template_html = base::StringPiece(uncompressed); + } + DCHECK(!template_html.empty()) << "unable to load template."; + + // Populate load time data. + base::DictionaryValue load_time_data; + load_time_data.SetString("type", "HEAVYAD"); + load_time_data.SetString( + "heading", l10n_util::GetStringUTF16(IDS_HEAVY_AD_INTERVENTION_HEADING)); + load_time_data.SetString( + "openDetails", + l10n_util::GetStringUTF16(IDS_HEAVY_AD_INTERVENTION_BUTTON_DETAILS)); + load_time_data.SetString( + "explanationParagraph", + l10n_util::GetStringUTF16(IDS_HEAVY_AD_INTERVENTION_SUMMARY)); + + // Ad frames are never the main frame, so we do not need a tab title. + load_time_data.SetString("tabTitle", ""); + load_time_data.SetBoolean("overridable", false); + load_time_data.SetBoolean("is_giant", false); + + security_interstitials::common_string_util::PopulateDarkModeDisplaySetting( + &load_time_data); + + webui::SetLoadTimeDataDefaults(g_browser_process->GetApplicationLocale(), + &load_time_data); + + // "body" is the id of the template's root node. + std::string heavy_ad_html = + webui::GetTemplatesHtml(template_html, &load_time_data, "body"); + webui::AppendWebUiCssTextDefaults(&heavy_ad_html); + + return heavy_ad_html; +} + +} // namespace heavy_ads
diff --git a/chrome/browser/heavy_ad_intervention/heavy_ad_helper.h b/chrome/browser/heavy_ad_intervention/heavy_ad_helper.h new file mode 100644 index 0000000..24458bcb --- /dev/null +++ b/chrome/browser/heavy_ad_intervention/heavy_ad_helper.h
@@ -0,0 +1,18 @@ +// Copyright 2019 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. + +#ifndef CHROME_BROWSER_HEAVY_AD_INTERVENTION_HEAVY_AD_HELPER_H_ +#define CHROME_BROWSER_HEAVY_AD_INTERVENTION_HEAVY_AD_HELPER_H_ + +#include <string> + +namespace heavy_ads { + +// Returns a string containing HTML of an error page for the heavy ad +// intervention. +std::string PrepareHeavyAdPage(); + +} // namespace heavy_ads + +#endif // CHROME_BROWSER_HEAVY_AD_INTERVENTION_HEAVY_AD_HELPER_H_
diff --git a/chrome/browser/heavy_ad_intervention/heavy_ad_helper_browsertest.cc b/chrome/browser/heavy_ad_intervention/heavy_ad_helper_browsertest.cc new file mode 100644 index 0000000..d4ec4719 --- /dev/null +++ b/chrome/browser/heavy_ad_intervention/heavy_ad_helper_browsertest.cc
@@ -0,0 +1,95 @@ +// Copyright 2019 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/heavy_ad_intervention/heavy_ad_helper.h" + +#include "chrome/browser/ui/browser.h" +#include "chrome/grit/generated_resources.h" +#include "chrome/test/base/in_process_browser_test.h" +#include "chrome/test/base/ui_test_utils.h" +#include "content/public/browser/navigation_controller.h" +#include "content/public/browser/render_frame_host.h" +#include "content/public/browser/web_contents.h" +#include "content/public/test/browser_test.h" +#include "content/public/test/browser_test_utils.h" +#include "content/public/test/test_navigation_observer.h" +#include "net/dns/mock_host_resolver.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/l10n/l10n_util.h" +#include "url/gurl.h" + +namespace { + +bool IsContentInDocument(content::RenderFrameHost* rfh, std::string content) { + std::string script = + "document.documentElement.innerHTML.includes('" + content + "');"; + return EvalJs(rfh, script).ExtractBool(); +} + +} // namespace + +class HeavyAdHelperBrowserTest : public InProcessBrowserTest { + public: + HeavyAdHelperBrowserTest() {} + ~HeavyAdHelperBrowserTest() override {} + + void SetUpOnMainThread() override { + host_resolver()->AddRule("*", "127.0.0.1"); + content::SetupCrossSiteRedirector(embedded_test_server()); + ASSERT_TRUE(embedded_test_server()->Start()); + } +}; + +// Verifies that there are no JS errors or missing load time data in the error +// page for heavy ads. +IN_PROC_BROWSER_TEST_F(HeavyAdHelperBrowserTest, + HeavyAdErrorPage_NoConsoleMessages) { + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + content::NavigationController& controller = web_contents->GetController(); + + GURL url(embedded_test_server()->GetURL("/iframe.html")); + EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), url)); + + content::RenderFrameHost* child = + ChildFrameAt(web_contents->GetMainFrame(), 0); + + content::ConsoleObserverDelegate console_delegate(web_contents, "*"); + web_contents->SetDelegate(&console_delegate); + + content::TestNavigationObserver error_observer(web_contents); + controller.LoadErrorPage(child, url, heavy_ads::PrepareHeavyAdPage(), + net::ERR_BLOCKED_BY_CLIENT); + error_observer.Wait(); + + EXPECT_TRUE(console_delegate.messages().empty()); +} + +// Checks that the heavy ad strings are in the html content of the rendered +// error page. +IN_PROC_BROWSER_TEST_F(HeavyAdHelperBrowserTest, + HeavyAdErrorPage_HeavyAdStringsUsed) { + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + content::NavigationController& controller = web_contents->GetController(); + + GURL url(embedded_test_server()->GetURL("/iframe.html")); + EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), url)); + + content::RenderFrameHost* child = + ChildFrameAt(web_contents->GetMainFrame(), 0); + + content::TestNavigationObserver error_observer(web_contents); + controller.LoadErrorPage(child, url, heavy_ads::PrepareHeavyAdPage(), + net::ERR_BLOCKED_BY_CLIENT); + error_observer.Wait(); + + EXPECT_TRUE(IsContentInDocument( + child, + l10n_util::GetStringUTF8(IDS_HEAVY_AD_INTERVENTION_BUTTON_DETAILS))); + EXPECT_TRUE(IsContentInDocument( + child, l10n_util::GetStringUTF8(IDS_HEAVY_AD_INTERVENTION_HEADING))); + EXPECT_TRUE(IsContentInDocument( + child, l10n_util::GetStringUTF8(IDS_HEAVY_AD_INTERVENTION_SUMMARY))); +}
diff --git a/chrome/browser/history/top_sites_factory.cc b/chrome/browser/history/top_sites_factory.cc index c0545fa..79104306 100644 --- a/chrome/browser/history/top_sites_factory.cc +++ b/chrome/browser/history/top_sites_factory.cc
@@ -60,7 +60,7 @@ { IDS_NTP_DEFAULT_SEARCH_URL, IDS_NTP_DEFAULT_SEARCH_TITLE, - IDS_ONBOARDING_WELCOME_SEARCH, + IDS_WELCOME_SEARCH, SkColorSetRGB(63, 132, 197), }, #endif
diff --git a/chrome/browser/importer/external_process_importer_client.cc b/chrome/browser/importer/external_process_importer_client.cc index d6f6de3..b39cff21 100644 --- a/chrome/browser/importer/external_process_importer_client.cc +++ b/chrome/browser/importer/external_process_importer_client.cc
@@ -15,8 +15,7 @@ #include "chrome/common/importer/imported_bookmark_entry.h" #include "chrome/grit/generated_resources.h" #include "components/strings/grit/components_strings.h" -#include "content/public/browser/system_connector.h" -#include "services/service_manager/public/cpp/connector.h" +#include "content/public/browser/service_process_host.h" #include "ui/base/l10n/l10n_util.h" ExternalProcessImporterClient::ExternalProcessImporterClient( @@ -31,18 +30,20 @@ source_profile_(source_profile), items_(items), bridge_(bridge), - cancelled_(false), - binding_(this) { + cancelled_(false) { process_importer_host_->NotifyImportStarted(); } void ExternalProcessImporterClient::Start() { AddRef(); // balanced in Cleanup. - content::GetSystemConnector()->BindInterface( - chrome::mojom::kProfileImportServiceName, &profile_import_); - - profile_import_.set_connection_error_handler( + content::ServiceProcessHost::Launch( + profile_import_.BindNewPipeAndPassReceiver(), + content::ServiceProcessHost::Options() + .WithDisplayName(IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME) + .WithSandboxType(service_manager::SANDBOX_TYPE_NO_SANDBOX) + .Pass()); + profile_import_.set_disconnect_handler( base::BindOnce(&ExternalProcessImporterClient::OnProcessCrashed, this)); // Dictionary of all localized strings that could be needed by the importer @@ -71,7 +72,7 @@ // If the utility process hasn't started yet the message will queue until it // does. chrome::mojom::ProfileImportObserverPtr observer; - binding_.Bind(mojo::MakeRequest(&observer)); + receiver_.Bind(mojo::MakeRequest(&observer)); profile_import_->StartImport(source_profile_, items_, localized_strings, std::move(observer)); } @@ -264,5 +265,5 @@ void ExternalProcessImporterClient::CloseMojoHandles() { profile_import_.reset(); - binding_.Close(); + receiver_.reset(); }
diff --git a/chrome/browser/importer/external_process_importer_client.h b/chrome/browser/importer/external_process_importer_client.h index 9451b091..8e4f4766 100644 --- a/chrome/browser/importer/external_process_importer_client.h +++ b/chrome/browser/importer/external_process_importer_client.h
@@ -23,7 +23,8 @@ #include "chrome/common/importer/profile_import.mojom.h" #include "components/favicon_base/favicon_usage_data.h" #include "components/history/core/browser/history_types.h" -#include "mojo/public/cpp/bindings/binding.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "mojo/public/cpp/bindings/remote.h" class ExternalProcessImporterHost; struct ImportedBookmarkEntry; @@ -146,10 +147,10 @@ bool cancelled_; // Used to start and stop the actual importer running in a different process. - chrome::mojom::ProfileImportPtr profile_import_; + mojo::Remote<chrome::mojom::ProfileImport> profile_import_; // Used to receive progress updates from the importer. - mojo::Binding<chrome::mojom::ProfileImportObserver> binding_; + mojo::Receiver<chrome::mojom::ProfileImportObserver> receiver_{this}; DISALLOW_COPY_AND_ASSIGN(ExternalProcessImporterClient); };
diff --git a/chrome/browser/lookalikes/lookalike_url_navigation_throttle_browsertest.cc b/chrome/browser/lookalikes/lookalike_url_navigation_throttle_browsertest.cc index 3399477..27671c89 100644 --- a/chrome/browser/lookalikes/lookalike_url_navigation_throttle_browsertest.cc +++ b/chrome/browser/lookalikes/lookalike_url_navigation_throttle_browsertest.cc
@@ -576,8 +576,8 @@ TestInterstitialNotShown(browser(), GetURL("google.com.tw")); CheckNoUkm(); - // Matches bing.com but is a top domain itself. - TestInterstitialNotShown(browser(), GetURL("ning.com")); + // Matches academia.edu but is a top domain itself. + TestInterstitialNotShown(browser(), GetURL("academic.ru")); CheckNoUkm(); // Matches ask.com but is too short.
diff --git a/chrome/browser/lookalikes/safety_tips/reputation_service.cc b/chrome/browser/lookalikes/safety_tips/reputation_service.cc index 2338c11..8677365 100644 --- a/chrome/browser/lookalikes/safety_tips/reputation_service.cc +++ b/chrome/browser/lookalikes/safety_tips/reputation_service.cc
@@ -4,19 +4,26 @@ #include "chrome/browser/lookalikes/safety_tips/reputation_service.h" +#include <string> +#include <vector> + #include "base/macros.h" #include "base/memory/scoped_refptr.h" #include "base/memory/singleton.h" #include "chrome/browser/lookalikes/lookalike_url_service.h" +#include "chrome/browser/lookalikes/safety_tips/safety_tips_config.h" #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h" +#include "components/safe_browsing/db/v4_protocol_manager_util.h" namespace { +using chrome_browser_safety_tips::FlaggedPage; using lookalikes::DomainInfo; using lookalikes::LookalikeUrlService; +using safe_browsing::V4ProtocolManagerUtil; using safety_tips::ReputationService; // This factory helps construct and find the singleton ReputationService linked @@ -56,6 +63,50 @@ DISALLOW_COPY_AND_ASSIGN(ReputationServiceFactory); }; +// Given a URL, generates all possible variant URLs to check the blocklist for. +// This is conceptually almost identical to safe_browsing::UrlToFullHashes, but +// without the hashing step. +// +// Note: Blocking "a.b/c/" does NOT block http://a.b/c without the trailing /. +void UrlToPatterns(const GURL& url, std::vector<std::string>* patterns) { + std::string canon_host; + std::string canon_path; + std::string canon_query; + V4ProtocolManagerUtil::CanonicalizeUrl(url, &canon_host, &canon_path, + &canon_query); + + std::vector<std::string> hosts; + if (url.HostIsIPAddress()) { + hosts.push_back(url.host()); + } else { + V4ProtocolManagerUtil::GenerateHostVariantsToCheck(canon_host, &hosts); + } + + std::vector<std::string> paths; + V4ProtocolManagerUtil::GeneratePathVariantsToCheck(canon_path, canon_query, + &paths); + + for (const std::string& host : hosts) { + for (const std::string& path : paths) { + DCHECK(path.length() == 0 || path[0] == '/'); + patterns->push_back(host + path); + } + } +} + +safety_tips::SafetyTipType FlagTypeToSafetyTipType(FlaggedPage::FlagType type) { + switch (type) { + case FlaggedPage::FlagType::FlaggedPage_FlagType_UNKNOWN: + case FlaggedPage::FlagType::FlaggedPage_FlagType_YOUNG_DOMAIN: + NOTREACHED(); + break; + case FlaggedPage::FlagType::FlaggedPage_FlagType_BAD_REP: + return safety_tips::SafetyTipType::kBadReputation; + } + NOTREACHED(); + return safety_tips::SafetyTipType::kNone; +} + } // namespace namespace safety_tips { @@ -117,13 +168,42 @@ if (already_engaged != engaged_sites.end()) return; - // TODO(crbug/984070): 2. Server-side blocklist check - // TODO(crbug/984725): 3. Client-side heuristics or lookalike check + // 2. Server-side blocklist check. + SafetyTipType type = GetUrlBlockType(url); + if (type != SafetyTipType::kNone) { + std::move(callback).Run(type, IsIgnored(url), url); + return; + } - // TODO(crbug/981177): Update this logic. - // For now, activate the UI on all (low-engagement) sites since we don't have - // heuristics or blocklists yet. - std::move(callback).Run(SafetyTipType::kBadReputation, IsIgnored(url), url); + // TODO(crbug/984725): 3. Client-side heuristics or lookalike check. +} + +SafetyTipType GetUrlBlockType(const GURL& url) { + std::vector<std::string> patterns; + UrlToPatterns(url, &patterns); + + auto* proto = safety_tips::GetRemoteConfigProto(); + if (!proto) { + return SafetyTipType::kNone; + } + + auto flagged_pages = proto->flagged_page(); + for (const auto& pattern : patterns) { + FlaggedPage search_target; + search_target.set_pattern(pattern); + + auto lower = std::lower_bound( + flagged_pages.begin(), flagged_pages.end(), search_target, + [](const FlaggedPage& a, const FlaggedPage& b) -> bool { + return a.pattern() < b.pattern(); + }); + + if (lower != flagged_pages.end() && pattern == lower->pattern()) { + return FlagTypeToSafetyTipType(lower->type()); + } + } + + return SafetyTipType::kNone; } } // namespace safety_tips
diff --git a/chrome/browser/lookalikes/safety_tips/reputation_service.h b/chrome/browser/lookalikes/safety_tips/reputation_service.h index eb6ce02..d3500c3 100644 --- a/chrome/browser/lookalikes/safety_tips/reputation_service.h +++ b/chrome/browser/lookalikes/safety_tips/reputation_service.h
@@ -67,6 +67,10 @@ DISALLOW_COPY_AND_ASSIGN(ReputationService); }; +// Checks SafeBrowsing-style permutations of |url| against the component updater +// blocklist and returns the match type. kNone means the URL is not blocked. +SafetyTipType GetUrlBlockType(const GURL& url); + } // namespace safety_tips #endif // CHROME_BROWSER_LOOKALIKES_SAFETY_TIPS_REPUTATION_SERVICE_H_
diff --git a/chrome/browser/lookalikes/safety_tips/reputation_service_unittest.cc b/chrome/browser/lookalikes/safety_tips/reputation_service_unittest.cc new file mode 100644 index 0000000..b9d4e172 --- /dev/null +++ b/chrome/browser/lookalikes/safety_tips/reputation_service_unittest.cc
@@ -0,0 +1,110 @@ +// Copyright 2019 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/lookalikes/safety_tips/reputation_service.h" + +#include <algorithm> +#include <string> +#include <utility> +#include <vector> + +#include "chrome/browser/lookalikes/safety_tips/safety_tips.pb.h" +#include "chrome/browser/lookalikes/safety_tips/safety_tips_config.h" +#include "chrome/test/base/chrome_render_view_host_test_harness.h" +#include "testing/gtest/include/gtest/gtest.h" + +using chrome_browser_safety_tips::FlaggedPage; +using chrome_browser_safety_tips::SafetyTipsConfig; +using FlagType = FlaggedPage::FlagType; +using safety_tips::GetUrlBlockType; +using safety_tips::SafetyTipType; + +namespace { + +void BlockPatterns(std::vector<std::pair<std::string, FlagType>> patterns) { + auto config_proto = std::make_unique<SafetyTipsConfig>(); + config_proto->set_version_id(2); + + std::sort(patterns.begin(), patterns.end()); + for (auto pair : patterns) { + FlaggedPage* page = config_proto->add_flagged_page(); + page->set_pattern(pair.first); + page->set_type(pair.second); + } + + safety_tips::SetRemoteConfigProto(std::move(config_proto)); +} + +} // namespace + +class ReputationServiceTest : public ChromeRenderViewHostTestHarness { + protected: + ReputationServiceTest() {} + ~ReputationServiceTest() override {} + + private: + DISALLOW_COPY_AND_ASSIGN(ReputationServiceTest); +}; + +// Test that the blocklist blocks patterns as expected. +TEST_F(ReputationServiceTest, BlocklistTest) { + auto config_proto = std::make_unique<SafetyTipsConfig>(); + config_proto->set_version_id(2); + + BlockPatterns({{"domain.test/", FlaggedPage::BAD_REP}, + {"directory.test/foo/", FlaggedPage::BAD_REP}, + {"path.test/foo/bar.html", FlaggedPage::BAD_REP}, + {"query.test/foo/bar.html?baz=test", FlaggedPage::BAD_REP}, + {"sub.subdomain.test/", FlaggedPage::BAD_REP}}); + + const std::vector<std::pair<std::string, safety_tips::SafetyTipType>> kTests = + { + {"http://unblocked.test", SafetyTipType::kNone}, + {"http://unblocked.test/foo", SafetyTipType::kNone}, + {"http://unblocked.test/foo.html?bar=baz", SafetyTipType::kNone}, + + {"http://sub.domain.test", SafetyTipType::kBadReputation}, + {"http://domain.test", SafetyTipType::kBadReputation}, + {"http://domain.test/foo", SafetyTipType::kBadReputation}, + {"http://domain.test/foo/bar", SafetyTipType::kBadReputation}, + {"http://domain.test/foo.html?bar=baz", + SafetyTipType::kBadReputation}, + + {"http://directory.test", SafetyTipType::kNone}, + {"http://directory.test/bar", SafetyTipType::kNone}, + {"http://directory.test/bar/foo.html", SafetyTipType::kNone}, + {"http://directory.test/foo", SafetyTipType::kNone}, + {"http://directory.test/foo/bar/", SafetyTipType::kBadReputation}, + {"http://directory.test/foo/bar.html?bar=baz", + SafetyTipType::kBadReputation}, + + {"http://path.test", SafetyTipType::kNone}, + {"http://path.test/foo", SafetyTipType::kNone}, + {"http://path.test/foo/bar/", SafetyTipType::kNone}, + {"http://path.test/foo/bar.htm", SafetyTipType::kNone}, + {"http://path.test/foo/bar.html", SafetyTipType::kBadReputation}, + {"http://path.test/foo/bar.html?bar=baz", + SafetyTipType::kBadReputation}, + {"http://path.test/bar/foo.html", SafetyTipType::kNone}, + + {"http://query.test", SafetyTipType::kNone}, + {"http://query.test/foo", SafetyTipType::kNone}, + {"http://query.test/foo/bar/", SafetyTipType::kNone}, + {"http://query.test/foo/bar.html", SafetyTipType::kNone}, + {"http://query.test/foo/bar.html?baz=test", + SafetyTipType::kBadReputation}, + {"http://query.test/foo/bar.html?baz=test&a=1", SafetyTipType::kNone}, + {"http://query.test/foo/bar.html?baz=no", SafetyTipType::kNone}, + + {"http://subdomain.test", SafetyTipType::kNone}, + {"http://sub.subdomain.test", SafetyTipType::kBadReputation}, + {"http://sub.subdomain.test/foo/bar", SafetyTipType::kBadReputation}, + {"http://sub.subdomain.test/foo.html?bar=baz", + SafetyTipType::kBadReputation}, + }; + + for (auto test : kTests) { + EXPECT_EQ(GetUrlBlockType(GURL(test.first)), test.second); + } +}
diff --git a/chrome/browser/lookalikes/safety_tips/safety_tips_config.cc b/chrome/browser/lookalikes/safety_tips/safety_tips_config.cc index d673226..3ef71c6 100644 --- a/chrome/browser/lookalikes/safety_tips/safety_tips_config.cc +++ b/chrome/browser/lookalikes/safety_tips/safety_tips_config.cc
@@ -15,6 +15,10 @@ proto_ = std::move(proto); } + chrome_browser_safety_tips::SafetyTipsConfig* GetProto() const { + return proto_.get(); + } + static SafetyTipsConfigSingleton& GetInstance() { static base::NoDestructor<SafetyTipsConfigSingleton> instance; return *instance; @@ -29,9 +33,14 @@ namespace safety_tips { // static -void SetProto( +void SetRemoteConfigProto( std::unique_ptr<chrome_browser_safety_tips::SafetyTipsConfig> proto) { SafetyTipsConfigSingleton::GetInstance().SetProto(std::move(proto)); } +// static +const chrome_browser_safety_tips::SafetyTipsConfig* GetRemoteConfigProto() { + return SafetyTipsConfigSingleton::GetInstance().GetProto(); +} + } // namespace safety_tips
diff --git a/chrome/browser/lookalikes/safety_tips/safety_tips_config.h b/chrome/browser/lookalikes/safety_tips/safety_tips_config.h index f084d2f..b152ec56 100644 --- a/chrome/browser/lookalikes/safety_tips/safety_tips_config.h +++ b/chrome/browser/lookalikes/safety_tips/safety_tips_config.h
@@ -14,9 +14,14 @@ // Sets the global configuration for Safety Tips retrieved from the component // updater. The configuration proto contains the list of URLs that can trigger // a safety tip. -void SetProto( +void SetRemoteConfigProto( std::unique_ptr<chrome_browser_safety_tips::SafetyTipsConfig> proto); +// Gets the global configuration for Safety Tips as retrieved from the component +// updater. The configuration proto contains the list of URLs that can trigger +// a safety tip. +const chrome_browser_safety_tips::SafetyTipsConfig* GetRemoteConfigProto(); + } // namespace safety_tips #endif // CHROME_BROWSER_LOOKALIKES_SAFETY_TIPS_SAFETY_TIPS_CONFIG_H_
diff --git a/chrome/browser/media/cast_mirroring_service_host.cc b/chrome/browser/media/cast_mirroring_service_host.cc index d3033e7..899c8d3b 100644 --- a/chrome/browser/media/cast_mirroring_service_host.cc +++ b/chrome/browser/media/cast_mirroring_service_host.cc
@@ -53,8 +53,8 @@ media::mojom::VideoCaptureHostRequest request) { DCHECK_CURRENTLY_ON(BrowserThread::IO); scoped_refptr<base::SingleThreadTaskRunner> device_task_runner = - base::CreateSingleThreadTaskRunnerWithTraits( - {base::TaskPriority::USER_BLOCKING, + base::CreateSingleThreadTaskRunner( + {base::ThreadPool(), base::TaskPriority::USER_BLOCKING, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}, base::SingleThreadTaskRunnerThreadMode::DEDICATED); mojo::MakeStrongBinding( @@ -240,7 +240,7 @@ void CastMirroringServiceHost::GetVideoCaptureHost( media::mojom::VideoCaptureHostRequest request) { - base::PostTaskWithTraits( + base::PostTask( FROM_HERE, {BrowserThread::IO}, base::BindOnce(&CreateVideoCaptureHostOnIO, source_media_id_.ToString(), ConvertVideoStreamType(source_media_id_.type),
diff --git a/chrome/browser/media/cast_transport_host_filter.cc b/chrome/browser/media/cast_transport_host_filter.cc index 84b92df..56463657 100644 --- a/chrome/browser/media/cast_transport_host_filter.cc +++ b/chrome/browser/media/cast_transport_host_filter.cc
@@ -403,7 +403,7 @@ service_manager::mojom::ConnectorRequest connector_request; auto connector = service_manager::Connector::Create(&connector_request); - base::PostTaskWithTraits( + base::PostTask( FROM_HERE, {content::BrowserThread::UI}, base::BindOnce(&CastBindConnectorRequest, std::move(connector_request)));
diff --git a/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc b/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc index 0b1c6f389..3c051d2 100644 --- a/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc +++ b/chrome/browser/media/router/discovery/dial/dial_media_sink_service.cc
@@ -50,8 +50,7 @@ // Note: The SequencedTaskRunner needs to be IO thread because DialRegistry // runs on IO thread. scoped_refptr<base::SequencedTaskRunner> task_runner = - base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::IO}); + base::CreateSingleThreadTaskRunner({content::BrowserThread::IO}); return std::unique_ptr<DialMediaSinkServiceImpl, base::OnTaskRunnerDeleter>( new DialMediaSinkServiceImpl(connector, sink_discovery_cb, task_runner), base::OnTaskRunnerDeleter(task_runner));
diff --git a/chrome/browser/media/router/discovery/dial/dial_registry.cc b/chrome/browser/media/router/discovery/dial/dial_registry.cc index f71e64e0..32b89c4 100644 --- a/chrome/browser/media/router/discovery/dial/dial_registry.cc +++ b/chrome/browser/media/router/discovery/dial/dial_registry.cc
@@ -50,7 +50,7 @@ clock_(base::DefaultClock::GetInstance()) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_GT(max_devices_, 0U); - base::PostTaskWithTraitsAndReplyWithResult( + base::PostTaskAndReplyWithResult( FROM_HERE, {BrowserThread::UI}, base::BindOnce(&content::GetNetworkConnectionTracker), base::BindOnce(&DialRegistry::SetNetworkConnectionTracker,
diff --git a/chrome/browser/media/router/discovery/dial/dial_service.cc b/chrome/browser/media/router/discovery/dial/dial_service.cc index 8693149..832370f 100644 --- a/chrome/browser/media/router/discovery/dial/dial_service.cc +++ b/chrome/browser/media/router/discovery/dial/dial_service.cc
@@ -62,9 +62,9 @@ base::WeakPtr<DialServiceImpl> impl, const base::Optional<net::NetworkInterfaceList>& networks) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO}, - base::BindOnce(&DialServiceImpl::SendNetworkList, - std::move(impl), networks)); + base::PostTask(FROM_HERE, {BrowserThread::IO}, + base::BindOnce(&DialServiceImpl::SendNetworkList, + std::move(impl), networks)); } #endif // !defined(OS_CHROMEOS) @@ -461,8 +461,7 @@ return; } - auto task_runner = - base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}); + auto task_runner = base::CreateSingleThreadTaskRunner({BrowserThread::UI}); #if defined(OS_CHROMEOS) task_tracker_.PostTaskAndReplyWithResult(
diff --git a/chrome/browser/media/router/discovery/dial/dial_url_fetcher.cc b/chrome/browser/media/router/discovery/dial/dial_url_fetcher.cc index 5fd8afa..0061dbbf 100644 --- a/chrome/browser/media/router/discovery/dial/dial_url_fetcher.cc +++ b/chrome/browser/media/router/discovery/dial/dial_url_fetcher.cc
@@ -168,10 +168,9 @@ // this conditional. auto mojo_request = mojo::MakeRequest(&loader_factory); if (content::BrowserThread::IsThreadInitialized(content::BrowserThread::UI)) { - base::PostTaskWithTraits( - FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&BindURLLoaderFactoryRequestOnUIThread, - std::move(mojo_request))); + base::PostTask(FROM_HERE, {content::BrowserThread::UI}, + base::BindOnce(&BindURLLoaderFactoryRequestOnUIThread, + std::move(mojo_request))); } loader_->DownloadToString(
diff --git a/chrome/browser/media/router/discovery/discovery_network_monitor.cc b/chrome/browser/media/router/discovery/discovery_network_monitor.cc index 31e149c..7b00fc9 100644 --- a/chrome/browser/media/router/discovery/discovery_network_monitor.cc +++ b/chrome/browser/media/router/discovery/discovery_network_monitor.cc
@@ -96,8 +96,8 @@ : network_id_(kNetworkIdDisconnected), observers_(new base::ObserverListThreadSafe<Observer>( base::ObserverListPolicy::EXISTING_ONLY)), - task_runner_(base::CreateSequencedTaskRunnerWithTraits( - {base::MayBlock(), + task_runner_(base::CreateSequencedTaskRunner( + {base::ThreadPool(), base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN})), network_info_function_(strategy), metric_observer_(std::make_unique<DiscoveryNetworkMonitorMetricObserver>(
diff --git a/chrome/browser/media/router/issue_manager.cc b/chrome/browser/media/router/issue_manager.cc index e611977..6f9c51b7 100644 --- a/chrome/browser/media/router/issue_manager.cc +++ b/chrome/browser/media/router/issue_manager.cc
@@ -46,8 +46,8 @@ IssueManager::IssueManager() : top_issue_(nullptr), - task_runner_(base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})) {} + task_runner_( + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})) {} IssueManager::~IssueManager() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/chrome/browser/media/router/mojo/media_route_provider_util_win.cc b/chrome/browser/media/router/mojo/media_route_provider_util_win.cc index 01ec0e7..8fe1c62 100644 --- a/chrome/browser/media/router/mojo/media_route_provider_util_win.cc +++ b/chrome/browser/media/router/mojo/media_route_provider_util_win.cc
@@ -35,8 +35,9 @@ } // namespace void CanFirewallUseLocalPorts(base::OnceCallback<void(bool)> callback) { - auto task_runner = base::CreateCOMSTATaskRunnerWithTraits( - {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}); + auto task_runner = base::CreateCOMSTATaskRunner( + {base::ThreadPool(), base::MayBlock(), + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}); base::PostTaskAndReplyWithResult(task_runner.get(), FROM_HERE, base::BindOnce(&DoCanFirewallUseLocalPorts), std::move(callback));
diff --git a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc index 694a0eb7..a7a40ed 100644 --- a/chrome/browser/media/router/mojo/media_router_mojo_impl.cc +++ b/chrome/browser/media/router/mojo/media_router_mojo_impl.cc
@@ -736,7 +736,7 @@ // Return to the event loop before notifying of a cached route list because // MediaRoutesObserver is calling this method from its constructor, and that // must complete before invoking its virtual OnRoutesUpdated() method. - base::PostTaskWithTraits( + base::PostTask( FROM_HERE, {content::BrowserThread::UI}, base::BindOnce(&MediaRouterMojoImpl::NotifyOfExistingRoutesIfRegistered, weak_factory_.GetWeakPtr(), source_id, observer));
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc b/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc index 9b29e12..24019016 100644 --- a/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_activity_manager_unittest.cc
@@ -92,8 +92,8 @@ public CastActivityRecordFactoryForTest { public: CastActivityManagerTest() - : socket_service_(base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})), + : socket_service_( + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})), message_handler_(&socket_service_) { media_sink_service_.AddOrUpdateSink(sink_); socket_.set_id(kChannelId);
diff --git a/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc b/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc index d1a8be8..ad75b75 100644 --- a/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_activity_record_unittest.cc
@@ -179,8 +179,7 @@ MediaSinkInternal sink_ = CreateCastSink(kChannelId); service_manager::TestConnectorFactory connector_factory_; cast_channel::MockCastSocketService socket_service_{ - base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})}; + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})}; cast_channel::MockCastMessageHandler message_handler_{&socket_service_}; std::unique_ptr<DataDecoder> data_decoder_ = std::make_unique<DataDecoder>(connector_factory_.GetDefaultConnector());
diff --git a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc index bf93726..03ac6bf 100644 --- a/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_media_route_provider_unittest.cc
@@ -40,8 +40,8 @@ CastMediaRouteProviderTest() : data_decoder_service_(connector_factory_.RegisterInstance( data_decoder::mojom::kServiceName)), - socket_service_(base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})), + socket_service_( + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})), message_handler_(&socket_service_) {} ~CastMediaRouteProviderTest() override = default;
diff --git a/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc b/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc index ce612ab..17a3ed25 100644 --- a/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_session_client_unittest.cc
@@ -92,8 +92,7 @@ data_decoder::TestingJsonParser::ScopedFactoryOverride parser_override_; service_manager::TestConnectorFactory connector_factory_; cast_channel::MockCastSocketService socket_service_{ - base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})}; + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})}; cast_channel::MockCastMessageHandler message_handler_{&socket_service_}; DataDecoder decoder_{connector_factory_.GetDefaultConnector()}; url::Origin origin_;
diff --git a/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc b/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc index 600e591..d85bbee 100644 --- a/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc +++ b/chrome/browser/media/router/providers/cast/cast_session_tracker_unittest.cc
@@ -76,8 +76,8 @@ class CastSessionTrackerTest : public testing::Test { public: CastSessionTrackerTest() - : socket_service_(base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::UI})), + : socket_service_( + base::CreateSingleThreadTaskRunner({content::BrowserThread::UI})), message_handler_(&socket_service_), session_tracker_(&media_sink_service_, &message_handler_,
diff --git a/chrome/browser/net/profile_network_context_service.cc b/chrome/browser/net/profile_network_context_service.cc index d4150cd..10996586 100644 --- a/chrome/browser/net/profile_network_context_service.cc +++ b/chrome/browser/net/profile_network_context_service.cc
@@ -45,6 +45,7 @@ #include "content/public/common/url_constants.h" #include "mojo/public/cpp/bindings/associated_interface_ptr.h" #include "net/base/features.h" +#include "net/http/http_auth_preferences.h" #include "net/http/http_util.h" #include "services/network/public/cpp/cors/origin_access_list.h" #include "services/network/public/cpp/features.h" @@ -424,6 +425,28 @@ // Always enable the HTTP cache. network_context_params->http_cache_enabled = true; + + // Allow/disallow ambient authentication with default credentials based on the + // profile type. + // TODO(https://crbug.com/458508): Allow this behavior to be controllable by + // policy. + if (profile_->IsGuestSession()) { + network_context_params->allow_default_credentials = + base::FeatureList::IsEnabled( + features::kEnableAmbientAuthenticationInGuestSession) + ? net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS + : net::HttpAuthPreferences::DISALLOW_DEFAULT_CREDENTIALS; + } else if (profile_->IsIncognitoProfile()) { + network_context_params->allow_default_credentials = + base::FeatureList::IsEnabled( + features::kEnableAmbientAuthenticationInIncognito) + ? net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS + : net::HttpAuthPreferences::DISALLOW_DEFAULT_CREDENTIALS; + } else { + network_context_params->allow_default_credentials = + net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS; + } + network_context_params->cookie_manager_params = CreateCookieManagerParams(profile_, *cookie_settings_);
diff --git a/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer.cc index 3e4d83eb..5a22e52 100644 --- a/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer.cc +++ b/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer.cc
@@ -13,6 +13,7 @@ #include "base/logging.h" #include "base/strings/string_util.h" #include "base/time/default_tick_clock.h" +#include "chrome/browser/heavy_ad_intervention/heavy_ad_helper.h" #include "chrome/browser/page_load_metrics/metrics_web_contents_observer.h" #include "chrome/browser/page_load_metrics/page_load_metrics_util.h" #include "chrome/browser/page_load_metrics/resource_tracker.h" @@ -169,8 +170,10 @@ // Ensure that this RenderFrameHost is a subframe. DCHECK(render_frame_host->GetParent()); - // TODO(959849): Navigate the frame to an error page once error pages can be - // loaded from the browser process. + GetDelegate()->GetWebContents()->GetController().LoadErrorPage( + render_frame_host, render_frame_host->GetLastCommittedURL(), + heavy_ads::PrepareHeavyAdPage(), net::ERR_BLOCKED_BY_CLIENT); + ADS_HISTOGRAM("HeavyAds.InterventionType", UMA_HISTOGRAM_ENUMERATION, FrameData::FrameVisibility::kAnyVisibility, frame_data->heavy_ad_status());
diff --git a/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer_browsertest.cc index 58db92f4..af22e2984 100644 --- a/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer_browsertest.cc +++ b/chrome/browser/page_load_metrics/observers/ad_metrics/ads_page_load_metrics_observer_browsertest.cc
@@ -21,6 +21,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/subresource_filter/subresource_filter_browser_test_harness.h" #include "chrome/browser/ui/browser.h" +#include "chrome/common/chrome_features.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" #include "components/subresource_filter/content/browser/ruleset_service.h" @@ -34,6 +35,7 @@ #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_navigation_observer.h" #include "media/base/media_switches.h" +#include "net/base/net_errors.h" #include "net/dns/mock_host_resolver.h" #include "net/test/embedded_test_server/controllable_http_response.h" #include "net/test/embedded_test_server/embedded_test_server.h" @@ -66,6 +68,19 @@ const char kPeakWindowdPercentHistogramId[] = "PageLoad.Clients.Ads.Cpu.FullPage.PeakWindowedPercent"; +const char kHttpOkResponseHeader[] = + "HTTP/1.1 200 OK\r\n" + "Content-Type: text/html; charset=utf-8\r\n" + "\r\n"; + +void LoadLargeResource(net::test_server::ControllableHttpResponse* response, + int bytes) { + response->WaitForRequest(); + response->Send(kHttpOkResponseHeader); + response->Send(std::string(bytes, ' ')); + response->Done(); +} + } // namespace class AdsPageLoadMetricsObserverBrowserTest @@ -618,7 +633,8 @@ : public subresource_filter::SubresourceFilterBrowserTest { public: AdsPageLoadMetricsObserverResourceBrowserTest() { - scoped_feature_list_.InitAndEnableFeature(subresource_filter::kAdTagging); + scoped_feature_list_.InitWithFeatures( + {subresource_filter::kAdTagging, features::kHeavyAdIntervention}, {}); } ~AdsPageLoadMetricsObserverResourceBrowserTest() override {} @@ -721,10 +737,6 @@ ReceivedAdResourceMetrics) { base::HistogramTester histogram_tester; - const char kHttpResponseHeader[] = - "HTTP/1.1 200 OK\r\n" - "Content-Type: text/html; charset=utf-8\r\n" - "\r\n"; auto main_html_response = std::make_unique<net::test_server::ControllableHttpResponse>( embedded_test_server(), "/mock_page.html", @@ -750,14 +762,14 @@ WindowOpenDisposition::CURRENT_TAB, ui::PAGE_TRANSITION_TYPED, false)); main_html_response->WaitForRequest(); - main_html_response->Send(kHttpResponseHeader); + main_html_response->Send(kHttpOkResponseHeader); main_html_response->Send( "<html><body></body><script src=\"ad_script.js\"></script></html>"); main_html_response->Send(std::string(1024, ' ')); main_html_response->Done(); ad_script_response->WaitForRequest(); - ad_script_response->Send(kHttpResponseHeader); + ad_script_response->Send(kHttpOkResponseHeader); ad_script_response->Send( "var iframe = document.createElement(\"iframe\");" "iframe.src =\"iframe.html\";" @@ -766,14 +778,14 @@ ad_script_response->Done(); iframe_response->WaitForRequest(); - iframe_response->Send(kHttpResponseHeader); + iframe_response->Send(kHttpOkResponseHeader); iframe_response->Send("<html><script src=\"vanilla_script.js\"></script>"); iframe_response->Send(std::string(2000, ' ')); iframe_response->Send("</html>"); iframe_response->Done(); vanilla_script_response->WaitForRequest(); - vanilla_script_response->Send(kHttpResponseHeader); + vanilla_script_response->Send(kHttpOkResponseHeader); vanilla_script_response->Send(std::string(1024, ' ')); waiter->AddMinimumNetworkBytesExpectation(5000); waiter->Wait(); @@ -807,10 +819,6 @@ "chrome/test/data/ads_observer"); content::SetupCrossSiteRedirector(embedded_test_server()); - const char kHttpResponseHeader[] = - "HTTP/1.1 200 OK\r\n" - "Content-Type: text/html; charset=utf-8\r\n" - "\r\n"; auto incomplete_resource_response = std::make_unique<net::test_server::ControllableHttpResponse>( embedded_test_server(), "/incomplete_resource.js", @@ -830,7 +838,7 @@ // Ad resource will not finish loading but should be reported to metrics. incomplete_resource_response->WaitForRequest(); - incomplete_resource_response->Send(kHttpResponseHeader); + incomplete_resource_response->Send(kHttpOkResponseHeader); incomplete_resource_response->Send(std::string(2048, ' ')); // Wait for the resource update to be received for the incomplete response. @@ -865,6 +873,100 @@ entries.front(), ukm::builders::AdFrameLoad::kLoading_CacheBytesName, 0); } +// Verifies that the frame is navigated to the intervention page when a +// heavy ad intervention triggers. +IN_PROC_BROWSER_TEST_F(AdsPageLoadMetricsObserverResourceBrowserTest, + HeavyAdInterventionEnabled_ErrorPageLoaded) { + base::HistogramTester histogram_tester; + SetRulesetWithRules( + {subresource_filter::testing::CreateSuffixRule("ad_iframe_writer.js")}); + embedded_test_server()->ServeFilesFromSourceDirectory( + "chrome/test/data/ads_observer"); + content::SetupCrossSiteRedirector(embedded_test_server()); + + auto incomplete_resource_response = + std::make_unique<net::test_server::ControllableHttpResponse>( + embedded_test_server(), "/incomplete_resource.js", + true /*relative_url_is_prefix*/); + ASSERT_TRUE(embedded_test_server()->Start()); + + // Create a navigation observer that will watch for the intervention to + // navigate the frame. + content::WebContents* web_contents = + browser()->tab_strip_model()->GetActiveWebContents(); + content::TestNavigationObserver same_tab_observer(web_contents, 2); + + auto waiter = CreateAdsPageLoadMetricsTestWaiter(); + + browser()->OpenURL(content::OpenURLParams( + embedded_test_server()->GetURL("/ad_with_incomplete_resource.html"), + content::Referrer(), WindowOpenDisposition::CURRENT_TAB, + ui::PAGE_TRANSITION_TYPED, false)); + + // Load a resource large enough to trigger the intervention. + LoadLargeResource(incomplete_resource_response.get(), + heavy_ad_thresholds::kMaxNetworkBytes); + + // Wait for the resource update to be received for the large resource. + waiter->AddMinimumNetworkBytesExpectation( + heavy_ad_thresholds::kMaxNetworkBytes); + waiter->Wait(); + + histogram_tester.ExpectUniqueSample( + "PageLoad.Clients.Ads.HeavyAds.InterventionType", + FrameData::HeavyAdStatus::kNetwork, 1); + + // Wait for the intervention page navigation to finish on the frame. + same_tab_observer.Wait(); + + // Check that the ad frame was navigated to the intervention page. + EXPECT_FALSE(same_tab_observer.last_navigation_succeeded()); + EXPECT_EQ(net::ERR_BLOCKED_BY_CLIENT, + same_tab_observer.last_net_error_code()); +} + +// Check that when the heavy ad feature is disabled we don't navigate +// the frame. +IN_PROC_BROWSER_TEST_F(AdsPageLoadMetricsObserverResourceBrowserTest, + HeavyAdInterventionDisabled_ErrorPageNotLoaded) { + base::test::ScopedFeatureList feature_list; + feature_list.InitAndDisableFeature(features::kHeavyAdIntervention); + base::HistogramTester histogram_tester; + SetRulesetWithRules( + {subresource_filter::testing::CreateSuffixRule("ad_iframe_writer.js")}); + embedded_test_server()->ServeFilesFromSourceDirectory( + "chrome/test/data/ads_observer"); + content::SetupCrossSiteRedirector(embedded_test_server()); + + auto incomplete_resource_response = + std::make_unique<net::test_server::ControllableHttpResponse>( + embedded_test_server(), "/incomplete_resource.js", + true /*relative_url_is_prefix*/); + ASSERT_TRUE(embedded_test_server()->Start()); + + auto waiter = CreateAdsPageLoadMetricsTestWaiter(); + + browser()->OpenURL(content::OpenURLParams( + embedded_test_server()->GetURL("/ad_with_incomplete_resource.html"), + content::Referrer(), WindowOpenDisposition::CURRENT_TAB, + ui::PAGE_TRANSITION_TYPED, false)); + + // Load a resource large enough to trigger the intervention. + LoadLargeResource(incomplete_resource_response.get(), + heavy_ad_thresholds::kMaxNetworkBytes); + + // Wait for the resource update to be received for the large resource. + waiter->AddMinimumNetworkBytesExpectation( + heavy_ad_thresholds::kMaxNetworkBytes); + waiter->Wait(); + + // We can't check whether the navigation didn't occur because the error page + // load is not synchronous. Instead check that we didn't log intervention UMA + // that is always recorded when the intervention occcurs. + histogram_tester.ExpectTotalCount( + "PageLoad.Clients.Ads.HeavyAds.InterventionType", 0); +} + // Verify that UKM metrics are recorded correctly. IN_PROC_BROWSER_TEST_F(AdsPageLoadMetricsObserverResourceBrowserTest, RecordedUKMMetrics) {
diff --git a/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc b/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc index fb1674a..fb2257d 100644 --- a/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc +++ b/chrome/browser/page_load_metrics/observers/use_counter/ukm_features.cc
@@ -117,6 +117,8 @@ WebFeature::kLazyLoadFrameLoadingAttributeEager, WebFeature::kLazyLoadImageLoadingAttributeLazy, WebFeature::kLazyLoadImageLoadingAttributeEager, + WebFeature::kRequestedFileSystemTemporary, + WebFeature::kRequestedFileSystemPersistent, })); return *opt_in_features; }
diff --git a/chrome/browser/policy/e2e_test/tests/homepage/get_home_button.py b/chrome/browser/policy/e2e_test/tests/homepage/get_home_button.py new file mode 100644 index 0000000..c34b2774 --- /dev/null +++ b/chrome/browser/policy/e2e_test/tests/homepage/get_home_button.py
@@ -0,0 +1,22 @@ +# Copyright (c) 2019 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. + +from pywinauto.application import Application +import test_util + +# Print 'home button exists' if the home button exists. + +driver = test_util.create_chrome_webdriver() + +try: + app = Application(backend="uia") + app.connect(title_re='.*Chrome|.*Chromium') + + home_button = app.top_window().child_window( + title="Home", control_type="Button") + if home_button.exists(timeout=1): + print 'home button exists' + +finally: + driver.quit()
diff --git a/chrome/browser/policy/e2e_test/tests/homepage/homepage.py b/chrome/browser/policy/e2e_test/tests/homepage/homepage.py index f538d2d..de0b63a2 100644 --- a/chrome/browser/policy/e2e_test/tests/homepage/homepage.py +++ b/chrome/browser/policy/e2e_test/tests/homepage/homepage.py
@@ -19,6 +19,7 @@ See: https://cloud.google.com/docs/chrome-enterprise/policies/?policy=HomepageLocation https://cloud.google.com/docs/chrome-enterprise/policies/?policy=HomepageIsNewTabPage + https://cloud.google.com/docs/chrome-enterprise/policies/?policy=ShowHomeButton """ @before_all @@ -33,6 +34,12 @@ m = re.search(r"homepage:([^ \r\n]+)", output) return m.group(1) + def _isHomeButtonShown(self, instance_name): + dir = os.path.dirname(os.path.abspath(__file__)) + output = self.RunUITest(instance_name, + os.path.join(dir, 'get_home_button.py')) + return 'home button exists' in output + @test def test_HomepageLocation(self): # Test the case where @@ -69,3 +76,19 @@ pass else: self.fail('homepage url is not new tab: %s' % homepage) + + @test + def test_ShowHomeButton(self): + # Test the case when ShowHomeButton is true + self.SetPolicy('win2012-dc', 'ShowHomeButton', 1, 'DWORD') + self.RunCommand('client2012', 'gpupdate /force') + + isHomeButtonShown = self._isHomeButtonShown('client2012') + self.assertTrue(isHomeButtonShown) + + # Test the case when ShowHomeButton is false + self.SetPolicy('win2012-dc', 'ShowHomeButton', 0, 'DWORD') + self.RunCommand('client2012', 'gpupdate /force') + + isHomeButtonShown = self._isHomeButtonShown('client2012') + self.assertFalse(isHomeButtonShown)
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index fcaa8a8..1f0b7a8 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -6702,8 +6702,7 @@ public testing::WithParamInterface<BooleanPolicy> { protected: PromotionalTabsEnabledPolicyTest() { - scoped_feature_list_.InitWithFeatures({welcome::kOnboardingForceEnabled}, - {}); + scoped_feature_list_.InitWithFeatures({welcome::kForceEnabled}, {}); } ~PromotionalTabsEnabledPolicyTest() = default;
diff --git a/chrome/browser/prefs/chrome_pref_model_associator_client.cc b/chrome/browser/prefs/chrome_pref_model_associator_client.cc index 09a1057..a628aa6a 100644 --- a/chrome/browser/prefs/chrome_pref_model_associator_client.cc +++ b/chrome/browser/prefs/chrome_pref_model_associator_client.cc
@@ -7,7 +7,6 @@ #include <cstdint> #include "base/memory/singleton.h" -#include "chrome/browser/sharing/sharing_sync_preference.h" #include "chrome/common/pref_names.h" #include "components/content_settings/core/browser/website_settings_info.h" #include "components/content_settings/core/browser/website_settings_registry.h" @@ -54,13 +53,5 @@ static_cast<int>(std::max(local_high_score, server_high_score))); } - if (pref_name == prefs::kSharingVapidKey) - return SharingSyncPreference::MaybeMergeVapidKey(local_value, server_value); - - if (pref_name == prefs::kSharingSyncedDevices) { - return SharingSyncPreference::MaybeMergeSyncedDevices(local_value, - server_value); - } - return nullptr; }
diff --git a/chrome/browser/printing/cloud_print/privet_traffic_detector.cc b/chrome/browser/printing/cloud_print/privet_traffic_detector.cc index f8abbf2..f9070df 100644 --- a/chrome/browser/printing/cloud_print/privet_traffic_detector.cc +++ b/chrome/browser/printing/cloud_print/privet_traffic_detector.cc
@@ -64,12 +64,12 @@ void CreateUDPSocketOnUIThread( content::BrowserContext* profile, network::mojom::UDPSocketRequest request, - network::mojom::UDPSocketReceiverPtr receiver_ptr) { + network::mojom::UDPSocketListenerPtr listener_ptr) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); network::mojom::NetworkContext* network_context = content::BrowserContext::GetDefaultStoragePartition(profile) ->GetNetworkContext(); - network_context->CreateUDPSocket(std::move(request), std::move(receiver_ptr)); + network_context->CreateUDPSocket(std::move(request), std::move(listener_ptr)); } } // namespace @@ -109,7 +109,7 @@ : profile_(profile), on_traffic_detected_(on_traffic_detected), restart_attempts_(kMaxRestartAttempts), - receiver_binding_(this) { + listener_binding_(this) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); } @@ -148,14 +148,14 @@ void PrivetTrafficDetector::Helper::Bind() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); - network::mojom::UDPSocketReceiverPtr receiver_ptr; - network::mojom::UDPSocketReceiverRequest receiver_request = - mojo::MakeRequest(&receiver_ptr); - receiver_binding_.Bind(std::move(receiver_request)); + network::mojom::UDPSocketListenerPtr listener_ptr; + network::mojom::UDPSocketListenerRequest listener_request = + mojo::MakeRequest(&listener_ptr); + listener_binding_.Bind(std::move(listener_request)); base::PostTask( FROM_HERE, {content::BrowserThread::UI}, base::BindOnce(&CreateUDPSocketOnUIThread, profile_, - mojo::MakeRequest(&socket_), std::move(receiver_ptr))); + mojo::MakeRequest(&socket_), std::move(listener_ptr))); network::mojom::UDPSocketOptionsPtr socket_options = network::mojom::UDPSocketOptions::New(); @@ -238,7 +238,7 @@ void PrivetTrafficDetector::Helper::ResetConnection() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); socket_.reset(); - receiver_binding_.Close(); + listener_binding_.Close(); } void PrivetTrafficDetector::Helper::OnReceived(
diff --git a/chrome/browser/printing/cloud_print/privet_traffic_detector.h b/chrome/browser/printing/cloud_print/privet_traffic_detector.h index f34c0e6..52df267 100644 --- a/chrome/browser/printing/cloud_print/privet_traffic_detector.h +++ b/chrome/browser/printing/cloud_print/privet_traffic_detector.h
@@ -43,13 +43,13 @@ private: // Constructed by PrivetTrafficDetector on the UI thread. but lives on the IO // thread and destroyed on the IO thread. - class Helper : public network::mojom::UDPSocketReceiver { + class Helper : public network::mojom::UDPSocketListener { public: Helper(content::BrowserContext* profile, base::RepeatingClosure on_traffic_detected); ~Helper() override; - // network::mojom::UDPSocketReceiver: + // network::mojom::UDPSocketListener: void OnReceived(int32_t result, const base::Optional<net::IPEndPoint>& src_addr, base::Optional<base::span<const uint8_t>> data) override; @@ -81,9 +81,9 @@ net::IPEndPoint recv_addr_; network::mojom::UDPSocketPtr socket_; - // Implementation of socket receiver callback. + // Implementation of socket listener callback. // Initialized on the UI thread, but only accessed on the IO thread. - mojo::Binding<network::mojom::UDPSocketReceiver> receiver_binding_; + mojo::Binding<network::mojom::UDPSocketListener> listener_binding_; base::WeakPtrFactory<Helper> weak_ptr_factory_{this};
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc index 4324f93..efb419d 100644 --- a/chrome/browser/printing/print_job.cc +++ b/chrome/browser/printing/print_job.cc
@@ -61,21 +61,21 @@ DCHECK(!document_); worker_ = query->DetachWorker(); worker_->SetPrintJob(this); - const PrintSettings& settings = query->settings(); - - auto new_doc = - base::MakeRefCounted<PrintedDocument>(settings, name, query->cookie()); - new_doc->set_page_count(page_count); - UpdatePrintedDocument(new_doc); + std::unique_ptr<PrintSettings> settings = query->ExtractSettings(); #if defined(OS_WIN) - pdf_page_mapping_ = PageRange::GetPages(settings.ranges()); + pdf_page_mapping_ = PageRange::GetPages(settings->ranges()); if (pdf_page_mapping_.empty()) { for (int i = 0; i < page_count; i++) pdf_page_mapping_.push_back(i); } #endif + auto new_doc = base::MakeRefCounted<PrintedDocument>(std::move(settings), + name, query->cookie()); + new_doc->set_page_count(page_count); + UpdatePrintedDocument(new_doc); + // Don't forget to register to our own messages. registrar_.Add(this, chrome::NOTIFICATION_PRINT_JOB_EVENT, content::Source<PrintJob>(this));
diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc index bd50607..71811d5de 100644 --- a/chrome/browser/printing/print_job_unittest.cc +++ b/chrome/browser/printing/print_job_unittest.cc
@@ -39,7 +39,7 @@ content::ChildProcessHost::kInvalidUniqueID) {} void GetSettingsDone(base::OnceClosure callback, - const PrintSettings& new_settings, + std::unique_ptr<PrintSettings> new_settings, PrintingContext::Result result) override { FAIL(); } @@ -57,16 +57,12 @@ auto worker = std::make_unique<TestPrintJobWorker>(); EXPECT_TRUE(worker->Start()); worker->printing_context()->UseDefaultSettings(); - settings_ = worker->printing_context()->settings(); + SetSettingsForTest(worker->printing_context()->TakeAndResetSettings()); return std::move(worker); } - const PrintSettings& settings() const override { return settings_; } - private: - PrintSettings settings_; - DISALLOW_COPY_AND_ASSIGN(TestQuery); };
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc index 72a0c8c..13f9d7a 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc
@@ -221,7 +221,7 @@ void PrintJobWorker::GetSettingsDone(SettingsCallback callback, PrintingContext::Result result) { - std::move(callback).Run(printing_context_->settings(), result); + std::move(callback).Run(printing_context_->TakeAndResetSettings(), result); } void PrintJobWorker::GetSettingsWithUI(int document_page_count,
diff --git a/chrome/browser/printing/print_job_worker.h b/chrome/browser/printing/print_job_worker.h index d5711196..4b3557e 100644 --- a/chrome/browser/printing/print_job_worker.h +++ b/chrome/browser/printing/print_job_worker.h
@@ -32,7 +32,8 @@ class PrintJobWorker { public: using SettingsCallback = - base::OnceCallback<void(const PrintSettings&, PrintingContext::Result)>; + base::OnceCallback<void(std::unique_ptr<PrintSettings>, + PrintingContext::Result)>; PrintJobWorker(int render_process_id, int render_frame_id); virtual ~PrintJobWorker();
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc index 3ea696ae..db7ee26 100644 --- a/chrome/browser/printing/printer_query.cc +++ b/chrome/browser/printing/printer_query.cc
@@ -37,13 +37,13 @@ } void PrinterQuery::GetSettingsDone(base::OnceClosure callback, - const PrintSettings& new_settings, + std::unique_ptr<PrintSettings> new_settings, PrintingContext::Result result) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); is_print_dialog_box_shown_ = false; last_status_ = result; if (result != PrintingContext::FAILED) { - settings_ = new_settings; + settings_ = std::move(new_settings); cookie_ = PrintSettings::NewCookie(); } else { // Failure. @@ -53,14 +53,15 @@ std::move(callback).Run(); } -void PrinterQuery::PostSettingsDoneToIO(base::OnceClosure callback, - const PrintSettings& new_settings, - PrintingContext::Result result) { +void PrinterQuery::PostSettingsDoneToIO( + base::OnceClosure callback, + std::unique_ptr<PrintSettings> new_settings, + PrintingContext::Result result) { // |this| is owned by |callback|, so |base::Unretained()| is safe. base::PostTask( FROM_HERE, {content::BrowserThread::IO}, base::BindOnce(&PrinterQuery::GetSettingsDone, base::Unretained(this), - std::move(callback), new_settings, result)); + std::move(callback), std::move(new_settings), result)); } std::unique_ptr<PrintJobWorker> PrinterQuery::DetachWorker() { @@ -71,7 +72,15 @@ } const PrintSettings& PrinterQuery::settings() const { - return settings_; + return *settings_; +} + +std::unique_ptr<PrintSettings> PrinterQuery::ExtractSettings() { + return std::move(settings_); +} + +void PrinterQuery::SetSettingsForTest(std::unique_ptr<PrintSettings> settings) { + settings_ = std::move(settings); } int PrinterQuery::cookie() const {
diff --git a/chrome/browser/printing/printer_query.h b/chrome/browser/printing/printer_query.h index 03047d9a..00cf15c8 100644 --- a/chrome/browser/printing/printer_query.h +++ b/chrome/browser/printing/printer_query.h
@@ -41,8 +41,9 @@ // TODO(thestig): Do |worker_| and |callback_| need locks? virtual std::unique_ptr<PrintJobWorker> DetachWorker(); - // Virtual so that tests can override. - virtual const PrintSettings& settings() const; + const PrintSettings& settings() const; + + std::unique_ptr<PrintSettings> ExtractSettings(); // Initializes the printing context. It is fine to call this function multiple // times to reinitialize the settings. |web_contents_observer| can be queried @@ -84,19 +85,21 @@ protected: // Virtual so that tests can override. virtual void GetSettingsDone(base::OnceClosure callback, - const PrintSettings& new_settings, + std::unique_ptr<PrintSettings> new_settings, PrintingContext::Result result); void PostSettingsDoneToIO(base::OnceClosure callback, - const PrintSettings& new_settings, + std::unique_ptr<PrintSettings> new_settings, PrintingContext::Result result); + void SetSettingsForTest(std::unique_ptr<PrintSettings> settings); + private: // Lazy create the worker thread. There is one worker thread per print job. void StartWorker(); // Cache of the print context settings for access in the UI thread. - PrintSettings settings_; + std::unique_ptr<PrintSettings> settings_; // Is the Print... dialog box currently shown. bool is_print_dialog_box_shown_ = false;
diff --git a/chrome/browser/printing/test_print_job.cc b/chrome/browser/printing/test_print_job.cc index 29bd1a4a..ccf0dc10 100644 --- a/chrome/browser/printing/test_print_job.cc +++ b/chrome/browser/printing/test_print_job.cc
@@ -24,7 +24,7 @@ std::unique_ptr<PrintJobWorker> worker = query->DetachWorker(); scoped_refptr<PrintedDocument> new_doc = - base::MakeRefCounted<PrintedDocument>(query->settings(), name, + base::MakeRefCounted<PrintedDocument>(query->ExtractSettings(), name, query->cookie()); new_doc->set_page_count(page_count);
diff --git a/chrome/browser/printing/test_printer_query.cc b/chrome/browser/printing/test_printer_query.cc index 8049255a..b1e6d24d 100644 --- a/chrome/browser/printing/test_printer_query.cc +++ b/chrome/browser/printing/test_printer_query.cc
@@ -52,27 +52,27 @@ #if defined(OS_WIN) DCHECK(printer_type_); #endif - PrintSettings settings; + auto settings = std::make_unique<PrintSettings>(); PrintingContext::Result result = - PrintSettingsFromJobSettings(new_settings, &settings) + PrintSettingsFromJobSettings(new_settings, settings.get()) ? PrintingContext::OK : PrintingContext::FAILED; float device_microns_per_device_unit = - static_cast<float>(kMicronsPerInch) / settings.device_units_per_inch(); + static_cast<float>(kMicronsPerInch) / settings->device_units_per_inch(); gfx::Size paper_size = - gfx::Size(settings.requested_media().size_microns.width() / + gfx::Size(settings->requested_media().size_microns.width() / device_microns_per_device_unit, - settings.requested_media().size_microns.height() / + settings->requested_media().size_microns.height() / device_microns_per_device_unit); gfx::Rect paper_rect(0, 0, paper_size.width(), paper_size.height()); paper_rect.Inset(offsets_->x(), offsets_->y()); - settings.SetPrinterPrintableArea(paper_size, paper_rect, true); + settings->SetPrinterPrintableArea(paper_size, paper_rect, true); #if defined(OS_WIN) - settings.set_printer_type(*printer_type_); + settings->set_printer_type(*printer_type_); #endif - GetSettingsDone(std::move(callback), settings, result); + GetSettingsDone(std::move(callback), std::move(settings), result); } #if defined(OS_WIN)
diff --git a/chrome/browser/profiles/DEPS b/chrome/browser/profiles/DEPS index f605fb5..4b9c873 100644 --- a/chrome/browser/profiles/DEPS +++ b/chrome/browser/profiles/DEPS
@@ -11,4 +11,10 @@ # Profile embeds the image_annotation service. "+services/image_annotation/image_annotation_service.h", ], + + "off_the_record_profile_impl.cc": [ + # Chrome OS guest profiles create an App Service to manage installed apps. + "+chrome/services/app_service/app_service.h", + "+chrome/services/app_service/public/mojom/constants.mojom.h", + ], }
diff --git a/chrome/browser/profiles/off_the_record_profile_impl.cc b/chrome/browser/profiles/off_the_record_profile_impl.cc index c11714c..39357bf 100644 --- a/chrome/browser/profiles/off_the_record_profile_impl.cc +++ b/chrome/browser/profiles/off_the_record_profile_impl.cc
@@ -81,6 +81,8 @@ #include "components/prefs/scoped_user_pref_update.h" #else // !defined(OS_ANDROID) #include "chrome/browser/ui/zoom/chrome_zoom_level_otr_delegate.h" +#include "chrome/services/app_service/app_service.h" +#include "chrome/services/app_service/public/mojom/constants.mojom.h" #include "components/zoom/zoom_event_manager.h" #include "content/public/browser/host_zoom_map.h" #endif // defined(OS_ANDROID) @@ -603,6 +605,18 @@ this, user_manager::UserManager::Get()->GetActiveUser()); } + std::unique_ptr<service_manager::Service> HandleServiceRequest( + const std::string& service_name, + service_manager::mojom::ServiceRequest request) override { + // Ensure apps are serviced in guest profiles. + if (service_name == apps::mojom::kServiceName) { + return std::make_unique<apps::AppService>(std::move(request)); + } + + return OffTheRecordProfileImpl::HandleServiceRequest(service_name, + std::move(request)); + } + private: // The guest user should be able to customize Chrome OS preferences. std::unique_ptr<chromeos::Preferences> chromeos_preferences_;
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index fa122d5..d173c2c 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -162,6 +162,7 @@ #include "chrome/browser/chromeos/android_sms/android_sms_app_manager.h" #include "chrome/browser/chromeos/android_sms/android_sms_pairing_state_tracker_impl.h" #include "chrome/browser/chromeos/android_sms/android_sms_service_factory.h" +#include "chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h" #include "chrome/browser/chromeos/arc/arc_service_launcher.h" #include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/cryptauth/client_app_metadata_provider_service.h" @@ -981,6 +982,7 @@ #if defined(OS_CHROMEOS) arc::ArcServiceLauncher::Get()->MaybeSetProfile(this); + arc::ArcAccessibilityHelperBridge::GetForBrowserContext(this); #endif FullBrowserTransitionManager::Get()->OnProfileCreated(this);
diff --git a/chrome/browser/resources/BUILD.gn b/chrome/browser/resources/BUILD.gn index 1423615..d8b6bb5 100644 --- a/chrome/browser/resources/BUILD.gn +++ b/chrome/browser/resources/BUILD.gn
@@ -224,15 +224,15 @@ } if (!is_android && !is_chromeos) { - grit("onboarding_welcome_resources") { - source = "welcome/onboarding_welcome_resources.grd" + grit("welcome_resources") { + source = "welcome/welcome_resources.grd" defines = chrome_grit_defines outputs = [ - "grit/onboarding_welcome_resources.h", - "grit/onboarding_welcome_resources_map.cc", - "grit/onboarding_welcome_resources_map.h", - "onboarding_welcome_resources.pak", + "grit/welcome_resources.h", + "grit/welcome_resources_map.cc", + "grit/welcome_resources_map.h", + "welcome_resources.pak", ] output_dir = "$root_gen_dir/chrome" }
diff --git a/chrome/browser/resources/chromeos/genius_app/OWNERS b/chrome/browser/resources/chromeos/genius_app/OWNERS index 3aa8a1c..052e6f78 100644 --- a/chrome/browser/resources/chromeos/genius_app/OWNERS +++ b/chrome/browser/resources/chromeos/genius_app/OWNERS
@@ -1,3 +1 @@ -cnwan@chromium.org -cylee@chromium.org -davidyu@chromium.org +carpenterr@chromium.org
diff --git a/chrome/browser/resources/chromeos/login/security_token_pin.js b/chrome/browser/resources/chromeos/login/security_token_pin.js index 765eb55..71ab0673 100644 --- a/chrome/browser/resources/chromeos/login/security_token_pin.js +++ b/chrome/browser/resources/chromeos/login/security_token_pin.js
@@ -53,6 +53,12 @@ * @private */ onNextClicked_: function() { + if (this.processingCompletion_) { + // Race condition: This could happen if Polymer hasn't yet updated the + // "disabled" state of the "Next" button before the user clicked on it for + // the second time. + return; + } this.processingCompletion_ = true; this.fire('completed', this.$.pinKeyboard.value); },
diff --git a/chrome/browser/resources/chromeos/set_time_dialog/set_time_browser_proxy.js b/chrome/browser/resources/chromeos/set_time_dialog/set_time_browser_proxy.js index b395f7e..ce25318 100644 --- a/chrome/browser/resources/chromeos/set_time_dialog/set_time_browser_proxy.js +++ b/chrome/browser/resources/chromeos/set_time_dialog/set_time_browser_proxy.js
@@ -18,8 +18,12 @@ /** Closes the dialog. */ dialogClose() {} - /** Notifies C++ code that done button was clicked */ - doneClicked() {} + /** + * Notifies C++ code that done button was clicked. + * @param {number} timeInSeconds Seconds since epoch representing the date + * on the dialog inputs. + */ + doneClicked(timeInSeconds) {} } /** @implements {settime.SetTimeBrowserProxy} */ @@ -45,8 +49,8 @@ } /** @override */ - doneClicked() { - chrome.send('doneClicked'); + doneClicked(timeInSeconds) { + chrome.send('doneClicked', [timeInSeconds]); } }
diff --git a/chrome/browser/resources/chromeos/set_time_dialog/set_time_dialog.js b/chrome/browser/resources/chromeos/set_time_dialog/set_time_dialog.js index 577c945..9d324f8 100644 --- a/chrome/browser/resources/chromeos/set_time_dialog/set_time_dialog.js +++ b/chrome/browser/resources/chromeos/set_time_dialog/set_time_dialog.js
@@ -216,6 +216,27 @@ }, /** + * @return {!number} Seconds since epoch representing the date on the dialog + * inputs. + * @private + */ + getInputTimeSinceEpoch_: function() { + const now = this.getInputTime_(); + + if (this.isTimezoneVisible_) { + // Add timezone offset to get real time. This is only necessary when the + // timezone was updated, which is only possible when the dropdown is + // visible. + const timezoneDelta = getTimezoneDelta( + /** @type {string} */ (loadTimeData.getValue('currentTimezoneId')), + this.selectedTimezone_); + now.setMilliseconds(now.getMilliseconds() + timezoneDelta); + } + + return Math.floor(now / 1000); + }, + + /** * Sets the current timezone. * @param {string} timezoneId The timezone ID to select. * @private @@ -265,20 +286,7 @@ * @private */ applyTime_: function() { - const now = this.getInputTime_(); - - if (this.isTimezoneVisible_) { - // Add timezone offset to get real time. This is only necessary when the - // timezone was updated, which is only possible when the dropdown is - // visible. - const timezoneDelta = getTimezoneDelta( - /** @type {string} */ (loadTimeData.getValue('currentTimezoneId')), - this.selectedTimezone_); - now.setMilliseconds(now.getMilliseconds() + timezoneDelta); - } - - const seconds = Math.floor(now / 1000); - this.browserProxy_.setTimeInSeconds(seconds); + this.browserProxy_.setTimeInSeconds(this.getInputTimeSinceEpoch_()); }, /** @@ -317,7 +325,7 @@ * @private */ onDoneClick_: function() { - this.browserProxy_.doneClicked(); + this.browserProxy_.doneClicked(this.getInputTimeSinceEpoch_()); }, /** @private */
diff --git a/chrome/browser/resources/chromeos/switch_access/BUILD.gn b/chrome/browser/resources/chromeos/switch_access/BUILD.gn index 623d6e3..92f326b 100644 --- a/chrome/browser/resources/chromeos/switch_access/BUILD.gn +++ b/chrome/browser/resources/chromeos/switch_access/BUILD.gn
@@ -204,6 +204,7 @@ ":menu_panel_interface", ":rect_helper", ":switch_access_constants", + ":switch_access_interface", ":switch_access_predicate", ":text_input_manager", ":text_navigation_manager",
diff --git a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js index c784654..ef4b22ce 100644 --- a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager.js
@@ -23,16 +23,25 @@ this.intervalID_; /** - * Length of auto-scan interval in milliseconds. + * Length of the default auto-scan interval (used wherever there is not + * a more specific scan time set) in milliseconds. * @private {number} */ - this.scanTime_ = SCAN_TIME_NOT_INITIALIZED; + this.defaultScanTime_ = SCAN_TIME_NOT_INITIALIZED; + + /** + * Length of auto-scan interval for the on-screen keyboard in milliseconds. + * @private {number} + */ + this.keyboardScanTime_ = SCAN_TIME_NOT_INITIALIZED; } /** Finishes setup of auto scan manager once Prefs are loaded. */ onPrefsReady() { - this.scanTime_ = this.switchAccess_.getNumberPreference( + this.defaultScanTime_ = this.switchAccess_.getNumberPreference( SAConstants.Preference.AUTO_SCAN_TIME); + this.keyboardScanTime_ = this.switchAccess_.getNumberPreference( + SAConstants.Preference.AUTO_SCAN_KEYBOARD_TIME); const enabled = this.switchAccess_.getBooleanPreference( SAConstants.Preference.AUTO_SCAN_ENABLED); if (enabled) this.start_(); @@ -70,17 +79,26 @@ } /** - * Update this.scanTime_ to |scanTime|. Then, if auto-scan is currently + * Update this.defaultScanTime_ to |scanTime|. Then, if auto-scan is currently * running, restart it. * * @param {number} scanTime Auto-scan interval time in milliseconds. */ - setScanTime(scanTime) { - this.scanTime_ = scanTime; + setDefaultScanTime(scanTime) { + this.defaultScanTime_ = scanTime; this.restartIfRunning(); } /** + * Update this.keyboardScanTime_ to |scanTime|. + * + * @param {number} scanTime Auto-scan interval time in milliseconds. + */ + setKeyboardScanTime(scanTime) { + this.keyboardScanTime_ = scanTime; + } + + /** * Stop the window from moving to the next node at a fixed interval. * @private */ @@ -91,16 +109,29 @@ /** * Set the window to move to the next node at an interval in milliseconds - * equal to this.scanTime_. + * depending on where the user is navigating. Currently, + * this.keyboardScanTime_ is used as the interval if the user is + * navigating in the virtual keyboard, and this.defaultScanTime_ is used + * otherwise. * @private */ start_() { - if (this.scanTime_ === SCAN_TIME_NOT_INITIALIZED) + if (this.defaultScanTime_ === SCAN_TIME_NOT_INITIALIZED) return; + let currentScanTime = this.defaultScanTime_; + + if (this.switchAccess_.improvedTextInputEnabled()) { + if (this.switchAccess_.inVirtualKeyboard()) { + if (this.keyboardScanTime_ !== SCAN_TIME_NOT_INITIALIZED) { + currentScanTime = this.keyboardScanTime_; + } + } + } + this.intervalID_ = window.setInterval( this.switchAccess_.moveForward.bind(this.switchAccess_), - this.scanTime_); + currentScanTime); } }
diff --git a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs index 57d4a5aa..e5d065a2 100644 --- a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs +++ b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs
@@ -136,25 +136,25 @@ ); }); -TEST_F('SwitchAccessAutoScanManagerTest', 'SetScanTime', function() { +TEST_F('SwitchAccessAutoScanManagerTest', 'SetDefaultScanTime', function() { this.runWithLoadedTree('data:text/html;charset=utf-8,', function(desktop) { assertFalse(this.autoScanManager.isRunning()); assertEquals(UNDEFINED_INTERVAL_DELAY, intervalDelay); - this.autoScanManager.setScanTime(2); + this.autoScanManager.setDefaultScanTime(2); assertFalse(this.autoScanManager.isRunning()); - assertEquals(2, this.autoScanManager.scanTime_); + assertEquals(2, this.autoScanManager.defaultScanTime_); assertEquals(UNDEFINED_INTERVAL_DELAY, intervalDelay); this.autoScanManager.setEnabled(true); assertTrue(this.autoScanManager.isRunning()); - assertEquals(2, this.autoScanManager.scanTime_); + assertEquals(2, this.autoScanManager.defaultScanTime_); assertEquals(2, intervalDelay); - this.autoScanManager.setScanTime(5); + this.autoScanManager.setDefaultScanTime(5); assertTrue(this.autoScanManager.isRunning()); - assertEquals(5, this.autoScanManager.scanTime_); + assertEquals(5, this.autoScanManager.defaultScanTime_); assertEquals(5, intervalDelay); } );
diff --git a/chrome/browser/resources/chromeos/switch_access/commands.js b/chrome/browser/resources/chromeos/switch_access/commands.js index d784aaf..8a583a2 100644 --- a/chrome/browser/resources/chromeos/switch_access/commands.js +++ b/chrome/browser/resources/chromeos/switch_access/commands.js
@@ -42,7 +42,7 @@ */ runCommand_(command) { this.commandMap_.get(command)(); - this.switchAccess_.performedUserAction(); + this.switchAccess_.restartAutoScan(); } /**
diff --git a/chrome/browser/resources/chromeos/switch_access/menu_manager.js b/chrome/browser/resources/chromeos/switch_access/menu_manager.js index 1334a22..cce66f4 100644 --- a/chrome/browser/resources/chromeos/switch_access/menu_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/menu_manager.js
@@ -268,7 +268,7 @@ return false; - if (window.switchAccess.textEditingEnabled()) { + if (window.switchAccess.improvedTextInputEnabled()) { if (this.node_.role == RoleType.BUTTON) { this.node_.doDefault(); } else { @@ -402,7 +402,7 @@ actions.push(SAConstants.MenuAction.KEYBOARD); actions.push(SAConstants.MenuAction.DICTATION); - if (window.switchAccess.textEditingEnabled() && + if (window.switchAccess.improvedTextInputEnabled() && node.state[StateType.FOCUSED]) { actions.push(SAConstants.MenuAction.JUMP_TO_BEGINNING_OF_TEXT); actions.push(SAConstants.MenuAction.JUMP_TO_END_OF_TEXT); @@ -452,25 +452,35 @@ * @param {!SAConstants.MenuAction} action */ performAction(action) { - if (!window.switchAccess.textEditingEnabled()) { + if (!window.switchAccess.improvedTextInputEnabled()) { this.exit(); } - // Whether or not the menu should exit after performing - // the action. - let exitAfterAction = true; - switch (action) { case SAConstants.MenuAction.SELECT: + if (window.switchAccess.improvedTextInputEnabled()) { + // Explicitly call exit for actions where the menu closes after + // the icon is clicked. + this.exit(); + } this.navigationManager_.selectCurrentNode(); break; case SAConstants.MenuAction.KEYBOARD: + if (window.switchAccess.improvedTextInputEnabled()) { + this.exit(); + } this.navigationManager_.openKeyboard(); break; case SAConstants.MenuAction.DICTATION: + if (window.switchAccess.improvedTextInputEnabled()) { + this.exit(); + } chrome.accessibilityPrivate.toggleDictation(); break; case SAConstants.MenuAction.SETTINGS: + if (window.switchAccess.improvedTextInputEnabled()) { + this.exit(); + } chrome.accessibilityPrivate.openSettingsSubpage( 'manageAccessibility/switchAccess'); break; @@ -478,69 +488,58 @@ case SAConstants.MenuAction.SCROLL_UP: case SAConstants.MenuAction.SCROLL_LEFT: case SAConstants.MenuAction.SCROLL_RIGHT: + if (window.switchAccess.improvedTextInputEnabled()) { + this.exit(); + } this.navigationManager_.scroll(action); break; case SAConstants.MenuAction.JUMP_TO_BEGINNING_OF_TEXT: this.navigationManager_.jumpToBeginningOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.JUMP_TO_END_OF_TEXT: this.navigationManager_.jumpToEndOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_BACKWARD_ONE_CHAR_OF_TEXT: this.navigationManager_.moveBackwardOneCharOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_BACKWARD_ONE_WORD_OF_TEXT: this.navigationManager_.moveBackwardOneWordOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_DOWN_ONE_LINE_OF_TEXT: this.navigationManager_.moveDownOneLineOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_FORWARD_ONE_CHAR_OF_TEXT: this.navigationManager_.moveForwardOneCharOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_FORWARD_ONE_WORD_OF_TEXT: this.navigationManager_.moveForwardOneWordOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.MOVE_UP_ONE_LINE_OF_TEXT: this.navigationManager_.moveUpOneLineOfText(); - exitAfterAction = false; break; case SAConstants.MenuAction.CUT: this.navigationManager_.cut(); - exitAfterAction = false; break; case SAConstants.MenuAction.COPY: this.navigationManager_.copy(); - exitAfterAction = false; break; case SAConstants.MenuAction.PASTE: this.navigationManager_.paste(); - exitAfterAction = false; break; case SAConstants.MenuAction.SELECT_START: this.navigationManager_.saveSelectStart(); if (this.menuOriginNode_) this.reloadMenu_(this.menuOriginNode_); - exitAfterAction = false; break; case SAConstants.MenuAction.SELECT_END: this.navigationManager_.saveSelectEnd(); - exitAfterAction = false; break; default: + if (window.switchAccess.improvedTextInputEnabled()) { + this.exit(); + } this.navigationManager_.performActionOnCurrentNode(action); } - - if (window.switchAccess.textEditingEnabled() && exitAfterAction) { - this.exit(); - } } /**
diff --git a/chrome/browser/resources/chromeos/switch_access/menu_panel.css b/chrome/browser/resources/chromeos/switch_access/menu_panel.css index df3cd4d9..c36b70f 100644 --- a/chrome/browser/resources/chromeos/switch_access/menu_panel.css +++ b/chrome/browser/resources/chromeos/switch_access/menu_panel.css
@@ -29,7 +29,7 @@ width: 80px; } -.action.textEditingEnabled { +.action.improvedTextInputEnabled { height: 75px; }
diff --git a/chrome/browser/resources/chromeos/switch_access/menu_panel.js b/chrome/browser/resources/chromeos/switch_access/menu_panel.js index 59dedbe..fd3f08d5 100644 --- a/chrome/browser/resources/chromeos/switch_access/menu_panel.js +++ b/chrome/browser/resources/chromeos/switch_access/menu_panel.js
@@ -16,7 +16,7 @@ /** * Reference to switch access. - * @private {SwitchAccess} + * @private {SwitchAccessInterface} */ this.switchAccess_; } @@ -114,11 +114,11 @@ let rowHeight; - if (this.switchAccess_.textEditingEnabled()) { + if (this.switchAccess_.improvedTextInputEnabled()) { rowHeight = 85; const actions = document.getElementsByClassName('action'); for (let action of actions) { - action.classList.add('textEditingEnabled'); + action.classList.add('improvedTextInputEnabled'); } } else { rowHeight = 60;
diff --git a/chrome/browser/resources/chromeos/switch_access/navigation_manager.js b/chrome/browser/resources/chromeos/switch_access/navigation_manager.js index e7a828f..225e66f7 100644 --- a/chrome/browser/resources/chromeos/switch_access/navigation_manager.js +++ b/chrome/browser/resources/chromeos/switch_access/navigation_manager.js
@@ -9,8 +9,15 @@ class NavigationManager { /** * @param {!chrome.automation.AutomationNode} desktop + * @param {!SwitchAccessInterface} switchAccess */ - constructor(desktop) { + constructor(desktop, switchAccess) { + /** + * Handles communication with Switch Access. + * @private {!SwitchAccessInterface} + */ + this.switchAccess_ = switchAccess; + /** * Handles communication with and navigation within the Switch Access menu. * @private {!MenuManager} @@ -400,7 +407,7 @@ if (!this.node_.role) return; - if (window.switchAccess.textEditingEnabled()) { + if (this.switchAccess_.improvedTextInputEnabled()) { if (SwitchAccessPredicate.isTextInput(this.node_)) { this.node_.focus(); return; @@ -456,6 +463,15 @@ } /** + * Checks if the current scope is in the virtual keyboard. + * @return {boolean} + * @public + */ + inVirtualKeyboard() { + return this.textInputManager_.inVirtualKeyboard(this.scope_); + } + + /** * Puts focus on the virtual keyboard, if the current node is a text input. * TODO(946190): Handle the case where the user has not enabled the onscreen * keyboard. @@ -467,6 +483,10 @@ chrome.accessibilityPrivate.setVirtualKeyboardVisible( true /* is_visible */); this.setScope_(this.textInputManager_.getKeyboard(this.desktop_)); + + if (this.switchAccess_.improvedTextInputEnabled()) { + this.switchAccess_.restartAutoScan(); + } } /** @@ -562,6 +582,11 @@ this.textNavigationManager_.resetSelStartIndex(); + // Restart auto-scan. + if (this.switchAccess_.improvedTextInputEnabled()) { + this.switchAccess_.restartAutoScan(); + } + // Move to focused node. this.node_ = event.target;
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access.js b/chrome/browser/resources/chromeos/switch_access/switch_access.js index 88559c7..e73b5da2 100644 --- a/chrome/browser/resources/chromeos/switch_access/switch_access.js +++ b/chrome/browser/resources/chromeos/switch_access/switch_access.js
@@ -52,7 +52,7 @@ * Feature flag controlling improvement of text input capabilities. * @private {boolean} */ - this.enableTextEditing_ = false; + this.enableImprovedTextInput_ = false; this.init_(); } @@ -70,7 +70,7 @@ new SwitchAccessPreferences(this, onPrefsReady); chrome.automation.getDesktop(function(desktop) { - this.navigationManager_ = new NavigationManager(desktop); + this.navigationManager_ = new NavigationManager(desktop, this); if (this.navReadyCallback_) this.navReadyCallback_(); @@ -78,7 +78,7 @@ chrome.commandLinePrivate.hasSwitch( 'enable-experimental-accessibility-switch-access-text', (result) => { - this.enableTextEditing_ = result; + this.enableImprovedTextInput_ = result; }); } @@ -120,21 +120,35 @@ } /** - * Returns whether or not the feature flag - * for text editing is enabled. + * Check if the current node is in the virtual keyboard. * @return {boolean} + * @override * @public */ - textEditingEnabled() { - return this.enableTextEditing_; + inVirtualKeyboard() { + if (this.navigationManager_) { + return this.navigationManager_.inVirtualKeyboard(); + } + return false; } /** - * Perform actions as the result of actions by the user. Currently, restarts - * auto-scan if it is enabled. + * Returns whether or not the feature flag + * for improved text input is enabled. + * @return {boolean} * @override + * @public */ - performedUserAction() { + improvedTextInputEnabled() { + return this.enableImprovedTextInput_; + } + + /** + * Restarts auto-scan if it is enabled. + * @override + * @public + */ + restartAutoScan() { this.autoScanManager_.restartIfRunning(); } @@ -150,7 +164,10 @@ this.autoScanManager_.setEnabled(changes[key]); break; case SAConstants.Preference.AUTO_SCAN_TIME: - this.autoScanManager_.setScanTime(changes[key]); + this.autoScanManager_.setDefaultScanTime(changes[key]); + break; + case SAConstants.Preference.AUTO_SCAN_KEYBOARD_TIME: + this.autoScanManager_.setKeyboardScanTime(changes[key]); break; } }
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js b/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js index 46c4381..185ff7a 100644 --- a/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js +++ b/chrome/browser/resources/chromeos/switch_access/switch_access_constants.js
@@ -94,7 +94,9 @@ */ SAConstants.Preference = { AUTO_SCAN_ENABLED: 'settings.a11y.switch_access.auto_scan.enabled', - AUTO_SCAN_TIME: 'settings.a11y.switch_access.auto_scan.speed_ms' + AUTO_SCAN_TIME: 'settings.a11y.switch_access.auto_scan.speed_ms', + AUTO_SCAN_KEYBOARD_TIME: + 'settings.a11y.switch_access.auto_scan.keyboard.speed_ms' }; /**
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_interface.js b/chrome/browser/resources/chromeos/switch_access/switch_access_interface.js index 029309ab..51cceee 100644 --- a/chrome/browser/resources/chromeos/switch_access/switch_access_interface.js +++ b/chrome/browser/resources/chromeos/switch_access/switch_access_interface.js
@@ -28,10 +28,22 @@ selectCurrentNode() {} /** - * Perform actions as the result of actions by the user. Currently, restarts - * auto-scan if it is enabled. + * Restarts auto-scan if it is enabled. */ - performedUserAction() {} + restartAutoScan() {} + + /** + * Check if the current node is in the virtual keyboard. + * @return {boolean} + */ + inVirtualKeyboard() {} + + /** + * Check whether or not the feature flag + * for improved text input is enabled. + * @return {boolean} + */ + improvedTextInputEnabled() {} /** * Handle a change in user preferences.
diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js index dc1a35b..d4d36dc2 100644 --- a/chrome/browser/resources/gaia_auth_host/authenticator.js +++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -6,7 +6,7 @@ // Note: webview_event_manager.js is already included by saml_handler.js. /** - * @fileoverview An UI component to authenciate to Chrome. The component hosts + * @fileoverview An UI component to authenticate to Chrome. The component hosts * IdP web pages in a webview. A client who is interested in monitoring * authentication events should subscribe itself via addEventListener(). After * initialization, call {@code load} to start the authentication flow. @@ -109,6 +109,9 @@ 'email', 'readOnlyEmail', 'realm', + // If the authentication is done via external IdP, 'startsOnSamlPage' + // indicates whether the flow should start on the IdP page. + 'startsOnSamlPage', ]; @@ -455,12 +458,17 @@ this.initialFrameUrl_ = this.constructInitialFrameUrl_(data); this.reloadUrl_ = data.frameUrl || this.initialFrameUrl_; + + if (data.startsOnSamlPage) { + this.samlHandler_.startsOnSamlPage = true; + } // Don't block insecure content for desktop flow because it lands on // http. Otherwise, block insecure content as long as gaia is https. this.samlHandler_.blockInsecureContent = authMode != AuthMode.DESKTOP && this.idpOrigin_.startsWith('https://'); this.samlHandler_.extractSamlPasswordAttributes = data.extractSamlPasswordAttributes; + this.needPassword = !('needPassword' in data) || data.needPassword; this.webview_.contextMenus.onShow.addListener(function(e) {
diff --git a/chrome/browser/resources/gaia_auth_host/saml_handler.js b/chrome/browser/resources/gaia_auth_host/saml_handler.js index 4a1af059..0792e9d 100644 --- a/chrome/browser/resources/gaia_auth_host/saml_handler.js +++ b/chrome/browser/resources/gaia_auth_host/saml_handler.js
@@ -282,6 +282,15 @@ } /** + * Sets the startsOnSamlPage attribute of the SAML handler. + * @param {boolean} value + */ + set startsOnSamlPage(value) { + this.startsOnSamlPage_ = value; + this.reset(); + } + + /** * Removes the injected content script and unbinds all listeners from the * webview passed to the constructor. This SAMLHandler will be unusable * after this function returns.
diff --git a/chrome/browser/resources/help_app/OWNERS b/chrome/browser/resources/help_app/OWNERS index 9254629..8ccf6d7 100644 --- a/chrome/browser/resources/help_app/OWNERS +++ b/chrome/browser/resources/help_app/OWNERS
@@ -1,4 +1,2 @@ achuith@chromium.org -cnwan@chromium.org -cylee@chromium.org -davidyu@chromium.org +carpenterr@chromium.org
diff --git a/chrome/browser/resources/inline_login/inline_login.css b/chrome/browser/resources/inline_login/inline_login.css index a749a40f..2394735 100644 --- a/chrome/browser/resources/inline_login/inline_login.css +++ b/chrome/browser/resources/inline_login/inline_login.css
@@ -15,7 +15,7 @@ #signin-frame, #spinner-container { - background-color: #f5f5f5; + background-color: var(--cr-card-background-color); bottom: 0; left: 0; position: absolute;
diff --git a/chrome/browser/resources/local_ntp/customize.js b/chrome/browser/resources/local_ntp/customize.js index d9f6188..33b1463 100644 --- a/chrome/browser/resources/local_ntp/customize.js +++ b/chrome/browser/resources/local_ntp/customize.js
@@ -103,16 +103,19 @@ ATTRIBUTIONS: 'custom-bg-attr', BACK_CIRCLE: 'bg-sel-back-circle', BACKGROUNDS_DEFAULT: 'backgrounds-default', + BACKGROUNDS_DEFAULT_ICON: 'backgrounds-default-icon', BACKGROUNDS_BUTTON: 'backgrounds-button', BACKGROUNDS_IMAGE_MENU: 'backgrounds-image-menu', BACKGROUNDS_MENU: 'backgrounds-menu', BACKGROUNDS_UPLOAD: 'backgrounds-upload', + BACKGROUNDS_UPLOAD_ICON: 'backgrounds-upload-icon', CANCEL: 'bg-sel-footer-cancel', COLOR_PICKER: 'color-picker', + COLOR_PICKER_TILE: 'color-picker-tile', COLOR_PICKER_CONTAINER: 'color-picker-container', COLOR_PICKER_ICON: 'color-picker-icon', COLORS_BUTTON: 'colors-button', - COLORS_DEFAULT: 'colors-default', + COLORS_DEFAULT_ICON: 'colors-default-icon', COLORS_THEME: 'colors-theme', COLORS_THEME_NAME: 'colors-theme-name', COLORS_THEME_UNINSTALL: 'colors-theme-uninstall', @@ -166,7 +169,6 @@ COLLECTION_SELECTED: 'bg-selected', // Highlight selected tile COLLECTION_TILE: 'bg-sel-tile', // Preview tile for background customization COLLECTION_TILE_BG: 'bg-sel-tile-bg', - COLLECTION_TILE_WRAPPER: 'bg-sel-tile-wrapper', COLLECTION_TITLE: 'bg-sel-tile-title', // Title of a background image IMAGE_DIALOG: 'is-img-sel', ON_IMAGE_MENU: 'on-img-menu', @@ -548,24 +550,21 @@ */ customize.createTileWithTitle = function( id, imageUrl, name, dataset, onClickInteraction, onKeyInteraction) { - const tileBackground = customize.createTileThumbnail( - id, imageUrl, dataset, onClickInteraction, onKeyInteraction, true); - tileBackground.setAttribute('aria-label', name); - tileBackground.title = name; + const tile = customize.createTileThumbnail( + id, imageUrl, dataset, onClickInteraction, onKeyInteraction); + tile.setAttribute('aria-label', name); + tile.title = name; + customize.fadeInImageTile(tile, imageUrl, null); const title = document.createElement('div'); title.classList.add(customize.CLASSES.COLLECTION_TITLE); title.textContent = name; + tile.appendChild(title); - const tileWrapper = document.createElement('div'); - tileWrapper.classList.add(customize.CLASSES.COLLECTION_TILE_WRAPPER); - tileWrapper.appendChild(tileBackground); - tileWrapper.appendChild(title); - // Enable click support for the whole wrapper including title. - tileWrapper.onclick = function() { - tileWrapper.firstElementChild.click(); - }; - return tileWrapper; + const tileBackground = document.createElement('div'); + tileBackground.classList.add(customize.CLASSES.COLLECTION_TILE_BG); + tileBackground.appendChild(tile); + return tileBackground; }; /** @@ -578,13 +577,14 @@ */ customize.createTileWithoutTitle = function( id, imageUrl, dataset, onClickInteraction, onKeyInteraction) { - const tileBackground = customize.createTileThumbnail( - id, imageUrl, dataset, onClickInteraction, onKeyInteraction, true); + const tile = customize.createTileThumbnail( + id, imageUrl, dataset, onClickInteraction, onKeyInteraction); + customize.fadeInImageTile(tile, imageUrl, null); - const tileWrapper = document.createElement('div'); - tileWrapper.classList.add(customize.CLASSES.COLLECTION_TILE_WRAPPER); - tileWrapper.appendChild(tileBackground); - return tileWrapper; + const tileBackground = document.createElement('div'); + tileBackground.classList.add(customize.CLASSES.COLLECTION_TILE_BG); + tileBackground.appendChild(tile); + return tileBackground; }; /** @@ -594,36 +594,25 @@ * @param {Object} dataset The dataset for the new element. * @param {?Function} onClickInteraction Function for onclick interaction. * @param {?Function} onKeyInteraction Function for onkeydown interaction. - * @param {boolean} fadeIn Whether thumbnail images should faded in. Defaults to - * false. */ customize.createTileThumbnail = function( - id, imageUrl, dataset, onClickInteraction, onKeyInteraction, - fadeIn = false) { + id, imageUrl, dataset, onClickInteraction, onKeyInteraction) { const tile = document.createElement('div'); + tile.id = id; tile.classList.add(customize.CLASSES.COLLECTION_TILE); tile.style.backgroundImage = 'url(' + imageUrl + ')'; - if (fadeIn) { - customize.fadeInImageTile(tile, imageUrl, null); - } - - const tileBackground = document.createElement('div'); - tileBackground.id = id; - tileBackground.classList.add(customize.CLASSES.COLLECTION_TILE_BG); - tileBackground.appendChild(tile); - for (const key in dataset) { - tileBackground.dataset[key] = dataset[key]; + tile.dataset[key] = dataset[key]; } - tileBackground.tabIndex = -1; + tile.tabIndex = -1; // Accessibility support for screen readers. - tileBackground.setAttribute('role', 'button'); - tileBackground.setAttribute('aria-pressed', false); + tile.setAttribute('role', 'button'); + tile.setAttribute('aria-pressed', false); - tileBackground.onclick = onClickInteraction; - tileBackground.onkeydown = onKeyInteraction; - return tileBackground; + tile.onclick = onClickInteraction; + tile.onkeydown = onKeyInteraction; + return tile; }; /** @@ -652,8 +641,8 @@ const menu = $(customize.IDS.CUSTOMIZATION_MENU); const container = customize.richerPicker_selectedSubmenu.menu; - const tiles = Array.from(container.getElementsByClassName( - customize.CLASSES.COLLECTION_TILE_WRAPPER)); + const tiles = Array.from( + container.getElementsByClassName(customize.CLASSES.COLLECTION_TILE_BG)); let nextIndex = tiles.indexOf(current.parentElement); if (deltaX != 0) { nextIndex += deltaX; @@ -669,7 +658,7 @@ } } if (tiles[nextIndex]) { - return tiles[nextIndex].firstElementChild; + return tiles[nextIndex].children[0]; } return null; }; @@ -722,6 +711,10 @@ event.keyCode === customize.KEYCODES.SPACE) { event.preventDefault(); event.stopPropagation(); + if (tile.onClickOverride) { + tile.onClickOverride(event); + return; + } tile.onclick(event); } else if (customize.arrowKeys.includes(event.keyCode)) { // Handle arrow key navigation. @@ -839,10 +832,15 @@ } // Attach event listeners for upload and default tiles - $(customize.IDS.BACKGROUNDS_UPLOAD).onkeydown = + $(customize.IDS.BACKGROUNDS_UPLOAD_ICON).onkeydown = customize.tileOnKeyDownInteraction; - $(customize.IDS.BACKGROUNDS_DEFAULT).onkeydown = + $(customize.IDS.BACKGROUNDS_DEFAULT_ICON).onkeydown = customize.tileOnKeyDownInteraction; + $(customize.IDS.BACKGROUNDS_UPLOAD_ICON).onClickOverride = + $(customize.IDS.BACKGROUNDS_UPLOAD).onkeydown; + $(customize.IDS.BACKGROUNDS_DEFAULT_ICON).onClickOverride = + $(customize.IDS.BACKGROUNDS_DEFAULT).onkeydown; + $(customize.IDS.TILES).focus(); }; @@ -861,25 +859,6 @@ }; /** - * Return true if any option is selected. Used to enable the 'done' button. - */ -customize.richerPicker_isOptionSelected = function() { - return customize.isBackgroundOptionSelected() || - customize.isColorOptionSelected() || - customize.richerPicker_isShortcutOptionSelected(); -}; - -/** - * Enable the 'done' button if any option is selected. If no option is selected, - * disable the 'done' button. - */ -customize.richerPicker_maybeToggleDone = function() { - const enable = customize.richerPicker_isOptionSelected(); - $(customize.IDS.MENU_DONE).disabled = !enable; - $(customize.IDS.MENU_DONE).tabIndex = enable ? 0 : -1; -}; - -/** * Apply styling to a selected option in the richer picker (i.e. the selected * background image, shortcut type, and color). * @param {?Element} option The option to apply styling to. @@ -889,7 +868,7 @@ return; } - option.classList.toggle(customize.CLASSES.SELECTED, true); + option.parentElement.classList.toggle(customize.CLASSES.SELECTED, true); // Create and append a blue checkmark to the selected option. const selectedCircle = document.createElement('div'); const selectedCheck = document.createElement('div'); @@ -910,7 +889,7 @@ return; } - option.classList.toggle(customize.CLASSES.SELECTED, false); + option.parentElement.classList.toggle(customize.CLASSES.SELECTED, false); // Remove all blue checkmarks from the selected option (this includes the // checkmark and the encompassing circle). const select = option.querySelectorAll( @@ -933,11 +912,11 @@ // Set preview images at 720p by replacing the params in the url. const background = $(customize.IDS.CUSTOM_BG); const preview = $(customize.IDS.CUSTOM_BG_PREVIEW); - if (tile.id === customize.IDS.BACKGROUNDS_DEFAULT) { + if (tile.id === customize.IDS.BACKGROUNDS_DEFAULT_ICON) { preview.dataset.hasImage = false; preview.style.backgroundImage = ''; preview.style.backgroundColor = document.body.style.backgroundColor; - } else if (tile.id === customize.IDS.BACKGROUNDS_UPLOAD) { + } else if (tile.id === customize.IDS.BACKGROUNDS_UPLOAD_ICON) { // No previews for uploaded images. return; } else { @@ -945,7 +924,7 @@ const re = /w\d+\-h\d+/; preview.style.backgroundImage = - tile.firstElementChild.style.backgroundImage.replace(re, 'w1280-h720'); + tile.style.backgroundImage.replace(re, 'w1280-h720'); } background.style.opacity = 0; preview.style.opacity = 1; @@ -1010,7 +989,6 @@ collectionId: '', }; customize.richerPicker_applySelectedState(tile); - customize.richerPicker_maybeToggleDone(); // Don't apply a preview for a preselected image, as it's already the // page background. @@ -1037,7 +1015,6 @@ } customize.selectedOptions.shortcutType = shortcutType; customize.richerPicker_applySelectedState(shortcutType); - customize.richerPicker_maybeToggleDone(); }; /** @@ -1053,7 +1030,6 @@ $(customize.IDS.SHORTCUTS_HIDE_TOGGLE).checked = areHidden; customize.selectedOptions.shortcutsAreHidden = areHidden; - customize.richerPicker_maybeToggleDone(); }; /** @@ -1226,7 +1202,7 @@ } const tileBackground = document.createElement('div'); - tileBackground.classList.add(customize.CLASSES.COLLECTION_TILE_WRAPPER); + tileBackground.classList.add(customize.CLASSES.COLLECTION_TILE_BG); tileBackground.appendChild(tile); tileContainer.appendChild(tileBackground); } @@ -1275,11 +1251,10 @@ * loading. */ customize.loadTile = function(tile, imageData, countLoad) { - tile.firstElementChild.style.backgroundImage = + tile.style.backgroundImage = 'url(' + imageData[tile.dataset.tileIndex].thumbnailImageUrl + ')'; customize.fadeInImageTile( - tile.firstElementChild, - imageData[tile.dataset.tileIndex].thumbnailImageUrl, countLoad); + tile, imageData[tile.dataset.tileIndex].thumbnailImageUrl, countLoad); }; /** @@ -1439,12 +1414,12 @@ if (!themeInfo.customBackgroundConfigured) { // Default. customize.preselectedOptions.backgroundsMenuTile = - $(customize.IDS.BACKGROUNDS_DEFAULT); + $(customize.IDS.BACKGROUNDS_DEFAULT_ICON); } else if (themeInfo.imageUrl.includes( 'chrome-search://local-ntp/background.jpg')) { // Local image. customize.preselectedOptions.backgroundsMenuTile = - $(customize.IDS.BACKGROUNDS_UPLOAD); + $(customize.IDS.BACKGROUNDS_UPLOAD_ICON); } else if ( themeInfo.collectionId !== '' && customize.currentCollectionId == themeInfo.collectionId) { @@ -1500,7 +1475,7 @@ * picker. */ customize.richerPicker_applyCustomization = function() { - if (customize.selectedOptions.backgroundData) { + if (customize.isBackgroundOptionSelected()) { customize.setBackground( customize.selectedOptions.backgroundData.url, customize.selectedOptions.backgroundData.attr1, @@ -1906,9 +1881,6 @@ const doneInteraction = function(event) { const done = configData.richerPicker ? $(customize.IDS.MENU_DONE) : $(customize.IDS.DONE); - if (done.disabled) { - return; - } if (configData.richerPicker) { ntpApiHandle.logEvent(customize.LOG_TYPE.NTP_CUSTOMIZATION_MENU_DONE); customize.richerPicker_applyCustomization(); @@ -1945,7 +1917,7 @@ $(customize.IDS.BACKGROUNDS_MENU).onkeydown = function(event) { if (customize.arrowKeys.includes(event.keyCode)) { - $(customize.IDS.BACKGROUNDS_UPLOAD).focus(); + $(customize.IDS.BACKGROUNDS_UPLOAD_ICON).focus(); } }; @@ -1956,9 +1928,15 @@ }; $(customize.IDS.BACKGROUNDS_UPLOAD).onclick = uploadImageInteraction; + $(customize.IDS.BACKGROUNDS_UPLOAD).onkeydown = function(event) { + if (event.keyCode === customize.KEYCODES.ENTER || + event.keyCode === customize.KEYCODES.SPACE) { + uploadImageInteraction(); + } + }; $(customize.IDS.BACKGROUNDS_DEFAULT).onclick = function(event) { - const tile = $(customize.IDS.BACKGROUNDS_DEFAULT); + const tile = $(customize.IDS.BACKGROUNDS_DEFAULT_ICON); tile.dataset.url = ''; tile.dataset.attributionLine1 = ''; tile.dataset.attributionLine2 = ''; @@ -1969,6 +1947,12 @@ customize.richerPicker_selectBackgroundTile(tile); } }; + $(customize.IDS.BACKGROUNDS_DEFAULT).onkeydown = function(event) { + if (event.keyCode === customize.KEYCODES.ENTER || + event.keyCode === customize.KEYCODES.SPACE) { + $(customize.IDS.BACKGROUNDS_DEFAULT).onclick(event); + } + }; const richerPicker = $(customize.IDS.CUSTOMIZATION_MENU); richerPicker.onmousedown = function(event) { @@ -2175,7 +2159,6 @@ } customize.selectedOptions.color = tile; customize.richerPicker_applySelectedState(tile); - customize.richerPicker_maybeToggleDone(); }; /** @@ -2217,11 +2200,10 @@ // If the picker is preselected and the user picks a new color, we need to // treat the picker as a new selection and not a preselection. if (customize.preselectedOptions.colorsMenuTile === - $(customize.IDS.COLOR_PICKER_CONTAINER)) { + $(customize.IDS.COLOR_PICKER_TILE)) { customize.preselectedOptions.colorsMenuTile = null; } - customize.updateColorsMenuTileSelection( - $(customize.IDS.COLOR_PICKER_CONTAINER)); + customize.updateColorsMenuTileSelection($(customize.IDS.COLOR_PICKER_TILE)); ntpApiHandle.applyAutogeneratedTheme(0, [r, g, b, 255]); }; @@ -2258,28 +2240,28 @@ } // Configure the default tile. - $(customize.IDS.COLORS_DEFAULT).onclick = + $(customize.IDS.COLORS_DEFAULT_ICON).onclick = customize.defaultThemeTileInteraction; - $(customize.IDS.COLORS_DEFAULT).onkeydown = + $(customize.IDS.COLORS_DEFAULT_ICON).onkeydown = customize.tileOnKeyDownInteraction; // On arrow keys focus the first element. $(customize.IDS.COLORS_MENU).onkeydown = function(event) { if (customize.arrowKeys.includes(event.keyCode)) { if (configData.chromeColorsCustomColorPicker) { - $(customize.IDS.COLOR_PICKER_CONTAINER).focus(); + $(customize.IDS.COLOR_PICKER_TILE).focus(); } else { - $(customize.IDS.COLORS_DEFAULT).focus(); + $(customize.IDS.COLORS_DEFAULT_ICON).focus(); } } }; // Configure custom color picker. if (configData.chromeColorsCustomColorPicker) { - $(customize.IDS.COLOR_PICKER_CONTAINER).onclick = function(event) { + $(customize.IDS.COLOR_PICKER_TILE).onclick = function(event) { $(customize.IDS.COLOR_PICKER).click(); }; - $(customize.IDS.COLOR_PICKER_CONTAINER).onkeydown = + $(customize.IDS.COLOR_PICKER_TILE).onkeydown = customize.tileOnKeyDownInteraction; $(customize.IDS.COLOR_PICKER).onchange = customize.colorPickerTileInteraction; @@ -2320,12 +2302,12 @@ let tile; if (themeInfo.usingDefaultTheme) { - tile = $(customize.IDS.COLORS_DEFAULT); + tile = $(customize.IDS.COLORS_DEFAULT_ICON); } else if (themeInfo.colorId && themeInfo.colorId > 0) { // Color from predefined set is selected. const tiles = Array.from( $(customize.IDS.COLORS_MENU) - .getElementsByClassName(customize.CLASSES.COLLECTION_TILE_BG)); + .getElementsByClassName(customize.CLASSES.COLLECTION_TILE)); for (let i = 0; i < tiles.length; i++) { if (tiles[i].dataset && tiles[i].dataset.id == themeInfo.colorId) { tile = tiles[i]; @@ -2336,7 +2318,7 @@ configData.chromeColorsCustomColorPicker && themeInfo.colorDark && themeInfo.colorLight && themeInfo.colorPicked) { // Custom color is selected. - tile = $(customize.IDS.COLOR_PICKER_CONTAINER); + tile = $(customize.IDS.COLOR_PICKER_TILE); // Update color picker tile colors. $(customize.IDS.COLOR_PICKER).value =
diff --git a/chrome/browser/resources/local_ntp/local_ntp.css b/chrome/browser/resources/local_ntp/local_ntp.css index 33c80f9..5b617d0 100644 --- a/chrome/browser/resources/local_ntp/local_ntp.css +++ b/chrome/browser/resources/local_ntp/local_ntp.css
@@ -915,38 +915,24 @@ visibility: visible; } -#customization-menu .bg-sel-tile-wrapper { - cursor: pointer; - display: inline-block; - position: relative; - vertical-align: top; -} - #backgrounds-menu .bg-sel-tile-bg, #backgrounds-image-menu .bg-sel-tile-bg { border-radius: 4px; height: 176px; + margin-bottom: 45px; margin-inline-end: 8px; margin-inline-start: 0; margin-top: 0; width: 176px; } -#backgrounds-menu .bg-sel-tile-wrapper, -#backgrounds-image-menu .bg-sel-tile-wrapper { - height: 176px; - margin-bottom: 45px; - margin-inline-end: 8px; - width: 176px; -} - /* Remove left/right spacing from the last tile in each row. */ -#backgrounds-menu .bg-sel-tile-wrapper:nth-of-type(3n), -#backgrounds-image-menu .bg-sel-tile-wrapper:nth-of-type(3n) { +#backgrounds-menu .bg-sel-tile-bg:nth-of-type(3n), +#backgrounds-image-menu .bg-sel-tile-bg:nth-of-type(3n) { margin-inline-end: 0; } -#backgrounds-image-menu .bg-sel-tile-wrapper { +#backgrounds-image-menu .bg-sel-tile-bg { margin-bottom: 8px; } @@ -966,12 +952,7 @@ } } -:not(.using-mouse-nav) :-webkit-any(#backgrounds-menu, #backgrounds-image-menu) - .bg-sel-tile-bg.selected:focus-within { - outline: auto -webkit-focus-ring-color; -} - -.using-mouse-nav .bg-sel-tile-bg:focus { +.using-mouse-nav .bg-sel-tile:focus { outline: none; } @@ -979,7 +960,7 @@ #backgrounds-image-menu .bg-sel-tile { background-position: center; border-radius: 4px; - pointer-events: none; + cursor: pointer; } #customization-menu .bg-sel-tile-title { @@ -1133,7 +1114,7 @@ } } -#customization-menu .bg-sel-tile-bg .selected-circle { +#customization-menu .bg-sel-tile .selected-circle { height: 20px; left: initial; right: 10px; @@ -1141,12 +1122,12 @@ width: 20px; } -html[dir=rtl] #customization-menu .bg-sel-tile-bg .selected-circle { +html[dir=rtl] #customization-menu .bg-sel-tile .selected-circle { left: 10px; right: initial; } -#customization-menu .bg-sel-tile-bg .selected-check { +#customization-menu .bg-sel-tile .selected-check { height: 24px; left: initial; right: 9px; @@ -1154,7 +1135,7 @@ width: 24px; } -html[dir=rtl] #customization-menu .bg-sel-tile-bg .selected-check { +html[dir=rtl] #customization-menu .bg-sel-tile .selected-check { left: 9px; right: initial; } @@ -1269,13 +1250,13 @@ } } -.sh-option-image.selected { +.selected .sh-option-image { background-color: rgb(var(--GB050-rgb)); border-color: rgb(var(--GB600-rgb)); } @media (prefers-color-scheme: dark) { - .sh-option-image.selected { + .selected .sh-option-image { background-color: rgba(var(--GB200-rgb), .1); border-color: rgb(var(--GB300-rgb)); } @@ -1586,42 +1567,30 @@ --custom-color-border: rgb(var(--GG300-rgb)); --custom-color-dark: rgb(var(--GG100-rgb)); --custom-color-light: white; - --border-size: 4px; --tile-size: 64px; --tile-margin: 25px; } -/* - Tile wrapper on colors menu should be the desired tile-size + 2 * border-size. - And the margin between the wrapper size should be decreased by 2 * border-size. - */ -#colors-menu .bg-sel-tile-wrapper { - height: calc(var(--tile-size) + 2 * var(--border-size)); - margin-bottom: calc(var(--tile-margin) - 2 * var(--border-size)); - margin-inline-end: calc(var(--tile-margin) - 2 * var(--border-size)); - position: relative; - width: calc(var(--tile-size) + 2 * var(--border-size)); -} - #colors-menu .bg-sel-tile-bg { background-color: unset; border-radius: 50%; + box-sizing: border-box; cursor: pointer; height: var(--tile-size); - margin-inline-start: var(--border-size); - margin-top: var(--border-size); + margin-bottom: var(--tile-margin); + margin-inline-end: var(--tile-margin); + margin-inline-start: 0; + margin-top: 0; width: var(--tile-size); } #colors-menu .bg-sel-tile-bg.selected { - border: var(--border-size) solid rgba(var(--GB600-rgb), .4); - margin-inline-start: 0; - margin-top: 0; + box-shadow: 0 0 0 4px rgba(var(--GB600-rgb), .4); } @media (prefers-color-scheme: dark) { #colors-menu .bg-sel-tile-bg.selected { - border: var(--border-size) solid rgba(var(--GB600-rgb), .4); + box-shadow: 0 0 0 4px rgba(var(--GB600-rgb), .4); } } @@ -1629,18 +1598,18 @@ To avoid circle showing behind the checkmark, draw it 2px smaller and 1px below so that it is always 1px smaller then the checkmark from all sides. */ -#colors-menu .bg-sel-tile-bg .selected-circle { +#colors-menu .bg-sel-tile .selected-circle { height: calc(var(--check-mark-size) - 2px); right: 0; top: 1px; width: calc(var(--check-mark-size) - 2px); } -html[dir=rtl] #colors-menu .bg-sel-tile-bg .selected-circle { +html[dir=rtl] #colors-menu .bg-sel-tile .selected-circle { left: 0; } -#colors-menu .bg-sel-tile-bg .selected-check { +#colors-menu .bg-sel-tile .selected-check { background: url(icons/check_circle.svg) no-repeat center; background-size: var(--check-mark-size) var(--check-mark-size); height: var(--check-mark-size); @@ -1649,12 +1618,12 @@ width: var(--check-mark-size); } -html[dir=rtl] #colors-menu .bg-sel-tile-bg .selected-check { +html[dir=rtl] #colors-menu .bg-sel-tile .selected-check { left: 0; } @media (prefers-color-scheme: dark) { - #colors-menu .bg-sel-tile-bg .selected-check::after { + #colors-menu .bg-sel-tile .selected-check::after { -webkit-mask-image: url(icons/check_circle.svg); -webkit-mask-size: var(--check-mark-size); height: var(--check-mark-size); @@ -1662,10 +1631,6 @@ } } -#colors-menu .bg-sel-tile { - pointer-events: none; -} - #colors-default-icon { background-image: url(icons/default_theme.svg); background-repeat: no-repeat; @@ -1767,7 +1732,6 @@ border-radius: 50%; box-sizing: border-box; opacity: 1; - position: absolute; } #color-picker-icon {
diff --git a/chrome/browser/resources/local_ntp/local_ntp.html b/chrome/browser/resources/local_ntp/local_ntp.html index 47e2dbb..a20cc58 100644 --- a/chrome/browser/resources/local_ntp/local_ntp.html +++ b/chrome/browser/resources/local_ntp/local_ntp.html
@@ -227,25 +227,21 @@ </div> <div id="backgrounds-menu" class="menu-panel" tabindex="0" role="tabpanel" aria-label="$i18n{backgroundsOption}"> - <div id="backgrounds-upload-wrapper" class="bg-sel-tile-wrapper"> - <div id="backgrounds-upload" class="bg-sel-tile-bg" tabindex="-1" + <div id="backgrounds-upload" class="bg-sel-tile-bg"> + <div id="backgrounds-upload-icon" class="bg-sel-tile" tabindex="-1" role="button" aria-label="$i18n{uploadImage}" - title="$i18n{uploadImage}" aria-pressed="false"> - <div id="backgrounds-upload-icon" class="bg-sel-tile"> - <div id="backgrounds-upload-arrow"></div> - <div id="backgrounds-upload-text">$i18n{uploadImage}</div> - </div> + aria-pressed="false" title="$i18n{uploadImage}"> + <div id="backgrounds-upload-arrow"></div> + <div id="backgrounds-upload-text">$i18n{uploadImage}</div> </div> </div> - <div id="backgrounds-default-wrapper" class="bg-sel-tile-wrapper"> - <div id="backgrounds-default" class="bg-sel-tile-bg" tabindex="-1" + <div id="backgrounds-default" class="bg-sel-tile-bg"> + <div id="backgrounds-default-icon" class="bg-sel-tile" tabindex="-1" role="button" aria-label="$i18n{noBackground}" title="$i18n{noBackground}" aria-pressed="false"> - <div id="backgrounds-default-icon" class="bg-sel-tile"> - <div class="mini-page"> - <div class="mini-header-colorful"></div> - <div class="mini-shortcuts"></div> - </div> + <div class="mini-page"> + <div class="mini-header-colorful"></div> + <div class="mini-shortcuts"></div> </div> </div> <div class="bg-sel-tile-title">$i18n{noBackground}</div> @@ -324,25 +320,22 @@ $i18n{uninstallButton} </button> </div> - <div id="color-picker-wrapper" class="bg-sel-tile-wrapper"> - <div id="color-picker-container" class="bg-sel-tile-bg" - aria-label="$i18n{colorPickerLabel}" - title="$i18n{colorPickerLabel}" tabindex="-1" - role="button" aria-pressed="false"> - <div id="color-picker-tile" class="bg-sel-tile"> - <div id="left-semicircle"></div> - <div id="color-picker-icon"></div> - <input id="color-picker" type="color" style="display:none"> - </input> - </div> + <div id="color-picker-container" class="bg-sel-tile-bg"> + <div id="color-picker-tile" class="bg-sel-tile" tabindex="-1" + aria-label="$i18n{colorPickerLabel}" + title="$i18n{colorPickerLabel}" + role="button" aria-pressed="false"> + <div id="left-semicircle"></div> + <div id="color-picker-icon"></div> + <input id="color-picker" type="color" style="display:none"> + </input> </div> </div> - <div id="colors-default-wrapper" class="bg-sel-tile-wrapper"> - <div id="colors-default" class="bg-sel-tile-bg" + <div id="colors-default" class="bg-sel-tile-bg"> + <div id="colors-default-icon" class="bg-sel-tile" tabindex="-1" aria-label="$i18n{defaultThemeLabel}" title="$i18n{defaultThemeLabel}" tabindex="-1" role="button" aria-pressed="false"> - <div id="colors-default-icon" class="bg-sel-tile"></div> </div> </div> </div> @@ -352,7 +345,7 @@ class="bg-sel-footer-button paper secondary ripple" title="$i18n{cancelButton}">$i18n{cancelButton}</button> <button id="menu-done" class="bg-sel-footer-button paper primary ripple" - title="$i18n{doneButton}" disabled>$i18n{doneButton}</button> + title="$i18n{doneButton}">$i18n{doneButton}</button> </div> </dialog>
diff --git a/chrome/browser/resources/settings/a11y_page/captions_subpage.js b/chrome/browser/resources/settings/a11y_page/captions_subpage.js index df973af..ee0f580 100644 --- a/chrome/browser/resources/settings/a11y_page/captions_subpage.js +++ b/chrome/browser/resources/settings/a11y_page/captions_subpage.js
@@ -59,8 +59,8 @@ type: Array, value: function() { return [ - {value: '50%', name: loadTimeData.getString('verySmall')}, - {value: '75%', name: loadTimeData.getString('small')}, + {value: '25%', name: loadTimeData.getString('verySmall')}, + {value: '50%', name: loadTimeData.getString('small')}, {value: '', name: loadTimeData.getString('medium')}, // Default = 100% {value: '150%', name: loadTimeData.getString('large')}, {value: '200%', name: loadTimeData.getString('veryLarge')},
diff --git a/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js b/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js index eac69cd2..8e56c68 100644 --- a/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js +++ b/chrome/browser/resources/settings/chromeos/os_people_page/os_people_page.js
@@ -163,27 +163,26 @@ /** @private {?settings.SyncBrowserProxy} */ syncBrowserProxy_: null, - /** @private {?settings.AccountManagerBrowserProxy} */ - accountManagerBrowserProxy_: null, - /** @override */ attached: function() { - const profileInfoProxy = settings.ProfileInfoBrowserProxyImpl.getInstance(); - profileInfoProxy.getProfileInfo().then(this.handleProfileInfo_.bind(this)); - this.addWebUIListener( - 'profile-info-changed', this.handleProfileInfo_.bind(this)); + if (this.isAccountManagerEnabled_) { + // If we have the Google Account manager, use GAIA name and icon. + this.addWebUIListener( + 'accounts-changed', this.updateAccounts_.bind(this)); + this.updateAccounts_(); + } else { + // Otherwise use the Profile name and icon. + settings.ProfileInfoBrowserProxyImpl.getInstance().getProfileInfo().then( + this.handleProfileInfo_.bind(this)); + this.addWebUIListener( + 'profile-info-changed', this.handleProfileInfo_.bind(this)); + } this.syncBrowserProxy_ = settings.SyncBrowserProxyImpl.getInstance(); this.syncBrowserProxy_.getSyncStatus().then( this.handleSyncStatus_.bind(this)); this.addWebUIListener( 'sync-status-changed', this.handleSyncStatus_.bind(this)); - - this.accountManagerBrowserProxy_ = - settings.AccountManagerBrowserProxyImpl.getInstance(); - this.addWebUIListener( - 'accounts-changed', this.updateProfileLabel_.bind(this)); - this.updateProfileLabel_(); }, /** @protected */ @@ -229,18 +228,22 @@ }, /** - * Updates the label underneath the primary profile name. + * Handler for when the account list is updated. * @private */ - updateProfileLabel_: async function() { - const includeImages = false; + updateAccounts_: async function() { const /** @type {!Array<settings.Account>} */ accounts = - await this.accountManagerBrowserProxy_.getAccounts(includeImages); - // The user might not have any GAIA accounts. + await settings.AccountManagerBrowserProxyImpl.getInstance() + .getAccounts(); + // The user might not have any GAIA accounts (e.g. guest mode, Kerberos, + // Active Directory). In these cases the profile row is hidden, so there's + // nothing to do. if (accounts.length == 0) { - this.profileLabel_ = ''; return; } + this.profileName_ = accounts[0].fullName; + this.profileIconUrl_ = accounts[0].pic; + const moreAccounts = accounts.length - 1; // Template: "$1, +$2 more accounts" with correct plural of "account". // Localization handles the case of 0 more accounts.
diff --git a/chrome/browser/resources/settings/people_page/account_manager.js b/chrome/browser/resources/settings/people_page/account_manager.js index c4364f4e..8613c12 100644 --- a/chrome/browser/resources/settings/people_page/account_manager.js +++ b/chrome/browser/resources/settings/people_page/account_manager.js
@@ -169,8 +169,7 @@ * @private */ refreshAccounts_: function() { - const includeImages = true; - this.browserProxy_.getAccounts(includeImages).then(accounts => { + this.browserProxy_.getAccounts().then(accounts => { this.set('accounts_', accounts); }); },
diff --git a/chrome/browser/resources/settings/people_page/account_manager_browser_proxy.js b/chrome/browser/resources/settings/people_page/account_manager_browser_proxy.js index 87826f7..b08b022 100644 --- a/chrome/browser/resources/settings/people_page/account_manager_browser_proxy.js +++ b/chrome/browser/resources/settings/people_page/account_manager_browser_proxy.js
@@ -19,7 +19,7 @@ * unmigrated: boolean, * fullName: string, * email: string, - * pic: (string|undefined), + * pic: string, * organization: (string|undefined), * }} */ @@ -30,11 +30,9 @@ class AccountManagerBrowserProxy { /** * Returns a Promise for the list of GAIA accounts held in AccountManager. - * @param {boolean} includeImages Include the profile icon images in - * settings.Account.pic field, which increases IPC data from the browser. * @return {!Promise<!Array<settings.Account>>} */ - getAccounts(includeImages) {} + getAccounts() {} /** * Triggers the 'Add account' flow. @@ -72,8 +70,8 @@ */ class AccountManagerBrowserProxyImpl { /** @override */ - getAccounts(includeImages) { - return cr.sendWithPromise('getAccounts', includeImages); + getAccounts() { + return cr.sendWithPromise('getAccounts'); } /** @override */
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html index 55b32a6..7c9a314 100644 --- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html +++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.html
@@ -139,7 +139,8 @@ </cr-button> <cr-button id="addPrinterButton" class="action-button" on-click="addPressed_" - disabled="[[!canAddPrinter_(newPrinter.*, inProgress_)]]"> + disabled="[[!canAddPrinter_(newPrinter.*, + addPrinterInProgress_)]]"> $i18n{addPrinterButtonText} </cr-button> </div> @@ -216,7 +217,8 @@ <cr-button class="action-button" id="addPrinterButton" disabled="[[!canAddPrinter_(activePrinter.ppdManufacturer, activePrinter.ppdModel, - activePrinter.printerPPDPath)]]" + activePrinter.printerPPDPath, + addPrinterInProgress_)]]" on-click="addPrinter_"> $i18n{addPrinterButtonText} </cr-button>
diff --git a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js index c63057b..74f6940 100644 --- a/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js +++ b/chrome/browser/resources/settings/printing_page/cups_add_printer_dialog.js
@@ -387,6 +387,12 @@ value: '', }, + /** @private */ + addPrinterInProgress_: { + type: Boolean, + value: false, + }, + /** * The error text to be displayed on the dialog. * @private @@ -431,6 +437,7 @@ * @private * */ onPrinterAddedFailed_: function(result) { + this.addPrinterInProgress_ = false; this.errorText_ = settings.printing.getErrorText( /** @type {PrinterSetupResult} */ (result)); }, @@ -548,6 +555,7 @@ /** @private */ addPrinter_: function() { + this.addPrinterInProgress_ = true; settings.CupsPrintersBrowserProxyImpl.getInstance() .addCupsPrinter(this.activePrinter) .then( @@ -563,8 +571,9 @@ * @private */ canAddPrinter_: function(ppdManufacturer, ppdModel, printerPPDPath) { - return settings.printing.isPPDInfoValid( - ppdManufacturer, ppdModel, printerPPDPath); + return !this.addPrinterInProgress_ && + settings.printing.isPPDInfoValid( + ppdManufacturer, ppdModel, printerPPDPath); }, });
diff --git a/chrome/browser/resources/tab_strip/BUILD.gn b/chrome/browser/resources/tab_strip/BUILD.gn index cc9cf06..c938732 100644 --- a/chrome/browser/resources/tab_strip/BUILD.gn +++ b/chrome/browser/resources/tab_strip/BUILD.gn
@@ -10,14 +10,32 @@ ":custom_element", ":tab", ":tab_list", + ":tabs_api_proxy", ] } js_library("custom_element") { } -js_library("tab") { + +js_library("tabs_api_proxy") { + deps = [ + "//ui/webui/resources/js:cr.m", + ] + externs_list = [ "$externs_path/chrome_extensions.js" ] } + +js_library("tab") { + externs_list = [ "$externs_path/chrome.js" ] +} + js_library("tab_list") { + deps = [ + ":types", + ] + externs_list = [ "$externs_path/chrome.js" ] +} + +js_library("types") { } group("tab_strip_modules") {
diff --git a/chrome/browser/resources/tab_strip/OWNERS b/chrome/browser/resources/tab_strip/OWNERS new file mode 100644 index 0000000..c4454dd --- /dev/null +++ b/chrome/browser/resources/tab_strip/OWNERS
@@ -0,0 +1,2 @@ +dpapad@chromium.org +johntlee@chromium.org
diff --git a/chrome/browser/resources/tab_strip/tab.html b/chrome/browser/resources/tab_strip/tab.html index 1855bec..ae54b94 100644 --- a/chrome/browser/resources/tab_strip/tab.html +++ b/chrome/browser/resources/tab_strip/tab.html
@@ -75,7 +75,7 @@ <header id="title"> <span id="favicon"></span> - <h2 id="titleText">Page title</h2> + <h2 id="titleText"></h2> <button id="close" aria-label="Close tab"> <span id="closeIcon"></span> </button>
diff --git a/chrome/browser/resources/tab_strip/tab.js b/chrome/browser/resources/tab_strip/tab.js index 587656e..06117610 100644 --- a/chrome/browser/resources/tab_strip/tab.js +++ b/chrome/browser/resources/tab_strip/tab.js
@@ -4,14 +4,42 @@ import {CustomElement} from './custom_element.js'; -class Tab extends CustomElement { +export class TabElement extends CustomElement { static get template() { return `{__html_template__}`; } + constructor() { + super(); + + /** @private {!Tab} */ + this.tab_; + + /** @private {!HTMLElement} */ + this.titleTextEl_ = /** @type {!HTMLElement} */ ( + this.shadowRoot.querySelector('#titleText')); + } + connectedCallback() { this.setAttribute('tabindex', 0); } + + /** @return {!Tab} */ + get tab() { + return this.tab_; + } + + /** @param {!Tab} tab */ + set tab(tab) { + if (!this.tab_ || this.tab_.title !== tab.title) { + this.titleTextEl_.textContent = tab.title; + } + + // Expose the ID to an attribute to allow easy querySelector use + this.setAttribute('data-tab-id', tab.id); + + this.tab_ = Object.freeze(tab); + } } -customElements.define('tabstrip-tab', Tab); +customElements.define('tabstrip-tab', TabElement);
diff --git a/chrome/browser/resources/tab_strip/tab_list.html b/chrome/browser/resources/tab_strip/tab_list.html index 5e15634a..367be2c 100644 --- a/chrome/browser/resources/tab_strip/tab_list.html +++ b/chrome/browser/resources/tab_strip/tab_list.html
@@ -1,10 +1,15 @@ <style> :host { - display: flex; + display: block; padding: 16px; width: fit-content; } + #tabsContainer { + display: flex; + width: fit-content; + } + tabstrip-tab { flex-shrink: 0; margin-inline-end: 16px; @@ -15,9 +20,4 @@ } </style> -<tabstrip-tab></tabstrip-tab> -<tabstrip-tab></tabstrip-tab> -<tabstrip-tab></tabstrip-tab> -<tabstrip-tab></tabstrip-tab> -<tabstrip-tab></tabstrip-tab> -<tabstrip-tab></tabstrip-tab> +<div id="tabsContainer"></div>
diff --git a/chrome/browser/resources/tab_strip/tab_list.js b/chrome/browser/resources/tab_strip/tab_list.js index 681652b..7ab3036 100644 --- a/chrome/browser/resources/tab_strip/tab_list.js +++ b/chrome/browser/resources/tab_strip/tab_list.js
@@ -5,11 +5,135 @@ import './tab.js'; import {CustomElement} from './custom_element.js'; +import {TabElement} from './tab.js'; +import {TabsApiProxy} from './tabs_api_proxy.js'; -class TabList extends CustomElement { +class TabListElement extends CustomElement { static get template() { return `{__html_template__}`; } + + constructor() { + super(); + + /** @private {!TabsApiProxy} */ + this.tabsApi_ = TabsApiProxy.getInstance(); + + /** @private {!Object} */ + this.tabsApiHandler_ = this.tabsApi_.callbackRouter; + + /** @private {!Element} */ + this.tabsContainerElement_ = + /** @type {!Element} */ ( + this.shadowRoot.querySelector('#tabsContainer')); + + /** @private {number} */ + this.windowId_; + } + + connectedCallback() { + this.tabsApi_.getCurrentWindow().then((currentWindow) => { + this.windowId_ = currentWindow.id; + + const fragment = document.createDocumentFragment(); + + // TODO(johntlee): currentWindow.tabs is guaranteed to be defined because + // `populate: true` is passed in as part of the arguments to the API. + // Once the closure compiler is able to type `assert` to return a truthy + // type even when being used with modules, the conditionals should be + // replaced with `assert` (b/138729777). + if (currentWindow.tabs) { + for (const tab of currentWindow.tabs) { + if (tab) { + this.onTabCreated_(tab, fragment); + } + } + } + this.tabsContainerElement_.appendChild(fragment); + + this.tabsApiHandler_.onCreated.addListener(this.onTabCreated_.bind(this)); + this.tabsApiHandler_.onRemoved.addListener(this.onTabRemoved_.bind(this)); + this.tabsApiHandler_.onUpdated.addListener(this.onTabUpdated_.bind(this)); + }); + } + + /** + * @param {!Tab} tab + * @return {!TabElement} + * @private + */ + createTabElement_(tab) { + const tabElement = new TabElement(); + tabElement.tab = tab; + return tabElement; + } + + /** + * @param {number} tabId + * @return {?TabElement} + * @private + */ + findTabElement_(tabId) { + return /** @type {?TabElement} */ (this.tabsContainerElement_.querySelector( + `tabstrip-tab[data-tab-id="${tabId}"]`)); + } + + /** + * @param {!TabElement} tabElement + * @param {number} index + * @param {!Node=} opt_parent + * @private + */ + insertTabAt_(tabElement, index, opt_parent) { + (opt_parent || this.tabsContainerElement_) + .insertBefore(tabElement, this.tabsContainerElement_.children[index]); + } + + /** + * @param {!Tab} tab + * @param {!Node=} opt_parent + * @private + */ + onTabCreated_(tab, opt_parent) { + if (tab.windowId !== this.windowId_) { + return; + } + + this.insertTabAt_(this.createTabElement_(tab), tab.index, opt_parent); + } + + /** + * @param {number} tabId + * @param {!WindowRemoveInfo} removeInfo + * @private + */ + onTabRemoved_(tabId, removeInfo) { + if (removeInfo.windowId !== this.windowId_) { + return; + } + + const tabElement = this.findTabElement_(tabId); + if (tabElement) { + tabElement.remove(); + } + } + + /** + * @param {number} tabId + * @param {!Tab} changeInfo + * @param {!Tab} tab + * @private + */ + onTabUpdated_(tabId, changeInfo, tab) { + if (tab.windowId !== this.windowId_) { + return; + } + + const tabElement = this.findTabElement_(tabId); + if (tabElement) { + tabElement.tab = tab; + } + } } -customElements.define('tabstrip-tab-list', TabList); +customElements.define('tabstrip-tab-list', TabListElement);
diff --git a/chrome/browser/resources/tab_strip/tab_strip_resources.grd b/chrome/browser/resources/tab_strip/tab_strip_resources.grd index db7625d..72257fd 100644 --- a/chrome/browser/resources/tab_strip/tab_strip_resources.grd +++ b/chrome/browser/resources/tab_strip/tab_strip_resources.grd
@@ -18,6 +18,11 @@ type="chrome_html" compress="gzip"/> <structure + name="IDR_TAB_STRIP_TABS_API_PROXY_JS" + file="tabs_api_proxy.js" + type="chrome_html" + compress="gzip"/> + <structure name="IDR_TAB_STRIP_CUSTOM_ELEMENT_JS" file="custom_element.js" type="chrome_html"
diff --git a/chrome/browser/resources/tab_strip/tabs_api_proxy.js b/chrome/browser/resources/tab_strip/tabs_api_proxy.js new file mode 100644 index 0000000..d9af6683 --- /dev/null +++ b/chrome/browser/resources/tab_strip/tabs_api_proxy.js
@@ -0,0 +1,33 @@ +// Copyright 2019 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. + +import {addSingletonGetter} from 'chrome://resources/js/cr.m.js'; + +export class TabsApiProxy { + constructor() { + /** @type {!Object<string, !ChromeEvent>} */ + this.callbackRouter = { + onCreated: chrome.tabs.onCreated, + onRemoved: chrome.tabs.onRemoved, + onUpdated: chrome.tabs.onUpdated, + }; + } + + /** + * @return {!Promise<!ChromeWindow>} + */ + getCurrentWindow() { + const options = { + populate: true, // populate window data with tabs data + windowTypes: ['normal'], // prevent devtools from being returned + }; + return new Promise(resolve => { + chrome.windows.getCurrent(options, currentWindow => { + resolve(currentWindow); + }); + }); + } +} + +addSingletonGetter(TabsApiProxy);
diff --git a/chrome/browser/resources/tab_strip/types.js b/chrome/browser/resources/tab_strip/types.js new file mode 100644 index 0000000..7befca61 --- /dev/null +++ b/chrome/browser/resources/tab_strip/types.js
@@ -0,0 +1,15 @@ +// Copyright 2019 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. + +/** + * @fileoverview Closure typedefs for Tab Strip. + */ + +/** + * @typedef {{ + * isWindowClosing: boolean, + * windowId: number, + * }} + */ +let WindowRemoveInfo;
diff --git a/chrome/browser/resources/usb_internals/devices_page.js b/chrome/browser/resources/usb_internals/devices_page.js index 1f4f954..2589e5eb 100644 --- a/chrome/browser/resources/usb_internals/devices_page.js +++ b/chrome/browser/resources/usb_internals/devices_page.js
@@ -8,17 +8,17 @@ */ cr.define('devices_page', function() { - const UsbDeviceProxy = device.mojom.UsbDeviceProxy; + const UsbDeviceRemote = device.mojom.UsbDeviceRemote; /** * Page that contains a tab header and a tab panel displaying devices table. */ class DevicesPage { /** - * @param {!device.mojom.UsbDeviceManagerProxy} usbManager + * @param {!device.mojom.UsbDeviceManagerRemote} usbManager */ constructor(usbManager) { - /** @private {!device.mojom.UsbDeviceManagerProxy} */ + /** @private {!device.mojom.UsbDeviceManagerRemote} */ this.usbManager_ = usbManager; this.renderDeviceList_(); } @@ -91,7 +91,7 @@ */ class DevicePage { /** - * @param {!device.mojom.UsbDeviceManagerProxy} usbManager + * @param {!device.mojom.UsbDeviceManagerRemote} usbManager * @param {!device.mojom.UsbDeviceInfo} device */ constructor(usbManager, device) { @@ -156,25 +156,25 @@ * @private */ async initializeDescriptorPanels_(tabPanel, guid) { - const usbDeviceProxy = new UsbDeviceProxy; + const usbDevice = new UsbDeviceRemote; await this.usbManager_.getDevice( - guid, usbDeviceProxy.$.createRequest(), null); + guid, usbDevice.$.bindNewPipeAndPassReceiver(), null); - const deviceDescriptorPanel = initialInspectorPanel( - tabPanel, 'device-descriptor', usbDeviceProxy, guid); + const deviceDescriptorPanel = + initialInspectorPanel(tabPanel, 'device-descriptor', usbDevice, guid); const configurationDescriptorPanel = initialInspectorPanel( - tabPanel, 'configuration-descriptor', usbDeviceProxy, guid); + tabPanel, 'configuration-descriptor', usbDevice, guid); - const stringDescriptorPanel = initialInspectorPanel( - tabPanel, 'string-descriptor', usbDeviceProxy, guid); + const stringDescriptorPanel = + initialInspectorPanel(tabPanel, 'string-descriptor', usbDevice, guid); deviceDescriptorPanel.setStringDescriptorPanel(stringDescriptorPanel); configurationDescriptorPanel.setStringDescriptorPanel( stringDescriptorPanel); - initialInspectorPanel(tabPanel, 'bos-descriptor', usbDeviceProxy, guid); + initialInspectorPanel(tabPanel, 'bos-descriptor', usbDevice, guid); - initialInspectorPanel(tabPanel, 'testing-tool', usbDeviceProxy, guid); + initialInspectorPanel(tabPanel, 'testing-tool', usbDevice, guid); // window.deviceTabInitializedFn() provides a hook for the test suite to // perform test actions after the device tab query descriptors actions are @@ -360,16 +360,16 @@ * Initialize a descriptor panel. * @param {!HTMLElement} tabPanel * @param {string} panelType - * @param {!device.mojom.UsbDeviceInterface} usbDeviceProxy + * @param {!device.mojom.UsbDeviceRemote} usbDevice * @param {string} guid * @return {!descriptor_panel.DescriptorPanel} */ - function initialInspectorPanel(tabPanel, panelType, usbDeviceProxy, guid) { + function initialInspectorPanel(tabPanel, panelType, usbDevice, guid) { const button = queryRequiredElement(`.${panelType}-button`, tabPanel); const displayElement = queryRequiredElement(`.${panelType}-panel`, tabPanel); const descriptorPanel = - new descriptor_panel.DescriptorPanel(usbDeviceProxy, displayElement); + new descriptor_panel.DescriptorPanel(usbDevice, displayElement); switch (panelType) { case 'string-descriptor': descriptorPanel.initialStringDescriptorPanel(guid); @@ -442,4 +442,4 @@ window.deviceListCompleteFn = window.deviceListCompleteFn || function() {}; -window.deviceTabInitializedFn = window.deviceTabInitializedFn || function() {}; \ No newline at end of file +window.deviceTabInitializedFn = window.deviceTabInitializedFn || function() {};
diff --git a/chrome/browser/resources/usb_internals/usb_internals.js b/chrome/browser/resources/usb_internals/usb_internals.js index ff06834..45bce59 100644 --- a/chrome/browser/resources/usb_internals/usb_internals.js +++ b/chrome/browser/resources/usb_internals/usb_internals.js
@@ -14,20 +14,20 @@ // actions after the page is loaded but before any script is run. await window.setupFn(); - const pageHandler = mojom.UsbInternalsPageHandler.getProxy(); + const pageHandler = mojom.UsbInternalsPageHandler.getRemote(); // Connection to the UsbInternalsPageHandler instance running in the // browser process. - /** @type {device.mojom.UsbDeviceManagerProxy} */ - const usbManager = new device.mojom.UsbDeviceManagerProxy; + /** @type {device.mojom.UsbDeviceManagerRemote} */ + const usbManager = new device.mojom.UsbDeviceManagerRemote; await pageHandler.bindUsbDeviceManagerInterface( usbManager.$.createRequest()); /** @private {devices_page.DevicesPage} */ this.devicesPage_ = new devices_page.DevicesPage(usbManager); - /** @private {device.mojom.UsbDeviceManagerTestProxy} */ - this.usbManagerTest_ = new device.mojom.UsbDeviceManagerTestProxy; + /** @private {device.mojom.UsbDeviceManagerTestRemote} */ + this.usbManagerTest_ = new device.mojom.UsbDeviceManagerTestRemote; await pageHandler.bindTestInterface( this.usbManagerTest_.$.createRequest()); @@ -93,4 +93,4 @@ document.addEventListener('DOMContentLoaded', () => { const usbInternalsPage = new usb_internals.UsbInternals(); usbInternalsPage.initializeViews(); -}); \ No newline at end of file +});
diff --git a/chrome/browser/resources/welcome/google_apps/nux_google_apps.html b/chrome/browser/resources/welcome/google_apps/nux_google_apps.html index a5d31e1..fd03465 100644 --- a/chrome/browser/resources/welcome/google_apps/nux_google_apps.html +++ b/chrome/browser/resources/welcome/google_apps/nux_google_apps.html
@@ -143,38 +143,38 @@ /* App Icons */ .gmail { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_GMAIL@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_GMAIL@2x) 2x); + url(chrome://theme/IDS_WELCOME_GMAIL@1x) 1x, + url(chrome://theme/IDS_WELCOME_GMAIL@2x) 2x); } .youtube { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_YOUTUBE@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_YOUTUBE@2x) 2x); + url(chrome://theme/IDS_WELCOME_YOUTUBE@1x) 1x, + url(chrome://theme/IDS_WELCOME_YOUTUBE@2x) 2x); } .maps { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_MAPS@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_MAPS@2x) 2x); + url(chrome://theme/IDS_WELCOME_MAPS@1x) 1x, + url(chrome://theme/IDS_WELCOME_MAPS@2x) 2x); } .translate { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_TRANSLATE@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_TRANSLATE@2x) 2x); + url(chrome://theme/IDS_WELCOME_TRANSLATE@1x) 1x, + url(chrome://theme/IDS_WELCOME_TRANSLATE@2x) 2x); } .news { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_NEWS@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_NEWS@2x) 2x); + url(chrome://theme/IDS_WELCOME_NEWS@1x) 1x, + url(chrome://theme/IDS_WELCOME_NEWS@2x) 2x); } .search { content: -webkit-image-set( - url(chrome://theme/IDS_ONBOARDING_WELCOME_SEARCH@1x) 1x, - url(chrome://theme/IDS_ONBOARDING_WELCOME_SEARCH@2x) 2x); + url(chrome://theme/IDS_WELCOME_SEARCH@1x) 1x, + url(chrome://theme/IDS_WELCOME_SEARCH@2x) 2x); } </style> <div class="apps-ask">
diff --git a/chrome/browser/resources/welcome/onboarding_welcome_resources.grd b/chrome/browser/resources/welcome/welcome_resources.grd similarity index 66% rename from chrome/browser/resources/welcome/onboarding_welcome_resources.grd rename to chrome/browser/resources/welcome/welcome_resources.grd index 011b9b1..cc67d33 100644 --- a/chrome/browser/resources/welcome/onboarding_welcome_resources.grd +++ b/chrome/browser/resources/welcome/welcome_resources.grd
@@ -1,199 +1,199 @@ <?xml version="1.0" encoding="UTF-8"?> <grit latest_public_release="0" current_release="1" output_all_resource_defines="false"> <outputs> - <output filename="grit/onboarding_welcome_resources.h" + <output filename="grit/welcome_resources.h" type="rc_header"> <emit emit_type='prepend'></emit> </output> - <output filename="grit/onboarding_welcome_resources_map.cc" + <output filename="grit/welcome_resources_map.cc" type="resource_file_map_source" /> - <output filename="grit/onboarding_welcome_resources_map.h" + <output filename="grit/welcome_resources_map.h" type="resource_map_header" /> - <output filename="onboarding_welcome_resources.pak" + <output filename="welcome_resources.pak" type="data_package" /> </outputs> <release seq="1"> <includes> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_BLUE_CIRCLE_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_BLUE_CIRCLE_SVG" file="images/background_svgs/blue_circle.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREEN_RECTANGLE_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_GREEN_RECTANGLE_SVG" file="images/background_svgs/green_rectangle.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_OVAL_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_OVAL_SVG" file="images/background_svgs/grey_oval.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_ROUNDED_RECTANGLE_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_GREY_ROUNDED_RECTANGLE_SVG" file="images/background_svgs/grey_rounded_rectangle.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_RED_TRIANGLE_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_RED_TRIANGLE_SVG" file="images/background_svgs/red_triangle.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_DOTS_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_DOTS_SVG" file="images/background_svgs/yellow_dots.svg" compress="gzip" type="BINDATA" /> - <include name="IDR_WELCOME_ONBOARDING_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_SEMICIRCLE_SVG" + <include name="IDR_WELCOME_IMAGES_BACKGROUND_SVGS_YELLOW_SEMICIRCLE_SVG" file="images/background_svgs/yellow_semicircle.svg" compress="gzip" type="BINDATA" /> </includes> <structures> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_LANDING_VIEW_HTML" + <structure name="IDR_WELCOME_LANDING_VIEW_HTML" file="landing_view.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_LANDING_VIEW_JS" + <structure name="IDR_WELCOME_LANDING_VIEW_JS" file="landing_view.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_LANDING_VIEW_PROXY_HTML" + <structure name="IDR_WELCOME_LANDING_VIEW_PROXY_HTML" file="landing_view_proxy.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_LANDING_VIEW_PROXY_JS" + <structure name="IDR_WELCOME_LANDING_VIEW_PROXY_JS" file="landing_view_proxy.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_NAVIGATION_BEHAVIOR_HTML" + <structure name="IDR_WELCOME_NAVIGATION_BEHAVIOR_HTML" file="navigation_behavior.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_NAVIGATION_BEHAVIOR_JS" + <structure name="IDR_WELCOME_NAVIGATION_BEHAVIOR_JS" file="navigation_behavior.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_ACTION_LINK_STYLE_JS" + <structure name="IDR_WELCOME_SHARED_ACTION_LINK_STYLE_JS" file="shared/action_link_style.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_ACTION_LINK_STYLE_CSS_HTML" + <structure name="IDR_WELCOME_SHARED_ACTION_LINK_STYLE_CSS_HTML" file="shared/action_link_style_css.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_ANIMATIONS_CSS" + <structure name="IDR_WELCOME_SHARED_ANIMATIONS_CSS" file="shared/animations_css.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_BOOKMARK_PROXY_HTML" + <structure name="IDR_WELCOME_SHARED_BOOKMARK_PROXY_HTML" file="shared/bookmark_proxy.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_BOOKMARK_PROXY_JS" + <structure name="IDR_WELCOME_SHARED_BOOKMARK_PROXY_JS" file="shared/bookmark_proxy.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_CHOOSER_SHARED_CSS" + <structure name="IDR_WELCOME_SHARED_CHOOSER_SHARED_CSS" file="shared/chooser_shared_css.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_I18N_SETUP_HTML" + <structure name="IDR_WELCOME_SHARED_I18N_SETUP_HTML" file="shared/i18n_setup.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_MODULE_METRICS_PROXY_HTML" + <structure name="IDR_WELCOME_SHARED_MODULE_METRICS_PROXY_HTML" file="shared/module_metrics_proxy.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_MODULE_METRICS_PROXY_JS" + <structure name="IDR_WELCOME_SHARED_MODULE_METRICS_PROXY_JS" file="shared/module_metrics_proxy.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_NAVI_COLORS_CSS" + <structure name="IDR_WELCOME_SHARED_NAVI_COLORS_CSS" file="shared/navi_colors_css.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_ONBOARDING_BACKGROUND_HTML" + <structure name="IDR_WELCOME_SHARED_ONBOARDING_BACKGROUND_HTML" file="shared/onboarding_background.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_ONBOARDING_BACKGROUND_JS" + <structure name="IDR_WELCOME_SHARED_ONBOARDING_BACKGROUND_JS" file="shared/onboarding_background.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_STEP_INDICATOR_HTML" + <structure name="IDR_WELCOME_SHARED_STEP_INDICATOR_HTML" file="shared/step_indicator.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_STEP_INDICATOR_JS" + <structure name="IDR_WELCOME_SHARED_STEP_INDICATOR_JS" file="shared/step_indicator.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SHARED_SPLASH_PAGES_SHARED_CSS" + <structure name="IDR_WELCOME_SHARED_SPLASH_PAGES_SHARED_CSS" file="shared/splash_pages_shared_css.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SIGNIN_VIEW_HTML" + <structure name="IDR_WELCOME_SIGNIN_VIEW_HTML" file="signin_view.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SIGNIN_VIEW_JS" + <structure name="IDR_WELCOME_SIGNIN_VIEW_JS" file="signin_view.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SIGNIN_VIEW_PROXY_HTML" + <structure name="IDR_WELCOME_SIGNIN_VIEW_PROXY_HTML" file="signin_view_proxy.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_SIGNIN_VIEW_PROXY_JS" + <structure name="IDR_WELCOME_SIGNIN_VIEW_PROXY_JS" file="signin_view_proxy.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_APP_HTML" + <structure name="IDR_WELCOME_APP_HTML" file="welcome_app.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_APP_JS" + <structure name="IDR_WELCOME_APP_JS" file="welcome_app.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_BROWSER_PROXY_HTML" + <structure name="IDR_WELCOME_BROWSER_PROXY_HTML" file="welcome_browser_proxy.html" compress="gzip" type="chrome_html"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_BROWSER_PROXY_JS" + <structure name="IDR_WELCOME_BROWSER_PROXY_JS" file="welcome_browser_proxy.js" compress="gzip" type="chrome_html"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_CSS" + <structure name="IDR_WELCOME_CSS" file="welcome.css" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_HTML" + <structure name="IDR_WELCOME_HTML" file="welcome.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_JS" + <structure name="IDR_WELCOME_JS" file="welcome.js" type="chrome_html" compress="gzip" preprocess="true"/> - <!-- NUX Google apps--> - <structure name="IDR_NUX_GOOGLE_APPS_HTML" + <!-- Google apps--> + <structure name="IDR_GOOGLE_APPS_HTML" file="google_apps/nux_google_apps.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_GOOGLE_APPS_JS" + <structure name="IDR_GOOGLE_APPS_JS" file="google_apps/nux_google_apps.js" compress="gzip" type="chrome_html" /> @@ -205,21 +205,21 @@ file="google_apps/google_app_proxy.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_SET_AS_DEFAULT_HTML" + <structure name="IDR_SET_AS_DEFAULT_HTML" file="set_as_default/nux_set_as_default.html" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_NUX_SET_AS_DEFAULT_JS" + <structure name="IDR_SET_AS_DEFAULT_JS" file="set_as_default/nux_set_as_default.js" type="chrome_html" compress="gzip" preprocess="true"/> - <structure name="IDR_NUX_SET_AS_DEFAULT_PROXY_HTML" + <structure name="IDR_SET_AS_DEFAULT_PROXY_HTML" file="set_as_default/nux_set_as_default_proxy.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_SET_AS_DEFAULT_PROXY_JS" + <structure name="IDR_SET_AS_DEFAULT_PROXY_JS" file="set_as_default/nux_set_as_default_proxy.js" compress="gzip" type="chrome_html" /> @@ -232,28 +232,28 @@ compress="gzip" type="chrome_html" /> - <!-- NUX NTP background--> - <structure name="IDR_NUX_NTP_BACKGROUND_HTML" + <!-- NTP background--> + <structure name="IDR_NTP_BACKGROUND_HTML" file="ntp_background/nux_ntp_background.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_NTP_BACKGROUND_JS" + <structure name="IDR_NTP_BACKGROUND_JS" file="ntp_background/nux_ntp_background.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_NTP_BACKGROUND_PROXY_HTML" + <structure name="IDR_NTP_BACKGROUND_PROXY_HTML" file="ntp_background/ntp_background_proxy.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_NTP_BACKGROUND_PROXY_JS" + <structure name="IDR_NTP_BACKGROUND_PROXY_JS" file="ntp_background/ntp_background_proxy.js" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_NTP_BACKGROUND_METRICS_PROXY_HTML" + <structure name="IDR_NTP_BACKGROUND_METRICS_PROXY_HTML" file="ntp_background/ntp_background_metrics_proxy.html" compress="gzip" type="chrome_html" /> - <structure name="IDR_NUX_NTP_BACKGROUND_METRICS_PROXY_JS" + <structure name="IDR_NTP_BACKGROUND_METRICS_PROXY_JS" file="ntp_background/ntp_background_metrics_proxy.js" compress="gzip" type="chrome_html" />
diff --git a/chrome/browser/search/background/ntp_background_service.cc b/chrome/browser/search/background/ntp_background_service.cc index 2832da0f..7577222 100644 --- a/chrome/browser/search/background/ntp_background_service.cc +++ b/chrome/browser/search/background/ntp_background_service.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/net/system_network_context_manager.h" #include "chrome/browser/search/background/ntp_background.pb.h" -#include "chrome/browser/search/background/onboarding_ntp_backgrounds.h" +#include "chrome/browser/search/background/ntp_backgrounds.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "net/base/load_flags.h" @@ -348,8 +348,8 @@ } bool NtpBackgroundService::IsValidBackdropUrl(const GURL& url) const { - for (auto& onboarding_background : GetOnboardingNtpBackgrounds()) { - if (onboarding_background == url) { + for (auto& ntp_background : GetNtpBackgrounds()) { + if (ntp_background == url) { return true; } }
diff --git a/chrome/browser/search/background/ntp_backgrounds.cc b/chrome/browser/search/background/ntp_backgrounds.cc new file mode 100644 index 0000000..ef327f6 --- /dev/null +++ b/chrome/browser/search/background/ntp_backgrounds.cc
@@ -0,0 +1,48 @@ +// Copyright 2019 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/search/background/ntp_backgrounds.h" + +#include "url/gurl.h" + +std::array<GURL, kNtpBackgroundsCount> GetNtpBackgrounds() { + // A set of whitelisted NTP background image URLs that are always considered + // to be valid URLs that are shown to the user as part of the welcome flow. + // These backgrounds were handpicked from the Backdrop API based on popularity + // and those requiring minimum maintenance and translation work. This list + // matches with chrome/browser/ui/webui/welcome/nux/ntp_background_handler.cc. + const std::array<GURL, kNtpBackgroundsCount> kNtpBackgrounds = {{ + // Art + GURL("https://lh5.googleusercontent.com/proxy/" + "E60bugMrz3Jw0Ty3vD1HqfrrabnAQGlHzIJjRadV1kDS_" + "XSE0AtWuMnjW9VPvq1YeyPJK13gZw63TQYvh2RlaZq_" + "aQm5xskpsgWW1l67gg3mkYaZr07BQqMV47onKA=w3840-h2160-p-k-no-nd-" + "mv"), + + // Cityscape + GURL("https://lh4.googleusercontent.com/proxy/" + "UOhQwfclsAK8TnXZqoTkh9szHvYOJ3auDH07hZBZeVaaRWvzGaXpaYl60MfCRuW" + "_S57gvzBw859pj5Xl2pW_GpfG8k2GhE9LUFNKwA=w3840-h2160-p-k-no-nd-" + "mv"), + + // Earth + GURL("https://lh5.googleusercontent.com/proxy/" + "xvtq6_782kBajCBr0GISHpujOb51XLKUeEOJ2lLPKh12-" + "xNBTCtsoHT14NQcaH9l4JhatcXEMBkqgUeCWhb3XhdLnD1BiNzQ_LVydwg=" + "w3840-h2160-p-k-no-nd-mv"), + + // Geometric Shapes + GURL("https://lh3.googleusercontent.com/proxy/" + "FWOBAVfQYasxV3KURX1VVKem1yOC2iazWAb8csOmqCDwI1CCzAA1zCpnAxR-" + "wL2rbfZNcRHbI5b-SZfLASmF7uhJnzrksBWougEGlkw_-4U=w3840-h2160-p-" + "k-no-nd-mv"), + + // Landscapes + GURL("https://lh3.googleusercontent.com/proxy/" + "nMIspgHzTUU0GzmiadmPphBelzF2xy9-tIiejZg3VvJTITxUb-1vILxf-" + "IsCfyl94VSn6YvHa8_PiIyR9d3rwD8ZhNdQ1C1rnblP6zy3OaI=w3840-h2160-" + "p-k-no-nd-mv"), + }}; + return kNtpBackgrounds; +}
diff --git a/chrome/browser/search/background/ntp_backgrounds.h b/chrome/browser/search/background/ntp_backgrounds.h new file mode 100644 index 0000000..7afc0a23 --- /dev/null +++ b/chrome/browser/search/background/ntp_backgrounds.h
@@ -0,0 +1,15 @@ +// Copyright 2019 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. + +#ifndef CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_ +#define CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_ + +#include <array> + +class GURL; + +const size_t kNtpBackgroundsCount = 5; +std::array<GURL, kNtpBackgroundsCount> GetNtpBackgrounds(); + +#endif // CHROME_BROWSER_SEARCH_BACKGROUND_NTP_BACKGROUNDS_H_
diff --git a/chrome/browser/search/background/onboarding_ntp_backgrounds.cc b/chrome/browser/search/background/onboarding_ntp_backgrounds.cc deleted file mode 100644 index d36cda5..0000000 --- a/chrome/browser/search/background/onboarding_ntp_backgrounds.cc +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2019 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/search/background/onboarding_ntp_backgrounds.h" - -#include "url/gurl.h" - -std::array<GURL, kOnboardingNtpBackgroundsCount> GetOnboardingNtpBackgrounds() { - // A set of whitelisted NTP background image URLs that are always considered - // to be valid URLs that are shown to the user as part of the Onboarding flow. - // These backgrounds were handpicked from the Backdrop API based on popularity - // and those requiring minimum maintenance and translation work. This list - // matches with chrome/browser/ui/webui/welcome/nux/ntp_background_handler.cc. - const std::array<GURL, kOnboardingNtpBackgroundsCount> - kOnboardingNtpBackgrounds = {{ - // Art - GURL("https://lh5.googleusercontent.com/proxy/" - "E60bugMrz3Jw0Ty3vD1HqfrrabnAQGlHzIJjRadV1kDS_" - "XSE0AtWuMnjW9VPvq1YeyPJK13gZw63TQYvh2RlaZq_" - "aQm5xskpsgWW1l67gg3mkYaZr07BQqMV47onKA=w3840-h2160-p-k-no-nd-" - "mv"), - - // Cityscape - GURL("https://lh4.googleusercontent.com/proxy/" - "UOhQwfclsAK8TnXZqoTkh9szHvYOJ3auDH07hZBZeVaaRWvzGaXpaYl60MfCRuW" - "_S57gvzBw859pj5Xl2pW_GpfG8k2GhE9LUFNKwA=w3840-h2160-p-k-no-nd-" - "mv"), - - // Earth - GURL("https://lh5.googleusercontent.com/proxy/" - "xvtq6_782kBajCBr0GISHpujOb51XLKUeEOJ2lLPKh12-" - "xNBTCtsoHT14NQcaH9l4JhatcXEMBkqgUeCWhb3XhdLnD1BiNzQ_LVydwg=" - "w3840-h2160-p-k-no-nd-mv"), - - // Geometric Shapes - GURL("https://lh3.googleusercontent.com/proxy/" - "FWOBAVfQYasxV3KURX1VVKem1yOC2iazWAb8csOmqCDwI1CCzAA1zCpnAxR-" - "wL2rbfZNcRHbI5b-SZfLASmF7uhJnzrksBWougEGlkw_-4U=w3840-h2160-p-" - "k-no-nd-mv"), - - // Landscapes - GURL("https://lh3.googleusercontent.com/proxy/" - "nMIspgHzTUU0GzmiadmPphBelzF2xy9-tIiejZg3VvJTITxUb-1vILxf-" - "IsCfyl94VSn6YvHa8_PiIyR9d3rwD8ZhNdQ1C1rnblP6zy3OaI=w3840-h2160-" - "p-k-no-nd-mv"), - }}; - return kOnboardingNtpBackgrounds; -}
diff --git a/chrome/browser/search/background/onboarding_ntp_backgrounds.h b/chrome/browser/search/background/onboarding_ntp_backgrounds.h deleted file mode 100644 index b5570db..0000000 --- a/chrome/browser/search/background/onboarding_ntp_backgrounds.h +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROME_BROWSER_SEARCH_BACKGROUND_ONBOARDING_NTP_BACKGROUNDS_H_ -#define CHROME_BROWSER_SEARCH_BACKGROUND_ONBOARDING_NTP_BACKGROUNDS_H_ - -#include <array> - -#include "url/gurl.h" - -const size_t kOnboardingNtpBackgroundsCount = 5; -std::array<GURL, kOnboardingNtpBackgroundsCount> GetOnboardingNtpBackgrounds(); - -#endif // CHROME_BROWSER_SEARCH_BACKGROUND_ONBOARDING_NTP_BACKGROUNDS_H_
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc index 5cb2d9c..3970f79 100644 --- a/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc +++ b/chrome/browser/sharing/click_to_call/click_to_call_context_menu_observer.cc
@@ -9,7 +9,7 @@ #include "build/build_config.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu.h" -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/sharing/click_to_call/feature.h" #include "chrome/browser/sharing/sharing_constants.h" #include "chrome/browser/sharing/sharing_metrics.h" @@ -143,8 +143,8 @@ LogClickToCallSelectedDeviceIndex(kSharingClickToCallUiContextMenu, chosen_device_index); - ClickToCallSharingDialogController::DeviceSelected( - proxy_->GetWebContents(), url_, devices_[chosen_device_index]); + ClickToCallUiController::DeviceSelected(proxy_->GetWebContents(), url_, + devices_[chosen_device_index]); } gfx::ImageSkia ClickToCallContextMenuObserver::GetContextMenuIcon() const {
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.cc b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller.cc similarity index 67% rename from chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.cc rename to chrome/browser/sharing/click_to_call/click_to_call_ui_controller.cc index 9130241..a6f8a9d 100644 --- a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.cc +++ b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include <utility> @@ -29,21 +29,19 @@ #include "url/url_util.h" using SharingMessage = chrome_browser_sharing::SharingMessage; -using App = ClickToCallSharingDialogController::App; +using App = ClickToCallUiController::App; // static -ClickToCallSharingDialogController* -ClickToCallSharingDialogController::GetOrCreateFromWebContents( +ClickToCallUiController* ClickToCallUiController::GetOrCreateFromWebContents( content::WebContents* web_contents) { - ClickToCallSharingDialogController::CreateForWebContents(web_contents); - return ClickToCallSharingDialogController::FromWebContents(web_contents); + ClickToCallUiController::CreateForWebContents(web_contents); + return ClickToCallUiController::FromWebContents(web_contents); } // static -void ClickToCallSharingDialogController::ShowDialog( - content::WebContents* web_contents, - const GURL& url, - bool hide_default_handler) { +void ClickToCallUiController::ShowDialog(content::WebContents* web_contents, + const GURL& url, + bool hide_default_handler) { auto* controller = GetOrCreateFromWebContents(web_contents); // Invalidate old dialog results. controller->last_dialog_id_++; @@ -53,10 +51,9 @@ } // static -void ClickToCallSharingDialogController::DeviceSelected( - content::WebContents* web_contents, - const GURL& url, - const SharingDeviceInfo& device) { +void ClickToCallUiController::DeviceSelected(content::WebContents* web_contents, + const GURL& url, + const SharingDeviceInfo& device) { auto* controller = GetOrCreateFromWebContents(web_contents); // Invalidate old dialog results. controller->last_dialog_id_++; @@ -64,28 +61,25 @@ controller->OnDeviceChosen(device); } -ClickToCallSharingDialogController::ClickToCallSharingDialogController( +ClickToCallUiController::ClickToCallUiController( content::WebContents* web_contents) - : SharingDialogController(web_contents), + : SharingUiController(web_contents), sharing_service_(SharingServiceFactory::GetForBrowserContext( web_contents->GetBrowserContext())) {} -ClickToCallSharingDialogController::~ClickToCallSharingDialogController() = - default; +ClickToCallUiController::~ClickToCallUiController() = default; -base::string16 ClickToCallSharingDialogController::GetTitle() { +base::string16 ClickToCallUiController::GetTitle() { return l10n_util::GetStringUTF16( IDS_BROWSER_SHARING_CLICK_TO_CALL_DIALOG_TITLE_LABEL); } - -std::vector<SharingDeviceInfo> -ClickToCallSharingDialogController::GetSyncedDevices() { +std::vector<SharingDeviceInfo> ClickToCallUiController::GetSyncedDevices() { return sharing_service_->GetDeviceCandidates( static_cast<int>(SharingDeviceCapability::kTelephony)); } -std::vector<App> ClickToCallSharingDialogController::GetApps() { +std::vector<App> ClickToCallUiController::GetApps() { std::vector<App> apps; if (hide_default_handler_) return apps; @@ -100,8 +94,7 @@ return apps; } -void ClickToCallSharingDialogController::OnDeviceChosen( - const SharingDeviceInfo& device) { +void ClickToCallUiController::OnDeviceChosen(const SharingDeviceInfo& device) { StartLoading(); std::string phone_number_string(phone_url_.GetContent()); @@ -117,35 +110,34 @@ sharing_service_->SendMessageToDevice( device.guid(), kSharingMessageTTL, std::move(sharing_message), - base::Bind(&ClickToCallSharingDialogController::OnMessageSentToDevice, + base::Bind(&ClickToCallUiController::OnMessageSentToDevice, weak_ptr_factory_.GetWeakPtr(), last_dialog_id_)); } -void ClickToCallSharingDialogController::OnMessageSentToDevice(int dialog_id, - bool success) { +void ClickToCallUiController::OnMessageSentToDevice(int dialog_id, + bool success) { if (dialog_id != last_dialog_id_) return; StopLoading(!success); } -void ClickToCallSharingDialogController::OnAppChosen(const App& app) { +void ClickToCallUiController::OnAppChosen(const App& app) { ExternalProtocolHandler::LaunchUrlWithoutSecurityCheck(phone_url_, web_contents()); } -void ClickToCallSharingDialogController::OnHelpTextClicked() { +void ClickToCallUiController::OnHelpTextClicked() { ShowSingletonTab(chrome::FindBrowserWithWebContents(web_contents()), GURL(chrome::kSyncLearnMoreURL)); } -SharingDialog* ClickToCallSharingDialogController::DoShowDialog( - BrowserWindow* window) { +SharingDialog* ClickToCallUiController::DoShowDialog(BrowserWindow* window) { return window->ShowClickToCallDialog(web_contents_, this); } -PageActionIconType ClickToCallSharingDialogController::GetIconType() { +PageActionIconType ClickToCallUiController::GetIconType() { return PageActionIconType::kClickToCall; } -WEB_CONTENTS_USER_DATA_KEY_IMPL(ClickToCallSharingDialogController) +WEB_CONTENTS_USER_DATA_KEY_IMPL(ClickToCallUiController)
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h similarity index 66% rename from chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h rename to chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h index e885ab94..444d4dca 100644 --- a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h +++ b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_SHARING_DIALOG_CONTROLLER_H_ -#define CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_SHARING_DIALOG_CONTROLLER_H_ +#ifndef CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_UI_CONTROLLER_H_ +#define CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_UI_CONTROLLER_H_ #include <string> #include <vector> #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/sharing/sharing_dialog_controller.h" #include "chrome/browser/sharing/sharing_service.h" +#include "chrome/browser/sharing/sharing_ui_controller.h" #include "chrome/browser/ui/page_action/page_action_icon_container.h" #include "content/public/browser/web_contents_user_data.h" #include "url/gurl.h" @@ -22,11 +22,11 @@ class SharingDeviceInfo; -class ClickToCallSharingDialogController - : public SharingDialogController, - public content::WebContentsUserData<ClickToCallSharingDialogController> { +class ClickToCallUiController + : public SharingUiController, + public content::WebContentsUserData<ClickToCallUiController> { public: - static ClickToCallSharingDialogController* GetOrCreateFromWebContents( + static ClickToCallUiController* GetOrCreateFromWebContents( content::WebContents* web_contents); static void ShowDialog(content::WebContents* web_contents, const GURL& url, @@ -35,9 +35,9 @@ const GURL& url, const SharingDeviceInfo& device); - ~ClickToCallSharingDialogController() override; + ~ClickToCallUiController() override; - // Overridden from SharingDialogController: + // Overridden from SharingUiController: base::string16 GetTitle() override; std::vector<SharingDeviceInfo> GetSyncedDevices() override; std::vector<App> GetApps() override; @@ -49,12 +49,11 @@ void OnHelpTextClicked(); protected: - explicit ClickToCallSharingDialogController( - content::WebContents* web_contents); + explicit ClickToCallUiController(content::WebContents* web_contents); SharingDialog* DoShowDialog(BrowserWindow* window) override; private: - friend class content::WebContentsUserData<ClickToCallSharingDialogController>; + friend class content::WebContentsUserData<ClickToCallUiController>; // Called after a message got sent to a device. Shows a new error dialog if // |success| is false and updates the omnibox icon. @@ -70,12 +69,11 @@ // TODO(yasmo): Maybe can be moved to the base class. int last_dialog_id_ = 0; - base::WeakPtrFactory<ClickToCallSharingDialogController> weak_ptr_factory_{ - this}; + base::WeakPtrFactory<ClickToCallUiController> weak_ptr_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); - DISALLOW_COPY_AND_ASSIGN(ClickToCallSharingDialogController); + DISALLOW_COPY_AND_ASSIGN(ClickToCallUiController); }; -#endif // CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_SHARING_DIALOG_CONTROLLER_H_ +#endif // CHROME_BROWSER_SHARING_CLICK_TO_CALL_CLICK_TO_CALL_UI_CONTROLLER_H_
diff --git a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller_unittest.cc b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc similarity index 89% rename from chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller_unittest.cc rename to chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc index e0ac7a6..7f0cfe69 100644 --- a/chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller_unittest.cc +++ b/chrome/browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include <memory> @@ -66,9 +66,9 @@ SharingService::SendMessageCallback callback)); }; -class ClickToCallSharingDialogControllerTest : public testing::Test { +class ClickToCallUiControllerTest : public testing::Test { public: - ClickToCallSharingDialogControllerTest() = default; + ClickToCallUiControllerTest() = default; void SetUp() override { web_contents_ = @@ -79,10 +79,10 @@ return std::make_unique<NiceMock<MockSharingService>>( std::make_unique<SharingFCMHandler>(nullptr, nullptr)); })); - ClickToCallSharingDialogController::ShowDialog( + ClickToCallUiController::ShowDialog( web_contents_.get(), GURL(base::StrCat({"tel:", kPhoneNumber})), false); click_to_call_sharing_dialog_controller_ = - ClickToCallSharingDialogController::GetOrCreateFromWebContents( + ClickToCallUiController::GetOrCreateFromWebContents( web_contents_.get()); } @@ -95,8 +95,7 @@ content::TestBrowserThreadBundle thread_bundle_; TestingProfile profile_; std::unique_ptr<content::WebContents> web_contents_; - ClickToCallSharingDialogController* click_to_call_sharing_dialog_controller_ = - nullptr; + ClickToCallUiController* click_to_call_sharing_dialog_controller_ = nullptr; }; } // namespace @@ -108,7 +107,7 @@ } // Check the call to sharing service when a device is chosen. -TEST_F(ClickToCallSharingDialogControllerTest, OnDeviceChosen) { +TEST_F(ClickToCallUiControllerTest, OnDeviceChosen) { SharingDeviceInfo sharing_device_info( kReceiverGuid, base::UTF8ToUTF16(kReceiverName), sync_pb::SyncEnums::TYPE_PHONE, base::Time::Now(), 1); @@ -122,7 +121,7 @@ } // Check the call to sharing service to get all synced devices. -TEST_F(ClickToCallSharingDialogControllerTest, GetSyncedDevices) { +TEST_F(ClickToCallUiControllerTest, GetSyncedDevices) { EXPECT_CALL(*service(), GetDeviceCandidates(Eq(static_cast<int>( SharingDeviceCapability::kTelephony)))); click_to_call_sharing_dialog_controller_->GetSyncedDevices();
diff --git a/chrome/browser/sharing/click_to_call/feature.cc b/chrome/browser/sharing/click_to_call/feature.cc index 3103834d..2d569cec 100644 --- a/chrome/browser/sharing/click_to_call/feature.cc +++ b/chrome/browser/sharing/click_to_call/feature.cc
@@ -10,6 +10,9 @@ #endif // defined(OS_ANDROID) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) +const base::Feature kClickToCallContextMenuForSelectedText{ + "ClickToCallContextMenuForSelectedText", base::FEATURE_DISABLED_BY_DEFAULT}; + const base::Feature kClickToCallUI{"ClickToCallUI", base::FEATURE_DISABLED_BY_DEFAULT}; #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
diff --git a/chrome/browser/sharing/click_to_call/feature.h b/chrome/browser/sharing/click_to_call/feature.h index 41ee227d..6b79db06 100644 --- a/chrome/browser/sharing/click_to_call/feature.h +++ b/chrome/browser/sharing/click_to_call/feature.h
@@ -16,6 +16,10 @@ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) // Feature to allow click to call gets processed on desktop. extern const base::Feature kClickToCallUI; + +// Feature to show click to call in context menu when selected text is a phone +// number. +extern const base::Feature kClickToCallContextMenuForSelectedText; #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) #endif // CHROME_BROWSER_SHARING_CLICK_TO_CALL_FEATURE_H_
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.cc b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.cc index 9f49852..c5c47f0 100644 --- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.cc +++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.cc
@@ -28,7 +28,7 @@ #include "ui/strings/grit/ui_strings.h" #include "url/url_util.h" -using App = SharingDialogController::App; +using App = SharingUiController::App; // static SharedClipboardUiController* @@ -50,7 +50,7 @@ SharedClipboardUiController::SharedClipboardUiController( content::WebContents* web_contents) - : SharingDialogController(web_contents), + : SharingUiController(web_contents), sharing_service_(SharingServiceFactory::GetForBrowserContext( web_contents->GetBrowserContext())) {}
diff --git a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.h b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.h index eaa104c..2cf24c3 100644 --- a/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.h +++ b/chrome/browser/sharing/shared_clipboard/shared_clipboard_ui_controller.h
@@ -10,8 +10,8 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "chrome/browser/sharing/sharing_dialog_controller.h" #include "chrome/browser/sharing/sharing_service.h" +#include "chrome/browser/sharing/sharing_ui_controller.h" #include "chrome/browser/ui/page_action/page_action_icon_container.h" #include "content/public/browser/web_contents_user_data.h" #include "url/gurl.h" @@ -23,7 +23,7 @@ class SharingDeviceInfo; class SharedClipboardUiController - : public SharingDialogController, + : public SharingUiController, public content::WebContentsUserData<SharedClipboardUiController> { public: static SharedClipboardUiController* GetOrCreateFromWebContents( @@ -34,7 +34,7 @@ ~SharedClipboardUiController() override; - // Overridden from SharingDialogController: + // Overridden from SharingUiController: base::string16 GetTitle() override; std::vector<SharingDeviceInfo> GetSyncedDevices() override; std::vector<App> GetApps() override;
diff --git a/chrome/browser/sharing/sharing_sync_preference.cc b/chrome/browser/sharing/sharing_sync_preference.cc index 66cfdd74..eb4d3aba 100644 --- a/chrome/browser/sharing/sharing_sync_preference.cc +++ b/chrome/browser/sharing/sharing_sync_preference.cc
@@ -5,7 +5,6 @@ #include "chrome/browser/sharing/sharing_sync_preference.h" #include "base/base64.h" -#include "base/memory/ptr_util.h" #include "base/strings/string_piece.h" #include "base/time/time.h" #include "base/value_conversions.h" @@ -29,50 +28,6 @@ const char kRegistrationFcmToken[] = "registration_fcm_token"; const char kRegistrationTimestamp[] = "registration_timestamp"; -base::Time GetTimestamp(const base::Value& value, base::StringPiece key) { - if (!value.is_dict()) - return base::Time(); - base::Time timestamp; - auto* timestamp_value = value.FindKey(key); - if (!timestamp_value || !base::GetValueAsTime(*timestamp_value, ×tamp)) - return base::Time(); - return timestamp; -} - -bool ShouldUseLocalVapidKey(const base::Value& local_value, - const base::Value& server_value) { - auto local_timestamp = GetTimestamp(local_value, kVapidCreationTimestamp); - bool has_local_timestamp = !local_timestamp.is_null(); - if (!has_local_timestamp) - return false; - - auto server_timestamp = GetTimestamp(server_value, kVapidCreationTimestamp); - bool has_server_timestamp = !server_timestamp.is_null(); - if (!has_server_timestamp) - return true; - - // Use older VAPID key if two versions exist to reduce the number of FCM - // registration invalidations as only new devices would encounter this. - return local_timestamp < server_timestamp; -} - -bool ShouldUseLocalDeviceData(const base::Value& local_value, - const base::Value& server_value) { - auto local_timestamp = GetTimestamp(local_value, kDeviceLastUpdated); - bool has_local_timestamp = !local_timestamp.is_null(); - if (!has_local_timestamp) - return false; - - auto server_timestamp = GetTimestamp(server_value, kDeviceLastUpdated); - bool has_server_timestamp = !server_timestamp.is_null(); - if (!has_server_timestamp) - return true; - - // Use newer device data if two versions exist. We guarantee that only the - // same device updates its own data, so clock diff issues should be minimal. - return local_timestamp > server_timestamp; -} - } // namespace SharingSyncPreference::Device::Device(std::string fcm_token, @@ -106,39 +61,6 @@ registry->RegisterDictionaryPref(prefs::kSharingFCMRegistration); } -// static -std::unique_ptr<base::Value> SharingSyncPreference::MaybeMergeVapidKey( - const base::Value& local_value, - const base::Value& server_value) { - return ShouldUseLocalVapidKey(local_value, server_value) - ? base::Value::ToUniquePtrValue(local_value.Clone()) - : nullptr; -} - -// static -std::unique_ptr<base::Value> SharingSyncPreference::MaybeMergeSyncedDevices( - const base::Value& local_value, - const base::Value& server_value) { - if (!local_value.is_dict() || !server_value.is_dict()) - return nullptr; - - base::Value local_overrides(base::Value::Type::DICTIONARY); - for (const auto& it : local_value.DictItems()) { - const std::string& device_guid = it.first; - const base::Value& local = it.second; - const base::Value* server = server_value.FindKey(device_guid); - if (!server || ShouldUseLocalDeviceData(local, *server)) - local_overrides.SetKey(device_guid, local.Clone()); - } - - if (local_overrides.DictEmpty()) - return nullptr; - - base::Value result = server_value.Clone(); - result.MergeDictionary(&local_overrides); - return base::Value::ToUniquePtrValue(std::move(result)); -} - base::Optional<std::vector<uint8_t>> SharingSyncPreference::GetVapidKey() const { const base::DictionaryValue* vapid_key =
diff --git a/chrome/browser/sharing/sharing_sync_preference.h b/chrome/browser/sharing/sharing_sync_preference.h index f21190e..d28270c 100644 --- a/chrome/browser/sharing/sharing_sync_preference.h +++ b/chrome/browser/sharing/sharing_sync_preference.h
@@ -66,20 +66,6 @@ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); - // Returns a copy of |local_value| to sync if its timestamp is older than the - // one of |server_value|. Otherwise returns nullptr which means that we pick - // the |server_value| as is. - static std::unique_ptr<base::Value> MaybeMergeVapidKey( - const base::Value& local_value, - const base::Value& server_value); - - // Returns a new dictionary with devices merged from both |local_value| and - // |server_value| based on their last modified timestamp. May return nullptr - // if we should just pick |server_value| as is. - static std::unique_ptr<base::Value> MaybeMergeSyncedDevices( - const base::Value& local_value, - const base::Value& server_value); - // Returns VAPID key from preferences if present, otherwise returns // base::nullopt. // For more information on vapid keys, please see
diff --git a/chrome/browser/sharing/sharing_sync_preference_unittest.cc b/chrome/browser/sharing/sharing_sync_preference_unittest.cc index 0426b45..34ce31a 100644 --- a/chrome/browser/sharing/sharing_sync_preference_unittest.cc +++ b/chrome/browser/sharing/sharing_sync_preference_unittest.cc
@@ -89,149 +89,6 @@ EXPECT_EQ(kCapabilities, device->capabilities); } -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_BothEmpty) { - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_ServerEmpty) { - base::Time time = base::Time::Now(); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("vapid_creation_timestamp", base::CreateTimeValue(time)); - - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - ASSERT_TRUE(merged); - EXPECT_EQ(local, *merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_LocalEmpty) { - base::Time time = base::Time::Now(); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - server.SetKey("vapid_creation_timestamp", base::CreateTimeValue(time)); - - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_LocalNewer) { - base::Time old_time = base::Time::Now(); - base::Time new_time = old_time + base::TimeDelta::FromSeconds(1); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("vapid_creation_timestamp", base::CreateTimeValue(new_time)); - server.SetKey("vapid_creation_timestamp", base::CreateTimeValue(old_time)); - - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_ServerNewer) { - base::Time old_time = base::Time::Now(); - base::Time new_time = old_time + base::TimeDelta::FromSeconds(1); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("vapid_creation_timestamp", base::CreateTimeValue(old_time)); - server.SetKey("vapid_creation_timestamp", base::CreateTimeValue(new_time)); - - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - ASSERT_TRUE(merged); - EXPECT_EQ(local, *merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeVapidKeys_BothEqual) { - base::Time time = base::Time::Now(); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("vapid_creation_timestamp", base::CreateTimeValue(time)); - server.SetKey("vapid_creation_timestamp", base::CreateTimeValue(time)); - - auto merged = SharingSyncPreference::MaybeMergeVapidKey(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeDevices_BothEmpty) { - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - auto merged = SharingSyncPreference::MaybeMergeSyncedDevices(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeDevices_ServerEmpty) { - base::Time time = base::Time::Now(); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("device-1", CreateRandomDevice(time)); - - auto merged = SharingSyncPreference::MaybeMergeSyncedDevices(local, server); - ASSERT_TRUE(merged); - EXPECT_EQ(local, *merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeDevices_LocalEmpty) { - base::Time time = base::Time::Now(); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - server.SetKey("device-1", CreateRandomDevice(time)); - - auto merged = SharingSyncPreference::MaybeMergeSyncedDevices(local, server); - EXPECT_EQ(nullptr, merged); -} - -TEST_F(SharingSyncPreferenceTest, MergeDevices_BothValues) { - base::Time old_time = base::Time::Now(); - base::Time new_time = old_time + base::TimeDelta::FromSeconds(1); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("local_only", CreateRandomDevice(old_time)); - local.SetKey("server_newer", CreateRandomDevice(old_time)); - server.SetKey("server_newer", CreateRandomDevice(new_time)); - local.SetKey("local_newer", CreateRandomDevice(new_time)); - server.SetKey("local_newer", CreateRandomDevice(old_time)); - local.SetKey("both_same", CreateRandomDevice(old_time)); - server.SetKey("both_same", CreateRandomDevice(old_time)); - server.SetKey("server_only", CreateRandomDevice(old_time)); - - auto merged = SharingSyncPreference::MaybeMergeSyncedDevices(local, server); - ASSERT_TRUE(merged); - - ASSERT_TRUE(merged->FindKey("local_only")); - EXPECT_EQ(*local.FindKey("local_only"), *merged->FindKey("local_only")); - ASSERT_TRUE(merged->FindKey("server_newer")); - EXPECT_EQ(*server.FindKey("server_newer"), *merged->FindKey("server_newer")); - ASSERT_TRUE(merged->FindKey("local_newer")); - EXPECT_EQ(*local.FindKey("local_newer"), *merged->FindKey("local_newer")); - ASSERT_TRUE(merged->FindKey("both_same")); - EXPECT_EQ(*server.FindKey("both_same"), *merged->FindKey("both_same")); - ASSERT_TRUE(merged->FindKey("server_only")); - EXPECT_EQ(*server.FindKey("server_only"), *merged->FindKey("server_only")); -} - -TEST_F(SharingSyncPreferenceTest, MergeDevices_ServerOnlyOrNewer) { - base::Time old_time = base::Time::Now(); - base::Time new_time = old_time + base::TimeDelta::FromSeconds(1); - base::Value local(base::Value::Type::DICTIONARY); - base::Value server(base::Value::Type::DICTIONARY); - - local.SetKey("server_newer", CreateRandomDevice(old_time)); - server.SetKey("server_newer", CreateRandomDevice(new_time)); - server.SetKey("server_only", CreateRandomDevice(old_time)); - - auto merged = SharingSyncPreference::MaybeMergeSyncedDevices(local, server); - EXPECT_EQ(nullptr, merged); -} - TEST_F(SharingSyncPreferenceTest, FCMRegistrationGetSet) { EXPECT_FALSE(sharing_sync_preference_.GetFCMRegistration());
diff --git a/chrome/browser/sharing/sharing_dialog_controller.cc b/chrome/browser/sharing/sharing_ui_controller.cc similarity index 67% rename from chrome/browser/sharing/sharing_dialog_controller.cc rename to chrome/browser/sharing/sharing_ui_controller.cc index 69b9c5d..05cb68d 100644 --- a/chrome/browser/sharing/sharing_dialog_controller.cc +++ b/chrome/browser/sharing/sharing_ui_controller.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/sharing/sharing_dialog_controller.h" +#include "chrome/browser/sharing/sharing_ui_controller.h" #include <utility> @@ -10,20 +10,19 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_window.h" -SharingDialogController::App::App(const gfx::VectorIcon& icon, - base::string16 name, - std::string identifier) +SharingUiController::App::App(const gfx::VectorIcon& icon, + base::string16 name, + std::string identifier) : icon(icon), name(std::move(name)), identifier(std::move(identifier)) {} -SharingDialogController::App::App(App&& other) = default; +SharingUiController::App::App(App&& other) = default; -SharingDialogController::App::~App() = default; +SharingUiController::App::~App() = default; -SharingDialogController::SharingDialogController( - content::WebContents* web_contents) +SharingUiController::SharingUiController(content::WebContents* web_contents) : web_contents_(web_contents) {} -void SharingDialogController::ShowNewDialog() { +void SharingUiController::ShowNewDialog() { if (dialog_) dialog_->Hide(); @@ -40,7 +39,7 @@ UpdateIcon(); } -void SharingDialogController::UpdateIcon() { +void SharingUiController::UpdateIcon() { Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); auto* window = browser ? browser->window() : nullptr; if (!window) @@ -51,7 +50,7 @@ icon_container->UpdatePageActionIcon(GetIconType()); } -void SharingDialogController::OnDialogClosed(SharingDialog* dialog) { +void SharingUiController::OnDialogClosed(SharingDialog* dialog) { // Ignore already replaced dialogs. if (dialog != dialog_) return; @@ -60,7 +59,7 @@ UpdateIcon(); } -void SharingDialogController::ShowErrorDialog() { +void SharingUiController::ShowErrorDialog() { Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); if (!browser) return; @@ -69,13 +68,13 @@ ShowNewDialog(); } -void SharingDialogController::StartLoading() { +void SharingUiController::StartLoading() { is_loading_ = true; send_failed_ = false; UpdateIcon(); } -void SharingDialogController::StopLoading(bool send_failed) { +void SharingUiController::StopLoading(bool send_failed) { is_loading_ = false; send_failed_ = send_failed; UpdateIcon(); @@ -84,7 +83,7 @@ ShowErrorDialog(); } -void SharingDialogController::InvalidateOldDialog() { +void SharingUiController::InvalidateOldDialog() { is_loading_ = false; send_failed_ = false; ShowNewDialog();
diff --git a/chrome/browser/sharing/sharing_dialog_controller.h b/chrome/browser/sharing/sharing_ui_controller.h similarity index 87% rename from chrome/browser/sharing/sharing_dialog_controller.h rename to chrome/browser/sharing/sharing_ui_controller.h index 9f5121e..6fe1bab 100644 --- a/chrome/browser/sharing/sharing_dialog_controller.h +++ b/chrome/browser/sharing/sharing_ui_controller.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_SHARING_SHARING_DIALOG_CONTROLLER_H_ -#define CHROME_BROWSER_SHARING_SHARING_DIALOG_CONTROLLER_H_ +#ifndef CHROME_BROWSER_SHARING_SHARING_UI_CONTROLLER_H_ +#define CHROME_BROWSER_SHARING_SHARING_UI_CONTROLLER_H_ #include <string> #include <vector> @@ -25,7 +25,7 @@ } // namespace content // The controller for desktop dialog with the list of synced devices and apps. -class SharingDialogController { +class SharingUiController { public: struct App { App(const gfx::VectorIcon& icon, @@ -39,8 +39,8 @@ std::string identifier; }; - explicit SharingDialogController(content::WebContents* web_contents); - virtual ~SharingDialogController() = default; + explicit SharingUiController(content::WebContents* web_contents); + virtual ~SharingUiController() = default; // Title of the dialog. virtual base::string16 GetTitle() = 0; @@ -88,4 +88,4 @@ content::WebContents* web_contents_ = nullptr; }; -#endif // CHROME_BROWSER_SHARING_SHARING_DIALOG_CONTROLLER_H_ +#endif // CHROME_BROWSER_SHARING_SHARING_UI_CONTROLLER_H_
diff --git a/chrome/browser/sync/test/integration/enable_disable_test.cc b/chrome/browser/sync/test/integration/enable_disable_test.cc index 5441a92..3aed8c6 100644 --- a/chrome/browser/sync/test/integration/enable_disable_test.cc +++ b/chrome/browser/sync/test/integration/enable_disable_test.cc
@@ -125,14 +125,15 @@ ASSERT_TRUE(GetClient(0)->AwaitSyncSetupCompletion()); } - registered_types_ = GetSyncService(0)->GetRegisteredDataTypes(); - multi_grouped_types_ = MultiGroupTypes(registered_types_); + registered_data_types_ = GetSyncService(0)->GetRegisteredDataTypes(); + multi_grouped_types_ = MultiGroupTypes(registered_data_types_); + registered_selectable_types_ = GetRegisteredSelectableTypes(0); } ModelTypeSet ResolveGroup(UserSelectableType type) { ModelTypeSet grouped_types = syncer::SyncUserSettingsImpl::ResolvePreferredTypesForTesting({type}); - grouped_types.RetainAll(registered_types_); + grouped_types.RetainAll(registered_data_types_); grouped_types.RemoveAll(ProxyTypes()); return grouped_types; } @@ -141,8 +142,9 @@ return Difference(input, multi_grouped_types_); } - ModelTypeSet registered_types_; + ModelTypeSet registered_data_types_; ModelTypeSet multi_grouped_types_; + UserSelectableTypeSet registered_selectable_types_; private: fake_server::EntityBuilderFactory entity_builder_factory_; @@ -154,7 +156,7 @@ // Setup sync with no enabled types. SetupTest(/*all_types_enabled=*/false); - for (UserSelectableType type : UserSelectableTypeSet::All()) { + for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType single_grouped_type : WithoutMultiTypes(grouped_types)) { ASSERT_FALSE(ModelTypeExists(single_grouped_type)) @@ -187,7 +189,7 @@ // Setup sync with no disabled types. SetupTest(/*all_types_enabled=*/true); - for (UserSelectableType type : UserSelectableTypeSet::All()) { + for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType grouped_type : grouped_types) { ASSERT_TRUE(ModelTypeExists(grouped_type)) @@ -215,7 +217,7 @@ // Setup sync with no enabled types. SetupTest(/*all_types_enabled=*/false); - for (UserSelectableType type : UserSelectableTypeSet::All()) { + for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); const ModelTypeSet single_grouped_types = WithoutMultiTypes(grouped_types); for (ModelType single_grouped_type : single_grouped_types) { @@ -247,7 +249,7 @@ // Setup sync with no disabled types. SetupTest(/*all_types_enabled=*/true); - for (UserSelectableType type : UserSelectableTypeSet::All()) { + for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet grouped_types = ResolveGroup(type); for (ModelType grouped_type : grouped_types) { ASSERT_TRUE(ModelTypeExists(grouped_type)) @@ -271,7 +273,7 @@ // Setup sync with no enabled types. SetupTest(/*all_types_enabled=*/false); - for (UserSelectableType type : UserSelectableTypeSet::All()) { + for (UserSelectableType type : registered_selectable_types_) { const ModelTypeSet single_grouped_types = WithoutMultiTypes(ResolveGroup(type)); for (ModelType single_grouped_type : single_grouped_types) { @@ -298,7 +300,7 @@ // Enable all, and then disable immediately afterwards, before datatypes // have had the chance to finish startup (which usually involves task // posting). - GetClient(0)->EnableSyncForAllDatatypes(); + GetClient(0)->EnableSyncForRegisteredDatatypes(); GetClient(0)->DisableSyncForAllDatatypes(); for (UserSelectableType type : UserSelectableTypeSet::All()) { @@ -332,9 +334,9 @@ // Enable all, and then disable+reenable immediately afterwards, before // datatypes have had the chance to finish startup (which usually involves // task posting). - GetClient(0)->EnableSyncForAllDatatypes(); + GetClient(0)->EnableSyncForRegisteredDatatypes(); GetClient(0)->DisableSyncForAllDatatypes(); - GetClient(0)->EnableSyncForAllDatatypes(); + GetClient(0)->EnableSyncForRegisteredDatatypes(); for (UserSelectableType type : UserSelectableTypeSet::All()) { for (ModelType model_type : ResolveGroup(type)) {
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc index f15630a..655749f 100644 --- a/chrome/browser/sync/test/integration/profile_sync_service_harness.cc +++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
@@ -194,7 +194,8 @@ bool ProfileSyncServiceHarness::SetupSync() { bool result = - SetupSyncNoWaitForCompletion(syncer::UserSelectableTypeSet::All()) && + SetupSyncNoWaitForCompletion( + service()->GetUserSettings()->GetRegisteredSelectableTypes()) && AwaitSyncSetupCompletion(); if (!result) { LOG(ERROR) << profile_debug_name_ << ": SetupSync failed. Syncer status:\n" @@ -488,8 +489,8 @@ return false; } -bool ProfileSyncServiceHarness::EnableSyncForAllDatatypes() { - DVLOG(1) << GetClientInfoString("EnableSyncForAllDatatypes"); +bool ProfileSyncServiceHarness::EnableSyncForRegisteredDatatypes() { + DVLOG(1) << GetClientInfoString("EnableSyncForRegisteredDatatypes"); if (!IsSyncEnabledByUser()) { bool result = SetupSync(); @@ -499,20 +500,21 @@ } if (service() == nullptr) { - LOG(ERROR) << "EnableSyncForAllDatatypes(): service() is null."; + LOG(ERROR) << "EnableSyncForRegisteredDatatypes(): service() is null."; return false; } service()->GetUserSettings()->SetSelectedTypes( - true, syncer::UserSelectableTypeSet::All()); + true, service()->GetUserSettings()->GetRegisteredSelectableTypes()); if (AwaitSyncSetupCompletion()) { - DVLOG(1) << "EnableSyncForAllDatatypes(): Enabled sync for all datatypes " - << "on " << profile_debug_name_ << "."; + DVLOG(1) + << "EnableSyncForRegisteredDatatypes(): Enabled sync for all datatypes " + << "on " << profile_debug_name_ << "."; return true; } - DVLOG(0) << GetClientInfoString("EnableSyncForAllDatatypes failed"); + DVLOG(0) << GetClientInfoString("EnableSyncForRegisteredDatatypes failed"); return false; }
diff --git a/chrome/browser/sync/test/integration/profile_sync_service_harness.h b/chrome/browser/sync/test/integration/profile_sync_service_harness.h index 1f714dc..b8c4270 100644 --- a/chrome/browser/sync/test/integration/profile_sync_service_harness.h +++ b/chrome/browser/sync/test/integration/profile_sync_service_harness.h
@@ -149,8 +149,8 @@ // all corresponding datatypes). Returns true on success. bool DisableSyncForType(syncer::UserSelectableType type); - // Enables sync for all sync datatypes. Returns true on success. - bool EnableSyncForAllDatatypes(); + // Enables sync for all registered sync datatypes. Returns true on success. + bool EnableSyncForRegisteredDatatypes(); // Disables sync for all sync datatypes. Returns true on success. bool DisableSyncForAllDatatypes();
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index cdddf24..0a4cf3a 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -469,6 +469,13 @@ GetProfile(index)); } +syncer::UserSelectableTypeSet SyncTest::GetRegisteredSelectableTypes( + int index) { + return GetSyncService(index) + ->GetUserSettings() + ->GetRegisteredSelectableTypes(); +} + std::vector<ProfileSyncService*> SyncTest::GetSyncServices() { std::vector<ProfileSyncService*> services; for (int i = 0; i < num_clients(); ++i) { @@ -744,17 +751,17 @@ if (encryption_passphrase_provided) { CHECK(client->SetupSyncWithEncryptionPassphraseNoWaitForCompletion( - syncer::UserSelectableTypeSet::All(), + GetRegisteredSelectableTypes(client_index), encryption_passphrase_it->second)) << "SetupSync() failed."; } else if (decryption_passphrase_provided) { CHECK(client->SetupSyncWithDecryptionPassphraseNoWaitForCompletion( - syncer::UserSelectableTypeSet::All(), + GetRegisteredSelectableTypes(client_index), decryption_passphrase_it->second)) << "SetupSync() failed."; } else { CHECK(client->SetupSyncNoWaitForCompletion( - syncer::UserSelectableTypeSet::All())) + GetRegisteredSelectableTypes(client_index))) << "SetupSync() failed."; }
diff --git a/chrome/browser/sync/test/integration/sync_test.h b/chrome/browser/sync/test/integration/sync_test.h index 6aecfa77..a0acecc 100644 --- a/chrome/browser/sync/test/integration/sync_test.h +++ b/chrome/browser/sync/test/integration/sync_test.h
@@ -19,6 +19,7 @@ #include "chrome/common/buildflags.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/sync/base/model_type.h" +#include "components/sync/base/user_selectable_type.h" #include "components/sync/test/fake_server/fake_server.h" #include "net/http/http_status_code.h" #include "net/url_request/url_request_status.h" @@ -139,6 +140,10 @@ // Returns the set of ProfileSyncServices. std::vector<syncer::ProfileSyncService*> GetSyncServices(); + // Returns the set of registered UserSelectableTypes. This is retrieved from + // the ProfileSyncService at the given |index|. + syncer::UserSelectableTypeSet GetRegisteredSelectableTypes(int index); + // Returns a pointer to the sync profile that is used to verify changes to // individual sync profiles. Callee owns the object and manages its lifetime. Profile* verifier();
diff --git a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc index 80be09073..56370e4 100644 --- a/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc
@@ -342,7 +342,7 @@ ASSERT_TRUE(UpdatedProgressMarkerChecker(GetSyncService(0)).Wait()); ASSERT_FALSE(AllProfilesHaveSameAppList()); - ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); + ASSERT_TRUE(GetClient(1)->EnableSyncForRegisteredDatatypes()); AwaitQuiescenceAndInstallAppsPendingForSync(); ASSERT_TRUE(AllProfilesHaveSameAppList());
diff --git a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc index e46f9f40..884a6bd 100644 --- a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
@@ -1620,7 +1620,7 @@ ASSERT_NE(nullptr, AddFolder(1, IndexedFolderName(1))); ASSERT_FALSE(AllModelsMatch()); - ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); + ASSERT_TRUE(GetClient(1)->EnableSyncForRegisteredDatatypes()); ASSERT_TRUE(BookmarksMatchChecker().Wait()); }
diff --git a/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc b/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc index 28628ed..7833d79 100644 --- a/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
@@ -109,9 +109,9 @@ UpdatedProgressMarkerChecker(GetSyncService(kEncryptingClientId)).Wait()); // Set up a new sync client. - ASSERT_TRUE( - GetClient(kDecryptingClientId) - ->SetupSyncNoWaitForCompletion(syncer::UserSelectableTypeSet::All())); + ASSERT_TRUE(GetClient(kDecryptingClientId) + ->SetupSyncNoWaitForCompletion( + GetRegisteredSelectableTypes(kDecryptingClientId))); ASSERT_TRUE( PassphraseRequiredChecker(GetSyncService(kDecryptingClientId)).Wait());
diff --git a/chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc b/chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc index bd52253..54920cbe 100644 --- a/chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_dictionary_sync_test.cc
@@ -158,7 +158,7 @@ // any sort of limit. This will cause client #1 to have 3 * chunk_size. When // client #1 then tries to commit changes, that is when it obeys the limit // and will cause client #0 to only see the limit worth of words. - ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); + ASSERT_TRUE(GetClient(1)->EnableSyncForRegisteredDatatypes()); ASSERT_TRUE(NumDictionaryEntriesChecker(1, 3 * chunk_size).Wait()); ASSERT_TRUE(ServerCountMatchStatusChecker(syncer::DICTIONARY, kMaxSyncableDictionaryWords)
diff --git a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc index e50358d..8c663fcd 100644 --- a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
@@ -308,7 +308,7 @@ // When client 1 hits a passphrase required state, we can infer that // client 0's passphrase has been committed. to the server. ASSERT_TRUE(GetClient(1)->SetupSyncNoWaitForCompletion( - syncer::UserSelectableTypeSet::All())); + GetRegisteredSelectableTypes(1))); ASSERT_TRUE(PassphraseRequiredChecker(GetSyncService(1)).Wait()); // Get client 1 out of the passphrase required state.
diff --git a/chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc b/chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc index 5d60f13..fe881d2 100644 --- a/chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_search_engines_sync_test.cc
@@ -221,7 +221,7 @@ ASSERT_TRUE(search_engines_helper::ServiceMatchesVerifier(0)); ASSERT_FALSE(search_engines_helper::ServiceMatchesVerifier(1)); - ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes()); + ASSERT_TRUE(GetClient(1)->EnableSyncForRegisteredDatatypes()); ASSERT_TRUE(AwaitQuiescence()); ASSERT_TRUE(search_engines_helper::AllServicesMatch()); }
diff --git a/chrome/browser/sync/test/integration/two_client_user_events_sync_test.cc b/chrome/browser/sync/test/integration/two_client_user_events_sync_test.cc index 12140ee..1d49ca02b 100644 --- a/chrome/browser/sync/test/integration/two_client_user_events_sync_test.cc +++ b/chrome/browser/sync/test/integration/two_client_user_events_sync_test.cc
@@ -78,9 +78,9 @@ base::Time() + base::TimeDelta::FromMicroseconds(1))); // Set up sync on the second client. - ASSERT_TRUE( - GetClient(kDecryptingClientId) - ->SetupSyncNoWaitForCompletion(syncer::UserSelectableTypeSet::All())); + ASSERT_TRUE(GetClient(kDecryptingClientId) + ->SetupSyncNoWaitForCompletion( + GetRegisteredSelectableTypes(kDecryptingClientId))); // The second client asks the user to provide a password for decryption. ASSERT_TRUE( PassphraseRequiredChecker(GetSyncService(kDecryptingClientId)).Wait());
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_task.cc b/chrome/browser/task_manager/providers/arc/arc_process_task.cc index 4fcdbc59..fb4a0b60 100644 --- a/chrome/browser/task_manager/providers/arc/arc_process_task.cc +++ b/chrome/browser/task_manager/providers/arc/arc_process_task.cc
@@ -160,9 +160,9 @@ // Instead of calling into StartIconLoading() directly, return to the main // loop first to make sure other ArcBridgeService observers are notified. // Otherwise, arc::ArcIntentHelperBridge::GetActivityIcon() may fail again. - base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::UI}, - base::BindOnce(&ArcProcessTask::StartIconLoading, - weak_ptr_factory_.GetWeakPtr())); + base::PostTask(FROM_HERE, {content::BrowserThread::UI}, + base::BindOnce(&ArcProcessTask::StartIconLoading, + weak_ptr_factory_.GetWeakPtr())); } void ArcProcessTask::SetProcessState(arc::mojom::ProcessState process_state) {
diff --git a/chrome/browser/task_manager/providers/child_process_task.cc b/chrome/browser/task_manager/providers/child_process_task.cc index 0f9d035..5603218 100644 --- a/chrome/browser/task_manager/providers/child_process_task.cc +++ b/chrome/browser/task_manager/providers/child_process_task.cc
@@ -133,10 +133,10 @@ ProcessResourceUsage* CreateProcessResourcesSampler( int unique_child_process_id) { content::mojom::ResourceUsageReporterPtr usage_reporter; - base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&ConnectResourceReporterOnIOThread, - unique_child_process_id, - mojo::MakeRequest(&usage_reporter))); + base::PostTask(FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&ConnectResourceReporterOnIOThread, + unique_child_process_id, + mojo::MakeRequest(&usage_reporter))); return new ProcessResourceUsage(std::move(usage_reporter)); }
diff --git a/chrome/browser/task_manager/providers/child_process_task_provider.cc b/chrome/browser/task_manager/providers/child_process_task_provider.cc index 038ad0d..3759d45b 100644 --- a/chrome/browser/task_manager/providers/child_process_task_provider.cc +++ b/chrome/browser/task_manager/providers/child_process_task_provider.cc
@@ -81,7 +81,7 @@ DCHECK(tasks_by_child_id_.empty()); // First, get the pre-existing child processes data. - base::PostTaskWithTraitsAndReplyWithResult( + base::PostTaskAndReplyWithResult( FROM_HERE, {BrowserThread::IO}, base::Bind(&CollectChildProcessData), base::Bind(&ChildProcessTaskProvider::ChildProcessDataCollected, weak_ptr_factory_.GetWeakPtr()));
diff --git a/chrome/browser/task_manager/providers/crostini/crostini_process_task_provider.cc b/chrome/browser/task_manager/providers/crostini/crostini_process_task_provider.cc index bf16d07..8fb1db30 100644 --- a/chrome/browser/task_manager/providers/crostini/crostini_process_task_provider.cc +++ b/chrome/browser/task_manager/providers/crostini/crostini_process_task_provider.cc
@@ -113,8 +113,9 @@ }; CrostiniProcessTaskProvider::CrostiniProcessTaskProvider() - : task_runner_(base::CreateSequencedTaskRunnerWithTraits( - {base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN, + : task_runner_(base::CreateSequencedTaskRunner( + {base::ThreadPool(), base::MayBlock(), + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN, base::TaskPriority::USER_VISIBLE})), refresh_timer_(FROM_HERE, kRefreshProcessListDelay,
diff --git a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc index d437f17..f3bbf5b8 100644 --- a/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc +++ b/chrome/browser/task_manager/sampling/shared_sampler_win_unittest.cc
@@ -64,7 +64,8 @@ private: static scoped_refptr<base::SequencedTaskRunner> GetBlockingPoolRunner() { - return base::CreateSequencedTaskRunnerWithTraits({base::MayBlock()}); + return base::CreateSequencedTaskRunner( + {base::ThreadPool(), base::MayBlock()}); } void OnRefreshTypeFinished(int64_t finished_refresh_type) {
diff --git a/chrome/browser/task_manager/sampling/task_group.cc b/chrome/browser/task_manager/sampling/task_group.cc index 9c4e5a0..d7ccb60d 100644 --- a/chrome/browser/task_manager/sampling/task_group.cc +++ b/chrome/browser/task_manager/sampling/task_group.cc
@@ -285,7 +285,7 @@ #if BUILDFLAG(ENABLE_NACL) void TaskGroup::RefreshNaClDebugStubPort(int child_process_unique_id) { - base::PostTaskWithTraitsAndReplyWithResult( + base::PostTaskAndReplyWithResult( FROM_HERE, {content::BrowserThread::IO}, base::Bind(&GetNaClDebugStubPortOnIoThread, child_process_unique_id), base::Bind(&TaskGroup::OnRefreshNaClDebugStubPortDone,
diff --git a/chrome/browser/task_manager/sampling/task_group_unittest.cc b/chrome/browser/task_manager/sampling/task_group_unittest.cc index c8b20d90..44fe39e 100644 --- a/chrome/browser/task_manager/sampling/task_group_unittest.cc +++ b/chrome/browser/task_manager/sampling/task_group_unittest.cc
@@ -59,8 +59,8 @@ class TaskGroupTest : public testing::Test { public: TaskGroupTest() - : io_task_runner_(base::CreateSingleThreadTaskRunnerWithTraits( - {content::BrowserThread::IO})), + : io_task_runner_( + base::CreateSingleThreadTaskRunner({content::BrowserThread::IO})), run_loop_(std::make_unique<base::RunLoop>()) {} protected:
diff --git a/chrome/browser/task_manager/sampling/task_manager_impl.cc b/chrome/browser/task_manager/sampling/task_manager_impl.cc index 9677d5c..89bbd63 100644 --- a/chrome/browser/task_manager/sampling/task_manager_impl.cc +++ b/chrome/browser/task_manager/sampling/task_manager_impl.cc
@@ -76,8 +76,9 @@ : on_background_data_ready_callback_( base::Bind(&TaskManagerImpl::OnTaskGroupBackgroundCalculationsDone, base::Unretained(this))), - blocking_pool_runner_(base::CreateSequencedTaskRunnerWithTraits( - {base::MayBlock(), base::TaskPriority::BEST_EFFORT, + blocking_pool_runner_(base::CreateSequencedTaskRunner( + {base::ThreadPool(), base::MayBlock(), + base::TaskPriority::BEST_EFFORT, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})), shared_sampler_(new SharedSampler(blocking_pool_runner_)), is_running_(false),
diff --git a/chrome/browser/themes/theme_service_aurax11.cc b/chrome/browser/themes/theme_service_aura_linux.cc similarity index 83% rename from chrome/browser/themes/theme_service_aurax11.cc rename to chrome/browser/themes/theme_service_aura_linux.cc index 3a4c40d3..3ce50bfe 100644 --- a/chrome/browser/themes/theme_service_aurax11.cc +++ b/chrome/browser/themes/theme_service_aura_linux.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/themes/theme_service_aurax11.h" +#include "chrome/browser/themes/theme_service_aura_linux.h" #include "base/bind.h" #include "base/macros.h" @@ -54,7 +54,7 @@ pref_service_->SetBoolean(prefs::kUsesSystemTheme, false); // Have the former theme notify its observers of change. if (linux_ui_) - linux_ui_->GetNativeTheme(NULL)->NotifyObservers(); + linux_ui_->GetNativeTheme(nullptr)->NotifyObservers(); } bool SystemThemeX11::GetTint(int id, color_utils::HSL* hsl) const { @@ -81,33 +81,33 @@ } // namespace -ThemeServiceAuraX11::ThemeServiceAuraX11() {} +ThemeServiceAuraLinux::ThemeServiceAuraLinux() = default; -ThemeServiceAuraX11::~ThemeServiceAuraX11() {} +ThemeServiceAuraLinux::~ThemeServiceAuraLinux() = default; -bool ThemeServiceAuraX11::ShouldInitWithSystemTheme() const { +bool ThemeServiceAuraLinux::ShouldInitWithSystemTheme() const { return profile()->GetPrefs()->GetBoolean(prefs::kUsesSystemTheme); } -void ThemeServiceAuraX11::UseSystemTheme() { +void ThemeServiceAuraLinux::UseSystemTheme() { SetCustomDefaultTheme(new SystemThemeX11(profile()->GetPrefs())); } -bool ThemeServiceAuraX11::IsSystemThemeDistinctFromDefaultTheme() const { +bool ThemeServiceAuraLinux::IsSystemThemeDistinctFromDefaultTheme() const { return true; } -bool ThemeServiceAuraX11::UsingDefaultTheme() const { +bool ThemeServiceAuraLinux::UsingDefaultTheme() const { return ThemeService::UsingDefaultTheme() && !UsingSystemTheme(); } -bool ThemeServiceAuraX11::UsingSystemTheme() const { +bool ThemeServiceAuraLinux::UsingSystemTheme() const { const CustomThemeSupplier* theme_supplier = get_theme_supplier(); return theme_supplier && theme_supplier->get_theme_type() == CustomThemeSupplier::NATIVE_X11; } -void ThemeServiceAuraX11::FixInconsistentPreferencesIfNeeded() { +void ThemeServiceAuraLinux::FixInconsistentPreferencesIfNeeded() { PrefService* prefs = profile()->GetPrefs(); // When using the system theme, the theme ID should match the default. Give
diff --git a/chrome/browser/themes/theme_service_aurax11.h b/chrome/browser/themes/theme_service_aura_linux.h similarity index 63% rename from chrome/browser/themes/theme_service_aurax11.h rename to chrome/browser/themes/theme_service_aura_linux.h index 0286525b..b4b8cbc 100644 --- a/chrome/browser/themes/theme_service_aurax11.h +++ b/chrome/browser/themes/theme_service_aura_linux.h
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ -#define CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ +#ifndef CHROME_BROWSER_THEMES_THEME_SERVICE_AURA_LINUX_H_ +#define CHROME_BROWSER_THEMES_THEME_SERVICE_AURA_LINUX_H_ #include "base/macros.h" #include "chrome/browser/themes/theme_service.h" // A subclass of ThemeService that manages the CustomThemeSupplier which -// provides the native X11 theme. -class ThemeServiceAuraX11 : public ThemeService { +// provides the native Linux theme. +class ThemeServiceAuraLinux : public ThemeService { public: - ThemeServiceAuraX11(); - ~ThemeServiceAuraX11() override; + ThemeServiceAuraLinux(); + ~ThemeServiceAuraLinux() override; // Overridden from ThemeService: bool ShouldInitWithSystemTheme() const override; @@ -24,7 +24,7 @@ void FixInconsistentPreferencesIfNeeded() override; private: - DISALLOW_COPY_AND_ASSIGN(ThemeServiceAuraX11); + DISALLOW_COPY_AND_ASSIGN(ThemeServiceAuraLinux); }; -#endif // CHROME_BROWSER_THEMES_THEME_SERVICE_AURAX11_H_ +#endif // CHROME_BROWSER_THEMES_THEME_SERVICE_AURA_LINUX_H_
diff --git a/chrome/browser/themes/theme_service_factory.cc b/chrome/browser/themes/theme_service_factory.cc index feb337b..c3bc959 100644 --- a/chrome/browser/themes/theme_service_factory.cc +++ b/chrome/browser/themes/theme_service_factory.cc
@@ -18,8 +18,8 @@ #if defined(OS_WIN) #include "chrome/browser/themes/theme_service_win.h" -#elif defined(USE_X11) -#include "chrome/browser/themes/theme_service_aurax11.h" +#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) +#include "chrome/browser/themes/theme_service_aura_linux.h" #include "ui/views/linux_ui/linux_ui.h" #endif @@ -60,8 +60,8 @@ ThemeService* provider = NULL; #if defined(OS_WIN) provider = new ThemeServiceWin; -#elif defined(USE_X11) - provider = new ThemeServiceAuraX11; +#elif defined(OS_LINUX) && !defined(OS_CHROMEOS) + provider = new ThemeServiceAuraLinux; #else provider = new ThemeService; #endif @@ -72,7 +72,7 @@ void ThemeServiceFactory::RegisterProfilePrefs( user_prefs::PrefRegistrySyncable* registry) { -#if defined(USE_X11) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) bool default_uses_system_theme = false; const views::LinuxUI* linux_ui = views::LinuxUI::instance();
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index efe5670..68306a2 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1912,6 +1912,7 @@ "//chromeos/services/assistant/public:feature_flags", "//chromeos/services/assistant/public/mojom", "//chromeos/services/assistant/public/proto:proto", + "//chromeos/services/cellular_setup", "//chromeos/services/cellular_setup/public/mojom", "//chromeos/services/machine_learning/public/cpp", "//chromeos/services/multidevice_setup/public/cpp", @@ -3025,6 +3026,8 @@ "views/tabs/alert_indicator.h", "views/tabs/browser_tab_strip_controller.cc", "views/tabs/browser_tab_strip_controller.h", + "views/tabs/color_picker_view.cc", + "views/tabs/color_picker_view.h", "views/tabs/glow_hover_controller.cc", "views/tabs/glow_hover_controller.h", "views/tabs/new_tab_button.cc",
diff --git a/chrome/browser/ui/OWNERS b/chrome/browser/ui/OWNERS index 635ae05f..069d479 100644 --- a/chrome/browser/ui/OWNERS +++ b/chrome/browser/ui/OWNERS
@@ -1,5 +1,6 @@ ellyjones@chromium.org msw@chromium.org +pbos@chromium.org pkasting@chromium.org sky@chromium.org tapted@chromium.org
diff --git a/chrome/browser/ui/android/sms/sms_dialog_android.cc b/chrome/browser/ui/android/sms/sms_dialog_android.cc index a921103a..70c0ae07 100644 --- a/chrome/browser/ui/android/sms/sms_dialog_android.cc +++ b/chrome/browser/ui/android/sms/sms_dialog_android.cc
@@ -7,17 +7,24 @@ #include "base/android/jni_android.h" #include "base/android/jni_string.h" #include "chrome/android/chrome_jni_headers/SmsReceiverDialog_jni.h" +#include "components/url_formatter/elide_url.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "ui/android/window_android.h" +#include "url/origin.h" using base::android::AttachCurrentThread; using base::android::JavaParamRef; using base::android::ScopedJavaLocalRef; -SmsDialogAndroid::SmsDialogAndroid() { +SmsDialogAndroid::SmsDialogAndroid(const url::Origin& origin) { + JNIEnv* env = AttachCurrentThread(); + base::android::ScopedJavaLocalRef<jstring> origin_string = + base::android::ConvertUTF16ToJavaString( + env, url_formatter::FormatOriginForSecurityDisplay( + origin, url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS)); java_dialog_.Reset(Java_SmsReceiverDialog_create( - AttachCurrentThread(), reinterpret_cast<intptr_t>(this))); + env, reinterpret_cast<intptr_t>(this), origin_string)); } SmsDialogAndroid::~SmsDialogAndroid() {
diff --git a/chrome/browser/ui/android/sms/sms_dialog_android.h b/chrome/browser/ui/android/sms/sms_dialog_android.h index b9c20bcd..6f4caa1 100644 --- a/chrome/browser/ui/android/sms/sms_dialog_android.h +++ b/chrome/browser/ui/android/sms/sms_dialog_android.h
@@ -8,11 +8,15 @@ #include "base/android/scoped_java_ref.h" #include "content/public/browser/sms_dialog.h" +namespace url { +class Origin; +} + // The SmsDialogAndroid implements the SmsDialog interface to offer users // the awareness and controls over receiving SMS messages. class SmsDialogAndroid : public content::SmsDialog { public: - SmsDialogAndroid(); + explicit SmsDialogAndroid(const url::Origin& origin); ~SmsDialogAndroid() override; void Open(content::RenderFrameHost*,
diff --git a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc index fcb05ac..58cbeef 100644 --- a/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc +++ b/chrome/browser/ui/app_list/search/search_result_ranker/recurrence_predictor.cc
@@ -502,9 +502,8 @@ void ExponentialWeightsEnsemble::Train(unsigned int target, unsigned int condition) { - for (auto& predictor_weight : predictors_) - predictor_weight.first->Train(target, condition); - + // Update predictor weights. Do this before training the constituent + // predictors to avoid biasing towards fast-adjusting predictors. for (auto& predictor_weight : predictors_) { const auto& ranks = predictor_weight.first->Rank(condition); @@ -531,6 +530,10 @@ for (auto& predictor_weight : predictors_) { predictor_weight.second /= total_weight; } + + // Train constituent predictors. + for (auto& predictor_weight : predictors_) + predictor_weight.first->Train(target, condition); } std::map<unsigned int, float> ExponentialWeightsEnsemble::Rank(
diff --git a/chrome/browser/ui/ash/login_screen_client.cc b/chrome/browser/ui/ash/login_screen_client.cc index f8822c26..88b6b3a 100644 --- a/chrome/browser/ui/ash/login_screen_client.cc +++ b/chrome/browser/ui/ash/login_screen_client.cc
@@ -143,11 +143,11 @@ } } -bool LoginScreenClient::ValidateParentAccessCode( - const AccountId& account_id, - const std::string& access_code) { +bool LoginScreenClient::ValidateParentAccessCode(const AccountId& account_id, + const std::string& access_code, + base::Time validation_time) { return chromeos::parent_access::ParentAccessService::Get() - .ValidateParentAccessCode(account_id, access_code); + .ValidateParentAccessCode(account_id, access_code, validation_time); } void LoginScreenClient::HardlockPod(const AccountId& account_id) {
diff --git a/chrome/browser/ui/ash/login_screen_client.h b/chrome/browser/ui/ash/login_screen_client.h index 9042184..a3cde9c 100644 --- a/chrome/browser/ui/ash/login_screen_client.h +++ b/chrome/browser/ui/ash/login_screen_client.h
@@ -9,6 +9,7 @@ #include "ash/public/cpp/system_tray_focus_observer.h" #include "base/macros.h" #include "base/observer_list.h" +#include "base/time/time.h" #include "ui/base/ime/chromeos/input_method_manager.h" namespace chromeos { @@ -92,7 +93,8 @@ const AccountId& account_id, base::OnceCallback<void(bool)> callback) override; bool ValidateParentAccessCode(const AccountId& account_id, - const std::string& access_code) override; + const std::string& access_code, + base::Time validation_time) override; void HardlockPod(const AccountId& account_id) override; void OnFocusPod(const AccountId& account_id) override; void OnNoPodFocused() override;
diff --git a/chrome/browser/ui/ash/test_login_screen.cc b/chrome/browser/ui/ash/test_login_screen.cc index ced91e94..9b6fcdb 100644 --- a/chrome/browser/ui/ash/test_login_screen.cc +++ b/chrome/browser/ui/ash/test_login_screen.cc
@@ -50,7 +50,8 @@ const AccountId& child_account_id, base::RepeatingCallback<void(bool success)> callback, ash::ParentAccessRequestReason reason, - bool extra_dimmer) {} + bool extra_dimmer, + base::Time validation_time) {} void TestLoginScreen::SetAllowLoginAsGuest(bool allow_guest) {}
diff --git a/chrome/browser/ui/ash/test_login_screen.h b/chrome/browser/ui/ash/test_login_screen.h index d94cbbfa..8cd4ea1 100644 --- a/chrome/browser/ui/ash/test_login_screen.h +++ b/chrome/browser/ui/ash/test_login_screen.h
@@ -45,7 +45,8 @@ const AccountId& child_account_id, base::RepeatingCallback<void(bool success)> callback, ash::ParentAccessRequestReason reason, - bool extra_dimmer) override; + bool extra_dimmer, + base::Time validation_time) override; void SetAllowLoginAsGuest(bool allow_guest) override; std::unique_ptr<ash::ScopedGuestButtonBlocker> GetScopedGuestButtonBlocker() override;
diff --git a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc index a83a05c..80153ad 100644 --- a/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc +++ b/chrome/browser/ui/browser_navigator_browsertest_chromeos.cc
@@ -48,7 +48,8 @@ content::WindowedNotificationObserver observer( content::NOTIFICATION_LOAD_STOP, content::NotificationService::AllSources()); - chrome::ShowSettings(browser()); + chrome::SettingsWindowManager::GetInstance()->ShowOSSettings( + browser()->profile()); observer.Wait(); } // browser() tab contents should be unaffected. @@ -62,7 +63,7 @@ browser()->profile()); EXPECT_NE(browser(), settings_browser); EXPECT_EQ( - GURL("chrome://settings"), + GURL(chrome::GetOSSettingsUrl(std::string())), settings_browser->tab_strip_model()->GetActiveWebContents()->GetURL()); }
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h index 95ac680..854c0db 100644 --- a/chrome/browser/ui/browser_window.h +++ b/chrome/browser/ui/browser_window.h
@@ -33,7 +33,7 @@ class Browser; class SharingDialog; -class ClickToCallSharingDialogController; +class ClickToCallUiController; class DownloadShelf; class ExclusiveAccessContext; class ExtensionsContainer; @@ -334,7 +334,7 @@ // Shows the Click to Call dialog. virtual SharingDialog* ShowClickToCallDialog( content::WebContents* contents, - ClickToCallSharingDialogController* controller) = 0; + ClickToCallUiController* controller) = 0; // Shows the Update Recommended dialog box. virtual void ShowUpdateChromeDialog() = 0;
diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc index 11d0805..899c38b 100644 --- a/chrome/browser/ui/extensions/application_launch.cc +++ b/chrome/browser/ui/extensions/application_launch.cc
@@ -34,7 +34,7 @@ #include "chrome/browser/ui/extensions/hosted_app_browser_controller.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/web_applications/components/web_app_helpers.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/browser/web_launch/web_launch_files_helper.h" #include "chrome/common/chrome_features.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" @@ -255,8 +255,8 @@ } if (extension->from_bookmark()) { - web_app::WebAppTabHelperBase* tab_helper = - web_app::WebAppTabHelperBase::FromWebContents(contents); + web_app::WebAppTabHelper* tab_helper = + web_app::WebAppTabHelper::FromWebContents(contents); DCHECK(tab_helper); tab_helper->SetAppId(extension->id()); } @@ -422,8 +422,8 @@ extensions::HostedAppBrowserController::SetAppPrefsForWebContents( browser->app_controller(), web_contents); if (extension && extension->from_bookmark()) { - web_app::WebAppTabHelperBase* tab_helper = - web_app::WebAppTabHelperBase::FromWebContents(web_contents); + web_app::WebAppTabHelper* tab_helper = + web_app::WebAppTabHelper::FromWebContents(web_contents); DCHECK(tab_helper); tab_helper->SetAppId(extension->id()); }
diff --git a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.cc b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.cc index f561900..a0a769aa 100644 --- a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.cc +++ b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.cc
@@ -9,6 +9,13 @@ #include "services/media_session/public/mojom/media_session.mojom.h" #include "services/service_manager/public/cpp/connector.h" +namespace { + +constexpr base::TimeDelta kHideTimerDelay = + base::TimeDelta::FromMilliseconds(2500); + +} // anonymous namespace + MediaToolbarButtonController::MediaToolbarButtonController( service_manager::Connector* connector, MediaToolbarButtonControllerDelegate* delegate) @@ -37,6 +44,19 @@ void MediaToolbarButtonController::MediaSessionInfoChanged( media_session::mojom::MediaSessionInfoPtr session_info) { - if (session_info && session_info->is_controllable) + if (session_info && session_info->is_controllable) { + hide_icon_timer_.Stop(); + delegate_->Enable(); delegate_->Show(); + } else { + delegate_->Disable(); + hide_icon_timer_.Start( + FROM_HERE, kHideTimerDelay, + base::BindOnce(&MediaToolbarButtonController::OnHideTimerFired, + base::Unretained(this))); + } +} + +void MediaToolbarButtonController::OnHideTimerFired() { + delegate_->Hide(); }
diff --git a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.h b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.h index 2db0731..d4112bd 100644 --- a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.h +++ b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_UI_GLOBAL_MEDIA_CONTROLS_MEDIA_TOOLBAR_BUTTON_CONTROLLER_H_ #include "base/macros.h" +#include "base/timer/timer.h" #include "mojo/public/cpp/bindings/receiver.h" #include "services/media_session/public/mojom/media_controller.mojom.h" @@ -38,9 +39,15 @@ const base::Optional<media_session::MediaPosition>& position) override {} private: + void OnHideTimerFired(); + service_manager::Connector* const connector_; MediaToolbarButtonControllerDelegate* const delegate_; + // We hide the toolbar button when there's no active and controllable media + // session. We use this timer to avoid flashing when a media session changes. + base::OneShotTimer hide_icon_timer_; + // Tracks current media session state/metadata. media_session::mojom::MediaControllerPtr media_controller_ptr_;
diff --git a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_delegate.h b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_delegate.h index caa71613..414116fb9 100644 --- a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_delegate.h +++ b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_delegate.h
@@ -10,6 +10,9 @@ class MediaToolbarButtonControllerDelegate { public: virtual void Show() = 0; + virtual void Hide() = 0; + virtual void Enable() = 0; + virtual void Disable() = 0; protected: virtual ~MediaToolbarButtonControllerDelegate();
diff --git a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_unittest.cc b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_unittest.cc index 62838e4..9947ed41 100644 --- a/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_unittest.cc +++ b/chrome/browser/ui/global_media_controls/media_toolbar_button_controller_unittest.cc
@@ -6,6 +6,7 @@ #include <memory> +#include "base/test/scoped_task_environment.h" #include "chrome/browser/ui/global_media_controls/media_toolbar_button_controller_delegate.h" #include "services/media_session/public/mojom/media_session.mojom.h" #include "testing/gmock/include/gmock/gmock.h" @@ -24,13 +25,19 @@ // MediaToolbarButtonControllerDelegate implementation. MOCK_METHOD0(Show, void()); + MOCK_METHOD0(Hide, void()); + MOCK_METHOD0(Enable, void()); + MOCK_METHOD0(Disable, void()); }; } // anonymous namespace class MediaToolbarButtonControllerTest : public testing::Test { public: - MediaToolbarButtonControllerTest() = default; + MediaToolbarButtonControllerTest() + : scoped_task_environment_( + base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME, + base::test::ScopedTaskEnvironment::MainThreadType::UI) {} ~MediaToolbarButtonControllerTest() override = default; void SetUp() override { @@ -45,9 +52,17 @@ controller_->MediaSessionInfoChanged(std::move(session_info)); } + void SimulateMediaStopped() { controller_->MediaSessionInfoChanged(nullptr); } + + void AdvanceClockMilliseconds(int milliseconds) { + scoped_task_environment_.FastForwardBy( + base::TimeDelta::FromMilliseconds(milliseconds)); + } + MockMediaToolbarButtonControllerDelegate& delegate() { return delegate_; } private: + base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr<MediaToolbarButtonController> controller_; MockMediaToolbarButtonControllerDelegate delegate_; @@ -58,3 +73,59 @@ EXPECT_CALL(delegate(), Show()); SimulatePlayingControllableMedia(); } + +TEST_F(MediaToolbarButtonControllerTest, HidesAfterTimeoutAndShowsAgainOnPlay) { + // First, show the button. + EXPECT_CALL(delegate(), Show()); + SimulatePlayingControllableMedia(); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // Then, stop playing media so the button is disabled, but hasn't been hidden + // yet. + EXPECT_CALL(delegate(), Disable()); + EXPECT_CALL(delegate(), Hide()).Times(0); + SimulateMediaStopped(); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // If the time hasn't elapsed yet, we should still not be hidden. + EXPECT_CALL(delegate(), Hide()).Times(0); + AdvanceClockMilliseconds(2400); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // Once the time is elapsed, we should be hidden. + EXPECT_CALL(delegate(), Hide()); + AdvanceClockMilliseconds(200); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // If media starts playing again, we should show and enable the button. + EXPECT_CALL(delegate(), Show()); + EXPECT_CALL(delegate(), Enable()); + SimulatePlayingControllableMedia(); + testing::Mock::VerifyAndClearExpectations(&delegate()); +} + +TEST_F(MediaToolbarButtonControllerTest, + DoesNotHideIfMediaStartsPlayingWithinTimeout) { + // First, show the button. + EXPECT_CALL(delegate(), Show()); + SimulatePlayingControllableMedia(); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // Then, stop playing media so the button is disabled, but hasn't been hidden + // yet. + EXPECT_CALL(delegate(), Disable()); + EXPECT_CALL(delegate(), Hide()).Times(0); + SimulateMediaStopped(); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // If the time hasn't elapsed yet, we should still not be hidden. + EXPECT_CALL(delegate(), Hide()).Times(0); + AdvanceClockMilliseconds(2400); + testing::Mock::VerifyAndClearExpectations(&delegate()); + + // If media starts playing again, we should show and enable the button. + EXPECT_CALL(delegate(), Show()); + EXPECT_CALL(delegate(), Enable()); + SimulatePlayingControllableMedia(); + testing::Mock::VerifyAndClearExpectations(&delegate()); +}
diff --git a/chrome/browser/ui/libgtkui/BUILD.gn b/chrome/browser/ui/libgtkui/BUILD.gn index ced5ef6..7895f259 100644 --- a/chrome/browser/ui/libgtkui/BUILD.gn +++ b/chrome/browser/ui/libgtkui/BUILD.gn
@@ -17,8 +17,6 @@ "app_indicator_icon_menu.h", "gtk_background_painter.cc", "gtk_background_painter.h", - "gtk_event_loop.cc", - "gtk_event_loop.h", "gtk_key_bindings_handler.cc", "gtk_key_bindings_handler.h", "gtk_ui.cc", @@ -48,8 +46,6 @@ "skia_utils_gtk.h", "unity_service.cc", "unity_service.h", - "x11_input_method_context_impl_gtk.cc", - "x11_input_method_context_impl_gtk.h", ] if (gtk_version <= 3) { @@ -112,10 +108,8 @@ "//ui/events:dom_keyboard_layout", "//ui/events:dom_keycode_converter", "//ui/events:events_base", - "//ui/events/platform/x11", "//ui/gfx", "//ui/gfx/geometry", - "//ui/gfx/x", "//ui/native_theme", "//ui/resources", "//ui/shell_dialogs", @@ -125,4 +119,18 @@ public_deps = [ "//chrome/browser:theme_properties", ] + + if (use_x11) { + sources += [ + "gtk_event_loop_x11.cc", + "gtk_event_loop_x11.h", + "x11_input_method_context_impl_gtk.cc", + "x11_input_method_context_impl_gtk.h", + ] + + deps += [ + "//ui/events/platform/x11", + "//ui/gfx/x", + ] + } }
diff --git a/chrome/browser/ui/libgtkui/gtk_event_loop.cc b/chrome/browser/ui/libgtkui/gtk_event_loop_x11.cc similarity index 86% rename from chrome/browser/ui/libgtkui/gtk_event_loop.cc rename to chrome/browser/ui/libgtkui/gtk_event_loop_x11.cc index c409918b..f271f5f2 100644 --- a/chrome/browser/ui/libgtkui/gtk_event_loop.cc +++ b/chrome/browser/ui/libgtkui/gtk_event_loop_x11.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ui/libgtkui/gtk_event_loop.h" +#include "chrome/browser/ui/libgtkui/gtk_event_loop_x11.h" #include "ui/gfx/x/x11.h" @@ -17,21 +17,21 @@ namespace libgtkui { // static -GtkEventLoop* GtkEventLoop::GetInstance() { - return base::Singleton<GtkEventLoop>::get(); +GtkEventLoopX11* GtkEventLoopX11::GetInstance() { + return base::Singleton<GtkEventLoopX11>::get(); } -GtkEventLoop::GtkEventLoop() { +GtkEventLoopX11::GtkEventLoopX11() { gdk_event_handler_set(DispatchGdkEvent, nullptr, nullptr); } -GtkEventLoop::~GtkEventLoop() { +GtkEventLoopX11::~GtkEventLoopX11() { gdk_event_handler_set(reinterpret_cast<GdkEventFunc>(gtk_main_do_event), nullptr, nullptr); } // static -void GtkEventLoop::DispatchGdkEvent(GdkEvent* gdk_event, gpointer) { +void GtkEventLoopX11::DispatchGdkEvent(GdkEvent* gdk_event, gpointer) { switch (gdk_event->type) { case GDK_KEY_PRESS: case GDK_KEY_RELEASE: @@ -45,7 +45,7 @@ } // static -void GtkEventLoop::ProcessGdkEventKey(const GdkEventKey& gdk_event_key) { +void GtkEventLoopX11::ProcessGdkEventKey(const GdkEventKey& gdk_event_key) { // This function translates GdkEventKeys into XKeyEvents and puts them to // the X event queue. //
diff --git a/chrome/browser/ui/libgtkui/gtk_event_loop.h b/chrome/browser/ui/libgtkui/gtk_event_loop_x11.h similarity index 60% rename from chrome/browser/ui/libgtkui/gtk_event_loop.h rename to chrome/browser/ui/libgtkui/gtk_event_loop_x11.h index 860737b..9b97ac6 100644 --- a/chrome/browser/ui/libgtkui/gtk_event_loop.h +++ b/chrome/browser/ui/libgtkui/gtk_event_loop_x11.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_H_ -#define CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_H_ +#ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_X11_H_ +#define CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_X11_H_ #include "base/macros.h" #include "ui/base/glib/glib_integers.h" @@ -18,22 +18,22 @@ namespace libgtkui { -class GtkEventLoop { +class GtkEventLoopX11 { public: - static GtkEventLoop* GetInstance(); + static GtkEventLoopX11* GetInstance(); private: - friend struct base::DefaultSingletonTraits<GtkEventLoop>; + friend struct base::DefaultSingletonTraits<GtkEventLoopX11>; - GtkEventLoop(); - ~GtkEventLoop(); + GtkEventLoopX11(); + ~GtkEventLoopX11(); static void DispatchGdkEvent(GdkEvent* gdk_event, gpointer); static void ProcessGdkEventKey(const GdkEventKey& gdk_event_key); - DISALLOW_COPY_AND_ASSIGN(GtkEventLoop); + DISALLOW_COPY_AND_ASSIGN(GtkEventLoopX11); }; } // namespace libgtkui -#endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_H_ +#endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_EVENT_LOOP_X11_H_
diff --git a/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.cc b/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.cc index 0f957d6e..240445a9 100644 --- a/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.cc +++ b/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.cc
@@ -15,9 +15,12 @@ #include "chrome/browser/ui/libgtkui/gtk_util.h" #include "content/public/browser/native_web_keyboard_event.h" #include "ui/base/ime/text_edit_commands.h" -#include "ui/base/x/x11_util.h" #include "ui/events/event.h" -#include "ui/gfx/x/x11.h" + +#if defined(USE_X11) +#include "ui/base/x/x11_util.h" // nogncheck +#include "ui/gfx/x/x11.h" // nogncheck +#endif using ui::TextEditCommand; @@ -38,6 +41,37 @@ #endif } +#if !defined(USE_X11) +GdkModifierType EventFlagsToGdkModifierType(ui::EventFlags event_flags) { + static const struct { + ui::EventFlags event_flag; + GdkModifierType gdk_modifier; + } mapping[] = { + {ui::EF_SHIFT_DOWN, GDK_SHIFT_MASK}, + {ui::EF_CAPS_LOCK_ON, GDK_LOCK_MASK}, + {ui::EF_CONTROL_DOWN, GDK_CONTROL_MASK}, + {ui::EF_ALT_DOWN, GDK_MOD1_MASK}, + {ui::EF_NUM_LOCK_ON, GDK_MOD2_MASK}, + {ui::EF_MOD3_DOWN, GDK_MOD3_MASK}, + {ui::EF_COMMAND_DOWN, GDK_MOD4_MASK}, + {ui::EF_ALTGR_DOWN, GDK_MOD5_MASK}, + {ui::EF_LEFT_MOUSE_BUTTON, GDK_BUTTON1_MASK}, + {ui::EF_MIDDLE_MOUSE_BUTTON, GDK_BUTTON2_MASK}, + {ui::EF_RIGHT_MOUSE_BUTTON, GDK_BUTTON3_MASK}, + {ui::EF_BACK_MOUSE_BUTTON, GDK_BUTTON4_MASK}, + {ui::EF_FORWARD_MOUSE_BUTTON, GDK_BUTTON5_MASK}, + }; + GdkModifierType gdk_modifier_type = static_cast<GdkModifierType>(0); + for (const auto& map : mapping) { + if (event_flags & map.event_flag) { + gdk_modifier_type = + static_cast<GdkModifierType>(gdk_modifier_type | map.gdk_modifier); + } + } + return gdk_modifier_type; +} +#endif + } // namespace namespace libgtkui { @@ -48,11 +82,15 @@ has_xkb_(false) { gtk_container_add(GTK_CONTAINER(fake_window_), handler_); +#if defined(USE_X11) int opcode, event, error; int major = XkbMajorVersion; int minor = XkbMinorVersion; has_xkb_ = XkbQueryExtension(gfx::GetXDisplay(), &opcode, &event, &error, &major, &minor); +#else + has_xkb_ = false; +#endif } GtkKeyBindingsHandler::~GtkKeyBindingsHandler() { @@ -70,7 +108,7 @@ return false; GdkEventKey gdk_event; - BuildGdkEventKeyFromXEvent(key_event.native_event(), &gdk_event); + BuildGdkEventKeyFromKeyEvent(key_event, &gdk_event); edit_commands_.clear(); // If this key event matches a predefined key binding, corresponding signal @@ -111,18 +149,19 @@ edit_commands_.push_back(ui::TextEditCommandAuraLinux(command, value)); } -void GtkKeyBindingsHandler::BuildGdkEventKeyFromXEvent( - const ui::PlatformEvent& xevent, +void GtkKeyBindingsHandler::BuildGdkEventKeyFromKeyEvent( + const ui::KeyEvent& key_event, GdkEventKey* gdk_event) { GdkKeymap* keymap = gdk_keymap_get_for_display(gdk_display_get_default()); GdkModifierType consumed, state; +#if defined(USE_X11) + const ui::PlatformEvent& xevent = key_event.native_event(); gdk_event->type = xevent->xany.type == KeyPress ? GDK_KEY_PRESS : GDK_KEY_RELEASE; gdk_event->time = xevent->xkey.time; gdk_event->state = static_cast<GdkModifierType>(xevent->xkey.state); gdk_event->hardware_keycode = xevent->xkey.keycode; - if (has_xkb_) { gdk_event->group = XkbGroupForCoreState(xevent->xkey.state); } else { @@ -137,6 +176,15 @@ } gdk_event->group = 0; } +#else + gdk_event->type = + key_event.type() == ui::ET_KEY_PRESSED ? GDK_KEY_PRESS : GDK_KEY_RELEASE; + gdk_event->time = + (key_event.time_stamp() - base::TimeTicks()).InMilliseconds(); + gdk_event->state = EventFlagsToGdkModifierType( + static_cast<ui::EventFlags>(key_event.flags())); + gdk_event->hardware_keycode = key_event.key_code(); +#endif gdk_event->keyval = GDK_KEY_VoidSymbol; gdk_keymap_translate_keyboard_state(
diff --git a/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.h b/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.h index 055487c6..0f1fa96 100644 --- a/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.h +++ b/chrome/browser/ui/libgtkui/gtk_key_bindings_handler.h
@@ -15,6 +15,7 @@ namespace ui { class Event; +class KeyEvent; } namespace libgtkui { @@ -70,8 +71,8 @@ const std::string& value); // Builds a fake GdkEventKey from an XEvent. - void BuildGdkEventKeyFromXEvent(const ui::PlatformEvent& xevent, - GdkEventKey* gdk_event); + void BuildGdkEventKeyFromKeyEvent(const ui::KeyEvent& key_event, + GdkEventKey* gdk_event); // Initializes Handler structure. static void HandlerInit(Handler* self);
diff --git a/chrome/browser/ui/libgtkui/gtk_status_icon.h b/chrome/browser/ui/libgtkui/gtk_status_icon.h index ef5faed5..e9526607 100644 --- a/chrome/browser/ui/libgtkui/gtk_status_icon.h +++ b/chrome/browser/ui/libgtkui/gtk_status_icon.h
@@ -5,6 +5,9 @@ #ifndef CHROME_BROWSER_UI_LIBGTKUI_GTK_STATUS_ICON_H_ #define CHROME_BROWSER_UI_LIBGTKUI_GTK_STATUS_ICON_H_ +// THIS FILE IS DEPRECATED (REPLACED BY StatusIconLinuxDbus) AND WILL SOON BE +// REMOVED. + #include <memory> #include "base/macros.h"
diff --git a/chrome/browser/ui/libgtkui/gtk_ui.cc b/chrome/browser/ui/libgtkui/gtk_ui.cc index 98a9aff..c473667 100644 --- a/chrome/browser/ui/libgtkui/gtk_ui.cc +++ b/chrome/browser/ui/libgtkui/gtk_ui.cc
@@ -4,10 +4,8 @@ #include "chrome/browser/ui/libgtkui/gtk_ui.h" -#include <dlfcn.h> #include <gdk/gdk.h> #include <gdk/gdkkeysyms.h> -#include <math.h> #include <pango/pango.h> #include <cmath> @@ -27,7 +25,6 @@ #include "base/strings/stringprintf.h" #include "chrome/browser/themes/theme_properties.h" #include "chrome/browser/ui/libgtkui/app_indicator_icon.h" -#include "chrome/browser/ui/libgtkui/gtk_event_loop.h" #include "chrome/browser/ui/libgtkui/gtk_key_bindings_handler.h" #include "chrome/browser/ui/libgtkui/gtk_status_icon.h" #include "chrome/browser/ui/libgtkui/gtk_util.h" @@ -39,7 +36,6 @@ #include "chrome/browser/ui/libgtkui/settings_provider_gtk.h" #include "chrome/browser/ui/libgtkui/skia_utils_gtk.h" #include "chrome/browser/ui/libgtkui/unity_service.h" -#include "chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #include "printing/buildflags/buildflags.h" @@ -47,6 +43,8 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkShader.h" +#include "ui/base/ime/linux/fake_input_method_context.h" +#include "ui/base/ime/linux/linux_input_method_context.h" #include "ui/base/resource/resource_bundle.h" #include "ui/display/display.h" #include "ui/events/keycodes/dom/dom_code.h" @@ -60,8 +58,6 @@ #include "ui/gfx/image/image_skia_source.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/gfx/skia_util.h" -#include "ui/gfx/x/x11.h" -#include "ui/gfx/x/x11_types.h" #include "ui/native_theme/native_theme.h" #include "ui/shell_dialogs/select_file_policy.h" #include "ui/views/controls/button/button.h" @@ -75,6 +71,13 @@ #include "chrome/browser/ui/libgtkui/settings_provider_gsettings.h" #endif +#if defined(USE_X11) +#include "chrome/browser/ui/libgtkui/gtk_event_loop_x11.h" // nogncheck +#include "chrome/browser/ui/libgtkui/x11_input_method_context_impl_gtk.h" // nogncheck +#include "ui/gfx/x/x11.h" // nogncheck +#include "ui/gfx/x/x11_types.h" // nogncheck +#endif + #if BUILDFLAG(ENABLE_PRINTING) #include "printing/printing_context_linux.h" #endif @@ -383,8 +386,10 @@ indicators_count = 0; - // Instantiate the singleton instance of GtkEventLoop. - GtkEventLoop::GetInstance(); +#if defined(USE_X11) + // Instantiate the singleton instance of GtkEventLoopX11. + GtkEventLoopX11::GetInstance(); +#endif } bool GtkUi::GetTint(int id, color_utils::HSL* tint) const { @@ -648,8 +653,13 @@ std::unique_ptr<ui::LinuxInputMethodContext> GtkUi::CreateInputMethodContext( ui::LinuxInputMethodContextDelegate* delegate, bool is_simple) const { +#if defined(USE_X11) return std::unique_ptr<ui::LinuxInputMethodContext>( new X11InputMethodContextImplGtk(delegate, is_simple)); +#else + NOTIMPLEMENTED(); + return std::make_unique<ui::FakeInputMethodContext>(); +#endif } gfx::FontRenderParams GtkUi::GetDefaultFontRenderParams() const { @@ -957,6 +967,7 @@ } void GtkUi::UpdateCursorTheme() { +#if defined(USE_X11) GtkSettings* settings = gtk_settings_get_default(); gchar* theme = nullptr; @@ -970,6 +981,14 @@ XcursorSetDefaultSize(gfx::GetXDisplay(), size); g_free(theme); +#else + // TODO(thomasanderson): GtkUi shouldn't be the class to make X11 or wayland + // calls. Instead, this function should be a getter for X11 + // (XCursorSetTheme/XcursorSetDefaultSize) and Wayland (wl_cursor_theme_load) + // cursor code to call into. In addition, cursor theme name/size changes are + // not handled, so an observer interface should be added as well. + NOTIMPLEMENTED(); +#endif } void GtkUi::UpdateDefaultFont() {
diff --git a/chrome/browser/ui/libgtkui/gtk_util.cc b/chrome/browser/ui/libgtkui/gtk_util.cc index 954e25ae..dc3cc680 100644 --- a/chrome/browser/ui/libgtkui/gtk_util.cc +++ b/chrome/browser/ui/libgtkui/gtk_util.cc
@@ -6,7 +6,6 @@ #include <dlfcn.h> #include <gdk/gdk.h> -#include <gdk/gdkx.h> #include <gtk/gtk.h> #include <locale.h> #include <stddef.h> @@ -26,11 +25,16 @@ #include "ui/aura/window_tree_host.h" #include "ui/base/accelerators/accelerator.h" #include "ui/events/event_constants.h" -#include "ui/events/keycodes/keyboard_code_conversion_x.h" #include "ui/gfx/color_utils.h" #include "ui/gfx/geometry/size.h" #include "ui/views/linux_ui/linux_ui.h" +#if defined(USE_X11) +#include <gdk/gdkx.h> + +#include "ui/events/keycodes/keyboard_code_conversion_x.h" // nogncheck +#endif + namespace { const char kAuraTransientParent[] = "aura-transient-parent"; @@ -98,12 +102,6 @@ #endif } -guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator) { - // The second parameter is false because accelerator keys are expressed in - // terms of the non-shift-modified key. - return XKeysymForWindowsKeyCode(accelerator.key_code(), false); -} - GdkModifierType GetGdkModifierForAccelerator( const ui::Accelerator& accelerator) { int event_flag = accelerator.modifiers(); @@ -140,13 +138,15 @@ return; gtk_widget_realize(dialog); +#if defined(USE_X11) GdkWindow* gdk_window = gtk_widget_get_window(dialog); - - // TODO(erg): Check to make sure we're using X11 if wayland or some other - // display server ever happens. Otherwise, this will crash. XSetTransientForHint(GDK_WINDOW_XDISPLAY(gdk_window), GDK_WINDOW_XID(gdk_window), parent->GetHost()->GetAcceleratedWidget()); +#else + // TODO(https://crbug.com/992239): Provide a wayland implementation. + NOTIMPLEMENTED(); +#endif // We also set the |parent| as a property of |dialog|, so that we can unlink // the two later. @@ -609,4 +609,12 @@ return prop_value; } +#if defined(USE_X11) +guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator) { + // The second parameter is false because accelerator keys are expressed in + // terms of the non-shift-modified key. + return XKeysymForWindowsKeyCode(accelerator.key_code(), false); +} +#endif + } // namespace libgtkui
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h index adea4a8..d75427b 100644 --- a/chrome/browser/ui/libgtkui/gtk_util.h +++ b/chrome/browser/ui/libgtkui/gtk_util.h
@@ -38,8 +38,6 @@ // Returns the name of the ".desktop" file associated with our running process. std::string GetDesktopName(base::Environment* env); -guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator); - GdkModifierType GetGdkModifierForAccelerator( const ui::Accelerator& accelerator); @@ -187,6 +185,11 @@ // Get a GtkSettings property as a C++ string. std::string GetGtkSettingsStringProperty(GtkSettings* settings, const gchar* prop_name); + +#if defined(USE_X11) +// TODO(thomasanderson): Remove this once GtkStatusIcon is removed. +guint GetGdkKeyCodeForAccelerator(const ui::Accelerator& accelerator); +#endif } // namespace libgtkui #endif // CHROME_BROWSER_UI_LIBGTKUI_GTK_UTIL_H_
diff --git a/chrome/browser/ui/libgtkui/menu_util.cc b/chrome/browser/ui/libgtkui/menu_util.cc index 1c11cb6..aa6a7a97 100644 --- a/chrome/browser/ui/libgtkui/menu_util.cc +++ b/chrome/browser/ui/libgtkui/menu_util.cc
@@ -179,6 +179,7 @@ connect_to_activate = false; } +#if defined(USE_X11) ui::Accelerator accelerator; if (model->GetAcceleratorAt(i, &accelerator)) { gtk_widget_add_accelerator(menu_item, "activate", nullptr, @@ -186,6 +187,7 @@ GetGdkModifierForAccelerator(accelerator), GTK_ACCEL_VISIBLE); } +#endif g_object_set_data(G_OBJECT(menu_item), "model", model); AppendMenuItemToMenu(i,
diff --git a/chrome/browser/ui/libgtkui/menu_util.h b/chrome/browser/ui/libgtkui/menu_util.h index 9741e81..e0e5f41b 100644 --- a/chrome/browser/ui/libgtkui/menu_util.h +++ b/chrome/browser/ui/libgtkui/menu_util.h
@@ -9,6 +9,8 @@ #include "ui/gfx/image/image.h" +// THIS FILE IS DEPRECATED (REPLACED BY DbusMenu) AND WILL SOON BE REMOVED. + namespace ui { class MenuModel; }
diff --git a/chrome/browser/ui/libgtkui/print_dialog_gtk.cc b/chrome/browser/ui/libgtkui/print_dialog_gtk.cc index 5b7d7f2..93b3e51 100644 --- a/chrome/browser/ui/libgtkui/print_dialog_gtk.cc +++ b/chrome/browser/ui/libgtkui/print_dialog_gtk.cc
@@ -28,7 +28,10 @@ #include "printing/print_job_constants.h" #include "printing/print_settings.h" #include "ui/aura/window.h" -#include "ui/events/platform/x11/x11_event_source.h" + +#if defined(USE_X11) +#include "ui/events/platform/x11/x11_event_source.h" // nogncheck +#endif using content::BrowserThread; using printing::PageRanges; @@ -210,11 +213,11 @@ gtk_settings_ = gtk_print_settings_copy(GetLastUsedSettings().settings()); page_setup_ = gtk_page_setup_new(); - PrintSettings settings; - InitPrintSettings(&settings); + InitPrintSettings(std::make_unique<PrintSettings>()); } -void PrintDialogGtk::UpdateSettings(printing::PrintSettings* settings) { +void PrintDialogGtk::UpdateSettings( + std::unique_ptr<printing::PrintSettings> settings) { if (!gtk_settings_) gtk_settings_ = gtk_print_settings_copy(GetLastUsedSettings().settings()); @@ -302,7 +305,7 @@ gtk_settings_, settings->landscape() ? GTK_PAGE_ORIENTATION_LANDSCAPE : GTK_PAGE_ORIENTATION_PORTRAIT); - InitPrintSettings(settings); + InitPrintSettings(std::move(settings)); } void PrintDialogGtk::ShowDialog( @@ -353,8 +356,12 @@ // We need to call gtk_window_present after making the widgets visible to make // sure window gets correctly raised and gets focus. +#if defined(USE_X11) gtk_window_present_with_time( GTK_WINDOW(dialog_), ui::X11EventSource::GetInstance()->GetTimestamp()); +#else + gtk_window_present(GTK_WINDOW(dialog_)); +#endif } void PrintDialogGtk::PrintDocument(const printing::MetafilePlayer& metafile, @@ -456,12 +463,12 @@ break; } - PrintSettings settings; - settings.set_is_modifiable(context_->settings().is_modifiable()); - settings.set_ranges(ranges_vector); - settings.set_selection_only(print_selection_only); - InitPrintSettingsGtk(gtk_settings_, page_setup_, &settings); - context_->InitWithSettings(settings); + auto settings = std::make_unique<PrintSettings>(); + settings->set_is_modifiable(context_->settings().is_modifiable()); + settings->set_ranges(ranges_vector); + settings->set_selection_only(print_selection_only); + InitPrintSettingsGtk(gtk_settings_, page_setup_, settings.get()); + context_->InitWithSettings(std::move(settings)); std::move(callback_).Run(PrintingContextLinux::OK); return; } @@ -521,9 +528,10 @@ Release(); } -void PrintDialogGtk::InitPrintSettings(PrintSettings* settings) { - InitPrintSettingsGtk(gtk_settings_, page_setup_, settings); - context_->InitWithSettings(*settings); +void PrintDialogGtk::InitPrintSettings( + std::unique_ptr<PrintSettings> settings) { + InitPrintSettingsGtk(gtk_settings_, page_setup_, settings.get()); + context_->InitWithSettings(std::move(settings)); } void PrintDialogGtk::OnWindowDestroying(aura::Window* window) {
diff --git a/chrome/browser/ui/libgtkui/print_dialog_gtk.h b/chrome/browser/ui/libgtkui/print_dialog_gtk.h index 08d1f17..2522b8c 100644 --- a/chrome/browser/ui/libgtkui/print_dialog_gtk.h +++ b/chrome/browser/ui/libgtkui/print_dialog_gtk.h
@@ -7,6 +7,7 @@ #include <gtk/gtk.h> #include <gtk/gtkunixprint.h> +#include <memory> #include "base/compiler_specific.h" #include "base/files/file_path.h" @@ -39,7 +40,8 @@ // printing::PrintDialogGtkInterface implementation. void UseDefaultSettings() override; - void UpdateSettings(printing::PrintSettings* settings) override; + void UpdateSettings( + std::unique_ptr<printing::PrintSettings> settings) override; void ShowDialog( gfx::NativeView parent_view, bool has_selection, @@ -68,7 +70,7 @@ // Helper function for initializing |context_|'s PrintSettings with a given // |settings|. - void InitPrintSettings(printing::PrintSettings* settings); + void InitPrintSettings(std::unique_ptr<printing::PrintSettings> settings); // aura::WindowObserver implementation. void OnWindowDestroying(aura::Window* window) override;
diff --git a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc index 8360333..4da1b5f 100644 --- a/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc +++ b/chrome/browser/ui/libgtkui/select_file_dialog_impl_gtk.cc
@@ -27,10 +27,13 @@ #include "chrome/browser/ui/libgtkui/select_file_dialog_impl.h" #include "ui/aura/window_observer.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/events/platform/x11/x11_event_source.h" #include "ui/shell_dialogs/select_file_dialog.h" #include "ui/strings/grit/ui_strings.h" -#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" + +#if defined(USE_X11) +#include "ui/events/platform/x11/x11_event_source.h" // nogncheck +#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h" // nogncheck +#endif namespace { @@ -63,12 +66,14 @@ delete file_extension; } +#if defined(USE_X11) // Runs DesktopWindowTreeHostX11::EnableEventListening() when the file-picker // is closed. void OnFilePickerDestroy(base::OnceClosure* callback_raw) { std::unique_ptr<base::OnceClosure> callback = base::WrapUnique(callback_raw); std::move(*callback).Run(); } +#endif } // namespace @@ -184,6 +189,7 @@ params_map_[dialog] = params; +#if defined(USE_X11) // Disable input events handling in the host window to make this dialog modal. if (owning_window) { aura::WindowTreeHost* host = owning_window->GetHost(); @@ -206,6 +212,7 @@ gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); } } +#endif #if !GTK_CHECK_VERSION(3, 90, 0) gtk_widget_show_all(dialog); @@ -213,8 +220,12 @@ // We need to call gtk_window_present after making the widgets visible to make // sure window gets correctly raised and gets focus. +#if defined(USE_X11) gtk_window_present_with_time( GTK_WINDOW(dialog), ui::X11EventSource::GetInstance()->GetTimestamp()); +#else + gtk_window_present(GTK_WINDOW(dialog)); +#endif } void SelectFileDialogImplGTK::AddFilters(GtkFileChooser* chooser) {
diff --git a/chrome/browser/ui/settings_window_manager_browsertest_chromeos.cc b/chrome/browser/ui/settings_window_manager_browsertest_chromeos.cc index 7c5179f..5eb525f 100644 --- a/chrome/browser/ui/settings_window_manager_browsertest_chromeos.cc +++ b/chrome/browser/ui/settings_window_manager_browsertest_chromeos.cc
@@ -102,7 +102,7 @@ IN_PROC_BROWSER_TEST_P(SettingsWindowManagerTest, OpenSettingsWindow) { // Open a settings window. - ShowSettingsForProfile(browser()->profile()); + settings_manager_->ShowOSSettings(browser()->profile()); Browser* settings_browser = settings_manager_->FindBrowserForProfile(browser()->profile()); ASSERT_TRUE(settings_browser); @@ -111,7 +111,7 @@ EXPECT_EQ(settings_browser, observer_.browser()); // Open the settings again: no new window. - ShowSettingsForProfile(browser()->profile()); + settings_manager_->ShowOSSettings(browser()->profile()); EXPECT_EQ(settings_browser, settings_manager_->FindBrowserForProfile(browser()->profile())); EXPECT_EQ(1u, observer_.new_settings_count()); @@ -121,7 +121,7 @@ EXPECT_FALSE(settings_manager_->FindBrowserForProfile(browser()->profile())); // Open a new settings window. - ShowSettingsForProfile(browser()->profile()); + settings_manager_->ShowOSSettings(browser()->profile()); Browser* settings_browser2 = settings_manager_->FindBrowserForProfile(browser()->profile()); ASSERT_TRUE(settings_browser2); @@ -138,7 +138,7 @@ EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); // Settings should open a new browser window. - chrome::ShowSettings(browser()); + settings_manager_->ShowOSSettings(browser()->profile()); EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); // About should reuse the existing Settings window. @@ -155,8 +155,24 @@ // Downloads should open in an existing browser window. chrome::ShowDownloads(browser()); EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); +} - // About should open a new browser window. +// TODO(crbug/950007): Remove ScopedFeatureList when kSplitSettings flag is on +// by default. +IN_PROC_BROWSER_TEST_P(SettingsWindowManagerTest, OpenAboutPageSplitSettings) { + // About should open settings window when split settings feature flag is on. + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(chromeos::features::kSplitSettings); + chrome::ShowAboutChrome(browser()); + EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); +} + +// TODO(crbug/950007): Remove when kSplitSettings flag is on by default. +IN_PROC_BROWSER_TEST_P(SettingsWindowManagerTest, OpenAboutPage) { + // About should open a new browser window when split settings feature flag is + // off. + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature(chromeos::features::kSplitSettings); chrome::ShowAboutChrome(browser()); EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); }
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc index bbbb7b7..240f837 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -1026,8 +1026,7 @@ class StartupBrowserCreatorFirstRunTest : public InProcessBrowserTest { public: StartupBrowserCreatorFirstRunTest() { - scoped_feature_list_.InitWithFeatures({welcome::kOnboardingForceEnabled}, - {}); + scoped_feature_list_.InitWithFeatures({welcome::kForceEnabled}, {}); } protected:
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index 8829333..53f7df4 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
@@ -628,17 +628,16 @@ !SessionStartupPref::TypeHasRecommendedValue(profile_->GetPrefs()); } - bool onboarding_enabled = true; + bool welcome_enabled = true; #if !defined(OS_CHROMEOS) - onboarding_enabled = welcome::IsOnboardingEnabled(profile_) && - welcome::DoesOnboardingHaveModulesToShow(profile_); + welcome_enabled = + welcome::IsEnabled(profile_) && welcome::HasModulesToShow(profile_); #endif // !defined(OS_CHROMEOS) - StartupTabs tabs = - DetermineStartupTabs(StartupTabProviderImpl(), cmd_line_tabs, - process_startup, is_incognito_or_guest, - is_post_crash_launch, has_incompatible_applications, - promotional_tabs_enabled, onboarding_enabled); + StartupTabs tabs = DetermineStartupTabs( + StartupTabProviderImpl(), cmd_line_tabs, process_startup, + is_incognito_or_guest, is_post_crash_launch, + has_incompatible_applications, promotional_tabs_enabled, welcome_enabled); // Return immediately if we start an async restore, since the remainder of // that process is self-contained. @@ -690,7 +689,7 @@ bool is_post_crash_launch, bool has_incompatible_applications, bool promotional_tabs_enabled, - bool onboarding_enabled) { + bool welcome_enabled) { // Only the New Tab Page or command line URLs may be shown in incognito mode. // A similar policy exists for crash recovery launches, to prevent getting the // user stuck in a crash loop. @@ -739,8 +738,8 @@ profile_, browser_creator_, process_startup); AppendTabs(welcome_back_tabs, &tabs); - if (onboarding_enabled) { - // Policies for onboarding (e.g., first run) may show promotional and + if (welcome_enabled) { + // Policies for welcome (e.g., first run) may show promotional and // introductory content depending on a number of system status factors, // including OS and whether or not this is First Run. onboarding_tabs = provider.GetOnboardingTabs(profile_);
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h index ebc0cac..d76da10 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.h +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
@@ -135,7 +135,7 @@ bool OpenApplicationTab(Profile* profile); // Determines the URLs to be shown at startup by way of various policies - // (onboarding, pinned tabs, etc.), determines whether a session restore + // (welcome, pinned tabs, etc.), determines whether a session restore // is necessary, and opens the URLs in a new or restored browser accordingly. void DetermineURLsAndLaunch(bool process_startup, const std::vector<GURL>& cmd_line_urls); @@ -150,7 +150,7 @@ bool is_post_crash_launch, bool has_incompatible_applications, bool promotional_tabs_enabled, - bool onboarding_enabled); + bool welcome_enabled); // Begins an asynchronous session restore if current state allows it (e.g., // this is not process startup) and SessionService indicates that one is
diff --git a/chrome/browser/ui/startup/startup_browser_policy_unittest.cc b/chrome/browser/ui/startup/startup_browser_policy_unittest.cc index 7b850a1..3703280f 100644 --- a/chrome/browser/ui/startup/startup_browser_policy_unittest.cc +++ b/chrome/browser/ui/startup/startup_browser_policy_unittest.cc
@@ -104,13 +104,13 @@ content::TestBrowserThreadBundle thread_bundle; auto profile = builder.Build(); - EXPECT_TRUE(welcome::DoesOnboardingHaveModulesToShow(profile.get())); + EXPECT_TRUE(welcome::HasModulesToShow(profile.get())); SetPolicy(policy_map, policy::key::kForceEphemeralProfiles, true); - EXPECT_FALSE(welcome::DoesOnboardingHaveModulesToShow(profile.get())); + EXPECT_FALSE(welcome::HasModulesToShow(profile.get())); SetPolicy(policy_map, policy::key::kForceEphemeralProfiles, false); - EXPECT_TRUE(welcome::DoesOnboardingHaveModulesToShow(profile.get())); + EXPECT_TRUE(welcome::HasModulesToShow(profile.get())); } TEST_F(StartupBrowserPolicyUnitTest, NewTabPageLocation) {
diff --git a/chrome/browser/ui/startup/startup_tab_provider.cc b/chrome/browser/ui/startup/startup_tab_provider.cc index b8321209..72cde142 100644 --- a/chrome/browser/ui/startup/startup_tab_provider.cc +++ b/chrome/browser/ui/startup/startup_tab_provider.cc
@@ -44,7 +44,7 @@ } // namespace StartupTabs StartupTabProviderImpl::GetOnboardingTabs(Profile* profile) const { -// Onboarding content has not been launched on Chrome OS. +// Chrome OS has its own welcome flow provided by OOBE. #if defined(OS_CHROMEOS) return StartupTabs(); #else
diff --git a/chrome/browser/ui/startup/startup_tab_provider.h b/chrome/browser/ui/startup/startup_tab_provider.h index ff71dc5..045f916 100644 --- a/chrome/browser/ui/startup/startup_tab_provider.h +++ b/chrome/browser/ui/startup/startup_tab_provider.h
@@ -133,6 +133,7 @@ // URL parameter will be appended so as to access the variant page used when // onboarding occurs after the first Chrome execution (e.g., when creating an // additional profile). + // TODO(hcarmona): it might be possible to deprecate use_later_run_variant. static GURL GetWelcomePageUrl(bool use_later_run_variant); #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc index 427c878..3222877f 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc
@@ -141,7 +141,8 @@ #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" #include "chrome/browser/extensions/chrome_extension_web_contents_observer.h" #include "chrome/browser/extensions/tab_helper.h" -#include "chrome/browser/web_applications/web_app_provider.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" +#include "chrome/browser/web_applications/components/web_app_utils.h" #include "extensions/browser/view_type_utils.h" #endif @@ -338,7 +339,8 @@ #if BUILDFLAG(ENABLE_EXTENSIONS) extensions::TabHelper::CreateForWebContents(web_contents); - web_app::WebAppProvider::CreateTabHelper(web_contents); + if (web_app::AreWebAppsEnabled(profile)) + web_app::WebAppTabHelper::CreateForWebContents(web_contents); if (SiteEngagementService::IsEnabled()) web_app::WebAppMetrics::Get(profile); #endif
diff --git a/chrome/browser/ui/ui_features.cc b/chrome/browser/ui/ui_features.cc index 911854a..b01e086 100644 --- a/chrome/browser/ui/ui_features.cc +++ b/chrome/browser/ui/ui_features.cc
@@ -32,7 +32,7 @@ // settings set to clear cookies on exit. const base::Feature kShowSyncPausedReasonCookiesClearedOnExit{ "ShowSyncPausedReasonCookiesClearedOnExit", - base::FEATURE_ENABLED_BY_DEFAULT}; + base::FEATURE_DISABLED_BY_DEFAULT}; // Enables grouping tabs together in the tab strip. https://crbug.com/905491 const base::Feature kTabGroups{"TabGroups", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/ui/views/autofill/payments/local_card_migration_bubble_views.cc b/chrome/browser/ui/views/autofill/payments/local_card_migration_bubble_views.cc index 7f4e416..0caf3db7 100644 --- a/chrome/browser/ui/views/autofill/payments/local_card_migration_bubble_views.cc +++ b/chrome/browser/ui/views/autofill/payments/local_card_migration_bubble_views.cc
@@ -45,7 +45,7 @@ views::View* anchor_view, content::WebContents* web_contents, LocalCardMigrationBubbleController* controller) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), controller_(controller) { DCHECK(controller); }
diff --git a/chrome/browser/ui/views/autofill/payments/save_card_bubble_views.cc b/chrome/browser/ui/views/autofill/payments/save_card_bubble_views.cc index bbfe30a..6e5243dc 100644 --- a/chrome/browser/ui/views/autofill/payments/save_card_bubble_views.cc +++ b/chrome/browser/ui/views/autofill/payments/save_card_bubble_views.cc
@@ -53,7 +53,7 @@ SaveCardBubbleViews::SaveCardBubbleViews(views::View* anchor_view, content::WebContents* web_contents, SaveCardBubbleController* controller) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), controller_(controller) { DCHECK(controller); chrome::RecordDialogCreation(chrome::DialogIdentifier::SAVE_CARD);
diff --git a/chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc b/chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc index cc6d60f..88b2e54 100644 --- a/chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc +++ b/chrome/browser/ui/views/autofill/payments/save_card_bubble_views_browsertest.cc
@@ -87,6 +87,7 @@ #include "chrome/browser/ui/settings_window_manager_chromeos.h" #include "chrome/browser/web_applications/system_web_app_manager.h" #include "chrome/browser/web_applications/web_app_provider.h" +#include "chromeos/constants/chromeos_features.h" #endif using base::Bucket; @@ -710,6 +711,39 @@ return icon_view; } + void OpenSettingsFromManageCardsPrompt() { + FillForm(); + SubmitFormAndWaitForCardLocalSaveBubble(); + + // Adding an event observer to the controller so we can wait for the bubble + // to show. + AddEventObserverToController(); + ReduceAnimationTime(); + +#if !defined(OS_CHROMEOS) + ResetEventWaiterForSequence( + {DialogEvent::BUBBLE_CLOSED, DialogEvent::BUBBLE_SHOWN}); +#endif + + // Click [Save] should close the offer-to-save bubble and show "Card saved" + // animation -- followed by the sign-in promo (if not on Chrome OS). + ClickOnDialogViewWithIdAndWait(DialogViewId::OK_BUTTON); + +#if !defined(OS_CHROMEOS) + // Wait for and then close the promo. + WaitForObservedEvent(); + ClickOnCloseButton(); +#endif + + // Open up Manage Cards prompt. + ResetEventWaiterForSequence({DialogEvent::BUBBLE_SHOWN}); + ClickOnView(GetSaveCardIconView()); + WaitForObservedEvent(); + + // Click on the redirect button. + ClickOnDialogViewWithId(DialogViewId::MANAGE_CARDS_BUTTON); + } + content::WebContents* GetActiveWebContents() { return browser()->tab_strip_model()->GetActiveWebContents(); } @@ -983,41 +1017,18 @@ AutofillMetrics::MANAGE_CARDS_SHOWN, 1); } +// TODO(crbug/950007): Remove this test when kSplitSettings is on by default // Tests the manage cards bubble. Ensures that clicking the [Manage cards] // button redirects properly. IN_PROC_BROWSER_TEST_F(SaveCardBubbleViewsFullFormBrowserTest, Local_ManageCardsButtonRedirects) { - FillForm(); - SubmitFormAndWaitForCardLocalSaveBubble(); - - // Adding an event observer to the controller so we can wait for the bubble to - // show. - AddEventObserverToController(); - ReduceAnimationTime(); - -#if !defined(OS_CHROMEOS) - ResetEventWaiterForSequence( - {DialogEvent::BUBBLE_CLOSED, DialogEvent::BUBBLE_SHOWN}); +#if defined(OS_CHROMEOS) + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature(chromeos::features::kSplitSettings); #endif - // Click [Save] should close the offer-to-save bubble and show "Card saved" - // animation -- followed by the sign-in promo (if not on Chrome OS). - ClickOnDialogViewWithIdAndWait(DialogViewId::OK_BUTTON); - -#if !defined(OS_CHROMEOS) - // Wait for and then close the promo. - WaitForObservedEvent(); - ClickOnCloseButton(); -#endif - - // Open up Manage Cards prompt. base::HistogramTester histogram_tester; - ResetEventWaiterForSequence({DialogEvent::BUBBLE_SHOWN}); - ClickOnView(GetSaveCardIconView()); - WaitForObservedEvent(); - - // Click on the redirect button. - ClickOnDialogViewWithId(DialogViewId::MANAGE_CARDS_BUTTON); + OpenSettingsFromManageCardsPrompt(); #if defined(OS_CHROMEOS) // ChromeOS should have opened up the settings window. @@ -1036,6 +1047,28 @@ Bucket(AutofillMetrics::MANAGE_CARDS_MANAGE_CARDS, 1))); } +// Tests the manage cards bubble. Ensures that clicking the [Manage cards] +// button redirects properly. +IN_PROC_BROWSER_TEST_F(SaveCardBubbleViewsFullFormBrowserTest, + Local_ManageCardsButtonRedirects_WithSplitSettings) { +#if defined(OS_CHROMEOS) + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(chromeos::features::kSplitSettings); +#endif + + base::HistogramTester histogram_tester; + OpenSettingsFromManageCardsPrompt(); + + // Another tab should have opened. + EXPECT_EQ(2, browser()->tab_strip_model()->count()); + + // Metrics should have been recorded correctly. + EXPECT_THAT( + histogram_tester.GetAllSamples("Autofill.ManageCardsPrompt.Local"), + ElementsAre(Bucket(AutofillMetrics::MANAGE_CARDS_SHOWN, 1), + Bucket(AutofillMetrics::MANAGE_CARDS_MANAGE_CARDS, 1))); +} + // Tests the manage cards bubble. Ensures that clicking the [Done] // button closes the bubble. IN_PROC_BROWSER_TEST_F(SaveCardBubbleViewsFullFormBrowserTest,
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc index 14bd189..afef006c 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -269,7 +269,7 @@ Profile* profile, const GURL& url, bool newly_bookmarked) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), nullptr), + : LocationBarBubbleDelegateView(anchor_view, nullptr), observer_(observer), delegate_(std::move(delegate)), profile_(profile),
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc index 3b104c035..a166f48e 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
@@ -58,10 +58,13 @@ protected: // Creates a bookmark bubble view. void CreateBubbleView() { + // Create a fake anchor view for the bubble. + anchor_ = std::make_unique<views::View>(); + std::unique_ptr<BubbleSyncPromoDelegate> delegate; - bubble_.reset(new BookmarkBubbleView(NULL, NULL, std::move(delegate), - profile(), GURL(kTestBookmarkURL), - true)); + bubble_.reset(new BookmarkBubbleView(anchor_.get(), nullptr, + std::move(delegate), profile(), + GURL(kTestBookmarkURL), true)); bubble_->Init(); } @@ -72,6 +75,8 @@ std::unique_ptr<BookmarkBubbleView> bubble_; private: + std::unique_ptr<views::View> anchor_; + DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleViewTest); };
diff --git a/chrome/browser/ui/views/chrome_views_delegate_chromeos.cc b/chrome/browser/ui/views/chrome_views_delegate_chromeos.cc index 5e70b80..f2bebdb 100644 --- a/chrome/browser/ui/views/chrome_views_delegate_chromeos.cc +++ b/chrome/browser/ui/views/chrome_views_delegate_chromeos.cc
@@ -7,7 +7,7 @@ #include "ash/public/cpp/accelerators.h" #include "ash/shell.h" #include "base/bind.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/threading/thread_task_runner_handle.h" #include "ui/display/display.h" #include "ui/display/screen.h"
diff --git a/chrome/browser/ui/views/extensions/pwa_confirmation_bubble_view.cc b/chrome/browser/ui/views/extensions/pwa_confirmation_bubble_view.cc index 8adefa8..e5bea7d9 100644 --- a/chrome/browser/ui/views/extensions/pwa_confirmation_bubble_view.cc +++ b/chrome/browser/ui/views/extensions/pwa_confirmation_bubble_view.cc
@@ -84,7 +84,7 @@ views::Button* highlight_button, std::unique_ptr<WebApplicationInfo> web_app_info, chrome::AppInstallationAcceptanceCallback callback) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), nullptr), + : LocationBarBubbleDelegateView(anchor_view, nullptr), web_app_info_(std::move(web_app_info)), callback_(std::move(callback)) { DCHECK(web_app_info_);
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc index fa1f2c6f..9f7c7d0 100644 --- a/chrome/browser/ui/views/frame/browser_view.cc +++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1402,7 +1402,7 @@ SharingDialog* BrowserView::ShowClickToCallDialog( content::WebContents* web_contents, - ClickToCallSharingDialogController* controller) { + ClickToCallUiController* controller) { auto* dialog_view = new ClickToCallDialogView( toolbar_button_provider()->GetAnchorView(), web_contents, controller);
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h index 89d7a5d..48807de5 100644 --- a/chrome/browser/ui/views/frame/browser_view.h +++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -369,7 +369,7 @@ bool IsToolbarShowing() const override; SharingDialog* ShowClickToCallDialog( content::WebContents* contents, - ClickToCallSharingDialogController* controller) override; + ClickToCallUiController* controller) override; void ShowUpdateChromeDialog() override; void ShowIntentPickerBubble( std::vector<IntentPickerBubbleView::AppInfo> app_info,
diff --git a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc index c2a8e91..6608f03 100644 --- a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc +++ b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.cc
@@ -46,6 +46,19 @@ PreferredSizeChanged(); } +void MediaToolbarButtonView::Hide() { + SetVisible(false); + PreferredSizeChanged(); +} + +void MediaToolbarButtonView::Enable() { + SetEnabled(true); +} + +void MediaToolbarButtonView::Disable() { + SetEnabled(false); +} + void MediaToolbarButtonView::UpdateIcon() { // TODO(https://crbug.com/973500): Use actual icon instead of this // placeholder. @@ -55,9 +68,13 @@ // of the icon in the icon definition so we don't need to specify a size here. const int dip_size = 18; - SetImage( - views::Button::STATE_NORMAL, - gfx::CreateVectorIcon(icon, dip_size, - GetThemeProvider()->GetColor( - ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON))); + const SkColor normal_color = + GetThemeProvider()->GetColor(ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); + const SkColor disabled_color = GetThemeProvider()->GetColor( + ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON_INACTIVE); + + SetImage(views::Button::STATE_NORMAL, + gfx::CreateVectorIcon(icon, dip_size, normal_color)); + SetImage(views::Button::STATE_DISABLED, + gfx::CreateVectorIcon(icon, dip_size, disabled_color)); }
diff --git a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h index 91acd53..87b9f55 100644 --- a/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h +++ b/chrome/browser/ui/views/global_media_controls/media_toolbar_button_view.h
@@ -26,6 +26,9 @@ // MediaToolbarButtonControllerDelegate implementation. void Show() override; + void Hide() override; + void Enable() override; + void Disable() override; // views::ButtonListener implementation. void ButtonPressed(views::Button* sender, const ui::Event& event) override;
diff --git a/chrome/browser/ui/views/intent_picker_bubble_view.cc b/chrome/browser/ui/views/intent_picker_bubble_view.cc index dbb16819..161ee81 100644 --- a/chrome/browser/ui/views/intent_picker_bubble_view.cc +++ b/chrome/browser/ui/views/intent_picker_bubble_view.cc
@@ -248,13 +248,12 @@ content::WebContents* web_contents, bool show_stay_in_chrome, bool show_remember_selection) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), intent_picker_cb_(std::move(intent_picker_cb)), selected_app_tag_(0), app_info_(std::move(app_info)), show_stay_in_chrome_(show_stay_in_chrome), show_remember_selection_(show_remember_selection) { - DCHECK(anchor_view); chrome::RecordDialogCreation(chrome::DialogIdentifier::INTENT_PICKER); }
diff --git a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc index 25296cc..f14989d 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc +++ b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.cc
@@ -40,11 +40,8 @@ LocationBarBubbleDelegateView::LocationBarBubbleDelegateView( views::View* anchor_view, - const gfx::Point& anchor_point, content::WebContents* web_contents) - : BubbleDialogDelegateView(anchor_view, - anchor_view ? views::BubbleBorder::TOP_RIGHT - : views::BubbleBorder::NONE), + : BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), WebContentsObserver(web_contents) { // Add observer to close the bubble if the fullscreen state changes. if (web_contents) { @@ -52,8 +49,6 @@ fullscreen_observer_.Add( browser->exclusive_access_manager()->fullscreen_controller()); } - if (!anchor_view) - SetAnchorRect(gfx::Rect(anchor_point, gfx::Size())); } LocationBarBubbleDelegateView::~LocationBarBubbleDelegateView() = default;
diff --git a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h index 0ed9906..ee3cfee 100644 --- a/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h +++ b/chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h
@@ -38,11 +38,11 @@ }; // Constructs LocationBarBubbleDelegateView. Anchors the bubble to - // |anchor_view| when it is not nullptr or alternatively, to |anchor_point|. + // |anchor_view|. If |anchor_view| is nullptr, the bubble is anchored at + // (0,0). // Registers with a fullscreen controller identified by |web_contents| to // close the bubble if the fullscreen state changes. LocationBarBubbleDelegateView(views::View* anchor_view, - const gfx::Point& anchor_point, content::WebContents* web_contents); ~LocationBarBubbleDelegateView() override;
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc index 9663484e..2ff62d0f 100644 --- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc +++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -144,30 +144,17 @@ return browser_view->immersive_mode_controller(); } -void ParentToViewsBrowser(Browser* browser, - ZoomBubbleView* zoom_bubble, - views::View* anchor_view, - content::WebContents* web_contents) { - // If the anchor view exists the zoom icon should be highlighed. - if (anchor_view) { - zoom_bubble->SetHighlightedButton( - BrowserView::GetBrowserViewForBrowser(browser) - ->toolbar_button_provider() - ->GetOmniboxPageActionIconContainerView() - ->GetPageActionIconView(PageActionIconType::kZoom)); - } else { - // If we do not have an anchor view, parent the bubble to the content area. - zoom_bubble->set_parent_window(web_contents->GetNativeView()); - } - - views::BubbleDialogDelegateView::CreateBubble(zoom_bubble); -} - void ParentToBrowser(Browser* browser, ZoomBubbleView* zoom_bubble, views::View* anchor_view, content::WebContents* web_contents) { - ParentToViewsBrowser(browser, zoom_bubble, anchor_view, web_contents); + zoom_bubble->SetHighlightedButton( + BrowserView::GetBrowserViewForBrowser(browser) + ->toolbar_button_provider() + ->GetOmniboxPageActionIconContainerView() + ->GetPageActionIconView(PageActionIconType::kZoom)); + + views::BubbleDialogDelegateView::CreateBubble(zoom_bubble); } // Find the extension that initiated the zoom change, if any. @@ -218,7 +205,6 @@ ParentToBrowser(browser, zoom_bubble_, anchor_view, web_contents); - // Adjust for fullscreen after creation as it relies on the content size. if (is_fullscreen) zoom_bubble_->AdjustForFullscreen(browser->window()->GetBounds()); @@ -288,7 +274,7 @@ content::WebContents* web_contents, DisplayReason reason, ImmersiveModeController* immersive_mode_controller) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), auto_close_duration_(kBubbleCloseDelayDefault), auto_close_(reason == AUTOMATIC), immersive_mode_controller_(immersive_mode_controller),
diff --git a/chrome/browser/ui/views/media_router/media_router_views_ui.cc b/chrome/browser/ui/views/media_router/media_router_views_ui.cc index 2973adb..7a5505e 100644 --- a/chrome/browser/ui/views/media_router/media_router_views_ui.cc +++ b/chrome/browser/ui/views/media_router/media_router_views_ui.cc
@@ -192,8 +192,7 @@ } }; -MediaRouterViewsUI::MediaRouterViewsUI() - : initiator_(nullptr), weak_factory_(this) {} +MediaRouterViewsUI::MediaRouterViewsUI() : initiator_(nullptr) {} MediaRouterViewsUI::~MediaRouterViewsUI() { for (CastDialogController::Observer& observer : observers_)
diff --git a/chrome/browser/ui/views/media_router/media_router_views_ui.h b/chrome/browser/ui/views/media_router/media_router_views_ui.h index 4b61e03..4635e5b 100644 --- a/chrome/browser/ui/views/media_router/media_router_views_ui.h +++ b/chrome/browser/ui/views/media_router/media_router_views_ui.h
@@ -423,7 +423,7 @@ // NOTE: Weak pointers must be invalidated before all other member variables. // Therefore |weak_factory_| must be placed at the end. - base::WeakPtrFactory<MediaRouterViewsUI> weak_factory_; + base::WeakPtrFactory<MediaRouterViewsUI> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MediaRouterViewsUI); };
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc index 48fed38a..dff389a 100644 --- a/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc +++ b/chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/views/native_file_system/native_file_system_access_icon_view.h" +#include "base/feature_list.h" #include "base/strings/utf_string_conversions.h" #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/native_file_system/chrome_native_file_system_permission_context.h" @@ -15,6 +16,10 @@ #include "content/public/browser/web_contents.h" #include "ui/base/l10n/l10n_util.h" +const base::Feature kNativeFileSystemReadOnlyUsageIndicatorFeature{ + "NativeFileSystemReadOnlyUsageIndicator", + base::FEATURE_DISABLED_BY_DEFAULT}; + NativeFileSystemAccessIconView::NativeFileSystemAccessIconView( Delegate* delegate) : PageActionIconView(nullptr, 0, delegate) { @@ -30,12 +35,19 @@ const bool was_visible = GetVisible(); const bool had_write_access = has_write_access_; - SetVisible(GetWebContents() && - (GetWebContents()->HasWritableNativeFileSystemHandles() || - GetWebContents()->HasNativeFileSystemDirectoryHandles())); - has_write_access_ = GetWebContents() && GetWebContents()->HasWritableNativeFileSystemHandles(); + + // TODO(https://crbug.com/992158): Also take read-only files into account + // once inconsistencies in old APIs are fixed. + bool show_read_indicator = + base::FeatureList::IsEnabled( + kNativeFileSystemReadOnlyUsageIndicatorFeature) && + GetWebContents() && + GetWebContents()->HasNativeFileSystemDirectoryHandles(); + + SetVisible(has_write_access_ || show_read_indicator); + if (has_write_access_ != had_write_access) UpdateIconImage(); @@ -79,8 +91,11 @@ } NativeFileSystemUsageBubbleView::Usage usage; - usage.readable_directories = - web_contents->GetNativeFileSystemDirectoryHandles(); + if (base::FeatureList::IsEnabled( + kNativeFileSystemReadOnlyUsageIndicatorFeature)) { + usage.readable_directories = + web_contents->GetNativeFileSystemDirectoryHandles(); + } usage.writable_files = std::move(grants.file_write_grants); usage.writable_directories = std::move(grants.directory_write_grants);
diff --git a/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc index 9eef3c6c..53430cca 100644 --- a/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc +++ b/chrome/browser/ui/views/native_file_system/native_file_system_usage_bubble_view.cc
@@ -288,7 +288,7 @@ content::WebContents* web_contents, const url::Origin& origin, Usage usage) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), origin_(origin), usage_(std::move(usage)), writable_paths_model_(usage_.writable_files, usage_.writable_directories),
diff --git a/chrome/browser/ui/views/page_action/pwa_install_view.cc b/chrome/browser/ui/views/page_action/pwa_install_view.cc index bb056647..2107ca9 100644 --- a/chrome/browser/ui/views/page_action/pwa_install_view.cc +++ b/chrome/browser/ui/views/page_action/pwa_install_view.cc
@@ -12,7 +12,7 @@ #include "chrome/browser/ui/views/extensions/pwa_confirmation_bubble_view.h" #include "chrome/browser/ui/web_applications/web_app_dialog_utils.h" #include "chrome/browser/web_applications/components/web_app_constants.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/grit/generated_resources.h" #include "components/omnibox/browser/vector_icons.h" #include "ui/base/l10n/l10n_util.h" @@ -48,7 +48,7 @@ show_install_button = true; auto* web_app_tab_helper = - web_app::WebAppTabHelperBase::FromWebContents(web_contents); + web_app::WebAppTabHelper::FromWebContents(web_contents); if (web_app_tab_helper && web_app_tab_helper->HasAssociatedApp()) show_install_button = false;
diff --git a/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_browsertest.cc b/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_browsertest.cc index fa4500f..abbc2a7 100644 --- a/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_browsertest.cc +++ b/chrome/browser/ui/views/page_info/safety_tip_page_info_bubble_view_browsertest.cc
@@ -2,12 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <algorithm> +#include <string> +#include <utility> +#include <vector> + #include "base/bind.h" #include "chrome/browser/engagement/site_engagement_score.h" #include "chrome/browser/engagement/site_engagement_service.h" #include "chrome/browser/history/history_service_factory.h" #include "chrome/browser/history/history_test_utils.h" #include "chrome/browser/lookalikes/safety_tips/reputation_web_contents_observer.h" +#include "chrome/browser/lookalikes/safety_tips/safety_tips.pb.h" +#include "chrome/browser/lookalikes/safety_tips/safety_tips_config.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_commands.h" #include "chrome/browser/ui/views/frame/browser_view.h" @@ -18,6 +25,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/safe_browsing/db/v4_protocol_manager_util.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/web_contents.h" #include "content/public/test/test_navigation_observer.h" @@ -30,6 +38,10 @@ #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_observer.h" +using chrome_browser_safety_tips::FlaggedPage; +using chrome_browser_safety_tips::SafetyTipsConfig; +using FlagType = FlaggedPage::FlagType; + namespace { // An engagement score above MEDIUM. @@ -88,13 +100,6 @@ ->ResetBaseScoreForURL(url, score); } -// Go to |navigated_url| in such a way as to trigger a warning. This is just for -// convenience, since how we trigger warnings will change. -void TriggerWarning(Browser* browser, const GURL& navigated_url) { - SetEngagementScore(browser, navigated_url, kLowEngagement); - NavigateToURLSync(browser, navigated_url); -} - // Clicks the location icon to open the page info bubble. void OpenPageInfoBubble(Browser* browser) { BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); @@ -127,6 +132,36 @@ l10n_util::GetStringUTF16(IDS_PAGE_INFO_SAFETY_TIP_SUMMARY)); } +void BlockPatterns(std::vector<std::pair<std::string, FlagType>> patterns) { + auto config_proto = std::make_unique<SafetyTipsConfig>(); + config_proto->set_version_id(2); + + std::sort(patterns.begin(), patterns.end()); + for (auto pair : patterns) { + FlaggedPage* page = config_proto->add_flagged_page(); + page->set_pattern(pair.first); + page->set_type(pair.second); + } + + safety_tips::SetRemoteConfigProto(std::move(config_proto)); +} + +// Go to |url| in such a way as to trigger a warning. This is just for +// convenience, since how we trigger warnings will change. +// +// This function blocks the entire host + path, ignoring query parameters. +void TriggerWarning(Browser* browser, const GURL& url) { + std::string host; + std::string path; + std::string query; + safe_browsing::V4ProtocolManagerUtil::CanonicalizeUrl(url, &host, &path, + &query); + // For simplicity, ignore query + BlockPatterns({{host + path, FlaggedPage::BAD_REP}}); + SetEngagementScore(browser, url, kLowEngagement); + NavigateToURLSync(browser, url); +} + } // namespace class SafetyTipPageInfoBubbleViewBrowserTest : public InProcessBrowserTest { @@ -167,11 +202,23 @@ base::test::ScopedFeatureList feature_list_; }; -// If the user has high engagement with a domain, it should not show a -// warning. +// Ensure normal sites with low engagement are not blocked. +IN_PROC_BROWSER_TEST_F(SafetyTipPageInfoBubbleViewBrowserTest, + NoShowOnLowEngagement) { + auto kNavigatedUrl = GetURL("site1.com"); + SetEngagementScore(browser(), kNavigatedUrl, kLowEngagement); + NavigateToURLSync(browser(), kNavigatedUrl); + EXPECT_FALSE(IsUIShowing()); + + CheckPageInfoDoesNotShowSafetyTipInfo(browser()); +} + +// Ensure blocked sites with high engagement are not blocked. IN_PROC_BROWSER_TEST_F(SafetyTipPageInfoBubbleViewBrowserTest, NoShowOnHighEngagement) { auto kNavigatedUrl = GetURL("site1.com"); + BlockPatterns({{"site1.com/", FlaggedPage::BAD_REP}}); + SetEngagementScore(browser(), kNavigatedUrl, kHighEngagement); NavigateToURLSync(browser(), kNavigatedUrl); EXPECT_FALSE(IsUIShowing()); @@ -179,11 +226,11 @@ CheckPageInfoDoesNotShowSafetyTipInfo(browser()); } -// Until we have heuristics, trigger on all low engagement sites. -IN_PROC_BROWSER_TEST_F(SafetyTipPageInfoBubbleViewBrowserTest, - ShowOnLowEngagement) { +// Ensure blocked sites get blocked. +IN_PROC_BROWSER_TEST_F(SafetyTipPageInfoBubbleViewBrowserTest, ShowOnBlock) { auto kNavigatedUrl = GetURL("site1.com"); - SetEngagementScore(browser(), kNavigatedUrl, kLowEngagement); + BlockPatterns({{"site1.com/", FlaggedPage::BAD_REP}}); + NavigateToURLSync(browser(), kNavigatedUrl); EXPECT_TRUE(IsUIShowing()); @@ -262,7 +309,7 @@ const GURL kFrameUrl = embedded_test_server()->GetURL("b.com", "/title1.html"); SetEngagementScore(browser(), kNavigatedUrl, kLowEngagement); - SetEngagementScore(browser(), kFrameUrl, kHighEngagement); + BlockPatterns({{"a.com/", FlaggedPage::BAD_REP}}); NavigateToURLSync(browser(), kNavigatedUrl); EXPECT_TRUE(IsUIShowing());
diff --git a/chrome/browser/ui/views/passwords/password_bubble_view_base.cc b/chrome/browser/ui/views/passwords/password_bubble_view_base.cc index da8ef01..859ad726 100644 --- a/chrome/browser/ui/views/passwords/password_bubble_view_base.cc +++ b/chrome/browser/ui/views/passwords/password_bubble_view_base.cc
@@ -48,33 +48,22 @@ DCHECK(bubble); DCHECK(bubble == g_manage_passwords_bubble_); - if (anchor_view) { - views::Button* highlighted_button; - if (base::FeatureList::IsEnabled( - autofill::features::kAutofillEnableToolbarStatusChip)) { - highlighted_button = - browser_view->toolbar()->toolbar_page_action_container()->GetIconView( - PageActionIconType::kManagePasswords); - } else { - highlighted_button = - browser_view->toolbar_button_provider() - ->GetOmniboxPageActionIconContainerView() - ->GetPageActionIconView(PageActionIconType::kManagePasswords); - } - g_manage_passwords_bubble_->SetHighlightedButton(highlighted_button); + views::Button* highlighted_button; + if (base::FeatureList::IsEnabled( + autofill::features::kAutofillEnableToolbarStatusChip)) { + highlighted_button = + browser_view->toolbar()->toolbar_page_action_container()->GetIconView( + PageActionIconType::kManagePasswords); } else { - g_manage_passwords_bubble_->set_parent_window( - web_contents->GetNativeView()); + highlighted_button = + browser_view->toolbar_button_provider() + ->GetOmniboxPageActionIconContainerView() + ->GetPageActionIconView(PageActionIconType::kManagePasswords); } + g_manage_passwords_bubble_->SetHighlightedButton(highlighted_button); views::BubbleDialogDelegateView::CreateBubble(g_manage_passwords_bubble_); - // Adjust for fullscreen after creation as it relies on the content size. - if (!anchor_view) { - g_manage_passwords_bubble_->AdjustForFullscreen( - browser_view->GetBoundsInScreen()); - } - g_manage_passwords_bubble_->ShowForReason(reason); } @@ -133,7 +122,7 @@ content::WebContents* web_contents, views::View* anchor_view, DisplayReason reason) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), model_(PasswordsModelDelegateFromWebContents(web_contents), reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC : ManagePasswordsBubbleModel::USER_ACTION),
diff --git a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc index 9a5f3227..4f85909 100644 --- a/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc +++ b/chrome/browser/ui/views/relaunch_notification/relaunch_recommended_bubble_view.cc
@@ -54,14 +54,6 @@ anchor_button, detection_time, std::move(on_accept)); bubble_view->SetArrow(views::BubbleBorder::TOP_RIGHT); -#if defined(OS_MACOSX) - // Parent the bubble to the browser window when there is no anchor view. - if (!anchor_button) { - bubble_view->set_parent_window( - platform_util::GetViewForWindow(browser->window()->GetNativeWindow())); - } -#endif // defined(OS_MACOSX) - views::Widget* bubble_widget = views::BubbleDialogDelegateView::CreateBubble(bubble_view); bubble_view->ShowForReason(AUTOMATIC); @@ -157,12 +149,10 @@ void RelaunchRecommendedBubbleView::VisibilityChanged( views::View* starting_from, bool is_visible) { - views::Button* anchor_button = views::Button::AsButton(GetAnchorView()); - if (anchor_button) { - anchor_button->AnimateInkDrop(is_visible ? views::InkDropState::ACTIVATED - : views::InkDropState::DEACTIVATED, - nullptr); - } + views::Button::AsButton(GetAnchorView()) + ->AnimateInkDrop(is_visible ? views::InkDropState::ACTIVATED + : views::InkDropState::DEACTIVATED, + nullptr); } // |relaunch_recommended_timer_| automatically starts for the next time the @@ -171,7 +161,7 @@ views::Button* anchor_button, base::Time detection_time, base::RepeatingClosure on_accept) - : LocationBarBubbleDelegateView(anchor_button, gfx::Point(), nullptr), + : LocationBarBubbleDelegateView(anchor_button, nullptr), on_accept_(std::move(on_accept)), body_label_(nullptr), relaunch_recommended_timer_(
diff --git a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc index 542d961..73d85ef 100644 --- a/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc +++ b/chrome/browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl.cc
@@ -40,7 +40,7 @@ views::View* anchor_view, content::WebContents* web_contents, SendTabToSelfBubbleController* controller) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), web_contents_(web_contents), controller_(controller) { DCHECK(controller);
diff --git a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.cc b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.cc index ac91943..56b6be6 100644 --- a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.cc +++ b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.cc
@@ -79,8 +79,8 @@ ClickToCallDialogView::ClickToCallDialogView( views::View* anchor_view, content::WebContents* web_contents, - ClickToCallSharingDialogController* controller) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + ClickToCallUiController* controller) + : LocationBarBubbleDelegateView(anchor_view, web_contents), controller_(controller), devices_(controller_->GetSyncedDevices()), apps_(controller_->GetApps()),
diff --git a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.h b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.h index d822fc3..be48a86a 100644 --- a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.h +++ b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.h
@@ -8,7 +8,7 @@ #include <memory> #include <vector> -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/sharing/sharing_device_info.h" #include "chrome/browser/sharing/sharing_dialog.h" #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h" @@ -31,7 +31,7 @@ // Bubble will be anchored to |anchor_view|. ClickToCallDialogView(views::View* anchor_view, content::WebContents* web_contents, - ClickToCallSharingDialogController* controller); + ClickToCallUiController* controller); ~ClickToCallDialogView() override; @@ -74,12 +74,12 @@ // Populates the dialog view containing error help text. void InitErrorView(); - ClickToCallSharingDialogController* controller_ = nullptr; + ClickToCallUiController* controller_ = nullptr; // Contains references to device and app buttons in // the order they appear. std::vector<HoverButton*> dialog_buttons_; std::vector<SharingDeviceInfo> devices_; - std::vector<ClickToCallSharingDialogController::App> apps_; + std::vector<ClickToCallUiController::App> apps_; Browser* browser_ = nullptr; bool send_failed_ = false;
diff --git a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view_unittest.cc b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view_unittest.cc index d2f42d3c..0c041a2d 100644 --- a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view_unittest.cc +++ b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view_unittest.cc
@@ -23,13 +23,11 @@ namespace { -class ClickToCallSharingDialogControllerMock - : public ClickToCallSharingDialogController { +class ClickToCallUiControllerMock : public ClickToCallUiController { public: - explicit ClickToCallSharingDialogControllerMock( - content::WebContents* web_contents) - : ClickToCallSharingDialogController(web_contents) {} - ~ClickToCallSharingDialogControllerMock() override = default; + explicit ClickToCallUiControllerMock(content::WebContents* web_contents) + : ClickToCallUiController(web_contents) {} + ~ClickToCallUiControllerMock() override = default; MOCK_METHOD1(OnDeviceChosen, void(const SharingDeviceInfo& device)); MOCK_METHOD1(OnAppChosen, void(const App& app)); @@ -43,7 +41,7 @@ public: ClickToCallDialogViewMock(views::View* anchor_view, content::WebContents* web_contents, - ClickToCallSharingDialogController* controller) + ClickToCallUiController* controller) : ClickToCallDialogView(anchor_view, web_contents, controller) {} ~ClickToCallDialogViewMock() override = default; @@ -79,8 +77,8 @@ anchor_widget_ = std::make_unique<views::Widget>(); anchor_widget_->Init(std::move(params)); - controller_ = std::make_unique<ClickToCallSharingDialogControllerMock>( - web_contents_.get()); + controller_ = + std::make_unique<ClickToCallUiControllerMock>(web_contents_.get()); devices_ = SetUpDevices(); apps_ = SetUpApps(); @@ -102,8 +100,8 @@ return devices; } - std::vector<ClickToCallSharingDialogController::App> SetUpApps() { - std::vector<ClickToCallSharingDialogController::App> apps; + std::vector<ClickToCallUiController::App> SetUpApps() { + std::vector<ClickToCallUiController::App> apps; apps.emplace_back(vector_icons::kOpenInNewIcon, base::UTF8ToUTF16("app_1"), std::string()); apps.emplace_back(vector_icons::kOpenInNewIcon, base::UTF8ToUTF16("app_2"), @@ -114,9 +112,9 @@ std::unique_ptr<TestingProfile> profile_; std::unique_ptr<content::WebContents> web_contents_; std::unique_ptr<views::Widget> anchor_widget_; - std::unique_ptr<ClickToCallSharingDialogControllerMock> controller_; + std::unique_ptr<ClickToCallUiControllerMock> controller_; std::vector<SharingDeviceInfo> devices_; - std::vector<ClickToCallSharingDialogController::App> apps_; + std::vector<ClickToCallUiController::App> apps_; }; TEST_F(ClickToCallDialogViewTest, PopulateDialogView) { @@ -157,8 +155,8 @@ } TEST_F(ClickToCallDialogViewTest, AppPressed) { - ClickToCallSharingDialogController::App app( - vector_icons::kOpenInNewIcon, base::UTF8ToUTF16("app_1"), std::string()); + ClickToCallUiController::App app(vector_icons::kOpenInNewIcon, + base::UTF8ToUTF16("app_1"), std::string()); EXPECT_CALL(*controller_.get(), GetSyncedDevices()) .WillOnce(Return(ByMove(std::move(devices_)))); EXPECT_CALL(*controller_.get(), GetApps())
diff --git a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.cc b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.cc index a765e16..7cec5a1 100644 --- a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.cc +++ b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.cc
@@ -7,7 +7,7 @@ #include <algorithm> #include "base/memory/ptr_util.h" -#include "chrome/browser/sharing/click_to_call/click_to_call_sharing_dialog_controller.h" +#include "chrome/browser/sharing/click_to_call/click_to_call_ui_controller.h" #include "chrome/browser/ui/views/sharing/click_to_call/click_to_call_dialog_view.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" @@ -17,13 +17,12 @@ #include "ui/views/animation/ink_drop.h" namespace { -ClickToCallSharingDialogController* GetControllerFromWebContents( +ClickToCallUiController* GetControllerFromWebContents( content::WebContents* web_contents) { if (!web_contents) return nullptr; - return ClickToCallSharingDialogController::GetOrCreateFromWebContents( - web_contents); + return ClickToCallUiController::GetOrCreateFromWebContents(web_contents); } } // namespace
diff --git a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.h b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.h index ff4981a..2011468e 100644 --- a/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.h +++ b/chrome/browser/ui/views/sharing/click_to_call/click_to_call_icon_view.h
@@ -14,7 +14,7 @@ #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/vector_icon_types.h" -class ClickToCallSharingDialogController; +class ClickToCallUiController; // The location bar icon to show the click to call bubble where the user can // choose to send a phone number to a target device or use an OS handler app. @@ -33,7 +33,7 @@ const gfx::VectorIcon& GetVectorIcon() const override; private: - ClickToCallSharingDialogController* last_controller_ = nullptr; + ClickToCallUiController* last_controller_ = nullptr; DISALLOW_COPY_AND_ASSIGN(ClickToCallIconView); };
diff --git a/chrome/browser/ui/views/tabs/color_picker_view.cc b/chrome/browser/ui/views/tabs/color_picker_view.cc new file mode 100644 index 0000000..6cd8c5f --- /dev/null +++ b/chrome/browser/ui/views/tabs/color_picker_view.cc
@@ -0,0 +1,157 @@ +// Copyright 2019 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/views/tabs/color_picker_view.h" + +#include <memory> + +#include "base/bind.h" +#include "base/callback.h" +#include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "ui/gfx/canvas.h" +#include "ui/views/border.h" +#include "ui/views/controls/button/button.h" +#include "ui/views/layout/box_layout.h" + +// Represents one of the colors the user can pick from. Displayed as a solid +// circle of the given color. +class ColorPickerElementView : public views::Button, + public views::ButtonListener { + public: + ColorPickerElementView( + base::RepeatingCallback<void(ColorPickerElementView*)> selected_callback, + SkColor color, + base::string16 color_name) + : Button(this), + selected_callback_(std::move(selected_callback)), + color_(color), + color_name_(color_name) { + DCHECK(selected_callback_); + + SetAccessibleName(color_name); + + SetBorder( + views::CreateEmptyBorder(ChromeLayoutProvider::Get()->GetInsetsMetric( + views::INSETS_VECTOR_IMAGE_BUTTON))); + + set_has_ink_drop_action_on_click(false); + set_ink_drop_base_color(SK_ColorBLACK); + SetInkDropMode(InkDropMode::ON); + } + + SkColor color() const { return color_; } + + void SetSelected(bool selected) { + if (selected_ == selected) + return; + selected_ = selected; + UpdateVisualsForSelection(nullptr); + } + + bool selected() const { return selected_; } + + // views::Button: + base::string16 GetTooltipText(const gfx::Point& p) const override { + return color_name_; + } + + gfx::Size CalculatePreferredSize() const override { + const gfx::Insets insets = GetInsets(); + gfx::Size size(16, 16); + size.Enlarge(insets.width(), insets.height()); + return size; + } + + int GetHeightForWidth(int width) const override { return width; } + + void PaintButtonContents(gfx::Canvas* canvas) override { + // Paint a colored circle surrounded by a bit of empty space. + + gfx::RectF bounds(GetContentsBounds()); + // We should be a circle. + DCHECK_EQ(bounds.width(), bounds.height()); + + cc::PaintFlags flags; + flags.setStyle(cc::PaintFlags::kFill_Style); + flags.setColor(color_); + flags.setAntiAlias(true); + canvas->DrawCircle(bounds.CenterPoint(), bounds.width() / 2.0f, flags); + } + + // views::ButtonListener: + void ButtonPressed(Button* sender, const ui::Event& event) override { + DCHECK_EQ(this, sender); + + selected_ = !selected_; + UpdateVisualsForSelection(&event); + selected_callback_.Run(this); + } + + private: + void UpdateVisualsForSelection(const ui::Event* selection_event) { + // TODO(crbug.com/989174): display selection a better way; the ink drop is + // ugly. + AnimateInkDrop( + selected_ ? views::InkDropState::ACTIVATED + : views::InkDropState::DEACTIVATED, + selection_event != nullptr && selection_event->IsLocatedEvent() + ? selection_event->AsLocatedEvent() + : nullptr); + } + + base::RepeatingCallback<void(ColorPickerElementView*)> selected_callback_; + SkColor color_; + base::string16 color_name_; + bool selected_ = false; +}; + +ColorPickerView::ColorPickerView( + base::span<const std::pair<SkColor, base::string16>> colors) { + elements_.reserve(colors.size()); + for (const auto& color : colors) { + // Create the views for each color, passing them our callback and saving + // references to them. base::Unretained() is safe here since we delete these + // views in our destructor, ensuring we outlive them. + elements_.push_back(AddChildView(std::make_unique<ColorPickerElementView>( + base::Bind(&ColorPickerView::OnColorSelected, base::Unretained(this)), + color.first, color.second))); + } + + const int element_spacing = ChromeLayoutProvider::Get()->GetDistanceMetric( + views::DISTANCE_RELATED_BUTTON_HORIZONTAL); + + auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kHorizontal, gfx::Insets(), + element_spacing)); + layout->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::kCenter); +} + +ColorPickerView::~ColorPickerView() { + // Remove child views early since they have references to us through a + // callback. + RemoveAllChildViews(true); +} + +base::Optional<SkColor> ColorPickerView::GetSelectedColor() const { + for (const ColorPickerElementView* element : elements_) { + if (element->selected()) + return element->color(); + } + return base::nullopt; +} + +views::Button* ColorPickerView::GetElementAtIndexForTesting(int index) { + DCHECK_GE(index, 0); + DCHECK_LT(index, static_cast<int>(elements_.size())); + return elements_[index]; +} + +void ColorPickerView::OnColorSelected(ColorPickerElementView* element) { + // Unselect all other elements so that only one can be selected at a time. + for (ColorPickerElementView* other_element : elements_) { + if (other_element != element) + other_element->SetSelected(false); + } +}
diff --git a/chrome/browser/ui/views/tabs/color_picker_view.h b/chrome/browser/ui/views/tabs/color_picker_view.h new file mode 100644 index 0000000..9f3b79b --- /dev/null +++ b/chrome/browser/ui/views/tabs/color_picker_view.h
@@ -0,0 +1,45 @@ +// Copyright 2019 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. + +#ifndef CHROME_BROWSER_UI_VIEWS_TABS_COLOR_PICKER_VIEW_H_ +#define CHROME_BROWSER_UI_VIEWS_TABS_COLOR_PICKER_VIEW_H_ + +#include <utility> +#include <vector> + +#include "base/containers/span.h" +#include "base/optional.h" +#include "ui/views/view.h" + +namespace views { +class Button; +} + +class ColorPickerElementView; + +// Lets users pick from a list of colors displayed as circles that can be +// clicked on. At most one can be selected, similar to radio buttons. +// +// TODO(crbug.com/989174): make this keyboard and screenreader accessible. +class ColorPickerView : public views::View { + public: + // |colors| should contain the color values and accessible names. There should + // not be duplicate colors. + explicit ColorPickerView( + base::span<const std::pair<SkColor, base::string16>> colors); + ~ColorPickerView() override; + + base::Optional<SkColor> GetSelectedColor() const; + + views::Button* GetElementAtIndexForTesting(int index); + + private: + // Handles the selection of a particular color. This is passed as a callback + // to the views representing each color. + void OnColorSelected(ColorPickerElementView* element); + + std::vector<ColorPickerElementView*> elements_; +}; + +#endif // CHROME_BROWSER_UI_VIEWS_TABS_COLOR_PICKER_VIEW_H_
diff --git a/chrome/browser/ui/views/tabs/color_picker_view_unittest.cc b/chrome/browser/ui/views/tabs/color_picker_view_unittest.cc new file mode 100644 index 0000000..5639d3c3 --- /dev/null +++ b/chrome/browser/ui/views/tabs/color_picker_view_unittest.cc
@@ -0,0 +1,96 @@ +// Copyright 2019 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/views/tabs/color_picker_view.h" + +#include <array> +#include <memory> +#include <utility> + +#include "base/strings/string16.h" +#include "base/strings/utf_string_conversions.h" +#include "base/time/time.h" +#include "chrome/test/views/chrome_views_test_base.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/skia/include/core/SkColor.h" +#include "ui/events/event.h" +#include "ui/gfx/canvas.h" +#include "ui/views/controls/button/button.h" +#include "ui/views/test/widget_test.h" +#include "ui/views/widget/widget.h" + +class ColorPickerViewTest : public ChromeViewsTestBase { + protected: + static const std::array<std::pair<SkColor, base::string16>, 3> kTestColors; + + void SetUp() override { + ChromeViewsTestBase::SetUp(); + + views::Widget::InitParams widget_params = + CreateParams(views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); + widget_params.ownership = + views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; + widget_ = std::make_unique<views::Widget>(); + widget_->Init(std::move(widget_params)); + + color_picker_ = new ColorPickerView(kTestColors); + widget_->SetContentsView(color_picker_); + + color_picker_->SizeToPreferredSize(); + } + + void TearDown() override { + widget_.reset(); + + ChromeViewsTestBase::TearDown(); + } + + void ClickColorAtIndex(int index) { + views::Button* element = color_picker_->GetElementAtIndexForTesting(index); + gfx::Point center = element->GetLocalBounds().CenterPoint(); + gfx::Point root_center = center; + views::View::ConvertPointToWidget(color_picker_, &root_center); + + ui::MouseEvent pressed_event(ui::ET_MOUSE_PRESSED, center, root_center, + base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, + 0); + element->OnMousePressed(pressed_event); + + ui::MouseEvent released_event(ui::ET_MOUSE_RELEASED, center, root_center, + base::TimeTicks(), ui::EF_LEFT_MOUSE_BUTTON, + 0); + element->OnMouseReleased(released_event); + } + + ColorPickerView* color_picker_; + + private: + std::unique_ptr<views::Widget> widget_; +}; + +// static +const std::array<std::pair<SkColor, base::string16>, 3> + ColorPickerViewTest::kTestColors{{ + {SK_ColorRED, base::ASCIIToUTF16("Red")}, + {SK_ColorGREEN, base::ASCIIToUTF16("Green")}, + {SK_ColorBLUE, base::ASCIIToUTF16("Blue")}, + }}; + +TEST_F(ColorPickerViewTest, NoColorSelectedByDefault) { + EXPECT_FALSE(color_picker_->GetSelectedColor().has_value()); +} + +TEST_F(ColorPickerViewTest, ClickingSelectsColor) { + ClickColorAtIndex(0); + EXPECT_EQ(kTestColors[0].first, color_picker_->GetSelectedColor()); + + ClickColorAtIndex(1); + EXPECT_EQ(kTestColors[1].first, color_picker_->GetSelectedColor()); +} + +TEST_F(ColorPickerViewTest, ClickingTwiceDeselects) { + ClickColorAtIndex(0); + ClickColorAtIndex(0); + EXPECT_FALSE(color_picker_->GetSelectedColor().has_value()); +}
diff --git a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc index 0678d7c..e6873b7 100644 --- a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc +++ b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.cc
@@ -10,18 +10,21 @@ #include <vector> #include "base/containers/flat_map.h" +#include "base/containers/span.h" +#include "base/logging.h" #include "base/no_destructor.h" #include "base/strings/string16.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/ui/tabs/tab_group_visual_data.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" #include "chrome/browser/ui/views/chrome_typography.h" +#include "chrome/browser/ui/views/tabs/color_picker_view.h" #include "chrome/browser/ui/views/tabs/tab_controller.h" +#include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h" #include "third_party/skia/include/core/SkColor.h" -#include "ui/base/models/simple_combobox_model.h" #include "ui/gfx/color_palette.h" #include "ui/gfx/geometry/insets.h" -#include "ui/views/controls/combobox/combobox.h" +#include "ui/views/controls/button/button.h" #include "ui/views/controls/label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/layout_types.h" @@ -30,17 +33,18 @@ namespace { // Returns our hard-coded set of colors. -const base::flat_map<std::string, SkColor>& GetColorPickerMap() { - static const base::NoDestructor<base::flat_map<std::string, SkColor>> map( - {{"Blue", gfx::kGoogleBlue600}, - {"Red", gfx::kGoogleRed600}, - {"Yellow", gfx::kGoogleYellow600}, - {"Green", gfx::kGoogleGreen600}, - {"Orange", gfx::kGoogleOrange600}, - {"Pink", gfx::kGooglePink600}, - {"Purple", gfx::kGooglePurple600}, - {"Cyan", gfx::kGoogleCyan600}}); - return *map; +const std::vector<std::pair<SkColor, base::string16>>& GetColorPickerList() { + static const base::NoDestructor< + std::vector<std::pair<SkColor, base::string16>>> + list({{gfx::kGoogleBlue600, base::ASCIIToUTF16("Blue")}, + {gfx::kGoogleRed600, base::ASCIIToUTF16("Red")}, + {gfx::kGoogleYellow600, base::ASCIIToUTF16("Yellow")}, + {gfx::kGoogleGreen600, base::ASCIIToUTF16("Green")}, + {gfx::kGoogleOrange600, base::ASCIIToUTF16("Orange")}, + {gfx::kGooglePink600, base::ASCIIToUTF16("Pink")}, + {gfx::kGooglePurple600, base::ASCIIToUTF16("Purple")}, + {gfx::kGoogleCyan600, base::ASCIIToUTF16("Cyan")}}); + return *list; } } // namespace @@ -73,10 +77,9 @@ if (title.empty()) title = old_data.title(); - const base::string16 color_name = - color_selector_->model()->GetItemAt(color_selector_->GetSelectedIndex()); + base::Optional<SkColor> selected_color = color_selector_->GetSelectedColor(); const SkColor color = - GetColorPickerMap().find(base::UTF16ToASCII(color_name))->second; + selected_color.has_value() ? selected_color.value() : old_data.color(); TabGroupVisualData new_data(std::move(title), color); tab_controller_->SetVisualDataForGroup(group_, new_data); @@ -108,19 +111,8 @@ views::DISTANCE_UNRELATED_CONTROL_VERTICAL), 0)); - std::vector<base::string16> color_names; - for (const auto& entry : GetColorPickerMap()) - color_names.push_back(base::ASCIIToUTF16(entry.first)); - auto combobox_model = std::make_unique<ui::SimpleComboboxModel>(color_names); - - // Add the color selector with label above it. - base::string16 color_label_text = base::ASCIIToUTF16("New color"); - AddChildView(std::make_unique<views::Label>(color_label_text, - views::style::CONTEXT_LABEL, - views::style::STYLE_PRIMARY)); - color_selector_ = AddChildView( - std::make_unique<views::Combobox>(std::move(combobox_model))); - color_selector_->SetTooltipText(color_label_text); + color_selector_ = + AddChildView(std::make_unique<ColorPickerView>(GetColorPickerList())); // Layout vertically with margin collapsing. This allows us to use spacer // views with |DISTANCE_UNRELATED_CONTROL_VERTICAL| margins without worrying
diff --git a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h index f5ddb03..7b26e19f 100644 --- a/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h +++ b/chrome/browser/ui/views/tabs/tab_group_editor_bubble_view.h
@@ -16,9 +16,7 @@ class Size; } -namespace views { -class Combobox; -} +class ColorPickerView; // A dialog for changing a tab group's visual parameters. // @@ -46,8 +44,7 @@ views::Textfield* title_field_; - // TODO(crbug.com/989174): replace this with a color palette. - views::Combobox* color_selector_; + ColorPickerView* color_selector_; }; #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_GROUP_EDITOR_BUBBLE_VIEW_H_
diff --git a/chrome/browser/ui/views/translate/translate_bubble_view.cc b/chrome/browser/ui/views/translate/translate_bubble_view.cc index b395de86..7b03620 100644 --- a/chrome/browser/ui/views/translate/translate_bubble_view.cc +++ b/chrome/browser/ui/views/translate/translate_bubble_view.cc
@@ -602,13 +602,12 @@ std::unique_ptr<TranslateBubbleModel> model, translate::TranslateErrors::Type error_type, content::WebContents* web_contents) - : LocationBarBubbleDelegateView(anchor_view, gfx::Point(), web_contents), + : LocationBarBubbleDelegateView(anchor_view, web_contents), model_(std::move(model)), error_type_(error_type), is_in_incognito_window_( web_contents && web_contents->GetBrowserContext()->IsOffTheRecord()), bubble_ui_model_(language::GetTranslateUiBubbleModel()) { - DCHECK(anchor_view); translate_bubble_view_ = this; if (web_contents) // web_contents can be null in unit_tests. mouse_handler_.reset(new WebContentMouseHandler(this, web_contents));
diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc index 28f52b8..52fdc8c 100644 --- a/chrome/browser/ui/views/uninstall_view.cc +++ b/chrome/browser/ui/views/uninstall_view.cc
@@ -4,7 +4,7 @@ #include "chrome/browser/ui/views/uninstall_view.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/process/launch.h" #include "base/run_loop.h" #include "chrome/browser/shell_integration.h"
diff --git a/chrome/browser/ui/web_applications/web_app_launch_manager.cc b/chrome/browser/ui/web_applications/web_app_launch_manager.cc index 9782902e..9333654 100644 --- a/chrome/browser/ui/web_applications/web_app_launch_manager.cc +++ b/chrome/browser/ui/web_applications/web_app_launch_manager.cc
@@ -9,7 +9,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/web_applications/components/web_app_helpers.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/browser/web_applications/web_app_registrar.h" @@ -60,8 +60,8 @@ SetWebAppPrefsForWebContents(web_contents); - web_app::WebAppTabHelperBase* tab_helper = - web_app::WebAppTabHelperBase::FromWebContents(web_contents); + web_app::WebAppTabHelper* tab_helper = + web_app::WebAppTabHelper::FromWebContents(web_contents); DCHECK(tab_helper); tab_helper->SetAppId(app_id);
diff --git a/chrome/browser/ui/web_applications/web_app_metrics.cc b/chrome/browser/ui/web_applications/web_app_metrics.cc index 39fda37..4708127 100644 --- a/chrome/browser/ui/web_applications/web_app_metrics.cc +++ b/chrome/browser/ui/web_applications/web_app_metrics.cc
@@ -11,7 +11,7 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/web_applications/web_app_metrics_factory.h" #include "chrome/browser/web_applications/components/app_registrar.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "content/public/browser/web_contents.h" @@ -97,9 +97,8 @@ engagement_type); } - // A presence of WebAppTabHelperBase with valid app_id indicates a web app. - WebAppTabHelperBase* tab_helper = - WebAppTabHelperBase::FromWebContents(web_contents); + // A presence of WebAppTabHelper with valid app_id indicates a web app. + WebAppTabHelper* tab_helper = WebAppTabHelper::FromWebContents(web_contents); if (!tab_helper || tab_helper->app_id().empty()) return;
diff --git a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc index 67a9d14..b464137 100644 --- a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc +++ b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.cc
@@ -9,6 +9,7 @@ #include "base/callback.h" #include "build/build_config.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/extensions/application_launch.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" @@ -109,6 +110,12 @@ #endif // defined(OS_CHROMEOS) } +bool WebAppUiManagerImpl::IsInAppWindow( + content::WebContents* web_contents) const { + return AppBrowserController::IsForWebAppBrowser( + chrome::FindBrowserWithWebContents(web_contents)); +} + bool WebAppUiManagerImpl::CanReparentAppTabToWindow( const AppId& app_id, bool shortcut_created) const {
diff --git a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.h b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.h index 47e4fea..24c8d91 100644 --- a/chrome/browser/ui/web_applications/web_app_ui_manager_impl.h +++ b/chrome/browser/ui/web_applications/web_app_ui_manager_impl.h
@@ -42,6 +42,7 @@ void MigrateOSAttributes(const AppId& from, const AppId& to) override; bool CanAddAppToQuickLaunchBar() const override; void AddAppToQuickLaunchBar(const AppId& app_id) override; + bool IsInAppWindow(content::WebContents* web_contents) const override; bool CanReparentAppTabToWindow(const AppId& app_id, bool shortcut_created) const override; void ReparentAppTabToWindow(content::WebContents* contents,
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc index 27d8865..af42771 100644 --- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc +++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -632,7 +632,7 @@ !profile->IsOffTheRecord()) return &NewWebUI<SigninEmailConfirmationUI>; if (url.host_piece() == chrome::kChromeUIWelcomeHost && - welcome::IsOnboardingEnabled(profile)) + welcome::IsEnabled(profile)) return &NewWebUI<WelcomeUI>; #endif
diff --git a/chrome/browser/ui/webui/chromeos/cellular_setup/DEPS b/chrome/browser/ui/webui/chromeos/cellular_setup/DEPS new file mode 100644 index 0000000..55ca2bd --- /dev/null +++ b/chrome/browser/ui/webui/chromeos/cellular_setup/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+chromeos/services/cellular_setup", +]
diff --git a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc index 4243362e..8975b1d 100644 --- a/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc +++ b/chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/webui/chromeos/cellular_setup/cellular_setup_dialog.h" #include "base/bind.h" +#include "base/supports_user_data.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/browser_dialogs.h" @@ -12,9 +13,10 @@ #include "chrome/common/url_constants.h" #include "chrome/grit/cellular_setup_resources.h" #include "chrome/grit/cellular_setup_resources_map.h" -#include "chromeos/services/cellular_setup/public/mojom/constants.mojom.h" +#include "chromeos/services/cellular_setup/cellular_setup_base.h" +#include "chromeos/services/cellular_setup/cellular_setup_impl.h" #include "content/public/browser/web_ui_data_source.h" -#include "services/service_manager/public/cpp/connector.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" #include "ui/aura/window.h" namespace chromeos { @@ -30,6 +32,37 @@ CellularSetupDialog* dialog_instance = nullptr; +// Used to attach an instance of the CellularSetup service to a BrowserContext. +class CellularSetupServiceHolder : public base::SupportsUserData::Data { + public: + CellularSetupServiceHolder() = default; + ~CellularSetupServiceHolder() override = default; + + void BindReceiver(mojo::PendingReceiver<mojom::CellularSetup> receiver) { + service_.BindRequest(std::move(receiver)); + } + + private: + CellularSetupImpl service_; + + DISALLOW_COPY_AND_ASSIGN(CellularSetupServiceHolder); +}; + +const char kCellularSetupServiceHolderKey[] = "cellular_setup_service_holder"; + +CellularSetupServiceHolder* GetOrCreateServiceHolder( + content::BrowserContext* browser_context) { + auto* holder = static_cast<CellularSetupServiceHolder*>( + browser_context->GetUserData(kCellularSetupServiceHolderKey)); + if (!holder) { + auto new_holder = std::make_unique<CellularSetupServiceHolder>(); + holder = new_holder.get(); + browser_context->SetUserData(kCellularSetupServiceHolderKey, + std::move(new_holder)); + } + return holder; +} + } // namespace // static @@ -100,10 +133,8 @@ void CellularSetupDialogUI::BindCellularSetup( mojom::CellularSetupRequest request) { - service_manager::Connector* connector = - content::BrowserContext::GetConnectorFor( - web_ui()->GetWebContents()->GetBrowserContext()); - connector->BindInterface(mojom::kServiceName, std::move(request)); + GetOrCreateServiceHolder(web_ui()->GetWebContents()->GetBrowserContext()) + ->BindReceiver(std::move(request)); } } // namespace cellular_setup
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc index 186c6ac..82bb29d 100644 --- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -417,6 +417,24 @@ screen_mode_ = GetGaiaScreenMode(context.email, context.use_offline); params.SetInteger("screenMode", screen_mode_); + if (!context.email.empty()) { + const AccountId account_id = GetAccountId( + context.email, std::string() /* id */, AccountType::UNKNOWN); + const user_manager::User* const user = + user_manager::UserManager::Get()->FindUser(account_id); + if (user && user->using_saml() && + user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT) { + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + switches::kPublicAccountsSamlUrl)) { + std::string saml_url = + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + switches::kPublicAccountsSamlUrl); + params.SetBoolean("startsOnSamlPage", true); + params.SetString("frameUrl", saml_url); + } + } + } + if (screen_mode_ == GAIA_SCREEN_MODE_AD && !authpolicy_login_helper_) authpolicy_login_helper_ = std::make_unique<AuthPolicyHelper>();
diff --git a/chrome/browser/ui/webui/chromeos/set_time_ui.cc b/chrome/browser/ui/webui/chromeos/set_time_ui.cc index 7c2890f..d25ed0b 100644 --- a/chrome/browser/ui/webui/chromeos/set_time_ui.cc +++ b/chrome/browser/ui/webui/chromeos/set_time_ui.cc
@@ -128,6 +128,12 @@ return; } + double seconds; + if (!args->GetDouble(0, &seconds)) { + NOTREACHED(); + return; + } + AccountId account_id; bool is_user_logged_in = user_manager::UserManager::Get()->IsUserLoggedIn(); if (is_user_logged_in) { @@ -139,7 +145,8 @@ base::BindRepeating(&SetTimeMessageHandler::OnParentAccessValidation, weak_factory_.GetWeakPtr()), ash::ParentAccessRequestReason::kChangeTime, - !is_user_logged_in /* extra_dimmer */); + !is_user_logged_in /* extra_dimmer */, + base::Time::FromDoubleT(seconds)); } void OnParentAccessValidation(bool success) {
diff --git a/chrome/browser/ui/webui/crashes_ui.cc b/chrome/browser/ui/webui/crashes_ui.cc index 9dbca7c9..0c6b74cf 100644 --- a/chrome/browser/ui/webui/crashes_ui.cc +++ b/chrome/browser/ui/webui/crashes_ui.cc
@@ -46,16 +46,17 @@ content::WebUIDataSource* source = content::WebUIDataSource::Create(chrome::kChromeUICrashesHost); - for (size_t i = 0; i < crash::kCrashesUILocalizedStringsCount; ++i) { + for (size_t i = 0; i < crash_reporter::kCrashesUILocalizedStringsCount; ++i) { source->AddLocalizedString( - crash::kCrashesUILocalizedStrings[i].name, - crash::kCrashesUILocalizedStrings[i].resource_id); + crash_reporter::kCrashesUILocalizedStrings[i].name, + crash_reporter::kCrashesUILocalizedStrings[i].resource_id); } - source->AddLocalizedString(crash::kCrashesUIShortProductName, + source->AddLocalizedString(crash_reporter::kCrashesUIShortProductName, IDS_SHORT_PRODUCT_NAME); source->SetJsonPath("strings.js"); - source->AddResourcePath(crash::kCrashesUICrashesJS, IDR_CRASH_CRASHES_JS); + source->AddResourcePath(crash_reporter::kCrashesUICrashesJS, + IDR_CRASH_CRASHES_JS); source->SetDefaultResource(IDR_CRASH_CRASHES_HTML); return source; } @@ -112,19 +113,19 @@ upload_list_->Load(base::BindOnce(&CrashesDOMHandler::OnUploadListAvailable, base::Unretained(this))); web_ui()->RegisterMessageCallback( - crash::kCrashesUIRequestCrashList, + crash_reporter::kCrashesUIRequestCrashList, base::BindRepeating(&CrashesDOMHandler::HandleRequestCrashes, base::Unretained(this))); #if defined(OS_CHROMEOS) web_ui()->RegisterMessageCallback( - crash::kCrashesUIRequestCrashUpload, + crash_reporter::kCrashesUIRequestCrashUpload, base::BindRepeating(&CrashesDOMHandler::HandleRequestUploads, base::Unretained(this))); #endif web_ui()->RegisterMessageCallback( - crash::kCrashesUIRequestSingleCrashUpload, + crash_reporter::kCrashesUIRequestSingleCrashUpload, base::BindRepeating(&CrashesDOMHandler::HandleRequestSingleCrashUpload, base::Unretained(this))); } @@ -183,7 +184,7 @@ base::ListValue crash_list; if (upload_list) - crash::UploadListToValue(upload_list_.get(), &crash_list); + crash_reporter::UploadListToValue(upload_list_.get(), &crash_list); base::Value enabled(crash_reporting_enabled); base::Value dynamic_backend(system_crash_reporter); @@ -199,8 +200,8 @@ args.push_back(&crash_list); args.push_back(&version); args.push_back(&os_string); - web_ui()->CallJavascriptFunctionUnsafe(crash::kCrashesUIUpdateCrashList, - args); + web_ui()->CallJavascriptFunctionUnsafe( + crash_reporter::kCrashesUIUpdateCrashList, args); } void CrashesDOMHandler::HandleRequestSingleCrashUpload(
diff --git a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.cc b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.cc index 0da3190..a0ce9854 100644 --- a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.cc
@@ -141,21 +141,18 @@ AllowJavascript(); const auto& args_list = args->GetList(); - CHECK_EQ(args_list.size(), 2u); + CHECK_EQ(args_list.size(), 1u); CHECK(args_list[0].is_string()); - CHECK(args_list[1].is_bool()); base::Value callback_id = args_list[0].Clone(); - bool include_images = args_list[1].GetBool(); - account_manager_->GetAccounts(base::BindOnce( - &AccountManagerUIHandler::OnGetAccounts, weak_factory_.GetWeakPtr(), - std::move(callback_id), include_images)); + account_manager_->GetAccounts( + base::BindOnce(&AccountManagerUIHandler::OnGetAccounts, + weak_factory_.GetWeakPtr(), std::move(callback_id))); } void AccountManagerUIHandler::OnGetAccounts( base::Value callback_id, - bool include_images, const std::vector<AccountManager::Account>& stored_accounts) { base::ListValue accounts; @@ -190,20 +187,17 @@ maybe_account_info->account_id)); account.SetString("fullName", maybe_account_info->full_name); account.SetString("email", stored_account.raw_email); - // Images can be large, so only send them if requested. - if (include_images) { - if (!maybe_account_info->account_image.IsEmpty()) { - account.SetString("pic", - webui::GetBitmapDataUrl( - maybe_account_info->account_image.AsBitmap())); - } else { - gfx::ImageSkia default_icon = - *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( - IDR_LOGIN_DEFAULT_USER); - account.SetString( - "pic", webui::GetBitmapDataUrl( - default_icon.GetRepresentation(1.0f).GetBitmap())); - } + if (!maybe_account_info->account_image.IsEmpty()) { + account.SetString("pic", + webui::GetBitmapDataUrl( + maybe_account_info->account_image.AsBitmap())); + } else { + gfx::ImageSkia default_icon = + *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( + IDR_LOGIN_DEFAULT_USER); + account.SetString("pic", + webui::GetBitmapDataUrl( + default_icon.GetRepresentation(1.0f).GetBitmap())); } account.SetBoolean("unmigrated", account_manager_->HasDummyGaiaToken(account_key));
diff --git a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.h b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.h index 071c7cf..53ddcb3b 100644 --- a/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.h +++ b/chrome/browser/ui/webui/settings/chromeos/account_manager_handler.h
@@ -64,7 +64,6 @@ // |AccountManager::GetAccounts| callback. void OnGetAccounts( base::Value callback_id, - bool include_images, const std::vector<AccountManager::Account>& stored_accounts); // Refreshes the UI.
diff --git a/chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc b/chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc index 812cffc..fedb6de6 100644 --- a/chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc
@@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/logging.h" +#include "base/time/time.h" #include "base/values.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/child_accounts/parent_access_code/parent_access_service.h" @@ -165,7 +166,8 @@ user_manager::UserManager::Get()->GetActiveUser()->GetAccountId(), base::BindRepeating(&DateTimeHandler::OnParentAccessValidation, weak_ptr_factory_.GetWeakPtr()), - ash::ParentAccessRequestReason::kChangeTimezone); + ash::ParentAccessRequestReason::kChangeTimezone, false /* extra_dimmer */, + base::Time()); } void DateTimeHandler::OnParentAccessValidation(bool success) {
diff --git a/chrome/browser/ui/webui/settings/chromeos/parental_controls_handler.cc b/chrome/browser/ui/webui/settings/chromeos/parental_controls_handler.cc index 5ffb17a..1918216 100644 --- a/chrome/browser/ui/webui/settings/chromeos/parental_controls_handler.cc +++ b/chrome/browser/ui/webui/settings/chromeos/parental_controls_handler.cc
@@ -9,7 +9,6 @@ #include "base/values.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" -#include "chrome/browser/chromeos/arc/arc_session_manager.h" #include "chrome/browser/policy/profile_policy_connector.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -21,7 +20,6 @@ #include "chrome/services/app_service/public/cpp/app_update.h" #include "chrome/services/app_service/public/mojom/types.mojom.h" #include "chromeos/constants/chromeos_features.h" -#include "components/arc/arc_util.h" #include "ui/base/page_transition_types.h" #include "ui/base/window_open_disposition.h" #include "ui/display/types/display_constants.h" @@ -84,19 +82,20 @@ proxy->Launch(app_id, ui::EventFlags::EF_NONE, apps::mojom::LaunchSource::kFromParentalControls, display::kDefaultDisplayId); - } else if (arc::IsArcAvailable() && - arc::ArcSessionManager::Get()->IsAllowed()) { - // No FLH app installed, but ARC is enabled so launch Play Store - // to FLH app install page. - arc::LaunchPlayStoreWithUrl(kFamilyLinkChildHelperAppPlayStoreURL); - } else { - // As a last resort, launch browser to the family link site. - NavigateParams params(profile_, GURL(kFamilyLinkSiteURL), - ui::PAGE_TRANSITION_FROM_API); - params.disposition = WindowOpenDisposition::NEW_WINDOW; - params.window_action = NavigateParams::SHOW_WINDOW; - Navigate(¶ms); + return; } + // No FLH app installed, so try to launch Play Store to FLH app install page. + // If there is no Play Store available LaunchPlayStoreWithUrl() will return + // false. + if (arc::LaunchPlayStoreWithUrl(kFamilyLinkChildHelperAppPlayStoreURL)) { + return; + } + // As a last resort, launch browser to the family link site. + NavigateParams params(profile_, GURL(kFamilyLinkSiteURL), + ui::PAGE_TRANSITION_FROM_API); + params.disposition = WindowOpenDisposition::NEW_WINDOW; + params.window_action = NavigateParams::SHOW_WINDOW; + Navigate(¶ms); } bool ShouldShowParentalControls(Profile* profile) {
diff --git a/chrome/browser/ui/webui/settings/settings_security_key_handler.cc b/chrome/browser/ui/webui/settings/settings_security_key_handler.cc index 90c5bd1..ecbdda65 100644 --- a/chrome/browser/ui/webui/settings/settings_security_key_handler.cc +++ b/chrome/browser/ui/webui/settings/settings_security_key_handler.cc
@@ -566,10 +566,10 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(state_, State::kNone); DCHECK_EQ(1u, args->GetSize()); - - AllowJavascript(); DCHECK(callback_id_.empty()); + AllowJavascript(); + state_ = State::kStart; callback_id_ = args->GetList()[0].GetString(); discovery_factory_ = std::make_unique<device::FidoDiscoveryFactory>(); bio_ = std::make_unique<device::BioEnrollmentHandler>( @@ -587,15 +587,15 @@ void SecurityKeysBioEnrollmentHandler::OnReady() { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(bio_); + DCHECK_EQ(state_, State::kGatherPIN); DCHECK(!callback_id_.empty()); - + state_ = State::kReady; ResolveJavascriptCallback(base::Value(std::move(callback_id_)), base::Value()); } void SecurityKeysBioEnrollmentHandler::OnError(device::FidoReturnCode code) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - state_ = State::kNone; int error; @@ -641,9 +641,9 @@ base::OnceCallback<void(std::string)> cb) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!callback_id_.empty()); - + DCHECK(state_ == State::kStart || state_ == State::kGatherPIN); + state_ = State::kGatherPIN; provide_pin_cb_ = std::move(cb); - ResolveJavascriptCallback(base::Value(std::move(callback_id_)), base::Value(static_cast<int>(retries))); } @@ -652,7 +652,8 @@ const base::ListValue* args) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(2u, args->GetSize()); - + DCHECK_EQ(state_, State::kGatherPIN); + state_ = State::kGatherPIN; callback_id_ = args->GetList()[0].GetString(); std::move(provide_pin_cb_).Run(args->GetList()[1].GetString()); } @@ -661,17 +662,20 @@ const base::ListValue* args) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(1u, args->GetSize()); - + DCHECK_EQ(state_, State::kReady); + state_ = State::kEnumerating; callback_id_ = args->GetList()[0].GetString(); bio_->EnumerateTemplates( - base::BindOnce(&SecurityKeysBioEnrollmentHandler::OnHaveEnrollments, + base::BindOnce(&SecurityKeysBioEnrollmentHandler::OnHaveEnumeration, weak_factory_.GetWeakPtr())); } -void SecurityKeysBioEnrollmentHandler::OnHaveEnrollments( +void SecurityKeysBioEnrollmentHandler::OnHaveEnumeration( device::CtapDeviceResponseCode code, base::Optional<std::map<std::vector<uint8_t>, std::string>> enrollments) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(!callback_id_.empty()); + DCHECK_EQ(state_, State::kEnumerating); base::Value::ListStorage list; if (enrollments) { @@ -684,6 +688,7 @@ } } + state_ = State::kReady; ResolveJavascriptCallback(base::Value(std::move(callback_id_)), base::ListValue(std::move(list))); } @@ -692,7 +697,8 @@ const base::ListValue* args) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(1u, args->GetSize()); - + DCHECK_EQ(state_, State::kReady); + state_ = State::kEnrolling; callback_id_ = args->GetList()[0].GetString(); bio_->EnrollTemplate( base::BindRepeating( @@ -702,28 +708,32 @@ weak_factory_.GetWeakPtr())); } -void SecurityKeysBioEnrollmentHandler::OnEnrollmentFinished( - device::CtapDeviceResponseCode code) { - base::DictionaryValue d; - d.SetIntKey("code", static_cast<int>(code)); - d.SetIntKey("remaining", 0); - ResolveJavascriptCallback(base::Value(std::move(callback_id_)), std::move(d)); -} - void SecurityKeysBioEnrollmentHandler::OnEnrollingResponse( device::BioEnrollmentSampleStatus status, uint8_t remaining_samples) { + DCHECK_EQ(state_, State::kEnrolling); base::DictionaryValue d; d.SetIntKey("status", static_cast<int>(status)); d.SetIntKey("remaining", static_cast<int>(remaining_samples)); FireWebUIListener("security-keys-bio-enroll-status", std::move(d)); } +void SecurityKeysBioEnrollmentHandler::OnEnrollmentFinished( + device::CtapDeviceResponseCode code) { + DCHECK_EQ(state_, State::kEnrolling); + DCHECK(!callback_id_.empty()); + state_ = State::kReady; + base::DictionaryValue d; + d.SetIntKey("code", static_cast<int>(code)); + d.SetIntKey("remaining", 0); + ResolveJavascriptCallback(base::Value(std::move(callback_id_)), std::move(d)); +} + void SecurityKeysBioEnrollmentHandler::HandleCancel( const base::ListValue* args) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_EQ(1u, args->GetSize()); - + state_ = State::kCancelling; callback_id_ = args->GetList()[0].GetString(); bio_->Cancel(base::BindOnce(&SecurityKeysBioEnrollmentHandler::OnEnrollCancel, weak_factory_.GetWeakPtr())); @@ -731,6 +741,8 @@ void SecurityKeysBioEnrollmentHandler::OnEnrollCancel( device::CtapDeviceResponseCode) { + DCHECK_EQ(state_, State::kCancelling); + state_ = State::kReady; ResolveJavascriptCallback(base::Value(std::move(callback_id_)), base::Value()); }
diff --git a/chrome/browser/ui/webui/settings/settings_security_key_handler.h b/chrome/browser/ui/webui/settings/settings_security_key_handler.h index d8ceef5b..a703f2c5 100644 --- a/chrome/browser/ui/webui/settings/settings_security_key_handler.h +++ b/chrome/browser/ui/webui/settings/settings_security_key_handler.h
@@ -172,6 +172,12 @@ private: enum class State { kNone, + kStart, + kGatherPIN, + kReady, + kEnumerating, + kEnrolling, + kCancelling, }; void RegisterMessages() override; @@ -185,24 +191,22 @@ void HandleProvidePIN(const base::ListValue* args); void HandleEnumerate(const base::ListValue* args); - void OnHaveEnrollments( + void OnHaveEnumeration( device::CtapDeviceResponseCode, base::Optional<std::map<std::vector<uint8_t>, std::string>>); void HandleStartEnrolling(const base::ListValue* args); - void OnEnrollmentFinished(device::CtapDeviceResponseCode); void OnEnrollingResponse(device::BioEnrollmentSampleStatus, uint8_t); + void OnEnrollmentFinished(device::CtapDeviceResponseCode); void HandleCancel(const base::ListValue* args); void OnEnrollCancel(device::CtapDeviceResponseCode); State state_ = State::kNone; + std::string callback_id_; base::OnceCallback<void(std::string)> provide_pin_cb_; - std::unique_ptr<device::FidoDiscoveryFactory> discovery_factory_; std::unique_ptr<device::BioEnrollmentHandler> bio_; - - std::string callback_id_; base::WeakPtrFactory<SecurityKeysBioEnrollmentHandler> weak_factory_{this}; };
diff --git a/chrome/browser/ui/webui/tab_strip/OWNERS b/chrome/browser/ui/webui/tab_strip/OWNERS new file mode 100644 index 0000000..b84c705 --- /dev/null +++ b/chrome/browser/ui/webui/tab_strip/OWNERS
@@ -0,0 +1,4 @@ +dpapad@chromium.org +johntlee@chromium.org + +# COMPONENT: UI>Browser>WebUI
diff --git a/chrome/browser/ui/webui/usb_internals/BUILD.gn b/chrome/browser/ui/webui/usb_internals/BUILD.gn index 5229f5b..d193360f 100644 --- a/chrome/browser/ui/webui/usb_internals/BUILD.gn +++ b/chrome/browser/ui/webui/usb_internals/BUILD.gn
@@ -13,7 +13,4 @@ "//services/device/public/mojom:usb", "//services/device/public/mojom:usb_test", ] - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true }
diff --git a/chrome/browser/ui/webui/welcome/google_apps_handler.cc b/chrome/browser/ui/webui/welcome/google_apps_handler.cc index fd26cf38..1a8f2ed 100644 --- a/chrome/browser/ui/webui/welcome/google_apps_handler.cc +++ b/chrome/browser/ui/webui/welcome/google_apps_handler.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/ui/webui/welcome/helpers.h" #include "chrome/grit/chrome_unscaled_resources.h" #include "chrome/grit/generated_resources.h" -#include "chrome/grit/onboarding_welcome_resources.h" +#include "chrome/grit/welcome_resources.h" #include "components/favicon/core/favicon_service.h" #include "components/grit/components_resources.h" #include "components/grit/components_scaled_resources.h" @@ -51,43 +51,41 @@ BookmarkItem gmail = { static_cast<int>(GoogleApps::kGmail), - l10n_util::GetStringUTF8(IDS_ONBOARDING_WELCOME_NUX_GOOGLE_GMAIL), - "gmail", "https://accounts.google.com/b/0/AddMailService", - IDS_ONBOARDING_WELCOME_GMAIL}; + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_GMAIL), "gmail", + "https://accounts.google.com/b/0/AddMailService", IDS_WELCOME_GMAIL}; if (IsAppVariationEnabled()) { - google_apps_.push_back( - {static_cast<int>(GoogleApps::kSearch), - l10n_util::GetStringUTF8(IDS_ONBOARDING_WELCOME_NUX_GOOGLE_SEARCH), - "search", "https://google.com", IDS_ONBOARDING_WELCOME_SEARCH}); + google_apps_.push_back({static_cast<int>(GoogleApps::kSearch), + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_SEARCH), + "search", "https://google.com", + IDS_WELCOME_SEARCH}); } else { google_apps_.push_back(gmail); } google_apps_.push_back( {static_cast<int>(GoogleApps::kYouTube), - l10n_util::GetStringUTF8(IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_YOUTUBE), - "youtube", "https://youtube.com", IDS_ONBOARDING_WELCOME_YOUTUBE}); + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_APPS_YOUTUBE), "youtube", + "https://youtube.com", IDS_WELCOME_YOUTUBE}); google_apps_.push_back( {static_cast<int>(GoogleApps::kMaps), - l10n_util::GetStringUTF8(IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_MAPS), - "maps", "https://maps.google.com", IDS_ONBOARDING_WELCOME_MAPS}); + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_APPS_MAPS), "maps", + "https://maps.google.com", IDS_WELCOME_MAPS}); if (IsAppVariationEnabled()) { google_apps_.push_back(gmail); } else { google_apps_.push_back( {static_cast<int>(GoogleApps::kNews), - l10n_util::GetStringUTF8(IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_NEWS), - "news", "https://news.google.com", IDS_ONBOARDING_WELCOME_NEWS}); + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_APPS_NEWS), "news", + "https://news.google.com", IDS_WELCOME_NEWS}); } - google_apps_.push_back({static_cast<int>(GoogleApps::kTranslate), - l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_TRANSLATE), - "translate", "https://translate.google.com", - IDS_ONBOARDING_WELCOME_TRANSLATE}); + google_apps_.push_back( + {static_cast<int>(GoogleApps::kTranslate), + l10n_util::GetStringUTF8(IDS_WELCOME_GOOGLE_APPS_TRANSLATE), "translate", + "https://translate.google.com", IDS_WELCOME_TRANSLATE}); #endif // defined(GOOGLE_CHROME_BUILD) }
diff --git a/chrome/browser/ui/webui/welcome/helpers.cc b/chrome/browser/ui/webui/welcome/helpers.cc index a15c7586..3cac3eb 100644 --- a/chrome/browser/ui/webui/welcome/helpers.cc +++ b/chrome/browser/ui/webui/welcome/helpers.cc
@@ -35,36 +35,32 @@ const char kDefaultReturningUserModules[] = "nux-set-as-default"; // Feature flag. -const base::Feature kOnboardingFeature{"NuxOnboarding", - base::FEATURE_ENABLED_BY_DEFAULT}; +const base::Feature kFeature{"NuxOnboarding", base::FEATURE_ENABLED_BY_DEFAULT}; // For testing purposes -const base::Feature kOnboardingForceEnabled = { - "NuxOnboardingForceEnabled", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::Feature kForceEnabled = {"NuxOnboardingForceEnabled", + base::FEATURE_DISABLED_BY_DEFAULT}; // The value of these FeatureParam values should be a comma-delimited list // of element names whitelisted in the MODULES_WHITELIST list, defined in // chrome/browser/resources/welcome/welcome_app.js -const base::FeatureParam<std::string> kOnboardingNewUserModules{ - &kOnboardingFeature, "new-user-modules", kDefaultNewUserModules}; -const base::FeatureParam<std::string> kOnboardingReturningUserModules{ - &kOnboardingFeature, "returning-user-modules", - kDefaultReturningUserModules}; +const base::FeatureParam<std::string> kNewUserModules{ + &kFeature, "new-user-modules", kDefaultNewUserModules}; +const base::FeatureParam<std::string> kReturningUserModules{ + &kFeature, "returning-user-modules", kDefaultReturningUserModules}; // For testing purposes -const base::FeatureParam<std::string> kOnboardingForceEnabledNewUserModules = { - &kOnboardingForceEnabled, "new-user-modules", +const base::FeatureParam<std::string> kForceEnabledNewUserModules = { + &kForceEnabled, "new-user-modules", "nux-google-apps,nux-ntp-background,nux-set-as-default," "signin-view"}; -const base::FeatureParam<std::string> - kOnboardingForceEnabledReturningUserModules = {&kOnboardingForceEnabled, - "returning-user-modules", - "nux-set-as-default"}; +const base::FeatureParam<std::string> kForceEnabledReturningUserModules = { + &kForceEnabled, "returning-user-modules", "nux-set-as-default"}; // FeatureParam for app variation. -const base::FeatureParam<bool> kOnboardingShowGoogleApp{ - &kOnboardingFeature, "app-variation-enabled", false}; +const base::FeatureParam<bool> kShowGoogleApp{&kFeature, + "app-variation-enabled", false}; // For testing purposes -const base::FeatureParam<bool> kOnboardingForceEnabledShowGoogleApp = { - &kOnboardingForceEnabled, "app-variation-enabled", false}; +const base::FeatureParam<bool> kForceEnabledShowGoogleApp = { + &kForceEnabled, "app-variation-enabled", false}; bool CanShowGoogleAppModule(const policy::PolicyMap& policies) { const base::Value* bookmark_bar_enabled_value = @@ -127,11 +123,12 @@ "NaviShortcutVariationEnabled", base::FEATURE_DISABLED_BY_DEFAULT}; #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OS_WIN) -// Onboarding experiments depend on Google being the default search provider. +// Welcome experiments depend on Google being the default search provider. bool CanExperimentWithVariations(Profile* profile) { return search::DefaultSearchProviderIsGoogle(profile); } +#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OS_WIN) // Get the group for users who onboard in this experiment. // Groups are: // - Specified by study @@ -152,55 +149,52 @@ return base::GetFieldTrialParamValue("NaviOnboarding", "onboarding-group"); } -#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OS_WIN) void JoinOnboardingGroup(Profile* profile) { PrefService* prefs = profile->GetPrefs(); - std::string onboard_group; + std::string group; if (prefs->GetBoolean(prefs::kHasSeenWelcomePage)) { - // Get user's original onboarding group. - onboard_group = prefs->GetString(prefs::kNaviOnboardGroup); + // Get user's original group. + group = prefs->GetString(prefs::kNaviOnboardGroup); - // Users who onboarded before Navi won't have an onboarding group. - if (onboard_group.empty()) + // Users who onboarded before Navi won't have a group. + if (group.empty()) return; } else { // Join the latest group if onboarding for the first time! - onboard_group = GetOnboardingGroup(profile); - profile->GetPrefs()->SetString(prefs::kNaviOnboardGroup, onboard_group); + group = GetOnboardingGroup(profile); + profile->GetPrefs()->SetString(prefs::kNaviOnboardGroup, group); } - // User will be tied to their original onboarding group, even after - // experiment ends. + // User will be tied to their original group, even after experiment ends. ChromeMetricsServiceAccessor::RegisterSyntheticFieldTrial( - "NaviOnboardingSynthetic", onboard_group); + "NaviOnboardingSynthetic", group); - // Check for feature based on onboarding group. + // Check for feature based on group. // TODO(hcarmona): find a solution that scales better. - if (onboard_group.compare("ControlSynthetic-008") == 0) + if (group.compare("ControlSynthetic-008") == 0) base::FeatureList::IsEnabled(kNaviControlEnabled); - else if (onboard_group.compare("AppVariationSynthetic-008") == 0) + else if (group.compare("AppVariationSynthetic-008") == 0) base::FeatureList::IsEnabled(kNaviAppVariationEnabled); - else if (onboard_group.compare("NTPVariationSynthetic-008") == 0) + else if (group.compare("NTPVariationSynthetic-008") == 0) base::FeatureList::IsEnabled(kNaviNTPVariationEnabled); - else if (onboard_group.compare("ShortcutVariationSynthetic-008") == 0) + else if (group.compare("ShortcutVariationSynthetic-008") == 0) base::FeatureList::IsEnabled(kNaviShortcutVariationEnabled); } #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) && defined(OS_WIN) -bool IsOnboardingEnabled(Profile* profile) { +bool IsEnabled(Profile* profile) { #if defined(GOOGLE_CHROME_BUILD) - return base::FeatureList::IsEnabled(welcome::kOnboardingFeature) || - base::FeatureList::IsEnabled(welcome::kOnboardingForceEnabled); + return base::FeatureList::IsEnabled(welcome::kFeature) || + base::FeatureList::IsEnabled(welcome::kForceEnabled); #else // Allow enabling outside official builds for testing purposes. - return base::FeatureList::IsEnabled(welcome::kOnboardingForceEnabled); + return base::FeatureList::IsEnabled(welcome::kForceEnabled); #endif // defined(GOOGLE_CHROME_BUILD) } bool IsAppVariationEnabled() { - return kOnboardingForceEnabledShowGoogleApp.Get() || - kOnboardingShowGoogleApp.Get(); + return kForceEnabledShowGoogleApp.Get() || kShowGoogleApp.Get(); } const policy::PolicyMap& GetPoliciesFromProfile(Profile* profile) { @@ -227,7 +221,7 @@ return available_modules; } -bool DoesOnboardingHaveModulesToShow(Profile* profile) { +bool HasModulesToShow(Profile* profile) { const base::Value* force_ephemeral_profiles_value = GetPoliciesFromProfile(profile).GetValue( policy::key::kForceEphemeralProfiles); @@ -256,19 +250,19 @@ return base::JoinString(filtered_modules, ","); } -base::DictionaryValue GetOnboardingModules(Profile* profile) { - // This function should not be called when nux onboarding feature is not on. - DCHECK(welcome::IsOnboardingEnabled(profile)); +base::DictionaryValue GetModules(Profile* profile) { + // This function should not be called when feature is not on. + DCHECK(welcome::IsEnabled(profile)); std::string new_user_modules = kDefaultNewUserModules; std::string returning_user_modules = kDefaultReturningUserModules; - if (base::FeatureList::IsEnabled(welcome::kOnboardingForceEnabled)) { - new_user_modules = kOnboardingForceEnabledNewUserModules.Get(); - returning_user_modules = kOnboardingForceEnabledReturningUserModules.Get(); + if (base::FeatureList::IsEnabled(welcome::kForceEnabled)) { + new_user_modules = kForceEnabledNewUserModules.Get(); + returning_user_modules = kForceEnabledReturningUserModules.Get(); } else if (CanExperimentWithVariations(profile)) { - new_user_modules = kOnboardingNewUserModules.Get(); - returning_user_modules = kOnboardingReturningUserModules.Get(); + new_user_modules = kNewUserModules.Get(); + returning_user_modules = kReturningUserModules.Get(); } std::vector<std::string> available_modules = GetAvailableModules(profile);
diff --git a/chrome/browser/ui/webui/welcome/helpers.h b/chrome/browser/ui/webui/welcome/helpers.h index 33d8e76..258c956b 100644 --- a/chrome/browser/ui/webui/welcome/helpers.h +++ b/chrome/browser/ui/webui/welcome/helpers.h
@@ -31,16 +31,16 @@ void JoinOnboardingGroup(Profile* profile); #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) -bool IsOnboardingEnabled(Profile* profile); +bool IsEnabled(Profile* profile); bool IsAppVariationEnabled(); -bool DoesOnboardingHaveModulesToShow(Profile* profile); +bool HasModulesToShow(Profile* profile); -base::DictionaryValue GetOnboardingModules(Profile* profile); +base::DictionaryValue GetModules(Profile* profile); // Exposed for testing. -extern const base::Feature kOnboardingForceEnabled; +extern const base::Feature kForceEnabled; bool CanShowGoogleAppModuleForTesting(const policy::PolicyMap& policies); bool CanShowNTPBackgroundModuleForTesting(const policy::PolicyMap& policies,
diff --git a/chrome/browser/ui/webui/welcome/ntp_background_fetcher.cc b/chrome/browser/ui/webui/welcome/ntp_background_fetcher.cc index 9d5abee..33ff488 100644 --- a/chrome/browser/ui/webui/welcome/ntp_background_fetcher.cc +++ b/chrome/browser/ui/webui/welcome/ntp_background_fetcher.cc
@@ -8,7 +8,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/net/system_network_context_manager.h" -#include "chrome/browser/search/background/onboarding_ntp_backgrounds.h" +#include "chrome/browser/search/background/ntp_backgrounds.h" #include "net/base/load_flags.h" #include "net/traffic_annotation/network_traffic_annotation.h" #include "net/url_request/url_request.h" @@ -46,7 +46,7 @@ policy_exception_justification: "Not implemented." })"); - auto backgrounds = GetOnboardingNtpBackgrounds(); + auto backgrounds = GetNtpBackgrounds(); if (index_ >= backgrounds.size()) { OnFetchCompleted(nullptr);
diff --git a/chrome/browser/ui/webui/welcome/ntp_background_handler.cc b/chrome/browser/ui/webui/welcome/ntp_background_handler.cc index 98d4fe3..b970bec 100644 --- a/chrome/browser/ui/webui/welcome/ntp_background_handler.cc +++ b/chrome/browser/ui/webui/welcome/ntp_background_handler.cc
@@ -11,11 +11,11 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/search/background/onboarding_ntp_backgrounds.h" +#include "chrome/browser/search/background/ntp_backgrounds.h" #include "chrome/browser/search/instant_service.h" #include "chrome/browser/search/instant_service_factory.h" #include "chrome/grit/generated_resources.h" -#include "chrome/grit/onboarding_welcome_resources.h" +#include "chrome/grit/welcome_resources.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/web_ui.h" #include "ui/base/l10n/l10n_util.h" @@ -64,16 +64,14 @@ CHECK(args->Get(0, &callback_id)); base::ListValue list_value; - std::array<GURL, kOnboardingNtpBackgroundsCount> onboardingNtpBackgrounds = - GetOnboardingNtpBackgrounds(); + std::array<GURL, kNtpBackgroundsCount> NtpBackgrounds = GetNtpBackgrounds(); const std::string kUrlPrefix = "preview-background.jpg?"; auto element = std::make_unique<base::DictionaryValue>(); int id = static_cast<int>(NtpBackgrounds::kEarth); element->SetInteger("id", id); - element->SetString("title", - l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_EARTH_TITLE)); + element->SetString("title", l10n_util::GetStringUTF8( + IDS_WELCOME_NTP_BACKGROUND_EARTH_TITLE)); element->SetString("imageUrl", kUrlPrefix + base::NumberToString(id)); element->SetString("thumbnailClass", "earth"); list_value.Append(std::move(element)); @@ -81,9 +79,8 @@ element = std::make_unique<base::DictionaryValue>(); id = static_cast<int>(NtpBackgrounds::kCityscape); element->SetInteger("id", id); - element->SetString( - "title", l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_CITYSCAPE_TITLE)); + element->SetString("title", l10n_util::GetStringUTF8( + IDS_WELCOME_NTP_BACKGROUND_CITYSCAPE_TITLE)); element->SetString("imageUrl", kUrlPrefix + base::NumberToString(id)); element->SetString("thumbnailClass", "cityscape"); list_value.Append(std::move(element)); @@ -91,9 +88,8 @@ element = std::make_unique<base::DictionaryValue>(); id = static_cast<int>(NtpBackgrounds::kLandscape); element->SetInteger("id", id); - element->SetString( - "title", l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_LANDSCAPE_TITLE)); + element->SetString("title", l10n_util::GetStringUTF8( + IDS_WELCOME_NTP_BACKGROUND_LANDSCAPE_TITLE)); element->SetString("imageUrl", kUrlPrefix + base::NumberToString(id)); element->SetString("thumbnailClass", "landscape"); list_value.Append(std::move(element)); @@ -101,9 +97,8 @@ element = std::make_unique<base::DictionaryValue>(); id = static_cast<int>(NtpBackgrounds::kArt); element->SetInteger("id", id); - element->SetString("title", - l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_ART_TITLE)); + element->SetString( + "title", l10n_util::GetStringUTF8(IDS_WELCOME_NTP_BACKGROUND_ART_TITLE)); element->SetString("imageUrl", kUrlPrefix + base::NumberToString(id)); element->SetString("thumbnailClass", "art"); list_value.Append(std::move(element)); @@ -111,10 +106,9 @@ element = std::make_unique<base::DictionaryValue>(); id = static_cast<int>(NtpBackgrounds::kGeometricShapes); element->SetInteger("id", id); - element->SetString( - "title", - l10n_util::GetStringUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_GEOMETRIC_SHAPES_TITLE)); + element->SetString("title", + l10n_util::GetStringUTF8( + IDS_WELCOME_NTP_BACKGROUND_GEOMETRIC_SHAPES_TITLE)); element->SetString("imageUrl", kUrlPrefix + base::NumberToString(id)); element->SetString("thumbnailClass", "geometric-shapes"); list_value.Append(std::move(element)); @@ -127,24 +121,22 @@ int backgroundIndex; args->GetInteger(0, &backgroundIndex); - std::array<GURL, kOnboardingNtpBackgroundsCount> onboardingNtpBackgrounds = - GetOnboardingNtpBackgrounds(); + std::array<GURL, kNtpBackgroundsCount> NtpBackgrounds = GetNtpBackgrounds(); InstantService* instant_service = InstantServiceFactory::GetForProfile(Profile::FromWebUI(web_ui())); switch (backgroundIndex) { case static_cast<int>(NtpBackgrounds::kArt): instant_service->SetCustomBackgroundInfo( - onboardingNtpBackgrounds[backgroundIndex], "Universe Cosmic Vacum", + NtpBackgrounds[backgroundIndex], "Universe Cosmic Vacum", "Philipp Rietz — Walli", GURL("https://walli.shanga.co/image/view/?id=370"), ""); break; case static_cast<int>(NtpBackgrounds::kCityscape): instant_service->SetCustomBackgroundInfo( - onboardingNtpBackgrounds[backgroundIndex], - l10n_util::GetStringFUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, - base::UTF8ToUTF16("Ev Tchebotarev")), + NtpBackgrounds[backgroundIndex], + l10n_util::GetStringFUTF8(IDS_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, + base::UTF8ToUTF16("Ev Tchebotarev")), "", GURL("https://500px.com/photo/135751035/" "soulseek-by-%E5%B0%A4%E9%87%91%E5%B0%BC-ev-tchebotarev"), @@ -152,24 +144,22 @@ break; case static_cast<int>(NtpBackgrounds::kEarth): instant_service->SetCustomBackgroundInfo( - onboardingNtpBackgrounds[backgroundIndex], - l10n_util::GetStringFUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, - base::UTF8ToUTF16("NASA Image Library")), + NtpBackgrounds[backgroundIndex], + l10n_util::GetStringFUTF8(IDS_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, + base::UTF8ToUTF16("NASA Image Library")), "", GURL("https://www.google.com/sky/"), ""); break; case static_cast<int>(NtpBackgrounds::kGeometricShapes): instant_service->SetCustomBackgroundInfo( - onboardingNtpBackgrounds[backgroundIndex], "Tessellation 15", + NtpBackgrounds[backgroundIndex], "Tessellation 15", "Justin Prno — Walli", GURL("https://walli.shanga.co/image/view/?id=1375"), ""); break; case static_cast<int>(NtpBackgrounds::kLandscape): instant_service->SetCustomBackgroundInfo( - onboardingNtpBackgrounds[backgroundIndex], - l10n_util::GetStringFUTF8( - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, - base::UTF8ToUTF16("Giulio Rosso Chioso")), + NtpBackgrounds[backgroundIndex], + l10n_util::GetStringFUTF8(IDS_WELCOME_NTP_BACKGROUND_PHOTO_BY_LABEL, + base::UTF8ToUTF16("Giulio Rosso Chioso")), "", GURL("https://500px.com/photo/41149196/" "le-piscine-sunset-by-giulio-rosso-chioso"),
diff --git a/chrome/browser/ui/webui/welcome/welcome_handler.cc b/chrome/browser/ui/webui/welcome/welcome_handler.cc index 222a102..17d4764 100644 --- a/chrome/browser/ui/webui/welcome/welcome_handler.cc +++ b/chrome/browser/ui/webui/welcome/welcome_handler.cc
@@ -61,7 +61,7 @@ if (result != LoginUIService::ABORT_SIGNIN) { result_ = WelcomeResult::SIGNED_IN; - // When signed in from NUX onboarding flow, it's possible to come back to + // When signed in from welcome flow, it's possible to come back to // chrome://welcome/... after closing sync-confirmation UI. If current URL // matches such a case, do not navigate away. if (!is_redirected_welcome_impression_) { @@ -110,7 +110,7 @@ // Override from WebUIMessageHandler. void WelcomeHandler::RegisterMessages() { - // Check if this instance of WelcomeHandler is spawned by onboarding flow + // Check if this instance of WelcomeHandler is spawned by welcome flow // redirecting users back to welcome page. This is done here instead of // constructor, because web_ui hasn't loaded yet at that time. is_redirected_welcome_impression_ = isValidRedirectUrl();
diff --git a/chrome/browser/ui/webui/welcome/welcome_ui.cc b/chrome/browser/ui/webui/welcome/welcome_ui.cc index 9cd7977..e153053 100644 --- a/chrome/browser/ui/webui/welcome/welcome_ui.cc +++ b/chrome/browser/ui/webui/welcome/welcome_ui.cc
@@ -19,8 +19,8 @@ #include "chrome/grit/chrome_unscaled_resources.h" #include "chrome/grit/chromium_strings.h" #include "chrome/grit/generated_resources.h" -#include "chrome/grit/onboarding_welcome_resources.h" -#include "chrome/grit/onboarding_welcome_resources_map.h" +#include "chrome/grit/welcome_resources.h" +#include "chrome/grit/welcome_resources_map.h" #include "components/prefs/pref_service.h" #include "components/signin/public/base/signin_pref_names.h" #include "components/strings/grit/components_strings.h" @@ -66,49 +66,44 @@ weak_ptr->CreateBackgroundFetcher(background_index, callback); } -void AddOnboardingStrings(content::WebUIDataSource* html_source) { +void AddStrings(content::WebUIDataSource* html_source) { static constexpr LocalizedString kLocalizedStrings[] = { // Shared strings. - {"bookmarkAdded", IDS_ONBOARDING_WELCOME_BOOKMARK_ADDED}, - {"bookmarksAdded", IDS_ONBOARDING_WELCOME_BOOKMARKS_ADDED}, - {"bookmarkRemoved", IDS_ONBOARDING_WELCOME_BOOKMARK_REMOVED}, - {"bookmarksRemoved", IDS_ONBOARDING_WELCOME_BOOKMARKS_REMOVED}, - {"defaultBrowserChanged", IDS_ONBOARDING_DEFAULT_BROWSER_CHANGED}, + {"bookmarkAdded", IDS_WELCOME_BOOKMARK_ADDED}, + {"bookmarksAdded", IDS_WELCOME_BOOKMARKS_ADDED}, + {"bookmarkRemoved", IDS_WELCOME_BOOKMARK_REMOVED}, + {"bookmarksRemoved", IDS_WELCOME_BOOKMARKS_REMOVED}, + {"defaultBrowserChanged", IDS_DEFAULT_BROWSER_CHANGED}, {"headerText", IDS_WELCOME_HEADER}, - {"next", IDS_ONBOARDING_WELCOME_NEXT}, + {"next", IDS_WELCOME_NEXT}, {"noThanks", IDS_NO_THANKS}, - {"skip", IDS_ONBOARDING_WELCOME_SKIP}, + {"skip", IDS_WELCOME_SKIP}, // Sign-in view strings. - {"signInHeader", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_HEADER}, - {"signInSubHeader", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SUB_HEADER}, - {"signIn", IDS_ONBOARDING_WELCOME_SIGNIN_VIEW_SIGNIN}, + {"signInHeader", IDS_WELCOME_SIGNIN_VIEW_HEADER}, + {"signInSubHeader", IDS_WELCOME_SIGNIN_VIEW_SUB_HEADER}, + {"signIn", IDS_WELCOME_SIGNIN_VIEW_SIGNIN}, // Google apps module strings. - {"googleAppsDescription", - IDS_ONBOARDING_WELCOME_NUX_GOOGLE_APPS_DESCRIPTION}, + {"googleAppsDescription", IDS_WELCOME_GOOGLE_APPS_DESCRIPTION}, // New Tab Page background module strings. - {"ntpBackgroundDescription", - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_DESCRIPTION}, - {"ntpBackgroundDefault", - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_DEFAULT_TITLE}, + {"ntpBackgroundDescription", IDS_WELCOME_NTP_BACKGROUND_DESCRIPTION}, + {"ntpBackgroundDefault", IDS_WELCOME_NTP_BACKGROUND_DEFAULT_TITLE}, {"ntpBackgroundPreviewUpdated", - IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_PREVIEW_UPDATED}, - {"ntpBackgroundReset", IDS_ONBOARDING_WELCOME_NTP_BACKGROUND_RESET}, + IDS_WELCOME_NTP_BACKGROUND_PREVIEW_UPDATED}, + {"ntpBackgroundReset", IDS_WELCOME_NTP_BACKGROUND_RESET}, // Set as default module strings. - {"setDefaultHeader", IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_HEADER}, - {"setDefaultSubHeader", - IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SUB_HEADER}, - {"setDefaultConfirm", - IDS_ONBOARDING_WELCOME_NUX_SET_AS_DEFAULT_SET_AS_DEFAULT}, + {"setDefaultHeader", IDS_WELCOME_SET_AS_DEFAULT_HEADER}, + {"setDefaultSubHeader", IDS_WELCOME_SET_AS_DEFAULT_SUB_HEADER}, + {"setDefaultConfirm", IDS_WELCOME_SET_AS_DEFAULT_SET_AS_DEFAULT}, // Landing view strings. - {"landingTitle", IDS_ONBOARDING_WELCOME_LANDING_TITLE}, - {"landingDescription", IDS_ONBOARDING_WELCOME_LANDING_DESCRIPTION}, - {"landingNewUser", IDS_ONBOARDING_WELCOME_LANDING_NEW_USER}, - {"landingExistingUser", IDS_ONBOARDING_WELCOME_LANDING_EXISTING_USER}, + {"landingTitle", IDS_WELCOME_LANDING_TITLE}, + {"landingDescription", IDS_WELCOME_LANDING_DESCRIPTION}, + {"landingNewUser", IDS_WELCOME_LANDING_NEW_USER}, + {"landingExistingUser", IDS_WELCOME_LANDING_EXISTING_USER}, }; AddLocalizedStringsBulk(html_source, kLocalizedStrings, base::size(kLocalizedStrings)); @@ -133,13 +128,13 @@ content::WebUIDataSource* html_source = content::WebUIDataSource::Create(url.host()); - // Add Onboarding welcome strings. - AddOnboardingStrings(html_source); + // Add welcome strings. + AddStrings(html_source); - // Add all Onboarding resources. - for (size_t i = 0; i < kOnboardingWelcomeResourcesSize; ++i) { - html_source->AddResourcePath(kOnboardingWelcomeResources[i].name, - kOnboardingWelcomeResources[i].value); + // Add all welcome resources. + for (size_t i = 0; i < kWelcomeResourcesSize; ++i) { + html_source->AddResourcePath(kWelcomeResources[i].name, + kWelcomeResources[i].value); } #if BUILDFLAG(GOOGLE_CHROME_BRANDING) @@ -173,33 +168,32 @@ #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) // chrome://welcome - html_source->SetDefaultResource(IDR_WELCOME_ONBOARDING_WELCOME_WELCOME_HTML); + html_source->SetDefaultResource(IDR_WELCOME_HTML); #if defined(OS_WIN) html_source->AddBoolean("is_win10", base::win::GetVersion() >= base::win::Version::WIN10); #endif - // Add the shared bookmark handler for onboarding modules. + // Add the shared bookmark handler for welcome modules. web_ui->AddMessageHandler( std::make_unique<welcome::BookmarkHandler>(profile->GetPrefs())); - // Add google apps bookmarking onboarding module. + // Add google apps bookmarking module. web_ui->AddMessageHandler(std::make_unique<welcome::GoogleAppsHandler>()); - // Add NTP custom background onboarding module. + // Add NTP custom background module. web_ui->AddMessageHandler(std::make_unique<welcome::NtpBackgroundHandler>()); - // Add set-as-default onboarding module. + // Add set-as-default module. web_ui->AddMessageHandler(std::make_unique<welcome::SetAsDefaultHandler>()); html_source->AddString( "newUserModules", - welcome::GetOnboardingModules(profile).FindKey("new-user")->GetString()); - html_source->AddString("returningUserModules", - welcome::GetOnboardingModules(profile) - .FindKey("returning-user") - ->GetString()); + welcome::GetModules(profile).FindKey("new-user")->GetString()); + html_source->AddString( + "returningUserModules", + welcome::GetModules(profile).FindKey("returning-user")->GetString()); html_source->AddBoolean( "signinAllowed", profile->GetPrefs()->GetBoolean(prefs::kSigninAllowed)); html_source->SetRequestFilter(
diff --git a/chrome/browser/web_applications/BUILD.gn b/chrome/browser/web_applications/BUILD.gn index 1116b00..d73fe3b 100644 --- a/chrome/browser/web_applications/BUILD.gn +++ b/chrome/browser/web_applications/BUILD.gn
@@ -42,8 +42,6 @@ "web_app_sync_bridge.h", "web_app_sync_manager.cc", "web_app_sync_manager.h", - "web_app_tab_helper.cc", - "web_app_tab_helper.h", ] deps = [
diff --git a/chrome/browser/web_applications/components/BUILD.gn b/chrome/browser/web_applications/components/BUILD.gn index d19fb990..72ce93e 100644 --- a/chrome/browser/web_applications/components/BUILD.gn +++ b/chrome/browser/web_applications/components/BUILD.gn
@@ -45,8 +45,8 @@ "web_app_shortcut_mac.mm", "web_app_shortcut_win.cc", "web_app_shortcut_win.h", - "web_app_tab_helper_base.cc", - "web_app_tab_helper_base.h", + "web_app_tab_helper.cc", + "web_app_tab_helper.h", "web_app_ui_manager.h", "web_app_url_loader.cc", "web_app_url_loader.h",
diff --git a/chrome/browser/web_applications/components/app_registrar.h b/chrome/browser/web_applications/components/app_registrar.h index 85286fc..0002cc6 100644 --- a/chrome/browser/web_applications/components/app_registrar.h +++ b/chrome/browser/web_applications/components/app_registrar.h
@@ -56,6 +56,9 @@ // considered external apps), then this will return true. virtual bool WasExternalAppUninstalledByUser(const AppId& app_id) const = 0; + // Returns true if the app was installed by user, false if default installed. + virtual bool WasInstalledByUser(const AppId& app_id) const = 0; + // Returns the AppIds and URLs of apps externally installed from // |install_source|. virtual std::map<AppId, GURL> GetExternallyInstalledApps(
diff --git a/chrome/browser/web_applications/components/install_manager.h b/chrome/browser/web_applications/components/install_manager.h index 4b048ef..f0619a40 100644 --- a/chrome/browser/web_applications/components/install_manager.h +++ b/chrome/browser/web_applications/components/install_manager.h
@@ -115,12 +115,6 @@ virtual void Shutdown() = 0; - // Starts background installation of a web app from the given - // |web_application_info|. - virtual void InstallWebAppForTesting( - std::unique_ptr<WebApplicationInfo> web_application_info, - OnceInstallCallback callback) = 0; - explicit InstallManager(Profile* profile); virtual ~InstallManager();
diff --git a/chrome/browser/web_applications/components/web_app_audio_focus_id_map.h b/chrome/browser/web_applications/components/web_app_audio_focus_id_map.h index 7b22e96..de8f7c4a 100644 --- a/chrome/browser/web_applications/components/web_app_audio_focus_id_map.h +++ b/chrome/browser/web_applications/components/web_app_audio_focus_id_map.h
@@ -25,7 +25,7 @@ ~WebAppAudioFocusIdMap(); protected: - friend class WebAppTabHelperBase; + friend class WebAppTabHelper; const base::UnguessableToken& CreateOrGetIdForApp(const AppId& app_id);
diff --git a/chrome/browser/web_applications/components/web_app_provider_base.h b/chrome/browser/web_applications/components/web_app_provider_base.h index 6ea004a..c3d7921 100644 --- a/chrome/browser/web_applications/components/web_app_provider_base.h +++ b/chrome/browser/web_applications/components/web_app_provider_base.h
@@ -17,6 +17,7 @@ class InstallManager; class AppRegistrar; class WebAppPolicyManager; +class WebAppAudioFocusIdMap; class WebAppUiManager; class WebAppProviderBase : public KeyedService { @@ -39,6 +40,8 @@ virtual WebAppUiManager& ui_manager() = 0; + virtual WebAppAudioFocusIdMap& audio_focus_id_map() = 0; + DISALLOW_COPY_AND_ASSIGN(WebAppProviderBase); };
diff --git a/chrome/browser/web_applications/components/web_app_tab_helper.cc b/chrome/browser/web_applications/components/web_app_tab_helper.cc new file mode 100644 index 0000000..f0a2d1c --- /dev/null +++ b/chrome/browser/web_applications/components/web_app_tab_helper.cc
@@ -0,0 +1,135 @@ +// 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/web_applications/components/web_app_tab_helper.h" + +#include "base/unguessable_token.h" +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/web_applications/components/policy/web_app_policy_manager.h" +#include "chrome/browser/web_applications/components/web_app_audio_focus_id_map.h" +#include "chrome/browser/web_applications/components/web_app_provider_base.h" +#include "chrome/browser/web_applications/components/web_app_ui_manager.h" +#include "content/public/browser/media_session.h" +#include "content/public/browser/navigation_handle.h" +#include "content/public/browser/site_instance.h" + +namespace web_app { + +WEB_CONTENTS_USER_DATA_KEY_IMPL(WebAppTabHelper) + +WebAppTabHelper::WebAppTabHelper(content::WebContents* web_contents) + : content::WebContentsObserver(web_contents), + provider_(WebAppProviderBase::GetProviderBase( + Profile::FromBrowserContext(web_contents->GetBrowserContext()))) { + DCHECK(provider_); + observer_.Add(&provider_->registrar()); + SetAppId( + FindAppIdWithUrlInScope(web_contents->GetSiteInstance()->GetSiteURL())); +} + +WebAppTabHelper::~WebAppTabHelper() = default; + +bool WebAppTabHelper::HasAssociatedApp() const { + return !app_id_.empty(); +} + +void WebAppTabHelper::SetAppId(const AppId& app_id) { + DCHECK(app_id.empty() || provider_->registrar().IsInstalled(app_id)); + if (app_id_ == app_id) + return; + + app_id_ = app_id; + + OnAssociatedAppChanged(); +} + +void WebAppTabHelper::DidFinishNavigation( + content::NavigationHandle* navigation_handle) { + if (!navigation_handle->IsInMainFrame() || !navigation_handle->HasCommitted()) + return; + + const AppId app_id = FindAppIdWithUrlInScope(navigation_handle->GetURL()); + SetAppId(app_id); + + ReinstallPlaceholderAppIfNecessary(navigation_handle->GetURL()); +} + +void WebAppTabHelper::DidCloneToNewWebContents( + content::WebContents* old_web_contents, + content::WebContents* new_web_contents) { + // When the WebContents that this is attached to is cloned, give the new clone + // a WebAppTabHelper. + CreateForWebContents(new_web_contents); + auto* new_tab_helper = FromWebContents(new_web_contents); + + // Clone common state: + new_tab_helper->SetAppId(app_id()); +} + +bool WebAppTabHelper::IsUserInstalled() const { + return !app_id_.empty() && provider_->registrar().WasInstalledByUser(app_id_); +} + +bool WebAppTabHelper::IsFromInstallButton() const { + // TODO(loyso): Use something better to record apps installed from promoted + // UIs. crbug.com/774918. + return !app_id_.empty() && + provider_->registrar().GetAppScope(app_id_).has_value(); +} + +bool WebAppTabHelper::IsInAppWindow() const { + return provider_->ui_manager().IsInAppWindow(web_contents()); +} + +void WebAppTabHelper::OnWebAppInstalled(const AppId& installed_app_id) { + // Check if current web_contents url is in scope for the newly installed app. + AppId app_id = FindAppIdWithUrlInScope(web_contents()->GetURL()); + if (app_id == installed_app_id) + SetAppId(app_id); +} + +void WebAppTabHelper::OnWebAppUninstalled(const AppId& uninstalled_app_id) { + if (app_id() == uninstalled_app_id) + ResetAppId(); +} + +void WebAppTabHelper::OnAppRegistrarShutdown() { + ResetAppId(); +} + +void WebAppTabHelper::OnAppRegistrarDestroyed() { + observer_.RemoveAll(); +} + +void WebAppTabHelper::ResetAppId() { + app_id_.clear(); + + OnAssociatedAppChanged(); +} + +void WebAppTabHelper::OnAssociatedAppChanged() { + UpdateAudioFocusGroupId(); +} + +void WebAppTabHelper::UpdateAudioFocusGroupId() { + if (!app_id_.empty() && IsInAppWindow()) { + audio_focus_group_id_ = + provider_->audio_focus_id_map().CreateOrGetIdForApp(app_id_); + } else { + audio_focus_group_id_ = base::UnguessableToken::Null(); + } + + content::MediaSession::Get(web_contents()) + ->SetAudioFocusGroupId(audio_focus_group_id_); +} + +void WebAppTabHelper::ReinstallPlaceholderAppIfNecessary(const GURL& url) { + provider_->policy_manager().ReinstallPlaceholderAppIfNecessary(url); +} + +AppId WebAppTabHelper::FindAppIdWithUrlInScope(const GURL& url) const { + return provider_->registrar().FindAppWithUrlInScope(url).value_or(AppId()); +} + +} // namespace web_app
diff --git a/chrome/browser/web_applications/components/web_app_tab_helper_base.h b/chrome/browser/web_applications/components/web_app_tab_helper.h similarity index 69% rename from chrome/browser/web_applications/components/web_app_tab_helper_base.h rename to chrome/browser/web_applications/components/web_app_tab_helper.h index c740c0e..4caecca 100644 --- a/chrome/browser/web_applications/components/web_app_tab_helper_base.h +++ b/chrome/browser/web_applications/components/web_app_tab_helper.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_BASE_H_ -#define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_BASE_H_ +#ifndef CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_H_ +#define CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_H_ #include "base/macros.h" #include "base/scoped_observer.h" @@ -20,22 +20,19 @@ namespace web_app { -class WebAppAudioFocusIdMap; +class WebAppProviderBase; // Per-tab web app helper. Allows to associate a tab (web page) with a web app // (or legacy bookmark app). -class WebAppTabHelperBase - : public content::WebContentsObserver, - public content::WebContentsUserData<WebAppTabHelperBase>, - AppRegistrarObserver { +class WebAppTabHelper : public content::WebContentsObserver, + public content::WebContentsUserData<WebAppTabHelper>, + public AppRegistrarObserver { public: - ~WebAppTabHelperBase() override; + using content::WebContentsUserData<WebAppTabHelper>::CreateForWebContents; + using content::WebContentsUserData<WebAppTabHelper>::FromWebContents; - // |audio_focus_id_map| is a weak reference to the current audio focus id map - // instance which is owned by WebAppProvider. This is used to ensure that all - // web contents associated with a web app shared the same audio focus group - // id. - void Init(WebAppAudioFocusIdMap* audio_focus_id_map); + explicit WebAppTabHelper(content::WebContents* web_contents); + ~WebAppTabHelper() override; const AppId& app_id() const { return app_id_; } @@ -54,29 +51,20 @@ // These methods require an app associated with the tab (valid app_id()). // // Returns true if the app was installed by user, false if default installed. - virtual bool IsUserInstalled() const = 0; + bool IsUserInstalled() const; // For user-installed apps: // Returns true if the app was installed through the install button. // Returns false if the app was installed through the create shortcut button. - virtual bool IsFromInstallButton() const = 0; - - protected: - // See documentation in WebContentsUserData class comment. - explicit WebAppTabHelperBase(content::WebContents* web_contents); - friend class content::WebContentsUserData<WebAppTabHelperBase>; - WEB_CONTENTS_USER_DATA_KEY_DECL(); - - // Clone |this| tab helper (preserving a derived type). - virtual WebAppTabHelperBase* CloneForWebContents( - content::WebContents* web_contents) const = 0; - - // Returns whether the associated web contents belongs to an app window. - virtual bool IsInAppWindow() const = 0; + bool IsFromInstallButton() const; private: - friend class WebAppAudioFocusBrowserTest; + WEB_CONTENTS_USER_DATA_KEY_DECL(); - void SetAudioFocusIdMap(WebAppAudioFocusIdMap* audio_focus_id_map); + friend class WebAppAudioFocusBrowserTest; + friend class content::WebContentsUserData<WebAppTabHelper>; + + // Returns whether the associated web contents belongs to an app window. + bool IsInAppWindow() const; // AppRegistrarObserver: void OnWebAppInstalled(const AppId& installed_app_id) override; @@ -104,14 +92,12 @@ // We store the applied group id locally on the helper for testing. base::UnguessableToken audio_focus_group_id_ = base::UnguessableToken::Null(); - // Weak reference to audio focus group id storage. - WebAppAudioFocusIdMap* audio_focus_id_map_ = nullptr; - + WebAppProviderBase* provider_ = nullptr; ScopedObserver<AppRegistrar, AppRegistrarObserver> observer_{this}; - DISALLOW_COPY_AND_ASSIGN(WebAppTabHelperBase); + DISALLOW_COPY_AND_ASSIGN(WebAppTabHelper); }; } // namespace web_app -#endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_BASE_H_ +#endif // CHROME_BROWSER_WEB_APPLICATIONS_COMPONENTS_WEB_APP_TAB_HELPER_H_
diff --git a/chrome/browser/web_applications/components/web_app_ui_manager.h b/chrome/browser/web_applications/components/web_app_ui_manager.h index ee39033ed..8c49dc12 100644 --- a/chrome/browser/web_applications/components/web_app_ui_manager.h +++ b/chrome/browser/web_applications/components/web_app_ui_manager.h
@@ -42,6 +42,8 @@ virtual bool CanAddAppToQuickLaunchBar() const = 0; virtual void AddAppToQuickLaunchBar(const AppId& app_id) = 0; + virtual bool IsInAppWindow(content::WebContents* web_contents) const = 0; + virtual bool CanReparentAppTabToWindow(const AppId& app_id, bool shortcut_created) const = 0; virtual void ReparentAppTabToWindow(content::WebContents* contents,
diff --git a/chrome/browser/web_applications/extensions/BUILD.gn b/chrome/browser/web_applications/extensions/BUILD.gn index 49238208..54d3c53 100644 --- a/chrome/browser/web_applications/extensions/BUILD.gn +++ b/chrome/browser/web_applications/extensions/BUILD.gn
@@ -14,8 +14,6 @@ "bookmark_app_install_finalizer.h", "bookmark_app_registrar.cc", "bookmark_app_registrar.h", - "bookmark_app_tab_helper.cc", - "bookmark_app_tab_helper.h", "bookmark_app_util.cc", "bookmark_app_util.h", "web_app_extension_shortcut.cc",
diff --git a/chrome/browser/web_applications/extensions/bookmark_app_registrar.cc b/chrome/browser/web_applications/extensions/bookmark_app_registrar.cc index 4f095a5..73f91faa 100644 --- a/chrome/browser/web_applications/extensions/bookmark_app_registrar.cc +++ b/chrome/browser/web_applications/extensions/bookmark_app_registrar.cc
@@ -74,6 +74,12 @@ return ExtensionPrefs::Get(profile())->IsExternalExtensionUninstalled(app_id); } +bool BookmarkAppRegistrar::WasInstalledByUser( + const web_app::AppId& app_id) const { + const Extension* extension = GetExtension(app_id); + return extension && !extension->was_installed_by_default(); +} + base::Optional<web_app::AppId> BookmarkAppRegistrar::FindAppWithUrlInScope( const GURL& url) const { const Extension* extension = util::GetInstalledPwaForUrl(profile(), url);
diff --git a/chrome/browser/web_applications/extensions/bookmark_app_registrar.h b/chrome/browser/web_applications/extensions/bookmark_app_registrar.h index 2321324..01276f6 100644 --- a/chrome/browser/web_applications/extensions/bookmark_app_registrar.h +++ b/chrome/browser/web_applications/extensions/bookmark_app_registrar.h
@@ -31,6 +31,7 @@ bool IsLocallyInstalled(const GURL& start_url) const override; bool WasExternalAppUninstalledByUser( const web_app::AppId& app_id) const override; + bool WasInstalledByUser(const web_app::AppId& app_id) const override; base::Optional<web_app::AppId> FindAppWithUrlInScope( const GURL& url) const override; int CountUserInstalledApps() const override;
diff --git a/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.cc b/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.cc deleted file mode 100644 index f8b7a6d7..0000000 --- a/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.cc +++ /dev/null
@@ -1,69 +0,0 @@ -// 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/web_applications/extensions/bookmark_app_tab_helper.h" - -#include "chrome/browser/extensions/extension_util.h" -#include "chrome/browser/web_applications/components/web_app_helpers.h" -#include "chrome/browser/web_applications/extensions/bookmark_app_util.h" -#include "chrome/common/chrome_features.h" -#include "chrome/common/extensions/api/url_handlers/url_handlers_parser.h" -#include "content/public/browser/web_contents.h" -#include "extensions/browser/extension_registry.h" -#include "extensions/common/extension.h" -#include "url/gurl.h" - -namespace extensions { - -BookmarkAppTabHelper::BookmarkAppTabHelper(content::WebContents* web_contents) - : WebAppTabHelperBase(web_contents) { -} - -BookmarkAppTabHelper::~BookmarkAppTabHelper() = default; - -// static -BookmarkAppTabHelper* BookmarkAppTabHelper::CreateForWebContents( - content::WebContents* web_contents) { - DCHECK(!FromWebContents(web_contents)); - - auto tab_helper = std::make_unique<BookmarkAppTabHelper>(web_contents); - BookmarkAppTabHelper* result = tab_helper.get(); - web_contents->SetUserData(UserDataKey(), std::move(tab_helper)); - return result; -} - -web_app::WebAppTabHelperBase* BookmarkAppTabHelper::CloneForWebContents( - content::WebContents* web_contents) const { - BookmarkAppTabHelper* new_tab_helper = - BookmarkAppTabHelper::CreateForWebContents(web_contents); - return new_tab_helper; -} - -bool BookmarkAppTabHelper::IsInAppWindow() const { - return util::IsWebContentsInAppWindow(web_contents()); -} - -bool BookmarkAppTabHelper::IsUserInstalled() const { - const Extension* app = GetExtension(); - return app && !app->was_installed_by_default(); -} - -bool BookmarkAppTabHelper::IsFromInstallButton() const { - const Extension* app = GetExtension(); - // TODO(loyso): Use something better to record apps installed from promoted - // UIs. crbug.com/774918. - return app && app->is_hosted_app() && UrlHandlers::GetUrlHandlers(app); -} - -const Extension* BookmarkAppTabHelper::GetExtension() const { - DCHECK(!app_id().empty()); - content::BrowserContext* browser_context = - web_contents()->GetBrowserContext(); - const Extension* app = - ExtensionRegistry::Get(browser_context) - ->GetExtensionById(app_id(), ExtensionRegistry::EVERYTHING); - return app; -} - -} // namespace extensions
diff --git a/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.h b/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.h deleted file mode 100644 index c3ae0ac..0000000 --- a/chrome/browser/web_applications/extensions/bookmark_app_tab_helper.h +++ /dev/null
@@ -1,49 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_BOOKMARK_APP_TAB_HELPER_H_ -#define CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_BOOKMARK_APP_TAB_HELPER_H_ - -#include "base/macros.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" - -namespace content { -class WebContents; -} - -namespace extensions { - -class Extension; - -// Allows to associate a tab with bookmark app. -class BookmarkAppTabHelper : public web_app::WebAppTabHelperBase { - public: - explicit BookmarkAppTabHelper(content::WebContents* web_contents); - ~BookmarkAppTabHelper() override; - - // Should only be called through WebAppProvider::CreateTabHelper which ensures - // the right tab helper is created based on the DesktopPWAsWithoutExtensions - // feature. - static BookmarkAppTabHelper* CreateForWebContents( - content::WebContents* web_contents); - - // WebAppTabHelperBase: - web_app::WebAppTabHelperBase* CloneForWebContents( - content::WebContents* web_contents) const override; - bool IsInAppWindow() const override; - bool IsUserInstalled() const override; - bool IsFromInstallButton() const override; - - private: - // Get a pointer from app_id_. Semantically, we use app_id_ as a weak - // reference. It might become nullptr in unforeseen circumstances (Uninstall). - // TODO(loyso): Provide guarantees for app_id_. crbug.com/915034 - const Extension* GetExtension() const; - - DISALLOW_COPY_AND_ASSIGN(BookmarkAppTabHelper); -}; - -} // namespace extensions - -#endif // CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_BOOKMARK_APP_TAB_HELPER_H_
diff --git a/chrome/browser/web_applications/extensions/web_app_audio_focus_browsertest.cc b/chrome/browser/web_applications/extensions/web_app_audio_focus_browsertest.cc index ee444881..e385695b 100644 --- a/chrome/browser/web_applications/extensions/web_app_audio_focus_browsertest.cc +++ b/chrome/browser/web_applications/extensions/web_app_audio_focus_browsertest.cc
@@ -7,7 +7,7 @@ #include "chrome/browser/extensions/browsertest_util.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" +#include "chrome/browser/web_applications/components/web_app_tab_helper.h" #include "chrome/common/web_application_info.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/notification_service.h" @@ -75,8 +75,7 @@ const base::UnguessableToken& GetAudioFocusGroupId( content::WebContents* web_contents) { - WebAppTabHelperBase* helper = - WebAppTabHelperBase::FromWebContents(web_contents); + WebAppTabHelper* helper = WebAppTabHelper::FromWebContents(web_contents); return helper->audio_focus_group_id_; }
diff --git a/chrome/browser/web_applications/test/test_app_registrar.cc b/chrome/browser/web_applications/test/test_app_registrar.cc index 0728570..0f05323 100644 --- a/chrome/browser/web_applications/test/test_app_registrar.cc +++ b/chrome/browser/web_applications/test/test_app_registrar.cc
@@ -57,6 +57,11 @@ return base::Contains(user_uninstalled_external_apps_, app_id); } +bool TestAppRegistrar::WasInstalledByUser(const AppId& app_id) const { + NOTIMPLEMENTED(); + return false; +} + std::map<AppId, GURL> TestAppRegistrar::GetExternallyInstalledApps( ExternalInstallSource install_source) const { std::map<AppId, GURL> apps;
diff --git a/chrome/browser/web_applications/test/test_app_registrar.h b/chrome/browser/web_applications/test/test_app_registrar.h index 1097250..39e94c7 100644 --- a/chrome/browser/web_applications/test/test_app_registrar.h +++ b/chrome/browser/web_applications/test/test_app_registrar.h
@@ -43,6 +43,7 @@ bool IsLocallyInstalled(const AppId& app_id) const override; bool IsLocallyInstalled(const GURL& start_url) const override; bool WasExternalAppUninstalledByUser(const AppId& app_id) const override; + bool WasInstalledByUser(const AppId& app_id) const override; std::map<AppId, GURL> GetExternallyInstalledApps( ExternalInstallSource install_source) const override; base::Optional<AppId> LookupExternalAppId(
diff --git a/chrome/browser/web_applications/test/test_web_app_ui_manager.cc b/chrome/browser/web_applications/test/test_web_app_ui_manager.cc index 3f855e4..9932afc 100644 --- a/chrome/browser/web_applications/test/test_web_app_ui_manager.cc +++ b/chrome/browser/web_applications/test/test_web_app_ui_manager.cc
@@ -51,6 +51,11 @@ void TestWebAppUiManager::AddAppToQuickLaunchBar(const AppId& app_id) {} +bool TestWebAppUiManager::IsInAppWindow( + content::WebContents* web_contents) const { + return false; +} + bool TestWebAppUiManager::CanReparentAppTabToWindow( const AppId& app_id, bool shortcut_created) const {
diff --git a/chrome/browser/web_applications/test/test_web_app_ui_manager.h b/chrome/browser/web_applications/test/test_web_app_ui_manager.h index 64dd76b..d83d4b1 100644 --- a/chrome/browser/web_applications/test/test_web_app_ui_manager.h +++ b/chrome/browser/web_applications/test/test_web_app_ui_manager.h
@@ -27,6 +27,7 @@ void MigrateOSAttributes(const AppId& from, const AppId& to) override; bool CanAddAppToQuickLaunchBar() const override; void AddAppToQuickLaunchBar(const AppId& app_id) override; + bool IsInAppWindow(content::WebContents* web_contents) const override; bool CanReparentAppTabToWindow(const AppId& app_id, bool shortcut_created) const override; void ReparentAppTabToWindow(content::WebContents* contents,
diff --git a/chrome/browser/web_applications/web_app_install_manager.cc b/chrome/browser/web_applications/web_app_install_manager.cc index 8ac0a418..b030760 100644 --- a/chrome/browser/web_applications/web_app_install_manager.cc +++ b/chrome/browser/web_applications/web_app_install_manager.cc
@@ -145,15 +145,6 @@ web_contents_.reset(); } -void WebAppInstallManager::InstallWebAppForTesting( - std::unique_ptr<WebApplicationInfo> web_application_info, - OnceInstallCallback callback) { - InstallWebAppFromInfo(std::move(web_application_info), - /*no_network_install=*/false, - /*install_source=*/WebappInstallSource::DEVTOOLS, - std::move(callback)); -} - void WebAppInstallManager::SetUrlLoaderForTesting( std::unique_ptr<WebAppUrlLoader> url_loader) { url_loader_ = std::move(url_loader);
diff --git a/chrome/browser/web_applications/web_app_install_manager.h b/chrome/browser/web_applications/web_app_install_manager.h index 47043877..1d6b1e2 100644 --- a/chrome/browser/web_applications/web_app_install_manager.h +++ b/chrome/browser/web_applications/web_app_install_manager.h
@@ -60,9 +60,6 @@ std::unique_ptr<WebApplicationInfo> web_application_info, OnceInstallCallback callback) override; void Shutdown() override; - void InstallWebAppForTesting( - std::unique_ptr<WebApplicationInfo> web_application_info, - OnceInstallCallback callback) override; using DataRetrieverFactory = base::RepeatingCallback<std::unique_ptr<WebAppDataRetriever>()>;
diff --git a/chrome/browser/web_applications/web_app_provider.cc b/chrome/browser/web_applications/web_app_provider.cc index 8f461fae..c324ed3 100644 --- a/chrome/browser/web_applications/web_app_provider.cc +++ b/chrome/browser/web_applications/web_app_provider.cc
@@ -17,7 +17,6 @@ #include "chrome/browser/web_applications/components/web_app_utils.h" #include "chrome/browser/web_applications/extensions/bookmark_app_install_finalizer.h" #include "chrome/browser/web_applications/extensions/bookmark_app_registrar.h" -#include "chrome/browser/web_applications/extensions/bookmark_app_tab_helper.h" #include "chrome/browser/web_applications/external_web_app_manager.h" #include "chrome/browser/web_applications/file_utils_wrapper.h" #include "chrome/browser/web_applications/pending_app_manager_impl.h" @@ -30,7 +29,6 @@ #include "chrome/browser/web_applications/web_app_provider_factory.h" #include "chrome/browser/web_applications/web_app_registrar.h" #include "chrome/browser/web_applications/web_app_sync_manager.h" -#include "chrome/browser/web_applications/web_app_tab_helper.h" #include "chrome/common/chrome_features.h" #include "components/pref_registry/pref_registry_syncable.h" #include "content/public/browser/web_contents.h" @@ -101,6 +99,11 @@ return *ui_manager_; } +WebAppAudioFocusIdMap& WebAppProvider::audio_focus_id_map() { + CheckIsConnected(); + return *audio_focus_id_map_; +} + SystemWebAppManager& WebAppProvider::system_web_app_manager() { CheckIsConnected(); return *system_web_app_manager_; @@ -189,28 +192,4 @@ RegisterInstallBounceMetricProfilePrefs(registry); } -// static -WebAppTabHelperBase* WebAppProvider::CreateTabHelper( - content::WebContents* web_contents) { - WebAppProvider* provider = WebAppProvider::GetForWebContents(web_contents); - if (!provider) - return nullptr; - - WebAppTabHelperBase* tab_helper = - WebAppTabHelperBase::FromWebContents(web_contents); - // Do nothing if already exists. - if (tab_helper) - return tab_helper; - - if (base::FeatureList::IsEnabled(features::kDesktopPWAsWithoutExtensions)) { - tab_helper = WebAppTabHelper::CreateForWebContents(web_contents); - } else { - tab_helper = - extensions::BookmarkAppTabHelper::CreateForWebContents(web_contents); - } - - tab_helper->Init(provider->audio_focus_id_map_.get()); - return tab_helper; -} - } // namespace web_app
diff --git a/chrome/browser/web_applications/web_app_provider.h b/chrome/browser/web_applications/web_app_provider.h index b2fecf9..a795bf3f 100644 --- a/chrome/browser/web_applications/web_app_provider.h +++ b/chrome/browser/web_applications/web_app_provider.h
@@ -35,7 +35,6 @@ class WebAppAudioFocusIdMap; class WebAppInstallManager; class WebAppPolicyManager; -class WebAppTabHelperBase; class WebAppUiManager; // Forward declarations for new extension-independent subsystems. @@ -71,6 +70,7 @@ PendingAppManager& pending_app_manager() override; WebAppPolicyManager& policy_manager() override; WebAppUiManager& ui_manager() override; + WebAppAudioFocusIdMap& audio_focus_id_map() override; WebAppDatabaseFactory& database_factory() { return *database_factory_; } WebAppSyncManager& sync_manager() { return *sync_manager_; } @@ -80,8 +80,6 @@ void Shutdown() override; static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); - static WebAppTabHelperBase* CreateTabHelper( - content::WebContents* web_contents); // Signals when app registry becomes ready. const base::OneShotEvent& on_registry_ready() const {
diff --git a/chrome/browser/web_applications/web_app_registrar.cc b/chrome/browser/web_applications/web_app_registrar.cc index 22bc74f8..1e48be7 100644 --- a/chrome/browser/web_applications/web_app_registrar.cc +++ b/chrome/browser/web_applications/web_app_registrar.cc
@@ -99,6 +99,11 @@ return false; } +bool WebAppRegistrar::WasInstalledByUser(const AppId& app_id) const { + NOTIMPLEMENTED(); + return false; +} + base::Optional<AppId> WebAppRegistrar::FindAppWithUrlInScope( const GURL& url) const { NOTIMPLEMENTED();
diff --git a/chrome/browser/web_applications/web_app_registrar.h b/chrome/browser/web_applications/web_app_registrar.h index 2a35e12e6..2045c09f 100644 --- a/chrome/browser/web_applications/web_app_registrar.h +++ b/chrome/browser/web_applications/web_app_registrar.h
@@ -42,6 +42,7 @@ bool IsLocallyInstalled(const AppId& app_id) const override; bool IsLocallyInstalled(const GURL& start_url) const override; bool WasExternalAppUninstalledByUser(const AppId& app_id) const override; + bool WasInstalledByUser(const AppId& app_id) const override; base::Optional<AppId> FindAppWithUrlInScope(const GURL& url) const override; int CountUserInstalledApps() const override; std::string GetAppShortName(const AppId& app_id) const override;
diff --git a/chrome/browser/web_applications/web_app_tab_helper.cc b/chrome/browser/web_applications/web_app_tab_helper.cc deleted file mode 100644 index e321821..0000000 --- a/chrome/browser/web_applications/web_app_tab_helper.cc +++ /dev/null
@@ -1,47 +0,0 @@ -// 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/web_applications/web_app_tab_helper.h" - -namespace web_app { - -WebAppTabHelper::WebAppTabHelper(content::WebContents* web_contents) - : WebAppTabHelperBase(web_contents) {} - -WebAppTabHelper::~WebAppTabHelper() = default; - -// static -WebAppTabHelper* WebAppTabHelper::CreateForWebContents( - content::WebContents* web_contents) { - DCHECK(!FromWebContents(web_contents)); - - auto tab_helper = std::make_unique<WebAppTabHelper>(web_contents); - WebAppTabHelper* result = tab_helper.get(); - web_contents->SetUserData(UserDataKey(), std::move(tab_helper)); - return result; -} - -WebAppTabHelperBase* WebAppTabHelper::CloneForWebContents( - content::WebContents* web_contents) const { - WebAppTabHelper* new_tab_helper = - WebAppTabHelper::CreateForWebContents(web_contents); - return new_tab_helper; -} - -bool WebAppTabHelper::IsInAppWindow() const { - // TODO(beccahughes): Implement. - return false; -} - -bool WebAppTabHelper::IsUserInstalled() const { - // TODO(loyso): Implement it. - return false; -} - -bool WebAppTabHelper::IsFromInstallButton() const { - // TODO(loyso): Implement it. Plumb |force_shortcut_app| into Registry. - return true; -} - -} // namespace web_app
diff --git a/chrome/browser/web_applications/web_app_tab_helper.h b/chrome/browser/web_applications/web_app_tab_helper.h deleted file mode 100644 index 82f840e..0000000 --- a/chrome/browser/web_applications/web_app_tab_helper.h +++ /dev/null
@@ -1,42 +0,0 @@ -// 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. - -#ifndef CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_TAB_HELPER_H_ -#define CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_TAB_HELPER_H_ - -#include "base/macros.h" -#include "chrome/browser/web_applications/components/web_app_tab_helper_base.h" - -namespace content { -class WebContents; -} - -namespace web_app { - -// Allows to associate a tab with web app. -class WebAppTabHelper : public WebAppTabHelperBase { - public: - explicit WebAppTabHelper(content::WebContents* web_contents); - ~WebAppTabHelper() override; - - // Should only be called through WebAppProvider::CreateTabHelper which ensures - // the right tab helper is created based on the DesktopPWAsWithoutExtensions - // feature. - static WebAppTabHelper* CreateForWebContents( - content::WebContents* web_contents); - - // WebAppTabHelperBase: - WebAppTabHelperBase* CloneForWebContents( - content::WebContents* web_contents) const override; - bool IsInAppWindow() const override; - bool IsUserInstalled() const override; - bool IsFromInstallButton() const override; - - private: - DISALLOW_COPY_AND_ASSIGN(WebAppTabHelper); -}; - -} // namespace web_app - -#endif // CHROME_BROWSER_WEB_APPLICATIONS_WEB_APP_TAB_HELPER_H_
diff --git a/chrome/chrome_cleaner/BUILD.gn b/chrome/chrome_cleaner/BUILD.gn index b0506b6..2989d2b 100644 --- a/chrome/chrome_cleaner/BUILD.gn +++ b/chrome/chrome_cleaner/BUILD.gn
@@ -18,7 +18,7 @@ group("engine_definitions") { if (is_internal_chrome_cleaner_build) { deps = [ - "//chrome_cleaner_internal:engine_definitions", + "${chrome_cleaner_internal_root}:engine_definitions", ] } else { deps = [ @@ -31,7 +31,7 @@ group("engine_target_factory") { if (is_internal_chrome_cleaner_build) { deps = [ - "//chrome_cleaner_internal:engine_target_factory", + "${chrome_cleaner_internal_root}:engine_target_factory", ] } else { deps = [ @@ -115,8 +115,8 @@ if (is_internal_chrome_cleaner_build) { deps += [ - "//chrome_cleaner_internal:integration_test_sources", - "//chrome_cleaner_internal:unittest_sources", + "${chrome_cleaner_internal_root}:integration_test_sources", + "${chrome_cleaner_internal_root}:unittest_sources", ] } }
diff --git a/chrome/chrome_cleaner/README.md b/chrome/chrome_cleaner/README.md index fe976c1d2..c09c808 100644 --- a/chrome/chrome_cleaner/README.md +++ b/chrome/chrome_cleaner/README.md
@@ -39,7 +39,7 @@ ## Internal Resources If |is_official_chrome_cleaner_build| is set in GN, the build looks for -internal resources in the chrome_cleaner_internal/ directory. These resources +internal resources in the chrome_cleaner/internal directory. These resources are not open source so are only available internally to Google. They include the licensed scanning engine used to find real-world UwS.
diff --git a/chrome/chrome_cleaner/chrome_cleaner_args.gni b/chrome/chrome_cleaner/chrome_cleaner_args.gni index f3ee043..1d0c19e 100644 --- a/chrome/chrome_cleaner/chrome_cleaner_args.gni +++ b/chrome/chrome_cleaner/chrome_cleaner_args.gni
@@ -11,6 +11,14 @@ # If this is true, builds an official release of the Chrome Cleanup Tool # (requires is_internal_chrome_cleaner_build=true). is_official_chrome_cleaner_build = false + + # Path to internal resources pulled from src-internal. + # + # TODO(crbug.com/985787): Chrome Cleanup Tool builders not using src-internal + # will override this to a legacy path. Once they're all moved to src-interal, + # hardcode this. + chrome_cleaner_internal_root = + "//chrome/chrome_cleaner/internal/chrome_cleaner_internal" } if (is_official_chrome_cleaner_build) {
diff --git a/chrome/chrome_cleaner/executables/BUILD.gn b/chrome/chrome_cleaner/executables/BUILD.gn index 3b841259..d0b3768 100644 --- a/chrome/chrome_cleaner/executables/BUILD.gn +++ b/chrome/chrome_cleaner/executables/BUILD.gn
@@ -7,7 +7,7 @@ group("engine_target_factory") { if (is_internal_chrome_cleaner_build) { deps = [ - "//chrome_cleaner_internal:engine_target_factory", + "${chrome_cleaner_internal_root}:engine_target_factory", ] } else { deps = [
diff --git a/chrome/chrome_cleaner/logging/BUILD.gn b/chrome/chrome_cleaner/logging/BUILD.gn index 65046a2..9155728 100644 --- a/chrome/chrome_cleaner/logging/BUILD.gn +++ b/chrome/chrome_cleaner/logging/BUILD.gn
@@ -128,7 +128,7 @@ group("api_keys") { if (is_internal_chrome_cleaner_build) { deps = [ - "//chrome_cleaner_internal/logging:api_keys", + "${chrome_cleaner_internal_root}/logging:api_keys", ] } else { deps = [
diff --git a/chrome/chrome_cleaner/logging/pending_logs_service.cc b/chrome/chrome_cleaner/logging/pending_logs_service.cc index 6730fb3..1bab762c 100644 --- a/chrome/chrome_cleaner/logging/pending_logs_service.cc +++ b/chrome/chrome_cleaner/logging/pending_logs_service.cc
@@ -11,7 +11,7 @@ #include "base/callback_helpers.h" #include "base/command_line.h" #include "base/files/file_util.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "chrome/chrome_cleaner/constants/chrome_cleaner_switches.h" #include "chrome/chrome_cleaner/logging/logging_service_api.h" #include "chrome/chrome_cleaner/logging/proto/chrome_cleaner_report.pb.h"
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni index 829a8013..8610cd3 100644 --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni
@@ -176,8 +176,8 @@ ] } if (!is_android && !is_chromeos) { - sources += [ "$root_gen_dir/chrome/onboarding_welcome_resources.pak" ] - deps += [ "//chrome/browser/resources:onboarding_welcome_resources" ] + sources += [ "$root_gen_dir/chrome/welcome_resources.pak" ] + deps += [ "//chrome/browser/resources:welcome_resources" ] } if (enable_extensions) { sources += [
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn index ccc4366f..2245764 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn
@@ -287,6 +287,7 @@ "//ui/gfx/ipc/skia", "//ui/gl", "//ui/message_center/public/cpp", + "//ui/native_theme", "//ui/resources:resources", "//url", ]
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc index fdb46d3..0ca0ae3 100644 --- a/chrome/common/chrome_features.cc +++ b/chrome/common/chrome_features.cc
@@ -381,7 +381,7 @@ // This feature requires Windows 10 or higher to work because it depends on // the "Apps & Features" system settings. const base::Feature kIncompatibleApplicationsWarning{ - "IncompatibleApplicationsWarning", base::FEATURE_DISABLED_BY_DEFAULT}; + "IncompatibleApplicationsWarning", base::FEATURE_ENABLED_BY_DEFAULT}; #endif #if defined(OS_CHROMEOS)
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json index 4c9f765..38d404e8 100644 --- a/chrome/common/extensions/api/_api_features.json +++ b/chrome/common/extensions/api/_api_features.json
@@ -723,6 +723,7 @@ "contexts": ["webui"], "matches": [ "chrome://bookmarks/*", + "chrome://tab-strip/*", "chrome://terminal/*" ] }], @@ -826,6 +827,7 @@ "contexts": ["webui"], "matches": [ "chrome://bookmarks/*", + "chrome://tab-strip/*", "chrome://terminal/*" ] }]
diff --git a/chrome/common/importer/profile_import.mojom b/chrome/common/importer/profile_import.mojom index 3733b3d..a61e549 100644 --- a/chrome/common/importer/profile_import.mojom +++ b/chrome/common/importer/profile_import.mojom
@@ -8,8 +8,6 @@ import "mojo/public/mojom/base/string16.mojom"; import "url/mojom/url.mojom"; -const string kProfileImportServiceName = "profile_import"; - [Native] struct ImportedBookmarkEntry;
diff --git a/chrome/common/pref_names_util.cc b/chrome/common/pref_names_util.cc index 4a64b42..7dee408 100644 --- a/chrome/common/pref_names_util.cc +++ b/chrome/common/pref_names_util.cc
@@ -6,7 +6,12 @@ #include <stddef.h> +#include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_service.h" +#include "ui/native_theme/native_theme.h" namespace pref_names_util { @@ -30,4 +35,37 @@ return true; } +base::Optional<ui::CaptionStyle> GetCaptionStyleFromPrefs(PrefService* prefs) { + if (!prefs) { + return base::nullopt; + } + + ui::CaptionStyle style; + + style.text_size = prefs->GetString(prefs::kAccessibilityCaptionsTextSize); + style.font_family = prefs->GetString(prefs::kAccessibilityCaptionsTextFont); + if (!prefs->GetString(prefs::kAccessibilityCaptionsTextColor).empty()) { + style.text_color = base::StringPrintf( + "rgba(%s,%s)", + prefs->GetString(prefs::kAccessibilityCaptionsTextColor).c_str(), + base::NumberToString( + prefs->GetInteger(prefs::kAccessibilityCaptionsTextOpacity) / 100.0) + .c_str()); + } + + if (!prefs->GetString(prefs::kAccessibilityCaptionsBackgroundColor).empty()) { + style.background_color = base::StringPrintf( + "rgba(%s,%s)", + prefs->GetString(prefs::kAccessibilityCaptionsBackgroundColor).c_str(), + base::NumberToString( + prefs->GetInteger(prefs::kAccessibilityCaptionsBackgroundOpacity) / + 100.0) + .c_str()); + } + + style.text_shadow = prefs->GetString(prefs::kAccessibilityCaptionsTextShadow); + + return style; +} + } // namespace pref_names_util
diff --git a/chrome/common/pref_names_util.h b/chrome/common/pref_names_util.h index bdabc9f5..b0c0177 100644 --- a/chrome/common/pref_names_util.h +++ b/chrome/common/pref_names_util.h
@@ -7,6 +7,9 @@ #include <string> +#include "components/prefs/pref_service.h" +#include "ui/native_theme/native_theme.h" + namespace pref_names_util { // Prefs prefix for all font types. Ends in a period. @@ -19,6 +22,9 @@ std::string* generic_family, std::string* script); +// Constructs the CaptionStyle struct from the caption-related preferences. +base::Optional<ui::CaptionStyle> GetCaptionStyleFromPrefs(PrefService* prefs); + } // namespace pref_names_util #endif // CHROME_COMMON_PREF_NAMES_UTIL_H_
diff --git a/chrome/common/webui_url_constants.cc b/chrome/common/webui_url_constants.cc index 6e03258e..186d5dd 100644 --- a/chrome/common/webui_url_constants.cc +++ b/chrome/common/webui_url_constants.cc
@@ -393,6 +393,7 @@ const char kKeyboardOverlaySubPage[] = "keyboard-overlay"; const char kLockScreenSubPage[] = "lockScreen"; const char kManageAccessibilitySubPage[] = "manageAccessibility"; +const char kManageAccessibilityTtsSubPage[] = "manageAccessibility/tts"; const char kMultideviceSubPage[] = "multidevice"; const char kNativePrintingSettingsSubPage[] = "cupsPrinters"; const char kNetworkDetailSubPage[] = "networkDetail"; @@ -434,6 +435,7 @@ kLanguageOptionsSubPage, kLockScreenSubPage, kManageAccessibilitySubPage, + kManageAccessibilityTtsSubPage, kMultideviceSubPage, kNativePrintingSettingsSubPage, kNetworkDetailSubPage,
diff --git a/chrome/credential_provider/gaiacp/associated_user_validator.cc b/chrome/credential_provider/gaiacp/associated_user_validator.cc index 648742f..74926326 100644 --- a/chrome/credential_provider/gaiacp/associated_user_validator.cc +++ b/chrome/credential_provider/gaiacp/associated_user_validator.cc
@@ -469,6 +469,17 @@ if (NeedsToEnrollWithMdm()) return false; + if (MdmPasswordRecoveryEnabled()) { + base::string16 store_key = GetUserPasswordLsaStoreKey(sid); + auto policy = ScopedLsaPolicy::Create(POLICY_ALL_ACCESS); + if (!policy->PrivateDataExists(store_key.c_str())) { + LOGFN(INFO) << "Enforcing re-auth due to missing password lsa store " + "data for user " + << sid; + return false; + } + } + // This function will start a new query if the current info for the token // handle is stale or has not yet been queried. At the end of this function, // either we will already have the validity of the token handle or we have a
diff --git a/chrome/credential_provider/gaiacp/associated_user_validator_unittests.cc b/chrome/credential_provider/gaiacp/associated_user_validator_unittests.cc index 5da5854b..bfc38d4 100644 --- a/chrome/credential_provider/gaiacp/associated_user_validator_unittests.cc +++ b/chrome/credential_provider/gaiacp/associated_user_validator_unittests.cc
@@ -77,6 +77,7 @@ FakeWinHttpUrlFetcherFactory fake_http_url_fetcher_factory_; registry_util::RegistryOverrideManager registry_override_; FakeInternetAvailabilityChecker fake_internet_checker_; + FakeScopedLsaPolicyFactory fake_scoped_lsa_factory_; }; AssociatedUserValidatorTest::AssociatedUserValidatorTest() = default; @@ -84,6 +85,8 @@ void AssociatedUserValidatorTest::SetUp() { InitializeRegistryOverrideForTesting(®istry_override_); + ScopedLsaPolicy::SetCreatorForTesting( + fake_scoped_lsa_factory_.GetCreatorCallback()); } TEST_F(AssociatedUserValidatorTest, CleanupStaleUsers) { @@ -482,6 +485,70 @@ EXPECT_EQ(2u, fake_http_url_fetcher_factory()->requests_created()); } +TEST_F(AssociatedUserValidatorTest, InvalidTokenHandle_MissingPasswordLsaData) { +#if !defined(GOOGLE_CHROME_BUILD) + GoogleMdmEscrowServiceEnablerForTesting escrow_service_enabler(true); +#endif + + FakeAssociatedUserValidator validator; + CComBSTR sid; + ASSERT_EQ(S_OK, fake_os_user_manager()->CreateTestOSUser( + L"username", L"password", L"fullname", L"comment", + L"gaia-id", base::string16(), &sid)); + ASSERT_EQ(S_OK, SetUserProperty(OLE2W(sid), kUserTokenHandle, L"th")); + ASSERT_EQ(S_OK, SetGlobalFlagForTesting(kRegMdmUrl, L"https://mdm.com")); + ASSERT_EQ(S_OK, SetGlobalFlagForTesting(kRegMdmEscrowServiceServerUrl, + L"https://escrow.com")); + GoogleMdmEnrolledStatusForTesting force_success(true); + + base::string16 store_key = GetUserPasswordLsaStoreKey(OLE2W(sid)); + + auto policy = ScopedLsaPolicy::Create(POLICY_ALL_ACCESS); + EXPECT_FALSE(policy->PrivateDataExists(store_key.c_str())); + + // Valid token fetch result. + fake_http_url_fetcher_factory()->SetFakeResponse( + GURL(AssociatedUserValidator::kTokenInfoUrl), + FakeWinHttpUrlFetcher::Headers(), "{\"expires_in\":1}"); + + validator.StartRefreshingTokenHandleValidity(); + + EXPECT_FALSE(validator.IsTokenHandleValidForUser(OLE2W(sid))); +} + +TEST_F(AssociatedUserValidatorTest, ValidTokenHandle_PresentPasswordLsaData) { +#if !defined(GOOGLE_CHROME_BUILD) + GoogleMdmEscrowServiceEnablerForTesting escrow_service_enabler(true); +#endif + + FakeAssociatedUserValidator validator; + CComBSTR sid; + ASSERT_EQ(S_OK, fake_os_user_manager()->CreateTestOSUser( + L"username", L"password", L"fullname", L"comment", + L"gaia-id", base::string16(), &sid)); + ASSERT_EQ(S_OK, SetUserProperty(OLE2W(sid), kUserTokenHandle, L"th")); + ASSERT_EQ(S_OK, SetGlobalFlagForTesting(kRegMdmUrl, L"https://mdm.com")); + ASSERT_EQ(S_OK, SetGlobalFlagForTesting(kRegMdmEscrowServiceServerUrl, + L"https://escrow.com")); + GoogleMdmEnrolledStatusForTesting force_success(true); + + base::string16 store_key = GetUserPasswordLsaStoreKey(OLE2W(sid)); + + auto policy = ScopedLsaPolicy::Create(POLICY_ALL_ACCESS); + EXPECT_TRUE(SUCCEEDED( + policy->StorePrivateData(store_key.c_str(), L"encrypted_data"))); + EXPECT_TRUE(policy->PrivateDataExists(store_key.c_str())); + + // Valid token fetch result. + fake_http_url_fetcher_factory()->SetFakeResponse( + GURL(AssociatedUserValidator::kTokenInfoUrl), + FakeWinHttpUrlFetcher::Headers(), "{\"expires_in\":1}"); + + validator.StartRefreshingTokenHandleValidity(); + + EXPECT_TRUE(validator.IsTokenHandleValidForUser(OLE2W(sid))); +} + } // namespace testing } // namespace credential_provider
diff --git a/chrome/credential_provider/gaiacp/mdm_utils.cc b/chrome/credential_provider/gaiacp/mdm_utils.cc index 268a3359..e9267df3 100644 --- a/chrome/credential_provider/gaiacp/mdm_utils.cc +++ b/chrome/credential_provider/gaiacp/mdm_utils.cc
@@ -30,6 +30,12 @@ constexpr wchar_t kRegMdmEscrowServiceServerUrl[] = L"mdm_ess_url"; constexpr wchar_t kRegMdmSupportsMultiUser[] = L"mdm_mu"; constexpr wchar_t kRegMdmAllowConsumerAccounts[] = L"mdm_aca"; +constexpr wchar_t kUserPasswordLsaStoreKeyPrefix[] = +#if defined(GOOGLE_CHROME_BUILD) + L"Chrome-GCPW-"; +#else + L"Chromium-GCPW-"; +#endif // Overridden in tests to force the MDM enrollment to either succeed or fail. enum class EnrollmentStatus { @@ -318,6 +324,12 @@ return hr; } +base::string16 GetUserPasswordLsaStoreKey(const base::string16& sid) { + DCHECK(sid.size()); + + return kUserPasswordLsaStoreKeyPrefix + sid; +} + // GoogleMdmEnrollmentStatusForTesting //////////////////////////////////////// GoogleMdmEnrollmentStatusForTesting::GoogleMdmEnrollmentStatusForTesting(
diff --git a/chrome/credential_provider/gaiacp/mdm_utils.h b/chrome/credential_provider/gaiacp/mdm_utils.h index b84349ab..8b934fc7 100644 --- a/chrome/credential_provider/gaiacp/mdm_utils.h +++ b/chrome/credential_provider/gaiacp/mdm_utils.h
@@ -30,6 +30,9 @@ // Allow sign in using normal consumer accounts. extern const wchar_t kRegMdmAllowConsumerAccounts[]; +// Password lsa store key prefix. +extern const wchar_t kUserPasswordLsaStoreKeyPrefix[]; + // Class used in tests to force either a successful on unsuccessful enrollment // to google MDM. class GoogleMdmEnrollmentStatusForTesting { @@ -75,6 +78,9 @@ // Enrolls the machine to with the Google MDM server if not already. HRESULT EnrollToGoogleMdmIfNeeded(const base::Value& properties); +// Constructs the password lsa store key for the given |sid|. +base::string16 GetUserPasswordLsaStoreKey(const base::string16& sid); + } // namespace credential_provider #endif // CHROME_CREDENTIAL_PROVIDER_GAIACP_MDM_UTILS_H_
diff --git a/chrome/credential_provider/gaiacp/password_recovery_manager.cc b/chrome/credential_provider/gaiacp/password_recovery_manager.cc index a2a8668..6ff3cae 100644 --- a/chrome/credential_provider/gaiacp/password_recovery_manager.cc +++ b/chrome/credential_provider/gaiacp/password_recovery_manager.cc
@@ -62,13 +62,6 @@ const char kEscrowServiceGetPrivateKeyPath[] = "/v1/getprivatekey"; const char kGetPrivateKeyResponsePrivateKeyParameterName[] = "base64PrivateKey"; -constexpr wchar_t kUserPasswordLsaStoreKeyPrefix[] = -#if defined(GOOGLE_CHROME_BUILD) - L"Chrome-GCPW-"; -#else - L"Chromium-GCPW-"; -#endif - // Constants used during padding and unpadding given secret. constexpr char kPaddedPassword[] = "password"; @@ -648,16 +641,6 @@ PasswordRecoveryManager::~PasswordRecoveryManager() = default; -HRESULT PasswordRecoveryManager::GetUserPasswordLsaStoreKey( - const base::string16& sid, - base::string16* store_key) { - DCHECK(store_key); - DCHECK(sid.size()); - - *store_key = kUserPasswordLsaStoreKeyPrefix + sid; - return S_OK; -} - HRESULT PasswordRecoveryManager::ClearUserRecoveryPassword( const base::string16& sid) { auto policy = ScopedLsaPolicy::Create(POLICY_ALL_ACCESS); @@ -667,12 +650,7 @@ LOGFN(ERROR) << "ScopedLsaPolicy::Create hr=" << putHR(hr); return hr; } - base::string16 store_key; - HRESULT hr = GetUserPasswordLsaStoreKey(sid, &store_key); - if (FAILED(hr)) { - LOGFN(ERROR) << "GetUserPasswordLsaStoreKey hr=" << putHR(hr); - return hr; - } + base::string16 store_key = GetUserPasswordLsaStoreKey(sid); return policy->RemovePrivateData(store_key.c_str()); } @@ -702,24 +680,9 @@ } // See if a password key is already stored in the LSA for this user. - base::string16 store_key; - hr = GetUserPasswordLsaStoreKey(sid, &store_key); + base::string16 store_key = GetUserPasswordLsaStoreKey(sid); - if (FAILED(hr)) { - LOGFN(ERROR) << "GetUserPasswordLsaStoreKey hr=" << putHR(hr); - return hr; - } - - // Only check if a value already exists for the user's password. The call to - // RetrievePrivateData always succeeds if the value exists, regardless of - // the size of the buffer passed in. It will merely copy whatever it can - // into the buffer. In this case we don't care about the contents and - // just want to check the existence of a value. - wchar_t password_lsa_data[32]; - hr = policy->RetrievePrivateData(store_key.c_str(), password_lsa_data, - base::size(password_lsa_data)); - if (SUCCEEDED(hr)) { - SecurelyClearBuffer(password_lsa_data, sizeof(password_lsa_data)); + if (policy->PrivateDataExists(store_key.c_str())) { return S_OK; } @@ -770,17 +733,10 @@ } // See if a password key is already stored in the LSA for this user. - base::string16 store_key; - HRESULT hr = GetUserPasswordLsaStoreKey(sid, &store_key); - - if (FAILED(hr)) { - LOGFN(ERROR) << "GetUserPasswordLsaStoreKey hr=" << putHR(hr); - return hr; - } - + base::string16 store_key = GetUserPasswordLsaStoreKey(sid); wchar_t password_lsa_data[1024]; - hr = policy->RetrievePrivateData(store_key.c_str(), password_lsa_data, - base::size(password_lsa_data)); + HRESULT hr = policy->RetrievePrivateData(store_key.c_str(), password_lsa_data, + base::size(password_lsa_data)); if (FAILED(hr)) LOGFN(ERROR) << "RetrievePrivateData hr=" << putHR(hr);
diff --git a/chrome/credential_provider/gaiacp/password_recovery_manager.h b/chrome/credential_provider/gaiacp/password_recovery_manager.h index 0d434700..ada39df 100644 --- a/chrome/credential_provider/gaiacp/password_recovery_manager.h +++ b/chrome/credential_provider/gaiacp/password_recovery_manager.h
@@ -60,8 +60,6 @@ const std::string& private_key); private: - HRESULT GetUserPasswordLsaStoreKey(const base::string16& sid, - base::string16* store_key); base::TimeDelta request_timeout_; };
diff --git a/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc b/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc index eb29163..6483579 100644 --- a/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc +++ b/chrome/credential_provider/gaiacp/scoped_lsa_policy.cc
@@ -102,11 +102,28 @@ return HRESULT_FROM_NT(sts); errno_t err = wcscpy_s(value, length, lsa_value->Buffer); + SecurelyClearBuffer(lsa_value->Buffer, lsa_value->Length); ::LsaFreeMemory(lsa_value); return err == 0 ? S_OK : E_FAIL; } +bool ScopedLsaPolicy::PrivateDataExists(const wchar_t* key) { + LSA_UNICODE_STRING lsa_key; + InitLsaString(key, &lsa_key); + LSA_UNICODE_STRING* lsa_value; + + NTSTATUS sts = ::LsaRetrievePrivateData(handle_, &lsa_key, &lsa_value); + + if (sts != STATUS_SUCCESS) + return false; + + SecurelyClearBuffer(lsa_value->Buffer, lsa_value->Length); + ::LsaFreeMemory(lsa_value); + + return true; +} + HRESULT ScopedLsaPolicy::AddAccountRights(PSID sid, const wchar_t* right) { LSA_UNICODE_STRING lsa_right; InitLsaString(right, &lsa_right);
diff --git a/chrome/credential_provider/gaiacp/scoped_lsa_policy.h b/chrome/credential_provider/gaiacp/scoped_lsa_policy.h index a350fecdf..07bec66 100644 --- a/chrome/credential_provider/gaiacp/scoped_lsa_policy.h +++ b/chrome/credential_provider/gaiacp/scoped_lsa_policy.h
@@ -20,7 +20,7 @@ virtual ~ScopedLsaPolicy(); - // Methods to store, retrieve, and remove private keyed data. This data + // Methods to store, retrieve, remove and check private keyed data. This data // is stored in protected memory in the OS that required SYSTEM account // to decrypt. virtual HRESULT StorePrivateData(const wchar_t* key, const wchar_t* value); @@ -28,6 +28,7 @@ virtual HRESULT RetrievePrivateData(const wchar_t* key, wchar_t* value, size_t length); + virtual bool PrivateDataExists(const wchar_t* key); // Adds the given right to the given user. virtual HRESULT AddAccountRights(PSID sid, const wchar_t* right);
diff --git a/chrome/credential_provider/test/gcp_fakes.cc b/chrome/credential_provider/test/gcp_fakes.cc index 69ca05a..ec413259 100644 --- a/chrome/credential_provider/test/gcp_fakes.cc +++ b/chrome/credential_provider/test/gcp_fakes.cc
@@ -490,6 +490,10 @@ return S_OK; } +bool FakeScopedLsaPolicy::PrivateDataExists(const wchar_t* key) { + return private_data().count(key) != 0; +} + HRESULT FakeScopedLsaPolicy::AddAccountRights(PSID sid, const wchar_t* right) { return S_OK; }
diff --git a/chrome/credential_provider/test/gcp_fakes.h b/chrome/credential_provider/test/gcp_fakes.h index 088e98b1..c7d9483d 100644 --- a/chrome/credential_provider/test/gcp_fakes.h +++ b/chrome/credential_provider/test/gcp_fakes.h
@@ -216,6 +216,7 @@ HRESULT RetrievePrivateData(const wchar_t* key, wchar_t* value, size_t length) override; + bool PrivateDataExists(const wchar_t* key) override; HRESULT AddAccountRights(PSID sid, const wchar_t* right) override; HRESULT RemoveAccount(PSID sid) override;
diff --git a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc index 86d503a..3dc6fc6aa 100644 --- a/chrome/renderer/autofill/password_autofill_agent_browsertest.cc +++ b/chrome/renderer/autofill/password_autofill_agent_browsertest.cc
@@ -3855,7 +3855,12 @@ fill_data_.password_field.value = ASCIIToUTF16(kBobPassword); SimulateOnFillPasswordForm(fill_data_); - CheckTextFieldsSuggestedState(kAliceUsername, true, kBobPassword, true); + CheckTextFieldsStateForElements( + username_element_, kAliceUsername, + /* username_autofilled */ true, password_element_, kBobPassword, + /* password_autofilled */ true, /* check_suggested_username */ false, + /* check_suggested_username */ true); + /// CheckTextFieldsSuggestedState(kAliceUsername, true, kBobPassword, true); } TEST_F(PasswordAutofillAgentTest, RestoresAfterJavaScriptModification) {
diff --git a/chrome/renderer/extensions/extension_localization_peer.h b/chrome/renderer/extensions/extension_localization_peer.h index b6f6783..a9a679c 100644 --- a/chrome/renderer/extensions/extension_localization_peer.h +++ b/chrome/renderer/extensions/extension_localization_peer.h
@@ -13,6 +13,7 @@ #include "base/macros.h" #include "content/public/renderer/request_peer.h" #include "mojo/public/cpp/system/data_pipe.h" +#include "mojo/public/cpp/system/simple_watcher.h" #include "services/network/public/cpp/resource_response_info.h" #include "services/network/public/cpp/url_loader_completion_status.h"
diff --git a/chrome/services/wifi_util_win/BUILD.gn b/chrome/services/wifi_util_win/BUILD.gn deleted file mode 100644 index 2a472af..0000000 --- a/chrome/services/wifi_util_win/BUILD.gn +++ /dev/null
@@ -1,22 +0,0 @@ -# Copyright 2017 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. - -source_set("lib") { - sources = [ - "wifi_credentials_getter.cc", - "wifi_credentials_getter.h", - "wifi_util_win_service.cc", - "wifi_util_win_service.h", - ] - - deps = [ - "//base", - "//mojo/public/cpp/bindings", - ] - - public_deps = [ - "//chrome/services/wifi_util_win/public/mojom", - "//services/service_manager/public/cpp", - ] -}
diff --git a/chrome/services/wifi_util_win/DEPS b/chrome/services/wifi_util_win/DEPS deleted file mode 100644 index 7361978..0000000 --- a/chrome/services/wifi_util_win/DEPS +++ /dev/null
@@ -1,3 +0,0 @@ -include_rules = [ - "+components/wifi" -] \ No newline at end of file
diff --git a/chrome/services/wifi_util_win/OWNERS b/chrome/services/wifi_util_win/OWNERS deleted file mode 100644 index 1a31ee9..0000000 --- a/chrome/services/wifi_util_win/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -noel@chromium.org -# COMPONENT: Internals>Services>ServiceManager
diff --git a/chrome/services/wifi_util_win/public/cpp/BUILD.gn b/chrome/services/wifi_util_win/public/cpp/BUILD.gn deleted file mode 100644 index 6406b73..0000000 --- a/chrome/services/wifi_util_win/public/cpp/BUILD.gn +++ /dev/null
@@ -1,17 +0,0 @@ -# Copyright 2019 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. - -source_set("manifest") { - sources = [ - "manifest.cc", - "manifest.h", - ] - - deps = [ - "//base", - "//chrome:strings", - "//chrome/services/wifi_util_win/public/mojom", - "//services/service_manager/public/cpp", - ] -}
diff --git a/chrome/services/wifi_util_win/public/cpp/OWNERS b/chrome/services/wifi_util_win/public/cpp/OWNERS deleted file mode 100644 index 6faeaa47..0000000 --- a/chrome/services/wifi_util_win/public/cpp/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -per-file manifest.cc=set noparent -per-file manifest.cc=file://ipc/SECURITY_OWNERS -per-file manifest.h=set noparent -per-file manifest.h=file://ipc/SECURITY_OWNERS
diff --git a/chrome/services/wifi_util_win/public/cpp/manifest.cc b/chrome/services/wifi_util_win/public/cpp/manifest.cc deleted file mode 100644 index c15df7f..0000000 --- a/chrome/services/wifi_util_win/public/cpp/manifest.cc +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2019 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/services/wifi_util_win/public/cpp/manifest.h" - -#include "base/no_destructor.h" -#include "chrome/grit/generated_resources.h" -#include "chrome/services/wifi_util_win/public/mojom/constants.mojom.h" -#include "chrome/services/wifi_util_win/public/mojom/wifi_credentials_getter.mojom.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -const service_manager::Manifest& GetWifiUtilWinManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .WithServiceName(chrome::mojom::kWifiUtilWinServiceName) - .WithDisplayName(IDS_UTILITY_PROCESS_WIFI_CREDENTIALS_GETTER_NAME) - .WithOptions( - service_manager::ManifestOptionsBuilder() - .WithExecutionMode(service_manager::Manifest::ExecutionMode:: - kOutOfProcessBuiltin) - .WithSandboxType("none_and_elevated") - .WithInstanceSharingPolicy( - service_manager::Manifest::InstanceSharingPolicy:: - kSharedAcrossGroups) - .Build()) - .ExposeCapability("wifi_credentials", - service_manager::Manifest::InterfaceList< - chrome::mojom::WiFiCredentialsGetter>()) - - .Build()}; - return *manifest; -}
diff --git a/chrome/services/wifi_util_win/public/cpp/manifest.h b/chrome/services/wifi_util_win/public/cpp/manifest.h deleted file mode 100644 index 3b8d52fb..0000000 --- a/chrome/services/wifi_util_win/public/cpp/manifest.h +++ /dev/null
@@ -1,12 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROME_SERVICES_WIFI_UTIL_WIN_PUBLIC_CPP_MANIFEST_H_ -#define CHROME_SERVICES_WIFI_UTIL_WIN_PUBLIC_CPP_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -const service_manager::Manifest& GetWifiUtilWinManifest(); - -#endif // CHROME_SERVICES_WIFI_UTIL_WIN_PUBLIC_CPP_MANIFEST_H_
diff --git a/chrome/services/wifi_util_win/public/mojom/BUILD.gn b/chrome/services/wifi_util_win/public/mojom/BUILD.gn deleted file mode 100644 index 89b560c8..0000000 --- a/chrome/services/wifi_util_win/public/mojom/BUILD.gn +++ /dev/null
@@ -1,21 +0,0 @@ -# Copyright 2017 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. - -import("//mojo/public/tools/bindings/mojom.gni") - -mojom("mojom") { - sources = [ - "wifi_credentials_getter.mojom", - ] - - public_deps = [ - ":constants", - ] -} - -mojom("constants") { - sources = [ - "constants.mojom", - ] -}
diff --git a/chrome/services/wifi_util_win/public/mojom/OWNERS b/chrome/services/wifi_util_win/public/mojom/OWNERS deleted file mode 100644 index 08850f4..0000000 --- a/chrome/services/wifi_util_win/public/mojom/OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -per-file *.mojom=set noparent -per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/chrome/services/wifi_util_win/public/mojom/constants.mojom b/chrome/services/wifi_util_win/public/mojom/constants.mojom deleted file mode 100644 index b048765..0000000 --- a/chrome/services/wifi_util_win/public/mojom/constants.mojom +++ /dev/null
@@ -1,7 +0,0 @@ -// Copyright 2017 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. - -module chrome.mojom; - -const string kWifiUtilWinServiceName = "wifi_util_win";
diff --git a/chrome/services/wifi_util_win/public/mojom/wifi_credentials_getter.mojom b/chrome/services/wifi_util_win/public/mojom/wifi_credentials_getter.mojom deleted file mode 100644 index edb4128..0000000 --- a/chrome/services/wifi_util_win/public/mojom/wifi_credentials_getter.mojom +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2017 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. - -module chrome.mojom; - -// Interface for retrieving WiFi credentials for WiFi networks. -// Must be run in a non sandboxed process with elevated privileges. -interface WiFiCredentialsGetter { - const string kWiFiTestNetwork = "chrome://test-get-wifi-credentials"; - - // OS_WIN: Get plain-text WiFi credentials from the system (requires UAC - // privilege elevation). Returns |success| false if an error occurred or - // |success| true and the result in |key_data|. - GetWiFiCredentials(string ssid) => (bool success, string key_data); -};
diff --git a/chrome/services/wifi_util_win/wifi_credentials_getter.cc b/chrome/services/wifi_util_win/wifi_credentials_getter.cc deleted file mode 100644 index a1bbc3c..0000000 --- a/chrome/services/wifi_util_win/wifi_credentials_getter.cc +++ /dev/null
@@ -1,36 +0,0 @@ -// Copyright 2017 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/services/wifi_util_win/wifi_credentials_getter.h" - -#include "components/wifi/wifi_service.h" - -WiFiCredentialsGetter::WiFiCredentialsGetter( - std::unique_ptr<service_manager::ServiceContextRef> service_ref) - : service_ref_(std::move(service_ref)) {} - -WiFiCredentialsGetter::~WiFiCredentialsGetter() = default; - -void WiFiCredentialsGetter::GetWiFiCredentials( - const std::string& ssid, - GetWiFiCredentialsCallback callback) { - if (ssid == kWiFiTestNetwork) { - // test-mode: return the ssid in key_data. - std::move(callback).Run(true, ssid); - return; - } - - std::unique_ptr<wifi::WiFiService> wifi_service(wifi::WiFiService::Create()); - wifi_service->Initialize(nullptr); - - std::string key_data; - std::string error; - wifi_service->GetKeyFromSystem(ssid, &key_data, &error); - - const bool success = error.empty(); - if (!success) - key_data.clear(); - - std::move(callback).Run(success, key_data); -}
diff --git a/chrome/services/wifi_util_win/wifi_credentials_getter.h b/chrome/services/wifi_util_win/wifi_credentials_getter.h deleted file mode 100644 index 3aa941a..0000000 --- a/chrome/services/wifi_util_win/wifi_credentials_getter.h +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2017 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. - -#ifndef CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_CREDENTIALS_GETTER_H_ -#define CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_CREDENTIALS_GETTER_H_ - -#include <memory> - -#include "chrome/services/wifi_util_win/public/mojom/wifi_credentials_getter.mojom.h" -#include "services/service_manager/public/cpp/service_context_ref.h" - -class WiFiCredentialsGetter : public chrome::mojom::WiFiCredentialsGetter { - public: - explicit WiFiCredentialsGetter( - std::unique_ptr<service_manager::ServiceContextRef> service_ref); - ~WiFiCredentialsGetter() override; - - private: - // chrome::mojom::WiFiCredentialsGetter: - void GetWiFiCredentials(const std::string& ssid, - GetWiFiCredentialsCallback callback) override; - - const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; - - DISALLOW_COPY_AND_ASSIGN(WiFiCredentialsGetter); -}; - -#endif // CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_CREDENTIALS_GETTER_H_
diff --git a/chrome/services/wifi_util_win/wifi_util_win_service.cc b/chrome/services/wifi_util_win/wifi_util_win_service.cc deleted file mode 100644 index 3ce7efb..0000000 --- a/chrome/services/wifi_util_win/wifi_util_win_service.cc +++ /dev/null
@@ -1,43 +0,0 @@ -// Copyright 2017 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/services/wifi_util_win/wifi_util_win_service.h" - -#include <memory> - -#include "base/bind.h" -#include "build/build_config.h" -#include "chrome/services/wifi_util_win/wifi_credentials_getter.h" -#include "mojo/public/cpp/bindings/strong_binding.h" - -namespace { - -void OnWifiCredentialsGetterRequest( - service_manager::ServiceKeepalive* keepalive, - chrome::mojom::WiFiCredentialsGetterRequest request) { - mojo::MakeStrongBinding( - std::make_unique<WiFiCredentialsGetter>(keepalive->CreateRef()), - std::move(request)); -} - -} // namespace - -WifiUtilWinService::WifiUtilWinService( - service_manager::mojom::ServiceRequest request) - : service_binding_(this, std::move(request)), - service_keepalive_(&service_binding_, base::TimeDelta()) {} - -WifiUtilWinService::~WifiUtilWinService() = default; - -void WifiUtilWinService::OnStart() { - registry_.AddInterface(base::BindRepeating(&OnWifiCredentialsGetterRequest, - &service_keepalive_)); -} - -void WifiUtilWinService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) { - registry_.BindInterface(interface_name, std::move(interface_pipe)); -}
diff --git a/chrome/services/wifi_util_win/wifi_util_win_service.h b/chrome/services/wifi_util_win/wifi_util_win_service.h deleted file mode 100644 index 32071a5..0000000 --- a/chrome/services/wifi_util_win/wifi_util_win_service.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2017 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. - -#ifndef CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_UTIL_WIN_SERVICE_H_ -#define CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_UTIL_WIN_SERVICE_H_ - -#include "services/service_manager/public/cpp/binder_registry.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/cpp/service_keepalive.h" -#include "services/service_manager/public/mojom/service.mojom.h" - -class WifiUtilWinService : public service_manager::Service { - public: - explicit WifiUtilWinService(service_manager::mojom::ServiceRequest request); - ~WifiUtilWinService() override; - - // Lifescycle events that occur after the service has started to spinup. - void OnStart() override; - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; - - private: - service_manager::ServiceBinding service_binding_; - service_manager::ServiceKeepalive service_keepalive_; - service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(WifiUtilWinService); -}; - -#endif // CHROME_SERVICES_WIFI_UTIL_WIN_WIFI_UTIL_WIN_SERVICE_H_
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 9a03e50..1106daa 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -862,6 +862,7 @@ "../browser/first_run/first_run_browsertest.cc", "../browser/geolocation/geolocation_browsertest.cc", "../browser/guest_view/mime_handler_view/chrome_mime_handler_view_browsertest.cc", + "../browser/heavy_ad_intervention/heavy_ad_helper_browsertest.cc", "../browser/history/history_browsertest.cc", "../browser/history/redirect_browsertest.cc", "../browser/iframe_browsertest.cc", @@ -3587,6 +3588,7 @@ "../browser/importer/profile_writer_unittest.cc", "../browser/lifetime/application_lifetime_unittest.cc", "../browser/lookalikes/lookalike_url_navigation_throttle_unittest.cc", + "../browser/lookalikes/safety_tips/reputation_service_unittest.cc", # Media remoting is not supported on Android for now. "../browser/media/cast_remoting_connector_unittest.cc", @@ -3919,7 +3921,7 @@ "../browser/renderer_context_menu/render_view_context_menu_test_util.cc", "../browser/renderer_context_menu/render_view_context_menu_test_util.h", "../browser/sharing/click_to_call/click_to_call_context_menu_observer_unittest.cc", - "../browser/sharing/click_to_call/click_to_call_sharing_dialog_controller_unittest.cc", + "../browser/sharing/click_to_call/click_to_call_ui_controller_unittest.cc", "../browser/sharing/click_to_call/click_to_call_utils_unittest.cc", "../browser/sharing/shared_clipboard/shared_clipboard_ui_controller_unittest.cc", "../browser/ui/autofill/payments/local_card_migration_bubble_controller_impl_unittest.cc", @@ -4903,6 +4905,7 @@ "../browser/ui/views/send_tab_to_self/send_tab_to_self_bubble_view_impl_unittest.cc", "../browser/ui/views/status_icons/status_tray_win_unittest.cc", "../browser/ui/views/tab_contents/chrome_web_contents_view_delegate_views_unittest.cc", + "../browser/ui/views/tabs/color_picker_view_unittest.cc", "../browser/ui/views/tabs/fake_base_tab_strip_controller.cc", "../browser/ui/views/tabs/fake_base_tab_strip_controller.h", "../browser/ui/views/tabs/stacked_tab_strip_layout_unittest.cc",
diff --git a/chrome/test/base/test_browser_window.cc b/chrome/test/base/test_browser_window.cc index 91b8cb3..46f1b84 100644 --- a/chrome/test/base/test_browser_window.cc +++ b/chrome/test/base/test_browser_window.cc
@@ -207,7 +207,7 @@ SharingDialog* TestBrowserWindow::ShowClickToCallDialog( content::WebContents* web_contents, - ClickToCallSharingDialogController* controller) { + ClickToCallUiController* controller) { return nullptr; }
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h index cb4124ae..3d46450 100644 --- a/chrome/test/base/test_browser_window.h +++ b/chrome/test/base/test_browser_window.h
@@ -122,7 +122,7 @@ bool IsToolbarShowing() const override; SharingDialog* ShowClickToCallDialog( content::WebContents* contents, - ClickToCallSharingDialogController* controller) override; + ClickToCallUiController* controller) override; void ShowUpdateChromeDialog() override {} void ShowBookmarkBubble(const GURL& url, bool already_bookmarked) override {} #if !defined(OS_ANDROID)
diff --git a/chrome/test/chromedriver/chrome/adb_impl.cc b/chrome/test/chromedriver/chrome/adb_impl.cc index e63f809c..9fffca3d 100644 --- a/chrome/test/chromedriver/chrome/adb_impl.cc +++ b/chrome/test/chromedriver/chrome/adb_impl.cc
@@ -13,7 +13,7 @@ #include "base/json/string_escape.h" #include "base/logging.h" #include "base/memory/ref_counted.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/single_thread_task_runner.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h"
diff --git a/chrome/test/chromedriver/js/call_function.js b/chrome/test/chromedriver/js/call_function.js index a06cd982..cb07197 100644 --- a/chrome/test/chromedriver/js/call_function.js +++ b/chrome/test/chromedriver/js/call_function.js
@@ -377,7 +377,8 @@ item === null || typeof item === 'boolean' || typeof item === 'number' || - typeof item === 'string') + typeof item === 'string' || + typeof item === 'function') return item; if (item.hasOwnProperty(ELEMENT_KEY)) { if (opt_cache === undefined || opt_cache === null) {
diff --git a/chrome/test/chromedriver/js/call_function_test.html b/chrome/test/chromedriver/js/call_function_test.html index e4ae49e2..30b52400 100644 --- a/chrome/test/chromedriver/js/call_function_test.html +++ b/chrome/test/chromedriver/js/call_function_test.html
@@ -313,6 +313,22 @@ document.body.removeChild(host); } +// Verify callFunction works when Object.prototype has user-defined functions. +function testCallWithFunctionInObject(runner) { + clearCache(); + + Object.prototype.f = () => {}; + function func(arg) { + return { bar: arg }; + } + callFunction(func, [{ foo: 1 }]).then((result) => { + assertEquals(1, result.value.bar.foo); + delete Object.prototype.f; + runner.continueTesting(); + }); + runner.waitForAsync(); +} + </script> <body> <div><span></span></div>
diff --git a/chrome/test/chromedriver/session_commands.cc b/chrome/test/chromedriver/session_commands.cc index d9a26fe..ca9302be 100644 --- a/chrome/test/chromedriver/session_commands.cc +++ b/chrome/test/chromedriver/session_commands.cc
@@ -386,14 +386,16 @@ std::string requested_platform_name = platform_name_value->GetString(); std::string actual_platform_name = base::ToLowerASCII(base::SysInfo::OperatingSystemName()); - bool is_android = - capabilities->HasKey("goog:chromeOptions.androidPackage"); - bool is_remote = - capabilities->HasKey("goog:chromeOptions.debuggerAddress"); - if (requested_platform_name == "any" || is_remote) { - // "any" can be used as a wild card for platformName - // and if |is_remote| there is no easy way to know - // target platform, so will skip check + bool is_android = capabilities->FindPath( + "goog:chromeOptions.androidPackage") != nullptr; + bool is_remote = capabilities->FindPath( + "goog:chromeOptions.debuggerAddress") != nullptr; + if (requested_platform_name == "any" || is_remote || + (is_android && requested_platform_name == "android")) { + // "any" can be used as a wild card for platformName. + // if |is_remote| there is no easy way to know + // target platform. Android check also occurs here. + // If any of the above cases pass, we return true. } else if (is_android && requested_platform_name != "android") { return false; } else if (requested_platform_name == "mac" ||
diff --git a/chrome/test/data/local_ntp/customize_menu_browsertest.js b/chrome/test/data/local_ntp/customize_menu_browsertest.js index 87d5a43..0b4c7ba2 100644 --- a/chrome/test/data/local_ntp/customize_menu_browsertest.js +++ b/chrome/test/data/local_ntp/customize_menu_browsertest.js
@@ -49,7 +49,7 @@ * @const */ test.customizeMenu.CLASSES = { - COLLECTION_TILE_BG: 'bg-sel-tile-bg', + COLLECTION_TILE: 'bg-sel-tile', ENTRY_POINT_ENHANCED: 'ep-enhanced', SELECTED: 'selected', }; @@ -226,8 +226,8 @@ $('coll_tile_0').click(); const background = $('coll_0_img_tile_0'); background.click(); - assertTrue( - background.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + assertTrue(background.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); // The submenu's title should be the image collection's. assertEquals( 'Collection 1', $(test.customizeMenu.IDS.MENU_TITLE).textContent); @@ -243,17 +243,18 @@ // Select a color. $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - const colorOptions = $(test.customizeMenu.IDS.COLORS_MENU) - .getElementsByClassName( - test.customizeMenu.CLASSES.COLLECTION_TILE_BG); + const colorOptions = + $(test.customizeMenu.IDS.COLORS_MENU) + .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE); const color = colorOptions[1]; // Skip the default theme option. color.click(); - assertTrue(color.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + assertTrue(color.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); // Open the Background submenu and check that it's still selected. $(test.customizeMenu.IDS.BACKGROUNDS_BUTTON).click(); - assertTrue( - background.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + assertTrue(background.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); // The image collection should still be open. assertEquals( 'Collection 1', $(test.customizeMenu.IDS.MENU_TITLE).textContent); @@ -265,7 +266,8 @@ // Open the Color submenu and check that it's still selected. $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - assertTrue(color.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + assertTrue(color.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); $(test.customizeMenu.IDS.MENU_CANCEL).click(); }; @@ -290,9 +292,9 @@ // Select a color. $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - const colorOptions = $(test.customizeMenu.IDS.COLORS_MENU) - .getElementsByClassName( - test.customizeMenu.CLASSES.COLLECTION_TILE_BG); + const colorOptions = + $(test.customizeMenu.IDS.COLORS_MENU) + .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE); // Skip the color picker and the default theme option. colorOptions[2].click(); @@ -366,9 +368,9 @@ // Select a color. $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - const colorOptions = $(test.customizeMenu.IDS.COLORS_MENU) - .getElementsByClassName( - test.customizeMenu.CLASSES.COLLECTION_TILE_BG); + const colorOptions = + $(test.customizeMenu.IDS.COLORS_MENU) + .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE); // Skip the color picker and the default theme option. const color = colorOptions[2]; color.click(); @@ -402,9 +404,9 @@ // Select a color. $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - const colorOptions = $(test.customizeMenu.IDS.COLORS_MENU) - .getElementsByClassName( - test.customizeMenu.CLASSES.COLLECTION_TILE_BG); + const colorOptions = + $(test.customizeMenu.IDS.COLORS_MENU) + .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE); // Skip the color picker and the default theme option. const color = colorOptions[2]; color.click(); @@ -639,7 +641,7 @@ $(test.customizeMenu.IDS.COLORS_BUTTON).click(); assertTrue($(test.customizeMenu.IDS.COLORS_MENU).children.length > 1); assertTrue(!!$('color_0').dataset.color); - assertTrue(!!$('color_0').firstElementChild.style.backgroundImage); + assertTrue(!!$('color_0').style.backgroundImage); }; /** @@ -714,24 +716,6 @@ }; /** - * Test 'Done' button enabled/disabled when preselect is present. - */ -test.customizeMenu.testColors_DoneButtonWithPreselect = function() { - test.customizeMenu.mockThemeBackgroundInfo = {usingDefaultTheme: true}; - init(); - $(test.customizeMenu.IDS.EDIT_BG).click(); - $(test.customizeMenu.IDS.COLORS_BUTTON).click(); - - assertTrue($(test.customizeMenu.IDS.MENU_DONE).disabled); - - !!$('color_0').click(); - assertFalse($(test.customizeMenu.IDS.MENU_DONE).disabled); - - $(test.customizeMenu.IDS.COLORS_DEFAULT).click(); - assertTrue($(test.customizeMenu.IDS.MENU_DONE).disabled); -}; - -/** * Test preselect color tile. */ test.customizeMenu.testColors_PreselectColor = function() { @@ -748,7 +732,8 @@ .getElementsByClassName('selected') .length === 1); const tile = $(test.customizeMenu.IDS.COLORS_MENU) - .getElementsByClassName('selected')[0]; + .getElementsByClassName('selected')[0] + .firstChild; assertTrue( parseInt(tile.dataset.id) === test.customizeMenu.mockThemeBackgroundInfo.colorId); @@ -1090,10 +1075,12 @@ const hiddenToggle = $(test.customizeMenu.IDS.SHORTCUTS_HIDE_TOGGLE); assertEquals( clSelected, - clOption.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + clOption.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); assertEquals( mvSelected, - mvOption.classList.contains(test.customizeMenu.CLASSES.SELECTED)); + mvOption.parentElement.classList.contains( + test.customizeMenu.CLASSES.SELECTED)); assertEquals(isHidden, hiddenToggle.checked); }; @@ -1108,21 +1095,18 @@ assertFalse(elementIsVisible(backgroundSubmenu)); assertTrue(elementIsVisible(backgroundImageSubmenu)); - assertEquals( - 4, - backgroundImageSubmenu - .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE_BG) - .length); - assertEquals( - 1, - backgroundImageSubmenu - .getElementsByClassName(test.customizeMenu.CLASSES.SELECTED) - .length); - assertEquals( - 'coll_0_img_tile_0', - backgroundImageSubmenu - .getElementsByClassName(test.customizeMenu.CLASSES.SELECTED)[0] - .id); + assertTrue( + $(test.customizeMenu.IDS.BACKGROUNDS_IMAGE_MENU) + .getElementsByClassName('bg-sel-tile') + .length === 4); + assertTrue( + $(test.customizeMenu.IDS.BACKGROUNDS_IMAGE_MENU) + .getElementsByClassName('selected') + .length === 1); + assertTrue( + $(test.customizeMenu.IDS.BACKGROUNDS_IMAGE_MENU) + .getElementsByClassName('selected')[0] + .firstChild.id === 'coll_0_img_tile_0'); }; /** @@ -1136,16 +1120,14 @@ assertFalse(elementIsVisible(backgroundSubmenu)); assertTrue(elementIsVisible(backgroundImageSubmenu)); - assertEquals( - 4, - backgroundImageSubmenu - .getElementsByClassName(test.customizeMenu.CLASSES.COLLECTION_TILE_BG) - .length); - assertEquals( - 0, - backgroundImageSubmenu - .getElementsByClassName(test.customizeMenu.CLASSES.SELECTED) - .length); + assertTrue( + $(test.customizeMenu.IDS.BACKGROUNDS_IMAGE_MENU) + .getElementsByClassName('bg-sel-tile') + .length === 4); + assertTrue( + $(test.customizeMenu.IDS.BACKGROUNDS_IMAGE_MENU) + .getElementsByClassName('selected') + .length === 0); }; /**
diff --git a/chrome/test/data/local_ntp/local_ntp_browsertest.html b/chrome/test/data/local_ntp/local_ntp_browsertest.html index e1e2a96..16ae52e 100644 --- a/chrome/test/data/local_ntp/local_ntp_browsertest.html +++ b/chrome/test/data/local_ntp/local_ntp_browsertest.html
@@ -217,25 +217,21 @@ </div> <div id="backgrounds-menu" class="menu-panel" tabindex="0" role="tabpanel" aria-label="$i18n{backgroundsOption}"> - <div id="backgrounds-upload-wrapper" class="bg-sel-tile-wrapper"> - <div id="backgrounds-upload" class="bg-sel-tile-bg" tabindex="-1" + <div id="backgrounds-upload" class="bg-sel-tile-bg"> + <div id="backgrounds-upload-icon" class="bg-sel-tile" tabindex="-1" role="button" aria-label="$i18n{uploadImage}" - title="$i18n{uploadImage}" aria-pressed="false"> - <div id="backgrounds-upload-icon" class="bg-sel-tile"> - <div id="backgrounds-upload-arrow"></div> - <div id="backgrounds-upload-text">$i18n{uploadImage}</div> - </div> + aria-pressed="false" title="$i18n{uploadImage}"> + <div id="backgrounds-upload-arrow"></div> + <div id="backgrounds-upload-text">$i18n{uploadImage}</div> </div> </div> - <div id="backgrounds-default-wrapper" class="bg-sel-tile-wrapper"> - <div id="backgrounds-default" class="bg-sel-tile-bg" tabindex="-1" + <div id="backgrounds-default" class="bg-sel-tile-bg"> + <div id="backgrounds-default-icon" class="bg-sel-tile" tabindex="-1" role="button" aria-label="$i18n{noBackground}" title="$i18n{noBackground}" aria-pressed="false"> - <div id="backgrounds-default-icon" class="bg-sel-tile"> - <div class="mini-page"> - <div class="mini-header-colorful"></div> - <div class="mini-shortcuts"></div> - </div> + <div class="mini-page"> + <div class="mini-header-colorful"></div> + <div class="mini-shortcuts"></div> </div> </div> <div class="bg-sel-tile-title">$i18n{noBackground}</div> @@ -316,25 +312,22 @@ $i18n{uninstallButton} </button> </div> - <div id="color-picker-wrapper" class="bg-sel-tile-wrapper"> - <div id="color-picker-container" class="bg-sel-tile-bg" - aria-label="$i18n{colorPickerLabel}" - title="$i18n{colorPickerLabel}" tabindex="-1" - role="button" aria-pressed="false"> - <div id="color-picker-tile" class="bg-sel-tile"> - <div id="left-semicircle"></div> - <div id="color-picker-icon"></div> - <input id="color-picker" type="color" style="display:none"> - </input> - </div> + <div id="color-picker-container" class="bg-sel-tile-bg"> + <div id="color-picker-tile" class="bg-sel-tile" tabindex="-1" + aria-label="$i18n{colorPickerLabel}" + title="$i18n{colorPickerLabel}" + role="button" aria-pressed="false"> + <div id="left-semicircle"></div> + <div id="color-picker-icon"></div> + <input id="color-picker" type="color" style="display:none"> + </input> </div> </div> - <div id="colors-default-wrapper" class="bg-sel-tile-wrapper"> - <div id="colors-default" class="bg-sel-tile-bg" + <div id="colors-default" class="bg-sel-tile-bg"> + <div id="colors-default-icon" class="bg-sel-tile" tabindex="-1" aria-label="$i18n{defaultThemeLabel}" title="$i18n{defaultThemeLabel}" tabindex="-1" role="button" aria-pressed="false"> - <div id="colors-default-icon" class="bg-sel-tile"></div> </div> </div> </div> @@ -344,7 +337,7 @@ class="bg-sel-footer-button paper secondary ripple" title="$i18n{cancelButton}">$i18n{cancelButton}</button> <button id="menu-done" class="bg-sel-footer-button paper primary ripple" - title="$i18n{doneButton}" disabled>$i18n{doneButton}</button> + title="$i18n{doneButton}">$i18n{doneButton}</button> </div> </dialog>
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index 5b00dae..3ea07e6 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -128,7 +128,7 @@ "signin/signin_browsertest.js", "user_manager/user_manager_browsertest.js", "welcome/a11y_tests.js", - "welcome/onboarding_welcome_browsertest.js", + "welcome/welcome_browsertest.js", ] } @@ -145,6 +145,9 @@ if (enable_print_preview) { sources += [ "print_preview/print_preview_ui_browsertest.js" ] } + if (enable_webui_tab_strip) { + sources += [ "tab_strip/tab_strip_browsertest.js" ] + } deps = [ ":modulize", "//chrome/browser/ui",
diff --git a/chrome/test/data/webui/app_management/app_management_browsertest.js b/chrome/test/data/webui/app_management/app_management_browsertest.js index c118ed6c..7ea6968 100644 --- a/chrome/test/data/webui/app_management/app_management_browsertest.js +++ b/chrome/test/data/webui/app_management/app_management_browsertest.js
@@ -17,6 +17,7 @@ extraLibraries: [ ...PolymerTest.prototype.extraLibraries, + '../test_util.js', '../test_store.js', 'test_util.js', 'test_store.js',
diff --git a/chrome/test/data/webui/app_management/app_test.js b/chrome/test/data/webui/app_management/app_test.js index 07cad44..fb7aeed 100644 --- a/chrome/test/data/webui/app_management/app_test.js +++ b/chrome/test/data/webui/app_management/app_test.js
@@ -18,7 +18,7 @@ /** @param {String} term */ async function searchApps(term) { app.dispatch(app_management.actions.setSearchTerm(term)); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); } /** @return {boolean} */ @@ -42,7 +42,7 @@ app = document.createElement('app-management-app'); replaceBody(app); await app.$$('app-management-dom-switch').firstRenderForTesting_.promise; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); }); test('loads', async () => { @@ -67,7 +67,7 @@ // Click app to go to detail page. appList.querySelector('app-management-app-item').click(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { return fakeHandler.addApp(); @@ -85,7 +85,7 @@ .$$('app-management-permission-view-header') .$$('#backButton') .click(); - PolymerTest.flushTasks(); + test_util.flushTasks(); }); });
diff --git a/chrome/test/data/webui/app_management/managed_apps_test.js b/chrome/test/data/webui/app_management/managed_apps_test.js index d075dd4..4ce6338 100644 --- a/chrome/test/data/webui/app_management/managed_apps_test.js +++ b/chrome/test/data/webui/app_management/managed_apps_test.js
@@ -39,7 +39,7 @@ appDetailView = document.createElement('app-management-pwa-permission-view'); replaceBody(appDetailView); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); }); test('Uninstall button affected by policy', () => {
diff --git a/chrome/test/data/webui/app_management/router_test.js b/chrome/test/data/webui/app_management/router_test.js index 1fa2baa..4e74d22 100644 --- a/chrome/test/data/webui/app_management/router_test.js +++ b/chrome/test/data/webui/app_management/router_test.js
@@ -44,7 +44,7 @@ }; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals('/detail?id=1', getCurrentUrlSuffix()); // Returning main page clears the route. @@ -53,7 +53,7 @@ selectedAppId: null, }; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals('/', getCurrentUrlSuffix()); store.data.currentPage = { @@ -61,7 +61,7 @@ selectedAppId: null, }; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals('/notifications', getCurrentUrlSuffix()); }); @@ -69,7 +69,7 @@ await navigateTo('/'); store.data.search = {term: 'bloop'}; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals('/?q=bloop', getCurrentUrlSuffix()); }); @@ -78,7 +78,7 @@ await navigateTo('/detail?id=1'); store.data.search = {term: 'bloop'}; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals('/detail?id=1&q=bloop', getCurrentUrlSuffix()); });
diff --git a/chrome/test/data/webui/app_management/test_util.js b/chrome/test/data/webui/app_management/test_util.js index fd2878d7..07d2dde 100644 --- a/chrome/test/data/webui/app_management/test_util.js +++ b/chrome/test/data/webui/app_management/test_util.js
@@ -67,7 +67,7 @@ async function navigateTo(route) { window.history.replaceState({}, '', route); window.dispatchEvent(new CustomEvent('location-changed')); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); } /**
diff --git a/chrome/test/data/webui/bookmarks/app_test.js b/chrome/test/data/webui/bookmarks/app_test.js index eb1b6de..c54768d 100644 --- a/chrome/test/data/webui/bookmarks/app_test.js +++ b/chrome/test/data/webui/bookmarks/app_test.js
@@ -70,7 +70,7 @@ }); test('focus ring hides and restores', async function() { - await PolymerTest.flushTasks(); + await test_util.flushTasks(); const list = app.$$('bookmarks-list'); const item = list.root.querySelectorAll('bookmarks-item')[0]; const getFocusAttribute = () =>
diff --git a/chrome/test/data/webui/bookmarks/bookmarks_browsertest.js b/chrome/test/data/webui/bookmarks/bookmarks_browsertest.js index 7d3ac90..2afa9c7 100644 --- a/chrome/test/data/webui/bookmarks/bookmarks_browsertest.js +++ b/chrome/test/data/webui/bookmarks/bookmarks_browsertest.js
@@ -51,6 +51,7 @@ __proto__: BookmarksBrowserTest.prototype, extraLibraries: BookmarksBrowserTest.prototype.extraLibraries.concat([ + '../test_util.js', 'app_test.js', '//ui/webui/resources/js/util.js', ]), @@ -158,6 +159,7 @@ __proto__: BookmarksBrowserTest.prototype, extraLibraries: BookmarksBrowserTest.prototype.extraLibraries.concat([ + '../test_util.js', 'router_test.js', ]), };
diff --git a/chrome/test/data/webui/bookmarks/bookmarks_focus_test.js b/chrome/test/data/webui/bookmarks/bookmarks_focus_test.js index e8bd761..197b126 100644 --- a/chrome/test/data/webui/bookmarks/bookmarks_focus_test.js +++ b/chrome/test/data/webui/bookmarks/bookmarks_focus_test.js
@@ -274,9 +274,9 @@ */ async function doAndWait(fn) { fn(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); // Focus is done asynchronously. - await PolymerTest.flushTasks(); + await test_util.flushTasks(); } /** @param {string} id */
diff --git a/chrome/test/data/webui/bookmarks/router_test.js b/chrome/test/data/webui/bookmarks/router_test.js index c28109af..f2138b9 100644 --- a/chrome/test/data/webui/bookmarks/router_test.js +++ b/chrome/test/data/webui/bookmarks/router_test.js
@@ -43,11 +43,11 @@ store.data.selectedFolder = '2'; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals('chrome://bookmarks/?id=2', window.location.href); store.data.selectedFolder = '1'; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); // Selecting Bookmarks bar clears route. assertEquals('chrome://bookmarks/', window.location.href); }); @@ -55,14 +55,14 @@ test('route updates from search', async function() { store.data.search = {term: 'bloop'}; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals('chrome://bookmarks/?q=bloop', window.location.href); // Ensure that the route doesn't change when the search finishes. store.data.selectedFolder = null; store.notifyObservers(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals('chrome://bookmarks/?q=bloop', window.location.href); });
diff --git a/chrome/test/data/webui/cr_elements/cr_action_menu_test.js b/chrome/test/data/webui/cr_elements/cr_action_menu_test.js index f57447767..19cca19c 100644 --- a/chrome/test/data/webui/cr_elements/cr_action_menu_test.js +++ b/chrome/test/data/webui/cr_elements/cr_action_menu_test.js
@@ -191,7 +191,7 @@ item.classList.add('dropdown-item'); menu.insertBefore(item, items[0]); menu.showAt(dots); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); down(); assertEquals(item, getDeepActiveElement()); @@ -289,12 +289,12 @@ items[1].setAttribute('role', 'checkbox'); menu.showAt(dots); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals('menuitem', items[0].getAttribute('role')); assertEquals('checkbox', items[1].getAttribute('role')); menu.insertBefore(newItem, items[0]); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals('menuitem', newItem.getAttribute('role')); });
diff --git a/chrome/test/data/webui/cr_elements/cr_dialog_test.js b/chrome/test/data/webui/cr_elements/cr_dialog_test.js index f7d43ce4..ffdc908 100644 --- a/chrome/test/data/webui/cr_elements/cr_dialog_test.js +++ b/chrome/test/data/webui/cr_elements/cr_dialog_test.js
@@ -348,7 +348,7 @@ const bottomShadow = dialog.$$('#cr-container-shadow-bottom'); assertTrue(!!bottomShadow); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { assertFalse(topShadow.classList.contains('has-shadow')); assertFalse(bottomShadow.classList.contains('has-shadow')); }); @@ -499,7 +499,7 @@ } document.addEventListener('keydown', assertKeydownNotReached); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { MockInteractions.keyDownOn(dialog, 65, undefined, 'a'); MockInteractions.keyDownOn(document.body, 65, undefined, 'a'); document.removeEventListener('keydown', assertKeydownNotReached); @@ -523,7 +523,7 @@ } document.addEventListener('keydown', assertKeydownCount); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { MockInteractions.keyDownOn(dialog, 65, undefined, 'a'); assertEquals(1, keydownCounter); document.removeEventListener('keydown', assertKeydownCount);
diff --git a/chrome/test/data/webui/cr_elements/cr_elements_focus_test.js b/chrome/test/data/webui/cr_elements/cr_elements_focus_test.js index 4800367..f2b9377 100644 --- a/chrome/test/data/webui/cr_elements/cr_elements_focus_test.js +++ b/chrome/test/data/webui/cr_elements/cr_elements_focus_test.js
@@ -136,6 +136,7 @@ /** @override */ extraLibraries: CrElementsFocusTest.prototype.extraLibraries.concat([ + '../test_util.js', 'cr_icon_button_focus_tests.js', ]), };
diff --git a/chrome/test/data/webui/cr_elements/cr_icon_button_focus_tests.js b/chrome/test/data/webui/cr_elements/cr_icon_button_focus_tests.js index 6d28a034..520c6be 100644 --- a/chrome/test/data/webui/cr_elements/cr_icon_button_focus_tests.js +++ b/chrome/test/data/webui/cr_elements/cr_icon_button_focus_tests.js
@@ -9,7 +9,7 @@ PolymerTest.clearBody(); button = document.createElement('cr-icon-button'); document.body.appendChild(button); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); }); test('focus shows ripple', () => {
diff --git a/chrome/test/data/webui/cr_elements/cr_icon_button_tests.js b/chrome/test/data/webui/cr_elements/cr_icon_button_tests.js index 613f752..eda6b39 100644 --- a/chrome/test/data/webui/cr_elements/cr_icon_button_tests.js +++ b/chrome/test/data/webui/cr_elements/cr_icon_button_tests.js
@@ -9,7 +9,7 @@ PolymerTest.clearBody(); button = document.createElement('cr-icon-button'); document.body.appendChild(button); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); }); test('enabled/disabled', () => { @@ -52,28 +52,28 @@ button.addEventListener('click', clickHandler); button.disabled = true; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); MockInteractions.pressAndReleaseKeyOn(button, -1, [], 'Enter'); MockInteractions.pressAndReleaseKeyOn(button, -1, [], ' '); MockInteractions.downAndUp(button); button.click(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals(0, clickCount); button.disabled = false; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); MockInteractions.pressAndReleaseKeyOn(button, -1, [], 'Enter'); MockInteractions.pressAndReleaseKeyOn(button, -1, [], ' '); MockInteractions.downAndUp(button); button.click(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals(4, clickCount); button.removeEventListener('click', clickHandler); }); test('when tabindex is -1, it stays -1', async () => { document.body.innerHTML = '<cr-icon-button tabindex="-1"></cr-icon-button>'; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); button = document.body.querySelector('cr-icon-button'); assertEquals('-1', button.getAttribute('tabindex')); });
diff --git a/chrome/test/data/webui/cr_elements/cr_slider_test.js b/chrome/test/data/webui/cr_elements/cr_slider_test.js index 7510fc3..5ae98af 100644 --- a/chrome/test/data/webui/cr_elements/cr_slider_test.js +++ b/chrome/test/data/webui/cr_elements/cr_slider_test.js
@@ -11,7 +11,7 @@ crSlider = document.body.querySelector('cr-slider'); crSlider.value = 0; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); /** @param {boolean} expected */
diff --git a/chrome/test/data/webui/cr_elements/cr_tabs_test.js b/chrome/test/data/webui/cr_elements/cr_tabs_test.js index 93dfea3..b4252b6f 100644 --- a/chrome/test/data/webui/cr_elements/cr_tabs_test.js +++ b/chrome/test/data/webui/cr_elements/cr_tabs_test.js
@@ -11,7 +11,7 @@ document.body.innerHTML = `<cr-tabs></cr-tabs>`; tabs = document.querySelector('cr-tabs'); tabs.tabNames = ['tab1', 'tab2', 'tab3']; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); /** @@ -123,7 +123,7 @@ tabs.tabNames = ['tab1', 'tab2']; assertEquals(undefined, tabs.selected); tabs.selected = 0; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertNotEquals(fullyExpanded, underline.style.transform); underline.style.transform = fullyExpanded; const wait = test_util.eventToPromise('transitionend', underline);
diff --git a/chrome/test/data/webui/cr_focus_row_behavior_test.js b/chrome/test/data/webui/cr_focus_row_behavior_test.js index c17b2655..89f9b54 100644 --- a/chrome/test/data/webui/cr_focus_row_behavior_test.js +++ b/chrome/test/data/webui/cr_focus_row_behavior_test.js
@@ -59,10 +59,10 @@ document.body.appendChild(testElement); // Block so that FocusRowBehavior.attached can run. - await PolymerTest.waitAfterNextRender(testElement); + await test_util.waitAfterNextRender(testElement); // Wait one more time to ensure that async setup in FocusRowBehavior has // executed. - await PolymerTest.waitAfterNextRender(testElement); + await test_util.waitAfterNextRender(testElement); }); test('item passes focus to first focusable child', function() {
diff --git a/chrome/test/data/webui/extensions/kiosk_mode_test.js b/chrome/test/data/webui/extensions/kiosk_mode_test.js index ff47705..6af25ba 100644 --- a/chrome/test/data/webui/extensions/kiosk_mode_test.js +++ b/chrome/test/data/webui/extensions/kiosk_mode_test.js
@@ -73,7 +73,7 @@ document.body.appendChild(dialog); return browserProxy.whenCalled('getKioskAppSettings') - .then(() => PolymerTest.flushTasks()); + .then(() => test_util.flushTasks()); } setup(function() {
diff --git a/chrome/test/data/webui/extensions/pack_dialog_test.js b/chrome/test/data/webui/extensions/pack_dialog_test.js index 7888458..4de05a5e 100644 --- a/chrome/test/data/webui/extensions/pack_dialog_test.js +++ b/chrome/test/data/webui/extensions/pack_dialog_test.js
@@ -122,7 +122,7 @@ expectEquals(kRootPath, packDialog.$$('#root-dir').value); packDialog.$$('.action-button').click(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { packDialogAlert = packDialog.$$('extensions-pack-dialog-alert'); @@ -214,7 +214,7 @@ // Make sure "proceed anyway" try to pack extension again. packDialogAlert.$$('.action-button').click(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { // Make sure packExtension is called again with the right params.
diff --git a/chrome/test/data/webui/history/history_browsertest.js b/chrome/test/data/webui/history/history_browsertest.js index 2f325b97..baf4c6f 100644 --- a/chrome/test/data/webui/history/history_browsertest.js +++ b/chrome/test/data/webui/history/history_browsertest.js
@@ -22,6 +22,7 @@ extraLibraries: [ ...PolymerTest.prototype.extraLibraries, + '../test_util.js', 'test_util.js', ], @@ -188,7 +189,6 @@ __proto__: HistoryBrowserTest.prototype, extraLibraries: HistoryBrowserTest.prototype.extraLibraries.concat([ - '../test_util.js', 'history_synced_tabs_test.js', ]), };
diff --git a/chrome/test/data/webui/history/history_drawer_test.js b/chrome/test/data/webui/history/history_drawer_test.js index 018f928..1c73ae9 100644 --- a/chrome/test/data/webui/history/history_drawer_test.js +++ b/chrome/test/data/webui/history/history_drawer_test.js
@@ -12,7 +12,7 @@ test('drawer has correct selection', function() { app.selectedPage_ = 'syncedTabs'; app.hasDrawer_ = true; - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const drawer = /** @type {CrLazyRenderElement} */ (app.$.drawer); let drawerSideBar = app.$$('#drawer-side-bar');
diff --git a/chrome/test/data/webui/history/history_focus_test.js b/chrome/test/data/webui/history/history_focus_test.js index 4e8a3af..f9c1217 100644 --- a/chrome/test/data/webui/history/history_focus_test.js +++ b/chrome/test/data/webui/history/history_focus_test.js
@@ -18,6 +18,7 @@ extraLibraries: [ ...PolymerInteractiveUITest.prototype.extraLibraries, + '../test_util.js', 'test_util.js', ], @@ -51,7 +52,7 @@ toolbar.$['main-toolbar'].narrow = false; historyResult(createHistoryInfo(), []); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { // Ensure the search bar is focused on load. assertTrue( app.$.toolbar.$['main-toolbar'].getSearchField().isSearchFocused()); @@ -62,7 +63,7 @@ toolbar.$['main-toolbar'].narrow = true; historyResult(createHistoryInfo(), []); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { // Ensure the search bar is focused on load. assertFalse($('history-app') .$.toolbar.$['main-toolbar'] @@ -106,14 +107,14 @@ setup(function() { app = replaceApp(); element = app.$.history; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); test('list focus and keyboard nav', async () => { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); let focused; let items; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); Polymer.dom.flush(); items = polymerSelectAll(element, 'history-item'); @@ -122,7 +123,7 @@ // Wait for next render to ensure that focus handlers have been // registered (see HistoryItemElement.attached). - await PolymerTest.waitAfterNextRender(this); + await test_util.waitAfterNextRender(this); MockInteractions.pressAndReleaseKeyOn(focused, 39, [], 'ArrowRight'); Polymer.dom.flush(); @@ -198,7 +199,7 @@ lastFocused = e.currentTarget; }; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { cards = polymerSelectAll(element, 'history-synced-device-card'); @@ -243,7 +244,7 @@ // Remove the second URL from the first card. sessionList[0].windows[0].tabs.splice(1, 1); element.sessionList = sessionList.slice(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { cards = polymerSelectAll(element, 'history-synced-device-card'); @@ -260,7 +261,7 @@ // Remove the second card. sessionList.splice(1, 1); element.sessionList = sessionList.slice(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { cards = polymerSelectAll(element, 'history-synced-device-card');
diff --git a/chrome/test/data/webui/history/history_item_test.js b/chrome/test/data/webui/history/history_item_test.js index 095efe19..46ed251d 100644 --- a/chrome/test/data/webui/history/history_item_test.js +++ b/chrome/test/data/webui/history/history_item_test.js
@@ -46,7 +46,7 @@ }); test('refocus checkbox on click', function() { - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { item.$['menu-button'].focus(); assertEquals(item.$['menu-button'], item.root.activeElement); @@ -76,7 +76,7 @@ test('basic separator insertion', function() { element.addNewResults(TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); // Check that the correct number of time gaps are inserted. const items = element.shadowRoot.querySelectorAll('history-item'); @@ -94,7 +94,7 @@ element.addNewResults(SEARCH_HISTORY_RESULTS); element.searchedTerm = 'search'; - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = element.shadowRoot.querySelectorAll('history-item'); @@ -106,7 +106,7 @@ test('separator insertion after deletion', function() { element.addNewResults(TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = element.shadowRoot.querySelectorAll('history-item'); @@ -125,11 +125,11 @@ test('remove bookmarks', function() { element.addNewResults(TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { element.set('historyData_.1.starred', true); element.set('historyData_.5.starred', true); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { items = element.shadowRoot.querySelectorAll('history-item');
diff --git a/chrome/test/data/webui/history/history_list_test.js b/chrome/test/data/webui/history/history_list_test.js index 1cbbedb..7d9bf3fa 100644 --- a/chrome/test/data/webui/history/history_list_test.js +++ b/chrome/test/data/webui/history/history_list_test.js
@@ -38,7 +38,7 @@ createHistoryInfo(), [createHistoryEntry('2015-01-01', 'http://example.com')]); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { assertEquals(element.historyData_.length, 1); Polymer.dom.flush(); @@ -47,11 +47,11 @@ assertEquals(1, items.length); items[0].$.checkbox.click(); assertDeepEquals([true], element.historyData_.map(i => i.selected)); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { toolbar.deleteSelectedItems(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => new Promise(resolve => { registerMessageCallback('removeVisits', this, resolve); @@ -59,10 +59,10 @@ assertTrue(dialog.open); element.$$('.action-button').click(); })) - .then(PolymerTest.flushTasks) + .then(test_util.flushTasks) .then(function() { deleteComplete(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertEquals(element.historyData_.length, 0); @@ -71,7 +71,7 @@ test('cancelling selection of multiple items', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); @@ -99,7 +99,7 @@ test('selection of multiple items using shift click', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); @@ -159,7 +159,7 @@ test('selection of all items using ctrl + a', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const field = toolbar.$['main-toolbar'].getSearchField(); field.blur(); assertFalse(field.showingSearch); @@ -183,7 +183,7 @@ test('disabling ctrl + a command on syncedTabs page', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); app.selectedPage_ = 'syncedTabs'; - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const field = toolbar.$['main-toolbar'].getSearchField(); field.blur(); assertFalse(field.showingSearch); @@ -200,7 +200,7 @@ test('setting first and last items', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); assertTrue(items[0].isCardStart); @@ -217,7 +217,7 @@ app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); assertTrue(items[3].isCardStart); @@ -234,12 +234,12 @@ test('deleting multiple items from view', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { element.removeItemsByIndex_([2, 5, 7]); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { Polymer.dom.flush(); @@ -264,7 +264,7 @@ [createHistoryEntry('2016-03-15', 'https://www.google.com')]); element.searchedTerm = 'Google'; - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Polymer.dom.flush(); const item = element.$$('history-item'); assertTrue(item.isCardStart); @@ -283,14 +283,14 @@ test('correct display message when no history available', function() { app.historyResult(createHistoryInfo(), []); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { assertFalse(element.$['no-results'].hidden); assertNotEquals('', element.$['no-results'].textContent.trim()); assertTrue(element.$['infinite-list'].hidden); app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertTrue(element.$['no-results'].hidden); @@ -302,7 +302,7 @@ app.queryState_.queryingDisabled = false; app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); let items; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { return new Promise(resolve => { registerMessageCallback('queryHistory', this, resolve); @@ -318,7 +318,7 @@ app.historyResult( createHistoryInfo('www.google.com'), TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertEquals( @@ -341,7 +341,7 @@ for (let i = 0; i < 10; i++) { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); } - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { assertFalse(app.toolbarShadow_); element.$['infinite-list'].scrollToIndex(20); @@ -361,7 +361,7 @@ app.historyResult( createHistoryInfo('ex'), [createHistoryEntry('2016-06-9', 'https://www.example.com')]); - return PolymerTest.flushTasks(20).then(function() { + return test_util.flushTasks(20).then(function() { Polymer.dom.flush(); const item = element.$$('history-item'); item.$.checkbox.click(); @@ -380,7 +380,7 @@ const dialog = element.$.dialog.get(); app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); @@ -389,11 +389,11 @@ items[5].$.checkbox.click(); items[7].$.checkbox.click(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { toolbar.deleteSelectedItems(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => new Promise(resolve => { registerMessageCallback('removeVisits', this, resolve); @@ -402,10 +402,10 @@ assertTrue(dialog.open); element.$$('.action-button').click(); })) - .then(PolymerTest.flushTasks) + .then(test_util.flushTasks) .then(function() { deleteComplete(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertEquals(element.historyData_.length, 5); @@ -429,7 +429,7 @@ test('delete via menu button', function() { app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); let items; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { Polymer.dom.flush(); items = polymerSelectAll(element, 'history-item'); @@ -443,10 +443,10 @@ element.$$('#menuRemoveButton').click(); }); }) - .then(PolymerTest.flushTasks) + .then(test_util.flushTasks) .then(function() { deleteComplete(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertDeepEquals( @@ -468,7 +468,7 @@ app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); const dialog = element.$.dialog.get(); let items; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { Polymer.dom.flush(); items = polymerSelectAll(element, 'history-item'); @@ -476,7 +476,7 @@ // Dialog should not appear when there is no item selected. MockInteractions.pressAndReleaseKeyOn( document.body, 46, '', 'Delete'); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertFalse(dialog.open); @@ -488,7 +488,7 @@ MockInteractions.pressAndReleaseKeyOn( document.body, 46, '', 'Delete'); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertTrue(dialog.open); @@ -497,7 +497,7 @@ MockInteractions.pressAndReleaseKeyOn( document.body, 8, '', 'Backspace'); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertTrue(dialog.open); @@ -524,17 +524,17 @@ app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); app.historyResult(createHistoryInfo(), ADDITIONAL_RESULTS); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item'); items[2].$.checkbox.click(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { toolbar.deleteSelectedItems(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { // Confirmation dialog should appear. @@ -544,7 +544,7 @@ return waitForEvent(window, 'popstate'); }) - .then(PolymerTest.flushTasks) + .then(test_util.flushTasks) .then(function() { assertFalse(element.$.dialog.getIfExists().open); }); @@ -555,7 +555,7 @@ app.historyResult(createHistoryInfo(), [ createHistoryEntry('2016-03-15', fileURL), ]); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { Polymer.dom.flush(); const items = polymerSelectAll(element, 'history-item');
diff --git a/chrome/test/data/webui/history/history_metrics_test.js b/chrome/test/data/webui/history/history_metrics_test.js index 331d17e9..541c826 100644 --- a/chrome/test/data/webui/history/history_metrics_test.js +++ b/chrome/test/data/webui/history/history_metrics_test.js
@@ -49,7 +49,7 @@ /** @override */ deleteItems: function() { - return PolymerTest.flushTasks(); + return test_util.flushTasks(); } }; }); @@ -63,7 +63,7 @@ app = replaceApp(); updateSignInState(false); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); test('History.HistoryPageView', function() { @@ -75,7 +75,7 @@ app.selectedPage_ = 'syncedTabs'; assertEquals(1, histogram[HistoryPageViewHistogram.SIGNIN_PROMO]); updateSignInState(true); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { assertEquals(1, histogram[HistoryPageViewHistogram.SYNCED_TABS]); app.selectedPage_ = 'history'; assertEquals(2, histogram[HistoryPageViewHistogram.HISTORY]); @@ -90,7 +90,7 @@ createHistoryEntry('2015-01-01', 'http://www.example.com'), historyEntry ]); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(() => { const items = polymerSelectAll(app.$.history, 'history-item'); MockInteractions.tap(items[1].$$('#bookmark-star')); @@ -108,7 +108,7 @@ createHistoryEntry('2015-01-01', 'http://www.google.com'), createHistoryEntry('2015-01-01', 'http://www.google.com') ]); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { items = polymerSelectAll(app.$.history, 'history-item'); @@ -118,32 +118,32 @@ assertEquals(1, histogramMap['HistoryPage.ClickPositionSubset'][0]); MockInteractions.tap(items[0].$.checkbox); MockInteractions.tap(items[4].$.checkbox); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { app.$.toolbar.deleteSelectedItems(); assertEquals(1, actionMap['RemoveSelected']); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { MockInteractions.tap(app.$.history.$$('.cancel-button')); assertEquals(1, actionMap['CancelRemoveSelected']); app.$.toolbar.deleteSelectedItems(); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { MockInteractions.tap(app.$.history.$$('.action-button')); assertEquals(1, actionMap['ConfirmRemoveSelected']); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { items = polymerSelectAll(app.$.history, 'history-item'); MockInteractions.tap(items[0].$['menu-button']); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { MockInteractions.tap(app.$.history.$$('#menuRemoveButton')); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { assertEquals(1, histogramMap['HistoryPage.RemoveEntryPosition'][0]); @@ -156,7 +156,7 @@ app.selectedPage_ = 'syncedTabs'; let histogram; let menuButton; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(() => { histogram = histogramMap[SYNCED_TABS_HISTOGRAM_NAME]; assertEquals(1, histogram[SyncedTabsHistogram.INITIALIZED]); @@ -173,11 +173,11 @@ ]), ]; setForeignSessions(sessionList); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { assertEquals(1, histogram[SyncedTabsHistogram.HAS_FOREIGN_DATA]); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { cards = polymerSelectAll( @@ -191,14 +191,14 @@ menuButton = cards[0].$['menu-button']; MockInteractions.tap(menuButton); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { MockInteractions.tap(app.$$('#synced-devices').$$('#menuOpenButton')); assertEquals(1, histogram[SyncedTabsHistogram.OPEN_ALL]); MockInteractions.tap(menuButton); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { MockInteractions.tap(
diff --git a/chrome/test/data/webui/history/history_routing_test.js b/chrome/test/data/webui/history/history_routing_test.js index 4e6e49a..688c781 100644 --- a/chrome/test/data/webui/history/history_routing_test.js +++ b/chrome/test/data/webui/history/history_routing_test.js
@@ -21,13 +21,13 @@ assertEquals('chrome://history/', window.location.href); sidebar = app.$['content-side-bar']; toolbar = app.$['toolbar']; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); test('changing route changes active view', function() { assertEquals('history', app.$.content.selected); navigateTo('/syncedTabs'); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { assertEquals('syncedTabs', app.$.content.selected); assertEquals('chrome://history/syncedTabs', window.location.href); }); @@ -101,7 +101,7 @@ test('search initiated on load', function(done) { const verifyFunction = function(info) { assertEquals(expectedQuery, info[0]); - PolymerTest.flushTasks().then(function() { + test_util.flushTasks().then(function() { assertEquals( expectedQuery, toolbar.$['main-toolbar'].getSearchField().getValue());
diff --git a/chrome/test/data/webui/history/history_supervised_user_test.js b/chrome/test/data/webui/history/history_supervised_user_test.js index 2279f467..1dce58e 100644 --- a/chrome/test/data/webui/history/history_supervised_user_test.js +++ b/chrome/test/data/webui/history/history_supervised_user_test.js
@@ -21,7 +21,7 @@ }); test('checkboxes disabled for supervised user', function() { - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const items = historyList.shadowRoot.querySelectorAll('history-item'); MockInteractions.tap(items[0].$['checkbox']);
diff --git a/chrome/test/data/webui/history/history_synced_tabs_test.js b/chrome/test/data/webui/history/history_synced_tabs_test.js index 9564dd4..70509aec 100644 --- a/chrome/test/data/webui/history/history_synced_tabs_test.js +++ b/chrome/test/data/webui/history/history_synced_tabs_test.js
@@ -39,7 +39,7 @@ [createWindow(['http://www.google.com', 'http://example.com'])])]; setForeignSessions(sessionList); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const card = element.$$('history-synced-device-card'); assertEquals( 'http://www.google.com', @@ -63,7 +63,7 @@ ]; setForeignSessions(sessionList); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const cards = getCards(element); assertEquals(2, cards.length); @@ -84,7 +84,7 @@ setForeignSessions([session1, session2]); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { const session1updated = createSession('Chromebook', [ createWindow(['http://www.example.com', 'http://crbug.com/new']), @@ -94,7 +94,7 @@ setForeignSessions([session1updated, session2]); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { // There should only be two cards. @@ -128,7 +128,7 @@ ]; setForeignSessions(sessionList); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { const cards = getCards(element); assertEquals(2, cards.length); @@ -138,7 +138,7 @@ assertEquals(2, numWindowSeparators(cards[1])); element.searchTerm = 'g'; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { const cards = getCards(element); @@ -160,7 +160,7 @@ .textContent.trim()); element.searchTerm = 'Sans'; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertEquals(0, getCards(element).length); @@ -177,13 +177,13 @@ setForeignSessions(sessionList); - PolymerTest.flushTasks() + test_util.flushTasks() .then(function() { const cards = getCards(element); assertEquals(2, cards.length); MockInteractions.tap(cards[0].$['menu-button']); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { registerMessageCallback('deleteForeignSession', this, function(args) { @@ -192,7 +192,7 @@ // Simulate deleting the first device. setForeignSessions([sessionList[1]]); - PolymerTest.flushTasks().then(function() { + test_util.flushTasks().then(function() { cards = getCards(element); assertEquals(1, cards.length); assertEquals('http://www.badssl.com', cards[0].tabs[0].title); @@ -211,7 +211,7 @@ ]; setForeignSessions(sessionList); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { const cards = getCards(element); MockInteractions.tap(cards[0].$['card-heading']); @@ -219,7 +219,7 @@ // Simulate deleting the first device. setForeignSessions([sessionList[1]]); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { const cards = getCards(element); @@ -242,7 +242,7 @@ done(); }); - PolymerTest.flushTasks().then(function() { + test_util.flushTasks().then(function() { const cards = getCards(element); const anchor = cards[0].root.querySelector('a'); MockInteractions.tap(anchor); @@ -253,7 +253,7 @@ setForeignSessions( [createSession('Chromebook', [createWindow(['https://example.com'])])]); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const cards = getCards(element); MockInteractions.tap(cards[0].$['menu-button']); assertTrue(element.$.menu.getIfExists().open); @@ -262,11 +262,11 @@ test('show sign in promo', function() { element.signInState = false; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { assertFalse(element.$['sign-in-guide'].hidden); element.signInState = true; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { assertTrue(element.$['sign-in-guide'].hidden); @@ -277,7 +277,7 @@ // When user is not logged in, there is no synced tabs. element.signInState = false; element.syncedDevices_ = []; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { assertTrue(element.$['no-synced-tabs'].hidden); @@ -286,7 +286,7 @@ element.signInState = true; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { // When user signs in, first show loading message. @@ -294,7 +294,7 @@ const sessionList = []; setForeignSessions(sessionList); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { cards = getCards(element); @@ -307,7 +307,7 @@ [createWindow(['http://www.google.com', 'http://example.com'])])]; setForeignSessions(sessionList); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { cards = getCards(element); @@ -316,7 +316,7 @@ assertTrue(element.$['no-synced-tabs'].hidden); element.signInState = false; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { // When user signs out, don't show the message. @@ -326,7 +326,7 @@ test('hide sign in promo in guest mode', function() { element.guestSession_ = true; - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { assertTrue(element.$['sign-in-guide'].hidden); }); }); @@ -336,8 +336,7 @@ // Should show no synced tabs message on initial load. Regression test for // https://crbug.com/915641. return Promise - .all( - [PolymerTest.flushTasks(), test_util.waitBeforeNextRender(element)]) + .all([test_util.flushTasks(), test_util.waitBeforeNextRender(element)]) .then(() => { assertNoSyncedTabsMessageShown(element, 'noSyncedResults'); const cards = getCards(element);
diff --git a/chrome/test/data/webui/history/history_toolbar_test.js b/chrome/test/data/webui/history/history_toolbar_test.js index 48eb8b0..6491fa3 100644 --- a/chrome/test/data/webui/history/history_toolbar_test.js +++ b/chrome/test/data/webui/history/history_toolbar_test.js
@@ -17,13 +17,13 @@ app = replaceApp(); element = app.$.history; toolbar = app.$.toolbar; - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); test('selecting checkbox causes toolbar to change', function() { element.addNewResults(TEST_HISTORY_RESULTS); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { const item = element.$$('history-item'); MockInteractions.tap(item.$.checkbox); @@ -58,7 +58,7 @@ test('spinner is active on search', function(done) { app.queryState_.queryingDisabled = false; registerMessageCallback('queryHistory', this, function(info) { - PolymerTest.flushTasks().then(function() { + test_util.flushTasks().then(function() { assertTrue(toolbar.spinnerActive); app.historyResult(createHistoryInfo(), TEST_HISTORY_RESULTS); assertFalse(toolbar.spinnerActive);
diff --git a/chrome/test/data/webui/polymer_browser_test_base.js b/chrome/test/data/webui/polymer_browser_test_base.js index eb41aaed..ad0618c 100644 --- a/chrome/test/data/webui/polymer_browser_test_base.js +++ b/chrome/test/data/webui/polymer_browser_test_base.js
@@ -196,27 +196,3 @@ document.body.appendChild(vulcanizeDiv); } }; - -/* - * Waits for queued up tasks to finish before proceeding. Inspired by: - * https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L97 - */ -PolymerTest.flushTasks = function() { - Polymer.dom.flush(); - // Promises have microtask timing, so we use setTimeout to explicity force a - // new task. - return new Promise(function(resolve, reject) { - window.setTimeout(resolve, 0); - }); -}; - -/** - * @param {!HTMLElement} element - * @return {!Promise} Promise that resolves when an afterNextRender() - * callback on |element| is run. - */ -PolymerTest.waitAfterNextRender = function(element) { - return new Promise(resolve => { - Polymer.RenderStatus.afterNextRender(element, resolve); - }); -};
diff --git a/chrome/test/data/webui/print_preview/key_event_test.js b/chrome/test/data/webui/print_preview/key_event_test.js index b54169f..9845705 100644 --- a/chrome/test/data/webui/print_preview/key_event_test.js +++ b/chrome/test/data/webui/print_preview/key_event_test.js
@@ -108,7 +108,7 @@ const whenKeyEventFired = test_util.eventToPromise('keydown', button); MockInteractions.keyEventOn(button, 'keydown', 'Enter', [], 'Enter'); await whenKeyEventFired; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); assertEquals(0, nativeLayer.getCallCount('print')); });
diff --git a/chrome/test/data/webui/settings/about_page_tests.js b/chrome/test/data/webui/settings/about_page_tests.js index a2831f2..5dfacc0 100644 --- a/chrome/test/data/webui/settings/about_page_tests.js +++ b/chrome/test/data/webui/settings/about_page_tests.js
@@ -416,7 +416,7 @@ aboutBrowserProxy.refreshTPMFirmwareUpdateStatus(); assertFalse(page.$.aboutTPMFirmwareUpdate.hidden); page.$.aboutTPMFirmwareUpdate.click(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); const dialog = page.$$('settings-powerwash-dialog'); assertTrue(!!dialog); assertTrue(dialog.$.dialog.open);
diff --git a/chrome/test/data/webui/settings/advanced_page_browsertest.js b/chrome/test/data/webui/settings/advanced_page_browsertest.js index 5bf9e361..4366542 100644 --- a/chrome/test/data/webui/settings/advanced_page_browsertest.js +++ b/chrome/test/data/webui/settings/advanced_page_browsertest.js
@@ -42,11 +42,7 @@ test('advanced pages', function() { const page = self.basicPage; - let sections = ['privacy', 'languages', 'downloads', 'reset']; - if (cr.isChromeOS) { - sections = sections.concat(['dateTime', 'a11y']); - } - + let sections = ['privacy', 'languages', 'downloads', 'printing', 'reset']; for (let i = 0; i < sections.length; i++) { const section = self.getSection(page, sections[i]); assertTrue(!!section); @@ -58,3 +54,66 @@ // Run all registered tests. mocha.run(); }); + +// TODO(crbug/950007): Remove this when the kSplitSettings flag is on by +// default +GEN('#if defined(OS_CHROMEOS)'); +GEN('#include "chromeos/constants/chromeos_features.h"'); + +/** + * @constructor + * @extends {SettingsPageBrowserTest} + */ +function SettingsAdvancedPageBrowserTestCrOS() {} + +SettingsAdvancedPageBrowserTestCrOS.prototype = { + __proto__: SettingsAdvancedPageBrowserTest.prototype, + + /** @override */ + get featureList() { + return {disabled: ['chromeos::features::kSplitSettings']}; + } +}; + +// Times out on debug builders because the Settings page can take several +// seconds to load in a Release build and several times that in a Debug build. +// See https://crbug.com/558434. +GEN('#if !defined(NDEBUG)'); +GEN('#define MAYBE_Load DISABLED_Load'); +GEN('#else'); +GEN('#define MAYBE_Load Load'); +GEN('#endif'); + +TEST_F('SettingsAdvancedPageBrowserTestCrOS', 'MAYBE_Load', function() { + // Assign |self| to |this| instead of binding since 'this' in suite() + // and test() will be a Mocha 'Suite' or 'Test' instance. + const self = this; + + // Register mocha tests. + suite('SettingsPage', function() { + suiteSetup(function() { + self.toggleAdvanced(); + }); + + test('load page', function() { + // This will fail if there are any asserts or errors in the Settings page. + }); + + test('advanced pages', function() { + const page = self.basicPage; + let sections = [ + 'privacy', 'languages', 'downloads', 'printing', 'reset', 'dateTime', + 'a11y' + ]; + for (let i = 0; i < sections.length; i++) { + const section = self.getSection(page, sections[i]); + assertTrue(!!section); + self.verifySubpagesHidden(section); + } + }); + }); + + // Run all registered tests. + mocha.run(); +}); +GEN('#endif');
diff --git a/chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js b/chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js index 73ca0ef..5d2fb866 100644 --- a/chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js +++ b/chrome/test/data/webui/settings/chromeos/bluetooth_page_tests.js
@@ -242,8 +242,8 @@ // Adding two flushTasks ensures that all events are fully handled after // being fired. - await PolymerTest.flushTasks(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); + await test_util.flushTasks(); } test('pair device', async function() {
diff --git a/chrome/test/data/webui/settings/chromeos/cups_printer_landing_page_tests.js b/chrome/test/data/webui/settings/chromeos/cups_printer_landing_page_tests.js index ec16b9e..1316c948 100644 --- a/chrome/test/data/webui/settings/chromeos/cups_printer_landing_page_tests.js +++ b/chrome/test/data/webui/settings/chromeos/cups_printer_landing_page_tests.js
@@ -486,7 +486,7 @@ createCupsPrinterInfo('test4', '4', 'id4'), ]; - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { nearbyPrintersElement = page.$$('settings-cups-nearby-printers'); assertTrue(!!nearbyPrintersElement); @@ -513,7 +513,7 @@ const automaticPrinterList = [createCupsPrinterInfo('test1', '1', 'id1')]; const discoveredPrinterList = []; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(() => { nearbyPrintersElement = page.$$('settings-cups-nearby-printers'); assertTrue(!!nearbyPrintersElement); @@ -556,7 +556,7 @@ let manufacturerDialog = null; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(() => { nearbyPrintersElement = page.$$('settings-cups-nearby-printers'); assertTrue(!!nearbyPrintersElement); @@ -619,7 +619,7 @@ test('NetworkConnectedButNoInternet', function() { // Simulate connecting to a network with no internet connection. setNetworkConnectionState('wifi1_guid', 'Connected'); - return PolymerTest.flushTasks().then(() => { + return test_util.flushTasks().then(() => { // We require internet to be able to add a new printer. Connecting to // a network without connectivity should be equivalent to not being // connected to a network. @@ -631,7 +631,7 @@ test('checkNetworkConnection', function() { // Simulate disconnecting from a network. setNetworkConnectionState('wifi1_guid', 'NotConnected'); - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(() => { // Expect "Check Connection" text to show up when no internet is // connected. @@ -640,7 +640,7 @@ // Simulate connecting to a network with connectivity. setNetworkConnectionState('wifi1_guid', 'Online'); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(() => { const automaticPrinterList = [
diff --git a/chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js b/chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js index 8626edc..ccfb36e9 100644 --- a/chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js +++ b/chrome/test/data/webui/settings/chromeos/cups_printer_page_tests.js
@@ -99,7 +99,7 @@ * to add a printer. */ test('DiscoveryShowing', function() { - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { // Discovery is showing. assertTrue(dialog.showDiscoveryDialog_); assertTrue(!!dialog.$$('add-printer-discovery-dialog')); @@ -193,7 +193,7 @@ return cupsPrintersBrowserProxy .whenCalled('getCupsPrinterManufacturersList') .then(function() { - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { // Showing model selection. @@ -1105,7 +1105,7 @@ let modelDropdown = null; let urlElement = null; - return PolymerTest.flushTasks() + return test_util.flushTasks() .then(function() { urlElement = dialog.$$('#eulaUrl'); // Check that the EULA text is hidden.
diff --git a/chrome/test/data/webui/settings/chromeos/device_page_tests.js b/chrome/test/data/webui/settings/chromeos/device_page_tests.js index 004d81f7..ea34ee2 100644 --- a/chrome/test/data/webui/settings/chromeos/device_page_tests.js +++ b/chrome/test/data/webui/settings/chromeos/device_page_tests.js
@@ -575,7 +575,7 @@ // Enter on the link shouldn't enable the radio button either. triggerKeyEvents(a, 'Enter', 'Enter'); - PolymerTest.flushTasks(); + test_util.flushTasks(); expectNaturalScrollValue(pointersPage, false); pointersPage.$$('settings-radio-group').selected = ''; @@ -583,7 +583,7 @@ assertTrue(!!falseRadio); assertFalse(falseRadio.checked); triggerKeyEvents(naturalScrollOff, 'Space', ' '); - PolymerTest.flushTasks(); + test_util.flushTasks(); expectNaturalScrollValue(pointersPage, false); }); }); @@ -684,18 +684,18 @@ // Test sliders change when prefs change. set('xkb_auto_repeat_delay_r2', 1500); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals(1500, keyboardPage.$$('#delaySlider').pref.value); set('xkb_auto_repeat_interval_r2', 2000); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals(2000, keyboardPage.$$('#repeatRateSlider').pref.value); // Test sliders round to nearest value when prefs change. set('xkb_auto_repeat_delay_r2', 600); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals(500, keyboardPage.$$('#delaySlider').pref.value); set('xkb_auto_repeat_interval_r2', 45); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); expectEquals(50, keyboardPage.$$('#repeatRateSlider').pref.value); set('xkb_auto_repeat_enabled_r2', false);
diff --git a/chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js b/chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js index 37fe338..5d8b4bb 100644 --- a/chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js +++ b/chrome/test/data/webui/settings/chromeos/fingerprint_browsertest_chromeos.js
@@ -201,7 +201,7 @@ // Verify that by tapping the continue button we should exit the dialog // and the fingerprint list should have one fingerprint registered. dialog.$$('#closeButton').click(); - return PolymerTest.flushTasks().then(function() { + return test_util.flushTasks().then(function() { Promise .all([ browserProxy.whenCalled('startAuthentication'),
diff --git a/chrome/test/data/webui/settings/chromeos/os_about_page_tests.js b/chrome/test/data/webui/settings/chromeos/os_about_page_tests.js index 34fa77c..66ae3f3 100644 --- a/chrome/test/data/webui/settings/chromeos/os_about_page_tests.js +++ b/chrome/test/data/webui/settings/chromeos/os_about_page_tests.js
@@ -384,7 +384,7 @@ aboutBrowserProxy.refreshTPMFirmwareUpdateStatus(); assertFalse(page.$.aboutTPMFirmwareUpdate.hidden); page.$.aboutTPMFirmwareUpdate.click(); - await PolymerTest.flushTasks(); + await test_util.flushTasks(); const dialog = page.$$('os-settings-powerwash-dialog'); assertTrue(!!dialog); assertTrue(dialog.$.dialog.open);
diff --git a/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js b/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js index f440aa8e..f0d1a57 100644 --- a/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js +++ b/chrome/test/data/webui/settings/chromeos/os_advanced_page_browsertest.js
@@ -13,7 +13,7 @@ document.querySelector('os-settings-ui').$$('os-settings-main'); assert(!!settingsMain); settingsMain.advancedToggleExpanded = !settingsMain.advancedToggleExpanded; - await PolymerTest.flushTasks(); + await test_util.flushTasks(); }); function getSection(page, section) {
diff --git a/chrome/test/data/webui/settings/chromeos/os_people_page_test.js b/chrome/test/data/webui/settings/chromeos/os_people_page_test.js index 01e04e2..cd046a74 100644 --- a/chrome/test/data/webui/settings/chromeos/os_people_page_test.js +++ b/chrome/test/data/webui/settings/chromeos/os_people_page_test.js
@@ -27,6 +27,7 @@ isSignedIn: true, unmigrated: false, fullName: 'Primary Account', + pic: 'data:image/png;base64,primaryAccountPicData', email: 'primary@gmail.com', }, { @@ -37,6 +38,7 @@ unmigrated: false, fullName: 'Secondary Account 1', email: 'user1@example.com', + pic: '', }, { id: '789', @@ -46,6 +48,7 @@ unmigrated: false, fullName: 'Secondary Account 2', email: 'user2@example.com', + pic: '', }, ]); } @@ -71,7 +74,7 @@ } } - suite('ProfileInfoTests', function() { + suite('PeoplePageTests', function() { /** @type {SettingsPeoplePageElement} */ let peoplePage = null; /** @type {settings.ProfileInfoBrowserProxy} */ @@ -93,26 +96,24 @@ accountManagerBrowserProxy; PolymerTest.clearBody(); - peoplePage = document.createElement('os-settings-people-page'); - peoplePage.pageVisibility = settings.pageVisibility; - document.body.appendChild(peoplePage); - - return Promise - .all([ - browserProxy.whenCalled('getProfileInfo'), - syncBrowserProxy.whenCalled('getSyncStatus'), - accountManagerBrowserProxy.whenCalled('getAccounts') - ]) - .then(function() { - Polymer.dom.flush(); - }); }); teardown(function() { peoplePage.remove(); }); - test('GetProfileInfo', async function() { + test('Profile name and picture, account manager disabled', async () => { + loadTimeData.overrideValues({ + isAccountManagerEnabled: false, + }); + peoplePage = document.createElement('os-settings-people-page'); + peoplePage.pageVisibility = settings.pageVisibility; + document.body.appendChild(peoplePage); + + await browserProxy.whenCalled('getProfileInfo'); + await syncBrowserProxy.whenCalled('getSyncStatus'); + Polymer.dom.flush(); + assertEquals( browserProxy.fakeProfileInfo.name, peoplePage.$$('#profile-name').textContent.trim()); @@ -129,10 +130,29 @@ 'pushedName', peoplePage.$$('#profile-name').textContent.trim()); const newBg = peoplePage.$$('#profile-icon').style.backgroundImage; assertTrue(newBg.includes(iconDataUrl)); + }); + + test('GAIA name and picture, account manager enabled', async () => { + loadTimeData.overrideValues({ + isAccountManagerEnabled: true, + }); + peoplePage = document.createElement('os-settings-people-page'); + peoplePage.pageVisibility = settings.pageVisibility; + document.body.appendChild(peoplePage); + + await accountManagerBrowserProxy.whenCalled('getAccounts'); + await syncBrowserProxy.whenCalled('getSyncStatus'); + Polymer.dom.flush(); + + chai.assert.include( + peoplePage.$$('#profile-icon').style.backgroundImage, + 'data:image/png;base64,primaryAccountPicData'); + assertEquals( + 'Primary Account', peoplePage.$$('#profile-name').textContent.trim()); // Rather than trying to mock cr.sendWithPromise('getPluralString', ...) // just force an update. - await peoplePage.updateProfileLabel_(); + await peoplePage.updateAccounts_(); assertEquals( 'primary@gmail.com, +2 more accounts', peoplePage.$$('#profile-label').textContent.trim());
diff --git a/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js b/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js index 5effb94..38de4a2 100644 --- a/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js +++ b/chrome/test/data/webui/settings/chromeos/os_settings_browsertest.js
@@ -179,6 +179,7 @@ get extraLibraries() { return super.extraLibraries.concat([ '//ui/webui/resources/js/assert.js', + BROWSER_SETTINGS_PATH + '../test_util.js', BROWSER_SETTINGS_PATH + '../fake_chrome_event.js', 'fake_bluetooth.js', 'fake_bluetooth_private.js', @@ -251,6 +252,7 @@ get extraLibraries() { return super.extraLibraries.concat([ '//ui/webui/resources/js/assert.js', + BROWSER_SETTINGS_PATH + '../test_util.js', BROWSER_SETTINGS_PATH + '../fake_chrome_event.js', BROWSER_SETTINGS_PATH + 'fake_settings_private.js', 'fake_system_display.js', @@ -294,6 +296,7 @@ /** @override */ get extraLibraries() { return super.extraLibraries.concat([ + BROWSER_SETTINGS_PATH + '../test_util.js', BROWSER_SETTINGS_PATH + '../test_browser_proxy.js', 'fingerprint_browsertest_chromeos.js', ]); @@ -382,7 +385,8 @@ } }; -TEST_F('OSSettingsInternetPageTest', 'InternetPage', () => { +// Flaky on linux-chromeos-rel builder. https://crbug.com/992116 +TEST_F('OSSettingsInternetPageTest', 'DISABLED_InternetPage', () => { mocha.run(); });
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js index c6991f9f..0d93e79 100644 --- a/chrome/test/data/webui/settings/cr_settings_browsertest.js +++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -48,6 +48,25 @@ }, }; +GEN('#if defined(OS_CHROMEOS)'); +/** + * Test fixture for Polymer Settings elements that are used on ChromeOS. + * @constructor + * @extends {PolymerTest} + */ +// TODO(crbug/950007): Remove this when kSplitSettings is enabled by default. +function CrSettingsBrowserTestCrOS() {} + +CrSettingsBrowserTestCrOS.prototype = { + __proto__: CrSettingsBrowserTest.prototype, + + /** @override */ + get featureList() { + return {disabled: ['chromeos::features::kSplitSettings']}; + }, +}; +GEN('#endif // defined(OS_CHROMEOS)'); + // Have to include command_line.h manually due to GEN calls below. GEN('#include "base/command_line.h"'); @@ -232,18 +251,18 @@ * Test fixture for * chrome/browser/resources/settings/app_management/app_management_page.html * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsAppManagementPageTest() {} CrSettingsAppManagementPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/app_management_page_test.js', 'test_open_window_proxy.js', @@ -283,7 +302,8 @@ ]), }; -TEST_F('CrSettingsAutofillPageTest', 'All', function() { +// TODO(https://crbug.com/979553) Disabled due to failures . +TEST_F('CrSettingsAutofillPageTest', 'DISABLED_All', function() { mocha.run(); }); @@ -371,7 +391,8 @@ ]), }; -TEST_F('CrSettingsPasswordsSectionTest', 'All', function() { +// TODO(https://crbug.com/979553) Disabled due to failures . +TEST_F('CrSettingsPasswordsSectionTest', 'DISABLED_All', function() { mocha.run(); }); @@ -400,7 +421,8 @@ ]), }; -TEST_F('CrSettingsPasswordsSectionTest_Cros', 'All', function() { +// TODO(https://crbug.com/979553) Disabled due to failures . +TEST_F('CrSettingsPasswordsSectionTest_Cros', 'DISABLED_All', function() { mocha.run(); }); GEN('#endif // defined(OS_CHROMEOS)'); @@ -470,18 +492,18 @@ * chrome/browser/resources/settings/people_page/lock_screen.html * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPeoplePageLockScreenTest() {} CrSettingsPeoplePageLockScreenTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/lock_screen.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../fake_chrome_event.js', 'chromeos/fake_quick_unlock_private.js', 'fake_settings_private.js', @@ -502,18 +524,18 @@ * * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPeoplePageSetupPinDialogTest() {} CrSettingsPeoplePageSetupPinDialogTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/setup_pin_dialog.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../fake_chrome_event.js', 'chromeos/fake_quick_unlock_private.js', 'fake_settings_private.js', 'chromeos/fake_quick_unlock_uma.js', 'chromeos/quick_unlock_authenticate_browsertest_chromeos.js' @@ -531,18 +553,19 @@ * * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsFingerprintListTest() {} CrSettingsFingerprintListTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/fingerprint_list.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ + '../test_util.js', '../test_browser_proxy.js', 'chromeos/fingerprint_browsertest_chromeos.js', ]), @@ -557,18 +580,18 @@ * chrome/browser/resources/settings/people_page/change_picture.html. * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPeoplePageChangePictureTest() {} CrSettingsPeoplePageChangePictureTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/change_picture.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/people_page_change_picture_test.js', ]), @@ -584,12 +607,12 @@ * * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPeoplePageAccountManagerTest() {} CrSettingsPeoplePageAccountManagerTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/account_manager.html', @@ -598,7 +621,7 @@ featureList: {enabled: ['chromeos::features::kAccountManager']}, /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/people_page_account_manager_test.js', ]), @@ -614,18 +637,18 @@ * * This is ChromeOS only. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPeoplePageKerberosAccountsTest() {} CrSettingsPeoplePageKerberosAccountsTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/people_page/kerberos_accounts.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/people_page_kerberos_accounts_test.js', ]), @@ -1583,19 +1606,20 @@ /** * Test fixture for device-page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsDevicePageTest() {} CrSettingsDevicePageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/device_page/device_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/assert.js', + '../test_util.js', '../fake_chrome_event.js', 'fake_settings_private.js', 'chromeos/fake_system_display.js', @@ -1630,20 +1654,21 @@ /** * Test fixture for device-page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsBluetoothPageTest() {} CrSettingsBluetoothPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/bluetooth_page/bluetooth_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/assert.js', '../fake_chrome_event.js', + '../test_util.js', 'chromeos/fake_bluetooth.js', 'chromeos/fake_bluetooth_private.js', 'chromeos/bluetooth_page_tests.js', @@ -1657,18 +1682,18 @@ /** * Test fixture for settings-internet-page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsInternetPageTest() {} CrSettingsInternetPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/internet_page/internet_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '//ui/webui/resources/js/assert.js', '../fake_chrome_event.js', @@ -1686,18 +1711,18 @@ /** * Test fixture for settings-internet-detail-page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsInternetDetailPageTest() {} CrSettingsInternetDetailPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/internet_page/internet_detail_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '//ui/webui/resources/js/assert.js', '//ui/webui/resources/js/util.js', @@ -2117,6 +2142,7 @@ browsePreload: 'chrome://settings/privacy_page/privacy_page.html', extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + '../test_util.js', '../test_browser_proxy.js', 'test_privacy_page_browser_proxy.js', 'metrics_reporting_tests.js', @@ -2134,18 +2160,18 @@ /** * Test fixture for the Smb Shares page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsSmbPageTest() {} CrSettingsSmbPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/downloads_page/smb_shares_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ 'test_util.js', '../test_browser_proxy.js', 'chromeos/smb_shares_page_tests.js', @@ -2159,19 +2185,19 @@ /** * Test fixture for the multidevice settings subpage feature item. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsMultideviceFeatureItemTest() {} CrSettingsMultideviceFeatureItemTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/multidevice_page/multidevice_feature_item.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ 'chromeos/multidevice_feature_item_tests.js', ]), }; @@ -2183,19 +2209,19 @@ /** * Test fixture for the multidevice settings subpage feature toggle. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsMultideviceFeatureToggleTest() {} CrSettingsMultideviceFeatureToggleTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/multidevice_page/multidevice_feature_toggle.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ 'chromeos/multidevice_feature_toggle_tests.js', ]), }; @@ -2207,18 +2233,18 @@ /** * Test fixture for the multidevice settings page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsMultidevicePageTest() {} CrSettingsMultidevicePageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/multidevice_page/multidevice_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/test_multidevice_browser_proxy.js', 'chromeos/multidevice_page_tests.js', @@ -2232,19 +2258,19 @@ /** * Test fixture for the multidevice Smart Lock subpage. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsMultideviceSmartLockSubpageTest() {} CrSettingsMultideviceSmartLockSubpageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/multidevice_page/multidevice_smartlock_subpage.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/test_multidevice_browser_proxy.js', '../test_util.js', @@ -2259,18 +2285,18 @@ /** * Test fixture for the multidevice settings subpage. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsMultideviceSubpageTest() {} CrSettingsMultideviceSubpageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/multidevice_page/multidevice_subpage.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '../test_browser_proxy.js', 'chromeos/test_multidevice_browser_proxy.js', 'chromeos/multidevice_subpage_tests.js', @@ -2284,12 +2310,12 @@ /** * Test fixture for the Linux for Chromebook (Crostini) page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsCrostiniPageTest() {} CrSettingsCrostiniPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/crostini_page/crostini_page.html', @@ -2297,7 +2323,7 @@ /** @override */ featureList: {enabled: ['features::kCrostini']}, - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'chromeos/test_crostini_browser_proxy.js', @@ -2313,17 +2339,17 @@ /** * Test fixture for the Plugin VM page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsPluginVmPageTest() {} CrSettingsPluginVmPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/plugin_vm_page/plugin_vm_page.html', - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'chromeos/plugin_vm_page_test.js', @@ -2337,17 +2363,17 @@ /** * Test fixture for the Google Play Store (ARC) page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsAndroidAppsPageTest() {} CrSettingsAndroidAppsPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/android_apps_page/android_apps_page.html', - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'chromeos/test_android_apps_browser_proxy.js', @@ -2363,18 +2389,18 @@ /** * Test fixture for the Date and Time page. * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsDateTimePageTest() {} CrSettingsDateTimePageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/date_time_page/date_time_page.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ 'chromeos/date_time_page_tests.js', ]), }; @@ -2385,12 +2411,12 @@ /** * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} */ function CrSettingsGoogleAssistantPageTest() {} CrSettingsGoogleAssistantPageTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: @@ -2402,7 +2428,7 @@ }], /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ '//ui/webui/resources/js/promise_resolver.js', '../test_browser_proxy.js', 'chromeos/google_assistant_page_test.js', @@ -2513,19 +2539,19 @@ /** * Test fixture for the chrome://settings/accounts page * @constructor - * @extends {CrSettingsBrowserTest} + * @extends {CrSettingsBrowserTestCrOS} * TODO(hsuregan): Remove when SplitSettings complete. */ function CrSettingsAddUsersTest() {} CrSettingsAddUsersTest.prototype = { - __proto__: CrSettingsBrowserTest.prototype, + __proto__: CrSettingsBrowserTestCrOS.prototype, /** @override */ browsePreload: 'chrome://settings/accounts.html', /** @override */ - extraLibraries: CrSettingsBrowserTest.prototype.extraLibraries.concat([ + extraLibraries: CrSettingsBrowserTestCrOS.prototype.extraLibraries.concat([ 'chromeos/add_users_tests.js', ]), };
diff --git a/chrome/test/data/webui/settings/metrics_reporting_tests.js b/chrome/test/data/webui/settings/metrics_reporting_tests.js index 10931b4..6a8cb78 100644 --- a/chrome/test/data/webui/settings/metrics_reporting_tests.js +++ b/chrome/test/data/webui/settings/metrics_reporting_tests.js
@@ -25,7 +25,7 @@ let toggled; return testBrowserProxy.whenCalled('getMetricsReporting') .then(function() { - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }) .then(function() { const control = page.$.metricsReportingControl;
diff --git a/chrome/test/data/webui/settings/security_keys_subpage_test.js b/chrome/test/data/webui/settings/security_keys_subpage_test.js index 8204e7cc..4edb111 100644 --- a/chrome/test/data/webui/settings/security_keys_subpage_test.js +++ b/chrome/test/data/webui/settings/security_keys_subpage_test.js
@@ -182,7 +182,21 @@ } } +function assertShown(allDivs, dialog, expectedID) { + assertTrue(allDivs.includes(expectedID)); + + const allShown = + allDivs.filter(id => dialog.$[id].className == 'iron-selected'); + assertEquals(allShown.length, 1); + assertEquals(allShown[0], expectedID); +} + + suite('SecurityKeysResetDialog', function() { + const allDivs = [ + 'initial', 'noReset', 'resetFailed', 'reset2', 'resetSuccess', + 'resetNotAllowed' + ]; let dialog = null; setup(function() { @@ -192,19 +206,6 @@ dialog = document.createElement('settings-security-keys-reset-dialog'); }); - function assertShown(expectedID) { - const allDivs = [ - 'initial', 'noReset', 'resetFailed', 'reset2', 'resetSuccess', - 'resetNotAllowed' - ]; - assertTrue(allDivs.includes(expectedID)); - - const allShown = - allDivs.filter(id => dialog.$[id].className == 'iron-selected'); - assertEquals(allShown.length, 1); - assertEquals(allShown[0], expectedID); - } - function assertComplete() { assertEquals(dialog.$.button.textContent.trim(), 'OK'); assertEquals(dialog.$.button.className, 'action-button'); @@ -218,14 +219,14 @@ test('Initialization', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('reset'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); assertNotComplete(); }); test('Cancel', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('reset'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); assertNotComplete(); dialog.$.button.click(); await browserProxy.whenCalled('close'); @@ -240,7 +241,7 @@ await browserProxy.whenCalled('reset'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('noReset'); + assertShown(allDivs, dialog, 'noReset'); }); test('ImmediateUnknownError', async function() { @@ -251,7 +252,7 @@ await browserProxy.whenCalled('reset'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('resetFailed'); + assertShown(allDivs, dialog, 'resetFailed'); assertTrue( dialog.$.resetFailed.textContent.trim().includes(error.toString())); }); @@ -265,11 +266,11 @@ await browserProxy.whenCalled('reset'); await browserProxy.whenCalled('completeReset'); assertNotComplete(); - assertShown('reset2'); + assertShown(allDivs, dialog, 'reset2'); promiseResolver.resolve(0 /* success */); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('resetSuccess'); + assertShown(allDivs, dialog, 'resetSuccess'); }); test('UnknownError', async function() { @@ -282,7 +283,7 @@ await browserProxy.whenCalled('completeReset'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('resetFailed'); + assertShown(allDivs, dialog, 'resetFailed'); assertTrue( dialog.$.resetFailed.textContent.trim().includes(error.toString())); }); @@ -297,11 +298,15 @@ await browserProxy.whenCalled('completeReset'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('resetNotAllowed'); + assertShown(allDivs, dialog, 'resetNotAllowed'); }); }); suite('SecurityKeysSetPINDialog', function() { + const allDivs = [ + 'initial', 'noPINSupport', 'pinPrompt', 'success', 'error', 'locked', + 'reinsert' + ]; let dialog = null; setup(function() { @@ -311,24 +316,6 @@ dialog = document.createElement('settings-security-keys-set-pin-dialog'); }); - function assertShown(expectedID) { - const allDivs = [ - 'initial', - 'noPINSupport', - 'pinPrompt', - 'success', - 'error', - 'locked', - 'reinsert', - ]; - assertTrue(allDivs.includes(expectedID)); - - const allShown = - allDivs.filter(id => dialog.$[id].className == 'iron-selected'); - assertEquals(allShown.length, 1); - assertEquals(allShown[0], expectedID); - } - function assertComplete() { assertEquals(dialog.$.closeButton.textContent.trim(), 'OK'); assertEquals(dialog.$.closeButton.className, 'action-button'); @@ -344,7 +331,7 @@ test('Initialization', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('startSetPIN'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); assertNotComplete(); }); @@ -362,7 +349,7 @@ await browserProxy.whenCalled('startSetPIN'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown(testCase[1]); + assertShown(allDivs, dialog, testCase[1]); if (testCase[1] == 'error') { // Unhandled error codes display the numeric code. assertTrue( @@ -382,7 +369,7 @@ await browserProxy.whenCalled('startSetPIN'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown('locked'); + assertShown(allDivs, dialog, 'locked'); }); function setPINEntry(inputElement, pinValue) { @@ -424,7 +411,7 @@ [0 /* not yet complete */, null /* no current PIN */]); await uiReady; assertNotComplete(); - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); assertTrue(dialog.$.currentPINEntry.hidden); await setNewPINEntries('123', ''); @@ -449,7 +436,7 @@ setPINResolver.resolve([1 /* complete */, 0 /* success */]); await browserProxy.whenCalled('close'); - assertShown('success'); + assertShown(allDivs, dialog, 'success'); assertComplete(); }); @@ -474,7 +461,7 @@ await browserProxy.whenCalled('setPIN'); await browserProxy.whenCalled('close'); assertComplete(); - assertShown(testCase[1]); + assertShown(allDivs, dialog, testCase[1]); if (testCase[1] == 'error') { // Unhandled error codes display the numeric code. assertTrue( @@ -494,7 +481,7 @@ [0 /* not yet complete */, 2 /* two attempts */]); await uiReady; assertNotComplete(); - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); assertFalse(dialog.$.currentPINEntry.hidden); setChangePINEntries('123', '', ''); @@ -524,7 +511,7 @@ setPINEntry(dialog.$.confirmPIN, '1234'); dialog.$.pinSubmit.click(); let {oldPIN, newPIN} = await browserProxy.whenCalled('setPIN'); - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); assertNotComplete(); assertTrue(dialog.$.pinSubmit.disabled); assertEquals(oldPIN, '4321'); @@ -551,12 +538,13 @@ setPINResolver.resolve([1 /* complete */, 0 /* success */]); await browserProxy.whenCalled('close'); - assertShown('success'); + assertShown(allDivs, dialog, 'success'); assertComplete(); }); }); suite('SecurityKeysCredentialManagement', function() { + const allDivs = ['initial', 'pinPrompt', 'credentials', 'error']; let dialog = null; setup(function() { @@ -567,26 +555,16 @@ 'settings-security-keys-credential-management-dialog'); }); - function assertShown(expectedID) { - const allDivs = ['initial', 'pinPrompt', 'credentials', 'error']; - assertTrue(allDivs.includes(expectedID)); - - const allShown = - allDivs.filter(id => dialog.$[id].className == 'iron-selected'); - assertEquals(allShown.length, 1); - assertEquals(allShown[0], expectedID); - } - test('Initialization', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('startCredentialManagement'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); }); test('Cancel', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('startCredentialManagement'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); dialog.$.cancelButton.click(); await browserProxy.whenCalled('close'); assertFalse(dialog.$.dialog.open); @@ -599,13 +577,13 @@ document.body.appendChild(dialog); await browserProxy.whenCalled('startCredentialManagement'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); startResolver.resolve(); const errorString = 'foo bar baz'; cr.webUIListenerCallback( 'security-keys-credential-management-finished', errorString); - assertShown('error'); + assertShown(allDivs, dialog, 'error'); assertTrue(dialog.$.error.textContent.trim().includes(errorString)); }); @@ -623,14 +601,14 @@ document.body.appendChild(dialog); await browserProxy.whenCalled('startCredentialManagement'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); // Simulate PIN entry. let uiReady = test_util.eventToPromise( 'credential-management-dialog-ready-for-testing', dialog); startCredentialManagementResolver.resolve(); await uiReady; - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); dialog.$.pin.value = '0000'; dialog.$.confirmButton.click(); const pin = await browserProxy.whenCalled('providePIN'); @@ -663,7 +641,7 @@ ]; enumerateResolver.resolve(credentials); await uiReady; - assertShown('credentials'); + assertShown(allDivs, dialog, 'credentials'); assertEquals(dialog.$.credentialList.items, credentials); // Select two of the credentials and delete them. @@ -684,12 +662,13 @@ 'credential-management-dialog-ready-for-testing', dialog); deleteResolver.resolve('foobar' /* localized response message */); await uiReady; - assertShown('error'); + assertShown(allDivs, dialog, 'error'); assertTrue(dialog.$.error.textContent.trim().includes('foobar')); }); }); suite('SecurityKeysBioEnrollment', function() { + const allDivs = ['initial', 'pinPrompt', 'enrollments', 'enroll', 'error']; let dialog = null; setup(function() { @@ -699,27 +678,17 @@ dialog = document.createElement('settings-security-keys-bio-enroll-dialog'); }); - function assertShown(expectedID) { - const allDivs = ['initial', 'pinPrompt', 'enrollments', 'enroll', 'error']; - assertTrue(allDivs.includes(expectedID)); - - const allShown = - allDivs.filter(id => dialog.$[id].className == 'iron-selected'); - assertEquals(allShown.length, 1); - assertEquals(allShown[0], expectedID); - } - test('Initialization', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('startBioEnroll'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); assertFalse(dialog.$.cancelButton.hidden); }); test('Cancel', async function() { document.body.appendChild(dialog); await browserProxy.whenCalled('startBioEnroll'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); dialog.$.cancelButton.click(); await browserProxy.whenCalled('close'); assertFalse(dialog.$.dialog.open); @@ -731,12 +700,12 @@ document.body.appendChild(dialog); await browserProxy.whenCalled('startBioEnroll'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); resolver.resolve(); const errorString = 'foo bar baz'; cr.webUIListenerCallback('security-keys-bio-enroll-error', errorString); - assertShown('error'); + assertShown(allDivs, dialog, 'error'); assertTrue(dialog.$.error.textContent.trim().includes(errorString)); }); @@ -751,14 +720,14 @@ document.body.appendChild(dialog); await browserProxy.whenCalled('startBioEnroll'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); // Simulate PIN entry. let uiReady = test_util.eventToPromise('bio-enroll-dialog-ready-for-testing', dialog); startResolver.resolve(); await uiReady; - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); dialog.$.pin.value = '0000'; dialog.$.okButton.click(); const pin = await browserProxy.whenCalled('providePIN'); @@ -785,7 +754,7 @@ ]; enumerateResolver.resolve(enrollments); await uiReady; - assertShown('enrollments'); + assertShown(allDivs, dialog, 'enrollments'); assertEquals(dialog.$.enrollmentList.items, enrollments); }); @@ -802,14 +771,14 @@ document.body.appendChild(dialog); await browserProxy.whenCalled('startBioEnroll'); - assertShown('initial'); + assertShown(allDivs, dialog, 'initial'); // Simulate PIN entry. let uiReady = test_util.eventToPromise('bio-enroll-dialog-ready-for-testing', dialog); startResolver.resolve(); await uiReady; - assertShown('pinPrompt'); + assertShown(allDivs, dialog, 'pinPrompt'); dialog.$.pin.value = '0000'; dialog.$.okButton.click(); const pin = await browserProxy.whenCalled('providePIN'); @@ -822,7 +791,7 @@ test_util.eventToPromise('bio-enroll-dialog-ready-for-testing', dialog); enumerateResolver.resolve([]); await uiReady; - assertShown('enrollments'); + assertShown(allDivs, dialog, 'enrollments'); assertEquals(dialog.$.enrollmentList.items.length, 0); // Simulate add enrollment. @@ -833,7 +802,7 @@ await browserProxy.whenCalled('startEnrolling'); await uiReady; - assertShown('enroll'); + assertShown(allDivs, dialog, 'enroll'); uiReady = test_util.eventToPromise('bio-enroll-dialog-ready-for-testing', dialog); cr.webUIListenerCallback(
diff --git a/chrome/test/data/webui/settings/settings_slider_tests.js b/chrome/test/data/webui/settings/settings_slider_tests.js index 12311ef..3a91f07 100644 --- a/chrome/test/data/webui/settings/settings_slider_tests.js +++ b/chrome/test/data/webui/settings/settings_slider_tests.js
@@ -24,7 +24,7 @@ }; document.body.appendChild(slider); crSlider = slider.$$('cr-slider'); - return PolymerTest.flushTasks(); + return test_util.flushTasks(); }); function press(key) {
diff --git a/chrome/test/data/webui/tab_strip/tab_list_test.js b/chrome/test/data/webui/tab_strip/tab_list_test.js new file mode 100644 index 0000000..10d1626 --- /dev/null +++ b/chrome/test/data/webui/tab_strip/tab_list_test.js
@@ -0,0 +1,118 @@ +// Copyright 2019 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. + +import 'chrome://tab-strip/tab_list.js'; +import {TabsApiProxy} from 'chrome://tab-strip/tabs_api_proxy.js'; +import {TestTabsApiProxy} from './test_tabs_api_proxy.js'; + +suite('TabList', () => { + let callbackRouter; + let optionsCalled; + let tabList; + let testTabsApiProxy; + + const currentWindow = { + id: 1001, + tabs: [ + { + id: 0, + index: 0, + title: 'Tab 1', + windowId: 1001, + }, + { + id: 1, + index: 1, + title: 'Tab 2', + windowId: 1001, + }, + { + id: 2, + index: 2, + title: 'Tab 3', + windowId: 1001, + }, + ], + }; + + setup(() => { + document.body.innerHTML = ''; + + testTabsApiProxy = new TestTabsApiProxy(); + testTabsApiProxy.setCurrentWindow(currentWindow); + TabsApiProxy.instance_ = testTabsApiProxy; + + callbackRouter = testTabsApiProxy.callbackRouter; + + tabList = document.createElement('tabstrip-tab-list'); + document.body.appendChild(tabList); + return testTabsApiProxy.whenCalled('getCurrentWindow'); + }); + + test('creates a tab element for each tab', () => { + const tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(currentWindow.tabs.length, tabElements.length); + currentWindow.tabs.forEach((tab, index) => { + assertEquals(tabElements[index].tab, tab); + }); + }); + + test('adds a new tab element when a tab is added in same window', () => { + const appendedTab = { + id: 3, + index: 3, + title: 'New tab', + windowId: currentWindow.id, + }; + callbackRouter.onCreated.dispatchEvent(appendedTab); + let tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(currentWindow.tabs.length + 1, tabElements.length); + assertEquals(tabElements[currentWindow.tabs.length].tab, appendedTab); + + const prependedTab = { + id: 4, + index: 0, + title: 'New tab', + windowId: currentWindow.id, + }; + callbackRouter.onCreated.dispatchEvent(prependedTab); + tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(currentWindow.tabs.length + 2, tabElements.length); + assertEquals(tabElements[0].tab, prependedTab); + }); + + test( + 'does not add a new tab element when a tab is added in a different ' + + 'window', + () => { + const newTab = { + index: 3, + title: 'New tab', + windowId: currentWindow.id + 1, + }; + callbackRouter.onCreated.dispatchEvent(newTab); + const tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(currentWindow.tabs.length, tabElements.length); + }); + + test('removes a tab when tab is removed from current window', () => { + const tabToRemove = currentWindow.tabs[0]; + callbackRouter.onRemoved.dispatchEvent(tabToRemove.id, { + windowId: currentWindow.id, + }); + const tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(currentWindow.tabs.length - 1, tabElements.length); + }); + + test('updated a tab with new tab data when a tab is updated', () => { + const tabToUpdate = currentWindow.tabs[0]; + const changeInfo = {title: 'A new title'}; + const updatedTab = Object.assign({}, tabToUpdate, changeInfo); + callbackRouter.onUpdated.dispatchEvent( + tabToUpdate.id, changeInfo, updatedTab); + + const tabElements = tabList.shadowRoot.querySelectorAll('tabstrip-tab'); + assertEquals(tabElements[0].tab, updatedTab); + }); +});
diff --git a/chrome/test/data/webui/tab_strip/tab_strip_browsertest.js b/chrome/test/data/webui/tab_strip/tab_strip_browsertest.js new file mode 100644 index 0000000..a681846a --- /dev/null +++ b/chrome/test/data/webui/tab_strip/tab_strip_browsertest.js
@@ -0,0 +1,44 @@ +// Copyright 2019 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. + +var TabStripBrowserTest = class extends testing.Test { + get isAsync() { + return true; + } + + get webuiHost() { + return 'tab-strip'; + } + + get extraLibraries() { + return [ + '//third_party/mocha/mocha.js', + '//chrome/test/data/webui/mocha_adapter.js', + ]; + } + + get runAccessibilityChecks() { + return false; + } +}; + +var TabStripTabListTest = class extends TabStripBrowserTest { + get browsePreload() { + return 'chrome://test?module=tab_strip/tab_list_test.js'; + } +}; + +TEST_F('TabStripTabListTest', 'All', function() { + mocha.run(); +}); + +var TabStripTabTest = class extends TabStripBrowserTest { + get browsePreload() { + return 'chrome://test?module=tab_strip/tab_test.js'; + } +}; + +TEST_F('TabStripTabTest', 'All', function() { + mocha.run(); +});
diff --git a/chrome/test/data/webui/tab_strip/tab_test.js b/chrome/test/data/webui/tab_strip/tab_test.js new file mode 100644 index 0000000..02543d9f --- /dev/null +++ b/chrome/test/data/webui/tab_strip/tab_test.js
@@ -0,0 +1,33 @@ +// Copyright 2019 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. + +import 'chrome://tab-strip/tab.js'; + +suite('Tab', function() { + let tabElement; + + setup(() => { + document.body.innerHTML = ''; + + tabElement = document.createElement('tabstrip-tab'); + document.body.appendChild(tabElement); + }); + + test('sets the tabindex', () => { + assertEquals(tabElement.getAttribute('tabindex'), '0'); + }); + + test('sets the title', () => { + const expectedTitle = 'My title'; + tabElement.tab = {title: expectedTitle}; + assertEquals( + expectedTitle, + tabElement.shadowRoot.querySelector('#titleText').innerText); + }); + + test('exposes the tab ID to an attribute', () => { + tabElement.tab = {id: 1001}; + assertEquals('1001', tabElement.getAttribute('data-tab-id')); + }); +});
diff --git a/chrome/test/data/webui/tab_strip/test_tabs_api_proxy.js b/chrome/test/data/webui/tab_strip/test_tabs_api_proxy.js new file mode 100644 index 0000000..41a64e8 --- /dev/null +++ b/chrome/test/data/webui/tab_strip/test_tabs_api_proxy.js
@@ -0,0 +1,44 @@ +// Copyright 2019 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. + +import {TestBrowserProxy} from 'chrome://test/test_browser_proxy.m.js'; + +class EventDispatcher { + constructor() { + this.eventListeners_ = []; + } + + addListener(callback) { + this.eventListeners_.push(callback); + } + + dispatchEvent() { + this.eventListeners_.forEach((callback) => { + callback(...arguments); + }); + } +} + +export class TestTabsApiProxy extends TestBrowserProxy { + constructor() { + super(['getCurrentWindow']); + + this.callbackRouter = { + onCreated: new EventDispatcher(), + onRemoved: new EventDispatcher(), + onUpdated: new EventDispatcher(), + }; + + this.currentWindow_; + } + + getCurrentWindow() { + this.methodCalled('getCurrentWindow'); + return Promise.resolve(this.currentWindow_); + } + + setCurrentWindow(currentWindow) { + this.currentWindow_ = currentWindow; + } +}
diff --git a/chrome/test/data/webui/test_util.js b/chrome/test/data/webui/test_util.js index 8191536..6c591287 100644 --- a/chrome/test/data/webui/test_util.js +++ b/chrome/test/data/webui/test_util.js
@@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// clang-format off +// #import {afterNextRender, beforeNextRender, flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +// clang-format on + cr.define('test_util', function() { /** * Observes an HTML attribute and fires a promise when it matches a given @@ -82,10 +86,37 @@ }); } + /** + * @param {!HTMLElement} element + * @return {!Promise} Promise that resolves when an afterNextRender() + * callback on |element| is run. + */ + /* #export */ function waitAfterNextRender(element) { + return new Promise(resolve => { + Polymer.RenderStatus.afterNextRender(element, resolve); + }); + } + + /* + * Waits for queued up tasks to finish before proceeding. Inspired by: + * https://github.com/Polymer/web-component-tester/blob/master/browser/environment/helpers.js#L97 + */ + /* #export */ function flushTasks() { + Polymer.dom.flush(); + // Promises have microtask timing, so we use setTimeout to explicitly force + // a new task. + return new Promise(function(resolve, reject) { + window.setTimeout(resolve, 0); + }); + } + + // #cr_define_end return { eventToPromise: eventToPromise, fakeDataBind: fakeDataBind, + flushTasks: flushTasks, + waitAfterNextRender: waitAfterNextRender, waitBeforeNextRender: waitBeforeNextRender, whenAttributeIs: whenAttributeIs, };
diff --git a/chrome/test/data/webui/usb_internals_browsertest.js b/chrome/test/data/webui/usb_internals_browsertest.js index 5b31d2e..6687fec 100644 --- a/chrome/test/data/webui/usb_internals_browsertest.js +++ b/chrome/test/data/webui/usb_internals_browsertest.js
@@ -41,32 +41,34 @@ ], preLoad: function() { - /** @implements {mojom.UsbInternalsPageHandlerProxy} */ - class FakePageHandlerProxy extends TestBrowserProxy { - constructor() { + /** @implements {mojom.UsbInternalsPageHandlerRemote} */ + class FakePageHandlerRemote extends TestBrowserProxy { + constructor(handle) { super([ 'bindUsbDeviceManagerInterface', 'bindTestInterface', ]); + + this.receiver_ = new mojom.UsbInternalsPageHandlerReceiver(this); + this.receiver_.$.bindHandle(handle); } - async bindUsbDeviceManagerInterface(deviceManagerRequest) { + async bindUsbDeviceManagerInterface(deviceManagerPendingReceiver) { this.methodCalled( - 'bindUsbDeviceManagerInterface', deviceManagerRequest); - this.deviceManager = new FakeDeviceManagerProxy(); - this.deviceManagerBinding_ = - new device.mojom.UsbDeviceManager(this.deviceManager); - this.deviceManagerBinding_.$.bindHandle(deviceManagerRequest.handle); + 'bindUsbDeviceManagerInterface', deviceManagerPendingReceiver); + this.deviceManager = + new FakeDeviceManagerRemote(deviceManagerPendingReceiver); } - async bindTestInterface(testDeviceManagerRequest) { - this.methodCalled('bindTestInterface', testDeviceManagerRequest); + async bindTestInterface(testDeviceManagerPendingReceiver) { + this.methodCalled( + 'bindTestInterface', testDeviceManagerPendingReceiver); } } - /** @implements {device.mojom.UsbDeviceManagerProxy} */ - class FakeDeviceManagerProxy extends TestBrowserProxy { - constructor() { + /** @implements {device.mojom.UsbDeviceManagerRemote} */ + class FakeDeviceManagerRemote extends TestBrowserProxy { + constructor(pendingReceiver) { super([ 'enumerateDevicesAndSetClient', 'getDevice', @@ -76,8 +78,11 @@ 'setClient', ]); + this.receiver_ = new device.mojom.UsbDeviceManagerReceiver(this); + this.receiver_.$.bindHandle(pendingReceiver.handle); + this.devices = []; - this.deviceProxyMap = new Map(); + this.deviceRemoteMap = new Map(); this.addFakeDevice( fakeDeviceInfo(0), createDeviceWithValidDeviceDescriptor()); this.addFakeDevice( @@ -87,19 +92,19 @@ /** * Adds a fake device to this device manager. * @param {!Object} device - * @param {!FakeUsbDeviceProxy} deviceProxy + * @param {!FakeUsbDeviceRemote} deviceRemote */ - addFakeDevice(device, deviceProxy) { + addFakeDevice(device, deviceRemote) { this.devices.push(device); - this.deviceProxyMap.set(device.guid, deviceProxy); + this.deviceRemoteMap.set(device.guid, deviceRemote); } async enumerateDevicesAndSetClient() {} - async getDevice(guid, deviceRequest, deviceClient) { + async getDevice(guid, devicePendingReceiver, deviceClient) { this.methodCalled('getDevice'); - const deviceProxy = this.deviceProxyMap.get(guid); - deviceProxy.router.$.bindHandle(deviceRequest.handle); + const deviceRemote = this.deviceRemoteMap.get(guid); + deviceRemote.router.$.bindHandle(devicePendingReceiver.handle); } async getDevices() { @@ -114,8 +119,8 @@ async setClient() {} } - /** @implements {device.mojom.UsbDeviceProxy} */ - class FakeUsbDeviceProxy extends TestBrowserProxy { + /** @implements {device.mojom.UsbDeviceRemote} */ + class FakeUsbDeviceRemote extends TestBrowserProxy { constructor() { super([ 'open', @@ -209,27 +214,27 @@ * Creates a device with correct descriptors. */ function createDeviceWithValidDeviceDescriptor() { - const deviceProxy = new FakeUsbDeviceProxy(); - deviceProxy.setDeviceDescriptor({ + const deviceRemote = new FakeUsbDeviceRemote(); + deviceRemote.setDeviceDescriptor({ status: device.mojom.UsbTransferStatus.COMPLETED, data: [ 0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x50, 0x10, 0xEF, 0x17, 0x21, 0x03, 0x01, 0x02, 0x00, 0x01 ], }); - return deviceProxy; + return deviceRemote; } /** * Creates a device with too short descriptors. */ function createDeviceWithShortDeviceDescriptor() { - const deviceProxy = new FakeUsbDeviceProxy(); - deviceProxy.setDeviceDescriptor({ + const deviceRemote = new FakeUsbDeviceRemote(); + deviceRemote.setDeviceDescriptor({ status: device.mojom.UsbTransferStatus.SHORT_PACKET, data: [0x12, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x40, 0x50], }); - return deviceProxy; + return deviceRemote; } /** @@ -268,10 +273,7 @@ this.pageHandlerInterceptor = new MojoInterfaceInterceptor( mojom.UsbInternalsPageHandler.$interfaceName); this.pageHandlerInterceptor.oninterfacerequest = (e) => { - this.pageHandler = new FakePageHandlerProxy(); - this.pageHandlerBinding_ = - new mojom.UsbInternalsPageHandler(this.pageHandler); - this.pageHandlerBinding_.$.bindHandle(e.handle); + this.pageHandler = new FakePageHandlerRemote(e.handle); }; this.pageHandlerInterceptor.start();
diff --git a/chrome/test/data/webui/welcome/a11y_tests.js b/chrome/test/data/webui/welcome/a11y_tests.js index d069baa..6a611f44 100644 --- a/chrome/test/data/webui/welcome/a11y_tests.js +++ b/chrome/test/data/webui/welcome/a11y_tests.js
@@ -9,7 +9,7 @@ ]); GEN('#include "chrome/browser/ui/webui/welcome/helpers.h"'); -OnboardingA11y = class extends PolymerTest { +WelcomeA11y = class extends PolymerTest { /** @override */ get browsePreload() { return 'chrome://welcome/'; @@ -17,13 +17,13 @@ /** @override */ get featureList() { - return {enabled: ['welcome::kOnboardingForceEnabled']}; + return {enabled: ['welcome::kForceEnabled']}; } }; -AccessibilityTest.define('OnboardingA11y', { +AccessibilityTest.define('WelcomeA11y', { // Must be unique within the test fixture and cannot have spaces. - name: 'OnboardingFlow', + name: 'WelcomeFlow', // Optional. Configuration for axe-core. Can be used to disable a test. axeOptions: {},
diff --git a/chrome/test/data/webui/welcome/app_chooser_test.js b/chrome/test/data/webui/welcome/app_chooser_test.js index 4bd0318..0bdfb63 100644 --- a/chrome/test/data/webui/welcome/app_chooser_test.js +++ b/chrome/test/data/webui/welcome/app_chooser_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_welcome_app_chooser', function() { +cr.define('welcome_app_chooser', function() { suite('AppChooserTest', function() { const apps = [ {
diff --git a/chrome/test/data/webui/welcome/module_metrics_test.js b/chrome/test/data/webui/welcome/module_metrics_test.js index 4c729898..41b4c51 100644 --- a/chrome/test/data/webui/welcome/module_metrics_test.js +++ b/chrome/test/data/webui/welcome/module_metrics_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_welcome_module_metrics', function() { +cr.define('welcome_module_metrics', function() { suite('ModuleMetricsTest', function() { /** @type {welcome.ModuleMetricsProxy} */ let testMetricsProxy;
diff --git a/chrome/test/data/webui/welcome/navigation_behavior_test.js b/chrome/test/data/webui/welcome/navigation_behavior_test.js index 2542bf5..bf68e33 100644 --- a/chrome/test/data/webui/welcome/navigation_behavior_test.js +++ b/chrome/test/data/webui/welcome/navigation_behavior_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_welcome_navigation_behavior_test', function() { +cr.define('welcome_navigation_behavior_test', function() { suite('NavigationBehaviorTest', function() { let elements = []; let callOrders = [];
diff --git a/chrome/test/data/webui/welcome/nux_ntp_background_test.js b/chrome/test/data/webui/welcome/nux_ntp_background_test.js index 4798026..ec33882 100644 --- a/chrome/test/data/webui/welcome/nux_ntp_background_test.js +++ b/chrome/test/data/webui/welcome/nux_ntp_background_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_ntp_background_test', function() { +cr.define('ntp_background_test', function() { suite('NuxNtpBackgroundTest', function() { /** @type {!Array<!welcome.NtpBackgroundData} */ let backgrounds = [
diff --git a/chrome/test/data/webui/welcome/nux_set_as_default_test.js b/chrome/test/data/webui/welcome/nux_set_as_default_test.js index aedb067..58b720db 100644 --- a/chrome/test/data/webui/welcome/nux_set_as_default_test.js +++ b/chrome/test/data/webui/welcome/nux_set_as_default_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_set_as_default_test', function() { +cr.define('set_as_default_test', function() { suite('SetAsDefaultTest', function() { /** @type {NuxSetAsDefaultElement} */ let testElement;
diff --git a/chrome/test/data/webui/welcome/signin_view_test.js b/chrome/test/data/webui/welcome/signin_view_test.js index dc1af86..c5ce927a 100644 --- a/chrome/test/data/webui/welcome/signin_view_test.js +++ b/chrome/test/data/webui/welcome/signin_view_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_signin_view_test', function() { +cr.define('signin_view_test', function() { suite('SigninViewTest', function() { /** @type {SigninViewElement} */
diff --git a/chrome/test/data/webui/welcome/welcome_app_test.js b/chrome/test/data/webui/welcome/welcome_app_test.js index e4663735..060cc2aa 100644 --- a/chrome/test/data/webui/welcome/welcome_app_test.js +++ b/chrome/test/data/webui/welcome/welcome_app_test.js
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -cr.define('onboarding_welcome_app_test', function() { +cr.define('welcome_app_test', function() { suite('WelcomeAppTest', function() { /** @type {WelcomeAppElement} */
diff --git a/chrome/test/data/webui/welcome/onboarding_welcome_browsertest.js b/chrome/test/data/webui/welcome/welcome_browsertest.js similarity index 70% rename from chrome/test/data/webui/welcome/onboarding_welcome_browsertest.js rename to chrome/test/data/webui/welcome/welcome_browsertest.js index 20e44a8..393c381 100644 --- a/chrome/test/data/webui/welcome/onboarding_welcome_browsertest.js +++ b/chrome/test/data/webui/welcome/welcome_browsertest.js
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -/** @fileoverview Runs the Polymer welcome tests on onboarding-welcome UI. */ +/** @fileoverview Runs the Polymer welcome tests on welcome UI. */ // Polymer BrowserTest fixture. GEN_INCLUDE(['//chrome/test/data/webui/polymer_browser_test_base.js']); GEN('#include "chrome/browser/ui/webui/welcome/helpers.h"'); -/** Test fixture for Polymer onboarding welcome elements. */ -const OnboardingWelcomeBrowserTest = class extends PolymerTest { +/** Test fixture for Polymer welcome elements. */ +const WelcomeBrowserTest = class extends PolymerTest { /** @override */ get browsePreload() { throw 'this is abstract and should be overridden by subclasses'; @@ -24,13 +24,12 @@ /** @override */ get featureList() { - return {enabled: ['welcome::kOnboardingForceEnabled']}; + return {enabled: ['welcome::kForceEnabled']}; } }; // eslint-disable-next-line no-var -var OnboardingWelcomeAppChooserTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeAppChooserTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/google_apps/nux_google_apps.html'; @@ -47,13 +46,12 @@ } }; -TEST_F('OnboardingWelcomeAppChooserTest', 'All', function() { +TEST_F('WelcomeAppChooserTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeWelcomeAppTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeWelcomeAppTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/welcome_app.html'; @@ -71,13 +69,12 @@ } }; -TEST_F('OnboardingWelcomeWelcomeAppTest', 'All', function() { +TEST_F('WelcomeWelcomeAppTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeSigninViewTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeSigninViewTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/signin_view.html'; @@ -92,13 +89,12 @@ } }; -TEST_F('OnboardingWelcomeSigninViewTest', 'All', function() { +TEST_F('WelcomeSigninViewTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeNavigationBehaviorTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeNavigationBehaviorTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/navigation_behavior.html'; @@ -113,13 +109,12 @@ } }; -TEST_F('OnboardingWelcomeNavigationBehaviorTest', 'All', function() { +TEST_F('WelcomeNavigationBehaviorTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeModuleMetricsTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeModuleMetricsTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/shared/module_metrics_proxy.html'; @@ -134,13 +129,12 @@ } }; -TEST_F('OnboardingWelcomeModuleMetricsTest', 'All', function() { +TEST_F('WelcomeModuleMetricsTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeSetAsDefaultTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeSetAsDefaultTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/set_as_default/nux_set_as_default.html'; @@ -156,13 +150,12 @@ } }; -TEST_F('OnboardingWelcomeSetAsDefaultTest', 'All', function() { +TEST_F('WelcomeSetAsDefaultTest', 'All', function() { mocha.run(); }); // eslint-disable-next-line no-var -var OnboardingWelcomeNtpBackgroundTest = - class extends OnboardingWelcomeBrowserTest { +var WelcomeNtpBackgroundTest = class extends WelcomeBrowserTest { /** @override */ get browsePreload() { return 'chrome://welcome/ntp_background/nux_ntp_background.html'; @@ -178,6 +171,6 @@ } }; -TEST_F('OnboardingWelcomeNtpBackgroundTest', 'All', function() { +TEST_F('WelcomeNtpBackgroundTest', 'All', function() { mocha.run(); });
diff --git a/chrome/test/media_router/telemetry/run_benchmark.py b/chrome/test/media_router/telemetry/run_benchmark.py index 6c79661..3d32d62 100644 --- a/chrome/test/media_router/telemetry/run_benchmark.py +++ b/chrome/test/media_router/telemetry/run_benchmark.py
@@ -9,7 +9,7 @@ sys.path.insert(1, media_router_config.TELEMETRY_DIR) -from telemetry import benchmark_runner +from core import benchmark_runner def main(): return benchmark_runner.main(media_router_config.Config(['benchmarks']))
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc index a31338ea5..b280bbf2 100644 --- a/chrome/test/ppapi/ppapi_browsertest.cc +++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -1043,18 +1043,18 @@ kBroadcastDropPipe, kSendToDropPipe, kSendToError, - kDropReceiverPipeOnConstruction, - kDropReceiverPipeOnReceiveMore, + kDropListenerPipeOnConstruction, + kDropListenerPipeOnReceiveMore, kReadError, }; WrappedUDPSocket(FailureType failure_type, network::mojom::NetworkContext* network_context, network::mojom::UDPSocketRequest socket_request, - network::mojom::UDPSocketReceiverPtr socket_receiver) + network::mojom::UDPSocketListenerPtr socket_listener) : failure_type_(failure_type), binding_(this, std::move(socket_request)) { - if (failure_type == FailureType::kDropReceiverPipeOnConstruction) - socket_receiver.reset(); - socket_receiver_ = std::move(socket_receiver); + if (failure_type == FailureType::kDropListenerPipeOnConstruction) + socket_listener.reset(); + socket_listener_ = std::move(socket_listener); network_context->CreateUDPSocket(mojo::MakeRequest(&wrapped_socket_), nullptr); binding_.set_connection_error_handler( @@ -1111,13 +1111,13 @@ wrapped_socket_->LeaveGroup(group_address, std::move(callback)); } void ReceiveMore(uint32_t num_additional_datagrams) override { - if (failure_type_ == FailureType::kDropReceiverPipeOnReceiveMore) { - socket_receiver_.reset(); + if (failure_type_ == FailureType::kDropListenerPipeOnReceiveMore) { + socket_listener_.reset(); return; } if (failure_type_ == FailureType::kReadError) { for (uint32_t i = 0; i < num_additional_datagrams; ++i) { - socket_receiver_->OnReceived(net::ERR_FAILED, base::nullopt, + socket_listener_->OnReceived(net::ERR_FAILED, base::nullopt, base::nullopt); } return; @@ -1154,7 +1154,7 @@ // Deleting |this| before closing the bindings can cause Mojo to DCHECK if // there's a pending callback. binding_.Close(); - socket_receiver_.reset(); + socket_listener_.reset(); delete this; } @@ -1164,7 +1164,7 @@ network::mojom::UDPSocketPtr wrapped_socket_; // Only populated on certain read FailureTypes. - network::mojom::UDPSocketReceiverPtr socket_receiver_; + network::mojom::UDPSocketListenerPtr socket_listener_; DISALLOW_COPY_AND_ASSIGN(WrappedUDPSocket); }; @@ -1173,10 +1173,10 @@ WrappedUDPSocket::FailureType failure_type, network::mojom::NetworkContext* network_context, network::mojom::UDPSocketRequest socket_request, - network::mojom::UDPSocketReceiverPtr socket_receiver) { + network::mojom::UDPSocketListenerPtr socket_listener) { // This will delete itself when one of its Mojo pipes is closed. new WrappedUDPSocket(failure_type, network_context, std::move(socket_request), - std::move(socket_receiver)); + std::move(socket_listener)); } #define RUN_UDP_FAILURE_TEST(test_name, failure_type) \ @@ -1233,13 +1233,13 @@ UDPSocket_ReadFails, WrappedUDPSocket::FailureType::kReadError) UDPSOCKET_FAILURE_TEST( - UDPSocket_DropReceiverPipeOnConstruction, + UDPSocket_DropListenerPipeOnConstruction, UDPSocket_ReadFails, - WrappedUDPSocket::FailureType::kDropReceiverPipeOnConstruction) + WrappedUDPSocket::FailureType::kDropListenerPipeOnConstruction) UDPSOCKET_FAILURE_TEST( - UDPSocket_DropReceiverPipeOnReceiveMore, + UDPSocket_DropListenerPipeOnReceiveMore, UDPSocket_ReadFails, - WrappedUDPSocket::FailureType::kDropReceiverPipeOnReceiveMore) + WrappedUDPSocket::FailureType::kDropListenerPipeOnReceiveMore) // Disallowed socket tests. TEST_PPAPI_NACL_DISALLOWED_SOCKETS(HostResolverPrivateDisallowed)
diff --git a/chrome/utility/BUILD.gn b/chrome/utility/BUILD.gn index 8b076c0..a5582085 100644 --- a/chrome/utility/BUILD.gn +++ b/chrome/utility/BUILD.gn
@@ -95,8 +95,6 @@ "importer/nss_decryptor_win.h", "importer/profile_import_impl.cc", "importer/profile_import_impl.h", - "importer/profile_import_service.cc", - "importer/profile_import_service.h", "importer/safari_importer.h", "importer/safari_importer.mm", ] @@ -137,10 +135,7 @@ libs = [ "esent.lib" ] ldflags += [ "/DELAYLOAD:esent.dll" ] - deps += [ - "//chrome/services/util_win:lib", - "//chrome/services/wifi_util_win:lib", - ] + deps += [ "//chrome/services/util_win:lib" ] } if (is_win || is_mac) { @@ -179,7 +174,7 @@ if (enable_basic_printing) { deps += [ - "//components/services/pdf_compositor/public/cpp:factory", + "//components/services/pdf_compositor", "//components/services/pdf_compositor/public/mojom", ] @@ -220,19 +215,3 @@ ] } } - -if (!is_android) { - source_set("profile_import_manifest") { - sources = [ - "importer/profile_import_manifest.cc", - "importer/profile_import_manifest.h", - ] - - deps = [ - "//base", - "//chrome:strings", - "//chrome/common/importer:interfaces", - "//services/service_manager/public/cpp", - ] - } -}
diff --git a/chrome/utility/DEPS b/chrome/utility/DEPS index ed6ca1f..3c0c005 100644 --- a/chrome/utility/DEPS +++ b/chrome/utility/DEPS
@@ -15,8 +15,6 @@ "+chrome/services/removable_storage_writer", "+chrome/services/util_win/util_win_impl.h", "+chrome/services/util_win/public/mojom", - "+chrome/services/wifi_util_win/wifi_util_win_service.h", - "+chrome/services/wifi_util_win/public/mojom", "+chromeos/assistant/buildflags.h", "+chromeos/services/assistant", "+chromeos/services/ime/ime_service.h", @@ -27,8 +25,7 @@ "+components/payments/content/utility", "+components/safe_browsing/buildflags.h", "+components/services/patch", - "+components/services/pdf_compositor/public/cpp", - "+components/services/pdf_compositor/public/mojom", + "+components/services/pdf_compositor", "+components/services/quarantine/quarantine_service.h", "+components/services/quarantine/public", "+components/services/unzip",
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 87f5f890..7130ecb 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc
@@ -32,8 +32,6 @@ #include "ui/base/buildflags.h" #if !defined(OS_ANDROID) -#include "chrome/utility/importer/profile_import_impl.h" -#include "chrome/utility/importer/profile_import_service.h" #include "services/network/url_request_context_builder_mojo.h" #endif // !defined(OS_ANDROID) @@ -43,15 +41,8 @@ #include "components/services/quarantine/quarantine_service.h" // nogncheck #endif -#if BUILDFLAG(ENABLE_EXTENSIONS) && defined(OS_WIN) -#include "chrome/services/wifi_util_win/public/mojom/constants.mojom.h" -#include "chrome/services/wifi_util_win/wifi_util_win_service.h" -#endif - #if defined(OS_CHROMEOS) #include "chromeos/assistant/buildflags.h" // nogncheck -#include "chromeos/services/ime/ime_service.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #include "chromeos/services/assistant/audio_decoder/assistant_audio_decoder_service.h" // nogncheck @@ -59,12 +50,6 @@ #endif // BUILDFLAG(ENABLE_CROS_LIBASSISTANT) #endif // defined(OS_CHROMEOS) -#if BUILDFLAG(ENABLE_PRINTING) -#include "chrome/common/chrome_content_client.h" -#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h" // nogncheck -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" // nogncheck -#endif - #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN) #include "chrome/services/printing/pdf_to_emf_converter_factory.h" #endif @@ -143,18 +128,6 @@ bool ChromeContentUtilityClient::HandleServiceRequest( const std::string& service_name, service_manager::mojom::ServiceRequest request) { - if (utility_process_running_elevated_) { - // This process is running with elevated privileges. Only handle a limited - // set of service requests in this case. - auto service = MaybeCreateElevatedService(service_name, std::move(request)); - if (service) { - RunServiceAsyncThenTerminateProcess(std::move(service)); - return true; - } - - return false; - } - auto service = MaybeCreateMainThreadService(service_name, std::move(request)); if (service) { RunServiceAsyncThenTerminateProcess(std::move(service)); @@ -168,11 +141,6 @@ ChromeContentUtilityClient::MaybeCreateMainThreadService( const std::string& service_name, service_manager::mojom::ServiceRequest request) { -#if BUILDFLAG(ENABLE_PRINTING) - if (service_name == printing::mojom::kServiceName) - return printing::CreatePdfCompositorService(std::move(request)); -#endif - #if defined(OS_WIN) if (service_name == quarantine::mojom::kServiceName && base::FeatureList::IsEnabled(quarantine::kOutOfProcessQuarantine)) { @@ -181,9 +149,6 @@ #endif // OS_WIN #if !defined(OS_ANDROID) - if (service_name == chrome::mojom::kProfileImportServiceName) - return std::make_unique<ProfileImportService>(std::move(request)); - if (base::FeatureList::IsEnabled(mirroring::features::kMirroringService) && base::FeatureList::IsEnabled(features::kAudioServiceAudioStreams) && service_name == mirroring::mojom::kServiceName) { @@ -193,30 +158,13 @@ #endif #if defined(OS_CHROMEOS) - if (service_name == chromeos::ime::mojom::kServiceName) - return std::make_unique<chromeos::ime::ImeService>(std::move(request)); - #if BUILDFLAG(ENABLE_CROS_LIBASSISTANT) if (service_name == chromeos::assistant::mojom::kAudioDecoderServiceName) { return std::make_unique<chromeos::assistant::AssistantAudioDecoderService>( std::move(request)); } #endif - -#endif // defined(OS_CHROMEOS) - return nullptr; -} - -std::unique_ptr<service_manager::Service> -ChromeContentUtilityClient::MaybeCreateElevatedService( - const std::string& service_name, - service_manager::mojom::ServiceRequest request) { - DCHECK(utility_process_running_elevated_); -#if defined(OS_WIN) && BUILDFLAG(ENABLE_EXTENSIONS) - if (service_name == chrome::mojom::kWifiUtilWinServiceName) - return std::make_unique<WifiUtilWinService>(std::move(request)); #endif - return nullptr; }
diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h index 8b2892c..b04de195 100644 --- a/chrome/utility/chrome_content_utility_client.h +++ b/chrome/utility/chrome_content_utility_client.h
@@ -44,9 +44,6 @@ std::unique_ptr<service_manager::Service> MaybeCreateMainThreadService( const std::string& service_name, service_manager::mojom::ServiceRequest request); - std::unique_ptr<service_manager::Service> MaybeCreateElevatedService( - const std::string& service_name, - service_manager::mojom::ServiceRequest request); #if defined(OS_WIN) && BUILDFLAG(ENABLE_PRINT_PREVIEW) // Last IPC message handler.
diff --git a/chrome/utility/importer/profile_import_impl.cc b/chrome/utility/importer/profile_import_impl.cc index 9c578d4c..98517c09 100644 --- a/chrome/utility/importer/profile_import_impl.cc +++ b/chrome/utility/importer/profile_import_impl.cc
@@ -15,15 +15,27 @@ #include "chrome/utility/importer/importer.h" #include "chrome/utility/importer/importer_creator.h" #include "content/public/utility/utility_thread.h" -#include "mojo/public/cpp/bindings/strong_binding.h" + +#if defined(OS_MACOSX) +#include <stdlib.h> + +#include "chrome/common/importer/firefox_importer_utils.h" +#endif using chrome::mojom::ThreadSafeProfileImportObserverPtr; ProfileImportImpl::ProfileImportImpl( - std::unique_ptr<service_manager::ServiceContextRef> service_ref) - : service_ref_(std::move(service_ref)) {} + mojo::PendingReceiver<chrome::mojom::ProfileImport> receiver) + : receiver_(this, std::move(receiver)) { +#if defined(OS_MACOSX) + std::string dylib_path = GetFirefoxDylibPath().value(); + if (!dylib_path.empty()) + ::setenv("DYLD_FALLBACK_LIBRARY_PATH", dylib_path.c_str(), + 1 /* overwrite */); +#endif +} -ProfileImportImpl::~ProfileImportImpl() {} +ProfileImportImpl::~ProfileImportImpl() = default; void ProfileImportImpl::StartImport( const importer::SourceProfile& source_profile,
diff --git a/chrome/utility/importer/profile_import_impl.h b/chrome/utility/importer/profile_import_impl.h index c969cc5..ebd0986 100644 --- a/chrome/utility/importer/profile_import_impl.h +++ b/chrome/utility/importer/profile_import_impl.h
@@ -12,8 +12,8 @@ #include "base/compiler_specific.h" #include "base/memory/ref_counted.h" #include "chrome/common/importer/profile_import.mojom.h" -#include "mojo/public/cpp/bindings/interface_request.h" -#include "services/service_manager/public/cpp/service_context_ref.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver.h" class ExternalProcessImporterBridge; class Importer; @@ -29,7 +29,7 @@ class ProfileImportImpl : public chrome::mojom::ProfileImport { public: explicit ProfileImportImpl( - std::unique_ptr<service_manager::ServiceContextRef> service_ref); + mojo::PendingReceiver<chrome::mojom::ProfileImport> receiver); ~ProfileImportImpl() override; private: @@ -45,6 +45,8 @@ // The following are used with out of process profile import: void ImporterCleanup(); + mojo::Receiver<chrome::mojom::ProfileImport> receiver_; + // Thread that importer runs on, while ProfileImportThread handles messages // from the browser process. std::unique_ptr<base::Thread> import_thread_; @@ -59,8 +61,6 @@ // Importer of the appropriate type (Firefox, Safari, IE, etc.) scoped_refptr<Importer> importer_; - const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; - DISALLOW_COPY_AND_ASSIGN(ProfileImportImpl); };
diff --git a/chrome/utility/importer/profile_import_manifest.cc b/chrome/utility/importer/profile_import_manifest.cc deleted file mode 100644 index 99eb114..0000000 --- a/chrome/utility/importer/profile_import_manifest.cc +++ /dev/null
@@ -1,30 +0,0 @@ -// Copyright 2019 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/utility/importer/profile_import_manifest.h" - -#include "base/no_destructor.h" -#include "chrome/common/importer/profile_import.mojom.h" -#include "chrome/grit/generated_resources.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -const service_manager::Manifest& GetProfileImportManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .WithServiceName(chrome::mojom::kProfileImportServiceName) - .WithDisplayName(IDS_UTILITY_PROCESS_PROFILE_IMPORTER_NAME) - .WithOptions( - service_manager::ManifestOptionsBuilder() - .WithExecutionMode(service_manager::Manifest::ExecutionMode:: - kOutOfProcessBuiltin) - .WithSandboxType("none") - .WithInstanceSharingPolicy( - service_manager::Manifest::InstanceSharingPolicy:: - kSharedAcrossGroups) - .Build()) - .ExposeCapability("import", service_manager::Manifest::InterfaceList< - chrome::mojom::ProfileImport>()) - .Build()}; - return *manifest; -}
diff --git a/chrome/utility/importer/profile_import_manifest.h b/chrome/utility/importer/profile_import_manifest.h deleted file mode 100644 index eebcb1b..0000000 --- a/chrome/utility/importer/profile_import_manifest.h +++ /dev/null
@@ -1,12 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_MANIFEST_H_ -#define CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -const service_manager::Manifest& GetProfileImportManifest(); - -#endif // CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_MANIFEST_H_
diff --git a/chrome/utility/importer/profile_import_service.cc b/chrome/utility/importer/profile_import_service.cc deleted file mode 100644 index a7572ed..0000000 --- a/chrome/utility/importer/profile_import_service.cc +++ /dev/null
@@ -1,53 +0,0 @@ -// Copyright 2017 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/utility/importer/profile_import_service.h" - -#include "base/bind.h" -#include "build/build_config.h" -#include "chrome/utility/importer/profile_import_impl.h" -#include "mojo/public/cpp/bindings/strong_binding.h" - -#if defined(OS_MACOSX) -#include <stdlib.h> - -#include "chrome/common/importer/firefox_importer_utils.h" -#endif - -namespace { - -void OnProfileImportRequest(service_manager::ServiceKeepalive* keepalive, - chrome::mojom::ProfileImportRequest request) { - mojo::MakeStrongBinding( - std::make_unique<ProfileImportImpl>(keepalive->CreateRef()), - std::move(request)); -} - -} // namespace - -ProfileImportService::ProfileImportService( - service_manager::mojom::ServiceRequest request) - : service_binding_(this, std::move(request)), - service_keepalive_(&service_binding_, base::TimeDelta()) {} - -ProfileImportService::~ProfileImportService() = default; - -void ProfileImportService::OnStart() { - registry_.AddInterface( - base::BindRepeating(&OnProfileImportRequest, &service_keepalive_)); - -#if defined(OS_MACOSX) - std::string dylib_path = GetFirefoxDylibPath().value(); - if (!dylib_path.empty()) - ::setenv("DYLD_FALLBACK_LIBRARY_PATH", dylib_path.c_str(), - 1 /* overwrite */); -#endif -} - -void ProfileImportService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) { - registry_.BindInterface(interface_name, std::move(interface_pipe)); -}
diff --git a/chrome/utility/importer/profile_import_service.h b/chrome/utility/importer/profile_import_service.h deleted file mode 100644 index 40192299..0000000 --- a/chrome/utility/importer/profile_import_service.h +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2017 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. - -#ifndef CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_SERVICE_H_ -#define CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_SERVICE_H_ - -#include "services/service_manager/public/cpp/binder_registry.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/cpp/service_keepalive.h" -#include "services/service_manager/public/mojom/service.mojom.h" - -class ProfileImportService : public service_manager::Service { - public: - explicit ProfileImportService(service_manager::mojom::ServiceRequest request); - ~ProfileImportService() override; - - // Lifescycle events that occur after the service has started to spinup. - void OnStart() override; - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; - - private: - service_manager::ServiceBinding service_binding_; - service_manager::ServiceKeepalive service_keepalive_; - service_manager::BinderRegistry registry_; - - DISALLOW_COPY_AND_ASSIGN(ProfileImportService); -}; - -#endif // CHROME_UTILITY_IMPORTER_PROFILE_IMPORT_SERVICE_H_
diff --git a/chrome/utility/services.cc b/chrome/utility/services.cc index 3b6ed97..522e35a5 100644 --- a/chrome/utility/services.cc +++ b/chrome/utility/services.cc
@@ -15,6 +15,7 @@ #include "components/services/patch/public/mojom/file_patcher.mojom.h" #include "components/services/unzip/public/mojom/unzipper.mojom.h" #include "components/services/unzip/unzipper_impl.h" +#include "content/public/utility/utility_thread.h" #include "device/vr/buildflags/buildflags.h" #include "extensions/buildflags/buildflags.h" #include "mojo/public/cpp/bindings/service_factory.h" @@ -26,6 +27,8 @@ #endif // defined(OS_WIN) #if !defined(OS_ANDROID) +#include "chrome/common/importer/profile_import.mojom.h" +#include "chrome/utility/importer/profile_import_impl.h" #include "services/proxy_resolver/proxy_resolver_factory_impl.h" // nogncheck #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #endif // !defined(OS_ANDROID) @@ -60,6 +63,16 @@ #include "chrome/services/printing/public/mojom/printing_service.mojom.h" #endif +#if BUILDFLAG(ENABLE_PRINTING) +#include "components/services/pdf_compositor/pdf_compositor_impl.h" +#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" +#endif + +#if defined(OS_CHROMEOS) +#include "chromeos/services/ime/ime_service.h" +#include "chromeos/services/ime/public/mojom/input_engine.mojom.h" +#endif + namespace { auto RunFilePatcher(mojo::PendingReceiver<patch::mojom::FilePatcher> receiver) { @@ -83,6 +96,11 @@ return std::make_unique<proxy_resolver::ProxyResolverFactoryImpl>( std::move(receiver)); } + +auto RunProfileImporter( + mojo::PendingReceiver<chrome::mojom::ProfileImport> receiver) { + return std::make_unique<ProfileImportImpl>(std::move(receiver)); +} #endif // !defined(OS_ANDROID) #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_CHROMEOS) @@ -128,6 +146,22 @@ } #endif +#if BUILDFLAG(ENABLE_PRINTING) +auto RunPdfCompositor( + mojo::PendingReceiver<printing::mojom::PdfCompositor> receiver) { + return std::make_unique<printing::PdfCompositorImpl>( + std::move(receiver), true /* initialize_environment */, + content::UtilityThread::Get()->GetIOTaskRunner()); +} +#endif + +#if defined(OS_CHROMEOS) +auto RunImeService( + mojo::PendingReceiver<chromeos::ime::mojom::ImeService> receiver) { + return std::make_unique<chromeos::ime::ImeService>(std::move(receiver)); +} +#endif + } // namespace mojo::ServiceFactory* GetElevatedMainThreadServiceFactory() { @@ -150,6 +184,10 @@ RunFilePatcher, RunUnzipper, +#if !defined(OS_ANDROID) + RunProfileImporter, +#endif + #if defined(OS_WIN) RunWindowsUtility, #endif // defined(OS_WIN) @@ -179,6 +217,14 @@ (BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN)) RunPrintingService, #endif + +#if BUILDFLAG(ENABLE_PRINTING) + RunPdfCompositor, +#endif + +#if defined(OS_CHROMEOS) + RunImeService, +#endif }; // clang-format on return factory.get();
diff --git a/chromecast/BUILD.gn b/chromecast/BUILD.gn index c659981..4048f9bf 100644 --- a/chromecast/BUILD.gn +++ b/chromecast/BUILD.gn
@@ -498,6 +498,7 @@ repack("cast_shell_pak") { sources = [ "$root_gen_dir/chromecast/app/shell_resources.pak", + "$root_gen_dir/chromecast/bindings/bindings_resources.pak", "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", "$root_gen_dir/content/app/strings/content_strings_en-US.pak", "$root_gen_dir/content/content_resources.pak", @@ -515,6 +516,7 @@ deps = [ "//chromecast/app:resources", + "//chromecast/bindings:bindings_resources_grit", "//content:resources", "//content/app/resources", "//content/app/strings",
diff --git a/chromecast/base/device_capabilities_impl_unittest.cc b/chromecast/base/device_capabilities_impl_unittest.cc index 2a427274..1d095e8 100644 --- a/chromecast/base/device_capabilities_impl_unittest.cc +++ b/chromecast/base/device_capabilities_impl_unittest.cc
@@ -12,6 +12,7 @@ #include "base/message_loop/message_loop.h" #include "base/message_loop/message_pump_type.h" #include "base/run_loop.h" +#include "base/single_thread_task_runner.h" #include "base/values.h" #include "chromecast/base/serializers.h" #include "testing/gmock/include/gmock/gmock.h"
diff --git a/chromecast/bindings/BUILD.gn b/chromecast/bindings/BUILD.gn index aac3de1..0e6e6439 100644 --- a/chromecast/bindings/BUILD.gn +++ b/chromecast/bindings/BUILD.gn
@@ -2,16 +2,27 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//tools/grit/grit_rule.gni") + if (is_fuchsia) { import("//build/config/fuchsia/rules.gni") } source_set("named_message_port_connector_resources") { data = [ - "named_message_port_connector.js", + "resources/named_message_port_connector.js", ] } +grit("bindings_resources") { + source = "bindings_resources.grd" + outputs = [ + "grit/resources.h", + "bindings_resources.pak", + ] + resource_ids = "" +} + source_set("bindings_manager") { sources = [ "bindings_manager.cc", @@ -53,6 +64,7 @@ ] deps = [ + ":bindings_resources", "//base", "//chromecast/browser:public", "//mojo/public/cpp/system",
diff --git a/chromecast/bindings/DEPS b/chromecast/bindings/DEPS index c3af71c3..94f4dfe6 100644 --- a/chromecast/bindings/DEPS +++ b/chromecast/bindings/DEPS
@@ -7,4 +7,5 @@ "+net/test", "+third_party/blink/public/common/messaging", "+third_party/blink/public/mojom/messaging", + "+ui/base/resource", ]
diff --git a/chromecast/bindings/bindings_manager_cast.cc b/chromecast/bindings/bindings_manager_cast.cc index ba4251a9c..81c46e92 100644 --- a/chromecast/bindings/bindings_manager_cast.cc +++ b/chromecast/bindings/bindings_manager_cast.cc
@@ -7,24 +7,22 @@ #include <utility> #include <vector> -#include "base/files/file_util.h" #include "base/logging.h" #include "base/macros.h" -#include "base/path_service.h" #include "base/strings/utf_string_conversions.h" +#include "chromecast/bindings/grit/resources.h" #include "mojo/public/cpp/bindings/connector.h" #include "third_party/blink/public/common/messaging/string_message_codec.h" #include "third_party/blink/public/common/messaging/transferable_message.h" #include "third_party/blink/public/common/messaging/transferable_message_mojom_traits.h" #include "third_party/blink/public/mojom/messaging/transferable_message.mojom.h" +#include "ui/base/resource/resource_bundle.h" namespace chromecast { namespace bindings { namespace { -const char kNamedMessagePortConnectorJsPath[] = - FILE_PATH_LITERAL("chromecast/bindings/named_message_port_connector.js"); const char kNamedMessagePortConnectorBindingsId[] = "NAMED_MESSAGE_PORT_CONNECTOR"; const char kControlPortConnectMessage[] = "cast.master.connect"; @@ -32,22 +30,10 @@ } // namespace BindingsManagerCast::BindingsManagerCast() : cast_web_contents_(nullptr) { - // Add the script providing the connection API into the Page. - base::FilePath named_message_port_connector_path; - bool path_service_result = base::PathService::Get( - base::DIR_SOURCE_ROOT, &named_message_port_connector_path); - DCHECK(path_service_result); - - named_message_port_connector_path = - named_message_port_connector_path.AppendASCII( - kNamedMessagePortConnectorJsPath); - - std::string port_connector_js; - CHECK(base::ReadFileToString(named_message_port_connector_path, - &port_connector_js)); - // NamedMessagePortConnector binding will be injected into page first. - AddBinding(kNamedMessagePortConnectorBindingsId, port_connector_js); + AddBinding(kNamedMessagePortConnectorBindingsId, + ui::ResourceBundle::GetSharedInstance().GetRawDataResource( + IDR_PORT_CONNECTOR_JS)); } BindingsManagerCast::~BindingsManagerCast() = default;
diff --git a/chromecast/bindings/bindings_resources.grd b/chromecast/bindings/bindings_resources.grd new file mode 100644 index 0000000..49c6cc3 --- /dev/null +++ b/chromecast/bindings/bindings_resources.grd
@@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<grit latest_public_release="0" current_release="1" output_all_resource_defines="false"> + <outputs> + <output filename="grit/resources.h" type="rc_header"> + <emit emit_type='prepend'></emit> + </output> + <output filename="bindings_resources.pak" type="data_package" /> + </outputs> + <translations /> + <release seq="1"> + <includes> + <include name="IDR_PORT_CONNECTOR_JS" file="resources\named_message_port_connector.js" type="BINDATA" /> + </includes> + </release> +</grit>
diff --git a/chromecast/bindings/named_message_port_connector.js b/chromecast/bindings/resources/named_message_port_connector.js similarity index 100% rename from chromecast/bindings/named_message_port_connector.js rename to chromecast/bindings/resources/named_message_port_connector.js
diff --git a/chromeos/constants/chromeos_features.cc b/chromeos/constants/chromeos_features.cc index 5aa8039c..5fe3b6c7 100644 --- a/chromeos/constants/chromeos_features.cc +++ b/chromeos/constants/chromeos_features.cc
@@ -103,6 +103,9 @@ const base::Feature kEnableMessagesWebPush{"EnableMessagesWebPush", base::FEATURE_ENABLED_BY_DEFAULT}; +// Enables the next generation file manager. +const base::Feature kFilesNG{"FilesNG", base::FEATURE_DISABLED_BY_DEFAULT}; + // Enables the use of Mojo by Chrome-process code to communicate with Power // Manager. In order to use mojo, this feature must be turned on and a callsite // must use PowerManagerMojoClient::Get().
diff --git a/chromeos/constants/chromeos_features.h b/chromeos/constants/chromeos_features.h index 1d318692..2796620 100644 --- a/chromeos/constants/chromeos_features.h +++ b/chromeos/constants/chromeos_features.h
@@ -53,6 +53,7 @@ extern const base::Feature kEnableFileManagerPiexWasm; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kEnableMessagesWebPush; +COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kFilesNG; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kMojoDBusRelay; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const base::Feature kMyFilesVolume; COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
diff --git a/chromeos/constants/chromeos_switches.cc b/chromeos/constants/chromeos_switches.cc index 562b4d4a..2d18917 100644 --- a/chromeos/constants/chromeos_switches.cc +++ b/chromeos/constants/chromeos_switches.cc
@@ -426,6 +426,10 @@ // Interval at which we check for total time on OOBE. const char kOobeTimerInterval[] = "oobe-timer-interval"; +// Url addrress of SAML provider for a SAML public session. +// TODO: Remove when https://crbug.com/984021 is fixed. +const char kPublicAccountsSamlUrl[] = "public-accounts-saml-url"; + // If set to "true", the profile requires policy during restart (policy load // must succeed, otherwise session restart should fail). const char kProfileRequiresPolicy[] = "profile-requires-policy";
diff --git a/chromeos/constants/chromeos_switches.h b/chromeos/constants/chromeos_switches.h index bff4eb4..3edbf1b 100644 --- a/chromeos/constants/chromeos_switches.h +++ b/chromeos/constants/chromeos_switches.h
@@ -170,6 +170,7 @@ COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kOobeSkipPostLogin[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kOobeSkipToLogin[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kOobeTimerInterval[]; +COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kPublicAccountsSamlUrl[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kDisableArcCpuRestriction[]; COMPONENT_EXPORT(CHROMEOS_CONSTANTS) extern const char kProfileRequiresPolicy[];
diff --git a/chromeos/services/cellular_setup/BUILD.gn b/chromeos/services/cellular_setup/BUILD.gn index 73b8d7b7..9b6255f 100644 --- a/chromeos/services/cellular_setup/BUILD.gn +++ b/chromeos/services/cellular_setup/BUILD.gn
@@ -10,8 +10,6 @@ "cellular_setup_base.h", "cellular_setup_impl.cc", "cellular_setup_impl.h", - "cellular_setup_service.cc", - "cellular_setup_service.h", "ota_activator.cc", "ota_activator.h", "ota_activator_impl.cc", @@ -24,8 +22,7 @@ "//chromeos/network", "//chromeos/services/cellular_setup/public/mojom", "//dbus", - "//services/service_manager/public/cpp", - "//services/service_manager/public/mojom", + "//url", ] } @@ -61,7 +58,6 @@ "//chromeos/dbus/shill", "//chromeos/network:test_support", "//chromeos/services/cellular_setup/public/cpp:test_support", - "//services/service_manager/public/cpp/test:test_support", "//testing/gmock", "//testing/gtest", ]
diff --git a/chromeos/services/cellular_setup/DEPS b/chromeos/services/cellular_setup/DEPS index c018135..52282320 100644 --- a/chromeos/services/cellular_setup/DEPS +++ b/chromeos/services/cellular_setup/DEPS
@@ -1,5 +1,4 @@ include_rules = [ "+dbus/object_path.h", - "+mojo/public/cpp/bindings", - "+services/service_manager/public", + "+mojo/public", ]
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl.cc b/chromeos/services/cellular_setup/cellular_setup_impl.cc index db9a3485..86f734c 100644 --- a/chromeos/services/cellular_setup/cellular_setup_impl.cc +++ b/chromeos/services/cellular_setup/cellular_setup_impl.cc
@@ -16,27 +16,6 @@ namespace cellular_setup { -namespace { - -CellularSetupImpl::Factory* g_test_factory = nullptr; - -} // namespace - -// static -std::unique_ptr<CellularSetupBase> CellularSetupImpl::Factory::Create() { - if (g_test_factory) - return g_test_factory->BuildInstance(); - - return base::WrapUnique(new CellularSetupImpl()); -} - -// static -void CellularSetupImpl::Factory::SetFactoryForTesting(Factory* test_factory) { - g_test_factory = test_factory; -} - -CellularSetupImpl::Factory::~Factory() = default; - CellularSetupImpl::CellularSetupImpl() = default; CellularSetupImpl::~CellularSetupImpl() = default;
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl.h b/chromeos/services/cellular_setup/cellular_setup_impl.h index 37862157..e48e9a12 100644 --- a/chromeos/services/cellular_setup/cellular_setup_impl.h +++ b/chromeos/services/cellular_setup/cellular_setup_impl.h
@@ -22,19 +22,10 @@ // pointer back to the client. class CellularSetupImpl : public CellularSetupBase { public: - class Factory { - public: - static std::unique_ptr<CellularSetupBase> Create(); - static void SetFactoryForTesting(Factory* test_factory); - virtual ~Factory(); - virtual std::unique_ptr<CellularSetupBase> BuildInstance() = 0; - }; - + CellularSetupImpl(); ~CellularSetupImpl() override; private: - CellularSetupImpl(); - // mojom::CellularSetup: void StartActivation(mojom::ActivationDelegatePtr delegate, StartActivationCallback callback) override;
diff --git a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc index ad10d254b..d27b84c 100644 --- a/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc +++ b/chromeos/services/cellular_setup/cellular_setup_impl_unittest.cc
@@ -75,7 +75,7 @@ &fake_ota_activator_factory_); shill_clients::InitializeFakes(); NetworkHandler::Initialize(); - cellular_setup_ = CellularSetupImpl::Factory::Create(); + cellular_setup_ = std::make_unique<CellularSetupImpl>(); } void TearDown() override {
diff --git a/chromeos/services/cellular_setup/cellular_setup_service.cc b/chromeos/services/cellular_setup/cellular_setup_service.cc deleted file mode 100644 index 2362d53..0000000 --- a/chromeos/services/cellular_setup/cellular_setup_service.cc +++ /dev/null
@@ -1,37 +0,0 @@ -// Copyright 2019 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 "chromeos/services/cellular_setup/cellular_setup_service.h" - -#include "base/bind.h" -#include "chromeos/services/cellular_setup/cellular_setup_base.h" -#include "chromeos/services/cellular_setup/cellular_setup_impl.h" - -namespace chromeos { - -namespace cellular_setup { - -CellularSetupService::CellularSetupService( - service_manager::mojom::ServiceRequest request) - : service_binding_(this, std::move(request)), - cellular_setup_(CellularSetupImpl::Factory::Create()) {} - -CellularSetupService::~CellularSetupService() = default; - -void CellularSetupService::OnStart() { - registry_.AddInterface( - base::BindRepeating(&CellularSetupBase::BindRequest, - base::Unretained(cellular_setup_.get()))); -} - -void CellularSetupService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) { - registry_.BindInterface(interface_name, std::move(interface_pipe)); -} - -} // namespace cellular_setup - -} // namespace chromeos
diff --git a/chromeos/services/cellular_setup/cellular_setup_service.h b/chromeos/services/cellular_setup/cellular_setup_service.h deleted file mode 100644 index 4d9ee20..0000000 --- a/chromeos/services/cellular_setup/cellular_setup_service.h +++ /dev/null
@@ -1,50 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROMEOS_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_SERVICE_H_ -#define CHROMEOS_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_SERVICE_H_ - -#include <memory> - -#include "base/macros.h" -#include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h" -#include "services/service_manager/public/cpp/binder_registry.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/mojom/service.mojom.h" - -namespace chromeos { - -namespace cellular_setup { - -class CellularSetupBase; - -// Service which provides an implementation for mojom::CellularSetup. This -// service creates one implementation and shares it among all connection -// requests. -class CellularSetupService : public service_manager::Service { - public: - explicit CellularSetupService(service_manager::mojom::ServiceRequest request); - ~CellularSetupService() override; - - private: - // service_manager::Service: - void OnStart() override; - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; - - service_manager::ServiceBinding service_binding_; - service_manager::BinderRegistry registry_; - - std::unique_ptr<CellularSetupBase> cellular_setup_; - - DISALLOW_COPY_AND_ASSIGN(CellularSetupService); -}; - -} // namespace cellular_setup - -} // namespace chromeos - -#endif // CHROMEOS_SERVICES_CELLULAR_SETUP_CELLULAR_SETUP_SERVICE_H_
diff --git a/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc b/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc index 1515e4c..d6e0c50 100644 --- a/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc +++ b/chromeos/services/cellular_setup/cellular_setup_service_unittest.cc
@@ -11,13 +11,10 @@ #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" #include "chromeos/services/cellular_setup/cellular_setup_impl.h" -#include "chromeos/services/cellular_setup/cellular_setup_service.h" #include "chromeos/services/cellular_setup/public/cpp/fake_activation_delegate.h" #include "chromeos/services/cellular_setup/public/cpp/fake_carrier_portal_handler.h" #include "chromeos/services/cellular_setup/public/cpp/fake_cellular_setup.h" #include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h" -#include "chromeos/services/cellular_setup/public/mojom/constants.mojom.h" -#include "services/service_manager/public/cpp/test/test_connector_factory.h" #include "testing/gtest/include/gtest/gtest.h" namespace chromeos { @@ -36,27 +33,6 @@ const char kTestImei[] = "testImei"; const char kTestMdn[] = "testMdn"; -class FakeCellularSetupFactory : public CellularSetupImpl::Factory { - public: - FakeCellularSetupFactory() = default; - ~FakeCellularSetupFactory() override = default; - - FakeCellularSetup* instance() { return instance_; } - - private: - // CellularSetupImpl::Factory: - std::unique_ptr<CellularSetupBase> BuildInstance() override { - EXPECT_FALSE(instance_); - auto instance = std::make_unique<FakeCellularSetup>(); - instance_ = instance.get(); - return instance; - } - - FakeCellularSetup* instance_ = nullptr; - - DISALLOW_COPY_AND_ASSIGN(FakeCellularSetupFactory); -}; - } // namespace class CellularSetupServiceTest : public testing::Test { @@ -66,22 +42,11 @@ // testing::Test: void SetUp() override { - fake_cellular_setup_factory_ = std::make_unique<FakeCellularSetupFactory>(); - CellularSetupImpl::Factory::SetFactoryForTesting( - fake_cellular_setup_factory_.get()); - - service_ = std::make_unique<CellularSetupService>( - connector_factory_.RegisterInstance(mojom::kServiceName)); - - connector_factory_.GetDefaultConnector()->BindInterface( - mojom::kServiceName, &cellular_setup_ptr_); + service_ = std::make_unique<FakeCellularSetup>(); + service_->BindRequest(mojo::MakeRequest(&cellular_setup_ptr_)); cellular_setup_ptr_.FlushForTesting(); } - void TearDown() override { - CellularSetupImpl::Factory::SetFactoryForTesting(nullptr); - } - // Calls StartActivation() and returns the fake CarrierPortalHandler and its // associated InterfacePtr. CarrierPortalHandlerPair CallStartActivation( @@ -184,9 +149,7 @@ std::move(quit_closure).Run(); } - FakeCellularSetup* fake_cellular_setup() { - return fake_cellular_setup_factory_->instance(); - } + FakeCellularSetup* fake_cellular_setup() { return service_.get(); } mojom::ActivationDelegatePtr& GetLastActivationDelegate() { return fake_cellular_setup() @@ -197,9 +160,7 @@ base::test::ScopedTaskEnvironment scoped_task_environment_; - std::unique_ptr<FakeCellularSetupFactory> fake_cellular_setup_factory_; - service_manager::TestConnectorFactory connector_factory_; - std::unique_ptr<CellularSetupService> service_; + std::unique_ptr<FakeCellularSetup> service_; base::Optional<mojom::CarrierPortalHandlerPtr> last_carrier_portal_observer_;
diff --git a/chromeos/services/cellular_setup/public/cpp/BUILD.gn b/chromeos/services/cellular_setup/public/cpp/BUILD.gn index 19240ecc..d8932bd 100644 --- a/chromeos/services/cellular_setup/public/cpp/BUILD.gn +++ b/chromeos/services/cellular_setup/public/cpp/BUILD.gn
@@ -2,19 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -source_set("manifest") { - sources = [ - "manifest.cc", - "manifest.h", - ] - - deps = [ - "//base", - "//chromeos/services/cellular_setup/public/mojom", - "//services/service_manager/public/cpp", - ] -} - static_library("test_support") { testonly = true
diff --git a/chromeos/services/cellular_setup/public/cpp/OWNERS b/chromeos/services/cellular_setup/public/cpp/OWNERS deleted file mode 100644 index be90bb7c..0000000 --- a/chromeos/services/cellular_setup/public/cpp/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -per-file manifest.h=set noparent -per-file manifest.h=file://ipc/SECURITY_OWNERS -per-file manifest.cc=set noparent -per-file manifest.cc=file://ipc/SECURITY_OWNERS \ No newline at end of file
diff --git a/chromeos/services/cellular_setup/public/cpp/manifest.cc b/chromeos/services/cellular_setup/public/cpp/manifest.cc deleted file mode 100644 index ecc9ea8..0000000 --- a/chromeos/services/cellular_setup/public/cpp/manifest.cc +++ /dev/null
@@ -1,31 +0,0 @@ -// Copyright 2019 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 "chromeos/services/cellular_setup/public/cpp/manifest.h" - -#include "base/no_destructor.h" -#include "chromeos/services/cellular_setup/public/mojom/cellular_setup.mojom.h" -#include "chromeos/services/cellular_setup/public/mojom/constants.mojom.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -namespace chromeos { - -namespace cellular_setup { - -const service_manager::Manifest& GetManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .WithServiceName(mojom::kServiceName) - .WithDisplayName("Cellular Setup Service") - .WithOptions(service_manager::ManifestOptionsBuilder().Build()) - .ExposeCapability( - "cellular_setup", - service_manager::Manifest::InterfaceList<mojom::CellularSetup>()) - .Build()}; - return *manifest; -} - -} // namespace cellular_setup - -} // namespace chromeos
diff --git a/chromeos/services/cellular_setup/public/cpp/manifest.h b/chromeos/services/cellular_setup/public/cpp/manifest.h deleted file mode 100644 index 2e9ef65..0000000 --- a/chromeos/services/cellular_setup/public/cpp/manifest.h +++ /dev/null
@@ -1,20 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROMEOS_SERVICES_CELLULAR_SETUP_PUBLIC_CPP_MANIFEST_H_ -#define CHROMEOS_SERVICES_CELLULAR_SETUP_PUBLIC_CPP_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -namespace chromeos { - -namespace cellular_setup { - -const service_manager::Manifest& GetManifest(); - -} // namespace cellular_setup - -} // namespace chromeos - -#endif // CHROMEOS_SERVICES_CELLULAR_SETUP_PUBLIC_CPP_MANIFEST_H_
diff --git a/chromeos/services/cellular_setup/public/mojom/BUILD.gn b/chromeos/services/cellular_setup/public/mojom/BUILD.gn index a14e0c1..03c93dc 100644 --- a/chromeos/services/cellular_setup/public/mojom/BUILD.gn +++ b/chromeos/services/cellular_setup/public/mojom/BUILD.gn
@@ -7,7 +7,6 @@ mojom("mojom") { sources = [ "cellular_setup.mojom", - "constants.mojom", ] public_deps = [
diff --git a/chromeos/services/ime/BUILD.gn b/chromeos/services/ime/BUILD.gn index 9af9f50..6913d1d 100644 --- a/chromeos/services/ime/BUILD.gn +++ b/chromeos/services/ime/BUILD.gn
@@ -34,8 +34,6 @@ "//chromeos/services/ime/public/cpp:rulebased", "//chromeos/services/ime/public/cpp/shared_lib:interfaces", "//chromeos/services/ime/public/mojom", - "//services/service_manager/public/cpp", - "//services/service_manager/public/mojom", ] if (enable_cros_ime_decoder) { @@ -79,8 +77,6 @@ "//chromeos/services/ime/public/mojom", "//mojo/public/cpp/bindings", "//services/network:test_support", - "//services/service_manager/public/cpp", - "//services/service_manager/public/cpp/test:test_support", "//testing/gmock", "//testing/gtest", ]
diff --git a/chromeos/services/ime/DEPS b/chromeos/services/ime/DEPS index 3c4b93f..e0f62929 100644 --- a/chromeos/services/ime/DEPS +++ b/chromeos/services/ime/DEPS
@@ -1,6 +1,5 @@ include_rules = [ "+mojo/public", - "+services/service_manager/public", "+third_party/re2", "+sandbox", "+services/service_manager/sandbox",
diff --git a/chromeos/services/ime/decoder/decoder_engine.cc b/chromeos/services/ime/decoder/decoder_engine.cc index c091a26..d6ba869 100644 --- a/chromeos/services/ime/decoder/decoder_engine.cc +++ b/chromeos/services/ime/decoder/decoder_engine.cc
@@ -6,7 +6,9 @@ #include "base/bind_helpers.h" #include "base/files/file_path.h" +#include "base/files/file_util.h" #include "build/buildflag.h" +#include "chromeos/services/ime/constants.h" #include "chromeos/services/ime/public/cpp/buildflags.h" namespace chromeos { @@ -60,37 +62,43 @@ } // namespace DecoderEngine::DecoderEngine(ImeCrosPlatform* platform) : platform_(platform) { - // TODO(https://crbug.com/837156): Connect utility services for InputEngine - // via connector(). Eg. take advantage of the file and network services to - // download relevant language models required by the decocers to the device. + if (!TryLoadDecoder()) { + LOG(ERROR) << "DecoderEngine INIT FAILED!"; + } +} + +DecoderEngine::~DecoderEngine() {} + +bool DecoderEngine::TryLoadDecoder() { + if (engine_main_entry_) + return true; // Load the decoder library. - base::NativeLibraryLoadError load_error; base::FilePath lib_path(base::GetNativeLibraryName(kDecoderLibName)); library_ = base::ScopedNativeLibrary(lib_path); if (!library_.is_valid()) { - LOG(ERROR) << "Failed to load a decoder shared library, error: " - << library_.GetError()->ToString(); - return; + LOG(ERROR) << "Failed to load decoder shared library from: " << lib_path + << ", error: " << library_.GetError()->ToString(); + return false; } + // Prepare the decoder data directory before initialization. + base::FilePath data_dir(platform_->GetImeUserHomeDir()); + base::CreateDirectory(data_dir.Append(kLanguageDataDirName)); + ImeMainEntryCreateFn createMainEntryFn = reinterpret_cast<ImeMainEntryCreateFn>( library_.GetFunctionPointer(IME_MAIN_ENTRY_CREATE_FN_NAME)); - engine_main_entry_ = createMainEntryFn(platform_); - LOG(ERROR) << "Loaded SO main_entry in DecoderEngine!"; + return true; } -DecoderEngine::~DecoderEngine() {} - bool DecoderEngine::BindRequest( const std::string& ime_spec, mojo::PendingReceiver<mojom::InputChannel> receiver, mojo::PendingRemote<mojom::InputChannel> remote, const std::vector<uint8_t>& extra) { - // If the shared library supports this ime_spec. if (IsImeSupportedByDecoder(ime_spec)) { // Activates an IME engine via the shared library. Passing a // |ClientDelegate| for engine instance created by the shared library to @@ -105,7 +113,7 @@ return false; } - // Otherwise, try the rule-based engine for this ime_spec. + // Otherwise, try the rule-based engine. return InputEngine::BindRequest(ime_spec, std::move(receiver), std::move(remote), extra); } @@ -117,10 +125,13 @@ void DecoderEngine::ProcessMessage(const std::vector<uint8_t>& message, ProcessMessageCallback callback) { + // TODO(https://crbug.com/837156): Set a default protobuf message. std::vector<uint8_t> result; - // TODO(https://crbug.com/837156): Implement the functions below by calling - // the corresponding functions of the shared library loaded. + // Handle message via corresponding functions of loaded decoder. + if (engine_main_entry_) + engine_main_entry_->Process(message.data(), message.size()); + std::move(callback).Run(result); }
diff --git a/chromeos/services/ime/decoder/decoder_engine.h b/chromeos/services/ime/decoder/decoder_engine.h index ea1dbb7..82a84cd 100644 --- a/chromeos/services/ime/decoder/decoder_engine.h +++ b/chromeos/services/ime/decoder/decoder_engine.h
@@ -10,15 +10,10 @@ #include "chromeos/services/ime/public/cpp/shared_lib/interfaces.h" #include "chromeos/services/ime/public/mojom/input_engine.mojom.h" #include "mojo/public/cpp/bindings/binding_set.h" -#include "services/service_manager/public/cpp/connector.h" namespace chromeos { namespace ime { -// TODO(https://crbug.com/837156): Introduce a DecoderAPILibrary class/struct. -// Inside, we define the shared function pointer types which are implemented -// in the decoder shared library. - // An enhanced implementation of the basic InputEngine which allows the input // engine to call a customized transliteration library (aka decoder) to provide // a premium typing experience. @@ -37,7 +32,11 @@ ProcessMessageCallback callback) override; private: - // Returns whether the decoder supports this ime_spec. + // Try to load the decoding functions from some decoder shared library. + // Returns whether loading decoder is successful. + bool TryLoadDecoder(); + + // Returns whether the decoder shared library supports this ime_spec. bool IsImeSupportedByDecoder(const std::string& ime_spec); // Shared library handle of the implementation for input logic with decoders.
diff --git a/chromeos/services/ime/ime_service.cc b/chromeos/services/ime/ime_service.cc index bdb53d7..70b6c34 100644 --- a/chromeos/services/ime/ime_service.cc +++ b/chromeos/services/ime/ime_service.cc
@@ -10,6 +10,9 @@ #include <vector> #include "base/bind.h" +#include "base/files/file_util.h" +#include "base/location.h" +#include "base/sequenced_task_runner.h" #include "build/buildflag.h" #include "chromeos/services/ime/constants.h" #include "chromeos/services/ime/public/cpp/buildflags.h" @@ -31,22 +34,8 @@ } // namespace -ImeService::ImeService( - mojo::PendingReceiver<service_manager::mojom::Service> receiver) - : service_binding_(this, std::move(receiver)) {} - -ImeService::~ImeService() = default; - -void ImeService::OnStart() { - binders_.Add(base::BindRepeating(&ImeService::AddInputEngineManagerReceiver, - base::Unretained(this))); - - binders_.Add(base::BindRepeating( - &ImeService::BindPlatformAccessClientReceiver, base::Unretained(this))); - - manager_receivers_.set_disconnect_handler(base::BindRepeating( - &ImeService::OnConnectionLost, base::Unretained(this))); - +ImeService::ImeService(mojo::PendingReceiver<mojom::ImeService> receiver) + : receiver_(this, std::move(receiver)) { #if BUILDFLAG(ENABLE_CROS_IME_DECODER) input_engine_ = std::make_unique<DecoderEngine>(this); #else @@ -54,11 +43,16 @@ #endif } -void ImeService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle receiver_pipe) { - binders_.TryBind(interface_name, &receiver_pipe); +ImeService::~ImeService() = default; + +void ImeService::SetPlatformAccessProvider( + mojo::PendingRemote<mojom::PlatformAccessProvider> provider) { + platform_access_.Bind(std::move(provider)); +} + +void ImeService::BindInputEngineManager( + mojo::PendingReceiver<mojom::InputEngineManager> receiver) { + manager_receivers_.Add(this, std::move(receiver)); } void ImeService::ConnectToImeEngine( @@ -73,31 +67,6 @@ std::move(callback).Run(bound); } -void ImeService::AddInputEngineManagerReceiver( - mojo::PendingReceiver<mojom::InputEngineManager> receiver) { - manager_receivers_.Add(this, std::move(receiver)); - // TODO(https://crbug.com/837156): Reset the cleanup timer. -} - -void ImeService::BindPlatformAccessClientReceiver( - mojo::PendingReceiver<mojom::PlatformAccessClient> receiver) { - if (!access_receiver_.is_bound()) { - access_receiver_.Bind(std::move(receiver)); - } -} - -void ImeService::SetPlatformAccessProvider( - mojo::PendingRemote<mojom::PlatformAccessProvider> access) { - platform_access_.Bind(std::move(access)); -} - -void ImeService::OnConnectionLost() { - if (manager_receivers_.empty()) { - service_binding_.RequestClose(); - // TODO(https://crbug.com/837156): Set a timer to start a cleanup. - } -} - void ImeService::SimpleDownloadFinished(SimpleDownloadCallback callback, const base::FilePath& file) { if (file.empty()) { @@ -120,16 +89,23 @@ return kUserInputMethodsDirPath; } +void ImeService::RunInMainSequence(ImeSequencedTask task, int task_id) { + // Always run tasks on current SequencedTaskRunner. + // It's necessary for making any call on a bound Mojo Remote. + base::SequencedTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::BindOnce(task, task_id)); +} + int ImeService::SimpleDownloadToFile(const char* url, const char* file_path, SimpleDownloadCallback callback) { if (!platform_access_.is_bound()) { callback(SIMPLE_DOWNLOAD_ERROR_ABORTED, ""); + LOG(ERROR) << "Failed to download due to missing binding."; } else { GURL download_url(url); // |file_path| must be relative. base::FilePath relative_file_path(file_path); - platform_access_->DownloadImeFileTo( download_url, relative_file_path, base::BindOnce(&ImeService::SimpleDownloadFinished,
diff --git a/chromeos/services/ime/ime_service.h b/chromeos/services/ime/ime_service.h index 67377f5..3c05ff31 100644 --- a/chromeos/services/ime/ime_service.h +++ b/chromeos/services/ime/ime_service.h
@@ -10,6 +10,7 @@ #include <utility> #include <vector> +#include "base/files/file_path.h" #include "chromeos/services/ime/input_engine.h" #include "chromeos/services/ime/public/cpp/shared_lib/interfaces.h" #include "chromeos/services/ime/public/mojom/input_engine.mojom.h" @@ -17,29 +18,23 @@ #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/receiver_set.h" -#include "services/service_manager/public/cpp/binder_map.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/mojom/service.mojom.h" namespace chromeos { namespace ime { -class ImeService : public service_manager::Service, +class ImeService : public mojom::ImeService, public mojom::InputEngineManager, - public mojom::PlatformAccessClient, public ImeCrosPlatform { public: - explicit ImeService( - mojo::PendingReceiver<service_manager::mojom::Service> receiver); + explicit ImeService(mojo::PendingReceiver<mojom::ImeService> receiver); ~ImeService() override; private: - // service_manager::Service overrides: - void OnStart() override; - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; + // mojom::ImeService overrides: + void SetPlatformAccessProvider( + mojo::PendingRemote<mojom::PlatformAccessProvider> provider) override; + void BindInputEngineManager( + mojo::PendingReceiver<mojom::InputEngineManager> receiver) override; // mojom::InputEngineManager overrides: void ConnectToImeEngine( @@ -49,10 +44,6 @@ const std::vector<uint8_t>& extra, ConnectToImeEngineCallback callback) override; - // mojom::PlatformAccessClient overrides: - void SetPlatformAccessProvider( - mojo::PendingRemote<mojom::PlatformAccessProvider> access) override; - // ImeCrosPlatform overrides: const char* GetImeBundleDir() override; const char* GetImeGlobalDir() override; @@ -61,25 +52,14 @@ const char* file_path, SimpleDownloadCallback callback) override; ImeCrosDownloader* GetDownloader() override; - - // Adds a mojom::InputEngineManager receiver to this object. - void AddInputEngineManagerReceiver( - mojo::PendingReceiver<mojom::InputEngineManager> receiver); - - // Binds a mojom::PlatformAccessClient receiver to this object. - void BindPlatformAccessClientReceiver( - mojo::PendingReceiver<mojom::PlatformAccessClient> receiver); - - // Handles connection loss to InputEngineManager remote. This should only - // happen when the input engine client exits or crashes. - void OnConnectionLost(); + void RunInMainSequence(ImeSequencedTask task, int task_id) override; // Callback used when a file download finishes by the |SimpleURLLoader|. // On failure, |file| will be empty. void SimpleDownloadFinished(SimpleDownloadCallback callback, const base::FilePath& file); - service_manager::ServiceBinding service_binding_; + mojo::Receiver<mojom::ImeService> receiver_; // For the duration of this service lifetime, there should be only one // input engine instance. @@ -87,12 +67,8 @@ // Platform delegate for access to privilege resources. mojo::Remote<mojom::PlatformAccessProvider> platform_access_; - - mojo::Receiver<mojom::PlatformAccessClient> access_receiver_{this}; mojo::ReceiverSet<mojom::InputEngineManager> manager_receivers_; - service_manager::BinderMap binders_; - DISALLOW_COPY_AND_ASSIGN(ImeService); };
diff --git a/chromeos/services/ime/ime_service_unittest.cc b/chromeos/services/ime/ime_service_unittest.cc index 00a89282..7949abe5 100644 --- a/chromeos/services/ime/ime_service_unittest.cc +++ b/chromeos/services/ime/ime_service_unittest.cc
@@ -6,14 +6,11 @@ #include "base/bind.h" #include "base/strings/utf_string_conversions.h" #include "base/test/scoped_task_environment.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" #include "chromeos/services/ime/public/mojom/input_engine.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/cpp/test/test_connector_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -78,9 +75,7 @@ class ImeServiceTest : public testing::Test { public: - ImeServiceTest() - : service_( - test_connector_factory_.RegisterInstance(mojom::kServiceName)) {} + ImeServiceTest() : service_(remote_service_.BindNewPipeAndPassReceiver()) {} ~ImeServiceTest() override = default; MOCK_METHOD1(SentTextCallback, void(const std::string&)); @@ -88,15 +83,15 @@ protected: void SetUp() override { - test_connector_factory_.GetDefaultConnector()->Connect( - mojom::kServiceName, remote_manager_.BindNewPipeAndPassReceiver()); + remote_service_->BindInputEngineManager( + remote_manager_.BindNewPipeAndPassReceiver()); } + mojo::Remote<mojom::ImeService> remote_service_; mojo::Remote<mojom::InputEngineManager> remote_manager_; private: base::test::ScopedTaskEnvironment task_environment_; - service_manager::TestConnectorFactory test_connector_factory_; ImeService service_; DISALLOW_COPY_AND_ASSIGN(ImeServiceTest);
diff --git a/chromeos/services/ime/public/cpp/BUILD.gn b/chromeos/services/ime/public/cpp/BUILD.gn index a3d6981a..296d746 100644 --- a/chromeos/services/ime/public/cpp/BUILD.gn +++ b/chromeos/services/ime/public/cpp/BUILD.gn
@@ -107,18 +107,3 @@ "rulebased/rulebased_unittest.cc", ] } - -source_set("manifest") { - sources = [ - "manifest.cc", - "manifest.h", - ] - - deps = [ - "//base", - "//chromeos/services/ime/public/cpp:buildflags", - "//chromeos/services/ime/public/mojom", - "//chromeos/strings", - "//services/service_manager/public/cpp", - ] -}
diff --git a/chromeos/services/ime/public/cpp/OWNERS b/chromeos/services/ime/public/cpp/OWNERS deleted file mode 100644 index 6faeaa47..0000000 --- a/chromeos/services/ime/public/cpp/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -per-file manifest.cc=set noparent -per-file manifest.cc=file://ipc/SECURITY_OWNERS -per-file manifest.h=set noparent -per-file manifest.h=file://ipc/SECURITY_OWNERS
diff --git a/chromeos/services/ime/public/cpp/manifest.cc b/chromeos/services/ime/public/cpp/manifest.cc deleted file mode 100644 index 3c6fb60..0000000 --- a/chromeos/services/ime/public/cpp/manifest.cc +++ /dev/null
@@ -1,51 +0,0 @@ -// Copyright 2019 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 "chromeos/services/ime/public/cpp/manifest.h" - -#include "base/no_destructor.h" -#include "build/buildflag.h" -#include "chromeos/services/ime/public/cpp/buildflags.h" -#include "chromeos/services/ime/public/mojom/constants.mojom.h" -#include "chromeos/services/ime/public/mojom/input_engine.mojom.h" -#include "chromeos/strings/grit/chromeos_strings.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -namespace chromeos { -namespace ime { - -namespace { - -#if BUILDFLAG(ENABLE_CROS_IME_DECODER) -const char kImeServiceSandboxType[] = "ime"; -#else -const char kImeServiceSandboxType[] = "utility"; -#endif - -} // namespace - -const service_manager::Manifest& GetManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .WithServiceName(mojom::kServiceName) - .WithDisplayName(IDS_IME_SERVICE_DISPLAY_NAME) - .WithOptions( - service_manager::ManifestOptionsBuilder() - .WithExecutionMode(service_manager::Manifest::ExecutionMode:: - kOutOfProcessBuiltin) - .WithSandboxType(kImeServiceSandboxType) - .WithInstanceSharingPolicy( - service_manager::Manifest::InstanceSharingPolicy:: - kSharedAcrossGroups) - .Build()) - .ExposeCapability( - "input_engine", - service_manager::Manifest::InterfaceList< - mojom::InputEngineManager, mojom::PlatformAccessClient>()) - .Build()}; - return *manifest; -} - -} // namespace ime -} // namespace chromeos
diff --git a/chromeos/services/ime/public/cpp/manifest.h b/chromeos/services/ime/public/cpp/manifest.h deleted file mode 100644 index dedb240..0000000 --- a/chromeos/services/ime/public/cpp/manifest.h +++ /dev/null
@@ -1,18 +0,0 @@ -// Copyright 2019 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. - -#ifndef CHROMEOS_SERVICES_IME_PUBLIC_CPP_MANIFEST_H_ -#define CHROMEOS_SERVICES_IME_PUBLIC_CPP_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -namespace chromeos { -namespace ime { - -const service_manager::Manifest& GetManifest(); - -} // namespace ime -} // namespace chromeos - -#endif // CHROMEOS_SERVICES_IME_PUBLIC_CPP_MANIFEST_H_
diff --git a/chromeos/services/ime/public/cpp/shared_lib/interfaces.h b/chromeos/services/ime/public/cpp/shared_lib/interfaces.h index af04bee..997ba02 100644 --- a/chromeos/services/ime/public/cpp/shared_lib/interfaces.h +++ b/chromeos/services/ime/public/cpp/shared_lib/interfaces.h
@@ -68,6 +68,9 @@ // A simple downloading callback. typedef void (*SimpleDownloadCallback)(int status_code, const char* file_path); +// A function pointer of a sequenced task. +typedef void (*ImeSequencedTask)(int task_id); + // Based on RequestPriority defined at // https://cs.chromium.org/chromium/src/net/base/request_priority.h?rcl=f9c935b73381772d508eebba1e216c437139d475 enum DownloadPriority { @@ -166,6 +169,10 @@ const char* file_path, SimpleDownloadCallback callback) = 0; + // This is used for decoder to run some Mojo-specific operation which is + // required to run in the thread creating its remote. + virtual void RunInMainSequence(ImeSequencedTask task, int task_id) = 0; + // TODO(https://crbug.com/837156): Provide Logger for main entry. };
diff --git a/chromeos/services/ime/public/mojom/BUILD.gn b/chromeos/services/ime/public/mojom/BUILD.gn index ee6e82e4..e87d17b0 100644 --- a/chromeos/services/ime/public/mojom/BUILD.gn +++ b/chromeos/services/ime/public/mojom/BUILD.gn
@@ -6,7 +6,6 @@ mojom("mojom") { sources = [ - "constants.mojom", "input_engine.mojom", ]
diff --git a/chromeos/services/ime/public/mojom/constants.mojom b/chromeos/services/ime/public/mojom/constants.mojom deleted file mode 100644 index a049e48..0000000 --- a/chromeos/services/ime/public/mojom/constants.mojom +++ /dev/null
@@ -1,7 +0,0 @@ -// 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. - -module chromeos.ime.mojom; - -const string kServiceName = "ime";
diff --git a/chromeos/services/ime/public/mojom/input_engine.mojom b/chromeos/services/ime/public/mojom/input_engine.mojom index c4b1135..680eeacb 100644 --- a/chromeos/services/ime/public/mojom/input_engine.mojom +++ b/chromeos/services/ime/public/mojom/input_engine.mojom
@@ -116,9 +116,12 @@ (mojo_base.mojom.FilePath file_path); }; -// A client on the input engine side that requires access to the IME-specific -// resources on the platform. -interface PlatformAccessClient { - // Set a platform access provider. +// The main interface to the IME service. +interface ImeService { + // Injects a remote PlatformAccessProvider interface that the service can use + // to request privileged operations from the client (i.e. the browser). SetPlatformAccessProvider(pending_remote<PlatformAccessProvider> provider); + + // Binds an InputEngineManager interface. + BindInputEngineManager(pending_receiver<InputEngineManager> receiver); };
diff --git a/components/arc/metrics/arc_metrics_service.cc b/components/arc/metrics/arc_metrics_service.cc index cfc8161d3..666cfdb 100644 --- a/components/arc/metrics/arc_metrics_service.cc +++ b/components/arc/metrics/arc_metrics_service.cc
@@ -69,36 +69,6 @@ return clock->Now().LocalMidnight().since_origin().InDays(); } -class ArcWindowDelegateImpl : public ArcMetricsService::ArcWindowDelegate { - public: - explicit ArcWindowDelegateImpl(ArcMetricsService* service) - : service_(service) {} - - ~ArcWindowDelegateImpl() override = default; - - bool IsArcAppWindow(const aura::Window* window) const override { - return arc::IsArcAppWindow(window); - } - - void RegisterActivationChangeObserver() override { - // If WMHelper doesn't exist, do nothing. This occurs in tests. - if (exo::WMHelper::HasInstance()) - exo::WMHelper::GetInstance()->AddActivationObserver(service_); - } - - void UnregisterActivationChangeObserver() override { - // If WMHelper is already destroyed, do nothing. - // TODO(crbug.com/748380): Fix shutdown order. - if (exo::WMHelper::HasInstance()) - exo::WMHelper::GetInstance()->RemoveActivationObserver(service_); - } - - private: - ArcMetricsService* const service_; // Owned by ArcMetricsService - - DISALLOW_COPY_AND_ASSIGN(ArcWindowDelegateImpl); -}; - // Singleton factory for ArcMetricsService. class ArcMetricsServiceFactory : public internal::ArcBrowserContextKeyedServiceFactoryBase< @@ -140,7 +110,7 @@ ArcMetricsService::ArcMetricsService(content::BrowserContext* context, ArcBridgeService* bridge_service) : arc_bridge_service_(bridge_service), - arc_window_delegate_(std::make_unique<ArcWindowDelegateImpl>(this)), + window_matcher_(base::BindRepeating(arc::IsArcAppWindow)), process_observer_(this), pref_service_(user_prefs::UserPrefs::Get(context)), clock_(base::DefaultClock::GetInstance()), @@ -149,7 +119,9 @@ weak_ptr_factory_(this) { arc_bridge_service_->metrics()->SetHost(this); arc_bridge_service_->process()->AddObserver(&process_observer_); - arc_window_delegate_->RegisterActivationChangeObserver(); + // If WMHelper doesn't exist, do nothing. This occurs in tests. + if (exo::WMHelper::HasInstance()) + exo::WMHelper::GetInstance()->AddActivationObserver(this); session_manager::SessionManager::Get()->AddObserver(this); chromeos::PowerManagerClient::Get()->AddObserver(this); ui::GamepadProviderOzone::GetInstance()->AddGamepadObserver(this); @@ -177,14 +149,17 @@ ui::GamepadProviderOzone::GetInstance()->RemoveGamepadObserver(this); chromeos::PowerManagerClient::Get()->RemoveObserver(this); session_manager::SessionManager::Get()->RemoveObserver(this); - arc_window_delegate_->UnregisterActivationChangeObserver(); + // If WMHelper is already destroyed, do nothing. + // TODO(crbug.com/748380): Fix shutdown order. + if (exo::WMHelper::HasInstance()) + exo::WMHelper::GetInstance()->RemoveActivationObserver(this); arc_bridge_service_->process()->RemoveObserver(&process_observer_); arc_bridge_service_->metrics()->SetHost(nullptr); } -void ArcMetricsService::SetArcWindowDelegateForTesting( - std::unique_ptr<ArcWindowDelegate> delegate) { - arc_window_delegate_ = std::move(delegate); +void ArcMetricsService::SetWindowMatcherForTesting( + WindowMatcher window_matcher) { + window_matcher_ = window_matcher; } void ArcMetricsService::SetClockForTesting(base::Clock* clock) { @@ -327,7 +302,7 @@ aura::Window* gained_active, aura::Window* lost_active) { UpdateEngagementTime(); - was_arc_window_active_ = arc_window_delegate_->IsArcAppWindow(gained_active); + was_arc_window_active_ = window_matcher_.Run(gained_active); if (!was_arc_window_active_) { gamepad_interaction_recorded_ = false; return;
diff --git a/components/arc/metrics/arc_metrics_service.h b/components/arc/metrics/arc_metrics_service.h index 6333c6d..48873bf 100644 --- a/components/arc/metrics/arc_metrics_service.h +++ b/components/arc/metrics/arc_metrics_service.h
@@ -52,20 +52,10 @@ public mojom::MetricsHost, public ui::GamepadObserver { public: - // Delegate for handling window focus observation that is used to track ARC - // app usage metrics. - class ArcWindowDelegate { - public: - virtual ~ArcWindowDelegate() = default; - // Returns whether |window| is an ARC window. - virtual bool IsArcAppWindow(const aura::Window* window) const = 0; - virtual void RegisterActivationChangeObserver() = 0; - virtual void UnregisterActivationChangeObserver() = 0; - }; + using WindowMatcher = base::RepeatingCallback<bool(const aura::Window*)>; - // Sets the fake ArcWindowDelegate for testing. - void SetArcWindowDelegateForTesting( - std::unique_ptr<ArcWindowDelegate> delegate); + // Sets the fake WindowMatcher for testing. + void SetWindowMatcherForTesting(WindowMatcher window_matcher); // Sets Clock for testing. void SetClockForTesting(base::Clock* clock); @@ -172,7 +162,10 @@ THREAD_CHECKER(thread_checker_); ArcBridgeService* const arc_bridge_service_; // Owned by ArcServiceManager. - std::unique_ptr<ArcWindowDelegate> arc_window_delegate_; + + // A function to determine if a window is an ARC window, which can be + // replaced in tests. + WindowMatcher window_matcher_; ProcessObserver process_observer_; base::RepeatingTimer request_process_list_timer_;
diff --git a/components/arc/metrics/arc_metrics_service_unittest.cc b/components/arc/metrics/arc_metrics_service_unittest.cc index dd91dfb..f8c9798 100644 --- a/components/arc/metrics/arc_metrics_service_unittest.cc +++ b/components/arc/metrics/arc_metrics_service_unittest.cc
@@ -14,8 +14,8 @@ #include "base/metrics/histogram_samples.h" #include "base/run_loop.h" #include "base/test/metrics/histogram_tester.h" -#include "base/time/clock.h" -#include "base/time/tick_clock.h" +#include "base/test/simple_test_clock.h" +#include "base/test/simple_test_tick_clock.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power/fake_power_manager_client.h" #include "chromeos/dbus/power_manager/idle.pb.h" @@ -30,92 +30,12 @@ #include "content/public/test/test_browser_thread_bundle.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/aura/client/aura_constants.h" -#include "ui/aura/test/test_window_delegate.h" #include "ui/aura/test/test_windows.h" #include "ui/aura/window.h" namespace arc { namespace { -// Fake ArcWindowDelegate to help test recording UMA on focus changes, -// not depending on the full setup of Exo and Ash. -class FakeArcWindowDelegate : public ArcMetricsService::ArcWindowDelegate { - public: - FakeArcWindowDelegate() = default; - ~FakeArcWindowDelegate() override = default; - - bool IsArcAppWindow(const aura::Window* window) const override { - return focused_window_id_ == arc_window_id_; - } - - void RegisterActivationChangeObserver() override {} - void UnregisterActivationChangeObserver() override {} - - std::unique_ptr<aura::Window> CreateFakeArcWindow() { - const int id = next_id_++; - arc_window_id_ = id; - std::unique_ptr<aura::Window> window( - base::WrapUnique(aura::test::CreateTestWindowWithDelegate( - &dummy_delegate_, id, gfx::Rect(), nullptr))); - window->SetProperty(aura::client::kAppType, - static_cast<int>(ash::AppType::ARC_APP)); - return window; - } - - std::unique_ptr<aura::Window> CreateFakeNonArcWindow() { - const int id = next_id_++; - return base::WrapUnique(aura::test::CreateTestWindowWithDelegate( - &dummy_delegate_, id, gfx::Rect(), nullptr)); - } - - void FocusWindow(const aura::Window* window) { - focused_window_id_ = window->id(); - } - - private: - aura::test::TestWindowDelegate dummy_delegate_; - int next_id_ = 0; - int arc_window_id_ = 0; - int focused_window_id_ = 0; - - DISALLOW_COPY_AND_ASSIGN(FakeArcWindowDelegate); -}; - -// Fake base::Clock to simulate wall clock time changes, which ArcMetricsService -// uses to determine if cumulative metrics should be recorded to UMA. -class FakeClock : public base::Clock { - public: - FakeClock() : now_(base::Time::Now()) {} - - ~FakeClock() override = default; - - base::Time Now() const override { return now_; } - - void TimeElapsed(base::TimeDelta delta) { now_ += delta; } - - private: - base::Time now_; - - DISALLOW_COPY_AND_ASSIGN(FakeClock); -}; - -// Fake base::TickClock to simulate time changes which are being recorded by -// metrics. -class FakeTickClock : public base::TickClock { - public: - FakeTickClock() = default; - ~FakeTickClock() override = default; - - base::TimeTicks NowTicks() const override { return now_ticks_; } - - void TimeElapsed(base::TimeDelta delta) { now_ticks_ += delta; } - - private: - base::TimeTicks now_ticks_; - - DISALLOW_COPY_AND_ASSIGN(FakeTickClock); -}; - // Helper class that initializes and shuts down dbus clients for testing. class DBusThreadManagerLifetimeHelper { public: @@ -176,15 +96,13 @@ service_(CreateArcMetricsService(context_.get())) { chromeos::FakeSessionManagerClient::Get()->set_arc_available(true); - auto fake_arc_window_delegate = std::make_unique<FakeArcWindowDelegate>(); - fake_arc_window_delegate_ = fake_arc_window_delegate.get(); - service_->SetArcWindowDelegateForTesting( - std::move(fake_arc_window_delegate)); - fake_arc_window_ = fake_arc_window_delegate_->CreateFakeArcWindow(); - fake_non_arc_window_ = fake_arc_window_delegate_->CreateFakeNonArcWindow(); - - service_->SetClockForTesting(&fake_clock_); - service_->SetTickClockForTesting(&fake_tick_clock_); + CreateFakeWindows(); + service_->SetWindowMatcherForTesting(base::BindRepeating( + &ArcMetricsServiceTest::MatchWindow, base::Unretained(this))); + // The code doesn't work for correctly for a clock at the epoch. + test_clock_.SetNow(base::Time::Now()); + service_->SetClockForTesting(&test_clock_); + service_->SetTickClockForTesting(&test_tick_clock_); } ~ArcMetricsServiceTest() override {} @@ -222,25 +140,41 @@ void TriggerRecordEngagementTimeToUma() { // Trigger UMA record by changing to next day. - fake_clock_.TimeElapsed(base::TimeDelta::FromDays(1)); + test_clock_.Advance(base::TimeDelta::FromDays(1)); service_->OnSessionStateChanged(); } - FakeArcWindowDelegate* fake_arc_window_delegate() { - return fake_arc_window_delegate_; - } aura::Window* fake_arc_window() { return fake_arc_window_.get(); } aura::Window* fake_non_arc_window() { return fake_non_arc_window_.get(); } - FakeTickClock* fake_tick_clock() { return &fake_tick_clock_; } + void AdvanceSeconds(int seconds) { + test_tick_clock_.Advance(base::TimeDelta::FromSeconds(seconds)); + } private: + void CreateFakeWindows() { + fake_arc_window_.reset(aura::test::CreateTestWindowWithId( + /*id=*/0, nullptr)); + fake_arc_window_->SetProperty(aura::client::kAppType, + static_cast<int>(ash::AppType::ARC_APP)); + fake_non_arc_window_.reset(aura::test::CreateTestWindowWithId( + /*id=*/1, nullptr)); + } + + bool MatchWindow(const aura::Window* window) const { + return window == fake_arc_window_.get(); + } + chromeos::FakePowerManagerClient* GetPowerManagerClient() { return static_cast<chromeos::FakePowerManagerClient*>( chromeos::PowerManagerClient::Get()); } content::TestBrowserThreadBundle thread_bundle_; + + base::SimpleTestClock test_clock_; + base::SimpleTestTickClock test_tick_clock_; + std::unique_ptr<ArcServiceManager> arc_service_manager_; // DBusThreadManager, SessionManager and StabilityMetricsManager should @@ -252,9 +186,6 @@ std::unique_ptr<aura::Window> fake_arc_window_; std::unique_ptr<aura::Window> fake_non_arc_window_; - FakeArcWindowDelegate* fake_arc_window_delegate_; // Owned by |service_| - FakeClock fake_clock_; - FakeTickClock fake_tick_clock_; ArcMetricsService* const service_; @@ -398,7 +329,6 @@ TEST_F(ArcMetricsServiceTest, RecordArcWindowFocusAction) { base::HistogramTester tester; - fake_arc_window_delegate()->FocusWindow(fake_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, @@ -413,7 +343,6 @@ base::HistogramTester tester; // Focus an ARC window once so that the histogram is created. - fake_arc_window_delegate()->FocusWindow(fake_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, fake_arc_window(), nullptr); @@ -422,7 +351,6 @@ static_cast<int>(UserInteractionType::APP_CONTENT_WINDOW_INTERACTION), 1); // Focusing a non-ARC window should not increase the bucket count. - fake_arc_window_delegate()->FocusWindow(fake_non_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, fake_non_arc_window(), nullptr); @@ -437,7 +365,7 @@ // Make session inactive for 1 sec. Nothing should be recorded. SetSessionState(session_manager::SessionState::LOCKED); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -455,7 +383,7 @@ // Make session active for 1 sec. Should be recorded as total time. SetSessionState(session_manager::SessionState::ACTIVE); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -474,7 +402,7 @@ // Dim screen off for 1 sec. Nothing should be recorded. SetScreenDimmed(true); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -493,11 +421,10 @@ // Focus an ARC++ window for 1 sec. Should be recorded as total time and // foreground time. - fake_arc_window_delegate()->FocusWindow(fake_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, fake_arc_window(), nullptr); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -515,11 +442,10 @@ SetSessionState(session_manager::SessionState::ACTIVE); // Focus an non-ARC++ window for 1 sec. Should be recorded as total time. - fake_arc_window_delegate()->FocusWindow(fake_non_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, - fake_arc_window(), nullptr); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + fake_non_arc_window(), nullptr); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -539,7 +465,7 @@ // Open an ARC++ app in the background and wait for 1 sec. Should be recorded // as total time and background time. service()->OnTaskCreated(1, "", "", ""); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total", @@ -560,11 +486,10 @@ // With an ARC++ app in the background, focus an ARC++ window for 1 sec. // Should be recorded as total time and foreground time. service()->OnTaskCreated(1, "", "", ""); - fake_arc_window_delegate()->FocusWindow(fake_arc_window()); service()->OnWindowActivated( wm::ActivationChangeObserver::ActivationReason::INPUT_EVENT, fake_arc_window(), nullptr); - fake_tick_clock()->TimeElapsed(base::TimeDelta::FromSeconds(1)); + AdvanceSeconds(1); TriggerRecordEngagementTimeToUma(); tester.ExpectTimeBucketCount("Arc.EngagementTime.Total",
diff --git a/components/arc/mojom/accessibility_helper.mojom b/components/arc/mojom/accessibility_helper.mojom index f676fb7..f03ae13 100644 --- a/components/arc/mojom/accessibility_helper.mojom +++ b/components/arc/mojom/accessibility_helper.mojom
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Next MinVersion: 16 +// Next MinVersion: 17 module arc.mojom; @@ -376,6 +376,36 @@ [MinVersion=13] int32 end_index; }; +// The type of shadow used for Chrome captions. +// https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle +[Extensible] +enum CaptionTextShadowType { + // Edge type value specifying no character edges. + NONE = 0, + + // Edge type value specifying uniformly outlined character edges. + UNIFORM = 1, + + // Edge type value specifying drop-shadowed character edges. + DROP_SHADOW = 2, + + // Edge type value specifying raised bevel character edges. + RAISED = 3, + + // Edge type value specifying depressed bevel character edges. + DEPRESSED = 4, +}; + +// Encapsulates settings to stylize captions. +// https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle.html +struct CaptionStyle { + string user_locale; + string text_size; + string text_color; + string background_color; + CaptionTextShadowType text_shadow_type; +}; + // Interface for Android communicating to Chrome. // Deprecated method IDs: 0 // Next method ID: 3 @@ -392,7 +422,7 @@ // Interface for communicating to Android. // Deprecated method IDs: 0, 1, 3, 5 -// Next method ID: 10 +// Next method ID: 11 interface AccessibilityHelperInstance { // Establishes full-duplex communication with the host. [MinVersion=9] Init@7(AccessibilityHelperHost host) => (); @@ -416,4 +446,7 @@ // Returns Rect specifying location, or null if textLocation is not available. [MinVersion=13] RefreshWithExtraData@9(AccessibilityActionData refresh_data) => (Rect? text_location); + + // Requests the service to set the caption style. + [MinVersion=16] SetCaptionStyle@10(CaptionStyle style); };
diff --git a/components/arc/net/arc_net_host_impl.cc b/components/arc/net/arc_net_host_impl.cc index 0ea0f51..2db706f 100644 --- a/components/arc/net/arc_net_host_impl.cc +++ b/components/arc/net/arc_net_host_impl.cc
@@ -230,7 +230,7 @@ state == shill::kStateConfiguration) return arc::mojom::ConnectionStateType::CONNECTING; if ((state == shill::kStateIdle) || (state == shill::kStateFailure) || - (state == "")) + (state == shill::kStateDisconnect) || (state == "")) return arc::mojom::ConnectionStateType::NOT_CONNECTED; if (chromeos::NetworkState::StateIsPortalled(state)) return arc::mojom::ConnectionStateType::PORTAL; @@ -239,7 +239,7 @@ // The remaining cases defined in shill dbus-constants are legacy values from // Flimflam and are not expected to be encountered. These are: kStateCarrier, - // kStateActivationFailure, kStateDisconnect, and kStateOffline. + // kStateActivationFailure, and kStateOffline. NOTREACHED() << "Unknown connection state: " << state; return arc::mojom::ConnectionStateType::NOT_CONNECTED; }
diff --git a/components/arc/test/fake_accessibility_helper_instance.cc b/components/arc/test/fake_accessibility_helper_instance.cc index 9e953b9..508af343 100644 --- a/components/arc/test/fake_accessibility_helper_instance.cc +++ b/components/arc/test/fake_accessibility_helper_instance.cc
@@ -42,4 +42,6 @@ mojom::AccessibilityActionDataPtr action_data_ptr, RefreshWithExtraDataCallback callback) {} +void FakeAccessibilityHelperInstance::SetCaptionStyle( + mojom::CaptionStylePtr style_ptr) {} } // namespace arc
diff --git a/components/arc/test/fake_accessibility_helper_instance.h b/components/arc/test/fake_accessibility_helper_instance.h index d2474a21..e16ccf5 100644 --- a/components/arc/test/fake_accessibility_helper_instance.h +++ b/components/arc/test/fake_accessibility_helper_instance.h
@@ -32,6 +32,8 @@ void RefreshWithExtraData(mojom::AccessibilityActionDataPtr action_data_ptr, RefreshWithExtraDataCallback callback) override; + void SetCaptionStyle(mojom::CaptionStylePtr style_ptr) override; + private: mojom::AccessibilityFilterType filter_type_ = mojom::AccessibilityFilterType::OFF;
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index e783ddf..057cf0f 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1433,7 +1433,7 @@ } FillUserNameAndPassword(username_element, password_element, form_data, - &field_data_manager_, logger.get()); + logger.get()); } // mojom::PasswordAutofillAgent: @@ -1472,7 +1472,7 @@ ? element : web_input_to_password_info_[element].password_field; FillUserNameAndPassword(username_element, password_element, form_data, - &field_data_manager_, logger.get()); + logger.get()); } } @@ -1737,7 +1737,6 @@ WebInputElement username_element, WebInputElement password_element, const PasswordFormFillData& fill_data, - FieldDataManager* field_data_manager, RendererSavePasswordProgressLogger* logger) { if (logger) logger->LogMessage(Logger::STRING_FILL_USERNAME_AND_PASSWORD_METHOD); @@ -1838,43 +1837,23 @@ IsElementAutocompletable(username_element)) { if (!username.empty() && (username_element.Value().IsEmpty() || prefilled_placeholder_username)) { - username_element.SetSuggestedValue(WebString::FromUTF16(username)); - gatekeeper_.RegisterElement(&username_element); + AutofillField(username, username_element); if (prefilled_placeholder_username) { LogPrefilledUsernameFillOutcome( PrefilledUsernameFillOutcome:: kPrefilledPlaceholderUsernameOverridden); } } - field_data_manager->UpdateFieldDataMap( - username_element, username, - FieldPropertiesFlags::AUTOFILLED_ON_PAGELOAD); username_element.SetAutofillState(WebAutofillState::kAutofilled); if (logger) logger->LogElementName(Logger::STRING_USERNAME_FILLED, username_element); } - // Wait to fill in the password until a user gesture occurs. This is to make - // sure that we do not fill in the DOM with a password until we believe the - // user is intentionally interacting with the page. - if (password_element.Value().Utf16() != password) - password_element.SetSuggestedValue(WebString::FromUTF16(password)); - field_data_manager->UpdateFieldDataMap( - password_element, password, FieldPropertiesFlags::AUTOFILLED_ON_PAGELOAD); - gatekeeper_.RegisterElement(&password_element); - password_element.SetAutofillState(WebAutofillState::kAutofilled); + AutofillField(password, password_element); if (logger) logger->LogElementName(Logger::STRING_PASSWORD_FILLED, password_element); - if (!username.empty() && !username_element.IsNull()) { - autofilled_elements_cache_.emplace( - username_element.UniqueRendererFormControlId(), - WebString::FromUTF16(username)); - } - autofilled_elements_cache_.emplace( - password_element.UniqueRendererFormControlId(), - WebString::FromUTF16(password)); LogFirstFillingResult(fill_data, FillingResult::kSuccess); return true; } @@ -2111,4 +2090,19 @@ } } +void PasswordAutofillAgent::AutofillField(const base::string16& value, + WebInputElement field) { + if (field.Value().Utf16() != value) + field.SetSuggestedValue(WebString::FromUTF16(value)); + field.SetAutofillState(WebAutofillState::kAutofilled); + // Wait to fill until a user gesture occurs. This is to make sure that we do + // not fill in the DOM with a password until we believe the user is + // intentionally interacting with the page. + gatekeeper_.RegisterElement(&field); + field_data_manager_.UpdateFieldDataMap( + field, value, FieldPropertiesFlags::AUTOFILLED_ON_PAGELOAD); + autofilled_elements_cache_.emplace(field.UniqueRendererFormControlId(), + WebString::FromUTF16(value)); +} + } // namespace autofill
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h index 5ae59f5..5d36d622 100644 --- a/components/autofill/content/renderer/password_autofill_agent.h +++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -392,13 +392,10 @@ // This function attempts to fill |username_element| and |password_element| // with values from |fill_data|. The |username_element| and |password_element| // will only have the suggestedValue set. If a match is found, return true and - // |field_data_manager| will be modified with the autofilled credentials and - // |FieldPropertiesFlags::AUTOFILLED| flag. Returns true if the password is - // filled. + // Returns true if the password is filled. bool FillUserNameAndPassword(blink::WebInputElement username_element, blink::WebInputElement password_element, const PasswordFormFillData& fill_data, - FieldDataManager* field_data_manager, RendererSavePasswordProgressLogger* logger); // Logs whether a username value that was prefilled by the website was @@ -453,6 +450,11 @@ void TryFixAutofilledForm( std::vector<blink::WebFormControlElement>* control_elements) const; + // Autofills |field| with |value| and updates |gatekeeper_|, + // |field_data_manager_|, |autofilled_elements_cache_|. |field| should be + // non-null. + void AutofillField(const base::string16& value, blink::WebInputElement field); + // The logins we have filled so far with their associated info. WebInputToPasswordInfoMap web_input_to_password_info_; // A (sort-of) reverse map to |web_input_to_password_info_|.
diff --git a/components/autofill/core/common/save_password_progress_logger.cc b/components/autofill/core/common/save_password_progress_logger.cc index b5a6fdf9..2add24a 100644 --- a/components/autofill/core/common/save_password_progress_logger.cc +++ b/components/autofill/core/common/save_password_progress_logger.cc
@@ -492,6 +492,8 @@ return "Leak detection failed: signed out"; case STRING_LEAK_DETECTION_TOKEN_REQUEST_ERROR: return "Leak detection failed: can't get a token"; + case STRING_LEAK_DETECTION_INVALID_SERVER_RESPONSE_ERROR: + return "Leak detection failed: invalid server response"; case SavePasswordProgressLogger:: STRING_PASSWORD_REQUIREMENTS_VOTE_FOR_LOWERCASE: return "Uploading password requirements vote for using lowercase letters";
diff --git a/components/autofill/core/common/save_password_progress_logger.h b/components/autofill/core/common/save_password_progress_logger.h index c8f80bd..11bb14bb 100644 --- a/components/autofill/core/common/save_password_progress_logger.h +++ b/components/autofill/core/common/save_password_progress_logger.h
@@ -182,6 +182,7 @@ STRING_LEAK_DETECTION_FINISHED, STRING_LEAK_DETECTION_SIGNED_OUT_ERROR, STRING_LEAK_DETECTION_TOKEN_REQUEST_ERROR, + STRING_LEAK_DETECTION_INVALID_SERVER_RESPONSE_ERROR, STRING_PASSWORD_REQUIREMENTS_VOTE_FOR_LOWERCASE, STRING_PASSWORD_REQUIREMENTS_VOTE_FOR_UPPERCASE, STRING_PASSWORD_REQUIREMENTS_VOTE_FOR_NUMERICS,
diff --git a/components/crash/core/browser/crashes_ui_util.cc b/components/crash/core/browser/crashes_ui_util.cc index b714115..3f2993d 100644 --- a/components/crash/core/browser/crashes_ui_util.cc +++ b/components/crash/core/browser/crashes_ui_util.cc
@@ -15,7 +15,7 @@ #include "components/strings/grit/components_strings.h" #include "components/upload_list/upload_list.h" -namespace crash { +namespace crash_reporter { const CrashesUILocalizedString kCrashesUILocalizedStrings[] = { {"bugLinkText", IDS_CRASH_BUG_LINK_LABEL}, @@ -85,4 +85,4 @@ } } -} // namespace crash +} // namespace crash_reporter
diff --git a/components/crash/core/browser/crashes_ui_util.h b/components/crash/core/browser/crashes_ui_util.h index 65dcc5b..953573a 100644 --- a/components/crash/core/browser/crashes_ui_util.h +++ b/components/crash/core/browser/crashes_ui_util.h
@@ -13,7 +13,7 @@ class UploadList; -namespace crash { +namespace crash_reporter { // Mapping between a WebUI resource (identified by |name|) and a GRIT resource // (identified by |resource_id|). @@ -38,6 +38,6 @@ // Converts and appends the most recent uploads to |out_value|. void UploadListToValue(UploadList* upload_list, base::ListValue* out_value); -} // namespace crash +} // namespace crash_reporter #endif // COMPONENTS_CRASH_CORE_BROWSER_CRASHES_UI_UTIL_H_
diff --git a/components/cronet/android/test/javaperftests/run.py b/components/cronet/android/test/javaperftests/run.py index 4abd483d7..dcebeed 100755 --- a/components/cronet/android/test/javaperftests/run.py +++ b/components/cronet/android/test/javaperftests/run.py
@@ -54,6 +54,7 @@ sys.path.append(os.path.join(REPOSITORY_ROOT, 'tools', 'perf')) from core import path_util # pylint: disable=wrong-import-position +from core import benchmark_runner # pylint: disable=wrong-import-position sys.path.append(path_util.GetTelemetryDir()) sys.path.append(os.path.join(REPOSITORY_ROOT, 'build', 'android')) sys.path.append(os.path.join( @@ -70,7 +71,6 @@ from pylib import constants from telemetry import android from telemetry import benchmark -from telemetry import benchmark_runner from telemetry import story from telemetry.value import scalar from telemetry.web_perf import timeline_based_measurement
diff --git a/components/dom_distiller/content/browser/distillability_driver.cc b/components/dom_distiller/content/browser/distillability_driver.cc index 67147ef..24e1662 100644 --- a/components/dom_distiller/content/browser/distillability_driver.cc +++ b/components/dom_distiller/content/browser/distillability_driver.cc
@@ -5,6 +5,7 @@ #include "components/dom_distiller/content/browser/distillability_driver.h" #include <memory> +#include <utility> #include "base/bind.h" #include "content/public/browser/navigation_handle.h"
diff --git a/components/dom_distiller/content/browser/distillability_driver.h b/components/dom_distiller/content/browser/distillability_driver.h index 8d80f28..9aed6ecc 100644 --- a/components/dom_distiller/content/browser/distillability_driver.h +++ b/components/dom_distiller/content/browser/distillability_driver.h
@@ -5,6 +5,8 @@ #ifndef COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLIBILITY_DRIVER_H_ #define COMPONENTS_DOM_DISTILLER_CONTENT_BROWSER_DISTILLIBILITY_DRIVER_H_ +#include <string> + #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "components/dom_distiller/content/browser/distillable_page_utils.h"
diff --git a/components/download/database/download_db_impl.cc b/components/download/database/download_db_impl.cc index 2e728e8f..37aef16 100644 --- a/components/download/database/download_db_impl.cc +++ b/components/download/database/download_db_impl.cc
@@ -20,6 +20,7 @@ const int kMaxNumInitializeAttempts = 3; +const char kDatabaseClientName[] = "DownloadDB"; using ProtoKeyVector = std::vector<std::string>; using ProtoEntryVector = std::vector<download_pb::DownloadDBEntry>; using ProtoKeyEntryVector = @@ -45,27 +46,29 @@ } // namespace -DownloadDBImpl::DownloadDBImpl( - DownloadNamespace download_namespace, - const base::FilePath& database_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider) - : download_namespace_(download_namespace) { - DCHECK(!database_dir.empty()); - db_ = db_provider->GetDB<download_pb::DownloadDBEntry>( - leveldb_proto::ProtoDbType::DOWNLOAD_DB, database_dir, - base::CreateSequencedTaskRunnerWithTraits( - {base::ThreadPool(), base::MayBlock(), - // USER_VISIBLE because it is required to display chrome://downloads. - // https://crbug.com/976223 - base::TaskPriority::USER_VISIBLE, - base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN})); -} +DownloadDBImpl::DownloadDBImpl(DownloadNamespace download_namespace, + const base::FilePath& database_dir) + : DownloadDBImpl( + download_namespace, + database_dir, + leveldb_proto::ProtoDatabaseProvider::CreateUniqueDB< + download_pb::DownloadDBEntry>(base::CreateSequencedTaskRunner( + {base::ThreadPool(), base::MayBlock(), + // USER_VISIBLE because it is required to display + // chrome://downloads. https://crbug.com/976223 + base::TaskPriority::USER_VISIBLE, + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}))) {} DownloadDBImpl::DownloadDBImpl( DownloadNamespace download_namespace, + const base::FilePath& database_dir, std::unique_ptr<leveldb_proto::ProtoDatabase<download_pb::DownloadDBEntry>> db) - : db_(std::move(db)), download_namespace_(download_namespace) {} + : database_dir_(database_dir), + db_(std::move(db)), + is_initialized_(false), + download_namespace_(download_namespace), + num_initialize_attempts_(0) {} DownloadDBImpl::~DownloadDBImpl() = default; @@ -80,7 +83,7 @@ leveldb_env::Options options = leveldb_proto::CreateSimpleOptions(); options.reuse_logs = false; options.write_buffer_size = 64 << 10; // 64 KiB - db_->Init(options, + db_->Init(kDatabaseClientName, database_dir_, options, base::BindOnce(&DownloadDBImpl::OnDatabaseInitialized, weak_factory_.GetWeakPtr(), std::move(callback))); } @@ -149,10 +152,8 @@ std::move(callback).Run(success, std::move(result)); } -void DownloadDBImpl::OnDatabaseInitialized( - DownloadDBCallback callback, - leveldb_proto::Enums::InitStatus status) { - bool success = status == leveldb_proto::Enums::InitStatus::kOK; +void DownloadDBImpl::OnDatabaseInitialized(DownloadDBCallback callback, + bool success) { if (!success) { DestroyAndReinitialize(std::move(callback)); return;
diff --git a/components/download/database/download_db_impl.h b/components/download/database/download_db_impl.h index 2a85c7c..a1a6b65b 100644 --- a/components/download/database/download_db_impl.h +++ b/components/download/database/download_db_impl.h
@@ -18,20 +18,16 @@ class DownloadDBEntry; } -namespace leveldb_proto { -class ProtoDatabaseProvider; -} // namespace leveldb_proto - namespace download { // A protodb Implementation of DownloadDB. class DownloadDBImpl : public DownloadDB { public: DownloadDBImpl(DownloadNamespace download_namespace, - const base::FilePath& database_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider); + const base::FilePath& database_dir); DownloadDBImpl( DownloadNamespace download_namespace, + const base::FilePath& database_dir, std::unique_ptr< leveldb_proto::ProtoDatabase<download_pb::DownloadDBEntry>> db); ~DownloadDBImpl() override; @@ -55,8 +51,7 @@ std::string GetEntryKey(const std::string& guid) const; // Called when database is initialized. - void OnDatabaseInitialized(DownloadDBCallback callback, - leveldb_proto::Enums::InitStatus status); + void OnDatabaseInitialized(DownloadDBCallback callback, bool success); // Called when database is destroyed. void OnDatabaseDestroyed(DownloadDBCallback callback, bool success); @@ -70,18 +65,21 @@ bool success, std::unique_ptr<std::vector<download_pb::DownloadDBEntry>> entries); + // Directory to store |db_|. + base::FilePath database_dir_; + // Proto db for storing all the entries. std::unique_ptr<leveldb_proto::ProtoDatabase<download_pb::DownloadDBEntry>> db_; // Whether the object is initialized. - bool is_initialized_ = false; + bool is_initialized_; // Namespace of this db. DownloadNamespace download_namespace_; // Number of initialize attempts. - int num_initialize_attempts_ = 0; + int num_initialize_attempts_; base::WeakPtrFactory<DownloadDBImpl> weak_factory_{this};
diff --git a/components/download/database/download_db_impl_unittest.cc b/components/download/database/download_db_impl_unittest.cc index 4df0822..cd582a2 100644 --- a/components/download/database/download_db_impl_unittest.cc +++ b/components/download/database/download_db_impl_unittest.cc
@@ -50,7 +50,8 @@ &db_entries_); db_ = db.get(); download_db_.reset(new DownloadDBImpl( - DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, std::move(db))); + DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, + base::FilePath(FILE_PATH_LITERAL("/test/db/fakepath")), std::move(db))); } void InitCallback(bool success) { init_success_ = success; } @@ -98,7 +99,7 @@ download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); ASSERT_TRUE(init_success_); @@ -110,7 +111,7 @@ download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kError); + db_->InitCallback(false); ASSERT_FALSE(IsInitialized()); ASSERT_FALSE(init_success_); @@ -121,7 +122,7 @@ CreateDatabase(); download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); std::vector<DownloadDBEntry> loaded_entries; @@ -141,7 +142,7 @@ CreateDatabase(); download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); DownloadDBEntry entry = CreateDownloadDBEntry(); @@ -172,7 +173,7 @@ CreateDatabase(); download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); InProgressInfo in_progress_info; @@ -209,7 +210,7 @@ CreateDatabase(); download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); download_db_->Remove(first.GetGuid()); @@ -230,7 +231,7 @@ CreateDatabase(); download_db_->Initialize( base::BindOnce(&DownloadDBTest::InitCallback, base::Unretained(this))); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); ASSERT_TRUE(IsInitialized()); std::vector<DownloadDBEntry> loaded_entries;
diff --git a/components/download/internal/background_service/blob_task_proxy.h b/components/download/internal/background_service/blob_task_proxy.h index 2714fb7..7de3466b 100644 --- a/components/download/internal/background_service/blob_task_proxy.h +++ b/components/download/internal/background_service/blob_task_proxy.h
@@ -12,7 +12,7 @@ #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "base/single_thread_task_runner.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" namespace storage { class BlobDataHandle;
diff --git a/components/download/internal/common/download_db_cache_unittest.cc b/components/download/internal/common/download_db_cache_unittest.cc index 2b5fbc42..e39763bc 100644 --- a/components/download/internal/common/download_db_cache_unittest.cc +++ b/components/download/internal/common/download_db_cache_unittest.cc
@@ -70,7 +70,8 @@ &db_entries_); db_ = db.get(); auto download_db = std::make_unique<DownloadDBImpl>( - DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, std::move(db)); + DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, + base::FilePath(FILE_PATH_LITERAL("/test/db/fakepath")), std::move(db)); db_cache_ = std::make_unique<DownloadDBCache>(std::move(download_db)); db_cache_->SetTimerTaskRunnerForTesting(task_runner_); } @@ -118,7 +119,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 2u); @@ -140,7 +141,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 2u); @@ -165,7 +166,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 2u); @@ -215,7 +216,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 1u); ASSERT_EQ(loaded_entries[0].download_info->in_progress_info->current_path, @@ -244,7 +245,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 2u); @@ -271,7 +272,7 @@ db_cache_->Initialize( base::BindOnce(&DownloadDBCacheTest::InitCallback, base::Unretained(this), &loaded_entries)); - db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); + db_->InitCallback(true); db_->LoadCallback(true); ASSERT_EQ(loaded_entries.size(), 2u); // Let the DBCache to cache the entry first.
diff --git a/components/download/internal/common/in_progress_download_manager.cc b/components/download/internal/common/in_progress_download_manager.cc index 5e56a64..9760db3 100644 --- a/components/download/internal/common/in_progress_download_manager.cc +++ b/components/download/internal/common/in_progress_download_manager.cc
@@ -24,7 +24,6 @@ #include "components/download/public/common/download_url_parameters.h" #include "components/download/public/common/download_utils.h" #include "components/download/public/common/input_stream.h" -#include "components/leveldb_proto/public/proto_database_provider.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/resource_response.h" #include "services/service_manager/public/cpp/connector.h" @@ -196,7 +195,6 @@ InProgressDownloadManager::InProgressDownloadManager( Delegate* delegate, const base::FilePath& in_progress_db_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider, const IsOriginSecureCallback& is_origin_secure_cb, const URLSecurityPolicy& url_security_policy, service_manager::Connector* connector) @@ -207,7 +205,7 @@ url_security_policy_(url_security_policy), use_empty_db_(in_progress_db_dir.empty()), connector_(connector) { - Initialize(in_progress_db_dir, db_provider); + Initialize(in_progress_db_dir); } InProgressDownloadManager::~InProgressDownloadManager() = default; @@ -328,20 +326,13 @@ } void InProgressDownloadManager::Initialize( - const base::FilePath& in_progress_db_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider) { - std::unique_ptr<DownloadDB> download_db; - - if (use_empty_db_) { - download_db = std::make_unique<DownloadDB>(); - } else { - download_db = std::make_unique<DownloadDBImpl>( - DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, in_progress_db_dir, - db_provider); - } - - download_db_cache_ = - std::make_unique<DownloadDBCache>(std::move(download_db)); + const base::FilePath& in_progress_db_dir) { + download_db_cache_ = std::make_unique<DownloadDBCache>( + in_progress_db_dir.empty() + ? std::make_unique<DownloadDB>() + : std::make_unique<DownloadDBImpl>( + DownloadNamespace::NAMESPACE_BROWSER_DOWNLOAD, + in_progress_db_dir)); download_db_cache_->Initialize(base::BindOnce( &InProgressDownloadManager::OnDBInitialized, weak_factory_.GetWeakPtr())); }
diff --git a/components/download/public/common/in_progress_download_manager.h b/components/download/public/common/in_progress_download_manager.h index 5113d634..a8c3506 100644 --- a/components/download/public/common/in_progress_download_manager.h +++ b/components/download/public/common/in_progress_download_manager.h
@@ -32,10 +32,6 @@ class Connector; } // namespace service_manager -namespace leveldb_proto { -class ProtoDatabaseProvider; -} // namespace leveldb_proto - namespace download { class DownloadDBCache; @@ -81,12 +77,8 @@ }; using IsOriginSecureCallback = base::RepeatingCallback<bool(const GURL&)>; - // Creates a new InProgressDownloadManager instance. If |in_progress_db_dir| - // is empty then it will use an empty database and no history will be saved. - // |db_provider| can be nullptr if |in_progress_db_dir| is empty. InProgressDownloadManager(Delegate* delegate, const base::FilePath& in_progress_db_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider, const IsOriginSecureCallback& is_origin_secure_cb, const URLSecurityPolicy& url_security_policy, service_manager::Connector* connector); @@ -202,8 +194,7 @@ std::unique_ptr<download::DownloadItemImpl> download); private: - void Initialize(const base::FilePath& in_progress_db_dir, - leveldb_proto::ProtoDatabaseProvider* db_provider); + void Initialize(const base::FilePath& in_progress_db_dir); // UrlDownloadHandler::Delegate implementations. void OnUrlDownloadStarted(
diff --git a/components/feed/core/feed_logging_metrics.cc b/components/feed/core/feed_logging_metrics.cc index dfac2ea..deb2f1b 100644 --- a/components/feed/core/feed_logging_metrics.cc +++ b/components/feed/core/feed_logging_metrics.cc
@@ -16,6 +16,7 @@ #include "base/strings/stringprintf.h" #include "base/time/clock.h" #include "base/time/time.h" +#include "components/feed/core/feed_scheduler_host.h" #include "ui/base/mojom/window_open_disposition.mojom.h" namespace feed { @@ -476,9 +477,13 @@ FeedLoggingMetrics::FeedLoggingMetrics( HistoryURLCheckCallback history_url_check_callback, - base::Clock* clock) + base::Clock* clock, + FeedSchedulerHost* scheduler_host) : history_url_check_callback_(std::move(history_url_check_callback)), - clock_(clock) {} + clock_(clock), + scheduler_host_(scheduler_host) { + DCHECK(scheduler_host_); +} FeedLoggingMetrics::~FeedLoggingMetrics() = default; @@ -612,6 +617,10 @@ } void FeedLoggingMetrics::OnMoreButtonClicked(int position) { + // Inform the user classifier that a suggestion was consumed + // (https://crbug.com/992517). + scheduler_host_->OnSuggestionConsumed(); + // The "more" card can appear in addition to the actual suggestions, so add // one extra bucket to this histogram. UMA_HISTOGRAM_EXACT_LINEAR(
diff --git a/components/feed/core/feed_logging_metrics.h b/components/feed/core/feed_logging_metrics.h index 992b65c6..c0398a7 100644 --- a/components/feed/core/feed_logging_metrics.h +++ b/components/feed/core/feed_logging_metrics.h
@@ -12,6 +12,7 @@ #include "base/callback.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "components/feed/core/feed_scheduler_host.h" #include "url/gurl.h" namespace base { @@ -36,7 +37,8 @@ base::RepeatingCallback<void(const GURL&, CheckURLVisitCallback)>; explicit FeedLoggingMetrics(HistoryURLCheckCallback callback, - base::Clock* clock); + base::Clock* clock, + FeedSchedulerHost* scheduler_host); ~FeedLoggingMetrics(); // |suggestions_count| contains how many cards show to users. It does not @@ -123,6 +125,8 @@ // Used to access current time, injected for testing. base::Clock* clock_; + FeedSchedulerHost* scheduler_host_; + base::WeakPtrFactory<FeedLoggingMetrics> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FeedLoggingMetrics);
diff --git a/components/feed/core/feed_logging_metrics_unittest.cc b/components/feed/core/feed_logging_metrics_unittest.cc index 2f38660..090fa34 100644 --- a/components/feed/core/feed_logging_metrics_unittest.cc +++ b/components/feed/core/feed_logging_metrics_unittest.cc
@@ -8,12 +8,15 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/simple_test_clock.h" #include "base/time/time.h" +#include "components/feed/core/user_classifier.h" +#include "components/prefs/testing_pref_service.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/mojom/window_open_disposition.mojom.h" using testing::ElementsAre; using testing::IsEmpty; +using testing::SizeIs; namespace feed { namespace { @@ -52,8 +55,14 @@ EXPECT_TRUE(base::Time::FromUTCString(kNowString, &now)); test_clock_.SetNow(now); + FeedSchedulerHost::RegisterProfilePrefs(prefs_.registry()); + UserClassifier::RegisterProfilePrefs(prefs_.registry()); + scheduler_host_ = + std::make_unique<FeedSchedulerHost>(&prefs_, &prefs_, &test_clock_); + feed_logging_metrics_ = std::make_unique<FeedLoggingMetrics>( - base::BindRepeating(&CheckURLVisit), &test_clock_); + base::BindRepeating(&CheckURLVisit), &test_clock_, + scheduler_host_.get()); } FeedLoggingMetrics* feed_logging_metrics() { @@ -64,6 +73,10 @@ private: base::SimpleTestClock test_clock_; + TestingPrefServiceSimple prefs_; + + std::unique_ptr<FeedSchedulerHost> scheduler_host_; + std::unique_ptr<FeedLoggingMetrics> feed_logging_metrics_; DISALLOW_COPY_AND_ASSIGN(FeedLoggingMetricsTest); @@ -227,4 +240,18 @@ ElementsAre(base::Bucket(/*min=*/8, /*count=*/1))); } +TEST_F(FeedLoggingMetricsTest, ShouldLogOnMoreButtonClicked) { + base::HistogramTester histogram_tester; + + feed_logging_metrics()->OnMoreButtonClicked(1); + EXPECT_THAT(histogram_tester.GetAllSamples( + "NewTabPage.ContentSuggestions.MoreButtonClicked.Articles"), + ElementsAre(base::Bucket(/*min=*/1, /*count=*/1))); + + // User classifier should have been informed of a suggestion being consumed. + EXPECT_THAT(histogram_tester.GetAllSamples( + "NewTabPage.UserClassifier.AverageHoursToUseSuggestions"), + SizeIs(1)); +} + } // namespace feed
diff --git a/components/gcm_driver/DEPS b/components/gcm_driver/DEPS index e3fe279..139d44ec 100644 --- a/components/gcm_driver/DEPS +++ b/components/gcm_driver/DEPS
@@ -16,6 +16,7 @@ # Whitelist specific headers from //google_apis/gaia. Contact # blundell@chromium.org if looking to add more. + "+google_apis/gaia/core_account_id.h", "+google_apis/gaia/gaia_oauth_client.h", "+google_apis/gaia/google_service_auth_error.h", "+google_apis/gcm",
diff --git a/components/gcm_driver/fake_gcm_client.cc b/components/gcm_driver/fake_gcm_client.cc index 0ae0490..f644b6b 100644 --- a/components/gcm_driver/fake_gcm_client.cc +++ b/components/gcm_driver/fake_gcm_client.cc
@@ -199,8 +199,7 @@ const AccountMapping& account_mapping) { } -void FakeGCMClient::RemoveAccountMapping(const std::string& account_id) { -} +void FakeGCMClient::RemoveAccountMapping(const CoreAccountId& account_id) {} void FakeGCMClient::SetLastTokenFetchTime(const base::Time& time) { }
diff --git a/components/gcm_driver/fake_gcm_client.h b/components/gcm_driver/fake_gcm_client.h index 8939f58..7b7a876 100644 --- a/components/gcm_driver/fake_gcm_client.h +++ b/components/gcm_driver/fake_gcm_client.h
@@ -72,7 +72,7 @@ void SetAccountTokens( const std::vector<AccountTokenInfo>& account_tokens) override; void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; void SetLastTokenFetchTime(const base::Time& time) override; void UpdateHeartbeatTimer( std::unique_ptr<base::RetainingOneShotTimer> timer) override;
diff --git a/components/gcm_driver/fake_gcm_driver.cc b/components/gcm_driver/fake_gcm_driver.cc index e48e826..a05cf96d 100644 --- a/components/gcm_driver/fake_gcm_driver.cc +++ b/components/gcm_driver/fake_gcm_driver.cc
@@ -105,8 +105,7 @@ const AccountMapping& account_mapping) { } -void FakeGCMDriver::RemoveAccountMapping(const std::string& account_id) { -} +void FakeGCMDriver::RemoveAccountMapping(const CoreAccountId& account_id) {} base::Time FakeGCMDriver::GetLastTokenFetchTime() { return base::Time();
diff --git a/components/gcm_driver/fake_gcm_driver.h b/components/gcm_driver/fake_gcm_driver.h index 8d5e681..cc1a9d90 100644 --- a/components/gcm_driver/fake_gcm_driver.h +++ b/components/gcm_driver/fake_gcm_driver.h
@@ -47,7 +47,7 @@ void SetAccountTokens( const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; base::Time GetLastTokenFetchTime() override; void SetLastTokenFetchTime(const base::Time& time) override; void WakeFromSuspendForHeartbeat(bool wake) override;
diff --git a/components/gcm_driver/gcm_account_mapper_unittest.cc b/components/gcm_driver/gcm_account_mapper_unittest.cc index 5907cbf..fa8f19cf 100644 --- a/components/gcm_driver/gcm_account_mapper_unittest.cc +++ b/components/gcm_driver/gcm_account_mapper_unittest.cc
@@ -91,7 +91,7 @@ // GCMDriver implementation: void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; void RegisterImpl(const std::string& app_id, const std::vector<std::string>& sender_ids) override; @@ -111,7 +111,7 @@ return account_mapping_; } const std::string& last_message_id() const { return last_message_id_; } - const std::string& last_removed_account_id() const { + const CoreAccountId& last_removed_account_id() const { return last_removed_account_id_; } LastMessageAction last_action() const { return last_action_; } @@ -125,7 +125,7 @@ private: AccountMapping account_mapping_; std::string last_message_id_; - std::string last_removed_account_id_; + CoreAccountId last_removed_account_id_; LastMessageAction last_action_; std::map<std::string, LastMessageAction> all_messages_; bool registration_id_requested_; @@ -149,7 +149,8 @@ account_mapping_.last_message_id = account_mapping.last_message_id; } -void CustomFakeGCMDriver::RemoveAccountMapping(const std::string& account_id) { +void CustomFakeGCMDriver::RemoveAccountMapping( + const CoreAccountId& account_id) { last_removed_account_id_ = account_id; } @@ -224,7 +225,7 @@ void CustomFakeGCMDriver::Clear() { account_mapping_ = AccountMapping(); last_message_id_.clear(); - last_removed_account_id_.clear(); + last_removed_account_id_ = CoreAccountId(); last_action_ = NONE; registration_id_requested_ = false; }
diff --git a/components/gcm_driver/gcm_client.h b/components/gcm_driver/gcm_client.h index 0242d9d9..69b6f8e 100644 --- a/components/gcm_driver/gcm_client.h +++ b/components/gcm_driver/gcm_client.h
@@ -16,6 +16,7 @@ #include "components/gcm_driver/common/gcm_message.h" #include "components/gcm_driver/gcm_activity.h" #include "components/gcm_driver/registration_info.h" +#include "google_apis/gaia/core_account_id.h" #include "services/network/public/mojom/proxy_resolving_socket.mojom-forward.h" namespace base { @@ -142,7 +143,7 @@ // Information about account. struct AccountTokenInfo { - std::string account_id; + CoreAccountId account_id; std::string email; std::string access_token; }; @@ -323,7 +324,7 @@ // Removes the account mapping related to |account_id| from the persistent // store. - virtual void RemoveAccountMapping(const std::string& account_id) = 0; + virtual void RemoveAccountMapping(const CoreAccountId& account_id) = 0; // Sets last token fetch time in persistent store. virtual void SetLastTokenFetchTime(const base::Time& time) = 0;
diff --git a/components/gcm_driver/gcm_client_impl.cc b/components/gcm_driver/gcm_client_impl.cc index f6a6a35..9c72a7f 100644 --- a/components/gcm_driver/gcm_client_impl.cc +++ b/components/gcm_driver/gcm_client_impl.cc
@@ -595,7 +595,7 @@ weak_ptr_factory_.GetWeakPtr())); } -void GCMClientImpl::RemoveAccountMapping(const std::string& account_id) { +void GCMClientImpl::RemoveAccountMapping(const CoreAccountId& account_id) { DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); gcm_store_->RemoveAccountMapping( account_id,
diff --git a/components/gcm_driver/gcm_client_impl.h b/components/gcm_driver/gcm_client_impl.h index 35c6107..f9fe0a9d 100644 --- a/components/gcm_driver/gcm_client_impl.h +++ b/components/gcm_driver/gcm_client_impl.h
@@ -140,7 +140,7 @@ void SetAccountTokens( const std::vector<AccountTokenInfo>& account_tokens) override; void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; void SetLastTokenFetchTime(const base::Time& time) override; void UpdateHeartbeatTimer( std::unique_ptr<base::RetainingOneShotTimer> timer) override;
diff --git a/components/gcm_driver/gcm_driver.h b/components/gcm_driver/gcm_driver.h index 9abeea2..7549fc80 100644 --- a/components/gcm_driver/gcm_driver.h +++ b/components/gcm_driver/gcm_driver.h
@@ -254,7 +254,7 @@ // Removes the account mapping information reated to |account_id| from // persistent store. - virtual void RemoveAccountMapping(const std::string& account_id) = 0; + virtual void RemoveAccountMapping(const CoreAccountId& account_id) = 0; // Getter and setter of last token fetch time. virtual base::Time GetLastTokenFetchTime() = 0;
diff --git a/components/gcm_driver/gcm_driver_android.cc b/components/gcm_driver/gcm_driver_android.cc index 6d045ea..9738d1c9 100644 --- a/components/gcm_driver/gcm_driver_android.cc +++ b/components/gcm_driver/gcm_driver_android.cc
@@ -205,7 +205,7 @@ NOTIMPLEMENTED(); } -void GCMDriverAndroid::RemoveAccountMapping(const std::string& account_id) { +void GCMDriverAndroid::RemoveAccountMapping(const CoreAccountId& account_id) { NOTIMPLEMENTED(); }
diff --git a/components/gcm_driver/gcm_driver_android.h b/components/gcm_driver/gcm_driver_android.h index 3e619e21..99176b8 100644 --- a/components/gcm_driver/gcm_driver_android.h +++ b/components/gcm_driver/gcm_driver_android.h
@@ -79,7 +79,7 @@ void SetAccountTokens( const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; base::Time GetLastTokenFetchTime() override; void SetLastTokenFetchTime(const base::Time& time) override; void WakeFromSuspendForHeartbeat(bool wake) override;
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc index 3597b739..e999bc7 100644 --- a/components/gcm_driver/gcm_driver_desktop.cc +++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -93,7 +93,7 @@ void SetAccountTokens( const std::vector<GCMClient::AccountTokenInfo>& account_tokens); void UpdateAccountMapping(const AccountMapping& account_mapping); - void RemoveAccountMapping(const std::string& account_id); + void RemoveAccountMapping(const CoreAccountId& account_id); void SetLastTokenFetchTime(const base::Time& time); void WakeFromSuspendForHeartbeat(bool wake); void AddHeartbeatInterval(const std::string& scope, int interval_ms); @@ -396,7 +396,7 @@ } void GCMDriverDesktop::IOWorker::RemoveAccountMapping( - const std::string& account_id) { + const CoreAccountId& account_id) { DCHECK(io_thread_->RunsTasksInCurrentSequence()); if (gcm_client_) @@ -831,7 +831,7 @@ base::Unretained(io_worker_.get()), account_mapping)); } -void GCMDriverDesktop::RemoveAccountMapping(const std::string& account_id) { +void GCMDriverDesktop::RemoveAccountMapping(const CoreAccountId& account_id) { DCHECK(ui_thread_->RunsTasksInCurrentSequence()); io_thread_->PostTask(
diff --git a/components/gcm_driver/gcm_driver_desktop.h b/components/gcm_driver/gcm_driver_desktop.h index 482e032..b87c11d6 100644 --- a/components/gcm_driver/gcm_driver_desktop.h +++ b/components/gcm_driver/gcm_driver_desktop.h
@@ -91,7 +91,7 @@ void SetAccountTokens( const std::vector<GCMClient::AccountTokenInfo>& account_tokens) override; void UpdateAccountMapping(const AccountMapping& account_mapping) override; - void RemoveAccountMapping(const std::string& account_id) override; + void RemoveAccountMapping(const CoreAccountId& account_id) override; base::Time GetLastTokenFetchTime() override; void SetLastTokenFetchTime(const base::Time& time) override; void WakeFromSuspendForHeartbeat(bool wake) override;
diff --git a/components/invalidation/impl/fcm_network_handler_unittests.cc b/components/invalidation/impl/fcm_network_handler_unittests.cc index bc082e0a..443850d 100644 --- a/components/invalidation/impl/fcm_network_handler_unittests.cc +++ b/components/invalidation/impl/fcm_network_handler_unittests.cc
@@ -138,7 +138,7 @@ account_tokens)); MOCK_METHOD1(UpdateAccountMapping, void(const gcm::AccountMapping& account_mapping)); - MOCK_METHOD1(RemoveAccountMapping, void(const std::string& account_id)); + MOCK_METHOD1(RemoveAccountMapping, void(const CoreAccountId& account_id)); MOCK_METHOD0(GetLastTokenFetchTime, base::Time()); MOCK_METHOD1(SetLastTokenFetchTime, void(const base::Time& time)); MOCK_METHOD1(WakeFromSuspendForHeartbeat, void(bool wake));
diff --git a/components/leveldb_proto/public/shared_proto_database_client_list.cc b/components/leveldb_proto/public/shared_proto_database_client_list.cc index c535bd0..09df606 100644 --- a/components/leveldb_proto/public/shared_proto_database_client_list.cc +++ b/components/leveldb_proto/public/shared_proto_database_client_list.cc
@@ -67,8 +67,6 @@ return "StrikeService"; case ProtoDbType::HINT_CACHE_STORE: return "PreviewsHintCacheStore"; - case ProtoDbType::DOWNLOAD_DB: - return "DownloadDB"; case ProtoDbType::LAST: NOTREACHED(); return std::string();
diff --git a/components/leveldb_proto/public/shared_proto_database_client_list.h b/components/leveldb_proto/public/shared_proto_database_client_list.h index edeea15..e46ecef 100644 --- a/components/leveldb_proto/public/shared_proto_database_client_list.h +++ b/components/leveldb_proto/public/shared_proto_database_client_list.h
@@ -38,7 +38,6 @@ BUDGET_DATABASE = 18, STRIKE_DATABASE = 19, HINT_CACHE_STORE = 20, - DOWNLOAD_DB = 21, LAST, };
diff --git a/components/mirroring/service/fake_network_service.cc b/components/mirroring/service/fake_network_service.cc index 971a350..7baf7067 100644 --- a/components/mirroring/service/fake_network_service.cc +++ b/components/mirroring/service/fake_network_service.cc
@@ -11,8 +11,8 @@ namespace mirroring { MockUdpSocket::MockUdpSocket(network::mojom::UDPSocketRequest request, - network::mojom::UDPSocketReceiverPtr receiver) - : binding_(this, std::move(request)), receiver_(std::move(receiver)) {} + network::mojom::UDPSocketListenerPtr listener) + : binding_(this, std::move(request)), listener_(std::move(listener)) {} MockUdpSocket::~MockUdpSocket() {} @@ -38,7 +38,7 @@ void MockUdpSocket::OnReceivedPacket(const media::cast::Packet& packet) { if (num_ask_for_receive_) { - receiver_->OnReceived( + listener_->OnReceived( net::OK, base::nullopt, base::span<const uint8_t>( reinterpret_cast<const uint8_t*>(packet.data()), packet.size())); @@ -59,9 +59,9 @@ void MockNetworkContext::CreateUDPSocket( network::mojom::UDPSocketRequest request, - network::mojom::UDPSocketReceiverPtr receiver) { + network::mojom::UDPSocketListenerPtr listener) { udp_socket_ = - std::make_unique<MockUdpSocket>(std::move(request), std::move(receiver)); + std::make_unique<MockUdpSocket>(std::move(request), std::move(listener)); OnUDPSocketCreated(); }
diff --git a/components/mirroring/service/fake_network_service.h b/components/mirroring/service/fake_network_service.h index 36bc4d3..198b4ec 100644 --- a/components/mirroring/service/fake_network_service.h +++ b/components/mirroring/service/fake_network_service.h
@@ -18,7 +18,7 @@ class MockUdpSocket final : public network::mojom::UDPSocket { public: MockUdpSocket(network::mojom::UDPSocketRequest request, - network::mojom::UDPSocketReceiverPtr receiver); + network::mojom::UDPSocketListenerPtr listener); ~MockUdpSocket() override; MOCK_METHOD0(OnSend, void()); @@ -58,7 +58,7 @@ private: mojo::Binding<network::mojom::UDPSocket> binding_; - network::mojom::UDPSocketReceiverPtr receiver_; + network::mojom::UDPSocketListenerPtr listener_; std::unique_ptr<media::cast::Packet> sending_packet_; int num_ask_for_receive_ = 0; @@ -74,7 +74,7 @@ // network::mojom::NetworkContext implementation: void CreateUDPSocket(network::mojom::UDPSocketRequest request, - network::mojom::UDPSocketReceiverPtr receiver) override; + network::mojom::UDPSocketListenerPtr listener) override; void CreateURLLoaderFactory( network::mojom::URLLoaderFactoryRequest request, network::mojom::URLLoaderFactoryParamsPtr params) override;
diff --git a/components/mirroring/service/udp_socket_client.cc b/components/mirroring/service/udp_socket_client.cc index 615a5756..179d4e0d 100644 --- a/components/mirroring/service/udp_socket_client.cc +++ b/components/mirroring/service/udp_socket_client.cc
@@ -105,10 +105,10 @@ const media::cast::PacketReceiverCallbackWithStatus& packet_receiver) { DVLOG(1) << __func__; packet_receiver_callback_ = packet_receiver; - network::mojom::UDPSocketReceiverPtr udp_socket_receiver; - binding_.Bind(mojo::MakeRequest(&udp_socket_receiver)); + network::mojom::UDPSocketListenerPtr udp_socket_listener; + binding_.Bind(mojo::MakeRequest(&udp_socket_listener)); network_context_->CreateUDPSocket(mojo::MakeRequest(&udp_socket_), - std::move(udp_socket_receiver)); + std::move(udp_socket_listener)); network::mojom::UDPSocketOptionsPtr options; udp_socket_->Connect(remote_endpoint_, std::move(options), base::BindOnce(&UdpSocketClient::OnSocketConnected,
diff --git a/components/mirroring/service/udp_socket_client.h b/components/mirroring/service/udp_socket_client.h index c25c01f5..476253d 100644 --- a/components/mirroring/service/udp_socket_client.h +++ b/components/mirroring/service/udp_socket_client.h
@@ -23,7 +23,7 @@ // will be called if the UDPSocket is failed to be created or connected. class COMPONENT_EXPORT(MIRRORING_SERVICE) UdpSocketClient final : public media::cast::PacketTransport, - public network::mojom::UDPSocketReceiver { + public network::mojom::UDPSocketListener { public: UdpSocketClient(const net::IPEndPoint& remote_endpoint, network::mojom::NetworkContext* context, @@ -39,7 +39,7 @@ packet_receiver) override; void StopReceiving() override; - // network::mojom::UDPSocketReceiver implementation. + // network::mojom::UDPSocketListener implementation. void OnReceived(int32_t result, const base::Optional<net::IPEndPoint>& src_addr, base::Optional<base::span<const uint8_t>> data) override; @@ -59,7 +59,7 @@ network::mojom::NetworkContext* const network_context_; base::OnceClosure error_callback_; - mojo::Binding<network::mojom::UDPSocketReceiver> binding_; + mojo::Binding<network::mojom::UDPSocketListener> binding_; // The callback to deliver the received packets to the packet parser. Set // when StartReceiving() is called.
diff --git a/components/ntp_snippets/remote/json_request.cc b/components/ntp_snippets/remote/json_request.cc index 2d0db78..0dc2ecd 100644 --- a/components/ntp_snippets/remote/json_request.cc +++ b/components/ntp_snippets/remote/json_request.cc
@@ -229,9 +229,7 @@ } JsonRequest::Builder& JsonRequest::Builder::SetAuthentication( - const std::string& account_id, const std::string& auth_header) { - obfuscated_gaia_id_ = account_id; auth_header_ = auth_header; return *this; }
diff --git a/components/ntp_snippets/remote/json_request.h b/components/ntp_snippets/remote/json_request.h index 0b0f85e..3fd6f96 100644 --- a/components/ntp_snippets/remote/json_request.h +++ b/components/ntp_snippets/remote/json_request.h
@@ -16,6 +16,7 @@ #include "components/language/core/browser/url_language_histogram.h" #include "components/ntp_snippets/remote/request_params.h" #include "components/ntp_snippets/status.h" +#include "google_apis/gaia/core_account_id.h" #include "services/network/public/cpp/resource_request.h" #include "url/gurl.h" @@ -73,8 +74,7 @@ // Builds a Request object that contains all data to fetch new snippets. std::unique_ptr<JsonRequest> Build() const; - Builder& SetAuthentication(const std::string& account_id, - const std::string& auth_header); + Builder& SetAuthentication(const std::string& auth_header); Builder& SetCreationTime(base::TimeTicks creation_time); // The language_histogram borrowed from the fetcher needs to stay alive // until the request body is built. @@ -126,7 +126,6 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; // Optional properties. - std::string obfuscated_gaia_id_; std::string user_class_; std::string display_capability_; const language::UrlLanguageHistogram* language_histogram_;
diff --git a/components/ntp_snippets/remote/json_request_unittest.cc b/components/ntp_snippets/remote/json_request_unittest.cc index 92642b5..d6d4b771 100644 --- a/components/ntp_snippets/remote/json_request_unittest.cc +++ b/components/ntp_snippets/remote/json_request_unittest.cc
@@ -135,7 +135,7 @@ params.interactive_request = false; builder.SetParams(params) .SetUrl(GURL("http://valid-url.test")) - .SetAuthentication("0BFUSGAIA", "headerstuff") + .SetAuthentication("headerstuff") .SetUserClassForTesting("ACTIVE_NTP_USER") .Build();
diff --git a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc index c8213f0..3a3916a 100644 --- a/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc +++ b/components/ntp_snippets/remote/remote_suggestions_fetcher_impl.cc
@@ -257,7 +257,6 @@ fetch_url_, builder.is_interactive_request()); builder.SetUrl(url).SetAuthentication( - identity_manager_->GetPrimaryAccountId(), base::StringPrintf(kAuthorizationRequestHeaderFormat, oauth_access_token.c_str())); StartRequest(std::move(builder), std::move(callback),
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn index 1d0ab1a5..58cb319 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn
@@ -386,6 +386,7 @@ "builtin_provider_unittest.cc", "clipboard_provider_unittest.cc", "document_provider_unittest.cc", + "document_suggestions_service_unittest.cc", "favicon_cache_unittest.cc", "history_provider_unittest.cc", "history_quick_provider_unittest.cc", @@ -432,9 +433,12 @@ "//components/search", "//components/search_engines", "//components/sessions", + "//components/signin/public/identity_manager:test_support", "//components/strings", + "//components/sync_preferences:test_support", "//components/url_formatter", "//components/variations", + "//components/variations/net:net", "//services/network:test_support", "//sql", "//sql:test_support",
diff --git a/components/omnibox/browser/DEPS b/components/omnibox/browser/DEPS index 55868a6..aaf6678 100644 --- a/components/omnibox/browser/DEPS +++ b/components/omnibox/browser/DEPS
@@ -2,8 +2,8 @@ "+components/bookmarks/browser", "+components/bookmarks/test", "+components/component_updater", - "+components/favicon_base", "+components/favicon/core", + "+components/favicon_base", "+components/grit", "+components/history/core/browser", "+components/history/core/test", @@ -20,8 +20,9 @@ "+components/security_state", "+components/sessions", "+components/signin/public", - "+components/sync", "+components/strings/grit/components_strings.h", + "+components/sync", + "+components/sync_preferences", "+components/url_formatter", "+components/variations", "+components/vector_icons",
diff --git a/components/omnibox/browser/autocomplete_match.cc b/components/omnibox/browser/autocomplete_match.cc index 8e07c25..3a6d677 100644 --- a/components/omnibox/browser/autocomplete_match.cc +++ b/components/omnibox/browser/autocomplete_match.cc
@@ -592,8 +592,7 @@ const GURL& url, const AutocompleteInput& input, const TemplateURLService* template_url_service, - const base::string16& keyword, - const std::string& additional_query_params) { + const base::string16& keyword) { if (!url.is_valid()) return url; @@ -620,12 +619,10 @@ stripped_destination_url, template_url_service->search_terms_data(), &search_terms)) { - TemplateURLRef::SearchTermsArgs search_terms_args(search_terms); - if (!additional_query_params.empty()) - search_terms_args.additional_query_params = additional_query_params; stripped_destination_url = GURL(template_url->url_ref().ReplaceSearchTerms( - search_terms_args, template_url_service->search_terms_data())); + TemplateURLRef::SearchTermsArgs(search_terms), + template_url_service->search_terms_data())); } } @@ -904,6 +901,19 @@ is_keyword_verbatim_match; } +bool AutocompleteMatch::IsSearchProviderSearchSuggestion() const { + const bool from_search_provider = + (provider && provider->type() == AutocompleteProvider::TYPE_SEARCH); + return from_search_provider && type == AutocompleteMatchType::SEARCH_SUGGEST; +} + +bool AutocompleteMatch::IsOnDeviceSearchSuggestion() const { + const bool from_on_device_provider = + (provider && + provider->type() == AutocompleteProvider::TYPE_ON_DEVICE_HEAD); + return from_on_device_provider && subtype_identifier == 271; +} + bool AutocompleteMatch::SupportsDeletion() const { if (deletable) return true;
diff --git a/components/omnibox/browser/autocomplete_match.h b/components/omnibox/browser/autocomplete_match.h index 9fa7bda..6c471d4 100644 --- a/components/omnibox/browser/autocomplete_match.h +++ b/components/omnibox/browser/autocomplete_match.h
@@ -259,16 +259,10 @@ // - If the match's keyword is known, it can be provided in |keyword|. // Otherwise, it can be left empty and the template URL (if any) is // determined from the destination's hostname. - // - If |additional_query_params| is provided, these will be added to the - // resulting URL in the cases where a template URL is used. This is used to - // distinguish cases such as entity suggestions where the response contains - // additional meaningful parameters beyond the search terms themselves. - static GURL GURLToStrippedGURL( - const GURL& url, - const AutocompleteInput& input, - const TemplateURLService* template_url_service, - const base::string16& keyword, - const std::string& additional_query_params = ""); + static GURL GURLToStrippedGURL(const GURL& url, + const AutocompleteInput& input, + const TemplateURLService* template_url_service, + const base::string16& keyword); // Sets the |match_in_scheme| and |match_in_subdomain| flags based on the // provided |url| and list of substring |match_positions|. |match_positions| @@ -389,6 +383,14 @@ // shown. bool IsVerbatimType() const; + // Returns whether this match is a search suggestion provided by search + // provider. + bool IsSearchProviderSearchSuggestion() const; + + // Returns whether this match is a search suggestion provided by on device + // providers. + bool IsOnDeviceSearchSuggestion() const; + // Returns whether this match or any duplicate of this match can be deleted. // This is used to decide whether we should call DeleteMatch(). bool SupportsDeletion() const;
diff --git a/components/omnibox/browser/autocomplete_provider.h b/components/omnibox/browser/autocomplete_provider.h index e862204..1c4e291 100644 --- a/components/omnibox/browser/autocomplete_provider.h +++ b/components/omnibox/browser/autocomplete_provider.h
@@ -290,6 +290,8 @@ protected: friend class base::RefCountedThreadSafe<AutocompleteProvider>; FRIEND_TEST_ALL_PREFIXES(BookmarkProviderTest, InlineAutocompletion); + FRIEND_TEST_ALL_PREFIXES(AutocompleteResultTest, + DemoteOnDeviceSearchSuggestions); typedef std::pair<bool, base::string16> FixupReturn;
diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc index 72b2be3d..5be1c28 100644 --- a/components/omnibox/browser/autocomplete_result.cc +++ b/components/omnibox/browser/autocomplete_result.cc
@@ -177,6 +177,8 @@ #endif SortAndDedupMatches(input.current_page_classification(), &matches_); + DemoteOnDeviceSearchSuggestions(); + // Sort and trim to the most relevant GetMaxMatches() matches. CompareWithDemoteByType<AutocompleteMatch> comparing_object( input.current_page_classification()); @@ -196,6 +198,8 @@ std::rotate(matches_.begin(), it, next); } + DiscourageTopMatchFromBeingSearchEntity(&matches_); + size_t max_url_count = 0; if (OmniboxFieldTrial::IsMaxURLMatchesFeatureEnabled() && (max_url_count = OmniboxFieldTrial::GetMaxURLMatches()) != 0) @@ -281,6 +285,69 @@ GURL() : ComputeAlternateNavUrl(input, *default_match_); } +void AutocompleteResult::DemoteOnDeviceSearchSuggestions() { + const std::string mode = base::GetFieldTrialParamValueByFeature( + omnibox::kOnDeviceHeadProvider, "DemoteOnDeviceSearchSuggestionsMode"); + if (mode != "decrease-relevances" && mode != "remove-suggestions") + return; + + std::vector<AutocompleteMatch*> on_device_search_suggestions; + int search_provider_search_suggestion_min_relevance = -1, + on_device_search_suggestion_max_relevance = -1; + bool search_provider_search_suggestion_exists = false; + + // Loop through all matches to check the existence of SearchProvider search + // suggestions and OnDeviceProvider search suggestions. Also calculate the + // maximum OnDeviceProvider search suggestion relevance and the minimum + // SearchProvider search suggestion relevance, in preparation to adjust the + // relevances for OnDeviceProvider search suggestions next. + for (auto& m : matches_) { + if (m.IsSearchProviderSearchSuggestion()) { + search_provider_search_suggestion_exists = true; + if (mode == "decrease-relevances") { + search_provider_search_suggestion_min_relevance = + search_provider_search_suggestion_min_relevance < 0 + ? m.relevance + : std::min(search_provider_search_suggestion_min_relevance, + m.relevance); + } + } else if (m.IsOnDeviceSearchSuggestion()) { + on_device_search_suggestions.push_back(&m); + if (mode == "decrease-relevances") { + on_device_search_suggestion_max_relevance = + std::max(on_device_search_suggestion_max_relevance, m.relevance); + } + } + } + + // If SearchProvider search suggestions present, adjust the relevances for + // OnDeviceProvider search suggestions, determined by mode: + // 1. decrease-relevances: if any OnDeviceProvider search suggestion has a + // higher relevance than any SearchProvider one, subtract the difference + // b/w the maximum OnDeviceProvider search suggestion relevance and the + // minimum SearchProvider search suggestion relevance from the relevances + // for all OnDeviceProvider ones. + // 2. remove-suggestions: set the relevances to 0 for all OnDeviceProvider + // search suggestions. + if (search_provider_search_suggestion_exists && + !on_device_search_suggestions.empty()) { + if (mode == "decrease-relevances" && + on_device_search_suggestion_max_relevance >= + search_provider_search_suggestion_min_relevance) { + int relevance_offset = + (on_device_search_suggestion_max_relevance - + search_provider_search_suggestion_min_relevance + 1); + for (auto* m : on_device_search_suggestions) + m->relevance = m->relevance > relevance_offset + ? m->relevance - relevance_offset + : 0; + } else if (mode == "remove-suggestions") { + for (auto* m : on_device_search_suggestions) + m->relevance = 0; + } + } +} + void AutocompleteResult::AppendDedicatedPedalMatches( AutocompleteProviderClient* client, const AutocompleteInput& input) { @@ -390,7 +457,7 @@ // the first allowed-to-be--default match in the list. // The goal of this behavior is to ensure that in situations where the user // expects to see a commonly visited URL as the default match, the URL is not - // supressed by type demotion. + // suppressed by type demotion. // However, even if IsPreserveDefaultMatchScoreEnabled is true, we don't care // about this URL behavior when the user is using the fakebox, which is // intended to work more like a search-only box. Unless the user's input is a @@ -416,6 +483,39 @@ } } +// static +void AutocompleteResult::DiscourageTopMatchFromBeingSearchEntity( + ACMatches* matches) { + if (matches->empty()) + return; + + auto top_match = matches->begin(); + if (top_match->type != ACMatchType::SEARCH_SUGGEST_ENTITY) + return; + + // Search the duplicates for a equivalent non-entity search suggestion. + for (auto it = top_match->duplicate_matches.begin(); + it != top_match->duplicate_matches.end(); ++it) { + // Reject any ineligible duplicates. + if (it->type == ACMatchType::SEARCH_SUGGEST_ENTITY || + !AutocompleteMatch::IsSearchType(it->type) || + !it->allowed_to_be_default_match) { + continue; + } + + // Copy the non-entity match, then erase it from the list of duplicates. + // We do this first, because the insertion operation invalidates all + // iterators, including |top_match|. + AutocompleteMatch non_entity_match_copy = *it; + top_match->duplicate_matches.erase(it); + + // Promote the non-entity match to the top, then immediately return, since + // all our iterators are invalid after the insertion. + matches->insert(matches->begin(), std::move(non_entity_match_copy)); + return; + } +} + void AutocompleteResult::Reset() { matches_.clear(); default_match_ = end();
diff --git a/components/omnibox/browser/autocomplete_result.h b/components/omnibox/browser/autocomplete_result.h index 1e407ca..b2fe7e7 100644 --- a/components/omnibox/browser/autocomplete_result.h +++ b/components/omnibox/browser/autocomplete_result.h
@@ -102,6 +102,11 @@ static ACMatches::iterator FindTopMatch(const AutocompleteInput& input, ACMatches* matches); + // If the top match is a Search Entity, and it was deduplicated with a + // non-entity match, split off the non-entity match from the list of + // duplicates and promote it to the top. + static void DiscourageTopMatchFromBeingSearchEntity(ACMatches* matches); + const GURL& alternate_nav_url() const { return alternate_nav_url_; } // Clears the matches for this result set. @@ -123,15 +128,6 @@ static GURL ComputeAlternateNavUrl(const AutocompleteInput& input, const AutocompleteMatch& match); - // Sort |matches| by destination, taking into account demotions based on - // |page_classification| when resolving ties about which of several - // duplicates to keep. The matches are also deduplicated. Duplicate matches - // are stored in the |duplicate_matches| vector of the corresponding - // AutocompleteMatch. - static void SortAndDedupMatches( - metrics::OmniboxEventProto::PageClassification page_classification, - ACMatches* matches); - // Prepend missing tail suggestion prefixes in results, if present. void InlineTailPrefixes(); @@ -145,6 +141,9 @@ PedalSuggestionsRemainUnique); FRIEND_TEST_ALL_PREFIXES(AutocompleteResultTest, TestGroupSuggestionsBySearchVsURL); + FRIEND_TEST_ALL_PREFIXES(AutocompleteResultTest, + DemoteOnDeviceSearchSuggestions); + friend class HistoryURLProviderTest; typedef std::map<AutocompleteProvider*, ACMatches> ProviderToMatches; @@ -156,6 +155,15 @@ typedef ACMatches::iterator::difference_type matches_difference_type; #endif + // Sort |matches| by destination, taking into account demotions based on + // |page_classification| when resolving ties about which of several + // duplicates to keep. The matches are also deduplicated. Duplicate matches + // are stored in the |duplicate_matches| vector of the corresponding + // AutocompleteMatch. + static void SortAndDedupMatches( + metrics::OmniboxEventProto::PageClassification page_classification, + ACMatches* matches); + // Examines |first| and |second| and returns the match that is preferred when // choosing between candidate duplicates. Note that this may modify the // relevance, allowed_to_be_default_match, or inline_autocompletion values of @@ -208,6 +216,16 @@ // are shifted later. static void GroupSuggestionsBySearchVsURL(iterator begin, iterator end); + // If we have SearchProvider search suggestions, demote OnDeviceProvider + // search suggestions, since, which in general have lower quality than + // SearchProvider search suggestions. The demotion can happen in two ways, + // controlled by Finch (1. decrease-relevances or 2. remove-suggestions): + // 1. Decrease the on device search suggestion relevances that they will + // always be shown after SearchProvider search suggestions. + // 2. Set the relevances of OnDeviceProvider search suggestions to 0, such + // that they will be removed from result list later. + void DemoteOnDeviceSearchSuggestions(); + ACMatches matches_; const_iterator default_match_;
diff --git a/components/omnibox/browser/autocomplete_result_unittest.cc b/components/omnibox/browser/autocomplete_result_unittest.cc index 8eece742..3106e18f 100644 --- a/components/omnibox/browser/autocomplete_result_unittest.cc +++ b/components/omnibox/browser/autocomplete_result_unittest.cc
@@ -749,6 +749,85 @@ } } +TEST_F(AutocompleteResultTest, DemoteOnDeviceSearchSuggestions) { + // clang-format off + TestData data[] = { + {1, 1, 500, true}, + {2, 2, 1100, true}, + {3, 2, 1000, true}, + {4, 1, 1300, true}, + {5, 1, 1200, true}, + }; + // clang-format on + + ACMatches matches; + PopulateAutocompleteMatches(data, base::size(data), &matches); + matches[0].type = AutocompleteMatchType::SEARCH_SUGGEST; + matches[1].type = AutocompleteMatchType::SEARCH_SUGGEST; + matches[2].type = AutocompleteMatchType::SEARCH_SUGGEST; + matches[3].type = AutocompleteMatchType::SEARCH_SUGGEST; + matches[4].type = AutocompleteMatchType::SEARCH_SUGGEST; + + // match1, match2 are set as on device head suggestion. + matches[1].subtype_identifier = 271; + matches[2].subtype_identifier = 271; + matches[0].provider->type_ = AutocompleteProvider::TYPE_SEARCH; + matches[1].provider->type_ = AutocompleteProvider::TYPE_ON_DEVICE_HEAD; + + AutocompleteInput input(base::ASCIIToUTF16("a"), + metrics::OmniboxEventProto::OTHER, + TestSchemeClassifier()); + + // Test setting on device suggestion relevances to 0. + { + base::test::ScopedFeatureList feature_list; + feature_list.InitAndEnableFeatureWithParameters( + omnibox::kOnDeviceHeadProvider, + {{"DemoteOnDeviceSearchSuggestionsMode", "remove-suggestions"}}); + AutocompleteResult result; + result.AppendMatches(input, matches); + result.DemoteOnDeviceSearchSuggestions(); + EXPECT_EQ(5UL, result.size()); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(0)->provider->type()); + EXPECT_EQ(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(1)->provider->type()); + EXPECT_EQ(0, result.match_at(1)->relevance); + EXPECT_EQ(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(2)->provider->type()); + EXPECT_EQ(0, result.match_at(2)->relevance); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(3)->provider->type()); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(4)->provider->type()); + } + + // Test setting on device suggestion relevances lower than search provider + // suggestions. + { + base::test::ScopedFeatureList feature_list; + feature_list.InitAndEnableFeatureWithParameters( + omnibox::kOnDeviceHeadProvider, + {{"DemoteOnDeviceSearchSuggestionsMode", "decrease-relevances"}}); + AutocompleteResult result; + result.AppendMatches(input, matches); + result.DemoteOnDeviceSearchSuggestions(); + EXPECT_EQ(5UL, result.size()); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(0)->provider->type()); + EXPECT_EQ(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(1)->provider->type()); + EXPECT_LT(result.match_at(1)->relevance, result.match_at(0)->relevance); + EXPECT_EQ(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(2)->provider->type()); + EXPECT_LT(result.match_at(2)->relevance, result.match_at(0)->relevance); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(3)->provider->type()); + EXPECT_NE(AutocompleteProvider::TYPE_ON_DEVICE_HEAD, + result.match_at(4)->provider->type()); + } +} + TEST_F(AutocompleteResultTest, DemoteByTypeButPreserveDefaultMatchScore) { base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( @@ -1067,6 +1146,10 @@ }, // This match will be the first result but it won't affect the entity // deduping because it has a different URL. + // + // Also keeping this as the default match allows us to test that Entities + // and plain matches are deduplicated when they are not the default match. + // See SortAndCullPreferEntitiesButKeepDefaultPlainMatches for details. { AutocompleteMatchType::SEARCH_SUGGEST_PERSONALIZED, "http://search/?q=bar", 1200, true, "foo", "oo" @@ -1138,6 +1221,50 @@ result.match_at(0)->inline_autocompletion); } +TEST_F(AutocompleteResultTest, + SortAndCullPreferEntitiesButKeepDefaultPlainMatches) { + // clang-format off + std::vector<EntityTestData> test_cases = { + { + AutocompleteMatchType::SEARCH_SUGGEST, + "http://search/?q=foo", 1001, true, "foo", "" + }, + { + AutocompleteMatchType::SEARCH_SUGGEST_ENTITY, + "http://search/?q=foo", 1000, false, "foo", "" + }, + { + AutocompleteMatchType::SEARCH_SUGGEST, + "http://search/?q=foo", 900, true, "foo", "oo" + }, + }; + // clang-format on + ACMatches matches; + PopulateEntityTestCases(test_cases, &matches); + + AutocompleteInput input(base::ASCIIToUTF16("f"), + metrics::OmniboxEventProto::OTHER, + TestSchemeClassifier()); + AutocompleteResult result; + result.AppendMatches(input, matches); + result.SortAndCull(input, template_url_service_.get()); + + // The first result will be a plain match. + EXPECT_EQ(2UL, result.size()); + EXPECT_EQ(AutocompleteMatchType::SEARCH_SUGGEST, result.match_at(0)->type); + EXPECT_EQ(1001, result.match_at(0)->relevance); + + // The second result will be the result of deduping the Suggest Entity with + // the third result. It should have still consumed the inline autocomplete + // and allowed_to_be_default qualities from the other two. + EXPECT_EQ(AutocompleteMatchType::SEARCH_SUGGEST_ENTITY, + result.match_at(1)->type); + EXPECT_EQ(1001, result.match_at(1)->relevance); + EXPECT_TRUE(result.match_at(1)->allowed_to_be_default_match); + EXPECT_EQ(base::ASCIIToUTF16("oo"), + result.match_at(1)->inline_autocompletion); +} + TEST_F(AutocompleteResultTest, SortAndCullPromoteDuplicateSearchURLs) { // Register a template URL that corresponds to 'foo' search engine. TemplateURLData url_data;
diff --git a/components/omnibox/browser/document_provider.cc b/components/omnibox/browser/document_provider.cc index e7417d60..80c3066 100644 --- a/components/omnibox/browser/document_provider.cc +++ b/components/omnibox/browser/document_provider.cc
@@ -391,16 +391,10 @@ return; } - // Create a request for suggestions, routing completion to - base::BindOnce(&DocumentProvider::OnDocumentSuggestionsLoaderAvailable, - weak_ptr_factory_.GetWeakPtr()), - base::BindOnce(&DocumentProvider::OnURLLoadComplete, - base::Unretained(this) /* own SimpleURLLoader */); - done_ = false; // Set true in callbacks. client_->GetDocumentSuggestionsService(/*create_if_necessary=*/true) ->CreateDocumentSuggestionsRequest( - input.text(), client_->GetTemplateURLService(), + input.text(), client_->IsOffTheRecord(), base::BindOnce( &DocumentProvider::OnDocumentSuggestionsLoaderAvailable, weak_ptr_factory_.GetWeakPtr()),
diff --git a/components/omnibox/browser/document_suggestions_service.cc b/components/omnibox/browser/document_suggestions_service.cc index 9881fee..7b8c5f7 100644 --- a/components/omnibox/browser/document_suggestions_service.cc +++ b/components/omnibox/browser/document_suggestions_service.cc
@@ -12,13 +12,12 @@ #include "base/json/json_writer.h" #include "base/memory/scoped_refptr.h" #include "base/metrics/field_trial_params.h" -#include "base/strings/stringprintf.h" #include "base/values.h" #include "components/omnibox/browser/document_provider.h" #include "components/omnibox/common/omnibox_features.h" -#include "components/search_engines/template_url_service.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/signin/public/identity_manager/primary_account_access_token_fetcher.h" +#include "components/variations/net/variations_http_headers.h" #include "components/variations/variations_associated_data.h" #include "net/base/load_flags.h" #include "net/traffic_annotation/network_traffic_annotation.h" @@ -72,7 +71,7 @@ void DocumentSuggestionsService::CreateDocumentSuggestionsRequest( const base::string16& query, - const TemplateURLService* template_url_service, + bool is_incognito, StartCallback start_callback, CompletionCallback completion_callback) { std::string endpoint = base::GetFieldTrialParamValueByFeature( @@ -111,6 +110,14 @@ request->method = "POST"; std::string request_body = BuildDocumentSuggestionRequest(query); request->load_flags = net::LOAD_DO_NOT_SAVE_COOKIES; + // It is expected that the user is signed in here. But we only care about + // experiment IDs from the variations server, which do not require the + // signed-in version of this method. + variations::AppendVariationsHeaderUnknownSignedIn( + request->url, + is_incognito ? variations::InIncognito::kYes + : variations::InIncognito::kNo, + request.get()); // Create and fetch an OAuth2 token. std::string scope = "https://www.googleapis.com/auth/cloud_search.query";
diff --git a/components/omnibox/browser/document_suggestions_service.h b/components/omnibox/browser/document_suggestions_service.h index 680ba2b..8fda040b 100644 --- a/components/omnibox/browser/document_suggestions_service.h +++ b/components/omnibox/browser/document_suggestions_service.h
@@ -22,7 +22,6 @@ } // namespace signin class GoogleServiceAuthError; -class TemplateURLService; // A service to fetch suggestions from a remote endpoint given a URL. class DocumentSuggestionsService : public KeyedService { @@ -43,11 +42,10 @@ // Creates and starts a document suggestion request for |query|. // May obtain an OAuth2 token for the signed-in user. - void CreateDocumentSuggestionsRequest( - const base::string16& query, - const TemplateURLService* template_url_service, - StartCallback start_callback, - CompletionCallback completion_callback); + void CreateDocumentSuggestionsRequest(const base::string16& query, + bool is_incognito, + StartCallback start_callback, + CompletionCallback completion_callback); // Advises the service to stop any process that creates a suggestion request. void StopCreatingDocumentSuggestionsRequest();
diff --git a/components/omnibox/browser/document_suggestions_service_unittest.cc b/components/omnibox/browser/document_suggestions_service_unittest.cc new file mode 100644 index 0000000..e0464f3a --- /dev/null +++ b/components/omnibox/browser/document_suggestions_service_unittest.cc
@@ -0,0 +1,92 @@ +// Copyright 2019 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 "components/omnibox/browser/document_suggestions_service.h" + +#include "base/bind.h" +#include "base/memory/scoped_refptr.h" +#include "base/metrics/field_trial.h" +#include "base/run_loop.h" +#include "base/strings/string_number_conversions.h" +#include "base/strings/utf_string_conversions.h" +#include "base/test/bind_test_util.h" +#include "base/test/scoped_feature_list.h" +#include "base/test/scoped_task_environment.h" +#include "components/signin/public/identity_manager/identity_test_environment.h" +#include "components/sync_preferences/testing_pref_service_syncable.h" +#include "components/variations/net/variations_http_headers.h" +#include "components/variations/variations_associated_data.h" +#include "components/variations/variations_http_header_provider.h" +#include "services/network/public/cpp/resource_request.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" +#include "services/network/test/test_url_loader_factory.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace { + +variations::VariationID kVariationID = 123; + +void OnDocumentSuggestionsLoaderAvailable( + std::unique_ptr<network::SimpleURLLoader> loader) {} + +void OnURLLoadComplete(const network::SimpleURLLoader* source, + std::unique_ptr<std::string> response_body) {} + +class DocumentSuggestionsServiceTest : public testing::Test { + protected: + DocumentSuggestionsServiceTest() + : scoped_task_environment_( + base::test::ScopedTaskEnvironment::MainThreadType::UI), + shared_url_loader_factory_( + base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( + &test_url_loader_factory_)), + identity_test_env_(&test_url_loader_factory_, &prefs_), + field_trial_list_(nullptr), + document_suggestions_service_(new DocumentSuggestionsService( + identity_test_env_.identity_manager(), + shared_url_loader_factory_)) { + // Set up identity manager. + identity_test_env_.SetPrimaryAccount("email"); + identity_test_env_.SetRefreshTokenForPrimaryAccount(); + identity_test_env_.SetAutomaticIssueOfAccessTokens(true); + + // Set up a variation. + variations::VariationsHttpHeaderProvider::GetInstance()->ResetForTesting(); + variations::AssociateGoogleVariationID(variations::GOOGLE_WEB_PROPERTIES, + "trial name", "group name", + kVariationID); + base::FieldTrialList::CreateFieldTrial("trial name", "group name")->group(); + } + + base::test::ScopedTaskEnvironment scoped_task_environment_; + network::TestURLLoaderFactory test_url_loader_factory_; + scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory_; + sync_preferences::TestingPrefServiceSyncable prefs_; + signin::IdentityTestEnvironment identity_test_env_; + base::FieldTrialList field_trial_list_; + std::unique_ptr<DocumentSuggestionsService> document_suggestions_service_; + + DISALLOW_COPY_AND_ASSIGN(DocumentSuggestionsServiceTest); +}; + +TEST_F(DocumentSuggestionsServiceTest, VariationHeaders) { + test_url_loader_factory_.SetInterceptor( + base::BindLambdaForTesting([](const network::ResourceRequest& request) { + EXPECT_TRUE(variations::HasVariationsHeader(request)); + std::string variation = + variations::VariationsHttpHeaderProvider::GetInstance() + ->GetVariationsString(); + EXPECT_EQ(variation, " " + base::NumberToString(kVariationID) + " "); + })); + + document_suggestions_service_->CreateDocumentSuggestionsRequest( + base::ASCIIToUTF16(""), false, + base::BindOnce(OnDocumentSuggestionsLoaderAvailable), + base::BindOnce(OnURLLoadComplete)); + + base::RunLoop().RunUntilIdle(); +} + +} // namespace
diff --git a/components/password_manager/core/browser/leak_detection/BUILD.gn b/components/password_manager/core/browser/leak_detection/BUILD.gn index dee02c1..88c4c4a7 100644 --- a/components/password_manager/core/browser/leak_detection/BUILD.gn +++ b/components/password_manager/core/browser/leak_detection/BUILD.gn
@@ -30,9 +30,15 @@ "encryption_utils.cc", "encryption_utils.h", "leak_detection_check.h", + "leak_detection_request.cc", + "leak_detection_request.h", "leak_detection_request_factory.h", "leak_detection_request_factory_impl.cc", "leak_detection_request_factory_impl.h", + "leak_detection_request_utils.cc", + "leak_detection_request_utils.h", + "single_lookup_response.cc", + "single_lookup_response.h", ] public_deps = [ @@ -70,14 +76,18 @@ "authenticated_leak_check_unittest.cc", "encryption_utils_unittest.cc", "leak_detection_request_factory_impl_unittest.cc", + "leak_detection_request_unittest.cc", + "leak_detection_request_utils_unittest.cc", ] deps = [ ":leak_detection", + ":proto", ":test_support", "//base/test:test_support", "//components/password_manager/core/common", "//components/signin/public/identity_manager:test_support", + "//services/network:test_support", "//testing/gmock", "//testing/gtest", ]
diff --git a/components/password_manager/core/browser/leak_detection/authenticated_leak_check.cc b/components/password_manager/core/browser/leak_detection/authenticated_leak_check.cc index 97ac85a..1f7b2a7 100644 --- a/components/password_manager/core/browser/leak_detection/authenticated_leak_check.cc +++ b/components/password_manager/core/browser/leak_detection/authenticated_leak_check.cc
@@ -4,9 +4,13 @@ #include "components/password_manager/core/browser/leak_detection/authenticated_leak_check.h" +#include <memory> #include <utility> +#include "base/strings/utf_string_conversions.h" #include "components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h" +#include "components/password_manager/core/browser/leak_detection/single_lookup_response.h" #include "components/signin/public/identity_manager/access_token_fetcher.h" #include "components/signin/public/identity_manager/access_token_info.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -61,6 +65,9 @@ void AuthenticatedLeakCheck::Start(const GURL& url, base::StringPiece16 username, base::StringPiece16 password) { + url_ = url; + username_ = base::UTF16ToUTF8(username); + password_ = base::UTF16ToUTF8(password); token_fetcher_ = identity_manager_->CreateAccessTokenFetcherForAccount( GetAccountForRequest(identity_manager_), /*consumer_name=*/"leak_detection_service", {kAPIScope}, @@ -73,14 +80,32 @@ GoogleServiceAuthError error, signin::AccessTokenInfo access_token_info) { token_fetcher_.reset(); - if (error.state() == GoogleServiceAuthError::NONE) { - // The fetcher successfully obtained an access token. - access_token_ = std::move(access_token_info.token); - DVLOG(0) << "Token=" << access_token_; - } else { + if (error.state() != GoogleServiceAuthError::NONE) { DLOG(ERROR) << "Token request error: " << error.error_message(); delegate_->OnError(LeakDetectionError::kTokenRequestFailure); + return; } + + // The fetcher successfully obtained an access token. + access_token_ = std::move(access_token_info.token); + DVLOG(0) << "Token=" << access_token_; + + request_ = std::make_unique<LeakDetectionRequest>(); + request_->LookupSingleLeak( + url_loader_factory_.get(), access_token_, username_, password_, + base::BindOnce(&AuthenticatedLeakCheck::OnLookupSingleLeakResponse, + base::Unretained(this))); +} + +void AuthenticatedLeakCheck::OnLookupSingleLeakResponse( + std::unique_ptr<SingleLookupResponse> response) { + if (!response) { + delegate_->OnError(LeakDetectionError::kInvalidServerResponse); + return; + } + + delegate_->OnLeakDetectionDone(ParseLookupSingleLeakResponse(*response), url_, + base::UTF8ToUTF16(username_)); } } // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/authenticated_leak_check.h b/components/password_manager/core/browser/leak_detection/authenticated_leak_check.h index 91e0792..3720ab0 100644 --- a/components/password_manager/core/browser/leak_detection/authenticated_leak_check.h +++ b/components/password_manager/core/browser/leak_detection/authenticated_leak_check.h
@@ -10,6 +10,8 @@ #include "base/memory/scoped_refptr.h" #include "components/password_manager/core/browser/leak_detection/leak_detection_check.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_request.h" +#include "url/gurl.h" class GoogleServiceAuthError; @@ -26,6 +28,7 @@ namespace password_manager { class LeakDetectionDelegateInterface; +struct SingleLookupResponse; // Performs a leak-check for {username, password} for Chrome signed-in users. class AuthenticatedLeakCheck : public LeakDetectionCheck { @@ -55,6 +58,12 @@ void OnAccessTokenRequestCompleted(GoogleServiceAuthError error, signin::AccessTokenInfo access_token_info); + // Called when the single leak lookup request is done. |response| is null in + // case of an invalid server response, or contains a valid + // SingleLookupResponse instance otherwise. + void OnLookupSingleLeakResponse( + std::unique_ptr<SingleLookupResponse> response); + // Delegate for the instance. Should outlive |this|. LeakDetectionDelegateInterface* delegate_; // Identity manager for the profile. @@ -64,6 +73,15 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_; // Actual request for the needed token. std::unique_ptr<signin::AccessTokenFetcher> token_fetcher_; + // Class used to initiate a request to the identity leak lookup endpoint. This + // is only instantiated if a valid |access_token_| could be obtained. + std::unique_ptr<LeakDetectionRequest> request_; + // |url| passed to Start(). + GURL url_; + // |username| passed to Start(). + std::string username_; + // |password| passed to Start(). + std::string password_; // The token to be used for request. std::string access_token_; };
diff --git a/components/password_manager/core/browser/leak_detection/authenticated_leak_check_unittest.cc b/components/password_manager/core/browser/leak_detection/authenticated_leak_check_unittest.cc index 9bae8d60..c85e178e 100644 --- a/components/password_manager/core/browser/leak_detection/authenticated_leak_check_unittest.cc +++ b/components/password_manager/core/browser/leak_detection/authenticated_leak_check_unittest.cc
@@ -10,6 +10,7 @@ #include "components/password_manager/core/browser/leak_detection/mock_leak_detection_delegate.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/test/test_shared_url_loader_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -26,9 +27,10 @@ class AuthenticatedLeakCheckTest : public testing::Test { public: AuthenticatedLeakCheckTest() - : leak_check_(&delegate_, - identity_test_env_.identity_manager(), - /*url_loader_factory=*/nullptr) {} + : leak_check_( + &delegate_, + identity_test_env_.identity_manager(), + base::MakeRefCounted<network::TestSharedURLLoaderFactory>()) {} ~AuthenticatedLeakCheckTest() override = default; signin::IdentityTestEnvironment& identity_env() { return identity_test_env_; }
diff --git a/components/password_manager/core/browser/leak_detection/encryption_utils.cc b/components/password_manager/core/browser/leak_detection/encryption_utils.cc index 31a7116..b8361c2 100644 --- a/components/password_manager/core/browser/leak_detection/encryption_utils.cc +++ b/components/password_manager/core/browser/leak_detection/encryption_utils.cc
@@ -15,13 +15,6 @@ namespace password_manager { -namespace { - -// Prefix length in bits used for BucketizeUsername(). -constexpr size_t kPrefixLen = 24; - -} // namespace - std::string CanonicalizeUsername(base::StringPiece username) { std::string email_lower = base::ToLowerASCII(username); // |email_lower| might be an email address. Strip off the mail-address host, @@ -45,9 +38,10 @@ std::string BucketizeUsername(base::StringPiece canonicalized_username) { static_assert( - kPrefixLen % CHAR_BIT == 0, - "kPrefixLen must be a multiple of the number of bits in a char."); - return HashUsername(canonicalized_username).substr(0, kPrefixLen / CHAR_BIT); + kUsernameHashPrefixLength % CHAR_BIT == 0, + "The prefix length must be a multiple of the number of bits in a char."); + return HashUsername(canonicalized_username) + .substr(0, kUsernameHashPrefixLength / CHAR_BIT); } std::string ScryptHashUsernameAndPassword(base::StringPiece username,
diff --git a/components/password_manager/core/browser/leak_detection/encryption_utils.h b/components/password_manager/core/browser/leak_detection/encryption_utils.h index 7f0f52b..4b5aae9e 100644 --- a/components/password_manager/core/browser/leak_detection/encryption_utils.h +++ b/components/password_manager/core/browser/leak_detection/encryption_utils.h
@@ -11,6 +11,9 @@ namespace password_manager { +// Username hash prefix length in bits. +constexpr size_t kUsernameHashPrefixLength = 24; + // Canonicalizes |username| by lower-casing and and stripping a mail-address // host in case the username is a mail address. |username| must be a UTF-8 // string.
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h b/components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h index 8fb419c..7ace27b1 100644 --- a/components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h +++ b/components/password_manager/core/browser/leak_detection/leak_detection_delegate_interface.h
@@ -14,6 +14,8 @@ kNotSignIn = 0, // Error obtaining a token. kTokenRequestFailure = 1, + // Error obtaining a valid server response. + kInvalidServerResponse = 2, // TODO(crbug.com/986298): add more errors. };
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request.cc b/components/password_manager/core/browser/leak_detection/leak_detection_request.cc new file mode 100644 index 0000000..84cf8e86 --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request.cc
@@ -0,0 +1,148 @@ +// Copyright 2019 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 "components/password_manager/core/browser/leak_detection/leak_detection_request.h" + +#include <iterator> +#include <memory> +#include <string> +#include <utility> + +#include "base/bind.h" +#include "base/strings/strcat.h" +#include "base/strings/string_number_conversions.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_api.pb.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h" +#include "components/password_manager/core/browser/leak_detection/single_lookup_response.h" +#include "net/base/load_flags.h" +#include "net/base/net_errors.h" +#include "net/http/http_request_headers.h" +#include "net/traffic_annotation/network_traffic_annotation.h" +#include "services/network/public/cpp/resource_request.h" +#include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/public/cpp/simple_url_loader.h" +#include "url/gurl.h" + +namespace password_manager { + +namespace { + +constexpr char kAuthHeaderBearer[] = "Bearer "; +constexpr char kPostMethod[] = "POST"; +constexpr char kProtobufContentType[] = "application/x-protobuf"; + +} // namespace + +constexpr char LeakDetectionRequest::kLookupSingleLeakEndpoint[]; + +LeakDetectionRequest::LeakDetectionRequest() = default; + +LeakDetectionRequest::~LeakDetectionRequest() = default; + +void LeakDetectionRequest::LookupSingleLeak( + network::mojom::URLLoaderFactory* url_loader_factory, + base::StringPiece access_token, + base::StringPiece username, + base::StringPiece password, + LookupSingleLeakCallback callback) { + net::NetworkTrafficAnnotationTag traffic_annotation = + net::DefineNetworkTrafficAnnotation("lookup_single_password_leak", R"( + semantics { + sender: "Leaked Credential Detector" + description: + "In order to inform signed-in users about leaked credentials this " + "service uploads a prefix of the hashed username, as well as the " + "encrypted username and password following a successful password " + "form submission. The former is a 3 bytes of the hash and doesn't " + "reveal the username to the server in any way. The latter is " + "completely opaque to the server. The server responds with a list " + "of encrypted leaked credentials matching the prefix of the hashed " + "username, as well as with a re-encypted version of the uploaded " + "username and password. Chrome then reverses its encryption on the " + "re-encrypted credential and tries to find it in the list of " + "leaked credentials. If a match is found, Chrome notifies the user " + "and prompts them to change their credentials. Re-encryption part " + "is for the privacy reason. The server can't read the user's " + "password. At the same time the client can't read the " + "usernames/passwords of other leaked accounts but only can check " + "the current one."; + trigger: + "Following a successful password form submission by a signed-in " + "user" + data: + "A hash prefix of the username and the encrypted username and " + "password." + destination: GOOGLE_OWNED_SERVICE + } + policy { + cookies_allowed: NO + setting: + "Users can enable or disable this feature in Chrome's password " + "settings. The feature is enabled by default." + chrome_policy { + PasswordLeakDetectionEnabled { + PasswordLeakDetectionEnabled: false + } + } + })"); + + auto resource_request = std::make_unique<network::ResourceRequest>(); + resource_request->url = GURL(kLookupSingleLeakEndpoint); + resource_request->load_flags = net::LOAD_DISABLE_CACHE; + resource_request->credentials_mode = network::mojom::CredentialsMode::kOmit; + resource_request->method = kPostMethod; + resource_request->headers.SetHeader( + net::HttpRequestHeaders::kAuthorization, + base::StrCat({kAuthHeaderBearer, access_token})); + + simple_url_loader_ = network::SimpleURLLoader::Create( + std::move(resource_request), traffic_annotation); + simple_url_loader_->AttachStringForUpload( + MakeLookupSingleLeakRequest(username, password).SerializeAsString(), + kProtobufContentType); + simple_url_loader_->DownloadToStringOfUnboundedSizeUntilCrashAndDie( + url_loader_factory, + base::BindOnce(&LeakDetectionRequest::OnLookupSingleLeakResponse, + base::Unretained(this), std::move(callback))); +} + +void LeakDetectionRequest::OnLookupSingleLeakResponse( + LookupSingleLeakCallback callback, + std::unique_ptr<std::string> response) { + if (!response) { + DLOG(ERROR) << "Empty Lookup Single Leak Response"; + if (simple_url_loader_->ResponseInfo() && + simple_url_loader_->ResponseInfo()->headers) { + DLOG(ERROR) + << "HTTP Response Code: " + << simple_url_loader_->ResponseInfo()->headers->response_code(); + } + + DLOG(ERROR) << "Net Error: " + << net::ErrorToString(simple_url_loader_->NetError()); + std::move(callback).Run(nullptr); + return; + } + + google::internal::identity::passwords::leak::check::v1:: + LookupSingleLeakResponse leak_response; + if (!leak_response.ParseFromString(*response)) { + DLOG(ERROR) << "Could not parse response: " + << base::HexEncode(response->data(), response->size()); + std::move(callback).Run(nullptr); + return; + } + + auto single_lookup_response = std::make_unique<SingleLookupResponse>(); + single_lookup_response->encrypted_leak_match_prefixes.assign( + std::make_move_iterator( + leak_response.mutable_encrypted_leak_match_prefix()->begin()), + std::make_move_iterator( + leak_response.mutable_encrypted_leak_match_prefix()->end())); + single_lookup_response->reencrypted_lookup_hash = + std::move(*leak_response.mutable_reencrypted_lookup_hash()); + std::move(callback).Run(std::move(single_lookup_response)); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request.h b/components/password_manager/core/browser/leak_detection/leak_detection_request.h new file mode 100644 index 0000000..aa0551c --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request.h
@@ -0,0 +1,64 @@ +// Copyright 2019 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. + +#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_H_ + +#include <memory> + +#include "base/callback_forward.h" +#include "base/strings/string_piece_forward.h" + +namespace network { +namespace mojom { +class URLLoaderFactory; +} // namespace mojom + +class SimpleURLLoader; +} // namespace network + +namespace password_manager { + +struct SingleLookupResponse; + +// This class encapsulates the logic required to talk to the identity leak check +// endpoint. Callers are expected to construct an instance for each request they +// would like to perform. Destruction of the class results in a cancellation of +// the initiated network request. +class LeakDetectionRequest { + public: + using LookupSingleLeakCallback = + base::OnceCallback<void(std::unique_ptr<SingleLookupResponse>)>; + + // TODO(crbug.com/986298): Switch to production endpoint once available. + static constexpr char kLookupSingleLeakEndpoint[] = + "https://autopush-passwordsleakcheck-pa.sandbox.googleapis.com/v1/" + "leaks:lookupSingle"; + + LeakDetectionRequest(); + ~LeakDetectionRequest(); + + // Initiates a leak lookup network request for the credential corresponding to + // |username| and |password|. |access_token| is required to authenticate the + // request. Invokes |callback| on completion, unless this instance is deleted + // beforehand. If the request failed, |callback| is invoked with |nullptr|, + // otherwise a SingleLookupResponse instance is returned. + void LookupSingleLeak(network::mojom::URLLoaderFactory* url_loader_factory, + base::StringPiece access_token, + base::StringPiece username, + base::StringPiece password, + LookupSingleLeakCallback callback); + + private: + void OnLookupSingleLeakResponse(LookupSingleLeakCallback callback, + std::unique_ptr<std::string> response); + + // Simple URL loader required for the network request to the identity + // endpoint. + std::unique_ptr<network::SimpleURLLoader> simple_url_loader_; +}; + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_H_
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request_factory_impl_unittest.cc b/components/password_manager/core/browser/leak_detection/leak_detection_request_factory_impl_unittest.cc index 585f4433..51b02ea 100644 --- a/components/password_manager/core/browser/leak_detection/leak_detection_request_factory_impl_unittest.cc +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request_factory_impl_unittest.cc
@@ -11,6 +11,7 @@ #include "components/password_manager/core/common/password_manager_features.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "services/network/public/cpp/shared_url_loader_factory.h" +#include "services/network/test/test_shared_url_loader_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,6 +29,9 @@ signin::IdentityTestEnvironment& identity_env() { return identity_test_env_; } MockLeakDetectionDelegateInterface& delegate() { return delegate_; } + const scoped_refptr<network::SharedURLLoaderFactory>& url_loader_factory() { + return url_loader_factory_; + } LeakDetectionRequestFactoryImpl& request_factory() { return request_factory_; } @@ -36,6 +40,8 @@ base::test::ScopedTaskEnvironment task_env_; signin::IdentityTestEnvironment identity_test_env_; StrictMock<MockLeakDetectionDelegateInterface> delegate_; + scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_ = + base::MakeRefCounted<network::TestSharedURLLoaderFactory>(); LeakDetectionRequestFactoryImpl request_factory_; }; @@ -46,8 +52,7 @@ feature_list.InitAndDisableFeature(features::kLeakDetection); EXPECT_FALSE(request_factory().TryCreateLeakCheck( - &delegate(), identity_env().identity_manager(), - /*url_loader_factory=*/nullptr)); + &delegate(), identity_env().identity_manager(), url_loader_factory())); } TEST_F(LeakDetectionRequestFactoryImplTest, SignedOut) { @@ -56,8 +61,7 @@ EXPECT_CALL(delegate(), OnError(LeakDetectionError::kNotSignIn)); EXPECT_FALSE(request_factory().TryCreateLeakCheck( - &delegate(), identity_env().identity_manager(), - /*url_loader_factory=*/nullptr)); + &delegate(), identity_env().identity_manager(), url_loader_factory())); } TEST_F(LeakDetectionRequestFactoryImplTest, SignedIn) { @@ -68,8 +72,7 @@ identity_env().SetCookieAccounts({{info.email, info.account_id}}); identity_env().SetRefreshTokenForAccount(info.account_id); EXPECT_TRUE(request_factory().TryCreateLeakCheck( - &delegate(), identity_env().identity_manager(), - /*url_loader_factory=*/nullptr)); + &delegate(), identity_env().identity_manager(), url_loader_factory())); } TEST_F(LeakDetectionRequestFactoryImplTest, SignedInAndSyncing) { @@ -78,8 +81,7 @@ identity_env().SetPrimaryAccount(kTestAccount); EXPECT_TRUE(request_factory().TryCreateLeakCheck( - &delegate(), identity_env().identity_manager(), - /*url_loader_factory=*/nullptr)); + &delegate(), identity_env().identity_manager(), url_loader_factory())); } } // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request_unittest.cc b/components/password_manager/core/browser/leak_detection/leak_detection_request_unittest.cc new file mode 100644 index 0000000..36c2303 --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request_unittest.cc
@@ -0,0 +1,82 @@ +// Copyright 2019 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 "components/password_manager/core/browser/leak_detection/leak_detection_request.h" + +#include "base/test/mock_callback.h" +#include "base/test/scoped_task_environment.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_api.pb.h" +#include "components/password_manager/core/browser/leak_detection/single_lookup_response.h" +#include "services/network/test/test_url_loader_factory.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace password_manager { + +using ::testing::Eq; + +class LeakDetectionRequestTest : public testing::Test { + public: + static constexpr char kAccessToken[] = "access_token"; + static constexpr char kUsername[] = "username"; + static constexpr char kPassword[] = "password123"; + + ~LeakDetectionRequestTest() override = default; + + base::test::ScopedTaskEnvironment& task_env() { return task_env_; } + network::TestURLLoaderFactory* test_url_loader_factory() { + return &test_url_loader_factory_; + } + LeakDetectionRequest& request() { return request_; } + + private: + base::test::ScopedTaskEnvironment task_env_; + network::TestURLLoaderFactory test_url_loader_factory_; + LeakDetectionRequest request_; +}; + +// Note: These strings are static member constants rather than namespace scoped +// constants to avoid compilation errors in Jumbo builds. +constexpr char LeakDetectionRequestTest::kAccessToken[]; +constexpr char LeakDetectionRequestTest::kUsername[]; +constexpr char LeakDetectionRequestTest::kPassword[]; + +TEST_F(LeakDetectionRequestTest, EmptyServerResponse) { + test_url_loader_factory()->AddResponse( + LeakDetectionRequest::kLookupSingleLeakEndpoint, "", + net::HTTP_INTERNAL_SERVER_ERROR); + + base::MockCallback<LeakDetectionRequest::LookupSingleLeakCallback> callback; + request().LookupSingleLeak(test_url_loader_factory(), kAccessToken, kUsername, + kPassword, callback.Get()); + EXPECT_CALL(callback, Run(Eq(nullptr))); + task_env().RunUntilIdle(); +} + +TEST_F(LeakDetectionRequestTest, MalformedServerResponse) { + test_url_loader_factory()->AddResponse( + LeakDetectionRequest::kLookupSingleLeakEndpoint, "\x01\x02\x03"); + + base::MockCallback<LeakDetectionRequest::LookupSingleLeakCallback> callback; + request().LookupSingleLeak(test_url_loader_factory(), kAccessToken, kUsername, + kPassword, callback.Get()); + EXPECT_CALL(callback, Run(Eq(nullptr))); + task_env().RunUntilIdle(); +} + +TEST_F(LeakDetectionRequestTest, WellformedServerResponse) { + google::internal::identity::passwords::leak::check::v1:: + LookupSingleLeakResponse response; + test_url_loader_factory()->AddResponse( + LeakDetectionRequest::kLookupSingleLeakEndpoint, + response.SerializeAsString()); + + base::MockCallback<LeakDetectionRequest::LookupSingleLeakCallback> callback; + request().LookupSingleLeak(test_url_loader_factory(), kAccessToken, kUsername, + kPassword, callback.Get()); + EXPECT_CALL(callback, Run(testing::Pointee(SingleLookupResponse()))); + task_env().RunUntilIdle(); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.cc b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.cc new file mode 100644 index 0000000..4afb6d3 --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.cc
@@ -0,0 +1,53 @@ +// Copyright 2019 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 "components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h" + +#include <string> + +#include "base/containers/span.h" +#include "base/strings/string_number_conversions.h" +#include "components/password_manager/core/browser/leak_detection/encryption_utils.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_api.pb.h" +#include "components/password_manager/core/browser/leak_detection/single_lookup_response.h" + +namespace password_manager { + +using google::internal::identity::passwords::leak::check::v1:: + LookupSingleLeakRequest; + +LookupSingleLeakRequest MakeLookupSingleLeakRequest( + base::StringPiece username, + base::StringPiece password) { + + // Encrypted lookup hash of (username: "test", password: "test") credential. + static constexpr char kTestEncryptedLookupHash[] = { + 2, 8, -93, 58, 107, -84, -43, 83, 83, 65, -77, + 47, -110, -93, 117, -69, -55, 75, -114, 39, 10, 9, + -103, -67, 69, -117, -18, 11, 37, -56, -124, 33, -96}; + + LookupSingleLeakRequest request; + // TODO(crbug.com/086298): Implement correct hash computation of username and + // password. + request.set_username_hash_prefix( + BucketizeUsername(CanonicalizeUsername(username))); + request.set_username_hash_prefix_length(kUsernameHashPrefixLength); + request.set_encrypted_lookup_hash( + std::string(kTestEncryptedLookupHash, sizeof(kTestEncryptedLookupHash))); + return request; +} + +bool ParseLookupSingleLeakResponse(const SingleLookupResponse& response) { + // TODO(crbug.com/086298): Implement decrypting the response and checking + // whether the credential was actually leaked. + DVLOG(0) << "Number of Encrypted Leak Match Prefixes: " + << response.encrypted_leak_match_prefixes.size(); + + base::span<const char> hash = response.reencrypted_lookup_hash; + DVLOG(0) << "Reencrypted Lookup Hash: " + << base::HexEncode(base::as_bytes(hash)); + return false; +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h new file mode 100644 index 0000000..5cf9960 --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h
@@ -0,0 +1,42 @@ +// Copyright 2019 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. + +#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_UTILS_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_UTILS_H_ + +#include "base/strings/string_piece_forward.h" + +namespace google { +namespace internal { +namespace identity { +namespace passwords { +namespace leak { +namespace check { +namespace v1 { +class LookupSingleLeakRequest; +} // namespace v1 +} // namespace check +} // namespace leak +} // namespace passwords +} // namespace identity +} // namespace internal +} // namespace google + +namespace password_manager { + +struct SingleLookupResponse; + +// Constructs a LookupSingleLeakRequest from the provided |username| and +// |password|. +google::internal::identity::passwords::leak::check::v1::LookupSingleLeakRequest +MakeLookupSingleLeakRequest(base::StringPiece username, + base::StringPiece password); + +// Processes the provided |response| and returns whether the relevant credential +// was leaked. +bool ParseLookupSingleLeakResponse(const SingleLookupResponse& response); + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_LEAK_DETECTION_REQUEST_UTILS_H_
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_request_utils_unittest.cc b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils_unittest.cc new file mode 100644 index 0000000..209903b --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/leak_detection_request_utils_unittest.cc
@@ -0,0 +1,22 @@ +// Copyright 2019 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 "components/password_manager/core/browser/leak_detection/leak_detection_request_utils.h" + +#include "base/strings/string_piece.h" +#include "components/password_manager/core/browser/leak_detection/leak_detection_api.pb.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace password_manager { + +TEST(LeakDetectionRequestUtils, MakeLookupSingleLeakRequest) { + // Derived from test case used by the server-side implementation: + // go/passwords-leak-test + auto request = MakeLookupSingleLeakRequest("jonsnow", ""); + EXPECT_THAT(request.username_hash_prefix(), + ::testing::ElementsAreArray({0x3D, 0x70, 0xD3})); +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/single_lookup_response.cc b/components/password_manager/core/browser/leak_detection/single_lookup_response.cc new file mode 100644 index 0000000..4986958 --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/single_lookup_response.cc
@@ -0,0 +1,32 @@ +// Copyright 2019 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 "components/password_manager/core/browser/leak_detection/single_lookup_response.h" + +namespace password_manager { + +SingleLookupResponse::SingleLookupResponse() = default; + +SingleLookupResponse::SingleLookupResponse(const SingleLookupResponse& other) = + default; + +SingleLookupResponse& SingleLookupResponse::operator=( + const SingleLookupResponse& other) = default; + +SingleLookupResponse::SingleLookupResponse(SingleLookupResponse&& other) = + default; + +SingleLookupResponse& SingleLookupResponse::operator=( + SingleLookupResponse&& other) = default; + +SingleLookupResponse::~SingleLookupResponse() = default; + +bool operator==(const SingleLookupResponse& lhs, + const SingleLookupResponse& rhs) { + return lhs.encrypted_leak_match_prefixes == + rhs.encrypted_leak_match_prefixes && + lhs.reencrypted_lookup_hash == rhs.reencrypted_lookup_hash; +} + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/leak_detection/single_lookup_response.h b/components/password_manager/core/browser/leak_detection/single_lookup_response.h new file mode 100644 index 0000000..8eb5a2a --- /dev/null +++ b/components/password_manager/core/browser/leak_detection/single_lookup_response.h
@@ -0,0 +1,33 @@ +// Copyright 2019 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. + +#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_SINGLE_LOOKUP_RESPONSE_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_SINGLE_LOOKUP_RESPONSE_H_ + +#include <string> +#include <vector> + +namespace password_manager { + +// This class encapsulates the data required to determine whether a given +// credential was leaked. It is a more convenient data representation of the +// protobuf used for network communication. +struct SingleLookupResponse { + SingleLookupResponse(); + SingleLookupResponse(const SingleLookupResponse& other); + SingleLookupResponse& operator=(const SingleLookupResponse& other); + SingleLookupResponse(SingleLookupResponse&& other); + SingleLookupResponse& operator=(SingleLookupResponse&& other); + ~SingleLookupResponse(); + + std::vector<std::string> encrypted_leak_match_prefixes; + std::string reencrypted_lookup_hash; +}; + +bool operator==(const SingleLookupResponse& lhs, + const SingleLookupResponse& rhs); + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_LEAK_DETECTION_SINGLE_LOOKUP_RESPONSE_H_
diff --git a/components/password_manager/core/browser/leak_detection_delegate.cc b/components/password_manager/core/browser/leak_detection_delegate.cc index 2473a75..91509e32 100644 --- a/components/password_manager/core/browser/leak_detection_delegate.cc +++ b/components/password_manager/core/browser/leak_detection_delegate.cc
@@ -10,6 +10,8 @@ #include "components/password_manager/core/browser/leak_detection/leak_detection_request_factory_impl.h" #include "components/password_manager/core/browser/password_manager_client.h" #include "components/password_manager/core/browser/password_manager_util.h" +#include "components/password_manager/core/common/password_manager_pref_names.h" +#include "components/prefs/pref_service.h" #include "services/network/public/cpp/shared_url_loader_factory.h" namespace password_manager { @@ -25,6 +27,11 @@ void LeakDetectionDelegate::StartLeakCheck(const autofill::PasswordForm& form) { if (client_->IsIncognito()) return; + + if (!client_->GetPrefs()->GetBoolean( + password_manager::prefs::kPasswordLeakDetectionEnabled)) + return; + leak_check_ = leak_factory_->TryCreateLeakCheck( this, client_->GetIdentityManager(), client_->GetURLLoaderFactory()); if (leak_check_) @@ -53,6 +60,10 @@ case LeakDetectionError::kTokenRequestFailure: logger.LogMessage(Logger::STRING_LEAK_DETECTION_TOKEN_REQUEST_ERROR); break; + case LeakDetectionError::kInvalidServerResponse: + logger.LogMessage( + Logger::STRING_LEAK_DETECTION_INVALID_SERVER_RESPONSE_ERROR); + break; } } }
diff --git a/components/password_manager/core/browser/leak_detection_delegate_unittest.cc b/components/password_manager/core/browser/leak_detection_delegate_unittest.cc index f8dae26..507f97f 100644 --- a/components/password_manager/core/browser/leak_detection_delegate_unittest.cc +++ b/components/password_manager/core/browser/leak_detection_delegate_unittest.cc
@@ -9,6 +9,10 @@ #include "base/strings/utf_string_conversions.h" #include "components/password_manager/core/browser/leak_detection/leak_detection_check.h" #include "components/password_manager/core/browser/stub_password_manager_client.h" +#include "components/password_manager/core/common/password_manager_pref_names.h" +#include "components/prefs/pref_registry_simple.h" +#include "components/prefs/pref_service.h" +#include "components/prefs/testing_pref_service.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -36,6 +40,7 @@ ~MockPasswordManagerClient() override = default; MOCK_CONST_METHOD0(IsIncognito, bool()); + MOCK_CONST_METHOD0(GetPrefs, PrefService*()); }; class MockLeakDetectionCheck : public LeakDetectionCheck { @@ -62,6 +67,10 @@ testing::StrictMock<MockLeakDetectionRequestFactory>>(); mock_factory_ = mock_factory.get(); delegate_.set_leak_factory(std::move(mock_factory)); + prefs_ = std::make_unique<TestingPrefServiceSimple>(); + prefs_->registry()->RegisterBooleanPref( + password_manager::prefs::kPasswordLeakDetectionEnabled, true); + ON_CALL(client_, GetPrefs()).WillByDefault(Return(prefs_.get())); } ~LeakDetectionDelegateTest() override = default; @@ -69,6 +78,9 @@ MockLeakDetectionRequestFactory& factory() { return *mock_factory_; } LeakDetectionDelegate& delegate() { return delegate_; } + protected: + std::unique_ptr<TestingPrefServiceSimple> prefs_; + private: MockPasswordManagerClient client_; MockLeakDetectionRequestFactory* mock_factory_ = nullptr; @@ -84,6 +96,17 @@ EXPECT_FALSE(delegate().leak_check()); } +TEST_F(LeakDetectionDelegateTest, PrefIsFalse) { + const autofill::PasswordForm form = CreateTestForm(); + prefs_->SetBoolean(password_manager::prefs::kPasswordLeakDetectionEnabled, + false); + + EXPECT_CALL(factory(), TryCreateLeakCheck).Times(0); + delegate().StartLeakCheck(form); + + EXPECT_FALSE(delegate().leak_check()); +} + TEST_F(LeakDetectionDelegateTest, StartCheck) { const autofill::PasswordForm form = CreateTestForm(); EXPECT_CALL(client(), IsIncognito).WillOnce(Return(false));
diff --git a/components/password_manager/core/browser/password_manager_unittest.cc b/components/password_manager/core/browser/password_manager_unittest.cc index e93b170..ed979f6 100644 --- a/components/password_manager/core/browser/password_manager_unittest.cc +++ b/components/password_manager/core/browser/password_manager_unittest.cc
@@ -310,6 +310,8 @@ prefs_->registry()->RegisterIntegerPref( prefs::kPasswordManagerOnboardingState, static_cast<int>(OnboardingState::kDoNotShow)); + prefs_->registry()->RegisterBooleanPref( + prefs::kPasswordLeakDetectionEnabled, true); ON_CALL(client_, GetPrefs()).WillByDefault(Return(prefs_.get())); // When waiting for predictions is on, it makes tests more complicated.
diff --git a/components/policy/BUILD.gn b/components/policy/BUILD.gn index e094f46..0c6f02f 100644 --- a/components/policy/BUILD.gn +++ b/components/policy/BUILD.gn
@@ -91,12 +91,6 @@ chrome_version_abspath = "//chrome/VERSION" chrome_version_path = rebase_path(chrome_version_abspath, root_build_dir) - if (is_chromeos) { - chromeos_flag = "1" - } else { - chromeos_flag = "0" - } - inputs = [ chrome_version_abspath, "resources/policy_templates.json", @@ -115,6 +109,13 @@ } args = [ + # Input information + "--chrome-version-file=" + chrome_version_path, + "--target-platform=" + target_os, + "--policy-templates-file=" + + rebase_path("resources/policy_templates.json", root_build_dir), + + # Output files to be generated "--policy-constants-header=" + rebase_path(constants_header_path, root_build_dir), "--policy-constants-source=" + @@ -126,10 +127,6 @@ "--app-restrictions-definition=" + rebase_path(app_restrictions_path, root_build_dir), "--risk-tag-header=" + rebase_path(risk_tag_header_path, root_build_dir), - chrome_version_path, - target_os, - chromeos_flag, - rebase_path("resources/policy_templates.json", root_build_dir), ] } @@ -138,12 +135,6 @@ chrome_version_abspath = "//chrome/VERSION" chrome_version_path = rebase_path(chrome_version_abspath, root_build_dir) - if (is_chromeos) { - chromeos_flag = "1" - } else { - chromeos_flag = "0" - } - inputs = [ chrome_version_abspath, "resources/policy_templates.json", @@ -154,14 +145,17 @@ ] args = [ + # Input information + "--chrome-version-file=" + chrome_version_path, + "--target-platform=" + target_os, + "--policy-templates-file=" + + rebase_path("resources/policy_templates.json", root_build_dir), + + # Output files to be generated "--cloud-policy-full-runtime-protobuf=" + rebase_path(cloud_policy_full_runtime_proto_path, root_build_dir), "--chrome-settings-full-runtime-protobuf=" + rebase_path(chrome_settings_full_runtime_proto_path, root_build_dir), - chrome_version_path, - target_os, - chromeos_flag, - rebase_path("resources/policy_templates.json", root_build_dir), ] }
diff --git a/components/policy/resources/PRESUBMIT.py b/components/policy/resources/PRESUBMIT.py index a0fd0d0..ea33fb8e 100644 --- a/components/policy/resources/PRESUBMIT.py +++ b/components/policy/resources/PRESUBMIT.py
@@ -32,8 +32,11 @@ sys.path = [ tools_path ] + sys.path # Optimization: only load this when it's needed. import syntax_check_policy_template_json + device_policy_proto_path = input_api.os_path.join( + local_path, '../proto/chrome_device_policy.proto') + args = ["--device_policy_proto_path=" + device_policy_proto_path] checker = syntax_check_policy_template_json.PolicyTemplateChecker() - if checker.Run([], filepath) > 0: + if checker.Run(args, filepath) > 0: return [output_api.PresubmitError('Syntax error(s) in file:', [filepath])] finally:
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 56b24d7b..54366007 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -17204,7 +17204,7 @@ 'DeviceEphemeralUsersEnabled': 'ephemeral_users_enabled.ephemeral_users_enabled', 'LoginAuthenticationBehavior': 'login_authentication_behavior.login_authentication_behavior', 'DeviceAllowBluetooth': 'allow_bluetooth.allow_bluetooth', - 'DeviceLoginScreenExtensions': 'device_login_screen_app_install_list.device_login_screen_extensions', + 'DeviceLoginScreenExtensions': 'device_login_screen_extensions.device_login_screen_extensions', 'DeviceLoginScreenDomainAutoComplete': 'login_screen_domain_auto_complete.login_screen_domain_auto_complete', 'DeviceLoginScreenLocales': 'login_screen_locales.login_screen_locales', 'DeviceLoginScreenInputMethods': 'login_screen_input_methods.login_screen_input_methods',
diff --git a/components/policy/tools/generate_policy_source.py b/components/policy/tools/generate_policy_source.py index c7d0c7b..604c2fd 100755 --- a/components/policy/tools/generate_policy_source.py +++ b/components/policy/tools/generate_policy_source.py
@@ -2,12 +2,13 @@ # 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. -'''python %prog [options] platform chromium_os_flag template +'''python %prog [options] -platform specifies which platform source is being generated for - and can be one of (win, mac, linux, fuchsia) -chromium_os_flag should be 1 if this is a Chromium OS build -template is the path to a .json policy template file.''' +Pass at least: +--chrome-version-file <path to src/chrome/VERSION> +--target-platform <which platform the target code will be generated for and can + be one of (win, mac, linux, chromeos, fuchsia)> +--policy_templates <path to the policy_templates.json input file>.''' from __future__ import with_statement from collections import namedtuple @@ -55,8 +56,7 @@ self.caption = PolicyDetails._RemovePlaceholders(item['caption']) self.value = item['value'] - def __init__(self, policy, chrome_major_version, os, is_chromium_os, - valid_tags): + def __init__(self, policy, chrome_major_version, target_platform, valid_tags): self.id = policy['id'] self.name = policy['name'] self.tags = policy.get('tags', None) @@ -75,7 +75,6 @@ if self.has_enterprise_default: self.enterprise_default = policy['default_for_enterprise_users'] - expected_platform = 'chrome_os' if is_chromium_os else os.lower() self.platforms = [] for platform, version_range in [ p.split(':') for p in policy['supported_on'] @@ -121,7 +120,7 @@ self.platforms.append(platform) self.platforms.sort() - self.is_supported = expected_platform in self.platforms + self.is_supported = target_platform in self.platforms if not PolicyDetails.TYPE_MAP.has_key(policy['type']): raise NotImplementedError( @@ -272,24 +271,47 @@ help='generate source file of policy constants for use in ' 'Chrome OS', metavar='FILE') + parser.add_option( + '--chrome-version-file', + dest='chrome_version_file', + help='path to src/chrome/VERSION', + metavar='FILE') + parser.add_option( + '--target-platform', + dest='target_platform', + help='the platform the generated code should run on - can be one of' + '(win, mac, linux, chromeos, fuchsia)', + metavar='PLATFORM') + parser.add_option( + '--policy-templates-file', + dest='policy_templates_file', + help='path to the policy_templates.json input file', + metavar='FILE') (opts, args) = parser.parse_args() - if len(args) != 4: - print('Please specify path to src/chrome/VERSION, platform, ' - 'chromium_os flag and input file as positional parameters.') + if (not opts.chrome_version_file or not opts.target_platform or + not opts.policy_templates_file): + print('Please specify at least:\n' + '--chrome-version-file=<path to src/chrome/VERSION>\n' + '--target-platform=<platform>\n' + '--policy-templates-file=<path to policy_templates.json') parser.print_help() return 2 - version_path = args[0] - os = args[1] - is_chromium_os = args[2] == '1' - template_file_name = args[3] + version_path = opts.chrome_version_file + target_platform = opts.target_platform + template_file_name = opts.policy_templates_file + + # --target-platform accepts "chromeos" as its input because that's what is + # used within GN. Within policy templates, "chrome_os" is used instead. + if target_platform == 'chromeos': + target_platform = 'chrome_os' major_version = ParseVersionFile(version_path) template_file_contents = _LoadJSONFile(template_file_name) risk_tags = RiskTags(template_file_contents) policy_details = [ - PolicyDetails(policy, major_version, os, is_chromium_os, + PolicyDetails(policy, major_version, target_platform, risk_tags.GetValidTags()) for policy in template_file_contents['policy_definitions'] if policy['type'] != 'group' @@ -313,7 +335,7 @@ _OutputGeneratedWarningHeader(f, template_file_name, xml) writer(sorted and sorted_policy_details or policy_details, sorted and sorted_policy_atomic_groups or policy_atomic_groups, - os, f, risk_tags) + target_platform, f, risk_tags) if opts.header_path: GenerateFile(opts.header_path, _WritePolicyConstantHeader, sorted=True) @@ -332,7 +354,7 @@ GenerateFile(opts.chrome_settings_full_runtime_proto_path, _WriteChromeSettingsFullRuntimeProtobuf) - if os == 'android' and opts.app_restrictions_path: + if target_platform == 'android' and opts.app_restrictions_path: GenerateFile(opts.app_restrictions_path, _WriteAppRestrictions, xml=True) # Generated code for Chrome OS (unused in Chromium). @@ -397,8 +419,8 @@ #------------------ policy constants header ------------------------# -def _WritePolicyConstantHeader(policies, policy_atomic_groups, os, f, - risk_tags): +def _WritePolicyConstantHeader(policies, policy_atomic_groups, target_platform, + f, risk_tags): f.write('#ifndef CHROME_COMMON_POLICY_CONSTANTS_H_\n' '#define CHROME_COMMON_POLICY_CONSTANTS_H_\n' '\n' @@ -416,7 +438,7 @@ 'struct SchemaData;\n' '}\n\n') - if os == 'win': + if target_platform == 'win': f.write('// The windows registry path where Chrome policy ' 'configuration resides.\n' 'extern const wchar_t kRegistryChromePolicyKey[];\n') @@ -953,8 +975,8 @@ return [], None -def _WritePolicyConstantSource(policies, policy_atomic_groups, os, f, - risk_tags): +def _WritePolicyConstantSource(policies, policy_atomic_groups, target_platform, + f, risk_tags): f.write('#include "components/policy/policy_constants.h"\n' '\n' '#include <algorithm>\n' @@ -1033,7 +1055,7 @@ f.write('} // namespace\n\n') - if os == 'win': + if target_platform == 'win': f.write('#if defined(GOOGLE_CHROME_BUILD)\n' 'const wchar_t kRegistryChromePolicyKey[] = ' 'L"' + CHROME_POLICY_KEY + '";\n' @@ -1241,7 +1263,8 @@ "-", "_").upper() -def _WritePolicyRiskTagHeader(policies, policy_atomic_groups, os, f, risk_tags): +def _WritePolicyRiskTagHeader(policies, policy_atomic_groups, target_platform, + f, risk_tags): f.write('#ifndef CHROME_COMMON_POLICY_RISK_TAG_H_\n' '#define CHROME_COMMON_POLICY_RISK_TAG_H_\n' '\n' @@ -1355,8 +1378,8 @@ ] -def _WriteChromeSettingsProtobuf(policies, policy_atomic_groups, os, f, - risk_tags): +def _WriteChromeSettingsProtobuf(policies, policy_atomic_groups, + target_platform, f, risk_tags): f.write(CHROME_SETTINGS_PROTO_HEAD) fields = [] f.write('// PBs for individual settings.\n\n') @@ -1373,8 +1396,8 @@ f.write('}\n\n') -def _WriteChromeSettingsFullRuntimeProtobuf(policies, policy_atomic_groups, os, - f, risk_tags): +def _WriteChromeSettingsFullRuntimeProtobuf(policies, policy_atomic_groups, + target_platform, f, risk_tags): # For full runtime, disable LITE_RUNTIME switch and import full runtime # version of cloud_policy.proto. f.write( @@ -1398,7 +1421,8 @@ f.write('}\n\n') -def _WriteCloudPolicyProtobuf(policies, policy_atomic_groups, os, f, risk_tags): +def _WriteCloudPolicyProtobuf(policies, policy_atomic_groups, target_platform, + f, risk_tags): f.write(CLOUD_POLICY_PROTO_HEAD) f.write('message CloudPolicySettings {\n') for policy in policies: @@ -1409,8 +1433,8 @@ f.write('}\n\n') -def _WriteCloudPolicyFullRuntimeProtobuf(policies, policy_atomic_groups, os, f, - risk_tags): +def _WriteCloudPolicyFullRuntimeProtobuf(policies, policy_atomic_groups, + target_platform, f, risk_tags): # For full runtime, disable LITE_RUNTIME switch f.write( CLOUD_POLICY_PROTO_HEAD.replace("option optimize_for = LITE_RUNTIME;", @@ -1476,8 +1500,8 @@ # Writes policy_constants.h for use in Chrome OS. -def _WriteChromeOSPolicyConstantsHeader(policies, policy_atomic_groups, os, f, - risk_tags): +def _WriteChromeOSPolicyConstantsHeader(policies, policy_atomic_groups, + target_platform, f, risk_tags): f.write('#ifndef __BINDINGS_POLICY_CONSTANTS_H_\n' '#define __BINDINGS_POLICY_CONSTANTS_H_\n\n') @@ -1529,8 +1553,8 @@ # Writes policy_constants.cc for use in Chrome OS. -def _WriteChromeOSPolicyConstantsSource(policies, policy_atomic_groups, os, f, - risk_tags): +def _WriteChromeOSPolicyConstantsSource(policies, policy_atomic_groups, + target_platform, f, risk_tags): f.write('#include "bindings/cloud_policy.pb.h"\n' '#include "bindings/policy_constants.h"\n\n' 'namespace em = enterprise_management;\n\n' @@ -1562,7 +1586,8 @@ #------------------ app restrictions -------------------------------# -def _WriteAppRestrictions(policies, policy_atomic_groups, os, f, risk_tags): +def _WriteAppRestrictions(policies, policy_atomic_groups, target_platform, f, + risk_tags): def WriteRestrictionCommon(key): f.write(' <restriction\n' ' android:key="%s"\n' % key)
diff --git a/components/policy/tools/syntax_check_policy_template_json.py b/components/policy/tools/syntax_check_policy_template_json.py index 8086183..c1e7696 100755 --- a/components/policy/tools/syntax_check_policy_template_json.py +++ b/components/policy/tools/syntax_check_policy_template_json.py
@@ -308,8 +308,8 @@ # If 'device only' field is true, the policy must be mapped to its proto # field in device_policy_proto_map.json. - def _CheckDevicePolicyProtoMapping(self, policy, device_policy_proto_map, - legacy_device_policy_proto_map): + def _CheckDevicePolicyProtoMappingDeviceOnly( + self, policy, device_policy_proto_map, legacy_device_policy_proto_map): if not policy.get('device_only', False): return @@ -322,6 +322,23 @@ "the corresponding field in chrome_device_policy.proto." % name) return + # Performs a quick check whether all fields in |device_policy_proto_map| are + # actually present in the device policy proto at |device_policy_proto_path|. + # Note that this presubmit check can't compile the proto to pb2.py easily (or + # can it?). + def _CheckDevicePolicyProtoMappingExistence(self, device_policy_proto_map, + device_policy_proto_path): + with open(device_policy_proto_path, 'r') as file: + device_policy_proto = file.read() + + for policy, proto_path in device_policy_proto_map.items(): + fields = proto_path.split(".") + for field in fields: + if field not in device_policy_proto: + self._Error("Bad device_policy_proto_map for policy '%s': " + "Field '%s' not present in device policy proto." % + (policy, field)) + def _CheckPolicy(self, policy, is_in_group, policy_ids, deleted_policy_ids): if not isinstance(policy, dict): self._Error('Each policy must be a dictionary.', 'policy', None, policy) @@ -823,13 +840,15 @@ highest_atomic_group_id) self._CheckDevicePolicyProtoMappingUniqueness( device_policy_proto_map, legacy_device_policy_proto_map) + self._CheckDevicePolicyProtoMappingExistence( + device_policy_proto_map, options.device_policy_proto_path) if policy_definitions is not None: policy_ids = set() for policy in policy_definitions: self._CheckPolicy(policy, False, policy_ids, deleted_policy_ids) - self._CheckDevicePolicyProtoMapping(policy, device_policy_proto_map, - legacy_device_policy_proto_map) + self._CheckDevicePolicyProtoMappingDeviceOnly( + policy, device_policy_proto_map, legacy_device_policy_proto_map) self._CheckPolicyIDs(policy_ids, deleted_policy_ids) if highest_id is not None: self._CheckHighestId(policy_ids, highest_id) @@ -893,6 +912,10 @@ usage='usage: %prog [options] filename', description='Syntax check a policy_templates.json file.') parser.add_option( + '--device_policy_proto_path', + help='[REQUIRED] File path of the device policy proto file.', + type='string') + parser.add_option( '--fix', action='store_true', help='Automatically fix formatting.') parser.add_option( '--backup', @@ -904,8 +927,11 @@ if filename is None: if len(args) != 2: parser.print_help() - sys.exit(1) + return 1 filename = args[1] + if options.device_policy_proto_path is None: + print('Error: Missing --device_policy_proto_path argument.') + return 1 return self.Main(filename, options)
diff --git a/components/printing/browser/BUILD.gn b/components/printing/browser/BUILD.gn index b1151c0..fffc1354 100644 --- a/components/printing/browser/BUILD.gn +++ b/components/printing/browser/BUILD.gn
@@ -37,12 +37,13 @@ deps = [ "//base", "//components/crash/core/common", + "//components/discardable_memory/service", "//components/printing/common", + "//components/services/pdf_compositor/public/cpp", "//components/services/pdf_compositor/public/mojom", "//components/strings:components_strings_grit", "//printing", "//printing/common:common", - "//services/service_manager/public/cpp", "//ui/base", "//ui/gfx/geometry", ]
diff --git a/components/printing/browser/DEPS b/components/printing/browser/DEPS index 7e4576e..e2f3e32 100644 --- a/components/printing/browser/DEPS +++ b/components/printing/browser/DEPS
@@ -1,11 +1,10 @@ include_rules = [ "+components/crash/core/common", - "+components/services/pdf_compositor/public/cpp", - "+components/services/pdf_compositor/public/mojom", + "+components/discardable_memory/service", + "+components/services/pdf_compositor/public", "+components/strings/grit", "+content/public/browser", - "+mojo/public/cpp/system", - "+services/service_manager/public/cpp", + "+mojo/public", "+ui/base/l10n", ]
diff --git a/components/printing/browser/print_composite_client.cc b/components/printing/browser/print_composite_client.cc index 36cbc91..941c8fb 100644 --- a/components/printing/browser/print_composite_client.cc +++ b/components/printing/browser/print_composite_client.cc
@@ -9,14 +9,18 @@ #include "base/bind.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/stl_util.h" +#include "base/task/post_task.h" +#include "build/build_config.h" +#include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/printing/common/print_messages.h" #include "components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h" +#include "components/strings/grit/components_strings.h" +#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" -#include "content/public/browser/system_connector.h" +#include "content/public/browser/service_process_host.h" #include "printing/printing_utils.h" -#include "services/service_manager/public/cpp/connector.h" namespace printing { @@ -56,6 +60,14 @@ return content_frame_map; } +void BindDiscardableSharedMemoryManagerOnIOThread( + mojo::PendingReceiver< + discardable_memory::mojom::DiscardableSharedMemoryManager> receiver) { + DCHECK_CURRENTLY_ON(content::BrowserThread::IO); + discardable_memory::DiscardableSharedMemoryManager::Get()->Bind( + std::move(receiver), {}); +} + } // namespace PrintCompositeClient::PrintCompositeClient(content::WebContents* web_contents) @@ -84,7 +96,7 @@ // When a subframe we are expecting is deleted, we should notify pdf // compositor service. for (int doc_cookie : iter->second) { - auto& compositor = GetCompositeRequest(doc_cookie); + auto* compositor = GetCompositeRequest(doc_cookie); compositor->NotifyUnavailableSubframe(frame_guid); } pending_subframe_cookies_.erase(iter); @@ -113,7 +125,7 @@ // Content in |params| is sent from untrusted source; only minimal processing // is done here. Most of it will be directly forwarded to pdf compositor // service. - auto& compositor = GetCompositeRequest(document_cookie); + auto* compositor = GetCompositeRequest(document_cookie); auto region = params.metafile_data_region.Duplicate(); uint64_t frame_guid = GenerateFrameGuid(render_frame_host); compositor->AddSubframeContent( @@ -138,7 +150,7 @@ if (!subframe_host->IsRenderFrameLive()) { // When the subframe is dead, no need to send message, // just notify the service. - auto& compositor = GetCompositeRequest(document_cookie); + auto* compositor = GetCompositeRequest(document_cookie); compositor->NotifyUnavailableSubframe(frame_guid); return; } @@ -170,7 +182,7 @@ mojom::PdfCompositor::CompositePageToPdfCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - auto& compositor = GetCompositeRequest(document_cookie); + auto* compositor = GetCompositeRequest(document_cookie); auto region = content.metafile_data_region.Duplicate(); compositor->CompositePageToPdf( GenerateFrameGuid(render_frame_host), std::move(region), @@ -186,7 +198,7 @@ mojom::PdfCompositor::CompositeDocumentToPdfCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - auto& compositor = GetCompositeRequest(document_cookie); + auto* compositor = GetCompositeRequest(document_cookie); auto region = content.metafile_data_region.Duplicate(); // Since this class owns compositor, compositor will be gone when this class @@ -220,15 +232,15 @@ std::move(callback).Run(status, std::move(region)); } -mojom::PdfCompositorPtr& PrintCompositeClient::GetCompositeRequest(int cookie) { +mojom::PdfCompositor* PrintCompositeClient::GetCompositeRequest(int cookie) { auto iter = compositor_map_.find(cookie); if (iter != compositor_map_.end()) { DCHECK(iter->second.is_bound()); - return iter->second; + return iter->second.get(); } iter = compositor_map_.emplace(cookie, CreateCompositeRequest()).first; - return iter->second; + return iter->second.get(); } void PrintCompositeClient::RemoveCompositeRequest(int cookie) { @@ -236,11 +248,23 @@ DCHECK_EQ(erased, 1u); } -mojom::PdfCompositorPtr PrintCompositeClient::CreateCompositeRequest() { - if (!connector_) - connector_ = content::GetSystemConnector()->Clone(); - mojom::PdfCompositorPtr compositor; - connector_->BindInterface(mojom::kServiceName, &compositor); +mojo::Remote<mojom::PdfCompositor> +PrintCompositeClient::CreateCompositeRequest() { + auto compositor = content::ServiceProcessHost::Launch<mojom::PdfCompositor>( + content::ServiceProcessHost::Options() + .WithDisplayName(IDS_PDF_COMPOSITOR_SERVICE_DISPLAY_NAME) + .WithSandboxType(service_manager::SANDBOX_TYPE_PDF_COMPOSITOR) + .Pass()); + + mojo::PendingRemote<discardable_memory::mojom::DiscardableSharedMemoryManager> + discardable_memory_manager; + base::PostTask( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce( + &BindDiscardableSharedMemoryManagerOnIOThread, + discardable_memory_manager.InitWithNewPipeAndPassReceiver())); + compositor->SetDiscardableSharedMemoryManager( + std::move(discardable_memory_manager)); compositor->SetWebContentsURL(web_contents()->GetLastCommittedURL()); compositor->SetUserAgent(user_agent_); return compositor;
diff --git a/components/printing/browser/print_composite_client.h b/components/printing/browser/print_composite_client.h index 14756fb..c8102b7 100644 --- a/components/printing/browser/print_composite_client.h +++ b/components/printing/browser/print_composite_client.h
@@ -12,13 +12,10 @@ #include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" +#include "mojo/public/cpp/bindings/remote.h" struct PrintHostMsg_DidPrintContent_Params; -namespace service_manager { -class Connector; -} - namespace printing { // Class to manage print requests and their communication with pdf @@ -86,18 +83,16 @@ // Get the request or create a new one if none exists. // Since printed pages always share content with its document, they share the // same composite request. - mojom::PdfCompositorPtr& GetCompositeRequest(int cookie); + mojom::PdfCompositor* GetCompositeRequest(int cookie); // Remove an existing request from |compositor_map_|. void RemoveCompositeRequest(int cookie); - mojom::PdfCompositorPtr CreateCompositeRequest(); - - std::unique_ptr<service_manager::Connector> connector_; + mojo::Remote<mojom::PdfCompositor> CreateCompositeRequest(); // Stores the mapping between document cookies and their corresponding // requests. - std::map<int, mojom::PdfCompositorPtr> compositor_map_; + std::map<int, mojo::Remote<mojom::PdfCompositor>> compositor_map_; // Stores the mapping between render frame's global unique id and document // cookies that requested such frame.
diff --git a/components/printing/renderer/DEPS b/components/printing/renderer/DEPS index d195afd..7e4dbdc7 100644 --- a/components/printing/renderer/DEPS +++ b/components/printing/renderer/DEPS
@@ -4,7 +4,6 @@ "+content/public/renderer", "+mojo/public", "+net/base", - "+services/service_manager/public/cpp", "+third_party/skia", "+ui/base", ]
diff --git a/components/resources/OWNERS b/components/resources/OWNERS index 704da9fb..7038831 100644 --- a/components/resources/OWNERS +++ b/components/resources/OWNERS
@@ -18,7 +18,7 @@ per-file neterror*=mmenke@chromium.org per-file neterror*=file://net/OWNERS per-file ntp_tiles_resources.grdp=file://components/ntp_tiles/OWNERS -per-file onboarding_welcome_scaled_resources.grdp=file://ui/webui/PLATFORM_OWNERS +per-file welcome_scaled_resources.grdp=file://ui/webui/PLATFORM_OWNERS per-file offline_pages_resources.grdp=file://components/offline_pages/OWNERS per-file proximity_auth*=tengs@chromium.org per-file printing_resources.grdp=file://printing/OWNERS
diff --git a/components/resources/components_scaled_resources.grd b/components/resources/components_scaled_resources.grd index 379fb2f9..a58807f 100644 --- a/components/resources/components_scaled_resources.grd +++ b/components/resources/components_scaled_resources.grd
@@ -16,7 +16,7 @@ <part file="crash_scaled_resources.grdp" /> <part file="flags_ui_scaled_resources.grdp" /> <part file="neterror_scaled_resources.grdp" /> - <part file="onboarding_welcome_scaled_resources.grdp" /> + <part file="welcome_scaled_resources.grdp" /> <part file="version_ui_scaled_resources.grdp" /> <!-- Generic resources -->
diff --git a/components/resources/onboarding_welcome_scaled_resources.grdp b/components/resources/onboarding_welcome_scaled_resources.grdp deleted file mode 100644 index c5a5f73..0000000 --- a/components/resources/onboarding_welcome_scaled_resources.grdp +++ /dev/null
@@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<grit-part> - <if expr="not is_android and not is_ios and _google_chrome"> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_GMAIL" file="google_chrome/welcome/gmail.png" /> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_MAPS" file="google_chrome/welcome/maps.png" /> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_NEWS" file="google_chrome/welcome/news.png" /> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_SEARCH" file="google_chrome/welcome/search.png" /> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_TRANSLATE" file="google_chrome/welcome/translate.png" /> - <structure type="chrome_scaled_image" name="IDS_ONBOARDING_WELCOME_YOUTUBE" file="google_chrome/welcome/youtube.png" /> - </if> -</grit-part>
diff --git a/components/resources/welcome_scaled_resources.grdp b/components/resources/welcome_scaled_resources.grdp new file mode 100644 index 0000000..b6c82bd --- /dev/null +++ b/components/resources/welcome_scaled_resources.grdp
@@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<grit-part> + <if expr="not is_android and not is_ios and _google_chrome"> + <structure type="chrome_scaled_image" name="IDS_WELCOME_GMAIL" file="google_chrome/welcome/gmail.png" /> + <structure type="chrome_scaled_image" name="IDS_WELCOME_MAPS" file="google_chrome/welcome/maps.png" /> + <structure type="chrome_scaled_image" name="IDS_WELCOME_NEWS" file="google_chrome/welcome/news.png" /> + <structure type="chrome_scaled_image" name="IDS_WELCOME_SEARCH" file="google_chrome/welcome/search.png" /> + <structure type="chrome_scaled_image" name="IDS_WELCOME_TRANSLATE" file="google_chrome/welcome/translate.png" /> + <structure type="chrome_scaled_image" name="IDS_WELCOME_YOUTUBE" file="google_chrome/welcome/youtube.png" /> + </if> +</grit-part>
diff --git a/components/security_interstitials/core/browser/resources/images/heavy_ad.svg b/components/security_interstitials/core/browser/resources/images/heavy_ad.svg new file mode 100644 index 0000000..7f15c3ed --- /dev/null +++ b/components/security_interstitials/core/browser/resources/images/heavy_ad.svg
@@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="none" d="M-618-440H782v3600H-618zM0 0h24v24H0z"/><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11z" fill-opacity=".2"/><path d="M14.392 16.82l1.103-1.102-2.374-2.372 2.379-2.378-1.103-1.102-2.38 2.378L9.632 9.86l-1.103 1.102 2.386 2.384L8.5 15.758l1.103 1.102 2.414-2.413z" fill-opacity=".2"/></svg> \ No newline at end of file
diff --git a/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.css b/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.css index 3b379f3..fa7c0f0 100644 --- a/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.css +++ b/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.css
@@ -70,6 +70,10 @@ width: 20vh; } +.heavy-ad .icon { + background-image: url(images/heavy_ad.svg); +} + .interstitial-wrapper { align-items: center; box-sizing: border-box;
diff --git a/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.js b/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.js index 3464121a..44eff5e 100644 --- a/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.js +++ b/components/security_interstitials/core/browser/resources/interstitial_webview_quiet.js
@@ -21,6 +21,9 @@ function initPage() { var isGiantWebView = loadTimeData.getBoolean('is_giant'); var darkModeAvailable = loadTimeData.getBoolean('darkModeAvailable'); + var interstitialType = loadTimeData.getString('type'); + var safebrowsing = interstitialType == "SAFEBROWSING"; + var heavyAd = interstitialType == "HEAVYAD"; document.body.className = isGiantWebView ? 'giant' : ''; @@ -28,6 +31,10 @@ document.body.classList.add('dark-mode-available'); } + if (heavyAd) { + document.body.classList.add('heavy-ad'); + } + preventDefaultOnPoundLinkClicks(); $('details-link').addEventListener('click', function(event) { @@ -35,9 +42,11 @@ $('main-content').classList.toggle(HIDDEN_CLASS, !hiddenDetails); }); - $('proceed-link').addEventListener('click', function(event) { - sendCommand(SecurityInterstitialCommandId.CMD_PROCEED); - }); + if (safebrowsing) { + $('proceed-link').addEventListener('click', function(event) { + sendCommand(SecurityInterstitialCommandId.CMD_PROCEED); + }); + } window.addEventListener('resize', onResize); }
diff --git a/components/services/pdf_compositor/BUILD.gn b/components/services/pdf_compositor/BUILD.gn index 55e7b17..ccc4858 100644 --- a/components/services/pdf_compositor/BUILD.gn +++ b/components/services/pdf_compositor/BUILD.gn
@@ -8,8 +8,6 @@ sources = [ "pdf_compositor_impl.cc", "pdf_compositor_impl.h", - "pdf_compositor_service.cc", - "pdf_compositor_service.h", ] deps = [ @@ -17,17 +15,19 @@ "//components/crash/core/common:crash_key", "//components/discardable_memory/client", "//components/discardable_memory/public/mojom", - "//content/public/child", - "//content/public/common:service_names", + "//components/services/pdf_compositor/public/cpp", "//content/public/utility", "//printing/common", "//skia", "//third_party/blink/public:blink_headers", ] + if (is_win) { + deps += [ "//content/public/child" ] + } + public_deps = [ "//components/services/pdf_compositor/public/mojom", - "//services/service_manager/public/cpp", ] } @@ -36,7 +36,6 @@ testonly = true sources = [ "pdf_compositor_impl_unittest.cc", - "pdf_compositor_service_unittest.cc", ] include_dirs = [ @@ -51,8 +50,8 @@ "//base/test:test_support", "//cc/paint:paint", "//components/crash/core/common:crash_key", + "//components/services/pdf_compositor/public/cpp", "//components/services/pdf_compositor/public/mojom", - "//services/service_manager/public/cpp/test:test_support", "//skia", "//testing/gmock", "//testing/gtest",
diff --git a/components/services/pdf_compositor/DEPS b/components/services/pdf_compositor/DEPS index 1f84ab9..3dec59eb 100644 --- a/components/services/pdf_compositor/DEPS +++ b/components/services/pdf_compositor/DEPS
@@ -7,8 +7,6 @@ "+content/public/utility", "+mojo/public/cpp", "+printing/common", - "+services/service_manager/public/cpp", - "+services/service_manager/public/mojom", "+skia", "+third_party/skia", "+third_party/blink/public/platform", # Test web sandbox support.
diff --git a/components/services/pdf_compositor/pdf_compositor_impl.cc b/components/services/pdf_compositor/pdf_compositor_impl.cc index d7ea512a..b4fd83e3e2 100644 --- a/components/services/pdf_compositor/pdf_compositor_impl.cc +++ b/components/services/pdf_compositor/pdf_compositor_impl.cc
@@ -9,24 +9,90 @@ #include <utility> #include "base/logging.h" +#include "base/memory/discardable_memory.h" +#include "base/single_thread_task_runner.h" #include "base/stl_util.h" +#include "build/build_config.h" #include "components/crash/core/common/crash_key.h" +#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h" #include "components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h" +#include "content/public/utility/utility_thread.h" #include "mojo/public/cpp/base/shared_memory_utils.h" #include "mojo/public/cpp/system/platform_handle.h" #include "printing/common/metafile_utils.h" +#include "third_party/blink/public/platform/web_image_generator.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkDocument.h" +#include "third_party/skia/include/core/SkGraphics.h" #include "third_party/skia/include/core/SkSerialProcs.h" #include "third_party/skia/src/utils/SkMultiPictureDocument.h" +#if defined(OS_WIN) +#include "content/public/child/dwrite_font_proxy_init_win.h" +#elif defined(OS_MACOSX) +#include "third_party/blink/public/platform/platform.h" +#include "third_party/skia/include/core/SkFontMgr.h" +#elif defined(OS_POSIX) && !defined(OS_ANDROID) +#include "third_party/blink/public/platform/platform.h" +#endif + namespace printing { PdfCompositorImpl::PdfCompositorImpl( - std::unique_ptr<service_manager::ServiceContextRef> service_ref) - : service_ref_(std::move(service_ref)) {} + mojo::PendingReceiver<mojom::PdfCompositor> receiver, + bool initialize_environment, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) + : io_task_runner_(std::move(io_task_runner)) { + if (receiver) + receiver_.Bind(std::move(receiver)); -PdfCompositorImpl::~PdfCompositorImpl() = default; +#if defined(OS_WIN) + // Initialize direct write font proxy so skia can use it. + content::InitializeDWriteFontProxy(); +#endif + + // Hook up blink's codecs so skia can call them. + SkGraphics::SetImageGeneratorFromEncodedDataFactory( + blink::WebImageGenerator::CreateAsSkImageGenerator); + + if (!initialize_environment) + return; + +#if defined(OS_POSIX) && !defined(OS_ANDROID) + content::UtilityThread::Get()->EnsureBlinkInitializedWithSandboxSupport(); + // Check that we have sandbox support on this platform. + DCHECK(blink::Platform::Current()->GetSandboxSupport()); +#else + content::UtilityThread::Get()->EnsureBlinkInitialized(); +#endif + +#if defined(OS_MACOSX) + // Check that font access is granted. + // This doesn't do comprehensive tests to make sure fonts can work properly. + // It is just a quick and simple check to catch things like improper sandbox + // policy setup. + DCHECK(SkFontMgr::RefDefault()->countFamilies()); +#endif +} + +PdfCompositorImpl::~PdfCompositorImpl() { +#if defined(OS_WIN) + content::UninitializeDWriteFontProxy(); +#endif +} + +void PdfCompositorImpl::SetDiscardableSharedMemoryManager( + mojo::PendingRemote< + discardable_memory::mojom::DiscardableSharedMemoryManager> manager) { + // Set up discardable memory manager. + discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr( + std::move(manager)); + discardable_shared_memory_manager_ = std::make_unique< + discardable_memory::ClientDiscardableSharedMemoryManager>( + std::move(manager_ptr), io_task_runner_); + base::DiscardableMemoryAllocator::SetInstance( + discardable_shared_memory_manager_.get()); +} void PdfCompositorImpl::NotifyUnavailableSubframe(uint64_t frame_guid) { // Add this frame into the map.
diff --git a/components/services/pdf_compositor/pdf_compositor_impl.h b/components/services/pdf_compositor/pdf_compositor_impl.h index 3b7aa4b..84f40a75 100644 --- a/components/services/pdf_compositor/pdf_compositor_impl.h +++ b/components/services/pdf_compositor/pdf_compositor_impl.h
@@ -15,22 +15,43 @@ #include "base/macros.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/ref_counted_memory.h" +#include "base/memory/scoped_refptr.h" #include "base/optional.h" #include "components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h" #include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "services/service_manager/public/cpp/service_context_ref.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver.h" #include "third_party/skia/include/core/SkPicture.h" #include "third_party/skia/include/core/SkRefCnt.h" +namespace base { +class SingleThreadTaskRunner; +} + +namespace discardable_memory { +class ClientDiscardableSharedMemoryManager; +} + namespace printing { class PdfCompositorImpl : public mojom::PdfCompositor { public: - explicit PdfCompositorImpl( - std::unique_ptr<service_manager::ServiceContextRef> service_ref); + // Creates an instance with an optional Mojo receiver (may be null) and + // optional initialization of the runtime environment necessary for + // compositing operations. |io_task_runner| is used for shared memory + // management, if and only if |SetDiscardableSharedMemoryManager()| is + // eventually called, which may not be the case in unit tests. In practice, + // |initialize_environment| is only false in unit tests. + PdfCompositorImpl(mojo::PendingReceiver<mojom::PdfCompositor> receiver, + bool initialize_environment, + scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); ~PdfCompositorImpl() override; // mojom::PdfCompositor + void SetDiscardableSharedMemoryManager( + mojo::PendingRemote< + discardable_memory::mojom::DiscardableSharedMemoryManager> manager) + override; void NotifyUnavailableSubframe(uint64_t frame_guid) override; void AddSubframeContent( uint64_t frame_guid, @@ -159,9 +180,13 @@ DeserializationContext GetDeserializationContext( const ContentToFrameMap& subframe_content_map); - const std::unique_ptr<service_manager::ServiceContextRef> service_ref_; - // The creator of this service. + mojo::Receiver<mojom::PdfCompositor> receiver_{this}; + const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; + std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> + discardable_shared_memory_manager_; + + // The creator of this service. // Currently contains the service creator's user agent string if given, // otherwise just use string "Chromium". std::string creator_ = "Chromium";
diff --git a/components/services/pdf_compositor/pdf_compositor_impl_unittest.cc b/components/services/pdf_compositor/pdf_compositor_impl_unittest.cc index 7f52160a..9cfad06 100644 --- a/components/services/pdf_compositor/pdf_compositor_impl_unittest.cc +++ b/components/services/pdf_compositor/pdf_compositor_impl_unittest.cc
@@ -24,8 +24,11 @@ class MockPdfCompositorImpl : public PdfCompositorImpl { public: - MockPdfCompositorImpl() : PdfCompositorImpl(nullptr) {} - ~MockPdfCompositorImpl() override {} + MockPdfCompositorImpl() + : PdfCompositorImpl(mojo::NullReceiver(), + false /* initialize_environment */, + nullptr /* io_task_runner */) {} + ~MockPdfCompositorImpl() override = default; MOCK_METHOD2(OnFulfillRequest, void(uint64_t, int)); @@ -96,7 +99,9 @@ }; TEST_F(PdfCompositorImplTest, IsReadyToComposite) { - PdfCompositorImpl impl(nullptr); + PdfCompositorImpl impl(mojo::NullReceiver(), + false /* initialize_environment */, + nullptr /* io_task_runner */); // Frame 2 and 3 are painted. impl.AddSubframeContent(2, CreateTestData(2, -1), ContentToFrameMap()); impl.AddSubframeContent(3, CreateTestData(3, -1), ContentToFrameMap()); @@ -132,7 +137,9 @@ } TEST_F(PdfCompositorImplTest, MultiLayerDependency) { - PdfCompositorImpl impl(nullptr); + PdfCompositorImpl impl(mojo::NullReceiver(), + false /* initialize_environment */, + nullptr /* io_task_runner */); // Frame 3 has content 1 which refers to subframe 1. ContentToFrameMap subframe_content_map = {{1, 1}}; impl.AddSubframeContent(3, CreateTestData(3, -1), subframe_content_map); @@ -172,7 +179,9 @@ } TEST_F(PdfCompositorImplTest, DependencyLoop) { - PdfCompositorImpl impl(nullptr); + PdfCompositorImpl impl(mojo::NullReceiver(), + false /* initialize_environment */, + nullptr /* io_task_runner */); // Frame 3 has content 1, which refers to frame 1. // Frame 1 has content 3, which refers to frame 3. ContentToFrameMap subframe_content_map = {{3, 3}}; @@ -305,7 +314,9 @@ } TEST_F(PdfCompositorImplCrashKeyTest, SetCrashKey) { - PdfCompositorImpl impl(nullptr); + PdfCompositorImpl impl(mojo::NullReceiver(), + false /* initialize_environment */, + nullptr /* io_task_runner */); std::string url_str("https://www.example.com/"); GURL url(url_str); impl.SetWebContentsURL(url);
diff --git a/components/services/pdf_compositor/pdf_compositor_service.cc b/components/services/pdf_compositor/pdf_compositor_service.cc deleted file mode 100644 index 96e6202..0000000 --- a/components/services/pdf_compositor/pdf_compositor_service.cc +++ /dev/null
@@ -1,104 +0,0 @@ -// Copyright 2017 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 "components/services/pdf_compositor/pdf_compositor_service.h" - -#include <utility> - -#include <memory> - -#include "base/bind.h" -#include "base/lazy_instance.h" -#include "base/memory/discardable_memory.h" -#include "build/build_config.h" -#include "components/services/pdf_compositor/pdf_compositor_impl.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "content/public/common/service_names.mojom.h" -#include "content/public/utility/utility_thread.h" -#include "mojo/public/cpp/bindings/strong_binding.h" -#include "services/service_manager/public/cpp/connector.h" - -#if defined(OS_WIN) -#include "content/public/child/dwrite_font_proxy_init_win.h" -#elif defined(OS_MACOSX) -#include "third_party/blink/public/platform/platform.h" -#include "third_party/skia/include/core/SkFontMgr.h" -#elif defined(OS_POSIX) && !defined(OS_ANDROID) -#include "third_party/blink/public/platform/platform.h" -#endif - -namespace { - -void OnPdfCompositorRequest(service_manager::ServiceKeepalive* keepalive, - printing::mojom::PdfCompositorRequest request) { - mojo::MakeStrongBinding( - std::make_unique<printing::PdfCompositorImpl>(keepalive->CreateRef()), - std::move(request)); -} - -} // namespace - -namespace printing { - -PdfCompositorService::PdfCompositorService( - service_manager::mojom::ServiceRequest request) - : binding_(this, std::move(request)), - keepalive_(&binding_, base::TimeDelta{}) {} - -PdfCompositorService::~PdfCompositorService() { -#if defined(OS_WIN) - content::UninitializeDWriteFontProxy(); -#endif -} - -// static -std::unique_ptr<service_manager::Service> PdfCompositorService::Create( - service_manager::mojom::ServiceRequest request) { -#if defined(OS_WIN) - // Initialize direct write font proxy so skia can use it. - content::InitializeDWriteFontProxy(); -#endif - return std::make_unique<printing::PdfCompositorService>(std::move(request)); -} - -void PdfCompositorService::OnStart() { - registry_.AddInterface( - base::BindRepeating(&OnPdfCompositorRequest, &keepalive_)); - - if (skip_initialization_for_testing_) - return; - - // Set up discardable memory manager. - discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; - binding_.GetConnector()->BindInterface(content::mojom::kSystemServiceName, - &manager_ptr); - discardable_shared_memory_manager_ = std::make_unique< - discardable_memory::ClientDiscardableSharedMemoryManager>( - std::move(manager_ptr), content::UtilityThread::Get()->GetIOTaskRunner()); - DCHECK(discardable_shared_memory_manager_); - base::DiscardableMemoryAllocator::SetInstance( - discardable_shared_memory_manager_.get()); - -#if defined(OS_POSIX) && !defined(OS_ANDROID) - // Check that we have sandbox support on this platform. - DCHECK(blink::Platform::Current()->GetSandboxSupport()); -#endif - -#if defined(OS_MACOSX) - // Check that font access is granted. - // This doesn't do comprehensive tests to make sure fonts can work properly. - // It is just a quick and simple check to catch things like improper sandbox - // policy setup. - DCHECK(SkFontMgr::RefDefault()->countFamilies()); -#endif -} - -void PdfCompositorService::OnBindInterface( - const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) { - registry_.BindInterface(interface_name, std::move(interface_pipe)); -} - -} // namespace printing
diff --git a/components/services/pdf_compositor/pdf_compositor_service.h b/components/services/pdf_compositor/pdf_compositor_service.h deleted file mode 100644 index 28fda4a..0000000 --- a/components/services/pdf_compositor/pdf_compositor_service.h +++ /dev/null
@@ -1,55 +0,0 @@ -// Copyright 2017 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. - -#ifndef COMPONENTS_SERVICES_PDF_COMPOSITOR_PDF_COMPOSITOR_SERVICE_H_ -#define COMPONENTS_SERVICES_PDF_COMPOSITOR_PDF_COMPOSITOR_SERVICE_H_ - -#include <memory> -#include <string> - -#include "base/macros.h" -#include "base/memory/weak_ptr.h" -#include "components/discardable_memory/client/client_discardable_shared_memory_manager.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "services/service_manager/public/cpp/binder_registry.h" -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/cpp/service_binding.h" -#include "services/service_manager/public/cpp/service_keepalive.h" - -namespace printing { - -class PdfCompositorService : public service_manager::Service { - public: - explicit PdfCompositorService(service_manager::mojom::ServiceRequest request); - ~PdfCompositorService() override; - - // Factory function for use as an embedded service. - static std::unique_ptr<service_manager::Service> Create( - service_manager::mojom::ServiceRequest request); - - // service_manager::Service: - void OnStart() override; - void OnBindInterface(const service_manager::BindSourceInfo& source_info, - const std::string& interface_name, - mojo::ScopedMessagePipeHandle interface_pipe) override; - - void set_skip_initialization_for_testing(bool skip) { - skip_initialization_for_testing_ = skip; - } - - private: - service_manager::ServiceBinding binding_; - service_manager::ServiceKeepalive keepalive_; - bool skip_initialization_for_testing_ = false; - std::unique_ptr<discardable_memory::ClientDiscardableSharedMemoryManager> - discardable_shared_memory_manager_; - service_manager::BinderRegistry registry_; - base::WeakPtrFactory<PdfCompositorService> weak_factory_{this}; - - DISALLOW_COPY_AND_ASSIGN(PdfCompositorService); -}; - -} // namespace printing - -#endif // COMPONENTS_SERVICES_PDF_COMPOSITOR_PDF_COMPOSITOR_SERVICE_H_
diff --git a/components/services/pdf_compositor/pdf_compositor_service_unittest.cc b/components/services/pdf_compositor/pdf_compositor_service_unittest.cc deleted file mode 100644 index 2e459d5..0000000 --- a/components/services/pdf_compositor/pdf_compositor_service_unittest.cc +++ /dev/null
@@ -1,198 +0,0 @@ -// Copyright 2017 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 <memory> -#include <utility> - -#include "base/bind.h" -#include "base/callback.h" -#include "base/memory/read_only_shared_memory_region.h" -#include "base/run_loop.h" -#include "base/test/scoped_task_environment.h" -#include "base/test/test_discardable_memory_allocator.h" -#include "cc/paint/paint_flags.h" -#include "cc/paint/skia_paint_canvas.h" -#include "components/services/pdf_compositor/pdf_compositor_service.h" -#include "components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "services/service_manager/public/cpp/test/test_connector_factory.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/skia/include/core/SkStream.h" -#include "third_party/skia/src/utils/SkMultiPictureDocument.h" - -namespace printing { - -class PdfCompositorServiceTest : public testing::Test { - public: - PdfCompositorServiceTest() - : connector_(test_connector_factory_.CreateConnector()), - service_( - test_connector_factory_.RegisterInstance(mojom::kServiceName)) { - // We don't want the service instance setting up its own discardable memory - // allocator, which it normally does. Instead it will use the one provided - // by our fixture in |SetUp()| below. - service_.set_skip_initialization_for_testing(true); - } - - ~PdfCompositorServiceTest() override = default; - - MOCK_METHOD1(CallbackOnCompositeSuccess, - void(const base::ReadOnlySharedMemoryRegion&)); - MOCK_METHOD1(CallbackOnCompositeStatus, void(mojom::PdfCompositor::Status)); - - void OnCompositeToPdfCallback(mojom::PdfCompositor::Status status, - base::ReadOnlySharedMemoryRegion region) { - if (status == mojom::PdfCompositor::Status::kSuccess) - CallbackOnCompositeSuccess(region); - else - CallbackOnCompositeStatus(status); - run_loop_->Quit(); - } - - MOCK_METHOD0(ConnectionClosed, void()); - - protected: - service_manager::Connector* connector() { return connector_.get(); } - - void SetUp() override { - base::DiscardableMemoryAllocator::SetInstance( - &discardable_memory_allocator_); - - ASSERT_FALSE(compositor_); - connector()->BindInterface(mojom::kServiceName, &compositor_); - ASSERT_TRUE(compositor_); - - run_loop_ = std::make_unique<base::RunLoop>(); - } - - void TearDown() override { - compositor_.reset(); - base::DiscardableMemoryAllocator::SetInstance(nullptr); - } - - base::ReadOnlySharedMemoryRegion CreateMSKP() { - SkDynamicMemoryWStream stream; - sk_sp<SkDocument> doc = SkMakeMultiPictureDocument(&stream); - cc::SkiaPaintCanvas canvas(doc->beginPage(800, 600)); - SkRect rect = SkRect::MakeXYWH(10, 10, 250, 250); - cc::PaintFlags flags; - flags.setAntiAlias(false); - flags.setColor(SK_ColorRED); - flags.setStyle(cc::PaintFlags::kFill_Style); - canvas.drawRect(rect, flags); - doc->endPage(); - doc->close(); - - size_t len = stream.bytesWritten(); - base::MappedReadOnlyRegion memory = - base::ReadOnlySharedMemoryRegion::Create(len); - CHECK(memory.IsValid()); - stream.copyTo(memory.mapping.memory()); - return std::move(memory.region); - } - - void CallCompositorWithSuccess(mojom::PdfCompositorPtr ptr) { - static constexpr uint64_t kFrameGuid = 1234; - auto handle = CreateMSKP(); - ASSERT_TRUE(handle.IsValid()); - EXPECT_CALL(*this, CallbackOnCompositeSuccess(testing::_)).Times(1); - ptr->CompositeDocumentToPdf( - kFrameGuid, std::move(handle), ContentToFrameMap(), - base::BindOnce(&PdfCompositorServiceTest::OnCompositeToPdfCallback, - base::Unretained(this))); - run_loop_->Run(); - } - - base::test::ScopedTaskEnvironment task_environment_; - std::unique_ptr<base::RunLoop> run_loop_; - mojom::PdfCompositorPtr compositor_; - base::TestDiscardableMemoryAllocator discardable_memory_allocator_; - - private: - service_manager::TestConnectorFactory test_connector_factory_; - std::unique_ptr<service_manager::Connector> connector_; - PdfCompositorService service_; - - DISALLOW_COPY_AND_ASSIGN(PdfCompositorServiceTest); -}; - -// Test callback function is called on error conditions in service. -TEST_F(PdfCompositorServiceTest, InvokeCallbackOnContentError) { - auto serialized_content = base::ReadOnlySharedMemoryRegion::Create(10); - - EXPECT_CALL(*this, CallbackOnCompositeStatus( - mojom::PdfCompositor::Status::kContentFormatError)) - .Times(1); - compositor_->CompositeDocumentToPdf( - 5u, std::move(serialized_content.region), ContentToFrameMap(), - base::BindOnce(&PdfCompositorServiceTest::OnCompositeToPdfCallback, - base::Unretained(this))); - run_loop_->Run(); -} - -// Test callback function is called upon success. -TEST_F(PdfCompositorServiceTest, InvokeCallbackOnSuccess) { - CallCompositorWithSuccess(std::move(compositor_)); -} - -// Test coexistence of multiple PdfCompositor interface bindings. -TEST_F(PdfCompositorServiceTest, MultipleCompositors) { - // One service can bind multiple interfaces. - mojom::PdfCompositorPtr another_compositor; - ASSERT_FALSE(another_compositor); - connector()->BindInterface(mojom::kServiceName, &another_compositor); - ASSERT_TRUE(another_compositor); - ASSERT_NE(compositor_.get(), another_compositor.get()); - - // Terminating one interface won't affect another. - compositor_.reset(); - CallCompositorWithSuccess(std::move(another_compositor)); -} - -// Test data structures and content of multiple PdfCompositor interface bindings -// are independent from each other. -TEST_F(PdfCompositorServiceTest, IndependentCompositors) { - // Create a new connection 2. - mojom::PdfCompositorPtr compositor2; - ASSERT_FALSE(compositor2); - connector()->BindInterface(mojom::kServiceName, &compositor2); - ASSERT_TRUE(compositor2); - - // In original connection, add frame 4 with content 2 referring - // to subframe 1. - compositor_->AddSubframeContent(1u, CreateMSKP(), ContentToFrameMap()); - - // Original connection can use this subframe 1. - EXPECT_CALL(*this, CallbackOnCompositeSuccess(testing::_)).Times(1); - ContentToFrameMap subframe_content_map; - subframe_content_map[2u] = 1u; - - compositor_->CompositeDocumentToPdf( - 4u, CreateMSKP(), std::move(subframe_content_map), - base::BindOnce(&PdfCompositorServiceTest::OnCompositeToPdfCallback, - base::Unretained(this))); - run_loop_->Run(); - testing::Mock::VerifyAndClearExpectations(this); - - // Connection 2 doesn't know about subframe 1. - subframe_content_map.clear(); - subframe_content_map[2u] = 1u; - EXPECT_CALL(*this, CallbackOnCompositeSuccess(testing::_)).Times(0); - compositor2->CompositeDocumentToPdf( - 4u, CreateMSKP(), std::move(subframe_content_map), - base::BindOnce(&PdfCompositorServiceTest::OnCompositeToPdfCallback, - base::Unretained(this))); - testing::Mock::VerifyAndClearExpectations(this); - - // Add info about subframe 1 to connection 2 so it can use it. - EXPECT_CALL(*this, CallbackOnCompositeSuccess(testing::_)).Times(1); - // Add subframe 1's content. - // Now all content needed for previous request is ready. - compositor2->AddSubframeContent(1u, CreateMSKP(), ContentToFrameMap()); - run_loop_ = std::make_unique<base::RunLoop>(); - run_loop_->Run(); -} - -} // namespace printing
diff --git a/components/services/pdf_compositor/public/cpp/BUILD.gn b/components/services/pdf_compositor/public/cpp/BUILD.gn index 6af5d24..799b9eca 100644 --- a/components/services/pdf_compositor/public/cpp/BUILD.gn +++ b/components/services/pdf_compositor/public/cpp/BUILD.gn
@@ -2,36 +2,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//mojo/public/tools/bindings/mojom.gni") - -source_set("factory") { +source_set("cpp") { sources = [ - "pdf_compositor_service_factory.cc", - "pdf_compositor_service_factory.h", - ] - - deps = [ - "//components/services/pdf_compositor/", - "//content/public/common", - "//content/public/utility", + "pdf_service_mojo_types.h", ] public_deps = [ - "//components/services/pdf_compositor/public/mojom", - "//services/service_manager/public/cpp", - ] -} - -source_set("manifest") { - sources = [ - "manifest.cc", - "manifest.h", - ] - - deps = [ "//base", - "//components/services/pdf_compositor/public/mojom", - "//components/strings", - "//services/service_manager/public/cpp", ] }
diff --git a/components/services/pdf_compositor/public/cpp/OWNERS b/components/services/pdf_compositor/public/cpp/OWNERS deleted file mode 100644 index 6faeaa47..0000000 --- a/components/services/pdf_compositor/public/cpp/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -per-file manifest.cc=set noparent -per-file manifest.cc=file://ipc/SECURITY_OWNERS -per-file manifest.h=set noparent -per-file manifest.h=file://ipc/SECURITY_OWNERS
diff --git a/components/services/pdf_compositor/public/cpp/manifest.cc b/components/services/pdf_compositor/public/cpp/manifest.cc deleted file mode 100644 index ee6ebc0..0000000 --- a/components/services/pdf_compositor/public/cpp/manifest.cc +++ /dev/null
@@ -1,38 +0,0 @@ -// Copyright 2019 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 "components/services/pdf_compositor/public/cpp/manifest.h" - -#include "base/no_destructor.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "components/strings/grit/components_strings.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -namespace printing { - -const service_manager::Manifest& GetPdfCompositorManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .WithServiceName(mojom::kServiceName) - .WithDisplayName(IDS_PDF_COMPOSITOR_SERVICE_DISPLAY_NAME) - .WithOptions( - service_manager::ManifestOptionsBuilder() - .WithExecutionMode(service_manager::Manifest::ExecutionMode:: - kOutOfProcessBuiltin) - .WithSandboxType("pdf_compositor") - .WithInstanceSharingPolicy( - service_manager::Manifest::InstanceSharingPolicy:: - kSharedAcrossGroups) - .Build()) - .ExposeCapability( - "compositor", - service_manager::Manifest::InterfaceList<mojom::PdfCompositor>()) - .RequireCapability("content_system", "app") - .RequireCapability("content_system", "sandbox_support") - .RequireCapability("ui", "discardable_memory") - .Build()}; - return *manifest; -} - -} // namespace printing
diff --git a/components/services/pdf_compositor/public/cpp/manifest.h b/components/services/pdf_compositor/public/cpp/manifest.h deleted file mode 100644 index 52b57fc..0000000 --- a/components/services/pdf_compositor/public/cpp/manifest.h +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2019 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. - -#ifndef COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_MANIFEST_H_ -#define COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_MANIFEST_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -namespace printing { - -const service_manager::Manifest& GetPdfCompositorManifest(); - -} // namespace printing - -#endif // COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_MANIFEST_H_
diff --git a/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.cc b/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.cc deleted file mode 100644 index d74c5bf..0000000 --- a/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.cc +++ /dev/null
@@ -1,28 +0,0 @@ -// Copyright 2017 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 "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h" - -#include "build/build_config.h" -#include "components/services/pdf_compositor/pdf_compositor_service.h" -#include "content/public/utility/utility_thread.h" -#include "third_party/blink/public/platform/web_image_generator.h" -#include "third_party/skia/include/core/SkGraphics.h" - -namespace printing { - -std::unique_ptr<service_manager::Service> CreatePdfCompositorService( - service_manager::mojom::ServiceRequest request) { -#if defined(OS_POSIX) && !defined(OS_ANDROID) - content::UtilityThread::Get()->EnsureBlinkInitializedWithSandboxSupport(); -#else - content::UtilityThread::Get()->EnsureBlinkInitialized(); -#endif - // Hook up blink's codecs so skia can call them. - SkGraphics::SetImageGeneratorFromEncodedDataFactory( - blink::WebImageGenerator::CreateAsSkImageGenerator); - return printing::PdfCompositorService::Create(std::move(request)); -} - -} // namespace printing
diff --git a/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h b/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h deleted file mode 100644 index 61400738..0000000 --- a/components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h +++ /dev/null
@@ -1,21 +0,0 @@ -// Copyright 2017 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. - -#ifndef COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_PDF_COMPOSITOR_SERVICE_FACTORY_H_ -#define COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_PDF_COMPOSITOR_SERVICE_FACTORY_H_ - -#include <memory> -#include <string> - -#include "services/service_manager/public/cpp/service.h" -#include "services/service_manager/public/mojom/service.mojom.h" - -namespace printing { - -std::unique_ptr<service_manager::Service> CreatePdfCompositorService( - service_manager::mojom::ServiceRequest request); - -} // namespace printing - -#endif // COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_PDF_COMPOSITOR_SERVICE_FACTORY_H_
diff --git a/components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h b/components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h index dfc3b5f..80acce9 100644 --- a/components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h +++ b/components/services/pdf_compositor/public/cpp/pdf_service_mojo_types.h
@@ -5,6 +5,8 @@ #ifndef COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_PDF_SERVICE_MOJO_TYPES_H_ #define COMPONENTS_SERVICES_PDF_COMPOSITOR_PUBLIC_CPP_PDF_SERVICE_MOJO_TYPES_H_ +#include <stdint.h> + #include "base/containers/flat_map.h" namespace printing {
diff --git a/components/services/pdf_compositor/public/mojom/BUILD.gn b/components/services/pdf_compositor/public/mojom/BUILD.gn index 75d1a92..901dfb9 100644 --- a/components/services/pdf_compositor/public/mojom/BUILD.gn +++ b/components/services/pdf_compositor/public/mojom/BUILD.gn
@@ -9,6 +9,7 @@ "pdf_compositor.mojom", ] public_deps = [ + "//components/discardable_memory/public/mojom", "//mojo/public/mojom/base", "//url/mojom:url_mojom_gurl", ]
diff --git a/components/services/pdf_compositor/public/mojom/pdf_compositor.mojom b/components/services/pdf_compositor/public/mojom/pdf_compositor.mojom index f788a459..3e3f40ec 100644 --- a/components/services/pdf_compositor/public/mojom/pdf_compositor.mojom +++ b/components/services/pdf_compositor/public/mojom/pdf_compositor.mojom
@@ -4,11 +4,10 @@ module printing.mojom; +import "components/discardable_memory/public/mojom/discardable_shared_memory_manager.mojom"; import "mojo/public/mojom/base/shared_memory.mojom"; import "url/mojom/url.mojom"; -const string kServiceName = "pdf_compositor"; - interface PdfCompositor { // The status of composition and conversion execution. // These values are persisted to logs. Entries should not be renumbered and @@ -20,6 +19,13 @@ kCompositingFailure = 3, }; + // Provides an interface for managing discardable shared memory regions. Must + // be called before other methods on this interface if performing compositing + // operations. + SetDiscardableSharedMemoryManager( + pending_remote<discardable_memory.mojom.DiscardableSharedMemoryManager> + manager); + // Notifies that a subframe is unavailable, such as the render frame process // hosting it crashed or terminated. The subframe will be composited with no // content in the composited result.
diff --git a/components/signin/core/browser/account_reconcilor_unittest.cc b/components/signin/core/browser/account_reconcilor_unittest.cc index 9b8a25b..b046244 100644 --- a/components/signin/core/browser/account_reconcilor_unittest.cc +++ b/components/signin/core/browser/account_reconcilor_unittest.cc
@@ -235,6 +235,11 @@ signin::IdentityTestEnvironment* identity_test_env() { return &identity_test_env_; } + + base::test::ScopedTaskEnvironment* task_environment() { + return &task_environment_; + } + TestSigninClient* test_signin_client() { return &test_signin_client_; } base::HistogramTester* histogram_tester() { return &histogram_tester_; } @@ -336,7 +341,9 @@ signin::AccountConsistencyMethod::kMirror)); AccountReconcilorTest::AccountReconcilorTest() - : account_consistency_(signin::AccountConsistencyMethod::kDisabled), + : task_environment_( + base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME), + account_consistency_(signin::AccountConsistencyMethod::kDisabled), test_signin_client_(&pref_service_, &test_url_loader_factory_), identity_test_env_(/*test_url_loader_factory=*/nullptr, &pref_service_, @@ -2247,7 +2254,8 @@ TEST_P(AccountReconcilorMirrorEndpointParamTest, GetAccountsFromCookieFailure) { ConnectProfileToAccount("user@gmail.com"); - signin::SetListAccountsResponseWebLoginRequired(&test_url_loader_factory_); + signin::SetListAccountsResponseWithUnexpectedServiceResponse( + &test_url_loader_factory_); AccountReconcilor* reconcilor = GetMockReconcilor(); ASSERT_TRUE(reconcilor); @@ -2263,6 +2271,9 @@ ASSERT_FALSE(accounts_in_cookie_jar_info.accounts_are_fresh); ASSERT_EQ(0u, accounts_in_cookie_jar_info.signed_in_accounts.size()); ASSERT_EQ(0u, accounts_in_cookie_jar_info.signed_out_accounts.size()); + // List accounts retries once on |UNEXPECTED_SERVICE_RESPONSE| errors with + // backoff protection. + task_environment()->FastForwardBy(base::TimeDelta::FromSeconds(2)); ASSERT_EQ(signin_metrics::ACCOUNT_RECONCILOR_ERROR, reconcilor->GetState()); }
diff --git a/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h b/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h index 0aa6dac10..a083bbb 100644 --- a/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h +++ b/components/signin/internal/identity_manager/accounts_cookie_mutator_impl.h
@@ -15,7 +15,7 @@ class GaiaCookieManagerService; namespace gaia { -enum class GaiaSource; +class GaiaSource; } namespace signin {
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc index 7a7b07d..1769d271 100644 --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.cc
@@ -164,6 +164,11 @@ return account_id_; } +void GaiaCookieManagerService::GaiaCookieRequest::SetSourceSuffix( + std::string suffix) { + source_.SetGaiaSourceSuffix(suffix); +} + void GaiaCookieManagerService::GaiaCookieRequest:: RunSetAccountsInCookieCompletedCallback( signin::SetAccountsInCookieResult result) { @@ -438,6 +443,7 @@ external_cc_result_fetcher_(this), fetcher_backoff_(&kBackoffPolicy), fetcher_retries_(0), + listAccountsUnexpectedServerResponseRetried_(false), cookie_listener_binding_(this), external_cc_result_fetched_(false), list_accounts_stale_(true) { @@ -581,6 +587,7 @@ void GaiaCookieManagerService::TriggerListAccounts() { if (requests_.empty()) { fetcher_retries_ = 0; + listAccountsUnexpectedServerResponseRetried_ = false; requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest()); signin_client_->DelayNetworkCall( base::BindOnce(&GaiaCookieManagerService::StartFetchingListAccounts, @@ -699,6 +706,7 @@ if (requests_.empty()) { requests_.push_back(GaiaCookieRequest::CreateListAccountsRequest()); fetcher_retries_ = 0; + listAccountsUnexpectedServerResponseRetried_ = false; signin_client_->DelayNetworkCall( base::BindOnce(&GaiaCookieManagerService::StartFetchingListAccounts, weak_ptr_factory_.GetWeakPtr())); @@ -837,7 +845,6 @@ prefs::kGaiaCookieLastListAccountsData); GoogleServiceAuthError error( GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE); - RecordListAccountsFailure(error.state()); OnListAccountsFailure(error); return; } @@ -874,7 +881,16 @@ GaiaCookieRequestType::LIST_ACCOUNTS); RecordListAccountsRetryResult(error, fetcher_retries_); - if (++fetcher_retries_ < kMaxFetcherRetries && error.IsTransientError()) { + bool should_retry = + (++fetcher_retries_ < kMaxFetcherRetries && error.IsTransientError()) || + (!listAccountsUnexpectedServerResponseRetried_ && + error.state() == GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE); + if (should_retry) { + if (error.state() == GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE) { + listAccountsUnexpectedServerResponseRetried_ = true; + requests_.front().SetSourceSuffix( + GaiaConstants::kUnexpectedServiceResponse); + } fetcher_backoff_.InformOfRequest(false); UMA_HISTOGRAM_ENUMERATION("Signin.ListAccountsRetry", error.state(), GoogleServiceAuthError::NUM_STATES); @@ -1043,6 +1059,7 @@ weak_ptr_factory_.GetWeakPtr())); break; case GaiaCookieRequestType::LIST_ACCOUNTS: + listAccountsUnexpectedServerResponseRetried_ = false; DCHECK(requests_.front().accounts().empty()); uber_token_fetcher_.reset(); signin_client_->DelayNetworkCall(
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service.h b/components/signin/internal/identity_manager/gaia_cookie_manager_service.h index 193631a3..e46fd9d 100644 --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service.h +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service.h
@@ -92,6 +92,8 @@ // account_id. const CoreAccountId GetAccountID(); gaia::GaiaSource source() const { return source_; } + // Sets GaiaSource suffix. + void SetSourceSuffix(std::string suffix); void RunSetAccountsInCookieCompletedCallback( signin::SetAccountsInCookieResult result); @@ -369,6 +371,10 @@ base::OneShotTimer fetcher_timer_; int fetcher_retries_; + // If list accounts retried after a failure because of getting an unexpected + // service response. + bool listAccountsUnexpectedServerResponseRetried_; + // The last fetched ubertoken, for use in MergeSession retries. std::string uber_token_;
diff --git a/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc b/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc index c3c1d3b..410107a2 100644 --- a/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc +++ b/components/signin/internal/identity_manager/gaia_cookie_manager_service_unittest.cc
@@ -869,6 +869,11 @@ InstrumentedGaiaCookieManagerService helper(token_service(), signin_client()); MockObserver observer(&helper); + auto test_task_runner = + base::MakeRefCounted<base::TestMockTimeTaskRunner>(); + base::ScopedClosureRunner task_runner_ = + base::ThreadTaskRunnerHandle::OverrideForTesting(test_task_runner); + EXPECT_CALL(helper, StartFetchingListAccounts()).Times(3); // Though |SimulateListAccountsSuccess| is not yet called, we are able to @@ -904,6 +909,12 @@ ListedAccountEquals(expected_signed_out_accounts), error)); SimulateListAccountsSuccess(&helper, "[]"); EXPECT_FALSE(helper.ListAccounts(&list_accounts, &signed_out_accounts)); + + // List accounts retries once on |UNEXPECTED_SERVICE_RESPONSE| errors with + // backoff protection. + Advance(test_task_runner, helper.GetBackoffEntry()->GetTimeUntilRelease()); + SimulateListAccountsSuccess(&helper, "[]"); + // |kGaiaCookieLastListAccountsData| is cleared. EXPECT_TRUE(signin_client() ->GetPrefs()
diff --git a/components/signin/public/base/list_accounts_test_utils.cc b/components/signin/public/base/list_accounts_test_utils.cc index a07af3a..d63a72d 100644 --- a/components/signin/public/base/list_accounts_test_utils.cc +++ b/components/signin/public/base/list_accounts_test_utils.cc
@@ -23,13 +23,20 @@ /*content=*/"", net::HTTP_NOT_FOUND); } -void SetListAccountsResponseWebLoginRequired( +void SetListAccountsResponseWithUnexpectedServiceResponse( TestURLLoaderFactory* test_url_loader_factory) { + std::string source = GaiaConstants::kChromeSource; + // Set response for first request that will lead to a one time retry request. + test_url_loader_factory->AddResponse( + GaiaUrls::GetInstance()->ListAccountsURLWithSource(source).spec(), ""); + + // Seconde request would have the source with the error as a suffix. test_url_loader_factory->AddResponse( GaiaUrls::GetInstance() - ->ListAccountsURLWithSource(GaiaConstants::kChromeSource) + ->ListAccountsURLWithSource(source + + GaiaConstants::kUnexpectedServiceResponse) .spec(), - "Info=WebLoginRequired"); + ""); } void SetListAccountsResponseWithParams(
diff --git a/components/signin/public/base/list_accounts_test_utils.h b/components/signin/public/base/list_accounts_test_utils.h index 6b9d0f1..782c364 100644 --- a/components/signin/public/base/list_accounts_test_utils.h +++ b/components/signin/public/base/list_accounts_test_utils.h
@@ -26,8 +26,9 @@ void SetListAccountsResponseHttpNotFound( network::TestURLLoaderFactory* test_url_loader_factory); -// Make ListAccounts call return Info=WebLoginRequired. -void SetListAccountsResponseWebLoginRequired( +// Make ListAccounts call return an unexpected service response that leads to +// a one time retry request. It also sets the response for the retry request. +void SetListAccountsResponseWithUnexpectedServiceResponse( network::TestURLLoaderFactory* test_url_loader_factory); // Make ListAccounts return a list of accounts based on the provided |params|.
diff --git a/components/signin/public/identity_manager/identity_manager.h b/components/signin/public/identity_manager/identity_manager.h index 010e8318e..66aa6cc 100644 --- a/components/signin/public/identity_manager/identity_manager.h +++ b/components/signin/public/identity_manager/identity_manager.h
@@ -24,7 +24,7 @@ #endif namespace gaia { -enum class GaiaSource; +class GaiaSource; struct ListedAccount; } // namespace gaia
diff --git a/components/signin/public/identity_manager/identity_manager_unittest.cc b/components/signin/public/identity_manager/identity_manager_unittest.cc index e50256b..844efef 100644 --- a/components/signin/public/identity_manager/identity_manager_unittest.cc +++ b/components/signin/public/identity_manager/identity_manager_unittest.cc
@@ -1760,7 +1760,8 @@ run_loop.QuitClosure()); // Configure list accounts to return a permanent Gaia auth error. - SetListAccountsResponseWebLoginRequired(test_url_loader_factory()); + SetListAccountsResponseWithUnexpectedServiceResponse( + test_url_loader_factory()); identity_manager()->GetGaiaCookieManagerService()->TriggerListAccounts(); run_loop.Run();
diff --git a/components/sync/engine_impl/sync_encryption_handler_impl.cc b/components/sync/engine_impl/sync_encryption_handler_impl.cc index b23061ad..662784d5 100644 --- a/components/sync/engine_impl/sync_encryption_handler_impl.cc +++ b/components/sync/engine_impl/sync_encryption_handler_impl.cc
@@ -340,8 +340,7 @@ encrypt_everything_(false), nigori_overwrite_count_(0), random_salt_generator_(random_salt_generator), - migration_attempted_(false), - weak_ptr_factory_(this) { + migration_attempted_(false) { DCHECK(encryptor); // Restore the cryptographer's previous keys. Note that we don't add the // keystore keys into the cryptographer here, in case a migration was pending.
diff --git a/components/ui_devtools/css_agent.cc b/components/ui_devtools/css_agent.cc index d6fce623..b0c856f 100644 --- a/components/ui_devtools/css_agent.cc +++ b/components/ui_devtools/css_agent.cc
@@ -141,6 +141,10 @@ bool* visible) { std::vector<std::string> tokens = base::SplitString( style_text, ":;", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + + if (tokens.size() < 2 || tokens.size() % 2 != 0) + return Response::Error("Need both a property name and value."); + for (size_t i = 0; i < tokens.size() - 1; i += 2) { const std::string& property = tokens.at(i); int value;
diff --git a/components/ui_devtools/css_agent_unittest.cc b/components/ui_devtools/css_agent_unittest.cc index 55061d6c..62d58884 100644 --- a/components/ui_devtools/css_agent_unittest.cc +++ b/components/ui_devtools/css_agent_unittest.cc
@@ -163,6 +163,35 @@ EXPECT_EQ(element()->bounds(), gfx::Rect(1, 2, 3, 4)); } +TEST_F(CSSAgentTest, BadInputsFail) { + element()->SetVisible(true); + element()->SetBounds(gfx::Rect(1, 2, 3, 4)); + + // Input with no property name. + auto result = SetStyle(": 1;", element()->node_id()); + EXPECT_FALSE(result.first); + EXPECT_FALSE(result.second); + // Ensure element didn't change. + EXPECT_TRUE(element()->visible()); + EXPECT_EQ(element()->bounds(), gfx::Rect(1, 2, 3, 4)); + + // Input with no property value. + result = SetStyle("visibility:", element()->node_id()); + EXPECT_FALSE(result.first); + EXPECT_FALSE(result.second); + // Ensure element didn't change. + EXPECT_TRUE(element()->visible()); + EXPECT_EQ(element()->bounds(), gfx::Rect(1, 2, 3, 4)); + + // Blank input. + result = SetStyle(":", element()->node_id()); + EXPECT_FALSE(result.first); + EXPECT_FALSE(result.second); + // Ensure element didn't change. + EXPECT_TRUE(element()->visible()); + EXPECT_EQ(element()->bounds(), gfx::Rect(1, 2, 3, 4)); +} + TEST_F(CSSAgentTest, SettingVisibility) { element()->SetVisible(false); DCHECK(!element()->visible());
diff --git a/components/ui_devtools/views/overlay_agent_views.cc b/components/ui_devtools/views/overlay_agent_views.cc index cea9c64c..53fe42e 100644 --- a/components/ui_devtools/views/overlay_agent_views.cc +++ b/components/ui_devtools/views/overlay_agent_views.cc
@@ -471,6 +471,9 @@ if (!element) return Response::Error("No node found with that id"); + if (element->type() == UIElementType::ROOT) + return Response::Error("Cannot highlight root node."); + if (!layer_for_highlighting_) { layer_for_highlighting_.reset(new ui::Layer(ui::LayerType::LAYER_TEXTURED)); layer_for_highlighting_->set_name("HighlightingLayer");
diff --git a/components/url_formatter/spoof_checks/idn_spoof_checker.cc b/components/url_formatter/spoof_checks/idn_spoof_checker.cc index 6caf88b..0f55738a0 100644 --- a/components/url_formatter/spoof_checks/idn_spoof_checker.cc +++ b/components/url_formatter/spoof_checks/idn_spoof_checker.cc
@@ -81,8 +81,8 @@ #include "components/url_formatter/spoof_checks/top_domains/domains-trie-inc.cc" -// All the domains in the above file have 3 or fewer labels. -const size_t kNumberOfLabelsToCheck = 3; +// All the domains in the above file have 4 or fewer labels. +const size_t kNumberOfLabelsToCheck = 4; IDNSpoofChecker::HuffmanTrieParams g_trie_params{ kTopDomainsHuffmanTree, sizeof(kTopDomainsHuffmanTree), kTopDomainsTrie,
diff --git a/components/url_formatter/spoof_checks/top_domains/README b/components/url_formatter/spoof_checks/top_domains/README index eafbcd2b..f883e3b 100644 --- a/components/url_formatter/spoof_checks/top_domains/README +++ b/components/url_formatter/spoof_checks/top_domains/README
@@ -1,15 +1,14 @@ -* alexa_domains.list +* domains.list - The Alexa top 10k domains, one per line, constructed by running - make_alexa_top_list.py. Used as an input to make_top_domain_gperf. - It's derived from - src/tools/perf/page_sets/alexa1-10000-urls.json with make_alexa_top_list.py + A top domain list, one per line. Used as an input to + make_top_domain_skeletons. See http://go/chrome-top-domains-update for update + instructions. -* alexa_domains.skeletons +* domains.skeletons The checked-in output of make_top_domain_skeletons. Processed during the - build to generate alexa_domains-trie-inc.cc, which is used by - url_formatter.cc. This must be regenerated as follows if ICU is updated, + build to generate domains-trie-inc.cc, which is used by + idn_spoof_checker.cc. This must be regenerated as follows if ICU is updated, since skeletons can differ across ICU versions: $ ninja -C $build_outdir make_top_domain_skeletons @@ -20,5 +19,5 @@ top domain list. Manually edited to match what's in IDNToUnicode test. * test_domains.skeletons - Generated output of test_domains.list along with alexa_domains.skeletons + Generated output of test_domains.list along with domains.skeletons by make_top_domain_skeletons.
diff --git a/components/url_formatter/spoof_checks/top_domains/domains.list b/components/url_formatter/spoof_checks/top_domains/domains.list index 84581b4..5504f1c 100644 --- a/components/url_formatter/spoof_checks/top_domains/domains.list +++ b/components/url_formatter/spoof_checks/top_domains/domains.list
@@ -1,9174 +1,5001 @@ -facebook.com -google.com -youtube.com -yahoo.com -baidu.com -amazon.com -wikipedia.org -qq.com -live.com -taobao.com -google.co.in -twitter.com -blogspot.com -linkedin.com -bing.com -yandex.ru -vk.com -ask.com -ebay.com -wordpress.com -google.de -msn.com -tumblr.com -163.com -google.com.hk -mail.ru -google.co.uk -hao123.com -google.com.br -weibo.com -xvideos.com -microsoft.com -delta-search.com -google.fr -conduit.com -fc2.com -craigslist.org -google.ru -pinterest.com -instagram.com -tmall.com -xhamster.com -odnoklassniki.ru -google.it -sohu.com -paypal.com -babylon.com -google.es -imdb.com -apple.com -amazon.de -bbc.co.uk -adobe.com -soso.com -pornhub.com -google.com.mx -blogger.com -neobux.com -amazon.co.uk -ifeng.com -google.ca -avg.com -go.com -xnxx.com -blogspot.in -alibaba.com -aol.com -buildathome.info -cnn.com -mywebsearch.com -ku6.com -alipay.com -vube.com -google.com.tr -youku.com -redtube.com -dailymotion.com -google.com.au -adf.ly -netflix.com -adcash.com -about.com -google.pl -imgur.com -ebay.de -amazon.fr -flickr.com -thepiratebay.sx -youporn.com -uol.com.br -huffingtonpost.com -stackoverflow.com -jd.com -t.co -livejasmin.com -ebay.co.uk -yieldmanager.com -sogou.com -globo.com -softonic.com -cnet.com -livedoor.com -directrev.com -espn.go.com -indiatimes.com -wordpress.org -weather.com -pixnet.net -google.com.sa -clkmon.com -reddit.com -amazon.it -google.com.eg -booking.com -google.nl -douban.com -slideshare.net -google.com.ar -badoo.com -dailymail.co.uk -google.co.th -ask.fm -wikia.com -godaddy.com -xinhuanet.com -mediafire.com -deviantart.com -google.com.pk -bankofamerica.com -amazon.es -blogfa.com -nytimes.com -4shared.com -google.co.id -youjizz.com -amazonaws.com -tube8.com -kickass.to -livejournal.com -snapdo.com -google.co.za -vimeo.com -wigetmedia.com -yelp.com -outbrain.com -dropbox.com -siteadvisor.com -foxnews.com -renren.com -aliexpress.com -walmart.com -skype.com -ilivid.com -bizcoaching.info -wikimedia.org -flipkart.com -zedo.com -searchnu.com -indeed.com -leboncoin.fr -liveinternet.ru -google.co.ve -56.com -google.com.vn -google.gr -comcast.net -torrentz.eu -etsy.com -orange.fr -systweak.com -onet.pl -wellsfargo.com -letv.com -goodgamestudios.com -secureserver.net -allegro.pl -themeforest.net -tripadvisor.com -web.de -answers.com -amazon.ca -mozilla.org -guardian.co.uk -stumbleupon.com -hardsextube.com -espncricinfo.com -gmx.net -photobucket.com -ehow.com -rediff.com -popads.net -wikihow.com -search-results.com -fiverr.com -google.com.ua -files.wordpress.com -onlineaway.net -nbcnews.com -google.com.co -hootsuite.com -4dsply.com -google.ro -sourceforge.net -cnzz.com -java.com -hudong.com -ucoz.ru -tudou.com -addthis.com -google.com.ng -soundcloud.com -onclickads.net -google.com.ph -reference.com -google.be -wp.pl -interbiz.me -beeg.com -rambler.ru -sweetim.com -aweber.com -google.com.my -pandora.com -w3schools.com -pengyou.com -archive.org -qvo6.com -bet365.com -etao.com -lollipop-network.com -qtrax.com -google.se -google.dz -usatoday.com -zillow.com -goal.com -avito.ru -kaixin001.com -yesky.com -mobile01.com -soufun.com -tagged.com -warriorforum.com -statcounter.com -google.com.pe -libero.it -thefreedictionary.com -soku.com -incredibar.com -kaskus.co.id -likes.com -weebly.com -iqiyi.com -pch.com -samsung.com -linkbucks.com -uploaded.net -bild.de -google.com.bd -google.at -webcrawler.com -t-online.de -iminent.com -google.pt -detik.com -ganji.com -milliyet.com.tr -bleacherreport.com -forbes.com -twoo.com -olx.in -mercadolivre.com.br -hurriyet.com.tr -pof.com -wsj.com -hostgator.com -naver.com -putlocker.com -varzesh3.com -rutracker.org -optmd.com -youm7.com -google.cl -ikea.com -4399.com -salesforce.com -scribd.com -google.com.sg -it168.com -goodreads.com -target.com -xunlei.com -hulu.com -github.com -hp.com -buzzfeed.com -google.ch -youdao.com -blogspot.com.es -so.com -ups.com -extratorrent.com -match.com -seznam.cz -naukri.com -drtuber.com -spiegel.de -marca.com -ign.com -domaintools.com -free.fr -telegraph.co.uk -mypcbackup.com -kakaku.com -imageshack.us -reuters.com -ndtv.com -ig.com.br -bestbuy.com -glispa.com -quikr.com -deadlyblessing.com -wix.com -paipai.com -ebay.com.au -yandex.ua -chinanews.com -clixsense.com -nih.gov -aili.com -zing.vn -pchome.net -webmd.com -terra.com.br -pixiv.net -in.com -csdn.net -pcpop.com -google.co.hu -lnksr.com -jobrapido.com -inbox.com -dianping.com -gsmarena.com -mlb.com -clicksor.com -hdfcbank.com -acesse.com -homedepot.com -twitch.tv -morefreecamsecrets.com -groupon.com -lnksdata.com -google.cz -usps.com -xyxy.net -att.com -webs.com -51job.com -mashable.com -yihaodian.com -taringa.net -fedex.com -blogspot.co.uk -ck101.com -abcnews.go.com -washingtonpost.com -narod.ru -china.com -doubleclick.com -cam4.com -google.ie -dangdang.com -americanexpress.com -disqus.com -ixxx.com -39.net -isohunt.com -php.net -exoclick.com -shutterstock.com -dell.com -google.ae -histats.com -outlook.com -wordreference.com -sahibinden.com -126.com -oyodomo.com -gazeta.pl -expedia.com -kijiji.ca -myfreecams.com -capitalone.com -moz.com -qunar.com -taleo.net -google.co.il -microsoftonline.com -datasrvrs.com -zippyshare.com -google.no -justdial.com -2345.com -adultfriendfinder.com -shaadi.com -mobile.de -abril.com.br -empowernetwork.com -icicibank.com -xe.com -mailchimp.com -fbcdn.net -ccb.com -huanqiu.com -seesaa.net -jimdo.com -fucked-tube.com -google.dk -yellowpages.com -constantcontact.com -tinyurl.com -mysearchresults.com -friv.com -ebay.it -aizhan.com -accuweather.com -51buy.com -snapdeal.com -google.az -pogo.com -adultadworld.com -nifty.com -bitauto.com -drudgereport.com -bloomberg.com -vnexpress.net -eastmoney.com -verizonwireless.com -onlinesbi.com -2ch.net -speedtest.net -largeporntube.com -stackexchange.com -roblox.com -miniclip.com -tmz.com -google.fi -ning.com -monster.com -mihanblog.com -steampowered.com -nuvid.com -kooora.com -ebay.in -mp3skull.com -blogspot.ru -duowan.com -blogspot.de -fhserve.com -moneycontrol.com -pornerbros.com -eazel.com -daum.net -lady8844.com -rapidgator.net -thesun.co.uk -youtube-mp3.org -v9.com -disney.go.com -porntube.com -surveymonkey.com -meetup.com -ero-advertising.com -bravotube.net -appround.biz -blogspot.it -ctrip.com -9gag.com -odesk.com -kinopoisk.ru -trulia.com -mercadolibre.com.ar -repubblica.it -hupu.com -imesh.com -searchfunmoods.com -backpage.com -latimes.com -news.com.au -gc.ca -hubpages.com -clickbank.com -mapquest.com -sweetpacks.com -hypergames.net -alimama.com -cnblogs.com -vancl.com -bitly.com -tokobagus.com -webmoney.ru -google.sk -shopathome.com -elpais.com -oneindia.in -codecanyon.net -businessinsider.com -blackhatworld.com -farsnews.com -spankwire.com -mynet.com -sape.ru -bhaskar.com -lenta.ru -gutefrage.net -nba.com -feedly.com -chaturbate.com -elmundo.es -ad6media.fr -sberbank.ru -lockyourhome.com -kinox.to -subito.it -rbc.ru -sfr.fr -skyrock.com -priceline.com -jabong.com -y8.com -wunderground.com -habrahabr.ru -softpedia.com -ancestry.com -bluehost.com -123rf.com -lowes.com -free-tv-video-online.me -tabelog.com -vehnix.com -55bbs.com -swagbucks.com -speedanalysis.net -virgilio.it -peyvandha.ir -infusionsoft.com -newegg.com -sulekha.com -myspace.com -yxlady.com -haber7.com -w3.org -squidoo.com -hotels.com -oracle.com -fatakat.com -joomla.org -qidian.com -adbooth.net -wretch.cc -freelancer.com -typepad.com -foxsports.com -allrecipes.com -searchengines.ru -babytree.com -interia.pl -xhamstercams.com -verizon.com -intoday.in -sears.com -okcupid.com -kompas.com -cj.com -4tube.com -chip.de -force.com -advertserve.com -maktoob.com -24h.com.vn -foursquare.com -cbsnews.com -pornhublive.com -xda-developers.com -milanuncios.com -retailmenot.com -keezmovies.com -nydailynews.com -h2porn.com -careerbuilder.com -xing.com -citibank.com -linkwithin.com -singlessalad.com -altervista.org -turbobit.net -zoosk.com -digg.com -hespress.com -bigpoint.com -yourlust.com -myntra.com -issuu.com -macys.com -google.bg -github.io -filestube.com -cmbchina.com -irctc.co.in -filehippo.com -mop.com -bodybuilding.com -paidui.com -zimbio.com -panet.co.il -mgid.com -ya.ru -probux.com -haberturk.com -persianblog.ir -meituan.com -mercadolibre.com.mx -ppstream.com -sunporno.com -vodly.to -forgeofempires.com -elance.com -adscale.de -vipshop.com -babycenter.com -istockphoto.com -commentcamarche.net -upworthy.com -download.com -battle.net -beva.com -list-manage.com -corriere.it -noticias24.com -ucoz.com -porn.com -google.lk -lifehacker.com -today.com -chinabyte.com -southwest.com -ca.gov -nudevista.com -yandex.com.tr -people.com -docin.com -norton.com -perfectgirls.net -engadget.com -realtor.com -techcrunch.com -time.com -indianrail.gov.in -dtiblog.com -way2sms.com -foodnetwork.com -subscene.com -worldstarhiphop.com -tabnak.ir -aeriagames.com -leagueoflegends.com -51.la -facenama.com -sapo.pt -bitshare.com -gamespot.com -cy-pr.com -kankan.com -google.co.nz -liveleak.com -video-one.com -marktplaats.nl -elwatannews.com -roulettebotplus.com -adserverplus.com -akhbarak.net -gumtree.com -weheartit.com -openadserving.com -sporx.com -mercadolibre.com.ve -zendesk.com -houzz.com -asos.com -letitbit.net -quora.com -yandex.kz -mcafee.com -ensonhaber.com -gamefaqs.com -vk.me -avast.com -website-unavailable.com -22find.com -admagnet.net -rottentomatoes.com -google.com.kw -cloob.com -nokia.com -wetter.com -taboola.com -tenpay.com -888.com -flipora.com -adhitprofits.com -timeanddate.com -as.com -fanpop.com -informer.com -over-blog.com -itau.com.br -balagana.net -ellechina.com -avazutracking.net -gap.com -examiner.com -vporn.com -lenovo.com -eonline.com -r7.com -majesticseo.com -immobilienscout24.de -google.kz -goo.gl -zwaar.net -bankmellat.ir -alphaporno.com -whitepages.com -viva.co.id -rutor.org -wiktionary.org -intuit.com -gismeteo.ru -dantri.com.vn -xbox.com -myegy.com -xtube.com -masrawy.com -urbandictionary.com -agoda.com -ebay.fr -kickstarter.com -6park.com -metacafe.com -yamahaonlinestore.com -anysex.com -azlyrics.com -rt.com -ibm.com -nordstrom.com -ezinearticles.com -cnbc.com -redtubelive.com -clicksvenue.com -tradus.com -m2newmedia.com -custhelp.com -4chan.org -kioskea.net -yoka.com -7k7k.com -opensiteexplorer.org -musica.com -coupons.com -cracked.com -caixa.gov.br -skysports.com -kizi.com -getresponse.com -sky.com -marketwatch.com -google.com.ec -cbslocal.com -zhihu.com -888poker.com -digitalpoint.com -blog.163.com -rantsports.com -videosexarchive.com -who.is -gogetlinks.net -idnes.cz -king.com -say-move.org -motherless.com -npr.org -legacy.com -aljazeera.net -barnesandnoble.com -overstock.com -drom.ru -weather.gov -gstatic.com -amung.us -traidnt.net -ovh.net -rtl.de -howstuffworks.com -digikala.com -bannersbroker.com -kohls.com -google.com.do -dealfish.co.th -19lou.com -ezpowerads.com -lemonde.fr -chexun.com -imagebam.com -viooz.co -prothom-alo.com -360doc.com -m-w.com -fanfiction.net -semrush.com -ci123.com -plugrush.com -cafemom.com -mangareader.net -haizhangs.com -cdiscount.com -zappos.com -manta.com -novinky.cz -hi5.com -pr-cy.ru -movie4k.to -patch.com -alarabiya.net -indiamart.com -cartrailor.com -almasryalyoum.com -315che.com -google.by -tomshardware.com -minecraft.net -gulfup.com -rr.com -spotify.com -airtel.in -espnfc.com -sanook.com -ria.ru -google.com.qa -jquery.com -pinshan.com -onlylady.com -pornoxo.com -cookpad.com -pagesjaunes.fr -usmagazine.com -google.lt -nu.nl -hm.com -fixya.com -theblaze.com -cbssports.com -eyny.com -17173.com -hc360.com -cbs.com -telegraaf.nl -netlog.com -slickdeals.net -yobt.com -certified-toolbar.com -miercn.com -aparat.com -billdesk.com -yandex.by -888casino.com -twitpic.com -google.hr -tubegalore.com -dhgate.com -makemytrip.com -shop.com -nike.com -kayak.com -fandango.com -tutsplus.com -gotomeeting.com -shareasale.com -mpnrs.com -keepvid.com -lequipe.fr -namecheap.com -doublepimp.com -softigloo.com -givemesport.com -mtime.com -letras.mus.br -pole-emploi.fr -biblegateway.com -independent.co.uk -e-hentai.org -gumtree.com.au -livestrong.com -game321.com -comcast.com -clubpenguin.com -rightmove.co.uk -steamcommunity.com -sockshare.com -globalconsumersurvey.com -rapidshare.com -auto.ru -staples.com -anitube.se -rozblog.com -reliancenetconnect.co.in -credit-agricole.fr -exposedwebcams.com -webalta.ru -usbank.com -google.com.ly -pantip.com -aftonbladet.se -scoop.it -mayoclinic.com -evernote.com -nyaa.eu -livingsocial.com -noaa.gov -imagefap.com -abchina.com -google.rs -amazon.in -tnaflix.com -xici.net -united.com -templatemonster.com -deezer.com -pixlr.com -tradedoubler.com -gumtree.co.za -r10.net -kongregate.com -jeuxvideo.com -gawker.com -chewen.com -r2games.com -mayajo.com -topix.com -easyhits4u.com -netteller.com -ing.nl -tripadvisor.co.uk -udn.com -cheezburger.com -fotostrana.ru -bbc.com -behance.net -lefigaro.fr -nikkei.com -fidelity.com -baomihua.com -fool.com -nairaland.com -sendspace.com -woot.com -travelocity.com -shopclues.com -sureonlinefind.com -gizmodo.com -hidemyass.com -o2.pl -clickbank.net -fotolia.com -opera.com -sabah.com.tr -n-mobile.net -chacha.com -autotrader.com -anonym.to -walmart.com.br -yjc.ir -autoscout24.de -gobookee.net -yaolan.com -india.com -tribalfusion.com -gittigidiyor.com -otto.de -adclickxpress.com -made-in-china.com -ahram.org.eg -asriran.com -blackberry.com -beytoote.com -piriform.com -ilmeteo.it -att.net -brainyquote.com -last.fm -directadvert.ru -slate.com -mangahere.com -jalan.net -blog.com -tuvaro.com -doc88.com -mbc.net -europa.eu -onlinedown.net -jcpenney.com -myplaycity.com -bahn.de -laredoute.fr -alexa.com -flashx.tv -51.com -mail.com -costco.com -mirror.co.uk -hubspot.com -tf1.fr -merdeka.com -nypost.com -1mall.com -wmtransfer.com -pcmag.com -univision.com -nationalgeographic.com -sourtimes.org -iciba.com -petardas.com -wmmail.ru -light-dark.net -ultimate-guitar.com -koramgame.com -megavod.fr -smh.com.au -ticketmaster.com -admin5.com -get-a-fuck-tonight.com -eenadu.net -argos.co.uk -nipic.com -google.iq -alhea.com -citrixonline.com -girlsgogames.com -fanatik.com.tr -google.tn -usaa.com -earthlink.net -ryanair.com -city-data.com -lloydstsb.co.uk -pornsharia.com -baixing.com -all-free-download.com -qianyan001.com -hellporno.com -pornmd.com -conferenceplus.com -docstoc.com -christian-dogma.com -dmoz.org -perezhilton.com -mega.co.nz -zazzle.com -echoroukonline.com -ea.com -yiqifa.com -mysearchdial.com -hotwire.com -ninemsn.com.au -tablica.pl -brazzers.com -americanas.com.br -extremetube.com -zynga.com -buscape.com.br -t-mobile.com -portaldosites.com -businessweek.com -feedburner.com -contenko.com -homeshop18.com -bmi.ir -wwe.com -adult-empire.com -nfl.com -globososo.com -sfgate.com -mmotraffic.com -zalando.de -warthunder.com -icloud.com -xiami.com -newsmax.com -solarmovie.so -junglee.com -discovercard.com -hh.ru -searchengineland.com -labanquepostale.fr -51cto.com -fling.com -liveperson.net -sulit.com.ph -tinypic.com -meilishuo.com -googleadservices.com -boston.com -chron.com -breitbart.com -youjizzlive.com -commbank.com.au -axisbank.com -wired.com -trialpay.com -berniaga.com -cnmo.com -tunein.com -hotfile.com -dubizzle.com -olx.com.br -haxiu.com -zulily.com -infolinks.com -yourgirlfriends.com -logmein.com -irs.gov -noticiadeldia.com -nbcsports.com -holasearch.com -indianexpress.com -depositfiles.com -elfagr.org -himado.in -lumosity.com -mbank.com.pl -primewire.ag -dreamstime.com -sootoo.com -souq.com -craigslist.ca -zara.com -groupon.it -mangafox.me -casino.com -armorgames.com -zanox.com -finn.no -qihoo.com -toysrus.com -airasia.com -dafont.com -tvmuse.eu -pnc.com -donanimhaber.com -cnbeta.com -prntscr.com -cox.net -bloglovin.com -picmonkey.com -zoho.com -glassdoor.com -myfitnesspal.com -change.org -aa.com -playstation.com -b1.org -correios.com.br -hindustantimes.com -softlayer.com -imagevenue.com -windowsphone.com -wikimapia.org -transfermarkt.de -dict.cc -blocket.se -lacaixa.es -hilton.com -mtv.com -cbc.ca -msn.ca -box.com -szn.cz -haodf.com -monsterindia.com -okezone.com -entertainment-factory.com -linternaute.com -break.com -ustream.tv -songspk.name -bilibili.tv -avira.com -thehindu.com -watchmygf.com -google.co.ma -nick.com -sp.gov.br -zeobit.com -sprint.com -khabaronline.ir -magentocommerce.com -hsbc.co.uk -trafficholder.com -gamestop.com -cartoonnetwork.com -fifa.com -ebay.ca -vatanim.com.tr -qvc.com -marriott.com -eventbrite.com -gi-akademie.com -intel.com -oschina.net -dojki.com -thechive.com -viadeo.com -walgreens.com -leo.org -statscrop.com -brothersoft.com -allocine.fr -slutload.com -google.com.gt -santabanta.com -stardoll.com -polyvore.com -focus.de -duckduckgo.com -funshion.com -marieclairechina.com -internethaber.com -worldoftanks.ru -1und1.de -anyporn.com -cars.com -asg.to -alice.it -hongkiat.com -bhphotovideo.com -bdnews24.com -sdo.com -cerdas.com -clarin.com -victoriassecret.com -instructables.com -state.gov -agame.com -xiaomi.com -adfoc.us -telekom.com -skycn.com -orbitz.com -nhl.com -vistaprint.com -trklnks.com -basecamp.com -hot-sex-tube.com -incredibar-search.com -qingdaonews.com -sabq.org -nasa.gov -dx.com -addmefast.com -yepi.com -xxx-ok.com -sex.com -food.com -freeones.com -tesco.com -a10.com -abc.net.au -internetdownloadmanager.com -seowhy.com -otomoto.pl -idealo.de -laposte.net -eroprofile.com -bbb.org -tiu.ru -blogsky.com -bigfishgames.com -weiphone.com -livescore.com -tubepleasure.com -jagran.com -livestream.com -stagram.com -vine.co -olx.com.pk -edmunds.com -banglanews24.com -reverso.net -stargames.at -postimg.org -overthumbs.com -iteye.com -yify-torrents.com -forexfactory.com -hefei.cc -thefreecamsecret.com -lanacion.com.ar -jeu-a-telecharger.com -spartoo.com -adv-adserver.com -asus.com -91.com -wimbledon.com -yam.com -grooveshark.com -tdcanadatrust.com -lovetime.com -iltalehti.fi -alnaddy.com -bb.com.br -tebyan.net -redbox.com -filecrop.com -aliyun.com -21cn.com -news24.com -infowars.com -thetaoofbadass.com -juegos.com -p5w.net -vg.no -discovery.com -gazzetta.it -tvguide.com -khabarfarsi.com -bradesco.com.br -autotrader.co.uk -wetransfer.com -jinti.com -xhamsterhq.com -appround.net -lotour.com -reverbnation.com -thedailybeast.com -vente-privee.com -subscribe.ru -marketgid.com -super.cz -jvzoo.com -shine.com -screencast.com -picofile.com -manoramaonline.com -kbb.com -seasonvar.ru -android.com -egrana.com.br -ettoday.net -webstatsdomain.net -haberler.com -vesti.ru -fastpic.ru -dpreview.com -google.si -ouedkniss.com -crackle.com -chefkoch.de -mogujie.com -brassring.com -govome.com -copyscape.com -minecraftforum.net -mit.edu -cvs.com -timesjobs.com -ksl.com -verizon.net -direct.gov.uk -miralinks.ru -elheddaf.com -stockphoto9.com -ashemaletube.com -dmm.com -abckj123.com -smzdm.com -cox.com -welt.de -guyspy.com -makeuseof.com -tiscali.it -178.com -metrolyrics.com -vsuch.com -seosprint.net -samanyoluhaber.com -garanti.com.tr -chicagotribune.com -hinet.net -kp.ru -chomikuj.pl -nk.pl -webhostingtalk.com -dnaindia.com -programme-tv.net -ievbz.com -mysql.com -perfectmoney.is -liveundnackt.com -flippa.com -vevo.com -jappy.de -bidvertiser.com -bankmandiri.co.id -letour.fr -yr.no -suning.com -nosub.tv -delicious.com -pornpoly.com -echo.msk.ru -coingeneration.com -shutterfly.com -royalbank.com -techradar.com -114la.com -bizrate.com -srvey.net -heavy-r.com -telexfree.com -lego.com -battlefield.com -shahrekhabar.com -tuenti.com -bookmyshow.com -ft.com -prweb.com -1337x.org -networkedblogs.com -pbskids.org -aipai.com -jang.com.pk -dribbble.com -ezdownloadpro.info -gonzoxxxmovies.com -aufeminin.com -6pm.com -azet.sk -trustedoffer.com -simplyhired.com -adserverpub.com -privalia.com -bedbathandbeyond.com -yyets.com -verycd.com -sbnation.com -blogspot.nl -ikariam.com -sitepoint.com -gazeta.ru -tataindicom.com -chekb.com -literotica.com -ah-me.com -eztv.it -onliner.by -pptv.com -macrumors.com -xvideo-jp.com -state.tx.us -jamnews.ir -etoro.com -ny.gov -searchenginewatch.com -google.co.cr -td.com -ahrefs.com -337.com -klout.com -ebay.es -theverge.com -kapook.com -barclays.co.uk -nuomi.com -index-of-mp3s.com -ohfreesex.com -mts.ru -instantcheckmate.com -sport.es -sitescout.com -irr.ru -tuniu.com -startimes.com -tvn24.pl -kenh14.vn -myvideo.de -speedbit.com -aljazeera.com -pudelek.pl -mmgp.ru -empflix.com -tigerdirect.com -elegantthemes.com -ted.com -down1oads.com -bancobrasil.com.br -qip.ru -fapdu.com -softango.com -ap.org -meteofrance.com -gentenocturna.com -2ch-c.net -orf.at -maybank2u.com.my -minecraftwiki.net -tv.com -orkut.com -adp.com -woorank.com -imagetwist.com -pastebin.com -airtel.com -ew.com -forever21.com -adam4adam.com -voyages-sncf.com -nextag.com -usnews.com -dinamalar.com -virginmedia.com -investopedia.com -seekingalpha.com -jumponhottie.com -national-lottery.co.uk -mobifiesta.com -kapanlagi.com -segundamano.es -gfan.com -xdating.com -ynet.com -medu.ir -hsn.com -newsru.com -minus.com -sitetalk.com -aarp.org -clickpaid.com -panoramio.com -webcamo.com -yobt.tv -slutfinder.com -freelotto.com -mudah.my -toptenreviews.com -caisse-epargne.fr -wimp.com -woothemes.com -css-tricks.com -coolmath-games.com -tagu.com.ar -sheknows.com -advancedfileoptimizer.com -drupal.org -centrum.cz -charter.net -adxhosting.net -squarespace.com -trademe.co.nz -sitesell.com -birthrecods.com -megashare.info -freepornvs.com -isna.ir -ziddu.com -airtelforum.com -justin.tv -01net.com -ed.gov -no-ip.com -nikkansports.com -smashingmagazine.com -salon.com -nmisr.com -wanggou.com -bayt.com -codeproject.com -downloadha.com -local.com -abola.pt -delta-homes.com -filmweb.pl -gov.uk -worldoftanks.eu -ads-id.com -sergey-mavrodi.com -pornoid.com -freakshare.com -51fanli.com -bankrate.com -grindtv.com -webmasterworld.com -torrentz.in -bwin.com -watchtower.com -payza.com -anz.com -vagalume.com.br -ozon.ru -tonicmovies.com -arbeitsagentur.de -graphicriver.net -theweathernetwork.com -samsclub.com -tribunnews.com -soldonsmart.com -tut.by -voila.fr -doctissimo.fr -sueddeutsche.de -mamba.ru -kmart.com -abc.es -manager.co.th -spokeo.com -apache.org -tdbank.com -asklaila.com -admin5.net -rtve.es -ynet.co.il -infospace.com -yimg.com -torcache.net -zap2it.com -smallseotools.com -privatbank.ua -nnm-club.ru -payoneer.com -bidorbuy.co.za -islamweb.net -juicyads.com -vid2c.com -dnsrsearch.com -the-bux.net -yaplakal.com -ex.ua -mtsindia.in -reclameaqui.com.br -postbank.de -gogvo.com -bearshare.net -socialsex.com -yebhi.com -mktmobi.com -dfiles.eu -citibank.co.in -gamersky.com -kotaku.com -teamviewer.com -kwejk.pl -hamariweb.com -tom.com -gayromeo.com -sony.com -westpac.com.au -gtmetrix.com -shorouknews.com -xl.pt -networksolutions.com -500px.com -ypmate.com -indowebster.com -sports.ru -netshoes.com.br -dfiles.ru -cpasbien.me -webgame.web.id -tuto4pc.com -poponclick.com -complex.com -sakshi.com -infobae.com -sify.com -4pda.ru -starsue.net -newgrounds.com -mehrnews.com -depositphotos.com -keek.com -indeed.co.in -stanford.edu -hepsiburada.com -20minutos.es -paper.li -prizee.com -xlovecam.com -criteo.com -endlessmatches.com -dyndns.org -lightinthebox.com -easyjet.com -vice.com -tiexue.net -monstermarketplace.com -mojang.com -cams.com -pingdom.com -askmen.com -list-manage1.com -express.com.pk -priceminister.com -duba.com -meinestadt.de -mediatakeout.com -terere.info -streamate.com -garmin.com -a-telecharger.com -vipzona.info -coffetube.com -discuz.net -directv.com -foreningssparbanken.se -fatwallet.com -mackolik.com -megacinema.fr -chess.com -suntrust.com -investing.com -whois.com -dummies.com -yinyuetai.com -mihandownload.com -freapp.com -theage.com.au -audible.com -hotelurbano.com.br -vatgia.com -wizard101.com -ceneo.pl -1ting.com -meetic.fr -cardekho.com -tripadvisor.it -dhl.com -aibang.com -asp.net -toing.com.br -zhubajie.com -telecomitalia.it -claro-search.com -nickjr.com -iconfinder.com -mobile9.com -cisco.com -cpanel.net -indiegogo.com -egotastic.com -hforcare.com -pbs.org -realestate.com.au -abv.bg -drugs.com -bt.com -wildberries.ru -edreams.it -statigr.am -prestashop.com -adxite.com -birthdaypeoms.com -exbii.com -blogmura.com -sciencedirect.com -sanspo.com -nextmedia.com -tvoyauda4a.ru -tangdou.com -blackboard.com -qiyou.com -prezentacya.ru -clicrbs.com.br -wayfair.com -xvideos-field.com -national.com.au -friendfeed.com -plurk.com -lolmake.com -b9dm.com -afkarnews.ir -dhl.de -championat.com -moviefone.com -popcash.net -cliphunter.com -sharebeast.com -wowhead.com -firstpost.com -lloydstsb.com -fazenda.gov.br -lonelyplanet.com -freenet.de -justanswer.com -qiwi.com -shufuni.com -drive2.ru -slando.ua -caribbeancom.com -uniblue.com -real.com -addictinggames.com -wnd.com -col3negoriginal.org -loltrk.com -videodownloadconverter.com -google.lv -seriesyonkis.com -ryushare.com -s1979.com -cheapoair.com -submarino.com.br -topface.com -hotelscombined.com -whatismyipaddress.com -z6.com -sozcu.com.tr -sonymobile.com -planetminecraft.com -optimum.net -google.com.pr -mthai.com -onlinecreditcenter6.com -tharunaya.co.uk -sfimg.com -natwest.com -zergnet.com -alotporn.com -urbanspoon.com -punishtube.com -proboards.com -betfair.com -iltasanomat.fi -ssisurveys.com -harvard.edu -blic.rs -clicksia.com -skillpages.com -mobilewap.com -fiducia.de -torntvz.org -leparisien.fr -anjuke.com -rabobank.nl -sport.pl -schwab.com -buenastareas.com -befuck.com -smart-search.com -ivi.ru -dvdvideosoft.com -ubi.com -makepolo.com -1and1.com -pcworld.com -caf.fr -fnb.co.za -vanguardngr.com -floozycity.com -ubuntu.com -my-link.pro -centurylink.com -slashdot.org -mirrorcreator.com -rutube.ru -tubeplus.me -kicker.de -unibet.com -pornyaz.com -learntotradethemarket.com -tokyo-porn-tube.com -luvcow.com -i.ua -ole.com.ar -redfin.com -cnki.net -2shared.com -infibeam.com -zdnet.com -fishki.net -ukr.net -jiameng.com -utorrent.com -elkhabar.com -anime44.com -societegenerale.fr -livememe.com -startertv.fr -pingomatic.com -indeed.co.uk -dpstream.net -mundodeportivo.com -gravatar.com -ip138.com -yandex.net -barbie.com -wattpad.com -dzwww.com -technorati.com -meishichina.com -russianpost.ru -kboing.com.br -lzjl.com -newsnow.co.uk -dw.de -inetglobal.com -tripadvisor.in -ashleyrnadison.com -rapgenius.com -xuite.net -nowvideo.eu -search.us.com -usagc.org -santander.co.uk -99acres.com -bigcartel.com -haivl.com -jsfiddle.net -io9.com -lg.com -veoh.com -dafiti.com.br -heise.de -wikispaces.com -google.com.bo -skyscrapercity.com -zaobao.com -pirateproxy.net -muyzorras.com -entrepreneur.com -sxc.hu -superuser.com -jb51.net -bitsnoop.com -index.hu -tubexclips.com -symantec.com -sedo.com -gongchang.com -newsmth.net -srclick.ru -bomnegocio.com -omegle.com -sweetpacks-search.com -000webhost.com -rencontreshard.com -jumei.com -acfun.tv -celebuzz.com -el-balad.com -wajam.com -zoopla.co.uk -sc4888.com -mobileaziende.it -officialsurvey.org -googleapis.com -jobsdb.com -google.com.sv -freejobalert.com -walla.co.il -hollywoodreporter.com -inc.com -bbandt.com -williamhill.com -jeu.info -vrbo.com -arabseed.com -spielaffe.de -wykop.pl -name.com -web-opinions.com -ehowenespanol.com -uuzu.com -cafepress.com -beeline.ru -searchenginejournal.com -webex.com -zerohedge.com -cityads.ru -columbia.edu -jia.com -tistory.com -100bestbuy.com -realitykings.com -shopify.com -gametop.com -eharmony.com -ngoisao.net -angieslist.com -grotal.com -manhunt.net -adslgate.com -demotywatory.pl -enfemenino.com -yallakora.com -careesma.in -draugiem.lv -greatandhra.com -lifescript.com -androidcentral.com -wiley.com -alot.com -10010.com -next.co.uk -115.com -omgpm.com -mycalendarbook.com -playxn.com -niksalehi.com -serviporno.com -poste.it -kimiss.com -bearshare.com -clickpoint.com -seek.com.au -bab.la -ads8.com -viewster.com -ideacellular.com -tympanus.net -wwwblogto.com -tblop.com -elong.com -funnyordie.com -radikal.ru -rk.com -alarab.net -willhaben.at -beyond.com -punchng.com -viglink.com -microsoftstore.com -tripleclicks.com -m1905.com -ofreegames.com -s2d6.com -360buy.com -rakuten.com -evite.com -kompasiana.com -dailycaller.com -holidaycheck.de -imvu.com -nate.com -fnac.com -htc.com -savenkeep.com -alfabank.ru -zaycev.net -vidtomp3.com -eluniversal.com.mx -theatlantic.com -gamigo.de -lolking.net -wer-kennt-wen.de -stern.de -sport1.de -goalunited.org -discogs.com -whirlpool.net.au -savefrom.net -eurosport.fr -juegosjuegos.com -open24news.tv -sinaapp.com -fuq.com -index.hr -realpopbid.com -rollingstone.com -globaltestmarket.com -seopult.ru -wumii.com -ford.com -cabelas.com -securepaynet.net -zhibo8.cc -jiji.com -gezinti.com -meb.gov.tr -classifiedads.com -kitco.com -incredimail.com -esmas.com -soccerway.com -rivals.com -prezi.com -shopping.com -superjob.ru -chinaacc.com -amoureux.com -mysmartprice.com -eleconomista.es -mercola.com -imlive.com -teacup.com -modelmayhem.com -nic.ru -brazzersnetwork.com -everything.org.uk -bhg.com -longhoo.net -superpages.com -tny.cz -yourfilezone.com -tuan800.com -streev.com -sedty.com -boxofficemojo.com -hollyscoop.com -safecart.com -almogaz.com -cashnhits.com -wetplace.com -freepik.com -rarbg.com -xxxbunker.com -prchecker.info -halifax-online.co.uk -trafficfactory.biz -telecinco.es -searchtermresults.com -unam.mx -akhbar-elwatan.com -lynda.com -yougetlaid.com -smart.com.au -advfn.com -unicredit.it -zomato.com -flirt.com -netease.com -bnpparibas.net -elcomercio.pe -mathrubhumi.com -koyotesoft.com -filmix.net -xnxxhdtube.com -ennaharonline.com -junbi-tracker.com -buzzdock.com -emirates.com -vivanuncios.com.mx -infojobs.net -smi2.ru -lotterypost.com -bandcamp.com -ekstrabladet.dk -nownews.com -bc.vc -google.com.af -ulmart.ru -estadao.com.br -politico.com -kl688.com -resellerclub.com -whois.net -seobuilding.ru -t411.me -googlesyndication.com -delfi.lt -eqla3.com -ali213.net -fanpage.it -uptobox.com -google.jo -cncn.com -sme.sk -kinozal.tv -ceconline.com -billboard.com -citi.com -naughtyamerica.com -classmates.com -coursera.org -pingan.com -voanews.com -tankionline.com -jetblue.com -spainshtranslation.com -ebookbrowse.com -met-art.com -megafon.ru -quibids.com -smartfren.com -cleartrip.com -pixmania.com -vivastreet.com -thegfnetwork.com -paytm.com -meinsextagebuch.net -memecenter.com -ixbt.com -dagbladet.no -basecamphq.com -chinatimes.com -bubblews.com -xtool.ru -opodo.co.uk -hattrick.org -zopim.com -aol.co.uk -gazzetta.gr -18andabused.com -mcssl.com -economist.com -zeit.de -google.com.uy -pinoy-ako.info -lazada.co.id -filgoal.com -rozetka.com.ua -almesryoon.com -csmonitor.com -bizjournals.com -rackspace.com -webgozar.com -opencart.com -mediaplex.com -deutsche-bank.de -similarsites.com -sotmarket.ru -chatzum.com -huffingtonpost.co.uk -carwale.com -memez.com -hostmonster.com -muzofon.com -elephanttube.com -crunchbase.com -imhonet.ru -lusongsong.com -filmesonlinegratis.net -giaoduc.net.vn -manhub.com -tatadocomo.com -realitatea.net -freemp3x.com -freemail.hu -ganool.com -feedreader.com -sportsdirect.com -videolan.org -watchseries.lt -rotapost.ru -nwolb.com -searchquotes.com -kaspersky.com -go2cloud.org -grepolis.com -profit-partner.ru -articlesbase.com -dns-shop.ru -radikal.com.tr -justjared.com -lancenet.com.br -mangapanda.com -theglobeandmail.com -ecollege.com -myanimelist.net -fotomac.com.tr -imanhua.com -travelzoo.com -jjwxc.net -q.gs -naaptol.com -sambaporno.com -macrojuegos.com -ooo-sex.com -fab.com -roflzone.com -searchcompletion.com -jezebel.com -bizdec.ru -torrentino.com -multitran.ru -tune-up.com -sparkpeople.com -desi-tashan.com -mashreghnews.ir -talktalk.co.uk -hinkhoj.com -20minutes.fr -sulia.com -icims.com -dizi-mag.com -webaslan.com -en.wordpress.com -funmoods.com -softgozar.com -starwoodhotels.com -studiopress.com -click.in -meetcheap.com -angel-live.com -beforeitsnews.com -trello.com -icontact.com -prlog.org -incentria.com -bouyguestelecom.fr -dstv.com -arstechnica.com -diigo.com -consumers-research.com -metaffiliation.com -telekom.de -izlesene.com -newsit.gr -fuckingawesome.com -osym.gov.tr -svyaznoy.ru -watchfreemovies.ch -gumtree.pl -sportbox.ru -reserverunessai.com -hsbc.com.hk -cricbuzz.com -djelfa.info -nouvelobs.com -aruba.it -homes.com -allezleslions.com -orkut.com.br -aionfreetoplay.com -academia.edu -consumerreports.org -ilsole24ore.com -sephora.com -lds.org -vmall.com -ultimasnoticias.com.ve -healthgrades.com -imgbox.com -dlsite.com -whitesmoke.com -thenextweb.com -qire123.com -peeplo.com -chitika.com -alwafd.org -phonearena.com -ovh.com -tusfiles.net -18schoolgirlz.com -bongacams.com -home.pl -footmercato.net -sprashivai.ru -megafilmeshd.net -premium-display.com -clickey.com -tokyo-tube.com -watch32.com -pornolab.net -timewarnercable.com -naturalnews.com -afimet.com -telderi.ru -ioffer.com -lapatilla.com -livetv.ru -cloudflare.com -lupoporno.com -nhaccuatui.com -thepostgame.com -ipage.com -banesconline.com -cdc.gov -adonweb.ru -zone-telechargement.com -intellicast.com -uloz.to -pikabu.ru -megogo.net -wenxuecity.com -xml-sitemaps.com -webdunia.com -justhost.com -starbucks.com -wargaming.net -hugedomains.com -magicbricks.com -gigporno.com -rikunabi.com -51auto.com -warriorplus.com -gudvin.tv -bigmir.net -ansa.it -standardbank.co.za -toshiba.com -xinnet.com -geico.com -funnyjunk.com -affaritaliani.it -cityheaven.net -tubewolf.com -google.org -ad.nl -tutorialspoint.com -uidai.gov.in -everydayhealth.com -jzip.com -lolspotsarticles.com -rueducommerce.fr -lvmama.com -roboform.com -zoznam.sk -livesmi.com -die-boersenformel.com -watchcartoononline.com -abclocal.go.com -techrepublic.com -just-fuck.com -camster.com -akairan.com -yeslibertin.com -abc.go.com -searchtherightwords.com -scotiabank.com -justclick.ru -douguo.com -discover.com -britishairways.com -mobafire.com -gi-akademie.ning.com -desirulez.net -qiushibaike.com -moonbasa.com -all.biz -springer.com -emai.com -deadspin.com -hulkshare.com -fast-torrent.ru -oriflame.com -imgchili.net -mega-juegos.mx -gyazo.com -persianv.com -adk2.com -ingbank.pl -nationalconsumercenter.com -xxxkinky.com -mywot.com -gaymaletube.com -1tv.ru -manutd.com -merchantcircle.com -canalblog.com -capitalone360.com -tlbb8.com -softonic.fr -ccavenue.com -tyroodr.com -exam8.com -allmusic.com -stubhub.com -arcor.de -yolasite.com -haraj.com.sa -mypopup.ir -memurlar.net -smugmug.com -filefactory.com -fantasti.cc -bokra.net -goarticles.com -moneysavingexpert.com -donga.com -lastminute.com -xkcd.com -sou300.com -magnovideo.com -inquirer.net -phoenix.edu -videogenesis.com -thestar.com -tripadvisor.es -blankrefer.com -yle.fi -beamtele.com -oanda.com -iheart.com -google.co.tz -stargazete.com -bossip.com -defaultsear.ch -thaiseoboard.com -qinbei.com -ninisite.com -j.gs -nos.nl -qualtrics.com -kommersant.ru -urban-rivals.com -computerbild.de -fararu.com -menshealth.com -jobstreet.com -rbcroyalbank.com -inmotionhosting.com -surveyrouter.com -kankanews.com -aol.de -bol.com -datpiff.com -mplife.com -sale-fire.com -inbox.lv -offeratum.com -pandora.tv -eltiempo.com -indiarailinfo.com -solidtrustpay.com -warthunder.ru -novamov.com -folkd.com -envato.com -wetpaint.com -tempo.co -howtogeek.com -foundationapi.com -care2.com -bendibao.com -mazika2day.com -asda.com -nowvideo.ch -hiapk.com -17u.com -tutu.ru -ncdownloader.com -warez-bb.org -jsoftj.com -xmarks.com -36kr.com -runetki.com -quoka.de -heureka.cz -monografias.com -zhenai.com -4porn.com -antena3.com -lintas.me -seroundtable.com -e1.ru -berkeley.edu -officedepot.com -myflorida.com -parispornmovies.com -uniqlo.com -topky.sk -lumovies.com -buysellads.com -stirileprotv.ro -scottrade.com -mmtrends.net -wholesale-dress.net -metacritic.com -pichunter.com -moneybookers.com -idealista.com -buzzle.com -rcom.co.in -weightwatchers.com -itv.com -inilah.com -vic.gov.au -prom.ua -with2.net -doodle.com -trafficbroker.com -h33t.com -avaaz.org -maultalk.com -bmo.com -nerdbux.com -abnamro.nl -didigames.com -pornorama.com -forumotion.com -woman.ru -thaivisa.com -lexpress.fr -forumcommunity.net -regions.com -sf-express.com -donkeymails.com -clubic.com -aucfan.com -enterfactory.com -yandex.com -iherb.com -in.gr -olx.pt -fbdownloader.com -autoscout24.it -siteground.com -psicofxp.com -persiangig.com -metroer.com -tokopedia.com -seccam.info -sport-express.ru -vodafone.it -blekko.com -entekhab.ir -expressen.se -zalando.fr -hawaaworld.com -freeonlinegames.com -google.com.lb -ab-in-den-urlaub.de -android4tw.com -alriyadh.com -drugstore.com -iobit.com -rei.com -racing-games.com -mommyfucktube.com -pideo.net -gogoanime.com -avaxho.me -christianmingle.com -activesearchresults.com -trendsonline.biz -planetsuzy.org -rubias19.com -cleverbridge.com -jeevansathi.com -washingtontimes.com -lcl.fr -98ia.com -mercadolibre.com.co -n-tv.de -divyabhaskar.co.in -airbnb.com -mybrowserbar.com -travian.com -autoblog.com -blesk.cz -playboy.com -p30download.com -pazienti.net -uast.ac.ir -logsoku.com -zedge.net -creditmutuel.fr -absa.co.za -milliyet.tv -jiathis.com -liverpoolfc.tv -dospy.com -calameo.com -netsuite.com -angelfire.com -snagajob.com -hollywoodlife.com -techtudo.com.br -payserve.com -portalnet.cl -worldadult-videos.info -indianpornvideos.com -france24.com -discuss.com.hk -theplanet.com -advego.ru -eltiempo.es -55tuan.com -snopes.com -startnow.com -tucarro.com -skyscanner.net -wchonline.com -gaadi.com -lindaikeji.blogspot.com -keywordblocks.com -apsense.com -avangate.com -gandul.info -google.com.gh -mybigcommerce.com -homeaway.com -wikitravel.org -etxt.ru -zerx.ru -sidereel.com -edreams.es -india-forums.com -infonews.com -zoominfo.com -stylebistro.com -dominos.com -591hx.com -authorize.net -61baobao.com -digitalspy.co.uk -godvine.com -rednowtube.com -appbank.net -woozgo.fr -expireddomains.net -my-uq.com -peliculasyonkis.com -forumfree.it -shangdu.com -startmyripple.com -hottube.me -members.webs.com -blick.ch -google.cm -tomtom.com -rzd.ru -opensooq.com -pizzahut.com -marksandspencer.com -filenuke.com -filelist.ro -akharinnews.com -etrade.com -planetromeo.com -wpbeginner.com -bancomercantil.com -pastdate.com -webutation.net -mywebgrocer.com -mobile.ir -seemorgh.com -nhs.uk -google.ba -ileehoo.com -seobook.com -wetteronline.de -happy-porn.com -theonion.com -webnode.com -svaiza.com -newsbomb.gr -t88u.com -tsn.ca -unity3d.com -nseindia.com -juegosdiarios.com -genieo.com -kelkoo.com -shabdkosh.com -tecmundo.com.br -chinaunix.net -goo-net.com -asana.com -hdporn.in -virtapay.com -jobdiagnosis.com -guokr.com -clickpoint.it -3dmgame.com -ashleymadison.com -utsprofitads.com -google.ee -oyunskor.com -metro.co.uk -ebaumsworld.com -realsimple.com -3file.info -xcams.com -cyberforum.ru -babble.com -lidl.de -pixer.mobi -yell.com -alnilin.com -lurkmore.to -olx.co.za -eorezo.com -baby.ru -redporntube.com -extabit.com -wayn.com -gaana.com -islamicfinder.org -venturebeat.com -played.to -alrakoba.net -mouthshut.com -banquepopulaire.fr -dasoertliche.de -1stwebdesigner.com -tam.com.br -nature.com -camfrog.com -philly.com -zemtv.com -oprah.com -wmaraci.com -ruvr.ru -gsn.com -acrobat.com -depositfiles.org -smartresponder.ru -huxiu.com -porn-wanted.com -tripadvisor.fr -3366.com -ranker.com -cibc.com -trend.az -whatsapp.com -07073.com -netload.in -channel4.com -yatra.com -elconfidencial.com -labnol.org -google.co.ke -disneylatino.com -pconverter.com -cqnews.net -blog.co.uk -immowelt.de -crunchyroll.com -gamesgames.com -protothema.gr -vmoptions.com -go2jump.org -psu.edu -sanjesh.org -sportingnews.com -televisionfanatic.com -fansshare.com -xcams4u.com -madthumbs.com -ebates.com -eromon.net -copyblogger.com -flirt4free.com -gaytube.com -notdoppler.com -allmyvideos.net -cam4.de.com -chosun.com -adme.ru -codeplex.com -jumia.com.ng -digitaltrends.com -b92.net -miniinthebox.com -radaronline.com -hujiang.com -gardenweb.com -pizap.com -iptorrents.com -yuku.com -mega-giochi.it -nrk.no -99designs.com -uscis.gov -lostfilm.tv -mileroticos.com -republika.co.id -sharethis.com -samplicio.us -1saleaday.com -vonelo.com -oyunmoyun.com -flightradar24.com -geo.tv -nexusmods.com -blogspot.fi -directtrack.com -media.net -bigresource.com -free-lance.ru -loveplanet.ru -ilfattoquotidiano.it -coolmovs.com -mango.com -nj.com -magazineluiza.com.br -datehookup.com -registro.br -debenhams.com -jqueryui.com -palcomp3.com -opensubtitles.org -socialmediatoday.com -allgameshome.com -pricegrabber.com -lufthansa.com -ip-adress.com -business-standard.com -games.com -zaman.com.tr -jagranjosh.com -mint.com -gorillavid.in -google.com.om -blogbigtime.com -korrespondent.net -nymag.com -proporn.com -ycasmd.info -persiantools.com -torrenthound.com -bestsexo.com -alwatanvoice.com -jahannews.com -bluewin.ch -sap.com -rzb.ir -myorderbox.com -dealsandsavings.net -goldenline.pl -stuff.co.nz -opentable.com -4738.com -freshersworld.com -state.pa.us -lavanguardia.com -mob.org -vodafone.in -blogdetik.com -888.it -passportindia.gov.in -ssa.gov -desitvforum.net -rajasthan.gov.in -zonealarm.com -locaweb.com.br -logme.in -fetlife.com -lyricsfreak.com -te3p.com -hmrc.gov.uk -bravoerotica.com -kolesa.kz -vinescope.com -shoplocal.com -mydrivers.com -bigideamastermind.com -uncoverthenet.com -ragecomic.com -yodobashi.com -titan24.com -nocoty.pl -turkishairlines.com -liputan6.com -3suisses.fr -cancan.ro -apetube.com -kurir-info.rs -wow.com -myblogguest.com -wp.com -tre.it -livrariasaraiva.com.br -ubuntuforums.org -serverfault.com -princeton.edu -experienceproject.com -ero-video.net -west263.com -nguoiduatin.vn -findthebest.com -iol.pt -hotukdeals.com -filmifullizle.com -blog.hu -dailyfinance.com -bigxvideos.com -adreactor.com -fmworld.net -fumu.com -ntv.ru -poringa.net -syosetu.com -giantsextube.com -uuu9.com -babosas.com -square-enix.com -bankia.es -freedownloadmanager.org -add-anime.net -tuttomercatoweb.com -192.com -freekaamaal.com -youngpornvideos.com -nbc.com -jne.co.id -fobshanghai.com -johnlewis.com -mvideo.ru -bhinneka.com -gooddrama.net -lobstertube.com -ovguide.com -joemonster.org -editor.wix.com -wechat.com -locanto.in -video2mp3.net -couchsurfing.org -tchibo.de -rol.ro -toroporno.com -backlinkwatch.com -greatergood.com -smartaddressbar.com -getgoodlinks.ru -fitbit.com -elcorteingles.es -up2c.com -rg.ru -ftalk.com -apartmenttherapy.com -blogspot.hu -e-rewards.com -weloveshopping.com -swtor.com -abs-cbnnews.com -webpagetest.org -ricardo.ch -ghatreh.com -ibps.in -moneymakergroup.com -exist.ru -kakprosto.ru -gradeuptube.com -lastampa.it -medicinenet.com -theknot.com -yale.edu -okazii.ro -wa.gov -gmhuowan.com -cnhubei.com -dickssportinggoods.com -instaforex.com -zdf.de -getpocket.com -takungpao.com -junkmail.co.za -tripwiremagazine.com -popcap.com -bangbros.com -shtyle.fm -jungle.gr -apserver.net -mzamin.com -google.lu -squarebux.com -bollywoodhungama.com -milfmovs.com -softonic.it -cyberciti.biz -scout.com -teensnow.com -pornper.com -torrentreactor.net -smotri.com -startpage.com -climatempo.com.br -bigrock.in -kajabi.com -imgchili.com -dogpile.com -thestreet.com -sport24.gr -tophotels.ru -bbva.es -perfectmoney.com -cashmachines2.com -skroutz.gr -logitech.com -seriescoco.com -fastclick.com -cambridge.org -fark.com -krypt.com -indiangilma.com -safe-swaps.com -trenitalia.com -flycell.com.mx -livefreefun.com -ourtoolbar.com -anandtech.com -neimanmarcus.com -lelong.com.my -pulscen.ru -paginegialle.it -intelius.com -orange.pl -aktuality.sk -webgame.in.th -runescape.com -rocketnews24.com -lineadirecta.com -origin.com -newsbeast.gr -justhookup.com -lifenews.ru -sitemeter.com -isbank.com.tr -commerzbanking.de -marthastewart.com -ntvmsnbc.com -seloger.com -vend-o.com -almanar.com.lb -sifyitest.com -taojindi.com -mylife.com -talkfusion.com -hichina.com -paruvendu.fr -admcsport.com -faz.net -narutoget.com -wufoo.com -feedads-srv.com -gophoto.it -tgju.org -dynamicdrive.com -centurylink.net -ngs.ru -anyap.info -dailykos.com -malaysiakini.com -uefa.com -socialmediaexaminer.com -peperonity.de -support.wordpress.com -hola.com -readmanga.eu -jstv.com -irib.ir -bookingbuddy.com -computerhope.com -ilovemobi.com -pinkrod.com -videobash.com -alfemminile.com -tu.tv -utro.ru -urbanoutfitters.com -autozone.com -gilt.com -atpworldtour.com -goibibo.com -propellerpops.com -cornell.edu -flashscore.com -babyblog.ru -sport-fm.gr -viamichelin.fr -newyorker.com -tagesschau.de -guiamais.com.br -jeux.fr -pontofrio.com.br -dm5.com -ss.lv -mirtesen.ru -money.pl -tlbsearch.com -usembassy.gov -cineblog01.net -nur.kz -hotnewhiphop.com -mp3sheriff.com -games.co.id -deviantclip.com -list.ru -xitek.com -netvibes.com -24sata.hr -usda.gov -zerofreeporn.com -tvb.com -decolar.com -worldfree4u.com -dzone.com -wikiquote.org -techtunes.com.bd -pornup.me -blogutils.net -yupoo.com -peoplesmart.com -kijiji.it -usairways.com -betfred.com -ow.ly -nsw.gov.au -mci.ir -iranecar.com -wisegeek.com -gocomics.com -bramjnet.com -bit.ly -timesofindia.com -xingcloud.com -tfl.gov.uk -derstandard.at -icq.com -orange.co.uk -pornokopilka.info -88db.com -house365.com -collegehumor.com -gfxtra.com -borsapernegati.com -surveygifters.com -ec21.com -seoprofiler.com -goldporntube.com -tvtropes.org -techtarget.com -juno.com -visual.ly -dardarkom.com -showup.tv -three.co.uk -shopstyle.com -penguinvids.com -trainenquiry.com -soha.vn -fengniao.com -carschina.com -500wan.com -perfectinter.net -elog-ch.com -thetoptens.com -1616.net -nationwide.co.uk -myhabit.com -kinomaniak.tv -googlecode.com -kddi.com -wyborcza.biz -gtbank.com -zigwheels.com -lepoint.fr -formula1.com -baomoi.com -apa.az -movie2k.to -irpopup.ir -nps.gov -lachainemeteo.com -x-art.com -bakecaincontrii.com -longtailvideo.com -yengo.com -listentoyoutube.com -dreamhost.com -cari.com.my -sergeymavrodi.com -boursorama.com -extra.com.br -msnbc.com -uwants.com -utexas.edu -minijuegos.com -mumayi.com -skorer.tv -ddmap.com -ebog.com -artlebedev.ru -venere.com -academic.ru -mako.co.il -nabble.com -autodesk.com -vertitechnologygroup.com -leaseweb.com -yoox.com -papajohns.com -unmillondeutilidades.com -webmasters.ru -seoclerks.com -yootheme.com -google.com.py -beemp3.com -yepme.com -alef.ir -gotowebinar.com -onec.dz -bonprix.de -landsend.com -libertatea.ro -timeout.com -appnexus.com -uproxx.com -alohatube.com -citilink.ru -askubuntu.com -freemake.com -rockettheme.com -tupaki.com -53.com -tune.pk -standardchartered.com -video-i365.com -knowyourmeme.com -gofeminin.de -vmware.com -vbox7.com -webfail.com -onewebsearch.com -xnxxmovies.com -blogspot.hk -hgtv.com -findagrave.com -yoast.com -audiopoisk.com -sexytube.me -centerblog.net -webpronews.com -prnewswire.com -vietnamnet.vn -groupon.co.in -bom.gov.au -loxblog.com -llnw.com -jcrew.com -carsensor.net -aukro.cz -zoomby.ru -wallstcheatsheet.com -17k.com -secondlife.com -marmiton.org -zorpia.com -searchya.com -rtl2.de -wiocha.pl -28tui.com -shopzilla.com -google.com.ni -lycos.com -gucheng.com -rajanews.com -blackhatteam.com -mp3.es -forums.wordpress.com -micromaxinfo.com -duden.de -nyc.gov -monova.org -al-wlid.com -dastelefonbuch.de -cam4ultimate.com -inps.it -nazwa.pl -beatport.com -wizzair.com -thomann.de -juntadeandalucia.es -oficialsurveyscenter.co -zaluu.com -videarn.com -azcentral.com -xvideosmovie.com -eforosh.com -movie25.com -creditkarma.com -upi.com -mozook.com -heavy.com -worldoftanks.com -vkrugudruzei.ru -hourlyrevshare.net -walkerplus.com -btyou.com -adzibiz.com -tryflirting.com -moi.gov.sa -cooltext.com -dawanda.com -travian.com.sa -va.gov -sunmaker.com -aaa.com -dinodirect.com -cima4u.com -huaban.com -nzherald.co.nz -plotek.pl -chow.com -rincondelvago.com -uzai.com -stayfriends.de -reed.co.uk -rainpow.com -dallasnews.com -ntvspor.net -fonearena.com -forocoches.com -myfonts.com -fenopy.se -animefreak.tv -websitewelcome.com -indonetwork.co.id -mapsofindia.com -newlook.com -holiday-weather.com -zhe800.com -recipesfinder.com -bbom.com.br -jalopnik.com -canon.com -freshbooks.com -clickcompare.info -aprod.hu -thisav.com -boerse.bz -orange.es -forobeta.com -surfactif.fr -listverse.com -feedjit.com -bni.co.id -gamemazing.com -mbalib.com -topsy.com -torchbrowser.com -ieee.org -tinydeal.com -playdom.com -redorbit.com -inboxdollars.com -google.com.bh -pcanalysis.net -acer.com -jizzbell.com -google.com.kh -mappy.com -day.az -euronews.com -wikidot.com -creativecommons.org -quantcast.com -iconarchive.com -iyaya.com -jetstar.com -diandian.com -winzip.com -clixzor.com -teebik.com -meilele.com -gsm.ir -dek-d.com -giantbomb.com -tala.ir -extremetracking.com -homevv.com -truthaboutabs.com -psychologytoday.com -vod.pl -macromill.com -amd.com -livescience.com -dedecms.com -jin115.com -ampxchange.com -profitcentr.com -webmotors.com.br -lan.com -fileice.net -ingdirect.es -amtrak.com -emag.ro -progressive.com -balatarin.com -immonet.de -e-travel.com -studymode.com -go2000.com -shopbop.com -filesfetcher.com -euroresidentes.com -movistar.es -lefeng.com -google.hn -homestead.com -filesonar.com -hsbccreditcard.com -google.com.np -parperfeito.com.br -sciencedaily.com -realgfporn.com -wonderhowto.com -coolrom.com -wikibooks.org -archdaily.com -gigazine.net -totaljerkface.com -bezaat.com -eurosport.com -fontspace.com -tirage24.com -bancomer.com.mx -nasdaq.com -bravoteens.com -bdjobs.com -zimbra.free.fr -arsenal.com -rabota.ru -lovefilm.com -tsetmc.com -movshare.net -debonairblog.com -zmovie.co -peoplefinders.com -mercadolibre.com -connectlondoner.com -forbes.ru -gagnezauxoptions.com -taikang.com -mywapblog.com -citysearch.com -novafinanza.com -gruposantander.es -relianceada.com -rankingsandreviews.com -hjenglish.com -state.nj.us -comdirect.de -claro.com.br -alluc.to -godlikeproductions.com -lowyat.net -dawn.com -18xgirls.com -origo.hu -loopnet.com -payu.in -digitalmedia-comunicacion.com -newsvine.com -petfinder.com -kuaibo.com -soft32.com -yellowpages.ca -1fichier.com -egyup.com -iskullgames.com -androidforums.com -blogspot.cz -umich.edu -madsextube.com -bigcinema.tv -donedeal.ie -winporn.com -cosmopolitan.com -reg.ru -localmoxie.com -kootation.com -gidonline.ru -clipconverter.cc -gioco.it -ravelry.com -gettyimages.com -medicalnewsreporter.com -shop411.com -aif.ru -journaldesfemmes.com -blogcu.com -vanguard.com -freemp3go.com -google.ci -findicons.com -tineye.com -webdesignerdepot.com -nomorerack.com -iqoo.me -amarujala.com -pengfu.com -leadpages.net -zalukaj.tv -avon.com -casasbahia.com.br -juegosdechicas.com -tvrain.ru -askmefast.com -stockcharts.com -footlocker.com -allanalpass.com -theoatmeal.com -storify.com -santander.com.br -laughnfiddle.com -lomadee.com -aftenposten.no -lamoda.ru -tasteofhome.com -news247.gr -sherdog.com -milb.com -3djuegos.com -dreammovies.com -commonfloor.com -tharunee.lk -chatrandom.com -rechargeitnow.com -am15.net -sexad.net -herokuapp.com -apontador.com.br -rfi.fr -woozworld.com -hitta.se -comedycentral.com -fbsbx.com -aftabnews.ir -stepstone.de -filmon.com -ameritrade.com -ecitic.com -bola.net -hq-sex-tube.com -gsp.ro -groupon.co.uk -20min.ch -barclaycardus.com -dice.com -himasoku.com -nwsource.com -gougou.com -iol.co.za -thinkgeek.com -governmentjobs.com -500.com -caixin.com -elsevier.com -rafflecopter.com -auctiva.com -pracuj.pl -strato.de -ricardoeletro.com.br -vodafone.de -jike.com -smosh.com -downlite.net -to8to.com -tikona.in -royalmail.com -tripadvisor.de -realclearpolitics.com -pubdirecte.com -rassd.com -ptt.cc -townhall.com -theoldreader.com -viki.com -one.com -peopleperhour.com -desidime.com 17track.net -duote.com -emuch.net -mlgame.co.uk -rockstargames.com -slaati.com -ibibo.com -journaldunet.com -ria.ua -odatv.com -comodo.com -clickfair.com -system500.com -wordstream.com -alexaboostup.com -yjbys.com -hsbc.com -online-convert.com -miui.com -totaljobs.com -travian.fr -funda.nl -bazos.sk -efukt.com -startlap.com -hir24.hu -mrskin.com -dbs.com -sevenforums.com -admitad.com -graaam.com -exactme.com -roadrunner.com -liberation.fr -cas.sk -redbubble.com -ezilon.com -hihi2.com -net.hr -mediaite.com -clip2net.com -wapka.mobi -dailybasis.com -o2online.de -tweetdeck.com -fakt.pl -service-public.fr -bodisparking.com -corporationwiki.com -jandan.net -alisoft.com -gosuslugi.ru -grxf.com -daserste.de -freedigitalphotos.net -flirchi.ru -htmlbook.ru -independent.ie -bufferapp.com -panzar.com -sport.cz -matomeantena.com -thenewporn.com -iran-tejarat.com -rotoworld.com -maalaimalar.com -poppen.de -csfd.cz -2ip.ru -hawamer.com -telkomsel.com -un.org -autobinaryea.com -emgoldex.com -saksfifthavenue.com -realtor.ca -hdwallpapers.in -chinahr.com -niazerooz.com -sina.com -kinopod.ru -funweek.it -pornsake.com -vitacost.com -110.com -jobomas.com -joyreactor.cc -3dnews.ru -vedomosti.ru -stansberryresearch.com -performersoft.com -codecademy.com -petsmart.com -kissmetrics.com -infojobs.it -wealink.com -rapidtrk.com -enterprise.com -iran-forum.ir -express-files.com -cyberpresse.ca -dobreprogramy.pl -uploading.com -profitclicking.com -playwartune.com -toluna.com -shoptime.com.br -totaladperformance.com -handelsblatt.com -hamshahrionline.ir -15min.lt -wyborcza.pl -flvto.com -microsofttranslator.com -trovaprezzi.it -eversave.com -wmzona.com -hardwarezone.com.sg -thestar.com.my -siliconindia.com -jfranews.com -emol.com -nordea.fi -heroturko.me -xat.com -3asq.com -hlntv.com -incruit.com -list-manage2.com -bulbagarden.net -blogdohotelurbano.com -suomi24.fi -nicozon.net -tuporno.tv -perfectworld.com -ayosdito.ph -gmx.at -123greetings.com -metafilter.com -g9g.com -searchnfind.org -pcgamer.com -on.cc -rentalcars.com -mail2web.com -zalando.it -freevideo.cz -source-wave.com -iranjib.ir -societe.com -160by2.com -berooztarinha.com -popmog.com -fantasy8.com -motortrend.com -huffingtonpost.ca -51test.net -ringtonematcher.com -ourtime.com -standardchartered.co.in -rdio.com -parsiblog.com -btvguide.com -sport.ro -freep.com -gismeteo.ua -rojadirecta.me -babol.pl -lun.com -epicurious.com -fetishok.com -mystart.com -wn.com -nationalrail.co.uk -feedsportal.com -rai.it -sportlemon.tv -groupon.com.br -ebay.at -yourdictionary.com -360safe.com -statefarm.com -desjardins.com -biblehub.com -mercadolibre.cl -eluniversal.com -lrytas.lt -youboy.com -gratka.pl -etype.com -reallifecam.com -imp.free.fr -jobstreet.co.id -geenstijl.nl -aebn.net -openoffice.org -diythemes.com -2gis.ru -wpmu.org -scrubtheweb.com -domain.com.au -buyma.com -ccbill.com -tui18.com -goforfiles.com -billionuploads.com -blogtalkradio.com -pipl.com -wallpaperswide.com -tuttosport.com -astucecherry.com -tradingfornewbies.com -umn.edu -rj.gov.br -mlive.com -justfab.com -ijreview.com -daniweb.com -quickmeme.com -safeway.com -virtualedge.com -saudiairlines.com -elbotola.com -holtgames.com -boots.com -potterybarn.com -mediamarkt.de -mangastream.com -mypoints.com -torrentdownloads.me -subtitleseeker.com -idlebrain.com -ekantipur.com -nowgamez.com -neoseeker.com -christianpost.com -joystiq.com -iphone-winners.info -quizlet.com -prosport.ro -quanjing.com -gamechit.com -teleshow.pl -corrieredellosport.it -yoo7.com -fotocasa.es -attracta.com -hyatt.com -confirmit.com -xyu.tv -yoolplay.com -active.com -gizmag.com -hostelworld.com -pc6.com -lacentrale.fr -megasesso.com -thairath.co.th -thinkprogress.org -400gb.com -manageflitter.com -pronto.com -erotube.org -luxtarget.com -vui.vn -screenrant.com -nationalreview.com -ikman.lk -aboutus.org -booloo.com -klm.com -aukro.ua -skladchik.com -alfalfalfa.com -ghanaweb.com -cheetahmail.com -celebritynetworth.com -honda.com -regnum.ru -mediabistro.com -template-help.com -elektroda.pl -howlifeworks.com -avjavjav.com -justunfollow.com -kindgirls.com -xrea.com -songspk.cc -impiego24.it -health.com -whitehouse.gov -ulozto.cz -clickindia.com -zoosnet.net -yingjiesheng.com -copacet.com -fluege.de -uiuc.edu -funnymama.com -popsugar.com -siyahgazete.com -ligatus.com -seomastering.com -nintendo.com -kuaidi100.com -motor-talk.de -p.ht -care.com -ttnet.com.tr -cifraclub.com.br -yunfile.com -telechargement-de-ouf.fr -hotpornshow.com -upenn.edu -brg8.com -techspot.com -milli.az -segundamano.mx -n4g.com -blogspot.no -frys.com -pixhost.org -washington.edu -rte.ie -lockerdome.com -qassimy.com -signup.wordpress.com -sochiset.com -mycokerewards.com -collegeboard.org -fengyunzhibo.com -twickerz.com -bikroy.com -apkmania.co -webrankstats.com -dl-protect.com -dr.dk -emoneyspace.com -rae.es -theexgirlfriends.com -gigaom.com -burmeseclassic.com -wisc.edu -ocnk.net -arcot.com -paginasamarillas.es -tunisia-sat.com -medscape.com -gameninja.com -imperiaonline.org -2ememain.be -myshopping.com.au -nvidia.com -fanhuan.com -vista.ir -dish.com -cartrade.com -egopay.com -sonyentertainmentnetwork.com -myway.com -kariyer.net -thanhnien.com.vn -gulfnews.com -flagcounter.com -yfrog.com -bigstockphoto.com -occ.com.mx -3911.net -naszemiasto.pl -pgatour.com -zgjrw.com -fdj.fr -motogp.com -organogold.com -tamindir.com -ykb.com -biglion.ru -yourfiledownloader.com -publika.az -dealnews.com -warnerbros.com -wpmudev.org -pu-results.info -usajobs.gov -adsprofitwiz.es -parallels.com -thqafawe3lom.com -xiazaiba.com -enikos.gr -m5zn.com -dir.bg -ripoffreport.com -jusbrasil.com.br -maxifoot.fr -eva.vn -dfnhk8.net -api.ning.com -ligtv.com.tr -openrice.com -999120.net -pho.to -indiblogger.in -tfile.me -kotak.com -katproxy.com -calottery.com -klmty.net -endomondo.com -uploadboy.com -8tracks.com -blox.pl -conrad.de -sonico.com -windguru.cz -tinhte.vn -grantland.com -seratnews.ir -solomono.ru -foreca.com -ziprecruiter.com -chime.in -intesasanpaolo.com -softonic.de -adtech.info -appgame.com -opendns.com -tubekitty.com -linguee.de -pepperfry.com -egou.com -tweakers.net -alfavita.gr -plusnetwork.com -timeweb.ru -maybeporn.com -gharreh.com -canoe.ca -parsine.com -ucla.edu -freeridegames.com -doctoroz.com -tradeindia.com -socialmediabar.com -yaske.net -miniih.com -blog.me -dn.se -almos3a.com -bbvanet.com.mx -fcbarcelona.com -web.com -raaga.com -yad2.co.il -2cto.com -nx8.com -modcloth.com -carsales.com.au -cooks.com -fileswap.com -egyptiansnews.com -azyya.com -masreat.com -airliners.net -com-1b.info -virginmobileusa.com -pleasantharborrv.com -gsmhosting.com -foxbusiness.com -delfi.lv -flightaware.com -ameli.fr -fbxtk.com -purdue.edu -sbi.co.in -fotka.pl -quicksprout.com -arjwana.com -affili.net -5sing.com -mozilla.com -taaza.com -onetad.com -vivastreet.it -leguide.com -casualclub.com -wanelo.com -ipsosinteractive.com -videohive.net -fenzhi.com -lefrecce.it -bugun.com.tr -p30world.com -cuevana.tv -joins.com -tvnet.lv -aliimg.com -bellanaija.com -startpagina.nl -incometaxindiaefiling.gov.in -michigan.gov -harborfreight.com -fineartamerica.com -mysurvey.com -kapaza.be -adxpansion.com -thefind.com -priyo.com -burrp.com -sky.it -ipad-winners.info -usgs.gov -gavick.com -ellislab.com -voegol.com.br -paginebianche.it -getwebcake.com -zeroredirect1.com -gaiaonline.com -iqilu.com -bright.com -comunidades.net -webgains.com -overdrive.com -bigcommerce.com -paperpkads.com -imageporter.com -listal.com -rbcdaily.ru -redbus.in -3bmeteo.com -earn-on.com -ae.com -shoutmeloud.com -oeeee.com -usenet.nl -mediotiempo.com -prostoporno.net -bangyoulater.com -comunio.de -pureleads.com -bakeca.it -trovit.it -fakku.net -indeed.fr -inquisitr.com -wizards.com -straightdope.com -pornpros.com -s-oman.net -facilisimo.com -dostor.org -tabloidpulsa.co.id -shafaf.ir -bt.dk -lent.az -filmaffinity.com -wjunction.com -gamefront.com -photoshelter.com -cheaptickets.com -meetic.it -seochat.com -livemixtapes.com -deadline.com -boingboing.net -lecai.com -onetravel.com -erotictube.me -svd.se -pcadvisor.co.uk -pravda.com.ua -afisha.ru -dressupgamesite.com -mercadopago.com -bangkokpost.com -dumpert.nl -monotaro.com -bloomingdales.com -ebayclassifieds.com -t-online.hu -2dbook.com -thekitchn.com -halifax.co.uk -tanx.com -jutarnji.hr -petardashd.com -rookee.ru -showroomprive.com -sharepoint.com -liebiao.com -pumbaporn.com -dwnews.com -sanguosha.com -pp.cc -myfc.ir -alicdn.com -carmax.com -defencenet.gr -cuantarazon.com -westernunion.com -natunbarta.com -sekindo.com -edublogs.org -hotmail.com -problogger.net -amardeshonline.com -gemius.com -egynews.net -indiabix.com -provincial.com -play.com -beslist.nl -shape.com -alhilal.com -irecommend.ru -cmmnts.com -1news.az -kinobanda.net -banamex.com.mx -cleanfiles.net -algeriaforum.net -zumi.pl -giallozafferano.it -news-postseven.com -firstcry.com -lookforporn.com -xxsy.net -scriptmafia.org -intodns.com -famitsu.com -eclipse.org -net-a-porter.com -btemplates.com -topshop.com -myvidster.com -calciomercato.com -arabyonline.com -lesechos.fr -empireavenue.com -damnlol.com -nukistream.com -wayport.net -buienradar.nl -vivastreet.co.in -kroger.com -geocaching.com -hunantv.com -fotolog.net -gunbroker.com -flalottery.com -priples.com -nlayer.net -trafficshop.com -standardmedia.co.ke -finanzen.net -meta.ua -gfy.com -playground.ru -rp5.ru -otnnetwork.net -tvmao.com -hir.ma -twilightsex.com -haodou.com -virgin-atlantic.com -ankieta-online.pl -kinkytube.me -123mplayer.com -elifting.com -akiba-online.com -tcsbank.ru -gametrailers.com -dihitt.com -fancy.com -admaimai.com -61.com -hotchatdirect.com -penesalud.com -adsupplyads.com -robokassa.ru -brooonzyah.net -moviesmobile.net -fuck-mates.com -ch-news.com -cwan.com -mec.gov.br -musiciansfriend.com -angrybirds.com -ebrun.com -kienthuc.net.vn -morningstar.com -rasekhoon.net -techsmith.com -diy.com -awwwards.com -ajc.com -akismet.com -itar-tass.com -60secprofit.com -videoweed.es -guitarcenter.com -tv2.dk -narutom.com -bittorrent.com -unionpaysecure.com -91jm.com -licindia.in -bama.ir -hertz.com -propertyguru.com.sg -city8.com -blu-ray.com -abebooks.com -adidas.com -sing365.com -qq163.com -fashionandyou.com -lietou.com -eniro.se -pengpeng.com -haibao.com -jxedt.com -crsky.com -nyu.edu -minecraftskins.com -yangtse.com -almstba.co -parsnews.com -twiends.com -dkb.de -friendscout24.de -aviny.com -dig.do -gamestorrents.com -guru.com -bostonglobe.com -brandalley.fr -tn.com.ar -yourwebsite.com -istgah.com -e-familynet.com -hotshame.com -volkskrant.nl -karnaval.com -team-bhp.com -sinemalar.com -ipko.pl -fastcompany.com -embedupload.com -gzmama.com -icicidirect.com -whatismyip.com -siasat.pk -rbi.org.in -amarillasinternet.com -netvasco.com.br -ctvnews.ca -gad.de -dailyfx.com -smartklicks.com -qoo10.sg -loc.gov -playerflv.com -uta-net.com -afl.com.au -mainlink.ru -pricedekho.com -wickedfire.com -rlslog.net -raiffeisen.at -easports.com -groupon.fr -o2.co.uk -irangrand.ir -vuku.tv -play.pl -mxtoolbox.com -promiflash.de -linode.com -familysearch.org -publico.pt -freepornvideo.me -uploadbaz.com -tocmai.ro -cimbclicks.com.my -bestporntube.me -lainformacion.com -herschina.com -fontsquirrel.com -blip.tv -caranddriver.com -qld.gov.au -pons.eu -nascar.com -hrsmart.com -tripadvisor.com.au -hs.fi -auspost.com.au -sponsoredreviews.com -webopedia.com -sovsport.ru -bancsabadell.com -prettyporntube.com -sodahead.com -ovi.com -aleseriale.pl -mnwan.com -callofduty.com -sportskeeda.com -cp.cx -researchgate.net -michaels.com -createspace.com -sprintrade.com -anonymouse.org -hautelook.com -4gamer.net -accorhotels.com -roomkey.com -guildwars2.com -cargurus.com -wpengine.com -iis.net -vendaria.com -argentinawarez.com -webdesigntunes.com -allvoices.com -eprize.com -pmu.fr -carrefour.fr -tax.gov.ir -ruelala.com -mainspy.ru -phpwind.net -loteriasyapuestas.es -musavat.com -lenskart.com -refinery29.com -888poker.es -denverpost.com -who.int -thesims3.com -jerkhour.com -lyricsmode.com -ivillage.com -qyer.com -hktdc.com -pornoload.com -bluedart.com -here.com -philips.com -dsebd.org -tubidy.mobi -stream.cz -infojobs.com.br -soft98.ir -bolsaparanovatos.com -mercador.ro -neogaf.com -yardbarker.com -rapidlibrary.com -xxeronetxx.info -kaiserpermanente.org -telstra.com.au -contra.gr -laredoute.it -lipsum.com -twitlonger.com -hln.be -53kf.com -gofundme.com -carigold.com -clips4sale.com -focalprice.com -gameaholic.com -presstv.ir -puu.sh -filmlinks4u.net -traffic-delivery.com -bebo.com -enter.ru -shufoo.net -vivo.com.br -jizzhut.com -1jux.net -serebii.net -translate.ru -mtv3.fi -njuskalo.hr -bell.ca -myheritage.com -cic.fr -mercurynews.com -alaan.tv -econsultancy.com -pornhost.com -a8.net -netzero.net -tracklab101.com -spanishdict.com -amctv.com -erepublik.com -mk.ru -publico.es -fux.com -webcamtoy.com -rahnama.com -wanyh.com -ecplaza.net -mol.gov.sa -torrentday.com -hsbc.com.br -interoperabilitybridges.com -billmelater.com -speedanalysis.com -volusion.com -mixcloud.com -weeronline.nl -tiancity.com -thehun.com -comparisons.org -eurosport.ru -trendyol.com -7120.com -eldiariodeamerica.com -fap8.com -joyme.com -ufl.edu -cuantocabron.com -hotmart.com.br -wolframalpha.com -cpasbien.com -sanalpazar.com -publipt.com -9ku.com -officemax.com -cuny.edu -gem.pl -waelelebrashy.com -coinmill.com -bet.com -moskva.fm -groupalia.com -131.com -pichak.net -theatlanticwire.com -laptopmag.com -worldpay.com -groupon.pl -imeimama.com -torrents.net -britishcouncil.org -letsbonus.com -e-monsite.com -url.org -discuz.com -freepornsite.me -cheatcc.com -magicmovies.com -laterooms.com -du.ac.in -uservoice.com -discas.net -d1g.com -explicittube.com -e-autopay.com -3lian.com -oopsmovs.com -agenziaentrate.gov.it -ufc.com -mooshare.biz -ankang06.org -betradar.com -explosm.net -silkroad.com -crackberry.com -toyota.com -bongda.com.vn -europapress.es -mlxchange.com -plius.lt -pitchfork.com -groupon.de -hollisterco.com -hasoffers.com -miami.com -dslreports.com -blinkweb.com -alamaula.com -leonardo.it -very.co.uk -globalsources.com -viator.com -greenwichmeantime.com -appannie.com -eldorado.ru -canadiantire.ca -enjin.com -szhome.com -phim3s.net -bash.im -immi.gov.au -enjoydressup.com -thesuperficial.com -91mobiles.com -libertaddigital.com -po-kaki-to.com -truelocal.com.au -centrum24.pl -zylom.com -mypornmotion.com -skybet.com -soccermanager.com -poriborton.com -mozzi.com -eset.com -chelseafc.com -amulyam.in -argaam.com -mnn.com -papystreaming.com -hostelbookers.com -vatera.hu -pciconcursos.com.br -milenio.com -yellowbook.com -mobilepriceindia.co.in -naked.com -lazada.vn -70e.com -mapy.cz -vodafone.es -zbiornik.com -fc2web.com -rghost.ru -avvo.com -fardanews.com -pcbeta.com -hibapress.com -gamehouse.com -macworld.com -qantas.com.au -dba.dk -inttrax.com -conejox.com -immobiliare.it -sparkasse.at -udemy.com -accenture.com -pokerstrategy.com -leroymerlin.fr -sweetkiss.me -siriusxm.com -nieuwsblad.be -blogun.ru -ojogos.com.br -lexilogos.com -c-and-a.com -authorstream.com -newser.com -minube.com -yellowpages.com.au -torrentfreak.com -expatriates.com -51credit.com -rawstory.com -crictime.com -ladolcevitae.com -astro.com -riverisland.com -myzamana.com -xpg.com.br -svt.se -ymlp.com -coupondunia.in -mymovies.it -portaleducacao.com.br -watchabc.go.com -scrabblefinder.com -2hua.com -guiaconsumidor.com -jzpt.com -jino.ru -google.tt -addwallet.com -enom.com -searchfreemp3.com -spox.com -ename.net -researchnow.com -decathlon.fr -j-cast.com -updatetube.com -polo.com -asiaone.com -kkiste.to -frmtr.com -skai.gr -zovi.com -qiwi.ru -stfucollege.com -carros.com.br -privatejobshub.blogspot.in -englishtown.com -info.com -multiclickbrasil.com.br -gazeteoku.com -kinghost.com -izismile.com -gopro.com -uspto.gov -testberichte.de -fs.to -sketchtoy.com -sinarharian.com.my -stylemode.com -v7n.com -livenation.com -firstrow1.eu -joomlaforum.ru -sharecare.com -vetogate.com -series.ly -property24.com -payamsara.com -webstarts.com -renfe.es -fatcow.com -24ur.com -lide.cz -sabayacafe.com -prodavalnik.com -hyves.nl -almaany.com -xero.com -celluway.com -mapbar.com -vecernji.hr -konga.com -fresherslive.com -nova.cz -onlinefwd.com -petco.com -benisonapparel.com -jango.com -mangocity.com -gamefly.com -igma.tv -21cineplex.com -fblife.com -moe.gov.eg -heydouga.com -buildhr.com -mmo-champion.com -ithome.com -krakow.pl -history.com -privatehomeclips.com -bazos.cz -appchina.com -helpster.de -51hejia.com -fuckbadbitches.com -toyota-autocenter.com -alnaharegypt.com -eastbay.com -softonic.com.br -translit.ru -justcloud.com -validclick.net -seneweb.com -fsiblog.com -williamhill.it -twitchy.com -y4yy.com -gouv.qc.ca -nubiles.net -marvel.com -helpmefindyour.info -tripadvisor.ca -joomlart.com -m18.com -orgasmatrix.com -bidoo.com -rogers.com -informationng.com -voyage-prive.com -comingsoon.net -searchmetrics.com -jetztspielen.de -mathxl.com -telmex.com -purpleporno.com -coches.net -hamusoku.com -link-assistant.com -gosur.com -torrentcrazy.com -funny-games.biz -bseindia.com -promosite.ru -google.mn -cartoonnetworkarabic.com -icm.edu.pl -ttt4.com -pepperjamnetwork.com -lolzbook.com -nationalpost.com -tukif.com -club-asteria.com -7search.com -kasikornbank.com -ebay.ie -sexlunch.com -qype.com -sankakucomplex.com -flashback.org -streamhunter.eu -rsb.ru -royalporntube.com -diretta.it -yummly.com -dom2.ru -metoffice.gov.uk -goodbaby.com -pornbb.org -formspring.me -google.com.cy -purepeople.com -epnet.com -penny-arcade.com -onlinekhabar.com -vcommission.com -zimabdk.com -car.gr -wat.tv -nnn.ru -arvixe.com -buxp.org -shaw.ca -cnyes.com -casa.it -233.com -text.ru -800notes.com -banki.ru -marinetraffic.com -meteo.gr -thetrainline.com -blogspot.ch -netaffiliation.com -olx.co.id -slando.kz -nordea.se -xbabe.com -bibsonomy.org -moneynews.com -265g.com -horoscope.com -yammer.com -sextgem.com -tribune.com.pk -topeuro.biz -perfectgirls.xxx -ssc.nic.in -8264.com -flvrunner.com -gry.pl -pravda.ru -fulltiltpoker.com -kure.tv -turbo.az -ujian.cc -mustseeindia.com -thithtoolwin.com -chiphell.com -spieletipps.de -portail.free.fr -hbr.org -sex-hq.com -webdeveloper.com -cloudzer.net -vagas.com.br -anspress.com -beitaichufang.com -songkick.com -oyunlari.net -unfollowers.me -computrabajo.com.mx -usp.br -parseek.com -salary.com -navyfcu.org -bigpond.com -joann.com -ajansspor.com -burnews.com -myrecipes.com -mt5.com -webconfs.com -offcn.com -travian.com.tr -animenewsnetwork.com -smartshopping.com -twojapogoda.pl -tigerairways.com -archiveofourown.org -qq937.com -meneame.net -joyclub.de -yy.com -weddingwire.com -moddb.com -acervoamador.com -stgeorge.com.au -forumhouse.ru -mp3xd.com -lionair.co.id -needtoporn.com -playcast.ru -paheal.net -finishline.com -sep.gob.mx -comenity.net -tqn.com -eroticads.com -svpressa.ru -dtvideo.com -mobile.free.fr -privat24.ua -mp3sk.net -atlas.sk -aib.ie -shockwave.com -qatarairways.com -theladders.com -dsnetwb.com -expansiondirecto.com -povarenok.ru -moneysupermarket.com -getchu.com -gay.com -hsbc.com.mx -textsale.ru -kadinlarkulubu.com -scientificamerican.com -hillnews.com -tori.fi -6tie.com -championselect.net -gtobal.com -bangkokbank.com -akakce.com -smarter.com -totalvideoplugin.com -dmir.ru -rpp.com.pe -uhaul.com -kayako.com -buyvip.com -sixrevisions.com -army.mil -rediffmail.com -gsis.gr -destinia.com -behindwoods.com -wearehairy.com -coqnu.com -soundclick.com -drive.ru -cam4.fr -bakusai.com -thailandtorrent.com -videosz.com -eporner.com -stltoday.com -ilmessaggero.it -theregister.co.uk -bloggang.com -nastyvideotube.com -doityourself.com -rp-online.de -wow-impulse.ru -kar.nic.in -bershka.com -neteller.com -adevarul.ro -divxtotal.com -bolshoyvopros.ru -letudiant.fr -xinshipu.com -vh1.com -excite.com -somewhereinblog.net -mcgraw-hill.com -patheos.com -webdesignledger.com -plus28.com -adultwork.com -dajuegos.com -blogs.com -glopart.ru -donews.com -nation.co.ke -delfi.ee -lacuerda.net -jjshouse.com -megaindex.ru -darty.com -maturetube.com -jokeroo.com -estekhtam.com -fnac.es -ninjakiwi.com -tovima.gr -timinternet.it -citizensbankonline.com -builtwith.com -ko499.com -tastyblacks.com -currys.co.uk -jobui.com -notebookreview.com -meishij.net -filerio.in -cheapflights.co.uk -puls24.mk -rumbo.es -newsbusters.org -imgdino.com -oxforddictionaries.com -ftdownloads.com -ciudad.com.ar -latercera.cl -lankadeepa.lk -bankier.pl -hawahome.com -comicvine.com -cam4.it -fok.nl -iknowthatgirl.com -hizliresim.com -ebizmba.com -twistys.com -minkchan.com -dnevnik.hr -peliculascoco.com -new-xhamster.com -freelancer.in -globalgrind.com -talkgold.com -kanui.com.br -woxikon.de -jobstreet.com.my -job.ru -wowbiz.ro -yiyi.cc -sinoptik.ua -parents.com -forblabla.com -trojmiasto.pl -anyoption.com -wplocker.com -paytm.in -elespectador.com -mysitecost.ru -startribune.com -cam4.co.uk -bestcoolmobile.com -soup.io -starfall.com -ixl.com -oreilly.com -dansmovies.com -facemoods.com -google.ge -sat.gob.mx -weatherbug.com -majorgeeks.com -llbean.com -catho.com.br -googlegroups.com -animoto.com -alquds.co.uk -newsday.com -games2girls.com -youporngay.com -spaces.ru -seriespepito.com -gelbeseiten.de -thethirdmedia.com -watchfomny.com -freecamsexposed.com -dinakaran.com -xxxhost.me -smartprix.com -thoughtcatalog.com -soccersuck.com -vivanuncios.com -liba.com -gog.com -philstar.com -cian.ru -avclub.com -slon.ru -stc.com.sa -jstor.org -wehkamp.nl -vodafone.co.uk -deser.pl -adscendmedia.com -getcashforsurveys.com -glamsham.com -dressupgames.com -lifo.gr -37signals.com -pdfonline.com -flipkey.com -epochtimes.com -futhead.com -inlinkz.com -fx-trend.com -yasdl.com -techbang.com -narenji.ir -szonline.net -perfil.com.ar -mywebface.com -taknaz.ir -tradera.com -golem.de -its-mo.com -arabnet5.com -freerepublic.com -britannica.com -deccanchronicle.com -ohio.gov -busuu.com -pricecheck.co.za -paltalk.com -sportinglife.com -google.sn -meteomedia.com -push2check.net -ing-diba.de -immoweb.be -oregonlive.com -ge.tt -bbspink.com -business2community.com -viidii.com -hrloo.com -mglradio.com -cosme.net -xilu.com -scbeasy.com -biglots.com -dhakatimes24.com -spankbang.com -hitleap.com -proz.com -php100.com -tvtoday.de -funnie.st -velvet.hu -dhnet.be -capital.gr -inosmi.ru -healthkart.com -amway.com -madmimi.com -dramafever.com -oodle.com -spreadshirt.com -google.mg -utarget.ru -matomy.com -medhelp.org -cumlouder.com -aliorbank.pl -takepart.com -myfreshnet.com -adorama.com -dhs.gov -mivo.tv -nchsoftware.com -gnc.com -spiceworks.com -jeu.fr -terra.com -irishtimes.com -kleiderkreisel.de -ebay.be -rt.ru -radiofarda.com -atrapalo.com -southcn.com -turkcell.com.tr -themetapicture.com -aujourdhui.com -ato.gov.au -pelis24.com -saaid.net -bradsdeals.com -pirate101.com -saturn.de -thisissouthwales.co.uk -cyberlink.com -internationalredirects.com -radardedescontos.com.br -rapidcontentwizard.com -kabum.com.br -webrankinfo.com -kiabi.com -farecompare.com -xinjunshi.com -vidxden.com -pvrcinemas.com -chachaba.com -wanmei.com -alternet.org -rozklad-pkp.pl -omniture.com -childrensplace.com -menards.com -zhcw.com -ouest-france.fr -vitorrent.org -xanga.com -zbozi.cz -radioshack.com -startv.in -affiliatewindow.com -gov.on.ca -grainger.com -3rat.com -indeed.co.za -rtbf.be -strava.com -disneystore.com -travelagency.travel -ekitan.com -volagratis.com -yiiframework.com -dramacrazy.net -addtoany.com -uzmantv.com -uline.com -fitnessmagazine.com -khmerload.com -italiafilm.tv -baseball-reference.com -neopets.com -multiupload.nl -lakii.com -downloadmaster.ru -babbel.com -gossip-tv.gr -laban.vn -computerbase.de -juyouqu.com -markt.de -linuxquestions.org -giveawayoftheday.com -176.com -homemademoviez.com -huffingtonpost.fr -movieweb.com -pornzeus.com -posta.com.tr -biography.com -bukkit.org -spirit.com -vemale.com -elnuevodia.com -pof.com.br -iranproud.com -molodost.bz -netcarshow.com -ardmediathek.de -fabfurnish.com -myfreeblack.com -antichat.ru -crocko.com -b5m.com -entrance-exam.net -benaughty.com -sierratradingpost.com -apartmentguide.com -slimspots.com -sondakika.com -glamour.com -ilyke.net -mybroadband.co.za -alaskaair.com -virtualtourist.com -rexxx.com -fullhdfilmizle.org -starpulse.com -winkal.com -ad-feeds.net -irannaz.com -elahmad.com -dealspl.us -moikrug.ru -olx.com.mx -rd.com -newone.org -naijapals.com -forgifs.com -fsjgw.com -nicoviewer.net -topeleven.com -peerfly.com -softportal.com -clker.com -tehran98.com -weather2umbrella.com -lookbook.nu -futureshop.ca -blackpeoplemeet.com -adworkmedia.com -entire.xxx -bitbucket.org -transfermarkt.co.uk -moshimonsters.com -baimao.com -khanacademy.org -2chan.net -adopteunmec.com -mochimedia.com -strawberrynet.com -gdeivse.com -speckyboy.com -radical-foto.ru -softcoin.com -cnews.ru -ubs.com -lankasri.com -cylex.de -imtranslator.net -homeoffice.gov.uk -answerbag.com -chainreactioncycles.com -sportal.bg -livemaster.ru -mercadolibre.com.pe -mentalfloss.com -google.am -mawaly.com -douban.fm -abidjan.net -pricegong.com -brother.com -basspro.com -popsci.com -olx.com.ar -python.org -voetbalzone.nl -aztecaporno.com -d-h.st -voyeurweb.com -storenvy.com -aftabir.com -imgsrc.ru -peru.com -mindbodygreen.com -stereotude.com -ar15.com -gogecapital.com -xipin.me -gvt.com.br -today.it -mastercard.com.au -hobbyking.com -hawkhost.com -thebump.com -alpari.ru -gamma-ic.com -mundome.com -quotev.com -animaljam.com -ohozaa.com -sayyac.com -kobobooks.com -muslima.com -digsitesvalue.net -colourlovers.com -uludagsozluk.com -mercadolibre.com.uy -oem.com.mx -self.com -kyohk.net -dillards.com -eduu.com -replays.net -bnpparibasfortis.be -express.co.uk -guaixun.com -750g.com -craveonline.com -markafoni.com -ename.com -abercrombie.com -noticiaaldia.com -seniorpeoplemeet.com -dhingana.com -prokerala.com -iefimerida.gr -wprazzi.com -pantipmarket.com -vueling.com -newsonlineweekly.com -cr173.com -ecp888.com -diary.ru -pervclips.com -sudaneseonline.com -personal.com.ar -articlesnatch.com -mitbbs.com -techsupportalert.com -filepost.com -unblockyoutube.co.uk -hasznaltauto.hu -dmv.org -port.hu -anastasiadate.com -adtgs.com -namejet.com -ally.com -djmaza.com -asstr.org -corel.com -interfax.ru -rozee.pk -akinator.com -dominos.co.in -boardgamegeek.com -teamliquid.net -sbrf.ru -l99.com -eatingwell.com -mid-day.com -blinkogold.it -rosbalt.ru -islammemo.cc -bettycrocker.com -womenshealthmag.com -asandownload.com -twitcasting.tv -10and9.com -youngleafs.com -saharareporters.com -overclock.net -mapsgalaxy.com -internetslang.com -sokmil.com -yousendit.com -forex-mmcis.com -vador.com -pagewash.com -pringotrack.com -cpmstar.com -yxdown.com -surfingbird.ru -identi.li -n4hr.com -elitetorrent.net -livechatinc.com -anzhi.com -2checkout.com -bancoestado.cl -epson.com -twodollarclick.com -okaz.com.sa -china-sss.com -xforex.com -salliemae.com -acunn.com -navyfederal.org -forumactif.com -affaire.com -mediatemple.net -qdmm.com -urlm.co -toofab.com -yola.com -sheldonsfans.com -piratestreaming.com -frontier.com -businesswire.com -rue89.com -yenisafak.com.tr -wikimart.ru -xpressvids.info -medicalnewstoday.com -express.de -grid.mk -mass.gov -onlinefinder.net -yllix.com -aksam.com.tr -telegraf.rs -templatic.com -kandao.com -policymic.com -farfesh.com -alza.cz -judgeporn.com -townwork.net -3dcartstores.com -marketingland.com -okooo.com -siteduzero.com -cellbazaar.com -omb100.com -danarimedia.com -nlcafe.hu -qz.com -indiapost.gov.in -kinogo.net -neverblue.com -spyfu.com -shindanmaker.com -bankpasargad.com -internetautoguide.com -allover30.com -metric-conversions.org -carid.com -mofos.com -kanald.com.tr -mobikwik.com -checkpagerank.net -hotscripts.com -hornywife.com -prixmoinscher.com -worldbank.org -wsodownloads.info -his-j.com -powned.tv -redmondpie.com -molotok.ru -whatmobile.com.pk -wiziq.com -excelsior.com.mx -tradetang.com -terra.es -sdchina.com -rai.tv -indiansexstories.net -upbulk.com -surveygizmo.com -ulta.com -tera-europe.com -tuoitre.vn -onedio.com -favim.com -seo-fast.ru -twitterfeed.com -trustedreviews.com -ztgame.com -radiojavan.com -fun698.com -126.net -indiaglitz.com -jdouga.com -lofter.com -mysavings.com -snapfish.com -i-sux.com -cebbank.com -ethnos.gr -desktop2ch.tv -expedia.ca -kinja.com -rusfolder.com -expat-blog.com -8teenxxx.com -variety.com -natemat.pl -niazpardaz.com -gezginler.net -baur.de -tv2.no -realgm.com -zamzar.com -freecharge.in -ahlamontada.com -salespider.com -beanfun.com -cleveland.com -truecaller.com -walmart.ca -fanbox.com -designmodo.com -frip.com -sammobile.com -minnano-av.com -bri.co.id -creativebloq.com -anthropologie.com -afpbb.com -kingsera.ir -songspk.co -sexsearch.com -dailydot.com -hayah.cc -angolotesti.it -si.kz -allthingsd.com -paddypower.com -canadapost.ca -qq.cc -amctheatres.com -alltop.com -allkpop.com -nalog.ru -dynadot.com -copart.com -mexat.com -skelbiu.lt -kerala.gov.in -cathaypacific.com -clip2ni.com -tribune.com -acidcow.com -amkspor.com -shiksha.com -180upload.com -vietgiaitri.com -sportsauthority.com -banki.ir -vancouversun.com -hackforums.net -t-mobile.de -simplyrecipes.com -crazyhomesex.com -thehindubusinessline.com -kriesi.at -deyi.com -plimus.com -websyndic.com -express.com -dougasouko.com -mmstat.com -womai.com -alrajhibank.com.sa -ice-porn.com -benchmarkemail.com -ringcentral.com -erail.in -poptropica.com -search.ch -meteo.it -adriver.ru -ratp.fr -orgasm.com -pornme.com -gameinformer.com -woobox.com -advertising.com -flyflv.com -chinaren.com -tube2012.com -ikhwanonline.com -iwebtool.com -ucdavis.edu -boyfriendtv.com -rurubu.travel -kabam.com -talkingpointsmemo.com -detnews.com -sibnet.ru -camztube.net -madamenoire.com -evz.ro -staseraintv.com -che168.com -kidshealth.org -m24.ru -zenfolio.com -webtretho.com -postjung.com -supersport.com -cshtracker.com -jeuxjeuxjeux.fr -foxtv.es -postjoint.com -podnapisi.net -prav.tv -realmadrid.com -mbs-potsdam.de -tim.it -uplus.metroer.com -esquire.com -ooopic.com -castorama.fr -afamily.vn -findlaw.com -smartpassiveincome.com -sa.ae -hemnet.se -diytrade.com -weblancer.net -zapmeta.de -bizsugar.com -banesco.com -ideeli.com -lnx.lu -divxplanet.com -aircanada.com -uzise.com -sabay.com.kh -football365.com -crazydomains.com.au -qxox.org -thesmokinggun.com -w8n3.info -po.st -debian.org -flypgs.com -craigslist.co.in -islamway.net -debate.com.mx -bitdefender.com -listindiario.com -123telugu.com -ilbe.com -wordlinx.com -ebc.com.br -pr.gov.br -videoyoum7.com -ets.org -exteen.com -comicbookresources.com -grammarly.com -pdapi.com -adultflash01.com -orlandosentinel.com -24option.com -moviepilot.de -rfa.org -crateandbarrel.com -srv2trking.com -mercusuar.info -dofus.com -myfxbook.com -madmovs.com -myffi.biz -peru21.pe -bollywoodlife.com -gametracker.com -terra.com.mx -antenam.info -ihotelier.com -hypebeast.com -dramasonline.com -wordtracker.com -thefrisky.com -meritnation.com -irna.ir -trovit.com -cngold.org -optymalizacja.com -flexmls.com -softarchive.net -divxonline.info -malaysian-inc.com -dsw.com -fantastigames.com -mattcutts.com -ziprealty.com -saavn.com -ruporn.tv -e-estekhdam.com -novafile.com -tomsguide.fr -tomshardware.co.uk -crosswalk.com -businessdictionary.com -sharesix.com -travian.cl -indiastudychannel.com -m7shsh.com -hbogo.com -888casino.it -keywordspy.com -pureleverage.com -photodune.net -foreignpolicy.com -shiftdelete.net -living360.net -paixie.net -barstoolsports.com -aemet.es -local.ch -spermyporn.com -tasnimnews.com -imgserve.net -huawei.com -pik.ba -info-dvd.ru -2domains.ru -sextube.fm -searchrocket.info -dicio.com.br -ittefaq.com.bd -fileserve.com -genteflow.com -5giay.vn -elbadil.com -wizaz.pl -cyclingnews.com -southparkstudios.com -hangseng.com -mapsofworld.com -gaokao.com -antarvasna.com -televisa.com -dressupwho.com -goldprice.org -directlyrics.com -v2cigar.net -peopleclick.com -moudamepo.com -baijob.com -geni.com -huangye88.com -phun.org -kasikornbankgroup.com -angrymovs.com -bibliocommons.com -melateiran.com -gigya.com -17ok.com -xdowns.com -tportal.hr -dreamteammoney.com -prevention.com -terra.cl -blinklist.com -51seer.com -ruelsoft.com -kulichki.net -tatatele.in -mybloggertricks.com -ma-bimbo.com -ftchinese.com -sergey-mavrodi-mmm.net -wp.tv -chevrolet.com -razerzone.com -submanga.com -thomson.co.uk -syosetu.org -olx.com -vplay.ro -rtnn.net -55.la -instructure.com -lvse.com -hvg.hu -androidpolice.com -cookinglight.com -madadsmedia.com -inews.gr -ktxp.com -socialsecurity.gov -equifax.com -ceskatelevize.cz -gaaks.com -chillingeffects.org -komando.com -nowpublic.com -khanwars.ae -berlin.de -bleepingcomputer.com -military.com -zero10.net -onekingslane.com -beget.ru -get-tune.net -freewebs.com -pcfinancial.ca -sparknotes.com -tinychat.com -luxup.ru -geforce.com -tatts.com.au -alweeam.com.sa -123-reg.co.uk -sexyswingertube.com -groupon.es -guardianlv.com -hypovereinsbank.de -usc.edu -ard.de -hoovers.com -tdameritrade.com -userscripts.org -app111.com -al.com -op.fi -adbkm.com -pivithurutv.info -haber3.com -shatel.ir -camonster.com -weltbild.de -advanceautoparts.com -mplssaturn.com -weeklystandard.com -popscreen.com -freelifetimefuckbook.com -peixeurbano.com.br -2258.com -proxfree.com -zend.com -citehr.com -gadyd.com -tvspielfilm.de -skapiec.pl -9see.com -cndns.com -hurriyetemlak.com -census.gov -collider.com -cinaplay.com -aq.com -aolsearch.com -ce4arab.com -cbi.ir -cjol.com -brandporno.com -yicheshi.com -mydealz.de -xiachufang.com -sun-sentinel.com -flashkhor.com -join.me -hankyung.com -oneandone.co.uk -derwesten.de -gammae.com -webadultdating.biz -pokerstars.com -fucked-sex.com -antaranews.com -banorte.com -travian.it -msu.edu -ozbargain.com.au -77vcd.com -bestooxx.com -siemens.com -en-japan.com -akbank.com -srf.ch -meijer.com -htmldrive.net -peoplestylewatch.com -boards.ie -zhulong.com -svyaznoybank.ru -myfilestore.com -sucuri.net -redflagdeals.com -javascriptkit.com -edreams.fr -wral.com -togetter.com -dmi.dk -thinkdigit.com -barclaycard.co.uk -comm100.com -christianbook.com -popularmechanics.com -taste.com.au -tripadvisor.ru -colissimo.fr -gdposir.info -rarlab.com -dcnepalevent.com -sagepub.com -markosweb.com -france3.fr -mindbodyonline.com -yapo.cl -0-6.com -dilbert.com -searchqu.com -usa.gov -vatandownload.com -nastymovs.com -santanderrio.com.ar -notebookcheck.net -canalplus.fr -epa.gov -disp.cc -hotsales.net -interpals.net -vz.ru -flyertalk.com -pjmedia.com -solomid.net -megaplan.ru -hatenablog.com -getsatisfaction.com -hotline.ua -alternativeto.net -hipfile.com -247sports.com -phpnuke.org -indiaresults.com -prisjakt.nu -1tvlive.in -e-mai.net -trafficg.com -ojogo.pt -totaldomination.com -eroino.net -network-tools.com -unibytes.com -seriouseats.com -twicsy.com -smbc-card.com -toocle.com -unbounce.com -2tu.cc -computerworld.com -clicktrackprofit.com -serialu.net -realfarmacy.com -metrodeal.com -binzhi.com -smilebox.com -coderanch.com -uptodown.com -vbulletin.com -teasernet.com -admob.com -fingerhut.com -urlopener.com -vi.nl -expedia.de -thekrazycouponlady.com -linezing.com -metropcs.com -draugas.lt -minecraftdl.com -airberlin.com -eelly.com -siamsport.co.th -e-junkie.com -gulte.com -lazada.com.ph -cnwnews.com -tekstowo.pl -flavorwire.com -settrade.com -francetv.fr -experian.com -bravenet.com -mytoys.de -inkthemes.com -brobible.com -sarenza.com -curse.com -7sur7.be -iberia.com -trovit.es -eiga.com -getuploader.com -sevendollarptc.com -amadeus.com -thedailystar.net -gofuckbiz.com -codepen.io -virginia.gov -linguee.fr -space.com -astrology.com -whmcs.com -blogher.com -netpnb.com -mojo-themes.com -cam4.es -bestwestern.com -gencat.cat -healthcentral.com -ru-board.com -tjsp.jus.br -scene7.com -bukalapak.com -intporn.com -xe.gr -leprosorium.ru -dytt8.net -wpcentral.com -fasttrafficformula.com -hugefiles.net -you-sex-tube.com -naukrigulf.com -5173.com -comicvip.com -jossandmain.com -motherjones.com -planet.fr -thomascook.com -deseretnews.com -aawsat.com -huntington.com -desimartini.com -maloumaa.blogspot.com -rutgers.edu -gratisjuegos.org -carsforsale.com -filestore72.info -neowin.net -ilgiornale.it -download0098.com -providesupport.com -postini.com -sinowaypromo.com -watchop.com -docusign.net -sourcenext.com -finviz.com -babyoye.com -andhrajyothy.com -gamezer.com -baozoumanhua.com -niusnews.com -yabancidiziizle.net -fodors.com -moonsy.com -lidl.it -betanews.com -escapistmagazine.com -markethealth.com -clicksure.com -aircel.com -metacrawler.com -aeat.es -allafrica.com -watchseries-online.eu -adpost.com -adac.de -similarweb.com -offervault.com -uolhost.com.br -moviestarplanet.com -overclockers.ru -rocketlanguages.com -finya.de -shahvani.com -firmy.cz -incometaxindia.gov.in -ecostream.tv -pcwelt.de -arcadesafari.com -shoghlanty.com -videosection.com -centauro.com.br -eroanimedouga.net -orientaltrading.com -ogone.com -sexlog.com -hotair.com -egypt.gov.eg -thomasnet.com -virustotal.com -hayneedle.com -fatburningfurnace.com -lovedgames.com -23us.com -trafficcaptain.com -v2cigs.com -teknosa.com.tr -skrill.com -puritanas.com -selfgrowth.com -ikco.com -cuisineaz.com -causes.com -democraticunderground.com -placesexy.com -expedia.co.uk -www-com.co -topmongol.com -hikaritube.com -amakings.com -fxstreet.com -consultant.ru -sacbee.com -supercheats.com -sofunnylol.com -muzy.com -sparda.de -caughtoffside.com -chinawomendating.asia -xmeeting.com -google.al -sovereignbank.com +24h.com.vn +academia.edu +academic.ru +accuweather.com +adobe.com +adp.com +agoda.com +aif.ru +airbnb.com +alibaba.com +aliexpress.com +allegro.pl +allocine.fr +alodokter.com +amazon.ca +amazon.co.jp +amazon.co.uk +amazon.com +amazon.com.mx +amazon.de +amazon.es +amazon.fr +amazon.in +amazon.it +ameblo.jp +americanexpress.com +ancestry.com animeflv.net -sky.de -huatu.com -payscale.com -quotidiano.net -pol.ir -digital-photography-school.com -screencrush.com -netgear.com -thebiglistofporn.com -similarsitesearch.com -peb.pl -lanrentuku.com -ksu.edu.sa -tradetracker.com -avito.ma -projectfree.tv -cmu.edu -imore.com -tickld.com -fitday.com -dulcebank.com -careerdonkey.com -pf.pl -otzovik.com -baltimoresun.com -jobvite.com -ratemyprofessors.com -bancodevenezuela.com -linkafarin.com -ufxmarkets.com -lavozdegalicia.es -99bill.com -punyu.com -otodom.pl -entireweb.com -fastshop.com.br -imgnip.com -goodlife.com -caringbridge.org -pistonheads.com -gun.az -1and1.es -photofunia.com -nme.com -carfax.com -gutenberg.org -youxixiazai.org -webmastersitesi.com -skynet.be -afrointroductions.com -mp3slash.net -netzwelt.de -ecrater.com -livemint.com -worldwinner.com -echosign.com -cromaretail.com -freewebcamporntube.com -admin.ch -allstate.com -photoscape.org -cv-library.co.uk -voici.fr -wdr.de -pbase.com -mycenturylink.com -sonicomusica.com -schema.org -smashwords.com -al3ab.net -muryouav.net -mocospace.com -fundsxpress.com -chrisc.com -poemhunter.com -cupid.com -timescity.com -banglamail24.com -motika.com.mk -sec.gov -whatculture.com -namepros.com -vsemayki.ru -hip2save.com -hotnews.ro -vietbao.vn -inazumanews2.com -irokotv.com -appthemes.com -tirerack.com -maxpark.com -successfactors.com -sba.gov -hk-porno.com -setlinks.ru -travel24.com -qatarliving.com -hotlog.ru -rapmls.com -qualityhealth.com -linkcollider.com -kashtanka.com -hightail.com -appszoom.com -armagedomfilmes.biz -pnu.ac.ir -globalbux.net -ebay.com.hk -ladenzeile.de -thedomainfo.com -naosalvo.com.br -perfectcamgirls.com -verticalresponse.com -khabardehi.com -oszone.net -teamtreehouse.com -humanservices.gov.au -bostonherald.com -kafeteria.pl -society6.com -gamevicio.com -crazyegg.com -logitravel.com -williams-sonoma.com -htmlgoodies.com -fontanka.ru -islamuon.com -tcs.com -elyrics.net -vip-prom.net -jobstreet.com.ph -designfloat.com -lavasoft.com -tianjinwe.com -telelistas.net -taglol.com -jacquieetmicheltv.net -esprit-online-shop.com -theeroticreview.com -boo-box.com -wandoujia.com -vgsgaming.com -yourtango.com -tianji.com -jpost.com -mythemeshop.com -seattlepi.com -bultannews.com -youlikehits.com -partycity.com -18qt.com -yuvutu.com -gq.com -wiziwig.tv -cinejosh.com -technet.com -vatanbilgisayar.com -guangjiela.com -siteheart.com -in.gov -nulled.cc -mafiashare.net -tizag.com -hkjc.com -restaurant.com -consumersurveygroup.org -spin.de -silverlinetrips.com -triberr.com -gamesgirl.net -qqt38.com -xiaoshuomm.com -theopen.com -campograndenews.com.br -soonnight.com -safaribooksonline.com -main-hosting.com -caclubindia.com -alibado.com -autorambler.ru -tnt.com -chatango.com -satrk.com -pagesperso-orange.fr -houseoffraser.co.uk -nullrefer.com -work.ua -inagist.com -kaban.tv -cnxad.com -tarad.com -masteetv.com -noblesamurai.com -lifehacker.ru -anakbnet.com -google.co.ug -webcamsex.nl -kaoyan.com -ml.com -up.nic.in -bounceme.net -netfirms.com -idokep.hu -wambie.com -funpatogh.com -bcash.com.br -sedo.co.uk -noupe.com -mydirtyhobby.com -neswangy.net -downloadprovider.me -utah.gov -consumerintelligenceusa.com -itimes.com -picroma.com -lustagenten.com -kemdiknas.go.id -sitepronews.com -ruseller.com -tradecarview.com -favstar.fm -bestbuy.ca -yelp.ca -stop-sex.com -rewity.com -qiqigames.com -suntimes.com -hardware.fr -rxlist.com -bgr.com -zalora.co.id -mandatory.com -collarme.com -mycommerce.com -holidayiq.com -filecloud.io -vconnect.com -66163.com -tlen.pl -mmbang.com -7c.com -digitalriver.com -24video.net -worthofweb.com -clasicooo.com -greatschools.net -tagesanzeiger.ch -video.az -osu.edu -careers360.com -101.ru -conforama.fr -apollo.lv -netcq.net -jofogas.hu -niftylink.com -midwayusa.com -collegeteensex.net -search.com -naftemporiki.gr -sainsburys.co.uk -fitsugar.com -ifixit.com -uid.me -malwarebytes.org -maxbounty.com -mensfitness.com -rtl.be -yidio.com -dostorasly.com -abovetopsecret.com -sm3na.com -cam.ac.uk -gamegape.com -ocioso.com.br -register.com -wwitv.com -ishangman.com -gry-online.pl -ogli.org -redbull.com -dyn.com -freeservers.com -brandsoftheworld.com -lorddownload.com -mybet.com -brothalove.com -inchallah.com -lottomatica.it -indiamp3.com -qianbao666.com -zurb.com -synxis.com -baskino.com -swefilmer.com -hotstartsearch.com -cloudmoney.info -polldaddy.com -moheet.com -idhostinger.com -mp3chief.com -tao123.com -channelnewsasia.com -galeon.com -aviasales.ru -datafilehost.com -travian.com.eg -ebookee.org -filmstarts.de -inccel.com -chatroulette.com -it-ebooks.info -nix.ru -antena3.ro -mylifetime.com -desitorrents.com -mydigitallife.info -aeropostale.com -anilos.com -macadogru.com -premiere.fr -estorebuilder.com -eventim.de -expert-offers.com -deloitte.com -thetimenow.com -spicybigbutt.com -gistmania.com -pekao24.pl -linkfeed.ru -carnival.com -apherald.com -choicehotels.com -revolvermaps.com -digu.com -yekmobile.com -barbarianmovies.com -poyopara.com -vse.kz -socialspark.com -deutschepost.de -nokaut.pl -farpost.ru -shoebuy.com -1c-bitrix.ru -pimproll.com -startxchange.com -seocentro.com -kporno.com -izvestia.ru -bathandbodyworks.com -allhyipmonitors.com -europe1.fr -charter.com -sixflags.com -abcjuegos.net -wind.it -femjoy.com -humanmetrics.com -myrealgames.com -cosmiq.de -bangbrosteenporn.com -thepetitionsite.com -laprensa.com.ni -investors.com -techpowerup.com -prosperityteam.com -autogidas.lt -state.ny.us -techbargains.com -takvim.com.tr -kko-appli.com -liex.ru -cafe24.com -definebabe.com -egirlgames.net -avangard.ru -sina.com.hk -freexcafe.com -vesti.bg -francetvinfo.fr -mathsisfun.com -easymobilerecharge.com -dapink.com -propellerads.com -devshed.com -clip.vn -vidivodo.com -blogspot.dk -foxnewsinsider.com -instapaper.com -premierleague.com -elo7.com.br -teenee.com -clien.net -computrabajo.com.co -komputronik.pl -livesurf.ru -123cha.com -cgg.gov.in -leadimpact.com -socialmonkee.com -speeddate.com -bet-at-home.com -huanqiuauto.com -tadawul.com.sa -ucsd.edu -fda.gov -cint.com -homedepot.ca -ciao.de -gigglesglore.com -warframe.com -prosieben.de -vistaprint.in -mapple.net -usafis.org -truelife.com -1o26.com -boldsky.com -freeforums.org -lolnexus.com -ti-da.net -handelsbanken.se -khamsat.com -futbol24.com -wikifeet.com -dev-point.com -ibotoolbox.com -indeed.de -ct10000.com -appleinsider.com -lyoness.net -vodafone.com.eg -aifang.com -tripadvisor.com.br -hbo.com -pricerunner.com -4everproxy.com -fc-perspolis.com -themobileindian.com -gimp.org -novayagazeta.ru -dnfight.com -coco.fr -thestudentroom.co.uk -tiin.vn -dailystar.co.uk -unfollowed.me -aljazeerasport.net -nasygnale.pl -somethingawful.com -scamadviser.com -mcanime.net -9stock.com -boostmobile.com -oyunkolu.com -beliefnet.com -lyrics007.com -rtv.net -hasbro.com -vcp.ir -fj-p.com -jetbrains.com -cpalead.com -zetaboards.com -sbobet.com -v2ex.com -toggle.com -lanebryant.com -girlgames4u.com -amadershomoy1.com -planalto.gov.br -news-choice.net -sarkarinaukriblog.com -sudouest.fr -zdomo.com -egy-nn.com -pizzaplot.com -topgear.com -sony.co.in -nosv.org -beppegrillo.it -sakshieducation.com -temagay.com -stepashka.com -tmart.com -readwrite.com -tudiscoverykids.com -belfius.be -submitexpress.com -autoscout24.ch -aetna.com -torrent-anime.com -superhqporn.com -kaufda.de -adorocinema.com -burning-seri.es -rlsbb.com -housing.co.in -invisionfree.com -istruzione.it -desk.com -lyricsmint.com -taohuopu.com -silverdaddies.com -gov.cl -vtc.vn -tanea.gr -labirint.ru -sns104.com -bigpicture.ru -marketo.com -ismmagic.com -c-sharpcorner.com -synacor.com -answered-questions.com -prlog.ru -vodafone.com.tr -thenews.com.pk -galaxygiftcard.com -job-search-engine.com -se.pl -consumercomplaints.in -265.com -cba.pl -humoron.com -uscourts.gov -blog.pl -youtu.be -play4free.com -blizko.ru -uswebproxy.com -winning-play.com -yourstory.in -tinmoi.vn -yongchuntang.net -artofmanliness.com -nadaguides.com -ndr.de -kuidle.com -hopy.com -roi.ru -sdpnoticias.com -nation.com -gnu.org -vogue.co.uk -letsebuy.com -preloved.co.uk -yatedo.com -rs-online.com -kino-teatr.ru -meeticaffinity.fr -clip.dj -compete.com -pravda.sk -oursogo.com -designyourway.net -elcorreo.com -williamhill.es -lavenir.net -voyage-prive.es -teambeachbody.com -sportdog.gr -klicktel.de -ktonanovenkogo.ru -sbwire.com -pearsoncmg.com -bankifsccode.com -thenationonlineng.net -bangbros1.com -tarot.com -acdsee.com -blogos.com -dinnerwithmariah.com -japan-women-dating.com -sarzamindownload.com -timesonline.co.uk -okbuy.com -sbb.ch -mundogaturro.com -meinvz.net -trafficadbar.com -9minecraft.net -nextbigwhat.com -eshetab.com -meristation.com -kalahari.com -pimpandhost.com -pbworks.com -bokee.net -google.ps -seccionamarilla.com.mx -foroactivo.com -kalaydo.de -gomaji.com -exactseek.com -cashtaller.ru -blogspot.co.nz -volvocars.com -marathonbet.com -hk-pub.com -seriouslyfacts.me -streetdirectory.com -mediamasr.tv -straitstimes.com -promodj.com -3dwwwgame.com -autovit.ro -ahlalhdeeth.com -forum-auto.com -stooorage.com -mobilism.org -hideref.org -mn66.com -internations.org -sbicard.com -dayoo.com -biquge.com -theme.wordpress.com -mrdoob.com -vpls.net -alquma-a.com -bankmillennium.pl -mitele.es -tro-ma-ktiko.blogspot.gr -bookmark4you.com -tencent.com -bsi.ir -fox.com -payback.de -tubepornfilm.com -herold.at -elperiodico.com -lolesports.com -hrs.de -trustlink.ru -pricemachine.com -socialadr.com -anandabazar.com -jacquieetmicheltv2.net -monster.de -allposters.com -blog.ir -ad4game.com -alkislarlayasiyorum.com -ptcsolution.com -moviepilot.com -ddizi.org -dmzj.com -onvasortir.com -ferronetwork.com -seagate.com -starmedia.com -topit.me -developpez.net -papajogos.com.br -btalah.com -gateway.gov.uk -fotki.com -holidaylettings.co.uk -rzeczpospolita.pl -charter97.org -robtex.com -bestadbid.com -unblog.fr -archive.is -microworkers.com -vbulletin.org -jetswap.com -badoink.com -adobeconnect.com -cutt.us -lovemake.biz -xpress.com -di.se -jacquielawson.com -sat1.de -adshuffle.com -homepage.com.tr -treehugger.com -selectornews.com -dap-news.com -tvline.com -co188.com -bfmtv.com -nastygal.com -cebupacificair.com -spr.ru -vazeh.com -worldmarket.com -americanlivewire.com -befunky.com -movie2k.tl -coach.com -whattoexpect.com -share-online.biz -fishwrapper.com -aktifhaber.com -downxsoft.com -websurf.ru -bbcgoodfood.com -france2.fr -gyakorikerdesek.hu -lidovky.cz -thithtoolwin.info -psbc.com -766.com -co-operativebank.co.uk -iwriter.com -bravotv.com -sbs.com.au -dtiserv2.com -watchever.de -playhub.com -globovision.com -intereconomia.com -poznan.pl -comicbookmovie.com -ocomico.net -housetrip.com -freewebsubmission.com -karmaloop.com -savevid.com -lastpass.com -yougou.com -iafd.com -casertex.com -gmail.com -modhoster.de -post-gazette.com -digikey.com -torrentleech.org -stamps.com -lifestyleinsights.org -pandawill.com -wm-panel.com -um-per.com -straighttalk.com -xpersonals.com -bondfaro.com.br -tvrage.com -rockongags.com -4jok.com -zoom.com.br -pixabay.com -path.com -hiphopdx.com -ptbus.com -fussball.de -windows.net -adweek.com -kraftrecipes.com -redtram.com -youravon.com -ladepeche.fr -jiwu.com -hobbylobby.com -otzyv.ru -sky-fire.com -fileguru.com -vandal.net -haozu.com -laxteams.net -cpvtrack202.com -libraryreserve.com -tvigle.ru -hoopshype.com -worldcat.org -eventful.com -nettiauto.com -generalfiles.org -ojooo.com -thatisnotasport.com -thepioneerwoman.com -social-bookmarking.net -lookforithere.info -americanapparel.net -protv.ro -jeux-gratuits.com -tomoson.com -jpn.org -cpz.to -vrisko.gr -cbox.ws -vandelaydesign.com -macmillandictionary.com -eventure.com -niniweblog.com -ecwid.com -garuda-indonesia.com -education.com -natalie.mu -gigsandfestivals.co.uk -onlainfilm.ucoz.ua -hotwords.com -jagobd.com -pageset.com -sagepay.com -runkeeper.com -beeztube.com -pinla.com -blizzard.com -unc.edu -makememarvellous.com -wer-weiss-was.de -ubc.ca -utoronto.ca -avsforum.com -newrelic.com -orkut.co.in -wawa-mania.ec -ncsu.edu -redhat.com -nsdl.co.in -lavoz.com.ar -navy.mil -mg.gov.br -psychcentral.com -ultipro.com -unisa.ac.za -sooperarticles.com -wondershare.com -wholefoodsmarket.com -dumpaday.com -littlewoods.com -carscom.net -meitu.com -9lwan.com -emailmeform.com -arte.tv -tribalfootball.com -howtoforge.com -cvent.com -fujitsu.com -silvergames.com -fatlossfactor.com -nusport.nl -todo1.com -see-tube.com -lolspots.com -sucksex.com -encontreinarede.com -myarabylinks.com -v-39.net -soompi.com -mltdb.com -websitetonight.com -bu.edu -lazada.co.th -mature-money.com -simplemachines.org -tnt-online.ru -disput.az -flirtcafe.de -d1net.com -infoplease.com -unseenimages.co.in -downloadatoz.com -norwegian.com -youtradefx.com -petapixel.com -bytes.com -ht.ly -jobberman.com -xenforo.com -pomponik.pl -siambit.org -twoplustwo.com -videoslasher.com -onvista.de -canstockphoto.com -cash4flirt.com -flashgames.it -xxxdessert.com -cda.pl -costco.ca -elnuevodiario.com.ni -svtplay.se -ftc.gov -supersonicads.com -openstreetmap.org -chinamobile.com -fastspring.com -mcdonalds.com -egloos.com -mouser.com -livemook.com -woxiu.com -pingler.com -ruelsoft.org -krone.at -internetbookshop.it -alibaba-inc.com -kimsufi.com -summitracing.com -parsfootball.com -standard.co.uk -photoblog.pl -bicaps.com -digitalplayground.com -zerochan.net -whosay.com -qualityseek.org -say7.info -rs.gov.br -google.co.mz -yourlustmovies.com -zalando.nl -jn.pt -homebase.co.uk -avis.com -healthboards.com -filmizlesene.com.tr -shoutcast.com -indiafreestuff.in -avval.ir -gamingwonderland.com -adage.com -asu.edu -froma.com -bezuzyteczna.pl -workopolis.com -extranetinvestment.com -lablue.de -geotauaisay.com -bestchange.ru -ptp22.com -tehparadox.com -ox.ac.uk -radaris.com -domdigger.com -lizads.com -chatvl.com -elle.com -soloaqui.es -tubejuggs.com -jsonline.com -ut.ac.ir -iitv.info -runetki.tv -hyundai.com -turkiye.gov.tr -jobstreet.com.sg -jp-sex.com -soccer.ru -slashfilm.com -couchtuner.eu -quanfan.com -porsche.com -craftsy.com -geizhals.at -spartoo.it -yxku.com -vodonet.net -photo.net -raiffeisen.ru -tablotala.com -theaa.com -idownloadblog.com -rodfile.com -alabout.com -f1news.ru -divxstage.eu -itusozluk.com -hicdma.com -dota2lounge.com -greensmut.com -bharatiyamobile.com -handycafe.com -regarder-film-gratuit.com -adultgeek.net -yintai.com -brasilescola.com -verisign.com -dnslink.com -standaard.be -cbengine.com -pchealthboost.com -dealdey.com -cnnturk.com -trutv.com -tahrirnews.com -getit.in -jquerymobile.com -girlgames.com -alhayat.com -ilpvideo.com -stihi.ru -skyscanner.ru -jamejamonline.ir -t3n.de -rent.com -telerik.com -tandfonline.com -argonas.com -ludokado.com -luvgag.com -myspongebob.ru -z5x.net -allhyipmon.ru -fanswong.com -oddee.com -guoli.com -wpzoom.com -2gheroon.com -artisteer.com -share-links.biz -flightstats.com -wisegeek.org -shuangtv.net -mylikes.com -0zz0.com -xiu.com -pornizle69.com -sendgrid.com -theweek.com -veetle.com -theanimalrescuesite.com -sears.ca -tianpin.com -thisdaylive.com -myfunlife.com -furaffinity.net -politiken.dk -youwatch.org -lesoir.be -toyokeizai.net -centos.org -sunnyplayer.com -knuddels.de -mturk.com -egymodern.com -semprot.com -monsterhigh.com -kompass.com -olx.com.ve -hq-xnxx.com -whorush.com -bongdaso.com -centrelink.gov.au -folha.com.br -getjetso.com -ycombinator.com -chouti.com -33lc.com -hostgator.com.br -emirates247.com -itpub.net -fsymbols.com -bestproducttesters.com -daodao.com -virtuemart.net -hindilinks4u.net -nnm.me -xplocial.com -apartments.com -ekolay.net -doviz.com -flixya.com -3almthqafa.com -zamalekfans.com -imeigu.com -wikibit.net -windstream.net -matichon.co.th -appshopper.com -socialbakers.com -1popov.ru -blikk.hu -bdr130.net -arizona.edu -madhyamam.com -mweb.co.za -affiliates.de -ebs.in -bestgfx.com -share-games.com -informador.com.mx -jobsite.co.uk -carters.com -kinghost.net -us1.com -archives.com -forosdelweb.com -siteslike.com -thedailyshow.com -68design.net -imtalk.org -visualwebsiteoptimizer.com -glarysoft.com -xhby.net -email.cz -amateurs-gone-wild.com -davidwalsh.name -finalfantasyxiv.com -aa.com.tr -legalzoom.com -lifehack.org -mca.gov.in -hidrvids.com -key.com -thumbtack.com -nujij.nl -cinetux.org -hmetro.com.my -ignou.ac.in -affilorama.com -pokemon.com -sportsnewsinternational.com -geek.com -larepublica.pe -europacasino.com -ok-porn.com -tutorialzine.com -google.com.bn -site5.com -trafficjunky.net -xueqiu.com -yournewscorner.com -metrotvnews.com -nichegalz.com -job.com -koimoi.com -questionablecontent.net -volaris.mx -rakuten.de -cyworld.com -yudu.com -zakon.kz -msi.com -darkxxxtube.com -samakal.net -appstorm.net -vulture.com -racingpost.com -classicrummy.com -iegallery.com -cinemagia.ro -nullpoantenna.com -ihned.cz -vdolady.com -babes.com -komli.com -asianbeauties.com -onedate.com -adhitz.com -jjgirls.com -dot.tk -autobild.de -jobs-to-careers.com -movietickets.com -net4.in -crutchfield.com -subdivx.com -sirarcade.com -sitescoutadserver.com -fantasy-rivals.com -chegg.com -sportsmansguide.com -extremetech.com -loft.com -dirtyamateurtube.com -socialsex.biz -opensubtitles.us -infomoney.com.br -openstat.ru -adlandpro.com -trivago.de -feiren.com -lespac.com -iceporn.com -animehere.com -klix.ba -elitepvpers.com -mrconservative.com -tamu.edu -startv.com.tr -haber1903.com -apa.tv -idbi.com -golfchannel.com -pep.ph -toukoucity.to -empiremoney.com -androidauthority.com -ref4bux.com -digitaljournal.com -sporcle.com -bzwbk.pl -lalamao.com -ziare.com -cliti.com -thatguywiththeglasses.com -vodu.ch -ycwb.com -bls.gov -1tubenews.com -cl.ly -ing.be -bitterstrawberry.com -fubar.com -arabic-keyboard.org -mejortorrent.com -trendmicro.com -ap7am.com -windowsazure.com -q8yat.com -yyv.co -tvoy-start.com -creativetoolbars.com -forrent.com -mlstatic.com -like4like.org -alpha.gr -amkey.net -iwiw.hu -routard.com -teacherspayteachers.com -ahashare.com -ultoo.com -oakley.com -upforit.com -trafficbee.com -monster.co.uk -boulanger.fr -bloglines.com -wdc.com -el-nacional.com -bloggertipstricks.com -oreillyauto.com -hotpads.com -tubexvideo.com -mudainodocument.com -discoverpedia.info -noobteens.com -shockmansion.com -qudsonline.ir -mec.es -vt.edu -akelite.com -travelandleisure.com -sunnewsonline.com -tok2.com -truste.org -2dehands.be -hf365.com -westelm.com -real.gr -downloadming.me -citromail.hu -fotocommunity.de -zapjuegos.com -aastocks.com -unb.br -adchakra.net -check24.de -vidto.me -peekyou.com -urssaf.fr -alixixi.com -winamp.com -xianguo.com -indiasextube.net -fitnea.com -telemundo.com -webnode.cz -kliksaya.com -wikileaks.org -myblog.it -99wed.com -adorika.com -siliconrus.com -dealmoon.com -ricanadfunds.com -vietcombank.com.vn -chemistry.com -reisen.de -torlock.com -wsop.com -travian.co.id -ipoll.com -bpiexpressonline.com -neeu.com -beyondtherack.com -blueidea.com -tedata.net -gamesradar.com -big.az -h-douga.net -runnersworld.com -lumfile.com -u17.com -badjojo.com -nginx.org -filmfanatic.com -filmey.com -mousebreaker.com -mihanstore.net -sharebuilder.com -cnhan.com -partnerwithtom.com -synonym.com -areaconnect.com -one.lt -mp3quran.net -anz.co.nz -buyincoins.com -surfline.com -packtpub.com -informe21.com -d4000.com -blog.cz -myredbook.com -seslisozluk.net -simple2advertise.com -bookit.com -eranico.com -pakwheels.com -x-rates.com -ilmatieteenlaitos.fi -vozforums.com -galerieslafayette.com -trafficswirl.com -mql4.com -torontosun.com -lebuteur.com -cruisecritic.com -rateyourmusic.com -binsearch.info -nrj.fr -megaflix.net -dosug.cz -stop55.com -qqnz.com -ibuonline.com -jobego.com -euro.com.pl -quran.com -ad1.ru -avaz.ba -eloqua.com -educationconnection.com -dbank.com -whois.sc -youmob.com -101greatgoals.com -livefyre.com -sextubebox.com -shooshtime.com -tapuz.co.il -auchan.fr -pinkvilla.com -perspolisnews.com -scholastic.com -google.mu -forex4you.org -mandtbank.com -gnezdo.ru -lulu.com -anniezhang.com -bharian.com.my -comprafacil.com.br -mmafighting.com -autotrader.ca -vectorstock.com -convio.com -ktunnel.com -hbs.edu -mindspark.com -trovit.com.mx -thomsonreuters.com -yupptv.com -fullsail.edu -perfectworld.eu -ju51.com -newssnip.com -livemocha.com -nespresso.com -uinvest.com.ua -yazete.com -malaysiaairlines.com -clikseguro.com -marksdailyapple.com -topnewsquick.com -ikyu.com -mydocomo.com -tampabay.com -mo.gov -oxfordjournals.org -manageyourloans.com -couponcabin.com -mrmlsmatrix.com -knowd.com -ladbrokes.com -ikoo.com -devhub.com -dropjack.com -sadistic.pl -8comic.com -optimizepress.com -ofweek.com -donya-e-eqtesad.com -arabam.com -playtv.fr -yourtv.com.au -teamtalk.com -createsend.com -bitcointalk.org -microcenter.com -arcadeprehacks.com -sublimetext.com -posindonesia.co.id -paymaster.ru -ncore.cc -wikisource.org -notebooksbilliger.de -nayakhabar.com -tim.com.br -leggo.it -swoodoo.com -perfectgirls.es -beautystyleliving.com -xmaduras.com -e-shop.gr -belastingdienst.nl -urbia.de -lovoo.net -citizensbank.com -gulesider.no -zhongsou.net -cinemablend.com -joydownload.com -telkom.co.id -nangaspace.com -panerabread.com -cinechest.com -flixjunky.com -berlin1.de -tabonito.pt -snob.ru -audiovkontakte.ru -linuxmint.com -freshdesk.com -professionali.ru -primelocation.com -femina.hu -jecontacte.com -celebritytoob.com -streamiz-filmze.com -l-tike.com -collegeconfidential.com -hafiz.gov.sa -mega-porno.ru -ivoox.com -lmgtfy.com -pclab.pl -preisvergleich.de -weeb.tv -tnews.ir -wwtdd.com -totalfilm.com -girlfriendvideos.com -wgt.com -iu.edu -topictorch.com -wenweipo.com -duitang.com -madrid.org -retrogamer.com -pantheranetwork.com -someecards.com -visafone.com.ng -infopraca.pl -nrelate.com -sia.az -wallbase.cc -shareflare.net -sammydress.com -goldesel.to -thefiscaltimes.com -freelogoservices.com -dealigg.com -babypips.com -diynetwork.com -porn99.net -skynewsarabia.com -eweb4.com -fedoraproject.org -nolo.com -megabus.com -fao.org -am.ru -sportowefakty.pl -kidstaff.com.ua -jhu.edu -which.co.uk -sextubehd.xxx -swansonvitamins.com -iran-eng.com -fakenamegenerator.com -gosong.net -24open.ru -123sdfsdfsdfsd.ru -gotgayporn.com -casadellibro.com -ixwebhosting.com -buyorbury.com -getglue.com -864321.com -alivv.com -competitor.com -iheima.com -submarinoviagens.com.br -emailsrvr.com -udacity.com -mcafeesecure.com -laposte.fr -ppy.sh -rumah.com -pullbear.com -pkt.pl -jayde.com -myjoyonline.com -locopengu.com -vsnl.net.in -hornbunny.com -royalcaribbean.com -football.ua -thaifriendly.com -bankofthewest.com -indianprice.com -chodientu.vn -alison.com -eveonline.com -blogg.se -jetairways.com -larousse.fr -noticierodigital.com -mkfst.com -anyfiledownloader.com -tiramillas.net -telus.com -paperblog.com -songsterr.com -entremujeres.com -startsiden.no -hotspotshield.com -hosteurope.de -ebags.com -eenadupratibha.net -uppit.com -piaohua.com -xxxymovies.com -netbarg.com -chip.com.tr -xl.co.id -kowalskypage.com -afterdawn.com -locanto.com -liilas.com -superboy.com -indiavisiontv.com -ixquick.com -hotelium.com -twsela.com -newsmeback.com -perfectliving.com -laughingsquid.com -designboom.com -zigil.ir -coachfactory.com -kaboodle.com -fastmail.fm -threadless.com -wiseconvert.com -br.de -promovacances.com -wrzuta.pl -fromdoctopdf.com -ono.es -zinio.com -netcoc.com -eanswers.com -wallst.com -ipiccy.com -fastweb.it -kaufmich.com -groupon.co.za -cyzo.com -addic7ed.com -alintibaha.net -indiewire.com -needforspeed.com -e24.no -hupso.com -kathimerini.gr -worldoffiles.net -express.pk -wieszjak.pl -mobile.bg -subway.com -akhbarelyom.com -thisoldhouse.com -autoevolution.com -public-api.wordpress.com -airarabia.com -powerball.com -visa.com -gendai.net -gymboree.com -tvp.pl -sinhayasocialreader.com -a963.com -gamgos.ae -fx678.com -mp3round.com -komonews.com -contactcars.com -pdftoword.com -songtaste.com -squareup.com -newsevent24.com -livestation.com -oldertube.com -rtl.fr -gather.com -liderendeportes.com -thewrap.com -viber.com -reklama5.mk -fonts.com -hrsaccount.com -bizcommunity.com -favicon.cc -totalping.com -live365.com -tlife.gr -imasters.com.br -n11.com -iam.ma -qq5.com -tvboxnow.com -limetorrents.com -bancopopular.es -ray-ban.com -drweb.com -hushmail.com -resuelvetudeuda.com -sharpnews.ru -hellocoton.fr -buysub.com -homemoviestube.com -utsandiego.com -learn4good.com -girlsgogames.ru -talksport.co.uk -fap.to -teennick.com -seitwert.de -celebritymoviearchive.com -sukar.com -astromeridian.ru -zen-cart.com -1phads.com -plaisio.gr -cplusplus.com -ewebse.com -6eat.com -payless.com -subaonet.com -dlisted.com -kia.com -lankahotnews.net -vg247.com -formstack.com -jobs.net -coolchaser.com -blackplanet.com -unionbank.com -record.com.mx -121ware.com -inkfrog.com -cnstock.com -marineaquariumfree.com -encuentra24.com -mixturecloud.com -yninfo.com -lesnumeriques.com -autopartswarehouse.com -lijit.com -ti.com -umd.edu -zdnet.co.uk -begin-download.com -showsiteinfo.us -uchicago.edu -whatsmyserp.com -asos.fr -ibosocial.com -amorenlinea.com -videopremium.tv -trkjmp.com -creativecow.net -webartex.ru -olx.com.ng -overclockzone.com -rongbay.com -maximustube.com -priberam.pt -comsenz.com -prensaescrita.com -gameslist.com -lingualeo.com -epfoservices.in -webbirga.net -pb.com -fineco.it -highrisehq.com -hotgoo.com -netdoctor.co.uk -domain.com -aramex.com -google.co.uz -savings.com -airtelbroadband.in -postimees.ee -wallsave.com -df.gob.mx -flashgames247.com -libsyn.com -goobike.com -trivago.com -android-hilfe.de -anquan.org -dota2.com -vladtv.com -oovoo.com -mybrowsercash.com -stafaband.info -vsao.vn -smithsonianmag.com -feedblitz.com -kibeloco.com.br -burningcamel.com -northwestern.edu -tucows.com -porn-granny-tube.com -linksys.com -avea.com.tr -ams.se -canadanepalvid.com -venmobulo.com -levi.com -freshome.com -loja2.com.br -gameduell.de -reserveamerica.com -fakings.com -polygon.com -news.mn -addictinginfo.org -bonanza.com -adlock.in -apni.tv -3m.com -usingenglish.com -sammsoft.com -thevault.bz -groupon.my -banamex.com -hualongxiang.com -bodis.com -io.ua -minglebox.com -forumspecialoffers.com -remax.com -makaan.com -voglioporno.com -chinaluxus.com -parenting.com -superdownloads.com.br -nettavisen.no -21cbh.com -mobilestan.net -cheathappens.com -azxeber.com -foodgawker.com -eb80.com -dudamobile.com -sahafah.net -ait-themes.com -house.gov -ffffound.com -khanwars.ir -wowslider.com -fashionara.com -pornxxxhub.com -minhavida.com.br -senzapudore.it -extra.cz -cinemark.com -career.ru -realself.com -i4455.com -ntlworld.com -chinaw3.com -berliner-sparkasse.de -autoscout24.be -heureka.sk -tienphong.vn -1001freefonts.com -bluestacks.com -livesports.pl -bd-pratidin.com -es.tl -backcountry.com -fourhourworkweek.com -pointclicktrack.com -joomlacode.org -fantage.com -seowizard.ru -military38.com -swedbank.lt -govoyages.com -fgov.be -dengeki.com -ed4.net -mql5.com -gottabemobile.com -kdslife.com -5yi.com -bforex.com -eurogamer.net -az.pl -partypoker.com -cinapalace.com -sbt.com.br -weatherzone.com.au -cutv.com -sweetwater.com -vodacom.co.za -hostgator.in -mojim.com -eklablog.com -divaina.com -acces-charme.com -airfrance.fr -widgeo.net -whosdatedwho.com -funtrivia.com -servis24.cz -emagister.com -torrentkitty.com -abc.com.py -farfetch.com -gamestar.de -careers24.com -styleblazer.com -ibtesama.com -ifunny.mobi -antpedia.com -fivb.org -littleone.ru -rainbowdressup.com -zerozero.pt -edreams.com -whoishostingthis.com -gucci.com -animeplus.tv -five.tv -vacationstogo.com -dikaiologitika.gr -mmorpg.com -jcwhitney.com -russiandatingbeauties.com -xrstats.com -gm99.com -megashares.com -oscaro.com -yezizhu.com -get2ch.net -cheaperthandirt.com -telcel.com -themefuse.com -addictivetips.com -designshack.net -eurobank.gr -nexon.net -fulltiltpoker.eu -pimei.com -photoshop.com -domainnamesales.com -sky.fm -yasni.de -travian.ru -stickpage.com -joomla-master.org -sarkari-naukri.in -iphones.ru -foto.ru -smude.edu.in -gothamist.com -teslamotors.com -seobudget.ru -tiantian.com -videohelp.com -textbroker.com -garena.com -patient.co.uk -20minutepayday.com -bgames.com -superherohype.com -sephora.com.br -interest.me -inhabitat.com -downloads.nl -rusnovosti.ru -mr-guangdong.com -greyhound.com -okpay.com -amateurcommunity.com -jeunesseglobal.com -nigma.ru -brightcove.com -safesearch.net -teluguone.com -custojusto.pt -telebank.ru -kuwait.tt -acs.org -sverigesradio.se -mps.it -utanbaby.com -junocloud.me -expedia.co.in -rosnet.ru -kanoon.ir -website.ws -bagittoday.com -gooya.com -travelchannel.com -flix247.com -momsbangteens.com -photofacefun.com -vistaprint.fr -vidbux.com -edu.ro -hd-xvideos.com -woodworking4home.com -reformal.ru -morodora.com -gelbooru.com -porntalk.com -assurland.com -amalgama-lab.com -9to5mac.com -linux.org.ru -dolartoday.com -theme-junkie.com -seolib.ru -unesco.org -porncontrol.com -topdocumentaryfilms.com -tvmovie.de -adsl.free.fr -sprinthost.ru -reason.com -morazzia.com -yellowmoxie.com +anyxxx.pro +aol.com +apkpure.com +apple.com +appledaily.com +archive.org +asahi.com +ask.com +asos.com +asus.com +autotrader.com +avito.ru +azlyrics.com +badoo.com +baidu.com +baixaki.com.br banggood.com -espn.com.br -memedad.com -lovebuddyhookup.com -scmp.com -kjendis.no -metro-cc.ru -disdus.com -nola.com -tubesplash.com -crx7601.com -iana.org -howrse.com -anime-sharing.com -geny.com -carrefour.es -kemalistgazete.net -freedirectory-list.com -girlgamey.com -blogbus.com -funlolx.com -zyue.com -freepeople.com -tgareed.com -lifestreetmedia.com -fybersearch.com -livefreefun.org -cairodar.com -suite101.com -elcinema.com -leiting001.com -ifttt.com -google.com.mm -gizbot.com -games2win.com -stiforp.com -nrc.nl -slashgear.com -girlsgames123.com -mmajunkie.com -cadenaser.com -frombar.com -katmirror.com -cnsnews.com -duolingo.com -afterbuy.de -jpc.com -publix.com -ehealthforum.com -budget.com -ipma.pt -meetladies.me -adroll.com -renxo.com -empireonline.com -modareb.com -topmoviesdirect.com -mforos.com -pubarticles.com -primeshare.tv -flycell.com.tr -rapidvidz.com -kouclo.com -photography-on-the.net -tsn.ua -dreamamateurs.com -avenues.info -coolmath.com -pegast.ru -myplayyard.com -myscore.ru -theync.com -ducktoursoftampabay.com -marunadanmalayali.com -tribune.com.ng -83suncity.com -nissanusa.com -radio.de -diapers.com -myherbalife.com -flibusta.net -daft.ie -buycheapr.com -sportmaster.ru -wordhippo.com -gva.es -sport24.co.za -putariabrasileira.com -suddenlink.net -bangbrosnetwork.com -creaders.net -dailysteals.com -karakartal.com -tv-series.me -bongdaplus.vn -one.co.il -giga.de -contactmusic.com -informationweek.com -iqbank.ru -duapp.com -cgd.pt -yepporn.com -sharekhan.com -365online.com -thedailymeal.com -ag.ru -claro.com.ar -mediaworld.it -bestgore.com -mohajerist.com -passion-hd.com -smallbiztrends.com -vitals.com -rocketlawyer.com -vr-zone.com -doridro.com -expedia.it -aflam4you.tv -wisconsin.gov -chinavasion.com -bigpara.com -hightrafficacademy.com -novaposhta.ua -pearl.de -boobpedia.com -mycmapp.com -89.com -foxsportsla.com -annauniv.edu -tri.co.id -browsershots.org -newindianexpress.com -washingtonexaminer.com -mozillazine.org -mg.co.za -newalbumreleases.net -trombi.com -pimsleurapproach.com -decathlon.es -shopmania.ro -brokenlinkcheck.com -forumeiros.com -moreniche.com -falabella.com -turner.com -reachlocal.net -upsc.gov.in -allday2.com -dtiserv.com -singaporeair.com -patoghu.com -intercambiosvirtuales.org -bored.com -nn.ru -24smi.org -mobile-review.com -rbs.co.uk -westeros.org -dragonfable.com -wg-gesucht.de -ebaypartnernetwork.com -smartsheet.com -filmai.in -iranianuk.com -zhulang.com -game-game.com.ua -jigzone.com -vidbull.com -trustpilot.com -baodatviet.vn -haaretz.com -careerbuilder.co.in -veikkaus.fi -potterybarnkids.com -freegamelot.com -worldtimeserver.com -jigsy.com -widgetbox.com -lasexta.com -mediav.com -aintitcool.com -youwillfind.info -bharatmatrimony.com -translated.net -virginia.edu -5566.net -questionmarket.com -587766.com -newspickup.com -womansday.com -segodnya.ua -reagancoalition.com -trafficswarm.com -orbitdownloader.com -filmehd.net -porn-star.com -lawyers.com -life.hu -listenonrepeat.com -phpfox.com -campusexplorer.com -eprothomalo.com -linekong.com -blogjava.net -qzone.cc -gamespassport.com -bet365.es -bikeradar.com -allmonitors.net -naijaloaded.com -chazidian.com -channeladvisor.com -arenabg.com -briian.com -cucirca.eu -mamsy.ru -dl4all.com -wethreegreens.com -hsbc.co.in -squirt.org -sisal.it -bonprix.ru -awd.ru -a-q-f.com -4game.com -24timezones.com -fgv.br -topnews.in -roku.com -ulub.pl -launchpad.net -simplyhired.co.in -click.ro -thisis50.com -horoscopofree.com -comoeumesintoquando.tumblr.com -dlvr.it -4umf.com -picresize.com -aleqt.com -correos.es -pog.com -dlsoftware.org -primekhobor.com -dicionarioinformal.com.br -flixxy.com -hotklix.com -mglclub.com -airdroid.com -9281.net -satu.kz -carambatv.ru -autonews.ru -playerinstaller.com -swedbank.lv -enladisco.com -lib.ru -revolveclothing.com -aftermarket.pl -copy.com -muchgames.com -brigitte.de -ticketmaster.co.uk -cultofmac.com -bankontraffic.com -cnnamador.com -dwayir.com -davidicke.com -autosport.com -file.org -subtlepatterns.com -playmillion.com -gexing.com -zum.com -eskimotube.com -guenstiger.de -diesiedleronline.de -nelly.com -press24.mk -psdgraphics.com -makeupalley.com -cloudify.cc -3a6aayer.com -apspsc.gov.in -hotnews25.com -symbaloo.com -hiroimono.org -enbac.com -pornravage.com -abcfamily.go.com -fewo-direkt.de -elog-ch.net -n24.de -englishclub.com -ibicn.com -anibis.ch -tehran.ir -streamsex.com -drjays.com -islamqa.info -techandgaming247.com -apunkachoice.com -16888.com -morguefile.com -dalealplay.com -spinrewriter.com -newsmaxhealth.com -myvi.ru -moneysavingmom.com -jeux-fille-gratuit.com -nowec.com -opn.com -idiva.com -bnc.ca -eater.com -designcrowd.com -jkforum.net -netkeiba.com -practicalecommerce.com -genuineptr.com -bloog.pl -ladunliadi.blogspot.com -stclick.ir -anwb.nl -mkyong.com -lavoixdunord.fr -top-inspector.ru -pornicom.com -yithemes.com -canada411.ca -mos.ru -somuch.com -runtastic.com -cadoinpiedi.it -google.co.bw -shkolazhizni.ru -heroku.com -net114.com -proprofs.com -banathi.com -bunte.de -ncsecu.org -globalpost.com -comscore.com -wrapbootstrap.com -directupload.net -gpotato.eu -vipsister23.com -shopatron.com -aeroflot.ru -asiandatingbeauties.com -egooad.com -annunci69.it -yext.com -gruenderszene.de -veengle.com -reelzhot.com -enstage.com -icnetwork.co.uk -scarlet-clicks.info -brands4friends.de -watchersweb.com -music-clips.net -pornyeah.com -thehollywoodgossip.com -e5.ru -boldchat.com -maskolis.com -ba-k.com -monoprice.com -lacoste.com -byu.edu -zqgame.com -mofosex.com -roboxchange.com -elnuevoherald.com -joblo.com -songtexte.com -goodsearch.com -dnevnik.bg -tv.nu -movies.com -ganeshaspeaks.com -vonage.com -dawhois.com -companieshouse.gov.uk -ofertix.com -amaderforum.com -directorycritic.com -quickfilmz.com -youpornos.info -animeultima.tv -php.su -inciswf.com -bayern.de -hotarabchat.com -goodlayers.com -billiger.de -ponparemall.com -portaltvto.com -filesend.to -isimtescil.net -animeid.tv -trivago.es -17u.net -enekas.info -trendsonline.mobi -hostinger.ru -navad.net -mysupermarket.co.uk -webkinz.com -askfrank.net -pokernews.com -lyricsmania.com -chronicle.com -ns.nl -gaopeng.com -96down.com -2500sz.com -paginasamarillas.com -kproxy.com -irantvto.ir -stuffgate.com -exler.ru -disney.es -turbocashsurfin.com -steadyhealth.com -thebotnet.com -newscientist.com -ampnetzwerk.de -htcmania.com -proceso.com.mx -teenport.com -tfilm.tv -trck.me -lifestartsat21.com -9show.com -expert.ru -mangalam.com -beyebe.com -ctrls.in -despegar.com.mx -bazingamob.com -netmagazine.com -sportssnip.com -lik.cl -targobank.de -hamsterporn.tv -lastfm.ru -wallinside.com -alawar.ru -ogame.org -guardiannews.com -intensedebate.com -citrix.com -ppt.cc -kavanga.ru -wotif.com -terapeak.com -swalif.com -demotivation.me -liquidweb.com -whydontyoutrythis.com -techhive.com -stylelist.com -shoppersstop.com -muare.vn -filezilla-project.org -wowwiki.com -ucm.es -plus.pl -goclips.tv -jeddahbikers.com -themalaysianinsider.com -buzznet.com -moonfruit.com -zivame.com -sproutsocial.com -evony.com -valuecommerce.com -onlineconversion.com -adbooth.com -clubpartners.ru -rumah123.com -searspartsdirect.com -hollywood.com -divx.com -adverts.ie -filfan.com -t3.com -123vidz.com -technicpack.net -mightydeals.com -techgig.com -business.gov.au -phys.org -tweepi.com -bobfilm.net -phandroid.com -obozrevatel.com -elitedaily.com -tcfexpress.com -softaculous.com -xo.gr -cargocollective.com -epicgameads.com -billigfluege.de -google.co.zm -flamingtext.com -mediatraffic.com -redboxinstant.com -tvquran.com -mstaml.com -polskieradio.pl -ipower.com -magicjack.com -linuxidc.com -audiojungle.net -zoomit.ir -celebritygossiplive.com -entheosweb.com -duke.edu -lamchame.com -trinixy.ru -heroeswm.ru -leovegas.com -redvak.com -wpexplorer.com -pornosexxxtits.com -thatrendsystem.com -minutouno.com -dnes.bg -raqq.com -misr5.com -m6replay.fr -ciao.es -indiatvnews.com -transunion.com -mha.nic.in -listia.com -duba.net -apec.fr -dexknows.com -americangirl.com -seekbang.com -greenmangaming.com -ptfish.com -mistrzowie.org -kongfz.com -finam.ru -tapiture.com -beon.ru -redsurf.ru -jamiiforums.com -grannysextubez.com -adlux.com -just-eat.co.uk -live24.gr -moip.com.br -chanel.com -screwfix.com -trivago.it -airw.net -dietnavi.com -spartoo.es -game-debate.com -rotahaber.com -google.md -pornsex69.com -tmgonlinemedia.nl -myvoffice.com -wroclaw.pl -finansbank.com.tr -govdelivery.com -gamesbox.com -37wan.com -portableapps.com -dateinasia.com -northerntool.com -51pinwei.com -ocregister.com -noelshack.com -ipanelonline.com -klart.se -hqew.com -moodle.org -westernunion.fr -medindia.net -sencha.com -moveon.org -sipeliculas.com -beachbody.com -experts-exchange.com -davidsbridal.com -apotheken-umschau.de -melaleuca.com -cdbaby.com -humblebundle.com -telenet.be -labaq.com -smartaddons.com -vukajlija.com -zalando.es -articlerich.com -dm456.com -global-adsopt.com -forumophilia.com -dafiti.com.mx -funnystuff247.org -300mbfilms.com -xvideospornogratis.com -readnovel.com -khmer-news.org -media970.com -zwinky.com -newsbullet.in -pingfarm.com -lovetoknow.com -dntx.com -pap.fr -dizzcloud.com -nav.no -lotto.pl -freemp3whale.com -smartadserver.com -westpac.co.nz -kenrockwell.com -hongkongpost.com -delish.com -islam-lovers.com -edis.at -avery.com -giaitri.com -linksmanagement.com -beruby.com -1stwebgame.com -whocallsme.com -westwood.com -lmaohub.com -theresumator.com -nude.tv -nvrcp.com -bebinin.com -buddypress.org -uitzendinggemist.nl -majorleaguegaming.com -phpclasses.org -inteligo.pl -pinkbike.com -songlyrics.com -ct.gov -timeslive.co.za -snapwidget.com -watchkart.com -col3negoriginalcom.com -bronto.com -coasttocoastam.com -theladbible.com -narkive.com -the-village.ru -roem.ru -hi-pda.com -411.info -likesasap.com -blitz.bg -goodfon.ru -desktopnexus.com -demis.ru -begun.ru -tezaktrafficpower.com -videos.com -pnet.co.za -rds.ca -dlink.com -ispajuegos.com -foxsportsasia.com -lexisnexis.com -ddproperty.com -1channelmovie.com -postimage.org -rahedaneshjou.ir -modern.az -givemegay.com -tejaratbank.net -rockpapershotgun.com -infogue.com -sfora.pl -liberoquotidiano.it -forumok.com -infonavit.org.mx -bankwest.com.au -al-mashhad.com -ogame.de -triviatoday.com -topspeed.com -kuku123.com -gayforit.eu -alahlionline.com -phonegap.com -superhry.cz -sweepstakes.com -australianbusinessgroup.net -nacion.com -futura-sciences.com -education.gouv.fr -haott.com -ey.com -roksa.pl -manoramanews.com -secretsearchenginelabs.com -alitui.com -depor.pe -rbc.com -tvaguuco.blogspot.se -mediaturf.net -mobilemoneycode.com -radio-canada.ca -shijue.me -upyim.com -indeed.com.br -indianrailways.gov.in -myfreepaysite.com -adchiever.com -xonei.com -kingworldnews.com -twenga.fr -oknation.net -zj4v.info -usanetwork.com -carphonewarehouse.com -impactradius.com -cinepolis.com -tvfun.ma -secureupload.eu -sarsefiling.co.za -flvmplayer.com -gemius.com.tr -alibris.com -insomniagamer.com -osxdaily.com -novasdodia.com -ayuwage.com -c-date.it -meetic.es -cineplex.com -mugshots.com -allabolag.se -parentsconnect.com -ibis.com -findcheaters.com -telly.com -alphacoders.com -sreality.cz -wall-street-exposed.com -mizhe.com -telugumatrimony.com -220tube.com -gboxapp.com -activeden.net -worldsex.com -tdscpc.gov.in -mlbtraderumors.com -top-channel.tv -publiekeomroep.nl -flvs.net -inwi.ma -web-ip.ru -er7mne.com -valueclickmedia.com -1pondo.tv -covers.com -be2.it -e-cigarette-forum.com -himarin.net -indiainfoline.com -51gxqm.com -sebank.se -18inhd.com -unionbankonline.co.in -filetram.com -santasporngirls.com -drupal.ru -tokfm.pl -steamgifts.com -residentadvisor.net -magento.com -28.com -style.com -alitalia.com -vudu.com -underarmour.com -wine-searcher.com -indiaproperty.com -bet365affiliates.com -cnnewmusic.com -longdo.com -destructoid.com -diyifanwen.com -logic-immo.com -mate1.com -pissedconsumer.com -blocked-website.com -cremonamostre.it -sayidaty.net -globalewallet.com -maxgames.com -auctionzip.com -aldaniti.net -workle.ru -arduino.cc -buenosaires.gob.ar -overtenreps.com -enalquiler.com -gazetadopovo.com.br -hftogo.com -usana.com -bancochile.cl -on24.com -samenblog.com -goindigo.in -iranvij.ir -postfinance.ch -grupobancolombia.com -flycell.pe -sobesednik.ru -banglalionwimax.com -yasni.com -diziizle.net -publichd.se -socialsurveycenter.com -blockbuster.com -el-ahly.com -1gb.ru -utah.edu -dziennik.pl -tizerads.com -global-free-classified-ads.com -afp.com -tiberiumalliances.com -worldstaruncut.com -watchfreeinhd.com -5278.cc -azdrama.info -fjsen.com -fandongxi.com -spicytranny.com -parsonline.net -libreoffice.org -atlassian.com -europeantour.com -smartsource.com -ashford.edu -moo.com -bplaced.net -themify.me -holidaypromo.info -kanglu.com -yicai.com -classesusa.com -huoche.net -linkomanija.net -blog.de -vw.com.tr -worldgmn.com -tommy.com -100bt.com -springsource.org -betfairinvest.com -broker.to -islamstory.com -sparebank1.no -towleroad.com -jetcost.com -pinping.com -millenniumbcp.pt -vikatan.com -dorkly.com -clubedohardware.com.br -any.gs -danskebank.dk -tvmongol.com -ahnegao.com.br -filipinocupid.com -casacinemas.com -standvirtual.com -nbg.gr -onlywire.com -megacurioso.com.br -elaph.com -xvideos-field5.com -base.de -zzstream.li -qype.co.uk -ubergizmo.com -habervaktim.com -nationaljournal.com -fanslave.com -agreementfind.com -unionbankph.com -hometalk.com -hotnigerianjobs.com -infoq.com -matalan.co.uk -hottopic.com -hammihan.com -stsoftware.biz -elimparcial.com -lingualeo.ru -firstdirect.com -linkprosperity.com -ele.me -beep.com -netcombo.com.br -meme.li -privateproperty.co.za -wunderlist.com -designyoutrust.com -century21.com -huuto.net -adsoftheworld.com -vouchercodes.co.uk -allyou.com -mastemplate.com -bolha.com -tastyplay.com -busuk.org -360.cn -ntd.tv -onclkds.com -uber.com -lyft.com +bankofamerica.com +battle.net +bbc.co.uk +bbc.com +beeg.com +bestbuy.com +bet365.com +biblegateway.com +biglobe.ne.jp +bild.de +bilibili.com +bing.com +blackboard.com +blogspot.com +bloomberg.com +booking.com +bookmyshow.com +britannica.com +bukalapak.com +businessinsider.com +bustle.com +buzzfeed.com +ca.gov +caixa.gov.br +canada.ca +canalrcn.com +canva.com +capitalone.com +cargurus.com +cbsnews.com +cbssports.com +ccm.net +cdc.gov +cdiscount.com +ceneo.pl +chase.com +chaturbate.com +chegg.com +chinatimes.com +chip.de +chron.com +cinecalidad.to +clarin.com +cnbc.com +cnet.com +cnn.com +collegedunia.com +convert2mp3.net +correios.com.br +craigslist.org +cricbuzz.com +dailymail.co.uk +dailymotion.com +daum.net +dell.com +depositphotos.com +detik.com +deviantart.com +dhgate.com +dhl.de +dictionary.com +discordapp.com +dmm.co.jp +dmm.com +doorblog.jp +drom.ru +dropbox.com +ebay-kleinanzeigen.de +ebay.co.uk +ebay.com +ebay.com.au +ebay.de +ebay.es +ebay.fr +ebay.it +egy.best +eksisozluk.com +elconfidencial.com +elintransigente.com +elmundo.es +elpais.com +eluniversal.com.mx +emag.ro +engadget.com +epicgames.com +espn.com +etsy.com +europa.eu +eventbrite.com +excite.co.jp +expedia.com +express.co.uk +facebook.com +fandango.com +fandom.com +fast.com +fazenda.gov.br +fc2.com +fedex.com +filmweb.pl +flickr.com +flipkart.com +fnac.com +forbes.com +foxnews.com +francetvinfo.fr +free.fr +gaana.com +gamepedia.com +gamespot.com +gearbest.com +genius.com +gfycat.com +giphy.com +gismeteo.ru +github.com +glassdoor.com +globo.com +glosbe.com +go.com +goal.com +gofundme.com +goo.ne.jp +goodreads.com +google.ca +google.cl +google.co.id +google.co.in +google.co.jp +google.co.kr +google.co.th +google.co.uk +google.com +google.com.ar +google.com.au +google.com.br +google.com.co +google.com.mx +google.com.tr +google.com.tw +google.de +google.es +google.fr +google.it +google.nl +google.pl +google.pt +google.ru +gotporn.com +gsmarena.com +gumtree.com +haberler.com +hatenablog.com +hdfcbank.com +hdrezka.ag +healthline.com +hilton.com +hindustantimes.com +homedepot.com +hotels.com +hotpepper.jp +hotstar.com +hp.com +huawei.com +huffpost.com +hulu.com +icicibank.com +icloud.com +ign.com +ikea.com +ilmeteo.it +ilovepdf.com +imdb.com +imgur.com +impress.co.jp +indeed.com +indiamart.com +indiatimes.com +indiatoday.in +infobae.com +instagram.com +instructables.com +instructure.com +interia.pl +intuit.com +investing.com +investopedia.com +irecommend.ru +irs.gov +itau.com.br +itmedia.co.jp +jobrapido.com +justdial.com +jw.org +kahoot.it +kakaku.com +kakao.com +kayak.com +kenh14.vn +khanacademy.org +kinopoisk.ru +kizlarsoruyor.com +kknews.cc +kohls.com +kompas.com +kotobank.jp +kp.ru +lazada.co.th +leagueoflegends.com +leboncoin.fr +lemonde.fr +lenta.ru +letmejerk.com +lifewire.com +line.me +linkedin.com +live.com +livedoor.biz +livedoor.com +livedoor.jp +livejournal.com +livescore.com +livestrong.com +mail.ru +makemytrip.com +malavida.com +marca.com +mawdoo3.com +mayoclinic.org +meb.gov.tr +mediafire.com +medium.com +mega.nz +mercadolibre.com +mercadolibre.com.ar +mercadolibre.com.co +mercadolibre.com.mx +mercadolivre.com.br +mercari.com +messenger.com +mi.com +microsoft.com +microsoftonline.com +milliyet.com.tr +mk.ru +mlb.com +mobile.de +mobile01.com +monografias.com +msn.com +mundodeportivo.com +myanimelist.net +mynavi.jp +mynet.com +n11.com +namu.wiki +naver.com +naver.jp +nba.com +nbcnews.com +nbcsports.com +ndtv.com +netflix.com +news18.com +nextdoor.com +nhk.or.jp +nicovideo.jp +nifty.com +nih.gov +nike.com +nikkansports.com +nikkei.com +nvidia.com +nypost.com +nytimes.com +office.com +office365.com ok.ru +okdiario.com +olx.co.id +olx.com.br +olx.pl +olx.ua +onet.pl +onlinesbi.com +onlinevideoconverter.com +op.gg +orange.fr +otto.de +otvfoco.com.br +otzovik.com +over-blog.com +pantip.com +passeidireto.com +patreon.com +paypal.com +perfectgirls.net +pinterest.co.uk +pinterest.com +pinterest.es +pixiv.net +pixnet.net +playstation.com +politico.com +polygon.com +pornhub.com +prezi.com +primevideo.com +programme-tv.net +qq.com +qualtrics.com +quizlet.com +quora.com +rakuten.co.jp +rambler.ru +ranker.com +reddit.com +redtube.com +researchgate.net +reverso.net +rg.ru +rightmove.co.uk +roblox.com +rottentomatoes.com +rozetka.com.ua +rt.com +sabah.com.tr +sahibinden.com +samsung.com +sanook.com +sarkariresult.com +savefrom.net +sciencedirect.com +scribd.com +sfgate.com +shopee.co.th +shutterstock.com +sinoptik.ua +sky.com +skyscanner.net +skysports.com +slideshare.net +smallpdf.com +smi2.ru +softonic.com +soundcloud.com +souq.com +sozcu.com.tr +spankbang.com +speedtest.net +spiegel.de +spotify.com +sputniknews.com +stackexchange.com +stackoverflow.com +steamcommunity.com +steampowered.com +study.com +surveymonkey.com +t-online.de +tabelog.com +taleo.net +taobao.com +target.com +techradar.com +techtudo.com.br +telegraph.co.uk +termometropolitico.it +thebalancecareers.com +thedailybeast.com +thefreedictionary.com +theguardian.com +thepiratebay.org +thesaurus.com +theverge.com +thoughtco.com +tim.it +tistory.com +tnaflix.com +tokopedia.com +trello.com +tribunnews.com +tripadvisor.com +trulia.com +trustpilot.com +tumblr.com +tutorialspoint.com +twitch.tv +twitter.com +uber.com +ubisoft.com +udemy.com +udn.com +ultimate-guitar.com +unam.mx +uniqlo.com +uol.com.br +ups.com +uptodown.com +urbandictionary.com +usatoday.com +usps.com +vice.com +vimeo.com +vk.com +vnexpress.net +w3schools.com +walmart.com +washingtonpost.com +wattpad.com +weather.com +web.de +webmd.com +weebly.com +wellsfargo.com +wetransfer.com +whatsapp.com +wikihow.com +wikipedia.org +wiktionary.org +wish.com +wixsite.com +wondershare.com +wordpress.com +wordreference.com +wp.pl +wsj.com +www.gob.mx +www.gov.uk +xbox.com +xe.com +xfinity.com +xhamster.com +xnxx.com +xnxx2.pro +xozilla.com +xvideos.com +y2mate.com +yahoo.co.jp +yahoo.com +yandex.ru +yelp.com +yenisafak.com +youjizz.com +youm7.com +youporn.com +yourdictionary.com +youtube.com +yts.am +zendesk.com +zillow.com +zing.vn +znanija.com +zomato.com +### +01net.com +1000.menu +10086.cn +103.by +104.com.tw +1111.com.tw +112.ua +114la.com +1177.se +11st.co.kr +123doc.org +123link.vip +123movies.la +123rf.com +126.com +13.cl +1337x.to +1377x.to +15min.lt +163.com +1688.com +16personalities.com +17173.com +178.com +1fichier.com +1mg.com +1news.com.br +1plus1.ua +1tv.ru +1und1.de +20minutes.fr +20minutos.es +21cineplex.com +23andme.com +24-horas.mx +24.hu +247sports.com +24horas.cl +24porn.com +24sata.hr +24smi.org +24timezones.com +24tv.ua +24video.sexy +27.ua +2ch-c.net +2ch.net +2chblog.jp +2dehands.be +2ememain.be +2gis.ru +2m.ma +2movierulz.gs +2movierulz.st +2sao.vn +360.cn +360.com +360doc.com +36kr.com +3bmeteo.com +3djuegos.com +3dlat.com +3dmgame.com +3dnews.ru +3movs.com +4399.com +444.hu +4chan.org +4channel.org +4gamer.net +4pda.ru +4shared.com +4travel.jp +4tube.com +5-tv.ru +51.la +51cto.com +51job.com +51sole.com +52pojie.cn +58.com +58pic.com +5ch.net +6.cn +720p-izle.com +750g.com +7ya.ru +81.cn +8maple.ru +90min.com +91jm.com +91mobiles.com +99114.com +99acres.com +9gag.com +9news.com.au +a1.ro +a101.com.tr +a9vg.com +aa.com +aa.com.tr +aaa.com +aajtak.in +aarp.org +aastocks.com +abc.com.py +abc.es +abc.net.au +abc13.com +abczdrowie.pl +abdwap2.com +abema.tv +abematimes.com +abola.pt +about.google +aboutespanol.com +aboutyou.de +abplive.in +abril.com.br +abs-cbn.com +abv.bg +academy.com +accenture.com +accorhotels.com +acehardware.com +acer.com +acfun.cn +acs.org +action.com +active.com +actu.fr +ad.nl +adac.de +adayroi.com +addthis.com +adevarul.ro +adidas.com +adidas.com.br +adme.ru +administradores.com.br +adnradio.cl +adoptapet.com +adorocinema.com +adslzone.net +adultfriendfinder.com +advanceautoparts.com +ae.com +aemet.es +aemps.es +aeon.co.jp +aeoncinema.com +aerolineas.com.ar +affaritaliani.it +afip.gob.ar +afisha.ru +afreecatv.com +aftonbladet.se +agenciatributaria.es +aglasem.com +ah.nl +ahaber.com.tr +ahaonline.cz +ahlmasrnews.com +ahoranoticias.cl +ahram.org.eg +airasia.com +airbnb.co.uk +airbnb.com.br +airbnb.es +airbnb.fr +aircanada.com +airedesantafe.com.ar +airtel.in +ais.co.th +ajc.com +ajio.com +akakce.com +akamaihd.net +akamaized.net +akc.org +akket.com +akoam.net +aksam.com.tr +aktuality.sk +aktualne.cz +akurat.co +al3omk.com +alamaula.com +alamy.com +alaskaair.com +albawabhnews.com +alberta.ca +alc.co.jp +aldi-sued.de +aldi.co.uk +alfemminile.com +ali213.net +alicdn.com +alipay.com +aliyun.com +aljaras.com +aljazeera.com +aljazeera.net +alkosto.com +allabout.co.jp +allaboutvision.com +allbest.ru +allkpop.com +allmusic.com +allo.ua +allodocteurs.fr +allrecipes.co.uk +allrecipes.com +allscrabblewords.com +allstate.com +ally.com +almaany.com +almasryalyoum.com +almrsal.com +alnaharegypt.com +alo.rs +alphacoders.com +alphaporno.com +altema.jp +altervista.org +altibbi.com +alukah.net +alvolante.it +alwafd.news +alwatanvoice.com +alza.cz +am.com.mx +amalgama-lab.com +amarujala.com +amazon.cn +amazon.com.au +amazon.com.br +amazon.jobs +amazonaws.com +ambito.com +amctheatres.com +amd.com +ameba.jp +ameli.fr +americanas.com.br +americatv.com.pe +ameritrade.com +aminoapps.com +amtrak.com +ana.co.jp +anadolu.edu.tr +analdin.com +anandtech.com +andhrajyothy.com +andro4all.com +androeed.ru +android-1.com +android.com +androidauthority.com +androidcentral.com +androidfilehost.com +androidoyun.club +androidpolice.com +angieslist.com +animatetimes.com +anime-planet.com +anime-sugoi.com +animenewsnetwork.com +animevost.org +anjuke.com +anninhthudo.vn +annuaire-telechargement.com +ansa.it +anses.gob.ar +answers.com +antena3.com +antena3.ro +antyradio.pl +anwb.nl +anyporn.com +anysex.com +ap.gov.in +apache.org +aparat.com +apartmentguide.com +apartmenthomeliving.com +apartments.com +apkhere.com +apkmirror.com +apkmonk.com +apnews.com +apost.com +apostrophe.ua +apotheken-umschau.de +app-liv.jp +appbank.net +appfolio.com +applebees.com +appllio.com +applocal.com.br +appmedia.jp +appspot.com +apteka.ru +aptoide.com +arabam.com +arabsong.top +arbeitsagentur.de +arcgis.com +archiveofourown.org +arduino.cc +argaam.com +argentina.gob.ar +argentino.com.ar +argos.co.uk +arine.jp +aristeguinoticias.com +arstechnica.com +artstation.com +aruba.it +arukereso.hu +arxiv.org +as.com +asagei.com +asajo.jp +asana.com +ascii.jp +asda.com +ashemaletube.com +ashleyfurniture.com +ashleymadison.com +asianetnews.com +ask.fm +askubuntu.com +asos.fr +aspor.com.tr +asriran.com +astrology.com +astrologyanswers.com +atelevisao.com +athensmagazine.gr +athome.co.jp +atlantablackstar.com +atlassian.com +atlassian.net +atptour.com +atrapalo.com +atresplayer.com +att.com +att.net +atv.com.tr +atwiki.jp +au.com +auchan.fr +auction.co.kr +audible.com +aufeminin.com +auone.jp +auspost.com.au +auto-swiat.pl +auto.ru +autobild.de +autoblog.com +autocarindia.com +autodesk.com +autohome.com.cn +autokult.pl +automobile.it +autoplus.fr +autoscout24.de +autoscout24.it +autotrader.ca +autotrader.co.uk +autozone.com +avast.com +avaz.ba +avclub.com +avg.com +avgle.com +avianca.com +aviasales.ru +avito.ma +avon.com +avon.com.br +avvo.com +aweber.com +axisbank.com +axs.com +azcentral.com +azet.sk +azure.com +azurewebsites.net +b-cdn.net +b1.ro +b2b.cn +b92.net +bab.la +babbel.com +baby.ru +babyblog.ru +babycenter.com +babycentre.co.uk +babyhome.com.tw +babytree.com +backpackers.com.tw +badorno.xxx +bahn.de +baiducontent.com +baike.com +bakeca.it +bakusai.com +banamex.com +banco.bradesco +bancogalicia.com.ar +bancomer.com +bancosantander.es +band.us +bandcamp.com +bang.com +bankbazaar.com +banki.ru +bankifsccode.com +bankmellat.ir +bankrate.com +baomoi.com +barnesandnoble.com +bartleby.com +baseball-reference.com +basketball-reference.com +baskino.me +basspro.com +bathandbodyworks.com +bauhaus.info +bayt.com +bazos.cz +bazos.sk +bb.com.br +bbb.org +bbcgoodfood.com +bbva.es +bebesymas.com +bedbathandbeyond.com +beeline.ru +beenverified.com +behance.net +beinsports.com +belastingdienst.nl +belcy.jp +belezanaweb.com.br +belk.com +bell.ca +bellemaison.jp +belnovosti.by +benesse.ne.jp +bengo4.com +berkeley.edu +berlin.de +bershka.com +beslist.nl +bestbuy.ca +bestdeals.today +bestfreetube.xxx +besthugecocks.com +bestprice.gr +bestreviews.guide +bethesda.net +betterhealth.vic.gov.au +bettycrocker.com +beyazperde.com +beytoote.com +bfmtv.com +bg-mamma.com +bgr.com +bhaskar.com +bhg.com +bhphotovideo.com +bible.com +biblehub.com +biblestudytools.com +bibliaon.com +bibliaonline.com.br +biccamera.com +bienpublic.com +bigbasket.com +bigcartel.com +biggo.com.tw +bigl.ua +biglots.com +bigw.com.au +bihar.gov.in +bikedekho.com +bikewale.com +billboard.com +bilutv.org +binance.com +binbaz.org.sa +bingoporno.com +biobiochile.cl +biografiasyvidas.com +biography.com +bitbucket.org +biteki.com +bitly.com +biz-journal.jp +biz.ua +bizjournals.com +blabbermouth.net +blastingnews.com +bldaily.com +bleacherreport.com +bleepingcomputer.com +blesk.cz +blibli.com +blic.rs +blikk.hu +blizzard.com +blockchain.com +blocket.se +blog.hu +blog.ir +blog.jp +blog.me +blogfa.com +blogger.com +blogimg.jp +blogos.com +bloomberght.com +bluehost.com +blueporns.com +bluestacks.com +bluradio.com +bmi.ir +bmj.com +bmo.com +bmstores.co.uk +bne.com.br +boafoda.com +boardgamegeek.com +boc.cn +bodybuilding.com +bokepxv.com +bol.com +bola.net +bolasport.com +bolavip.com +bolshoyvopros.ru +bom.gov.au +bonappetit.com +bongacams.com +bongdanet.vn +bongdaplus.vn +bonprix.de +boohoo.com +bookdepository.com +books.com.tw +boostmobile.com +boots.com +boredpanda.com +bostonglobe.com +boticario.com.br +boulanger.com +boursorama.com +bouyguestelecom.fr +box.com +box.net +boxofficemojo.com +boyfriendtv.com +boyner.com.tr +br.com +br.de +bradesco.com.br +brainly.co.id +brainly.com +brainly.com.br +brainly.in +brainly.lat +brainly.pl +brainly.ro +brainyquote.com +brasil247.com +brassring.com +bravotube.net +bravotv.com +brazzers.com +brazzersnetwork.com +breitbart.com +brigitte.de +brilio.net +britishairways.com +britishcouncil.org +brother.com +brunch.co.kr +bryk.pl +bt.com +bt.dk +buenastareas.com +buenosaires.gob.ar +buentema.org +buffer.com +bugaboo.tv +buienradar.nl +bulbagarden.net +bulbul.su +bulurum.com +bunnings.com.au +bunshun.jp +bunte.de +busbud.com +buscaonibus.com.br +buscapalabra.com +buscapalabras.com.ar +buscape.com.br +business-standard.com +business.site +businessdictionary.com +businessinsider.com.pl +businessinsider.de +businessweekly.com.tw +but.fr +buzzfeednews.com +byjus.com +byoinnavi.jp +byr.cn +bz-berlin.de +c-and-a.com +c-ij.com +cabelas.com +cadenaser.com +caf.fr +cafedelites.com +cafef.vn +caijing.com.cn +cainiao.com +caisse-epargne.fr +caixabank.es +calameo.com +calciomercato.com +calculator.net +calendly.com +caliente.mx +callofduty.com +cam4.com +camara.leg.br +cambridge.org +cameraprive.com +campograndenews.com.br +campus-star.com +canadapost.ca +canadiantire.ca +canal1.com.co +canalblog.com +canaltech.com.br +cancan.ro +cancaonova.com +cancer.gov +cancer.org +capital.fr +car-moby.jp +car.gr +caracol.com.co +caracoltv.com +caracteristicas.co +caradisiac.com +caranddriver.com +carbuzz.com +carcarekiosk.com +cardekho.com +care.com +careerbuilder.com +careers360.com +carfax.com +carid.com +carmax.com +carnival.com +carousell.com +carrefour.com.br +carrefour.es +carrefour.fr +carrosnaweb.com.br +cars.com +carsensor.net +carsforsale.com +carters.com +carview.co.jp +carwale.com +cas.sk +casa.it +casadellibro.com +casasbahia.com.br +castorama.fr +castorama.pl +catchnews.com +catho.com.br +catracalivre.com.br +cbc.ca +cbr.com +cbs.com +cbslocal.com +ccleaner.com +ccn.com +cda.pl +cdmx.gob.mx +cdninstagram.com +cdstm.cn +cea.com.br +cec.com.br +cekresi.com +celebjihad.com +cellphones.com.vn +cengage.com +censor.net.ua +centauro.com.br +centurylink.com +cerdas.com +ceskatelevize.cz +ch3thailand.com +champion.gg +championat.com +change.org +channel4.com +channelnewsasia.com +cheapflights.com +cheapoair.com +cheaptickets.com +cheatsheet.com +check24.de +checkraka.com +cheezburger.com +chefkoch.de +chess.com +chevrolet.com +chewy.com +chicagotribune.com +chick-fil-a.com +childrensplace.com +chilevision.cl +chillizet.pl +china.com +china.com.cn +chinadaily.com.cn +chinaz.com +chiphell.com +chiquipedia.com +chochox.com +chollometro.com +chordify.net +chordtabs.in.th +chosun.com +chotot.com +chouftv.ma +chp.org.tr +chsi.com.cn +cian.ru +ciatr.jp +cic.gc.ca +ciceksepeti.com +cienradios.com +cifraclub.com.br +cima4u.tv +cimaclub.com +cimri.com +cinecolombia.com +cinemablend.com +cinemagia.ro +cinemark.com +cinematoday.jp +cinemex.com +cineplex.com +cinepolis.com +cisco.com +citi.com +citilink.ru +citrus.ua +city-data.com +cityheaven.net +ciudad.com.ar +civico.com +ck101.com +clalit.co.il +claro.com.ar +claro.com.br +clasohlson.com +classmates.com +cleartax.in +cleartrip.com +clevelandclinic.org +clever.com +clicccar.com +clickfunnels.com +clicrbs.com.br +clien.net +clima.com +climatempo.com.br +clipconverter.cc +clips4sale.com +closermag.fr +cloudflare.com +clubedohardware.com.br +clubfactory.com +clubic.com +cmjornal.pt +cmoa.jp +cmu.edu +cnbcindonesia.com +cnbeta.com +cnblogs.com +cne.gob.ec +cnki.com.cn +cnki.net +cnnamador.com +cnnic.cn +cnnindonesia.com +cnnturk.com +cnrtl.fr +cnzz.com +coches.net +cochrane.org +cocolog-nifty.com +codashop.com +codecanyon.net +codepen.io +codeproject.com +codycross.info +codycrossanswers.org +coinbase.com +coinmarketcap.com +coinmill.com +coldwellbankerhomes.com +colgate.com +collegeboard.org +collinsdictionary.com +colombia.com +colorlib.com +columbia.edu +com.ru +comandotorrents.com +comicbook.com +comingsoon.it +commbank.com.au +commentcamarche.com +commentcamarche.net +commonhealth.com.tw +commonsensemedia.org +companieshouse.gov.uk +comparethemarket.com +complex.com +computerbild.de +computerhope.com +computerhoy.com +computrabajo.com.co +computrabajo.com.mx +concepto.de +conceptodefinicion.de +confirmit.com +conforama.fr +conicyt.cl +conjur.com.br +conmishijos.com +constantcontact.com +consultant.ru +consultaremedios.com.br +consumer.es +consumeraffairs.com +consumerreports.org +contabeis.com.br +converse.com +coocan.jp +cookieandkate.com +cookpad.com +coolblue.nl +coolinarika.com +coolrom.com.au +cooperativa.cl +coppel.com +cornell.edu +correio24horas.com.br +correiobraziliense.com.br +correos.es +corriere.it +corrieredellosport.it +cosme.net +cosmo.ru +cosmopolitan.com +cosmopolitan.fr +costco.ca +costco.com +coub.com +countryliving.com +coupang.com +coupons.com +coursehero.com +coursera.org +cox.com +cr173.com +cra-arc.gc.ca +creativemarket.com +credit-agricole.fr +creditkarma.com +creditmutuel.fr +crhoy.com +cricketwireless.com +crictracker.com +criteo.com +cronica.com.ar +cronista.com +crunchbase.com +crunchyroll.com +crutchfield.com +csdn.net +csfd.cz +csod.com +css-tricks.com +ctfile.com +ctrip.com +ctvnews.ca +cuatro.com +cucchiaio.it +cuisineactuelle.fr +cuisineaz.com +culturamix.com +cumhuriyet.com.tr +cumlouder.com +cure-naturali.it +curiouscat.me +currys.co.uk +curseforge.com +custhelp.com +cutestat.com +cvs.com +cwb.gov.tw +cyberleninka.ru +cylex.de +cyzowoman.com +dafiti.com.br +dafont.com +dagbladet.no +dagospia.com +daily.co.jp +dailycaller.com +dailyhive.com +dailyhunt.in +dailymedicalinfo.com +dailynews.co.th +dailypost.ng +dailystar.co.uk +dailywire.com +dallasnews.com +danawa.com +dangdang.com +dantri.com.vn +daraz.pk +darty.com +daserste.de +dasoertliche.de +dastelefonbuch.de +davidsbridal.com +dawn.com +dazn.com +dcard.tw +dcinside.com +dcm-b.jp +ddnavi.com +deadline.com +deadspin.com +dealabs.com +debate.com.mx +debenhams.com +decathlon.es +decathlon.fr +decathlon.it +deccanherald.com +decolar.com +decorfacil.com +dedeman.ro +deepl.com +deezer.com +definicion.de +definicionabc.com +deichmann.com +deita.ru +dek-d.com +delfi.lt +delfi.lv +delish.com +delta.com +denfaminicogamer.jp +dengeki.com +dengekionline.com +denik.cz +depor.com +derwesten.de +descomplica.com.br +desjardins.com +deskgram.net +desmos.com +despegar.com.ar +despegar.com.mx +detmir.ru +detran.mg.gov.br +detran.sp.gov.br +deunopostehoje.com +deutschepost.de +dexerto.com +dexonline.ro +dhl.com +dhnet.be +dhs.gov +dialog.ua +diamond.jp +dianping.com +diariobasta.com +diariocorreo.pe +diariodocentrodomundo.com.br +diariolaprovinciasj.com +diariomotor.com +diarioonline.com.br +diariopopular.com.ar +dicio.com.br +dicionarioinformal.com.br +dickssportinggoods.com +dict.cc +dienmayxanh.com +dietdoctor.com +digi24.ro +digikala.com +digisport.ro +digitalocean.com +digitalspy.com +digitaltrends.com +dikaiologitika.gr +dilei.it +dillards.com +directv.com +diretta.it +discogs.com +discover.com +discuss.com.hk +disney.com +disqus.com +distractify.com +divar.ir +divinity.es +divxtotal3.net +diy.com +diyadinnet.com +diyanet.gov.tr +dkn.tv +dlsite.com +dm.de +dmkt-sp.jp +dmzj.com +dnaindia.com +dndbeyond.com +dndnha.com +dnevnik.hr +dnevnik.ru +dni.ru +dns-shop.ru +dobreprogramy.pl +docin.com +docker.com +docomo.ne.jp +docsity.com +doctissimo.fr +doctolib.fr +doctoralia.com.br +doctoralia.com.mx +doctoralia.es +docusign.com +doityourself.com +doktersehat.com +doktorsitesi.com +doktortakvimi.com +dollargeneral.com +dollartree.com +domain.com.au +dominos.com +domodi.pl +donanimhaber.com +donga.com +donpornogratis.com +donya-e-eqtesad.com +doodle.com +doordash.com +doramatv.ru +douban.com +douyu.com +doviz.com +downdetector.com +download.com.vn +downloadastro.com +doz.pl +dpd.de +dpreview.com +dr.com.tr +dr.dk +draxe.com +dream.co.id +dreamstime.com +dribbble.com +drikpanchang.com +drive2.ru +drivemusic.me +drogaraia.com.br +droid-life.com +drtuber.com +drudgereport.com +drugs.com +dstv.com +dsw.com +dtac.co.th +duckduckgo.com +duden.de +dummies.com +duolingo.com +dw.com +dy2018.com +dytt8.net +dziennikzachodni.pl +e-hentai.org +e-katalog.ru +e-map.ne.jp +e-monsite.com +e1.ru +ea.com +easeus.com +easports.com +eastday.com +eastmoney.com +easybib.com +easyjet.com +eater.com +eb.mil.br +eba.gov.tr +ebah.com.br +ebates.com +ebay.ca +ebay.ie +ebc.net.tw +ebscohost.com +ecartelera.com +economia.gov.br +economictimes.com +economist.com +ecosia.org +ecured.cu +ed.gov +eda.ru +edf.fr +edimdoma.ru +edmodo.com +edmunds.com +edomex.gob.mx +edreams.es +educacion.es +educamaisbrasil.com.br +edupage.org +edx.org +ee.co.uk +eenadu.net +ef.com +eg.ru +egitimhane.com +eiga.com +eitb.eus +ekitan.com +ekstrabladet.dk +el-nacional.com +elbalad.news +elbilad.net +elbotola.com +elcolombiano.com +elcomercio.com +elcomercio.pe +elcorteingles.es +eldestapeweb.com +eldia.com +eldiario.es +eldiariony.com +eldinamo.cl +eldorado.ru +eleconomista.es +elektroda.pl +elempleo.com +elespanol.com +elespectador.com +elfagr.com +elgenero.com +elgrafico.mx +elheraldo.co +elimparcial.com +elitedaily.com +elkhabar.com +elle.com +elle.fr +elmogaz.com +elnuevodia.com +elnuevoherald.com +elo7.com.br +elobservador.com.uy +elpais.com.co +elpais.com.uy +elperiodico.com +elsalvador.com +elsevier.com +elsevier.es +elsol.com.ar +elsoldemexico.com.mx +elsoldepuebla.com.mx +eltiempo.com +eltiempo.es +eltrecetv.com.ar +eluniversal.com.co +eluniverso.com +elwatannews.com +em.com.br +emag.hu +emedicinehealth.com +emirates.com +emlakkulisi.com +emojipedia.org +emol.com +empflix.com +empik.com +empregos.com.br +emuparadise.me +en-hyouban.com +en-japan.com +encyclo.nl +enfemenino.com +eniro.se +enjoei.com.br +enotes.com +enrt.eu +ensonhaber.com +enterprise.com +entrepreneur.com +enuygun.com +envato.com +eobuwie.com.pl +eodev.com +eonline.com +epark.jp +epey.com +epicurious.com +eplus.jp +epochtimes.com +eporner.com +epttavm.com +erail.in +ero-video.net +eroterest.net +escavador.com +eset.com +eska.pl +espn.com.br +espn.com.mx +espncricinfo.com +espreso.rs +esquire.com +essen-und-trinken.de +estacio.br +estadao.com.br +estantevirtual.com.br +estrategiaconcursos.com.br +estrepublicain.fr +esuteru.com +etonline.com +etrade.com +ettoday.net +euro.com.pl +eurogamer.net +euronews.com +europapress.es +europe1.fr +euroresidentes.com +eurosport.com +eurosport.fr +eurosport.ru +eurozpravy.cz +eva.vn +eventbrite.co.uk +eventim.de +evernote.com +everydayhealth.com +everydayhealth.com.tw +evite.com +ew.com +exblog.jp +excelsior.com.mx +exchange-rates.org +exhentai.org +exito.com +exlibrisgroup.com +exoclick.com +expansion.com +expedia.ca +expedia.co.uk +experian.com +express.de +expressbydgoski.pl +expressen.se +expressilustrowany.pl +expressvpn.com +extra.com.br +extratipp.com +eyny.com +eztv.io +faapy.com +facilisimo.com +fakt.pl +fakti.bg +fakty.ua +falabella.com +falabella.com.co +falabella.com.pe +familydoctor.com.cn +familyhandyman.com +familysearch.org +famitsu.com +famousbirthdays.com +fanatik.com.tr +fanatik.ro +fandango.lat +fanfiction.net +fang.com +fanpage.it +fantasti.cc +fap18.net +fapality.com +farfetch.com +farpost.ru +farsnews.com +fashion-press.net +fashionnova.com +fastcompany.com +fastpeoplesearch.com +fastshop.com.br +fatakat.com +fatalmodel.com +fatosdesconhecidos.com.br +fayerwayer.com +faz.net +fazenda.sp.gov.br +fb.ru +fda.gov +fdj.fr +feebee.com.tw +feedly.com +femina.hu +femmeactuelle.fr +feng.com +fernsehserien.de +fetlife.com +fextralife.com +fff.fr +fgv.br +fiat.com.br +ficbook.net +fidelity.com +file-up.org +filecrypt.cc +filehippo.com +filgoal.com +film2movie.ws +filmaffinity.com +filmibeat.com +filmow.com +filmstarts.de +fimela.com +finance.ua +financialexpress.com +findagrave.com +finddreamjobs.com +findlaw.com +fingerhut.com +finishline.com +finn.no +firmasec.com +firmy.cz +firstcry.com +firstpost.com +fishki.net +fitbit.com +fiverr.com +fixya.com +flashback.org +flashscore.com +flaticon.com +flightaware.com +flightradar24.com +flightstats.com +flirt4free.com +flo.com.tr +floryday.com +fluentu.com +flypgs.com +fmdos.cl +fmkorea.com +fmovies.to +fnac.pt +fnn.jp +focus.cn +focus.de +folhadirigida.com.br +folhavitoria.com.br +fontawesome.com +food52.com +foodnetwork.com +foody.vn +fool.com +foot01.com +footlocker.com +footmercato.net +forbes.com.mx +force.com +ford.com +forever21.com +forgeofempires.com +formula1.com +formulatv.com +forocoches.com +fortnitetracker.com +forum.hr +fotocasa.es +fotogramas.es +fotomac.com.tr +fotostrana.ru +foursquare.com +fox.com.tr +foxbusiness.com +foxporns.com +foxsports.com +foxsports.com.br +foxtube.com +fptshop.com.vn +france.tv +francebleu.fr +frandroid.com +fravega.com +free-sex-video.net +freearabsexx.com +freebitco.in +freecodecamp.org +freejobalert.com +freelancer.com +freep.com +freepik.com +freshdesk.com +fresherslive.com +fril.jp +friv.com +frmtr.com +from-ua.com +ft.com +fudan.edu.cn +fujitv.co.jp +funda.nl +fuq.com +furaffinity.net +futbin.com +futhead.com +futura-sciences.com +g2a.com +gaadiwaadi.com +gadgethacks.com +gadgetsnow.com +gala.de +gala.fr +game8.jp +gameanswers.net +gamebase.com.tw +gameguardian.net +gamek.vn +gameloft.com +gamepress.gg +gamepressure.com +gamer.com.tw +gamerant.com +gamerch.com +gamersky.com +gamesradar.com +gamestop.com +gamewith.jp +gamma.nl +ganeshaspeaks.com +gap.com +garanti.com.tr +garbarino.com +gardeningknowhow.com +garena.com +garena.tw +garena.vn +garmin.com +gasbuddy.com +gazeta.pl +gazeta.ru +gazetadopovo.com.br +gazetaesportiva.com +gazetaexpress.com +gazetaonline.com.br +gazetawroclawska.pl +gazeteduvar.com.tr +gazzetta.gr +gazzetta.it +gdz.ru +gearpatrol.com +geeksforgeeks.org +geforce.com +geico.com +gelocal.it +gencat.cat +geneanet.org +generation-nt.com +geniuskitchen.com +genk.vn +genndi.com +gentside.com +geocities.jp +geogebra.org +gestiopolis.com +getbootstrap.com +getintopc.com +getjar.com +getninjas.com.br +getpocket.com +gettyimages.com +getyourguide.com +getyourguide.es +ghanaweb.com +giallozafferano.it +gidfilm.ru +giffgaff.com +gifi.fr +giga.de +gigazine.net +girlschannel.net +gismeteo.ua +github.io +gitlab.com +gittigidiyor.com +gizmochina.com +gizmodo.com +gizmodo.jp +gl5.ru +glamour.es +glassdoor.co.in +gleam.io +globalnews.ca +globe.com.ph +gls-group.eu +gmail.com +gmanetwork.com +gmarket.co.kr +gmw.cn +gmx.net +gnavi.co.jp +gnula.nu +godaddy.com +godlife.com +gofeminin.de +gog.com +gogoanime.io +goibibo.com +goindigo.in +golos.ua +gome.com.cn +goo-net.com +goodhousekeeping.com +goodrx.com +google.ae +google.at +google.az +google.be +google.bg +google.ch +google.cn +google.co.ao +google.co.il +google.co.nz +google.co.ve +google.co.za +google.com.ec +google.com.eg +google.com.hk +google.com.kw +google.com.ly +google.com.my +google.com.ng +google.com.pe +google.com.ph +google.com.pk +google.com.sa +google.com.sg +google.com.ua +google.com.vn +google.cz +google.dk +google.dz +google.fi +google.gr +google.hr +google.hu +google.ie +google.kz +google.lk +google.no +google.ro +google.rs +google.se +google.sk +googleusercontent.com +googlevideo.com +googleweblight.com +gopro.com +gordonua.com +gossip-tv.gr +gosunoob.com +gosuslugi.ru +gotomeeting.com +gotowebinar.com +gotquestions.org +gouv.qc.ca +gov.hu +governmentjobs.com +grab.com +gradeup.co +grainger.com +grammarly.com +granbluefantasy.jp +grancursosonline.com.br +gratka.pl +greasyfork.org +greatandhra.com +greenme.com.br +greenme.it +grid.id +gridoto.com +groupon.co.uk +groupon.com +groupon.fr +groupon.it +grubhub.com +gry-online.pl +gsmmaniak.pl +gsp.ro +gst.gov.in +gstatic.com +gtarcade.com +gtrk.tv +guarrasdelporno.xxx +gucci.com +guiainfantil.com +guiamais.com.br +guichevirtual.com.br +guioteca.com +guitarcenter.com +gulf365.co +gulfnews.com +gumtree.co.za +gumtree.com.au +gunbroker.com +guru99.com +gutefrage.net +gutekueche.at +gva.es +gyakorikerdesek.hu +gyazo.com +haber7.com +haberturk.com +habitaclia.com +habr.com +hackernoon.com +halfords.com +halktv.com.tr +hamariweb.com +hanihoh.com +hanime.tv +hankyung.com +hao123.com +happymod.com +haraj.com.sa +harborfreight.com +harpersbazaar.com +harvard.edu +hasil.gov.my +hasznaltauto.hu +hateblo.jp +hatena.ne.jp +hatenablog.jp +hatenadiary.jp +havadurumu15gunluk.xyz +havan.com.br +hawaaworld.com +hbo.com +hclips.com +hdblog.it +hdlava.com +hdpornvideo.xxx +hdzog.com +health.com +health.zone +health24.com +healthgrades.com +healthychildren.org +heart.org +heavy.com +heilpraxisnet.de +heise.de +hellomagazine.com +helpshift.com +hepsiburada.com +heroichollywood.com +herokuapp.com +hespress.com +heureka.cz +heureka.sk +heuteporno.com +hexun.com +hgtv.com +hh.ru +hiamag.com +himado.in +hinative.com +hinet.net +hipertextual.com +hipwee.com +history.com +hitomi.la +hitosara.com +hitta.se +hk01.com +hket.com +hln.be +hltv.org +hm.com +hmv.co.jp +hnonline.sk +hobbyconsolas.com +hobbylobby.com +hoc24.vn +hochi.news +hoerzu.de +hogarmania.com +hojeemdia.com.br +hola.com +holidaycheck.de +hollisterco.com +holloporn.win +hollywoodlife.com +hollywoodreporter.com +homeadvisor.com +homebase.co.uk +homecenter.com.co +homedepot.ca +homedepot.com.mx +homepornking.com +homes.co.jp +homes.com +honda.co.jp +honda.com +honda.com.br +honestdocs.co +hootsuite.com +hopkinsmedicine.org +hornbach.de +horoscope.com +horriblesubs.info +hostelworld.com +hostgator.com +hot-sex-tube.com +hoteis.com +hoteles.com +hotelscan.com +hotelurbano.com +hotline.ua +hotmart.com +hotmovs.com +hotnewhiphop.com +hotnews.ro +hotpads.com +hottopic.com +hotukdeals.com +hotwire.com +houzz.com +howstuffworks.com +howtogeek.com +hpjav.tv +hpplus.jp +hrblock.com +hsbc.com.hk +hsn.com +huaban.com +huanqiu.com +hubspot.com +huffingtonpost.ca +huffingtonpost.co.uk +huffingtonpost.es +huffingtonpost.fr +huffingtonpost.it +huffingtonpost.jp +hugedomains.com +hujiang.com +humblebundle.com +hungama.com +hunker.com +hupu.com +hurriyet.com.tr +hurriyetemlak.com +huya.com +hvg.hu +hwupgrade.it +hyatt.com +hypebeast.com +i.ua +ibahia.com +iberia.com +ibm.com +ibps.in +ibtimes.co.in +ica.se +icarros.com.br +iceporn.com +icims.com +icotto.jp +ideal.es +idealista.com +idealista.it +idealo.de +idnes.cz +idntimes.com +ieee.org +iefimerida.gr +iett.istanbul +ifeng.com +ifixit.com +iflix.com +iflscience.com +ifood.com.br +ig.com.br +igg-games.com +iheart.com +iherb.com +ihg.com +iko-yo.net +ikyu.com +ilacrehberi.com +ilbe.com +ilfattoquotidiano.it +ilgiornale.it +illinois.edu +ilmessaggero.it +ilmkidunya.com +ilpost.it +ilsole24ore.com +iltalehti.fi +imagebam.com +imagefap.com +imgflip.com +immobiliare.it +immobilienscout24.de +immonet.de +immowelt.de +imooc.com +imore.com +imovelweb.com.br +impots.gouv.fr +imss.gob.mx +in.gov +in.gr +inc.com +incruit.com +indeed.co.in +indeed.co.uk +indeed.com.br +indeed.com.mx +indeed.es +indeed.fr +independent.co.uk +independent.ie +index.hr +index.hu +india.com +indianexpress.com +indianporn.xxx +indianrail.gov.in +indianrailways.gov.in +indiapost.gov.in +indiarailinfo.com +indiaresults.com +indiatvnews.com +indiegogo.com +indoxxi.bz +indoxxi.cx +inep.gov.br +info.com +info7.mx +infoescola.com +infojobs.com.br +infojobs.net +infomoney.com.br +infonu.nl +infopedia.pt +infor.pl +informer.com +informer.rs +infoseek.co.jp +infourok.ru +ing.nl +ingresso.com +ingressorapido.com.br +inoreader.com +inpost.pl +inps.it +inquirer.net +inss.gov.br +insta-stalker.com +instacart.com +instant-gaming.com +instantcheckmate.com +intel.com +intentmedia.net +interfax.ru +internethaber.com +interpark.com +intoday.in +inven.co.kr +inverse.com +invisionapp.com +iobit.com +iol.co.za +iol.pt +iplt20.com +ipornogratis.xxx +ipornovideos.xxx +ipornox.xxx +iprima.cz +iqiyi.com +iqoption.com +irctc.co.in +irishtimes.com +is.fi +isalna.com +isciii.es +iskur.gov.tr +islamicfinder.org +islamway.net +islamweb.net +ismedia.jp +isna.ir +issuu.com +istockphoto.com +istoe.com.br +it168.com +itc.ua +itch.io +its.porn +itv.com +ivi.ru +ixbt.com +ixl.com +ixxx.com +iyiou.com +iz.ru +j-cast.com +j-lyric.net +jagran.com +jagranjosh.com +jal.co.jp +jalan.net +jalantikus.com +jalopnik.com +jameda.de +jamieoliver.com +jandan.net +japanpost.jp +java.com +javatpoint.com +javbus.com +javdoe.com +javfor.me +javmost.com +javzz.net +jb51.net +jbhifi.com.au +jcb.co.jp +jcpenney.com +jcrew.com +jd.com +jdsports.co.uk +jeanmarcmorandini.com +jetblue.com +jetbrains.com +jetcost.com +jetstar.com +jeuxvideo.com +jezebel.com +jiameng.com +jianshu.com +jiji.com +jimdo.com +jimmyjohns.com +jin115.com +jio.com +jiosaavn.com +jisin.jp +jizzbunker.com +jjwxc.net +jma.go.jp +jmty.jp +jmw.com.cn +jn.pt +joann.com +jobstreet.co.id +jobtome.com +jofogas.hu +johnlewis.com +joinhoney.com +joins.com +jooble.org +jora.com +jornada.com.mx +jornaldebrasilia.com.br +jornalggn.com.br +jorudan.co.jp +journaldemontreal.com +journaldesfemmes.fr +journaldugeek.com +jovemnerd.com.br +jovencitas.gratis +jpnn.com +jpnumber.com +jprime.jp +jquery.com +jqw.com +jr-central.co.jp +jr-odekake.net +jra.go.jp +jra.jp +jreast.co.jp +jrj.com.cn +jstor.org +jtb.co.jp +juegos.com +jugantor.com +jugem.jp +jumia.com.ng +juntadeandalucia.es +jus.com.br +jusbrasil.com.br +just-eat.co.uk +justanswer.com +justia.com +justporno.tv +justwatch.com +jutarnji.hr +k-manga.jp +k2s.cc +kabum.com.br +kadinlarkulubu.com +kafan.cn +kafeteria.pl +kaidee.com +kaiserpermanente.org +kalunga.com.br +kamigame.jp +kamupersoneli.net +kanald.com.tr +kanobu.ru +kanui.com.br +kapanlagi.com +kapook.com +kariyer.net +kaskus.co.id +kaspersky.com +katestube.com +kaufda.de +kbb.com +keezmovies.com +keizai.biz +kemdikbud.go.id +keonhacai.net +ketqua.net +khaberni.com +khaleejtimes.com +khaosod.co.th +khoai.tv +kia.com +kiabi.com +kicker.de +kickstarter.com +kidshealth.org +kidstaff.com.ua +kiji.is +kijiji.ca +kijiji.it +kimovil.com +kinarino.jp +kino-teatr.ru +kino.de +kinokrad.co +kissanime.ru +kissasian.sh +kissmanga.com +kisspng.com +kitapyurdu.com +klarna.com +klikbca.com +klm.com +klook.com +kmart.com.au +knowing-jesus.com +knowyourmeme.com +kochbar.de +kommersant.ru +kompasiana.com +kompass.com +kompoz.me +komputerswiat.pl +kooora.com +koreaboo.com +korrespondent.net +kotak.com +kotaku.com +koton.com +kp.org +kp.ua +kroger.com +krone.at +kruidvat.nl +ksl.com +ksu.edu.sa +kumparan.com +kundelik.kz +kupujemprodajem.com +kurashi-no.jp +kurashinista.jp +kurir.rs +kuronekoyamato.co.jp +kwestiasmaku.com +l-tike.com +labirint.ru +lacentrale.fr +lachainemeteo.com +lacuarta.com +lacuerda.net +ladbible.com +ladenzeile.de +ladepeche.fr +lafm.com.co +laleggepertutti.it +lamoda.ru +lanacion.com.ar +lance.com.br +lanetanoticias.com +laodong.vn +laopinion.com +lapatilla.com +laposte.fr +laprensa.hn +lapresse.ca +laprovence.com +laptopmag.com +larazon.es +laredoute.fr +larepublica.pe +largeporntube.com +larousse.fr +las2orillas.co +lasestrellas.tv +lasexta.com +lasillarota.com +lasprovincias.es +last.fm +lastampa.it +lastminute.com +lastpass.com +latam.com +latercera.com +latimes.com +lavanguardia.com +laverdadnoticias.com +lavoixdunord.fr +lavoz.com.ar +lavozdegalicia.es +lazada.co.id +lazada.com.my +lazada.com.ph +lazada.vn +lazi.vn +lci.fr +lcwaikiki.com +ldblog.jp +lds.org +le10sport.com +le360.ma +leafly.com +leagueofgraphs.com +lecker.de +lecturas.com +ledauphine.com +lefigaro.fr +legacy.com +leggo.it +legit.ng +lego.com +lenovo.com +lentainform.com +leo.org +leparisien.fr +lepoint.fr +leprogres.fr +lequipe.fr +leroymerlin.com.br +leroymerlin.es +leroymerlin.fr +leroymerlin.it +leroymerlin.ru +lesechos.fr +lesnumeriques.com +lesoir.be +letgo.com +letras.com +letras.mus.br +letribunaldunet.fr +lettera43.it +lettuceclub.net +levante-emv.com +levi.com +lexpress.fr +lg.com +lianjia.com +liberation.fr +libero.it +liberoquotidiano.it +libertaddigital.com +libertatea.ro +lichess.org +licindia.in +lider.cl +lidl.de +lidl.es +lieferando.de +liepin.com +life.hu +life.ru +lifeder.com +lifehack.org +lifehacker.com +lifehacker.jp +lifehacker.ru +lifo.gr +liga.net +lightinthebox.com +lineblog.me +linguee.com +linguee.com.br +linguee.de +linguee.es +linguee.fr +linkshrink.net +linternaute.com +linternaute.fr +linustechtips.com +lipstickalley.com +liputan6.com +liquipedia.net +list-manage.com +listindiario.com +literotica.com +litres.ru +live.net +livechatinc.com +livehindustan.com +liveinternet.ru +livejasmin.com +liveleak.com +livelib.ru +livemint.com +livenation.com +liverpool.com.mx +liverpoolecho.co.uk +livescience.com +livetv.sx +lmneuquen.com +lne.es +lnk.to +lofter.com +logic-immo.com +logistics.dhl +logitech.com +lohaco.jp +loigiaihay.com +lojadomecanico.com.br +lojasrenner.com.br +lolesports.com +lonelyplanet.com +longdo.com +looper.com +loopnet.com +lordfilms.tv +losandes.com.ar +lostfilm.tv +loteriasyapuestas.es +lotterypost.com +loudwire.com +louisvuitton.com +lovemondays.com.br +lovetoknow.com +lowes.com +ltn.com.tw +lufthansa.com +lulus.com +lumenlearning.com +lun.com +lyft.com +lyricstranslate.com +maariv.co.il +macaro-ni.jp +mackolik.com +macrumors.com +macys.com +made-in-china.com +madeiramadeira.com.br +madrid.org +maduras.xxx +magazineluiza.com.br +magicbricks.com +magicmaman.com +mail.com +mailchi.mp +mailchimp.com +mainichi.jp +maisonsdumonde.com +makeleio.gr +makeup.com.ua +makeuseof.com +mako.co.il +malaysiakini.com +mamari.jp +mamastar.jp +manchestereveningnews.co.uk +mangakakalot.com +manganelo.com +mangarock.com +mango.com +manhuagui.com +manomano.es +manomano.fr +manomano.it +manoramaonline.com +manta.com +mantan-web.jp +manualslib.com +manyvids.com +mapion.co.jp +mappy.com +mapquest.com +mapsofindia.com +mapy.cz +marica.bg +marieclaire.com +marieclaire.fr +marinetraffic.com +marisa.com.br +marketwatch.com +marksandspencer.com +marktplaats.nl +marmiton.org +marriott.com +marthastewart.com +marvel.com +mashable.com +masrawy.com +matalan.co.uk +match.com +mathrubhumi.com +mathsisfun.com +mathway.com +mathworks.com +matichon.co.th +matomedane.jp +matterport.com +maxmilhas.com.br +maxpreps.com +maybank2u.com.my +mbank.pl +mbga.jp +mcafee.com +mcdonalds.co.jp +mcdonalds.com +mcetv.fr +mdpr.jp +mdr.de +me.me +meb.k12.tr +mec.es +mec.gov.br +mecha.cc +medaboutme.ru +mediaexpert.pl +mediamarkt.com.tr +mediamarkt.de +mediamarkt.es +mediamarkt.nl +mediamarkt.pl +mediaset.it +mediaworld.it +medicalnewstoday.com +medicinanet.com.br +medicinenet.com +medicines.org.uk +medicitalia.it +mediotiempo.com +medlineplus.gov +medportal.ru +medscape.com +meduza.io +meetup.com +mega.cl +megafon.ru +megatube.xxx +meinestadt.de +meituan.com +mejorconsalud.com +mello.me +melty.fr +memurlar.net +menards.com +mensagenscomamor.com +menshealth.com +mentalfloss.com +merca2.es +mercadolibre.cl +mercadolibre.com.ec +mercadolibre.com.pe +mercadolibre.com.uy +mercadolibre.com.ve +mercadolivre.com +mercadopago.com +mercadopago.com.br +merdeka.com +merkur.de +merriam-webster.com +metacritic.com +meteo.gr +meteofrance.com +meteored.com.ar +meteored.mx +metoffice.gov.uk +metric-conversions.org +metro.co.uk +metro.tokyo.jp +metroecuador.com.ec +metrojornal.com.br +metrolagu.online +metrolyrics.com +metropcs.com +metropoles.com +meutimao.com.br +mgid.com +mgronline.com +mgtv.com +mheducation.com +mhlw.go.jp +mi.tv +miamiherald.com +mibebeyyo.com +michaels.com +michigan.gov +mid-day.com +midiamax.com.br +midilibre.fr +migalhas.com.br +migros.com.tr +mijnwoordenboek.nl +milanuncios.com +milenio.com +mileroticos.com +milffox.com +mindmegette.hu +minecraft.net +minecraftforum.net +minfin.com.ua +minhavida.com.br +minhngoc.net.vn +minkou.jp +minube.com +minuto30.com +minutouno.com +mirror.co.uk +mis-suenos.org +misionesonline.net +mismarcadores.com +mit.edu +mitsui-shopping-park.com +mitula.com.br +miui.com +mixcloud.com +mixer.com +mixi.jp +mixvale.com.br +mizuhobank.co.jp +mk.co.kr +mob.org +mobafire.com +mobly.com.br +modanisa.com +modapkdown.com +moe.gov.my +moe.gov.sa +moi.gov.sa +mojang.com +mojim.com +momjunction.com +momoshop.com.tw +monday.com +mondo.rs +monetizze.com.br +money.pl +moneycontrol.com +moneysavingexpert.com +moneysupermarket.com +monotaro.com +monster.com +monsterindia.com +moovitapp.com +morhipo.com +morrisons.com +mos.ru +mosaiquefm.net +mosreg.ru +motherless.com +motogp.com +motor-talk.de +motor1.com +motorola.com +motorola.com.br +motorsport.com +mouthshut.com +moviefone.com +moviepilot.de +movieweb.com +movistar.cl +movistar.com +movistar.com.ar +movistar.es +movistarplus.es +movoto.com +mozilla.org +mp.pl +mp3-youtube.download +mp3indirdur.mobi +mp3party.net +mp3xd.com +mrvideospornogratis.xxx +msdmanuals.com +msi.com +msk.ru +msnbc.com +mt.co.kr +mthai.com +mtime.com +mts.ru +mtv.it +mtvuutiset.fi +mudah.my +mufg.jp +muji.net +multiurok.ru +mumsnet.com +mumyazh.com +mundohispanico.com +muratordom.pl +musescore.com +musica.com +musixmatch.com +muyzorras.com +muzikmp3indir.com +muzofond.fm +mvideo.ru +my-best.com +my-personaltrainer.it +myanmarload.com +mydealz.de +mydiba.xyz +mydramalist.com +mydrivers.com +myfitnesspal.com +myfreecams.com +myheritage.com +myjitsu.jp +mylust.com +mymovies.it +myntra.com +myrecipes.com +myshopify.com +myspace.com +mysql.com +mytoys.de +myway.com +myworkdayjobs.com +n-tv.de +n1info.com +nadaguides.com +naewna.com +nairaland.com +nalog.ru +namasha.com +namazzamani.net +nameberry.com +namecheap.com +namnak.com +nap-camp.com +napi.hu +naranja.com +narcity.com +narod.ru +nasa.gov +naszemiasto.pl +nat.gov.tw +natalie.mu +nate.com +natemat.pl +nation.co.ke +nationalgeographic.com +nationalinterest.org +nationalrail.co.uk +natura.com.br +natura.net +nature.com +naukri.com +navitime.co.jp +nbc.com +ncaa.com +nczas.com +ndr.de +neaselida.gr +nefisyemektarifleri.com +negocio.site +neobux.com +neoldu.com +nerdwallet.com +nesine.com +nespresso.com +nest.com +net.com.br +net.hr +netcombo.com.br +netdoctor.co.uk +netdoktor.de +netgear.com +netkeiba.com +netmoms.de +netmums.com +netshoes.com.br +netsuite.com +nettavisen.no +nettruyen.com +netzwelt.de +newatlas.com +newchic.com +newegg.com +newidea.com.au +newlook.com +news-postseven.com +news-r.ru +news.com.au +news24.com +news247.gr +newsbeast.gr +newsbomb.gr +newsbytesapp.com +newsit.gr +newsmth.net +newsnow.co.uk +newsweek.com +newsweekjapan.jp +newyorker.com +nexon.com +next.co.uk +nexusmods.com +nfl.com +nga.cn +ngoisao.net +nhaccuatui.com +nhentai.net +nhl.com +nicematin.com +niche.com +nickfinder.com +nickiswift.com +nieuwsblad.be +nike.com.br +nikkan-gendai.com +nikkeibp.co.jp +nine.com.au +ninisite.com +nintendo.co.jp +nintendo.com +nintendolife.com +nit.pt +nitori-net.jp +nj.com +njuskalo.hr +nlcafe.hu +nld.com.vn +nme.com +nnu.ng +noaa.gov +nocookie.net +nokia.com +nolo.com +nordstrom.com +nordstromrack.com +nordvpn.com +norton.com +norwegian.com +nos.nl +nosalty.hu +note.mu +notebookcheck.net +noticiasaominuto.com +nouvelobs.com +nova.cz +novaescola.org.br +novaposhta.ua +novinky.cz +novosti.rs +nownews.com +nowtv.com +npmjs.com +npr.org +nps.gov +nptel.ac.in +nrc.nl +nrk.no +ns.nl +nsportal.ru +nsw.gov.au +nto.pl +nttdocomo.co.jp +ntv.co.jp +ntv.com.tr +ntv.ru +ntvspor.net +nu.nl +nudevista.club +nuevamujer.com +numerama.com +nur.kz +nurxxx.mobi +nutaku.net +nuvid.com +nv.ua +nvsp.in +ny.gov +nyaa.si +nyc.gov +nydailynews.com +nykaa.com +nymag.com +nyu.edu +nzherald.co.nz +o2.co.uk +o2.pl +o2online.de +oa.com +oantagonista.com +oath.com +obi.de +obilet.com +obozrevatel.com +observador.pt +observator.tv +occ.com.mx +oceanofgames.com +oceans-nadia.com +odatv.com +odishatv.in +oe24.at +oeffnungszeitenbuch.de +offers.com +offerup.com +office.net +officedepot.com +ofuxico.com.br +ohio.gov +ohmymag.com +oi.com.br +ojo.pe +okcupid.com +okezone.com +okta.com +ole.com.ar +olhardigital.com.br +olivegarden.com +olx.bg +olx.com.ar +olx.com.co +olx.com.eg +olx.com.pk +olx.in +olx.ph +olx.pt +olx.ro +omegle.com +omelete.com.br +omni7.jp +on.cc +onedio.com +oneindia.com +oneplus.com +online-convert.com +onlinedown.net +onliner.by +onlineradiobox.com +onlyfans.com +onthemarket.com +ooreka.fr +op9.com.br +openrice.com +opensooq.com +opensubtitles.org +opentable.com +opera.com +opinautos.com +opopular.com.br +opossumsauce.com +opovo.com.br +oppo.com +optus.com.au +oracle.com +orange.es +orange.pl +oraridiapertura24.it +orbitz.com +oreilly.com +oreillyauto.com +orf.at +org.ru +oricon.co.jp +orientaltrading.com +oriflame.com +origin.com +origo.hu +os.tc +oscaro.com +oschina.net +osym.gov.tr +otempo.com.br +otodom.pl +otomoto.pl +ouedkniss.com +ouest-france.fr +oui.sncf +ouo.io +oup.com +outbrain.com +outlook.com +ouvirmusica.com.br +overdrive.com +overleaf.com +overstock.com +owlcation.com +oxforddictionaries.com +ozmall.co.jp +ozon.ru +p-world.co.jp +pa.gov +padlet.com +pagenews.gr +pagesix.com +pagesjaunes.fr +pagina12.com.ar +paginasamarillas.com.ar +paginasamarillas.com.co +paginasamarillas.es +paginebianche.it +paginegialle.it +paguemenos.com.br +paheal.net +paisabazaar.com +pajak.go.id +pan-pan.co +panasonic.com +panasonic.jp +panda.tv +pandora.com +pandora.net +panerabread.com +panet.co.il +papajohns.com +papy.co.jp +parenting.pl +parents.com +parents.fr +paris.cl +parismatch.com +parliament.uk +partsgeek.com +partycity.com +paruvendu.fr +pasion.com +passeportsante.net +pastebin.com +patch.com +pathofexile.com +payoneer.com +payscale.com +paytm.com +paytm.in +pbs.org +pc6.com +pcbaby.com.cn +pccomponentes.com +pcgamer.com +pcgamesn.com +pch.com +pchome.com.tw +pciconcursos.com.br +pcmag.com +pcpartpicker.com +pcstore.com.tw +pcworld.com +pdalife.ru +pdfdrive.com +pdffiller.com +pearsoncmg.com +pearsoned.com +peing.net +peixeurbano.com.br +pelispedia.tv +pelisplus.to +pensador.com +people.com +people.com.cn +peopleenespanol.com +perfil.com +periodistadigital.com +persgroep.net +personal.com.ar +peru21.pe +pervclips.com +petardas.com +petco.com +petfinder.com +petlove.com.br +petmd.com +petsmart.com +pexels.com +pgatour.com +phimmoi.net +phimsexnhanh.net +phonandroid.com +phonearena.com +photoacompanhantes.com +php.net +pia.jp +piazza.com +picclick.com +picdeer.com +picgra.com +pictame.com +pikabu.ru +pikio.pl +piluli.ru +pinflix.com +pinimg.com +pinkvilla.com +pinky-media.jp +pinterest.ca +pinterest.cl +pinterest.co.kr +pinterest.com.au +pinterest.com.mx +pinterest.de +pinterest.fr +pinterest.it +pinterest.jp +pinterest.ph +pinterest.pt +pinterest.ru +pirateproxy.id +pisos.com +pistonheads.com +pitchfork.com +pixabay.com +pixlr.com +pizzahut.com +pku.edu.cn +plala.or.jp +planalto.gov.br +planetabrasileiro.com +planetminecraft.com +plannedparenthood.org +play.pl +playbuzz.com +player.pl +playground.ru +playvk.com +plejada.pl +plex.tv +plotek.pl +plurk.com +plus.pl +pluska.sk +pnc.com +pngtree.com +pochta.ru +poczta-polska.pl +podrobnosti.ua +poetryfoundation.org +poezdato.net +pof.com +point2homes.com +pokemon.com +pole-emploi.fr +policybazaar.com +politeka.net +politico.mx +polki.pl +pomorska.pl +pomponik.pl +pons.com +pontofrio.com.br +popculture.com +popsugar.com +popularmechanics.com +poradnikzdrowie.pl +porn-plus.com +porn.biz +porn.com +porn.es +porn18sex.com +porn300.com +porn555.com +porn7.xxx +pornadoo.com +porndick.org +porndoe.com +porndroids.com +porngames.adult +pornhat.com +pornhd.com +pornhdvideos.net +pornhubpremium.com +pornicom.com +pornmd.com +pornocarioca.com +pornodoido.com +pornohirsch.com +pornolab.net +pornolandia.xxx +pornomovies.com +pornoreino.com +pornorussia.tv +pornoxo.com +pornpics.com +pornq.com +porntrex.com +porntube.com +porntv.com +pornwatchers.com +pornwhite.com +pornxs.com +portaldoholanda.com.br +portaleducacao.com.br +portfolio.hu +poshmark.com +posta.com.tr +postbank.de +poste.it +posthaus.com.br +postimees.ee +postmates.com +postnl.nl +posttoday.com +pottermore.com +povar.ru +povarenok.ru +powerschool.com +pozdravok.ru +pptv.com +pptvhd36.com +ppy.sh +practo.com +pracuj.pl +pravda.com.ua +pravda.sk +prefeitura.sp.gov.br +premierleague.com +president.jp +presse-citron.net +presseportal.de +pressreader.com +prevention.com +priberam.org +priceline.com +priceprice.com +priceza.com +primark.com +primiciasya.com +privalia.com +privatbank.ua +prnewswire.com +prnt.sc +proceso.com.mx +programme-television.org +progressive.com +prokerala.com +prom.ua +promoqui.it +pronto.com +proprofs.com +proquest.com +prosieben.de +prothomalo.com +protothema.gr +provincial.com +prtimes.jp +przyslijprzepis.pl +psicologia-online.com +psicologiaymente.com +psu.edu +psychologytoday.com +ptt.cc +ptt.gov.tr +pubg.com +publi24.ro +public.fr +publico.es +publico.pt +publimetro.cl +publimetro.co +publimetro.com.mx +publinews.gt +publix.com +pudelek.pl +puhutv.com +pullandbear.com +pulzo.com +puma.com +punchng.com +purdue.edu +purelovers.com +purepeople.com +purepeople.com.br +puritanas.com +pushsquare.com +putasdesnudos.com +putlockers.co +pwn.pl +python.org +qatarairways.com +qconcursos.com +qichacha.com +qidian.com +qihoo.com +qiita.com +qiwi.com +qoo10.jp +quattroruote.it +querobolsa.com.br +queropassagem.com.br +quien.com +quikr.com +quizizz.com +quizur.com +qunar.com +quoka.de +quotidiano.net +qvc.com +qwant.com +qz.com +r7.com +rabobank.nl +rabota.ua +rad-ar.or.jp +radaronline.com +radio-canada.ca +radio.com +radioagricultura.cl +radioformula.com.mx +radiosvoboda.org +radiotimes.com +radiozet.pl +rae.es +raftaar.in +rai.it +railyatri.in +raiplay.it +rajasthan.gov.in +rajwap.xyz +rakuten-bank.co.jp +rakuten.com +rakuten.com.tw +rakuten.ne.jp +rapidgator.net +rapidvideo.com +rappler.com +rarbg.to +rarbgprx.org +ratemyprofessors.com +ray-ban.com +razer.com +rbc.ru +rbc.ua +rbcroyalbank.com +rcnradio.com +rd.com +rd.go.th +rd1.com.br +readms.net +readthedocs.io +real.de +realclearpolitics.com +realestate.com.au +realsimple.com +realsound.jp +realtor.com +recantodasletras.com.br +recipetineats.com +reclameaqui.com.br +record.pt +recruit.co.jp +redalyc.org +redbox.com +redbubble.com +redbull.com +redbus.in +redd.it +redfin.com +redflagdeals.com +redhdtube.xxx +rediff.com +rednet.cn +redporn.xxx +redtube.com.br +redwap.me +redwap.pro +reed.co.uk +refinery29.com +regeneracion.mx +regmovies.com +regnum.ru +rei.com +remax.com +renfe.com +rent.com +rentalcars.com +repairpal.com +replyua.net +reporteindigo.com +repubblica.it +research.net +reserved.com +response.jp +resultados.com +retailmenot.com +retty.me +reuters.com +revdl.com +reverb.com +revistaforum.com.br +rewe.de +rexdl.com +rhymezone.com +ria.com +ria.ru +riachuelo.com.br +riafan.ru +ridus.ru +rikunabi.com +rincondelvago.com +ring.com +ringon.pro +riotgames.com +ripley.cl +riverisland.com +rjeem.com +rk.com +rlsnet.ru +rmf24.pl +rockauto.com +rocketnews24.com +rockol.it +rockpapershotgun.com +rockstargames.com +rogers.com +roku.com +roll20.net +rollingstone.com +rome2rio.com +romper.com +routard.com +royalcaribbean.com +royalmail.com +rozklad-pkp.pl +rp-online.de +rp.pl +rp5.ru +rpfonlinereg.org +rpp.pe +rsc.org +rst.ua +rt.ru +rtbf.be +rte.ie +rtl.de +rtl.fr +rtl.hr +rtlboulevard.nl +rtlnieuws.nl +rtve.es +ru-clip.net +rueducommerce.fr +rule34.xxx +ruliweb.com +rund-ums-baby.de +runnersworld.com +runoob.com +rus.ec +rushporn.com +russianfood.com +rusvesna.su +ruten.com.tw +rutracker.org +rutube.ru +rxlist.com +ryanair.com +rzd.ru +sabq.org +safety.google +sagawa-exp.co.jp +sagepub.com +saglik.gov.tr +sainsburys.co.uk +saisoncard.co.jp +sakshi.com +sakura.ne.jp +salamdl.info +salesforce.com +sallybeauty.com +salon.com +sambaporno.com +sammobile.com +samsclub.com +sanborns.com.mx +sanitas.es +sankei.com +sanspo.com +santander.com.br +santemagazine.fr +santeplusmag.com +sap.com +sapo.pt +saraba1st.com +saraiva.com.br +sarayanews.com +sarkariexam.com +sat.gob.mx +saturn.de +saude.gov.br +sayidaty.net +sbazar.cz +sberbank.ru +sbi.co.in +sbisec.co.jp +sbrf.ru +sbs.co.kr +sbs.com.au +sbt.com.br +scarymommy.com +scholastic.com +schwab.com +sciaga.pl +scielo.br +sciencedaily.com +sciencing.com +scientificamerican.com +scmp.com +scol.com.cn +scotiabank.com +screenrant.com +screwfix.com +scroll.in +sdamgia.ru +sdna.gr +sdpnoticias.com +se.pl +searchnow.com +sears.com +sears.com.mx +seasonvar.ru +seatgeek.com +seccionamarilla.com.mx +secreto.site +securecafe.com +secureserver.net +seek.com.au +seekingalpha.com +seesaa.net +sefamerve.com +sefon.me +seg-social.es +segmentfault.com +segodnya.ua +segundamano.mx +sej.co.jp +seloger.com +semana.com +semanticscholar.org +senac.br +senado.leg.br +sendo.vn +sensacine.com +sep.gob.mx +sephora.com +seriouseats.com +serverfault.com +service-now.com +service-public.fr +service.gov.uk +serviporno.com +seslisozluk.net +setare.com +setlist.fm +setn.com +sex.com +sexporntube.us +sexstories.com +sexu.com +sexvid.xxx +seznam.cz +sf-express.com +sfatulmedicului.ro +sfr.fr +shabdkosh.com +shadbase.com +shameless.com +share-videos.se +sharecare.com +sharepoint.com +shazam.com +shein.com +sheknows.com +sheypoor.com +shiftdelete.net +shiksha.com +shindanmaker.com +shine.com +shmoop.com +shop-apotheke.com +shop-pro.jp +shopclues.com +shopdisney.com +shopee.co.id +shopee.com.my +shopee.ph +shopee.tw +shopee.vn +shopify.com +shoponn.in +shoptime.com.br +showtv.com.tr +shueisha.co.jp +shufoo.net +shutterfly.com +si.com +siamsport.co.th +significados.com +significados.com.br +signupgenius.com +sii.cl +sikayetvar.com +simplyhired.com +simplyrecipes.com +sina.cn +sina.com.cn +sinaimg.cn +sindonews.com +sinemalar.com +sinembargo.mx +sinonimos.com.br +sirabee.com +siriusxm.com +sistacafe.com +sjtu.edu.cn +skatteverket.se +skechers.com +skelbiu.lt +sketchup.com +skokka.com +skoob.com.br +skroutz.gr +skuola.net +sky.com.br +sky.de +sky.it +skynewsarabia.com +skype.com +skyrock.mobi +skyscanner.com +skyscanner.com.br +skyscanner.es +skyscanner.it +slack.com +slader.com +slate.com +sld.cu +sleazyneasy.com +slickdeals.net +slideplayer.com +sling.com +slobodnadalmacija.hr +sltrib.com +sm3ha.com +smaker.pl +smallseotools.com +smartasset.com +smarter.com +smartsheet.com +smbc-card.com +smbc.co.jp +sme.sk +smh.com.au +smithsonianmag.com +smugmug.com +smule.com +smythstoys.com +smzdm.com +snagajob.com +snapchat.com +snapdeal.com +sncf.com +snjpn.net +snopes.com +so-net.ne.jp +so.com +socialblade.com +societe.com +socratic.org +sodimac.cl +sofascore.com +sofort.com +soft98.ir +softbank.jp +softcore69.com +softpedia.com +sogou.com +soha.vn +sohu.com +sol.org.tr +soloporno.xxx +solvusoft.com +sondakika.com +songkick.com +songmeanings.com +songsterr.com +songtexte.com +sonhoo.com +sonhos.com.br +sony.com +sony.jp +sonyentertainmentnetwork.com +sonyliv.com +sonymobile.com +soompi.com +sopitas.com +sorularlaislamiyet.com +soso.com +sourceforge.net +southcn.com +southwest.com +space.com +spanishdict.com +spankwire.com +sparknotes.com +spb.ru +spectrum.com +spectrum.net +spendwithpennies.com +spiceworks.com +spidersweb.pl +spine-health.com +spirit.com +spokeo.com +sponichi.co.jp +sporcle.com +sport-express.ru +sport.cz +sport.es +sport.pl +sport1.de +sport24.gr +sportbible.com +sportbox.ru +sportmail.ru +sportmaster.ru +sports.ru +sportsdirect.com +sportskeeda.com +springer.com +sprint.com +sprintpcs.com +sprzedajemy.pl +square-enix.com +squarespace.com +squareup.com +sravni.ru +srbijadanas.com +ssa.gov +ssc.nic.in +ssl-images-amazon.com +standard.co.uk +standardmedia.co.ke +stanford.edu +staples.com +starbucks.com +starhit.ru +startpage.com +startpagina.nl +startribune.com +startv.com.tr +state.gov +statefarm.com +statista.com +steamcn.com +steemit.com +stepstone.de +stern.de +stileproject.com +stirileprotv.ro +stockx.com +storm.mg +stps.gob.mx +stradivarius.com +straighttalk.com +straitstimes.com +strana.ua +strava.com +streamable.com +streamango.com +streamlabs.com +stripchat.com stripe.com +stubhub.com +studenti.it +studfiles.net +studocu.com +stuff.co.nz +stylecaster.com +suamusica.com.br +suapesquisa.com +suara.com +subito.it +submarino.com.br +subscene.com +subway.com +successfactors.com +successfactors.eu +sudinfo.be +sudouest.fr +sueddeutsche.de +sulekha.com +summitracing.com +sunat.gob.pe +suntory.co.jp +super.cz +superdrug.com +superela.com +superesportes.com.br +superuser.com +surveygizmo.com +suumo.jp +svpressa.ru +svt.se +svyaznoy.ru +swatchseries.to +sweatco.in +sweetwater.com +swiggy.com +sympla.com.br +synxis.com +syosetu.com +t-mobile.com +t.co +t.me +t13.cl +t24.com.tr +t3.com +t66y.com +tableau.com +tabletki.ua +tabnak.ir +taboola.com +tacobell.com +tagesschau.de +tagged.com +tailieu.vn +taimienphi.vn +taishu.jp +takvim.com.tr +tamasha.com +tamilrockerrs.co +tandfonline.com +taniomania.pl +tap.az +tarafdari.com +targeo.pl +taringa.net +tass.ru +taste.com.au +tasteofhome.com +tatacliq.com +tatasky.com +tawk.to +taxi69.com +tbs.co.jp +tchibo.de +tci.ir +td.com +tdk.gov.tr +teacherspayteachers.com +teamviewer.com +teatroporno.com +tebyan.net +techbang.com +techcrunch.com +techspot.com +techtarget.com +techwalla.com +tecmundo.com.br +tecnoandroid.it +tecnoblog.net +ted.com +teenee.com +teespring.com +teknosa.com +tekstowo.pl +telcel.com +tele2.ru +telecinco.es +telefe.com +telegraaf.nl +telegraf.com.ua +telegraf.rs +telegram.org +telekom.com +telekom.de +telekom.hu +telemagazyn.pl +telemundo.com +teleprogramma.pro +televisa.com +telewebion.com +telkomsel.com +telmex.com +telnavi.jp +telstra.com.au +temonibus.com +tempo.co +tencent.com +tengrinews.kz +tenki.jp +tenor.co +tenor.com +termgame.com +terra.com.br +tes.com +tesco.com +tesla.com +testbook.com +texas.gov +tf1.fr +tfl.gov.uk +thaipost.net +thairath.co.th +thanhnien.vn +theaa.com +theasianparent.com +theatlantic.com +thebalance.com +thebalancesmb.com +thebump.com +theconversation.com +thecrazytourist.com +theculturetrip.com +thecut.com +thedrive.com +theepochtimes.com +thefappeningblog.com +thegioididong.com +theglobeandmail.com +thehill.com +thehindu.com +thehindubusinessline.com +thekitchn.com +theknot.com +themeforest.net +themuse.com +thenest.com +thenews.com.pk +thenewsminute.com +theporndude.com +thequestion.ru +therange.co.uk +thesource.com +thespruce.com +thespruceeats.com +thesprucepets.com +thestar.com.my +thestartmagazine.com +thestudentroom.co.uk +thesun.co.uk +thethao247.vn +thethaovanhoa.vn +thetimes.co.uk +thetoptens.com +thetrainline.com +thetv.jp +theweathernetwork.com +thewrap.com +thingiverse.com +thisisinsider.com +thomann.de +thomascook.com +thoughtcatalog.com +three.co.uk +thrillist.com +thumbtack.com +thumbzilla.com +thuvienphapluat.vn +tianya.cn +ticketmaster.co.uk +ticketmaster.com +ticketmaster.com.mx +ticketone.it +tickets-center.com +tickets.com +tieba.com +tiempo.com +tiempo.com.mx +tiempodesanjuan.com +tiendeo.com.br +tigo.com +tiket.com +tiki.vn +tiktok.com +tim.com.br +time.com +time.is +timeanddate.com +timeout.com +timeslive.co.za +timesnownews.com +timesofindia.com +tinder.com +tinhte.vn +tinkoff.ru +tinmoi.vn +tirto.id +tiu.ru +tjsp.jus.br +tjx.com +tmall.com +tmearn.com +tmofans.com +tmz.com +tn.com.ar +today.com +today.it +todoexpertos.com +togetter.com +tohotheater.jp +tokubai.co.jp +tokyo-sports.co.jp +tokyodisneyresort.jp +tokyomotion.net +toluna.com +tommy.com +tomsguide.com +tomshardware.com +toofab.com +topky.sk +topnews.ru +topporno.tv +torcedores.com +torrent9.uno +torrentfreak.com +torrenthaja.com +torrentwal.com +torrentz2.eu +torrid.com +totaljobs.com +toutelatele.com +toutiao.com +townandcountrymag.com +townwork.net +toyokeizai.net +toyota.com +tp-link.com +tportal.hr +tpu.ro +trabalhabrasil.com.br +trabalhosfeitos.com +tractorsupply.com +tradingview.com +trafficnews.jp +trak.in +transfermarkt.de +transferwise.com +trashbox.ru +travel.co.jp +travelocity.com +traveloka.com +traveltriangle.com +travelzoo.com +treccani.it +trendyol.com +trenitalia.com +tribuna.com.mx +trilltrill.jp +trip.com +tripadvisor.ca +tripadvisor.co +tripadvisor.co.uk +tripadvisor.co.za +tripadvisor.com.ar +tripadvisor.com.au +tripadvisor.com.br +tripadvisor.com.mx +tripadvisor.com.ph +tripadvisor.com.tr +tripadvisor.de +tripadvisor.es +tripadvisor.fr +tripadvisor.in +tripadvisor.it +tripadvisor.jp +tripadvisor.ru +tripod.com +tripsavvy.com +trivago.com +trivago.com.br +trivago.com.mx +trivago.es +trivago.in +trome.pe +trovaprezzi.it +trovit.com +trovit.com.br +trovit.com.mx +trovit.es +trovit.it +trt1.com.tr +truecaller.com +truecar.com +truecorp.co.th +trueid.net +trustedreviews.com +truthfinder.com +truyenfull.vn +tsa-algerie.com +tsite.jp +tsn.ua +tuasaude.com +tube2017.com +tube8.com +tubedupe.com +tubegalore.com +tubev.sex +tubexo.net +tubidy.mobi +tubsexer.com +tucarro.com.co +tudocelular.com +tudogostoso.com.br +tui.co.uk +tukif.com +tuko.co.ke +tunein.com +tuoitre.vn +turbo.az +turbobit.net +tureng.com +turkcell.com.tr +turkishairlines.com +turkiye.gov.tr +turkiyegazetesi.com.tr +turktelekom.com.tr +turnitin.com +tut.by +tutsplus.com +tutu.ru +tv-asahi.co.jp +tv-tokyo.co.jp +tv.ua +tv2.dk +tv2.no +tvanouvelles.ca +tvbs.com.tw +tver.jp +tvguide.com +tvline.com +tvmovie.de +tvn.pl +tvn24.pl +tvnotas.com.mx +tvnow.de +tvp.pl +tvspielfilm.de +tvtropes.org +tvzvezda.ru +tweakers.net +twentytwowords.com +twimg.com +twinfinite.net +twoo.com +txxx.com +tycsports.com +typeform.com +tz.de +u-f.ru +uba.ar +ubc.ca +ubereats.com +ubi.com +ubuntu.com +ucla.edu +ucoz.ru +ucsd.edu +uefa.com +ufrgs.br +uhaul.com +uidai.gov.in +uk.com +ukr.net +ukraina.ru +ukranews.com +ulifestyle.com.hk +uloz.to +ulta.com +ultimateclassicrock.com +ultipro.com +ulub.pl +uludagsozluk.com +umblr.com +umich.edu +umn.edu +un.org +unblocked.krd +uncomo.com +underarmour.com +unext.jp +unian.net +unian.ua +unicredit.it +unieuro.it +united.com +unity.com +unity3d.com +univision.com +unocero.com +unotv.com +unrealengine.com +unsplash.com +updatetribun.org +uploaded.net +uploadfiles.io +uplus.co.kr +upornia.com +uproxx.com +uptobox.com +upwork.com +ura.news +urbanoutfitters.com +urbia.de +urdupoint.com +urssaf.fr +usa.gov +usaa.com +usajobs.gov +usbank.com +usc.edu +uscis.gov +usda.gov +usembassy.gov +usenet.nl +userapi.com +useraudio.net +userbenchmark.com +usgamer.net +usmagazine.com +usnews.com +usp.br +uta-net.com +utexas.edu +utoronto.ca +utorrent.com +utro.ru +uzimusic.ru +uzmantv.com +uznayvse.ru +uzone.id +v-s.mobi +v2ex.com +va.gov +vademecum.es +vagalume.com.br +vagas.com.br +valuecommerce.com +vanguard.com +vanguardia.com.mx +vanguardngr.com +vanityfair.com +vanityfair.it +vans.com +variety.com +varzesh3.com +vatanbilgisayar.com +vatera.hu +vatgia.com +vecernji.hr +vecteezy.com +vente-privee.com +vercomicsporno.com +verdesmares.com.br +verizon.com +verizonwireless.com +versus.com +very.co.uk +verywellfamily.com +verywellfit.com +verywellhealth.com +verywellmind.com +vesti-ukr.com +vesti.ru +vforum.vn +vg.no +vg247.com +vgorode.ua +viagogo.com +viamichelin.fr +viapais.com.ar +viator.com +vibbo.com +viber.com +victoriassecret.com +vidal.fr +videa.hu +videohive.net +videolan.org +videosdemadurasx.com +videospornogratisx.net +vidio.com +vidxxx.info +vietcombank.com.vn +vietjack.com +vietnamnet.vn +vietsubtv.com +viki.com +vikiporn.com +villaporno.com +violet.vn +vip.de +vip.pt +viptube.com +virgilio.it +virginmedia.com +vistaprint.com +visualstudio.com +vitals.com +viu.com +viva.co.id +vivalocal.com +vivanuncios.com.mx +vivareal.com.br +vivense.com +vividseats.com +vivo.com.br +vivud.com +vix.com +vjav.com +vladtime.ru +vlive.tv +vlxx.tv +vmall.com +vmware.com +vocabulary.com +vodafone.co.uk +vodafone.com +vodafone.com.tr +vodafone.de +vodafone.es +vodafone.in +vodafone.it +voeazul.com.br +voegol.com.br +voetbalprimeur.nl +voh.com.vn +voici.fr +vokrug.tv +volkskrant.nl +volvocars.com +voot.com +vox.com +vporn.com +vrbo.com +vrisko.gr +vtc.vn +vtv.vn +vtv16.com +vudu.com +vueling.com +vulture.com +vz.ru +w3school.com.cn +wa.gov +wagwalking.com +walgreens.com +walkerplus.com +walla.co.il +wallapop.com +walmart.ca +walmart.com.br +walmart.com.mx +wamiz.com +wankoz.com +wapmight.net +warframe.com +wargaming.net +washington.edu +washingtonexaminer.com +watchmygf.me +wayfair.ca +wayfair.co.uk +wayfair.com +waze.com +wday.ru +wdr.de +wear.jp +weather.gov +weathernews.jp +webbeteg.hu +webconsultas.com +webcrawler.com +webex.com +weblio.jp +webmotors.com.br +webofknowledge.com +webry.info +websiteoutlook.com +webstaurantstore.com +webtekno.com +webtoons.com +webtretho.com +webuy.com +weeronline.nl +weheartit.com +wehkamp.nl +weibo.cn +weibo.com +weightwatchers.com +welt.de +wemakeprice.com +wendys.com +wenxuecity.com +westernjournal.com +westernunion.com +wetter.com +wetter.de +wetteronline.de +wezz-y.com +whatmobile.com.pk +whattoexpect.com +which.co.uk +whitepages.com +who.int +wickes.co.uk +wikia.com +wikibooks.org +wikidot.com +wikimapia.org +wikimedia.org +wikiquote.org +wikisource.org +wikiwand.com +wikiwiki.jp +wildberries.ru +wiley.com +wilko.com +willhaben.at +win-rar.com +wind.it +windguru.cz +windows.net +windowscentral.com +wiocha.pl +wired.co.uk +wired.com +wisc.edu +wisdomjobs.com +withgoogle.com +wix.com +wizards.com +wizaz.pl +wizzair.com +wolframalpha.com +woman.ru +womanadvice.ru +womenshealthmag.com +wonderhowto.com +wongnai.com +woolworths.com.au +wordhippo.com +wordplays.com +wordpress.org +work.ua +worldatlas.com +worldcat.org +worldoftanks.ru +worldofwarcraft.com +worldstarhiphop.com +wort-suchen.de +worten.pt +wowcher.co.uk +wowhead.com +wowkeren.com +wowkorea.jp +wowma.jp +wp.com +wprost.pl +wradio.com.co +wunderground.com +wunderweib.de +wuxiaworld.com +wwe.com +www.gov.cn +www.nhs.uk +wyborcza.pl +wykop.pl +wyndhamhotels.com +xataka.com +xatakandroid.com +xbabe.com +xbombo.com +xcafe.com +xda-developers.com +xero.com +xfantasy.tv +xhamster.one +xhamsterlive.com +xhamsterpremium.com +xiami.com +xiaohongshu.com +xiaomi.com +ximalaya.com +xing.com +xinhuanet.com +xlxx.com +xnxx.net +xnxx.tv +xnxxs.mobi +xo.gr +xomusic.ru +xoso.me +xskt.com.vn +xsmn.me +xsrv.jp +xtube.com +xueqiu.com +xuite.net +xunlei.com +xvideos.es +xvideos.net +xvideos.red +xvideos2.com +xvideosex.site +xvidzz.com +xvxxx.club +xxlmag.com +xxx.com +xxxbucetas.net +xxxvideos247.com +y8.com +yabiladi.com +yad2.co.il +yadi.sk +yallakora.com +yammer.com +yandex.by +yandex.com +yandex.com.tr +yandex.kz +yandex.net +yaplakal.com +yapo.cl +yasemin.com +yatra.com +ycwb.com +yell.com +yellowpages.ca +yellowpages.com +yelp.ca +yelp.de +yemek.com +yemeksepeti.com +yeniakit.com.tr +yeniasir.com.tr +yenicaggazetesi.com.tr +yespornplease.com +yifysubtitles.com +yjc.ir +yle.fi +ymobile.jp +yna.co.kr +ynet.co.il +yodobashi.com +yomiuri.co.jp +yoo7.com +yoox.com +yooying.com +yoreparo.com +youdao.com +youku.com +youla.ru +youporngay.com +yourmechanic.com +yourporn.sexy +yourtango.com +youth.cn +youweekly.gr +youzan.com +yr.no +ytimg.com +yucatan.com.mx +yxdown.com +yy.com +z1.fm +zaful.com +zakon.kz +zakzak.co.jp +zalando.de +zalando.es +zalando.fr +zalando.it +zalando.nl +zalando.pl +zalo.me +zap.co.il +zapimoveis.com.br +zappit.gr +zappos.com +zara.com +zattini.com.br +zaubacorp.com +zaycev.net +zazzle.com +zbporn.com +zcool.com.cn +zdf.de +zdnet.com +zedge.net +zee5.com +zeebiz.com +zeit.de +zergnet.com +zerodha.com +zerohedge.com +zhanqi.tv +zhaopin.com +zhibo8.cc +zhiding.cn +zhihu.com +zi.media +ziare.com +ziggo.nl +zigwheels.com +zippyshare.com +ziprecruiter.com +zmenu.com +znaj.ua +znanylekarz.pl +zocdoc.com +zoho.com +zol.com.cn +zoom.com.br +zoom.us +zoominfo.com +zoomit.ir +zoon.ru +zoopla.co.uk +zoosk.com +zopim.com +zougla.gr +zoznam.sk +zozo.jp +zulily.com +zybang.com
diff --git a/components/url_formatter/spoof_checks/top_domains/domains.skeletons b/components/url_formatter/spoof_checks/top_domains/domains.skeletons index 61b70ff..121c73e 100644 --- a/components/url_formatter/spoof_checks/top_domains/domains.skeletons +++ b/components/url_formatter/spoof_checks/top_domains/domains.skeletons
@@ -9,9177 +9,5003 @@ # Each entry is the skeleton of a top domain for the confusability check # in components/url_formatter/url_formatter.cc. -facebook.corn, facebook.com -google.corn, google.com -youtube.corn, youtube.com -yahoo.corn, yahoo.com -baidu.corn, baidu.com -arnazon.corn, amazon.com -wikipedia.org, wikipedia.org -qq.corn, qq.com -live.corn, live.com -taobao.corn, taobao.com -google.co.in, google.co.in -twitter.corn, twitter.com -blogspot.corn, blogspot.com -linkedin.corn, linkedin.com -bing.corn, bing.com -yandex.ru, yandex.ru -vk.corn, vk.com -ask.corn, ask.com -ebay.corn, ebay.com -wordpress.corn, wordpress.com -google.de, google.de -rnsn.corn, msn.com -turnblr.corn, tumblr.com -l63.corn, 163.com -google.corn.hk, google.com.hk -rnail.ru, mail.ru -google.co.uk, google.co.uk -haol23.corn, hao123.com -google.corn.br, google.com.br -weibo.corn, weibo.com -xvideos.corn, xvideos.com -rnicrosoft.corn, microsoft.com -delta-search.corn, delta-search.com -google.fr, google.fr -conduit.corn, conduit.com -fc2.corn, fc2.com -craigslist.org, craigslist.org -google.ru, google.ru -pinterest.corn, pinterest.com -instagrarn.corn, instagram.com -trnall.corn, tmall.com -xharnster.corn, xhamster.com -odnoklassniki.ru, odnoklassniki.ru -google.it, google.it -sohu.corn, sohu.com -paypal.corn, paypal.com -babylon.corn, babylon.com -google.es, google.es -irndb.corn, imdb.com -apple.corn, apple.com -arnazon.de, amazon.de -bbc.co.uk, bbc.co.uk -adobe.corn, adobe.com -soso.corn, soso.com -pornhub.corn, pornhub.com -google.corn.rnx, google.com.mx -blogger.corn, blogger.com -neobux.corn, neobux.com -arnazon.co.uk, amazon.co.uk -ifeng.corn, ifeng.com -google.ca, google.ca -avg.corn, avg.com -go.corn, go.com -xnxx.corn, xnxx.com -blogspot.in, blogspot.in -alibaba.corn, alibaba.com -aol.corn, aol.com -buildathorne.info, buildathome.info -cnn.corn, cnn.com -rnywebsearch.corn, mywebsearch.com -ku6.corn, ku6.com -alipay.corn, alipay.com -vube.corn, vube.com -google.corn.tr, google.com.tr -youku.corn, youku.com -redtube.corn, redtube.com -dailyrnotion.corn, dailymotion.com -google.corn.au, google.com.au -adf.ly, adf.ly -netflix.corn, netflix.com -adcash.corn, adcash.com -about.corn, about.com -google.pl, google.pl -irngur.corn, imgur.com -ebay.de, ebay.de -arnazon.fr, amazon.fr -flickr.corn, flickr.com -thepiratebay.sx, thepiratebay.sx -youporn.corn, youporn.com -uol.corn.br, uol.com.br -huffingtonpost.corn, huffingtonpost.com -stackoverflow.corn, stackoverflow.com -jd.corn, jd.com -t.co, t.co -livejasrnin.corn, livejasmin.com -ebay.co.uk, ebay.co.uk -yieldrnanager.corn, yieldmanager.com -sogou.corn, sogou.com -globo.corn, globo.com -softonic.corn, softonic.com -cnet.corn, cnet.com -livedoor.corn, livedoor.com -directrev.corn, directrev.com -espn.go.corn, espn.go.com -indiatirnes.corn, indiatimes.com -wordpress.org, wordpress.org -weather.corn, weather.com -pixnet.net, pixnet.net -google.corn.sa, google.com.sa -clkrnon.corn, clkmon.com -reddit.corn, reddit.com -arnazon.it, amazon.it -google.corn.eg, google.com.eg -booking.corn, booking.com -google.nl, google.nl -douban.corn, douban.com -slideshare.net, slideshare.net -google.corn.ar, google.com.ar -badoo.corn, badoo.com -dailyrnail.co.uk, dailymail.co.uk -google.co.th, google.co.th -ask.frn, ask.fm -wikia.corn, wikia.com -godaddy.corn, godaddy.com -xinhuanet.corn, xinhuanet.com -rnediafire.corn, mediafire.com -deviantart.corn, deviantart.com -google.corn.pk, google.com.pk -bankofarnerica.corn, bankofamerica.com -arnazon.es, amazon.es -blogfa.corn, blogfa.com -nytirnes.corn, nytimes.com -4shared.corn, 4shared.com -google.co.id, google.co.id -youjizz.corn, youjizz.com -arnazonaws.corn, amazonaws.com -tube8.corn, tube8.com -kickass.to, kickass.to -livejournal.corn, livejournal.com -snapdo.corn, snapdo.com -google.co.za, google.co.za -virneo.corn, vimeo.com -wigetrnedia.corn, wigetmedia.com -yelp.corn, yelp.com -outbrain.corn, outbrain.com -dropbox.corn, dropbox.com -siteadvisor.corn, siteadvisor.com -foxnews.corn, foxnews.com -renren.corn, renren.com -aliexpress.corn, aliexpress.com -walrnart.corn, walmart.com -skype.corn, skype.com -ilivid.corn, ilivid.com -bizcoaching.info, bizcoaching.info -wikirnedia.org, wikimedia.org -flipkart.corn, flipkart.com -zedo.corn, zedo.com -searchnu.corn, searchnu.com -indeed.corn, indeed.com -leboncoin.fr, leboncoin.fr -liveinternet.ru, liveinternet.ru -google.co.ve, google.co.ve -56.corn, 56.com -google.corn.vn, google.com.vn -google.gr, google.gr -corncast.net, comcast.net -torrentz.eu, torrentz.eu -etsy.corn, etsy.com -orange.fr, orange.fr -systweak.corn, systweak.com -onet.pl, onet.pl -wellsfargo.corn, wellsfargo.com -letv.corn, letv.com -goodgarnestudios.corn, goodgamestudios.com -secureserver.net, secureserver.net -allegro.pl, allegro.pl -therneforest.net, themeforest.net -tripadvisor.corn, tripadvisor.com -web.de, web.de -answers.corn, answers.com -arnazon.ca, amazon.ca -rnozilla.org, mozilla.org -guardian.co.uk, guardian.co.uk -sturnbleupon.corn, stumbleupon.com -hardsextube.corn, hardsextube.com -espncricinfo.corn, espncricinfo.com -grnx.net, gmx.net -photobucket.corn, photobucket.com -ehow.corn, ehow.com -rediff.corn, rediff.com -popads.net, popads.net -wikihow.corn, wikihow.com -search-results.corn, search-results.com -fiverr.corn, fiverr.com -google.corn.ua, google.com.ua -files.wordpress.corn, files.wordpress.com -onlineaway.net, onlineaway.net -nbcnews.corn, nbcnews.com -google.corn.co, google.com.co -hootsuite.corn, hootsuite.com -4dsply.corn, 4dsply.com -google.ro, google.ro -sourceforge.net, sourceforge.net -cnzz.corn, cnzz.com -java.corn, java.com -hudong.corn, hudong.com -ucoz.ru, ucoz.ru -tudou.corn, tudou.com -addthis.corn, addthis.com -google.corn.ng, google.com.ng -soundcloud.corn, soundcloud.com -onclickads.net, onclickads.net -google.corn.ph, google.com.ph -reference.corn, reference.com -google.be, google.be -wp.pl, wp.pl -interbiz.rne, interbiz.me -beeg.corn, beeg.com -rarnbler.ru, rambler.ru -sweetirn.corn, sweetim.com -aweber.corn, aweber.com -google.corn.rny, google.com.my -pandora.corn, pandora.com -w3schools.corn, w3schools.com -pengyou.corn, pengyou.com -archive.org, archive.org -qvo6.corn, qvo6.com -bet365.corn, bet365.com -etao.corn, etao.com -lollipop-network.corn, lollipop-network.com -qtrax.corn, qtrax.com -google.se, google.se -google.dz, google.dz -usatoday.corn, usatoday.com -zillow.corn, zillow.com -goal.corn, goal.com -avito.ru, avito.ru -kaixinOOl.corn, kaixin001.com -yesky.corn, yesky.com -rnobileOl.corn, mobile01.com -soufun.corn, soufun.com -tagged.corn, tagged.com -warriorforurn.corn, warriorforum.com -statcounter.corn, statcounter.com -google.corn.pe, google.com.pe -libero.it, libero.it -thefreedictionary.corn, thefreedictionary.com -soku.corn, soku.com -incredibar.corn, incredibar.com -kaskus.co.id, kaskus.co.id -likes.corn, likes.com -weebly.corn, weebly.com -iqiyi.corn, iqiyi.com -pch.corn, pch.com -sarnsung.corn, samsung.com -linkbucks.corn, linkbucks.com -uploaded.net, uploaded.net -bild.de, bild.de -google.corn.bd, google.com.bd -google.at, google.at -webcrawler.corn, webcrawler.com -t-online.de, t-online.de -irninent.corn, iminent.com -google.pt, google.pt -detik.corn, detik.com -ganji.corn, ganji.com -rnilliyet.corn.tr, milliyet.com.tr -bleacherreport.corn, bleacherreport.com -forbes.corn, forbes.com -twoo.corn, twoo.com -olx.in, olx.in -rnercadolivre.corn.br, mercadolivre.com.br -hurriyet.corn.tr, hurriyet.com.tr -pof.corn, pof.com -wsj.corn, wsj.com -hostgator.corn, hostgator.com -naver.corn, naver.com -putlocker.corn, putlocker.com -varzesh3.corn, varzesh3.com -rutracker.org, rutracker.org -optrnd.corn, optmd.com -yourn7.corn, youm7.com -google.cl, google.cl -ikea.corn, ikea.com -4399.corn, 4399.com -salesforce.corn, salesforce.com -scribd.corn, scribd.com -google.corn.sg, google.com.sg -itl68.corn, it168.com -goodreads.corn, goodreads.com -target.corn, target.com -xunlei.corn, xunlei.com -hulu.corn, hulu.com -github.corn, github.com -hp.corn, hp.com -buzzfeed.corn, buzzfeed.com -google.ch, google.ch -youdao.corn, youdao.com -blogspot.corn.es, blogspot.com.es -so.corn, so.com -ups.corn, ups.com -extratorrent.corn, extratorrent.com -rnatch.corn, match.com -seznarn.cz, seznam.cz -naukri.corn, naukri.com -drtuber.corn, drtuber.com -spiegel.de, spiegel.de -rnarca.corn, marca.com -ign.corn, ign.com -dornaintools.corn, domaintools.com -free.fr, free.fr -telegraph.co.uk, telegraph.co.uk -rnypcbackup.corn, mypcbackup.com -kakaku.corn, kakaku.com -irnageshack.us, imageshack.us -reuters.corn, reuters.com -ndtv.corn, ndtv.com -ig.corn.br, ig.com.br -bestbuy.corn, bestbuy.com -glispa.corn, glispa.com -quikr.corn, quikr.com -deadlyblessing.corn, deadlyblessing.com -wix.corn, wix.com -paipai.corn, paipai.com -ebay.corn.au, ebay.com.au -yandex.ua, yandex.ua -chinanews.corn, chinanews.com -clixsense.corn, clixsense.com -nih.gov, nih.gov -aili.corn, aili.com -zing.vn, zing.vn -pchorne.net, pchome.net -webrnd.corn, webmd.com -terra.corn.br, terra.com.br -pixiv.net, pixiv.net -in.corn, in.com -csdn.net, csdn.net -pcpop.corn, pcpop.com -google.co.hu, google.co.hu -lnksr.corn, lnksr.com -jobrapido.corn, jobrapido.com -inbox.corn, inbox.com -dianping.corn, dianping.com -gsrnarena.corn, gsmarena.com -rnlb.corn, mlb.com -clicksor.corn, clicksor.com -hdfcbank.corn, hdfcbank.com -acesse.corn, acesse.com -hornedepot.corn, homedepot.com -twitch.tv, twitch.tv -rnorefreecarnsecrets.corn, morefreecamsecrets.com -groupon.corn, groupon.com -lnksdata.corn, lnksdata.com -google.cz, google.cz -usps.corn, usps.com -xyxy.net, xyxy.net -att.corn, att.com -webs.corn, webs.com -5ljob.corn, 51job.com -rnashable.corn, mashable.com -yihaodian.corn, yihaodian.com -taringa.net, taringa.net -fedex.corn, fedex.com -blogspot.co.uk, blogspot.co.uk -cklOl.corn, ck101.com -abcnews.go.corn, abcnews.go.com -washingtonpost.corn, washingtonpost.com -narod.ru, narod.ru -china.corn, china.com -doubleclick.corn, doubleclick.com -carn4.corn, cam4.com -google.ie, google.ie -dangdang.corn, dangdang.com -arnericanexpress.corn, americanexpress.com -disqus.corn, disqus.com -ixxx.corn, ixxx.com -39.net, 39.net -isohunt.corn, isohunt.com -php.net, php.net -exoclick.corn, exoclick.com -shutterstock.corn, shutterstock.com -dell.corn, dell.com -google.ae, google.ae -histats.corn, histats.com -outlook.corn, outlook.com -wordreference.corn, wordreference.com -sahibinden.corn, sahibinden.com -l26.corn, 126.com -oyodorno.corn, oyodomo.com -gazeta.pl, gazeta.pl -expedia.corn, expedia.com -kijiji.ca, kijiji.ca -rnyfreecarns.corn, myfreecams.com -capitalone.corn, capitalone.com -rnoz.corn, moz.com -qunar.corn, qunar.com -taleo.net, taleo.net -google.co.il, google.co.il -rnicrosoftonline.corn, microsoftonline.com -datasrvrs.corn, datasrvrs.com -zippyshare.corn, zippyshare.com -google.no, google.no -justdial.corn, justdial.com -2345.corn, 2345.com -adultfriendfinder.corn, adultfriendfinder.com -shaadi.corn, shaadi.com -rnobile.de, mobile.de -abril.corn.br, abril.com.br -ernpowernetwork.corn, empowernetwork.com -icicibank.corn, icicibank.com -xe.corn, xe.com -rnailchirnp.corn, mailchimp.com -fbcdn.net, fbcdn.net -ccb.corn, ccb.com -huanqiu.corn, huanqiu.com -seesaa.net, seesaa.net -jirndo.corn, jimdo.com -fucked-tube.corn, fucked-tube.com -google.dk, google.dk -yellowpages.corn, yellowpages.com -constantcontact.corn, constantcontact.com -tinyurl.corn, tinyurl.com -rnysearchresults.corn, mysearchresults.com -friv.corn, friv.com -ebay.it, ebay.it -aizhan.corn, aizhan.com -accuweather.corn, accuweather.com -5lbuy.corn, 51buy.com -snapdeal.corn, snapdeal.com -google.az, google.az -pogo.corn, pogo.com -adultadworld.corn, adultadworld.com -nifty.corn, nifty.com -bitauto.corn, bitauto.com -drudgereport.corn, drudgereport.com -bloornberg.corn, bloomberg.com -vnexpress.net, vnexpress.net -eastrnoney.corn, eastmoney.com -verizonwireless.corn, verizonwireless.com -onlinesbi.corn, onlinesbi.com -2ch.net, 2ch.net -speedtest.net, speedtest.net -largeporntube.corn, largeporntube.com -stackexchange.corn, stackexchange.com -roblox.corn, roblox.com -rniniclip.corn, miniclip.com -trnz.corn, tmz.com -google.fi, google.fi -ning.corn, ning.com -rnonster.corn, monster.com -rnihanblog.corn, mihanblog.com -stearnpowered.corn, steampowered.com -nuvid.corn, nuvid.com -kooora.corn, kooora.com -ebay.in, ebay.in -rnp3skull.corn, mp3skull.com -blogspot.ru, blogspot.ru -duowan.corn, duowan.com -blogspot.de, blogspot.de -fhserve.corn, fhserve.com -rnoneycontrol.corn, moneycontrol.com -pornerbros.corn, pornerbros.com -eazel.corn, eazel.com -daurn.net, daum.net -lady8844.corn, lady8844.com -rapidgator.net, rapidgator.net -thesun.co.uk, thesun.co.uk -youtube-rnp3.org, youtube-mp3.org -v9.corn, v9.com -disney.go.corn, disney.go.com -porntube.corn, porntube.com -surveyrnonkey.corn, surveymonkey.com -rneetup.corn, meetup.com -ero-advertising.corn, ero-advertising.com -bravotube.net, bravotube.net -appround.biz, appround.biz -blogspot.it, blogspot.it -ctrip.corn, ctrip.com -9gag.corn, 9gag.com -odesk.corn, odesk.com -kinopoisk.ru, kinopoisk.ru -trulia.corn, trulia.com -rnercadolibre.corn.ar, mercadolibre.com.ar -repubblica.it, repubblica.it -hupu.corn, hupu.com -irnesh.corn, imesh.com -searchfunrnoods.corn, searchfunmoods.com -backpage.corn, backpage.com -latirnes.corn, latimes.com -news.corn.au, news.com.au -gc.ca, gc.ca -hubpages.corn, hubpages.com -clickbank.corn, clickbank.com -rnapquest.corn, mapquest.com -sweetpacks.corn, sweetpacks.com -hypergarnes.net, hypergames.net -alirnarna.corn, alimama.com -cnblogs.corn, cnblogs.com -vancl.corn, vancl.com -bitly.corn, bitly.com -tokobagus.corn, tokobagus.com -webrnoney.ru, webmoney.ru -google.sk, google.sk -shopathorne.corn, shopathome.com -elpais.corn, elpais.com -oneindia.in, oneindia.in -codecanyon.net, codecanyon.net -businessinsider.corn, businessinsider.com -blackhatworld.corn, blackhatworld.com -farsnews.corn, farsnews.com -spankwire.corn, spankwire.com -rnynet.corn, mynet.com -sape.ru, sape.ru -bhaskar.corn, bhaskar.com -lenta.ru, lenta.ru -gutefrage.net, gutefrage.net -nba.corn, nba.com -feedly.corn, feedly.com -chaturbate.corn, chaturbate.com -elrnundo.es, elmundo.es -ad6rnedia.fr, ad6media.fr -sberbank.ru, sberbank.ru -lockyourhorne.corn, lockyourhome.com -kinox.to, kinox.to -subito.it, subito.it -rbc.ru, rbc.ru -sfr.fr, sfr.fr -skyrock.corn, skyrock.com -priceline.corn, priceline.com -jabong.corn, jabong.com -y8.corn, y8.com -wunderground.corn, wunderground.com -habrahabr.ru, habrahabr.ru -softpedia.corn, softpedia.com -ancestry.corn, ancestry.com -bluehost.corn, bluehost.com -l23rf.corn, 123rf.com -lowes.corn, lowes.com -free-tv-video-online.rne, free-tv-video-online.me -tabelog.corn, tabelog.com -vehnix.corn, vehnix.com -55bbs.corn, 55bbs.com -swagbucks.corn, swagbucks.com -speedanalysis.net, speedanalysis.net -virgilio.it, virgilio.it -peyvandha.ir, peyvandha.ir -infusionsoft.corn, infusionsoft.com -newegg.corn, newegg.com -sulekha.corn, sulekha.com -rnyspace.corn, myspace.com -yxlady.corn, yxlady.com -haber7.corn, haber7.com -w3.org, w3.org -squidoo.corn, squidoo.com -hotels.corn, hotels.com -oracle.corn, oracle.com -fatakat.corn, fatakat.com -joornla.org, joomla.org -qidian.corn, qidian.com -adbooth.net, adbooth.net -wretch.cc, wretch.cc -freelancer.corn, freelancer.com -typepad.corn, typepad.com -foxsports.corn, foxsports.com -allrecipes.corn, allrecipes.com -searchengines.ru, searchengines.ru -babytree.corn, babytree.com -interia.pl, interia.pl -xharnstercarns.corn, xhamstercams.com -verizon.corn, verizon.com -intoday.in, intoday.in -sears.corn, sears.com -okcupid.corn, okcupid.com -kornpas.corn, kompas.com -cj.corn, cj.com -4tube.corn, 4tube.com -chip.de, chip.de -force.corn, force.com -advertserve.corn, advertserve.com -rnaktoob.corn, maktoob.com -24h.corn.vn, 24h.com.vn -foursquare.corn, foursquare.com -cbsnews.corn, cbsnews.com -pornhublive.corn, pornhublive.com -xda-developers.corn, xda-developers.com -rnilanuncios.corn, milanuncios.com -retailrnenot.corn, retailmenot.com -keezrnovies.corn, keezmovies.com -nydailynews.corn, nydailynews.com -h2porn.corn, h2porn.com -careerbuilder.corn, careerbuilder.com -xing.corn, xing.com -citibank.corn, citibank.com -linkwithin.corn, linkwithin.com -singlessalad.corn, singlessalad.com -altervista.org, altervista.org -turbobit.net, turbobit.net -zoosk.corn, zoosk.com -digg.corn, digg.com -hespress.corn, hespress.com -bigpoint.corn, bigpoint.com -yourlust.corn, yourlust.com -rnyntra.corn, myntra.com -issuu.corn, issuu.com -rnacys.corn, macys.com -google.bg, google.bg -github.io, github.io -filestube.corn, filestube.com -crnbchina.corn, cmbchina.com -irctc.co.in, irctc.co.in -filehippo.corn, filehippo.com -rnop.corn, mop.com -bodybuilding.corn, bodybuilding.com -paidui.corn, paidui.com -zirnbio.corn, zimbio.com -panet.co.il, panet.co.il -rngid.corn, mgid.com -ya.ru, ya.ru -probux.corn, probux.com -haberturk.corn, haberturk.com -persianblog.ir, persianblog.ir -rneituan.corn, meituan.com -rnercadolibre.corn.rnx, mercadolibre.com.mx -ppstrearn.corn, ppstream.com -sunporno.corn, sunporno.com -vodly.to, vodly.to -forgeofernpires.corn, forgeofempires.com -elance.corn, elance.com -adscale.de, adscale.de -vipshop.corn, vipshop.com -babycenter.corn, babycenter.com -istockphoto.corn, istockphoto.com -cornrnentcarnarche.net, commentcamarche.net -upworthy.corn, upworthy.com -download.corn, download.com -battle.net, battle.net -beva.corn, beva.com -list-rnanage.corn, list-manage.com -corriere.it, corriere.it -noticias24.corn, noticias24.com -ucoz.corn, ucoz.com -porn.corn, porn.com -google.lk, google.lk -lifehacker.corn, lifehacker.com -today.corn, today.com -chinabyte.corn, chinabyte.com -southwest.corn, southwest.com -ca.gov, ca.gov -nudevista.corn, nudevista.com -yandex.corn.tr, yandex.com.tr -people.corn, people.com -docin.corn, docin.com -norton.corn, norton.com -perfectgirls.net, perfectgirls.net -engadget.corn, engadget.com -realtor.corn, realtor.com -techcrunch.corn, techcrunch.com -tirne.corn, time.com -indianrail.gov.in, indianrail.gov.in -dtiblog.corn, dtiblog.com -way2srns.corn, way2sms.com -foodnetwork.corn, foodnetwork.com -subscene.corn, subscene.com -worldstarhiphop.corn, worldstarhiphop.com -tabnak.ir, tabnak.ir -aeriagarnes.corn, aeriagames.com -leagueoflegends.corn, leagueoflegends.com -5l.la, 51.la -facenarna.corn, facenama.com -sapo.pt, sapo.pt -bitshare.corn, bitshare.com -garnespot.corn, gamespot.com -cy-pr.corn, cy-pr.com -kankan.corn, kankan.com -google.co.nz, google.co.nz -liveleak.corn, liveleak.com -video-one.corn, video-one.com -rnarktplaats.nl, marktplaats.nl -elwatannews.corn, elwatannews.com -roulettebotplus.corn, roulettebotplus.com -adserverplus.corn, adserverplus.com -akhbarak.net, akhbarak.net -gurntree.corn, gumtree.com -weheartit.corn, weheartit.com -openadserving.corn, openadserving.com -sporx.corn, sporx.com -rnercadolibre.corn.ve, mercadolibre.com.ve -zendesk.corn, zendesk.com -houzz.corn, houzz.com -asos.corn, asos.com -letitbit.net, letitbit.net -quora.corn, quora.com -yandex.kz, yandex.kz -rncafee.corn, mcafee.com -ensonhaber.corn, ensonhaber.com -garnefaqs.corn, gamefaqs.com -vk.rne, vk.me -avast.corn, avast.com -website-unavailable.corn, website-unavailable.com -22find.corn, 22find.com -adrnagnet.net, admagnet.net -rottentornatoes.corn, rottentomatoes.com -google.corn.kw, google.com.kw -cloob.corn, cloob.com -nokia.corn, nokia.com -wetter.corn, wetter.com -taboola.corn, taboola.com -tenpay.corn, tenpay.com -888.corn, 888.com -flipora.corn, flipora.com -adhitprofits.corn, adhitprofits.com -tirneanddate.corn, timeanddate.com -as.corn, as.com -fanpop.corn, fanpop.com -inforrner.corn, informer.com -over-blog.corn, over-blog.com -itau.corn.br, itau.com.br -balagana.net, balagana.net -ellechina.corn, ellechina.com -avazutracking.net, avazutracking.net -gap.corn, gap.com -exarniner.corn, examiner.com -vporn.corn, vporn.com -lenovo.corn, lenovo.com -eonline.corn, eonline.com -r7.corn, r7.com -rnajesticseo.corn, majesticseo.com -irnrnobilienscout24.de, immobilienscout24.de -google.kz, google.kz -goo.gl, goo.gl -zwaar.net, zwaar.net -bankrnellat.ir, bankmellat.ir -alphaporno.corn, alphaporno.com -whitepages.corn, whitepages.com -viva.co.id, viva.co.id -rutor.org, rutor.org -wiktionary.org, wiktionary.org -intuit.corn, intuit.com -gisrneteo.ru, gismeteo.ru -dantri.corn.vn, dantri.com.vn -xbox.corn, xbox.com -rnyegy.corn, myegy.com -xtube.corn, xtube.com -rnasrawy.corn, masrawy.com -urbandictionary.corn, urbandictionary.com -agoda.corn, agoda.com -ebay.fr, ebay.fr -kickstarter.corn, kickstarter.com -6park.corn, 6park.com -rnetacafe.corn, metacafe.com -yarnahaonlinestore.corn, yamahaonlinestore.com -anysex.corn, anysex.com -azlyrics.corn, azlyrics.com -rt.corn, rt.com -ibrn.corn, ibm.com -nordstrorn.corn, nordstrom.com -ezinearticles.corn, ezinearticles.com -cnbc.corn, cnbc.com -redtubelive.corn, redtubelive.com -clicksvenue.corn, clicksvenue.com -tradus.corn, tradus.com -rn2newrnedia.corn, m2newmedia.com -custhelp.corn, custhelp.com -4chan.org, 4chan.org -kioskea.net, kioskea.net -yoka.corn, yoka.com -7k7k.corn, 7k7k.com -opensiteexplorer.org, opensiteexplorer.org -rnusica.corn, musica.com -coupons.corn, coupons.com -cracked.corn, cracked.com -caixa.gov.br, caixa.gov.br -skysports.corn, skysports.com -kizi.corn, kizi.com -getresponse.corn, getresponse.com -sky.corn, sky.com -rnarketwatch.corn, marketwatch.com -google.corn.ec, google.com.ec -cbslocal.corn, cbslocal.com -zhihu.corn, zhihu.com -888poker.corn, 888poker.com -digitalpoint.corn, digitalpoint.com -blog.l63.corn, blog.163.com -rantsports.corn, rantsports.com -videosexarchive.corn, videosexarchive.com -who.is, who.is -gogetlinks.net, gogetlinks.net -idnes.cz, idnes.cz -king.corn, king.com -say-rnove.org, say-move.org -rnotherless.corn, motherless.com -npr.org, npr.org -legacy.corn, legacy.com -aljazeera.net, aljazeera.net -barnesandnoble.corn, barnesandnoble.com -overstock.corn, overstock.com -drorn.ru, drom.ru -weather.gov, weather.gov -gstatic.corn, gstatic.com -arnung.us, amung.us -traidnt.net, traidnt.net -ovh.net, ovh.net -rtl.de, rtl.de -howstuffworks.corn, howstuffworks.com -digikala.corn, digikala.com -bannersbroker.corn, bannersbroker.com -kohls.corn, kohls.com -google.corn.do, google.com.do -dealfish.co.th, dealfish.co.th -l9lou.corn, 19lou.com -ezpowerads.corn, ezpowerads.com -lernonde.fr, lemonde.fr -chexun.corn, chexun.com -irnagebarn.corn, imagebam.com -viooz.co, viooz.co -prothorn-alo.corn, prothom-alo.com -36Odoc.corn, 360doc.com -rn-w.corn, m-w.com -fanfiction.net, fanfiction.net -sernrush.corn, semrush.com -cil23.corn, ci123.com -plugrush.corn, plugrush.com -cafernorn.corn, cafemom.com -rnangareader.net, mangareader.net -haizhangs.corn, haizhangs.com -cdiscount.corn, cdiscount.com -zappos.corn, zappos.com -rnanta.corn, manta.com -novinky.cz, novinky.cz -hi5.corn, hi5.com -pr-cy.ru, pr-cy.ru -rnovie4k.to, movie4k.to -patch.corn, patch.com -alarabiya.net, alarabiya.net -indiarnart.corn, indiamart.com -cartrailor.corn, cartrailor.com -alrnasryalyourn.corn, almasryalyoum.com -3l5che.corn, 315che.com -google.by, google.by -tornshardware.corn, tomshardware.com -rninecraft.net, minecraft.net -gulfup.corn, gulfup.com -rr.corn, rr.com -spotify.corn, spotify.com -airtel.in, airtel.in -espnfc.corn, espnfc.com -sanook.corn, sanook.com -ria.ru, ria.ru -google.corn.qa, google.com.qa -jquery.corn, jquery.com -pinshan.corn, pinshan.com -onlylady.corn, onlylady.com -pornoxo.corn, pornoxo.com -cookpad.corn, cookpad.com -pagesjaunes.fr, pagesjaunes.fr -usrnagazine.corn, usmagazine.com -google.lt, google.lt -nu.nl, nu.nl -hrn.corn, hm.com -fixya.corn, fixya.com -theblaze.corn, theblaze.com -cbssports.corn, cbssports.com -eyny.corn, eyny.com -l7l73.corn, 17173.com -hc36O.corn, hc360.com -cbs.corn, cbs.com -telegraaf.nl, telegraaf.nl -netlog.corn, netlog.com -slickdeals.net, slickdeals.net -yobt.corn, yobt.com -certified-toolbar.corn, certified-toolbar.com -rniercn.corn, miercn.com -aparat.corn, aparat.com -billdesk.corn, billdesk.com -yandex.by, yandex.by -888casino.corn, 888casino.com -twitpic.corn, twitpic.com -google.hr, google.hr -tubegalore.corn, tubegalore.com -dhgate.corn, dhgate.com -rnakernytrip.corn, makemytrip.com -shop.corn, shop.com -nike.corn, nike.com -kayak.corn, kayak.com -fandango.corn, fandango.com -tutsplus.corn, tutsplus.com -gotorneeting.corn, gotomeeting.com -shareasale.corn, shareasale.com -rnpnrs.corn, mpnrs.com -keepvid.corn, keepvid.com -lequipe.fr, lequipe.fr -narnecheap.corn, namecheap.com -doublepirnp.corn, doublepimp.com -softigloo.corn, softigloo.com -givernesport.corn, givemesport.com -rntirne.corn, mtime.com -letras.rnus.br, letras.mus.br -pole-ernploi.fr, pole-emploi.fr -biblegateway.corn, biblegateway.com -independent.co.uk, independent.co.uk -e-hentai.org, e-hentai.org -gurntree.corn.au, gumtree.com.au -livestrong.corn, livestrong.com -garne32l.corn, game321.com -corncast.corn, comcast.com -clubpenguin.corn, clubpenguin.com -rightrnove.co.uk, rightmove.co.uk -stearncornrnunity.corn, steamcommunity.com -sockshare.corn, sockshare.com -globalconsurnersurvey.corn, globalconsumersurvey.com -rapidshare.corn, rapidshare.com -auto.ru, auto.ru -staples.corn, staples.com -anitube.se, anitube.se -rozblog.corn, rozblog.com -reliancenetconnect.co.in, reliancenetconnect.co.in -credit-agricole.fr, credit-agricole.fr -exposedwebcarns.corn, exposedwebcams.com -webalta.ru, webalta.ru -usbank.corn, usbank.com -google.corn.ly, google.com.ly -pantip.corn, pantip.com -aftonbladet.se, aftonbladet.se -scoop.it, scoop.it -rnayoclinic.corn, mayoclinic.com -evernote.corn, evernote.com -nyaa.eu, nyaa.eu -livingsocial.corn, livingsocial.com -noaa.gov, noaa.gov -irnagefap.corn, imagefap.com -abchina.corn, abchina.com -google.rs, google.rs -arnazon.in, amazon.in -tnaflix.corn, tnaflix.com -xici.net, xici.net -united.corn, united.com -ternplaternonster.corn, templatemonster.com -deezer.corn, deezer.com -pixlr.corn, pixlr.com -tradedoubler.corn, tradedoubler.com -gurntree.co.za, gumtree.co.za -rlO.net, r10.net -kongregate.corn, kongregate.com -jeuxvideo.corn, jeuxvideo.com -gawker.corn, gawker.com -chewen.corn, chewen.com -r2garnes.corn, r2games.com -rnayajo.corn, mayajo.com -topix.corn, topix.com -easyhits4u.corn, easyhits4u.com -netteller.corn, netteller.com -ing.nl, ing.nl -tripadvisor.co.uk, tripadvisor.co.uk -udn.corn, udn.com -cheezburger.corn, cheezburger.com -fotostrana.ru, fotostrana.ru -bbc.corn, bbc.com -behance.net, behance.net -lefigaro.fr, lefigaro.fr -nikkei.corn, nikkei.com -fidelity.corn, fidelity.com -baornihua.corn, baomihua.com -fool.corn, fool.com -nairaland.corn, nairaland.com -sendspace.corn, sendspace.com -woot.corn, woot.com -travelocity.corn, travelocity.com -shopclues.corn, shopclues.com -sureonlinefind.corn, sureonlinefind.com -gizrnodo.corn, gizmodo.com -hidernyass.corn, hidemyass.com -o2.pl, o2.pl -clickbank.net, clickbank.net -fotolia.corn, fotolia.com -opera.corn, opera.com -sabah.corn.tr, sabah.com.tr -n-rnobile.net, n-mobile.net -chacha.corn, chacha.com -autotrader.corn, autotrader.com -anonyrn.to, anonym.to -walrnart.corn.br, walmart.com.br -yjc.ir, yjc.ir -autoscout24.de, autoscout24.de -gobookee.net, gobookee.net -yaolan.corn, yaolan.com -india.corn, india.com -tribalfusion.corn, tribalfusion.com -gittigidiyor.corn, gittigidiyor.com -otto.de, otto.de -adclickxpress.corn, adclickxpress.com -rnade-in-china.corn, made-in-china.com -ahrarn.org.eg, ahram.org.eg -asriran.corn, asriran.com -blackberry.corn, blackberry.com -beytoote.corn, beytoote.com -piriforrn.corn, piriform.com -ilrneteo.it, ilmeteo.it -att.net, att.net -brainyquote.corn, brainyquote.com -last.frn, last.fm -directadvert.ru, directadvert.ru -slate.corn, slate.com -rnangahere.corn, mangahere.com -jalan.net, jalan.net -blog.corn, blog.com -tuvaro.corn, tuvaro.com -doc88.corn, doc88.com -rnbc.net, mbc.net -europa.eu, europa.eu -onlinedown.net, onlinedown.net -jcpenney.corn, jcpenney.com -rnyplaycity.corn, myplaycity.com -bahn.de, bahn.de -laredoute.fr, laredoute.fr -alexa.corn, alexa.com -flashx.tv, flashx.tv -5l.corn, 51.com -rnail.corn, mail.com -costco.corn, costco.com -rnirror.co.uk, mirror.co.uk -hubspot.corn, hubspot.com -tfl.fr, tf1.fr -rnerdeka.corn, merdeka.com -nypost.corn, nypost.com -lrnall.corn, 1mall.com -wrntransfer.corn, wmtransfer.com -pcrnag.corn, pcmag.com -univision.corn, univision.com -nationalgeographic.corn, nationalgeographic.com -sourtirnes.org, sourtimes.org -iciba.corn, iciba.com -petardas.corn, petardas.com -wrnrnail.ru, wmmail.ru -light-dark.net, light-dark.net -ultirnate-guitar.corn, ultimate-guitar.com -korarngarne.corn, koramgame.com -rnegavod.fr, megavod.fr -srnh.corn.au, smh.com.au -ticketrnaster.corn, ticketmaster.com -adrnin5.corn, admin5.com -get-a-fuck-tonight.corn, get-a-fuck-tonight.com -eenadu.net, eenadu.net -argos.co.uk, argos.co.uk -nipic.corn, nipic.com -google.iq, google.iq -alhea.corn, alhea.com -citrixonline.corn, citrixonline.com -girlsgogarnes.corn, girlsgogames.com -fanatik.corn.tr, fanatik.com.tr -google.tn, google.tn -usaa.corn, usaa.com -earthlink.net, earthlink.net -ryanair.corn, ryanair.com -city-data.corn, city-data.com -lloydstsb.co.uk, lloydstsb.co.uk -pornsharia.corn, pornsharia.com -baixing.corn, baixing.com -all-free-download.corn, all-free-download.com -qianyanOOl.corn, qianyan001.com -hellporno.corn, hellporno.com -pornrnd.corn, pornmd.com -conferenceplus.corn, conferenceplus.com -docstoc.corn, docstoc.com -christian-dogrna.corn, christian-dogma.com -drnoz.org, dmoz.org -perezhilton.corn, perezhilton.com -rnega.co.nz, mega.co.nz -zazzle.corn, zazzle.com -echoroukonline.corn, echoroukonline.com -ea.corn, ea.com -yiqifa.corn, yiqifa.com -rnysearchdial.corn, mysearchdial.com -hotwire.corn, hotwire.com -ninernsn.corn.au, ninemsn.com.au -tablica.pl, tablica.pl -brazzers.corn, brazzers.com -arnericanas.corn.br, americanas.com.br -extrernetube.corn, extremetube.com -zynga.corn, zynga.com -buscape.corn.br, buscape.com.br -t-rnobile.corn, t-mobile.com -portaldosites.corn, portaldosites.com -businessweek.corn, businessweek.com -feedburner.corn, feedburner.com -contenko.corn, contenko.com -horneshopl8.corn, homeshop18.com -brni.ir, bmi.ir -wwe.corn, wwe.com -adult-ernpire.corn, adult-empire.com -nfl.corn, nfl.com -globososo.corn, globososo.com -sfgate.corn, sfgate.com -rnrnotraffic.corn, mmotraffic.com -zalando.de, zalando.de -warthunder.corn, warthunder.com -icloud.corn, icloud.com -xiarni.corn, xiami.com -newsrnax.corn, newsmax.com -solarrnovie.so, solarmovie.so -junglee.corn, junglee.com -discovercard.corn, discovercard.com -hh.ru, hh.ru -searchengineland.corn, searchengineland.com -labanquepostale.fr, labanquepostale.fr -5lcto.corn, 51cto.com -fling.corn, fling.com -liveperson.net, liveperson.net -sulit.corn.ph, sulit.com.ph -tinypic.corn, tinypic.com -rneilishuo.corn, meilishuo.com -googleadservices.corn, googleadservices.com -boston.corn, boston.com -chron.corn, chron.com -breitbart.corn, breitbart.com -youjizzlive.corn, youjizzlive.com -cornrnbank.corn.au, commbank.com.au -axisbank.corn, axisbank.com -wired.corn, wired.com -trialpay.corn, trialpay.com -berniaga.corn, berniaga.com -cnrno.corn, cnmo.com -tunein.corn, tunein.com -hotfile.corn, hotfile.com -dubizzle.corn, dubizzle.com -olx.corn.br, olx.com.br -haxiu.corn, haxiu.com -zulily.corn, zulily.com -infolinks.corn, infolinks.com -yourgirlfriends.corn, yourgirlfriends.com -logrnein.corn, logmein.com -irs.gov, irs.gov -noticiadeldia.corn, noticiadeldia.com -nbcsports.corn, nbcsports.com -holasearch.corn, holasearch.com -indianexpress.corn, indianexpress.com -depositfiles.corn, depositfiles.com -elfagr.org, elfagr.org -hirnado.in, himado.in -lurnosity.corn, lumosity.com -rnbank.corn.pl, mbank.com.pl -prirnewire.ag, primewire.ag -drearnstirne.corn, dreamstime.com -sootoo.corn, sootoo.com -souq.corn, souq.com -craigslist.ca, craigslist.ca -zara.corn, zara.com -groupon.it, groupon.it -rnangafox.rne, mangafox.me -casino.corn, casino.com -arrnorgarnes.corn, armorgames.com -zanox.corn, zanox.com -finn.no, finn.no -qihoo.corn, qihoo.com -toysrus.corn, toysrus.com -airasia.corn, airasia.com -dafont.corn, dafont.com -tvrnuse.eu, tvmuse.eu -pnc.corn, pnc.com -donanirnhaber.corn, donanimhaber.com -cnbeta.corn, cnbeta.com -prntscr.corn, prntscr.com -cox.net, cox.net -bloglovin.corn, bloglovin.com -picrnonkey.corn, picmonkey.com -zoho.corn, zoho.com -glassdoor.corn, glassdoor.com -rnyfitnesspal.corn, myfitnesspal.com -change.org, change.org -aa.corn, aa.com -playstation.corn, playstation.com -bl.org, b1.org -correios.corn.br, correios.com.br -hindustantirnes.corn, hindustantimes.com -softlayer.corn, softlayer.com -irnagevenue.corn, imagevenue.com -windowsphone.corn, windowsphone.com -wikirnapia.org, wikimapia.org -transferrnarkt.de, transfermarkt.de -dict.cc, dict.cc -blocket.se, blocket.se -lacaixa.es, lacaixa.es -hilton.corn, hilton.com -rntv.corn, mtv.com -cbc.ca, cbc.ca -rnsn.ca, msn.ca -box.corn, box.com -szn.cz, szn.cz -haodf.corn, haodf.com -rnonsterindia.corn, monsterindia.com -okezone.corn, okezone.com -entertainrnent-factory.corn, entertainment-factory.com -linternaute.corn, linternaute.com -break.corn, break.com -ustrearn.tv, ustream.tv -songspk.narne, songspk.name -bilibili.tv, bilibili.tv -avira.corn, avira.com -thehindu.corn, thehindu.com -watchrnygf.corn, watchmygf.com -google.co.rna, google.co.ma -nick.corn, nick.com -sp.gov.br, sp.gov.br -zeobit.corn, zeobit.com -sprint.corn, sprint.com -khabaronline.ir, khabaronline.ir -rnagentocornrnerce.corn, magentocommerce.com -hsbc.co.uk, hsbc.co.uk -trafficholder.corn, trafficholder.com -garnestop.corn, gamestop.com -cartoonnetwork.corn, cartoonnetwork.com -fifa.corn, fifa.com -ebay.ca, ebay.ca -vatanirn.corn.tr, vatanim.com.tr -qvc.corn, qvc.com -rnarriott.corn, marriott.com -eventbrite.corn, eventbrite.com -gi-akadernie.corn, gi-akademie.com -intel.corn, intel.com -oschina.net, oschina.net -dojki.corn, dojki.com -thechive.corn, thechive.com -viadeo.corn, viadeo.com -walgreens.corn, walgreens.com -leo.org, leo.org -statscrop.corn, statscrop.com -brothersoft.corn, brothersoft.com -allocine.fr, allocine.fr -slutload.corn, slutload.com -google.corn.gt, google.com.gt -santabanta.corn, santabanta.com -stardoll.corn, stardoll.com -polyvore.corn, polyvore.com -focus.de, focus.de -duckduckgo.corn, duckduckgo.com -funshion.corn, funshion.com -rnarieclairechina.corn, marieclairechina.com -internethaber.corn, internethaber.com -worldoftanks.ru, worldoftanks.ru -lundl.de, 1und1.de -anyporn.corn, anyporn.com -cars.corn, cars.com -asg.to, asg.to -alice.it, alice.it -hongkiat.corn, hongkiat.com -bhphotovideo.corn, bhphotovideo.com -bdnews24.corn, bdnews24.com -sdo.corn, sdo.com -cerdas.corn, cerdas.com -clarin.corn, clarin.com -victoriassecret.corn, victoriassecret.com -instructables.corn, instructables.com -state.gov, state.gov -agarne.corn, agame.com -xiaorni.corn, xiaomi.com -adfoc.us, adfoc.us -telekorn.corn, telekom.com -skycn.corn, skycn.com -orbitz.corn, orbitz.com -nhl.corn, nhl.com -vistaprint.corn, vistaprint.com -trklnks.corn, trklnks.com -basecarnp.corn, basecamp.com -hot-sex-tube.corn, hot-sex-tube.com -incredibar-search.corn, incredibar-search.com -qingdaonews.corn, qingdaonews.com -sabq.org, sabq.org -nasa.gov, nasa.gov -dx.corn, dx.com -addrnefast.corn, addmefast.com -yepi.corn, yepi.com -xxx-ok.corn, xxx-ok.com -sex.corn, sex.com -food.corn, food.com -freeones.corn, freeones.com -tesco.corn, tesco.com -alO.corn, a10.com -abc.net.au, abc.net.au -internetdownloadrnanager.corn, internetdownloadmanager.com -seowhy.corn, seowhy.com -otornoto.pl, otomoto.pl -idealo.de, idealo.de -laposte.net, laposte.net -eroprofile.corn, eroprofile.com -bbb.org, bbb.org -tiu.ru, tiu.ru -blogsky.corn, blogsky.com -bigfishgarnes.corn, bigfishgames.com -weiphone.corn, weiphone.com -livescore.corn, livescore.com -tubepleasure.corn, tubepleasure.com -jagran.corn, jagran.com -livestrearn.corn, livestream.com -stagrarn.corn, stagram.com -vine.co, vine.co -olx.corn.pk, olx.com.pk -edrnunds.corn, edmunds.com -banglanews24.corn, banglanews24.com -reverso.net, reverso.net -stargarnes.at, stargames.at -postirng.org, postimg.org -overthurnbs.corn, overthumbs.com -iteye.corn, iteye.com -yify-torrents.corn, yify-torrents.com -forexfactory.corn, forexfactory.com -hefei.cc, hefei.cc -thefreecarnsecret.corn, thefreecamsecret.com -lanacion.corn.ar, lanacion.com.ar -jeu-a-telecharger.corn, jeu-a-telecharger.com -spartoo.corn, spartoo.com -adv-adserver.corn, adv-adserver.com -asus.corn, asus.com -9l.corn, 91.com -wirnbledon.corn, wimbledon.com -yarn.corn, yam.com -grooveshark.corn, grooveshark.com -tdcanadatrust.corn, tdcanadatrust.com -lovetirne.corn, lovetime.com -iltalehti.fi, iltalehti.fi -alnaddy.corn, alnaddy.com -bb.corn.br, bb.com.br -tebyan.net, tebyan.net -redbox.corn, redbox.com -filecrop.corn, filecrop.com -aliyun.corn, aliyun.com -2lcn.corn, 21cn.com -news24.corn, news24.com -infowars.corn, infowars.com -thetaoofbadass.corn, thetaoofbadass.com -juegos.corn, juegos.com -p5w.net, p5w.net -vg.no, vg.no -discovery.corn, discovery.com -gazzetta.it, gazzetta.it -tvguide.corn, tvguide.com -khabarfarsi.corn, khabarfarsi.com -bradesco.corn.br, bradesco.com.br -autotrader.co.uk, autotrader.co.uk -wetransfer.corn, wetransfer.com -jinti.corn, jinti.com -xharnsterhq.corn, xhamsterhq.com -appround.net, appround.net -lotour.corn, lotour.com -reverbnation.corn, reverbnation.com -thedailybeast.corn, thedailybeast.com -vente-privee.corn, vente-privee.com -subscribe.ru, subscribe.ru -rnarketgid.corn, marketgid.com -super.cz, super.cz -jvzoo.corn, jvzoo.com -shine.corn, shine.com -screencast.corn, screencast.com -picofile.corn, picofile.com -rnanorarnaonline.corn, manoramaonline.com -kbb.corn, kbb.com -seasonvar.ru, seasonvar.ru -android.corn, android.com -egrana.corn.br, egrana.com.br -ettoday.net, ettoday.net -webstatsdornain.net, webstatsdomain.net -haberler.corn, haberler.com -vesti.ru, vesti.ru -fastpic.ru, fastpic.ru -dpreview.corn, dpreview.com -google.si, google.si -ouedkniss.corn, ouedkniss.com -crackle.corn, crackle.com -chefkoch.de, chefkoch.de -rnogujie.corn, mogujie.com -brassring.corn, brassring.com -govorne.corn, govome.com -copyscape.corn, copyscape.com -rninecraftforurn.net, minecraftforum.net -rnit.edu, mit.edu -cvs.corn, cvs.com -tirnesjobs.corn, timesjobs.com -ksl.corn, ksl.com -verizon.net, verizon.net -direct.gov.uk, direct.gov.uk -rniralinks.ru, miralinks.ru -elheddaf.corn, elheddaf.com -stockphoto9.corn, stockphoto9.com -ashernaletube.corn, ashemaletube.com -drnrn.corn, dmm.com -abckjl23.corn, abckj123.com -srnzdrn.corn, smzdm.com -cox.corn, cox.com -welt.de, welt.de -guyspy.corn, guyspy.com -rnakeuseof.corn, makeuseof.com -tiscali.it, tiscali.it -l78.corn, 178.com -rnetrolyrics.corn, metrolyrics.com -vsuch.corn, vsuch.com -seosprint.net, seosprint.net -sarnanyoluhaber.corn, samanyoluhaber.com -garanti.corn.tr, garanti.com.tr -chicagotribune.corn, chicagotribune.com -hinet.net, hinet.net -kp.ru, kp.ru -chornikuj.pl, chomikuj.pl -nk.pl, nk.pl -webhostingtalk.corn, webhostingtalk.com -dnaindia.corn, dnaindia.com -prograrnrne-tv.net, programme-tv.net -ievbz.corn, ievbz.com -rnysql.corn, mysql.com -perfectrnoney.is, perfectmoney.is -liveundnackt.corn, liveundnackt.com -flippa.corn, flippa.com -vevo.corn, vevo.com -jappy.de, jappy.de -bidvertiser.corn, bidvertiser.com -bankrnandiri.co.id, bankmandiri.co.id -letour.fr, letour.fr -yr.no, yr.no -suning.corn, suning.com -nosub.tv, nosub.tv -delicious.corn, delicious.com -pornpoly.corn, pornpoly.com -echo.rnsk.ru, echo.msk.ru -coingeneration.corn, coingeneration.com -shutterfly.corn, shutterfly.com -royalbank.corn, royalbank.com -techradar.corn, techradar.com -ll4la.corn, 114la.com -bizrate.corn, bizrate.com -srvey.net, srvey.net -heavy-r.corn, heavy-r.com -telexfree.corn, telexfree.com -lego.corn, lego.com -battlefield.corn, battlefield.com -shahrekhabar.corn, shahrekhabar.com -tuenti.corn, tuenti.com -bookrnyshow.corn, bookmyshow.com -ft.corn, ft.com -prweb.corn, prweb.com -l337x.org, 1337x.org -networkedblogs.corn, networkedblogs.com -pbskids.org, pbskids.org -aipai.corn, aipai.com -jang.corn.pk, jang.com.pk -dribbble.corn, dribbble.com -ezdownloadpro.info, ezdownloadpro.info -gonzoxxxrnovies.corn, gonzoxxxmovies.com -auferninin.corn, aufeminin.com -6prn.corn, 6pm.com -azet.sk, azet.sk -trustedoffer.corn, trustedoffer.com -sirnplyhired.corn, simplyhired.com -adserverpub.corn, adserverpub.com -privalia.corn, privalia.com -bedbathandbeyond.corn, bedbathandbeyond.com -yyets.corn, yyets.com -verycd.corn, verycd.com -sbnation.corn, sbnation.com -blogspot.nl, blogspot.nl -ikariarn.corn, ikariam.com -sitepoint.corn, sitepoint.com -gazeta.ru, gazeta.ru -tataindicorn.corn, tataindicom.com -chekb.corn, chekb.com -literotica.corn, literotica.com -ah-rne.corn, ah-me.com -eztv.it, eztv.it -onliner.by, onliner.by -pptv.corn, pptv.com -rnacrurnors.corn, macrumors.com -xvideo-jp.corn, xvideo-jp.com -state.tx.us, state.tx.us -jarnnews.ir, jamnews.ir -etoro.corn, etoro.com -ny.gov, ny.gov -searchenginewatch.corn, searchenginewatch.com -google.co.cr, google.co.cr -td.corn, td.com -ahrefs.corn, ahrefs.com -337.corn, 337.com -klout.corn, klout.com -ebay.es, ebay.es -theverge.corn, theverge.com -kapook.corn, kapook.com -barclays.co.uk, barclays.co.uk -nuorni.corn, nuomi.com -index-of-rnp3s.corn, index-of-mp3s.com -ohfreesex.corn, ohfreesex.com -rnts.ru, mts.ru -instantcheckrnate.corn, instantcheckmate.com -sport.es, sport.es -sitescout.corn, sitescout.com -irr.ru, irr.ru -tuniu.corn, tuniu.com -startirnes.corn, startimes.com -tvn24.pl, tvn24.pl -kenhl4.vn, kenh14.vn -rnyvideo.de, myvideo.de -speedbit.corn, speedbit.com -aljazeera.corn, aljazeera.com -pudelek.pl, pudelek.pl -rnrngp.ru, mmgp.ru -ernpflix.corn, empflix.com -tigerdirect.corn, tigerdirect.com -elegantthernes.corn, elegantthemes.com -ted.corn, ted.com -downloads.corn, down1oads.com -bancobrasil.corn.br, bancobrasil.com.br -qip.ru, qip.ru -fapdu.corn, fapdu.com -softango.corn, softango.com -ap.org, ap.org -rneteofrance.corn, meteofrance.com -gentenocturna.corn, gentenocturna.com -2ch-c.net, 2ch-c.net -orf.at, orf.at -rnaybank2u.corn.rny, maybank2u.com.my -rninecraftwiki.net, minecraftwiki.net -tv.corn, tv.com -orkut.corn, orkut.com -adp.corn, adp.com -woorank.corn, woorank.com -irnagetwist.corn, imagetwist.com -pastebin.corn, pastebin.com -airtel.corn, airtel.com -ew.corn, ew.com -forever2l.corn, forever21.com -adarn4adarn.corn, adam4adam.com -voyages-sncf.corn, voyages-sncf.com -nextag.corn, nextag.com -usnews.corn, usnews.com -dinarnalar.corn, dinamalar.com -virginrnedia.corn, virginmedia.com -investopedia.corn, investopedia.com -seekingalpha.corn, seekingalpha.com -jurnponhottie.corn, jumponhottie.com -national-lottery.co.uk, national-lottery.co.uk -rnobifiesta.corn, mobifiesta.com -kapanlagi.corn, kapanlagi.com -segundarnano.es, segundamano.es -gfan.corn, gfan.com -xdating.corn, xdating.com -ynet.corn, ynet.com -rnedu.ir, medu.ir -hsn.corn, hsn.com -newsru.corn, newsru.com -rninus.corn, minus.com -sitetalk.corn, sitetalk.com -aarp.org, aarp.org -clickpaid.corn, clickpaid.com -panorarnio.corn, panoramio.com -webcarno.corn, webcamo.com -yobt.tv, yobt.tv -slutfinder.corn, slutfinder.com -freelotto.corn, freelotto.com -rnudah.rny, mudah.my -toptenreviews.corn, toptenreviews.com -caisse-epargne.fr, caisse-epargne.fr -wirnp.corn, wimp.com -woothernes.corn, woothemes.com -css-tricks.corn, css-tricks.com -coolrnath-garnes.corn, coolmath-games.com -tagu.corn.ar, tagu.com.ar -sheknows.corn, sheknows.com -advancedfileoptirnizer.corn, advancedfileoptimizer.com -drupal.org, drupal.org -centrurn.cz, centrum.cz -charter.net, charter.net -adxhosting.net, adxhosting.net -squarespace.corn, squarespace.com -traderne.co.nz, trademe.co.nz -sitesell.corn, sitesell.com -birthrecods.corn, birthrecods.com -rnegashare.info, megashare.info -freepornvs.corn, freepornvs.com -isna.ir, isna.ir -ziddu.corn, ziddu.com -airtelforurn.corn, airtelforum.com -justin.tv, justin.tv -Olnet.corn, 01net.com -ed.gov, ed.gov -no-ip.corn, no-ip.com -nikkansports.corn, nikkansports.com -srnashingrnagazine.corn, smashingmagazine.com -salon.corn, salon.com -nrnisr.corn, nmisr.com -wanggou.corn, wanggou.com -bayt.corn, bayt.com -codeproject.corn, codeproject.com -downloadha.corn, downloadha.com -local.corn, local.com -abola.pt, abola.pt -delta-hornes.corn, delta-homes.com -filrnweb.pl, filmweb.pl -gov.uk, gov.uk -worldoftanks.eu, worldoftanks.eu -ads-id.corn, ads-id.com -sergey-rnavrodi.corn, sergey-mavrodi.com -pornoid.corn, pornoid.com -freakshare.corn, freakshare.com -5lfanli.corn, 51fanli.com -bankrate.corn, bankrate.com -grindtv.corn, grindtv.com -webrnasterworld.corn, webmasterworld.com -torrentz.in, torrentz.in -bwin.corn, bwin.com -watchtower.corn, watchtower.com -payza.corn, payza.com -anz.corn, anz.com -vagalurne.corn.br, vagalume.com.br -ozon.ru, ozon.ru -tonicrnovies.corn, tonicmovies.com -arbeitsagentur.de, arbeitsagentur.de -graphicriver.net, graphicriver.net -theweathernetwork.corn, theweathernetwork.com -sarnsclub.corn, samsclub.com -tribunnews.corn, tribunnews.com -soldonsrnart.corn, soldonsmart.com -tut.by, tut.by -voila.fr, voila.fr -doctissirno.fr, doctissimo.fr -sueddeutsche.de, sueddeutsche.de -rnarnba.ru, mamba.ru -krnart.corn, kmart.com -abc.es, abc.es -rnanager.co.th, manager.co.th -spokeo.corn, spokeo.com -apache.org, apache.org -tdbank.corn, tdbank.com -asklaila.corn, asklaila.com -adrnin5.net, admin5.net -rtve.es, rtve.es -ynet.co.il, ynet.co.il -infospace.corn, infospace.com -yirng.corn, yimg.com -torcache.net, torcache.net -zap2it.corn, zap2it.com -srnallseotools.corn, smallseotools.com -privatbank.ua, privatbank.ua -nnrn-club.ru, nnm-club.ru -payoneer.corn, payoneer.com -bidorbuy.co.za, bidorbuy.co.za -islarnweb.net, islamweb.net -juicyads.corn, juicyads.com -vid2c.corn, vid2c.com -dnsrsearch.corn, dnsrsearch.com -the-bux.net, the-bux.net -yaplakal.corn, yaplakal.com -ex.ua, ex.ua -rntsindia.in, mtsindia.in -reclarneaqui.corn.br, reclameaqui.com.br -postbank.de, postbank.de -gogvo.corn, gogvo.com -bearshare.net, bearshare.net -socialsex.corn, socialsex.com -yebhi.corn, yebhi.com -rnktrnobi.corn, mktmobi.com -dfiles.eu, dfiles.eu -citibank.co.in, citibank.co.in -garnersky.corn, gamersky.com -kotaku.corn, kotaku.com -tearnviewer.corn, teamviewer.com -kwejk.pl, kwejk.pl -harnariweb.corn, hamariweb.com -torn.corn, tom.com -gayrorneo.corn, gayromeo.com -sony.corn, sony.com -westpac.corn.au, westpac.com.au -gtrnetrix.corn, gtmetrix.com -shorouknews.corn, shorouknews.com -xl.pt, xl.pt -networksolutions.corn, networksolutions.com -5OOpx.corn, 500px.com -yprnate.corn, ypmate.com -indowebster.corn, indowebster.com -sports.ru, sports.ru -netshoes.corn.br, netshoes.com.br -dfiles.ru, dfiles.ru -cpasbien.rne, cpasbien.me -webgarne.web.id, webgame.web.id -tuto4pc.corn, tuto4pc.com -poponclick.corn, poponclick.com -cornplex.corn, complex.com -sakshi.corn, sakshi.com -infobae.corn, infobae.com -sify.corn, sify.com -4pda.ru, 4pda.ru -starsue.net, starsue.net -newgrounds.corn, newgrounds.com -rnehrnews.corn, mehrnews.com -depositphotos.corn, depositphotos.com -keek.corn, keek.com -indeed.co.in, indeed.co.in -stanford.edu, stanford.edu -hepsiburada.corn, hepsiburada.com -2Orninutos.es, 20minutos.es -paper.li, paper.li -prizee.corn, prizee.com -xlovecarn.corn, xlovecam.com -criteo.corn, criteo.com -endlessrnatches.corn, endlessmatches.com -dyndns.org, dyndns.org -lightinthebox.corn, lightinthebox.com -easyjet.corn, easyjet.com -vice.corn, vice.com -tiexue.net, tiexue.net -rnonsterrnarketplace.corn, monstermarketplace.com -rnojang.corn, mojang.com -carns.corn, cams.com -pingdorn.corn, pingdom.com -askrnen.corn, askmen.com -list-rnanagel.corn, list-manage1.com -express.corn.pk, express.com.pk -pricerninister.corn, priceminister.com -duba.corn, duba.com -rneinestadt.de, meinestadt.de -rnediatakeout.corn, mediatakeout.com -terere.info, terere.info -strearnate.corn, streamate.com -garrnin.corn, garmin.com -a-telecharger.corn, a-telecharger.com -vipzona.info, vipzona.info -coffetube.corn, coffetube.com -discuz.net, discuz.net -directv.corn, directv.com -foreningssparbanken.se, foreningssparbanken.se -fatwallet.corn, fatwallet.com -rnackolik.corn, mackolik.com -rnegacinerna.fr, megacinema.fr -chess.corn, chess.com -suntrust.corn, suntrust.com -investing.corn, investing.com -whois.corn, whois.com -durnrnies.corn, dummies.com -yinyuetai.corn, yinyuetai.com -rnihandownload.corn, mihandownload.com -freapp.corn, freapp.com -theage.corn.au, theage.com.au -audible.corn, audible.com -hotelurbano.corn.br, hotelurbano.com.br -vatgia.corn, vatgia.com -wizardlOl.corn, wizard101.com -ceneo.pl, ceneo.pl -lting.corn, 1ting.com -rneetic.fr, meetic.fr -cardekho.corn, cardekho.com -tripadvisor.it, tripadvisor.it -dhl.corn, dhl.com -aibang.corn, aibang.com -asp.net, asp.net -toing.corn.br, toing.com.br -zhubajie.corn, zhubajie.com -telecornitalia.it, telecomitalia.it -claro-search.corn, claro-search.com -nickjr.corn, nickjr.com -iconfinder.corn, iconfinder.com -rnobile9.corn, mobile9.com -cisco.corn, cisco.com -cpanel.net, cpanel.net -indiegogo.corn, indiegogo.com -egotastic.corn, egotastic.com -hforcare.corn, hforcare.com -pbs.org, pbs.org -realestate.corn.au, realestate.com.au -abv.bg, abv.bg -drugs.corn, drugs.com -bt.corn, bt.com -wildberries.ru, wildberries.ru -edrearns.it, edreams.it -statigr.arn, statigr.am -prestashop.corn, prestashop.com -adxite.corn, adxite.com -birthdaypeorns.corn, birthdaypeoms.com -exbii.corn, exbii.com -blogrnura.corn, blogmura.com -sciencedirect.corn, sciencedirect.com -sanspo.corn, sanspo.com -nextrnedia.corn, nextmedia.com -tvoyauda4a.ru, tvoyauda4a.ru -tangdou.corn, tangdou.com -blackboard.corn, blackboard.com -qiyou.corn, qiyou.com -prezentacya.ru, prezentacya.ru -clicrbs.corn.br, clicrbs.com.br -wayfair.corn, wayfair.com -xvideos-field.corn, xvideos-field.com -national.corn.au, national.com.au -friendfeed.corn, friendfeed.com -plurk.corn, plurk.com -lolrnake.corn, lolmake.com -b9drn.corn, b9dm.com -afkarnews.ir, afkarnews.ir -dhl.de, dhl.de -charnpionat.corn, championat.com -rnoviefone.corn, moviefone.com -popcash.net, popcash.net -cliphunter.corn, cliphunter.com -sharebeast.corn, sharebeast.com -wowhead.corn, wowhead.com -firstpost.corn, firstpost.com -lloydstsb.corn, lloydstsb.com -fazenda.gov.br, fazenda.gov.br -lonelyplanet.corn, lonelyplanet.com -freenet.de, freenet.de -justanswer.corn, justanswer.com -qiwi.corn, qiwi.com -shufuni.corn, shufuni.com -drive2.ru, drive2.ru -slando.ua, slando.ua -caribbeancorn.corn, caribbeancom.com -uniblue.corn, uniblue.com -real.corn, real.com -addictinggarnes.corn, addictinggames.com -wnd.corn, wnd.com -col3negoriginal.org, col3negoriginal.org -loltrk.corn, loltrk.com -videodownloadconverter.corn, videodownloadconverter.com -google.lv, google.lv -seriesyonkis.corn, seriesyonkis.com -ryushare.corn, ryushare.com -sl979.corn, s1979.com -cheapoair.corn, cheapoair.com -subrnarino.corn.br, submarino.com.br -topface.corn, topface.com -hotelscornbined.corn, hotelscombined.com -whatisrnyipaddress.corn, whatismyipaddress.com -z6.corn, z6.com -sozcu.corn.tr, sozcu.com.tr -sonyrnobile.corn, sonymobile.com -planetrninecraft.corn, planetminecraft.com -optirnurn.net, optimum.net -google.corn.pr, google.com.pr -rnthai.corn, mthai.com -onlinecreditcenter6.corn, onlinecreditcenter6.com -tharunaya.co.uk, tharunaya.co.uk -sfirng.corn, sfimg.com -natwest.corn, natwest.com -zergnet.corn, zergnet.com -alotporn.corn, alotporn.com -urbanspoon.corn, urbanspoon.com -punishtube.corn, punishtube.com -proboards.corn, proboards.com -betfair.corn, betfair.com -iltasanornat.fi, iltasanomat.fi -ssisurveys.corn, ssisurveys.com -harvard.edu, harvard.edu -blic.rs, blic.rs -clicksia.corn, clicksia.com -skillpages.corn, skillpages.com -rnobilewap.corn, mobilewap.com -fiducia.de, fiducia.de -torntvz.org, torntvz.org -leparisien.fr, leparisien.fr -anjuke.corn, anjuke.com -rabobank.nl, rabobank.nl -sport.pl, sport.pl -schwab.corn, schwab.com -buenastareas.corn, buenastareas.com -befuck.corn, befuck.com -srnart-search.corn, smart-search.com -ivi.ru, ivi.ru -dvdvideosoft.corn, dvdvideosoft.com -ubi.corn, ubi.com -rnakepolo.corn, makepolo.com -landl.corn, 1and1.com -pcworld.corn, pcworld.com -caf.fr, caf.fr -fnb.co.za, fnb.co.za -vanguardngr.corn, vanguardngr.com -floozycity.corn, floozycity.com -ubuntu.corn, ubuntu.com -rny-link.pro, my-link.pro -centurylink.corn, centurylink.com -slashdot.org, slashdot.org -rnirrorcreator.corn, mirrorcreator.com -rutube.ru, rutube.ru -tubeplus.rne, tubeplus.me -kicker.de, kicker.de -unibet.corn, unibet.com -pornyaz.corn, pornyaz.com -learntotradethernarket.corn, learntotradethemarket.com -tokyo-porn-tube.corn, tokyo-porn-tube.com -luvcow.corn, luvcow.com -i.ua, i.ua -ole.corn.ar, ole.com.ar -redfin.corn, redfin.com -cnki.net, cnki.net -2shared.corn, 2shared.com -infibearn.corn, infibeam.com -zdnet.corn, zdnet.com -fishki.net, fishki.net -ukr.net, ukr.net -jiarneng.corn, jiameng.com -utorrent.corn, utorrent.com -elkhabar.corn, elkhabar.com -anirne44.corn, anime44.com -societegenerale.fr, societegenerale.fr -livernerne.corn, livememe.com -startertv.fr, startertv.fr -pingornatic.corn, pingomatic.com -indeed.co.uk, indeed.co.uk -dpstrearn.net, dpstream.net -rnundodeportivo.corn, mundodeportivo.com -gravatar.corn, gravatar.com -ipl38.corn, ip138.com -yandex.net, yandex.net -barbie.corn, barbie.com -wattpad.corn, wattpad.com -dzwww.corn, dzwww.com -technorati.corn, technorati.com -rneishichina.corn, meishichina.com -russianpost.ru, russianpost.ru -kboing.corn.br, kboing.com.br -lzjl.corn, lzjl.com -newsnow.co.uk, newsnow.co.uk -dw.de, dw.de -inetglobal.corn, inetglobal.com -tripadvisor.in, tripadvisor.in -ashleyrnadison.corn, ashleyrnadison.com -rapgenius.corn, rapgenius.com -xuite.net, xuite.net -nowvideo.eu, nowvideo.eu -search.us.corn, search.us.com -usagc.org, usagc.org -santander.co.uk, santander.co.uk -99acres.corn, 99acres.com -bigcartel.corn, bigcartel.com -haivl.corn, haivl.com -jsfiddle.net, jsfiddle.net -io9.corn, io9.com -lg.corn, lg.com -veoh.corn, veoh.com -dafiti.corn.br, dafiti.com.br -heise.de, heise.de -wikispaces.corn, wikispaces.com -google.corn.bo, google.com.bo -skyscrapercity.corn, skyscrapercity.com -zaobao.corn, zaobao.com -pirateproxy.net, pirateproxy.net -rnuyzorras.corn, muyzorras.com -entrepreneur.corn, entrepreneur.com -sxc.hu, sxc.hu -superuser.corn, superuser.com -jb5l.net, jb51.net -bitsnoop.corn, bitsnoop.com -index.hu, index.hu -tubexclips.corn, tubexclips.com -syrnantec.corn, symantec.com -sedo.corn, sedo.com -gongchang.corn, gongchang.com -newsrnth.net, newsmth.net -srclick.ru, srclick.ru -bornnegocio.corn, bomnegocio.com -ornegle.corn, omegle.com -sweetpacks-search.corn, sweetpacks-search.com -OOOwebhost.corn, 000webhost.com -rencontreshard.corn, rencontreshard.com -jurnei.corn, jumei.com -acfun.tv, acfun.tv -celebuzz.corn, celebuzz.com -el-balad.corn, el-balad.com -wajarn.corn, wajam.com -zoopla.co.uk, zoopla.co.uk -sc4888.corn, sc4888.com -rnobileaziende.it, mobileaziende.it -officialsurvey.org, officialsurvey.org -googleapis.corn, googleapis.com -jobsdb.corn, jobsdb.com -google.corn.sv, google.com.sv -freejobalert.corn, freejobalert.com -walla.co.il, walla.co.il -hollywoodreporter.corn, hollywoodreporter.com -inc.corn, inc.com -bbandt.corn, bbandt.com -williarnhill.corn, williamhill.com -jeu.info, jeu.info -vrbo.corn, vrbo.com -arabseed.corn, arabseed.com -spielaffe.de, spielaffe.de -wykop.pl, wykop.pl -narne.corn, name.com -web-opinions.corn, web-opinions.com -ehowenespanol.corn, ehowenespanol.com -uuzu.corn, uuzu.com -cafepress.corn, cafepress.com -beeline.ru, beeline.ru -searchenginejournal.corn, searchenginejournal.com -webex.corn, webex.com -zerohedge.corn, zerohedge.com -cityads.ru, cityads.ru -colurnbia.edu, columbia.edu -jia.corn, jia.com -tistory.corn, tistory.com -lOObestbuy.corn, 100bestbuy.com -realitykings.corn, realitykings.com -shopify.corn, shopify.com -garnetop.corn, gametop.com -eharrnony.corn, eharmony.com -ngoisao.net, ngoisao.net -angieslist.corn, angieslist.com -grotal.corn, grotal.com -rnanhunt.net, manhunt.net -adslgate.corn, adslgate.com -dernotywatory.pl, demotywatory.pl -enfernenino.corn, enfemenino.com -yallakora.corn, yallakora.com -careesrna.in, careesma.in -draugiern.lv, draugiem.lv -greatandhra.corn, greatandhra.com -lifescript.corn, lifescript.com -androidcentral.corn, androidcentral.com -wiley.corn, wiley.com -alot.corn, alot.com -lOOlO.corn, 10010.com -next.co.uk, next.co.uk -ll5.corn, 115.com -orngprn.corn, omgpm.com -rnycalendarbook.corn, mycalendarbook.com -playxn.corn, playxn.com -niksalehi.corn, niksalehi.com -serviporno.corn, serviporno.com -poste.it, poste.it -kirniss.corn, kimiss.com -bearshare.corn, bearshare.com -clickpoint.corn, clickpoint.com -seek.corn.au, seek.com.au -bab.la, bab.la -ads8.corn, ads8.com -viewster.corn, viewster.com -ideacellular.corn, ideacellular.com -tyrnpanus.net, tympanus.net -wwwblogto.corn, wwwblogto.com -tblop.corn, tblop.com -elong.corn, elong.com -funnyordie.corn, funnyordie.com -radikal.ru, radikal.ru -rk.corn, rk.com -alarab.net, alarab.net -willhaben.at, willhaben.at -beyond.corn, beyond.com -punchng.corn, punchng.com -viglink.corn, viglink.com -rnicrosoftstore.corn, microsoftstore.com -tripleclicks.corn, tripleclicks.com -rnl9O5.corn, m1905.com -ofreegarnes.corn, ofreegames.com -s2d6.corn, s2d6.com -36Obuy.corn, 360buy.com -rakuten.corn, rakuten.com -evite.corn, evite.com -kornpasiana.corn, kompasiana.com -dailycaller.corn, dailycaller.com -holidaycheck.de, holidaycheck.de -irnvu.corn, imvu.com -nate.corn, nate.com -fnac.corn, fnac.com -htc.corn, htc.com -savenkeep.corn, savenkeep.com -alfabank.ru, alfabank.ru -zaycev.net, zaycev.net -vidtornp3.corn, vidtomp3.com -eluniversal.corn.rnx, eluniversal.com.mx -theatlantic.corn, theatlantic.com -garnigo.de, gamigo.de -lolking.net, lolking.net -wer-kennt-wen.de, wer-kennt-wen.de -stern.de, stern.de -sportl.de, sport1.de -goalunited.org, goalunited.org -discogs.corn, discogs.com -whirlpool.net.au, whirlpool.net.au -savefrorn.net, savefrom.net -eurosport.fr, eurosport.fr -juegosjuegos.corn, juegosjuegos.com -open24news.tv, open24news.tv -sinaapp.corn, sinaapp.com -fuq.corn, fuq.com -index.hr, index.hr -realpopbid.corn, realpopbid.com -rollingstone.corn, rollingstone.com -globaltestrnarket.corn, globaltestmarket.com -seopult.ru, seopult.ru -wurnii.corn, wumii.com -ford.corn, ford.com -cabelas.corn, cabelas.com -securepaynet.net, securepaynet.net -zhibo8.cc, zhibo8.cc -jiji.corn, jiji.com -gezinti.corn, gezinti.com -rneb.gov.tr, meb.gov.tr -classifiedads.corn, classifiedads.com -kitco.corn, kitco.com -incredirnail.corn, incredimail.com -esrnas.corn, esmas.com -soccerway.corn, soccerway.com -rivals.corn, rivals.com -prezi.corn, prezi.com -shopping.corn, shopping.com -superjob.ru, superjob.ru -chinaacc.corn, chinaacc.com -arnoureux.corn, amoureux.com -rnysrnartprice.corn, mysmartprice.com -eleconornista.es, eleconomista.es -rnercola.corn, mercola.com -irnlive.corn, imlive.com -teacup.corn, teacup.com -rnodelrnayhern.corn, modelmayhem.com -nic.ru, nic.ru -brazzersnetwork.corn, brazzersnetwork.com -everything.org.uk, everything.org.uk -bhg.corn, bhg.com -longhoo.net, longhoo.net -superpages.corn, superpages.com -tny.cz, tny.cz -yourfilezone.corn, yourfilezone.com -tuan8OO.corn, tuan800.com -streev.corn, streev.com -sedty.corn, sedty.com -boxofficernojo.corn, boxofficemojo.com -hollyscoop.corn, hollyscoop.com -safecart.corn, safecart.com -alrnogaz.corn, almogaz.com -cashnhits.corn, cashnhits.com -wetplace.corn, wetplace.com -freepik.corn, freepik.com -rarbg.corn, rarbg.com -xxxbunker.corn, xxxbunker.com -prchecker.info, prchecker.info -halifax-online.co.uk, halifax-online.co.uk -trafficfactory.biz, trafficfactory.biz -telecinco.es, telecinco.es -searchterrnresults.corn, searchtermresults.com -unarn.rnx, unam.mx -akhbar-elwatan.corn, akhbar-elwatan.com -lynda.corn, lynda.com -yougetlaid.corn, yougetlaid.com -srnart.corn.au, smart.com.au -advfn.corn, advfn.com -unicredit.it, unicredit.it -zornato.corn, zomato.com -flirt.corn, flirt.com -netease.corn, netease.com -bnpparibas.net, bnpparibas.net -elcornercio.pe, elcomercio.pe -rnathrubhurni.corn, mathrubhumi.com -koyotesoft.corn, koyotesoft.com -filrnix.net, filmix.net -xnxxhdtube.corn, xnxxhdtube.com -ennaharonline.corn, ennaharonline.com -junbi-tracker.corn, junbi-tracker.com -buzzdock.corn, buzzdock.com -ernirates.corn, emirates.com -vivanuncios.corn.rnx, vivanuncios.com.mx -infojobs.net, infojobs.net -srni2.ru, smi2.ru -lotterypost.corn, lotterypost.com -bandcarnp.corn, bandcamp.com -ekstrabladet.dk, ekstrabladet.dk -nownews.corn, nownews.com -bc.vc, bc.vc -google.corn.af, google.com.af -ulrnart.ru, ulmart.ru -estadao.corn.br, estadao.com.br -politico.corn, politico.com -kl688.corn, kl688.com -resellerclub.corn, resellerclub.com -whois.net, whois.net -seobuilding.ru, seobuilding.ru -t4ll.rne, t411.me -googlesyndication.corn, googlesyndication.com -delfi.lt, delfi.lt -eqla3.corn, eqla3.com -ali2l3.net, ali213.net -fanpage.it, fanpage.it -uptobox.corn, uptobox.com -google.jo, google.jo -cncn.corn, cncn.com -srne.sk, sme.sk -kinozal.tv, kinozal.tv -ceconline.corn, ceconline.com -billboard.corn, billboard.com -citi.corn, citi.com -naughtyarnerica.corn, naughtyamerica.com -classrnates.corn, classmates.com -coursera.org, coursera.org -pingan.corn, pingan.com -voanews.corn, voanews.com -tankionline.corn, tankionline.com -jetblue.corn, jetblue.com -spainshtranslation.corn, spainshtranslation.com -ebookbrowse.corn, ebookbrowse.com -rnet-art.corn, met-art.com -rnegafon.ru, megafon.ru -quibids.corn, quibids.com -srnartfren.corn, smartfren.com -cleartrip.corn, cleartrip.com -pixrnania.corn, pixmania.com -vivastreet.corn, vivastreet.com -thegfnetwork.corn, thegfnetwork.com -paytrn.corn, paytm.com -rneinsextagebuch.net, meinsextagebuch.net -rnernecenter.corn, memecenter.com -ixbt.corn, ixbt.com -dagbladet.no, dagbladet.no -basecarnphq.corn, basecamphq.com -chinatirnes.corn, chinatimes.com -bubblews.corn, bubblews.com -xtool.ru, xtool.ru -opodo.co.uk, opodo.co.uk -hattrick.org, hattrick.org -zopirn.corn, zopim.com -aol.co.uk, aol.co.uk -gazzetta.gr, gazzetta.gr -l8andabused.corn, 18andabused.com -rncssl.corn, mcssl.com -econornist.corn, economist.com -zeit.de, zeit.de -google.corn.uy, google.com.uy -pinoy-ako.info, pinoy-ako.info -lazada.co.id, lazada.co.id -filgoal.corn, filgoal.com -rozetka.corn.ua, rozetka.com.ua -alrnesryoon.corn, almesryoon.com -csrnonitor.corn, csmonitor.com -bizjournals.corn, bizjournals.com -rackspace.corn, rackspace.com -webgozar.corn, webgozar.com -opencart.corn, opencart.com -rnediaplex.corn, mediaplex.com -deutsche-bank.de, deutsche-bank.de -sirnilarsites.corn, similarsites.com -sotrnarket.ru, sotmarket.ru -chatzurn.corn, chatzum.com -huffingtonpost.co.uk, huffingtonpost.co.uk -carwale.corn, carwale.com -rnernez.corn, memez.com -hostrnonster.corn, hostmonster.com -rnuzofon.corn, muzofon.com -elephanttube.corn, elephanttube.com -crunchbase.corn, crunchbase.com -irnhonet.ru, imhonet.ru -lusongsong.corn, lusongsong.com -filrnesonlinegratis.net, filmesonlinegratis.net -giaoduc.net.vn, giaoduc.net.vn -rnanhub.corn, manhub.com -tatadocorno.corn, tatadocomo.com -realitatea.net, realitatea.net -freernp3x.corn, freemp3x.com -freernail.hu, freemail.hu -ganool.corn, ganool.com -feedreader.corn, feedreader.com -sportsdirect.corn, sportsdirect.com -videolan.org, videolan.org -watchseries.lt, watchseries.lt -rotapost.ru, rotapost.ru -nwolb.corn, nwolb.com -searchquotes.corn, searchquotes.com -kaspersky.corn, kaspersky.com -go2cloud.org, go2cloud.org -grepolis.corn, grepolis.com -profit-partner.ru, profit-partner.ru -articlesbase.corn, articlesbase.com -dns-shop.ru, dns-shop.ru -radikal.corn.tr, radikal.com.tr -justjared.corn, justjared.com -lancenet.corn.br, lancenet.com.br -rnangapanda.corn, mangapanda.com -theglobeandrnail.corn, theglobeandmail.com -ecollege.corn, ecollege.com -rnyanirnelist.net, myanimelist.net -fotornac.corn.tr, fotomac.com.tr -irnanhua.corn, imanhua.com -travelzoo.corn, travelzoo.com -jjwxc.net, jjwxc.net -q.gs, q.gs -naaptol.corn, naaptol.com -sarnbaporno.corn, sambaporno.com -rnacrojuegos.corn, macrojuegos.com -ooo-sex.corn, ooo-sex.com -fab.corn, fab.com -roflzone.corn, roflzone.com -searchcornpletion.corn, searchcompletion.com -jezebel.corn, jezebel.com -bizdec.ru, bizdec.ru -torrentino.corn, torrentino.com -rnultitran.ru, multitran.ru -tune-up.corn, tune-up.com -sparkpeople.corn, sparkpeople.com -desi-tashan.corn, desi-tashan.com -rnashreghnews.ir, mashreghnews.ir -talktalk.co.uk, talktalk.co.uk -hinkhoj.corn, hinkhoj.com -2Orninutes.fr, 20minutes.fr -sulia.corn, sulia.com -icirns.corn, icims.com -dizi-rnag.corn, dizi-mag.com -webaslan.corn, webaslan.com -en.wordpress.corn, en.wordpress.com -funrnoods.corn, funmoods.com -softgozar.corn, softgozar.com -starwoodhotels.corn, starwoodhotels.com -studiopress.corn, studiopress.com -click.in, click.in -rneetcheap.corn, meetcheap.com -angel-live.corn, angel-live.com -beforeitsnews.corn, beforeitsnews.com -trello.corn, trello.com -icontact.corn, icontact.com -prlog.org, prlog.org -incentria.corn, incentria.com -bouyguestelecorn.fr, bouyguestelecom.fr -dstv.corn, dstv.com -arstechnica.corn, arstechnica.com -diigo.corn, diigo.com -consurners-research.corn, consumers-research.com -rnetaffiliation.corn, metaffiliation.com -telekorn.de, telekom.de -izlesene.corn, izlesene.com -newsit.gr, newsit.gr -fuckingawesorne.corn, fuckingawesome.com -osyrn.gov.tr, osym.gov.tr -svyaznoy.ru, svyaznoy.ru -watchfreernovies.ch, watchfreemovies.ch -gurntree.pl, gumtree.pl -sportbox.ru, sportbox.ru -reserverunessai.corn, reserverunessai.com -hsbc.corn.hk, hsbc.com.hk -cricbuzz.corn, cricbuzz.com -djelfa.info, djelfa.info -nouvelobs.corn, nouvelobs.com -aruba.it, aruba.it -hornes.corn, homes.com -allezleslions.corn, allezleslions.com -orkut.corn.br, orkut.com.br -aionfreetoplay.corn, aionfreetoplay.com -acadernia.edu, academia.edu -consurnerreports.org, consumerreports.org -ilsole24ore.corn, ilsole24ore.com -sephora.corn, sephora.com -lds.org, lds.org -vrnall.corn, vmall.com -ultirnasnoticias.corn.ve, ultimasnoticias.com.ve -healthgrades.corn, healthgrades.com -irngbox.corn, imgbox.com -dlsite.corn, dlsite.com -whitesrnoke.corn, whitesmoke.com -thenextweb.corn, thenextweb.com -qirel23.corn, qire123.com -peeplo.corn, peeplo.com -chitika.corn, chitika.com -alwafd.org, alwafd.org -phonearena.corn, phonearena.com -ovh.corn, ovh.com -tusfiles.net, tusfiles.net -l8schoolgirlz.corn, 18schoolgirlz.com -bongacarns.corn, bongacams.com -horne.pl, home.pl -footrnercato.net, footmercato.net -sprashivai.ru, sprashivai.ru -rnegafilrneshd.net, megafilmeshd.net -prerniurn-display.corn, premium-display.com -clickey.corn, clickey.com -tokyo-tube.corn, tokyo-tube.com -watch32.corn, watch32.com -pornolab.net, pornolab.net -tirnewarnercable.corn, timewarnercable.com -naturalnews.corn, naturalnews.com -afirnet.corn, afimet.com -telderi.ru, telderi.ru -ioffer.corn, ioffer.com -lapatilla.corn, lapatilla.com -livetv.ru, livetv.ru -cloudflare.corn, cloudflare.com -lupoporno.corn, lupoporno.com -nhaccuatui.corn, nhaccuatui.com -thepostgarne.corn, thepostgame.com -ipage.corn, ipage.com -banesconline.corn, banesconline.com -cdc.gov, cdc.gov -adonweb.ru, adonweb.ru -zone-telechargernent.corn, zone-telechargement.com -intellicast.corn, intellicast.com -uloz.to, uloz.to -pikabu.ru, pikabu.ru -rnegogo.net, megogo.net -wenxuecity.corn, wenxuecity.com -xrnl-siternaps.corn, xml-sitemaps.com -webdunia.corn, webdunia.com -justhost.corn, justhost.com -starbucks.corn, starbucks.com -wargarning.net, wargaming.net -hugedornains.corn, hugedomains.com -rnagicbricks.corn, magicbricks.com -gigporno.corn, gigporno.com -rikunabi.corn, rikunabi.com -5lauto.corn, 51auto.com -warriorplus.corn, warriorplus.com -gudvin.tv, gudvin.tv -bigrnir.net, bigmir.net -ansa.it, ansa.it -standardbank.co.za, standardbank.co.za -toshiba.corn, toshiba.com -xinnet.corn, xinnet.com -geico.corn, geico.com -funnyjunk.corn, funnyjunk.com -affaritaliani.it, affaritaliani.it -cityheaven.net, cityheaven.net -tubewolf.corn, tubewolf.com -google.org, google.org -ad.nl, ad.nl -tutorialspoint.corn, tutorialspoint.com -uidai.gov.in, uidai.gov.in -everydayhealth.corn, everydayhealth.com -jzip.corn, jzip.com -lolspotsarticles.corn, lolspotsarticles.com -rueducornrnerce.fr, rueducommerce.fr -lvrnarna.corn, lvmama.com -roboforrn.corn, roboform.com -zoznarn.sk, zoznam.sk -livesrni.corn, livesmi.com -die-boersenforrnel.corn, die-boersenformel.com -watchcartoononline.corn, watchcartoononline.com -abclocal.go.corn, abclocal.go.com -techrepublic.corn, techrepublic.com -just-fuck.corn, just-fuck.com -carnster.corn, camster.com -akairan.corn, akairan.com -yeslibertin.corn, yeslibertin.com -abc.go.corn, abc.go.com -searchtherightwords.corn, searchtherightwords.com -scotiabank.corn, scotiabank.com -justclick.ru, justclick.ru -douguo.corn, douguo.com -discover.corn, discover.com -britishairways.corn, britishairways.com -rnobafire.corn, mobafire.com -gi-akadernie.ning.corn, gi-akademie.ning.com -desirulez.net, desirulez.net -qiushibaike.corn, qiushibaike.com -rnoonbasa.corn, moonbasa.com -all.biz, all.biz -springer.corn, springer.com -ernai.corn, emai.com -deadspin.corn, deadspin.com -hulkshare.corn, hulkshare.com -fast-torrent.ru, fast-torrent.ru -oriflarne.corn, oriflame.com -irngchili.net, imgchili.net -rnega-juegos.rnx, mega-juegos.mx -gyazo.corn, gyazo.com -persianv.corn, persianv.com -adk2.corn, adk2.com -ingbank.pl, ingbank.pl -nationalconsurnercenter.corn, nationalconsumercenter.com -xxxkinky.corn, xxxkinky.com -rnywot.corn, mywot.com -gayrnaletube.corn, gaymaletube.com -ltv.ru, 1tv.ru -rnanutd.corn, manutd.com -rnerchantcircle.corn, merchantcircle.com -canalblog.corn, canalblog.com -capitalone36O.corn, capitalone360.com -tlbb8.corn, tlbb8.com -softonic.fr, softonic.fr -ccavenue.corn, ccavenue.com -tyroodr.corn, tyroodr.com -exarn8.corn, exam8.com -allrnusic.corn, allmusic.com -stubhub.corn, stubhub.com -arcor.de, arcor.de -yolasite.corn, yolasite.com -haraj.corn.sa, haraj.com.sa -rnypopup.ir, mypopup.ir -rnernurlar.net, memurlar.net -srnugrnug.corn, smugmug.com -filefactory.corn, filefactory.com -fantasti.cc, fantasti.cc -bokra.net, bokra.net -goarticles.corn, goarticles.com -rnoneysavingexpert.corn, moneysavingexpert.com -donga.corn, donga.com -lastrninute.corn, lastminute.com -xkcd.corn, xkcd.com -sou3OO.corn, sou300.com -rnagnovideo.corn, magnovideo.com -inquirer.net, inquirer.net -phoenix.edu, phoenix.edu -videogenesis.corn, videogenesis.com -thestar.corn, thestar.com -tripadvisor.es, tripadvisor.es -blankrefer.corn, blankrefer.com -yle.fi, yle.fi -bearntele.corn, beamtele.com -oanda.corn, oanda.com -iheart.corn, iheart.com -google.co.tz, google.co.tz -stargazete.corn, stargazete.com -bossip.corn, bossip.com -defaultsear.ch, defaultsear.ch -thaiseoboard.corn, thaiseoboard.com -qinbei.corn, qinbei.com -ninisite.corn, ninisite.com -j.gs, j.gs -nos.nl, nos.nl -qualtrics.corn, qualtrics.com -kornrnersant.ru, kommersant.ru -urban-rivals.corn, urban-rivals.com -cornputerbild.de, computerbild.de -fararu.corn, fararu.com -rnenshealth.corn, menshealth.com -jobstreet.corn, jobstreet.com -rbcroyalbank.corn, rbcroyalbank.com -inrnotionhosting.corn, inmotionhosting.com -surveyrouter.corn, surveyrouter.com -kankanews.corn, kankanews.com -aol.de, aol.de -bol.corn, bol.com -datpiff.corn, datpiff.com -rnplife.corn, mplife.com -sale-fire.corn, sale-fire.com -inbox.lv, inbox.lv -offeraturn.corn, offeratum.com -pandora.tv, pandora.tv -eltiernpo.corn, eltiempo.com -indiarailinfo.corn, indiarailinfo.com -solidtrustpay.corn, solidtrustpay.com -warthunder.ru, warthunder.ru -novarnov.corn, novamov.com -folkd.corn, folkd.com -envato.corn, envato.com -wetpaint.corn, wetpaint.com -ternpo.co, tempo.co -howtogeek.corn, howtogeek.com -foundationapi.corn, foundationapi.com -care2.corn, care2.com -bendibao.corn, bendibao.com -rnazika2day.corn, mazika2day.com -asda.corn, asda.com -nowvideo.ch, nowvideo.ch -hiapk.corn, hiapk.com -l7u.corn, 17u.com -tutu.ru, tutu.ru -ncdownloader.corn, ncdownloader.com -warez-bb.org, warez-bb.org -jsoftj.corn, jsoftj.com -xrnarks.corn, xmarks.com -36kr.corn, 36kr.com -runetki.corn, runetki.com -quoka.de, quoka.de -heureka.cz, heureka.cz -rnonografias.corn, monografias.com -zhenai.corn, zhenai.com -4porn.corn, 4porn.com -antena3.corn, antena3.com -lintas.rne, lintas.me -seroundtable.corn, seroundtable.com -el.ru, e1.ru -berkeley.edu, berkeley.edu -officedepot.corn, officedepot.com -rnyflorida.corn, myflorida.com -parispornrnovies.corn, parispornmovies.com -uniqlo.corn, uniqlo.com -topky.sk, topky.sk -lurnovies.corn, lumovies.com -buysellads.corn, buysellads.com -stirileprotv.ro, stirileprotv.ro -scottrade.corn, scottrade.com -rnrntrends.net, mmtrends.net -wholesale-dress.net, wholesale-dress.net -rnetacritic.corn, metacritic.com -pichunter.corn, pichunter.com -rnoneybookers.corn, moneybookers.com -idealista.corn, idealista.com -buzzle.corn, buzzle.com -rcorn.co.in, rcom.co.in -weightwatchers.corn, weightwatchers.com -itv.corn, itv.com -inilah.corn, inilah.com -vic.gov.au, vic.gov.au -prorn.ua, prom.ua -with2.net, with2.net -doodle.corn, doodle.com -trafficbroker.corn, trafficbroker.com -h33t.corn, h33t.com -avaaz.org, avaaz.org -rnaultalk.corn, maultalk.com -brno.corn, bmo.com -nerdbux.corn, nerdbux.com -abnarnro.nl, abnamro.nl -didigarnes.corn, didigames.com -pornorarna.corn, pornorama.com -forurnotion.corn, forumotion.com -wornan.ru, woman.ru -thaivisa.corn, thaivisa.com -lexpress.fr, lexpress.fr -forurncornrnunity.net, forumcommunity.net -regions.corn, regions.com -sf-express.corn, sf-express.com -donkeyrnails.corn, donkeymails.com -clubic.corn, clubic.com -aucfan.corn, aucfan.com -enterfactory.corn, enterfactory.com -yandex.corn, yandex.com -iherb.corn, iherb.com -in.gr, in.gr -olx.pt, olx.pt -fbdownloader.corn, fbdownloader.com -autoscout24.it, autoscout24.it -siteground.corn, siteground.com -psicofxp.corn, psicofxp.com -persiangig.corn, persiangig.com -rnetroer.corn, metroer.com -tokopedia.corn, tokopedia.com -seccarn.info, seccam.info -sport-express.ru, sport-express.ru -vodafone.it, vodafone.it -blekko.corn, blekko.com -entekhab.ir, entekhab.ir -expressen.se, expressen.se -zalando.fr, zalando.fr -hawaaworld.corn, hawaaworld.com -freeonlinegarnes.corn, freeonlinegames.com -google.corn.lb, google.com.lb -ab-in-den-urlaub.de, ab-in-den-urlaub.de -android4tw.corn, android4tw.com -alriyadh.corn, alriyadh.com -drugstore.corn, drugstore.com -iobit.corn, iobit.com -rei.corn, rei.com -racing-garnes.corn, racing-games.com -rnornrnyfucktube.corn, mommyfucktube.com -pideo.net, pideo.net -gogoanirne.corn, gogoanime.com -avaxho.rne, avaxho.me -christianrningle.corn, christianmingle.com -activesearchresults.corn, activesearchresults.com -trendsonline.biz, trendsonline.biz -planetsuzy.org, planetsuzy.org -rubiasl9.corn, rubias19.com -cleverbridge.corn, cleverbridge.com -jeevansathi.corn, jeevansathi.com -washingtontirnes.corn, washingtontimes.com -lcl.fr, lcl.fr -98ia.corn, 98ia.com -rnercadolibre.corn.co, mercadolibre.com.co -n-tv.de, n-tv.de -divyabhaskar.co.in, divyabhaskar.co.in -airbnb.corn, airbnb.com -rnybrowserbar.corn, mybrowserbar.com -travian.corn, travian.com -autoblog.corn, autoblog.com -blesk.cz, blesk.cz -playboy.corn, playboy.com -p3Odownload.corn, p30download.com -pazienti.net, pazienti.net -uast.ac.ir, uast.ac.ir -logsoku.corn, logsoku.com -zedge.net, zedge.net -creditrnutuel.fr, creditmutuel.fr -absa.co.za, absa.co.za -rnilliyet.tv, milliyet.tv -jiathis.corn, jiathis.com -liverpoolfc.tv, liverpoolfc.tv -dospy.corn, dospy.com -calarneo.corn, calameo.com -netsuite.corn, netsuite.com -angelfire.corn, angelfire.com -snagajob.corn, snagajob.com -hollywoodlife.corn, hollywoodlife.com -techtudo.corn.br, techtudo.com.br -payserve.corn, payserve.com -portalnet.cl, portalnet.cl -worldadult-videos.info, worldadult-videos.info -indianpornvideos.corn, indianpornvideos.com -france24.corn, france24.com -discuss.corn.hk, discuss.com.hk -theplanet.corn, theplanet.com -advego.ru, advego.ru -eltiernpo.es, eltiempo.es -55tuan.corn, 55tuan.com -snopes.corn, snopes.com -startnow.corn, startnow.com -tucarro.corn, tucarro.com -skyscanner.net, skyscanner.net -wchonline.corn, wchonline.com -gaadi.corn, gaadi.com -lindaikeji.blogspot.corn, lindaikeji.blogspot.com -keywordblocks.corn, keywordblocks.com -apsense.corn, apsense.com -avangate.corn, avangate.com -gandul.info, gandul.info -google.corn.gh, google.com.gh -rnybigcornrnerce.corn, mybigcommerce.com -horneaway.corn, homeaway.com -wikitravel.org, wikitravel.org -etxt.ru, etxt.ru -zerx.ru, zerx.ru -sidereel.corn, sidereel.com -edrearns.es, edreams.es -india-forurns.corn, india-forums.com -infonews.corn, infonews.com -zoorninfo.corn, zoominfo.com -stylebistro.corn, stylebistro.com -dorninos.corn, dominos.com -59lhx.corn, 591hx.com -authorize.net, authorize.net -6lbaobao.corn, 61baobao.com -digitalspy.co.uk, digitalspy.co.uk -godvine.corn, godvine.com -rednowtube.corn, rednowtube.com -appbank.net, appbank.net -woozgo.fr, woozgo.fr -expireddornains.net, expireddomains.net -rny-uq.corn, my-uq.com -peliculasyonkis.corn, peliculasyonkis.com -forurnfree.it, forumfree.it -shangdu.corn, shangdu.com -startrnyripple.corn, startmyripple.com -hottube.rne, hottube.me -rnernbers.webs.corn, members.webs.com -blick.ch, blick.ch -google.crn, google.cm -torntorn.corn, tomtom.com -rzd.ru, rzd.ru -opensooq.corn, opensooq.com -pizzahut.corn, pizzahut.com -rnarksandspencer.corn, marksandspencer.com -filenuke.corn, filenuke.com -filelist.ro, filelist.ro -akharinnews.corn, akharinnews.com -etrade.corn, etrade.com -planetrorneo.corn, planetromeo.com -wpbeginner.corn, wpbeginner.com -bancornercantil.corn, bancomercantil.com -pastdate.corn, pastdate.com -webutation.net, webutation.net -rnywebgrocer.corn, mywebgrocer.com -rnobile.ir, mobile.ir -seernorgh.corn, seemorgh.com -nhs.uk, nhs.uk -google.ba, google.ba -ileehoo.corn, ileehoo.com -seobook.corn, seobook.com -wetteronline.de, wetteronline.de -happy-porn.corn, happy-porn.com -theonion.corn, theonion.com -webnode.corn, webnode.com -svaiza.corn, svaiza.com -newsbornb.gr, newsbomb.gr -t88u.corn, t88u.com -tsn.ca, tsn.ca -unity3d.corn, unity3d.com -nseindia.corn, nseindia.com -juegosdiarios.corn, juegosdiarios.com -genieo.corn, genieo.com -kelkoo.corn, kelkoo.com -shabdkosh.corn, shabdkosh.com -tecrnundo.corn.br, tecmundo.com.br -chinaunix.net, chinaunix.net -goo-net.corn, goo-net.com -asana.corn, asana.com -hdporn.in, hdporn.in -virtapay.corn, virtapay.com -jobdiagnosis.corn, jobdiagnosis.com -guokr.corn, guokr.com -clickpoint.it, clickpoint.it -3drngarne.corn, 3dmgame.com -ashleyrnadison.corn, ashleymadison.com -utsprofitads.corn, utsprofitads.com -google.ee, google.ee -oyunskor.corn, oyunskor.com -rnetro.co.uk, metro.co.uk -ebaurnsworld.corn, ebaumsworld.com -realsirnple.corn, realsimple.com -3file.info, 3file.info -xcarns.corn, xcams.com -cyberforurn.ru, cyberforum.ru -babble.corn, babble.com -lidl.de, lidl.de -pixer.rnobi, pixer.mobi -yell.corn, yell.com -alnilin.corn, alnilin.com -lurkrnore.to, lurkmore.to -olx.co.za, olx.co.za -eorezo.corn, eorezo.com -baby.ru, baby.ru -redporntube.corn, redporntube.com -extabit.corn, extabit.com -wayn.corn, wayn.com -gaana.corn, gaana.com -islarnicfinder.org, islamicfinder.org -venturebeat.corn, venturebeat.com -played.to, played.to -alrakoba.net, alrakoba.net -rnouthshut.corn, mouthshut.com -banquepopulaire.fr, banquepopulaire.fr -dasoertliche.de, dasoertliche.de -lstwebdesigner.corn, 1stwebdesigner.com -tarn.corn.br, tam.com.br -nature.corn, nature.com -carnfrog.corn, camfrog.com -philly.corn, philly.com -zerntv.corn, zemtv.com -oprah.corn, oprah.com -wrnaraci.corn, wmaraci.com -ruvr.ru, ruvr.ru -gsn.corn, gsn.com -acrobat.corn, acrobat.com -depositfiles.org, depositfiles.org -srnartresponder.ru, smartresponder.ru -huxiu.corn, huxiu.com -porn-wanted.corn, porn-wanted.com -tripadvisor.fr, tripadvisor.fr -3366.corn, 3366.com -ranker.corn, ranker.com -cibc.corn, cibc.com -trend.az, trend.az -whatsapp.corn, whatsapp.com -O7O73.corn, 07073.com -netload.in, netload.in -channel4.corn, channel4.com -yatra.corn, yatra.com -elconfidencial.corn, elconfidencial.com -labnol.org, labnol.org -google.co.ke, google.co.ke -disneylatino.corn, disneylatino.com -pconverter.corn, pconverter.com -cqnews.net, cqnews.net -blog.co.uk, blog.co.uk -irnrnowelt.de, immowelt.de -crunchyroll.corn, crunchyroll.com -garnesgarnes.corn, gamesgames.com -prototherna.gr, protothema.gr -vrnoptions.corn, vmoptions.com -go2jurnp.org, go2jump.org -psu.edu, psu.edu -sanjesh.org, sanjesh.org -sportingnews.corn, sportingnews.com -televisionfanatic.corn, televisionfanatic.com -fansshare.corn, fansshare.com -xcarns4u.corn, xcams4u.com -rnadthurnbs.corn, madthumbs.com -ebates.corn, ebates.com -erornon.net, eromon.net -copyblogger.corn, copyblogger.com -flirt4free.corn, flirt4free.com -gaytube.corn, gaytube.com -notdoppler.corn, notdoppler.com -allrnyvideos.net, allmyvideos.net -carn4.de.corn, cam4.de.com -chosun.corn, chosun.com -adrne.ru, adme.ru -codeplex.corn, codeplex.com -jurnia.corn.ng, jumia.com.ng -digitaltrends.corn, digitaltrends.com -b92.net, b92.net -rniniinthebox.corn, miniinthebox.com -radaronline.corn, radaronline.com -hujiang.corn, hujiang.com -gardenweb.corn, gardenweb.com -pizap.corn, pizap.com -iptorrents.corn, iptorrents.com -yuku.corn, yuku.com -rnega-giochi.it, mega-giochi.it -nrk.no, nrk.no -99designs.corn, 99designs.com -uscis.gov, uscis.gov -lostfilrn.tv, lostfilm.tv -rnileroticos.corn, mileroticos.com -republika.co.id, republika.co.id -sharethis.corn, sharethis.com -sarnplicio.us, samplicio.us -lsaleaday.corn, 1saleaday.com -vonelo.corn, vonelo.com -oyunrnoyun.corn, oyunmoyun.com -flightradar24.corn, flightradar24.com -geo.tv, geo.tv -nexusrnods.corn, nexusmods.com -blogspot.fi, blogspot.fi -directtrack.corn, directtrack.com -rnedia.net, media.net -bigresource.corn, bigresource.com -free-lance.ru, free-lance.ru -loveplanet.ru, loveplanet.ru -ilfattoquotidiano.it, ilfattoquotidiano.it -coolrnovs.corn, coolmovs.com -rnango.corn, mango.com -nj.corn, nj.com -rnagazineluiza.corn.br, magazineluiza.com.br -datehookup.corn, datehookup.com -registro.br, registro.br -debenharns.corn, debenhams.com -jqueryui.corn, jqueryui.com -palcornp3.corn, palcomp3.com -opensubtitles.org, opensubtitles.org -socialrnediatoday.corn, socialmediatoday.com -allgarneshorne.corn, allgameshome.com -pricegrabber.corn, pricegrabber.com -lufthansa.corn, lufthansa.com -ip-adress.corn, ip-adress.com -business-standard.corn, business-standard.com -garnes.corn, games.com -zarnan.corn.tr, zaman.com.tr -jagranjosh.corn, jagranjosh.com -rnint.corn, mint.com -gorillavid.in, gorillavid.in -google.corn.orn, google.com.om -blogbigtirne.corn, blogbigtime.com -korrespondent.net, korrespondent.net -nyrnag.corn, nymag.com -proporn.corn, proporn.com -ycasrnd.info, ycasmd.info -persiantools.corn, persiantools.com -torrenthound.corn, torrenthound.com -bestsexo.corn, bestsexo.com -alwatanvoice.corn, alwatanvoice.com -jahannews.corn, jahannews.com -bluewin.ch, bluewin.ch -sap.corn, sap.com -rzb.ir, rzb.ir -rnyorderbox.corn, myorderbox.com -dealsandsavings.net, dealsandsavings.net -goldenline.pl, goldenline.pl -stuff.co.nz, stuff.co.nz -opentable.corn, opentable.com -4738.corn, 4738.com -freshersworld.corn, freshersworld.com -state.pa.us, state.pa.us -lavanguardia.corn, lavanguardia.com -rnob.org, mob.org -vodafone.in, vodafone.in -blogdetik.corn, blogdetik.com -888.it, 888.it -passportindia.gov.in, passportindia.gov.in -ssa.gov, ssa.gov -desitvforurn.net, desitvforum.net -rajasthan.gov.in, rajasthan.gov.in -zonealarrn.corn, zonealarm.com -locaweb.corn.br, locaweb.com.br -logrne.in, logme.in -fetlife.corn, fetlife.com -lyricsfreak.corn, lyricsfreak.com -te3p.corn, te3p.com -hrnrc.gov.uk, hmrc.gov.uk -bravoerotica.corn, bravoerotica.com -kolesa.kz, kolesa.kz -vinescope.corn, vinescope.com -shoplocal.corn, shoplocal.com -rnydrivers.corn, mydrivers.com -bigidearnasterrnind.corn, bigideamastermind.com -uncoverthenet.corn, uncoverthenet.com -ragecornic.corn, ragecomic.com -yodobashi.corn, yodobashi.com -titan24.corn, titan24.com -nocoty.pl, nocoty.pl -turkishairlines.corn, turkishairlines.com -liputan6.corn, liputan6.com -3suisses.fr, 3suisses.fr -cancan.ro, cancan.ro -apetube.corn, apetube.com -kurir-info.rs, kurir-info.rs -wow.corn, wow.com -rnyblogguest.corn, myblogguest.com -wp.corn, wp.com -tre.it, tre.it -livrariasaraiva.corn.br, livrariasaraiva.com.br -ubuntuforurns.org, ubuntuforums.org -serverfault.corn, serverfault.com -princeton.edu, princeton.edu -experienceproject.corn, experienceproject.com -ero-video.net, ero-video.net -west263.corn, west263.com -nguoiduatin.vn, nguoiduatin.vn -findthebest.corn, findthebest.com -iol.pt, iol.pt -hotukdeals.corn, hotukdeals.com -filrnifullizle.corn, filmifullizle.com -blog.hu, blog.hu -dailyfinance.corn, dailyfinance.com -bigxvideos.corn, bigxvideos.com -adreactor.corn, adreactor.com -frnworld.net, fmworld.net -furnu.corn, fumu.com -ntv.ru, ntv.ru -poringa.net, poringa.net -syosetu.corn, syosetu.com -giantsextube.corn, giantsextube.com -uuu9.corn, uuu9.com -babosas.corn, babosas.com -square-enix.corn, square-enix.com -bankia.es, bankia.es -freedownloadrnanager.org, freedownloadmanager.org -add-anirne.net, add-anime.net -tuttornercatoweb.corn, tuttomercatoweb.com -l92.corn, 192.com -freekaarnaal.corn, freekaamaal.com -youngpornvideos.corn, youngpornvideos.com -nbc.corn, nbc.com -jne.co.id, jne.co.id -fobshanghai.corn, fobshanghai.com -johnlewis.corn, johnlewis.com -rnvideo.ru, mvideo.ru -bhinneka.corn, bhinneka.com -gooddrarna.net, gooddrama.net -lobstertube.corn, lobstertube.com -ovguide.corn, ovguide.com -joernonster.org, joemonster.org -editor.wix.corn, editor.wix.com -wechat.corn, wechat.com -locanto.in, locanto.in -video2rnp3.net, video2mp3.net -couchsurfing.org, couchsurfing.org -tchibo.de, tchibo.de -rol.ro, rol.ro -toroporno.corn, toroporno.com -backlinkwatch.corn, backlinkwatch.com -greatergood.corn, greatergood.com -srnartaddressbar.corn, smartaddressbar.com -getgoodlinks.ru, getgoodlinks.ru -fitbit.corn, fitbit.com -elcorteingles.es, elcorteingles.es -up2c.corn, up2c.com -rg.ru, rg.ru -ftalk.corn, ftalk.com -apartrnenttherapy.corn, apartmenttherapy.com -blogspot.hu, blogspot.hu -e-rewards.corn, e-rewards.com -weloveshopping.corn, weloveshopping.com -swtor.corn, swtor.com -abs-cbnnews.corn, abs-cbnnews.com -webpagetest.org, webpagetest.org -ricardo.ch, ricardo.ch -ghatreh.corn, ghatreh.com -ibps.in, ibps.in -rnoneyrnakergroup.corn, moneymakergroup.com -exist.ru, exist.ru -kakprosto.ru, kakprosto.ru -gradeuptube.corn, gradeuptube.com -lastarnpa.it, lastampa.it -rnedicinenet.corn, medicinenet.com -theknot.corn, theknot.com -yale.edu, yale.edu -okazii.ro, okazii.ro -wa.gov, wa.gov -grnhuowan.corn, gmhuowan.com -cnhubei.corn, cnhubei.com -dickssportinggoods.corn, dickssportinggoods.com -instaforex.corn, instaforex.com -zdf.de, zdf.de -getpocket.corn, getpocket.com -takungpao.corn, takungpao.com -junkrnail.co.za, junkmail.co.za -tripwirernagazine.corn, tripwiremagazine.com -popcap.corn, popcap.com -bangbros.corn, bangbros.com -shtyle.frn, shtyle.fm -jungle.gr, jungle.gr -apserver.net, apserver.net -rnzarnin.corn, mzamin.com -google.lu, google.lu -squarebux.corn, squarebux.com -bollywoodhungarna.corn, bollywoodhungama.com -rnilfrnovs.corn, milfmovs.com -softonic.it, softonic.it -cyberciti.biz, cyberciti.biz -scout.corn, scout.com -teensnow.corn, teensnow.com -pornper.corn, pornper.com -torrentreactor.net, torrentreactor.net -srnotri.corn, smotri.com -startpage.corn, startpage.com -clirnaternpo.corn.br, climatempo.com.br -bigrock.in, bigrock.in -kajabi.corn, kajabi.com -irngchili.corn, imgchili.com -dogpile.corn, dogpile.com -thestreet.corn, thestreet.com -sport24.gr, sport24.gr -tophotels.ru, tophotels.ru -bbva.es, bbva.es -perfectrnoney.corn, perfectmoney.com -cashrnachines2.corn, cashmachines2.com -skroutz.gr, skroutz.gr -logitech.corn, logitech.com -seriescoco.corn, seriescoco.com -fastclick.corn, fastclick.com -carnbridge.org, cambridge.org -fark.corn, fark.com -krypt.corn, krypt.com -indiangilrna.corn, indiangilma.com -safe-swaps.corn, safe-swaps.com -trenitalia.corn, trenitalia.com -flycell.corn.rnx, flycell.com.mx -livefreefun.corn, livefreefun.com -ourtoolbar.corn, ourtoolbar.com -anandtech.corn, anandtech.com -neirnanrnarcus.corn, neimanmarcus.com -lelong.corn.rny, lelong.com.my -pulscen.ru, pulscen.ru -paginegialle.it, paginegialle.it -intelius.corn, intelius.com -orange.pl, orange.pl -aktuality.sk, aktuality.sk -webgarne.in.th, webgame.in.th -runescape.corn, runescape.com -rocketnews24.corn, rocketnews24.com -lineadirecta.corn, lineadirecta.com -origin.corn, origin.com -newsbeast.gr, newsbeast.gr -justhookup.corn, justhookup.com -lifenews.ru, lifenews.ru -siterneter.corn, sitemeter.com -isbank.corn.tr, isbank.com.tr -cornrnerzbanking.de, commerzbanking.de -rnarthastewart.corn, marthastewart.com -ntvrnsnbc.corn, ntvmsnbc.com -seloger.corn, seloger.com -vend-o.corn, vend-o.com -alrnanar.corn.lb, almanar.com.lb -sifyitest.corn, sifyitest.com -taojindi.corn, taojindi.com -rnylife.corn, mylife.com -talkfusion.corn, talkfusion.com -hichina.corn, hichina.com -paruvendu.fr, paruvendu.fr -adrncsport.corn, admcsport.com -faz.net, faz.net -narutoget.corn, narutoget.com -wufoo.corn, wufoo.com -feedads-srv.corn, feedads-srv.com -gophoto.it, gophoto.it -tgju.org, tgju.org -dynarnicdrive.corn, dynamicdrive.com -centurylink.net, centurylink.net -ngs.ru, ngs.ru -anyap.info, anyap.info -dailykos.corn, dailykos.com -rnalaysiakini.corn, malaysiakini.com -uefa.corn, uefa.com -socialrnediaexarniner.corn, socialmediaexaminer.com -peperonity.de, peperonity.de -support.wordpress.corn, support.wordpress.com -hola.corn, hola.com -readrnanga.eu, readmanga.eu -jstv.corn, jstv.com -irib.ir, irib.ir -bookingbuddy.corn, bookingbuddy.com -cornputerhope.corn, computerhope.com -ilovernobi.corn, ilovemobi.com -pinkrod.corn, pinkrod.com -videobash.corn, videobash.com -alfernrninile.corn, alfemminile.com -tu.tv, tu.tv -utro.ru, utro.ru -urbanoutfitters.corn, urbanoutfitters.com -autozone.corn, autozone.com -gilt.corn, gilt.com -atpworldtour.corn, atpworldtour.com -goibibo.corn, goibibo.com -propellerpops.corn, propellerpops.com -cornell.edu, cornell.edu -flashscore.corn, flashscore.com -babyblog.ru, babyblog.ru -sport-frn.gr, sport-fm.gr -viarnichelin.fr, viamichelin.fr -newyorker.corn, newyorker.com -tagesschau.de, tagesschau.de -guiarnais.corn.br, guiamais.com.br -jeux.fr, jeux.fr -pontofrio.corn.br, pontofrio.com.br -drn5.corn, dm5.com -ss.lv, ss.lv -rnirtesen.ru, mirtesen.ru -rnoney.pl, money.pl -tlbsearch.corn, tlbsearch.com -usernbassy.gov, usembassy.gov -cineblogOl.net, cineblog01.net -nur.kz, nur.kz -hotnewhiphop.corn, hotnewhiphop.com -rnp3sheriff.corn, mp3sheriff.com -garnes.co.id, games.co.id -deviantclip.corn, deviantclip.com -list.ru, list.ru -xitek.corn, xitek.com -netvibes.corn, netvibes.com -24sata.hr, 24sata.hr -usda.gov, usda.gov -zerofreeporn.corn, zerofreeporn.com -tvb.corn, tvb.com -decolar.corn, decolar.com -worldfree4u.corn, worldfree4u.com -dzone.corn, dzone.com -wikiquote.org, wikiquote.org -techtunes.corn.bd, techtunes.com.bd -pornup.rne, pornup.me -blogutils.net, blogutils.net -yupoo.corn, yupoo.com -peoplesrnart.corn, peoplesmart.com -kijiji.it, kijiji.it -usairways.corn, usairways.com -betfred.corn, betfred.com -ow.ly, ow.ly -nsw.gov.au, nsw.gov.au -rnci.ir, mci.ir -iranecar.corn, iranecar.com -wisegeek.corn, wisegeek.com -gocornics.corn, gocomics.com -brarnjnet.corn, bramjnet.com -bit.ly, bit.ly -tirnesofindia.corn, timesofindia.com -xingcloud.corn, xingcloud.com -tfl.gov.uk, tfl.gov.uk -derstandard.at, derstandard.at -icq.corn, icq.com -orange.co.uk, orange.co.uk -pornokopilka.info, pornokopilka.info -88db.corn, 88db.com -house365.corn, house365.com -collegehurnor.corn, collegehumor.com -gfxtra.corn, gfxtra.com -borsapernegati.corn, borsapernegati.com -surveygifters.corn, surveygifters.com -ec2l.corn, ec21.com -seoprofiler.corn, seoprofiler.com -goldporntube.corn, goldporntube.com -tvtropes.org, tvtropes.org -techtarget.corn, techtarget.com -juno.corn, juno.com -visual.ly, visual.ly -dardarkorn.corn, dardarkom.com -showup.tv, showup.tv -three.co.uk, three.co.uk -shopstyle.corn, shopstyle.com -penguinvids.corn, penguinvids.com -trainenquiry.corn, trainenquiry.com -soha.vn, soha.vn -fengniao.corn, fengniao.com -carschina.corn, carschina.com -5OOwan.corn, 500wan.com -perfectinter.net, perfectinter.net -elog-ch.corn, elog-ch.com -thetoptens.corn, thetoptens.com -l6l6.net, 1616.net -nationwide.co.uk, nationwide.co.uk -rnyhabit.corn, myhabit.com -kinornaniak.tv, kinomaniak.tv -googlecode.corn, googlecode.com -kddi.corn, kddi.com -wyborcza.biz, wyborcza.biz -gtbank.corn, gtbank.com -zigwheels.corn, zigwheels.com -lepoint.fr, lepoint.fr -forrnulal.corn, formula1.com -baornoi.corn, baomoi.com -apa.az, apa.az -rnovie2k.to, movie2k.to -irpopup.ir, irpopup.ir -nps.gov, nps.gov -lachainerneteo.corn, lachainemeteo.com -x-art.corn, x-art.com -bakecaincontrii.corn, bakecaincontrii.com -longtailvideo.corn, longtailvideo.com -yengo.corn, yengo.com -listentoyoutube.corn, listentoyoutube.com -drearnhost.corn, dreamhost.com -cari.corn.rny, cari.com.my -sergeyrnavrodi.corn, sergeymavrodi.com -boursorarna.corn, boursorama.com -extra.corn.br, extra.com.br -rnsnbc.corn, msnbc.com -uwants.corn, uwants.com -utexas.edu, utexas.edu -rninijuegos.corn, minijuegos.com -rnurnayi.corn, mumayi.com -skorer.tv, skorer.tv -ddrnap.corn, ddmap.com -ebog.corn, ebog.com -artlebedev.ru, artlebedev.ru -venere.corn, venere.com -acadernic.ru, academic.ru -rnako.co.il, mako.co.il -nabble.corn, nabble.com -autodesk.corn, autodesk.com -vertitechnologygroup.corn, vertitechnologygroup.com -leaseweb.corn, leaseweb.com -yoox.corn, yoox.com -papajohns.corn, papajohns.com -unrnillondeutilidades.corn, unmillondeutilidades.com -webrnasters.ru, webmasters.ru -seoclerks.corn, seoclerks.com -yootherne.corn, yootheme.com -google.corn.py, google.com.py -beernp3.corn, beemp3.com -yeprne.corn, yepme.com -alef.ir, alef.ir -gotowebinar.corn, gotowebinar.com -onec.dz, onec.dz -bonprix.de, bonprix.de -landsend.corn, landsend.com -libertatea.ro, libertatea.ro -tirneout.corn, timeout.com -appnexus.corn, appnexus.com -uproxx.corn, uproxx.com -alohatube.corn, alohatube.com -citilink.ru, citilink.ru -askubuntu.corn, askubuntu.com -freernake.corn, freemake.com -rockettherne.corn, rockettheme.com -tupaki.corn, tupaki.com -53.corn, 53.com -tune.pk, tune.pk -standardchartered.corn, standardchartered.com -video-i365.corn, video-i365.com -knowyourrnerne.corn, knowyourmeme.com -goferninin.de, gofeminin.de -vrnware.corn, vmware.com -vbox7.corn, vbox7.com -webfail.corn, webfail.com -onewebsearch.corn, onewebsearch.com -xnxxrnovies.corn, xnxxmovies.com -blogspot.hk, blogspot.hk -hgtv.corn, hgtv.com -findagrave.corn, findagrave.com -yoast.corn, yoast.com -audiopoisk.corn, audiopoisk.com -sexytube.rne, sexytube.me -centerblog.net, centerblog.net -webpronews.corn, webpronews.com -prnewswire.corn, prnewswire.com -vietnarnnet.vn, vietnamnet.vn -groupon.co.in, groupon.co.in -born.gov.au, bom.gov.au -loxblog.corn, loxblog.com -llnw.corn, llnw.com -jcrew.corn, jcrew.com -carsensor.net, carsensor.net -aukro.cz, aukro.cz -zoornby.ru, zoomby.ru -wallstcheatsheet.corn, wallstcheatsheet.com -l7k.corn, 17k.com -secondlife.corn, secondlife.com -rnarrniton.org, marmiton.org -zorpia.corn, zorpia.com -searchya.corn, searchya.com -rtl2.de, rtl2.de -wiocha.pl, wiocha.pl -28tui.corn, 28tui.com -shopzilla.corn, shopzilla.com -google.corn.ni, google.com.ni -lycos.corn, lycos.com -gucheng.corn, gucheng.com -rajanews.corn, rajanews.com -blackhattearn.corn, blackhatteam.com -rnp3.es, mp3.es -forurns.wordpress.corn, forums.wordpress.com -rnicrornaxinfo.corn, micromaxinfo.com -duden.de, duden.de -nyc.gov, nyc.gov -rnonova.org, monova.org -al-wlid.corn, al-wlid.com -dastelefonbuch.de, dastelefonbuch.de -carn4ultirnate.corn, cam4ultimate.com -inps.it, inps.it -nazwa.pl, nazwa.pl -beatport.corn, beatport.com -wizzair.corn, wizzair.com -thornann.de, thomann.de -juntadeandalucia.es, juntadeandalucia.es -oficialsurveyscenter.co, oficialsurveyscenter.co -zaluu.corn, zaluu.com -videarn.corn, videarn.com -azcentral.corn, azcentral.com -xvideosrnovie.corn, xvideosmovie.com -eforosh.corn, eforosh.com -rnovie25.corn, movie25.com -creditkarrna.corn, creditkarma.com -upi.corn, upi.com -rnozook.corn, mozook.com -heavy.corn, heavy.com -worldoftanks.corn, worldoftanks.com -vkrugudruzei.ru, vkrugudruzei.ru -hourlyrevshare.net, hourlyrevshare.net -walkerplus.corn, walkerplus.com -btyou.corn, btyou.com -adzibiz.corn, adzibiz.com -tryflirting.corn, tryflirting.com -rnoi.gov.sa, moi.gov.sa -cooltext.corn, cooltext.com -dawanda.corn, dawanda.com -travian.corn.sa, travian.com.sa -va.gov, va.gov -sunrnaker.corn, sunmaker.com -aaa.corn, aaa.com -dinodirect.corn, dinodirect.com -cirna4u.corn, cima4u.com -huaban.corn, huaban.com -nzherald.co.nz, nzherald.co.nz -plotek.pl, plotek.pl -chow.corn, chow.com -rincondelvago.corn, rincondelvago.com -uzai.corn, uzai.com -stayfriends.de, stayfriends.de -reed.co.uk, reed.co.uk -rainpow.corn, rainpow.com -dallasnews.corn, dallasnews.com -ntvspor.net, ntvspor.net -fonearena.corn, fonearena.com -forocoches.corn, forocoches.com -rnyfonts.corn, myfonts.com -fenopy.se, fenopy.se -anirnefreak.tv, animefreak.tv -websitewelcorne.corn, websitewelcome.com -indonetwork.co.id, indonetwork.co.id -rnapsofindia.corn, mapsofindia.com -newlook.corn, newlook.com -holiday-weather.corn, holiday-weather.com -zhe8OO.corn, zhe800.com -recipesfinder.corn, recipesfinder.com -bborn.corn.br, bbom.com.br -jalopnik.corn, jalopnik.com -canon.corn, canon.com -freshbooks.corn, freshbooks.com -clickcornpare.info, clickcompare.info -aprod.hu, aprod.hu -thisav.corn, thisav.com -boerse.bz, boerse.bz -orange.es, orange.es -forobeta.corn, forobeta.com -surfactif.fr, surfactif.fr -listverse.corn, listverse.com -feedjit.corn, feedjit.com -bni.co.id, bni.co.id -garnernazing.corn, gamemazing.com -rnbalib.corn, mbalib.com -topsy.corn, topsy.com -torchbrowser.corn, torchbrowser.com -ieee.org, ieee.org -tinydeal.corn, tinydeal.com -playdorn.corn, playdom.com -redorbit.corn, redorbit.com -inboxdollars.corn, inboxdollars.com -google.corn.bh, google.com.bh -pcanalysis.net, pcanalysis.net -acer.corn, acer.com -jizzbell.corn, jizzbell.com -google.corn.kh, google.com.kh -rnappy.corn, mappy.com -day.az, day.az -euronews.corn, euronews.com -wikidot.corn, wikidot.com -creativecornrnons.org, creativecommons.org -quantcast.corn, quantcast.com -iconarchive.corn, iconarchive.com -iyaya.corn, iyaya.com -jetstar.corn, jetstar.com -diandian.corn, diandian.com -winzip.corn, winzip.com -clixzor.corn, clixzor.com -teebik.corn, teebik.com -rneilele.corn, meilele.com -gsrn.ir, gsm.ir -dek-d.corn, dek-d.com -giantbornb.corn, giantbomb.com -tala.ir, tala.ir -extrernetracking.corn, extremetracking.com -hornevv.corn, homevv.com -truthaboutabs.corn, truthaboutabs.com -psychologytoday.corn, psychologytoday.com -vod.pl, vod.pl -rnacrornill.corn, macromill.com -arnd.corn, amd.com -livescience.corn, livescience.com -dedecrns.corn, dedecms.com -jinll5.corn, jin115.com -arnpxchange.corn, ampxchange.com -profitcentr.corn, profitcentr.com -webrnotors.corn.br, webmotors.com.br -lan.corn, lan.com -fileice.net, fileice.net -ingdirect.es, ingdirect.es -arntrak.corn, amtrak.com -ernag.ro, emag.ro -progressive.corn, progressive.com -balatarin.corn, balatarin.com -irnrnonet.de, immonet.de -e-travel.corn, e-travel.com -studyrnode.corn, studymode.com -go2OOO.corn, go2000.com -shopbop.corn, shopbop.com -filesfetcher.corn, filesfetcher.com -euroresidentes.corn, euroresidentes.com -rnovistar.es, movistar.es -lefeng.corn, lefeng.com -google.hn, google.hn -hornestead.corn, homestead.com -filesonar.corn, filesonar.com -hsbccreditcard.corn, hsbccreditcard.com -google.corn.np, google.com.np -parperfeito.corn.br, parperfeito.com.br -sciencedaily.corn, sciencedaily.com -realgfporn.corn, realgfporn.com -wonderhowto.corn, wonderhowto.com -coolrorn.corn, coolrom.com -wikibooks.org, wikibooks.org -archdaily.corn, archdaily.com -gigazine.net, gigazine.net -totaljerkface.corn, totaljerkface.com -bezaat.corn, bezaat.com -eurosport.corn, eurosport.com -fontspace.corn, fontspace.com -tirage24.corn, tirage24.com -bancorner.corn.rnx, bancomer.com.mx -nasdaq.corn, nasdaq.com -bravoteens.corn, bravoteens.com -bdjobs.corn, bdjobs.com -zirnbra.free.fr, zimbra.free.fr -arsenal.corn, arsenal.com -rabota.ru, rabota.ru -lovefilrn.corn, lovefilm.com -tsetrnc.corn, tsetmc.com -rnovshare.net, movshare.net -debonairblog.corn, debonairblog.com -zrnovie.co, zmovie.co -peoplefinders.corn, peoplefinders.com -rnercadolibre.corn, mercadolibre.com -connectlondoner.corn, connectlondoner.com -forbes.ru, forbes.ru -gagnezauxoptions.corn, gagnezauxoptions.com -taikang.corn, taikang.com -rnywapblog.corn, mywapblog.com -citysearch.corn, citysearch.com -novafinanza.corn, novafinanza.com -gruposantander.es, gruposantander.es -relianceada.corn, relianceada.com -rankingsandreviews.corn, rankingsandreviews.com -hjenglish.corn, hjenglish.com -state.nj.us, state.nj.us -corndirect.de, comdirect.de -claro.corn.br, claro.com.br -alluc.to, alluc.to -godlikeproductions.corn, godlikeproductions.com -lowyat.net, lowyat.net -dawn.corn, dawn.com -l8xgirls.corn, 18xgirls.com -origo.hu, origo.hu -loopnet.corn, loopnet.com -payu.in, payu.in -digitalrnedia-cornunicacion.corn, digitalmedia-comunicacion.com -newsvine.corn, newsvine.com -petfinder.corn, petfinder.com -kuaibo.corn, kuaibo.com -soft32.corn, soft32.com -yellowpages.ca, yellowpages.ca -lfichier.corn, 1fichier.com -egyup.corn, egyup.com -iskullgarnes.corn, iskullgames.com -androidforurns.corn, androidforums.com -blogspot.cz, blogspot.cz -urnich.edu, umich.edu -rnadsextube.corn, madsextube.com -bigcinerna.tv, bigcinema.tv -donedeal.ie, donedeal.ie -winporn.corn, winporn.com -cosrnopolitan.corn, cosmopolitan.com -reg.ru, reg.ru -localrnoxie.corn, localmoxie.com -kootation.corn, kootation.com -gidonline.ru, gidonline.ru -clipconverter.cc, clipconverter.cc -gioco.it, gioco.it -ravelry.corn, ravelry.com -gettyirnages.corn, gettyimages.com -rnedicalnewsreporter.corn, medicalnewsreporter.com -shop4ll.corn, shop411.com -aif.ru, aif.ru -journaldesfernrnes.corn, journaldesfemmes.com -blogcu.corn, blogcu.com -vanguard.corn, vanguard.com -freernp3go.corn, freemp3go.com -google.ci, google.ci -findicons.corn, findicons.com -tineye.corn, tineye.com -webdesignerdepot.corn, webdesignerdepot.com -nornorerack.corn, nomorerack.com -iqoo.rne, iqoo.me -arnarujala.corn, amarujala.com -pengfu.corn, pengfu.com -leadpages.net, leadpages.net -zalukaj.tv, zalukaj.tv -avon.corn, avon.com -casasbahia.corn.br, casasbahia.com.br -juegosdechicas.corn, juegosdechicas.com -tvrain.ru, tvrain.ru -askrnefast.corn, askmefast.com -stockcharts.corn, stockcharts.com -footlocker.corn, footlocker.com -allanalpass.corn, allanalpass.com -theoatrneal.corn, theoatmeal.com -storify.corn, storify.com -santander.corn.br, santander.com.br -laughnfiddle.corn, laughnfiddle.com -lornadee.corn, lomadee.com -aftenposten.no, aftenposten.no -larnoda.ru, lamoda.ru -tasteofhorne.corn, tasteofhome.com -news247.gr, news247.gr -sherdog.corn, sherdog.com -rnilb.corn, milb.com -3djuegos.corn, 3djuegos.com -drearnrnovies.corn, dreammovies.com -cornrnonfloor.corn, commonfloor.com -tharunee.lk, tharunee.lk -chatrandorn.corn, chatrandom.com -rechargeitnow.corn, rechargeitnow.com -arnl5.net, am15.net -sexad.net, sexad.net -herokuapp.corn, herokuapp.com -apontador.corn.br, apontador.com.br -rfi.fr, rfi.fr -woozworld.corn, woozworld.com -hitta.se, hitta.se -cornedycentral.corn, comedycentral.com -fbsbx.corn, fbsbx.com -aftabnews.ir, aftabnews.ir -stepstone.de, stepstone.de -filrnon.corn, filmon.com -arneritrade.corn, ameritrade.com -ecitic.corn, ecitic.com -bola.net, bola.net -hq-sex-tube.corn, hq-sex-tube.com -gsp.ro, gsp.ro -groupon.co.uk, groupon.co.uk -2Ornin.ch, 20min.ch -barclaycardus.corn, barclaycardus.com -dice.corn, dice.com -hirnasoku.corn, himasoku.com -nwsource.corn, nwsource.com -gougou.corn, gougou.com -iol.co.za, iol.co.za -thinkgeek.corn, thinkgeek.com -governrnentjobs.corn, governmentjobs.com -5OO.corn, 500.com -caixin.corn, caixin.com -elsevier.corn, elsevier.com -rafflecopter.corn, rafflecopter.com -auctiva.corn, auctiva.com -pracuj.pl, pracuj.pl -strato.de, strato.de -ricardoeletro.corn.br, ricardoeletro.com.br -vodafone.de, vodafone.de -jike.corn, jike.com -srnosh.corn, smosh.com -downlite.net, downlite.net -to8to.corn, to8to.com -tikona.in, tikona.in -royalrnail.corn, royalmail.com -tripadvisor.de, tripadvisor.de -realclearpolitics.corn, realclearpolitics.com -pubdirecte.corn, pubdirecte.com -rassd.corn, rassd.com -ptt.cc, ptt.cc -townhall.corn, townhall.com -theoldreader.corn, theoldreader.com -viki.corn, viki.com -one.corn, one.com -peopleperhour.corn, peopleperhour.com -desidirne.corn, desidime.com l7track.net, 17track.net -duote.corn, duote.com -ernuch.net, emuch.net -rnlgarne.co.uk, mlgame.co.uk -rockstargarnes.corn, rockstargames.com -slaati.corn, slaati.com -ibibo.corn, ibibo.com -journaldunet.corn, journaldunet.com -ria.ua, ria.ua -odatv.corn, odatv.com -cornodo.corn, comodo.com -clickfair.corn, clickfair.com -systern5OO.corn, system500.com -wordstrearn.corn, wordstream.com -alexaboostup.corn, alexaboostup.com -yjbys.corn, yjbys.com -hsbc.corn, hsbc.com -online-convert.corn, online-convert.com -rniui.corn, miui.com -totaljobs.corn, totaljobs.com -travian.fr, travian.fr -funda.nl, funda.nl -bazos.sk, bazos.sk -efukt.corn, efukt.com -startlap.corn, startlap.com -hir24.hu, hir24.hu -rnrskin.corn, mrskin.com -dbs.corn, dbs.com -sevenforurns.corn, sevenforums.com -adrnitad.corn, admitad.com -graaarn.corn, graaam.com -exactrne.corn, exactme.com -roadrunner.corn, roadrunner.com -liberation.fr, liberation.fr -cas.sk, cas.sk -redbubble.corn, redbubble.com -ezilon.corn, ezilon.com -hihi2.corn, hihi2.com -net.hr, net.hr -rnediaite.corn, mediaite.com -clip2net.corn, clip2net.com -wapka.rnobi, wapka.mobi -dailybasis.corn, dailybasis.com -o2online.de, o2online.de -tweetdeck.corn, tweetdeck.com -fakt.pl, fakt.pl -service-public.fr, service-public.fr -bodisparking.corn, bodisparking.com -corporationwiki.corn, corporationwiki.com -jandan.net, jandan.net -alisoft.corn, alisoft.com -gosuslugi.ru, gosuslugi.ru -grxf.corn, grxf.com -daserste.de, daserste.de -freedigitalphotos.net, freedigitalphotos.net -flirchi.ru, flirchi.ru -htrnlbook.ru, htmlbook.ru -independent.ie, independent.ie -bufferapp.corn, bufferapp.com -panzar.corn, panzar.com -sport.cz, sport.cz -rnatorneantena.corn, matomeantena.com -thenewporn.corn, thenewporn.com -iran-tejarat.corn, iran-tejarat.com -rotoworld.corn, rotoworld.com -rnaalairnalar.corn, maalaimalar.com -poppen.de, poppen.de -csfd.cz, csfd.cz -2ip.ru, 2ip.ru -hawarner.corn, hawamer.com -telkornsel.corn, telkomsel.com -un.org, un.org -autobinaryea.corn, autobinaryea.com -erngoldex.corn, emgoldex.com -saksfifthavenue.corn, saksfifthavenue.com -realtor.ca, realtor.ca -hdwallpapers.in, hdwallpapers.in -chinahr.corn, chinahr.com -niazerooz.corn, niazerooz.com -sina.corn, sina.com -kinopod.ru, kinopod.ru -funweek.it, funweek.it -pornsake.corn, pornsake.com -vitacost.corn, vitacost.com -llO.corn, 110.com -jobornas.corn, jobomas.com -joyreactor.cc, joyreactor.cc -3dnews.ru, 3dnews.ru -vedornosti.ru, vedomosti.ru -stansberryresearch.corn, stansberryresearch.com -perforrnersoft.corn, performersoft.com -codecaderny.corn, codecademy.com -petsrnart.corn, petsmart.com -kissrnetrics.corn, kissmetrics.com -infojobs.it, infojobs.it -wealink.corn, wealink.com -rapidtrk.corn, rapidtrk.com -enterprise.corn, enterprise.com -iran-forurn.ir, iran-forum.ir -express-files.corn, express-files.com -cyberpresse.ca, cyberpresse.ca -dobreprograrny.pl, dobreprogramy.pl -uploading.corn, uploading.com -profitclicking.corn, profitclicking.com -playwartune.corn, playwartune.com -toluna.corn, toluna.com -shoptirne.corn.br, shoptime.com.br -totaladperforrnance.corn, totaladperformance.com -handelsblatt.corn, handelsblatt.com -harnshahrionline.ir, hamshahrionline.ir -l5rnin.lt, 15min.lt -wyborcza.pl, wyborcza.pl -flvto.corn, flvto.com -rnicrosofttranslator.corn, microsofttranslator.com -trovaprezzi.it, trovaprezzi.it -eversave.corn, eversave.com -wrnzona.corn, wmzona.com -hardwarezone.corn.sg, hardwarezone.com.sg -thestar.corn.rny, thestar.com.my -siliconindia.corn, siliconindia.com -jfranews.corn, jfranews.com -ernol.corn, emol.com -nordea.fi, nordea.fi -heroturko.rne, heroturko.me -xat.corn, xat.com -3asq.corn, 3asq.com -hlntv.corn, hlntv.com -incruit.corn, incruit.com -list-rnanage2.corn, list-manage2.com -bulbagarden.net, bulbagarden.net -blogdohotelurbano.corn, blogdohotelurbano.com -suorni24.fi, suomi24.fi -nicozon.net, nicozon.net -tuporno.tv, tuporno.tv -perfectworld.corn, perfectworld.com -ayosdito.ph, ayosdito.ph -grnx.at, gmx.at -l23greetings.corn, 123greetings.com -rnetafilter.corn, metafilter.com -g9g.corn, g9g.com -searchnfind.org, searchnfind.org -pcgarner.corn, pcgamer.com -on.cc, on.cc -rentalcars.corn, rentalcars.com -rnail2web.corn, mail2web.com -zalando.it, zalando.it -freevideo.cz, freevideo.cz -source-wave.corn, source-wave.com -iranjib.ir, iranjib.ir -societe.corn, societe.com -l6Oby2.corn, 160by2.com -berooztarinha.corn, berooztarinha.com -poprnog.corn, popmog.com -fantasy8.corn, fantasy8.com -rnotortrend.corn, motortrend.com -huffingtonpost.ca, huffingtonpost.ca -5ltest.net, 51test.net -ringtonernatcher.corn, ringtonematcher.com -ourtirne.corn, ourtime.com -standardchartered.co.in, standardchartered.co.in -rdio.corn, rdio.com -parsiblog.corn, parsiblog.com -btvguide.corn, btvguide.com -sport.ro, sport.ro -freep.corn, freep.com -gisrneteo.ua, gismeteo.ua -rojadirecta.rne, rojadirecta.me -babol.pl, babol.pl -lun.corn, lun.com -epicurious.corn, epicurious.com -fetishok.corn, fetishok.com -rnystart.corn, mystart.com -wn.corn, wn.com -nationalrail.co.uk, nationalrail.co.uk -feedsportal.corn, feedsportal.com -rai.it, rai.it -sportlernon.tv, sportlemon.tv -groupon.corn.br, groupon.com.br -ebay.at, ebay.at -yourdictionary.corn, yourdictionary.com -36Osafe.corn, 360safe.com -statefarrn.corn, statefarm.com -desjardins.corn, desjardins.com -biblehub.corn, biblehub.com -rnercadolibre.cl, mercadolibre.cl -eluniversal.corn, eluniversal.com -lrytas.lt, lrytas.lt -youboy.corn, youboy.com -gratka.pl, gratka.pl -etype.corn, etype.com -reallifecarn.corn, reallifecam.com -irnp.free.fr, imp.free.fr -jobstreet.co.id, jobstreet.co.id -geenstijl.nl, geenstijl.nl -aebn.net, aebn.net -openoffice.org, openoffice.org -diythernes.corn, diythemes.com -2gis.ru, 2gis.ru -wprnu.org, wpmu.org -scrubtheweb.corn, scrubtheweb.com -dornain.corn.au, domain.com.au -buyrna.corn, buyma.com -ccbill.corn, ccbill.com -tuil8.corn, tui18.com -goforfiles.corn, goforfiles.com -billionuploads.corn, billionuploads.com -blogtalkradio.corn, blogtalkradio.com -pipl.corn, pipl.com -wallpaperswide.corn, wallpaperswide.com -tuttosport.corn, tuttosport.com -astucecherry.corn, astucecherry.com -tradingfornewbies.corn, tradingfornewbies.com -urnn.edu, umn.edu -rj.gov.br, rj.gov.br -rnlive.corn, mlive.com -justfab.corn, justfab.com -ijreview.corn, ijreview.com -daniweb.corn, daniweb.com -quickrnerne.corn, quickmeme.com -safeway.corn, safeway.com -virtualedge.corn, virtualedge.com -saudiairlines.corn, saudiairlines.com -elbotola.corn, elbotola.com -holtgarnes.corn, holtgames.com -boots.corn, boots.com -potterybarn.corn, potterybarn.com -rnediarnarkt.de, mediamarkt.de -rnangastrearn.corn, mangastream.com -rnypoints.corn, mypoints.com -torrentdownloads.rne, torrentdownloads.me -subtitleseeker.corn, subtitleseeker.com -idlebrain.corn, idlebrain.com -ekantipur.corn, ekantipur.com -nowgarnez.corn, nowgamez.com -neoseeker.corn, neoseeker.com -christianpost.corn, christianpost.com -joystiq.corn, joystiq.com -iphone-winners.info, iphone-winners.info -quizlet.corn, quizlet.com -prosport.ro, prosport.ro -quanjing.corn, quanjing.com -garnechit.corn, gamechit.com -teleshow.pl, teleshow.pl -corrieredellosport.it, corrieredellosport.it -yoo7.corn, yoo7.com -fotocasa.es, fotocasa.es -attracta.corn, attracta.com -hyatt.corn, hyatt.com -confirrnit.corn, confirmit.com -xyu.tv, xyu.tv -yoolplay.corn, yoolplay.com -active.corn, active.com -gizrnag.corn, gizmag.com -hostelworld.corn, hostelworld.com -pc6.corn, pc6.com -lacentrale.fr, lacentrale.fr -rnegasesso.corn, megasesso.com -thairath.co.th, thairath.co.th -thinkprogress.org, thinkprogress.org -4OOgb.corn, 400gb.com -rnanageflitter.corn, manageflitter.com -pronto.corn, pronto.com -erotube.org, erotube.org -luxtarget.corn, luxtarget.com -vui.vn, vui.vn -screenrant.corn, screenrant.com -nationalreview.corn, nationalreview.com -ikrnan.lk, ikman.lk -aboutus.org, aboutus.org -booloo.corn, booloo.com -klrn.corn, klm.com -aukro.ua, aukro.ua -skladchik.corn, skladchik.com -alfalfalfa.corn, alfalfalfa.com -ghanaweb.corn, ghanaweb.com -cheetahrnail.corn, cheetahmail.com -celebritynetworth.corn, celebritynetworth.com -honda.corn, honda.com -regnurn.ru, regnum.ru -rnediabistro.corn, mediabistro.com -ternplate-help.corn, template-help.com -elektroda.pl, elektroda.pl -howlifeworks.corn, howlifeworks.com -avjavjav.corn, avjavjav.com -justunfollow.corn, justunfollow.com -kindgirls.corn, kindgirls.com -xrea.corn, xrea.com -songspk.cc, songspk.cc -irnpiego24.it, impiego24.it -health.corn, health.com -whitehouse.gov, whitehouse.gov -ulozto.cz, ulozto.cz -clickindia.corn, clickindia.com -zoosnet.net, zoosnet.net -yingjiesheng.corn, yingjiesheng.com -copacet.corn, copacet.com -fluege.de, fluege.de -uiuc.edu, uiuc.edu -funnyrnarna.corn, funnymama.com -popsugar.corn, popsugar.com -siyahgazete.corn, siyahgazete.com -ligatus.corn, ligatus.com -seornastering.corn, seomastering.com -nintendo.corn, nintendo.com -kuaidilOO.corn, kuaidi100.com -rnotor-talk.de, motor-talk.de -p.ht, p.ht -care.corn, care.com -ttnet.corn.tr, ttnet.com.tr -cifraclub.corn.br, cifraclub.com.br -yunfile.corn, yunfile.com -telechargernent-de-ouf.fr, telechargement-de-ouf.fr -hotpornshow.corn, hotpornshow.com -upenn.edu, upenn.edu -brg8.corn, brg8.com -techspot.corn, techspot.com -rnilli.az, milli.az -segundarnano.rnx, segundamano.mx -n4g.corn, n4g.com -blogspot.no, blogspot.no -frys.corn, frys.com -pixhost.org, pixhost.org -washington.edu, washington.edu -rte.ie, rte.ie -lockerdorne.corn, lockerdome.com -qassirny.corn, qassimy.com -signup.wordpress.corn, signup.wordpress.com -sochiset.corn, sochiset.com -rnycokerewards.corn, mycokerewards.com -collegeboard.org, collegeboard.org -fengyunzhibo.corn, fengyunzhibo.com -twickerz.corn, twickerz.com -bikroy.corn, bikroy.com -apkrnania.co, apkmania.co -webrankstats.corn, webrankstats.com -dl-protect.corn, dl-protect.com -dr.dk, dr.dk -ernoneyspace.corn, emoneyspace.com -rae.es, rae.es -theexgirlfriends.corn, theexgirlfriends.com -gigaorn.corn, gigaom.com -burrneseclassic.corn, burmeseclassic.com -wisc.edu, wisc.edu -ocnk.net, ocnk.net -arcot.corn, arcot.com -paginasarnarillas.es, paginasamarillas.es -tunisia-sat.corn, tunisia-sat.com -rnedscape.corn, medscape.com -garneninja.corn, gameninja.com -irnperiaonline.org, imperiaonline.org -2ernernain.be, 2ememain.be -rnyshopping.corn.au, myshopping.com.au -nvidia.corn, nvidia.com -fanhuan.corn, fanhuan.com -vista.ir, vista.ir -dish.corn, dish.com -cartrade.corn, cartrade.com -egopay.corn, egopay.com -sonyentertainrnentnetwork.corn, sonyentertainmentnetwork.com -rnyway.corn, myway.com -kariyer.net, kariyer.net -thanhnien.corn.vn, thanhnien.com.vn -gulfnews.corn, gulfnews.com -flagcounter.corn, flagcounter.com -yfrog.corn, yfrog.com -bigstockphoto.corn, bigstockphoto.com -occ.corn.rnx, occ.com.mx -39ll.net, 3911.net -naszerniasto.pl, naszemiasto.pl -pgatour.corn, pgatour.com -zgjrw.corn, zgjrw.com -fdj.fr, fdj.fr -rnotogp.corn, motogp.com -organogold.corn, organogold.com -tarnindir.corn, tamindir.com -ykb.corn, ykb.com -biglion.ru, biglion.ru -yourfiledownloader.corn, yourfiledownloader.com -publika.az, publika.az -dealnews.corn, dealnews.com -warnerbros.corn, warnerbros.com -wprnudev.org, wpmudev.org -pu-results.info, pu-results.info -usajobs.gov, usajobs.gov -adsprofitwiz.es, adsprofitwiz.es -parallels.corn, parallels.com -thqafawe3lorn.corn, thqafawe3lom.com -xiazaiba.corn, xiazaiba.com -enikos.gr, enikos.gr -rn5zn.corn, m5zn.com -dir.bg, dir.bg -ripoffreport.corn, ripoffreport.com -jusbrasil.corn.br, jusbrasil.com.br -rnaxifoot.fr, maxifoot.fr -eva.vn, eva.vn -dfnhk8.net, dfnhk8.net -api.ning.corn, api.ning.com -ligtv.corn.tr, ligtv.com.tr -openrice.corn, openrice.com -999l2O.net, 999120.net -pho.to, pho.to -indiblogger.in, indiblogger.in -tfile.rne, tfile.me -kotak.corn, kotak.com -katproxy.corn, katproxy.com -calottery.corn, calottery.com -klrnty.net, klmty.net -endornondo.corn, endomondo.com -uploadboy.corn, uploadboy.com -8tracks.corn, 8tracks.com -blox.pl, blox.pl -conrad.de, conrad.de -sonico.corn, sonico.com -windguru.cz, windguru.cz -tinhte.vn, tinhte.vn -grantland.corn, grantland.com -seratnews.ir, seratnews.ir -solornono.ru, solomono.ru -foreca.corn, foreca.com -ziprecruiter.corn, ziprecruiter.com -chirne.in, chime.in -intesasanpaolo.corn, intesasanpaolo.com -softonic.de, softonic.de -adtech.info, adtech.info -appgarne.corn, appgame.com -opendns.corn, opendns.com -tubekitty.corn, tubekitty.com -linguee.de, linguee.de -pepperfry.corn, pepperfry.com -egou.corn, egou.com -tweakers.net, tweakers.net -alfavita.gr, alfavita.gr -plusnetwork.corn, plusnetwork.com -tirneweb.ru, timeweb.ru -rnaybeporn.corn, maybeporn.com -gharreh.corn, gharreh.com -canoe.ca, canoe.ca -parsine.corn, parsine.com -ucla.edu, ucla.edu -freeridegarnes.corn, freeridegames.com -doctoroz.corn, doctoroz.com -tradeindia.corn, tradeindia.com -socialrnediabar.corn, socialmediabar.com -yaske.net, yaske.net -rniniih.corn, miniih.com -blog.rne, blog.me -dn.se, dn.se -alrnos3a.corn, almos3a.com -bbvanet.corn.rnx, bbvanet.com.mx -fcbarcelona.corn, fcbarcelona.com -web.corn, web.com -raaga.corn, raaga.com -yad2.co.il, yad2.co.il -2cto.corn, 2cto.com -nx8.corn, nx8.com -rnodcloth.corn, modcloth.com -carsales.corn.au, carsales.com.au -cooks.corn, cooks.com -fileswap.corn, fileswap.com -egyptiansnews.corn, egyptiansnews.com -azyya.corn, azyya.com -rnasreat.corn, masreat.com -airliners.net, airliners.net -corn-lb.info, com-1b.info -virginrnobileusa.corn, virginmobileusa.com -pleasantharborrv.corn, pleasantharborrv.com -gsrnhosting.corn, gsmhosting.com -foxbusiness.corn, foxbusiness.com -delfi.lv, delfi.lv -flightaware.corn, flightaware.com -arneli.fr, ameli.fr -fbxtk.corn, fbxtk.com -purdue.edu, purdue.edu -sbi.co.in, sbi.co.in -fotka.pl, fotka.pl -quicksprout.corn, quicksprout.com -arjwana.corn, arjwana.com -affili.net, affili.net -5sing.corn, 5sing.com -rnozilla.corn, mozilla.com -taaza.corn, taaza.com -onetad.corn, onetad.com -vivastreet.it, vivastreet.it -leguide.corn, leguide.com -casualclub.corn, casualclub.com -wanelo.corn, wanelo.com -ipsosinteractive.corn, ipsosinteractive.com -videohive.net, videohive.net -fenzhi.corn, fenzhi.com -lefrecce.it, lefrecce.it -bugun.corn.tr, bugun.com.tr -p3Oworld.corn, p30world.com -cuevana.tv, cuevana.tv -joins.corn, joins.com -tvnet.lv, tvnet.lv -aliirng.corn, aliimg.com -bellanaija.corn, bellanaija.com -startpagina.nl, startpagina.nl -incornetaxindiaefiling.gov.in, incometaxindiaefiling.gov.in -rnichigan.gov, michigan.gov -harborfreight.corn, harborfreight.com -fineartarnerica.corn, fineartamerica.com -rnysurvey.corn, mysurvey.com -kapaza.be, kapaza.be -adxpansion.corn, adxpansion.com -thefind.corn, thefind.com -priyo.corn, priyo.com -burrp.corn, burrp.com -sky.it, sky.it -ipad-winners.info, ipad-winners.info -usgs.gov, usgs.gov -gavick.corn, gavick.com -ellislab.corn, ellislab.com -voegol.corn.br, voegol.com.br -paginebianche.it, paginebianche.it -getwebcake.corn, getwebcake.com -zeroredirectl.corn, zeroredirect1.com -gaiaonline.corn, gaiaonline.com -iqilu.corn, iqilu.com -bright.corn, bright.com -cornunidades.net, comunidades.net -webgains.corn, webgains.com -overdrive.corn, overdrive.com -bigcornrnerce.corn, bigcommerce.com -paperpkads.corn, paperpkads.com -irnageporter.corn, imageporter.com -listal.corn, listal.com -rbcdaily.ru, rbcdaily.ru -redbus.in, redbus.in -3brneteo.corn, 3bmeteo.com -earn-on.corn, earn-on.com -ae.corn, ae.com -shoutrneloud.corn, shoutmeloud.com -oeeee.corn, oeeee.com -usenet.nl, usenet.nl -rnediotiernpo.corn, mediotiempo.com -prostoporno.net, prostoporno.net -bangyoulater.corn, bangyoulater.com -cornunio.de, comunio.de -pureleads.corn, pureleads.com -bakeca.it, bakeca.it -trovit.it, trovit.it -fakku.net, fakku.net -indeed.fr, indeed.fr -inquisitr.corn, inquisitr.com -wizards.corn, wizards.com -straightdope.corn, straightdope.com -pornpros.corn, pornpros.com -s-ornan.net, s-oman.net -facilisirno.corn, facilisimo.com -dostor.org, dostor.org -tabloidpulsa.co.id, tabloidpulsa.co.id -shafaf.ir, shafaf.ir -bt.dk, bt.dk -lent.az, lent.az -filrnaffinity.corn, filmaffinity.com -wjunction.corn, wjunction.com -garnefront.corn, gamefront.com -photoshelter.corn, photoshelter.com -cheaptickets.corn, cheaptickets.com -rneetic.it, meetic.it -seochat.corn, seochat.com -livernixtapes.corn, livemixtapes.com -deadline.corn, deadline.com -boingboing.net, boingboing.net -lecai.corn, lecai.com -onetravel.corn, onetravel.com -erotictube.rne, erotictube.me -svd.se, svd.se -pcadvisor.co.uk, pcadvisor.co.uk -pravda.corn.ua, pravda.com.ua -afisha.ru, afisha.ru -dressupgarnesite.corn, dressupgamesite.com -rnercadopago.corn, mercadopago.com -bangkokpost.corn, bangkokpost.com -durnpert.nl, dumpert.nl -rnonotaro.corn, monotaro.com -bloorningdales.corn, bloomingdales.com -ebayclassifieds.corn, ebayclassifieds.com -t-online.hu, t-online.hu -2dbook.corn, 2dbook.com -thekitchn.corn, thekitchn.com -halifax.co.uk, halifax.co.uk -tanx.corn, tanx.com -jutarnji.hr, jutarnji.hr -petardashd.corn, petardashd.com -rookee.ru, rookee.ru -showroornprive.corn, showroomprive.com -sharepoint.corn, sharepoint.com -liebiao.corn, liebiao.com -purnbaporn.corn, pumbaporn.com -dwnews.corn, dwnews.com -sanguosha.corn, sanguosha.com -pp.cc, pp.cc -rnyfc.ir, myfc.ir -alicdn.corn, alicdn.com -carrnax.corn, carmax.com -defencenet.gr, defencenet.gr -cuantarazon.corn, cuantarazon.com -westernunion.corn, westernunion.com -natunbarta.corn, natunbarta.com -sekindo.corn, sekindo.com -edublogs.org, edublogs.org -hotrnail.corn, hotmail.com -problogger.net, problogger.net -arnardeshonline.corn, amardeshonline.com -gernius.corn, gemius.com -egynews.net, egynews.net -indiabix.corn, indiabix.com -provincial.corn, provincial.com -play.corn, play.com -beslist.nl, beslist.nl -shape.corn, shape.com -alhilal.corn, alhilal.com -irecornrnend.ru, irecommend.ru -crnrnnts.corn, cmmnts.com -lnews.az, 1news.az -kinobanda.net, kinobanda.net -banarnex.corn.rnx, banamex.com.mx -cleanfiles.net, cleanfiles.net -algeriaforurn.net, algeriaforum.net -zurni.pl, zumi.pl -giallozafferano.it, giallozafferano.it -news-postseven.corn, news-postseven.com -firstcry.corn, firstcry.com -lookforporn.corn, lookforporn.com -xxsy.net, xxsy.net -scriptrnafia.org, scriptmafia.org -intodns.corn, intodns.com -farnitsu.corn, famitsu.com -eclipse.org, eclipse.org -net-a-porter.corn, net-a-porter.com -bternplates.corn, btemplates.com -topshop.corn, topshop.com -rnyvidster.corn, myvidster.com -calciornercato.corn, calciomercato.com -arabyonline.corn, arabyonline.com -lesechos.fr, lesechos.fr -ernpireavenue.corn, empireavenue.com -darnnlol.corn, damnlol.com -nukistrearn.corn, nukistream.com -wayport.net, wayport.net -buienradar.nl, buienradar.nl -vivastreet.co.in, vivastreet.co.in -kroger.corn, kroger.com -geocaching.corn, geocaching.com -hunantv.corn, hunantv.com -fotolog.net, fotolog.net -gunbroker.corn, gunbroker.com -flalottery.corn, flalottery.com -priples.corn, priples.com -nlayer.net, nlayer.net -trafficshop.corn, trafficshop.com -standardrnedia.co.ke, standardmedia.co.ke -finanzen.net, finanzen.net -rneta.ua, meta.ua -gfy.corn, gfy.com -playground.ru, playground.ru -rp5.ru, rp5.ru -otnnetwork.net, otnnetwork.net -tvrnao.corn, tvmao.com -hir.rna, hir.ma -twilightsex.corn, twilightsex.com -haodou.corn, haodou.com -virgin-atlantic.corn, virgin-atlantic.com -ankieta-online.pl, ankieta-online.pl -kinkytube.rne, kinkytube.me -l23rnplayer.corn, 123mplayer.com -elifting.corn, elifting.com -akiba-online.corn, akiba-online.com -tcsbank.ru, tcsbank.ru -garnetrailers.corn, gametrailers.com -dihitt.corn, dihitt.com -fancy.corn, fancy.com -adrnairnai.corn, admaimai.com -6l.corn, 61.com -hotchatdirect.corn, hotchatdirect.com -penesalud.corn, penesalud.com -adsupplyads.corn, adsupplyads.com -robokassa.ru, robokassa.ru -brooonzyah.net, brooonzyah.net -rnoviesrnobile.net, moviesmobile.net -fuck-rnates.corn, fuck-mates.com -ch-news.corn, ch-news.com -cwan.corn, cwan.com -rnec.gov.br, mec.gov.br -rnusiciansfriend.corn, musiciansfriend.com -angrybirds.corn, angrybirds.com -ebrun.corn, ebrun.com -kienthuc.net.vn, kienthuc.net.vn -rnorningstar.corn, morningstar.com -rasekhoon.net, rasekhoon.net -techsrnith.corn, techsmith.com -diy.corn, diy.com -awwwards.corn, awwwards.com -ajc.corn, ajc.com -akisrnet.corn, akismet.com -itar-tass.corn, itar-tass.com -6Osecprofit.corn, 60secprofit.com -videoweed.es, videoweed.es -guitarcenter.corn, guitarcenter.com -tv2.dk, tv2.dk -narutorn.corn, narutom.com -bittorrent.corn, bittorrent.com -unionpaysecure.corn, unionpaysecure.com -9ljrn.corn, 91jm.com -licindia.in, licindia.in -barna.ir, bama.ir -hertz.corn, hertz.com -propertyguru.corn.sg, propertyguru.com.sg -city8.corn, city8.com -blu-ray.corn, blu-ray.com -abebooks.corn, abebooks.com -adidas.corn, adidas.com -sing365.corn, sing365.com -qql63.corn, qq163.com -fashionandyou.corn, fashionandyou.com -lietou.corn, lietou.com -eniro.se, eniro.se -pengpeng.corn, pengpeng.com -haibao.corn, haibao.com -jxedt.corn, jxedt.com -crsky.corn, crsky.com -nyu.edu, nyu.edu -rninecraftskins.corn, minecraftskins.com -yangtse.corn, yangtse.com -alrnstba.co, almstba.co -parsnews.corn, parsnews.com -twiends.corn, twiends.com -dkb.de, dkb.de -friendscout24.de, friendscout24.de -aviny.corn, aviny.com -dig.do, dig.do -garnestorrents.corn, gamestorrents.com -guru.corn, guru.com -bostonglobe.corn, bostonglobe.com -brandalley.fr, brandalley.fr -tn.corn.ar, tn.com.ar -yourwebsite.corn, yourwebsite.com -istgah.corn, istgah.com -e-farnilynet.corn, e-familynet.com -hotsharne.corn, hotshame.com -volkskrant.nl, volkskrant.nl -karnaval.corn, karnaval.com -tearn-bhp.corn, team-bhp.com -sinernalar.corn, sinemalar.com -ipko.pl, ipko.pl -fastcornpany.corn, fastcompany.com -ernbedupload.corn, embedupload.com -gzrnarna.corn, gzmama.com -icicidirect.corn, icicidirect.com -whatisrnyip.corn, whatismyip.com -siasat.pk, siasat.pk -rbi.org.in, rbi.org.in -arnarillasinternet.corn, amarillasinternet.com -netvasco.corn.br, netvasco.com.br -ctvnews.ca, ctvnews.ca -gad.de, gad.de -dailyfx.corn, dailyfx.com -srnartklicks.corn, smartklicks.com -qoolO.sg, qoo10.sg -loc.gov, loc.gov -playerflv.corn, playerflv.com -uta-net.corn, uta-net.com -afl.corn.au, afl.com.au -rnainlink.ru, mainlink.ru -pricedekho.corn, pricedekho.com -wickedfire.corn, wickedfire.com -rlslog.net, rlslog.net -raiffeisen.at, raiffeisen.at -easports.corn, easports.com -groupon.fr, groupon.fr -o2.co.uk, o2.co.uk -irangrand.ir, irangrand.ir -vuku.tv, vuku.tv -play.pl, play.pl -rnxtoolbox.corn, mxtoolbox.com -prorniflash.de, promiflash.de -linode.corn, linode.com -farnilysearch.org, familysearch.org -publico.pt, publico.pt -freepornvideo.rne, freepornvideo.me -uploadbaz.corn, uploadbaz.com -tocrnai.ro, tocmai.ro -cirnbclicks.corn.rny, cimbclicks.com.my -bestporntube.rne, bestporntube.me -lainforrnacion.corn, lainformacion.com -herschina.corn, herschina.com -fontsquirrel.corn, fontsquirrel.com -blip.tv, blip.tv -caranddriver.corn, caranddriver.com -qld.gov.au, qld.gov.au -pons.eu, pons.eu -nascar.corn, nascar.com -hrsrnart.corn, hrsmart.com -tripadvisor.corn.au, tripadvisor.com.au -hs.fi, hs.fi -auspost.corn.au, auspost.com.au -sponsoredreviews.corn, sponsoredreviews.com -webopedia.corn, webopedia.com -sovsport.ru, sovsport.ru -bancsabadell.corn, bancsabadell.com -prettyporntube.corn, prettyporntube.com -sodahead.corn, sodahead.com -ovi.corn, ovi.com -aleseriale.pl, aleseriale.pl -rnnwan.corn, mnwan.com -callofduty.corn, callofduty.com -sportskeeda.corn, sportskeeda.com -cp.cx, cp.cx -researchgate.net, researchgate.net -rnichaels.corn, michaels.com -createspace.corn, createspace.com -sprintrade.corn, sprintrade.com -anonyrnouse.org, anonymouse.org -hautelook.corn, hautelook.com -4garner.net, 4gamer.net -accorhotels.corn, accorhotels.com -roornkey.corn, roomkey.com -guildwars2.corn, guildwars2.com -cargurus.corn, cargurus.com -wpengine.corn, wpengine.com -iis.net, iis.net -vendaria.corn, vendaria.com -argentinawarez.corn, argentinawarez.com -webdesigntunes.corn, webdesigntunes.com -allvoices.corn, allvoices.com -eprize.corn, eprize.com -prnu.fr, pmu.fr -carrefour.fr, carrefour.fr -tax.gov.ir, tax.gov.ir -ruelala.corn, ruelala.com -rnainspy.ru, mainspy.ru -phpwind.net, phpwind.net -loteriasyapuestas.es, loteriasyapuestas.es -rnusavat.corn, musavat.com -lenskart.corn, lenskart.com -refinery29.corn, refinery29.com -888poker.es, 888poker.es -denverpost.corn, denverpost.com -who.int, who.int -thesirns3.corn, thesims3.com -jerkhour.corn, jerkhour.com -lyricsrnode.corn, lyricsmode.com -ivillage.corn, ivillage.com -qyer.corn, qyer.com -hktdc.corn, hktdc.com -pornoload.corn, pornoload.com -bluedart.corn, bluedart.com -here.corn, here.com -philips.corn, philips.com -dsebd.org, dsebd.org -tubidy.rnobi, tubidy.mobi -strearn.cz, stream.cz -infojobs.corn.br, infojobs.com.br -soft98.ir, soft98.ir -bolsaparanovatos.corn, bolsaparanovatos.com -rnercador.ro, mercador.ro -neogaf.corn, neogaf.com -yardbarker.corn, yardbarker.com -rapidlibrary.corn, rapidlibrary.com -xxeronetxx.info, xxeronetxx.info -kaiserperrnanente.org, kaiserpermanente.org -telstra.corn.au, telstra.com.au -contra.gr, contra.gr -laredoute.it, laredoute.it -lipsurn.corn, lipsum.com -twitlonger.corn, twitlonger.com -hln.be, hln.be -53kf.corn, 53kf.com -gofundrne.corn, gofundme.com -carigold.corn, carigold.com -clips4sale.corn, clips4sale.com -focalprice.corn, focalprice.com -garneaholic.corn, gameaholic.com -presstv.ir, presstv.ir -puu.sh, puu.sh -filrnlinks4u.net, filmlinks4u.net -traffic-delivery.corn, traffic-delivery.com -bebo.corn, bebo.com -enter.ru, enter.ru -shufoo.net, shufoo.net -vivo.corn.br, vivo.com.br -jizzhut.corn, jizzhut.com -ljux.net, 1jux.net -serebii.net, serebii.net -translate.ru, translate.ru -rntv3.fi, mtv3.fi -njuskalo.hr, njuskalo.hr -bell.ca, bell.ca -rnyheritage.corn, myheritage.com -cic.fr, cic.fr -rnercurynews.corn, mercurynews.com -alaan.tv, alaan.tv -econsultancy.corn, econsultancy.com -pornhost.corn, pornhost.com -a8.net, a8.net -netzero.net, netzero.net -tracklablOl.corn, tracklab101.com -spanishdict.corn, spanishdict.com -arnctv.corn, amctv.com -erepublik.corn, erepublik.com -rnk.ru, mk.ru -publico.es, publico.es -fux.corn, fux.com -webcarntoy.corn, webcamtoy.com -rahnarna.corn, rahnama.com -wanyh.corn, wanyh.com -ecplaza.net, ecplaza.net -rnol.gov.sa, mol.gov.sa -torrentday.corn, torrentday.com -hsbc.corn.br, hsbc.com.br -interoperabilitybridges.corn, interoperabilitybridges.com -billrnelater.corn, billmelater.com -speedanalysis.corn, speedanalysis.com -volusion.corn, volusion.com -rnixcloud.corn, mixcloud.com -weeronline.nl, weeronline.nl -tiancity.corn, tiancity.com -thehun.corn, thehun.com -cornparisons.org, comparisons.org -eurosport.ru, eurosport.ru -trendyol.corn, trendyol.com -7l2O.corn, 7120.com -eldiariodearnerica.corn, eldiariodeamerica.com -fap8.corn, fap8.com -joyrne.corn, joyme.com -ufl.edu, ufl.edu -cuantocabron.corn, cuantocabron.com -hotrnart.corn.br, hotmart.com.br -wolfrarnalpha.corn, wolframalpha.com -cpasbien.corn, cpasbien.com -sanalpazar.corn, sanalpazar.com -publipt.corn, publipt.com -9ku.corn, 9ku.com -officernax.corn, officemax.com -cuny.edu, cuny.edu -gern.pl, gem.pl -waelelebrashy.corn, waelelebrashy.com -coinrnill.corn, coinmill.com -bet.corn, bet.com -rnoskva.frn, moskva.fm -groupalia.corn, groupalia.com -l3l.corn, 131.com -pichak.net, pichak.net -theatlanticwire.corn, theatlanticwire.com -laptoprnag.corn, laptopmag.com -worldpay.corn, worldpay.com -groupon.pl, groupon.pl -irneirnarna.corn, imeimama.com -torrents.net, torrents.net -britishcouncil.org, britishcouncil.org -letsbonus.corn, letsbonus.com -e-rnonsite.corn, e-monsite.com -url.org, url.org -discuz.corn, discuz.com -freepornsite.rne, freepornsite.me -cheatcc.corn, cheatcc.com -rnagicrnovies.corn, magicmovies.com -lateroorns.corn, laterooms.com -du.ac.in, du.ac.in -uservoice.corn, uservoice.com -discas.net, discas.net -dlg.corn, d1g.com -explicittube.corn, explicittube.com -e-autopay.corn, e-autopay.com -3lian.corn, 3lian.com -oopsrnovs.corn, oopsmovs.com -agenziaentrate.gov.it, agenziaentrate.gov.it -ufc.corn, ufc.com -rnooshare.biz, mooshare.biz -ankangO6.org, ankang06.org -betradar.corn, betradar.com -explosrn.net, explosm.net -silkroad.corn, silkroad.com -crackberry.corn, crackberry.com -toyota.corn, toyota.com -bongda.corn.vn, bongda.com.vn -europapress.es, europapress.es -rnlxchange.corn, mlxchange.com -plius.lt, plius.lt -pitchfork.corn, pitchfork.com -groupon.de, groupon.de -hollisterco.corn, hollisterco.com -hasoffers.corn, hasoffers.com -rniarni.corn, miami.com -dslreports.corn, dslreports.com -blinkweb.corn, blinkweb.com -alarnaula.corn, alamaula.com -leonardo.it, leonardo.it -very.co.uk, very.co.uk -globalsources.corn, globalsources.com -viator.corn, viator.com -greenwichrneantirne.corn, greenwichmeantime.com -appannie.corn, appannie.com -eldorado.ru, eldorado.ru -canadiantire.ca, canadiantire.ca -enjin.corn, enjin.com -szhorne.corn, szhome.com -phirn3s.net, phim3s.net -bash.irn, bash.im -irnrni.gov.au, immi.gov.au -enjoydressup.corn, enjoydressup.com -thesuperficial.corn, thesuperficial.com -9lrnobiles.corn, 91mobiles.com -libertaddigital.corn, libertaddigital.com -po-kaki-to.corn, po-kaki-to.com -truelocal.corn.au, truelocal.com.au -centrurn24.pl, centrum24.pl -zylorn.corn, zylom.com -rnypornrnotion.corn, mypornmotion.com -skybet.corn, skybet.com -soccerrnanager.corn, soccermanager.com -poriborton.corn, poriborton.com -rnozzi.corn, mozzi.com -eset.corn, eset.com -chelseafc.corn, chelseafc.com -arnulyarn.in, amulyam.in -argaarn.corn, argaam.com -rnnn.corn, mnn.com -papystrearning.corn, papystreaming.com -hostelbookers.corn, hostelbookers.com -vatera.hu, vatera.hu -pciconcursos.corn.br, pciconcursos.com.br -rnilenio.corn, milenio.com -yellowbook.corn, yellowbook.com -rnobilepriceindia.co.in, mobilepriceindia.co.in -naked.corn, naked.com -lazada.vn, lazada.vn -7Oe.corn, 70e.com -rnapy.cz, mapy.cz -vodafone.es, vodafone.es -zbiornik.corn, zbiornik.com -fc2web.corn, fc2web.com -rghost.ru, rghost.ru -avvo.corn, avvo.com -fardanews.corn, fardanews.com -pcbeta.corn, pcbeta.com -hibapress.corn, hibapress.com -garnehouse.corn, gamehouse.com -rnacworld.corn, macworld.com -qantas.corn.au, qantas.com.au -dba.dk, dba.dk -inttrax.corn, inttrax.com -conejox.corn, conejox.com -irnrnobiliare.it, immobiliare.it -sparkasse.at, sparkasse.at -uderny.corn, udemy.com -accenture.corn, accenture.com -pokerstrategy.corn, pokerstrategy.com -leroyrnerlin.fr, leroymerlin.fr -sweetkiss.rne, sweetkiss.me -siriusxrn.corn, siriusxm.com -nieuwsblad.be, nieuwsblad.be -blogun.ru, blogun.ru -ojogos.corn.br, ojogos.com.br -lexilogos.corn, lexilogos.com -c-and-a.corn, c-and-a.com -authorstrearn.corn, authorstream.com -newser.corn, newser.com -rninube.corn, minube.com -yellowpages.corn.au, yellowpages.com.au -torrentfreak.corn, torrentfreak.com -expatriates.corn, expatriates.com -5lcredit.corn, 51credit.com -rawstory.corn, rawstory.com -crictirne.corn, crictime.com -ladolcevitae.corn, ladolcevitae.com -astro.corn, astro.com -riverisland.corn, riverisland.com -rnyzarnana.corn, myzamana.com -xpg.corn.br, xpg.com.br -svt.se, svt.se -yrnlp.corn, ymlp.com -coupondunia.in, coupondunia.in -rnyrnovies.it, mymovies.it -portaleducacao.corn.br, portaleducacao.com.br -watchabc.go.corn, watchabc.go.com -scrabblefinder.corn, scrabblefinder.com -2hua.corn, 2hua.com -guiaconsurnidor.corn, guiaconsumidor.com -jzpt.corn, jzpt.com -jino.ru, jino.ru -google.tt, google.tt -addwallet.corn, addwallet.com -enorn.corn, enom.com -searchfreernp3.corn, searchfreemp3.com -spox.corn, spox.com -enarne.net, ename.net -researchnow.corn, researchnow.com -decathlon.fr, decathlon.fr -j-cast.corn, j-cast.com -updatetube.corn, updatetube.com -polo.corn, polo.com -asiaone.corn, asiaone.com -kkiste.to, kkiste.to -frrntr.corn, frmtr.com -skai.gr, skai.gr -zovi.corn, zovi.com -qiwi.ru, qiwi.ru -stfucollege.corn, stfucollege.com -carros.corn.br, carros.com.br -privatejobshub.blogspot.in, privatejobshub.blogspot.in -englishtown.corn, englishtown.com -info.corn, info.com -rnulticlickbrasil.corn.br, multiclickbrasil.com.br -gazeteoku.corn, gazeteoku.com -kinghost.corn, kinghost.com -izisrnile.corn, izismile.com -gopro.corn, gopro.com -uspto.gov, uspto.gov -testberichte.de, testberichte.de -fs.to, fs.to -sketchtoy.corn, sketchtoy.com -sinarharian.corn.rny, sinarharian.com.my -stylernode.corn, stylemode.com -v7n.corn, v7n.com -livenation.corn, livenation.com -firstrowl.eu, firstrow1.eu -joornlaforurn.ru, joomlaforum.ru -sharecare.corn, sharecare.com -vetogate.corn, vetogate.com -series.ly, series.ly -property24.corn, property24.com -payarnsara.corn, payamsara.com -webstarts.corn, webstarts.com -renfe.es, renfe.es -fatcow.corn, fatcow.com -24ur.corn, 24ur.com -lide.cz, lide.cz -sabayacafe.corn, sabayacafe.com -prodavalnik.corn, prodavalnik.com -hyves.nl, hyves.nl -alrnaany.corn, almaany.com -xero.corn, xero.com -celluway.corn, celluway.com -rnapbar.corn, mapbar.com -vecernji.hr, vecernji.hr -konga.corn, konga.com -fresherslive.corn, fresherslive.com -nova.cz, nova.cz -onlinefwd.corn, onlinefwd.com -petco.corn, petco.com -benisonapparel.corn, benisonapparel.com -jango.corn, jango.com -rnangocity.corn, mangocity.com -garnefly.corn, gamefly.com -igrna.tv, igma.tv -2lcineplex.corn, 21cineplex.com -fblife.corn, fblife.com -rnoe.gov.eg, moe.gov.eg -heydouga.corn, heydouga.com -buildhr.corn, buildhr.com -rnrno-charnpion.corn, mmo-champion.com -ithorne.corn, ithome.com -krakow.pl, krakow.pl -history.corn, history.com -privatehorneclips.corn, privatehomeclips.com -bazos.cz, bazos.cz -appchina.corn, appchina.com -helpster.de, helpster.de -5lhejia.corn, 51hejia.com -fuckbadbitches.corn, fuckbadbitches.com -toyota-autocenter.corn, toyota-autocenter.com -alnaharegypt.corn, alnaharegypt.com -eastbay.corn, eastbay.com -softonic.corn.br, softonic.com.br -translit.ru, translit.ru -justcloud.corn, justcloud.com -validclick.net, validclick.net -seneweb.corn, seneweb.com -fsiblog.corn, fsiblog.com -williarnhill.it, williamhill.it -twitchy.corn, twitchy.com -y4yy.corn, y4yy.com -gouv.qc.ca, gouv.qc.ca -nubiles.net, nubiles.net -rnarvel.corn, marvel.com -helprnefindyour.info, helpmefindyour.info -tripadvisor.ca, tripadvisor.ca -joornlart.corn, joomlart.com -rnl8.corn, m18.com -orgasrnatrix.corn, orgasmatrix.com -bidoo.corn, bidoo.com -rogers.corn, rogers.com -inforrnationng.corn, informationng.com -voyage-prive.corn, voyage-prive.com -corningsoon.net, comingsoon.net -searchrnetrics.corn, searchmetrics.com -jetztspielen.de, jetztspielen.de -rnathxl.corn, mathxl.com -telrnex.corn, telmex.com -purpleporno.corn, purpleporno.com -coches.net, coches.net -harnusoku.corn, hamusoku.com -link-assistant.corn, link-assistant.com -gosur.corn, gosur.com -torrentcrazy.corn, torrentcrazy.com -funny-garnes.biz, funny-games.biz -bseindia.corn, bseindia.com -prornosite.ru, promosite.ru -google.rnn, google.mn -cartoonnetworkarabic.corn, cartoonnetworkarabic.com -icrn.edu.pl, icm.edu.pl -ttt4.corn, ttt4.com -pepperjarnnetwork.corn, pepperjamnetwork.com -lolzbook.corn, lolzbook.com -nationalpost.corn, nationalpost.com -tukif.corn, tukif.com -club-asteria.corn, club-asteria.com -7search.corn, 7search.com -kasikornbank.corn, kasikornbank.com -ebay.ie, ebay.ie -sexlunch.corn, sexlunch.com -qype.corn, qype.com -sankakucornplex.corn, sankakucomplex.com -flashback.org, flashback.org -strearnhunter.eu, streamhunter.eu -rsb.ru, rsb.ru -royalporntube.corn, royalporntube.com -diretta.it, diretta.it -yurnrnly.corn, yummly.com -dorn2.ru, dom2.ru -rnetoffice.gov.uk, metoffice.gov.uk -goodbaby.corn, goodbaby.com -pornbb.org, pornbb.org -forrnspring.rne, formspring.me -google.corn.cy, google.com.cy -purepeople.corn, purepeople.com -epnet.corn, epnet.com -penny-arcade.corn, penny-arcade.com -onlinekhabar.corn, onlinekhabar.com -vcornrnission.corn, vcommission.com -zirnabdk.corn, zimabdk.com -car.gr, car.gr -wat.tv, wat.tv -nnn.ru, nnn.ru -arvixe.corn, arvixe.com -buxp.org, buxp.org -shaw.ca, shaw.ca -cnyes.corn, cnyes.com -casa.it, casa.it -233.corn, 233.com -text.ru, text.ru -8OOnotes.corn, 800notes.com -banki.ru, banki.ru -rnarinetraffic.corn, marinetraffic.com -rneteo.gr, meteo.gr -thetrainline.corn, thetrainline.com -blogspot.ch, blogspot.ch -netaffiliation.corn, netaffiliation.com -olx.co.id, olx.co.id -slando.kz, slando.kz -nordea.se, nordea.se -xbabe.corn, xbabe.com -bibsonorny.org, bibsonomy.org -rnoneynews.corn, moneynews.com -265g.corn, 265g.com -horoscope.corn, horoscope.com -yarnrner.corn, yammer.com -sextgern.corn, sextgem.com -tribune.corn.pk, tribune.com.pk -topeuro.biz, topeuro.biz -perfectgirls.xxx, perfectgirls.xxx -ssc.nic.in, ssc.nic.in -8264.corn, 8264.com -flvrunner.corn, flvrunner.com -gry.pl, gry.pl -pravda.ru, pravda.ru -fulltiltpoker.corn, fulltiltpoker.com -kure.tv, kure.tv -turbo.az, turbo.az -ujian.cc, ujian.cc -rnustseeindia.corn, mustseeindia.com -thithtoolwin.corn, thithtoolwin.com -chiphell.corn, chiphell.com -spieletipps.de, spieletipps.de -portail.free.fr, portail.free.fr -hbr.org, hbr.org -sex-hq.corn, sex-hq.com -webdeveloper.corn, webdeveloper.com -cloudzer.net, cloudzer.net -vagas.corn.br, vagas.com.br -anspress.corn, anspress.com -beitaichufang.corn, beitaichufang.com -songkick.corn, songkick.com -oyunlari.net, oyunlari.net -unfollowers.rne, unfollowers.me -cornputrabajo.corn.rnx, computrabajo.com.mx -usp.br, usp.br -parseek.corn, parseek.com -salary.corn, salary.com -navyfcu.org, navyfcu.org -bigpond.corn, bigpond.com -joann.corn, joann.com -ajansspor.corn, ajansspor.com -burnews.corn, burnews.com -rnyrecipes.corn, myrecipes.com -rnt5.corn, mt5.com -webconfs.corn, webconfs.com -offcn.corn, offcn.com -travian.corn.tr, travian.com.tr -anirnenewsnetwork.corn, animenewsnetwork.com -srnartshopping.corn, smartshopping.com -twojapogoda.pl, twojapogoda.pl -tigerairways.corn, tigerairways.com -archiveofourown.org, archiveofourown.org -qq937.corn, qq937.com -rnenearne.net, meneame.net -joyclub.de, joyclub.de -yy.corn, yy.com -weddingwire.corn, weddingwire.com -rnoddb.corn, moddb.com -acervoarnador.corn, acervoamador.com -stgeorge.corn.au, stgeorge.com.au -forurnhouse.ru, forumhouse.ru -rnp3xd.corn, mp3xd.com -lionair.co.id, lionair.co.id -needtoporn.corn, needtoporn.com -playcast.ru, playcast.ru -paheal.net, paheal.net -finishline.corn, finishline.com -sep.gob.rnx, sep.gob.mx -cornenity.net, comenity.net -tqn.corn, tqn.com -eroticads.corn, eroticads.com -svpressa.ru, svpressa.ru -dtvideo.corn, dtvideo.com -rnobile.free.fr, mobile.free.fr -privat24.ua, privat24.ua -rnp3sk.net, mp3sk.net -atlas.sk, atlas.sk -aib.ie, aib.ie -shockwave.corn, shockwave.com -qatarairways.corn, qatarairways.com -theladders.corn, theladders.com -dsnetwb.corn, dsnetwb.com -expansiondirecto.corn, expansiondirecto.com -povarenok.ru, povarenok.ru -rnoneysuperrnarket.corn, moneysupermarket.com -getchu.corn, getchu.com -gay.corn, gay.com -hsbc.corn.rnx, hsbc.com.mx -textsale.ru, textsale.ru -kadinlarkulubu.corn, kadinlarkulubu.com -scientificarnerican.corn, scientificamerican.com -hillnews.corn, hillnews.com -tori.fi, tori.fi -6tie.corn, 6tie.com -charnpionselect.net, championselect.net -gtobal.corn, gtobal.com -bangkokbank.corn, bangkokbank.com -akakce.corn, akakce.com -srnarter.corn, smarter.com -totalvideoplugin.corn, totalvideoplugin.com -drnir.ru, dmir.ru -rpp.corn.pe, rpp.com.pe -uhaul.corn, uhaul.com -kayako.corn, kayako.com -buyvip.corn, buyvip.com -sixrevisions.corn, sixrevisions.com -arrny.rnil, army.mil -rediffrnail.corn, rediffmail.com -gsis.gr, gsis.gr -destinia.corn, destinia.com -behindwoods.corn, behindwoods.com -wearehairy.corn, wearehairy.com -coqnu.corn, coqnu.com -soundclick.corn, soundclick.com -drive.ru, drive.ru -carn4.fr, cam4.fr -bakusai.corn, bakusai.com -thailandtorrent.corn, thailandtorrent.com -videosz.corn, videosz.com -eporner.corn, eporner.com -stltoday.corn, stltoday.com -ilrnessaggero.it, ilmessaggero.it -theregister.co.uk, theregister.co.uk -bloggang.corn, bloggang.com -nastyvideotube.corn, nastyvideotube.com -doityourself.corn, doityourself.com -rp-online.de, rp-online.de -wow-irnpulse.ru, wow-impulse.ru -kar.nic.in, kar.nic.in -bershka.corn, bershka.com -neteller.corn, neteller.com -adevarul.ro, adevarul.ro -divxtotal.corn, divxtotal.com -bolshoyvopros.ru, bolshoyvopros.ru -letudiant.fr, letudiant.fr -xinshipu.corn, xinshipu.com -vhl.corn, vh1.com -excite.corn, excite.com -sornewhereinblog.net, somewhereinblog.net -rncgraw-hill.corn, mcgraw-hill.com -patheos.corn, patheos.com -webdesignledger.corn, webdesignledger.com -plus28.corn, plus28.com -adultwork.corn, adultwork.com -dajuegos.corn, dajuegos.com -blogs.corn, blogs.com -glopart.ru, glopart.ru -donews.corn, donews.com -nation.co.ke, nation.co.ke -delfi.ee, delfi.ee -lacuerda.net, lacuerda.net -jjshouse.corn, jjshouse.com -rnegaindex.ru, megaindex.ru -darty.corn, darty.com -rnaturetube.corn, maturetube.com -jokeroo.corn, jokeroo.com -estekhtarn.corn, estekhtam.com -fnac.es, fnac.es -ninjakiwi.corn, ninjakiwi.com -tovirna.gr, tovima.gr -tirninternet.it, timinternet.it -citizensbankonline.corn, citizensbankonline.com -builtwith.corn, builtwith.com -ko499.corn, ko499.com -tastyblacks.corn, tastyblacks.com -currys.co.uk, currys.co.uk -jobui.corn, jobui.com -notebookreview.corn, notebookreview.com -rneishij.net, meishij.net -filerio.in, filerio.in -cheapflights.co.uk, cheapflights.co.uk -puls24.rnk, puls24.mk -rurnbo.es, rumbo.es -newsbusters.org, newsbusters.org -irngdino.corn, imgdino.com -oxforddictionaries.corn, oxforddictionaries.com -ftdownloads.corn, ftdownloads.com -ciudad.corn.ar, ciudad.com.ar -latercera.cl, latercera.cl -lankadeepa.lk, lankadeepa.lk -bankier.pl, bankier.pl -hawahorne.corn, hawahome.com -cornicvine.corn, comicvine.com -carn4.it, cam4.it -fok.nl, fok.nl -iknowthatgirl.corn, iknowthatgirl.com -hizliresirn.corn, hizliresim.com -ebizrnba.corn, ebizmba.com -twistys.corn, twistys.com -rninkchan.corn, minkchan.com -dnevnik.hr, dnevnik.hr -peliculascoco.corn, peliculascoco.com -new-xharnster.corn, new-xhamster.com -freelancer.in, freelancer.in -globalgrind.corn, globalgrind.com -talkgold.corn, talkgold.com -kanui.corn.br, kanui.com.br -woxikon.de, woxikon.de -jobstreet.corn.rny, jobstreet.com.my -job.ru, job.ru -wowbiz.ro, wowbiz.ro -yiyi.cc, yiyi.cc -sinoptik.ua, sinoptik.ua -parents.corn, parents.com -forblabla.corn, forblabla.com -trojrniasto.pl, trojmiasto.pl -anyoption.corn, anyoption.com -wplocker.corn, wplocker.com -paytrn.in, paytm.in -elespectador.corn, elespectador.com -rnysitecost.ru, mysitecost.ru -startribune.corn, startribune.com -carn4.co.uk, cam4.co.uk -bestcoolrnobile.corn, bestcoolmobile.com -soup.io, soup.io -starfall.corn, starfall.com -ixl.corn, ixl.com -oreilly.corn, oreilly.com -dansrnovies.corn, dansmovies.com -facernoods.corn, facemoods.com -google.ge, google.ge -sat.gob.rnx, sat.gob.mx -weatherbug.corn, weatherbug.com -rnajorgeeks.corn, majorgeeks.com -llbean.corn, llbean.com -catho.corn.br, catho.com.br -googlegroups.corn, googlegroups.com -anirnoto.corn, animoto.com -alquds.co.uk, alquds.co.uk -newsday.corn, newsday.com -garnes2girls.corn, games2girls.com -youporngay.corn, youporngay.com -spaces.ru, spaces.ru -seriespepito.corn, seriespepito.com -gelbeseiten.de, gelbeseiten.de -thethirdrnedia.corn, thethirdmedia.com -watchfornny.corn, watchfomny.com -freecarnsexposed.corn, freecamsexposed.com -dinakaran.corn, dinakaran.com -xxxhost.rne, xxxhost.me -srnartprix.corn, smartprix.com -thoughtcatalog.corn, thoughtcatalog.com -soccersuck.corn, soccersuck.com -vivanuncios.corn, vivanuncios.com -liba.corn, liba.com -gog.corn, gog.com -philstar.corn, philstar.com -cian.ru, cian.ru -avclub.corn, avclub.com -slon.ru, slon.ru -stc.corn.sa, stc.com.sa -jstor.org, jstor.org -wehkarnp.nl, wehkamp.nl -vodafone.co.uk, vodafone.co.uk -deser.pl, deser.pl -adscendrnedia.corn, adscendmedia.com -getcashforsurveys.corn, getcashforsurveys.com -glarnsharn.corn, glamsham.com -dressupgarnes.corn, dressupgames.com -lifo.gr, lifo.gr -37signals.corn, 37signals.com -pdfonline.corn, pdfonline.com -flipkey.corn, flipkey.com -epochtirnes.corn, epochtimes.com -futhead.corn, futhead.com -inlinkz.corn, inlinkz.com -fx-trend.corn, fx-trend.com -yasdl.corn, yasdl.com -techbang.corn, techbang.com -narenji.ir, narenji.ir -szonline.net, szonline.net -perfil.corn.ar, perfil.com.ar -rnywebface.corn, mywebface.com -taknaz.ir, taknaz.ir -tradera.corn, tradera.com -golern.de, golem.de -its-rno.corn, its-mo.com -arabnet5.corn, arabnet5.com -freerepublic.corn, freerepublic.com -britannica.corn, britannica.com -deccanchronicle.corn, deccanchronicle.com -ohio.gov, ohio.gov -busuu.corn, busuu.com -pricecheck.co.za, pricecheck.co.za -paltalk.corn, paltalk.com -sportinglife.corn, sportinglife.com -google.sn, google.sn -rneteornedia.corn, meteomedia.com -push2check.net, push2check.net -ing-diba.de, ing-diba.de -irnrnoweb.be, immoweb.be -oregonlive.corn, oregonlive.com -ge.tt, ge.tt -bbspink.corn, bbspink.com -business2cornrnunity.corn, business2community.com -viidii.corn, viidii.com -hrloo.corn, hrloo.com -rnglradio.corn, mglradio.com -cosrne.net, cosme.net -xilu.corn, xilu.com -scbeasy.corn, scbeasy.com -biglots.corn, biglots.com -dhakatirnes24.corn, dhakatimes24.com -spankbang.corn, spankbang.com -hitleap.corn, hitleap.com -proz.corn, proz.com -phplOO.corn, php100.com -tvtoday.de, tvtoday.de -funnie.st, funnie.st -velvet.hu, velvet.hu -dhnet.be, dhnet.be -capital.gr, capital.gr -inosrni.ru, inosmi.ru -healthkart.corn, healthkart.com -arnway.corn, amway.com -rnadrnirni.corn, madmimi.com -drarnafever.corn, dramafever.com -oodle.corn, oodle.com -spreadshirt.corn, spreadshirt.com -google.rng, google.mg -utarget.ru, utarget.ru -rnatorny.corn, matomy.com -rnedhelp.org, medhelp.org -curnlouder.corn, cumlouder.com -aliorbank.pl, aliorbank.pl -takepart.corn, takepart.com -rnyfreshnet.corn, myfreshnet.com -adorarna.corn, adorama.com -dhs.gov, dhs.gov -rnivo.tv, mivo.tv -nchsoftware.corn, nchsoftware.com -gnc.corn, gnc.com -spiceworks.corn, spiceworks.com -jeu.fr, jeu.fr -terra.corn, terra.com -irishtirnes.corn, irishtimes.com -kleiderkreisel.de, kleiderkreisel.de -ebay.be, ebay.be -rt.ru, rt.ru -radiofarda.corn, radiofarda.com -atrapalo.corn, atrapalo.com -southcn.corn, southcn.com -turkcell.corn.tr, turkcell.com.tr -thernetapicture.corn, themetapicture.com -aujourdhui.corn, aujourdhui.com -ato.gov.au, ato.gov.au -pelis24.corn, pelis24.com -saaid.net, saaid.net -bradsdeals.corn, bradsdeals.com -piratelOl.corn, pirate101.com -saturn.de, saturn.de -thisissouthwales.co.uk, thisissouthwales.co.uk -cyberlink.corn, cyberlink.com -internationalredirects.corn, internationalredirects.com -radardedescontos.corn.br, radardedescontos.com.br -rapidcontentwizard.corn, rapidcontentwizard.com -kaburn.corn.br, kabum.com.br -webrankinfo.corn, webrankinfo.com -kiabi.corn, kiabi.com -farecornpare.corn, farecompare.com -xinjunshi.corn, xinjunshi.com -vidxden.corn, vidxden.com -pvrcinernas.corn, pvrcinemas.com -chachaba.corn, chachaba.com -wanrnei.corn, wanmei.com -alternet.org, alternet.org -rozklad-pkp.pl, rozklad-pkp.pl -ornniture.corn, omniture.com -childrensplace.corn, childrensplace.com -rnenards.corn, menards.com -zhcw.corn, zhcw.com -ouest-france.fr, ouest-france.fr -vitorrent.org, vitorrent.org -xanga.corn, xanga.com -zbozi.cz, zbozi.cz -radioshack.corn, radioshack.com -startv.in, startv.in -affiliatewindow.corn, affiliatewindow.com -gov.on.ca, gov.on.ca -grainger.corn, grainger.com -3rat.corn, 3rat.com -indeed.co.za, indeed.co.za -rtbf.be, rtbf.be -strava.corn, strava.com -disneystore.corn, disneystore.com -travelagency.travel, travelagency.travel -ekitan.corn, ekitan.com -volagratis.corn, volagratis.com -yiifrarnework.corn, yiiframework.com -drarnacrazy.net, dramacrazy.net -addtoany.corn, addtoany.com -uzrnantv.corn, uzmantv.com -uline.corn, uline.com -fitnessrnagazine.corn, fitnessmagazine.com -khrnerload.corn, khmerload.com -italiafilrn.tv, italiafilm.tv -baseball-reference.corn, baseball-reference.com -neopets.corn, neopets.com -rnultiupload.nl, multiupload.nl -lakii.corn, lakii.com -downloadrnaster.ru, downloadmaster.ru -babbel.corn, babbel.com -gossip-tv.gr, gossip-tv.gr -laban.vn, laban.vn -cornputerbase.de, computerbase.de -juyouqu.corn, juyouqu.com -rnarkt.de, markt.de -linuxquestions.org, linuxquestions.org -giveawayoftheday.corn, giveawayoftheday.com -l76.corn, 176.com -hornernadernoviez.corn, homemademoviez.com -huffingtonpost.fr, huffingtonpost.fr -rnovieweb.corn, movieweb.com -pornzeus.corn, pornzeus.com -posta.corn.tr, posta.com.tr -biography.corn, biography.com -bukkit.org, bukkit.org -spirit.corn, spirit.com -vernale.corn, vemale.com -elnuevodia.corn, elnuevodia.com -pof.corn.br, pof.com.br -iranproud.corn, iranproud.com -rnolodost.bz, molodost.bz -netcarshow.corn, netcarshow.com -ardrnediathek.de, ardmediathek.de -fabfurnish.corn, fabfurnish.com -rnyfreeblack.corn, myfreeblack.com -antichat.ru, antichat.ru -crocko.corn, crocko.com -b5rn.corn, b5m.com -entrance-exarn.net, entrance-exam.net -benaughty.corn, benaughty.com -sierratradingpost.corn, sierratradingpost.com -apartrnentguide.corn, apartmentguide.com -slirnspots.corn, slimspots.com -sondakika.corn, sondakika.com -glarnour.corn, glamour.com -ilyke.net, ilyke.net -rnybroadband.co.za, mybroadband.co.za -alaskaair.corn, alaskaair.com -virtualtourist.corn, virtualtourist.com -rexxx.corn, rexxx.com -fullhdfilrnizle.org, fullhdfilmizle.org -starpulse.corn, starpulse.com -winkal.corn, winkal.com -ad-feeds.net, ad-feeds.net -irannaz.corn, irannaz.com -elahrnad.corn, elahmad.com -dealspl.us, dealspl.us -rnoikrug.ru, moikrug.ru -olx.corn.rnx, olx.com.mx -rd.corn, rd.com -newone.org, newone.org -naijapals.corn, naijapals.com -forgifs.corn, forgifs.com -fsjgw.corn, fsjgw.com -nicoviewer.net, nicoviewer.net -topeleven.corn, topeleven.com -peerfly.corn, peerfly.com -softportal.corn, softportal.com -clker.corn, clker.com -tehran98.corn, tehran98.com -weather2urnbrella.corn, weather2umbrella.com -lookbook.nu, lookbook.nu -futureshop.ca, futureshop.ca -blackpeoplerneet.corn, blackpeoplemeet.com -adworkrnedia.corn, adworkmedia.com -entire.xxx, entire.xxx -bitbucket.org, bitbucket.org -transferrnarkt.co.uk, transfermarkt.co.uk -rnoshirnonsters.corn, moshimonsters.com -bairnao.corn, baimao.com -khanacaderny.org, khanacademy.org -2chan.net, 2chan.net -adopteunrnec.corn, adopteunmec.com -rnochirnedia.corn, mochimedia.com -strawberrynet.corn, strawberrynet.com -gdeivse.corn, gdeivse.com -speckyboy.corn, speckyboy.com -radical-foto.ru, radical-foto.ru -softcoin.corn, softcoin.com -cnews.ru, cnews.ru -ubs.corn, ubs.com -lankasri.corn, lankasri.com -cylex.de, cylex.de -irntranslator.net, imtranslator.net -horneoffice.gov.uk, homeoffice.gov.uk -answerbag.corn, answerbag.com -chainreactioncycles.corn, chainreactioncycles.com -sportal.bg, sportal.bg -livernaster.ru, livemaster.ru -rnercadolibre.corn.pe, mercadolibre.com.pe -rnentalfloss.corn, mentalfloss.com -google.arn, google.am -rnawaly.corn, mawaly.com -douban.frn, douban.fm -abidjan.net, abidjan.net -pricegong.corn, pricegong.com -brother.corn, brother.com -basspro.corn, basspro.com -popsci.corn, popsci.com -olx.corn.ar, olx.com.ar -python.org, python.org -voetbalzone.nl, voetbalzone.nl -aztecaporno.corn, aztecaporno.com -d-h.st, d-h.st -voyeurweb.corn, voyeurweb.com -storenvy.corn, storenvy.com -aftabir.corn, aftabir.com -irngsrc.ru, imgsrc.ru -peru.corn, peru.com -rnindbodygreen.corn, mindbodygreen.com -stereotude.corn, stereotude.com -arl5.corn, ar15.com -gogecapital.corn, gogecapital.com -xipin.rne, xipin.me -gvt.corn.br, gvt.com.br -today.it, today.it -rnastercard.corn.au, mastercard.com.au -hobbyking.corn, hobbyking.com -hawkhost.corn, hawkhost.com -theburnp.corn, thebump.com -alpari.ru, alpari.ru -garnrna-ic.corn, gamma-ic.com -rnundorne.corn, mundome.com -quotev.corn, quotev.com -anirnaljarn.corn, animaljam.com -ohozaa.corn, ohozaa.com -sayyac.corn, sayyac.com -kobobooks.corn, kobobooks.com -rnuslirna.corn, muslima.com -digsitesvalue.net, digsitesvalue.net -colourlovers.corn, colourlovers.com -uludagsozluk.corn, uludagsozluk.com -rnercadolibre.corn.uy, mercadolibre.com.uy -oern.corn.rnx, oem.com.mx -self.corn, self.com -kyohk.net, kyohk.net -dillards.corn, dillards.com -eduu.corn, eduu.com -replays.net, replays.net -bnpparibasfortis.be, bnpparibasfortis.be -express.co.uk, express.co.uk -guaixun.corn, guaixun.com -75Og.corn, 750g.com -craveonline.corn, craveonline.com -rnarkafoni.corn, markafoni.com -enarne.corn, ename.com -abercrornbie.corn, abercrombie.com -noticiaaldia.corn, noticiaaldia.com -seniorpeoplerneet.corn, seniorpeoplemeet.com -dhingana.corn, dhingana.com -prokerala.corn, prokerala.com -iefirnerida.gr, iefimerida.gr -wprazzi.corn, wprazzi.com -pantiprnarket.corn, pantipmarket.com -vueling.corn, vueling.com -newsonlineweekly.corn, newsonlineweekly.com -crl73.corn, cr173.com -ecp888.corn, ecp888.com -diary.ru, diary.ru -pervclips.corn, pervclips.com -sudaneseonline.corn, sudaneseonline.com -personal.corn.ar, personal.com.ar -articlesnatch.corn, articlesnatch.com -rnitbbs.corn, mitbbs.com -techsupportalert.corn, techsupportalert.com -filepost.corn, filepost.com -unblockyoutube.co.uk, unblockyoutube.co.uk -hasznaltauto.hu, hasznaltauto.hu -drnv.org, dmv.org -port.hu, port.hu -anastasiadate.corn, anastasiadate.com -adtgs.corn, adtgs.com -narnejet.corn, namejet.com -ally.corn, ally.com -djrnaza.corn, djmaza.com -asstr.org, asstr.org -corel.corn, corel.com -interfax.ru, interfax.ru -rozee.pk, rozee.pk -akinator.corn, akinator.com -dorninos.co.in, dominos.co.in -boardgarnegeek.corn, boardgamegeek.com -tearnliquid.net, teamliquid.net -sbrf.ru, sbrf.ru -l99.corn, l99.com -eatingwell.corn, eatingwell.com -rnid-day.corn, mid-day.com -blinkogold.it, blinkogold.it -rosbalt.ru, rosbalt.ru -islarnrnerno.cc, islammemo.cc -bettycrocker.corn, bettycrocker.com -wornenshealthrnag.corn, womenshealthmag.com -asandownload.corn, asandownload.com -twitcasting.tv, twitcasting.tv -lOand9.corn, 10and9.com -youngleafs.corn, youngleafs.com -saharareporters.corn, saharareporters.com -overclock.net, overclock.net -rnapsgalaxy.corn, mapsgalaxy.com -internetslang.corn, internetslang.com -sokrnil.corn, sokmil.com -yousendit.corn, yousendit.com -forex-rnrncis.corn, forex-mmcis.com -vador.corn, vador.com -pagewash.corn, pagewash.com -pringotrack.corn, pringotrack.com -cprnstar.corn, cpmstar.com -yxdown.corn, yxdown.com -surfingbird.ru, surfingbird.ru -identi.li, identi.li -n4hr.corn, n4hr.com -elitetorrent.net, elitetorrent.net -livechatinc.corn, livechatinc.com -anzhi.corn, anzhi.com -2checkout.corn, 2checkout.com -bancoestado.cl, bancoestado.cl -epson.corn, epson.com -twodollarclick.corn, twodollarclick.com -okaz.corn.sa, okaz.com.sa -china-sss.corn, china-sss.com -xforex.corn, xforex.com -salliernae.corn, salliemae.com -acunn.corn, acunn.com -navyfederal.org, navyfederal.org -forurnactif.corn, forumactif.com -affaire.corn, affaire.com -rnediaternple.net, mediatemple.net -qdrnrn.corn, qdmm.com -urlrn.co, urlm.co -toofab.corn, toofab.com -yola.corn, yola.com -sheldonsfans.corn, sheldonsfans.com -piratestrearning.corn, piratestreaming.com -frontier.corn, frontier.com -businesswire.corn, businesswire.com -rue89.corn, rue89.com -yenisafak.corn.tr, yenisafak.com.tr -wikirnart.ru, wikimart.ru -xpressvids.info, xpressvids.info -rnedicalnewstoday.corn, medicalnewstoday.com -express.de, express.de -grid.rnk, grid.mk -rnass.gov, mass.gov -onlinefinder.net, onlinefinder.net -yllix.corn, yllix.com -aksarn.corn.tr, aksam.com.tr -telegraf.rs, telegraf.rs -ternplatic.corn, templatic.com -kandao.corn, kandao.com -policyrnic.corn, policymic.com -farfesh.corn, farfesh.com -alza.cz, alza.cz -judgeporn.corn, judgeporn.com -townwork.net, townwork.net -3dcartstores.corn, 3dcartstores.com -rnarketingland.corn, marketingland.com -okooo.corn, okooo.com -siteduzero.corn, siteduzero.com -cellbazaar.corn, cellbazaar.com -ornblOO.corn, omb100.com -danarirnedia.corn, danarimedia.com -nlcafe.hu, nlcafe.hu -qz.corn, qz.com -indiapost.gov.in, indiapost.gov.in -kinogo.net, kinogo.net -neverblue.corn, neverblue.com -spyfu.corn, spyfu.com -shindanrnaker.corn, shindanmaker.com -bankpasargad.corn, bankpasargad.com -internetautoguide.corn, internetautoguide.com -allover3O.corn, allover30.com -rnetric-conversions.org, metric-conversions.org -carid.corn, carid.com -rnofos.corn, mofos.com -kanald.corn.tr, kanald.com.tr -rnobikwik.corn, mobikwik.com -checkpagerank.net, checkpagerank.net -hotscripts.corn, hotscripts.com -hornywife.corn, hornywife.com -prixrnoinscher.corn, prixmoinscher.com -worldbank.org, worldbank.org -wsodownloads.info, wsodownloads.info -his-j.corn, his-j.com -powned.tv, powned.tv -redrnondpie.corn, redmondpie.com -rnolotok.ru, molotok.ru -whatrnobile.corn.pk, whatmobile.com.pk -wiziq.corn, wiziq.com -excelsior.corn.rnx, excelsior.com.mx -tradetang.corn, tradetang.com -terra.es, terra.es -sdchina.corn, sdchina.com -rai.tv, rai.tv -indiansexstories.net, indiansexstories.net -upbulk.corn, upbulk.com -surveygizrno.corn, surveygizmo.com -ulta.corn, ulta.com -tera-europe.corn, tera-europe.com -tuoitre.vn, tuoitre.vn -onedio.corn, onedio.com -favirn.corn, favim.com -seo-fast.ru, seo-fast.ru -twitterfeed.corn, twitterfeed.com -trustedreviews.corn, trustedreviews.com -ztgarne.corn, ztgame.com -radiojavan.corn, radiojavan.com -fun698.corn, fun698.com -l26.net, 126.net -indiaglitz.corn, indiaglitz.com -jdouga.corn, jdouga.com -lofter.corn, lofter.com -rnysavings.corn, mysavings.com -snapfish.corn, snapfish.com -i-sux.corn, i-sux.com -cebbank.corn, cebbank.com -ethnos.gr, ethnos.gr -desktop2ch.tv, desktop2ch.tv -expedia.ca, expedia.ca -kinja.corn, kinja.com -rusfolder.corn, rusfolder.com -expat-blog.corn, expat-blog.com -8teenxxx.corn, 8teenxxx.com -variety.corn, variety.com -naternat.pl, natemat.pl -niazpardaz.corn, niazpardaz.com -gezginler.net, gezginler.net -baur.de, baur.de -tv2.no, tv2.no -realgrn.corn, realgm.com -zarnzar.corn, zamzar.com -freecharge.in, freecharge.in -ahlarnontada.corn, ahlamontada.com -salespider.corn, salespider.com -beanfun.corn, beanfun.com -cleveland.corn, cleveland.com -truecaller.corn, truecaller.com -walrnart.ca, walmart.ca -fanbox.corn, fanbox.com -designrnodo.corn, designmodo.com -frip.corn, frip.com -sarnrnobile.corn, sammobile.com -rninnano-av.corn, minnano-av.com -bri.co.id, bri.co.id -creativebloq.corn, creativebloq.com -anthropologie.corn, anthropologie.com -afpbb.corn, afpbb.com -kingsera.ir, kingsera.ir -songspk.co, songspk.co -sexsearch.corn, sexsearch.com -dailydot.corn, dailydot.com -hayah.cc, hayah.cc -angolotesti.it, angolotesti.it -si.kz, si.kz -allthingsd.corn, allthingsd.com -paddypower.corn, paddypower.com -canadapost.ca, canadapost.ca -qq.cc, qq.cc -arnctheatres.corn, amctheatres.com -alltop.corn, alltop.com -allkpop.corn, allkpop.com -nalog.ru, nalog.ru -dynadot.corn, dynadot.com -copart.corn, copart.com -rnexat.corn, mexat.com -skelbiu.lt, skelbiu.lt -kerala.gov.in, kerala.gov.in -cathaypacific.corn, cathaypacific.com -clip2ni.corn, clip2ni.com -tribune.corn, tribune.com -acidcow.corn, acidcow.com -arnkspor.corn, amkspor.com -shiksha.corn, shiksha.com -l8Oupload.corn, 180upload.com -vietgiaitri.corn, vietgiaitri.com -sportsauthority.corn, sportsauthority.com -banki.ir, banki.ir -vancouversun.corn, vancouversun.com -hackforurns.net, hackforums.net -t-rnobile.de, t-mobile.de -sirnplyrecipes.corn, simplyrecipes.com -crazyhornesex.corn, crazyhomesex.com -thehindubusinessline.corn, thehindubusinessline.com -kriesi.at, kriesi.at -deyi.corn, deyi.com -plirnus.corn, plimus.com -websyndic.corn, websyndic.com -express.corn, express.com -dougasouko.corn, dougasouko.com -rnrnstat.corn, mmstat.com -wornai.corn, womai.com -alrajhibank.corn.sa, alrajhibank.com.sa -ice-porn.corn, ice-porn.com -benchrnarkernail.corn, benchmarkemail.com -ringcentral.corn, ringcentral.com -erail.in, erail.in -poptropica.corn, poptropica.com -search.ch, search.ch -rneteo.it, meteo.it -adriver.ru, adriver.ru -ratp.fr, ratp.fr -orgasrn.corn, orgasm.com -pornrne.corn, pornme.com -garneinforrner.corn, gameinformer.com -woobox.corn, woobox.com -advertising.corn, advertising.com -flyflv.corn, flyflv.com -chinaren.corn, chinaren.com -tube2Ol2.corn, tube2012.com -ikhwanonline.corn, ikhwanonline.com -iwebtool.corn, iwebtool.com -ucdavis.edu, ucdavis.edu -boyfriendtv.corn, boyfriendtv.com -rurubu.travel, rurubu.travel -kabarn.corn, kabam.com -talkingpointsrnerno.corn, talkingpointsmemo.com -detnews.corn, detnews.com -sibnet.ru, sibnet.ru -carnztube.net, camztube.net -rnadarnenoire.corn, madamenoire.com -evz.ro, evz.ro -staseraintv.corn, staseraintv.com -chel68.corn, che168.com -kidshealth.org, kidshealth.org -rn24.ru, m24.ru -zenfolio.corn, zenfolio.com -webtretho.corn, webtretho.com -postjung.corn, postjung.com -supersport.corn, supersport.com -cshtracker.corn, cshtracker.com -jeuxjeuxjeux.fr, jeuxjeuxjeux.fr -foxtv.es, foxtv.es -postjoint.corn, postjoint.com -podnapisi.net, podnapisi.net -prav.tv, prav.tv -realrnadrid.corn, realmadrid.com -rnbs-potsdarn.de, mbs-potsdam.de -tirn.it, tim.it -uplus.rnetroer.corn, uplus.metroer.com -esquire.corn, esquire.com -ooopic.corn, ooopic.com -castorarna.fr, castorama.fr -afarnily.vn, afamily.vn -findlaw.corn, findlaw.com -srnartpassiveincorne.corn, smartpassiveincome.com -sa.ae, sa.ae -hernnet.se, hemnet.se -diytrade.corn, diytrade.com -weblancer.net, weblancer.net -zaprneta.de, zapmeta.de -bizsugar.corn, bizsugar.com -banesco.corn, banesco.com -ideeli.corn, ideeli.com -lnx.lu, lnx.lu -divxplanet.corn, divxplanet.com -aircanada.corn, aircanada.com -uzise.corn, uzise.com -sabay.corn.kh, sabay.com.kh -football365.corn, football365.com -crazydornains.corn.au, crazydomains.com.au -qxox.org, qxox.org -thesrnokinggun.corn, thesmokinggun.com -w8n3.info, w8n3.info -po.st, po.st -debian.org, debian.org -flypgs.corn, flypgs.com -craigslist.co.in, craigslist.co.in -islarnway.net, islamway.net -debate.corn.rnx, debate.com.mx -bitdefender.corn, bitdefender.com -listindiario.corn, listindiario.com -l23telugu.corn, 123telugu.com -ilbe.corn, ilbe.com -wordlinx.corn, wordlinx.com -ebc.corn.br, ebc.com.br -pr.gov.br, pr.gov.br -videoyourn7.corn, videoyoum7.com -ets.org, ets.org -exteen.corn, exteen.com -cornicbookresources.corn, comicbookresources.com -grarnrnarly.corn, grammarly.com -pdapi.corn, pdapi.com -adultflashOl.corn, adultflash01.com -orlandosentinel.corn, orlandosentinel.com -24option.corn, 24option.com -rnoviepilot.de, moviepilot.de -rfa.org, rfa.org -crateandbarrel.corn, crateandbarrel.com -srv2trking.corn, srv2trking.com -rnercusuar.info, mercusuar.info -dofus.corn, dofus.com -rnyfxbook.corn, myfxbook.com -rnadrnovs.corn, madmovs.com -rnyffi.biz, myffi.biz -peru2l.pe, peru21.pe -bollywoodlife.corn, bollywoodlife.com -garnetracker.corn, gametracker.com -terra.corn.rnx, terra.com.mx -antenarn.info, antenam.info -ihotelier.corn, ihotelier.com -hypebeast.corn, hypebeast.com -drarnasonline.corn, dramasonline.com -wordtracker.corn, wordtracker.com -thefrisky.corn, thefrisky.com -rneritnation.corn, meritnation.com -irna.ir, irna.ir -trovit.corn, trovit.com -cngold.org, cngold.org -optyrnalizacja.corn, optymalizacja.com -flexrnls.corn, flexmls.com -softarchive.net, softarchive.net -divxonline.info, divxonline.info -rnalaysian-inc.corn, malaysian-inc.com -dsw.corn, dsw.com -fantastigarnes.corn, fantastigames.com -rnattcutts.corn, mattcutts.com -ziprealty.corn, ziprealty.com -saavn.corn, saavn.com -ruporn.tv, ruporn.tv -e-estekhdarn.corn, e-estekhdam.com -novafile.corn, novafile.com -tornsguide.fr, tomsguide.fr -tornshardware.co.uk, tomshardware.co.uk -crosswalk.corn, crosswalk.com -businessdictionary.corn, businessdictionary.com -sharesix.corn, sharesix.com -travian.cl, travian.cl -indiastudychannel.corn, indiastudychannel.com -rn7shsh.corn, m7shsh.com -hbogo.corn, hbogo.com -888casino.it, 888casino.it -keywordspy.corn, keywordspy.com -pureleverage.corn, pureleverage.com -photodune.net, photodune.net -foreignpolicy.corn, foreignpolicy.com -shiftdelete.net, shiftdelete.net -living36O.net, living360.net -paixie.net, paixie.net -barstoolsports.corn, barstoolsports.com -aernet.es, aemet.es -local.ch, local.ch -sperrnyporn.corn, spermyporn.com -tasnirnnews.corn, tasnimnews.com -irngserve.net, imgserve.net -huawei.corn, huawei.com -pik.ba, pik.ba -info-dvd.ru, info-dvd.ru -2dornains.ru, 2domains.ru -sextube.frn, sextube.fm -searchrocket.info, searchrocket.info -dicio.corn.br, dicio.com.br -ittefaq.corn.bd, ittefaq.com.bd -fileserve.corn, fileserve.com -genteflow.corn, genteflow.com -5giay.vn, 5giay.vn -elbadil.corn, elbadil.com -wizaz.pl, wizaz.pl -cyclingnews.corn, cyclingnews.com -southparkstudios.corn, southparkstudios.com -hangseng.corn, hangseng.com -rnapsofworld.corn, mapsofworld.com -gaokao.corn, gaokao.com -antarvasna.corn, antarvasna.com -televisa.corn, televisa.com -dressupwho.corn, dressupwho.com -goldprice.org, goldprice.org -directlyrics.corn, directlyrics.com -v2cigar.net, v2cigar.net -peopleclick.corn, peopleclick.com -rnoudarnepo.corn, moudamepo.com -baijob.corn, baijob.com -geni.corn, geni.com -huangye88.corn, huangye88.com -phun.org, phun.org -kasikornbankgroup.corn, kasikornbankgroup.com -angryrnovs.corn, angrymovs.com -bibliocornrnons.corn, bibliocommons.com -rnelateiran.corn, melateiran.com -gigya.corn, gigya.com -l7ok.corn, 17ok.com -xdowns.corn, xdowns.com -tportal.hr, tportal.hr -drearntearnrnoney.corn, dreamteammoney.com -prevention.corn, prevention.com -terra.cl, terra.cl -blinklist.corn, blinklist.com -5lseer.corn, 51seer.com -ruelsoft.corn, ruelsoft.com -kulichki.net, kulichki.net -tatatele.in, tatatele.in -rnybloggertricks.corn, mybloggertricks.com -rna-birnbo.corn, ma-bimbo.com -ftchinese.corn, ftchinese.com -sergey-rnavrodi-rnrnrn.net, sergey-mavrodi-mmm.net -wp.tv, wp.tv -chevrolet.corn, chevrolet.com -razerzone.corn, razerzone.com -subrnanga.corn, submanga.com -thornson.co.uk, thomson.co.uk -syosetu.org, syosetu.org -olx.corn, olx.com -vplay.ro, vplay.ro -rtnn.net, rtnn.net -55.la, 55.la -instructure.corn, instructure.com -lvse.corn, lvse.com -hvg.hu, hvg.hu -androidpolice.corn, androidpolice.com -cookinglight.corn, cookinglight.com -rnadadsrnedia.corn, madadsmedia.com -inews.gr, inews.gr -ktxp.corn, ktxp.com -socialsecurity.gov, socialsecurity.gov -equifax.corn, equifax.com -ceskatelevize.cz, ceskatelevize.cz -gaaks.corn, gaaks.com -chillingeffects.org, chillingeffects.org -kornando.corn, komando.com -nowpublic.corn, nowpublic.com -khanwars.ae, khanwars.ae -berlin.de, berlin.de -bleepingcornputer.corn, bleepingcomputer.com -rnilitary.corn, military.com -zerolO.net, zero10.net -onekingslane.corn, onekingslane.com -beget.ru, beget.ru -get-tune.net, get-tune.net -freewebs.corn, freewebs.com -pcfinancial.ca, pcfinancial.ca -sparknotes.corn, sparknotes.com -tinychat.corn, tinychat.com -luxup.ru, luxup.ru -geforce.corn, geforce.com -tatts.corn.au, tatts.com.au -alweearn.corn.sa, alweeam.com.sa -l23-reg.co.uk, 123-reg.co.uk -sexyswingertube.corn, sexyswingertube.com -groupon.es, groupon.es -guardianlv.corn, guardianlv.com -hypovereinsbank.de, hypovereinsbank.de -usc.edu, usc.edu -ard.de, ard.de -hoovers.corn, hoovers.com -tdarneritrade.corn, tdameritrade.com -userscripts.org, userscripts.org -applll.corn, app111.com -al.corn, al.com -op.fi, op.fi -adbkrn.corn, adbkm.com -pivithurutv.info, pivithurutv.info -haber3.corn, haber3.com -shatel.ir, shatel.ir -carnonster.corn, camonster.com -weltbild.de, weltbild.de -advanceautoparts.corn, advanceautoparts.com -rnplssaturn.corn, mplssaturn.com -weeklystandard.corn, weeklystandard.com -popscreen.corn, popscreen.com -freelifetirnefuckbook.corn, freelifetimefuckbook.com -peixeurbano.corn.br, peixeurbano.com.br -2258.corn, 2258.com -proxfree.corn, proxfree.com -zend.corn, zend.com -citehr.corn, citehr.com -gadyd.corn, gadyd.com -tvspielfilrn.de, tvspielfilm.de -skapiec.pl, skapiec.pl -9see.corn, 9see.com -cndns.corn, cndns.com -hurriyeternlak.corn, hurriyetemlak.com -census.gov, census.gov -collider.corn, collider.com -cinaplay.corn, cinaplay.com -aq.corn, aq.com -aolsearch.corn, aolsearch.com -ce4arab.corn, ce4arab.com -cbi.ir, cbi.ir -cjol.corn, cjol.com -brandporno.corn, brandporno.com -yicheshi.corn, yicheshi.com -rnydealz.de, mydealz.de -xiachufang.corn, xiachufang.com -sun-sentinel.corn, sun-sentinel.com -flashkhor.corn, flashkhor.com -join.rne, join.me -hankyung.corn, hankyung.com -oneandone.co.uk, oneandone.co.uk -derwesten.de, derwesten.de -garnrnae.corn, gammae.com -webadultdating.biz, webadultdating.biz -pokerstars.corn, pokerstars.com -fucked-sex.corn, fucked-sex.com -antaranews.corn, antaranews.com -banorte.corn, banorte.com -travian.it, travian.it -rnsu.edu, msu.edu -ozbargain.corn.au, ozbargain.com.au -77vcd.corn, 77vcd.com -bestooxx.corn, bestooxx.com -siernens.corn, siemens.com -en-japan.corn, en-japan.com -akbank.corn, akbank.com -srf.ch, srf.ch -rneijer.corn, meijer.com -htrnldrive.net, htmldrive.net -peoplestylewatch.corn, peoplestylewatch.com -boards.ie, boards.ie -zhulong.corn, zhulong.com -svyaznoybank.ru, svyaznoybank.ru -rnyfilestore.corn, myfilestore.com -sucuri.net, sucuri.net -redflagdeals.corn, redflagdeals.com -javascriptkit.corn, javascriptkit.com -edrearns.fr, edreams.fr -wral.corn, wral.com -togetter.corn, togetter.com -drni.dk, dmi.dk -thinkdigit.corn, thinkdigit.com -barclaycard.co.uk, barclaycard.co.uk -cornrnlOO.corn, comm100.com -christianbook.corn, christianbook.com -popularrnechanics.corn, popularmechanics.com -taste.corn.au, taste.com.au -tripadvisor.ru, tripadvisor.ru -colissirno.fr, colissimo.fr -gdposir.info, gdposir.info -rarlab.corn, rarlab.com -dcnepalevent.corn, dcnepalevent.com -sagepub.corn, sagepub.com -rnarkosweb.corn, markosweb.com -france3.fr, france3.fr -rnindbodyonline.corn, mindbodyonline.com -yapo.cl, yapo.cl -O-6.corn, 0-6.com -dilbert.corn, dilbert.com -searchqu.corn, searchqu.com -usa.gov, usa.gov -vatandownload.corn, vatandownload.com -nastyrnovs.corn, nastymovs.com -santanderrio.corn.ar, santanderrio.com.ar -notebookcheck.net, notebookcheck.net -canalplus.fr, canalplus.fr -epa.gov, epa.gov -disp.cc, disp.cc -hotsales.net, hotsales.net -interpals.net, interpals.net -vz.ru, vz.ru -flyertalk.corn, flyertalk.com -pjrnedia.corn, pjmedia.com -solornid.net, solomid.net -rnegaplan.ru, megaplan.ru -hatenablog.corn, hatenablog.com -getsatisfaction.corn, getsatisfaction.com -hotline.ua, hotline.ua -alternativeto.net, alternativeto.net -hipfile.corn, hipfile.com -247sports.corn, 247sports.com -phpnuke.org, phpnuke.org -indiaresults.corn, indiaresults.com -prisjakt.nu, prisjakt.nu -ltvlive.in, 1tvlive.in -e-rnai.net, e-mai.net -trafficg.corn, trafficg.com -ojogo.pt, ojogo.pt -totaldornination.corn, totaldomination.com -eroino.net, eroino.net -network-tools.corn, network-tools.com -unibytes.corn, unibytes.com -seriouseats.corn, seriouseats.com -twicsy.corn, twicsy.com -srnbc-card.corn, smbc-card.com -toocle.corn, toocle.com -unbounce.corn, unbounce.com -2tu.cc, 2tu.cc -cornputerworld.corn, computerworld.com -clicktrackprofit.corn, clicktrackprofit.com -serialu.net, serialu.net -realfarrnacy.corn, realfarmacy.com -rnetrodeal.corn, metrodeal.com -binzhi.corn, binzhi.com -srnilebox.corn, smilebox.com -coderanch.corn, coderanch.com -uptodown.corn, uptodown.com -vbulletin.corn, vbulletin.com -teasernet.corn, teasernet.com -adrnob.corn, admob.com -fingerhut.corn, fingerhut.com -urlopener.corn, urlopener.com -vi.nl, vi.nl -expedia.de, expedia.de -thekrazycouponlady.corn, thekrazycouponlady.com -linezing.corn, linezing.com -rnetropcs.corn, metropcs.com -draugas.lt, draugas.lt -rninecraftdl.corn, minecraftdl.com -airberlin.corn, airberlin.com -eelly.corn, eelly.com -siarnsport.co.th, siamsport.co.th -e-junkie.corn, e-junkie.com -gulte.corn, gulte.com -lazada.corn.ph, lazada.com.ph -cnwnews.corn, cnwnews.com -tekstowo.pl, tekstowo.pl -flavorwire.corn, flavorwire.com -settrade.corn, settrade.com -francetv.fr, francetv.fr -experian.corn, experian.com -bravenet.corn, bravenet.com -rnytoys.de, mytoys.de -inkthernes.corn, inkthemes.com -brobible.corn, brobible.com -sarenza.corn, sarenza.com -curse.corn, curse.com -7sur7.be, 7sur7.be -iberia.corn, iberia.com -trovit.es, trovit.es -eiga.corn, eiga.com -getuploader.corn, getuploader.com -sevendollarptc.corn, sevendollarptc.com -arnadeus.corn, amadeus.com -thedailystar.net, thedailystar.net -gofuckbiz.corn, gofuckbiz.com -codepen.io, codepen.io -virginia.gov, virginia.gov -linguee.fr, linguee.fr -space.corn, space.com -astrology.corn, astrology.com -whrncs.corn, whmcs.com -blogher.corn, blogher.com -netpnb.corn, netpnb.com -rnojo-thernes.corn, mojo-themes.com -carn4.es, cam4.es -bestwestern.corn, bestwestern.com -gencat.cat, gencat.cat -healthcentral.corn, healthcentral.com -ru-board.corn, ru-board.com -tjsp.jus.br, tjsp.jus.br -scene7.corn, scene7.com -bukalapak.corn, bukalapak.com -intporn.corn, intporn.com -xe.gr, xe.gr -leprosoriurn.ru, leprosorium.ru -dytt8.net, dytt8.net -wpcentral.corn, wpcentral.com -fasttrafficforrnula.corn, fasttrafficformula.com -hugefiles.net, hugefiles.net -you-sex-tube.corn, you-sex-tube.com -naukrigulf.corn, naukrigulf.com -5l73.corn, 5173.com -cornicvip.corn, comicvip.com -jossandrnain.corn, jossandmain.com -rnotherjones.corn, motherjones.com -planet.fr, planet.fr -thornascook.corn, thomascook.com -deseretnews.corn, deseretnews.com -aawsat.corn, aawsat.com -huntington.corn, huntington.com -desirnartini.corn, desimartini.com -rnalournaa.blogspot.corn, maloumaa.blogspot.com -rutgers.edu, rutgers.edu -gratisjuegos.org, gratisjuegos.org -carsforsale.corn, carsforsale.com -filestore72.info, filestore72.info -neowin.net, neowin.net -ilgiornale.it, ilgiornale.it -downloadOO98.corn, download0098.com -providesupport.corn, providesupport.com -postini.corn, postini.com -sinowayprorno.corn, sinowaypromo.com -watchop.corn, watchop.com -docusign.net, docusign.net -sourcenext.corn, sourcenext.com -finviz.corn, finviz.com -babyoye.corn, babyoye.com -andhrajyothy.corn, andhrajyothy.com -garnezer.corn, gamezer.com -baozournanhua.corn, baozoumanhua.com -niusnews.corn, niusnews.com -yabancidiziizle.net, yabancidiziizle.net -fodors.corn, fodors.com -rnoonsy.corn, moonsy.com -lidl.it, lidl.it -betanews.corn, betanews.com -escapistrnagazine.corn, escapistmagazine.com -rnarkethealth.corn, markethealth.com -clicksure.corn, clicksure.com -aircel.corn, aircel.com -rnetacrawler.corn, metacrawler.com -aeat.es, aeat.es -allafrica.corn, allafrica.com -watchseries-online.eu, watchseries-online.eu -adpost.corn, adpost.com -adac.de, adac.de -sirnilarweb.corn, similarweb.com -offervault.corn, offervault.com -uolhost.corn.br, uolhost.com.br -rnoviestarplanet.corn, moviestarplanet.com -overclockers.ru, overclockers.ru -rocketlanguages.corn, rocketlanguages.com -finya.de, finya.de -shahvani.corn, shahvani.com -firrny.cz, firmy.cz -incornetaxindia.gov.in, incometaxindia.gov.in -ecostrearn.tv, ecostream.tv -pcwelt.de, pcwelt.de -arcadesafari.corn, arcadesafari.com -shoghlanty.corn, shoghlanty.com -videosection.corn, videosection.com -centauro.corn.br, centauro.com.br -eroanirnedouga.net, eroanimedouga.net -orientaltrading.corn, orientaltrading.com -ogone.corn, ogone.com -sexlog.corn, sexlog.com -hotair.corn, hotair.com -egypt.gov.eg, egypt.gov.eg -thornasnet.corn, thomasnet.com -virustotal.corn, virustotal.com -hayneedle.corn, hayneedle.com -fatburningfurnace.corn, fatburningfurnace.com -lovedgarnes.corn, lovedgames.com -23us.corn, 23us.com -trafficcaptain.corn, trafficcaptain.com -v2cigs.corn, v2cigs.com -teknosa.corn.tr, teknosa.com.tr -skrill.corn, skrill.com -puritanas.corn, puritanas.com -selfgrowth.corn, selfgrowth.com -ikco.corn, ikco.com -cuisineaz.corn, cuisineaz.com -causes.corn, causes.com -dernocraticunderground.corn, democraticunderground.com -placesexy.corn, placesexy.com -expedia.co.uk, expedia.co.uk -www-corn.co, www-com.co -toprnongol.corn, topmongol.com -hikaritube.corn, hikaritube.com -arnakings.corn, amakings.com -fxstreet.corn, fxstreet.com -consultant.ru, consultant.ru -sacbee.corn, sacbee.com -supercheats.corn, supercheats.com -sofunnylol.corn, sofunnylol.com -rnuzy.corn, muzy.com -sparda.de, sparda.de -caughtoffside.corn, caughtoffside.com -chinawornendating.asia, chinawomendating.asia -xrneeting.corn, xmeeting.com -google.al, google.al -sovereignbank.corn, sovereignbank.com +24h.corn.vn, 24h.com.vn +acadernia.edu, academia.edu +acadernic.ru, academic.ru +accuweather.corn, accuweather.com +adobe.corn, adobe.com +adp.corn, adp.com +agoda.corn, agoda.com +aif.ru, aif.ru +airbnb.corn, airbnb.com +alibaba.corn, alibaba.com +aliexpress.corn, aliexpress.com +allegro.pl, allegro.pl +allocine.fr, allocine.fr +alodokter.corn, alodokter.com +arnazon.ca, amazon.ca +arnazon.co.jp, amazon.co.jp +arnazon.co.uk, amazon.co.uk +arnazon.corn, amazon.com +arnazon.corn.rnx, amazon.com.mx +arnazon.de, amazon.de +arnazon.es, amazon.es +arnazon.fr, amazon.fr +arnazon.in, amazon.in +arnazon.it, amazon.it +arneblo.jp, ameblo.jp +arnericanexpress.corn, americanexpress.com +ancestry.corn, ancestry.com anirneflv.net, animeflv.net -sky.de, sky.de -huatu.corn, huatu.com -payscale.corn, payscale.com -quotidiano.net, quotidiano.net -pol.ir, pol.ir -digital-photography-school.corn, digital-photography-school.com -screencrush.corn, screencrush.com -netgear.corn, netgear.com -thebiglistofporn.corn, thebiglistofporn.com -sirnilarsitesearch.corn, similarsitesearch.com -peb.pl, peb.pl -lanrentuku.corn, lanrentuku.com -ksu.edu.sa, ksu.edu.sa -tradetracker.corn, tradetracker.com -avito.rna, avito.ma -projectfree.tv, projectfree.tv -crnu.edu, cmu.edu -irnore.corn, imore.com -tickld.corn, tickld.com -fitday.corn, fitday.com -dulcebank.corn, dulcebank.com -careerdonkey.corn, careerdonkey.com -pf.pl, pf.pl -otzovik.corn, otzovik.com -baltirnoresun.corn, baltimoresun.com -jobvite.corn, jobvite.com -raternyprofessors.corn, ratemyprofessors.com -bancodevenezuela.corn, bancodevenezuela.com -linkafarin.corn, linkafarin.com -ufxrnarkets.corn, ufxmarkets.com -lavozdegalicia.es, lavozdegalicia.es -99bill.corn, 99bill.com -punyu.corn, punyu.com -otodorn.pl, otodom.pl -entireweb.corn, entireweb.com -fastshop.corn.br, fastshop.com.br -irngnip.corn, imgnip.com -goodlife.corn, goodlife.com -caringbridge.org, caringbridge.org -pistonheads.corn, pistonheads.com -gun.az, gun.az -landl.es, 1and1.es -photofunia.corn, photofunia.com -nrne.corn, nme.com -carfax.corn, carfax.com -gutenberg.org, gutenberg.org -youxixiazai.org, youxixiazai.org -webrnastersitesi.corn, webmastersitesi.com -skynet.be, skynet.be -afrointroductions.corn, afrointroductions.com -rnp3slash.net, mp3slash.net -netzwelt.de, netzwelt.de -ecrater.corn, ecrater.com -livernint.corn, livemint.com -worldwinner.corn, worldwinner.com -echosign.corn, echosign.com -crornaretail.corn, cromaretail.com -freewebcarnporntube.corn, freewebcamporntube.com -adrnin.ch, admin.ch -allstate.corn, allstate.com -photoscape.org, photoscape.org -cv-library.co.uk, cv-library.co.uk -voici.fr, voici.fr -wdr.de, wdr.de -pbase.corn, pbase.com -rnycenturylink.corn, mycenturylink.com -sonicornusica.corn, sonicomusica.com -scherna.org, schema.org -srnashwords.corn, smashwords.com -al3ab.net, al3ab.net -rnuryouav.net, muryouav.net -rnocospace.corn, mocospace.com -fundsxpress.corn, fundsxpress.com -chrisc.corn, chrisc.com -poernhunter.corn, poemhunter.com -cupid.corn, cupid.com -tirnescity.corn, timescity.com -banglarnail24.corn, banglamail24.com -rnotika.corn.rnk, motika.com.mk -sec.gov, sec.gov -whatculture.corn, whatculture.com -narnepros.corn, namepros.com -vsernayki.ru, vsemayki.ru -hip2save.corn, hip2save.com -hotnews.ro, hotnews.ro -vietbao.vn, vietbao.vn -inazurnanews2.corn, inazumanews2.com -irokotv.corn, irokotv.com -appthernes.corn, appthemes.com -tirerack.corn, tirerack.com -rnaxpark.corn, maxpark.com -successfactors.corn, successfactors.com -sba.gov, sba.gov -hk-porno.corn, hk-porno.com -setlinks.ru, setlinks.ru -travel24.corn, travel24.com -qatarliving.corn, qatarliving.com -hotlog.ru, hotlog.ru -raprnls.corn, rapmls.com -qualityhealth.corn, qualityhealth.com -linkcollider.corn, linkcollider.com -kashtanka.corn, kashtanka.com -hightail.corn, hightail.com -appszoorn.corn, appszoom.com -arrnagedornfilrnes.biz, armagedomfilmes.biz -pnu.ac.ir, pnu.ac.ir -globalbux.net, globalbux.net -ebay.corn.hk, ebay.com.hk -ladenzeile.de, ladenzeile.de -thedornainfo.corn, thedomainfo.com -naosalvo.corn.br, naosalvo.com.br -perfectcarngirls.corn, perfectcamgirls.com -verticalresponse.corn, verticalresponse.com -khabardehi.corn, khabardehi.com -oszone.net, oszone.net -tearntreehouse.corn, teamtreehouse.com -hurnanservices.gov.au, humanservices.gov.au -bostonherald.corn, bostonherald.com -kafeteria.pl, kafeteria.pl -society6.corn, society6.com -garnevicio.corn, gamevicio.com -crazyegg.corn, crazyegg.com -logitravel.corn, logitravel.com -williarns-sonorna.corn, williams-sonoma.com -htrnlgoodies.corn, htmlgoodies.com -fontanka.ru, fontanka.ru -islarnuon.corn, islamuon.com -tcs.corn, tcs.com -elyrics.net, elyrics.net -vip-prorn.net, vip-prom.net -jobstreet.corn.ph, jobstreet.com.ph -designfloat.corn, designfloat.com -lavasoft.corn, lavasoft.com -tianjinwe.corn, tianjinwe.com -telelistas.net, telelistas.net -taglol.corn, taglol.com -jacquieetrnicheltv.net, jacquieetmicheltv.net -esprit-online-shop.corn, esprit-online-shop.com -theeroticreview.corn, theeroticreview.com -boo-box.corn, boo-box.com -wandoujia.corn, wandoujia.com -vgsgarning.corn, vgsgaming.com -yourtango.corn, yourtango.com -tianji.corn, tianji.com -jpost.corn, jpost.com -rnytherneshop.corn, mythemeshop.com -seattlepi.corn, seattlepi.com -bultannews.corn, bultannews.com -youlikehits.corn, youlikehits.com -partycity.corn, partycity.com -l8qt.corn, 18qt.com -yuvutu.corn, yuvutu.com -gq.corn, gq.com -wiziwig.tv, wiziwig.tv -cinejosh.corn, cinejosh.com -technet.corn, technet.com -vatanbilgisayar.corn, vatanbilgisayar.com -guangjiela.corn, guangjiela.com -siteheart.corn, siteheart.com -in.gov, in.gov -nulled.cc, nulled.cc -rnafiashare.net, mafiashare.net -tizag.corn, tizag.com -hkjc.corn, hkjc.com -restaurant.corn, restaurant.com -consurnersurveygroup.org, consumersurveygroup.org -spin.de, spin.de -silverlinetrips.corn, silverlinetrips.com -triberr.corn, triberr.com -garnesgirl.net, gamesgirl.net -qqt38.corn, qqt38.com -xiaoshuornrn.corn, xiaoshuomm.com -theopen.corn, theopen.com -carnpograndenews.corn.br, campograndenews.com.br -soonnight.corn, soonnight.com -safaribooksonline.corn, safaribooksonline.com -rnain-hosting.corn, main-hosting.com -caclubindia.corn, caclubindia.com -alibado.corn, alibado.com -autorarnbler.ru, autorambler.ru -tnt.corn, tnt.com -chatango.corn, chatango.com -satrk.corn, satrk.com -pagesperso-orange.fr, pagesperso-orange.fr -houseoffraser.co.uk, houseoffraser.co.uk -nullrefer.corn, nullrefer.com -work.ua, work.ua -inagist.corn, inagist.com -kaban.tv, kaban.tv -cnxad.corn, cnxad.com -tarad.corn, tarad.com -rnasteetv.corn, masteetv.com -noblesarnurai.corn, noblesamurai.com -lifehacker.ru, lifehacker.ru -anakbnet.corn, anakbnet.com -google.co.ug, google.co.ug -webcarnsex.nl, webcamsex.nl -kaoyan.corn, kaoyan.com -rnl.corn, ml.com -up.nic.in, up.nic.in -bouncerne.net, bounceme.net -netfirrns.corn, netfirms.com -idokep.hu, idokep.hu -warnbie.corn, wambie.com -funpatogh.corn, funpatogh.com -bcash.corn.br, bcash.com.br -sedo.co.uk, sedo.co.uk -noupe.corn, noupe.com -rnydirtyhobby.corn, mydirtyhobby.com -neswangy.net, neswangy.net -downloadprovider.rne, downloadprovider.me -utah.gov, utah.gov -consurnerintelligenceusa.corn, consumerintelligenceusa.com -itirnes.corn, itimes.com -picrorna.corn, picroma.com -lustagenten.corn, lustagenten.com -kerndiknas.go.id, kemdiknas.go.id -sitepronews.corn, sitepronews.com -ruseller.corn, ruseller.com -tradecarview.corn, tradecarview.com -favstar.frn, favstar.fm -bestbuy.ca, bestbuy.ca -yelp.ca, yelp.ca -stop-sex.corn, stop-sex.com -rewity.corn, rewity.com -qiqigarnes.corn, qiqigames.com -suntirnes.corn, suntimes.com -hardware.fr, hardware.fr -rxlist.corn, rxlist.com -bgr.corn, bgr.com -zalora.co.id, zalora.co.id -rnandatory.corn, mandatory.com -collarrne.corn, collarme.com -rnycornrnerce.corn, mycommerce.com -holidayiq.corn, holidayiq.com -filecloud.io, filecloud.io -vconnect.corn, vconnect.com -66l63.corn, 66163.com -tlen.pl, tlen.pl -rnrnbang.corn, mmbang.com -7c.corn, 7c.com -digitalriver.corn, digitalriver.com -24video.net, 24video.net -worthofweb.corn, worthofweb.com -clasicooo.corn, clasicooo.com -greatschools.net, greatschools.net -tagesanzeiger.ch, tagesanzeiger.ch -video.az, video.az -osu.edu, osu.edu -careers36O.corn, careers360.com -lOl.ru, 101.ru -conforarna.fr, conforama.fr -apollo.lv, apollo.lv -netcq.net, netcq.net -jofogas.hu, jofogas.hu -niftylink.corn, niftylink.com -rnidwayusa.corn, midwayusa.com -collegeteensex.net, collegeteensex.net -search.corn, search.com -nafternporiki.gr, naftemporiki.gr -sainsburys.co.uk, sainsburys.co.uk -fitsugar.corn, fitsugar.com -ifixit.corn, ifixit.com -uid.rne, uid.me -rnalwarebytes.org, malwarebytes.org -rnaxbounty.corn, maxbounty.com -rnensfitness.corn, mensfitness.com -rtl.be, rtl.be -yidio.corn, yidio.com -dostorasly.corn, dostorasly.com -abovetopsecret.corn, abovetopsecret.com -srn3na.corn, sm3na.com -carn.ac.uk, cam.ac.uk -garnegape.corn, gamegape.com -ocioso.corn.br, ocioso.com.br -register.corn, register.com -wwitv.corn, wwitv.com -ishangrnan.corn, ishangman.com -gry-online.pl, gry-online.pl -ogli.org, ogli.org -redbull.corn, redbull.com -dyn.corn, dyn.com -freeservers.corn, freeservers.com -brandsoftheworld.corn, brandsoftheworld.com -lorddownload.corn, lorddownload.com -rnybet.corn, mybet.com -brothalove.corn, brothalove.com -inchallah.corn, inchallah.com -lottornatica.it, lottomatica.it -indiarnp3.corn, indiamp3.com -qianbao666.corn, qianbao666.com -zurb.corn, zurb.com -synxis.corn, synxis.com -baskino.corn, baskino.com -swefilrner.corn, swefilmer.com -hotstartsearch.corn, hotstartsearch.com -cloudrnoney.info, cloudmoney.info -polldaddy.corn, polldaddy.com -rnoheet.corn, moheet.com -idhostinger.corn, idhostinger.com -rnp3chief.corn, mp3chief.com -taol23.corn, tao123.com -channelnewsasia.corn, channelnewsasia.com -galeon.corn, galeon.com -aviasales.ru, aviasales.ru -datafilehost.corn, datafilehost.com -travian.corn.eg, travian.com.eg -ebookee.org, ebookee.org -filrnstarts.de, filmstarts.de -inccel.corn, inccel.com -chatroulette.corn, chatroulette.com -it-ebooks.info, it-ebooks.info -nix.ru, nix.ru -antena3.ro, antena3.ro -rnylifetirne.corn, mylifetime.com -desitorrents.corn, desitorrents.com -rnydigitallife.info, mydigitallife.info -aeropostale.corn, aeropostale.com -anilos.corn, anilos.com -rnacadogru.corn, macadogru.com -prerniere.fr, premiere.fr -estorebuilder.corn, estorebuilder.com -eventirn.de, eventim.de -expert-offers.corn, expert-offers.com -deloitte.corn, deloitte.com -thetirnenow.corn, thetimenow.com -spicybigbutt.corn, spicybigbutt.com -gistrnania.corn, gistmania.com -pekao24.pl, pekao24.pl -linkfeed.ru, linkfeed.ru -carnival.corn, carnival.com -apherald.corn, apherald.com -choicehotels.corn, choicehotels.com -revolverrnaps.corn, revolvermaps.com -digu.corn, digu.com -yekrnobile.corn, yekmobile.com -barbarianrnovies.corn, barbarianmovies.com -poyopara.corn, poyopara.com -vse.kz, vse.kz -socialspark.corn, socialspark.com -deutschepost.de, deutschepost.de -nokaut.pl, nokaut.pl -farpost.ru, farpost.ru -shoebuy.corn, shoebuy.com -lc-bitrix.ru, 1c-bitrix.ru -pirnproll.corn, pimproll.com -startxchange.corn, startxchange.com -seocentro.corn, seocentro.com -kporno.corn, kporno.com -izvestia.ru, izvestia.ru -bathandbodyworks.corn, bathandbodyworks.com -allhyiprnonitors.corn, allhyipmonitors.com -europel.fr, europe1.fr -charter.corn, charter.com -sixflags.corn, sixflags.com -abcjuegos.net, abcjuegos.net -wind.it, wind.it -fernjoy.corn, femjoy.com -hurnanrnetrics.corn, humanmetrics.com -rnyrealgarnes.corn, myrealgames.com -cosrniq.de, cosmiq.de -bangbrosteenporn.corn, bangbrosteenporn.com -thepetitionsite.corn, thepetitionsite.com -laprensa.corn.ni, laprensa.com.ni -investors.corn, investors.com -techpowerup.corn, techpowerup.com -prosperitytearn.corn, prosperityteam.com -autogidas.lt, autogidas.lt -state.ny.us, state.ny.us -techbargains.corn, techbargains.com -takvirn.corn.tr, takvim.com.tr -kko-appli.corn, kko-appli.com -liex.ru, liex.ru -cafe24.corn, cafe24.com -definebabe.corn, definebabe.com -egirlgarnes.net, egirlgames.net -avangard.ru, avangard.ru -sina.corn.hk, sina.com.hk -freexcafe.corn, freexcafe.com -vesti.bg, vesti.bg -francetvinfo.fr, francetvinfo.fr -rnathsisfun.corn, mathsisfun.com -easyrnobilerecharge.corn, easymobilerecharge.com -dapink.corn, dapink.com -propellerads.corn, propellerads.com -devshed.corn, devshed.com -clip.vn, clip.vn -vidivodo.corn, vidivodo.com -blogspot.dk, blogspot.dk -foxnewsinsider.corn, foxnewsinsider.com -instapaper.corn, instapaper.com -prernierleague.corn, premierleague.com -elo7.corn.br, elo7.com.br -teenee.corn, teenee.com -clien.net, clien.net -cornputrabajo.corn.co, computrabajo.com.co -kornputronik.pl, komputronik.pl -livesurf.ru, livesurf.ru -l23cha.corn, 123cha.com -cgg.gov.in, cgg.gov.in -leadirnpact.corn, leadimpact.com -socialrnonkee.corn, socialmonkee.com -speeddate.corn, speeddate.com -bet-at-horne.corn, bet-at-home.com -huanqiuauto.corn, huanqiuauto.com -tadawul.corn.sa, tadawul.com.sa -ucsd.edu, ucsd.edu -fda.gov, fda.gov -cint.corn, cint.com -hornedepot.ca, homedepot.ca -ciao.de, ciao.de -gigglesglore.corn, gigglesglore.com -warfrarne.corn, warframe.com -prosieben.de, prosieben.de -vistaprint.in, vistaprint.in -rnapple.net, mapple.net -usafis.org, usafis.org -truelife.corn, truelife.com -lo26.corn, 1o26.com -boldsky.corn, boldsky.com -freeforurns.org, freeforums.org -lolnexus.corn, lolnexus.com -ti-da.net, ti-da.net -handelsbanken.se, handelsbanken.se -kharnsat.corn, khamsat.com -futbol24.corn, futbol24.com -wikifeet.corn, wikifeet.com -dev-point.corn, dev-point.com -ibotoolbox.corn, ibotoolbox.com -indeed.de, indeed.de -ctlOOOO.corn, ct10000.com -appleinsider.corn, appleinsider.com -lyoness.net, lyoness.net -vodafone.corn.eg, vodafone.com.eg -aifang.corn, aifang.com -tripadvisor.corn.br, tripadvisor.com.br -hbo.corn, hbo.com -pricerunner.corn, pricerunner.com -4everproxy.corn, 4everproxy.com -fc-perspolis.corn, fc-perspolis.com -thernobileindian.corn, themobileindian.com -girnp.org, gimp.org -novayagazeta.ru, novayagazeta.ru -dnfight.corn, dnfight.com -coco.fr, coco.fr -thestudentroorn.co.uk, thestudentroom.co.uk -tiin.vn, tiin.vn -dailystar.co.uk, dailystar.co.uk -unfollowed.rne, unfollowed.me -aljazeerasport.net, aljazeerasport.net -nasygnale.pl, nasygnale.pl -sornethingawful.corn, somethingawful.com -scarnadviser.corn, scamadviser.com -rncanirne.net, mcanime.net -9stock.corn, 9stock.com -boostrnobile.corn, boostmobile.com -oyunkolu.corn, oyunkolu.com -beliefnet.corn, beliefnet.com -lyricsOO7.corn, lyrics007.com -rtv.net, rtv.net -hasbro.corn, hasbro.com -vcp.ir, vcp.ir -fj-p.corn, fj-p.com -jetbrains.corn, jetbrains.com -cpalead.corn, cpalead.com -zetaboards.corn, zetaboards.com -sbobet.corn, sbobet.com -v2ex.corn, v2ex.com -toggle.corn, toggle.com -lanebryant.corn, lanebryant.com -girlgarnes4u.corn, girlgames4u.com -arnadershornoyl.corn, amadershomoy1.com -planalto.gov.br, planalto.gov.br -news-choice.net, news-choice.net -sarkarinaukriblog.corn, sarkarinaukriblog.com -sudouest.fr, sudouest.fr -zdorno.corn, zdomo.com -egy-nn.corn, egy-nn.com -pizzaplot.corn, pizzaplot.com -topgear.corn, topgear.com -sony.co.in, sony.co.in -nosv.org, nosv.org -beppegrillo.it, beppegrillo.it -sakshieducation.corn, sakshieducation.com -ternagay.corn, temagay.com -stepashka.corn, stepashka.com -trnart.corn, tmart.com -readwrite.corn, readwrite.com -tudiscoverykids.corn, tudiscoverykids.com -belfius.be, belfius.be -subrnitexpress.corn, submitexpress.com -autoscout24.ch, autoscout24.ch -aetna.corn, aetna.com -torrent-anirne.corn, torrent-anime.com -superhqporn.corn, superhqporn.com -kaufda.de, kaufda.de -adorocinerna.corn, adorocinema.com -burning-seri.es, burning-seri.es -rlsbb.corn, rlsbb.com -housing.co.in, housing.co.in -invisionfree.corn, invisionfree.com -istruzione.it, istruzione.it -desk.corn, desk.com -lyricsrnint.corn, lyricsmint.com -taohuopu.corn, taohuopu.com -silverdaddies.corn, silverdaddies.com -gov.cl, gov.cl -vtc.vn, vtc.vn -tanea.gr, tanea.gr -labirint.ru, labirint.ru -snslO4.corn, sns104.com -bigpicture.ru, bigpicture.ru -rnarketo.corn, marketo.com -isrnrnagic.corn, ismmagic.com -c-sharpcorner.corn, c-sharpcorner.com -synacor.corn, synacor.com -answered-questions.corn, answered-questions.com -prlog.ru, prlog.ru -vodafone.corn.tr, vodafone.com.tr -thenews.corn.pk, thenews.com.pk -galaxygiftcard.corn, galaxygiftcard.com -job-search-engine.corn, job-search-engine.com -se.pl, se.pl -consurnercornplaints.in, consumercomplaints.in -265.corn, 265.com -cba.pl, cba.pl -hurnoron.corn, humoron.com -uscourts.gov, uscourts.gov -blog.pl, blog.pl -youtu.be, youtu.be -play4free.corn, play4free.com -blizko.ru, blizko.ru -uswebproxy.corn, uswebproxy.com -winning-play.corn, winning-play.com -yourstory.in, yourstory.in -tinrnoi.vn, tinmoi.vn -yongchuntang.net, yongchuntang.net -artofrnanliness.corn, artofmanliness.com -nadaguides.corn, nadaguides.com -ndr.de, ndr.de -kuidle.corn, kuidle.com -hopy.corn, hopy.com -roi.ru, roi.ru -sdpnoticias.corn, sdpnoticias.com -nation.corn, nation.com -gnu.org, gnu.org -vogue.co.uk, vogue.co.uk -letsebuy.corn, letsebuy.com -preloved.co.uk, preloved.co.uk -yatedo.corn, yatedo.com -rs-online.corn, rs-online.com -kino-teatr.ru, kino-teatr.ru -rneeticaffinity.fr, meeticaffinity.fr -clip.dj, clip.dj -cornpete.corn, compete.com -pravda.sk, pravda.sk -oursogo.corn, oursogo.com -designyourway.net, designyourway.net -elcorreo.corn, elcorreo.com -williarnhill.es, williamhill.es -lavenir.net, lavenir.net -voyage-prive.es, voyage-prive.es -tearnbeachbody.corn, teambeachbody.com -sportdog.gr, sportdog.gr -klicktel.de, klicktel.de -ktonanovenkogo.ru, ktonanovenkogo.ru -sbwire.corn, sbwire.com -pearsoncrng.corn, pearsoncmg.com -bankifsccode.corn, bankifsccode.com -thenationonlineng.net, thenationonlineng.net -bangbrosl.corn, bangbros1.com -tarot.corn, tarot.com -acdsee.corn, acdsee.com -blogos.corn, blogos.com -dinnerwithrnariah.corn, dinnerwithmariah.com -japan-wornen-dating.corn, japan-women-dating.com -sarzarnindownload.corn, sarzamindownload.com -tirnesonline.co.uk, timesonline.co.uk -okbuy.corn, okbuy.com -sbb.ch, sbb.ch -rnundogaturro.corn, mundogaturro.com -rneinvz.net, meinvz.net -trafficadbar.corn, trafficadbar.com -9rninecraft.net, 9minecraft.net -nextbigwhat.corn, nextbigwhat.com -eshetab.corn, eshetab.com -rneristation.corn, meristation.com -kalahari.corn, kalahari.com -pirnpandhost.corn, pimpandhost.com -pbworks.corn, pbworks.com -bokee.net, bokee.net -google.ps, google.ps -seccionarnarilla.corn.rnx, seccionamarilla.com.mx -foroactivo.corn, foroactivo.com -kalaydo.de, kalaydo.de -gornaji.corn, gomaji.com -exactseek.corn, exactseek.com -cashtaller.ru, cashtaller.ru -blogspot.co.nz, blogspot.co.nz -volvocars.corn, volvocars.com -rnarathonbet.corn, marathonbet.com -hk-pub.corn, hk-pub.com -seriouslyfacts.rne, seriouslyfacts.me -streetdirectory.corn, streetdirectory.com -rnediarnasr.tv, mediamasr.tv -straitstirnes.corn, straitstimes.com -prornodj.corn, promodj.com -3dwwwgarne.corn, 3dwwwgame.com -autovit.ro, autovit.ro -ahlalhdeeth.corn, ahlalhdeeth.com -forurn-auto.corn, forum-auto.com -stooorage.corn, stooorage.com -rnobilisrn.org, mobilism.org -hideref.org, hideref.org -rnn66.corn, mn66.com -internations.org, internations.org -sbicard.corn, sbicard.com -dayoo.corn, dayoo.com -biquge.corn, biquge.com -therne.wordpress.corn, theme.wordpress.com -rnrdoob.corn, mrdoob.com -vpls.net, vpls.net -alqurna-a.corn, alquma-a.com -bankrnillenniurn.pl, bankmillennium.pl -rnitele.es, mitele.es -tro-rna-ktiko.blogspot.gr, tro-ma-ktiko.blogspot.gr -bookrnark4you.corn, bookmark4you.com -tencent.corn, tencent.com -bsi.ir, bsi.ir -fox.corn, fox.com -payback.de, payback.de -tubepornfilrn.corn, tubepornfilm.com -herold.at, herold.at -elperiodico.corn, elperiodico.com -lolesports.corn, lolesports.com -hrs.de, hrs.de -trustlink.ru, trustlink.ru -pricernachine.corn, pricemachine.com -socialadr.corn, socialadr.com -anandabazar.corn, anandabazar.com -jacquieetrnicheltv2.net, jacquieetmicheltv2.net -rnonster.de, monster.de -allposters.corn, allposters.com -blog.ir, blog.ir -ad4garne.corn, ad4game.com -alkislarlayasiyorurn.corn, alkislarlayasiyorum.com -ptcsolution.corn, ptcsolution.com -rnoviepilot.corn, moviepilot.com -ddizi.org, ddizi.org -drnzj.corn, dmzj.com -onvasortir.corn, onvasortir.com -ferronetwork.corn, ferronetwork.com -seagate.corn, seagate.com -starrnedia.corn, starmedia.com -topit.rne, topit.me -developpez.net, developpez.net -papajogos.corn.br, papajogos.com.br -btalah.corn, btalah.com -gateway.gov.uk, gateway.gov.uk -fotki.corn, fotki.com -holidaylettings.co.uk, holidaylettings.co.uk -rzeczpospolita.pl, rzeczpospolita.pl -charter97.org, charter97.org -robtex.corn, robtex.com -bestadbid.corn, bestadbid.com -unblog.fr, unblog.fr -archive.is, archive.is -rnicroworkers.corn, microworkers.com -vbulletin.org, vbulletin.org -jetswap.corn, jetswap.com -badoink.corn, badoink.com -adobeconnect.corn, adobeconnect.com -cutt.us, cutt.us -lovernake.biz, lovemake.biz -xpress.corn, xpress.com -di.se, di.se -jacquielawson.corn, jacquielawson.com -satl.de, sat1.de -adshuffle.corn, adshuffle.com -hornepage.corn.tr, homepage.com.tr -treehugger.corn, treehugger.com -selectornews.corn, selectornews.com -dap-news.corn, dap-news.com -tvline.corn, tvline.com -col88.corn, co188.com -bfrntv.corn, bfmtv.com -nastygal.corn, nastygal.com -cebupacificair.corn, cebupacificair.com -spr.ru, spr.ru -vazeh.corn, vazeh.com -worldrnarket.corn, worldmarket.com -arnericanlivewire.corn, americanlivewire.com -befunky.corn, befunky.com -rnovie2k.tl, movie2k.tl -coach.corn, coach.com -whattoexpect.corn, whattoexpect.com -share-online.biz, share-online.biz -fishwrapper.corn, fishwrapper.com -aktifhaber.corn, aktifhaber.com -downxsoft.corn, downxsoft.com -websurf.ru, websurf.ru -bbcgoodfood.corn, bbcgoodfood.com -france2.fr, france2.fr -gyakorikerdesek.hu, gyakorikerdesek.hu -lidovky.cz, lidovky.cz -thithtoolwin.info, thithtoolwin.info -psbc.corn, psbc.com -766.corn, 766.com -co-operativebank.co.uk, co-operativebank.co.uk -iwriter.corn, iwriter.com -bravotv.corn, bravotv.com -sbs.corn.au, sbs.com.au -dtiserv2.corn, dtiserv2.com -watchever.de, watchever.de -playhub.corn, playhub.com -globovision.corn, globovision.com -intereconornia.corn, intereconomia.com -poznan.pl, poznan.pl -cornicbookrnovie.corn, comicbookmovie.com -ocornico.net, ocomico.net -housetrip.corn, housetrip.com -freewebsubrnission.corn, freewebsubmission.com -karrnaloop.corn, karmaloop.com -savevid.corn, savevid.com -lastpass.corn, lastpass.com -yougou.corn, yougou.com -iafd.corn, iafd.com -casertex.corn, casertex.com -grnail.corn, gmail.com -rnodhoster.de, modhoster.de -post-gazette.corn, post-gazette.com -digikey.corn, digikey.com -torrentleech.org, torrentleech.org -starnps.corn, stamps.com -lifestyleinsights.org, lifestyleinsights.org -pandawill.corn, pandawill.com -wrn-panel.corn, wm-panel.com -urn-per.corn, um-per.com -straighttalk.corn, straighttalk.com -xpersonals.corn, xpersonals.com -bondfaro.corn.br, bondfaro.com.br -tvrage.corn, tvrage.com -rockongags.corn, rockongags.com -4jok.corn, 4jok.com -zoorn.corn.br, zoom.com.br -pixabay.corn, pixabay.com -path.corn, path.com -hiphopdx.corn, hiphopdx.com -ptbus.corn, ptbus.com -fussball.de, fussball.de -windows.net, windows.net -adweek.corn, adweek.com -kraftrecipes.corn, kraftrecipes.com -redtrarn.corn, redtram.com -youravon.corn, youravon.com -ladepeche.fr, ladepeche.fr -jiwu.corn, jiwu.com -hobbylobby.corn, hobbylobby.com -otzyv.ru, otzyv.ru -sky-fire.corn, sky-fire.com -fileguru.corn, fileguru.com -vandal.net, vandal.net -haozu.corn, haozu.com -laxtearns.net, laxteams.net -cpvtrack2O2.corn, cpvtrack202.com -libraryreserve.corn, libraryreserve.com -tvigle.ru, tvigle.ru -hoopshype.corn, hoopshype.com -worldcat.org, worldcat.org -eventful.corn, eventful.com -nettiauto.corn, nettiauto.com -generalfiles.org, generalfiles.org -ojooo.corn, ojooo.com -thatisnotasport.corn, thatisnotasport.com -thepioneerwornan.corn, thepioneerwoman.com -social-bookrnarking.net, social-bookmarking.net -lookforithere.info, lookforithere.info -arnericanapparel.net, americanapparel.net -protv.ro, protv.ro -jeux-gratuits.corn, jeux-gratuits.com -tornoson.corn, tomoson.com -jpn.org, jpn.org -cpz.to, cpz.to -vrisko.gr, vrisko.gr -cbox.ws, cbox.ws -vandelaydesign.corn, vandelaydesign.com -rnacrnillandictionary.corn, macmillandictionary.com -eventure.corn, eventure.com -niniweblog.corn, niniweblog.com -ecwid.corn, ecwid.com -garuda-indonesia.corn, garuda-indonesia.com -education.corn, education.com -natalie.rnu, natalie.mu -gigsandfestivals.co.uk, gigsandfestivals.co.uk -onlainfilrn.ucoz.ua, onlainfilm.ucoz.ua -hotwords.corn, hotwords.com -jagobd.corn, jagobd.com -pageset.corn, pageset.com -sagepay.corn, sagepay.com -runkeeper.corn, runkeeper.com -beeztube.corn, beeztube.com -pinla.corn, pinla.com -blizzard.corn, blizzard.com -unc.edu, unc.edu -rnakernernarvellous.corn, makememarvellous.com -wer-weiss-was.de, wer-weiss-was.de -ubc.ca, ubc.ca -utoronto.ca, utoronto.ca -avsforurn.corn, avsforum.com -newrelic.corn, newrelic.com -orkut.co.in, orkut.co.in -wawa-rnania.ec, wawa-mania.ec -ncsu.edu, ncsu.edu -redhat.corn, redhat.com -nsdl.co.in, nsdl.co.in -lavoz.corn.ar, lavoz.com.ar -navy.rnil, navy.mil -rng.gov.br, mg.gov.br -psychcentral.corn, psychcentral.com -ultipro.corn, ultipro.com -unisa.ac.za, unisa.ac.za -sooperarticles.corn, sooperarticles.com -wondershare.corn, wondershare.com -wholefoodsrnarket.corn, wholefoodsmarket.com -durnpaday.corn, dumpaday.com -littlewoods.corn, littlewoods.com -carscorn.net, carscom.net -rneitu.corn, meitu.com -9lwan.corn, 9lwan.com -ernailrneforrn.corn, emailmeform.com -arte.tv, arte.tv -tribalfootball.corn, tribalfootball.com -howtoforge.corn, howtoforge.com -cvent.corn, cvent.com -fujitsu.corn, fujitsu.com -silvergarnes.corn, silvergames.com -fatlossfactor.corn, fatlossfactor.com -nusport.nl, nusport.nl -todol.corn, todo1.com -see-tube.corn, see-tube.com -lolspots.corn, lolspots.com -sucksex.corn, sucksex.com -encontreinarede.corn, encontreinarede.com -rnyarabylinks.corn, myarabylinks.com -v-39.net, v-39.net -soornpi.corn, soompi.com -rnltdb.corn, mltdb.com -websitetonight.corn, websitetonight.com -bu.edu, bu.edu -lazada.co.th, lazada.co.th -rnature-rnoney.corn, mature-money.com -sirnplernachines.org, simplemachines.org -tnt-online.ru, tnt-online.ru -disput.az, disput.az -flirtcafe.de, flirtcafe.de -dlnet.corn, d1net.com -infoplease.corn, infoplease.com -unseenirnages.co.in, unseenimages.co.in -downloadatoz.corn, downloadatoz.com -norwegian.corn, norwegian.com -youtradefx.corn, youtradefx.com -petapixel.corn, petapixel.com -bytes.corn, bytes.com -ht.ly, ht.ly -jobberrnan.corn, jobberman.com -xenforo.corn, xenforo.com -pornponik.pl, pomponik.pl -siarnbit.org, siambit.org -twoplustwo.corn, twoplustwo.com -videoslasher.corn, videoslasher.com -onvista.de, onvista.de -canstockphoto.corn, canstockphoto.com -cash4flirt.corn, cash4flirt.com -flashgarnes.it, flashgames.it -xxxdessert.corn, xxxdessert.com -cda.pl, cda.pl -costco.ca, costco.ca -elnuevodiario.corn.ni, elnuevodiario.com.ni -svtplay.se, svtplay.se -ftc.gov, ftc.gov -supersonicads.corn, supersonicads.com -openstreetrnap.org, openstreetmap.org -chinarnobile.corn, chinamobile.com -fastspring.corn, fastspring.com -rncdonalds.corn, mcdonalds.com -egloos.corn, egloos.com -rnouser.corn, mouser.com -livernook.corn, livemook.com -woxiu.corn, woxiu.com -pingler.corn, pingler.com -ruelsoft.org, ruelsoft.org -krone.at, krone.at -internetbookshop.it, internetbookshop.it -alibaba-inc.corn, alibaba-inc.com -kirnsufi.corn, kimsufi.com -surnrnitracing.corn, summitracing.com -parsfootball.corn, parsfootball.com -standard.co.uk, standard.co.uk -photoblog.pl, photoblog.pl -bicaps.corn, bicaps.com -digitalplayground.corn, digitalplayground.com -zerochan.net, zerochan.net -whosay.corn, whosay.com -qualityseek.org, qualityseek.org -say7.info, say7.info -rs.gov.br, rs.gov.br -google.co.rnz, google.co.mz -yourlustrnovies.corn, yourlustmovies.com -zalando.nl, zalando.nl -jn.pt, jn.pt -hornebase.co.uk, homebase.co.uk -avis.corn, avis.com -healthboards.corn, healthboards.com -filrnizlesene.corn.tr, filmizlesene.com.tr -shoutcast.corn, shoutcast.com -indiafreestuff.in, indiafreestuff.in -avval.ir, avval.ir -garningwonderland.corn, gamingwonderland.com -adage.corn, adage.com -asu.edu, asu.edu -frorna.corn, froma.com -bezuzyteczna.pl, bezuzyteczna.pl -workopolis.corn, workopolis.com -extranetinvestrnent.corn, extranetinvestment.com -lablue.de, lablue.de -geotauaisay.corn, geotauaisay.com -bestchange.ru, bestchange.ru -ptp22.corn, ptp22.com -tehparadox.corn, tehparadox.com -ox.ac.uk, ox.ac.uk -radaris.corn, radaris.com -dorndigger.corn, domdigger.com -lizads.corn, lizads.com -chatvl.corn, chatvl.com -elle.corn, elle.com -soloaqui.es, soloaqui.es -tubejuggs.corn, tubejuggs.com -jsonline.corn, jsonline.com -ut.ac.ir, ut.ac.ir -iitv.info, iitv.info -runetki.tv, runetki.tv -hyundai.corn, hyundai.com -turkiye.gov.tr, turkiye.gov.tr -jobstreet.corn.sg, jobstreet.com.sg -jp-sex.corn, jp-sex.com -soccer.ru, soccer.ru -slashfilrn.corn, slashfilm.com -couchtuner.eu, couchtuner.eu -quanfan.corn, quanfan.com -porsche.corn, porsche.com -craftsy.corn, craftsy.com -geizhals.at, geizhals.at -spartoo.it, spartoo.it -yxku.corn, yxku.com -vodonet.net, vodonet.net -photo.net, photo.net -raiffeisen.ru, raiffeisen.ru -tablotala.corn, tablotala.com -theaa.corn, theaa.com -idownloadblog.corn, idownloadblog.com -rodfile.corn, rodfile.com -alabout.corn, alabout.com -flnews.ru, f1news.ru -divxstage.eu, divxstage.eu -itusozluk.corn, itusozluk.com -hicdrna.corn, hicdma.com -dota2lounge.corn, dota2lounge.com -greensrnut.corn, greensmut.com -bharatiyarnobile.corn, bharatiyamobile.com -handycafe.corn, handycafe.com -regarder-filrn-gratuit.corn, regarder-film-gratuit.com -adultgeek.net, adultgeek.net -yintai.corn, yintai.com -brasilescola.corn, brasilescola.com -verisign.corn, verisign.com -dnslink.corn, dnslink.com -standaard.be, standaard.be -cbengine.corn, cbengine.com -pchealthboost.corn, pchealthboost.com -dealdey.corn, dealdey.com -cnnturk.corn, cnnturk.com -trutv.corn, trutv.com -tahrirnews.corn, tahrirnews.com -getit.in, getit.in -jqueryrnobile.corn, jquerymobile.com -girlgarnes.corn, girlgames.com -alhayat.corn, alhayat.com -ilpvideo.corn, ilpvideo.com -stihi.ru, stihi.ru -skyscanner.ru, skyscanner.ru -jarnejarnonline.ir, jamejamonline.ir -t3n.de, t3n.de -rent.corn, rent.com -telerik.corn, telerik.com -tandfonline.corn, tandfonline.com -argonas.corn, argonas.com -ludokado.corn, ludokado.com -luvgag.corn, luvgag.com -rnyspongebob.ru, myspongebob.ru -z5x.net, z5x.net -allhyiprnon.ru, allhyipmon.ru -fanswong.corn, fanswong.com -oddee.corn, oddee.com -guoli.corn, guoli.com -wpzoorn.corn, wpzoom.com -2gheroon.corn, 2gheroon.com -artisteer.corn, artisteer.com -share-links.biz, share-links.biz -flightstats.corn, flightstats.com -wisegeek.org, wisegeek.org -shuangtv.net, shuangtv.net -rnylikes.corn, mylikes.com -OzzO.corn, 0zz0.com -xiu.corn, xiu.com -pornizle69.corn, pornizle69.com -sendgrid.corn, sendgrid.com -theweek.corn, theweek.com -veetle.corn, veetle.com -theanirnalrescuesite.corn, theanimalrescuesite.com -sears.ca, sears.ca -tianpin.corn, tianpin.com -thisdaylive.corn, thisdaylive.com -rnyfunlife.corn, myfunlife.com -furaffinity.net, furaffinity.net -politiken.dk, politiken.dk -youwatch.org, youwatch.org -lesoir.be, lesoir.be -toyokeizai.net, toyokeizai.net -centos.org, centos.org -sunnyplayer.corn, sunnyplayer.com -knuddels.de, knuddels.de -rnturk.corn, mturk.com -egyrnodern.corn, egymodern.com -sernprot.corn, semprot.com -rnonsterhigh.corn, monsterhigh.com -kornpass.corn, kompass.com -olx.corn.ve, olx.com.ve -hq-xnxx.corn, hq-xnxx.com -whorush.corn, whorush.com -bongdaso.corn, bongdaso.com -centrelink.gov.au, centrelink.gov.au -folha.corn.br, folha.com.br -getjetso.corn, getjetso.com -ycornbinator.corn, ycombinator.com -chouti.corn, chouti.com -33lc.corn, 33lc.com -hostgator.corn.br, hostgator.com.br -ernirates247.corn, emirates247.com -itpub.net, itpub.net -fsyrnbols.corn, fsymbols.com -bestproducttesters.corn, bestproducttesters.com -daodao.corn, daodao.com -virtuernart.net, virtuemart.net -hindilinks4u.net, hindilinks4u.net -nnrn.rne, nnm.me -xplocial.corn, xplocial.com -apartrnents.corn, apartments.com -ekolay.net, ekolay.net -doviz.corn, doviz.com -flixya.corn, flixya.com -3alrnthqafa.corn, 3almthqafa.com -zarnalekfans.corn, zamalekfans.com -irneigu.corn, imeigu.com -wikibit.net, wikibit.net -windstrearn.net, windstream.net -rnatichon.co.th, matichon.co.th -appshopper.corn, appshopper.com -socialbakers.corn, socialbakers.com -lpopov.ru, 1popov.ru -blikk.hu, blikk.hu -bdrl3O.net, bdr130.net -arizona.edu, arizona.edu -rnadhyarnarn.corn, madhyamam.com -rnweb.co.za, mweb.co.za -affiliates.de, affiliates.de -ebs.in, ebs.in -bestgfx.corn, bestgfx.com -share-garnes.corn, share-games.com -inforrnador.corn.rnx, informador.com.mx -jobsite.co.uk, jobsite.co.uk -carters.corn, carters.com -kinghost.net, kinghost.net -usl.corn, us1.com -archives.corn, archives.com -forosdelweb.corn, forosdelweb.com -siteslike.corn, siteslike.com -thedailyshow.corn, thedailyshow.com -68design.net, 68design.net -irntalk.org, imtalk.org -visualwebsiteoptirnizer.corn, visualwebsiteoptimizer.com -glarysoft.corn, glarysoft.com -xhby.net, xhby.net -ernail.cz, email.cz -arnateurs-gone-wild.corn, amateurs-gone-wild.com -davidwalsh.narne, davidwalsh.name -finalfantasyxiv.corn, finalfantasyxiv.com -aa.corn.tr, aa.com.tr -legalzoorn.corn, legalzoom.com -lifehack.org, lifehack.org -rnca.gov.in, mca.gov.in -hidrvids.corn, hidrvids.com -key.corn, key.com -thurnbtack.corn, thumbtack.com -nujij.nl, nujij.nl -cinetux.org, cinetux.org -hrnetro.corn.rny, hmetro.com.my -ignou.ac.in, ignou.ac.in -affilorarna.corn, affilorama.com -pokernon.corn, pokemon.com -sportsnewsinternational.corn, sportsnewsinternational.com -geek.corn, geek.com -larepublica.pe, larepublica.pe -europacasino.corn, europacasino.com -ok-porn.corn, ok-porn.com -tutorialzine.corn, tutorialzine.com -google.corn.bn, google.com.bn -site5.corn, site5.com -trafficjunky.net, trafficjunky.net -xueqiu.corn, xueqiu.com -yournewscorner.corn, yournewscorner.com -rnetrotvnews.corn, metrotvnews.com -nichegalz.corn, nichegalz.com -job.corn, job.com -koirnoi.corn, koimoi.com -questionablecontent.net, questionablecontent.net -volaris.rnx, volaris.mx -rakuten.de, rakuten.de -cyworld.corn, cyworld.com -yudu.corn, yudu.com -zakon.kz, zakon.kz -rnsi.corn, msi.com -darkxxxtube.corn, darkxxxtube.com -sarnakal.net, samakal.net -appstorrn.net, appstorm.net -vulture.corn, vulture.com -racingpost.corn, racingpost.com -classicrurnrny.corn, classicrummy.com -iegallery.corn, iegallery.com -cinernagia.ro, cinemagia.ro -nullpoantenna.corn, nullpoantenna.com -ihned.cz, ihned.cz -vdolady.corn, vdolady.com -babes.corn, babes.com -kornli.corn, komli.com -asianbeauties.corn, asianbeauties.com -onedate.corn, onedate.com -adhitz.corn, adhitz.com -jjgirls.corn, jjgirls.com -dot.tk, dot.tk -autobild.de, autobild.de -jobs-to-careers.corn, jobs-to-careers.com -rnovietickets.corn, movietickets.com -net4.in, net4.in -crutchfield.corn, crutchfield.com -subdivx.corn, subdivx.com -sirarcade.corn, sirarcade.com -sitescoutadserver.corn, sitescoutadserver.com -fantasy-rivals.corn, fantasy-rivals.com -chegg.corn, chegg.com -sportsrnansguide.corn, sportsmansguide.com -extrernetech.corn, extremetech.com -loft.corn, loft.com -dirtyarnateurtube.corn, dirtyamateurtube.com -socialsex.biz, socialsex.biz -opensubtitles.us, opensubtitles.us -infornoney.corn.br, infomoney.com.br -openstat.ru, openstat.ru -adlandpro.corn, adlandpro.com -trivago.de, trivago.de -feiren.corn, feiren.com -lespac.corn, lespac.com -iceporn.corn, iceporn.com -anirnehere.corn, animehere.com -klix.ba, klix.ba -elitepvpers.corn, elitepvpers.com -rnrconservative.corn, mrconservative.com -tarnu.edu, tamu.edu -startv.corn.tr, startv.com.tr -haberl9O3.corn, haber1903.com -apa.tv, apa.tv -idbi.corn, idbi.com -golfchannel.corn, golfchannel.com -pep.ph, pep.ph -toukoucity.to, toukoucity.to -ernpirernoney.corn, empiremoney.com -androidauthority.corn, androidauthority.com -ref4bux.corn, ref4bux.com -digitaljournal.corn, digitaljournal.com -sporcle.corn, sporcle.com -bzwbk.pl, bzwbk.pl -lalarnao.corn, lalamao.com -ziare.corn, ziare.com -cliti.corn, cliti.com -thatguywiththeglasses.corn, thatguywiththeglasses.com -vodu.ch, vodu.ch -ycwb.corn, ycwb.com -bls.gov, bls.gov -ltubenews.corn, 1tubenews.com -cl.ly, cl.ly -ing.be, ing.be -bitterstrawberry.corn, bitterstrawberry.com -fubar.corn, fubar.com -arabic-keyboard.org, arabic-keyboard.org -rnejortorrent.corn, mejortorrent.com -trendrnicro.corn, trendmicro.com -ap7arn.corn, ap7am.com -windowsazure.corn, windowsazure.com -q8yat.corn, q8yat.com -yyv.co, yyv.co -tvoy-start.corn, tvoy-start.com -creativetoolbars.corn, creativetoolbars.com -forrent.corn, forrent.com -rnlstatic.corn, mlstatic.com -like4like.org, like4like.org -alpha.gr, alpha.gr -arnkey.net, amkey.net -iwiw.hu, iwiw.hu -routard.corn, routard.com -teacherspayteachers.corn, teacherspayteachers.com -ahashare.corn, ahashare.com -ultoo.corn, ultoo.com -oakley.corn, oakley.com -upforit.corn, upforit.com -trafficbee.corn, trafficbee.com -rnonster.co.uk, monster.co.uk -boulanger.fr, boulanger.fr -bloglines.corn, bloglines.com -wdc.corn, wdc.com -el-nacional.corn, el-nacional.com -bloggertipstricks.corn, bloggertipstricks.com -oreillyauto.corn, oreillyauto.com -hotpads.corn, hotpads.com -tubexvideo.corn, tubexvideo.com -rnudainodocurnent.corn, mudainodocument.com -discoverpedia.info, discoverpedia.info -noobteens.corn, noobteens.com -shockrnansion.corn, shockmansion.com -qudsonline.ir, qudsonline.ir -rnec.es, mec.es -vt.edu, vt.edu -akelite.corn, akelite.com -travelandleisure.corn, travelandleisure.com -sunnewsonline.corn, sunnewsonline.com -tok2.corn, tok2.com -truste.org, truste.org -2dehands.be, 2dehands.be -hf365.corn, hf365.com -westelrn.corn, westelm.com -real.gr, real.gr -downloadrning.rne, downloadming.me -citrornail.hu, citromail.hu -fotocornrnunity.de, fotocommunity.de -zapjuegos.corn, zapjuegos.com -aastocks.corn, aastocks.com -unb.br, unb.br -adchakra.net, adchakra.net -check24.de, check24.de -vidto.rne, vidto.me -peekyou.corn, peekyou.com -urssaf.fr, urssaf.fr -alixixi.corn, alixixi.com -winarnp.corn, winamp.com -xianguo.corn, xianguo.com -indiasextube.net, indiasextube.net -fitnea.corn, fitnea.com -telernundo.corn, telemundo.com -webnode.cz, webnode.cz -kliksaya.corn, kliksaya.com -wikileaks.org, wikileaks.org -rnyblog.it, myblog.it -99wed.corn, 99wed.com -adorika.corn, adorika.com -siliconrus.corn, siliconrus.com -dealrnoon.corn, dealmoon.com -ricanadfunds.corn, ricanadfunds.com -vietcornbank.corn.vn, vietcombank.com.vn -chernistry.corn, chemistry.com -reisen.de, reisen.de -torlock.corn, torlock.com -wsop.corn, wsop.com -travian.co.id, travian.co.id -ipoll.corn, ipoll.com -bpiexpressonline.corn, bpiexpressonline.com -neeu.corn, neeu.com -beyondtherack.corn, beyondtherack.com -blueidea.corn, blueidea.com -tedata.net, tedata.net -garnesradar.corn, gamesradar.com -big.az, big.az -h-douga.net, h-douga.net -runnersworld.corn, runnersworld.com -lurnfile.corn, lumfile.com -ul7.corn, u17.com -badjojo.corn, badjojo.com -nginx.org, nginx.org -filrnfanatic.corn, filmfanatic.com -filrney.corn, filmey.com -rnousebreaker.corn, mousebreaker.com -rnihanstore.net, mihanstore.net -sharebuilder.corn, sharebuilder.com -cnhan.corn, cnhan.com -partnerwithtorn.corn, partnerwithtom.com -synonyrn.corn, synonym.com -areaconnect.corn, areaconnect.com -one.lt, one.lt -rnp3quran.net, mp3quran.net -anz.co.nz, anz.co.nz -buyincoins.corn, buyincoins.com -surfline.corn, surfline.com -packtpub.corn, packtpub.com -inforrne2l.corn, informe21.com -d4OOO.corn, d4000.com -blog.cz, blog.cz -rnyredbook.corn, myredbook.com -seslisozluk.net, seslisozluk.net -sirnple2advertise.corn, simple2advertise.com -bookit.corn, bookit.com -eranico.corn, eranico.com -pakwheels.corn, pakwheels.com -x-rates.corn, x-rates.com -ilrnatieteenlaitos.fi, ilmatieteenlaitos.fi -vozforurns.corn, vozforums.com -galerieslafayette.corn, galerieslafayette.com -trafficswirl.corn, trafficswirl.com -rnql4.corn, mql4.com -torontosun.corn, torontosun.com -lebuteur.corn, lebuteur.com -cruisecritic.corn, cruisecritic.com -rateyourrnusic.corn, rateyourmusic.com -binsearch.info, binsearch.info -nrj.fr, nrj.fr -rnegaflix.net, megaflix.net -dosug.cz, dosug.cz -stop55.corn, stop55.com -qqnz.corn, qqnz.com -ibuonline.corn, ibuonline.com -jobego.corn, jobego.com -euro.corn.pl, euro.com.pl -quran.corn, quran.com -adl.ru, ad1.ru -avaz.ba, avaz.ba -eloqua.corn, eloqua.com -educationconnection.corn, educationconnection.com -dbank.corn, dbank.com -whois.sc, whois.sc -yournob.corn, youmob.com -lOlgreatgoals.corn, 101greatgoals.com -livefyre.corn, livefyre.com -sextubebox.corn, sextubebox.com -shooshtirne.corn, shooshtime.com -tapuz.co.il, tapuz.co.il -auchan.fr, auchan.fr -pinkvilla.corn, pinkvilla.com -perspolisnews.corn, perspolisnews.com -scholastic.corn, scholastic.com -google.rnu, google.mu -forex4you.org, forex4you.org -rnandtbank.corn, mandtbank.com -gnezdo.ru, gnezdo.ru -lulu.corn, lulu.com -anniezhang.corn, anniezhang.com -bharian.corn.rny, bharian.com.my -cornprafacil.corn.br, comprafacil.com.br -rnrnafighting.corn, mmafighting.com -autotrader.ca, autotrader.ca -vectorstock.corn, vectorstock.com -convio.corn, convio.com -ktunnel.corn, ktunnel.com -hbs.edu, hbs.edu -rnindspark.corn, mindspark.com -trovit.corn.rnx, trovit.com.mx -thornsonreuters.corn, thomsonreuters.com -yupptv.corn, yupptv.com -fullsail.edu, fullsail.edu -perfectworld.eu, perfectworld.eu -ju5l.corn, ju51.com -newssnip.corn, newssnip.com -livernocha.corn, livemocha.com -nespresso.corn, nespresso.com -uinvest.corn.ua, uinvest.com.ua -yazete.corn, yazete.com -rnalaysiaairlines.corn, malaysiaairlines.com -clikseguro.corn, clikseguro.com -rnarksdailyapple.corn, marksdailyapple.com -topnewsquick.corn, topnewsquick.com -ikyu.corn, ikyu.com -rnydocorno.corn, mydocomo.com -tarnpabay.corn, tampabay.com -rno.gov, mo.gov -oxfordjournals.org, oxfordjournals.org -rnanageyourloans.corn, manageyourloans.com -couponcabin.corn, couponcabin.com -rnrrnlsrnatrix.corn, mrmlsmatrix.com -knowd.corn, knowd.com -ladbrokes.corn, ladbrokes.com -ikoo.corn, ikoo.com -devhub.corn, devhub.com -dropjack.corn, dropjack.com -sadistic.pl, sadistic.pl -8cornic.corn, 8comic.com -optirnizepress.corn, optimizepress.com -ofweek.corn, ofweek.com -donya-e-eqtesad.corn, donya-e-eqtesad.com -arabarn.corn, arabam.com -playtv.fr, playtv.fr -yourtv.corn.au, yourtv.com.au -tearntalk.corn, teamtalk.com -createsend.corn, createsend.com -bitcointalk.org, bitcointalk.org -rnicrocenter.corn, microcenter.com -arcadeprehacks.corn, arcadeprehacks.com -sublirnetext.corn, sublimetext.com -posindonesia.co.id, posindonesia.co.id -payrnaster.ru, paymaster.ru -ncore.cc, ncore.cc -wikisource.org, wikisource.org -notebooksbilliger.de, notebooksbilliger.de -nayakhabar.corn, nayakhabar.com -tirn.corn.br, tim.com.br -leggo.it, leggo.it -swoodoo.corn, swoodoo.com -perfectgirls.es, perfectgirls.es -beautystyleliving.corn, beautystyleliving.com -xrnaduras.corn, xmaduras.com -e-shop.gr, e-shop.gr -belastingdienst.nl, belastingdienst.nl -urbia.de, urbia.de -lovoo.net, lovoo.net -citizensbank.corn, citizensbank.com -gulesider.no, gulesider.no -zhongsou.net, zhongsou.net -cinernablend.corn, cinemablend.com -joydownload.corn, joydownload.com -telkorn.co.id, telkom.co.id -nangaspace.corn, nangaspace.com -panerabread.corn, panerabread.com -cinechest.corn, cinechest.com -flixjunky.corn, flixjunky.com -berlinl.de, berlin1.de -tabonito.pt, tabonito.pt -snob.ru, snob.ru -audiovkontakte.ru, audiovkontakte.ru -linuxrnint.corn, linuxmint.com -freshdesk.corn, freshdesk.com -professionali.ru, professionali.ru -prirnelocation.corn, primelocation.com -fernina.hu, femina.hu -jecontacte.corn, jecontacte.com -celebritytoob.corn, celebritytoob.com -strearniz-filrnze.corn, streamiz-filmze.com -l-tike.corn, l-tike.com -collegeconfidential.corn, collegeconfidential.com -hafiz.gov.sa, hafiz.gov.sa -rnega-porno.ru, mega-porno.ru -ivoox.corn, ivoox.com -lrngtfy.corn, lmgtfy.com -pclab.pl, pclab.pl -preisvergleich.de, preisvergleich.de -weeb.tv, weeb.tv -tnews.ir, tnews.ir -wwtdd.corn, wwtdd.com -totalfilrn.corn, totalfilm.com -girlfriendvideos.corn, girlfriendvideos.com -wgt.corn, wgt.com -iu.edu, iu.edu -topictorch.corn, topictorch.com -wenweipo.corn, wenweipo.com -duitang.corn, duitang.com -rnadrid.org, madrid.org -retrogarner.corn, retrogamer.com -pantheranetwork.corn, pantheranetwork.com -sorneecards.corn, someecards.com -visafone.corn.ng, visafone.com.ng -infopraca.pl, infopraca.pl -nrelate.corn, nrelate.com -sia.az, sia.az -wallbase.cc, wallbase.cc -shareflare.net, shareflare.net -sarnrnydress.corn, sammydress.com -goldesel.to, goldesel.to -thefiscaltirnes.corn, thefiscaltimes.com -freelogoservices.corn, freelogoservices.com -dealigg.corn, dealigg.com -babypips.corn, babypips.com -diynetwork.corn, diynetwork.com -porn99.net, porn99.net -skynewsarabia.corn, skynewsarabia.com -eweb4.corn, eweb4.com -fedoraproject.org, fedoraproject.org -nolo.corn, nolo.com -rnegabus.corn, megabus.com -fao.org, fao.org -arn.ru, am.ru -sportowefakty.pl, sportowefakty.pl -kidstaff.corn.ua, kidstaff.com.ua -jhu.edu, jhu.edu -which.co.uk, which.co.uk -sextubehd.xxx, sextubehd.xxx -swansonvitarnins.corn, swansonvitamins.com -iran-eng.corn, iran-eng.com -fakenarnegenerator.corn, fakenamegenerator.com -gosong.net, gosong.net -24open.ru, 24open.ru -l23sdfsdfsdfsd.ru, 123sdfsdfsdfsd.ru -gotgayporn.corn, gotgayporn.com -casadellibro.corn, casadellibro.com -ixwebhosting.corn, ixwebhosting.com -buyorbury.corn, buyorbury.com -getglue.corn, getglue.com -86432l.corn, 864321.com -alivv.corn, alivv.com -cornpetitor.corn, competitor.com -iheirna.corn, iheima.com -subrnarinoviagens.corn.br, submarinoviagens.com.br -ernailsrvr.corn, emailsrvr.com -udacity.corn, udacity.com -rncafeesecure.corn, mcafeesecure.com -laposte.fr, laposte.fr -ppy.sh, ppy.sh -rurnah.corn, rumah.com -pullbear.corn, pullbear.com -pkt.pl, pkt.pl -jayde.corn, jayde.com -rnyjoyonline.corn, myjoyonline.com -locopengu.corn, locopengu.com -vsnl.net.in, vsnl.net.in -hornbunny.corn, hornbunny.com -royalcaribbean.corn, royalcaribbean.com -football.ua, football.ua -thaifriendly.corn, thaifriendly.com -bankofthewest.corn, bankofthewest.com -indianprice.corn, indianprice.com -chodientu.vn, chodientu.vn -alison.corn, alison.com -eveonline.corn, eveonline.com -blogg.se, blogg.se -jetairways.corn, jetairways.com -larousse.fr, larousse.fr -noticierodigital.corn, noticierodigital.com -rnkfst.corn, mkfst.com -anyfiledownloader.corn, anyfiledownloader.com -tirarnillas.net, tiramillas.net -telus.corn, telus.com -paperblog.corn, paperblog.com -songsterr.corn, songsterr.com -entrernujeres.corn, entremujeres.com -startsiden.no, startsiden.no -hotspotshield.corn, hotspotshield.com -hosteurope.de, hosteurope.de -ebags.corn, ebags.com -eenadupratibha.net, eenadupratibha.net -uppit.corn, uppit.com -piaohua.corn, piaohua.com -xxxyrnovies.corn, xxxymovies.com -netbarg.corn, netbarg.com -chip.corn.tr, chip.com.tr -xl.co.id, xl.co.id -kowalskypage.corn, kowalskypage.com -afterdawn.corn, afterdawn.com -locanto.corn, locanto.com -liilas.corn, liilas.com -superboy.corn, superboy.com -indiavisiontv.corn, indiavisiontv.com -ixquick.corn, ixquick.com -hoteliurn.corn, hotelium.com -twsela.corn, twsela.com -newsrneback.corn, newsmeback.com -perfectliving.corn, perfectliving.com -laughingsquid.corn, laughingsquid.com -designboorn.corn, designboom.com -zigil.ir, zigil.ir -coachfactory.corn, coachfactory.com -kaboodle.corn, kaboodle.com -fastrnail.frn, fastmail.fm -threadless.corn, threadless.com -wiseconvert.corn, wiseconvert.com -br.de, br.de -prornovacances.corn, promovacances.com -wrzuta.pl, wrzuta.pl -frorndoctopdf.corn, fromdoctopdf.com -ono.es, ono.es -zinio.corn, zinio.com -netcoc.corn, netcoc.com -eanswers.corn, eanswers.com -wallst.corn, wallst.com -ipiccy.corn, ipiccy.com -fastweb.it, fastweb.it -kaufrnich.corn, kaufmich.com -groupon.co.za, groupon.co.za -cyzo.corn, cyzo.com -addic7ed.corn, addic7ed.com -alintibaha.net, alintibaha.net -indiewire.corn, indiewire.com -needforspeed.corn, needforspeed.com -e24.no, e24.no -hupso.corn, hupso.com -kathirnerini.gr, kathimerini.gr -worldoffiles.net, worldoffiles.net -express.pk, express.pk -wieszjak.pl, wieszjak.pl -rnobile.bg, mobile.bg -subway.corn, subway.com -akhbarelyorn.corn, akhbarelyom.com -thisoldhouse.corn, thisoldhouse.com -autoevolution.corn, autoevolution.com -public-api.wordpress.corn, public-api.wordpress.com -airarabia.corn, airarabia.com -powerball.corn, powerball.com -visa.corn, visa.com -gendai.net, gendai.net -gyrnboree.corn, gymboree.com -tvp.pl, tvp.pl -sinhayasocialreader.corn, sinhayasocialreader.com -a963.corn, a963.com -garngos.ae, gamgos.ae -fx678.corn, fx678.com -rnp3round.corn, mp3round.com -kornonews.corn, komonews.com -contactcars.corn, contactcars.com -pdftoword.corn, pdftoword.com -songtaste.corn, songtaste.com -squareup.corn, squareup.com -newsevent24.corn, newsevent24.com -livestation.corn, livestation.com -oldertube.corn, oldertube.com -rtl.fr, rtl.fr -gather.corn, gather.com -liderendeportes.corn, liderendeportes.com -thewrap.corn, thewrap.com -viber.corn, viber.com -reklarna5.rnk, reklama5.mk -fonts.corn, fonts.com -hrsaccount.corn, hrsaccount.com -bizcornrnunity.corn, bizcommunity.com -favicon.cc, favicon.cc -totalping.corn, totalping.com -live365.corn, live365.com -tlife.gr, tlife.gr -irnasters.corn.br, imasters.com.br -nll.corn, n11.com -iarn.rna, iam.ma -qq5.corn, qq5.com -tvboxnow.corn, tvboxnow.com -lirnetorrents.corn, limetorrents.com -bancopopular.es, bancopopular.es -ray-ban.corn, ray-ban.com -drweb.corn, drweb.com -hushrnail.corn, hushmail.com -resuelvetudeuda.corn, resuelvetudeuda.com -sharpnews.ru, sharpnews.ru -hellocoton.fr, hellocoton.fr -buysub.corn, buysub.com -hornernoviestube.corn, homemoviestube.com -utsandiego.corn, utsandiego.com -learn4good.corn, learn4good.com -girlsgogarnes.ru, girlsgogames.ru -talksport.co.uk, talksport.co.uk -fap.to, fap.to -teennick.corn, teennick.com -seitwert.de, seitwert.de -celebrityrnoviearchive.corn, celebritymoviearchive.com -sukar.corn, sukar.com -astrorneridian.ru, astromeridian.ru -zen-cart.corn, zen-cart.com -lphads.corn, 1phads.com -plaisio.gr, plaisio.gr -cplusplus.corn, cplusplus.com -ewebse.corn, ewebse.com -6eat.corn, 6eat.com -payless.corn, payless.com -subaonet.corn, subaonet.com -dlisted.corn, dlisted.com -kia.corn, kia.com -lankahotnews.net, lankahotnews.net -vg247.corn, vg247.com -forrnstack.corn, formstack.com -jobs.net, jobs.net -coolchaser.corn, coolchaser.com -blackplanet.corn, blackplanet.com -unionbank.corn, unionbank.com -record.corn.rnx, record.com.mx -l2lware.corn, 121ware.com -inkfrog.corn, inkfrog.com -cnstock.corn, cnstock.com -rnarineaquariurnfree.corn, marineaquariumfree.com -encuentra24.corn, encuentra24.com -rnixturecloud.corn, mixturecloud.com -yninfo.corn, yninfo.com -lesnurneriques.corn, lesnumeriques.com -autopartswarehouse.corn, autopartswarehouse.com -lijit.corn, lijit.com -ti.corn, ti.com -urnd.edu, umd.edu -zdnet.co.uk, zdnet.co.uk -begin-download.corn, begin-download.com -showsiteinfo.us, showsiteinfo.us -uchicago.edu, uchicago.edu -whatsrnyserp.corn, whatsmyserp.com -asos.fr, asos.fr -ibosocial.corn, ibosocial.com -arnorenlinea.corn, amorenlinea.com -videoprerniurn.tv, videopremium.tv -trkjrnp.corn, trkjmp.com -creativecow.net, creativecow.net -webartex.ru, webartex.ru -olx.corn.ng, olx.com.ng -overclockzone.corn, overclockzone.com -rongbay.corn, rongbay.com -rnaxirnustube.corn, maximustube.com -priberarn.pt, priberam.pt -cornsenz.corn, comsenz.com -prensaescrita.corn, prensaescrita.com -garneslist.corn, gameslist.com -lingualeo.corn, lingualeo.com -epfoservices.in, epfoservices.in -webbirga.net, webbirga.net -pb.corn, pb.com -fineco.it, fineco.it -highrisehq.corn, highrisehq.com -hotgoo.corn, hotgoo.com -netdoctor.co.uk, netdoctor.co.uk -dornain.corn, domain.com -ararnex.corn, aramex.com -google.co.uz, google.co.uz -savings.corn, savings.com -airtelbroadband.in, airtelbroadband.in -postirnees.ee, postimees.ee -wallsave.corn, wallsave.com -df.gob.rnx, df.gob.mx -flashgarnes247.corn, flashgames247.com -libsyn.corn, libsyn.com -goobike.corn, goobike.com -trivago.corn, trivago.com -android-hilfe.de, android-hilfe.de -anquan.org, anquan.org -dota2.corn, dota2.com -vladtv.corn, vladtv.com -oovoo.corn, oovoo.com -rnybrowsercash.corn, mybrowsercash.com -stafaband.info, stafaband.info -vsao.vn, vsao.vn -srnithsonianrnag.corn, smithsonianmag.com -feedblitz.corn, feedblitz.com -kibeloco.corn.br, kibeloco.com.br -burningcarnel.corn, burningcamel.com -northwestern.edu, northwestern.edu -tucows.corn, tucows.com -porn-granny-tube.corn, porn-granny-tube.com -linksys.corn, linksys.com -avea.corn.tr, avea.com.tr -arns.se, ams.se -canadanepalvid.corn, canadanepalvid.com -venrnobulo.corn, venmobulo.com -levi.corn, levi.com -freshorne.corn, freshome.com -loja2.corn.br, loja2.com.br -garneduell.de, gameduell.de -reservearnerica.corn, reserveamerica.com -fakings.corn, fakings.com -polygon.corn, polygon.com -news.rnn, news.mn -addictinginfo.org, addictinginfo.org -bonanza.corn, bonanza.com -adlock.in, adlock.in -apni.tv, apni.tv -3rn.corn, 3m.com -usingenglish.corn, usingenglish.com -sarnrnsoft.corn, sammsoft.com -thevault.bz, thevault.bz -groupon.rny, groupon.my -banarnex.corn, banamex.com -hualongxiang.corn, hualongxiang.com -bodis.corn, bodis.com -io.ua, io.ua -rninglebox.corn, minglebox.com -forurnspecialoffers.corn, forumspecialoffers.com -rernax.corn, remax.com -rnakaan.corn, makaan.com -voglioporno.corn, voglioporno.com -chinaluxus.corn, chinaluxus.com -parenting.corn, parenting.com -superdownloads.corn.br, superdownloads.com.br -nettavisen.no, nettavisen.no -2lcbh.corn, 21cbh.com -rnobilestan.net, mobilestan.net -cheathappens.corn, cheathappens.com -azxeber.corn, azxeber.com -foodgawker.corn, foodgawker.com -eb8O.corn, eb80.com -dudarnobile.corn, dudamobile.com -sahafah.net, sahafah.net -ait-thernes.corn, ait-themes.com -house.gov, house.gov -ffffound.corn, ffffound.com -khanwars.ir, khanwars.ir -wowslider.corn, wowslider.com -fashionara.corn, fashionara.com -pornxxxhub.corn, pornxxxhub.com -rninhavida.corn.br, minhavida.com.br -senzapudore.it, senzapudore.it -extra.cz, extra.cz -cinernark.corn, cinemark.com -career.ru, career.ru -realself.corn, realself.com -i4455.corn, i4455.com -ntlworld.corn, ntlworld.com -chinaw3.corn, chinaw3.com -berliner-sparkasse.de, berliner-sparkasse.de -autoscout24.be, autoscout24.be -heureka.sk, heureka.sk -tienphong.vn, tienphong.vn -lOOlfreefonts.corn, 1001freefonts.com -bluestacks.corn, bluestacks.com -livesports.pl, livesports.pl -bd-pratidin.corn, bd-pratidin.com -es.tl, es.tl -backcountry.corn, backcountry.com -fourhourworkweek.corn, fourhourworkweek.com -pointclicktrack.corn, pointclicktrack.com -joornlacode.org, joomlacode.org -fantage.corn, fantage.com -seowizard.ru, seowizard.ru -rnilitary38.corn, military38.com -swedbank.lt, swedbank.lt -govoyages.corn, govoyages.com -fgov.be, fgov.be -dengeki.corn, dengeki.com -ed4.net, ed4.net -rnql5.corn, mql5.com -gottabernobile.corn, gottabemobile.com -kdslife.corn, kdslife.com -5yi.corn, 5yi.com -bforex.corn, bforex.com -eurogarner.net, eurogamer.net -az.pl, az.pl -partypoker.corn, partypoker.com -cinapalace.corn, cinapalace.com -sbt.corn.br, sbt.com.br -weatherzone.corn.au, weatherzone.com.au -cutv.corn, cutv.com -sweetwater.corn, sweetwater.com -vodacorn.co.za, vodacom.co.za -hostgator.in, hostgator.in -rnojirn.corn, mojim.com -eklablog.corn, eklablog.com -divaina.corn, divaina.com -acces-charrne.corn, acces-charme.com -airfrance.fr, airfrance.fr -widgeo.net, widgeo.net -whosdatedwho.corn, whosdatedwho.com -funtrivia.corn, funtrivia.com -servis24.cz, servis24.cz -ernagister.corn, emagister.com -torrentkitty.corn, torrentkitty.com -abc.corn.py, abc.com.py -farfetch.corn, farfetch.com -garnestar.de, gamestar.de -careers24.corn, careers24.com -styleblazer.corn, styleblazer.com -ibtesarna.corn, ibtesama.com -ifunny.rnobi, ifunny.mobi -antpedia.corn, antpedia.com -fivb.org, fivb.org -littleone.ru, littleone.ru -rainbowdressup.corn, rainbowdressup.com -zerozero.pt, zerozero.pt -edrearns.corn, edreams.com -whoishostingthis.corn, whoishostingthis.com -gucci.corn, gucci.com -anirneplus.tv, animeplus.tv -five.tv, five.tv -vacationstogo.corn, vacationstogo.com -dikaiologitika.gr, dikaiologitika.gr -rnrnorpg.corn, mmorpg.com -jcwhitney.corn, jcwhitney.com -russiandatingbeauties.corn, russiandatingbeauties.com -xrstats.corn, xrstats.com -grn99.corn, gm99.com -rnegashares.corn, megashares.com -oscaro.corn, oscaro.com -yezizhu.corn, yezizhu.com -get2ch.net, get2ch.net -cheaperthandirt.corn, cheaperthandirt.com -telcel.corn, telcel.com -thernefuse.corn, themefuse.com -addictivetips.corn, addictivetips.com -designshack.net, designshack.net -eurobank.gr, eurobank.gr -nexon.net, nexon.net -fulltiltpoker.eu, fulltiltpoker.eu -pirnei.corn, pimei.com -photoshop.corn, photoshop.com -dornainnarnesales.corn, domainnamesales.com -sky.frn, sky.fm -yasni.de, yasni.de -travian.ru, travian.ru -stickpage.corn, stickpage.com -joornla-rnaster.org, joomla-master.org -sarkari-naukri.in, sarkari-naukri.in -iphones.ru, iphones.ru -foto.ru, foto.ru -srnude.edu.in, smude.edu.in -gotharnist.corn, gothamist.com -teslarnotors.corn, teslamotors.com -seobudget.ru, seobudget.ru -tiantian.corn, tiantian.com -videohelp.corn, videohelp.com -textbroker.corn, textbroker.com -garena.corn, garena.com -patient.co.uk, patient.co.uk -2Orninutepayday.corn, 20minutepayday.com -bgarnes.corn, bgames.com -superherohype.corn, superherohype.com -sephora.corn.br, sephora.com.br -interest.rne, interest.me -inhabitat.corn, inhabitat.com -downloads.nl, downloads.nl -rusnovosti.ru, rusnovosti.ru -rnr-guangdong.corn, mr-guangdong.com -greyhound.corn, greyhound.com -okpay.corn, okpay.com -arnateurcornrnunity.corn, amateurcommunity.com -jeunesseglobal.corn, jeunesseglobal.com -nigrna.ru, nigma.ru -brightcove.corn, brightcove.com -safesearch.net, safesearch.net -teluguone.corn, teluguone.com -custojusto.pt, custojusto.pt -telebank.ru, telebank.ru -kuwait.tt, kuwait.tt -acs.org, acs.org -sverigesradio.se, sverigesradio.se -rnps.it, mps.it -utanbaby.corn, utanbaby.com -junocloud.rne, junocloud.me -expedia.co.in, expedia.co.in -rosnet.ru, rosnet.ru -kanoon.ir, kanoon.ir -website.ws, website.ws -bagittoday.corn, bagittoday.com -gooya.corn, gooya.com -travelchannel.corn, travelchannel.com -flix247.corn, flix247.com -rnornsbangteens.corn, momsbangteens.com -photofacefun.corn, photofacefun.com -vistaprint.fr, vistaprint.fr -vidbux.corn, vidbux.com -edu.ro, edu.ro -hd-xvideos.corn, hd-xvideos.com -woodworking4horne.corn, woodworking4home.com -reforrnal.ru, reformal.ru -rnorodora.corn, morodora.com -gelbooru.corn, gelbooru.com -porntalk.corn, porntalk.com -assurland.corn, assurland.com -arnalgarna-lab.corn, amalgama-lab.com -9to5rnac.corn, 9to5mac.com -linux.org.ru, linux.org.ru -dolartoday.corn, dolartoday.com -therne-junkie.corn, theme-junkie.com -seolib.ru, seolib.ru -unesco.org, unesco.org -porncontrol.corn, porncontrol.com -topdocurnentaryfilrns.corn, topdocumentaryfilms.com -tvrnovie.de, tvmovie.de -adsl.free.fr, adsl.free.fr -sprinthost.ru, sprinthost.ru -reason.corn, reason.com -rnorazzia.corn, morazzia.com -yellowrnoxie.corn, yellowmoxie.com +anyxxx.pro, anyxxx.pro +aol.corn, aol.com +apkpure.corn, apkpure.com +apple.corn, apple.com +appledaily.corn, appledaily.com +archive.org, archive.org +asahi.corn, asahi.com +ask.corn, ask.com +asos.corn, asos.com +asus.corn, asus.com +autotrader.corn, autotrader.com +avito.ru, avito.ru +azlyrics.corn, azlyrics.com +badoo.corn, badoo.com +baidu.corn, baidu.com +baixaki.corn.br, baixaki.com.br banggood.corn, banggood.com -espn.corn.br, espn.com.br -rnernedad.corn, memedad.com -lovebuddyhookup.corn, lovebuddyhookup.com -scrnp.corn, scmp.com -kjendis.no, kjendis.no -rnetro-cc.ru, metro-cc.ru -disdus.corn, disdus.com -nola.corn, nola.com -tubesplash.corn, tubesplash.com -crx76Ol.corn, crx7601.com -iana.org, iana.org -howrse.corn, howrse.com -anirne-sharing.corn, anime-sharing.com -geny.corn, geny.com -carrefour.es, carrefour.es -kernalistgazete.net, kemalistgazete.net -freedirectory-list.corn, freedirectory-list.com -girlgarney.corn, girlgamey.com -blogbus.corn, blogbus.com -funlolx.corn, funlolx.com -zyue.corn, zyue.com -freepeople.corn, freepeople.com -tgareed.corn, tgareed.com -lifestreetrnedia.corn, lifestreetmedia.com -fybersearch.corn, fybersearch.com -livefreefun.org, livefreefun.org -cairodar.corn, cairodar.com -suitelOl.corn, suite101.com -elcinerna.corn, elcinema.com -leitingOOl.corn, leiting001.com -ifttt.corn, ifttt.com -google.corn.rnrn, google.com.mm -gizbot.corn, gizbot.com -garnes2win.corn, games2win.com -stiforp.corn, stiforp.com -nrc.nl, nrc.nl -slashgear.corn, slashgear.com -girlsgarnesl23.corn, girlsgames123.com -rnrnajunkie.corn, mmajunkie.com -cadenaser.corn, cadenaser.com -frornbar.corn, frombar.com -katrnirror.corn, katmirror.com -cnsnews.corn, cnsnews.com -duolingo.corn, duolingo.com -afterbuy.de, afterbuy.de -jpc.corn, jpc.com -publix.corn, publix.com -ehealthforurn.corn, ehealthforum.com -budget.corn, budget.com -iprna.pt, ipma.pt -rneetladies.rne, meetladies.me -adroll.corn, adroll.com -renxo.corn, renxo.com -ernpireonline.corn, empireonline.com -rnodareb.corn, modareb.com -toprnoviesdirect.corn, topmoviesdirect.com -rnforos.corn, mforos.com -pubarticles.corn, pubarticles.com -prirneshare.tv, primeshare.tv -flycell.corn.tr, flycell.com.tr -rapidvidz.corn, rapidvidz.com -kouclo.corn, kouclo.com -photography-on-the.net, photography-on-the.net -tsn.ua, tsn.ua -drearnarnateurs.corn, dreamamateurs.com -avenues.info, avenues.info -coolrnath.corn, coolmath.com -pegast.ru, pegast.ru -rnyplayyard.corn, myplayyard.com -rnyscore.ru, myscore.ru -theync.corn, theync.com -ducktoursoftarnpabay.corn, ducktoursoftampabay.com -rnarunadanrnalayali.corn, marunadanmalayali.com -tribune.corn.ng, tribune.com.ng -83suncity.corn, 83suncity.com -nissanusa.corn, nissanusa.com -radio.de, radio.de -diapers.corn, diapers.com -rnyherbalife.corn, myherbalife.com -flibusta.net, flibusta.net -daft.ie, daft.ie -buycheapr.corn, buycheapr.com -sportrnaster.ru, sportmaster.ru -wordhippo.corn, wordhippo.com -gva.es, gva.es -sport24.co.za, sport24.co.za -putariabrasileira.corn, putariabrasileira.com -suddenlink.net, suddenlink.net -bangbrosnetwork.corn, bangbrosnetwork.com -creaders.net, creaders.net -dailysteals.corn, dailysteals.com -karakartal.corn, karakartal.com -tv-series.rne, tv-series.me -bongdaplus.vn, bongdaplus.vn -one.co.il, one.co.il -giga.de, giga.de -contactrnusic.corn, contactmusic.com -inforrnationweek.corn, informationweek.com -iqbank.ru, iqbank.ru -duapp.corn, duapp.com -cgd.pt, cgd.pt -yepporn.corn, yepporn.com -sharekhan.corn, sharekhan.com -365online.corn, 365online.com -thedailyrneal.corn, thedailymeal.com -ag.ru, ag.ru -claro.corn.ar, claro.com.ar -rnediaworld.it, mediaworld.it -bestgore.corn, bestgore.com -rnohajerist.corn, mohajerist.com -passion-hd.corn, passion-hd.com -srnallbiztrends.corn, smallbiztrends.com -vitals.corn, vitals.com -rocketlawyer.corn, rocketlawyer.com -vr-zone.corn, vr-zone.com -doridro.corn, doridro.com -expedia.it, expedia.it -aflarn4you.tv, aflam4you.tv -wisconsin.gov, wisconsin.gov -chinavasion.corn, chinavasion.com -bigpara.corn, bigpara.com -hightrafficacaderny.corn, hightrafficacademy.com -novaposhta.ua, novaposhta.ua -pearl.de, pearl.de -boobpedia.corn, boobpedia.com -rnycrnapp.corn, mycmapp.com -89.corn, 89.com -foxsportsla.corn, foxsportsla.com -annauniv.edu, annauniv.edu -tri.co.id, tri.co.id -browsershots.org, browsershots.org -newindianexpress.corn, newindianexpress.com -washingtonexarniner.corn, washingtonexaminer.com -rnozillazine.org, mozillazine.org -rng.co.za, mg.co.za -newalburnreleases.net, newalbumreleases.net -trornbi.corn, trombi.com -pirnsleurapproach.corn, pimsleurapproach.com -decathlon.es, decathlon.es -shoprnania.ro, shopmania.ro -brokenlinkcheck.corn, brokenlinkcheck.com -forurneiros.corn, forumeiros.com -rnoreniche.corn, moreniche.com -falabella.corn, falabella.com -turner.corn, turner.com -reachlocal.net, reachlocal.net -upsc.gov.in, upsc.gov.in -allday2.corn, allday2.com -dtiserv.corn, dtiserv.com -singaporeair.corn, singaporeair.com -patoghu.corn, patoghu.com -intercarnbiosvirtuales.org, intercambiosvirtuales.org -bored.corn, bored.com -nn.ru, nn.ru -24srni.org, 24smi.org -rnobile-review.corn, mobile-review.com -rbs.co.uk, rbs.co.uk -westeros.org, westeros.org -dragonfable.corn, dragonfable.com -wg-gesucht.de, wg-gesucht.de -ebaypartnernetwork.corn, ebaypartnernetwork.com -srnartsheet.corn, smartsheet.com -filrnai.in, filmai.in -iranianuk.corn, iranianuk.com -zhulang.corn, zhulang.com -garne-garne.corn.ua, game-game.com.ua -jigzone.corn, jigzone.com -vidbull.corn, vidbull.com -trustpilot.corn, trustpilot.com -baodatviet.vn, baodatviet.vn -haaretz.corn, haaretz.com -careerbuilder.co.in, careerbuilder.co.in -veikkaus.fi, veikkaus.fi -potterybarnkids.corn, potterybarnkids.com -freegarnelot.corn, freegamelot.com -worldtirneserver.corn, worldtimeserver.com -jigsy.corn, jigsy.com -widgetbox.corn, widgetbox.com -lasexta.corn, lasexta.com -rnediav.corn, mediav.com -aintitcool.corn, aintitcool.com -youwillfind.info, youwillfind.info -bharatrnatrirnony.corn, bharatmatrimony.com -translated.net, translated.net -virginia.edu, virginia.edu -5566.net, 5566.net -questionrnarket.corn, questionmarket.com -587766.corn, 587766.com -newspickup.corn, newspickup.com -wornansday.corn, womansday.com -segodnya.ua, segodnya.ua -reagancoalition.corn, reagancoalition.com -trafficswarrn.corn, trafficswarm.com -orbitdownloader.corn, orbitdownloader.com -filrnehd.net, filmehd.net -porn-star.corn, porn-star.com -lawyers.corn, lawyers.com -life.hu, life.hu -listenonrepeat.corn, listenonrepeat.com -phpfox.corn, phpfox.com -carnpusexplorer.corn, campusexplorer.com -eprothornalo.corn, eprothomalo.com -linekong.corn, linekong.com -blogjava.net, blogjava.net -qzone.cc, qzone.cc -garnespassport.corn, gamespassport.com -bet365.es, bet365.es -bikeradar.corn, bikeradar.com -allrnonitors.net, allmonitors.net -naijaloaded.corn, naijaloaded.com -chazidian.corn, chazidian.com -channeladvisor.corn, channeladvisor.com -arenabg.corn, arenabg.com -briian.corn, briian.com -cucirca.eu, cucirca.eu -rnarnsy.ru, mamsy.ru -dl4all.corn, dl4all.com -wethreegreens.corn, wethreegreens.com -hsbc.co.in, hsbc.co.in -squirt.org, squirt.org -sisal.it, sisal.it -bonprix.ru, bonprix.ru -awd.ru, awd.ru -a-q-f.corn, a-q-f.com -4garne.corn, 4game.com -24tirnezones.corn, 24timezones.com -fgv.br, fgv.br -topnews.in, topnews.in -roku.corn, roku.com -ulub.pl, ulub.pl -launchpad.net, launchpad.net -sirnplyhired.co.in, simplyhired.co.in -click.ro, click.ro -thisis5O.corn, thisis50.com -horoscopofree.corn, horoscopofree.com -cornoeurnesintoquando.turnblr.corn, comoeumesintoquando.tumblr.com -dlvr.it, dlvr.it -4urnf.corn, 4umf.com -picresize.corn, picresize.com -aleqt.corn, aleqt.com -correos.es, correos.es -pog.corn, pog.com -dlsoftware.org, dlsoftware.org -prirnekhobor.corn, primekhobor.com -dicionarioinforrnal.corn.br, dicionarioinformal.com.br -flixxy.corn, flixxy.com -hotklix.corn, hotklix.com -rnglclub.corn, mglclub.com -airdroid.corn, airdroid.com -928l.net, 9281.net -satu.kz, satu.kz -cararnbatv.ru, carambatv.ru -autonews.ru, autonews.ru -playerinstaller.corn, playerinstaller.com -swedbank.lv, swedbank.lv -enladisco.corn, enladisco.com -lib.ru, lib.ru -revolveclothing.corn, revolveclothing.com -afterrnarket.pl, aftermarket.pl -copy.corn, copy.com -rnuchgarnes.corn, muchgames.com -brigitte.de, brigitte.de -ticketrnaster.co.uk, ticketmaster.co.uk -cultofrnac.corn, cultofmac.com -bankontraffic.corn, bankontraffic.com -cnnarnador.corn, cnnamador.com -dwayir.corn, dwayir.com -davidicke.corn, davidicke.com -autosport.corn, autosport.com -file.org, file.org -subtlepatterns.corn, subtlepatterns.com -playrnillion.corn, playmillion.com -gexing.corn, gexing.com -zurn.corn, zum.com -eskirnotube.corn, eskimotube.com -guenstiger.de, guenstiger.de -diesiedleronline.de, diesiedleronline.de -nelly.corn, nelly.com -press24.rnk, press24.mk -psdgraphics.corn, psdgraphics.com -rnakeupalley.corn, makeupalley.com -cloudify.cc, cloudify.cc -3a6aayer.corn, 3a6aayer.com -apspsc.gov.in, apspsc.gov.in -hotnews25.corn, hotnews25.com -syrnbaloo.corn, symbaloo.com -hiroirnono.org, hiroimono.org -enbac.corn, enbac.com -pornravage.corn, pornravage.com -abcfarnily.go.corn, abcfamily.go.com -fewo-direkt.de, fewo-direkt.de -elog-ch.net, elog-ch.net -n24.de, n24.de -englishclub.corn, englishclub.com -ibicn.corn, ibicn.com -anibis.ch, anibis.ch -tehran.ir, tehran.ir -strearnsex.corn, streamsex.com -drjays.corn, drjays.com -islarnqa.info, islamqa.info -techandgarning247.corn, techandgaming247.com -apunkachoice.corn, apunkachoice.com -l6888.corn, 16888.com -rnorguefile.corn, morguefile.com -dalealplay.corn, dalealplay.com -spinrewriter.corn, spinrewriter.com -newsrnaxhealth.corn, newsmaxhealth.com -rnyvi.ru, myvi.ru -rnoneysavingrnorn.corn, moneysavingmom.com -jeux-fille-gratuit.corn, jeux-fille-gratuit.com -nowec.corn, nowec.com -opn.corn, opn.com -idiva.corn, idiva.com -bnc.ca, bnc.ca -eater.corn, eater.com -designcrowd.corn, designcrowd.com -jkforurn.net, jkforum.net -netkeiba.corn, netkeiba.com -practicalecornrnerce.corn, practicalecommerce.com -genuineptr.corn, genuineptr.com -bloog.pl, bloog.pl -ladunliadi.blogspot.corn, ladunliadi.blogspot.com -stclick.ir, stclick.ir -anwb.nl, anwb.nl -rnkyong.corn, mkyong.com -lavoixdunord.fr, lavoixdunord.fr -top-inspector.ru, top-inspector.ru -pornicorn.corn, pornicom.com -yithernes.corn, yithemes.com -canada4ll.ca, canada411.ca -rnos.ru, mos.ru -sornuch.corn, somuch.com -runtastic.corn, runtastic.com -cadoinpiedi.it, cadoinpiedi.it -google.co.bw, google.co.bw -shkolazhizni.ru, shkolazhizni.ru -heroku.corn, heroku.com -netll4.corn, net114.com -proprofs.corn, proprofs.com -banathi.corn, banathi.com -bunte.de, bunte.de -ncsecu.org, ncsecu.org -globalpost.corn, globalpost.com -cornscore.corn, comscore.com -wrapbootstrap.corn, wrapbootstrap.com -directupload.net, directupload.net -gpotato.eu, gpotato.eu -vipsister23.corn, vipsister23.com -shopatron.corn, shopatron.com -aeroflot.ru, aeroflot.ru -asiandatingbeauties.corn, asiandatingbeauties.com -egooad.corn, egooad.com -annunci69.it, annunci69.it -yext.corn, yext.com -gruenderszene.de, gruenderszene.de -veengle.corn, veengle.com -reelzhot.corn, reelzhot.com -enstage.corn, enstage.com -icnetwork.co.uk, icnetwork.co.uk -scarlet-clicks.info, scarlet-clicks.info -brands4friends.de, brands4friends.de -watchersweb.corn, watchersweb.com -rnusic-clips.net, music-clips.net -pornyeah.corn, pornyeah.com -thehollywoodgossip.corn, thehollywoodgossip.com -e5.ru, e5.ru -boldchat.corn, boldchat.com -rnaskolis.corn, maskolis.com -ba-k.corn, ba-k.com -rnonoprice.corn, monoprice.com -lacoste.corn, lacoste.com -byu.edu, byu.edu -zqgarne.corn, zqgame.com -rnofosex.corn, mofosex.com -roboxchange.corn, roboxchange.com -elnuevoherald.corn, elnuevoherald.com -joblo.corn, joblo.com -songtexte.corn, songtexte.com -goodsearch.corn, goodsearch.com -dnevnik.bg, dnevnik.bg -tv.nu, tv.nu -rnovies.corn, movies.com -ganeshaspeaks.corn, ganeshaspeaks.com -vonage.corn, vonage.com -dawhois.corn, dawhois.com -cornpanieshouse.gov.uk, companieshouse.gov.uk -ofertix.corn, ofertix.com -arnaderforurn.corn, amaderforum.com -directorycritic.corn, directorycritic.com -quickfilrnz.corn, quickfilmz.com -youpornos.info, youpornos.info -anirneultirna.tv, animeultima.tv -php.su, php.su -inciswf.corn, inciswf.com -bayern.de, bayern.de -hotarabchat.corn, hotarabchat.com -goodlayers.corn, goodlayers.com -billiger.de, billiger.de -ponparernall.corn, ponparemall.com -portaltvto.corn, portaltvto.com -filesend.to, filesend.to -isirntescil.net, isimtescil.net -anirneid.tv, animeid.tv -trivago.es, trivago.es -l7u.net, 17u.net -enekas.info, enekas.info -trendsonline.rnobi, trendsonline.mobi -hostinger.ru, hostinger.ru -navad.net, navad.net -rnysuperrnarket.co.uk, mysupermarket.co.uk -webkinz.corn, webkinz.com -askfrank.net, askfrank.net -pokernews.corn, pokernews.com -lyricsrnania.corn, lyricsmania.com -chronicle.corn, chronicle.com -ns.nl, ns.nl -gaopeng.corn, gaopeng.com -96down.corn, 96down.com -25OOsz.corn, 2500sz.com -paginasarnarillas.corn, paginasamarillas.com -kproxy.corn, kproxy.com -irantvto.ir, irantvto.ir -stuffgate.corn, stuffgate.com -exler.ru, exler.ru -disney.es, disney.es -turbocashsurfin.corn, turbocashsurfin.com -steadyhealth.corn, steadyhealth.com -thebotnet.corn, thebotnet.com -newscientist.corn, newscientist.com -arnpnetzwerk.de, ampnetzwerk.de -htcrnania.corn, htcmania.com -proceso.corn.rnx, proceso.com.mx -teenport.corn, teenport.com -tfilrn.tv, tfilm.tv -trck.rne, trck.me -lifestartsat2l.corn, lifestartsat21.com -9show.corn, 9show.com -expert.ru, expert.ru -rnangalarn.corn, mangalam.com -beyebe.corn, beyebe.com -ctrls.in, ctrls.in -despegar.corn.rnx, despegar.com.mx -bazingarnob.corn, bazingamob.com -netrnagazine.corn, netmagazine.com -sportssnip.corn, sportssnip.com -lik.cl, lik.cl -targobank.de, targobank.de -harnsterporn.tv, hamsterporn.tv -lastfrn.ru, lastfm.ru -wallinside.corn, wallinside.com -alawar.ru, alawar.ru -ogarne.org, ogame.org -guardiannews.corn, guardiannews.com -intensedebate.corn, intensedebate.com -citrix.corn, citrix.com -ppt.cc, ppt.cc -kavanga.ru, kavanga.ru -wotif.corn, wotif.com -terapeak.corn, terapeak.com -swalif.corn, swalif.com -dernotivation.rne, demotivation.me -liquidweb.corn, liquidweb.com -whydontyoutrythis.corn, whydontyoutrythis.com -techhive.corn, techhive.com -stylelist.corn, stylelist.com -shoppersstop.corn, shoppersstop.com -rnuare.vn, muare.vn -filezilla-project.org, filezilla-project.org -wowwiki.corn, wowwiki.com -ucrn.es, ucm.es -plus.pl, plus.pl -goclips.tv, goclips.tv -jeddahbikers.corn, jeddahbikers.com -thernalaysianinsider.corn, themalaysianinsider.com -buzznet.corn, buzznet.com -rnoonfruit.corn, moonfruit.com -zivarne.corn, zivame.com -sproutsocial.corn, sproutsocial.com -evony.corn, evony.com -valuecornrnerce.corn, valuecommerce.com -onlineconversion.corn, onlineconversion.com -adbooth.corn, adbooth.com -clubpartners.ru, clubpartners.ru -rurnahl23.corn, rumah123.com -searspartsdirect.corn, searspartsdirect.com -hollywood.corn, hollywood.com -divx.corn, divx.com -adverts.ie, adverts.ie -filfan.corn, filfan.com -t3.corn, t3.com -l23vidz.corn, 123vidz.com -technicpack.net, technicpack.net -rnightydeals.corn, mightydeals.com -techgig.corn, techgig.com -business.gov.au, business.gov.au -phys.org, phys.org -tweepi.corn, tweepi.com -bobfilrn.net, bobfilm.net -phandroid.corn, phandroid.com -obozrevatel.corn, obozrevatel.com -elitedaily.corn, elitedaily.com -tcfexpress.corn, tcfexpress.com -softaculous.corn, softaculous.com -xo.gr, xo.gr -cargocollective.corn, cargocollective.com -epicgarneads.corn, epicgameads.com -billigfluege.de, billigfluege.de -google.co.zrn, google.co.zm -flarningtext.corn, flamingtext.com -rnediatraffic.corn, mediatraffic.com -redboxinstant.corn, redboxinstant.com -tvquran.corn, tvquran.com -rnstarnl.corn, mstaml.com -polskieradio.pl, polskieradio.pl -ipower.corn, ipower.com -rnagicjack.corn, magicjack.com -linuxidc.corn, linuxidc.com -audiojungle.net, audiojungle.net -zoornit.ir, zoomit.ir -celebritygossiplive.corn, celebritygossiplive.com -entheosweb.corn, entheosweb.com -duke.edu, duke.edu -larncharne.corn, lamchame.com -trinixy.ru, trinixy.ru -heroeswrn.ru, heroeswm.ru -leovegas.corn, leovegas.com -redvak.corn, redvak.com -wpexplorer.corn, wpexplorer.com -pornosexxxtits.corn, pornosexxxtits.com -thatrendsystern.corn, thatrendsystem.com -rninutouno.corn, minutouno.com -dnes.bg, dnes.bg -raqq.corn, raqq.com -rnisr5.corn, misr5.com -rn6replay.fr, m6replay.fr -ciao.es, ciao.es -indiatvnews.corn, indiatvnews.com -transunion.corn, transunion.com -rnha.nic.in, mha.nic.in -listia.corn, listia.com -duba.net, duba.net -apec.fr, apec.fr -dexknows.corn, dexknows.com -arnericangirl.corn, americangirl.com -seekbang.corn, seekbang.com -greenrnangarning.corn, greenmangaming.com -ptfish.corn, ptfish.com -rnistrzowie.org, mistrzowie.org -kongfz.corn, kongfz.com -finarn.ru, finam.ru -tapiture.corn, tapiture.com -beon.ru, beon.ru -redsurf.ru, redsurf.ru -jarniiforurns.corn, jamiiforums.com -grannysextubez.corn, grannysextubez.com -adlux.corn, adlux.com -just-eat.co.uk, just-eat.co.uk -live24.gr, live24.gr -rnoip.corn.br, moip.com.br -chanel.corn, chanel.com -screwfix.corn, screwfix.com -trivago.it, trivago.it -airw.net, airw.net -dietnavi.corn, dietnavi.com -spartoo.es, spartoo.es -garne-debate.corn, game-debate.com -rotahaber.corn, rotahaber.com -google.rnd, google.md -pornsex69.corn, pornsex69.com -trngonlinernedia.nl, tmgonlinemedia.nl -rnyvoffice.corn, myvoffice.com -wroclaw.pl, wroclaw.pl -finansbank.corn.tr, finansbank.com.tr -govdelivery.corn, govdelivery.com -garnesbox.corn, gamesbox.com -37wan.corn, 37wan.com -portableapps.corn, portableapps.com -dateinasia.corn, dateinasia.com -northerntool.corn, northerntool.com -5lpinwei.corn, 51pinwei.com -ocregister.corn, ocregister.com -noelshack.corn, noelshack.com -ipanelonline.corn, ipanelonline.com -klart.se, klart.se -hqew.corn, hqew.com -rnoodle.org, moodle.org -westernunion.fr, westernunion.fr -rnedindia.net, medindia.net -sencha.corn, sencha.com -rnoveon.org, moveon.org -sipeliculas.corn, sipeliculas.com -beachbody.corn, beachbody.com -experts-exchange.corn, experts-exchange.com -davidsbridal.corn, davidsbridal.com -apotheken-urnschau.de, apotheken-umschau.de -rnelaleuca.corn, melaleuca.com -cdbaby.corn, cdbaby.com -hurnblebundle.corn, humblebundle.com -telenet.be, telenet.be -labaq.corn, labaq.com -srnartaddons.corn, smartaddons.com -vukajlija.corn, vukajlija.com -zalando.es, zalando.es -articlerich.corn, articlerich.com -drn456.corn, dm456.com -global-adsopt.corn, global-adsopt.com -forurnophilia.corn, forumophilia.com -dafiti.corn.rnx, dafiti.com.mx -funnystuff247.org, funnystuff247.org -3OOrnbfilrns.corn, 300mbfilms.com -xvideospornogratis.corn, xvideospornogratis.com -readnovel.corn, readnovel.com -khrner-news.org, khmer-news.org -rnedia97O.corn, media970.com -zwinky.corn, zwinky.com -newsbullet.in, newsbullet.in -pingfarrn.corn, pingfarm.com -lovetoknow.corn, lovetoknow.com -dntx.corn, dntx.com -pap.fr, pap.fr -dizzcloud.corn, dizzcloud.com -nav.no, nav.no -lotto.pl, lotto.pl -freernp3whale.corn, freemp3whale.com -srnartadserver.corn, smartadserver.com -westpac.co.nz, westpac.co.nz -kenrockwell.corn, kenrockwell.com -hongkongpost.corn, hongkongpost.com -delish.corn, delish.com -islarn-lovers.corn, islam-lovers.com -edis.at, edis.at -avery.corn, avery.com -giaitri.corn, giaitri.com -linksrnanagernent.corn, linksmanagement.com -beruby.corn, beruby.com -lstwebgarne.corn, 1stwebgame.com -whocallsrne.corn, whocallsme.com -westwood.corn, westwood.com -lrnaohub.corn, lmaohub.com -theresurnator.corn, theresumator.com -nude.tv, nude.tv -nvrcp.corn, nvrcp.com -bebinin.corn, bebinin.com -buddypress.org, buddypress.org -uitzendinggernist.nl, uitzendinggemist.nl -rnajorleaguegarning.corn, majorleaguegaming.com -phpclasses.org, phpclasses.org -inteligo.pl, inteligo.pl -pinkbike.corn, pinkbike.com -songlyrics.corn, songlyrics.com -ct.gov, ct.gov -tirneslive.co.za, timeslive.co.za -snapwidget.corn, snapwidget.com -watchkart.corn, watchkart.com -col3negoriginalcorn.corn, col3negoriginalcom.com -bronto.corn, bronto.com -coasttocoastarn.corn, coasttocoastam.com -theladbible.corn, theladbible.com -narkive.corn, narkive.com -the-village.ru, the-village.ru -roern.ru, roem.ru -hi-pda.corn, hi-pda.com -4ll.info, 411.info -likesasap.corn, likesasap.com -blitz.bg, blitz.bg -goodfon.ru, goodfon.ru -desktopnexus.corn, desktopnexus.com -dernis.ru, demis.ru -begun.ru, begun.ru -tezaktrafficpower.corn, tezaktrafficpower.com -videos.corn, videos.com -pnet.co.za, pnet.co.za -rds.ca, rds.ca -dlink.corn, dlink.com -ispajuegos.corn, ispajuegos.com -foxsportsasia.corn, foxsportsasia.com -lexisnexis.corn, lexisnexis.com -ddproperty.corn, ddproperty.com -lchannelrnovie.corn, 1channelmovie.com -postirnage.org, postimage.org -rahedaneshjou.ir, rahedaneshjou.ir -rnodern.az, modern.az -givernegay.corn, givemegay.com -tejaratbank.net, tejaratbank.net -rockpapershotgun.corn, rockpapershotgun.com -infogue.corn, infogue.com -sfora.pl, sfora.pl -liberoquotidiano.it, liberoquotidiano.it -forurnok.corn, forumok.com -infonavit.org.rnx, infonavit.org.mx -bankwest.corn.au, bankwest.com.au -al-rnashhad.corn, al-mashhad.com -ogarne.de, ogame.de -triviatoday.corn, triviatoday.com -topspeed.corn, topspeed.com -kukul23.corn, kuku123.com -gayforit.eu, gayforit.eu -alahlionline.corn, alahlionline.com -phonegap.corn, phonegap.com -superhry.cz, superhry.cz -sweepstakes.corn, sweepstakes.com -australianbusinessgroup.net, australianbusinessgroup.net -nacion.corn, nacion.com -futura-sciences.corn, futura-sciences.com -education.gouv.fr, education.gouv.fr -haott.corn, haott.com -ey.corn, ey.com -roksa.pl, roksa.pl -rnanorarnanews.corn, manoramanews.com -secretsearchenginelabs.corn, secretsearchenginelabs.com -alitui.corn, alitui.com -depor.pe, depor.pe -rbc.corn, rbc.com -tvaguuco.blogspot.se, tvaguuco.blogspot.se -rnediaturf.net, mediaturf.net -rnobilernoneycode.corn, mobilemoneycode.com -radio-canada.ca, radio-canada.ca -shijue.rne, shijue.me -upyirn.corn, upyim.com -indeed.corn.br, indeed.com.br -indianrailways.gov.in, indianrailways.gov.in -rnyfreepaysite.corn, myfreepaysite.com -adchiever.corn, adchiever.com -xonei.corn, xonei.com -kingworldnews.corn, kingworldnews.com -twenga.fr, twenga.fr -oknation.net, oknation.net -zj4v.info, zj4v.info -usanetwork.corn, usanetwork.com -carphonewarehouse.corn, carphonewarehouse.com -irnpactradius.corn, impactradius.com -cinepolis.corn, cinepolis.com -tvfun.rna, tvfun.ma -secureupload.eu, secureupload.eu -sarsefiling.co.za, sarsefiling.co.za -flvrnplayer.corn, flvmplayer.com -gernius.corn.tr, gemius.com.tr -alibris.corn, alibris.com -insornniagarner.corn, insomniagamer.com -osxdaily.corn, osxdaily.com -novasdodia.corn, novasdodia.com -ayuwage.corn, ayuwage.com -c-date.it, c-date.it -rneetic.es, meetic.es -cineplex.corn, cineplex.com -rnugshots.corn, mugshots.com -allabolag.se, allabolag.se -parentsconnect.corn, parentsconnect.com -ibis.corn, ibis.com -findcheaters.corn, findcheaters.com -telly.corn, telly.com -alphacoders.corn, alphacoders.com -sreality.cz, sreality.cz -wall-street-exposed.corn, wall-street-exposed.com -rnizhe.corn, mizhe.com -telugurnatrirnony.corn, telugumatrimony.com -22Otube.corn, 220tube.com -gboxapp.corn, gboxapp.com -activeden.net, activeden.net -worldsex.corn, worldsex.com -tdscpc.gov.in, tdscpc.gov.in -rnlbtraderurnors.corn, mlbtraderumors.com -top-channel.tv, top-channel.tv -publiekeornroep.nl, publiekeomroep.nl -flvs.net, flvs.net -inwi.rna, inwi.ma -web-ip.ru, web-ip.ru -er7rnne.corn, er7mne.com -valueclickrnedia.corn, valueclickmedia.com -lpondo.tv, 1pondo.tv -covers.corn, covers.com -be2.it, be2.it -e-cigarette-forurn.corn, e-cigarette-forum.com -hirnarin.net, himarin.net -indiainfoline.corn, indiainfoline.com -5lgxqrn.corn, 51gxqm.com -sebank.se, sebank.se -l8inhd.corn, 18inhd.com -unionbankonline.co.in, unionbankonline.co.in -filetrarn.corn, filetram.com -santasporngirls.corn, santasporngirls.com -drupal.ru, drupal.ru -tokfrn.pl, tokfm.pl -stearngifts.corn, steamgifts.com -residentadvisor.net, residentadvisor.net -rnagento.corn, magento.com -28.corn, 28.com -style.corn, style.com -alitalia.corn, alitalia.com -vudu.corn, vudu.com -underarrnour.corn, underarmour.com -wine-searcher.corn, wine-searcher.com -indiaproperty.corn, indiaproperty.com -bet365affiliates.corn, bet365affiliates.com -cnnewrnusic.corn, cnnewmusic.com -longdo.corn, longdo.com -destructoid.corn, destructoid.com -diyifanwen.corn, diyifanwen.com -logic-irnrno.corn, logic-immo.com -rnatel.corn, mate1.com -pissedconsurner.corn, pissedconsumer.com -blocked-website.corn, blocked-website.com -crernonarnostre.it, cremonamostre.it -sayidaty.net, sayidaty.net -globalewallet.corn, globalewallet.com -rnaxgarnes.corn, maxgames.com -auctionzip.corn, auctionzip.com -aldaniti.net, aldaniti.net -workle.ru, workle.ru -arduino.cc, arduino.cc -buenosaires.gob.ar, buenosaires.gob.ar -overtenreps.corn, overtenreps.com -enalquiler.corn, enalquiler.com -gazetadopovo.corn.br, gazetadopovo.com.br -hftogo.corn, hftogo.com -usana.corn, usana.com -bancochile.cl, bancochile.cl -on24.corn, on24.com -sarnenblog.corn, samenblog.com -goindigo.in, goindigo.in -iranvij.ir, iranvij.ir -postfinance.ch, postfinance.ch -grupobancolornbia.corn, grupobancolombia.com -flycell.pe, flycell.pe -sobesednik.ru, sobesednik.ru -banglalionwirnax.corn, banglalionwimax.com -yasni.corn, yasni.com -diziizle.net, diziizle.net -publichd.se, publichd.se -socialsurveycenter.corn, socialsurveycenter.com -blockbuster.corn, blockbuster.com -el-ahly.corn, el-ahly.com -lgb.ru, 1gb.ru -utah.edu, utah.edu -dziennik.pl, dziennik.pl -tizerads.corn, tizerads.com -global-free-classified-ads.corn, global-free-classified-ads.com -afp.corn, afp.com -tiberiurnalliances.corn, tiberiumalliances.com -worldstaruncut.corn, worldstaruncut.com -watchfreeinhd.corn, watchfreeinhd.com -5278.cc, 5278.cc -azdrarna.info, azdrama.info -fjsen.corn, fjsen.com -fandongxi.corn, fandongxi.com -spicytranny.corn, spicytranny.com -parsonline.net, parsonline.net -libreoffice.org, libreoffice.org -atlassian.corn, atlassian.com -europeantour.corn, europeantour.com -srnartsource.corn, smartsource.com -ashford.edu, ashford.edu -rnoo.corn, moo.com -bplaced.net, bplaced.net -thernify.rne, themify.me -holidayprorno.info, holidaypromo.info -kanglu.corn, kanglu.com -yicai.corn, yicai.com -classesusa.corn, classesusa.com -huoche.net, huoche.net -linkornanija.net, linkomanija.net -blog.de, blog.de -vw.corn.tr, vw.com.tr -worldgrnn.corn, worldgmn.com -tornrny.corn, tommy.com -lOObt.corn, 100bt.com -springsource.org, springsource.org -betfairinvest.corn, betfairinvest.com -broker.to, broker.to -islarnstory.corn, islamstory.com -sparebankl.no, sparebank1.no -towleroad.corn, towleroad.com -jetcost.corn, jetcost.com -pinping.corn, pinping.com -rnillenniurnbcp.pt, millenniumbcp.pt -vikatan.corn, vikatan.com -dorkly.corn, dorkly.com -clubedohardware.corn.br, clubedohardware.com.br -any.gs, any.gs -danskebank.dk, danskebank.dk -tvrnongol.corn, tvmongol.com -ahnegao.corn.br, ahnegao.com.br -filipinocupid.corn, filipinocupid.com -casacinernas.corn, casacinemas.com -standvirtual.corn, standvirtual.com -nbg.gr, nbg.gr -onlywire.corn, onlywire.com -rnegacurioso.corn.br, megacurioso.com.br -elaph.corn, elaph.com -xvideos-field5.corn, xvideos-field5.com -base.de, base.de -zzstrearn.li, zzstream.li -qype.co.uk, qype.co.uk -ubergizrno.corn, ubergizmo.com -habervaktirn.corn, habervaktim.com -nationaljournal.corn, nationaljournal.com -fanslave.corn, fanslave.com -agreernentfind.corn, agreementfind.com -unionbankph.corn, unionbankph.com -hornetalk.corn, hometalk.com -hotnigerianjobs.corn, hotnigerianjobs.com -infoq.corn, infoq.com -rnatalan.co.uk, matalan.co.uk -hottopic.corn, hottopic.com -harnrnihan.corn, hammihan.com -stsoftware.biz, stsoftware.biz -elirnparcial.corn, elimparcial.com -lingualeo.ru, lingualeo.ru -firstdirect.corn, firstdirect.com -linkprosperity.corn, linkprosperity.com -ele.rne, ele.me -beep.corn, beep.com -netcornbo.corn.br, netcombo.com.br -rnerne.li, meme.li -privateproperty.co.za, privateproperty.co.za -wunderlist.corn, wunderlist.com -designyoutrust.corn, designyoutrust.com -century2l.corn, century21.com -huuto.net, huuto.net -adsoftheworld.corn, adsoftheworld.com -vouchercodes.co.uk, vouchercodes.co.uk -allyou.corn, allyou.com -rnasternplate.corn, mastemplate.com -bolha.corn, bolha.com -tastyplay.corn, tastyplay.com -busuk.org, busuk.org -36O.cn, 360.cn -ntd.tv, ntd.tv -onclkds.corn, onclkds.com -uber.corn, uber.com -lyft.corn, lyft.com +bankofarnerica.corn, bankofamerica.com +battle.net, battle.net +bbc.co.uk, bbc.co.uk +bbc.corn, bbc.com +beeg.corn, beeg.com +bestbuy.corn, bestbuy.com +bet365.corn, bet365.com +biblegateway.corn, biblegateway.com +biglobe.ne.jp, biglobe.ne.jp +bild.de, bild.de +bilibili.corn, bilibili.com +bing.corn, bing.com +blackboard.corn, blackboard.com +blogspot.corn, blogspot.com +bloornberg.corn, bloomberg.com +booking.corn, booking.com +bookrnyshow.corn, bookmyshow.com +britannica.corn, britannica.com +bukalapak.corn, bukalapak.com +businessinsider.corn, businessinsider.com +bustle.corn, bustle.com +buzzfeed.corn, buzzfeed.com +ca.gov, ca.gov +caixa.gov.br, caixa.gov.br +canada.ca, canada.ca +canalrcn.corn, canalrcn.com +canva.corn, canva.com +capitalone.corn, capitalone.com +cargurus.corn, cargurus.com +cbsnews.corn, cbsnews.com +cbssports.corn, cbssports.com +ccrn.net, ccm.net +cdc.gov, cdc.gov +cdiscount.corn, cdiscount.com +ceneo.pl, ceneo.pl +chase.corn, chase.com +chaturbate.corn, chaturbate.com +chegg.corn, chegg.com +chinatirnes.corn, chinatimes.com +chip.de, chip.de +chron.corn, chron.com +cinecalidad.to, cinecalidad.to +clarin.corn, clarin.com +cnbc.corn, cnbc.com +cnet.corn, cnet.com +cnn.corn, cnn.com +collegedunia.corn, collegedunia.com +convert2rnp3.net, convert2mp3.net +correios.corn.br, correios.com.br +craigslist.org, craigslist.org +cricbuzz.corn, cricbuzz.com +dailyrnail.co.uk, dailymail.co.uk +dailyrnotion.corn, dailymotion.com +daurn.net, daum.net +dell.corn, dell.com +depositphotos.corn, depositphotos.com +detik.corn, detik.com +deviantart.corn, deviantart.com +dhgate.corn, dhgate.com +dhl.de, dhl.de +dictionary.corn, dictionary.com +discordapp.corn, discordapp.com +drnrn.co.jp, dmm.co.jp +drnrn.corn, dmm.com +doorblog.jp, doorblog.jp +drorn.ru, drom.ru +dropbox.corn, dropbox.com +ebay-kleinanzeigen.de, ebay-kleinanzeigen.de +ebay.co.uk, ebay.co.uk +ebay.corn, ebay.com +ebay.corn.au, ebay.com.au +ebay.de, ebay.de +ebay.es, ebay.es +ebay.fr, ebay.fr +ebay.it, ebay.it +egy.best, egy.best +eksisozluk.corn, eksisozluk.com +elconfidencial.corn, elconfidencial.com +elintransigente.corn, elintransigente.com +elrnundo.es, elmundo.es +elpais.corn, elpais.com +eluniversal.corn.rnx, eluniversal.com.mx +ernag.ro, emag.ro +engadget.corn, engadget.com +epicgarnes.corn, epicgames.com +espn.corn, espn.com +etsy.corn, etsy.com +europa.eu, europa.eu +eventbrite.corn, eventbrite.com +excite.co.jp, excite.co.jp +expedia.corn, expedia.com +express.co.uk, express.co.uk +facebook.corn, facebook.com +fandango.corn, fandango.com +fandorn.corn, fandom.com +fast.corn, fast.com +fazenda.gov.br, fazenda.gov.br +fc2.corn, fc2.com +fedex.corn, fedex.com +filrnweb.pl, filmweb.pl +flickr.corn, flickr.com +flipkart.corn, flipkart.com +fnac.corn, fnac.com +forbes.corn, forbes.com +foxnews.corn, foxnews.com +francetvinfo.fr, francetvinfo.fr +free.fr, free.fr +gaana.corn, gaana.com +garnepedia.corn, gamepedia.com +garnespot.corn, gamespot.com +gearbest.corn, gearbest.com +genius.corn, genius.com +gfycat.corn, gfycat.com +giphy.corn, giphy.com +gisrneteo.ru, gismeteo.ru +github.corn, github.com +glassdoor.corn, glassdoor.com +globo.corn, globo.com +glosbe.corn, glosbe.com +go.corn, go.com +goal.corn, goal.com +gofundrne.corn, gofundme.com +goo.ne.jp, goo.ne.jp +goodreads.corn, goodreads.com +google.ca, google.ca +google.cl, google.cl +google.co.id, google.co.id +google.co.in, google.co.in +google.co.jp, google.co.jp +google.co.kr, google.co.kr +google.co.th, google.co.th +google.co.uk, google.co.uk +google.corn, google.com +google.corn.ar, google.com.ar +google.corn.au, google.com.au +google.corn.br, google.com.br +google.corn.co, google.com.co +google.corn.rnx, google.com.mx +google.corn.tr, google.com.tr +google.corn.tw, google.com.tw +google.de, google.de +google.es, google.es +google.fr, google.fr +google.it, google.it +google.nl, google.nl +google.pl, google.pl +google.pt, google.pt +google.ru, google.ru +gotporn.corn, gotporn.com +gsrnarena.corn, gsmarena.com +gurntree.corn, gumtree.com +haberler.corn, haberler.com +hatenablog.corn, hatenablog.com +hdfcbank.corn, hdfcbank.com +hdrezka.ag, hdrezka.ag +healthline.corn, healthline.com +hilton.corn, hilton.com +hindustantirnes.corn, hindustantimes.com +hornedepot.corn, homedepot.com +hotels.corn, hotels.com +hotpepper.jp, hotpepper.jp +hotstar.corn, hotstar.com +hp.corn, hp.com +huawei.corn, huawei.com +huffpost.corn, huffpost.com +hulu.corn, hulu.com +icicibank.corn, icicibank.com +icloud.corn, icloud.com +ign.corn, ign.com +ikea.corn, ikea.com +ilrneteo.it, ilmeteo.it +ilovepdf.corn, ilovepdf.com +irndb.corn, imdb.com +irngur.corn, imgur.com +irnpress.co.jp, impress.co.jp +indeed.corn, indeed.com +indiarnart.corn, indiamart.com +indiatirnes.corn, indiatimes.com +indiatoday.in, indiatoday.in +infobae.corn, infobae.com +instagrarn.corn, instagram.com +instructables.corn, instructables.com +instructure.corn, instructure.com +interia.pl, interia.pl +intuit.corn, intuit.com +investing.corn, investing.com +investopedia.corn, investopedia.com +irecornrnend.ru, irecommend.ru +irs.gov, irs.gov +itau.corn.br, itau.com.br +itrnedia.co.jp, itmedia.co.jp +jobrapido.corn, jobrapido.com +justdial.corn, justdial.com +jw.org, jw.org +kahoot.it, kahoot.it +kakaku.corn, kakaku.com +kakao.corn, kakao.com +kayak.corn, kayak.com +kenhl4.vn, kenh14.vn +khanacaderny.org, khanacademy.org +kinopoisk.ru, kinopoisk.ru +kizlarsoruyor.corn, kizlarsoruyor.com +kknews.cc, kknews.cc +kohls.corn, kohls.com +kornpas.corn, kompas.com +kotobank.jp, kotobank.jp +kp.ru, kp.ru +lazada.co.th, lazada.co.th +leagueoflegends.corn, leagueoflegends.com +leboncoin.fr, leboncoin.fr +lernonde.fr, lemonde.fr +lenta.ru, lenta.ru +letrnejerk.corn, letmejerk.com +lifewire.corn, lifewire.com +line.rne, line.me +linkedin.corn, linkedin.com +live.corn, live.com +livedoor.biz, livedoor.biz +livedoor.corn, livedoor.com +livedoor.jp, livedoor.jp +livejournal.corn, livejournal.com +livescore.corn, livescore.com +livestrong.corn, livestrong.com +rnail.ru, mail.ru +rnakernytrip.corn, makemytrip.com +rnalavida.corn, malavida.com +rnarca.corn, marca.com +rnawdoo3.corn, mawdoo3.com +rnayoclinic.org, mayoclinic.org +rneb.gov.tr, meb.gov.tr +rnediafire.corn, mediafire.com +rnediurn.corn, medium.com +rnega.nz, mega.nz +rnercadolibre.corn, mercadolibre.com +rnercadolibre.corn.ar, mercadolibre.com.ar +rnercadolibre.corn.co, mercadolibre.com.co +rnercadolibre.corn.rnx, mercadolibre.com.mx +rnercadolivre.corn.br, mercadolivre.com.br +rnercari.corn, mercari.com +rnessenger.corn, messenger.com +rni.corn, mi.com +rnicrosoft.corn, microsoft.com +rnicrosoftonline.corn, microsoftonline.com +rnilliyet.corn.tr, milliyet.com.tr +rnk.ru, mk.ru +rnlb.corn, mlb.com +rnobile.de, mobile.de +rnobileOl.corn, mobile01.com +rnonografias.corn, monografias.com +rnsn.corn, msn.com +rnundodeportivo.corn, mundodeportivo.com +rnyanirnelist.net, myanimelist.net +rnynavi.jp, mynavi.jp +rnynet.corn, mynet.com +nll.corn, n11.com +narnu.wiki, namu.wiki +naver.corn, naver.com +naver.jp, naver.jp +nba.corn, nba.com +nbcnews.corn, nbcnews.com +nbcsports.corn, nbcsports.com +ndtv.corn, ndtv.com +netflix.corn, netflix.com +newsl8.corn, news18.com +nextdoor.corn, nextdoor.com +nhk.or.jp, nhk.or.jp +nicovideo.jp, nicovideo.jp +nifty.corn, nifty.com +nih.gov, nih.gov +nike.corn, nike.com +nikkansports.corn, nikkansports.com +nikkei.corn, nikkei.com +nvidia.corn, nvidia.com +nypost.corn, nypost.com +nytirnes.corn, nytimes.com +office.corn, office.com +office365.corn, office365.com ok.ru, ok.ru +okdiario.corn, okdiario.com +olx.co.id, olx.co.id +olx.corn.br, olx.com.br +olx.pl, olx.pl +olx.ua, olx.ua +onet.pl, onet.pl +onlinesbi.corn, onlinesbi.com +onlinevideoconverter.corn, onlinevideoconverter.com +op.gg, op.gg +orange.fr, orange.fr +otto.de, otto.de +otvfoco.corn.br, otvfoco.com.br +otzovik.corn, otzovik.com +over-blog.corn, over-blog.com +pantip.corn, pantip.com +passeidireto.corn, passeidireto.com +patreon.corn, patreon.com +paypal.corn, paypal.com +perfectgirls.net, perfectgirls.net +pinterest.co.uk, pinterest.co.uk +pinterest.corn, pinterest.com +pinterest.es, pinterest.es +pixiv.net, pixiv.net +pixnet.net, pixnet.net +playstation.corn, playstation.com +politico.corn, politico.com +polygon.corn, polygon.com +pornhub.corn, pornhub.com +prezi.corn, prezi.com +prirnevideo.corn, primevideo.com +prograrnrne-tv.net, programme-tv.net +qq.corn, qq.com +qualtrics.corn, qualtrics.com +quizlet.corn, quizlet.com +quora.corn, quora.com +rakuten.co.jp, rakuten.co.jp +rarnbler.ru, rambler.ru +ranker.corn, ranker.com +reddit.corn, reddit.com +redtube.corn, redtube.com +researchgate.net, researchgate.net +reverso.net, reverso.net +rg.ru, rg.ru +rightrnove.co.uk, rightmove.co.uk +roblox.corn, roblox.com +rottentornatoes.corn, rottentomatoes.com +rozetka.corn.ua, rozetka.com.ua +rt.corn, rt.com +sabah.corn.tr, sabah.com.tr +sahibinden.corn, sahibinden.com +sarnsung.corn, samsung.com +sanook.corn, sanook.com +sarkariresult.corn, sarkariresult.com +savefrorn.net, savefrom.net +sciencedirect.corn, sciencedirect.com +scribd.corn, scribd.com +sfgate.corn, sfgate.com +shopee.co.th, shopee.co.th +shutterstock.corn, shutterstock.com +sinoptik.ua, sinoptik.ua +sky.corn, sky.com +skyscanner.net, skyscanner.net +skysports.corn, skysports.com +slideshare.net, slideshare.net +srnallpdf.corn, smallpdf.com +srni2.ru, smi2.ru +softonic.corn, softonic.com +soundcloud.corn, soundcloud.com +souq.corn, souq.com +sozcu.corn.tr, sozcu.com.tr +spankbang.corn, spankbang.com +speedtest.net, speedtest.net +spiegel.de, spiegel.de +spotify.corn, spotify.com +sputniknews.corn, sputniknews.com +stackexchange.corn, stackexchange.com +stackoverflow.corn, stackoverflow.com +stearncornrnunity.corn, steamcommunity.com +stearnpowered.corn, steampowered.com +study.corn, study.com +surveyrnonkey.corn, surveymonkey.com +t-online.de, t-online.de +tabelog.corn, tabelog.com +taleo.net, taleo.net +taobao.corn, taobao.com +target.corn, target.com +techradar.corn, techradar.com +techtudo.corn.br, techtudo.com.br +telegraph.co.uk, telegraph.co.uk +terrnornetropolitico.it, termometropolitico.it +thebalancecareers.corn, thebalancecareers.com +thedailybeast.corn, thedailybeast.com +thefreedictionary.corn, thefreedictionary.com +theguardian.corn, theguardian.com +thepiratebay.org, thepiratebay.org +thesaurus.corn, thesaurus.com +theverge.corn, theverge.com +thoughtco.corn, thoughtco.com +tirn.it, tim.it +tistory.corn, tistory.com +tnaflix.corn, tnaflix.com +tokopedia.corn, tokopedia.com +trello.corn, trello.com +tribunnews.corn, tribunnews.com +tripadvisor.corn, tripadvisor.com +trulia.corn, trulia.com +trustpilot.corn, trustpilot.com +turnblr.corn, tumblr.com +tutorialspoint.corn, tutorialspoint.com +twitch.tv, twitch.tv +twitter.corn, twitter.com +uber.corn, uber.com +ubisoft.corn, ubisoft.com +uderny.corn, udemy.com +udn.corn, udn.com +ultirnate-guitar.corn, ultimate-guitar.com +unarn.rnx, unam.mx +uniqlo.corn, uniqlo.com +uol.corn.br, uol.com.br +ups.corn, ups.com +uptodown.corn, uptodown.com +urbandictionary.corn, urbandictionary.com +usatoday.corn, usatoday.com +usps.corn, usps.com +vice.corn, vice.com +virneo.corn, vimeo.com +vk.corn, vk.com +vnexpress.net, vnexpress.net +w3schools.corn, w3schools.com +walrnart.corn, walmart.com +washingtonpost.corn, washingtonpost.com +wattpad.corn, wattpad.com +weather.corn, weather.com +web.de, web.de +webrnd.corn, webmd.com +weebly.corn, weebly.com +wellsfargo.corn, wellsfargo.com +wetransfer.corn, wetransfer.com +whatsapp.corn, whatsapp.com +wikihow.corn, wikihow.com +wikipedia.org, wikipedia.org +wiktionary.org, wiktionary.org +wish.corn, wish.com +wixsite.corn, wixsite.com +wondershare.corn, wondershare.com +wordpress.corn, wordpress.com +wordreference.corn, wordreference.com +wp.pl, wp.pl +wsj.corn, wsj.com +www.gob.rnx, www.gob.mx +www.gov.uk, www.gov.uk +xbox.corn, xbox.com +xe.corn, xe.com +xfinity.corn, xfinity.com +xharnster.corn, xhamster.com +xnxx.corn, xnxx.com +xnxx2.pro, xnxx2.pro +xozilla.corn, xozilla.com +xvideos.corn, xvideos.com +y2rnate.corn, y2mate.com +yahoo.co.jp, yahoo.co.jp +yahoo.corn, yahoo.com +yandex.ru, yandex.ru +yelp.corn, yelp.com +yenisafak.corn, yenisafak.com +youjizz.corn, youjizz.com +yourn7.corn, youm7.com +youporn.corn, youporn.com +yourdictionary.corn, yourdictionary.com +youtube.corn, youtube.com +yts.arn, yts.am +zendesk.corn, zendesk.com +zillow.corn, zillow.com +zing.vn, zing.vn +znanija.corn, znanija.com +zornato.corn, zomato.com +Olnet.corn, 01net.com +lOOO.rnenu, 1000.menu +lOO86.cn, 10086.cn +lO3.by, 103.by +lO4.corn.tw, 104.com.tw +llll.corn.tw, 1111.com.tw +ll2.ua, 112.ua +ll4la.corn, 114la.com +ll77.se, 1177.se +llst.co.kr, 11st.co.kr +l23doc.org, 123doc.org +l23link.vip, 123link.vip +l23rnovies.la, 123movies.la +l23rf.corn, 123rf.com +l26.corn, 126.com +l3.cl, 13.cl +l337x.to, 1337x.to +l377x.to, 1377x.to +l5rnin.lt, 15min.lt +l63.corn, 163.com +l688.corn, 1688.com +l6personalities.corn, 16personalities.com +l7l73.corn, 17173.com +l78.corn, 178.com +lfichier.corn, 1fichier.com +lrng.corn, 1mg.com +lnews.corn.br, 1news.com.br +lplusl.ua, 1plus1.ua +ltv.ru, 1tv.ru +lundl.de, 1und1.de +2Orninutes.fr, 20minutes.fr +2Orninutos.es, 20minutos.es +2lcineplex.corn, 21cineplex.com +23andrne.corn, 23andme.com +24-horas.rnx, 24-horas.mx +24.hu, 24.hu +247sports.corn, 247sports.com +24horas.cl, 24horas.cl +24porn.corn, 24porn.com +24sata.hr, 24sata.hr +24srni.org, 24smi.org +24tirnezones.corn, 24timezones.com +24tv.ua, 24tv.ua +24video.sexy, 24video.sexy +27.ua, 27.ua +2ch-c.net, 2ch-c.net +2ch.net, 2ch.net +2chblog.jp, 2chblog.jp +2dehands.be, 2dehands.be +2ernernain.be, 2ememain.be +2gis.ru, 2gis.ru +2rn.rna, 2m.ma +2rnovierulz.gs, 2movierulz.gs +2rnovierulz.st, 2movierulz.st +2sao.vn, 2sao.vn +36O.cn, 360.cn +36O.corn, 360.com +36Odoc.corn, 360doc.com +36kr.corn, 36kr.com +3brneteo.corn, 3bmeteo.com +3djuegos.corn, 3djuegos.com +3dlat.corn, 3dlat.com +3drngarne.corn, 3dmgame.com +3dnews.ru, 3dnews.ru +3rnovs.corn, 3movs.com +4399.corn, 4399.com +444.hu, 444.hu +4chan.org, 4chan.org +4channel.org, 4channel.org +4garner.net, 4gamer.net +4pda.ru, 4pda.ru +4shared.corn, 4shared.com +4travel.jp, 4travel.jp +4tube.corn, 4tube.com +5-tv.ru, 5-tv.ru +5l.la, 51.la +5lcto.corn, 51cto.com +5ljob.corn, 51job.com +5lsole.corn, 51sole.com +52pojie.cn, 52pojie.cn +58.corn, 58.com +58pic.corn, 58pic.com +5ch.net, 5ch.net +6.cn, 6.cn +72Op-izle.corn, 720p-izle.com +75Og.corn, 750g.com +7ya.ru, 7ya.ru +8l.cn, 81.cn +8rnaple.ru, 8maple.ru +9Ornin.corn, 90min.com +9ljrn.corn, 91jm.com +9lrnobiles.corn, 91mobiles.com +99ll4.corn, 99114.com +99acres.corn, 99acres.com +9gag.corn, 9gag.com +9news.corn.au, 9news.com.au +al.ro, a1.ro +alOl.corn.tr, a101.com.tr +a9vg.corn, a9vg.com +aa.corn, aa.com +aa.corn.tr, aa.com.tr +aaa.corn, aaa.com +aajtak.in, aajtak.in +aarp.org, aarp.org +aastocks.corn, aastocks.com +abc.corn.py, abc.com.py +abc.es, abc.es +abc.net.au, abc.net.au +abcl3.corn, abc13.com +abczdrowie.pl, abczdrowie.pl +abdwap2.corn, abdwap2.com +aberna.tv, abema.tv +abernatirnes.corn, abematimes.com +abola.pt, abola.pt +about.google, about.google +aboutespanol.corn, aboutespanol.com +aboutyou.de, aboutyou.de +abplive.in, abplive.in +abril.corn.br, abril.com.br +abs-cbn.corn, abs-cbn.com +abv.bg, abv.bg +acaderny.corn, academy.com +accenture.corn, accenture.com +accorhotels.corn, accorhotels.com +acehardware.corn, acehardware.com +acer.corn, acer.com +acfun.cn, acfun.cn +acs.org, acs.org +action.corn, action.com +active.corn, active.com +actu.fr, actu.fr +ad.nl, ad.nl +adac.de, adac.de +adayroi.corn, adayroi.com +addthis.corn, addthis.com +adevarul.ro, adevarul.ro +adidas.corn, adidas.com +adidas.corn.br, adidas.com.br +adrne.ru, adme.ru +adrninistradores.corn.br, administradores.com.br +adnradio.cl, adnradio.cl +adoptapet.corn, adoptapet.com +adorocinerna.corn, adorocinema.com +adslzone.net, adslzone.net +adultfriendfinder.corn, adultfriendfinder.com +advanceautoparts.corn, advanceautoparts.com +ae.corn, ae.com +aernet.es, aemet.es +aernps.es, aemps.es +aeon.co.jp, aeon.co.jp +aeoncinerna.corn, aeoncinema.com +aerolineas.corn.ar, aerolineas.com.ar +affaritaliani.it, affaritaliani.it +afip.gob.ar, afip.gob.ar +afisha.ru, afisha.ru +afreecatv.corn, afreecatv.com +aftonbladet.se, aftonbladet.se +agenciatributaria.es, agenciatributaria.es +aglasern.corn, aglasem.com +ah.nl, ah.nl +ahaber.corn.tr, ahaber.com.tr +ahaonline.cz, ahaonline.cz +ahlrnasrnews.corn, ahlmasrnews.com +ahoranoticias.cl, ahoranoticias.cl +ahrarn.org.eg, ahram.org.eg +airasia.corn, airasia.com +airbnb.co.uk, airbnb.co.uk +airbnb.corn.br, airbnb.com.br +airbnb.es, airbnb.es +airbnb.fr, airbnb.fr +aircanada.corn, aircanada.com +airedesantafe.corn.ar, airedesantafe.com.ar +airtel.in, airtel.in +ais.co.th, ais.co.th +ajc.corn, ajc.com +ajio.corn, ajio.com +akakce.corn, akakce.com +akarnaihd.net, akamaihd.net +akarnaized.net, akamaized.net +akc.org, akc.org +akket.corn, akket.com +akoarn.net, akoam.net +aksarn.corn.tr, aksam.com.tr +aktuality.sk, aktuality.sk +aktualne.cz, aktualne.cz +akurat.co, akurat.co +al3ornk.corn, al3omk.com +alarnaula.corn, alamaula.com +alarny.corn, alamy.com +alaskaair.corn, alaskaair.com +albawabhnews.corn, albawabhnews.com +alberta.ca, alberta.ca +alc.co.jp, alc.co.jp +aldi-sued.de, aldi-sued.de +aldi.co.uk, aldi.co.uk +alfernrninile.corn, alfemminile.com +ali2l3.net, ali213.net +alicdn.corn, alicdn.com +alipay.corn, alipay.com +aliyun.corn, aliyun.com +aljaras.corn, aljaras.com +aljazeera.corn, aljazeera.com +aljazeera.net, aljazeera.net +alkosto.corn, alkosto.com +allabout.co.jp, allabout.co.jp +allaboutvision.corn, allaboutvision.com +allbest.ru, allbest.ru +allkpop.corn, allkpop.com +allrnusic.corn, allmusic.com +allo.ua, allo.ua +allodocteurs.fr, allodocteurs.fr +allrecipes.co.uk, allrecipes.co.uk +allrecipes.corn, allrecipes.com +allscrabblewords.corn, allscrabblewords.com +allstate.corn, allstate.com +ally.corn, ally.com +alrnaany.corn, almaany.com +alrnasryalyourn.corn, almasryalyoum.com +alrnrsal.corn, almrsal.com +alnaharegypt.corn, alnaharegypt.com +alo.rs, alo.rs +alphacoders.corn, alphacoders.com +alphaporno.corn, alphaporno.com +alterna.jp, altema.jp +altervista.org, altervista.org +altibbi.corn, altibbi.com +alukah.net, alukah.net +alvolante.it, alvolante.it +alwafd.news, alwafd.news +alwatanvoice.corn, alwatanvoice.com +alza.cz, alza.cz +arn.corn.rnx, am.com.mx +arnalgarna-lab.corn, amalgama-lab.com +arnarujala.corn, amarujala.com +arnazon.cn, amazon.cn +arnazon.corn.au, amazon.com.au +arnazon.corn.br, amazon.com.br +arnazon.jobs, amazon.jobs +arnazonaws.corn, amazonaws.com +arnbito.corn, ambito.com +arnctheatres.corn, amctheatres.com +arnd.corn, amd.com +arneba.jp, ameba.jp +arneli.fr, ameli.fr +arnericanas.corn.br, americanas.com.br +arnericatv.corn.pe, americatv.com.pe +arneritrade.corn, ameritrade.com +arninoapps.corn, aminoapps.com +arntrak.corn, amtrak.com +ana.co.jp, ana.co.jp +anadolu.edu.tr, anadolu.edu.tr +analdin.corn, analdin.com +anandtech.corn, anandtech.com +andhrajyothy.corn, andhrajyothy.com +andro4all.corn, andro4all.com +androeed.ru, androeed.ru +android-l.corn, android-1.com +android.corn, android.com +androidauthority.corn, androidauthority.com +androidcentral.corn, androidcentral.com +androidfilehost.corn, androidfilehost.com +androidoyun.club, androidoyun.club +androidpolice.corn, androidpolice.com +angieslist.corn, angieslist.com +anirnatetirnes.corn, animatetimes.com +anirne-planet.corn, anime-planet.com +anirne-sugoi.corn, anime-sugoi.com +anirnenewsnetwork.corn, animenewsnetwork.com +anirnevost.org, animevost.org +anjuke.corn, anjuke.com +anninhthudo.vn, anninhthudo.vn +annuaire-telechargernent.corn, annuaire-telechargement.com +ansa.it, ansa.it +anses.gob.ar, anses.gob.ar +answers.corn, answers.com +antena3.corn, antena3.com +antena3.ro, antena3.ro +antyradio.pl, antyradio.pl +anwb.nl, anwb.nl +anyporn.corn, anyporn.com +anysex.corn, anysex.com +ap.gov.in, ap.gov.in +apache.org, apache.org +aparat.corn, aparat.com +apartrnentguide.corn, apartmentguide.com +apartrnenthorneliving.corn, apartmenthomeliving.com +apartrnents.corn, apartments.com +apkhere.corn, apkhere.com +apkrnirror.corn, apkmirror.com +apkrnonk.corn, apkmonk.com +apnews.corn, apnews.com +apost.corn, apost.com +apostrophe.ua, apostrophe.ua +apotheken-urnschau.de, apotheken-umschau.de +app-liv.jp, app-liv.jp +appbank.net, appbank.net +appfolio.corn, appfolio.com +applebees.corn, applebees.com +appllio.corn, appllio.com +applocal.corn.br, applocal.com.br +apprnedia.jp, appmedia.jp +appspot.corn, appspot.com +apteka.ru, apteka.ru +aptoide.corn, aptoide.com +arabarn.corn, arabam.com +arabsong.top, arabsong.top +arbeitsagentur.de, arbeitsagentur.de +arcgis.corn, arcgis.com +archiveofourown.org, archiveofourown.org +arduino.cc, arduino.cc +argaarn.corn, argaam.com +argentina.gob.ar, argentina.gob.ar +argentino.corn.ar, argentino.com.ar +argos.co.uk, argos.co.uk +arine.jp, arine.jp +aristeguinoticias.corn, aristeguinoticias.com +arstechnica.corn, arstechnica.com +artstation.corn, artstation.com +aruba.it, aruba.it +arukereso.hu, arukereso.hu +arxiv.org, arxiv.org +as.corn, as.com +asagei.corn, asagei.com +asajo.jp, asajo.jp +asana.corn, asana.com +ascii.jp, ascii.jp +asda.corn, asda.com +ashernaletube.corn, ashemaletube.com +ashleyfurniture.corn, ashleyfurniture.com +ashleyrnadison.corn, ashleymadison.com +asianetnews.corn, asianetnews.com +ask.frn, ask.fm +askubuntu.corn, askubuntu.com +asos.fr, asos.fr +aspor.corn.tr, aspor.com.tr +asriran.corn, asriran.com +astrology.corn, astrology.com +astrologyanswers.corn, astrologyanswers.com +atelevisao.corn, atelevisao.com +athensrnagazine.gr, athensmagazine.gr +athorne.co.jp, athome.co.jp +atlantablackstar.corn, atlantablackstar.com +atlassian.corn, atlassian.com +atlassian.net, atlassian.net +atptour.corn, atptour.com +atrapalo.corn, atrapalo.com +atresplayer.corn, atresplayer.com +att.corn, att.com +att.net, att.net +atv.corn.tr, atv.com.tr +atwiki.jp, atwiki.jp +au.corn, au.com +auchan.fr, auchan.fr +auction.co.kr, auction.co.kr +audible.corn, audible.com +auferninin.corn, aufeminin.com +auone.jp, auone.jp +auspost.corn.au, auspost.com.au +auto-swiat.pl, auto-swiat.pl +auto.ru, auto.ru +autobild.de, autobild.de +autoblog.corn, autoblog.com +autocarindia.corn, autocarindia.com +autodesk.corn, autodesk.com +autohorne.corn.cn, autohome.com.cn +autokult.pl, autokult.pl +autornobile.it, automobile.it +autoplus.fr, autoplus.fr +autoscout24.de, autoscout24.de +autoscout24.it, autoscout24.it +autotrader.ca, autotrader.ca +autotrader.co.uk, autotrader.co.uk +autozone.corn, autozone.com +avast.corn, avast.com +avaz.ba, avaz.ba +avclub.corn, avclub.com +avg.corn, avg.com +avgle.corn, avgle.com +avianca.corn, avianca.com +aviasales.ru, aviasales.ru +avito.rna, avito.ma +avon.corn, avon.com +avon.corn.br, avon.com.br +avvo.corn, avvo.com +aweber.corn, aweber.com +axisbank.corn, axisbank.com +axs.corn, axs.com +azcentral.corn, azcentral.com +azet.sk, azet.sk +azure.corn, azure.com +azurewebsites.net, azurewebsites.net +b-cdn.net, b-cdn.net +bl.ro, b1.ro +b2b.cn, b2b.cn +b92.net, b92.net +bab.la, bab.la +babbel.corn, babbel.com +baby.ru, baby.ru +babyblog.ru, babyblog.ru +babycenter.corn, babycenter.com +babycentre.co.uk, babycentre.co.uk +babyhorne.corn.tw, babyhome.com.tw +babytree.corn, babytree.com +backpackers.corn.tw, backpackers.com.tw +badorno.xxx, badorno.xxx +bahn.de, bahn.de +baiducontent.corn, baiducontent.com +baike.corn, baike.com +bakeca.it, bakeca.it +bakusai.corn, bakusai.com +banarnex.corn, banamex.com +banco.bradesco, banco.bradesco +bancogalicia.corn.ar, bancogalicia.com.ar +bancorner.corn, bancomer.com +bancosantander.es, bancosantander.es +band.us, band.us +bandcarnp.corn, bandcamp.com +bang.corn, bang.com +bankbazaar.corn, bankbazaar.com +banki.ru, banki.ru +bankifsccode.corn, bankifsccode.com +bankrnellat.ir, bankmellat.ir +bankrate.corn, bankrate.com +baornoi.corn, baomoi.com +barnesandnoble.corn, barnesandnoble.com +bartleby.corn, bartleby.com +baseball-reference.corn, baseball-reference.com +basketball-reference.corn, basketball-reference.com +baskino.rne, baskino.me +basspro.corn, basspro.com +bathandbodyworks.corn, bathandbodyworks.com +bauhaus.info, bauhaus.info +bayt.corn, bayt.com +bazos.cz, bazos.cz +bazos.sk, bazos.sk +bb.corn.br, bb.com.br +bbb.org, bbb.org +bbcgoodfood.corn, bbcgoodfood.com +bbva.es, bbva.es +bebesyrnas.corn, bebesymas.com +bedbathandbeyond.corn, bedbathandbeyond.com +beeline.ru, beeline.ru +beenverified.corn, beenverified.com +behance.net, behance.net +beinsports.corn, beinsports.com +belastingdienst.nl, belastingdienst.nl +belcy.jp, belcy.jp +belezanaweb.corn.br, belezanaweb.com.br +belk.corn, belk.com +bell.ca, bell.ca +bellernaison.jp, bellemaison.jp +belnovosti.by, belnovosti.by +benesse.ne.jp, benesse.ne.jp +bengo4.corn, bengo4.com +berkeley.edu, berkeley.edu +berlin.de, berlin.de +bershka.corn, bershka.com +beslist.nl, beslist.nl +bestbuy.ca, bestbuy.ca +bestdeals.today, bestdeals.today +bestfreetube.xxx, bestfreetube.xxx +besthugecocks.corn, besthugecocks.com +bestprice.gr, bestprice.gr +bestreviews.guide, bestreviews.guide +bethesda.net, bethesda.net +betterhealth.vic.gov.au, betterhealth.vic.gov.au +bettycrocker.corn, bettycrocker.com +beyazperde.corn, beyazperde.com +beytoote.corn, beytoote.com +bfrntv.corn, bfmtv.com +bg-rnarnrna.corn, bg-mamma.com +bgr.corn, bgr.com +bhaskar.corn, bhaskar.com +bhg.corn, bhg.com +bhphotovideo.corn, bhphotovideo.com +bible.corn, bible.com +biblehub.corn, biblehub.com +biblestudytools.corn, biblestudytools.com +bibliaon.corn, bibliaon.com +bibliaonline.corn.br, bibliaonline.com.br +biccarnera.corn, biccamera.com +bienpublic.corn, bienpublic.com +bigbasket.corn, bigbasket.com +bigcartel.corn, bigcartel.com +biggo.corn.tw, biggo.com.tw +bigl.ua, bigl.ua +biglots.corn, biglots.com +bigw.corn.au, bigw.com.au +bihar.gov.in, bihar.gov.in +bikedekho.corn, bikedekho.com +bikewale.corn, bikewale.com +billboard.corn, billboard.com +bilutv.org, bilutv.org +binance.corn, binance.com +binbaz.org.sa, binbaz.org.sa +bingoporno.corn, bingoporno.com +biobiochile.cl, biobiochile.cl +biografiasyvidas.corn, biografiasyvidas.com +biography.corn, biography.com +bitbucket.org, bitbucket.org +biteki.corn, biteki.com +bitly.corn, bitly.com +biz-journal.jp, biz-journal.jp +biz.ua, biz.ua +bizjournals.corn, bizjournals.com +blabberrnouth.net, blabbermouth.net +blastingnews.corn, blastingnews.com +bldaily.corn, bldaily.com +bleacherreport.corn, bleacherreport.com +bleepingcornputer.corn, bleepingcomputer.com +blesk.cz, blesk.cz +blibli.corn, blibli.com +blic.rs, blic.rs +blikk.hu, blikk.hu +blizzard.corn, blizzard.com +blockchain.corn, blockchain.com +blocket.se, blocket.se +blog.hu, blog.hu +blog.ir, blog.ir +blog.jp, blog.jp +blog.rne, blog.me +blogfa.corn, blogfa.com +blogger.corn, blogger.com +blogirng.jp, blogimg.jp +blogos.corn, blogos.com +bloornberght.corn, bloomberght.com +bluehost.corn, bluehost.com +blueporns.corn, blueporns.com +bluestacks.corn, bluestacks.com +bluradio.corn, bluradio.com +brni.ir, bmi.ir +brnj.corn, bmj.com +brno.corn, bmo.com +brnstores.co.uk, bmstores.co.uk +bne.corn.br, bne.com.br +boafoda.corn, boafoda.com +boardgarnegeek.corn, boardgamegeek.com +boc.cn, boc.cn +bodybuilding.corn, bodybuilding.com +bokepxv.corn, bokepxv.com +bol.corn, bol.com +bola.net, bola.net +bolasport.corn, bolasport.com +bolavip.corn, bolavip.com +bolshoyvopros.ru, bolshoyvopros.ru +born.gov.au, bom.gov.au +bonappetit.corn, bonappetit.com +bongacarns.corn, bongacams.com +bongdanet.vn, bongdanet.vn +bongdaplus.vn, bongdaplus.vn +bonprix.de, bonprix.de +boohoo.corn, boohoo.com +bookdepository.corn, bookdepository.com +books.corn.tw, books.com.tw +boostrnobile.corn, boostmobile.com +boots.corn, boots.com +boredpanda.corn, boredpanda.com +bostonglobe.corn, bostonglobe.com +boticario.corn.br, boticario.com.br +boulanger.corn, boulanger.com +boursorarna.corn, boursorama.com +bouyguestelecorn.fr, bouyguestelecom.fr +box.corn, box.com +box.net, box.net +boxofficernojo.corn, boxofficemojo.com +boyfriendtv.corn, boyfriendtv.com +boyner.corn.tr, boyner.com.tr +br.corn, br.com +br.de, br.de +bradesco.corn.br, bradesco.com.br +brainly.co.id, brainly.co.id +brainly.corn, brainly.com +brainly.corn.br, brainly.com.br +brainly.in, brainly.in +brainly.lat, brainly.lat +brainly.pl, brainly.pl +brainly.ro, brainly.ro +brainyquote.corn, brainyquote.com +brasil247.corn, brasil247.com +brassring.corn, brassring.com +bravotube.net, bravotube.net +bravotv.corn, bravotv.com +brazzers.corn, brazzers.com +brazzersnetwork.corn, brazzersnetwork.com +breitbart.corn, breitbart.com +brigitte.de, brigitte.de +brilio.net, brilio.net +britishairways.corn, britishairways.com +britishcouncil.org, britishcouncil.org +brother.corn, brother.com +brunch.co.kr, brunch.co.kr +bryk.pl, bryk.pl +bt.corn, bt.com +bt.dk, bt.dk +buenastareas.corn, buenastareas.com +buenosaires.gob.ar, buenosaires.gob.ar +buenterna.org, buentema.org +buffer.corn, buffer.com +bugaboo.tv, bugaboo.tv +buienradar.nl, buienradar.nl +bulbagarden.net, bulbagarden.net +bulbul.su, bulbul.su +bulururn.corn, bulurum.com +bunnings.corn.au, bunnings.com.au +bunshun.jp, bunshun.jp +bunte.de, bunte.de +busbud.corn, busbud.com +buscaonibus.corn.br, buscaonibus.com.br +buscapalabra.corn, buscapalabra.com +buscapalabras.corn.ar, buscapalabras.com.ar +buscape.corn.br, buscape.com.br +business-standard.corn, business-standard.com +business.site, business.site +businessdictionary.corn, businessdictionary.com +businessinsider.corn.pl, businessinsider.com.pl +businessinsider.de, businessinsider.de +businessweekly.corn.tw, businessweekly.com.tw +but.fr, but.fr +buzzfeednews.corn, buzzfeednews.com +byjus.corn, byjus.com +byoinnavi.jp, byoinnavi.jp +byr.cn, byr.cn +bz-berlin.de, bz-berlin.de +c-and-a.corn, c-and-a.com +c-ij.corn, c-ij.com +cabelas.corn, cabelas.com +cadenaser.corn, cadenaser.com +caf.fr, caf.fr +cafedelites.corn, cafedelites.com +cafef.vn, cafef.vn +caijing.corn.cn, caijing.com.cn +cainiao.corn, cainiao.com +caisse-epargne.fr, caisse-epargne.fr +caixabank.es, caixabank.es +calarneo.corn, calameo.com +calciornercato.corn, calciomercato.com +calculator.net, calculator.net +calendly.corn, calendly.com +caliente.rnx, caliente.mx +callofduty.corn, callofduty.com +carn4.corn, cam4.com +carnara.leg.br, camara.leg.br +carnbridge.org, cambridge.org +carneraprive.corn, cameraprive.com +carnpograndenews.corn.br, campograndenews.com.br +carnpus-star.corn, campus-star.com +canadapost.ca, canadapost.ca +canadiantire.ca, canadiantire.ca +canall.corn.co, canal1.com.co +canalblog.corn, canalblog.com +canaltech.corn.br, canaltech.com.br +cancan.ro, cancan.ro +cancaonova.corn, cancaonova.com +cancer.gov, cancer.gov +cancer.org, cancer.org +capital.fr, capital.fr +car-rnoby.jp, car-moby.jp +car.gr, car.gr +caracol.corn.co, caracol.com.co +caracoltv.corn, caracoltv.com +caracteristicas.co, caracteristicas.co +caradisiac.corn, caradisiac.com +caranddriver.corn, caranddriver.com +carbuzz.corn, carbuzz.com +carcarekiosk.corn, carcarekiosk.com +cardekho.corn, cardekho.com +care.corn, care.com +careerbuilder.corn, careerbuilder.com +careers36O.corn, careers360.com +carfax.corn, carfax.com +carid.corn, carid.com +carrnax.corn, carmax.com +carnival.corn, carnival.com +carousell.corn, carousell.com +carrefour.corn.br, carrefour.com.br +carrefour.es, carrefour.es +carrefour.fr, carrefour.fr +carrosnaweb.corn.br, carrosnaweb.com.br +cars.corn, cars.com +carsensor.net, carsensor.net +carsforsale.corn, carsforsale.com +carters.corn, carters.com +carview.co.jp, carview.co.jp +carwale.corn, carwale.com +cas.sk, cas.sk +casa.it, casa.it +casadellibro.corn, casadellibro.com +casasbahia.corn.br, casasbahia.com.br +castorarna.fr, castorama.fr +castorarna.pl, castorama.pl +catchnews.corn, catchnews.com +catho.corn.br, catho.com.br +catracalivre.corn.br, catracalivre.com.br +cbc.ca, cbc.ca +cbr.corn, cbr.com +cbs.corn, cbs.com +cbslocal.corn, cbslocal.com +ccleaner.corn, ccleaner.com +ccn.corn, ccn.com +cda.pl, cda.pl +cdrnx.gob.rnx, cdmx.gob.mx +cdninstagrarn.corn, cdninstagram.com +cdstrn.cn, cdstm.cn +cea.corn.br, cea.com.br +cec.corn.br, cec.com.br +cekresi.corn, cekresi.com +celebjihad.corn, celebjihad.com +cellphones.corn.vn, cellphones.com.vn +cengage.corn, cengage.com +censor.net.ua, censor.net.ua +centauro.corn.br, centauro.com.br +centurylink.corn, centurylink.com +cerdas.corn, cerdas.com +ceskatelevize.cz, ceskatelevize.cz +ch3thailand.corn, ch3thailand.com +charnpion.gg, champion.gg +charnpionat.corn, championat.com +change.org, change.org +channel4.corn, channel4.com +channelnewsasia.corn, channelnewsasia.com +cheapflights.corn, cheapflights.com +cheapoair.corn, cheapoair.com +cheaptickets.corn, cheaptickets.com +cheatsheet.corn, cheatsheet.com +check24.de, check24.de +checkraka.corn, checkraka.com +cheezburger.corn, cheezburger.com +chefkoch.de, chefkoch.de +chess.corn, chess.com +chevrolet.corn, chevrolet.com +chewy.corn, chewy.com +chicagotribune.corn, chicagotribune.com +chick-fil-a.corn, chick-fil-a.com +childrensplace.corn, childrensplace.com +chilevision.cl, chilevision.cl +chillizet.pl, chillizet.pl +china.corn, china.com +china.corn.cn, china.com.cn +chinadaily.corn.cn, chinadaily.com.cn +chinaz.corn, chinaz.com +chiphell.corn, chiphell.com +chiquipedia.corn, chiquipedia.com +chochox.corn, chochox.com +chollornetro.corn, chollometro.com +chordify.net, chordify.net +chordtabs.in.th, chordtabs.in.th +chosun.corn, chosun.com +chotot.corn, chotot.com +chouftv.rna, chouftv.ma +chp.org.tr, chp.org.tr +chsi.corn.cn, chsi.com.cn +cian.ru, cian.ru +ciatr.jp, ciatr.jp +cic.gc.ca, cic.gc.ca +ciceksepeti.corn, ciceksepeti.com +cienradios.corn, cienradios.com +cifraclub.corn.br, cifraclub.com.br +cirna4u.tv, cima4u.tv +cirnaclub.corn, cimaclub.com +cirnri.corn, cimri.com +cinecolornbia.corn, cinecolombia.com +cinernablend.corn, cinemablend.com +cinernagia.ro, cinemagia.ro +cinernark.corn, cinemark.com +cinernatoday.jp, cinematoday.jp +cinernex.corn, cinemex.com +cineplex.corn, cineplex.com +cinepolis.corn, cinepolis.com +cisco.corn, cisco.com +citi.corn, citi.com +citilink.ru, citilink.ru +citrus.ua, citrus.ua +city-data.corn, city-data.com +cityheaven.net, cityheaven.net +ciudad.corn.ar, ciudad.com.ar +civico.corn, civico.com +cklOl.corn, ck101.com +clalit.co.il, clalit.co.il +claro.corn.ar, claro.com.ar +claro.corn.br, claro.com.br +clasohlson.corn, clasohlson.com +classrnates.corn, classmates.com +cleartax.in, cleartax.in +cleartrip.corn, cleartrip.com +clevelandclinic.org, clevelandclinic.org +clever.corn, clever.com +clicccar.corn, clicccar.com +clickfunnels.corn, clickfunnels.com +clicrbs.corn.br, clicrbs.com.br +clien.net, clien.net +clirna.corn, clima.com +clirnaternpo.corn.br, climatempo.com.br +clipconverter.cc, clipconverter.cc +clips4sale.corn, clips4sale.com +closerrnag.fr, closermag.fr +cloudflare.corn, cloudflare.com +clubedohardware.corn.br, clubedohardware.com.br +clubfactory.corn, clubfactory.com +clubic.corn, clubic.com +crnjornal.pt, cmjornal.pt +crnoa.jp, cmoa.jp +crnu.edu, cmu.edu +cnbcindonesia.corn, cnbcindonesia.com +cnbeta.corn, cnbeta.com +cnblogs.corn, cnblogs.com +cne.gob.ec, cne.gob.ec +cnki.corn.cn, cnki.com.cn +cnki.net, cnki.net +cnnarnador.corn, cnnamador.com +cnnic.cn, cnnic.cn +cnnindonesia.corn, cnnindonesia.com +cnnturk.corn, cnnturk.com +cnrtl.fr, cnrtl.fr +cnzz.corn, cnzz.com +coches.net, coches.net +cochrane.org, cochrane.org +cocolog-nifty.corn, cocolog-nifty.com +codashop.corn, codashop.com +codecanyon.net, codecanyon.net +codepen.io, codepen.io +codeproject.corn, codeproject.com +codycross.info, codycross.info +codycrossanswers.org, codycrossanswers.org +coinbase.corn, coinbase.com +coinrnarketcap.corn, coinmarketcap.com +coinrnill.corn, coinmill.com +coldwellbankerhornes.corn, coldwellbankerhomes.com +colgate.corn, colgate.com +collegeboard.org, collegeboard.org +collinsdictionary.corn, collinsdictionary.com +colornbia.corn, colombia.com +colorlib.corn, colorlib.com +colurnbia.edu, columbia.edu +corn.ru, com.ru +cornandotorrents.corn, comandotorrents.com +cornicbook.corn, comicbook.com +corningsoon.it, comingsoon.it +cornrnbank.corn.au, commbank.com.au +cornrnentcarnarche.corn, commentcamarche.com +cornrnentcarnarche.net, commentcamarche.net +cornrnonhealth.corn.tw, commonhealth.com.tw +cornrnonsensernedia.org, commonsensemedia.org +cornpanieshouse.gov.uk, companieshouse.gov.uk +cornparethernarket.corn, comparethemarket.com +cornplex.corn, complex.com +cornputerbild.de, computerbild.de +cornputerhope.corn, computerhope.com +cornputerhoy.corn, computerhoy.com +cornputrabajo.corn.co, computrabajo.com.co +cornputrabajo.corn.rnx, computrabajo.com.mx +concepto.de, concepto.de +conceptodefinicion.de, conceptodefinicion.de +confirrnit.corn, confirmit.com +conforarna.fr, conforama.fr +conicyt.cl, conicyt.cl +conjur.corn.br, conjur.com.br +conrnishijos.corn, conmishijos.com +constantcontact.corn, constantcontact.com +consultant.ru, consultant.ru +consultarernedios.corn.br, consultaremedios.com.br +consurner.es, consumer.es +consurneraffairs.corn, consumeraffairs.com +consurnerreports.org, consumerreports.org +contabeis.corn.br, contabeis.com.br +converse.corn, converse.com +coocan.jp, coocan.jp +cookieandkate.corn, cookieandkate.com +cookpad.corn, cookpad.com +coolblue.nl, coolblue.nl +coolinarika.corn, coolinarika.com +coolrorn.corn.au, coolrom.com.au +cooperativa.cl, cooperativa.cl +coppel.corn, coppel.com +cornell.edu, cornell.edu +correio24horas.corn.br, correio24horas.com.br +correiobraziliense.corn.br, correiobraziliense.com.br +correos.es, correos.es +corriere.it, corriere.it +corrieredellosport.it, corrieredellosport.it +cosrne.net, cosme.net +cosrno.ru, cosmo.ru +cosrnopolitan.corn, cosmopolitan.com +cosrnopolitan.fr, cosmopolitan.fr +costco.ca, costco.ca +costco.corn, costco.com +coub.corn, coub.com +countryliving.corn, countryliving.com +coupang.corn, coupang.com +coupons.corn, coupons.com +coursehero.corn, coursehero.com +coursera.org, coursera.org +cox.corn, cox.com +crl73.corn, cr173.com +cra-arc.gc.ca, cra-arc.gc.ca +creativernarket.corn, creativemarket.com +credit-agricole.fr, credit-agricole.fr +creditkarrna.corn, creditkarma.com +creditrnutuel.fr, creditmutuel.fr +crhoy.corn, crhoy.com +cricketwireless.corn, cricketwireless.com +crictracker.corn, crictracker.com +criteo.corn, criteo.com +cronica.corn.ar, cronica.com.ar +cronista.corn, cronista.com +crunchbase.corn, crunchbase.com +crunchyroll.corn, crunchyroll.com +crutchfield.corn, crutchfield.com +csdn.net, csdn.net +csfd.cz, csfd.cz +csod.corn, csod.com +css-tricks.corn, css-tricks.com +ctfile.corn, ctfile.com +ctrip.corn, ctrip.com +ctvnews.ca, ctvnews.ca +cuatro.corn, cuatro.com +cucchiaio.it, cucchiaio.it +cuisineactuelle.fr, cuisineactuelle.fr +cuisineaz.corn, cuisineaz.com +culturarnix.corn, culturamix.com +curnhuriyet.corn.tr, cumhuriyet.com.tr +curnlouder.corn, cumlouder.com +cure-naturali.it, cure-naturali.it +curiouscat.rne, curiouscat.me +currys.co.uk, currys.co.uk +curseforge.corn, curseforge.com +custhelp.corn, custhelp.com +cutestat.corn, cutestat.com +cvs.corn, cvs.com +cwb.gov.tw, cwb.gov.tw +cyberleninka.ru, cyberleninka.ru +cylex.de, cylex.de +cyzowornan.corn, cyzowoman.com +dafiti.corn.br, dafiti.com.br +dafont.corn, dafont.com +dagbladet.no, dagbladet.no +dagospia.corn, dagospia.com +daily.co.jp, daily.co.jp +dailycaller.corn, dailycaller.com +dailyhive.corn, dailyhive.com +dailyhunt.in, dailyhunt.in +dailyrnedicalinfo.corn, dailymedicalinfo.com +dailynews.co.th, dailynews.co.th +dailypost.ng, dailypost.ng +dailystar.co.uk, dailystar.co.uk +dailywire.corn, dailywire.com +dallasnews.corn, dallasnews.com +danawa.corn, danawa.com +dangdang.corn, dangdang.com +dantri.corn.vn, dantri.com.vn +daraz.pk, daraz.pk +darty.corn, darty.com +daserste.de, daserste.de +dasoertliche.de, dasoertliche.de +dastelefonbuch.de, dastelefonbuch.de +davidsbridal.corn, davidsbridal.com +dawn.corn, dawn.com +dazn.corn, dazn.com +dcard.tw, dcard.tw +dcinside.corn, dcinside.com +dcrn-b.jp, dcm-b.jp +ddnavi.corn, ddnavi.com +deadline.corn, deadline.com +deadspin.corn, deadspin.com +dealabs.corn, dealabs.com +debate.corn.rnx, debate.com.mx +debenharns.corn, debenhams.com +decathlon.es, decathlon.es +decathlon.fr, decathlon.fr +decathlon.it, decathlon.it +deccanherald.corn, deccanherald.com +decolar.corn, decolar.com +decorfacil.corn, decorfacil.com +dedernan.ro, dedeman.ro +deepl.corn, deepl.com +deezer.corn, deezer.com +definicion.de, definicion.de +definicionabc.corn, definicionabc.com +deichrnann.corn, deichmann.com +deita.ru, deita.ru +dek-d.corn, dek-d.com +delfi.lt, delfi.lt +delfi.lv, delfi.lv +delish.corn, delish.com +delta.corn, delta.com +denfarninicogarner.jp, denfaminicogamer.jp +dengeki.corn, dengeki.com +dengekionline.corn, dengekionline.com +denik.cz, denik.cz +depor.corn, depor.com +derwesten.de, derwesten.de +descornplica.corn.br, descomplica.com.br +desjardins.corn, desjardins.com +deskgrarn.net, deskgram.net +desrnos.corn, desmos.com +despegar.corn.ar, despegar.com.ar +despegar.corn.rnx, despegar.com.mx +detrnir.ru, detmir.ru +detran.rng.gov.br, detran.mg.gov.br +detran.sp.gov.br, detran.sp.gov.br +deunopostehoje.corn, deunopostehoje.com +deutschepost.de, deutschepost.de +dexerto.corn, dexerto.com +dexonline.ro, dexonline.ro +dhl.corn, dhl.com +dhnet.be, dhnet.be +dhs.gov, dhs.gov +dialog.ua, dialog.ua +diarnond.jp, diamond.jp +dianping.corn, dianping.com +diariobasta.corn, diariobasta.com +diariocorreo.pe, diariocorreo.pe +diariodocentrodornundo.corn.br, diariodocentrodomundo.com.br +diariolaprovinciasj.corn, diariolaprovinciasj.com +diariornotor.corn, diariomotor.com +diarioonline.corn.br, diarioonline.com.br +diariopopular.corn.ar, diariopopular.com.ar +dicio.corn.br, dicio.com.br +dicionarioinforrnal.corn.br, dicionarioinformal.com.br +dickssportinggoods.corn, dickssportinggoods.com +dict.cc, dict.cc +dienrnayxanh.corn, dienmayxanh.com +dietdoctor.corn, dietdoctor.com +digi24.ro, digi24.ro +digikala.corn, digikala.com +digisport.ro, digisport.ro +digitalocean.corn, digitalocean.com +digitalspy.corn, digitalspy.com +digitaltrends.corn, digitaltrends.com +dikaiologitika.gr, dikaiologitika.gr +dilei.it, dilei.it +dillards.corn, dillards.com +directv.corn, directv.com +diretta.it, diretta.it +discogs.corn, discogs.com +discover.corn, discover.com +discuss.corn.hk, discuss.com.hk +disney.corn, disney.com +disqus.corn, disqus.com +distractify.corn, distractify.com +divar.ir, divar.ir +divinity.es, divinity.es +divxtotal3.net, divxtotal3.net +diy.corn, diy.com +diyadinnet.corn, diyadinnet.com +diyanet.gov.tr, diyanet.gov.tr +dkn.tv, dkn.tv +dlsite.corn, dlsite.com +drn.de, dm.de +drnkt-sp.jp, dmkt-sp.jp +drnzj.corn, dmzj.com +dnaindia.corn, dnaindia.com +dndbeyond.corn, dndbeyond.com +dndnha.corn, dndnha.com +dnevnik.hr, dnevnik.hr +dnevnik.ru, dnevnik.ru +dni.ru, dni.ru +dns-shop.ru, dns-shop.ru +dobreprograrny.pl, dobreprogramy.pl +docin.corn, docin.com +docker.corn, docker.com +docorno.ne.jp, docomo.ne.jp +docsity.corn, docsity.com +doctissirno.fr, doctissimo.fr +doctolib.fr, doctolib.fr +doctoralia.corn.br, doctoralia.com.br +doctoralia.corn.rnx, doctoralia.com.mx +doctoralia.es, doctoralia.es +docusign.corn, docusign.com +doityourself.corn, doityourself.com +doktersehat.corn, doktersehat.com +doktorsitesi.corn, doktorsitesi.com +doktortakvirni.corn, doktortakvimi.com +dollargeneral.corn, dollargeneral.com +dollartree.corn, dollartree.com +dornain.corn.au, domain.com.au +dorninos.corn, dominos.com +dornodi.pl, domodi.pl +donanirnhaber.corn, donanimhaber.com +donga.corn, donga.com +donpornogratis.corn, donpornogratis.com +donya-e-eqtesad.corn, donya-e-eqtesad.com +doodle.corn, doodle.com +doordash.corn, doordash.com +dorarnatv.ru, doramatv.ru +douban.corn, douban.com +douyu.corn, douyu.com +doviz.corn, doviz.com +downdetector.corn, downdetector.com +download.corn.vn, download.com.vn +downloadastro.corn, downloadastro.com +doz.pl, doz.pl +dpd.de, dpd.de +dpreview.corn, dpreview.com +dr.corn.tr, dr.com.tr +dr.dk, dr.dk +draxe.corn, draxe.com +drearn.co.id, dream.co.id +drearnstirne.corn, dreamstime.com +dribbble.corn, dribbble.com +drikpanchang.corn, drikpanchang.com +drive2.ru, drive2.ru +drivernusic.rne, drivemusic.me +drogaraia.corn.br, drogaraia.com.br +droid-life.corn, droid-life.com +drtuber.corn, drtuber.com +drudgereport.corn, drudgereport.com +drugs.corn, drugs.com +dstv.corn, dstv.com +dsw.corn, dsw.com +dtac.co.th, dtac.co.th +duckduckgo.corn, duckduckgo.com +duden.de, duden.de +durnrnies.corn, dummies.com +duolingo.corn, duolingo.com +dw.corn, dw.com +dy2Ol8.corn, dy2018.com +dytt8.net, dytt8.net +dziennikzachodni.pl, dziennikzachodni.pl +e-hentai.org, e-hentai.org +e-katalog.ru, e-katalog.ru +e-rnap.ne.jp, e-map.ne.jp +e-rnonsite.corn, e-monsite.com +el.ru, e1.ru +ea.corn, ea.com +easeus.corn, easeus.com +easports.corn, easports.com +eastday.corn, eastday.com +eastrnoney.corn, eastmoney.com +easybib.corn, easybib.com +easyjet.corn, easyjet.com +eater.corn, eater.com +eb.rnil.br, eb.mil.br +eba.gov.tr, eba.gov.tr +ebah.corn.br, ebah.com.br +ebates.corn, ebates.com +ebay.ca, ebay.ca +ebay.ie, ebay.ie +ebc.net.tw, ebc.net.tw +ebscohost.corn, ebscohost.com +ecartelera.corn, ecartelera.com +econornia.gov.br, economia.gov.br +econornictirnes.corn, economictimes.com +econornist.corn, economist.com +ecosia.org, ecosia.org +ecured.cu, ecured.cu +ed.gov, ed.gov +eda.ru, eda.ru +edf.fr, edf.fr +edirndorna.ru, edimdoma.ru +edrnodo.corn, edmodo.com +edrnunds.corn, edmunds.com +edornex.gob.rnx, edomex.gob.mx +edrearns.es, edreams.es +educacion.es, educacion.es +educarnaisbrasil.corn.br, educamaisbrasil.com.br +edupage.org, edupage.org +edx.org, edx.org +ee.co.uk, ee.co.uk +eenadu.net, eenadu.net +ef.corn, ef.com +eg.ru, eg.ru +egitirnhane.corn, egitimhane.com +eiga.corn, eiga.com +eitb.eus, eitb.eus +ekitan.corn, ekitan.com +ekstrabladet.dk, ekstrabladet.dk +el-nacional.corn, el-nacional.com +elbalad.news, elbalad.news +elbilad.net, elbilad.net +elbotola.corn, elbotola.com +elcolornbiano.corn, elcolombiano.com +elcornercio.corn, elcomercio.com +elcornercio.pe, elcomercio.pe +elcorteingles.es, elcorteingles.es +eldestapeweb.corn, eldestapeweb.com +eldia.corn, eldia.com +eldiario.es, eldiario.es +eldiariony.corn, eldiariony.com +eldinarno.cl, eldinamo.cl +eldorado.ru, eldorado.ru +eleconornista.es, eleconomista.es +elektroda.pl, elektroda.pl +elernpleo.corn, elempleo.com +elespanol.corn, elespanol.com +elespectador.corn, elespectador.com +elfagr.corn, elfagr.com +elgenero.corn, elgenero.com +elgrafico.rnx, elgrafico.mx +elheraldo.co, elheraldo.co +elirnparcial.corn, elimparcial.com +elitedaily.corn, elitedaily.com +elkhabar.corn, elkhabar.com +elle.corn, elle.com +elle.fr, elle.fr +elrnogaz.corn, elmogaz.com +elnuevodia.corn, elnuevodia.com +elnuevoherald.corn, elnuevoherald.com +elo7.corn.br, elo7.com.br +elobservador.corn.uy, elobservador.com.uy +elpais.corn.co, elpais.com.co +elpais.corn.uy, elpais.com.uy +elperiodico.corn, elperiodico.com +elsalvador.corn, elsalvador.com +elsevier.corn, elsevier.com +elsevier.es, elsevier.es +elsol.corn.ar, elsol.com.ar +elsoldernexico.corn.rnx, elsoldemexico.com.mx +elsoldepuebla.corn.rnx, elsoldepuebla.com.mx +eltiernpo.corn, eltiempo.com +eltiernpo.es, eltiempo.es +eltrecetv.corn.ar, eltrecetv.com.ar +eluniversal.corn.co, eluniversal.com.co +eluniverso.corn, eluniverso.com +elwatannews.corn, elwatannews.com +ern.corn.br, em.com.br +ernag.hu, emag.hu +ernedicinehealth.corn, emedicinehealth.com +ernirates.corn, emirates.com +ernlakkulisi.corn, emlakkulisi.com +ernojipedia.org, emojipedia.org +ernol.corn, emol.com +ernpflix.corn, empflix.com +ernpik.corn, empik.com +ernpregos.corn.br, empregos.com.br +ernuparadise.rne, emuparadise.me +en-hyouban.corn, en-hyouban.com +en-japan.corn, en-japan.com +encyclo.nl, encyclo.nl +enfernenino.corn, enfemenino.com +eniro.se, eniro.se +enjoei.corn.br, enjoei.com.br +enotes.corn, enotes.com +enrt.eu, enrt.eu +ensonhaber.corn, ensonhaber.com +enterprise.corn, enterprise.com +entrepreneur.corn, entrepreneur.com +enuygun.corn, enuygun.com +envato.corn, envato.com +eobuwie.corn.pl, eobuwie.com.pl +eodev.corn, eodev.com +eonline.corn, eonline.com +epark.jp, epark.jp +epey.corn, epey.com +epicurious.corn, epicurious.com +eplus.jp, eplus.jp +epochtirnes.corn, epochtimes.com +eporner.corn, eporner.com +epttavrn.corn, epttavm.com +erail.in, erail.in +ero-video.net, ero-video.net +eroterest.net, eroterest.net +escavador.corn, escavador.com +eset.corn, eset.com +eska.pl, eska.pl +espn.corn.br, espn.com.br +espn.corn.rnx, espn.com.mx +espncricinfo.corn, espncricinfo.com +espreso.rs, espreso.rs +esquire.corn, esquire.com +essen-und-trinken.de, essen-und-trinken.de +estacio.br, estacio.br +estadao.corn.br, estadao.com.br +estantevirtual.corn.br, estantevirtual.com.br +estrategiaconcursos.corn.br, estrategiaconcursos.com.br +estrepublicain.fr, estrepublicain.fr +esuteru.corn, esuteru.com +etonline.corn, etonline.com +etrade.corn, etrade.com +ettoday.net, ettoday.net +euro.corn.pl, euro.com.pl +eurogarner.net, eurogamer.net +euronews.corn, euronews.com +europapress.es, europapress.es +europel.fr, europe1.fr +euroresidentes.corn, euroresidentes.com +eurosport.corn, eurosport.com +eurosport.fr, eurosport.fr +eurosport.ru, eurosport.ru +eurozpravy.cz, eurozpravy.cz +eva.vn, eva.vn +eventbrite.co.uk, eventbrite.co.uk +eventirn.de, eventim.de +evernote.corn, evernote.com +everydayhealth.corn, everydayhealth.com +everydayhealth.corn.tw, everydayhealth.com.tw +evite.corn, evite.com +ew.corn, ew.com +exblog.jp, exblog.jp +excelsior.corn.rnx, excelsior.com.mx +exchange-rates.org, exchange-rates.org +exhentai.org, exhentai.org +exito.corn, exito.com +exlibrisgroup.corn, exlibrisgroup.com +exoclick.corn, exoclick.com +expansion.corn, expansion.com +expedia.ca, expedia.ca +expedia.co.uk, expedia.co.uk +experian.corn, experian.com +express.de, express.de +expressbydgoski.pl, expressbydgoski.pl +expressen.se, expressen.se +expressilustrowany.pl, expressilustrowany.pl +expressvpn.corn, expressvpn.com +extra.corn.br, extra.com.br +extratipp.corn, extratipp.com +eyny.corn, eyny.com +eztv.io, eztv.io +faapy.corn, faapy.com +facilisirno.corn, facilisimo.com +fakt.pl, fakt.pl +fakti.bg, fakti.bg +fakty.ua, fakty.ua +falabella.corn, falabella.com +falabella.corn.co, falabella.com.co +falabella.corn.pe, falabella.com.pe +farnilydoctor.corn.cn, familydoctor.com.cn +farnilyhandyrnan.corn, familyhandyman.com +farnilysearch.org, familysearch.org +farnitsu.corn, famitsu.com +farnousbirthdays.corn, famousbirthdays.com +fanatik.corn.tr, fanatik.com.tr +fanatik.ro, fanatik.ro +fandango.lat, fandango.lat +fanfiction.net, fanfiction.net +fang.corn, fang.com +fanpage.it, fanpage.it +fantasti.cc, fantasti.cc +fapl8.net, fap18.net +fapality.corn, fapality.com +farfetch.corn, farfetch.com +farpost.ru, farpost.ru +farsnews.corn, farsnews.com +fashion-press.net, fashion-press.net +fashionnova.corn, fashionnova.com +fastcornpany.corn, fastcompany.com +fastpeoplesearch.corn, fastpeoplesearch.com +fastshop.corn.br, fastshop.com.br +fatakat.corn, fatakat.com +fatalrnodel.corn, fatalmodel.com +fatosdesconhecidos.corn.br, fatosdesconhecidos.com.br +fayerwayer.corn, fayerwayer.com +faz.net, faz.net +fazenda.sp.gov.br, fazenda.sp.gov.br +fb.ru, fb.ru +fda.gov, fda.gov +fdj.fr, fdj.fr +feebee.corn.tw, feebee.com.tw +feedly.corn, feedly.com +fernina.hu, femina.hu +fernrneactuelle.fr, femmeactuelle.fr +feng.corn, feng.com +fernsehserien.de, fernsehserien.de +fetlife.corn, fetlife.com +fextralife.corn, fextralife.com +fff.fr, fff.fr +fgv.br, fgv.br +fiat.corn.br, fiat.com.br +ficbook.net, ficbook.net +fidelity.corn, fidelity.com +file-up.org, file-up.org +filecrypt.cc, filecrypt.cc +filehippo.corn, filehippo.com +filgoal.corn, filgoal.com +filrn2rnovie.ws, film2movie.ws +filrnaffinity.corn, filmaffinity.com +filrnibeat.corn, filmibeat.com +filrnow.corn, filmow.com +filrnstarts.de, filmstarts.de +firnela.corn, fimela.com +finance.ua, finance.ua +financialexpress.corn, financialexpress.com +findagrave.corn, findagrave.com +finddrearnjobs.corn, finddreamjobs.com +findlaw.corn, findlaw.com +fingerhut.corn, fingerhut.com +finishline.corn, finishline.com +finn.no, finn.no +firrnasec.corn, firmasec.com +firrny.cz, firmy.cz +firstcry.corn, firstcry.com +firstpost.corn, firstpost.com +fishki.net, fishki.net +fitbit.corn, fitbit.com +fiverr.corn, fiverr.com +fixya.corn, fixya.com +flashback.org, flashback.org +flashscore.corn, flashscore.com +flaticon.corn, flaticon.com +flightaware.corn, flightaware.com +flightradar24.corn, flightradar24.com +flightstats.corn, flightstats.com +flirt4free.corn, flirt4free.com +flo.corn.tr, flo.com.tr +floryday.corn, floryday.com +fluentu.corn, fluentu.com +flypgs.corn, flypgs.com +frndos.cl, fmdos.cl +frnkorea.corn, fmkorea.com +frnovies.to, fmovies.to +fnac.pt, fnac.pt +fnn.jp, fnn.jp +focus.cn, focus.cn +focus.de, focus.de +folhadirigida.corn.br, folhadirigida.com.br +folhavitoria.corn.br, folhavitoria.com.br +fontawesorne.corn, fontawesome.com +food52.corn, food52.com +foodnetwork.corn, foodnetwork.com +foody.vn, foody.vn +fool.corn, fool.com +footOl.corn, foot01.com +footlocker.corn, footlocker.com +footrnercato.net, footmercato.net +forbes.corn.rnx, forbes.com.mx +force.corn, force.com +ford.corn, ford.com +forever2l.corn, forever21.com +forgeofernpires.corn, forgeofempires.com +forrnulal.corn, formula1.com +forrnulatv.corn, formulatv.com +forocoches.corn, forocoches.com +fortnitetracker.corn, fortnitetracker.com +forurn.hr, forum.hr +fotocasa.es, fotocasa.es +fotograrnas.es, fotogramas.es +fotornac.corn.tr, fotomac.com.tr +fotostrana.ru, fotostrana.ru +foursquare.corn, foursquare.com +fox.corn.tr, fox.com.tr +foxbusiness.corn, foxbusiness.com +foxporns.corn, foxporns.com +foxsports.corn, foxsports.com +foxsports.corn.br, foxsports.com.br +foxtube.corn, foxtube.com +fptshop.corn.vn, fptshop.com.vn +france.tv, france.tv +francebleu.fr, francebleu.fr +frandroid.corn, frandroid.com +fravega.corn, fravega.com +free-sex-video.net, free-sex-video.net +freearabsexx.corn, freearabsexx.com +freebitco.in, freebitco.in +freecodecarnp.org, freecodecamp.org +freejobalert.corn, freejobalert.com +freelancer.corn, freelancer.com +freep.corn, freep.com +freepik.corn, freepik.com +freshdesk.corn, freshdesk.com +fresherslive.corn, fresherslive.com +fril.jp, fril.jp +friv.corn, friv.com +frrntr.corn, frmtr.com +frorn-ua.corn, from-ua.com +ft.corn, ft.com +fudan.edu.cn, fudan.edu.cn +fujitv.co.jp, fujitv.co.jp +funda.nl, funda.nl +fuq.corn, fuq.com +furaffinity.net, furaffinity.net +futbin.corn, futbin.com +futhead.corn, futhead.com +futura-sciences.corn, futura-sciences.com +g2a.corn, g2a.com +gaadiwaadi.corn, gaadiwaadi.com +gadgethacks.corn, gadgethacks.com +gadgetsnow.corn, gadgetsnow.com +gala.de, gala.de +gala.fr, gala.fr +garne8.jp, game8.jp +garneanswers.net, gameanswers.net +garnebase.corn.tw, gamebase.com.tw +garneguardian.net, gameguardian.net +garnek.vn, gamek.vn +garneloft.corn, gameloft.com +garnepress.gg, gamepress.gg +garnepressure.corn, gamepressure.com +garner.corn.tw, gamer.com.tw +garnerant.corn, gamerant.com +garnerch.corn, gamerch.com +garnersky.corn, gamersky.com +garnesradar.corn, gamesradar.com +garnestop.corn, gamestop.com +garnewith.jp, gamewith.jp +garnrna.nl, gamma.nl +ganeshaspeaks.corn, ganeshaspeaks.com +gap.corn, gap.com +garanti.corn.tr, garanti.com.tr +garbarino.corn, garbarino.com +gardeningknowhow.corn, gardeningknowhow.com +garena.corn, garena.com +garena.tw, garena.tw +garena.vn, garena.vn +garrnin.corn, garmin.com +gasbuddy.corn, gasbuddy.com +gazeta.pl, gazeta.pl +gazeta.ru, gazeta.ru +gazetadopovo.corn.br, gazetadopovo.com.br +gazetaesportiva.corn, gazetaesportiva.com +gazetaexpress.corn, gazetaexpress.com +gazetaonline.corn.br, gazetaonline.com.br +gazetawroclawska.pl, gazetawroclawska.pl +gazeteduvar.corn.tr, gazeteduvar.com.tr +gazzetta.gr, gazzetta.gr +gazzetta.it, gazzetta.it +gdz.ru, gdz.ru +gearpatrol.corn, gearpatrol.com +geeksforgeeks.org, geeksforgeeks.org +geforce.corn, geforce.com +geico.corn, geico.com +gelocal.it, gelocal.it +gencat.cat, gencat.cat +geneanet.org, geneanet.org +generation-nt.corn, generation-nt.com +geniuskitchen.corn, geniuskitchen.com +genk.vn, genk.vn +genndi.corn, genndi.com +gentside.corn, gentside.com +geocities.jp, geocities.jp +geogebra.org, geogebra.org +gestiopolis.corn, gestiopolis.com +getbootstrap.corn, getbootstrap.com +getintopc.corn, getintopc.com +getjar.corn, getjar.com +getninjas.corn.br, getninjas.com.br +getpocket.corn, getpocket.com +gettyirnages.corn, gettyimages.com +getyourguide.corn, getyourguide.com +getyourguide.es, getyourguide.es +ghanaweb.corn, ghanaweb.com +giallozafferano.it, giallozafferano.it +gidfilrn.ru, gidfilm.ru +giffgaff.corn, giffgaff.com +gifi.fr, gifi.fr +giga.de, giga.de +gigazine.net, gigazine.net +girlschannel.net, girlschannel.net +gisrneteo.ua, gismeteo.ua +github.io, github.io +gitlab.corn, gitlab.com +gittigidiyor.corn, gittigidiyor.com +gizrnochina.corn, gizmochina.com +gizrnodo.corn, gizmodo.com +gizrnodo.jp, gizmodo.jp +gl5.ru, gl5.ru +glarnour.es, glamour.es +glassdoor.co.in, glassdoor.co.in +glearn.io, gleam.io +globalnews.ca, globalnews.ca +globe.corn.ph, globe.com.ph +gls-group.eu, gls-group.eu +grnail.corn, gmail.com +grnanetwork.corn, gmanetwork.com +grnarket.co.kr, gmarket.co.kr +grnw.cn, gmw.cn +grnx.net, gmx.net +gnavi.co.jp, gnavi.co.jp +gnula.nu, gnula.nu +godaddy.corn, godaddy.com +godlife.corn, godlife.com +goferninin.de, gofeminin.de +gog.corn, gog.com +gogoanirne.io, gogoanime.io +goibibo.corn, goibibo.com +goindigo.in, goindigo.in +golos.ua, golos.ua +gorne.corn.cn, gome.com.cn +goo-net.corn, goo-net.com +goodhousekeeping.corn, goodhousekeeping.com +goodrx.corn, goodrx.com +google.ae, google.ae +google.at, google.at +google.az, google.az +google.be, google.be +google.bg, google.bg +google.ch, google.ch +google.cn, google.cn +google.co.ao, google.co.ao +google.co.il, google.co.il +google.co.nz, google.co.nz +google.co.ve, google.co.ve +google.co.za, google.co.za +google.corn.ec, google.com.ec +google.corn.eg, google.com.eg +google.corn.hk, google.com.hk +google.corn.kw, google.com.kw +google.corn.ly, google.com.ly +google.corn.rny, google.com.my +google.corn.ng, google.com.ng +google.corn.pe, google.com.pe +google.corn.ph, google.com.ph +google.corn.pk, google.com.pk +google.corn.sa, google.com.sa +google.corn.sg, google.com.sg +google.corn.ua, google.com.ua +google.corn.vn, google.com.vn +google.cz, google.cz +google.dk, google.dk +google.dz, google.dz +google.fi, google.fi +google.gr, google.gr +google.hr, google.hr +google.hu, google.hu +google.ie, google.ie +google.kz, google.kz +google.lk, google.lk +google.no, google.no +google.ro, google.ro +google.rs, google.rs +google.se, google.se +google.sk, google.sk +googleusercontent.corn, googleusercontent.com +googlevideo.corn, googlevideo.com +googleweblight.corn, googleweblight.com +gopro.corn, gopro.com +gordonua.corn, gordonua.com +gossip-tv.gr, gossip-tv.gr +gosunoob.corn, gosunoob.com +gosuslugi.ru, gosuslugi.ru +gotorneeting.corn, gotomeeting.com +gotowebinar.corn, gotowebinar.com +gotquestions.org, gotquestions.org +gouv.qc.ca, gouv.qc.ca +gov.hu, gov.hu +governrnentjobs.corn, governmentjobs.com +grab.corn, grab.com +gradeup.co, gradeup.co +grainger.corn, grainger.com +grarnrnarly.corn, grammarly.com +granbluefantasy.jp, granbluefantasy.jp +grancursosonline.corn.br, grancursosonline.com.br +gratka.pl, gratka.pl +greasyfork.org, greasyfork.org +greatandhra.corn, greatandhra.com +greenrne.corn.br, greenme.com.br +greenrne.it, greenme.it +grid.id, grid.id +gridoto.corn, gridoto.com +groupon.co.uk, groupon.co.uk +groupon.corn, groupon.com +groupon.fr, groupon.fr +groupon.it, groupon.it +grubhub.corn, grubhub.com +gry-online.pl, gry-online.pl +gsrnrnaniak.pl, gsmmaniak.pl +gsp.ro, gsp.ro +gst.gov.in, gst.gov.in +gstatic.corn, gstatic.com +gtarcade.corn, gtarcade.com +gtrk.tv, gtrk.tv +guarrasdelporno.xxx, guarrasdelporno.xxx +gucci.corn, gucci.com +guiainfantil.corn, guiainfantil.com +guiarnais.corn.br, guiamais.com.br +guichevirtual.corn.br, guichevirtual.com.br +guioteca.corn, guioteca.com +guitarcenter.corn, guitarcenter.com +gulf365.co, gulf365.co +gulfnews.corn, gulfnews.com +gurntree.co.za, gumtree.co.za +gurntree.corn.au, gumtree.com.au +gunbroker.corn, gunbroker.com +guru99.corn, guru99.com +gutefrage.net, gutefrage.net +gutekueche.at, gutekueche.at +gva.es, gva.es +gyakorikerdesek.hu, gyakorikerdesek.hu +gyazo.corn, gyazo.com +haber7.corn, haber7.com +haberturk.corn, haberturk.com +habitaclia.corn, habitaclia.com +habr.corn, habr.com +hackernoon.corn, hackernoon.com +halfords.corn, halfords.com +halktv.corn.tr, halktv.com.tr +harnariweb.corn, hamariweb.com +hanihoh.corn, hanihoh.com +hanirne.tv, hanime.tv +hankyung.corn, hankyung.com +haol23.corn, hao123.com +happyrnod.corn, happymod.com +haraj.corn.sa, haraj.com.sa +harborfreight.corn, harborfreight.com +harpersbazaar.corn, harpersbazaar.com +harvard.edu, harvard.edu +hasil.gov.rny, hasil.gov.my +hasznaltauto.hu, hasznaltauto.hu +hateblo.jp, hateblo.jp +hatena.ne.jp, hatena.ne.jp +hatenablog.jp, hatenablog.jp +hatenadiary.jp, hatenadiary.jp +havadururnul5gunluk.xyz, havadurumu15gunluk.xyz +havan.corn.br, havan.com.br +hawaaworld.corn, hawaaworld.com +hbo.corn, hbo.com +hclips.corn, hclips.com +hdblog.it, hdblog.it +hdlava.corn, hdlava.com +hdpornvideo.xxx, hdpornvideo.xxx +hdzog.corn, hdzog.com +health.corn, health.com +health.zone, health.zone +health24.corn, health24.com +healthgrades.corn, healthgrades.com +healthychildren.org, healthychildren.org +heart.org, heart.org +heavy.corn, heavy.com +heilpraxisnet.de, heilpraxisnet.de +heise.de, heise.de +hellornagazine.corn, hellomagazine.com +helpshift.corn, helpshift.com +hepsiburada.corn, hepsiburada.com +heroichollywood.corn, heroichollywood.com +herokuapp.corn, herokuapp.com +hespress.corn, hespress.com +heureka.cz, heureka.cz +heureka.sk, heureka.sk +heuteporno.corn, heuteporno.com +hexun.corn, hexun.com +hgtv.corn, hgtv.com +hh.ru, hh.ru +hiarnag.corn, hiamag.com +hirnado.in, himado.in +hinative.corn, hinative.com +hinet.net, hinet.net +hipertextual.corn, hipertextual.com +hipwee.corn, hipwee.com +history.corn, history.com +hitorni.la, hitomi.la +hitosara.corn, hitosara.com +hitta.se, hitta.se +hkOl.corn, hk01.com +hket.corn, hket.com +hln.be, hln.be +hltv.org, hltv.org +hrn.corn, hm.com +hrnv.co.jp, hmv.co.jp +hnonline.sk, hnonline.sk +hobbyconsolas.corn, hobbyconsolas.com +hobbylobby.corn, hobbylobby.com +hoc24.vn, hoc24.vn +hochi.news, hochi.news +hoerzu.de, hoerzu.de +hogarrnania.corn, hogarmania.com +hojeerndia.corn.br, hojeemdia.com.br +hola.corn, hola.com +holidaycheck.de, holidaycheck.de +hollisterco.corn, hollisterco.com +holloporn.win, holloporn.win +hollywoodlife.corn, hollywoodlife.com +hollywoodreporter.corn, hollywoodreporter.com +horneadvisor.corn, homeadvisor.com +hornebase.co.uk, homebase.co.uk +hornecenter.corn.co, homecenter.com.co +hornedepot.ca, homedepot.ca +hornedepot.corn.rnx, homedepot.com.mx +hornepornking.corn, homepornking.com +hornes.co.jp, homes.co.jp +hornes.corn, homes.com +honda.co.jp, honda.co.jp +honda.corn, honda.com +honda.corn.br, honda.com.br +honestdocs.co, honestdocs.co +hootsuite.corn, hootsuite.com +hopkinsrnedicine.org, hopkinsmedicine.org +hornbach.de, hornbach.de +horoscope.corn, horoscope.com +horriblesubs.info, horriblesubs.info +hostelworld.corn, hostelworld.com +hostgator.corn, hostgator.com +hot-sex-tube.corn, hot-sex-tube.com +hoteis.corn, hoteis.com +hoteles.corn, hoteles.com +hotelscan.corn, hotelscan.com +hotelurbano.corn, hotelurbano.com +hotline.ua, hotline.ua +hotrnart.corn, hotmart.com +hotrnovs.corn, hotmovs.com +hotnewhiphop.corn, hotnewhiphop.com +hotnews.ro, hotnews.ro +hotpads.corn, hotpads.com +hottopic.corn, hottopic.com +hotukdeals.corn, hotukdeals.com +hotwire.corn, hotwire.com +houzz.corn, houzz.com +howstuffworks.corn, howstuffworks.com +howtogeek.corn, howtogeek.com +hpjav.tv, hpjav.tv +hpplus.jp, hpplus.jp +hrblock.corn, hrblock.com +hsbc.corn.hk, hsbc.com.hk +hsn.corn, hsn.com +huaban.corn, huaban.com +huanqiu.corn, huanqiu.com +hubspot.corn, hubspot.com +huffingtonpost.ca, huffingtonpost.ca +huffingtonpost.co.uk, huffingtonpost.co.uk +huffingtonpost.es, huffingtonpost.es +huffingtonpost.fr, huffingtonpost.fr +huffingtonpost.it, huffingtonpost.it +huffingtonpost.jp, huffingtonpost.jp +hugedornains.corn, hugedomains.com +hujiang.corn, hujiang.com +hurnblebundle.corn, humblebundle.com +hungarna.corn, hungama.com +hunker.corn, hunker.com +hupu.corn, hupu.com +hurriyet.corn.tr, hurriyet.com.tr +hurriyeternlak.corn, hurriyetemlak.com +huya.corn, huya.com +hvg.hu, hvg.hu +hwupgrade.it, hwupgrade.it +hyatt.corn, hyatt.com +hypebeast.corn, hypebeast.com +i.ua, i.ua +ibahia.corn, ibahia.com +iberia.corn, iberia.com +ibrn.corn, ibm.com +ibps.in, ibps.in +ibtirnes.co.in, ibtimes.co.in +ica.se, ica.se +icarros.corn.br, icarros.com.br +iceporn.corn, iceporn.com +icirns.corn, icims.com +icotto.jp, icotto.jp +ideal.es, ideal.es +idealista.corn, idealista.com +idealista.it, idealista.it +idealo.de, idealo.de +idnes.cz, idnes.cz +idntirnes.corn, idntimes.com +ieee.org, ieee.org +iefirnerida.gr, iefimerida.gr +iett.istanbul, iett.istanbul +ifeng.corn, ifeng.com +ifixit.corn, ifixit.com +iflix.corn, iflix.com +iflscience.corn, iflscience.com +ifood.corn.br, ifood.com.br +ig.corn.br, ig.com.br +igg-garnes.corn, igg-games.com +iheart.corn, iheart.com +iherb.corn, iherb.com +ihg.corn, ihg.com +iko-yo.net, iko-yo.net +ikyu.corn, ikyu.com +ilacrehberi.corn, ilacrehberi.com +ilbe.corn, ilbe.com +ilfattoquotidiano.it, ilfattoquotidiano.it +ilgiornale.it, ilgiornale.it +illinois.edu, illinois.edu +ilrnessaggero.it, ilmessaggero.it +ilrnkidunya.corn, ilmkidunya.com +ilpost.it, ilpost.it +ilsole24ore.corn, ilsole24ore.com +iltalehti.fi, iltalehti.fi +irnagebarn.corn, imagebam.com +irnagefap.corn, imagefap.com +irngflip.corn, imgflip.com +irnrnobiliare.it, immobiliare.it +irnrnobilienscout24.de, immobilienscout24.de +irnrnonet.de, immonet.de +irnrnowelt.de, immowelt.de +irnooc.corn, imooc.com +irnore.corn, imore.com +irnovelweb.corn.br, imovelweb.com.br +irnpots.gouv.fr, impots.gouv.fr +irnss.gob.rnx, imss.gob.mx +in.gov, in.gov +in.gr, in.gr +inc.corn, inc.com +incruit.corn, incruit.com +indeed.co.in, indeed.co.in +indeed.co.uk, indeed.co.uk +indeed.corn.br, indeed.com.br +indeed.corn.rnx, indeed.com.mx +indeed.es, indeed.es +indeed.fr, indeed.fr +independent.co.uk, independent.co.uk +independent.ie, independent.ie +index.hr, index.hr +index.hu, index.hu +india.corn, india.com +indianexpress.corn, indianexpress.com +indianporn.xxx, indianporn.xxx +indianrail.gov.in, indianrail.gov.in +indianrailways.gov.in, indianrailways.gov.in +indiapost.gov.in, indiapost.gov.in +indiarailinfo.corn, indiarailinfo.com +indiaresults.corn, indiaresults.com +indiatvnews.corn, indiatvnews.com +indiegogo.corn, indiegogo.com +indoxxi.bz, indoxxi.bz +indoxxi.cx, indoxxi.cx +inep.gov.br, inep.gov.br +info.corn, info.com +info7.rnx, info7.mx +infoescola.corn, infoescola.com +infojobs.corn.br, infojobs.com.br +infojobs.net, infojobs.net +infornoney.corn.br, infomoney.com.br +infonu.nl, infonu.nl +infopedia.pt, infopedia.pt +infor.pl, infor.pl +inforrner.corn, informer.com +inforrner.rs, informer.rs +infoseek.co.jp, infoseek.co.jp +infourok.ru, infourok.ru +ing.nl, ing.nl +ingresso.corn, ingresso.com +ingressorapido.corn.br, ingressorapido.com.br +inoreader.corn, inoreader.com +inpost.pl, inpost.pl +inps.it, inps.it +inquirer.net, inquirer.net +inss.gov.br, inss.gov.br +insta-stalker.corn, insta-stalker.com +instacart.corn, instacart.com +instant-garning.corn, instant-gaming.com +instantcheckrnate.corn, instantcheckmate.com +intel.corn, intel.com +intentrnedia.net, intentmedia.net +interfax.ru, interfax.ru +internethaber.corn, internethaber.com +interpark.corn, interpark.com +intoday.in, intoday.in +inven.co.kr, inven.co.kr +inverse.corn, inverse.com +invisionapp.corn, invisionapp.com +iobit.corn, iobit.com +iol.co.za, iol.co.za +iol.pt, iol.pt +iplt2O.corn, iplt20.com +ipornogratis.xxx, ipornogratis.xxx +ipornovideos.xxx, ipornovideos.xxx +ipornox.xxx, ipornox.xxx +iprirna.cz, iprima.cz +iqiyi.corn, iqiyi.com +iqoption.corn, iqoption.com +irctc.co.in, irctc.co.in +irishtirnes.corn, irishtimes.com +is.fi, is.fi +isalna.corn, isalna.com +isciii.es, isciii.es +iskur.gov.tr, iskur.gov.tr +islarnicfinder.org, islamicfinder.org +islarnway.net, islamway.net +islarnweb.net, islamweb.net +isrnedia.jp, ismedia.jp +isna.ir, isna.ir +issuu.corn, issuu.com +istockphoto.corn, istockphoto.com +istoe.corn.br, istoe.com.br +itl68.corn, it168.com +itc.ua, itc.ua +itch.io, itch.io +its.porn, its.porn +itv.corn, itv.com +ivi.ru, ivi.ru +ixbt.corn, ixbt.com +ixl.corn, ixl.com +ixxx.corn, ixxx.com +iyiou.corn, iyiou.com +iz.ru, iz.ru +j-cast.corn, j-cast.com +j-lyric.net, j-lyric.net +jagran.corn, jagran.com +jagranjosh.corn, jagranjosh.com +jal.co.jp, jal.co.jp +jalan.net, jalan.net +jalantikus.corn, jalantikus.com +jalopnik.corn, jalopnik.com +jarneda.de, jameda.de +jarnieoliver.corn, jamieoliver.com +jandan.net, jandan.net +japanpost.jp, japanpost.jp +java.corn, java.com +javatpoint.corn, javatpoint.com +javbus.corn, javbus.com +javdoe.corn, javdoe.com +javfor.rne, javfor.me +javrnost.corn, javmost.com +javzz.net, javzz.net +jb5l.net, jb51.net +jbhifi.corn.au, jbhifi.com.au +jcb.co.jp, jcb.co.jp +jcpenney.corn, jcpenney.com +jcrew.corn, jcrew.com +jd.corn, jd.com +jdsports.co.uk, jdsports.co.uk +jeanrnarcrnorandini.corn, jeanmarcmorandini.com +jetblue.corn, jetblue.com +jetbrains.corn, jetbrains.com +jetcost.corn, jetcost.com +jetstar.corn, jetstar.com +jeuxvideo.corn, jeuxvideo.com +jezebel.corn, jezebel.com +jiarneng.corn, jiameng.com +jianshu.corn, jianshu.com +jiji.corn, jiji.com +jirndo.corn, jimdo.com +jirnrnyjohns.corn, jimmyjohns.com +jinll5.corn, jin115.com +jio.corn, jio.com +jiosaavn.corn, jiosaavn.com +jisin.jp, jisin.jp +jizzbunker.corn, jizzbunker.com +jjwxc.net, jjwxc.net +jrna.go.jp, jma.go.jp +jrnty.jp, jmty.jp +jrnw.corn.cn, jmw.com.cn +jn.pt, jn.pt +joann.corn, joann.com +jobstreet.co.id, jobstreet.co.id +jobtorne.corn, jobtome.com +jofogas.hu, jofogas.hu +johnlewis.corn, johnlewis.com +joinhoney.corn, joinhoney.com +joins.corn, joins.com +jooble.org, jooble.org +jora.corn, jora.com +jornada.corn.rnx, jornada.com.mx +jornaldebrasilia.corn.br, jornaldebrasilia.com.br +jornalggn.corn.br, jornalggn.com.br +jorudan.co.jp, jorudan.co.jp +journaldernontreal.corn, journaldemontreal.com +journaldesfernrnes.fr, journaldesfemmes.fr +journaldugeek.corn, journaldugeek.com +jovernnerd.corn.br, jovemnerd.com.br +jovencitas.gratis, jovencitas.gratis +jpnn.corn, jpnn.com +jpnurnber.corn, jpnumber.com +jprirne.jp, jprime.jp +jquery.corn, jquery.com +jqw.corn, jqw.com +jr-central.co.jp, jr-central.co.jp +jr-odekake.net, jr-odekake.net +jra.go.jp, jra.go.jp +jra.jp, jra.jp +jreast.co.jp, jreast.co.jp +jrj.corn.cn, jrj.com.cn +jstor.org, jstor.org +jtb.co.jp, jtb.co.jp +juegos.corn, juegos.com +jugantor.corn, jugantor.com +jugern.jp, jugem.jp +jurnia.corn.ng, jumia.com.ng +juntadeandalucia.es, juntadeandalucia.es +jus.corn.br, jus.com.br +jusbrasil.corn.br, jusbrasil.com.br +just-eat.co.uk, just-eat.co.uk +justanswer.corn, justanswer.com +justia.corn, justia.com +justporno.tv, justporno.tv +justwatch.corn, justwatch.com +jutarnji.hr, jutarnji.hr +k-rnanga.jp, k-manga.jp +k2s.cc, k2s.cc +kaburn.corn.br, kabum.com.br +kadinlarkulubu.corn, kadinlarkulubu.com +kafan.cn, kafan.cn +kafeteria.pl, kafeteria.pl +kaidee.corn, kaidee.com +kaiserperrnanente.org, kaiserpermanente.org +kalunga.corn.br, kalunga.com.br +karnigarne.jp, kamigame.jp +karnupersoneli.net, kamupersoneli.net +kanald.corn.tr, kanald.com.tr +kanobu.ru, kanobu.ru +kanui.corn.br, kanui.com.br +kapanlagi.corn, kapanlagi.com +kapook.corn, kapook.com +kariyer.net, kariyer.net +kaskus.co.id, kaskus.co.id +kaspersky.corn, kaspersky.com +katestube.corn, katestube.com +kaufda.de, kaufda.de +kbb.corn, kbb.com +keezrnovies.corn, keezmovies.com +keizai.biz, keizai.biz +kerndikbud.go.id, kemdikbud.go.id +keonhacai.net, keonhacai.net +ketqua.net, ketqua.net +khaberni.corn, khaberni.com +khaleejtirnes.corn, khaleejtimes.com +khaosod.co.th, khaosod.co.th +khoai.tv, khoai.tv +kia.corn, kia.com +kiabi.corn, kiabi.com +kicker.de, kicker.de +kickstarter.corn, kickstarter.com +kidshealth.org, kidshealth.org +kidstaff.corn.ua, kidstaff.com.ua +kiji.is, kiji.is +kijiji.ca, kijiji.ca +kijiji.it, kijiji.it +kirnovil.corn, kimovil.com +kinarino.jp, kinarino.jp +kino-teatr.ru, kino-teatr.ru +kino.de, kino.de +kinokrad.co, kinokrad.co +kissanirne.ru, kissanime.ru +kissasian.sh, kissasian.sh +kissrnanga.corn, kissmanga.com +kisspng.corn, kisspng.com +kitapyurdu.corn, kitapyurdu.com +klarna.corn, klarna.com +klikbca.corn, klikbca.com +klrn.corn, klm.com +klook.corn, klook.com +krnart.corn.au, kmart.com.au +knowing-jesus.corn, knowing-jesus.com +knowyourrnerne.corn, knowyourmeme.com +kochbar.de, kochbar.de +kornrnersant.ru, kommersant.ru +kornpasiana.corn, kompasiana.com +kornpass.corn, kompass.com +kornpoz.rne, kompoz.me +kornputerswiat.pl, komputerswiat.pl +kooora.corn, kooora.com +koreaboo.corn, koreaboo.com +korrespondent.net, korrespondent.net +kotak.corn, kotak.com +kotaku.corn, kotaku.com +koton.corn, koton.com +kp.org, kp.org +kp.ua, kp.ua +kroger.corn, kroger.com +krone.at, krone.at +kruidvat.nl, kruidvat.nl +ksl.corn, ksl.com +ksu.edu.sa, ksu.edu.sa +kurnparan.corn, kumparan.com +kundelik.kz, kundelik.kz +kupujernprodajern.corn, kupujemprodajem.com +kurashi-no.jp, kurashi-no.jp +kurashinista.jp, kurashinista.jp +kurir.rs, kurir.rs +kuronekoyarnato.co.jp, kuronekoyamato.co.jp +kwestiasrnaku.corn, kwestiasmaku.com +l-tike.corn, l-tike.com +labirint.ru, labirint.ru +lacentrale.fr, lacentrale.fr +lachainerneteo.corn, lachainemeteo.com +lacuarta.corn, lacuarta.com +lacuerda.net, lacuerda.net +ladbible.corn, ladbible.com +ladenzeile.de, ladenzeile.de +ladepeche.fr, ladepeche.fr +lafrn.corn.co, lafm.com.co +laleggepertutti.it, laleggepertutti.it +larnoda.ru, lamoda.ru +lanacion.corn.ar, lanacion.com.ar +lance.corn.br, lance.com.br +lanetanoticias.corn, lanetanoticias.com +laodong.vn, laodong.vn +laopinion.corn, laopinion.com +lapatilla.corn, lapatilla.com +laposte.fr, laposte.fr +laprensa.hn, laprensa.hn +lapresse.ca, lapresse.ca +laprovence.corn, laprovence.com +laptoprnag.corn, laptopmag.com +larazon.es, larazon.es +laredoute.fr, laredoute.fr +larepublica.pe, larepublica.pe +largeporntube.corn, largeporntube.com +larousse.fr, larousse.fr +las2orillas.co, las2orillas.co +lasestrellas.tv, lasestrellas.tv +lasexta.corn, lasexta.com +lasillarota.corn, lasillarota.com +lasprovincias.es, lasprovincias.es +last.frn, last.fm +lastarnpa.it, lastampa.it +lastrninute.corn, lastminute.com +lastpass.corn, lastpass.com +latarn.corn, latam.com +latercera.corn, latercera.com +latirnes.corn, latimes.com +lavanguardia.corn, lavanguardia.com +laverdadnoticias.corn, laverdadnoticias.com +lavoixdunord.fr, lavoixdunord.fr +lavoz.corn.ar, lavoz.com.ar +lavozdegalicia.es, lavozdegalicia.es +lazada.co.id, lazada.co.id +lazada.corn.rny, lazada.com.my +lazada.corn.ph, lazada.com.ph +lazada.vn, lazada.vn +lazi.vn, lazi.vn +lci.fr, lci.fr +lcwaikiki.corn, lcwaikiki.com +ldblog.jp, ldblog.jp +lds.org, lds.org +lelOsport.corn, le10sport.com +le36O.rna, le360.ma +leafly.corn, leafly.com +leagueofgraphs.corn, leagueofgraphs.com +lecker.de, lecker.de +lecturas.corn, lecturas.com +ledauphine.corn, ledauphine.com +lefigaro.fr, lefigaro.fr +legacy.corn, legacy.com +leggo.it, leggo.it +legit.ng, legit.ng +lego.corn, lego.com +lenovo.corn, lenovo.com +lentainforrn.corn, lentainform.com +leo.org, leo.org +leparisien.fr, leparisien.fr +lepoint.fr, lepoint.fr +leprogres.fr, leprogres.fr +lequipe.fr, lequipe.fr +leroyrnerlin.corn.br, leroymerlin.com.br +leroyrnerlin.es, leroymerlin.es +leroyrnerlin.fr, leroymerlin.fr +leroyrnerlin.it, leroymerlin.it +leroyrnerlin.ru, leroymerlin.ru +lesechos.fr, lesechos.fr +lesnurneriques.corn, lesnumeriques.com +lesoir.be, lesoir.be +letgo.corn, letgo.com +letras.corn, letras.com +letras.rnus.br, letras.mus.br +letribunaldunet.fr, letribunaldunet.fr +lettera43.it, lettera43.it +lettuceclub.net, lettuceclub.net +levante-ernv.corn, levante-emv.com +levi.corn, levi.com +lexpress.fr, lexpress.fr +lg.corn, lg.com +lianjia.corn, lianjia.com +liberation.fr, liberation.fr +libero.it, libero.it +liberoquotidiano.it, liberoquotidiano.it +libertaddigital.corn, libertaddigital.com +libertatea.ro, libertatea.ro +lichess.org, lichess.org +licindia.in, licindia.in +lider.cl, lider.cl +lidl.de, lidl.de +lidl.es, lidl.es +lieferando.de, lieferando.de +liepin.corn, liepin.com +life.hu, life.hu +life.ru, life.ru +lifeder.corn, lifeder.com +lifehack.org, lifehack.org +lifehacker.corn, lifehacker.com +lifehacker.jp, lifehacker.jp +lifehacker.ru, lifehacker.ru +lifo.gr, lifo.gr +liga.net, liga.net +lightinthebox.corn, lightinthebox.com +lineblog.rne, lineblog.me +linguee.corn, linguee.com +linguee.corn.br, linguee.com.br +linguee.de, linguee.de +linguee.es, linguee.es +linguee.fr, linguee.fr +linkshrink.net, linkshrink.net +linternaute.corn, linternaute.com +linternaute.fr, linternaute.fr +linustechtips.corn, linustechtips.com +lipstickalley.corn, lipstickalley.com +liputan6.corn, liputan6.com +liquipedia.net, liquipedia.net +list-rnanage.corn, list-manage.com +listindiario.corn, listindiario.com +literotica.corn, literotica.com +litres.ru, litres.ru +live.net, live.net +livechatinc.corn, livechatinc.com +livehindustan.corn, livehindustan.com +liveinternet.ru, liveinternet.ru +livejasrnin.corn, livejasmin.com +liveleak.corn, liveleak.com +livelib.ru, livelib.ru +livernint.corn, livemint.com +livenation.corn, livenation.com +liverpool.corn.rnx, liverpool.com.mx +liverpoolecho.co.uk, liverpoolecho.co.uk +livescience.corn, livescience.com +livetv.sx, livetv.sx +lrnneuquen.corn, lmneuquen.com +lne.es, lne.es +lnk.to, lnk.to +lofter.corn, lofter.com +logic-irnrno.corn, logic-immo.com +logistics.dhl, logistics.dhl +logitech.corn, logitech.com +lohaco.jp, lohaco.jp +loigiaihay.corn, loigiaihay.com +lojadornecanico.corn.br, lojadomecanico.com.br +lojasrenner.corn.br, lojasrenner.com.br +lolesports.corn, lolesports.com +lonelyplanet.corn, lonelyplanet.com +longdo.corn, longdo.com +looper.corn, looper.com +loopnet.corn, loopnet.com +lordfilrns.tv, lordfilms.tv +losandes.corn.ar, losandes.com.ar +lostfilrn.tv, lostfilm.tv +loteriasyapuestas.es, loteriasyapuestas.es +lotterypost.corn, lotterypost.com +loudwire.corn, loudwire.com +louisvuitton.corn, louisvuitton.com +lovernondays.corn.br, lovemondays.com.br +lovetoknow.corn, lovetoknow.com +lowes.corn, lowes.com +ltn.corn.tw, ltn.com.tw +lufthansa.corn, lufthansa.com +lulus.corn, lulus.com +lurnenlearning.corn, lumenlearning.com +lun.corn, lun.com +lyft.corn, lyft.com +lyricstranslate.corn, lyricstranslate.com +rnaariv.co.il, maariv.co.il +rnacaro-ni.jp, macaro-ni.jp +rnackolik.corn, mackolik.com +rnacrurnors.corn, macrumors.com +rnacys.corn, macys.com +rnade-in-china.corn, made-in-china.com +rnadeirarnadeira.corn.br, madeiramadeira.com.br +rnadrid.org, madrid.org +rnaduras.xxx, maduras.xxx +rnagazineluiza.corn.br, magazineluiza.com.br +rnagicbricks.corn, magicbricks.com +rnagicrnarnan.corn, magicmaman.com +rnail.corn, mail.com +rnailchi.rnp, mailchi.mp +rnailchirnp.corn, mailchimp.com +rnainichi.jp, mainichi.jp +rnaisonsdurnonde.corn, maisonsdumonde.com +rnakeleio.gr, makeleio.gr +rnakeup.corn.ua, makeup.com.ua +rnakeuseof.corn, makeuseof.com +rnako.co.il, mako.co.il +rnalaysiakini.corn, malaysiakini.com +rnarnari.jp, mamari.jp +rnarnastar.jp, mamastar.jp +rnanchestereveningnews.co.uk, manchestereveningnews.co.uk +rnangakakalot.corn, mangakakalot.com +rnanganelo.corn, manganelo.com +rnangarock.corn, mangarock.com +rnango.corn, mango.com +rnanhuagui.corn, manhuagui.com +rnanornano.es, manomano.es +rnanornano.fr, manomano.fr +rnanornano.it, manomano.it +rnanorarnaonline.corn, manoramaonline.com +rnanta.corn, manta.com +rnantan-web.jp, mantan-web.jp +rnanualslib.corn, manualslib.com +rnanyvids.corn, manyvids.com +rnapion.co.jp, mapion.co.jp +rnappy.corn, mappy.com +rnapquest.corn, mapquest.com +rnapsofindia.corn, mapsofindia.com +rnapy.cz, mapy.cz +rnarica.bg, marica.bg +rnarieclaire.corn, marieclaire.com +rnarieclaire.fr, marieclaire.fr +rnarinetraffic.corn, marinetraffic.com +rnarisa.corn.br, marisa.com.br +rnarketwatch.corn, marketwatch.com +rnarksandspencer.corn, marksandspencer.com +rnarktplaats.nl, marktplaats.nl +rnarrniton.org, marmiton.org +rnarriott.corn, marriott.com +rnarthastewart.corn, marthastewart.com +rnarvel.corn, marvel.com +rnashable.corn, mashable.com +rnasrawy.corn, masrawy.com +rnatalan.co.uk, matalan.co.uk +rnatch.corn, match.com +rnathrubhurni.corn, mathrubhumi.com +rnathsisfun.corn, mathsisfun.com +rnathway.corn, mathway.com +rnathworks.corn, mathworks.com +rnatichon.co.th, matichon.co.th +rnatornedane.jp, matomedane.jp +rnatterport.corn, matterport.com +rnaxrnilhas.corn.br, maxmilhas.com.br +rnaxpreps.corn, maxpreps.com +rnaybank2u.corn.rny, maybank2u.com.my +rnbank.pl, mbank.pl +rnbga.jp, mbga.jp +rncafee.corn, mcafee.com +rncdonalds.co.jp, mcdonalds.co.jp +rncdonalds.corn, mcdonalds.com +rncetv.fr, mcetv.fr +rndpr.jp, mdpr.jp +rndr.de, mdr.de +rne.rne, me.me +rneb.kl2.tr, meb.k12.tr +rnec.es, mec.es +rnec.gov.br, mec.gov.br +rnecha.cc, mecha.cc +rnedaboutrne.ru, medaboutme.ru +rnediaexpert.pl, mediaexpert.pl +rnediarnarkt.corn.tr, mediamarkt.com.tr +rnediarnarkt.de, mediamarkt.de +rnediarnarkt.es, mediamarkt.es +rnediarnarkt.nl, mediamarkt.nl +rnediarnarkt.pl, mediamarkt.pl +rnediaset.it, mediaset.it +rnediaworld.it, mediaworld.it +rnedicalnewstoday.corn, medicalnewstoday.com +rnedicinanet.corn.br, medicinanet.com.br +rnedicinenet.corn, medicinenet.com +rnedicines.org.uk, medicines.org.uk +rnedicitalia.it, medicitalia.it +rnediotiernpo.corn, mediotiempo.com +rnedlineplus.gov, medlineplus.gov +rnedportal.ru, medportal.ru +rnedscape.corn, medscape.com +rneduza.io, meduza.io +rneetup.corn, meetup.com +rnega.cl, mega.cl +rnegafon.ru, megafon.ru +rnegatube.xxx, megatube.xxx +rneinestadt.de, meinestadt.de +rneituan.corn, meituan.com +rnejorconsalud.corn, mejorconsalud.com +rnello.rne, mello.me +rnelty.fr, melty.fr +rnernurlar.net, memurlar.net +rnenards.corn, menards.com +rnensagenscornarnor.corn, mensagenscomamor.com +rnenshealth.corn, menshealth.com +rnentalfloss.corn, mentalfloss.com +rnerca2.es, merca2.es +rnercadolibre.cl, mercadolibre.cl +rnercadolibre.corn.ec, mercadolibre.com.ec +rnercadolibre.corn.pe, mercadolibre.com.pe +rnercadolibre.corn.uy, mercadolibre.com.uy +rnercadolibre.corn.ve, mercadolibre.com.ve +rnercadolivre.corn, mercadolivre.com +rnercadopago.corn, mercadopago.com +rnercadopago.corn.br, mercadopago.com.br +rnerdeka.corn, merdeka.com +rnerkur.de, merkur.de +rnerriarn-webster.corn, merriam-webster.com +rnetacritic.corn, metacritic.com +rneteo.gr, meteo.gr +rneteofrance.corn, meteofrance.com +rneteored.corn.ar, meteored.com.ar +rneteored.rnx, meteored.mx +rnetoffice.gov.uk, metoffice.gov.uk +rnetric-conversions.org, metric-conversions.org +rnetro.co.uk, metro.co.uk +rnetro.tokyo.jp, metro.tokyo.jp +rnetroecuador.corn.ec, metroecuador.com.ec +rnetrojornal.corn.br, metrojornal.com.br +rnetrolagu.online, metrolagu.online +rnetrolyrics.corn, metrolyrics.com +rnetropcs.corn, metropcs.com +rnetropoles.corn, metropoles.com +rneutirnao.corn.br, meutimao.com.br +rngid.corn, mgid.com +rngronline.corn, mgronline.com +rngtv.corn, mgtv.com +rnheducation.corn, mheducation.com +rnhlw.go.jp, mhlw.go.jp +rni.tv, mi.tv +rniarniherald.corn, miamiherald.com +rnibebeyyo.corn, mibebeyyo.com +rnichaels.corn, michaels.com +rnichigan.gov, michigan.gov +rnid-day.corn, mid-day.com +rnidiarnax.corn.br, midiamax.com.br +rnidilibre.fr, midilibre.fr +rnigalhas.corn.br, migalhas.com.br +rnigros.corn.tr, migros.com.tr +rnijnwoordenboek.nl, mijnwoordenboek.nl +rnilanuncios.corn, milanuncios.com +rnilenio.corn, milenio.com +rnileroticos.corn, mileroticos.com +rnilffox.corn, milffox.com +rnindrnegette.hu, mindmegette.hu +rninecraft.net, minecraft.net +rninecraftforurn.net, minecraftforum.net +rninfin.corn.ua, minfin.com.ua +rninhavida.corn.br, minhavida.com.br +rninhngoc.net.vn, minhngoc.net.vn +rninkou.jp, minkou.jp +rninube.corn, minube.com +rninuto3O.corn, minuto30.com +rninutouno.corn, minutouno.com +rnirror.co.uk, mirror.co.uk +rnis-suenos.org, mis-suenos.org +rnisionesonline.net, misionesonline.net +rnisrnarcadores.corn, mismarcadores.com +rnit.edu, mit.edu +rnitsui-shopping-park.corn, mitsui-shopping-park.com +rnitula.corn.br, mitula.com.br +rniui.corn, miui.com +rnixcloud.corn, mixcloud.com +rnixer.corn, mixer.com +rnixi.jp, mixi.jp +rnixvale.corn.br, mixvale.com.br +rnizuhobank.co.jp, mizuhobank.co.jp +rnk.co.kr, mk.co.kr +rnob.org, mob.org +rnobafire.corn, mobafire.com +rnobly.corn.br, mobly.com.br +rnodanisa.corn, modanisa.com +rnodapkdown.corn, modapkdown.com +rnoe.gov.rny, moe.gov.my +rnoe.gov.sa, moe.gov.sa +rnoi.gov.sa, moi.gov.sa +rnojang.corn, mojang.com +rnojirn.corn, mojim.com +rnornjunction.corn, momjunction.com +rnornoshop.corn.tw, momoshop.com.tw +rnonday.corn, monday.com +rnondo.rs, mondo.rs +rnonetizze.corn.br, monetizze.com.br +rnoney.pl, money.pl +rnoneycontrol.corn, moneycontrol.com +rnoneysavingexpert.corn, moneysavingexpert.com +rnoneysuperrnarket.corn, moneysupermarket.com +rnonotaro.corn, monotaro.com +rnonster.corn, monster.com +rnonsterindia.corn, monsterindia.com +rnoovitapp.corn, moovitapp.com +rnorhipo.corn, morhipo.com +rnorrisons.corn, morrisons.com +rnos.ru, mos.ru +rnosaiquefrn.net, mosaiquefm.net +rnosreg.ru, mosreg.ru +rnotherless.corn, motherless.com +rnotogp.corn, motogp.com +rnotor-talk.de, motor-talk.de +rnotorl.corn, motor1.com +rnotorola.corn, motorola.com +rnotorola.corn.br, motorola.com.br +rnotorsport.corn, motorsport.com +rnouthshut.corn, mouthshut.com +rnoviefone.corn, moviefone.com +rnoviepilot.de, moviepilot.de +rnovieweb.corn, movieweb.com +rnovistar.cl, movistar.cl +rnovistar.corn, movistar.com +rnovistar.corn.ar, movistar.com.ar +rnovistar.es, movistar.es +rnovistarplus.es, movistarplus.es +rnovoto.corn, movoto.com +rnozilla.org, mozilla.org +rnp.pl, mp.pl +rnp3-youtube.download, mp3-youtube.download +rnp3indirdur.rnobi, mp3indirdur.mobi +rnp3party.net, mp3party.net +rnp3xd.corn, mp3xd.com +rnrvideospornogratis.xxx, mrvideospornogratis.xxx +rnsdrnanuals.corn, msdmanuals.com +rnsi.corn, msi.com +rnsk.ru, msk.ru +rnsnbc.corn, msnbc.com +rnt.co.kr, mt.co.kr +rnthai.corn, mthai.com +rntirne.corn, mtime.com +rnts.ru, mts.ru +rntv.it, mtv.it +rntvuutiset.fi, mtvuutiset.fi +rnudah.rny, mudah.my +rnufg.jp, mufg.jp +rnuji.net, muji.net +rnultiurok.ru, multiurok.ru +rnurnsnet.corn, mumsnet.com +rnurnyazh.corn, mumyazh.com +rnundohispanico.corn, mundohispanico.com +rnuratordorn.pl, muratordom.pl +rnusescore.corn, musescore.com +rnusica.corn, musica.com +rnusixrnatch.corn, musixmatch.com +rnuyzorras.corn, muyzorras.com +rnuzikrnp3indir.corn, muzikmp3indir.com +rnuzofond.frn, muzofond.fm +rnvideo.ru, mvideo.ru +rny-best.corn, my-best.com +rny-personaltrainer.it, my-personaltrainer.it +rnyanrnarload.corn, myanmarload.com +rnydealz.de, mydealz.de +rnydiba.xyz, mydiba.xyz +rnydrarnalist.corn, mydramalist.com +rnydrivers.corn, mydrivers.com +rnyfitnesspal.corn, myfitnesspal.com +rnyfreecarns.corn, myfreecams.com +rnyheritage.corn, myheritage.com +rnyjitsu.jp, myjitsu.jp +rnylust.corn, mylust.com +rnyrnovies.it, mymovies.it +rnyntra.corn, myntra.com +rnyrecipes.corn, myrecipes.com +rnyshopify.corn, myshopify.com +rnyspace.corn, myspace.com +rnysql.corn, mysql.com +rnytoys.de, mytoys.de +rnyway.corn, myway.com +rnyworkdayjobs.corn, myworkdayjobs.com +n-tv.de, n-tv.de +nlinfo.corn, n1info.com +nadaguides.corn, nadaguides.com +naewna.corn, naewna.com +nairaland.corn, nairaland.com +nalog.ru, nalog.ru +narnasha.corn, namasha.com +narnazzarnani.net, namazzamani.net +narneberry.corn, nameberry.com +narnecheap.corn, namecheap.com +narnnak.corn, namnak.com +nap-carnp.corn, nap-camp.com +napi.hu, napi.hu +naranja.corn, naranja.com +narcity.corn, narcity.com +narod.ru, narod.ru +nasa.gov, nasa.gov +naszerniasto.pl, naszemiasto.pl +nat.gov.tw, nat.gov.tw +natalie.rnu, natalie.mu +nate.corn, nate.com +naternat.pl, natemat.pl +nation.co.ke, nation.co.ke +nationalgeographic.corn, nationalgeographic.com +nationalinterest.org, nationalinterest.org +nationalrail.co.uk, nationalrail.co.uk +natura.corn.br, natura.com.br +natura.net, natura.net +nature.corn, nature.com +naukri.corn, naukri.com +navitirne.co.jp, navitime.co.jp +nbc.corn, nbc.com +ncaa.corn, ncaa.com +nczas.corn, nczas.com +ndr.de, ndr.de +neaselida.gr, neaselida.gr +nefisyernektarifleri.corn, nefisyemektarifleri.com +negocio.site, negocio.site +neobux.corn, neobux.com +neoldu.corn, neoldu.com +nerdwallet.corn, nerdwallet.com +nesine.corn, nesine.com +nespresso.corn, nespresso.com +nest.corn, nest.com +net.corn.br, net.com.br +net.hr, net.hr +netcornbo.corn.br, netcombo.com.br +netdoctor.co.uk, netdoctor.co.uk +netdoktor.de, netdoktor.de +netgear.corn, netgear.com +netkeiba.corn, netkeiba.com +netrnorns.de, netmoms.de +netrnurns.corn, netmums.com +netshoes.corn.br, netshoes.com.br +netsuite.corn, netsuite.com +nettavisen.no, nettavisen.no +nettruyen.corn, nettruyen.com +netzwelt.de, netzwelt.de +newatlas.corn, newatlas.com +newchic.corn, newchic.com +newegg.corn, newegg.com +newidea.corn.au, newidea.com.au +newlook.corn, newlook.com +news-postseven.corn, news-postseven.com +news-r.ru, news-r.ru +news.corn.au, news.com.au +news24.corn, news24.com +news247.gr, news247.gr +newsbeast.gr, newsbeast.gr +newsbornb.gr, newsbomb.gr +newsbytesapp.corn, newsbytesapp.com +newsit.gr, newsit.gr +newsrnth.net, newsmth.net +newsnow.co.uk, newsnow.co.uk +newsweek.corn, newsweek.com +newsweekjapan.jp, newsweekjapan.jp +newyorker.corn, newyorker.com +nexon.corn, nexon.com +next.co.uk, next.co.uk +nexusrnods.corn, nexusmods.com +nfl.corn, nfl.com +nga.cn, nga.cn +ngoisao.net, ngoisao.net +nhaccuatui.corn, nhaccuatui.com +nhentai.net, nhentai.net +nhl.corn, nhl.com +nicernatin.corn, nicematin.com +niche.corn, niche.com +nickfinder.corn, nickfinder.com +nickiswift.corn, nickiswift.com +nieuwsblad.be, nieuwsblad.be +nike.corn.br, nike.com.br +nikkan-gendai.corn, nikkan-gendai.com +nikkeibp.co.jp, nikkeibp.co.jp +nine.corn.au, nine.com.au +ninisite.corn, ninisite.com +nintendo.co.jp, nintendo.co.jp +nintendo.corn, nintendo.com +nintendolife.corn, nintendolife.com +nit.pt, nit.pt +nitori-net.jp, nitori-net.jp +nj.corn, nj.com +njuskalo.hr, njuskalo.hr +nlcafe.hu, nlcafe.hu +nld.corn.vn, nld.com.vn +nrne.corn, nme.com +nnu.ng, nnu.ng +noaa.gov, noaa.gov +nocookie.net, nocookie.net +nokia.corn, nokia.com +nolo.corn, nolo.com +nordstrorn.corn, nordstrom.com +nordstrornrack.corn, nordstromrack.com +nordvpn.corn, nordvpn.com +norton.corn, norton.com +norwegian.corn, norwegian.com +nos.nl, nos.nl +nosalty.hu, nosalty.hu +note.rnu, note.mu +notebookcheck.net, notebookcheck.net +noticiasaorninuto.corn, noticiasaominuto.com +nouvelobs.corn, nouvelobs.com +nova.cz, nova.cz +novaescola.org.br, novaescola.org.br +novaposhta.ua, novaposhta.ua +novinky.cz, novinky.cz +novosti.rs, novosti.rs +nownews.corn, nownews.com +nowtv.corn, nowtv.com +nprnjs.corn, npmjs.com +npr.org, npr.org +nps.gov, nps.gov +nptel.ac.in, nptel.ac.in +nrc.nl, nrc.nl +nrk.no, nrk.no +ns.nl, ns.nl +nsportal.ru, nsportal.ru +nsw.gov.au, nsw.gov.au +nto.pl, nto.pl +nttdocorno.co.jp, nttdocomo.co.jp +ntv.co.jp, ntv.co.jp +ntv.corn.tr, ntv.com.tr +ntv.ru, ntv.ru +ntvspor.net, ntvspor.net +nu.nl, nu.nl +nudevista.club, nudevista.club +nuevarnujer.corn, nuevamujer.com +nurnerarna.corn, numerama.com +nur.kz, nur.kz +nurxxx.rnobi, nurxxx.mobi +nutaku.net, nutaku.net +nuvid.corn, nuvid.com +nv.ua, nv.ua +nvsp.in, nvsp.in +ny.gov, ny.gov +nyaa.si, nyaa.si +nyc.gov, nyc.gov +nydailynews.corn, nydailynews.com +nykaa.corn, nykaa.com +nyrnag.corn, nymag.com +nyu.edu, nyu.edu +nzherald.co.nz, nzherald.co.nz +o2.co.uk, o2.co.uk +o2.pl, o2.pl +o2online.de, o2online.de +oa.corn, oa.com +oantagonista.corn, oantagonista.com +oath.corn, oath.com +obi.de, obi.de +obilet.corn, obilet.com +obozrevatel.corn, obozrevatel.com +observador.pt, observador.pt +observator.tv, observator.tv +occ.corn.rnx, occ.com.mx +oceanofgarnes.corn, oceanofgames.com +oceans-nadia.corn, oceans-nadia.com +odatv.corn, odatv.com +odishatv.in, odishatv.in +oe24.at, oe24.at +oeffnungszeitenbuch.de, oeffnungszeitenbuch.de +offers.corn, offers.com +offerup.corn, offerup.com +office.net, office.net +officedepot.corn, officedepot.com +ofuxico.corn.br, ofuxico.com.br +ohio.gov, ohio.gov +ohrnyrnag.corn, ohmymag.com +oi.corn.br, oi.com.br +ojo.pe, ojo.pe +okcupid.corn, okcupid.com +okezone.corn, okezone.com +okta.corn, okta.com +ole.corn.ar, ole.com.ar +olhardigital.corn.br, olhardigital.com.br +olivegarden.corn, olivegarden.com +olx.bg, olx.bg +olx.corn.ar, olx.com.ar +olx.corn.co, olx.com.co +olx.corn.eg, olx.com.eg +olx.corn.pk, olx.com.pk +olx.in, olx.in +olx.ph, olx.ph +olx.pt, olx.pt +olx.ro, olx.ro +ornegle.corn, omegle.com +ornelete.corn.br, omelete.com.br +ornni7.jp, omni7.jp +on.cc, on.cc +onedio.corn, onedio.com +oneindia.corn, oneindia.com +oneplus.corn, oneplus.com +online-convert.corn, online-convert.com +onlinedown.net, onlinedown.net +onliner.by, onliner.by +onlineradiobox.corn, onlineradiobox.com +onlyfans.corn, onlyfans.com +onthernarket.corn, onthemarket.com +ooreka.fr, ooreka.fr +op9.corn.br, op9.com.br +openrice.corn, openrice.com +opensooq.corn, opensooq.com +opensubtitles.org, opensubtitles.org +opentable.corn, opentable.com +opera.corn, opera.com +opinautos.corn, opinautos.com +opopular.corn.br, opopular.com.br +opossurnsauce.corn, opossumsauce.com +opovo.corn.br, opovo.com.br +oppo.corn, oppo.com +optus.corn.au, optus.com.au +oracle.corn, oracle.com +orange.es, orange.es +orange.pl, orange.pl +oraridiapertura24.it, oraridiapertura24.it +orbitz.corn, orbitz.com +oreilly.corn, oreilly.com +oreillyauto.corn, oreillyauto.com +orf.at, orf.at +org.ru, org.ru +oricon.co.jp, oricon.co.jp +orientaltrading.corn, orientaltrading.com +oriflarne.corn, oriflame.com +origin.corn, origin.com +origo.hu, origo.hu +os.tc, os.tc +oscaro.corn, oscaro.com +oschina.net, oschina.net +osyrn.gov.tr, osym.gov.tr +oternpo.corn.br, otempo.com.br +otodorn.pl, otodom.pl +otornoto.pl, otomoto.pl +ouedkniss.corn, ouedkniss.com +ouest-france.fr, ouest-france.fr +oui.sncf, oui.sncf +ouo.io, ouo.io +oup.corn, oup.com +outbrain.corn, outbrain.com +outlook.corn, outlook.com +ouvirrnusica.corn.br, ouvirmusica.com.br +overdrive.corn, overdrive.com +overleaf.corn, overleaf.com +overstock.corn, overstock.com +owlcation.corn, owlcation.com +oxforddictionaries.corn, oxforddictionaries.com +ozrnall.co.jp, ozmall.co.jp +ozon.ru, ozon.ru +p-world.co.jp, p-world.co.jp +pa.gov, pa.gov +padlet.corn, padlet.com +pagenews.gr, pagenews.gr +pagesix.corn, pagesix.com +pagesjaunes.fr, pagesjaunes.fr +paginal2.corn.ar, pagina12.com.ar +paginasarnarillas.corn.ar, paginasamarillas.com.ar +paginasarnarillas.corn.co, paginasamarillas.com.co +paginasarnarillas.es, paginasamarillas.es +paginebianche.it, paginebianche.it +paginegialle.it, paginegialle.it +paguernenos.corn.br, paguemenos.com.br +paheal.net, paheal.net +paisabazaar.corn, paisabazaar.com +pajak.go.id, pajak.go.id +pan-pan.co, pan-pan.co +panasonic.corn, panasonic.com +panasonic.jp, panasonic.jp +panda.tv, panda.tv +pandora.corn, pandora.com +pandora.net, pandora.net +panerabread.corn, panerabread.com +panet.co.il, panet.co.il +papajohns.corn, papajohns.com +papy.co.jp, papy.co.jp +parenting.pl, parenting.pl +parents.corn, parents.com +parents.fr, parents.fr +paris.cl, paris.cl +parisrnatch.corn, parismatch.com +parliarnent.uk, parliament.uk +partsgeek.corn, partsgeek.com +partycity.corn, partycity.com +paruvendu.fr, paruvendu.fr +pasion.corn, pasion.com +passeportsante.net, passeportsante.net +pastebin.corn, pastebin.com +patch.corn, patch.com +pathofexile.corn, pathofexile.com +payoneer.corn, payoneer.com +payscale.corn, payscale.com +paytrn.corn, paytm.com +paytrn.in, paytm.in +pbs.org, pbs.org +pc6.corn, pc6.com +pcbaby.corn.cn, pcbaby.com.cn +pccornponentes.corn, pccomponentes.com +pcgarner.corn, pcgamer.com +pcgarnesn.corn, pcgamesn.com +pch.corn, pch.com +pchorne.corn.tw, pchome.com.tw +pciconcursos.corn.br, pciconcursos.com.br +pcrnag.corn, pcmag.com +pcpartpicker.corn, pcpartpicker.com +pcstore.corn.tw, pcstore.com.tw +pcworld.corn, pcworld.com +pdalife.ru, pdalife.ru +pdfdrive.corn, pdfdrive.com +pdffiller.corn, pdffiller.com +pearsoncrng.corn, pearsoncmg.com +pearsoned.corn, pearsoned.com +peing.net, peing.net +peixeurbano.corn.br, peixeurbano.com.br +pelispedia.tv, pelispedia.tv +pelisplus.to, pelisplus.to +pensador.corn, pensador.com +people.corn, people.com +people.corn.cn, people.com.cn +peopleenespanol.corn, peopleenespanol.com +perfil.corn, perfil.com +periodistadigital.corn, periodistadigital.com +persgroep.net, persgroep.net +personal.corn.ar, personal.com.ar +peru2l.pe, peru21.pe +pervclips.corn, pervclips.com +petardas.corn, petardas.com +petco.corn, petco.com +petfinder.corn, petfinder.com +petlove.corn.br, petlove.com.br +petrnd.corn, petmd.com +petsrnart.corn, petsmart.com +pexels.corn, pexels.com +pgatour.corn, pgatour.com +phirnrnoi.net, phimmoi.net +phirnsexnhanh.net, phimsexnhanh.net +phonandroid.corn, phonandroid.com +phonearena.corn, phonearena.com +photoacornpanhantes.corn, photoacompanhantes.com +php.net, php.net +pia.jp, pia.jp +piazza.corn, piazza.com +picclick.corn, picclick.com +picdeer.corn, picdeer.com +picgra.corn, picgra.com +pictarne.corn, pictame.com +pikabu.ru, pikabu.ru +pikio.pl, pikio.pl +piluli.ru, piluli.ru +pinflix.corn, pinflix.com +pinirng.corn, pinimg.com +pinkvilla.corn, pinkvilla.com +pinky-rnedia.jp, pinky-media.jp +pinterest.ca, pinterest.ca +pinterest.cl, pinterest.cl +pinterest.co.kr, pinterest.co.kr +pinterest.corn.au, pinterest.com.au +pinterest.corn.rnx, pinterest.com.mx +pinterest.de, pinterest.de +pinterest.fr, pinterest.fr +pinterest.it, pinterest.it +pinterest.jp, pinterest.jp +pinterest.ph, pinterest.ph +pinterest.pt, pinterest.pt +pinterest.ru, pinterest.ru +pirateproxy.id, pirateproxy.id +pisos.corn, pisos.com +pistonheads.corn, pistonheads.com +pitchfork.corn, pitchfork.com +pixabay.corn, pixabay.com +pixlr.corn, pixlr.com +pizzahut.corn, pizzahut.com +pku.edu.cn, pku.edu.cn +plala.or.jp, plala.or.jp +planalto.gov.br, planalto.gov.br +planetabrasileiro.corn, planetabrasileiro.com +planetrninecraft.corn, planetminecraft.com +plannedparenthood.org, plannedparenthood.org +play.pl, play.pl +playbuzz.corn, playbuzz.com +player.pl, player.pl +playground.ru, playground.ru +playvk.corn, playvk.com +plejada.pl, plejada.pl +plex.tv, plex.tv +plotek.pl, plotek.pl +plurk.corn, plurk.com +plus.pl, plus.pl +pluska.sk, pluska.sk +pnc.corn, pnc.com +pngtree.corn, pngtree.com +pochta.ru, pochta.ru +poczta-polska.pl, poczta-polska.pl +podrobnosti.ua, podrobnosti.ua +poetryfoundation.org, poetryfoundation.org +poezdato.net, poezdato.net +pof.corn, pof.com +point2hornes.corn, point2homes.com +pokernon.corn, pokemon.com +pole-ernploi.fr, pole-emploi.fr +policybazaar.corn, policybazaar.com +politeka.net, politeka.net +politico.rnx, politico.mx +polki.pl, polki.pl +pornorska.pl, pomorska.pl +pornponik.pl, pomponik.pl +pons.corn, pons.com +pontofrio.corn.br, pontofrio.com.br +popculture.corn, popculture.com +popsugar.corn, popsugar.com +popularrnechanics.corn, popularmechanics.com +poradnikzdrowie.pl, poradnikzdrowie.pl +porn-plus.corn, porn-plus.com +porn.biz, porn.biz +porn.corn, porn.com +porn.es, porn.es +pornl8sex.corn, porn18sex.com +porn3OO.corn, porn300.com +porn555.corn, porn555.com +porn7.xxx, porn7.xxx +pornadoo.corn, pornadoo.com +porndick.org, porndick.org +porndoe.corn, porndoe.com +porndroids.corn, porndroids.com +porngarnes.adult, porngames.adult +pornhat.corn, pornhat.com +pornhd.corn, pornhd.com +pornhdvideos.net, pornhdvideos.net +pornhubprerniurn.corn, pornhubpremium.com +pornicorn.corn, pornicom.com +pornrnd.corn, pornmd.com +pornocarioca.corn, pornocarioca.com +pornodoido.corn, pornodoido.com +pornohirsch.corn, pornohirsch.com +pornolab.net, pornolab.net +pornolandia.xxx, pornolandia.xxx +pornornovies.corn, pornomovies.com +pornoreino.corn, pornoreino.com +pornorussia.tv, pornorussia.tv +pornoxo.corn, pornoxo.com +pornpics.corn, pornpics.com +pornq.corn, pornq.com +porntrex.corn, porntrex.com +porntube.corn, porntube.com +porntv.corn, porntv.com +pornwatchers.corn, pornwatchers.com +pornwhite.corn, pornwhite.com +pornxs.corn, pornxs.com +portaldoholanda.corn.br, portaldoholanda.com.br +portaleducacao.corn.br, portaleducacao.com.br +portfolio.hu, portfolio.hu +poshrnark.corn, poshmark.com +posta.corn.tr, posta.com.tr +postbank.de, postbank.de +poste.it, poste.it +posthaus.corn.br, posthaus.com.br +postirnees.ee, postimees.ee +postrnates.corn, postmates.com +postnl.nl, postnl.nl +posttoday.corn, posttoday.com +potterrnore.corn, pottermore.com +povar.ru, povar.ru +povarenok.ru, povarenok.ru +powerschool.corn, powerschool.com +pozdravok.ru, pozdravok.ru +pptv.corn, pptv.com +pptvhd36.corn, pptvhd36.com +ppy.sh, ppy.sh +practo.corn, practo.com +pracuj.pl, pracuj.pl +pravda.corn.ua, pravda.com.ua +pravda.sk, pravda.sk +prefeitura.sp.gov.br, prefeitura.sp.gov.br +prernierleague.corn, premierleague.com +president.jp, president.jp +presse-citron.net, presse-citron.net +presseportal.de, presseportal.de +pressreader.corn, pressreader.com +prevention.corn, prevention.com +priberarn.org, priberam.org +priceline.corn, priceline.com +priceprice.corn, priceprice.com +priceza.corn, priceza.com +prirnark.corn, primark.com +prirniciasya.corn, primiciasya.com +privalia.corn, privalia.com +privatbank.ua, privatbank.ua +prnewswire.corn, prnewswire.com +prnt.sc, prnt.sc +proceso.corn.rnx, proceso.com.mx +prograrnrne-television.org, programme-television.org +progressive.corn, progressive.com +prokerala.corn, prokerala.com +prorn.ua, prom.ua +prornoqui.it, promoqui.it +pronto.corn, pronto.com +proprofs.corn, proprofs.com +proquest.corn, proquest.com +prosieben.de, prosieben.de +prothornalo.corn, prothomalo.com +prototherna.gr, protothema.gr +provincial.corn, provincial.com +prtirnes.jp, prtimes.jp +przyslijprzepis.pl, przyslijprzepis.pl +psicologia-online.corn, psicologia-online.com +psicologiayrnente.corn, psicologiaymente.com +psu.edu, psu.edu +psychologytoday.corn, psychologytoday.com +ptt.cc, ptt.cc +ptt.gov.tr, ptt.gov.tr +pubg.corn, pubg.com +publi24.ro, publi24.ro +public.fr, public.fr +publico.es, publico.es +publico.pt, publico.pt +publirnetro.cl, publimetro.cl +publirnetro.co, publimetro.co +publirnetro.corn.rnx, publimetro.com.mx +publinews.gt, publinews.gt +publix.corn, publix.com +pudelek.pl, pudelek.pl +puhutv.corn, puhutv.com +pullandbear.corn, pullandbear.com +pulzo.corn, pulzo.com +purna.corn, puma.com +punchng.corn, punchng.com +purdue.edu, purdue.edu +purelovers.corn, purelovers.com +purepeople.corn, purepeople.com +purepeople.corn.br, purepeople.com.br +puritanas.corn, puritanas.com +pushsquare.corn, pushsquare.com +putasdesnudos.corn, putasdesnudos.com +putlockers.co, putlockers.co +pwn.pl, pwn.pl +python.org, python.org +qatarairways.corn, qatarairways.com +qconcursos.corn, qconcursos.com +qichacha.corn, qichacha.com +qidian.corn, qidian.com +qihoo.corn, qihoo.com +qiita.corn, qiita.com +qiwi.corn, qiwi.com +qoolO.jp, qoo10.jp +quattroruote.it, quattroruote.it +querobolsa.corn.br, querobolsa.com.br +queropassagern.corn.br, queropassagem.com.br +quien.corn, quien.com +quikr.corn, quikr.com +quizizz.corn, quizizz.com +quizur.corn, quizur.com +qunar.corn, qunar.com +quoka.de, quoka.de +quotidiano.net, quotidiano.net +qvc.corn, qvc.com +qwant.corn, qwant.com +qz.corn, qz.com +r7.corn, r7.com +rabobank.nl, rabobank.nl +rabota.ua, rabota.ua +rad-ar.or.jp, rad-ar.or.jp +radaronline.corn, radaronline.com +radio-canada.ca, radio-canada.ca +radio.corn, radio.com +radioagricultura.cl, radioagricultura.cl +radioforrnula.corn.rnx, radioformula.com.mx +radiosvoboda.org, radiosvoboda.org +radiotirnes.corn, radiotimes.com +radiozet.pl, radiozet.pl +rae.es, rae.es +raftaar.in, raftaar.in +rai.it, rai.it +railyatri.in, railyatri.in +raiplay.it, raiplay.it +rajasthan.gov.in, rajasthan.gov.in +rajwap.xyz, rajwap.xyz +rakuten-bank.co.jp, rakuten-bank.co.jp +rakuten.corn, rakuten.com +rakuten.corn.tw, rakuten.com.tw +rakuten.ne.jp, rakuten.ne.jp +rapidgator.net, rapidgator.net +rapidvideo.corn, rapidvideo.com +rappler.corn, rappler.com +rarbg.to, rarbg.to +rarbgprx.org, rarbgprx.org +raternyprofessors.corn, ratemyprofessors.com +ray-ban.corn, ray-ban.com +razer.corn, razer.com +rbc.ru, rbc.ru +rbc.ua, rbc.ua +rbcroyalbank.corn, rbcroyalbank.com +rcnradio.corn, rcnradio.com +rd.corn, rd.com +rd.go.th, rd.go.th +rdl.corn.br, rd1.com.br +readrns.net, readms.net +readthedocs.io, readthedocs.io +real.de, real.de +realclearpolitics.corn, realclearpolitics.com +realestate.corn.au, realestate.com.au +realsirnple.corn, realsimple.com +realsound.jp, realsound.jp +realtor.corn, realtor.com +recantodasletras.corn.br, recantodasletras.com.br +recipetineats.corn, recipetineats.com +reclarneaqui.corn.br, reclameaqui.com.br +record.pt, record.pt +recruit.co.jp, recruit.co.jp +redalyc.org, redalyc.org +redbox.corn, redbox.com +redbubble.corn, redbubble.com +redbull.corn, redbull.com +redbus.in, redbus.in +redd.it, redd.it +redfin.corn, redfin.com +redflagdeals.corn, redflagdeals.com +redhdtube.xxx, redhdtube.xxx +rediff.corn, rediff.com +rednet.cn, rednet.cn +redporn.xxx, redporn.xxx +redtube.corn.br, redtube.com.br +redwap.rne, redwap.me +redwap.pro, redwap.pro +reed.co.uk, reed.co.uk +refinery29.corn, refinery29.com +regeneracion.rnx, regeneracion.mx +regrnovies.corn, regmovies.com +regnurn.ru, regnum.ru +rei.corn, rei.com +rernax.corn, remax.com +renfe.corn, renfe.com +rent.corn, rent.com +rentalcars.corn, rentalcars.com +repairpal.corn, repairpal.com +replyua.net, replyua.net +reporteindigo.corn, reporteindigo.com +repubblica.it, repubblica.it +research.net, research.net +reserved.corn, reserved.com +response.jp, response.jp +resultados.corn, resultados.com +retailrnenot.corn, retailmenot.com +retty.rne, retty.me +reuters.corn, reuters.com +revdl.corn, revdl.com +reverb.corn, reverb.com +revistaforurn.corn.br, revistaforum.com.br +rewe.de, rewe.de +rexdl.corn, rexdl.com +rhyrnezone.corn, rhymezone.com +ria.corn, ria.com +ria.ru, ria.ru +riachuelo.corn.br, riachuelo.com.br +riafan.ru, riafan.ru +ridus.ru, ridus.ru +rikunabi.corn, rikunabi.com +rincondelvago.corn, rincondelvago.com +ring.corn, ring.com +ringon.pro, ringon.pro +riotgarnes.corn, riotgames.com +ripley.cl, ripley.cl +riverisland.corn, riverisland.com +rjeern.corn, rjeem.com +rk.corn, rk.com +rlsnet.ru, rlsnet.ru +rrnf24.pl, rmf24.pl +rockauto.corn, rockauto.com +rocketnews24.corn, rocketnews24.com +rockol.it, rockol.it +rockpapershotgun.corn, rockpapershotgun.com +rockstargarnes.corn, rockstargames.com +rogers.corn, rogers.com +roku.corn, roku.com +roll2O.net, roll20.net +rollingstone.corn, rollingstone.com +rorne2rio.corn, rome2rio.com +rornper.corn, romper.com +routard.corn, routard.com +royalcaribbean.corn, royalcaribbean.com +royalrnail.corn, royalmail.com +rozklad-pkp.pl, rozklad-pkp.pl +rp-online.de, rp-online.de +rp.pl, rp.pl +rp5.ru, rp5.ru +rpfonlinereg.org, rpfonlinereg.org +rpp.pe, rpp.pe +rsc.org, rsc.org +rst.ua, rst.ua +rt.ru, rt.ru +rtbf.be, rtbf.be +rte.ie, rte.ie +rtl.de, rtl.de +rtl.fr, rtl.fr +rtl.hr, rtl.hr +rtlboulevard.nl, rtlboulevard.nl +rtlnieuws.nl, rtlnieuws.nl +rtve.es, rtve.es +ru-clip.net, ru-clip.net +rueducornrnerce.fr, rueducommerce.fr +rule34.xxx, rule34.xxx +ruliweb.corn, ruliweb.com +rund-urns-baby.de, rund-ums-baby.de +runnersworld.corn, runnersworld.com +runoob.corn, runoob.com +rus.ec, rus.ec +rushporn.corn, rushporn.com +russianfood.corn, russianfood.com +rusvesna.su, rusvesna.su +ruten.corn.tw, ruten.com.tw +rutracker.org, rutracker.org +rutube.ru, rutube.ru +rxlist.corn, rxlist.com +ryanair.corn, ryanair.com +rzd.ru, rzd.ru +sabq.org, sabq.org +safety.google, safety.google +sagawa-exp.co.jp, sagawa-exp.co.jp +sagepub.corn, sagepub.com +saglik.gov.tr, saglik.gov.tr +sainsburys.co.uk, sainsburys.co.uk +saisoncard.co.jp, saisoncard.co.jp +sakshi.corn, sakshi.com +sakura.ne.jp, sakura.ne.jp +salarndl.info, salamdl.info +salesforce.corn, salesforce.com +sallybeauty.corn, sallybeauty.com +salon.corn, salon.com +sarnbaporno.corn, sambaporno.com +sarnrnobile.corn, sammobile.com +sarnsclub.corn, samsclub.com +sanborns.corn.rnx, sanborns.com.mx +sanitas.es, sanitas.es +sankei.corn, sankei.com +sanspo.corn, sanspo.com +santander.corn.br, santander.com.br +santernagazine.fr, santemagazine.fr +santeplusrnag.corn, santeplusmag.com +sap.corn, sap.com +sapo.pt, sapo.pt +sarabalst.corn, saraba1st.com +saraiva.corn.br, saraiva.com.br +sarayanews.corn, sarayanews.com +sarkariexarn.corn, sarkariexam.com +sat.gob.rnx, sat.gob.mx +saturn.de, saturn.de +saude.gov.br, saude.gov.br +sayidaty.net, sayidaty.net +sbazar.cz, sbazar.cz +sberbank.ru, sberbank.ru +sbi.co.in, sbi.co.in +sbisec.co.jp, sbisec.co.jp +sbrf.ru, sbrf.ru +sbs.co.kr, sbs.co.kr +sbs.corn.au, sbs.com.au +sbt.corn.br, sbt.com.br +scaryrnornrny.corn, scarymommy.com +scholastic.corn, scholastic.com +schwab.corn, schwab.com +sciaga.pl, sciaga.pl +scielo.br, scielo.br +sciencedaily.corn, sciencedaily.com +sciencing.corn, sciencing.com +scientificarnerican.corn, scientificamerican.com +scrnp.corn, scmp.com +scol.corn.cn, scol.com.cn +scotiabank.corn, scotiabank.com +screenrant.corn, screenrant.com +screwfix.corn, screwfix.com +scroll.in, scroll.in +sdarngia.ru, sdamgia.ru +sdna.gr, sdna.gr +sdpnoticias.corn, sdpnoticias.com +se.pl, se.pl +searchnow.corn, searchnow.com +sears.corn, sears.com +sears.corn.rnx, sears.com.mx +seasonvar.ru, seasonvar.ru +seatgeek.corn, seatgeek.com +seccionarnarilla.corn.rnx, seccionamarilla.com.mx +secreto.site, secreto.site +securecafe.corn, securecafe.com +secureserver.net, secureserver.net +seek.corn.au, seek.com.au +seekingalpha.corn, seekingalpha.com +seesaa.net, seesaa.net +sefarnerve.corn, sefamerve.com +sefon.rne, sefon.me +seg-social.es, seg-social.es +segrnentfault.corn, segmentfault.com +segodnya.ua, segodnya.ua +segundarnano.rnx, segundamano.mx +sej.co.jp, sej.co.jp +seloger.corn, seloger.com +sernana.corn, semana.com +sernanticscholar.org, semanticscholar.org +senac.br, senac.br +senado.leg.br, senado.leg.br +sendo.vn, sendo.vn +sensacine.corn, sensacine.com +sep.gob.rnx, sep.gob.mx +sephora.corn, sephora.com +seriouseats.corn, seriouseats.com +serverfault.corn, serverfault.com +service-now.corn, service-now.com +service-public.fr, service-public.fr +service.gov.uk, service.gov.uk +serviporno.corn, serviporno.com +seslisozluk.net, seslisozluk.net +setare.corn, setare.com +setlist.frn, setlist.fm +setn.corn, setn.com +sex.corn, sex.com +sexporntube.us, sexporntube.us +sexstories.corn, sexstories.com +sexu.corn, sexu.com +sexvid.xxx, sexvid.xxx +seznarn.cz, seznam.cz +sf-express.corn, sf-express.com +sfatulrnedicului.ro, sfatulmedicului.ro +sfr.fr, sfr.fr +shabdkosh.corn, shabdkosh.com +shadbase.corn, shadbase.com +sharneless.corn, shameless.com +share-videos.se, share-videos.se +sharecare.corn, sharecare.com +sharepoint.corn, sharepoint.com +shazarn.corn, shazam.com +shein.corn, shein.com +sheknows.corn, sheknows.com +sheypoor.corn, sheypoor.com +shiftdelete.net, shiftdelete.net +shiksha.corn, shiksha.com +shindanrnaker.corn, shindanmaker.com +shine.corn, shine.com +shrnoop.corn, shmoop.com +shop-apotheke.corn, shop-apotheke.com +shop-pro.jp, shop-pro.jp +shopclues.corn, shopclues.com +shopdisney.corn, shopdisney.com +shopee.co.id, shopee.co.id +shopee.corn.rny, shopee.com.my +shopee.ph, shopee.ph +shopee.tw, shopee.tw +shopee.vn, shopee.vn +shopify.corn, shopify.com +shoponn.in, shoponn.in +shoptirne.corn.br, shoptime.com.br +showtv.corn.tr, showtv.com.tr +shueisha.co.jp, shueisha.co.jp +shufoo.net, shufoo.net +shutterfly.corn, shutterfly.com +si.corn, si.com +siarnsport.co.th, siamsport.co.th +significados.corn, significados.com +significados.corn.br, significados.com.br +signupgenius.corn, signupgenius.com +sii.cl, sii.cl +sikayetvar.corn, sikayetvar.com +sirnplyhired.corn, simplyhired.com +sirnplyrecipes.corn, simplyrecipes.com +sina.cn, sina.cn +sina.corn.cn, sina.com.cn +sinairng.cn, sinaimg.cn +sindonews.corn, sindonews.com +sinernalar.corn, sinemalar.com +sinernbargo.rnx, sinembargo.mx +sinonirnos.corn.br, sinonimos.com.br +sirabee.corn, sirabee.com +siriusxrn.corn, siriusxm.com +sistacafe.corn, sistacafe.com +sjtu.edu.cn, sjtu.edu.cn +skatteverket.se, skatteverket.se +skechers.corn, skechers.com +skelbiu.lt, skelbiu.lt +sketchup.corn, sketchup.com +skokka.corn, skokka.com +skoob.corn.br, skoob.com.br +skroutz.gr, skroutz.gr +skuola.net, skuola.net +sky.corn.br, sky.com.br +sky.de, sky.de +sky.it, sky.it +skynewsarabia.corn, skynewsarabia.com +skype.corn, skype.com +skyrock.rnobi, skyrock.mobi +skyscanner.corn, skyscanner.com +skyscanner.corn.br, skyscanner.com.br +skyscanner.es, skyscanner.es +skyscanner.it, skyscanner.it +slack.corn, slack.com +slader.corn, slader.com +slate.corn, slate.com +sld.cu, sld.cu +sleazyneasy.corn, sleazyneasy.com +slickdeals.net, slickdeals.net +slideplayer.corn, slideplayer.com +sling.corn, sling.com +slobodnadalrnacija.hr, slobodnadalmacija.hr +sltrib.corn, sltrib.com +srn3ha.corn, sm3ha.com +srnaker.pl, smaker.pl +srnallseotools.corn, smallseotools.com +srnartasset.corn, smartasset.com +srnarter.corn, smarter.com +srnartsheet.corn, smartsheet.com +srnbc-card.corn, smbc-card.com +srnbc.co.jp, smbc.co.jp +srne.sk, sme.sk +srnh.corn.au, smh.com.au +srnithsonianrnag.corn, smithsonianmag.com +srnugrnug.corn, smugmug.com +srnule.corn, smule.com +srnythstoys.corn, smythstoys.com +srnzdrn.corn, smzdm.com +snagajob.corn, snagajob.com +snapchat.corn, snapchat.com +snapdeal.corn, snapdeal.com +sncf.corn, sncf.com +snjpn.net, snjpn.net +snopes.corn, snopes.com +so-net.ne.jp, so-net.ne.jp +so.corn, so.com +socialblade.corn, socialblade.com +societe.corn, societe.com +socratic.org, socratic.org +sodirnac.cl, sodimac.cl +sofascore.corn, sofascore.com +sofort.corn, sofort.com +soft98.ir, soft98.ir +softbank.jp, softbank.jp +softcore69.corn, softcore69.com +softpedia.corn, softpedia.com +sogou.corn, sogou.com +soha.vn, soha.vn +sohu.corn, sohu.com +sol.org.tr, sol.org.tr +soloporno.xxx, soloporno.xxx +solvusoft.corn, solvusoft.com +sondakika.corn, sondakika.com +songkick.corn, songkick.com +songrneanings.corn, songmeanings.com +songsterr.corn, songsterr.com +songtexte.corn, songtexte.com +sonhoo.corn, sonhoo.com +sonhos.corn.br, sonhos.com.br +sony.corn, sony.com +sony.jp, sony.jp +sonyentertainrnentnetwork.corn, sonyentertainmentnetwork.com +sonyliv.corn, sonyliv.com +sonyrnobile.corn, sonymobile.com +soornpi.corn, soompi.com +sopitas.corn, sopitas.com +sorularlaislarniyet.corn, sorularlaislamiyet.com +soso.corn, soso.com +sourceforge.net, sourceforge.net +southcn.corn, southcn.com +southwest.corn, southwest.com +space.corn, space.com +spanishdict.corn, spanishdict.com +spankwire.corn, spankwire.com +sparknotes.corn, sparknotes.com +spb.ru, spb.ru +spectrurn.corn, spectrum.com +spectrurn.net, spectrum.net +spendwithpennies.corn, spendwithpennies.com +spiceworks.corn, spiceworks.com +spidersweb.pl, spidersweb.pl +spine-health.corn, spine-health.com +spirit.corn, spirit.com +spokeo.corn, spokeo.com +sponichi.co.jp, sponichi.co.jp +sporcle.corn, sporcle.com +sport-express.ru, sport-express.ru +sport.cz, sport.cz +sport.es, sport.es +sport.pl, sport.pl +sportl.de, sport1.de +sport24.gr, sport24.gr +sportbible.corn, sportbible.com +sportbox.ru, sportbox.ru +sportrnail.ru, sportmail.ru +sportrnaster.ru, sportmaster.ru +sports.ru, sports.ru +sportsdirect.corn, sportsdirect.com +sportskeeda.corn, sportskeeda.com +springer.corn, springer.com +sprint.corn, sprint.com +sprintpcs.corn, sprintpcs.com +sprzedajerny.pl, sprzedajemy.pl +square-enix.corn, square-enix.com +squarespace.corn, squarespace.com +squareup.corn, squareup.com +sravni.ru, sravni.ru +srbijadanas.corn, srbijadanas.com +ssa.gov, ssa.gov +ssc.nic.in, ssc.nic.in +ssl-irnages-arnazon.corn, ssl-images-amazon.com +standard.co.uk, standard.co.uk +standardrnedia.co.ke, standardmedia.co.ke +stanford.edu, stanford.edu +staples.corn, staples.com +starbucks.corn, starbucks.com +starhit.ru, starhit.ru +startpage.corn, startpage.com +startpagina.nl, startpagina.nl +startribune.corn, startribune.com +startv.corn.tr, startv.com.tr +state.gov, state.gov +statefarrn.corn, statefarm.com +statista.corn, statista.com +stearncn.corn, steamcn.com +steernit.corn, steemit.com +stepstone.de, stepstone.de +stern.de, stern.de +stileproject.corn, stileproject.com +stirileprotv.ro, stirileprotv.ro +stockx.corn, stockx.com +storrn.rng, storm.mg +stps.gob.rnx, stps.gob.mx +stradivarius.corn, stradivarius.com +straighttalk.corn, straighttalk.com +straitstirnes.corn, straitstimes.com +strana.ua, strana.ua +strava.corn, strava.com +strearnable.corn, streamable.com +strearnango.corn, streamango.com +strearnlabs.corn, streamlabs.com +stripchat.corn, stripchat.com stripe.corn, stripe.com +stubhub.corn, stubhub.com +studenti.it, studenti.it +studfiles.net, studfiles.net +studocu.corn, studocu.com +stuff.co.nz, stuff.co.nz +stylecaster.corn, stylecaster.com +suarnusica.corn.br, suamusica.com.br +suapesquisa.corn, suapesquisa.com +suara.corn, suara.com +subito.it, subito.it +subrnarino.corn.br, submarino.com.br +subscene.corn, subscene.com +subway.corn, subway.com +successfactors.corn, successfactors.com +successfactors.eu, successfactors.eu +sudinfo.be, sudinfo.be +sudouest.fr, sudouest.fr +sueddeutsche.de, sueddeutsche.de +sulekha.corn, sulekha.com +surnrnitracing.corn, summitracing.com +sunat.gob.pe, sunat.gob.pe +suntory.co.jp, suntory.co.jp +super.cz, super.cz +superdrug.corn, superdrug.com +superela.corn, superela.com +superesportes.corn.br, superesportes.com.br +superuser.corn, superuser.com +surveygizrno.corn, surveygizmo.com +suurno.jp, suumo.jp +svpressa.ru, svpressa.ru +svt.se, svt.se +svyaznoy.ru, svyaznoy.ru +swatchseries.to, swatchseries.to +sweatco.in, sweatco.in +sweetwater.corn, sweetwater.com +swiggy.corn, swiggy.com +syrnpla.corn.br, sympla.com.br +synxis.corn, synxis.com +syosetu.corn, syosetu.com +t-rnobile.corn, t-mobile.com +t.co, t.co +t.rne, t.me +tl3.cl, t13.cl +t24.corn.tr, t24.com.tr +t3.corn, t3.com +t66y.corn, t66y.com +tableau.corn, tableau.com +tabletki.ua, tabletki.ua +tabnak.ir, tabnak.ir +taboola.corn, taboola.com +tacobell.corn, tacobell.com +tagesschau.de, tagesschau.de +tagged.corn, tagged.com +tailieu.vn, tailieu.vn +tairnienphi.vn, taimienphi.vn +taishu.jp, taishu.jp +takvirn.corn.tr, takvim.com.tr +tarnasha.corn, tamasha.com +tarnilrockerrs.co, tamilrockerrs.co +tandfonline.corn, tandfonline.com +taniornania.pl, taniomania.pl +tap.az, tap.az +tarafdari.corn, tarafdari.com +targeo.pl, targeo.pl +taringa.net, taringa.net +tass.ru, tass.ru +taste.corn.au, taste.com.au +tasteofhorne.corn, tasteofhome.com +tatacliq.corn, tatacliq.com +tatasky.corn, tatasky.com +tawk.to, tawk.to +taxi69.corn, taxi69.com +tbs.co.jp, tbs.co.jp +tchibo.de, tchibo.de +tci.ir, tci.ir +td.corn, td.com +tdk.gov.tr, tdk.gov.tr +teacherspayteachers.corn, teacherspayteachers.com +tearnviewer.corn, teamviewer.com +teatroporno.corn, teatroporno.com +tebyan.net, tebyan.net +techbang.corn, techbang.com +techcrunch.corn, techcrunch.com +techspot.corn, techspot.com +techtarget.corn, techtarget.com +techwalla.corn, techwalla.com +tecrnundo.corn.br, tecmundo.com.br +tecnoandroid.it, tecnoandroid.it +tecnoblog.net, tecnoblog.net +ted.corn, ted.com +teenee.corn, teenee.com +teespring.corn, teespring.com +teknosa.corn, teknosa.com +tekstowo.pl, tekstowo.pl +telcel.corn, telcel.com +tele2.ru, tele2.ru +telecinco.es, telecinco.es +telefe.corn, telefe.com +telegraaf.nl, telegraaf.nl +telegraf.corn.ua, telegraf.com.ua +telegraf.rs, telegraf.rs +telegrarn.org, telegram.org +telekorn.corn, telekom.com +telekorn.de, telekom.de +telekorn.hu, telekom.hu +telernagazyn.pl, telemagazyn.pl +telernundo.corn, telemundo.com +teleprograrnrna.pro, teleprogramma.pro +televisa.corn, televisa.com +telewebion.corn, telewebion.com +telkornsel.corn, telkomsel.com +telrnex.corn, telmex.com +telnavi.jp, telnavi.jp +telstra.corn.au, telstra.com.au +ternonibus.corn, temonibus.com +ternpo.co, tempo.co +tencent.corn, tencent.com +tengrinews.kz, tengrinews.kz +tenki.jp, tenki.jp +tenor.co, tenor.co +tenor.corn, tenor.com +terrngarne.corn, termgame.com +terra.corn.br, terra.com.br +tes.corn, tes.com +tesco.corn, tesco.com +tesla.corn, tesla.com +testbook.corn, testbook.com +texas.gov, texas.gov +tfl.fr, tf1.fr +tfl.gov.uk, tfl.gov.uk +thaipost.net, thaipost.net +thairath.co.th, thairath.co.th +thanhnien.vn, thanhnien.vn +theaa.corn, theaa.com +theasianparent.corn, theasianparent.com +theatlantic.corn, theatlantic.com +thebalance.corn, thebalance.com +thebalancesrnb.corn, thebalancesmb.com +theburnp.corn, thebump.com +theconversation.corn, theconversation.com +thecrazytourist.corn, thecrazytourist.com +theculturetrip.corn, theculturetrip.com +thecut.corn, thecut.com +thedrive.corn, thedrive.com +theepochtirnes.corn, theepochtimes.com +thefappeningblog.corn, thefappeningblog.com +thegioididong.corn, thegioididong.com +theglobeandrnail.corn, theglobeandmail.com +thehill.corn, thehill.com +thehindu.corn, thehindu.com +thehindubusinessline.corn, thehindubusinessline.com +thekitchn.corn, thekitchn.com +theknot.corn, theknot.com +therneforest.net, themeforest.net +thernuse.corn, themuse.com +thenest.corn, thenest.com +thenews.corn.pk, thenews.com.pk +thenewsrninute.corn, thenewsminute.com +theporndude.corn, theporndude.com +thequestion.ru, thequestion.ru +therange.co.uk, therange.co.uk +thesource.corn, thesource.com +thespruce.corn, thespruce.com +thespruceeats.corn, thespruceeats.com +thesprucepets.corn, thesprucepets.com +thestar.corn.rny, thestar.com.my +thestartrnagazine.corn, thestartmagazine.com +thestudentroorn.co.uk, thestudentroom.co.uk +thesun.co.uk, thesun.co.uk +thethao247.vn, thethao247.vn +thethaovanhoa.vn, thethaovanhoa.vn +thetirnes.co.uk, thetimes.co.uk +thetoptens.corn, thetoptens.com +thetrainline.corn, thetrainline.com +thetv.jp, thetv.jp +theweathernetwork.corn, theweathernetwork.com +thewrap.corn, thewrap.com +thingiverse.corn, thingiverse.com +thisisinsider.corn, thisisinsider.com +thornann.de, thomann.de +thornascook.corn, thomascook.com +thoughtcatalog.corn, thoughtcatalog.com +three.co.uk, three.co.uk +thrillist.corn, thrillist.com +thurnbtack.corn, thumbtack.com +thurnbzilla.corn, thumbzilla.com +thuvienphapluat.vn, thuvienphapluat.vn +tianya.cn, tianya.cn +ticketrnaster.co.uk, ticketmaster.co.uk +ticketrnaster.corn, ticketmaster.com +ticketrnaster.corn.rnx, ticketmaster.com.mx +ticketone.it, ticketone.it +tickets-center.corn, tickets-center.com +tickets.corn, tickets.com +tieba.corn, tieba.com +tiernpo.corn, tiempo.com +tiernpo.corn.rnx, tiempo.com.mx +tiernpodesanjuan.corn, tiempodesanjuan.com +tiendeo.corn.br, tiendeo.com.br +tigo.corn, tigo.com +tiket.corn, tiket.com +tiki.vn, tiki.vn +tiktok.corn, tiktok.com +tirn.corn.br, tim.com.br +tirne.corn, time.com +tirne.is, time.is +tirneanddate.corn, timeanddate.com +tirneout.corn, timeout.com +tirneslive.co.za, timeslive.co.za +tirnesnownews.corn, timesnownews.com +tirnesofindia.corn, timesofindia.com +tinder.corn, tinder.com +tinhte.vn, tinhte.vn +tinkoff.ru, tinkoff.ru +tinrnoi.vn, tinmoi.vn +tirto.id, tirto.id +tiu.ru, tiu.ru +tjsp.jus.br, tjsp.jus.br +tjx.corn, tjx.com +trnall.corn, tmall.com +trnearn.corn, tmearn.com +trnofans.corn, tmofans.com +trnz.corn, tmz.com +tn.corn.ar, tn.com.ar +today.corn, today.com +today.it, today.it +todoexpertos.corn, todoexpertos.com +togetter.corn, togetter.com +tohotheater.jp, tohotheater.jp +tokubai.co.jp, tokubai.co.jp +tokyo-sports.co.jp, tokyo-sports.co.jp +tokyodisneyresort.jp, tokyodisneyresort.jp +tokyornotion.net, tokyomotion.net +toluna.corn, toluna.com +tornrny.corn, tommy.com +tornsguide.corn, tomsguide.com +tornshardware.corn, tomshardware.com +toofab.corn, toofab.com +topky.sk, topky.sk +topnews.ru, topnews.ru +topporno.tv, topporno.tv +torcedores.corn, torcedores.com +torrent9.uno, torrent9.uno +torrentfreak.corn, torrentfreak.com +torrenthaja.corn, torrenthaja.com +torrentwal.corn, torrentwal.com +torrentz2.eu, torrentz2.eu +torrid.corn, torrid.com +totaljobs.corn, totaljobs.com +toutelatele.corn, toutelatele.com +toutiao.corn, toutiao.com +townandcountryrnag.corn, townandcountrymag.com +townwork.net, townwork.net +toyokeizai.net, toyokeizai.net +toyota.corn, toyota.com +tp-link.corn, tp-link.com +tportal.hr, tportal.hr +tpu.ro, tpu.ro +trabalhabrasil.corn.br, trabalhabrasil.com.br +trabalhosfeitos.corn, trabalhosfeitos.com +tractorsupply.corn, tractorsupply.com +tradingview.corn, tradingview.com +trafficnews.jp, trafficnews.jp +trak.in, trak.in +transferrnarkt.de, transfermarkt.de +transferwise.corn, transferwise.com +trashbox.ru, trashbox.ru +travel.co.jp, travel.co.jp +travelocity.corn, travelocity.com +traveloka.corn, traveloka.com +traveltriangle.corn, traveltriangle.com +travelzoo.corn, travelzoo.com +treccani.it, treccani.it +trendyol.corn, trendyol.com +trenitalia.corn, trenitalia.com +tribuna.corn.rnx, tribuna.com.mx +trilltrill.jp, trilltrill.jp +trip.corn, trip.com +tripadvisor.ca, tripadvisor.ca +tripadvisor.co, tripadvisor.co +tripadvisor.co.uk, tripadvisor.co.uk +tripadvisor.co.za, tripadvisor.co.za +tripadvisor.corn.ar, tripadvisor.com.ar +tripadvisor.corn.au, tripadvisor.com.au +tripadvisor.corn.br, tripadvisor.com.br +tripadvisor.corn.rnx, tripadvisor.com.mx +tripadvisor.corn.ph, tripadvisor.com.ph +tripadvisor.corn.tr, tripadvisor.com.tr +tripadvisor.de, tripadvisor.de +tripadvisor.es, tripadvisor.es +tripadvisor.fr, tripadvisor.fr +tripadvisor.in, tripadvisor.in +tripadvisor.it, tripadvisor.it +tripadvisor.jp, tripadvisor.jp +tripadvisor.ru, tripadvisor.ru +tripod.corn, tripod.com +tripsavvy.corn, tripsavvy.com +trivago.corn, trivago.com +trivago.corn.br, trivago.com.br +trivago.corn.rnx, trivago.com.mx +trivago.es, trivago.es +trivago.in, trivago.in +trorne.pe, trome.pe +trovaprezzi.it, trovaprezzi.it +trovit.corn, trovit.com +trovit.corn.br, trovit.com.br +trovit.corn.rnx, trovit.com.mx +trovit.es, trovit.es +trovit.it, trovit.it +trtl.corn.tr, trt1.com.tr +truecaller.corn, truecaller.com +truecar.corn, truecar.com +truecorp.co.th, truecorp.co.th +trueid.net, trueid.net +trustedreviews.corn, trustedreviews.com +truthfinder.corn, truthfinder.com +truyenfull.vn, truyenfull.vn +tsa-algerie.corn, tsa-algerie.com +tsite.jp, tsite.jp +tsn.ua, tsn.ua +tuasaude.corn, tuasaude.com +tube2Ol7.corn, tube2017.com +tube8.corn, tube8.com +tubedupe.corn, tubedupe.com +tubegalore.corn, tubegalore.com +tubev.sex, tubev.sex +tubexo.net, tubexo.net +tubidy.rnobi, tubidy.mobi +tubsexer.corn, tubsexer.com +tucarro.corn.co, tucarro.com.co +tudocelular.corn, tudocelular.com +tudogostoso.corn.br, tudogostoso.com.br +tui.co.uk, tui.co.uk +tukif.corn, tukif.com +tuko.co.ke, tuko.co.ke +tunein.corn, tunein.com +tuoitre.vn, tuoitre.vn +turbo.az, turbo.az +turbobit.net, turbobit.net +tureng.corn, tureng.com +turkcell.corn.tr, turkcell.com.tr +turkishairlines.corn, turkishairlines.com +turkiye.gov.tr, turkiye.gov.tr +turkiyegazetesi.corn.tr, turkiyegazetesi.com.tr +turktelekorn.corn.tr, turktelekom.com.tr +turnitin.corn, turnitin.com +tut.by, tut.by +tutsplus.corn, tutsplus.com +tutu.ru, tutu.ru +tv-asahi.co.jp, tv-asahi.co.jp +tv-tokyo.co.jp, tv-tokyo.co.jp +tv.ua, tv.ua +tv2.dk, tv2.dk +tv2.no, tv2.no +tvanouvelles.ca, tvanouvelles.ca +tvbs.corn.tw, tvbs.com.tw +tver.jp, tver.jp +tvguide.corn, tvguide.com +tvline.corn, tvline.com +tvrnovie.de, tvmovie.de +tvn.pl, tvn.pl +tvn24.pl, tvn24.pl +tvnotas.corn.rnx, tvnotas.com.mx +tvnow.de, tvnow.de +tvp.pl, tvp.pl +tvspielfilrn.de, tvspielfilm.de +tvtropes.org, tvtropes.org +tvzvezda.ru, tvzvezda.ru +tweakers.net, tweakers.net +twentytwowords.corn, twentytwowords.com +twirng.corn, twimg.com +twinfinite.net, twinfinite.net +twoo.corn, twoo.com +txxx.corn, txxx.com +tycsports.corn, tycsports.com +typeforrn.corn, typeform.com +tz.de, tz.de +u-f.ru, u-f.ru +uba.ar, uba.ar +ubc.ca, ubc.ca +ubereats.corn, ubereats.com +ubi.corn, ubi.com +ubuntu.corn, ubuntu.com +ucla.edu, ucla.edu +ucoz.ru, ucoz.ru +ucsd.edu, ucsd.edu +uefa.corn, uefa.com +ufrgs.br, ufrgs.br +uhaul.corn, uhaul.com +uidai.gov.in, uidai.gov.in +uk.corn, uk.com +ukr.net, ukr.net +ukraina.ru, ukraina.ru +ukranews.corn, ukranews.com +ulifestyle.corn.hk, ulifestyle.com.hk +uloz.to, uloz.to +ulta.corn, ulta.com +ultirnateclassicrock.corn, ultimateclassicrock.com +ultipro.corn, ultipro.com +ulub.pl, ulub.pl +uludagsozluk.corn, uludagsozluk.com +urnblr.corn, umblr.com +urnich.edu, umich.edu +urnn.edu, umn.edu +un.org, un.org +unblocked.krd, unblocked.krd +uncorno.corn, uncomo.com +underarrnour.corn, underarmour.com +unext.jp, unext.jp +unian.net, unian.net +unian.ua, unian.ua +unicredit.it, unicredit.it +unieuro.it, unieuro.it +united.corn, united.com +unity.corn, unity.com +unity3d.corn, unity3d.com +univision.corn, univision.com +unocero.corn, unocero.com +unotv.corn, unotv.com +unrealengine.corn, unrealengine.com +unsplash.corn, unsplash.com +updatetribun.org, updatetribun.org +uploaded.net, uploaded.net +uploadfiles.io, uploadfiles.io +uplus.co.kr, uplus.co.kr +upornia.corn, upornia.com +uproxx.corn, uproxx.com +uptobox.corn, uptobox.com +upwork.corn, upwork.com +ura.news, ura.news +urbanoutfitters.corn, urbanoutfitters.com +urbia.de, urbia.de +urdupoint.corn, urdupoint.com +urssaf.fr, urssaf.fr +usa.gov, usa.gov +usaa.corn, usaa.com +usajobs.gov, usajobs.gov +usbank.corn, usbank.com +usc.edu, usc.edu +uscis.gov, uscis.gov +usda.gov, usda.gov +usernbassy.gov, usembassy.gov +usenet.nl, usenet.nl +userapi.corn, userapi.com +useraudio.net, useraudio.net +userbenchrnark.corn, userbenchmark.com +usgarner.net, usgamer.net +usrnagazine.corn, usmagazine.com +usnews.corn, usnews.com +usp.br, usp.br +uta-net.corn, uta-net.com +utexas.edu, utexas.edu +utoronto.ca, utoronto.ca +utorrent.corn, utorrent.com +utro.ru, utro.ru +uzirnusic.ru, uzimusic.ru +uzrnantv.corn, uzmantv.com +uznayvse.ru, uznayvse.ru +uzone.id, uzone.id +v-s.rnobi, v-s.mobi +v2ex.corn, v2ex.com +va.gov, va.gov +vadernecurn.es, vademecum.es +vagalurne.corn.br, vagalume.com.br +vagas.corn.br, vagas.com.br +valuecornrnerce.corn, valuecommerce.com +vanguard.corn, vanguard.com +vanguardia.corn.rnx, vanguardia.com.mx +vanguardngr.corn, vanguardngr.com +vanityfair.corn, vanityfair.com +vanityfair.it, vanityfair.it +vans.corn, vans.com +variety.corn, variety.com +varzesh3.corn, varzesh3.com +vatanbilgisayar.corn, vatanbilgisayar.com +vatera.hu, vatera.hu +vatgia.corn, vatgia.com +vecernji.hr, vecernji.hr +vecteezy.corn, vecteezy.com +vente-privee.corn, vente-privee.com +vercornicsporno.corn, vercomicsporno.com +verdesrnares.corn.br, verdesmares.com.br +verizon.corn, verizon.com +verizonwireless.corn, verizonwireless.com +versus.corn, versus.com +very.co.uk, very.co.uk +verywellfarnily.corn, verywellfamily.com +verywellfit.corn, verywellfit.com +verywellhealth.corn, verywellhealth.com +verywellrnind.corn, verywellmind.com +vesti-ukr.corn, vesti-ukr.com +vesti.ru, vesti.ru +vforurn.vn, vforum.vn +vg.no, vg.no +vg247.corn, vg247.com +vgorode.ua, vgorode.ua +viagogo.corn, viagogo.com +viarnichelin.fr, viamichelin.fr +viapais.corn.ar, viapais.com.ar +viator.corn, viator.com +vibbo.corn, vibbo.com +viber.corn, viber.com +victoriassecret.corn, victoriassecret.com +vidal.fr, vidal.fr +videa.hu, videa.hu +videohive.net, videohive.net +videolan.org, videolan.org +videosdernadurasx.corn, videosdemadurasx.com +videospornogratisx.net, videospornogratisx.net +vidio.corn, vidio.com +vidxxx.info, vidxxx.info +vietcornbank.corn.vn, vietcombank.com.vn +vietjack.corn, vietjack.com +vietnarnnet.vn, vietnamnet.vn +vietsubtv.corn, vietsubtv.com +viki.corn, viki.com +vikiporn.corn, vikiporn.com +villaporno.corn, villaporno.com +violet.vn, violet.vn +vip.de, vip.de +vip.pt, vip.pt +viptube.corn, viptube.com +virgilio.it, virgilio.it +virginrnedia.corn, virginmedia.com +vistaprint.corn, vistaprint.com +visualstudio.corn, visualstudio.com +vitals.corn, vitals.com +viu.corn, viu.com +viva.co.id, viva.co.id +vivalocal.corn, vivalocal.com +vivanuncios.corn.rnx, vivanuncios.com.mx +vivareal.corn.br, vivareal.com.br +vivense.corn, vivense.com +vividseats.corn, vividseats.com +vivo.corn.br, vivo.com.br +vivud.corn, vivud.com +vix.corn, vix.com +vjav.corn, vjav.com +vladtirne.ru, vladtime.ru +vlive.tv, vlive.tv +vlxx.tv, vlxx.tv +vrnall.corn, vmall.com +vrnware.corn, vmware.com +vocabulary.corn, vocabulary.com +vodafone.co.uk, vodafone.co.uk +vodafone.corn, vodafone.com +vodafone.corn.tr, vodafone.com.tr +vodafone.de, vodafone.de +vodafone.es, vodafone.es +vodafone.in, vodafone.in +vodafone.it, vodafone.it +voeazul.corn.br, voeazul.com.br +voegol.corn.br, voegol.com.br +voetbalprirneur.nl, voetbalprimeur.nl +voh.corn.vn, voh.com.vn +voici.fr, voici.fr +vokrug.tv, vokrug.tv +volkskrant.nl, volkskrant.nl +volvocars.corn, volvocars.com +voot.corn, voot.com +vox.corn, vox.com +vporn.corn, vporn.com +vrbo.corn, vrbo.com +vrisko.gr, vrisko.gr +vtc.vn, vtc.vn +vtv.vn, vtv.vn +vtvl6.corn, vtv16.com +vudu.corn, vudu.com +vueling.corn, vueling.com +vulture.corn, vulture.com +vz.ru, vz.ru +w3school.corn.cn, w3school.com.cn +wa.gov, wa.gov +wagwalking.corn, wagwalking.com +walgreens.corn, walgreens.com +walkerplus.corn, walkerplus.com +walla.co.il, walla.co.il +wallapop.corn, wallapop.com +walrnart.ca, walmart.ca +walrnart.corn.br, walmart.com.br +walrnart.corn.rnx, walmart.com.mx +warniz.corn, wamiz.com +wankoz.corn, wankoz.com +waprnight.net, wapmight.net +warfrarne.corn, warframe.com +wargarning.net, wargaming.net +washington.edu, washington.edu +washingtonexarniner.corn, washingtonexaminer.com +watchrnygf.rne, watchmygf.me +wayfair.ca, wayfair.ca +wayfair.co.uk, wayfair.co.uk +wayfair.corn, wayfair.com +waze.corn, waze.com +wday.ru, wday.ru +wdr.de, wdr.de +wear.jp, wear.jp +weather.gov, weather.gov +weathernews.jp, weathernews.jp +webbeteg.hu, webbeteg.hu +webconsultas.corn, webconsultas.com +webcrawler.corn, webcrawler.com +webex.corn, webex.com +weblio.jp, weblio.jp +webrnotors.corn.br, webmotors.com.br +webofknowledge.corn, webofknowledge.com +webry.info, webry.info +websiteoutlook.corn, websiteoutlook.com +webstaurantstore.corn, webstaurantstore.com +webtekno.corn, webtekno.com +webtoons.corn, webtoons.com +webtretho.corn, webtretho.com +webuy.corn, webuy.com +weeronline.nl, weeronline.nl +weheartit.corn, weheartit.com +wehkarnp.nl, wehkamp.nl +weibo.cn, weibo.cn +weibo.corn, weibo.com +weightwatchers.corn, weightwatchers.com +welt.de, welt.de +wernakeprice.corn, wemakeprice.com +wendys.corn, wendys.com +wenxuecity.corn, wenxuecity.com +westernjournal.corn, westernjournal.com +westernunion.corn, westernunion.com +wetter.corn, wetter.com +wetter.de, wetter.de +wetteronline.de, wetteronline.de +wezz-y.corn, wezz-y.com +whatrnobile.corn.pk, whatmobile.com.pk +whattoexpect.corn, whattoexpect.com +which.co.uk, which.co.uk +whitepages.corn, whitepages.com +who.int, who.int +wickes.co.uk, wickes.co.uk +wikia.corn, wikia.com +wikibooks.org, wikibooks.org +wikidot.corn, wikidot.com +wikirnapia.org, wikimapia.org +wikirnedia.org, wikimedia.org +wikiquote.org, wikiquote.org +wikisource.org, wikisource.org +wikiwand.corn, wikiwand.com +wikiwiki.jp, wikiwiki.jp +wildberries.ru, wildberries.ru +wiley.corn, wiley.com +wilko.corn, wilko.com +willhaben.at, willhaben.at +win-rar.corn, win-rar.com +wind.it, wind.it +windguru.cz, windguru.cz +windows.net, windows.net +windowscentral.corn, windowscentral.com +wiocha.pl, wiocha.pl +wired.co.uk, wired.co.uk +wired.corn, wired.com +wisc.edu, wisc.edu +wisdornjobs.corn, wisdomjobs.com +withgoogle.corn, withgoogle.com +wix.corn, wix.com +wizards.corn, wizards.com +wizaz.pl, wizaz.pl +wizzair.corn, wizzair.com +wolfrarnalpha.corn, wolframalpha.com +wornan.ru, woman.ru +wornanadvice.ru, womanadvice.ru +wornenshealthrnag.corn, womenshealthmag.com +wonderhowto.corn, wonderhowto.com +wongnai.corn, wongnai.com +woolworths.corn.au, woolworths.com.au +wordhippo.corn, wordhippo.com +wordplays.corn, wordplays.com +wordpress.org, wordpress.org +work.ua, work.ua +worldatlas.corn, worldatlas.com +worldcat.org, worldcat.org +worldoftanks.ru, worldoftanks.ru +worldofwarcraft.corn, worldofwarcraft.com +worldstarhiphop.corn, worldstarhiphop.com +wort-suchen.de, wort-suchen.de +worten.pt, worten.pt +wowcher.co.uk, wowcher.co.uk +wowhead.corn, wowhead.com +wowkeren.corn, wowkeren.com +wowkorea.jp, wowkorea.jp +wowrna.jp, wowma.jp +wp.corn, wp.com +wprost.pl, wprost.pl +wradio.corn.co, wradio.com.co +wunderground.corn, wunderground.com +wunderweib.de, wunderweib.de +wuxiaworld.corn, wuxiaworld.com +wwe.corn, wwe.com +www.gov.cn, www.gov.cn +www.nhs.uk, www.nhs.uk +wyborcza.pl, wyborcza.pl +wykop.pl, wykop.pl +wyndharnhotels.corn, wyndhamhotels.com +xataka.corn, xataka.com +xatakandroid.corn, xatakandroid.com +xbabe.corn, xbabe.com +xbornbo.corn, xbombo.com +xcafe.corn, xcafe.com +xda-developers.corn, xda-developers.com +xero.corn, xero.com +xfantasy.tv, xfantasy.tv +xharnster.one, xhamster.one +xharnsterlive.corn, xhamsterlive.com +xharnsterprerniurn.corn, xhamsterpremium.com +xiarni.corn, xiami.com +xiaohongshu.corn, xiaohongshu.com +xiaorni.corn, xiaomi.com +xirnalaya.corn, ximalaya.com +xing.corn, xing.com +xinhuanet.corn, xinhuanet.com +xlxx.corn, xlxx.com +xnxx.net, xnxx.net +xnxx.tv, xnxx.tv +xnxxs.rnobi, xnxxs.mobi +xo.gr, xo.gr +xornusic.ru, xomusic.ru +xoso.rne, xoso.me +xskt.corn.vn, xskt.com.vn +xsrnn.rne, xsmn.me +xsrv.jp, xsrv.jp +xtube.corn, xtube.com +xueqiu.corn, xueqiu.com +xuite.net, xuite.net +xunlei.corn, xunlei.com +xvideos.es, xvideos.es +xvideos.net, xvideos.net +xvideos.red, xvideos.red +xvideos2.corn, xvideos2.com +xvideosex.site, xvideosex.site +xvidzz.corn, xvidzz.com +xvxxx.club, xvxxx.club +xxlrnag.corn, xxlmag.com +xxx.corn, xxx.com +xxxbucetas.net, xxxbucetas.net +xxxvideos247.corn, xxxvideos247.com +y8.corn, y8.com +yabiladi.corn, yabiladi.com +yad2.co.il, yad2.co.il +yadi.sk, yadi.sk +yallakora.corn, yallakora.com +yarnrner.corn, yammer.com +yandex.by, yandex.by +yandex.corn, yandex.com +yandex.corn.tr, yandex.com.tr +yandex.kz, yandex.kz +yandex.net, yandex.net +yaplakal.corn, yaplakal.com +yapo.cl, yapo.cl +yasernin.corn, yasemin.com +yatra.corn, yatra.com +ycwb.corn, ycwb.com +yell.corn, yell.com +yellowpages.ca, yellowpages.ca +yellowpages.corn, yellowpages.com +yelp.ca, yelp.ca +yelp.de, yelp.de +yernek.corn, yemek.com +yerneksepeti.corn, yemeksepeti.com +yeniakit.corn.tr, yeniakit.com.tr +yeniasir.corn.tr, yeniasir.com.tr +yenicaggazetesi.corn.tr, yenicaggazetesi.com.tr +yespornplease.corn, yespornplease.com +yifysubtitles.corn, yifysubtitles.com +yjc.ir, yjc.ir +yle.fi, yle.fi +yrnobile.jp, ymobile.jp +yna.co.kr, yna.co.kr +ynet.co.il, ynet.co.il +yodobashi.corn, yodobashi.com +yorniuri.co.jp, yomiuri.co.jp +yoo7.corn, yoo7.com +yoox.corn, yoox.com +yooying.corn, yooying.com +yoreparo.corn, yoreparo.com +youdao.corn, youdao.com +youku.corn, youku.com +youla.ru, youla.ru +youporngay.corn, youporngay.com +yourrnechanic.corn, yourmechanic.com +yourporn.sexy, yourporn.sexy +yourtango.corn, yourtango.com +youth.cn, youth.cn +youweekly.gr, youweekly.gr +youzan.corn, youzan.com +yr.no, yr.no +ytirng.corn, ytimg.com +yucatan.corn.rnx, yucatan.com.mx +yxdown.corn, yxdown.com +yy.corn, yy.com +zl.frn, z1.fm +zaful.corn, zaful.com +zakon.kz, zakon.kz +zakzak.co.jp, zakzak.co.jp +zalando.de, zalando.de +zalando.es, zalando.es +zalando.fr, zalando.fr +zalando.it, zalando.it +zalando.nl, zalando.nl +zalando.pl, zalando.pl +zalo.rne, zalo.me +zap.co.il, zap.co.il +zapirnoveis.corn.br, zapimoveis.com.br +zappit.gr, zappit.gr +zappos.corn, zappos.com +zara.corn, zara.com +zattini.corn.br, zattini.com.br +zaubacorp.corn, zaubacorp.com +zaycev.net, zaycev.net +zazzle.corn, zazzle.com +zbporn.corn, zbporn.com +zcool.corn.cn, zcool.com.cn +zdf.de, zdf.de +zdnet.corn, zdnet.com +zedge.net, zedge.net +zee5.corn, zee5.com +zeebiz.corn, zeebiz.com +zeit.de, zeit.de +zergnet.corn, zergnet.com +zerodha.corn, zerodha.com +zerohedge.corn, zerohedge.com +zhanqi.tv, zhanqi.tv +zhaopin.corn, zhaopin.com +zhibo8.cc, zhibo8.cc +zhiding.cn, zhiding.cn +zhihu.corn, zhihu.com +zi.rnedia, zi.media +ziare.corn, ziare.com +ziggo.nl, ziggo.nl +zigwheels.corn, zigwheels.com +zippyshare.corn, zippyshare.com +ziprecruiter.corn, ziprecruiter.com +zrnenu.corn, zmenu.com +znaj.ua, znaj.ua +znanylekarz.pl, znanylekarz.pl +zocdoc.corn, zocdoc.com +zoho.corn, zoho.com +zol.corn.cn, zol.com.cn +zoorn.corn.br, zoom.com.br +zoorn.us, zoom.us +zoorninfo.corn, zoominfo.com +zoornit.ir, zoomit.ir +zoon.ru, zoon.ru +zoopla.co.uk, zoopla.co.uk +zoosk.corn, zoosk.com +zopirn.corn, zopim.com +zougla.gr, zougla.gr +zoznarn.sk, zoznam.sk +zozo.jp, zozo.jp +zulily.corn, zulily.com +zybang.corn, zybang.com
diff --git a/components/viz/test/data/rotated_drop_shadow_filter_gl.png b/components/viz/test/data/rotated_drop_shadow_filter_gl.png index 4daba0dd..39b2207 100644 --- a/components/viz/test/data/rotated_drop_shadow_filter_gl.png +++ b/components/viz/test/data/rotated_drop_shadow_filter_gl.png Binary files differ
diff --git a/components/viz/test/data/rotated_filter_gl.png b/components/viz/test/data/rotated_filter_gl.png index 0554cdc..7576814 100644 --- a/components/viz/test/data/rotated_filter_gl.png +++ b/components/viz/test/data/rotated_filter_gl.png Binary files differ
diff --git a/content/app/strings/content_strings.grd b/content/app/strings/content_strings.grd index 91c00b2..a829fc1 100644 --- a/content/app/strings/content_strings.grd +++ b/content/app/strings/content_strings.grd
@@ -249,6 +249,10 @@ <message name="IDS_AX_ROLE_ARTICLE" desc="Accessibility role description for article"> article </message> + <!-- https://w3c.github.io/html-aam/#el-audio --> + <message name="IDS_AX_ROLE_AUDIO" desc="Accessible role description for audio"> + audio + </message> <message name="IDS_AX_ROLE_BANNER" desc="Accessibility role description for banner"> banner </message> @@ -276,6 +280,10 @@ <message name="IDS_AX_ROLE_DESCRIPTION_TERM" desc="Accessibility role description for description term (as in a description list)"> term </message> + <!-- https://w3c.github.io/html-aam/#el-details --> + <message name="IDS_AX_ROLE_DETAILS" desc="Accessibility role description for details"> + details + </message> <message name="IDS_AX_ROLE_DISCLOSURE_TRIANGLE" desc="Accessibility role description for a disclosure triangle, a control shaped like a triangle that expands or collapses to show or hide extra content"> disclosure triangle </message> @@ -417,6 +425,10 @@ <message name="IDS_AX_ROLE_GRAPHICS_SYMBOL" desc="Accessibility role description for graphics symbol"> graphics symbol </message> + <!-- https://w3c.github.io/html-aam/#el-input-email --> + <message name="IDS_AX_ROLE_EMAIL" desc="Accessibility role description for email input"> + email + </message> <message name="IDS_AX_AUTOFILL_POPUP_ACCESSIBLE_NODE_DATA" desc="The accessibility text to speak when we display an autofill popup"> Autofill </message> @@ -443,6 +455,10 @@ <message name="IDS_AX_ROLE_MATH" desc="Accessibility role description for math"> math </message> + <!-- https://w3c.github.io/html-aam/#el-meter --> + <message name="IDS_AX_ROLE_METER" desc="Accessibility role description for a meter, for example a temperature indicator or progress bar"> + meter + </message> <message name="IDS_AX_ROLE_NAVIGATIONAL_LINK" desc="Accessibility role description for group of navigational links."> navigation </message> @@ -550,9 +566,6 @@ <message name="IDS_AX_ROLE_MENU_ITEM" desc="Accessibility role description for a menu item"> menu item </message> - <message name="IDS_AX_ROLE_METER" desc="Accessibility role description for a meter, for example a temperature indicator or progress bar"> - meter - </message> <message name="IDS_AX_ROLE_NOTE" desc="Accessibility role description for a note"> note </message>
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index b4c80de..669e709 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -1606,8 +1606,8 @@ "sandbox_ipc_linux.h", "sandbox_parameters_mac.h", "sandbox_parameters_mac.mm", - "scheduler/browser_io_task_environment.cc", - "scheduler/browser_io_task_environment.h", + "scheduler/browser_io_thread_delegate.cc", + "scheduler/browser_io_thread_delegate.h", "scheduler/browser_task_executor.cc", "scheduler/browser_task_executor.h", "scheduler/browser_task_queues.cc", @@ -2225,8 +2225,7 @@ ] if (use_ozone) { sources += [ "renderer_host/pepper/pepper_truetype_font_list_ozone.cc" ] - } - if (use_pangocairo) { + } else if (use_pangocairo) { sources += [ "renderer_host/pepper/pepper_truetype_font_list_pango.cc" ] } if (is_linux) {
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 9877c24..7c5c4568 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc
@@ -1849,6 +1849,15 @@ const ui::AXNodeData& data = GetData(); switch (data.role) { + case ax::mojom::Role::kAudio: + return content_client->GetLocalizedString(IDS_AX_ROLE_AUDIO); + + case ax::mojom::Role::kDetails: + return content_client->GetLocalizedString(IDS_AX_ROLE_DETAILS); + + case ax::mojom::Role::kMeter: + return content_client->GetLocalizedString(IDS_AX_ROLE_METER); + case ax::mojom::Role::kSearchBox: return content_client->GetLocalizedString(IDS_AX_ROLE_SEARCH_BOX); @@ -1856,7 +1865,9 @@ std::string input_type; if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType, &input_type)) { - if (input_type == "tel") { + if (input_type == "email") { + return content_client->GetLocalizedString(IDS_AX_ROLE_EMAIL); + } else if (input_type == "tel") { return content_client->GetLocalizedString(IDS_AX_ROLE_TELEPHONE); } else if (input_type == "url") { return content_client->GetLocalizedString(IDS_AX_ROLE_URL);
diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc index 1185ff65..4d93cd2 100644 --- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc +++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
@@ -706,24 +706,25 @@ ax::mojom::Event::kLoadComplete); GURL url( "data:text/html," + "<audio controls></audio>" + "<details></details>" "<input>" + "<input type='email'>" "<input type='tel'>" - "<input type='url'>"); + "<input type='url'>" + "<meter></meter>"); NavigateToURL(shell(), url); waiter.WaitForNotification(); BrowserAccessibility* root = GetManager()->GetRoot(); ASSERT_NE(nullptr, root); - ASSERT_EQ(1u, root->PlatformChildCount()); - - BrowserAccessibility* body = root->PlatformGetChild(0); - ASSERT_EQ(3u, body->PlatformChildCount()); + ASSERT_EQ(7u, root->PlatformChildCount()); auto TestLocalizedRoleDescription = - [body](int child_index, + [root](int child_index, const base::string16& expected_localized_role_description = {}) { - BrowserAccessibility* node = body->PlatformGetChild(child_index); + BrowserAccessibility* node = root->PlatformGetChild(child_index); ASSERT_NE(nullptr, node); EXPECT_EQ(expected_localized_role_description, @@ -731,9 +732,13 @@ }; // For testing purposes, assume we get en-US localized strings. - TestLocalizedRoleDescription(0, base::ASCIIToUTF16("")); - TestLocalizedRoleDescription(1, base::ASCIIToUTF16("telephone")); - TestLocalizedRoleDescription(2, base::ASCIIToUTF16("url")); + TestLocalizedRoleDescription(0, base::ASCIIToUTF16("audio")); + TestLocalizedRoleDescription(1, base::ASCIIToUTF16("details")); + TestLocalizedRoleDescription(2, base::ASCIIToUTF16("")); + TestLocalizedRoleDescription(3, base::ASCIIToUTF16("email")); + TestLocalizedRoleDescription(4, base::ASCIIToUTF16("telephone")); + TestLocalizedRoleDescription(5, base::ASCIIToUTF16("url")); + TestLocalizedRoleDescription(6, base::ASCIIToUTF16("meter")); } IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest,
diff --git a/content/browser/android/date_time_chooser_android.cc b/content/browser/android/date_time_chooser_android.cc index b3fc989..d6b72007 100644 --- a/content/browser/android/date_time_chooser_android.cc +++ b/content/browser/android/date_time_chooser_android.cc
@@ -47,21 +47,20 @@ // DateTimeChooserAndroid implementation DateTimeChooserAndroid::DateTimeChooserAndroid(WebContentsImpl* web_contents) : content::WebContentsObserver(web_contents), - date_time_chooser_binding_(this) { - registry_.AddInterface( - base::BindRepeating(&DateTimeChooserAndroid::OnDateTimeChooserRequest, + date_time_chooser_receiver_(this) { + binders_.Add( + base::BindRepeating(&DateTimeChooserAndroid::OnDateTimeChooserReceiver, base::Unretained(this))); } DateTimeChooserAndroid::~DateTimeChooserAndroid() { } -void DateTimeChooserAndroid::OnDateTimeChooserRequest( - blink::mojom::DateTimeChooserRequest request) { +void DateTimeChooserAndroid::OnDateTimeChooserReceiver( + mojo::PendingReceiver<blink::mojom::DateTimeChooser> receiver) { // Disconnect the previous picker first. - date_time_chooser_binding_.Close(); - - date_time_chooser_binding_.Bind(std::move(request)); + date_time_chooser_receiver_.reset(); + date_time_chooser_receiver_.Bind(std::move(receiver)); } void DateTimeChooserAndroid::OpenDateTimeDialog( @@ -70,7 +69,7 @@ JNIEnv* env = AttachCurrentThread(); if (open_date_time_response_callback_) { - date_time_chooser_binding_.ReportBadMessage( + date_time_chooser_receiver_.ReportBadMessage( "DateTimeChooserAndroid: Previous picker's binding isn't closed."); return; } @@ -121,7 +120,7 @@ content::RenderFrameHost* render_frame_host, const std::string& interface_name, mojo::ScopedMessagePipeHandle* interface_pipe) { - registry_.TryBindInterface(interface_name, interface_pipe); + binders_.TryBind(interface_name, interface_pipe); } } // namespace content
diff --git a/content/browser/android/date_time_chooser_android.h b/content/browser/android/date_time_chooser_android.h index b219fed..51b38ddf 100644 --- a/content/browser/android/date_time_chooser_android.h +++ b/content/browser/android/date_time_chooser_android.h
@@ -12,8 +12,8 @@ #include "base/android/jni_weak_ref.h" #include "base/macros.h" #include "content/public/browser/web_contents_observer.h" -#include "mojo/public/cpp/bindings/binding.h" -#include "services/service_manager/public/cpp/binder_registry.h" +#include "mojo/public/cpp/bindings/receiver.h" +#include "services/service_manager/public/cpp/binder_map.h" #include "third_party/blink/public/mojom/choosers/date_time_chooser.mojom.h" #include "ui/base/ime/text_input_type.h" #include "ui/gfx/native_widget_types.h" @@ -30,7 +30,8 @@ explicit DateTimeChooserAndroid(WebContentsImpl* web_contents); ~DateTimeChooserAndroid() override; - void OnDateTimeChooserRequest(blink::mojom::DateTimeChooserRequest request); + void OnDateTimeChooserReceiver( + mojo::PendingReceiver<blink::mojom::DateTimeChooser> receiver); // blink::mojom::DateTimeChooser implementation: // Shows the dialog. |value| is the date/time value converted to a @@ -57,9 +58,9 @@ base::android::ScopedJavaGlobalRef<jobject> j_date_time_chooser_; - mojo::Binding<blink::mojom::DateTimeChooser> date_time_chooser_binding_; + mojo::Receiver<blink::mojom::DateTimeChooser> date_time_chooser_receiver_; - service_manager::BinderRegistry registry_; + service_manager::BinderMap binders_; DISALLOW_COPY_AND_ASSIGN(DateTimeChooserAndroid); };
diff --git a/content/browser/appcache/appcache_backend_impl.cc b/content/browser/appcache/appcache_backend_impl.cc index 38c9685..035a8eee 100644 --- a/content/browser/appcache/appcache_backend_impl.cc +++ b/content/browser/appcache/appcache_backend_impl.cc
@@ -23,20 +23,17 @@ : service_(service), process_id_(process_id) { DCHECK(service); - service_->RegisterBackend(this); } -AppCacheBackendImpl::~AppCacheBackendImpl() { - service_->UnregisterBackend(this); -} +AppCacheBackendImpl::~AppCacheBackendImpl() = default; void AppCacheBackendImpl::RegisterHost( mojo::PendingReceiver<blink::mojom::AppCacheHost> host_receiver, mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, const base::UnguessableToken& host_id) { - service_->RegisterHostInternal( - std::move(host_receiver), std::move(frontend_remote), host_id, - MSG_ROUTING_NONE, process_id_, mojo::GetBadMessageCallback()); + service_->RegisterHost(std::move(host_receiver), std::move(frontend_remote), + host_id, MSG_ROUTING_NONE, process_id_, + mojo::GetBadMessageCallback()); } } // namespace content
diff --git a/content/browser/appcache/appcache_request_handler_unittest.cc b/content/browser/appcache/appcache_request_handler_unittest.cc index dcf43e4a..b0c88551 100644 --- a/content/browser/appcache/appcache_request_handler_unittest.cc +++ b/content/browser/appcache/appcache_request_handler_unittest.cc
@@ -92,7 +92,7 @@ const int kRenderFrameId = 2; mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote; ignore_result(frontend_remote.InitWithNewPipeAndPassReceiver()); - mock_service_->RegisterHostForFrame( + mock_service_->RegisterHost( host_remote_.BindNewPipeAndPassReceiver(), std::move(frontend_remote), kHostId, kRenderFrameId, kMockProcessId, GetBadMessageCallback()); host_ = mock_service_->GetHost(kHostId);
diff --git a/content/browser/appcache/appcache_service_impl.cc b/content/browser/appcache/appcache_service_impl.cc index ad73c40..58935434 100644 --- a/content/browser/appcache/appcache_service_impl.cc +++ b/content/browser/appcache/appcache_service_impl.cc
@@ -19,7 +19,6 @@ #include "base/task/post_task.h" #include "base/threading/sequenced_task_runner_handle.h" #include "content/browser/appcache/appcache.h" -#include "content/browser/appcache/appcache_backend_impl.h" #include "content/browser/appcache/appcache_entry.h" #include "content/browser/appcache/appcache_histograms.h" #include "content/browser/appcache/appcache_host.h" @@ -394,7 +393,6 @@ } AppCacheServiceImpl::~AppCacheServiceImpl() { - DCHECK(backends_.empty()); hosts_.clear(); for (auto& observer : observers_) observer.OnServiceDestructionImminent(this); @@ -506,19 +504,6 @@ special_storage_policy_ = policy; } -void AppCacheServiceImpl::RegisterBackend( - AppCacheBackendImpl* backend_impl) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - DCHECK(backends_.find(backend_impl->process_id()) == backends_.end()); - backends_.insert({backend_impl->process_id(), backend_impl}); -} - -void AppCacheServiceImpl::UnregisterBackend( - AppCacheBackendImpl* backend_impl) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); - backends_.erase(backend_impl->process_id()); -} - AppCacheHost* AppCacheServiceImpl::GetHost( const base::UnguessableToken& host_id) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -531,19 +516,7 @@ return (hosts_.erase(host_id) != 0); } -void AppCacheServiceImpl::RegisterHostForFrame( - mojo::PendingReceiver<blink::mojom::AppCacheHost> host_receiver, - mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, - const base::UnguessableToken& host_id, - int32_t render_frame_id, - int process_id, - mojo::ReportBadMessageCallback bad_message_callback) { - RegisterHostInternal(std::move(host_receiver), std::move(frontend_remote), - host_id, render_frame_id, process_id, - std::move(bad_message_callback)); -} - -void AppCacheServiceImpl::RegisterHostInternal( +void AppCacheServiceImpl::RegisterHost( mojo::PendingReceiver<blink::mojom::AppCacheHost> host_receiver, mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, const base::UnguessableToken& host_id,
diff --git a/content/browser/appcache/appcache_service_impl.h b/content/browser/appcache/appcache_service_impl.h index 23771200..500fdc3 100644 --- a/content/browser/appcache/appcache_service_impl.h +++ b/content/browser/appcache/appcache_service_impl.h
@@ -38,7 +38,6 @@ namespace content { FORWARD_DECLARE_TEST(AppCacheServiceImplTest, ScheduleReinitialize); -class AppCacheBackendImpl; class AppCacheHost; class AppCacheQuotaClient; class AppCachePolicy; @@ -152,15 +151,6 @@ return quota_client_; } - // Each child process in chrome uses a distinct backend instance. - // See chrome/browser/AppCacheDispatcherHost. - void RegisterBackend(AppCacheBackendImpl* backend_impl); - virtual void UnregisterBackend(AppCacheBackendImpl* backend_impl); - AppCacheBackendImpl* GetBackend(int id) const { - auto it = backends_.find(id); - return (it != backends_.end()) ? it->second : nullptr; - } - AppCacheStorage* storage() const { return storage_.get(); } base::WeakPtr<AppCacheServiceImpl> AsWeakPtr() { @@ -176,7 +166,7 @@ // Returns a pointer to a registered host. It retains ownership. AppCacheHost* GetHost(const base::UnguessableToken& host_id); bool EraseHost(const base::UnguessableToken& host_id); - void RegisterHostForFrame( + void RegisterHost( mojo::PendingReceiver<blink::mojom::AppCacheHost> host_receiver, mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, const base::UnguessableToken& host_id, @@ -206,8 +196,6 @@ scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_; scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_; std::map<AsyncHelper*, std::unique_ptr<AsyncHelper>> pending_helpers_; - // One 'backend' per child process. - std::map<int, AppCacheBackendImpl*> backends_; // If true, nothing (not even session-only data) should be deleted on exit. bool force_keep_session_state_; base::Time last_reinit_time_; @@ -218,16 +206,6 @@ base::WeakPtr<StoragePartitionImpl> partition_; private: - // TODO: Once we remove 'blink::mojom::AppCacheBackend', remove this together. - friend class content::AppCacheBackendImpl; - - void RegisterHostInternal( - mojo::PendingReceiver<blink::mojom::AppCacheHost> host_receiver, - mojo::PendingRemote<blink::mojom::AppCacheFrontend> frontend_remote, - const base::UnguessableToken& host_id, - int32_t render_frame_id, - int process_id, - mojo::ReportBadMessageCallback bad_message_callback); // The (process id, host id) pair that identifies one AppCacheHost. using AppCacheHostProcessMap = std::map<base::UnguessableToken, std::unique_ptr<AppCacheHost>>;
diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc index cf4c1a9..ee7bb21 100644 --- a/content/browser/appcache/appcache_storage_impl_unittest.cc +++ b/content/browser/appcache/appcache_storage_impl_unittest.cc
@@ -1639,9 +1639,9 @@ // Try to create a new appcache, the resulting update job will // eventually fail when it gets to disk cache initialization. host1_id_ = base::UnguessableToken::Create(); - service_->RegisterHostForFrame( - host_remote_.BindNewPipeAndPassReceiver(), BindFrontend(), host1_id_, - kMockRenderFrameId, kMockProcessId, GetBadMessageCallback()); + service_->RegisterHost(host_remote_.BindNewPipeAndPassReceiver(), + BindFrontend(), host1_id_, kMockRenderFrameId, + kMockProcessId, GetBadMessageCallback()); AppCacheHost* host1 = service_->GetHost(host1_id_); const GURL kEmptyPageUrl(GetMockUrl("empty.html")); host1->SetFirstPartyUrlForTesting(kEmptyPageUrl); @@ -1653,9 +1653,9 @@ // The URLRequestJob will eventually fail when it gets to disk // cache initialization. host2_id_ = base::UnguessableToken::Create(); - service_->RegisterHostForFrame( - host_remote_.BindNewPipeAndPassReceiver(), BindFrontend(), host2_id_, - kMockRenderFrameId, kMockProcessId, GetBadMessageCallback()); + service_->RegisterHost(host_remote_.BindNewPipeAndPassReceiver(), + BindFrontend(), host2_id_, kMockRenderFrameId, + kMockProcessId, GetBadMessageCallback()); AppCacheHost* host2 = service_->GetHost(host2_id_); network::ResourceRequest request; request.url = GetMockUrl("manifest");
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc index 677890b..5eda714 100644 --- a/content/browser/appcache/chrome_appcache_service.cc +++ b/content/browser/appcache/chrome_appcache_service.cc
@@ -74,17 +74,10 @@ auto it = process_receivers_.find(process_id); if (it != process_receivers_.end()) { receivers_.Remove(it->second); - DCHECK(process_receivers_.find(process_id) == process_receivers_.end()); + process_receivers_.erase(it); } } -void ChromeAppCacheService::UnregisterBackend( - AppCacheBackendImpl* backend_impl) { - int process_id = backend_impl->process_id(); - process_receivers_.erase(process_receivers_.find(process_id)); - AppCacheServiceImpl::UnregisterBackend(backend_impl); -} - void ChromeAppCacheService::Shutdown() { receivers_.Clear(); partition_ = nullptr;
diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h index 3ad1556..dca95a2 100644 --- a/content/browser/appcache/chrome_appcache_service.h +++ b/content/browser/appcache/chrome_appcache_service.h
@@ -75,9 +75,6 @@ bool CanCreateAppCache(const GURL& manifest_url, const GURL& first_party) override; - // AppCacheServiceImpl override - void UnregisterBackend(AppCacheBackendImpl* backend_impl) override; - protected: ~ChromeAppCacheService() override;
diff --git a/content/browser/background_sync/background_sync_context_impl.cc b/content/browser/background_sync/background_sync_context_impl.cc index caf3b18a..59b6f44 100644 --- a/content/browser/background_sync/background_sync_context_impl.cc +++ b/content/browser/background_sync/background_sync_context_impl.cc
@@ -25,7 +25,11 @@ BackgroundSyncContextImpl::BackgroundSyncContextImpl() : base::RefCountedDeleteOnSequence<BackgroundSyncContextImpl>( - base::CreateSingleThreadTaskRunner({BrowserThread::IO})) {} + base::CreateSingleThreadTaskRunner({BrowserThread::IO})), + test_wakeup_delta_( + {{blink::mojom::BackgroundSyncType::ONE_SHOT, base::TimeDelta::Max()}, + {blink::mojom::BackgroundSyncType::PERIODIC, + base::TimeDelta::Max()}}) {} BackgroundSyncContextImpl::~BackgroundSyncContextImpl() { // The destructor must run on the IO thread because it implicitly accesses @@ -136,8 +140,9 @@ } void BackgroundSyncContextImpl::set_wakeup_delta_for_testing( + blink::mojom::BackgroundSyncType sync_type, base::TimeDelta wakeup_delta) { - test_wakeup_delta_ = wakeup_delta; + test_wakeup_delta_[sync_type] = wakeup_delta; } void BackgroundSyncContextImpl::GetSoonestWakeupDelta( @@ -170,8 +175,9 @@ base::Time last_browser_wakeup_for_periodic_sync) { DCHECK_CURRENTLY_ON(BrowserThread::IO); - if (!test_wakeup_delta_.is_max()) - return test_wakeup_delta_; + auto test_wakeup_delta = test_wakeup_delta_[sync_type]; + if (!test_wakeup_delta.is_max()) + return test_wakeup_delta; if (!background_sync_manager_) return base::TimeDelta::Max();
diff --git a/content/browser/background_sync/background_sync_context_impl.h b/content/browser/background_sync/background_sync_context_impl.h index f65b557..2ef9bce 100644 --- a/content/browser/background_sync/background_sync_context_impl.h +++ b/content/browser/background_sync/background_sync_context_impl.h
@@ -83,7 +83,8 @@ void set_background_sync_manager_for_testing( std::unique_ptr<BackgroundSyncManager> manager); - void set_wakeup_delta_for_testing(base::TimeDelta wakeup_delta); + void set_wakeup_delta_for_testing(blink::mojom::BackgroundSyncType sync_type, + base::TimeDelta wakeup_delta); private: friend class OneShotBackgroundSyncServiceImplTest; @@ -130,7 +131,8 @@ // Only accessed on the IO thread. std::unique_ptr<BackgroundSyncManager> background_sync_manager_; - base::TimeDelta test_wakeup_delta_ = base::TimeDelta::Max(); + std::map<blink::mojom::BackgroundSyncType, base::TimeDelta> + test_wakeup_delta_; DISALLOW_COPY_AND_ASSIGN(BackgroundSyncContextImpl); };
diff --git a/content/browser/background_sync/background_sync_launcher.cc b/content/browser/background_sync/background_sync_launcher.cc index 0f9c401..fdf823c 100644 --- a/content/browser/background_sync/background_sync_launcher.cc +++ b/content/browser/background_sync/background_sync_launcher.cc
@@ -114,6 +114,23 @@ BackgroundSyncLauncher::~BackgroundSyncLauncher() = default; +void BackgroundSyncLauncher::SetGlobalSoonestWakeupDelta( + blink::mojom::BackgroundSyncType sync_type, + base::TimeDelta set_to) { + if (sync_type == blink::mojom::BackgroundSyncType::ONE_SHOT) + soonest_wakeup_delta_one_shot_ = set_to; + else + soonest_wakeup_delta_periodic_ = set_to; +} + +base::TimeDelta& BackgroundSyncLauncher::GetGlobalSoonestWakeupDelta( + blink::mojom::BackgroundSyncType sync_type) { + if (sync_type == blink::mojom::BackgroundSyncType::ONE_SHOT) + return soonest_wakeup_delta_one_shot_; + else + return soonest_wakeup_delta_periodic_; +} + void BackgroundSyncLauncher::GetSoonestWakeupDeltaImpl( blink::mojom::BackgroundSyncType sync_type, BrowserContext* browser_context, @@ -123,9 +140,9 @@ base::RepeatingClosure done_closure = base::BarrierClosure( GetStoragePartitionCount(browser_context), base::BindOnce(&BackgroundSyncLauncher::SendSoonestWakeupDelta, - base::Unretained(this), std::move(callback))); + base::Unretained(this), sync_type, std::move(callback))); - soonest_wakeup_delta_ = base::TimeDelta::Max(); + SetGlobalSoonestWakeupDelta(sync_type, base::TimeDelta::Max()); BrowserContext::ForEachStoragePartition( browser_context, base::BindRepeating( @@ -154,14 +171,15 @@ std::min(*soonest_wakeup_delta, wakeup_delta); std::move(done_closure).Run(); }, - std::move(done_closure), &soonest_wakeup_delta_)); + std::move(done_closure), &GetGlobalSoonestWakeupDelta(sync_type))); } void BackgroundSyncLauncher::SendSoonestWakeupDelta( + blink::mojom::BackgroundSyncType sync_type, base::OnceCallback<void(base::TimeDelta)> callback) { DCHECK_CURRENTLY_ON(BrowserThread::UI); - std::move(callback).Run(soonest_wakeup_delta_); + std::move(callback).Run(GetGlobalSoonestWakeupDelta(sync_type)); } } // namespace content
diff --git a/content/browser/background_sync/background_sync_launcher.h b/content/browser/background_sync/background_sync_launcher.h index ec4980e..2cdf6e5 100644 --- a/content/browser/background_sync/background_sync_launcher.h +++ b/content/browser/background_sync/background_sync_launcher.h
@@ -62,9 +62,18 @@ base::OnceClosure done_closure, StoragePartition* storage_partition); void SendSoonestWakeupDelta( + blink::mojom::BackgroundSyncType sync_type, base::OnceCallback<void(base::TimeDelta)> callback); - base::TimeDelta soonest_wakeup_delta_ = base::TimeDelta::Max(); + // Getter and setter for |soonest_wakeup_delta_one_shot_| + // or |soonest_wakeup_delta_periodic_| based on |sync_type|. + void SetGlobalSoonestWakeupDelta(blink::mojom::BackgroundSyncType sync_type, + base::TimeDelta set_to); + base::TimeDelta& GetGlobalSoonestWakeupDelta( + blink::mojom::BackgroundSyncType sync_type); + + base::TimeDelta soonest_wakeup_delta_one_shot_ = base::TimeDelta::Max(); + base::TimeDelta soonest_wakeup_delta_periodic_ = base::TimeDelta::Max(); base::Time last_browser_wakeup_for_periodic_sync_; DISALLOW_COPY_AND_ASSIGN(BackgroundSyncLauncher); };
diff --git a/content/browser/background_sync/background_sync_launcher_unittest.cc b/content/browser/background_sync/background_sync_launcher_unittest.cc index 60e4472..3e74706 100644 --- a/content/browser/background_sync/background_sync_launcher_unittest.cc +++ b/content/browser/background_sync/background_sync_launcher_unittest.cc
@@ -66,6 +66,7 @@ : browser_thread_bundle_(TestBrowserThreadBundle::MainThreadType::UI) {} void SetUpBrowserContext(const std::vector<GURL>& urls, + blink::mojom::BackgroundSyncType sync_type, const std::map<GURL, int>& wakeup_deltas = {}) { DCHECK(!urls.empty()); @@ -80,7 +81,7 @@ static_cast<StoragePartitionImpl*>(storage_partition) ->GetBackgroundSyncContext() ->set_wakeup_delta_for_testing( - base::TimeDelta::FromMilliseconds(iter->second)); + sync_type, base::TimeDelta::FromMilliseconds(iter->second)); } } @@ -151,7 +152,7 @@ // Add two storage partitions. Verify that we set the soonest wake up delta // to base::TimeDelta::Max(). This will cause cancellation of the wakeup // task. - SetUpBrowserContext(urls); + SetUpBrowserContext(urls, blink::mojom::BackgroundSyncType::ONE_SHOT); EXPECT_TRUE(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::ONE_SHOT) .is_max()); @@ -161,17 +162,51 @@ std::map<GURL, int> wakeup_deltas; for (const auto& url : urls) wakeup_deltas[url] = delta_ms += 1000; - SetUpBrowserContext(urls, wakeup_deltas); + SetUpBrowserContext(urls, blink::mojom::BackgroundSyncType::ONE_SHOT, + wakeup_deltas); EXPECT_EQ(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::ONE_SHOT) .InMilliseconds(), 1000); } +// Tests that we pick the correct wake up delta for the correct Background Sync +// wake up task, across all storage partitions. +TEST_F(BackgroundSyncLauncherTest, SoonestWakeupDeltaIsPickedForTheRightTask) { + std::vector<GURL> urls = {GURL(kUrl_1), GURL(kUrl_2)}; + + // Add two storage partitions with wakeup_deltas, both of the same sync type. + // Verify that we pick the smaller of the two. + int delta_ms = 0; + std::map<GURL, int> wakeup_deltas; + for (const auto& url : urls) + wakeup_deltas[url] = delta_ms += 1000; + SetUpBrowserContext(urls, blink::mojom::BackgroundSyncType::ONE_SHOT, + wakeup_deltas); + + EXPECT_EQ(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::ONE_SHOT) + .InMilliseconds(), + 1000); + EXPECT_TRUE(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::PERIODIC) + .is_max()); + + // Add some more wakeup_deltas now for Periodic Background Sync. + wakeup_deltas.clear(); + wakeup_deltas[GURL(kUrl_1)] = 500; + SetUpBrowserContext(urls, blink::mojom::BackgroundSyncType::PERIODIC, + wakeup_deltas); + EXPECT_EQ(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::ONE_SHOT) + .InMilliseconds(), + 1000); + EXPECT_EQ(GetSoonestWakeupDelta(blink::mojom::BackgroundSyncType::PERIODIC) + .InMilliseconds(), + 500); +} + #if defined(OS_ANDROID) TEST_F(BackgroundSyncLauncherTest, FireBackgroundSyncEvents) { std::vector<GURL> urls = {GURL(kUrl_1), GURL(kUrl_2)}; - SetUpBrowserContext(urls); + SetUpBrowserContext(urls, blink::mojom::BackgroundSyncType::ONE_SHOT); ASSERT_NO_FATAL_FAILURE(FireBackgroundSyncEventsForAllPartitions()); EXPECT_EQ(NumInvocationsOfFireBackgroundSyncEvents(), 2);
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc index 3fd21a50..50f0a4fe 100644 --- a/content/browser/background_sync/background_sync_manager.cc +++ b/content/browser/background_sync/background_sync_manager.cc
@@ -600,7 +600,8 @@ devtools_context_(std::move(devtools_context)), parameters_(std::make_unique<BackgroundSyncParameters>()), disabled_(false), - num_firing_registrations_(0), + num_firing_registrations_one_shot_(0), + num_firing_registrations_periodic_(0), clock_(base::DefaultClock::GetInstance()) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(devtools_context_); @@ -1460,6 +1461,22 @@ return AreOptionConditionsMet(); } +int BackgroundSyncManager::GetNumFiringRegistrations( + BackgroundSyncType sync_type) { + if (sync_type == BackgroundSyncType::ONE_SHOT) + return num_firing_registrations_one_shot_; + return num_firing_registrations_periodic_; +} + +void BackgroundSyncManager::UpdateNumFiringRegistrationsBy( + BackgroundSyncType sync_type, + int to_add) { + if (sync_type == BackgroundSyncType::ONE_SHOT) + num_firing_registrations_one_shot_ += to_add; + else + num_firing_registrations_periodic_ += to_add; +} + base::TimeDelta BackgroundSyncManager::GetSoonestWakeupDelta( BackgroundSyncType sync_type, base::Time last_browser_wakeup_time) { @@ -1493,7 +1510,7 @@ // If the browser is closed while firing events, the browser needs a task to // wake it back up and try again. - if (num_firing_registrations_ > 0 && + if (GetNumFiringRegistrations(sync_type) > 0 && soonest_wakeup_delta > parameters_->min_sync_recovery_time) { soonest_wakeup_delta = parameters_->min_sync_recovery_time; } @@ -1851,12 +1868,12 @@ return; } - num_firing_registrations_ += 1; + auto sync_type = registration_info->sync_type; + UpdateNumFiringRegistrationsBy(sync_type, 1); const bool last_chance = registration->num_attempts() == registration->max_attempts() - 1; - auto sync_type = registration_info->sync_type; HasMainFrameProviderHost( url::Origin::Create(service_worker_registration->scope().GetOrigin()), base::BindOnce(&BackgroundSyncMetrics::RecordEventStarted, sync_type)); @@ -1944,7 +1961,7 @@ return; } - num_firing_registrations_ -= 1; + UpdateNumFiringRegistrationsBy(registration_info->sync_type, -1); BackgroundSyncRegistration* registration = LookupActiveRegistration(*registration_info); @@ -2080,11 +2097,13 @@ registration_info->service_worker_registration_id, base::BindOnce(&BackgroundSyncManager::EventCompleteDidStore, weak_ptr_factory_.GetWeakPtr(), + registration_info->sync_type, registration_info->service_worker_registration_id, std::move(callback))); } void BackgroundSyncManager::EventCompleteDidStore( + blink::mojom::BackgroundSyncType sync_type, int64_t service_worker_id, base::OnceClosure callback, blink::ServiceWorkerStatusCode status_code) { @@ -2104,8 +2123,7 @@ } // Fire any ready events and call RunInBackground if anything is waiting. - FireReadyEvents(BackgroundSyncType::ONE_SHOT, base::DoNothing::Once()); - FireReadyEvents(BackgroundSyncType::PERIODIC, base::DoNothing::Once()); + FireReadyEvents(sync_type, base::DoNothing::Once()); base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, std::move(callback)); }
diff --git a/content/browser/background_sync/background_sync_manager.h b/content/browser/background_sync/background_sync_manager.h index 6dba06c0..aef2f65 100644 --- a/content/browser/background_sync/background_sync_manager.h +++ b/content/browser/background_sync/background_sync_manager.h
@@ -383,7 +383,8 @@ const url::Origin& origin, base::OnceClosure callback, base::TimeDelta delay); - void EventCompleteDidStore(int64_t service_worker_id, + void EventCompleteDidStore(blink::mojom::BackgroundSyncType sync_type, + int64_t service_worker_id, base::OnceClosure callback, blink::ServiceWorkerStatusCode status_code); @@ -424,6 +425,13 @@ blink::ServiceWorkerStatusCode CanEmulateSyncEvent( scoped_refptr<ServiceWorkerVersion> active_version); + // Read or update |num_firing_registrations_one_shot_| or + // |num_firing_registrations_periodic_| based on |sync_type|. + int GetNumFiringRegistrations(blink::mojom::BackgroundSyncType sync_type); + void UpdateNumFiringRegistrationsBy( + blink::mojom::BackgroundSyncType sync_type, + int to_add); + // Map from service worker registration id to its Background Sync // registrations. std::map<int64_t, BackgroundSyncRegistrations> active_registrations_; @@ -439,7 +447,8 @@ bool disabled_; // The number of registrations currently in the firing state. - int num_firing_registrations_; + int num_firing_registrations_one_shot_; + int num_firing_registrations_periodic_; base::CancelableOnceClosure delayed_one_shot_sync_task_; base::CancelableOnceClosure delayed_periodic_sync_task_;
diff --git a/content/browser/background_sync/background_sync_service_impl_test_harness.cc b/content/browser/background_sync/background_sync_service_impl_test_harness.cc index 126aad88..3c534f3 100644 --- a/content/browser/background_sync/background_sync_service_impl_test_harness.cc +++ b/content/browser/background_sync/background_sync_service_impl_test_harness.cc
@@ -144,6 +144,7 @@ storage_partition_impl_ = StoragePartitionImpl::Create( embedded_worker_helper_->browser_context(), /* in_memory= */ true, base::FilePath(), /* partition_domain= */ ""); + storage_partition_impl_->Initialize(); embedded_worker_helper_->context_wrapper()->set_storage_partition( storage_partition_impl_.get()); }
diff --git a/content/browser/blob_storage/blob_storage_browsertest.cc b/content/browser/blob_storage/blob_storage_browsertest.cc index a6a76a39e..f1ce7a6e 100644 --- a/content/browser/blob_storage/blob_storage_browsertest.cc +++ b/content/browser/blob_storage/blob_storage_browsertest.cc
@@ -19,8 +19,8 @@ #include "content/public/test/test_utils.h" #include "content/shell/browser/shell.h" #include "storage/browser/blob/blob_memory_controller.h" +#include "storage/browser/blob/blob_storage_constants.h" #include "storage/browser/blob/blob_storage_context.h" -#include "storage/common/blob_storage/blob_storage_constants.h" namespace content { namespace {
diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc index 3cb42ef..167aabf 100644 --- a/content/browser/browser_interface_binders.cc +++ b/content/browser/browser_interface_binders.cc
@@ -45,11 +45,10 @@ void PopulateBinderMapWithContext( DedicatedWorkerHost* dwh, service_manager::BinderMapWithContext<const url::Origin&>* map) { - RenderProcessHostImpl* rphi = - static_cast<RenderProcessHostImpl*>(dwh->GetProcessHost()); // TODO(https://crbug.com/873661): Pass origin to FileSystemManager. - map->Add<blink::mojom::FileSystemManager>(base::BindRepeating( - &RenderProcessHostImpl::BindFileSystemManager, base::Unretained(rphi))); + map->Add<blink::mojom::FileSystemManager>( + base::BindRepeating(&RenderProcessHost::BindFileSystemManager, + base::Unretained(dwh->GetProcessHost()))); } void PopulateBinderMap(DedicatedWorkerHost* dwh, @@ -67,11 +66,10 @@ void PopulateBinderMapWithContext( SharedWorkerHost* swh, service_manager::BinderMapWithContext<const url::Origin&>* map) { - RenderProcessHostImpl* rphi = - static_cast<RenderProcessHostImpl*>(swh->GetProcessHost()); // TODO(https://crbug.com/873661): Pass origin to FileSystemManager. - map->Add<blink::mojom::FileSystemManager>(base::BindRepeating( - &RenderProcessHostImpl::BindFileSystemManager, base::Unretained(rphi))); + map->Add<blink::mojom::FileSystemManager>( + base::BindRepeating(&RenderProcessHost::BindFileSystemManager, + base::Unretained(swh->GetProcessHost()))); } void PopulateBinderMap(SharedWorkerHost* swh, service_manager::BinderMap* map) {
diff --git a/content/browser/browser_thread_unittest.cc b/content/browser/browser_thread_unittest.cc index 76e6cb22..d54d723 100644 --- a/content/browser/browser_thread_unittest.cc +++ b/content/browser/browser_thread_unittest.cc
@@ -23,7 +23,7 @@ #include "build/build_config.h" #include "content/browser/browser_process_sub_thread.h" #include "content/browser/browser_thread_impl.h" -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include "content/browser/scheduler/browser_task_executor.h" #include "content/browser/scheduler/browser_ui_thread_scheduler.h" #include "content/public/browser/browser_task_traits.h" @@ -40,9 +40,9 @@ using StrictMockTask = testing::StrictMock<base::MockCallback<base::Callback<void()>>>; -class SequenceManagerTaskEnvironment : public base::Thread::TaskEnvironment { +class SequenceManagerThreadDelegate : public base::Thread::Delegate { public: - SequenceManagerTaskEnvironment() { + SequenceManagerThreadDelegate() { sequence_manager_ = base::sequence_manager::internal::SequenceManagerImpl::CreateUnbound( base::sequence_manager::SequenceManager::Settings()); @@ -57,15 +57,15 @@ BrowserTaskExecutor::CreateForTesting( std::move(browser_ui_thread_scheduler), - std::make_unique<BrowserIOTaskEnvironment>()); + std::make_unique<BrowserIOThreadDelegate>()); BrowserTaskExecutor::EnableAllQueues(); } - ~SequenceManagerTaskEnvironment() override { + ~SequenceManagerThreadDelegate() override { BrowserTaskExecutor::ResetForTesting(); } - // Thread::TaskEnvironment: + // Thread::Delegate: scoped_refptr<base::SingleThreadTaskRunner> GetDefaultTaskRunner() override { return default_task_runner_; } @@ -80,7 +80,7 @@ std::unique_ptr<base::sequence_manager::SequenceManager> sequence_manager_; scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_; - DISALLOW_COPY_AND_ASSIGN(SequenceManagerTaskEnvironment); + DISALLOW_COPY_AND_ASSIGN(SequenceManagerThreadDelegate); }; } // namespace @@ -101,7 +101,7 @@ void SetUp() override { ui_thread_ = std::make_unique<BrowserProcessSubThread>(BrowserThread::UI); base::Thread::Options ui_options; - ui_options.task_environment = new SequenceManagerTaskEnvironment(); + ui_options.delegate = new SequenceManagerThreadDelegate(); ui_thread_->StartWithOptions(ui_options); io_thread_ = BrowserTaskExecutor::CreateIOThread(); @@ -312,7 +312,7 @@ QueueType::kDefault)); BrowserTaskExecutor::CreateForTesting( std::move(browser_ui_thread_scheduler), - std::make_unique<BrowserIOTaskEnvironment>()); + std::make_unique<BrowserIOThreadDelegate>()); ui_thread_ = BrowserTaskExecutor::CreateIOThread(); BrowserTaskExecutor::InitializeIOThread();
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc index da50a599..84339fa 100644 --- a/content/browser/cache_storage/cache_storage_cache_unittest.cc +++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -47,13 +47,13 @@ #include "storage/browser/blob/blob_data_builder.h" #include "storage/browser/blob/blob_data_handle.h" #include "storage/browser/blob/blob_data_snapshot.h" +#include "storage/browser/blob/blob_handle.h" #include "storage/browser/blob/blob_impl.h" #include "storage/browser/blob/blob_storage_context.h" #include "storage/browser/quota/quota_manager_proxy.h" #include "storage/browser/test/fake_blob.h" #include "storage/browser/test/mock_quota_manager_proxy.h" #include "storage/browser/test/mock_special_storage_policy.h" -#include "storage/common/blob_storage/blob_handle.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" #include "url/origin.h"
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc index 5d7806c..8dd4a27b 100644 --- a/content/browser/cache_storage/cache_storage_manager_unittest.cc +++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -46,6 +46,7 @@ #include "services/network/public/mojom/fetch_api.mojom.h" #include "storage/browser/blob/blob_data_builder.h" #include "storage/browser/blob/blob_data_handle.h" +#include "storage/browser/blob/blob_handle.h" #include "storage/browser/blob/blob_impl.h" #include "storage/browser/blob/blob_storage_context.h" #include "storage/browser/quota/padding_key.h" @@ -53,7 +54,6 @@ #include "storage/browser/test/fake_blob.h" #include "storage/browser/test/mock_quota_manager_proxy.h" #include "storage/browser/test/mock_special_storage_policy.h" -#include "storage/common/blob_storage/blob_handle.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
diff --git a/content/browser/cache_storage/cache_storage_scheduler.cc b/content/browser/cache_storage/cache_storage_scheduler.cc index e7fc43d..5e0685c 100644 --- a/content/browser/cache_storage/cache_storage_scheduler.cc +++ b/content/browser/cache_storage/cache_storage_scheduler.cc
@@ -66,8 +66,8 @@ DCHECK_GT(num_running_shared_, 0); num_running_shared_ -= 1; if (num_running_shared_ == 0) { - UMA_HISTOGRAM_COUNTS_1000("ServiceWorkerCache.PeakParallelSharedOps", - peak_parallel_shared_); + UMA_HISTOGRAM_COUNTS_100("ServiceWorkerCache.PeakParallelSharedOps2", + peak_parallel_shared_); peak_parallel_shared_ = 0; } } else {
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc index a5078bd..9387184 100644 --- a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc +++ b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc
@@ -53,10 +53,10 @@ #include "net/disk_cache/disk_cache.h" #include "services/network/public/mojom/fetch_api.mojom.h" #include "storage/browser/blob/blob_data_handle.h" +#include "storage/browser/blob/blob_handle.h" #include "storage/browser/blob/blob_storage_context.h" #include "storage/browser/quota/padding_key.h" #include "storage/browser/quota/quota_manager_proxy.h" -#include "storage/common/blob_storage/blob_handle.h" #include "storage/common/storage_histograms.h" #include "third_party/blink/public/common/cache_storage/cache_storage_utils.h" #include "third_party/blink/public/common/fetch/fetch_api_request_headers_map.h"
diff --git a/content/browser/content_index/content_index_browsertest.cc b/content/browser/content_index/content_index_browsertest.cc new file mode 100644 index 0000000..9211753 --- /dev/null +++ b/content/browser/content_index/content_index_browsertest.cc
@@ -0,0 +1,138 @@ +// Copyright 2019 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 <memory> +#include <string> + +#include "base/run_loop.h" +#include "base/test/bind_test_util.h" +#include "content/public/browser/browser_context.h" +#include "content/public/browser/content_index_context.h" +#include "content/public/browser/storage_partition.h" +#include "content/public/browser/web_contents.h" +#include "content/public/common/content_switches.h" +#include "content/public/test/content_browser_test.h" +#include "content/public/test/content_browser_test_utils.h" +#include "content/shell/browser/shell.h" +#include "content/shell/browser/web_test/web_test_content_index_provider.h" +#include "net/test/embedded_test_server/embedded_test_server.h" + +namespace content { +namespace { + +class ContentIndexTest : public ContentBrowserTest { + public: + ContentIndexTest() = default; + ~ContentIndexTest() override = default; + + void SetUpOnMainThread() override { + ContentBrowserTest::SetUpOnMainThread(); + shell_ = CreateBrowser(); + + https_server_ = std::make_unique<net::EmbeddedTestServer>( + net::EmbeddedTestServer::TYPE_HTTPS); + https_server_->ServeFilesFromSourceDirectory("content/test/data"); + ASSERT_TRUE(https_server_->Start()); + ASSERT_TRUE(NavigateToURL( + shell_, https_server_->GetURL("/content_index/test.html"))); + + provider_ = static_cast<WebTestContentIndexProvider*>( + shell_->web_contents()->GetBrowserContext()->GetContentIndexProvider()); + ASSERT_TRUE(provider_); + + auto* storage_partition = BrowserContext::GetStoragePartition( + shell_->web_contents()->GetBrowserContext(), + shell_->web_contents()->GetSiteInstance()); + context_ = storage_partition->GetContentIndexContext(); + ASSERT_TRUE(context_); + } + + void SetUpCommandLine(base::CommandLine* command_line) override { + command_line->AppendSwitch( + switches::kEnableExperimentalWebPlatformFeatures); + } + + // Runs |script| and expects it to complete successfully. + void RunScript(const std::string& script) { + std::string result; + ASSERT_TRUE( + ExecuteScriptAndExtractString(shell_->web_contents(), script, &result)); + ASSERT_EQ(result, "ok"); + } + + std::vector<SkBitmap> GetIcons(int64_t service_worker_registration_id, + const std::string& description_id) { + std::vector<SkBitmap> out_icons; + base::RunLoop run_loop; + context_->GetIcons( + service_worker_registration_id, description_id, + base::BindLambdaForTesting([&](std::vector<SkBitmap> icons) { + out_icons = std::move(icons); + run_loop.Quit(); + })); + run_loop.Run(); + return out_icons; + } + + WebTestContentIndexProvider* provider() { return provider_; } + + private: + std::unique_ptr<net::EmbeddedTestServer> https_server_; + WebTestContentIndexProvider* provider_; + ContentIndexContext* context_; + Shell* shell_; +}; + +IN_PROC_BROWSER_TEST_F(ContentIndexTest, GetIcons) { + { + // Don't load any icons. + provider()->set_icon_sizes({}); + RunScript("addContent('id1')"); + base::RunLoop().RunUntilIdle(); + + auto registration_data = provider()->GetRegistrationDataFromId("id1"); + ASSERT_NE(registration_data.first, -1); + EXPECT_TRUE(GetIcons(registration_data.first, "id1").empty()); + } + + { + // Load one icon. + provider()->set_icon_sizes({{42, 42}}); + RunScript("addContent('id2')"); + base::RunLoop().RunUntilIdle(); + + auto registration_data = provider()->GetRegistrationDataFromId("id2"); + ASSERT_NE(registration_data.first, -1); + auto icons = GetIcons(registration_data.first, "id2"); + ASSERT_EQ(icons.size(), 1u); + ASSERT_FALSE(icons[0].isNull()); + EXPECT_EQ(icons[0].width(), 42); + EXPECT_EQ(icons[0].height(), 42); + } + + { + // Load two icons. + provider()->set_icon_sizes({{42, 42}, {24, 24}}); + RunScript("addContent('id3')"); + base::RunLoop().RunUntilIdle(); + + auto registration_data = provider()->GetRegistrationDataFromId("id3"); + ASSERT_NE(registration_data.first, -1); + auto icons = GetIcons(registration_data.first, "id3"); + ASSERT_EQ(icons.size(), 2u); + if (icons[0].height() > icons[1].height()) + std::swap(icons[0], icons[1]); + + ASSERT_FALSE(icons[0].isNull()); + EXPECT_EQ(icons[0].width(), 24); + EXPECT_EQ(icons[0].height(), 24); + + ASSERT_FALSE(icons[1].isNull()); + EXPECT_EQ(icons[1].width(), 42); + EXPECT_EQ(icons[1].height(), 42); + } +} + +} // namespace +} // namespace content
diff --git a/content/browser/content_index/content_index_context_impl.cc b/content/browser/content_index/content_index_context_impl.cc index e43ea3ed..95a84f7 100644 --- a/content/browser/content_index/content_index_context_impl.cc +++ b/content/browser/content_index/content_index_context_impl.cc
@@ -17,7 +17,8 @@ ContentIndexContextImpl::ContentIndexContextImpl( BrowserContext* browser_context, scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) - : service_worker_context_(service_worker_context), + : provider_(browser_context->GetContentIndexProvider()), + service_worker_context_(service_worker_context), content_index_database_(browser_context, service_worker_context) { DCHECK_CURRENTLY_ON(BrowserThread::UI); } @@ -159,8 +160,23 @@ content_index_database_.UnblockOrigin(origin); } +void ContentIndexContextImpl::GetIconSizes( + blink::mojom::ContentCategory category, + blink::mojom::ContentIndexService::GetIconSizesCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + std::vector<gfx::Size> icon_sizes; + if (provider_) + icon_sizes = provider_->GetIconSizes(category); + + base::PostTask(FROM_HERE, {BrowserThread::IO}, + base::BindOnce(std::move(callback), std::move(icon_sizes))); +} + void ContentIndexContextImpl::Shutdown() { DCHECK_CURRENTLY_ON(BrowserThread::UI); + + provider_ = nullptr; content_index_database_.Shutdown(); }
diff --git a/content/browser/content_index/content_index_context_impl.h b/content/browser/content_index/content_index_context_impl.h index 65a59ea..c331f88 100644 --- a/content/browser/content_index/content_index_context_impl.h +++ b/content/browser/content_index/content_index_context_impl.h
@@ -15,6 +15,7 @@ namespace content { class BrowserContext; +class ContentIndexProvider; class ServiceWorkerContextWrapper; // Owned by the Storage Partition. Components that want to query or modify the @@ -30,6 +31,12 @@ void Shutdown(); + // Queries the provider for the icon sizes needed to display the info. + // Must be called on the UI thread. + void GetIconSizes( + blink::mojom::ContentCategory category, + blink::mojom::ContentIndexService::GetIconSizesCallback callback); + ContentIndexDatabase& database(); // ContentIndexContent implementation. @@ -72,6 +79,9 @@ void DidDispatchEvent(const url::Origin& origin, blink::ServiceWorkerStatusCode service_worker_status); + // Lives on the UI thread. + ContentIndexProvider* provider_; + scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; ContentIndexDatabase content_index_database_;
diff --git a/content/browser/content_index/content_index_database.cc b/content/browser/content_index/content_index_database.cc index f59adac..c576b67 100644 --- a/content/browser/content_index/content_index_database.cc +++ b/content/browser/content_index/content_index_database.cc
@@ -108,9 +108,7 @@ BrowserContext* browser_context, scoped_refptr<ServiceWorkerContextWrapper> service_worker_context) : provider_(browser_context->GetContentIndexProvider()), - service_worker_context_(std::move(service_worker_context)), - weak_ptr_factory_io_(this), - weak_ptr_factory_ui_(this) {} + service_worker_context_(std::move(service_worker_context)) {} ContentIndexDatabase::~ContentIndexDatabase() = default;
diff --git a/content/browser/content_index/content_index_database.h b/content/browser/content_index/content_index_database.h index 68ba2ae1..e61ed1fc 100644 --- a/content/browser/content_index/content_index_database.h +++ b/content/browser/content_index/content_index_database.h
@@ -126,8 +126,8 @@ base::flat_map<url::Origin, int> blocked_origins_; scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_; - base::WeakPtrFactory<ContentIndexDatabase> weak_ptr_factory_io_; - base::WeakPtrFactory<ContentIndexDatabase> weak_ptr_factory_ui_; + base::WeakPtrFactory<ContentIndexDatabase> weak_ptr_factory_io_{this}; + base::WeakPtrFactory<ContentIndexDatabase> weak_ptr_factory_ui_{this}; DISALLOW_COPY_AND_ASSIGN(ContentIndexDatabase); };
diff --git a/content/browser/content_index/content_index_database_unittest.cc b/content/browser/content_index/content_index_database_unittest.cc index 0f0e6e16..c3ceec95 100644 --- a/content/browser/content_index/content_index_database_unittest.cc +++ b/content/browser/content_index/content_index_database_unittest.cc
@@ -25,6 +25,8 @@ class MockContentIndexProvider : public ContentIndexProvider { public: + MOCK_METHOD1(GetIconSizes, + std::vector<gfx::Size>(blink::mojom::ContentCategory)); MOCK_METHOD1(OnContentAdded, void(ContentIndexEntry entry)); MOCK_METHOD3(OnContentDeleted, void(int64_t service_Worker_registration_id,
diff --git a/content/browser/content_index/content_index_service_impl.cc b/content/browser/content_index/content_index_service_impl.cc index 405fac3..0e557e9b 100644 --- a/content/browser/content_index/content_index_service_impl.cc +++ b/content/browser/content_index/content_index_service_impl.cc
@@ -57,6 +57,17 @@ ContentIndexServiceImpl::~ContentIndexServiceImpl() = default; +void ContentIndexServiceImpl::GetIconSizes( + blink::mojom::ContentCategory category, + GetIconSizesCallback callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + + base::PostTaskWithTraits( + FROM_HERE, {BrowserThread::UI}, + base::BindOnce(&ContentIndexContextImpl::GetIconSizes, + content_index_context_, category, std::move(callback))); +} + void ContentIndexServiceImpl::Add( int64_t service_worker_registration_id, blink::mojom::ContentDescriptionPtr description,
diff --git a/content/browser/content_index/content_index_service_impl.h b/content/browser/content_index/content_index_service_impl.h index f423c7c..01189d7 100644 --- a/content/browser/content_index/content_index_service_impl.h +++ b/content/browser/content_index/content_index_service_impl.h
@@ -32,6 +32,8 @@ ~ContentIndexServiceImpl() override; // blink::mojom::ContentIndexService implementation. + void GetIconSizes(blink::mojom::ContentCategory category, + GetIconSizesCallback callback) override; void Add(int64_t service_worker_registration_id, blink::mojom::ContentDescriptionPtr description, const std::vector<SkBitmap>& icons,
diff --git a/content/browser/cookie_store/cookie_store_manager_unittest.cc b/content/browser/cookie_store/cookie_store_manager_unittest.cc index 7bde04f..e0b9511 100644 --- a/content/browser/cookie_store/cookie_store_manager_unittest.cc +++ b/content/browser/cookie_store/cookie_store_manager_unittest.cc
@@ -262,9 +262,11 @@ base::BindOnce([](bool success) { CHECK(success) << "Initialize failed"; })); - storage_partition_impl_ = base::WrapUnique( - new StoragePartitionImpl(worker_test_helper_->browser_context(), - user_data_directory_.GetPath(), nullptr)); + storage_partition_impl_ = StoragePartitionImpl::Create( + worker_test_helper_->browser_context(), true /* in_memory */, + base::FilePath() /* relative_partition_path */, + std::string() /* partition_domain */); + storage_partition_impl_->Initialize(); ::network::mojom::NetworkContext* network_context = storage_partition_impl_->GetNetworkContext(); cookie_store_context_->ListenToCookieChanges(
diff --git a/content/browser/devtools/devtools_stream_blob.cc b/content/browser/devtools/devtools_stream_blob.cc index 39d6b29..4812bae 100644 --- a/content/browser/devtools/devtools_stream_blob.cc +++ b/content/browser/devtools/devtools_stream_blob.cc
@@ -15,8 +15,8 @@ #include "net/base/io_buffer.h" #include "storage/browser/blob/blob_data_handle.h" #include "storage/browser/blob/blob_reader.h" +#include "storage/browser/blob/blob_storage_constants.h" #include "storage/browser/blob/blob_storage_context.h" -#include "storage/common/blob_storage/blob_storage_constants.h" namespace content {
diff --git a/content/browser/devtools/devtools_stream_blob.h b/content/browser/devtools/devtools_stream_blob.h index 298f857..a36133f6 100644 --- a/content/browser/devtools/devtools_stream_blob.h +++ b/content/browser/devtools/devtools_stream_blob.h
@@ -10,7 +10,7 @@ #include "base/memory/scoped_refptr.h" #include "content/browser/devtools/devtools_io_context.h" #include "net/base/net_errors.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" #include <memory>
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc index fa675b7..9d11d5e 100644 --- a/content/browser/devtools/protocol/system_info_handler.cc +++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -156,7 +156,7 @@ std::unique_ptr<SystemInfo::ImageDecodeAcceleratorCapability> ImageDecodeAcceleratorSupportedProfileToProtocol( const gpu::ImageDecodeAcceleratorSupportedProfile& profile) { - std::unique_ptr<protocol::Array<std::string>> subsamplings; + auto subsamplings = std::make_unique<protocol::Array<std::string>>(); for (const auto subsampling : profile.subsamplings) { switch (subsampling) { case gpu::ImageDecodeAcceleratorSubsampling::k420:
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc index fc154b7b..cde58a3 100644 --- a/content/browser/download/download_manager_impl.cc +++ b/content/browser/download/download_manager_impl.cc
@@ -298,13 +298,9 @@ base::CreateSingleThreadTaskRunner({BrowserThread::IO})); if (!in_progress_manager_) { - auto* proto_db_provider = - BrowserContext::GetDefaultStoragePartition(browser_context) - ->GetProtoDatabaseProvider(); in_progress_manager_ = std::make_unique<download::InProgressDownloadManager>( - this, base::FilePath(), proto_db_provider, - base::BindRepeating(&IsOriginSecure), + this, base::FilePath(), base::BindRepeating(&IsOriginSecure), base::BindRepeating(&DownloadRequestUtils::IsURLSafe), nullptr); } else { in_progress_manager_->SetDelegate(this); @@ -465,8 +461,7 @@ // We'll have nothing more to report to the observers after this point. observers_.Clear(); - if (in_progress_manager_) - in_progress_manager_->ShutDown(); + in_progress_manager_->ShutDown(); if (delegate_) delegate_->Shutdown();
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc index a6ebb59..4a5f4fe 100644 --- a/content/browser/download/download_manager_impl_unittest.cc +++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -372,7 +372,6 @@ : download::InProgressDownloadManager( nullptr, base::FilePath(), - nullptr, download::InProgressDownloadManager::IsOriginSecureCallback(), base::BindRepeating(&URLAlwaysSafe), nullptr) {}
diff --git a/content/browser/fileapi/file_system_manager_impl.cc b/content/browser/fileapi/file_system_manager_impl.cc index cf7ab36..43beef80 100644 --- a/content/browser/fileapi/file_system_manager_impl.cc +++ b/content/browser/fileapi/file_system_manager_impl.cc
@@ -38,7 +38,6 @@ #include "storage/browser/fileapi/file_system_context.h" #include "storage/browser/fileapi/isolated_context.h" #include "storage/common/fileapi/file_system_info.h" -#include "storage/common/fileapi/file_system_type_converters.h" #include "storage/common/fileapi/file_system_types.h" #include "storage/common/fileapi/file_system_util.h" #include "third_party/blink/public/common/features.h" @@ -60,6 +59,68 @@ child_id, path); } +storage::FileSystemType ToStorageFileSystemType( + blink::mojom::FileSystemType type) { + switch (type) { + case blink::mojom::FileSystemType::kTemporary: + return storage::FileSystemType::kFileSystemTypeTemporary; + case blink::mojom::FileSystemType::kPersistent: + return storage::FileSystemType::kFileSystemTypePersistent; + case blink::mojom::FileSystemType::kIsolated: + return storage::FileSystemType::kFileSystemTypeIsolated; + case blink::mojom::FileSystemType::kExternal: + return storage::FileSystemType::kFileSystemTypeExternal; + } + NOTREACHED(); + return storage::FileSystemType::kFileSystemTypeTemporary; +} + +blink::mojom::FileSystemType ToMojoFileSystemType( + storage::FileSystemType type) { + switch (type) { + case storage::FileSystemType::kFileSystemTypeTemporary: + return blink::mojom::FileSystemType::kTemporary; + case storage::FileSystemType::kFileSystemTypePersistent: + return blink::mojom::FileSystemType::kPersistent; + case storage::FileSystemType::kFileSystemTypeIsolated: + return blink::mojom::FileSystemType::kIsolated; + case storage::FileSystemType::kFileSystemTypeExternal: + return blink::mojom::FileSystemType::kExternal; + // Internal enum types + case storage::FileSystemType::kFileSystemTypeUnknown: + case storage::FileSystemType::kFileSystemInternalTypeEnumStart: + case storage::FileSystemType::kFileSystemTypeTest: + case storage::FileSystemType::kFileSystemTypeNativeLocal: + case storage::FileSystemType::kFileSystemTypeRestrictedNativeLocal: + case storage::FileSystemType::kFileSystemTypeDragged: + case storage::FileSystemType::kFileSystemTypeNativeMedia: + case storage::FileSystemType::kFileSystemTypeDeviceMedia: + case storage::FileSystemType::kFileSystemTypeDrive: + case storage::FileSystemType::kFileSystemTypeSyncable: + case storage::FileSystemType::kFileSystemTypeSyncableForInternalSync: + case storage::FileSystemType::kFileSystemTypeNativeForPlatformApp: + case storage::FileSystemType::kFileSystemTypeForTransientFile: + case storage::FileSystemType::kFileSystemTypePluginPrivate: + case storage::FileSystemType::kFileSystemTypeCloudDevice: + case storage::FileSystemType::kFileSystemTypeProvided: + case storage::FileSystemType::kFileSystemTypeDeviceMediaAsFileStorage: + case storage::FileSystemType::kFileSystemTypeArcContent: + case storage::FileSystemType::kFileSystemTypeArcDocumentsProvider: + case storage::FileSystemType::kFileSystemTypeDriveFs: + case storage::FileSystemType::kFileSystemInternalTypeEnumEnd: + NOTREACHED(); + return blink::mojom::FileSystemType::kTemporary; + } + NOTREACHED(); + return blink::mojom::FileSystemType::kTemporary; +} + +blink::mojom::FileSystemInfoPtr ToMojoFileSystemInfo( + const storage::FileSystemInfo& info) { + return blink::mojom::FileSystemInfo::New( + info.name, info.root_url, ToMojoFileSystemType(info.mount_type)); +} + } // namespace class FileSystemManagerImpl::FileSystemCancellableOperationImpl @@ -160,8 +221,7 @@ RecordAction(base::UserMetricsAction("OpenFileSystemPersistent")); } context_->OpenFileSystem( - origin.GetURL(), - mojo::ConvertTo<storage::FileSystemType>(file_system_type), + origin.GetURL(), ToStorageFileSystemType(file_system_type), storage::OPEN_FILE_SYSTEM_CREATE_IF_NONEXISTENT, base::BindOnce(&FileSystemManagerImpl::DidOpenFileSystem, GetWeakPtr(), std::move(callback))); @@ -705,8 +765,7 @@ base::FilePath normalized_path( storage::VirtualPath::GetNormalizedFilePath(file_path)); std::move(callback).Run( - mojo::ConvertTo<blink::mojom::FileSystemInfoPtr>(info), - std::move(normalized_path), + ToMojoFileSystemInfo(info), std::move(normalized_path), type == storage::FileSystemContext::RESOLVED_ENTRY_DIRECTORY, result); // For ResolveURL we do not create a new operation, so no unregister here. }
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index 269bffc6..8dafc0cb 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -6297,7 +6297,7 @@ auto* appcache_service_impl = static_cast<AppCacheServiceImpl*>( GetProcess()->GetStoragePartition()->GetAppCacheService()); - appcache_service_impl->RegisterHostForFrame( + appcache_service_impl->RegisterHost( std::move(host_receiver), std::move(frontend_remote), host_id, routing_id_, GetProcess()->GetID(), mojo::GetBadMessageCallback()); }
diff --git a/content/browser/frame_host/render_frame_message_filter_browsertest.cc b/content/browser/frame_host/render_frame_message_filter_browsertest.cc index 5eeab65..a5b7d92 100644 --- a/content/browser/frame_host/render_frame_message_filter_browsertest.cc +++ b/content/browser/frame_host/render_frame_message_filter_browsertest.cc
@@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/optional.h" +#include "base/strings/string_number_conversions.h" #include "base/task/post_task.h" #include "base/test/bind_test_util.h" #include "base/test/metrics/histogram_tester.h" @@ -59,6 +60,11 @@ void SetCookieDirect(WebContentsImpl* tab, const GURL& url, const std::string& cookie_line) { + net::CookieOptions options; + // Allow setting SameSite cookies. + options.set_same_site_cookie_context( + net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); + auto cookie_obj = net::CanonicalCookie::Create( url, cookie_line, base::Time::Now(), base::nullopt /* server_time */); @@ -66,7 +72,7 @@ BrowserContext::GetDefaultStoragePartition(tab->GetBrowserContext()) ->GetCookieManagerForBrowserProcess() ->SetCanonicalCookie( - *cookie_obj, url.scheme(), net::CookieOptions(), + *cookie_obj, url.scheme(), options, base::BindLambdaForTesting( [&](net::CanonicalCookie::CookieInclusionStatus status) { run_loop.Quit(); @@ -75,11 +81,15 @@ } std::string GetCookiesDirect(WebContentsImpl* tab, const GURL& url) { + net::CookieOptions options; + // Allow setting SameSite cookies. + options.set_same_site_cookie_context( + net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); net::CookieList result; base::RunLoop run_loop; BrowserContext::GetDefaultStoragePartition(tab->GetBrowserContext()) ->GetCookieManagerForBrowserProcess() - ->GetCookieList(url, net::CookieOptions(), + ->GetCookieList(url, options, base::BindLambdaForTesting( [&](const net::CookieList& cookie_list, const net::CookieStatusList& excluded_cookies) { @@ -92,6 +102,9 @@ } // namespace +// TODO(crbug.com/965982): document.cookie is now handled by the +// RestrictedCookieManager, not the RenderFrameMessageFilter, so these cookie +// tests should be moved accordingly. class RenderFrameMessageFilterBrowserTest : public ContentBrowserTest { protected: void SetUp() override { @@ -208,24 +221,48 @@ // SameSite cookies (that aren't marked as http-only) should be available to // JavaScript. IN_PROC_BROWSER_TEST_F(RenderFrameMessageFilterBrowserTest, SameSiteCookies) { - SetupCrossSiteRedirector(embedded_test_server()); - ASSERT_TRUE(embedded_test_server()->Start()); + // Must use HTTPS because SameSite=None cookies must be Secure. + net::EmbeddedTestServer a_server(net::EmbeddedTestServer::TYPE_HTTPS); + a_server.SetSSLConfig(net::EmbeddedTestServer::CERT_COMMON_NAME_IS_DOMAIN); + a_server.AddDefaultHandlers(GetTestDataFilePath()); + SetupCrossSiteRedirector(&a_server); + ASSERT_TRUE(a_server.Start()); + net::EmbeddedTestServer b_server(net::EmbeddedTestServer::TYPE_HTTPS); + b_server.SetSSLConfig(net::EmbeddedTestServer::CERT_OK); + b_server.AddDefaultHandlers(GetTestDataFilePath()); + SetupCrossSiteRedirector(&b_server); + ASSERT_TRUE(b_server.Start()); - // The server sets five cookies on 'a.com' and on 'b.com', then loads a + // The server sets eight cookies on 'a.com' and on 'b.com', then loads a // page that frames both 'a.com' and 'b.com' under 'a.com'. std::string cookies_to_set = - "/set-cookie?normal=1" + "/set-cookie?none=1;SameSite=None;Secure" // SameSite=None must be + // Secure. + "&none-insecure=1;SameSite=None" "&strict=1;SameSite=Strict" + "&unspecified=1" // unspecified SameSite should be treated as Lax. "&lax=1;SameSite=Lax" + "&none-http=1;SameSite=None;Secure;httponly" "&strict-http=1;SameSite=Strict;httponly" + "&unspecified-http=1;httponly" "&lax-http=1;SameSite=Lax;httponly"; - GURL url = embedded_test_server()->GetURL("a.com", cookies_to_set); + std::string a_hostname = "localhost"; + std::string b_hostname = "127.0.0.1"; + GURL url = a_server.GetURL(a_hostname, cookies_to_set); NavigateToURL(shell(), url); - url = embedded_test_server()->GetURL("b.com", cookies_to_set); + url = b_server.GetURL(b_hostname, cookies_to_set); NavigateToURL(shell(), url); - url = embedded_test_server()->GetURL( - "a.com", "/cross_site_iframe_factory.html?a(a(),b())"); + // TODO(crbug.com/984685): Make it less painful to set up https cross-site + // iframe tests. + std::string a_hostname_and_port = + a_hostname + ":" + base::NumberToString(a_server.port()); + std::string b_hostname_and_port = + b_hostname + ":" + base::NumberToString(b_server.port()); + url = a_server.GetURL(a_hostname, "/cross_site_iframe_factory.html?" + + a_hostname_and_port + "(" + + a_hostname_and_port + "()," + + b_hostname_and_port + "())"); NavigateToURL(shell(), url); WebContentsImpl* web_contents = @@ -236,16 +273,19 @@ RenderFrameHost* b_iframe = web_contents->GetFrameTree()->root()->child_at(1)->current_frame_host(); - // The top-level frame should get both kinds of same-site cookies. - EXPECT_EQ("normal=1; strict=1; lax=1", GetCookieFromJS(main_frame)); + // The top-level frame should get all same-site cookies. + EXPECT_EQ("none=1; strict=1; unspecified=1; lax=1", + GetCookieFromJS(main_frame)); // Same-site cookies will be delievered to the 'a.com' frame, as it is same- // site with its ancestors. - EXPECT_EQ("normal=1; strict=1; lax=1", GetCookieFromJS(a_iframe)); + EXPECT_EQ("none=1; strict=1; unspecified=1; lax=1", + GetCookieFromJS(a_iframe)); // Same-site cookies should not be delievered to the 'b.com' frame, as it - // isn't same-site with its ancestors. - EXPECT_EQ("normal=1", GetCookieFromJS(b_iframe)); + // isn't same-site with its ancestors. The SameSite=None but insecure cookie + // is rejected. + EXPECT_EQ("none=1", GetCookieFromJS(b_iframe)); } class RestrictedCookieManagerInterceptor
diff --git a/content/browser/payments/payment_app_provider_impl.cc b/content/browser/payments/payment_app_provider_impl.cc index 122ba32..733e021 100644 --- a/content/browser/payments/payment_app_provider_impl.cc +++ b/content/browser/payments/payment_app_provider_impl.cc
@@ -5,7 +5,6 @@ #include "content/browser/payments/payment_app_provider_impl.h" #include <map> -#include <sstream> #include <string> #include <vector> @@ -490,7 +489,6 @@ DevToolsBackgroundServicesContext* GetDevTools(BrowserContext* browser_context, const url::Origin& sw_origin) { - DCHECK_CURRENTLY_ON(BrowserThread::UI); auto* storage_partition = BrowserContext::GetStoragePartitionForSite( browser_context, sw_origin.GetURL(), /*can_create=*/true); if (!storage_partition) @@ -503,67 +501,6 @@ : nullptr; } -void OnResponseForCanMakePaymentOnUiThread( - BrowserContext* browser_context, - int64_t registration_id, - const url::Origin& sw_origin, - const std::string& payment_request_id, - PaymentAppProvider::PaymentEventResultCallback callback, - bool can_make_payment) { - auto* dev_tools = GetDevTools(browser_context, sw_origin); - if (dev_tools) { - dev_tools->LogBackgroundServiceEvent( - registration_id, sw_origin, DevToolsBackgroundService::kPaymentHandler, - "Can make payment response", - /*instance_id=*/payment_request_id, - {{"Can Make Payment", can_make_payment ? "true" : "false"}}); - } - - std::move(callback).Run(can_make_payment); -} - -void OnResponseForAbortPaymentOnUiThread( - BrowserContext* browser_context, - int64_t registration_id, - const url::Origin& sw_origin, - const std::string& payment_request_id, - PaymentAppProvider::PaymentEventResultCallback callback, - bool payment_aborted) { - auto* dev_tools = GetDevTools(browser_context, sw_origin); - if (dev_tools) { - dev_tools->LogBackgroundServiceEvent( - registration_id, sw_origin, DevToolsBackgroundService::kPaymentHandler, - "Abort payment response", - /*instance_id=*/payment_request_id, - {{"Payment Aborted", payment_aborted ? "true" : "false"}}); - } - - std::move(callback).Run(payment_aborted); -} - -void OnResponseForPaymentRequestOnUiThread( - BrowserContext* browser_context, - int64_t registration_id, - const url::Origin& sw_origin, - const std::string& payment_request_id, - PaymentAppProvider::InvokePaymentAppCallback callback, - payments::mojom::PaymentHandlerResponsePtr response) { - auto* dev_tools = GetDevTools(browser_context, sw_origin); - if (dev_tools) { - std::stringstream response_type; - response_type << response->response_type; - dev_tools->LogBackgroundServiceEvent( - registration_id, sw_origin, DevToolsBackgroundService::kPaymentHandler, - "Payment response", - /*instance_id=*/payment_request_id, - {{"Method Name", response->method_name}, - {"Details", response->stringified_details}, - {"Type", response_type.str()}}); - } - - std::move(callback).Run(std::move(response)); -} - } // namespace // static @@ -622,11 +559,8 @@ StartServiceWorkerForDispatch( browser_context, registration_id, - base::BindOnce( - &DispatchPaymentRequestEvent, browser_context, std::move(event_data), - base::BindOnce(&OnResponseForPaymentRequestOnUiThread, - browser_context, registration_id, sw_origin, - event_data->payment_request_id, std::move(callback)))); + base::BindOnce(&DispatchPaymentRequestEvent, browser_context, + std::move(event_data), std::move(callback))); } void PaymentAppProviderImpl::InstallAndInvokePaymentApp( @@ -702,10 +636,7 @@ StartServiceWorkerForDispatch( browser_context, registration_id, base::BindOnce(&DispatchCanMakePaymentEvent, browser_context, - std::move(event_data), - base::BindOnce(&OnResponseForCanMakePaymentOnUiThread, - browser_context, registration_id, sw_origin, - payment_request_id, std::move(callback)))); + std::move(event_data), std::move(callback))); } void PaymentAppProviderImpl::AbortPayment(BrowserContext* browser_context, @@ -726,9 +657,7 @@ StartServiceWorkerForDispatch( browser_context, registration_id, base::BindOnce(&DispatchAbortPaymentEvent, browser_context, - base::BindOnce(&OnResponseForAbortPaymentOnUiThread, - browser_context, registration_id, sw_origin, - payment_request_id, std::move(callback)))); + std::move(callback))); } void PaymentAppProviderImpl::SetOpenedWindow(WebContents* web_contents) {
diff --git a/content/browser/portal/portal_browsertest.cc b/content/browser/portal/portal_browsertest.cc index 1dcde43..cc158f1 100644 --- a/content/browser/portal/portal_browsertest.cc +++ b/content/browser/portal/portal_browsertest.cc
@@ -974,8 +974,7 @@ #endif // TODO(crbug.com/985078): Fix on Mac. -// TODO(crbug.com/991192): Flaky on Android -#if !defined(OS_MACOSX) && !defined(OS_ANDROID) +#if !defined(OS_MACOSX) IN_PROC_BROWSER_TEST_F(PortalBrowserTest, GestureCleanedUpBeforeActivation) { EXPECT_TRUE(NavigateToURL( shell(), embedded_test_server()->GetURL("portal.test", "/title1.html")));
diff --git a/content/browser/renderer_host/input/fling_controller.cc b/content/browser/renderer_host/input/fling_controller.cc index 80acce8..89fb680 100644 --- a/content/browser/renderer_host/input/fling_controller.cc +++ b/content/browser/renderer_host/input/fling_controller.cc
@@ -30,8 +30,8 @@ // processing the GFS, it is possible to have a very small delta for the first // event. Don't send an event with deltas smaller than the // |kMinInertialScrollDelta| since the renderer ignores it and the fling gets -// cancelled in FlingController::OnGestureEventAck due to an inertial GSU with -// ack ignored. +// cancelled in RenderWidgetHostViewAndroid::GestureEventAck due to an inertial +// GSU with ack ignored. const float kMinInertialScrollDelta = 0.1f; const char* kFlingTraceName = "FlingController::HandlingGestureFling"; @@ -168,6 +168,11 @@ void FlingController::ProcessGestureFlingCancel( const GestureEventWithLatencyInfo& gesture_event) { DCHECK(fling_curve_); + + // Note: We don't want to reset the fling booster here because a FlingCancel + // will be received when the user puts their finger down for a potential + // boost. FlingBooster will process the event stream after the current fling + // is ended and decide whether or not to boost any subsequent FlingStart. EndCurrentFling(); } @@ -216,6 +221,7 @@ if (!fling_is_active && current_fling_parameters_.source_device != blink::WebGestureDevice::kSyntheticAutoscroll) { + fling_booster_.Reset(); EndCurrentFling(); return; } @@ -232,6 +238,7 @@ } void FlingController::StopFling() { + fling_booster_.Reset(); if (fling_curve_) EndCurrentFling(); } @@ -365,6 +372,7 @@ if (velocity.IsZero() && fling_start_event.SourceDevice() != blink::WebGestureDevice::kSyntheticAutoscroll) { + fling_booster_.Reset(); EndCurrentFling(); return false; }
diff --git a/content/browser/renderer_host/input/fling_controller_unittest.cc b/content/browser/renderer_host/input/fling_controller_unittest.cc index 20420789..47be0a0 100644 --- a/content/browser/renderer_host/input/fling_controller_unittest.cc +++ b/content/browser/renderer_host/input/fling_controller_unittest.cc
@@ -63,6 +63,7 @@ } void SendGeneratedGestureScrollEvents( const GestureEventWithLatencyInfo& gesture_event) override { + fling_controller_->ObserveAndMaybeConsumeGestureEvent(gesture_event); sent_scroll_gesture_count_++; last_sent_gesture_ = gesture_event.event; } @@ -99,6 +100,22 @@ fling_start_with_latency); } + void SimulateScrollBegin(blink::WebGestureDevice source_device, + const gfx::Vector2dF& delta) { + WebGestureEvent scroll_begin(WebInputEvent::kGestureScrollBegin, 0, + NowTicks(), source_device); + scroll_begin.data.scroll_begin.delta_x_hint = delta.x(); + scroll_begin.data.scroll_begin.delta_y_hint = delta.y(); + scroll_begin.data.scroll_begin.inertial_phase = + WebGestureEvent::InertialPhaseState::kNonMomentum; + scroll_begin.data.scroll_begin.delta_hint_units = + ui::input_types::ScrollGranularity::kScrollByPrecisePixel; + GestureEventWithLatencyInfo scroll_begin_with_latency(scroll_begin); + + fling_controller_->ObserveAndMaybeConsumeGestureEvent( + scroll_begin_with_latency); + } + void SimulateScrollUpdate(blink::WebGestureDevice source_device, const gfx::Vector2dF& delta) { WebGestureEvent scroll_update(WebInputEvent::kGestureScrollUpdate, 0, @@ -156,6 +173,11 @@ private: base::SimpleTestTickClock mock_clock_; + // This determines whether the platform ticks fling animations using + // SetNeedsBeginFrame (i.e. WebView). If true, we should avoid calling + // ProgressFling immediately after a FlingStart since this will match the + // behavior in FlingController::ProcessGestureFlingStart. See + // https://crrev.com/c/1181521. bool needs_begin_frame_for_fling_progress_; base::test::ScopedTaskEnvironment scoped_task_environment_; DISALLOW_COPY_AND_ASSIGN(FlingControllerTest); @@ -237,6 +259,55 @@ EXPECT_NEAR(last_sent_gesture_.data.scroll_update.delta_x, 30.0, 5); } +// Tests that when a fling is interrupted (e.g. by having reached the end of +// the content), a subsequent fling isn't boosted. An example here would be an +// infinite scroller that loads more content after hitting the scroll extent. +TEST_P(FlingControllerTest, InterruptedFlingIsntBoosted) { + double time_to_advance_ms = 8.0; + + // Start an ordinary fling. + { + AdvanceTime(time_to_advance_ms); + SimulateScrollBegin(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(10, 0)); + SimulateScrollUpdate(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(10, 0)); + SimulateFlingStart(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(1000, 0), + /*wait_before_processing=*/false); + ASSERT_TRUE(FlingInProgress()); + + if (NeedsBeginFrameForFlingProgress()) + ProgressFling(NowTicks()); + } + + // Stop the fling. This simulates hitting a scroll extent. + { + ASSERT_EQ(fling_controller_->CurrentFlingVelocity().x(), 1000); + fling_controller_->StopFling(); + } + + // Now perform a second fling (e.g. after an infinite scroller loads more + // content). Ensure it isn't boosted since the previous fling was + // interrupted. + { + AdvanceTime(time_to_advance_ms); + SimulateScrollBegin(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(10, 0)); + SimulateScrollUpdate(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(10, 0)); + SimulateFlingStart(blink::WebGestureDevice::kTouchscreen, + gfx::Vector2dF(1000, 0), + /*wait_before_processing=*/false); + + if (NeedsBeginFrameForFlingProgress()) + ProgressFling(NowTicks()); + + EXPECT_EQ(fling_controller_->CurrentFlingVelocity().x(), 1000) + << "Fling was boosted but should not have been."; + } +} + TEST_P(FlingControllerTest, ControllerHandlesTouchscreenGestureFling) { SimulateFlingStart(blink::WebGestureDevice::kTouchscreen, gfx::Vector2dF(1000, 0));
diff --git a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc index 974f9d8..49bc08ce 100644 --- a/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc +++ b/content/browser/renderer_host/pepper/pepper_file_system_browser_host.cc
@@ -48,6 +48,20 @@ return storage_partition->GetFileSystemContext(); } +storage::FileSystemType PepperFileSystemTypeToFileSystemType( + PP_FileSystemType type) { + switch (type) { + case PP_FILESYSTEMTYPE_LOCALTEMPORARY: + return storage::kFileSystemTypeTemporary; + case PP_FILESYSTEMTYPE_LOCALPERSISTENT: + return storage::kFileSystemTypePersistent; + case PP_FILESYSTEMTYPE_EXTERNAL: + return storage::kFileSystemTypeExternal; + default: + return storage::kFileSystemTypeUnknown; + } +} + } // namespace PepperFileSystemBrowserHost::PepperFileSystemBrowserHost(BrowserPpapiHost* host,
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc index c177f98f..4731d12 100644 --- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
@@ -385,12 +385,12 @@ if (!render_frame_host) return PP_ERROR_NOACCESS; - network::mojom::UDPSocketReceiverPtr udp_socket_receiver; - // Avoid binding the receiver until the socket has been successfully Bound (in + network::mojom::UDPSocketListenerPtr udp_socket_listener; + // Avoid binding the listener until the socket has been successfully Bound (in // a socket sense), to avoid providing read data to the caller until it has // been told that the socket was bound. - network::mojom::UDPSocketReceiverRequest receiver_request = - mojo::MakeRequest(&udp_socket_receiver); + network::mojom::UDPSocketListenerRequest listener_request = + mojo::MakeRequest(&udp_socket_listener); SiteInstance* site_instance = render_frame_host->GetSiteInstance(); network::mojom::NetworkContext* network_context = @@ -400,10 +400,10 @@ if (g_create_udp_socket_callback_for_testing) { g_create_udp_socket_callback_for_testing->Run( network_context, mojo::MakeRequest(&socket_), - std::move(udp_socket_receiver)); + std::move(udp_socket_listener)); } else { network_context->CreateUDPSocket(mojo::MakeRequest(&socket_), - std::move(udp_socket_receiver)); + std::move(udp_socket_listener)); } ppapi::host::ReplyMessageContext reply_context = @@ -417,7 +417,7 @@ socket_->Bind(end_point, std::move(udp_socket_options), base::BindOnce(&PepperUDPSocketMessageFilter::DoBindCallback, base::Unretained(this), - std::move(receiver_request), reply_context)); + std::move(listener_request), reply_context)); return PP_OK_COMPLETIONPENDING; } @@ -556,7 +556,7 @@ } void PepperUDPSocketMessageFilter::DoBindCallback( - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, int result, const base::Optional<net::IPEndPoint>& local_addr_out) { @@ -580,15 +580,15 @@ *local_addr_out, base::BindRepeating(&PepperUDPSocketMessageFilter::OnFirewallHoleOpened, firewall_hole_weak_ptr_factory_.GetWeakPtr(), - base::Passed(std::move(receiver_request)), context, + base::Passed(std::move(listener_request)), context, net_address)); #else // !defined(OS_CHROMEOS) - OnBindComplete(std::move(receiver_request), context, net_address); + OnBindComplete(std::move(listener_request), context, net_address); #endif // !defined(OS_CHROMEOS) } void PepperUDPSocketMessageFilter::OnBindComplete( - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, const PP_NetAddress_Private& net_address) { DCHECK_CURRENTLY_ON(BrowserThread::UI); @@ -596,7 +596,7 @@ SendBindReply(context, PP_OK, net_address); - binding_.Bind(std::move(receiver_request)); + binding_.Bind(std::move(listener_request)); binding_.set_connection_error_handler(base::BindOnce( &PepperUDPSocketMessageFilter::PipeClosed, base::Unretained(this))); socket_.set_connection_error_handler(base::BindOnce( @@ -606,7 +606,7 @@ #if defined(OS_CHROMEOS) void PepperUDPSocketMessageFilter::OnFirewallHoleOpened( - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, const PP_NetAddress_Private& net_address, std::unique_ptr<chromeos::FirewallHole> hole) { @@ -615,7 +615,7 @@ LOG_IF(WARNING, !hole.get()) << "Firewall hole could not be opened."; firewall_hole_.reset(hole.release()); - OnBindComplete(std::move(receiver_request), context, net_address); + OnBindComplete(std::move(listener_request), context, net_address); } #endif // defined(OS_CHROMEOS)
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h index 1e43afe..7d88178 100644 --- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
@@ -58,7 +58,7 @@ class CONTENT_EXPORT PepperUDPSocketMessageFilter : public ppapi::host::ResourceMessageFilter, - public network::mojom::UDPSocketReceiver { + public network::mojom::UDPSocketListener { public: PepperUDPSocketMessageFilter(BrowserPpapiHostImpl* host, PP_Instance instance, @@ -67,7 +67,7 @@ using CreateUDPSocketCallback = base::RepeatingCallback<void( network::mojom::NetworkContext* network_context, network::mojom::UDPSocketRequest socket_request, - network::mojom::UDPSocketReceiverPtr socket_receiver)>; + network::mojom::UDPSocketListenerPtr socket_listener)>; static void SetCreateUDPSocketCallbackForTesting( const CreateUDPSocketCallback* create_udp_socket_callback); @@ -125,16 +125,16 @@ int32_t OnMsgLeaveGroup(const ppapi::host::HostMessageContext* context, const PP_NetAddress_Private& addr); - void DoBindCallback(network::mojom::UDPSocketReceiverRequest receiver_request, + void DoBindCallback(network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, int result, const base::Optional<net::IPEndPoint>& local_addr_out); - void OnBindComplete(network::mojom::UDPSocketReceiverRequest receiver_request, + void OnBindComplete(network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, const PP_NetAddress_Private& net_address); #if defined(OS_CHROMEOS) void OnFirewallHoleOpened( - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const ppapi::host::ReplyMessageContext& context, const PP_NetAddress_Private& net_address, std::unique_ptr<chromeos::FirewallHole> hole); @@ -142,7 +142,7 @@ void StartPendingSend(); void Close(); - // network::mojom::UDPSocketReceiver override: + // network::mojom::UDPSocketListener override: void OnReceived(int result, const base::Optional<net::IPEndPoint>& src_addr, base::Optional<base::span<const uint8_t>> data) override; @@ -215,7 +215,7 @@ // Binding late avoids receiving data when still setting up the socket. Closed // in Close() and on Mojo pipe errors. Must only be accessed (and destroyed) // on UI thread. - mojo::Binding<network::mojom::UDPSocketReceiver> binding_; + mojo::Binding<network::mojom::UDPSocketListener> binding_; #if defined(OS_CHROMEOS) std::unique_ptr<chromeos::FirewallHole,
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h index 496ea4b..f3b83d9 100644 --- a/content/browser/renderer_host/render_process_host_impl.h +++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -482,7 +482,8 @@ // host, and is used by workers via RendererInterfaceBinders. void BindFileSystemManager( const url::Origin& origin, - mojo::PendingReceiver<blink::mojom::FileSystemManager> receiver); + mojo::PendingReceiver<blink::mojom::FileSystemManager> receiver) override; + FileSystemManagerImpl* GetFileSystemManagerForTesting() { return file_system_manager_impl_.get(); }
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index db01a08..6f90d2ad 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -2014,7 +2014,9 @@ tester.ExpectUniqueSample("Renderer.Hung.Duration", 17000, 1); } -TEST_F(RenderWidgetHostTest, PendingUserActivationTimeout) { +// TODO(https://crbug.com/992784): Flakily fails the final +// ConsumePendingUserActivationIfAllowed expectation, after RunLoopFor(). +TEST_F(RenderWidgetHostTest, DISABLED_PendingUserActivationTimeout) { base::test::ScopedFeatureList scoped_feature_list_; scoped_feature_list_.InitAndEnableFeature( features::kBrowserVerifiedUserActivation);
diff --git a/content/browser/renderer_host/render_widget_targeter.cc b/content/browser/renderer_host/render_widget_targeter.cc index 3024a12..1cdeba1 100644 --- a/content/browser/renderer_host/render_widget_targeter.cc +++ b/content/browser/renderer_host/render_widget_targeter.cc
@@ -81,13 +81,6 @@ int TracingUmaTracker::next_id_ = 1; -enum class HitTestResultsMatch { - kDoNotMatch = 0, - kMatch = 1, - kHitTestResultChanged = 2, - kMaxValue = kHitTestResultChanged, -}; - RenderWidgetTargetResult::RenderWidgetTargetResult() = default; RenderWidgetTargetResult::RenderWidgetTargetResult( @@ -489,36 +482,8 @@ request->GetExpectedFrameSinkId().is_valid()) { static const char* kResultsMatchHistogramName = "Event.VizHitTestSurfaceLayer.ResultsMatch"; - bool results_match = - target->GetFrameSinkId() == request->GetExpectedFrameSinkId(); - HitTestResultsMatch match_result = - HitTestResultsMatch::kHitTestResultChanged; - if (results_match) { - match_result = HitTestResultsMatch::kMatch; - } else { - // If the results do not match, it is possible that the hit test data - // changed during verification. We do synchronous hit test again to make - // sure the result is reliable. - RenderWidgetTargetResult result; - if (request->IsWebInputEventRequest()) { - result = delegate_->FindTargetSynchronously(request->GetRootView(), - request->GetEvent()); - } else { - result = delegate_->FindTargetSynchronouslyAtPoint( - request->GetRootView(), request->GetLocation()); - } - - if (!result.should_query_view && result.view && - request->GetExpectedFrameSinkId() == result.view->GetFrameSinkId()) { - // If the result did not change, it is likely that viz hit test finds - // the wrong target. - match_result = HitTestResultsMatch::kDoNotMatch; - } else { - // Hit test data changed, so the result is no longer reliable. - match_result = HitTestResultsMatch::kHitTestResultChanged; - } - } - UMA_HISTOGRAM_ENUMERATION(kResultsMatchHistogramName, match_result, + HitTestResultsMatch bucket = GetHitTestResultsMatchBucket(target, request); + UMA_HISTOGRAM_ENUMERATION(kResultsMatchHistogramName, bucket, HitTestResultsMatch::kMaxValue); FlushEventQueue(true); return; @@ -575,4 +540,47 @@ } } +RenderWidgetTargeter::HitTestResultsMatch +RenderWidgetTargeter::GetHitTestResultsMatchBucket( + RenderWidgetHostViewBase* target, + TargetingRequest* request) const { + if (target->GetFrameSinkId() == request->GetExpectedFrameSinkId()) + return HitTestResultsMatch::kMatch; + + // If the target was not active, i.e. it had not submitted its hit test + // data during HitTestAggregator::AppendRegion, the viz hit test data may + // be outdated upon hit testing and verification. + bool target_was_active = true; + const auto& display_hit_test_query_map = + GetHostFrameSinkManager()->display_hit_test_query(); + const auto iter = display_hit_test_query_map.find( + request->GetRootView()->GetRootFrameSinkId()); + // When a root frame sink id is invalidated, e.g. when the window is closed, + // the corresponding entry will be removed from the map. + if (iter != display_hit_test_query_map.end()) { + const auto* hit_test_query = iter->second.get(); + target_was_active = + hit_test_query->ContainsActiveFrameSinkId(target->GetFrameSinkId()); + } + if (!target_was_active) + return HitTestResultsMatch::kHitTestDataOutdated; + + // If the results do not match, it is possible that the hit test data + // changed during verification. We do synchronous hit test again to make + // sure the result is reliable. + RenderWidgetTargetResult result = + request->IsWebInputEventRequest() + ? delegate_->FindTargetSynchronously(request->GetRootView(), + request->GetEvent()) + : delegate_->FindTargetSynchronouslyAtPoint(request->GetRootView(), + request->GetLocation()); + if (result.should_query_view || !result.view || + request->GetExpectedFrameSinkId() != result.view->GetFrameSinkId()) { + // Hit test data changed, so the result is no longer reliable. + return HitTestResultsMatch::kHitTestResultChanged; + } + + return HitTestResultsMatch::kDoNotMatch; +} + } // namespace content
diff --git a/content/browser/renderer_host/render_widget_targeter.h b/content/browser/renderer_host/render_widget_targeter.h index 9b92a2eb..04f9ce9 100644 --- a/content/browser/renderer_host/render_widget_targeter.h +++ b/content/browser/renderer_host/render_widget_targeter.h
@@ -95,6 +95,14 @@ RenderWidgetHostViewBase* target_view) const = 0; }; + enum class HitTestResultsMatch { + kDoNotMatch = 0, + kMatch = 1, + kHitTestResultChanged = 2, + kHitTestDataOutdated = 3, + kMaxValue = kHitTestDataOutdated, + }; + // The delegate must outlive this targeter. explicit RenderWidgetTargeter(Delegate* delegate); ~RenderWidgetTargeter(); @@ -239,6 +247,10 @@ const gfx::PointF& last_target_location, const bool is_verification_request); + HitTestResultsMatch GetHitTestResultsMatchBucket( + RenderWidgetHostViewBase* target, + TargetingRequest* request) const; + base::TimeDelta async_hit_test_timeout_delay() { return async_hit_test_timeout_delay_; }
diff --git a/content/browser/scheduler/browser_io_task_environment.cc b/content/browser/scheduler/browser_io_thread_delegate.cc similarity index 80% rename from content/browser/scheduler/browser_io_task_environment.cc rename to content/browser/scheduler/browser_io_thread_delegate.cc index e89790f..ec65f10a 100644 --- a/content/browser/scheduler/browser_io_task_environment.cc +++ b/content/browser/scheduler/browser_io_thread_delegate.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include "base/message_loop/message_pump_type.h" #include "base/task/sequence_manager/sequence_manager.h" @@ -15,7 +15,7 @@ using ::base::sequence_manager::SequenceManager; using ::base::sequence_manager::TaskQueue; -BrowserIOTaskEnvironment::BrowserIOTaskEnvironment() +BrowserIOThreadDelegate::BrowserIOThreadDelegate() : sequence_manager_(CreateUnboundSequenceManager( SequenceManager::Settings::Builder() .SetMessagePumpType(base::MessagePumpType::IO) @@ -23,13 +23,13 @@ Init(sequence_manager_.get()); } -BrowserIOTaskEnvironment::BrowserIOTaskEnvironment( +BrowserIOThreadDelegate::BrowserIOThreadDelegate( SequenceManager* sequence_manager) : sequence_manager_(nullptr) { Init(sequence_manager); } -void BrowserIOTaskEnvironment::Init( +void BrowserIOThreadDelegate::Init( base::sequence_manager::SequenceManager* sequence_manager) { task_queues_ = std::make_unique<BrowserTaskQueues>( BrowserThread::IO, sequence_manager, @@ -38,13 +38,13 @@ } scoped_refptr<base::SingleThreadTaskRunner> -BrowserIOTaskEnvironment::GetDefaultTaskRunner() { +BrowserIOThreadDelegate::GetDefaultTaskRunner() { return default_task_runner_; } -BrowserIOTaskEnvironment::~BrowserIOTaskEnvironment() = default; +BrowserIOThreadDelegate::~BrowserIOThreadDelegate() = default; -void BrowserIOTaskEnvironment::BindToCurrentThread( +void BrowserIOThreadDelegate::BindToCurrentThread( base::TimerSlack timer_slack) { DCHECK(sequence_manager_); sequence_manager_->BindToMessagePump(
diff --git a/content/browser/scheduler/browser_io_task_environment.h b/content/browser/scheduler/browser_io_thread_delegate.h similarity index 76% rename from content/browser/scheduler/browser_io_task_environment.h rename to content/browser/scheduler/browser_io_thread_delegate.h index ae6760b..49c337d 100644 --- a/content/browser/scheduler/browser_io_task_environment.h +++ b/content/browser/scheduler/browser_io_thread_delegate.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_SCHEDULER_BROWSER_IO_TASK_ENVIRONMENT_H_ -#define CONTENT_BROWSER_SCHEDULER_BROWSER_IO_TASK_ENVIRONMENT_H_ +#ifndef CONTENT_BROWSER_SCHEDULER_BROWSER_IO_THREAD_DELEGATE_H_ +#define CONTENT_BROWSER_SCHEDULER_BROWSER_IO_THREAD_DELEGATE_H_ #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" @@ -23,19 +23,18 @@ namespace content { -// TaskEnvironment for the IO thread. -class CONTENT_EXPORT BrowserIOTaskEnvironment - : public base::Thread::TaskEnvironment { +// Delegate for the IO thread. +class CONTENT_EXPORT BrowserIOThreadDelegate : public base::Thread::Delegate { public: using Handle = BrowserTaskQueues::Handle; - static std::unique_ptr<BrowserIOTaskEnvironment> CreateForTesting( + static std::unique_ptr<BrowserIOThreadDelegate> CreateForTesting( base::sequence_manager::SequenceManager* sequence_manager) { - return base::WrapUnique(new BrowserIOTaskEnvironment(sequence_manager)); + return base::WrapUnique(new BrowserIOThreadDelegate(sequence_manager)); } - BrowserIOTaskEnvironment(); - ~BrowserIOTaskEnvironment() override; + BrowserIOThreadDelegate(); + ~BrowserIOThreadDelegate() override; scoped_refptr<base::SingleThreadTaskRunner> GetDefaultTaskRunner() override; void BindToCurrentThread(base::TimerSlack timer_slack) override; @@ -51,7 +50,7 @@ scoped_refptr<Handle> CreateHandle() { return task_queues_->GetHandle(); } private: - explicit BrowserIOTaskEnvironment( + explicit BrowserIOThreadDelegate( base::sequence_manager::SequenceManager* sequence_manager); // Performs the actual initialization of all the members that require a @@ -69,4 +68,4 @@ } // namespace content -#endif // CONTENT_BROWSER_SCHEDULER_BROWSER_IO_TASK_ENVIRONMENT_H_ +#endif // CONTENT_BROWSER_SCHEDULER_BROWSER_IO_THREAD_DELEGATE_H_
diff --git a/content/browser/scheduler/browser_io_task_environment_unittest.cc b/content/browser/scheduler/browser_io_thread_delegate_unittest.cc similarity index 71% rename from content/browser/scheduler/browser_io_task_environment_unittest.cc rename to content/browser/scheduler/browser_io_thread_delegate_unittest.cc index 19f405f81..2be9c02 100644 --- a/content/browser/scheduler/browser_io_task_environment_unittest.cc +++ b/content/browser/scheduler/browser_io_thread_delegate_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include <memory> @@ -16,15 +16,15 @@ namespace content { namespace { -TEST(BrowserIOTaskEnvironmentTest, CanPostTasksToThread) { +TEST(BrowserIOThreadDelegateTest, CanPostTasksToThread) { base::Thread thread("my_thread"); - auto env = std::make_unique<BrowserIOTaskEnvironment>(); - auto handle = env->CreateHandle(); + auto delegate = std::make_unique<BrowserIOThreadDelegate>(); + auto handle = delegate->CreateHandle(); handle->EnableAllQueues(); base::Thread::Options options; - options.task_environment = env.release(); + options.delegate = delegate.release(); thread.StartWithOptions(options); auto runner = @@ -36,14 +36,14 @@ event.Wait(); } -TEST(BrowserIOTaskEnvironmentTest, DefaultTaskRunnerIsAllwaysActive) { +TEST(BrowserIOThreadDelegateTest, DefaultTaskRunnerIsAllwaysActive) { base::Thread thread("my_thread"); - auto env = std::make_unique<BrowserIOTaskEnvironment>(); - auto task_runner = env->GetDefaultTaskRunner(); + auto delegate = std::make_unique<BrowserIOThreadDelegate>(); + auto task_runner = delegate->GetDefaultTaskRunner(); base::Thread::Options options; - options.task_environment = env.release(); + options.delegate = delegate.release(); thread.StartWithOptions(options); base::WaitableEvent event;
diff --git a/content/browser/scheduler/browser_task_executor.cc b/content/browser/scheduler/browser_task_executor.cc index 197ab5d..f2ddb987 100644 --- a/content/browser/scheduler/browser_task_executor.cc +++ b/content/browser/scheduler/browser_task_executor.cc
@@ -68,11 +68,11 @@ BrowserTaskExecutor::BrowserTaskExecutor( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment) + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate) : browser_ui_thread_scheduler_(std::move(browser_ui_thread_scheduler)), browser_ui_thread_handle_(browser_ui_thread_scheduler_->GetHandle()), - browser_io_task_environment_(std::move(browser_io_task_environment)), - browser_io_thread_handle_(browser_io_task_environment_->CreateHandle()) {} + browser_io_thread_delegate_(std::move(browser_io_thread_delegate)), + browser_io_thread_handle_(browser_io_thread_delegate_->CreateHandle()) {} BrowserTaskExecutor::~BrowserTaskExecutor() = default; @@ -80,25 +80,25 @@ void BrowserTaskExecutor::Create() { DCHECK(!base::ThreadTaskRunnerHandle::IsSet()); CreateInternal(std::make_unique<BrowserUIThreadScheduler>(), - std::make_unique<BrowserIOTaskEnvironment>()); + std::make_unique<BrowserIOThreadDelegate>()); } // static void BrowserTaskExecutor::CreateForTesting( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment) { + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate) { CreateInternal(std::move(browser_ui_thread_scheduler), - std::move(browser_io_task_environment)); + std::move(browser_io_thread_delegate)); } // static void BrowserTaskExecutor::CreateInternal( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment) { + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate) { DCHECK(!g_browser_task_executor); g_browser_task_executor = new BrowserTaskExecutor(std::move(browser_ui_thread_scheduler), - std::move(browser_io_task_environment)); + std::move(browser_io_thread_delegate)); base::RegisterTaskExecutor(BrowserTaskTraitsExtension::kExtensionId, g_browser_task_executor); g_browser_task_executor->browser_ui_thread_handle_ @@ -127,7 +127,7 @@ void BrowserTaskExecutor::PostFeatureListSetup() { DCHECK(g_browser_task_executor); DCHECK(g_browser_task_executor->browser_ui_thread_scheduler_); - DCHECK(g_browser_task_executor->browser_io_task_environment_); + DCHECK(g_browser_task_executor->browser_io_thread_delegate_); g_browser_task_executor->browser_ui_thread_handle_ ->PostFeatureListInitializationSetup(); g_browser_task_executor->browser_io_thread_handle_ @@ -148,7 +148,7 @@ // we need to clean up, so BrowserTaskExecutor::ResetForTesting should be // called. g_browser_task_executor->browser_ui_thread_scheduler_.reset(); - g_browser_task_executor->browser_io_task_environment_.reset(); + g_browser_task_executor->browser_io_thread_delegate_.reset(); } // static @@ -267,20 +267,20 @@ std::unique_ptr<BrowserProcessSubThread> BrowserTaskExecutor::CreateIOThread() { DCHECK(g_browser_task_executor); - DCHECK(g_browser_task_executor->browser_io_task_environment_); + DCHECK(g_browser_task_executor->browser_io_thread_delegate_); TRACE_EVENT0("startup", "BrowserTaskExecutor::CreateIOThread"); auto io_thread = std::make_unique<BrowserProcessSubThread>(BrowserThread::IO); - if (g_browser_task_executor->browser_io_task_environment_ + if (g_browser_task_executor->browser_io_thread_delegate_ ->allow_blocking_for_testing()) { io_thread->AllowBlockingForTesting(); } base::Thread::Options options; options.message_pump_type = base::MessagePumpType::IO; - options.task_environment = - g_browser_task_executor->browser_io_task_environment_.release(); + options.delegate = + g_browser_task_executor->browser_io_thread_delegate_.release(); // Up the priority of the |io_thread_| as some of its IPCs relate to // display tasks. if (base::FeatureList::IsEnabled(features::kBrowserUseDisplayThreadPriority))
diff --git a/content/browser/scheduler/browser_task_executor.h b/content/browser/scheduler/browser_task_executor.h index f6fac1c1..0d9838e 100644 --- a/content/browser/scheduler/browser_task_executor.h +++ b/content/browser/scheduler/browser_task_executor.h
@@ -11,7 +11,7 @@ #include "base/memory/scoped_refptr.h" #include "base/task/task_executor.h" #include "build/build_config.h" -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include "content/browser/scheduler/browser_ui_thread_scheduler.h" #include "content/common/content_export.h" #include "content/public/browser/browser_task_traits.h" @@ -77,7 +77,7 @@ // As Create but with the user provided objects. static void CreateForTesting( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment); + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate); // This must be called after the FeatureList has been initialized in order // for scheduling experiments to function. @@ -152,7 +152,7 @@ static void CreateInternal( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment); + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate); // For GetProxyTaskRunnerForThread(). FRIEND_TEST_ALL_PREFIXES(BrowserTaskExecutorTest, @@ -164,7 +164,7 @@ explicit BrowserTaskExecutor( std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler, - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment); + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate); ~BrowserTaskExecutor() override; scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner( @@ -173,8 +173,8 @@ std::unique_ptr<BrowserUIThreadScheduler> browser_ui_thread_scheduler_; scoped_refptr<BrowserUIThreadScheduler::Handle> browser_ui_thread_handle_; - std::unique_ptr<BrowserIOTaskEnvironment> browser_io_task_environment_; - scoped_refptr<BrowserIOTaskEnvironment::Handle> browser_io_thread_handle_; + std::unique_ptr<BrowserIOThreadDelegate> browser_io_thread_delegate_; + scoped_refptr<BrowserIOThreadDelegate::Handle> browser_io_thread_handle_; DISALLOW_COPY_AND_ASSIGN(BrowserTaskExecutor); };
diff --git a/content/browser/scheduler/browser_task_executor_unittest.cc b/content/browser/scheduler/browser_task_executor_unittest.cc index 327736c9..347d384 100644 --- a/content/browser/scheduler/browser_task_executor_unittest.cc +++ b/content/browser/scheduler/browser_task_executor_unittest.cc
@@ -18,7 +18,7 @@ #include "base/test/mock_callback.h" #include "base/test/scoped_task_environment.h" #include "base/threading/thread_task_runner_handle.h" -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include "content/browser/scheduler/browser_task_queues.h" #include "content/browser/scheduler/browser_ui_thread_scheduler.h" #include "content/public/browser/browser_task_traits.h" @@ -179,7 +179,7 @@ QueueType::kDefault)); BrowserTaskExecutor::CreateForTesting( std::move(browser_ui_thread_scheduler), - std::make_unique<BrowserIOTaskEnvironment>()); + std::make_unique<BrowserIOThreadDelegate>()); } };
diff --git a/content/browser/scheduler/responsiveness/message_loop_observer.cc b/content/browser/scheduler/responsiveness/message_loop_observer.cc index 0128402..9f7907d2 100644 --- a/content/browser/scheduler/responsiveness/message_loop_observer.cc +++ b/content/browser/scheduler/responsiveness/message_loop_observer.cc
@@ -4,6 +4,8 @@ #include "content/browser/scheduler/responsiveness/message_loop_observer.h" +#include "base/message_loop/message_loop_current.h" + namespace content { namespace responsiveness {
diff --git a/content/browser/scheduler/responsiveness/message_loop_observer.h b/content/browser/scheduler/responsiveness/message_loop_observer.h index e6eed71..ea9419f 100644 --- a/content/browser/scheduler/responsiveness/message_loop_observer.h +++ b/content/browser/scheduler/responsiveness/message_loop_observer.h
@@ -6,7 +6,7 @@ #define CONTENT_BROWSER_SCHEDULER_RESPONSIVENESS_MESSAGE_LOOP_OBSERVER_H_ #include "base/macros.h" -#include "base/message_loop/message_loop_current.h" +#include "base/task/task_observer.h" #include "content/common/content_export.h" namespace base { @@ -19,8 +19,7 @@ // This object is not thread safe. It must be constructed and destroyed on the // same thread. The callbacks will occur synchronously from WillProcessTask() // and DidProcessTask(). -class CONTENT_EXPORT MessageLoopObserver - : base::MessageLoopCurrent::TaskObserver { +class CONTENT_EXPORT MessageLoopObserver : base::TaskObserver { public: using TaskCallback = base::RepeatingCallback<void(const base::PendingTask* task)>;
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc index e66e469..df0df3f3 100644 --- a/content/browser/service_worker/service_worker_browsertest.cc +++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -88,6 +88,7 @@ #include "services/network/public/cpp/features.h" #include "storage/browser/blob/blob_data_handle.h" #include "storage/browser/blob/blob_data_snapshot.h" +#include "storage/browser/blob/blob_handle.h" #include "storage/browser/blob/blob_reader.h" #include "storage/browser/blob/blob_storage_context.h" #include "third_party/blink/public/common/features.h" @@ -3411,6 +3412,7 @@ static const char kWorkerUrl[]; static const char kPageUrl[]; static const char kCachedInInstallEventUrl[]; + static const char kCachedInInstallEventWithMimeTypeParamUrl[]; static const char kCachedInFetchEventUrl[]; static const char kCachedInMessageEventUrl[]; @@ -3479,6 +3481,11 @@ const char ServiceWorkerCodeCacheStrategyTestBase::kCachedInInstallEventUrl[] = "/service_worker/" "code_cache_strategy_test_script.js?cached_in_install_event"; +const char ServiceWorkerCodeCacheStrategyTestBase:: + kCachedInInstallEventWithMimeTypeParamUrl[] = + "/service_worker/" + "code_cache_strategy_test_script.js?cached_in_install_event_with_mime_" + "type_param"; const char ServiceWorkerCodeCacheStrategyTestBase::kCachedInFetchEventUrl[] = "/service_worker/code_cache_strategy_test_script.js?cached_in_fetch_event"; const char ServiceWorkerCodeCacheStrategyTestBase::kCachedInMessageEventUrl[] = @@ -3501,6 +3508,7 @@ NavigateToTestPage(); InitiateEventsToCacheScript(); EXPECT_FALSE(HasSideData(kCachedInInstallEventUrl)); + EXPECT_FALSE(HasSideData(kCachedInInstallEventWithMimeTypeParamUrl)); EXPECT_FALSE(HasSideData(kCachedInFetchEventUrl)); EXPECT_FALSE(HasSideData(kCachedInMessageEventUrl)); } @@ -3521,6 +3529,7 @@ NavigateToTestPage(); InitiateEventsToCacheScript(); EXPECT_TRUE(HasSideData(kCachedInInstallEventUrl)); + EXPECT_TRUE(HasSideData(kCachedInInstallEventWithMimeTypeParamUrl)); EXPECT_FALSE(HasSideData(kCachedInFetchEventUrl)); EXPECT_FALSE(HasSideData(kCachedInMessageEventUrl)); } @@ -3541,6 +3550,7 @@ NavigateToTestPage(); InitiateEventsToCacheScript(); EXPECT_TRUE(HasSideData(kCachedInInstallEventUrl)); + EXPECT_TRUE(HasSideData(kCachedInInstallEventWithMimeTypeParamUrl)); // These should not time out. WaitForSideData(kCachedInFetchEventUrl); WaitForSideData(kCachedInMessageEventUrl);
diff --git a/content/browser/service_worker/service_worker_registration_unittest.cc b/content/browser/service_worker/service_worker_registration_unittest.cc index d433ba47..e3d58447 100644 --- a/content/browser/service_worker/service_worker_registration_unittest.cc +++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -183,6 +183,7 @@ storage_partition_impl_ = StoragePartitionImpl::Create( helper_->browser_context(), /* in_memory= */ true, base::FilePath(), /* partition_domain= */ ""); + storage_partition_impl_->Initialize(); helper_->context_wrapper()->set_storage_partition( storage_partition_impl_.get());
diff --git a/content/browser/sms/sms_browsertest.cc b/content/browser/sms/sms_browsertest.cc index bb2e13a..b4be6b6 100644 --- a/content/browser/sms/sms_browsertest.cc +++ b/content/browser/sms/sms_browsertest.cc
@@ -74,7 +74,7 @@ base::OnceClosure on_confirm_callback; - EXPECT_CALL(delegate_, CreateSmsDialog()) + EXPECT_CALL(delegate_, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(_, _, _)) @@ -119,7 +119,7 @@ base::OnceClosure on_confirm_callback; - EXPECT_CALL(delegate_, CreateSmsDialog()) + EXPECT_CALL(delegate_, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(_, _, _)) @@ -253,7 +253,7 @@ tab1->web_contents()->SetDelegate(&delegate_); - EXPECT_CALL(delegate_, CreateSmsDialog()) + EXPECT_CALL(delegate_, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*provider, Retrieve()).WillOnce(Invoke([&loop]() { @@ -280,7 +280,7 @@ tab2->web_contents()->SetDelegate(&delegate_); - EXPECT_CALL(delegate_, CreateSmsDialog()) + EXPECT_CALL(delegate_, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*provider, Retrieve()).WillOnce(Invoke([&loop]() { @@ -359,7 +359,7 @@ base::OnceClosure on_confirm_callback1; base::OnceClosure on_confirm_callback2; - EXPECT_CALL(delegate_, CreateSmsDialog()) + EXPECT_CALL(delegate_, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog1)))) .WillOnce(Return(ByMove(base::WrapUnique(dialog2)))); @@ -443,7 +443,7 @@ auto* dialog = new StrictMock<MockSmsDialog>(); - EXPECT_CALL(delegate, CreateSmsDialog()) + EXPECT_CALL(delegate, CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(_, _, _))
diff --git a/content/browser/sms/sms_service.cc b/content/browser/sms/sms_service.cc index c605431..e3690f53 100644 --- a/content/browser/sms/sms_service.cc +++ b/content/browser/sms/sms_service.cc
@@ -146,7 +146,8 @@ void SmsService::Prompt() { WebContents* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host()); - prompt_ = web_contents->GetDelegate()->CreateSmsDialog(); + const url::Origin origin = render_frame_host()->GetLastCommittedOrigin(); + prompt_ = web_contents->GetDelegate()->CreateSmsDialog(origin); if (prompt_) { prompt_->Open( render_frame_host(),
diff --git a/content/browser/sms/sms_service_unittest.cc b/content/browser/sms/sms_service_unittest.cc index 2a81cebe..25529c4 100644 --- a/content/browser/sms/sms_service_unittest.cc +++ b/content/browser/sms/sms_service_unittest.cc
@@ -81,7 +81,7 @@ void SetupSmsDialog(content::RenderFrameHost* rfh) { auto* dialog = new NiceMock<MockSmsDialog>(); - EXPECT_CALL(*delegate(), CreateSmsDialog()) + EXPECT_CALL(*delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(rfh, _, _)) @@ -438,7 +438,7 @@ auto* dialog = new NiceMock<MockSmsDialog>(); - EXPECT_CALL(*service.delegate(), CreateSmsDialog()) + EXPECT_CALL(*service.delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(main_rfh(), _, _)) @@ -472,7 +472,7 @@ auto* dialog = new NiceMock<MockSmsDialog>(); - EXPECT_CALL(*service.delegate(), CreateSmsDialog()) + EXPECT_CALL(*service.delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*service.provider(), Retrieve()).WillOnce(Return()); @@ -498,7 +498,7 @@ base::OnceClosure on_confirm_callback; - EXPECT_CALL(*service.delegate(), CreateSmsDialog()) + EXPECT_CALL(*service.delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog1)))) .WillOnce(Return(ByMove(base::WrapUnique(dialog2)))); @@ -598,7 +598,7 @@ auto* dialog = new NiceMock<MockSmsDialog>(); - EXPECT_CALL(*service.delegate(), CreateSmsDialog()) + EXPECT_CALL(*service.delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(main_rfh(), _, _)) @@ -639,7 +639,7 @@ auto* dialog = new NiceMock<MockSmsDialog>(); base::OnceClosure on_cancel_callback; - EXPECT_CALL(*service.delegate(), CreateSmsDialog()) + EXPECT_CALL(*service.delegate(), CreateSmsDialog(_)) .WillOnce(Return(ByMove(base::WrapUnique(dialog)))); EXPECT_CALL(*dialog, Open(main_rfh(), _, _))
diff --git a/content/browser/sms/test/mock_sms_web_contents_delegate.h b/content/browser/sms/test/mock_sms_web_contents_delegate.h index 33d1812b..406d23d 100644 --- a/content/browser/sms/test/mock_sms_web_contents_delegate.h +++ b/content/browser/sms/test/mock_sms_web_contents_delegate.h
@@ -17,7 +17,7 @@ MockSmsWebContentsDelegate(); ~MockSmsWebContentsDelegate() override; - MOCK_METHOD0(CreateSmsDialog, std::unique_ptr<SmsDialog>()); + MOCK_METHOD1(CreateSmsDialog, std::unique_ptr<SmsDialog>(const url::Origin&)); private: DISALLOW_COPY_AND_ASSIGN(MockSmsWebContentsDelegate);
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc index 2c57964..d5b4ce8 100644 --- a/content/browser/storage_partition_impl.cc +++ b/content/browser/storage_partition_impl.cc
@@ -324,8 +324,15 @@ bool samesite_treated_as_lax_cookies = false; bool samesite_none_insecure_cookies = false; + bool messages_disabled_by_cmdline = + base::FeatureList::GetInstance()->IsFeatureOverriddenFromCommandLine( + features::kCookieDeprecationMessages.name, + base::FeatureList::OVERRIDE_DISABLE_FEATURE); bool emit_messages = - base::FeatureList::IsEnabled(features::kCookieDeprecationMessages); + !messages_disabled_by_cmdline && + (net::cookie_util::IsSameSiteByDefaultCookiesEnabled() || + net::cookie_util::IsCookiesWithoutSameSiteMustBeSecureEnabled() || + base::FeatureList::IsEnabled(features::kCookieDeprecationMessages)); for (const net::CookieWithStatus& excluded_cookie : cookie_list) { std::string cookie_url = @@ -721,11 +728,17 @@ StoragePartitionImpl::StoragePartitionImpl( BrowserContext* browser_context, const base::FilePath& partition_path, + bool is_in_memory, + const base::FilePath& relative_partition_path, + const std::string& partition_domain, storage::SpecialStoragePolicy* special_storage_policy) - : partition_path_(partition_path), + : browser_context_(browser_context), + partition_path_(partition_path), + is_in_memory_(is_in_memory), + relative_partition_path_(relative_partition_path), + partition_domain_(partition_domain), special_storage_policy_(special_storage_policy), network_context_client_binding_(this), - browser_context_(browser_context), deletion_helpers_running_(0) {} StoragePartitionImpl::~StoragePartitionImpl() { @@ -798,156 +811,155 @@ base::FilePath partition_path = context->GetPath().Append(relative_partition_path); - std::unique_ptr<StoragePartitionImpl> partition = - base::WrapUnique(new StoragePartitionImpl( - context, partition_path, context->GetSpecialStoragePolicy())); + return base::WrapUnique(new StoragePartitionImpl( + context, partition_path, in_memory, relative_partition_path, + partition_domain, context->GetSpecialStoragePolicy())); +} - partition->is_in_memory_ = in_memory; - partition->relative_partition_path_ = relative_partition_path; +void StoragePartitionImpl::Initialize() { + // Ensure that these methods are called on the UI thread, except for + // unittests where a UI thread might not have been created. + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || + !BrowserThread::IsThreadInitialized(BrowserThread::UI)); + DCHECK(!initialized_); + initialized_ = true; // All of the clients have to be created and registered with the - // QuotaManager prior to the QuotaManger being used. We do them + // QuotaManager prior to the QuotaManager being used. We do them // all together here prior to handing out a reference to anything // that utilizes the QuotaManager. - partition->quota_manager_ = new storage::QuotaManager( - in_memory, partition_path, + quota_manager_ = new storage::QuotaManager( + is_in_memory_, partition_path_, base::CreateSingleThreadTaskRunner({BrowserThread::IO}).get(), - context->GetSpecialStoragePolicy(), + browser_context_->GetSpecialStoragePolicy(), base::BindRepeating(&StoragePartitionImpl::GetQuotaSettings, - partition->weak_factory_.GetWeakPtr())); + weak_factory_.GetWeakPtr())); scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy = - partition->quota_manager_->proxy(); + quota_manager_->proxy(); // Each consumer is responsible for registering its QuotaClient during // its construction. - partition->filesystem_context_ = CreateFileSystemContext( - context, partition_path, in_memory, quota_manager_proxy.get()); + filesystem_context_ = + CreateFileSystemContext(browser_context_, partition_path_, is_in_memory_, + quota_manager_proxy.get()); - partition->database_tracker_ = base::MakeRefCounted<storage::DatabaseTracker>( - partition_path, in_memory, context->GetSpecialStoragePolicy(), - quota_manager_proxy.get()); + database_tracker_ = base::MakeRefCounted<storage::DatabaseTracker>( + partition_path_, is_in_memory_, + browser_context_->GetSpecialStoragePolicy(), quota_manager_proxy.get()); - partition->dom_storage_context_ = DOMStorageContextWrapper::Create( - BrowserContext::GetConnectorFor(context), - in_memory ? base::FilePath() : context->GetPath(), - relative_partition_path, context->GetSpecialStoragePolicy()); + dom_storage_context_ = DOMStorageContextWrapper::Create( + BrowserContext::GetConnectorFor(browser_context_), + is_in_memory_ ? base::FilePath() : browser_context_->GetPath(), + relative_partition_path_, browser_context_->GetSpecialStoragePolicy()); - partition->idle_manager_ = std::make_unique<IdleManager>(); - partition->lock_manager_ = new LockManager(); + idle_manager_ = std::make_unique<IdleManager>(); + lock_manager_ = new LockManager(); - base::FilePath path = in_memory ? base::FilePath() : partition_path; - partition->indexed_db_context_ = new IndexedDBContextImpl( - path, context->GetSpecialStoragePolicy(), quota_manager_proxy, + base::FilePath path = is_in_memory_ ? base::FilePath() : partition_path_; + indexed_db_context_ = new IndexedDBContextImpl( + path, browser_context_->GetSpecialStoragePolicy(), quota_manager_proxy, base::DefaultClock::GetInstance(), /*task_runner=*/nullptr); - partition->cache_storage_context_ = new CacheStorageContextImpl(context); - partition->cache_storage_context_->Init( - path, context->GetSpecialStoragePolicy(), quota_manager_proxy); + cache_storage_context_ = new CacheStorageContextImpl(browser_context_); + cache_storage_context_->Init( + path, browser_context_->GetSpecialStoragePolicy(), quota_manager_proxy); - partition->service_worker_context_ = new ServiceWorkerContextWrapper(context); - partition->service_worker_context_->set_storage_partition(partition.get()); + service_worker_context_ = new ServiceWorkerContextWrapper(browser_context_); + service_worker_context_->set_storage_partition(this); - partition->appcache_service_ = base::MakeRefCounted<ChromeAppCacheService>( - quota_manager_proxy.get(), partition->weak_factory_.GetWeakPtr()); + appcache_service_ = base::MakeRefCounted<ChromeAppCacheService>( + quota_manager_proxy.get(), weak_factory_.GetWeakPtr()); - partition->shared_worker_service_ = std::make_unique<SharedWorkerServiceImpl>( - partition.get(), partition->service_worker_context_, - partition->appcache_service_); + shared_worker_service_ = std::make_unique<SharedWorkerServiceImpl>( + this, service_worker_context_, appcache_service_); - partition->push_messaging_context_ = - new PushMessagingContext(context, partition->service_worker_context_); + push_messaging_context_ = + new PushMessagingContext(browser_context_, service_worker_context_); #if !defined(OS_ANDROID) - partition->host_zoom_level_context_ = new HostZoomLevelContext( - context->CreateZoomLevelDelegate(partition_path)); + host_zoom_level_context_ = new HostZoomLevelContext( + browser_context_->CreateZoomLevelDelegate(partition_path_)); #endif // !defined(OS_ANDROID) - partition->platform_notification_context_ = - new PlatformNotificationContextImpl(path, context, - partition->service_worker_context_); - partition->platform_notification_context_->Initialize(); + platform_notification_context_ = new PlatformNotificationContextImpl( + path, browser_context_, service_worker_context_); + platform_notification_context_->Initialize(); - partition->devtools_background_services_context_ = + devtools_background_services_context_ = base::MakeRefCounted<DevToolsBackgroundServicesContextImpl>( - context, partition->service_worker_context_); + browser_context_, service_worker_context_); - partition->content_index_context_ = - base::MakeRefCounted<ContentIndexContextImpl>( - context, partition->service_worker_context_); + content_index_context_ = base::MakeRefCounted<ContentIndexContextImpl>( + browser_context_, service_worker_context_); - partition->background_fetch_context_ = - base::MakeRefCounted<BackgroundFetchContext>( - context, partition->service_worker_context_, - partition->cache_storage_context_, quota_manager_proxy, - partition->devtools_background_services_context_); + background_fetch_context_ = base::MakeRefCounted<BackgroundFetchContext>( + browser_context_, service_worker_context_, cache_storage_context_, + quota_manager_proxy, devtools_background_services_context_); - partition->background_sync_context_ = - base::MakeRefCounted<BackgroundSyncContextImpl>(); - partition->background_sync_context_->Init( - partition->service_worker_context_, - partition->devtools_background_services_context_); + background_sync_context_ = base::MakeRefCounted<BackgroundSyncContextImpl>(); + background_sync_context_->Init(service_worker_context_, + devtools_background_services_context_); - partition->payment_app_context_ = new PaymentAppContextImpl(); - partition->payment_app_context_->Init(partition->service_worker_context_); + payment_app_context_ = new PaymentAppContextImpl(); + payment_app_context_->Init(service_worker_context_); - partition->broadcast_channel_provider_ = new BroadcastChannelProvider(); + broadcast_channel_provider_ = new BroadcastChannelProvider(); - partition->bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); + bluetooth_allowed_devices_map_ = new BluetoothAllowedDevicesMap(); scoped_refptr<ChromeBlobStorageContext> blob_context = - ChromeBlobStorageContext::GetFor(context); + ChromeBlobStorageContext::GetFor(browser_context_); - partition->url_loader_factory_getter_ = new URLLoaderFactoryGetter(); - partition->url_loader_factory_getter_->Initialize(partition.get()); + url_loader_factory_getter_ = new URLLoaderFactoryGetter(); + url_loader_factory_getter_->Initialize(this); - partition->service_worker_context_->Init( - path, quota_manager_proxy.get(), context->GetSpecialStoragePolicy(), - blob_context.get(), partition->url_loader_factory_getter_.get()); + service_worker_context_->Init(path, quota_manager_proxy.get(), + browser_context_->GetSpecialStoragePolicy(), + blob_context.get(), + url_loader_factory_getter_.get()); - partition->blob_registry_ = - BlobRegistryWrapper::Create(blob_context, partition->filesystem_context_); + blob_registry_ = + BlobRegistryWrapper::Create(blob_context, filesystem_context_); - partition->prefetch_url_loader_service_ = - base::MakeRefCounted<PrefetchURLLoaderService>(context); + prefetch_url_loader_service_ = + base::MakeRefCounted<PrefetchURLLoaderService>(browser_context_); - partition->cookie_store_context_ = base::MakeRefCounted<CookieStoreContext>(); + cookie_store_context_ = base::MakeRefCounted<CookieStoreContext>(); // Unit tests use the Initialize() callback to crash early if restoring the // CookieManagerStore's state from ServiceWorkerStorage fails. Production and // browser tests rely on CookieStoreManager's well-defined behavior when // restoring the state fails. - partition->cookie_store_context_->Initialize( - partition->service_worker_context_, base::DoNothing()); + cookie_store_context_->Initialize(service_worker_context_, base::DoNothing()); - partition->native_file_system_manager_ = + native_file_system_manager_ = base::MakeRefCounted<NativeFileSystemManagerImpl>( - partition->filesystem_context_, blob_context, - context->GetNativeFileSystemPermissionContext()); + filesystem_context_, blob_context, + browser_context_->GetNativeFileSystemPermissionContext()); GeneratedCodeCacheSettings settings = - GetContentClient()->browser()->GetGeneratedCodeCacheSettings(context); + GetContentClient()->browser()->GetGeneratedCodeCacheSettings( + browser_context_); // For Incognito mode, we should not persist anything on the disk so // we do not create a code cache. Caching the generated code in memory // is not useful, since V8 already maintains one copy in memory. - if (!in_memory && settings.enabled()) { - partition->generated_code_cache_context_ = + if (!is_in_memory_ && settings.enabled()) { + generated_code_cache_context_ = base::MakeRefCounted<GeneratedCodeCacheContext>(); base::FilePath code_cache_path; - if (partition_domain.empty()) { + if (partition_domain_.empty()) { code_cache_path = settings.path().AppendASCII("Code Cache"); } else { // For site isolated partitions use the config directory. code_cache_path = settings.path() - .Append(relative_partition_path) + .Append(relative_partition_path_) .AppendASCII("Code Cache"); } DCHECK_GE(settings.size_in_bytes(), 0); - partition->GetGeneratedCodeCacheContext()->Initialize( - code_cache_path, settings.size_in_bytes()); + GetGeneratedCodeCacheContext()->Initialize(code_cache_path, + settings.size_in_bytes()); } - - return partition; } base::FilePath StoragePartitionImpl::GetPath() { @@ -955,6 +967,7 @@ } network::mojom::NetworkContext* StoragePartitionImpl::GetNetworkContext() { + DCHECK(initialized_); if (!network_context_.is_bound()) InitNetworkContext(); return network_context_.get(); @@ -962,6 +975,7 @@ scoped_refptr<network::SharedURLLoaderFactory> StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcess() { + DCHECK(initialized_); if (!shared_url_loader_factory_for_browser_process_) { shared_url_loader_factory_for_browser_process_ = new URLLoaderFactoryForBrowserProcess(this, false /* corb_enabled */); @@ -971,6 +985,7 @@ scoped_refptr<network::SharedURLLoaderFactory> StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcessWithCORBEnabled() { + DCHECK(initialized_); if (!shared_url_loader_factory_for_browser_process_with_corb_) { shared_url_loader_factory_for_browser_process_with_corb_ = new URLLoaderFactoryForBrowserProcess(this, true /* corb_enabled */); @@ -980,11 +995,13 @@ std::unique_ptr<network::SharedURLLoaderFactoryInfo> StoragePartitionImpl::GetURLLoaderFactoryForBrowserProcessIOThread() { + DCHECK(initialized_); return url_loader_factory_getter_->GetNetworkFactoryInfo(); } network::mojom::CookieManager* StoragePartitionImpl::GetCookieManagerForBrowserProcess() { + DCHECK(initialized_); // Create the CookieManager as needed. if (!cookie_manager_for_browser_process_ || cookie_manager_for_browser_process_.encountered_error()) { @@ -1001,6 +1018,7 @@ int process_id, int routing_id, network::mojom::RestrictedCookieManagerRequest request) { + DCHECK(initialized_); if (!GetContentClient()->browser()->WillCreateRestrictedCookieManager( role, browser_context_, origin, is_service_worker, process_id, routing_id, &request)) { @@ -1011,69 +1029,85 @@ } storage::QuotaManager* StoragePartitionImpl::GetQuotaManager() { + DCHECK(initialized_); return quota_manager_.get(); } ChromeAppCacheService* StoragePartitionImpl::GetAppCacheService() { + DCHECK(initialized_); return appcache_service_.get(); } BackgroundSyncContextImpl* StoragePartitionImpl::GetBackgroundSyncContext() { + DCHECK(initialized_); return background_sync_context_.get(); } storage::FileSystemContext* StoragePartitionImpl::GetFileSystemContext() { + DCHECK(initialized_); return filesystem_context_.get(); } storage::DatabaseTracker* StoragePartitionImpl::GetDatabaseTracker() { + DCHECK(initialized_); return database_tracker_.get(); } DOMStorageContextWrapper* StoragePartitionImpl::GetDOMStorageContext() { + DCHECK(initialized_); return dom_storage_context_.get(); } IdleManager* StoragePartitionImpl::GetIdleManager() { + DCHECK(initialized_); return idle_manager_.get(); } LockManager* StoragePartitionImpl::GetLockManager() { + DCHECK(initialized_); return lock_manager_.get(); } IndexedDBContextImpl* StoragePartitionImpl::GetIndexedDBContext() { + DCHECK(initialized_); return indexed_db_context_.get(); } NativeFileSystemEntryFactory* StoragePartitionImpl::GetNativeFileSystemEntryFactory() { + DCHECK(initialized_); return native_file_system_manager_.get(); } CacheStorageContextImpl* StoragePartitionImpl::GetCacheStorageContext() { + DCHECK(initialized_); return cache_storage_context_.get(); } ServiceWorkerContextWrapper* StoragePartitionImpl::GetServiceWorkerContext() { + DCHECK(initialized_); return service_worker_context_.get(); } SharedWorkerServiceImpl* StoragePartitionImpl::GetSharedWorkerService() { + DCHECK(initialized_); return shared_worker_service_.get(); } #if !defined(OS_ANDROID) HostZoomMap* StoragePartitionImpl::GetHostZoomMap() { + DCHECK(initialized_); DCHECK(host_zoom_level_context_.get()); return host_zoom_level_context_->GetHostZoomMap(); } HostZoomLevelContext* StoragePartitionImpl::GetHostZoomLevelContext() { + DCHECK(initialized_); return host_zoom_level_context_.get(); } ZoomLevelDelegate* StoragePartitionImpl::GetZoomLevelDelegate() { + DCHECK(initialized_); DCHECK(host_zoom_level_context_.get()); return host_zoom_level_context_->GetZoomLevelDelegate(); } @@ -1081,54 +1115,66 @@ PlatformNotificationContextImpl* StoragePartitionImpl::GetPlatformNotificationContext() { + DCHECK(initialized_); return platform_notification_context_.get(); } BackgroundFetchContext* StoragePartitionImpl::GetBackgroundFetchContext() { + DCHECK(initialized_); return background_fetch_context_.get(); } PaymentAppContextImpl* StoragePartitionImpl::GetPaymentAppContext() { + DCHECK(initialized_); return payment_app_context_.get(); } BroadcastChannelProvider* StoragePartitionImpl::GetBroadcastChannelProvider() { + DCHECK(initialized_); return broadcast_channel_provider_.get(); } BluetoothAllowedDevicesMap* StoragePartitionImpl::GetBluetoothAllowedDevicesMap() { + DCHECK(initialized_); return bluetooth_allowed_devices_map_.get(); } BlobRegistryWrapper* StoragePartitionImpl::GetBlobRegistry() { + DCHECK(initialized_); return blob_registry_.get(); } PrefetchURLLoaderService* StoragePartitionImpl::GetPrefetchURLLoaderService() { + DCHECK(initialized_); return prefetch_url_loader_service_.get(); } CookieStoreContext* StoragePartitionImpl::GetCookieStoreContext() { + DCHECK(initialized_); return cookie_store_context_.get(); } GeneratedCodeCacheContext* StoragePartitionImpl::GetGeneratedCodeCacheContext() { + DCHECK(initialized_); return generated_code_cache_context_.get(); } DevToolsBackgroundServicesContextImpl* StoragePartitionImpl::GetDevToolsBackgroundServicesContext() { + DCHECK(initialized_); return devtools_background_services_context_.get(); } NativeFileSystemManagerImpl* StoragePartitionImpl::GetNativeFileSystemManager() { + DCHECK(initialized_); return native_file_system_manager_.get(); } ContentIndexContextImpl* StoragePartitionImpl::GetContentIndexContext() { + DCHECK(initialized_); return content_index_context_.get(); } @@ -1150,6 +1196,7 @@ void StoragePartitionImpl::OpenLocalStorage( const url::Origin& origin, blink::mojom::StorageAreaRequest request) { + DCHECK(initialized_); int process_id = bindings_.dispatch_context(); // TODO(943887): Replace HasSecurityState() call with something that can // preserve security state after process shutdown. The security state check @@ -1170,6 +1217,7 @@ void StoragePartitionImpl::OpenSessionStorage( const std::string& namespace_id, blink::mojom::SessionStorageNamespaceRequest request) { + DCHECK(initialized_); int process_id = bindings_.dispatch_context(); dom_storage_context_->OpenSessionStorage(process_id, namespace_id, bindings_.GetBadMessageCallback(), @@ -1179,6 +1227,7 @@ void StoragePartitionImpl::OnCanSendReportingReports( const std::vector<url::Origin>& origins, OnCanSendReportingReportsCallback callback) { + DCHECK(initialized_); PermissionController* permission_controller = BrowserContext::GetPermissionController(browser_context_); DCHECK(permission_controller); @@ -1199,6 +1248,7 @@ void StoragePartitionImpl::OnCanSendDomainReliabilityUpload( const GURL& origin, OnCanSendDomainReliabilityUploadCallback callback) { + DCHECK(initialized_); PermissionController* permission_controller = BrowserContext::GetPermissionController(browser_context_); std::move(callback).Run( @@ -1213,6 +1263,7 @@ const std::string& header_value, int load_flags, OnClearSiteDataCallback callback) { + DCHECK(initialized_); auto browser_context_getter = base::BindRepeating( GetBrowserContextFromStoragePartition, weak_factory_.GetWeakPtr()); auto web_contents_getter = base::BindRepeating( @@ -1230,6 +1281,7 @@ const GURL& site_for_cookies, const std::vector<net::CookieWithStatus>& cookie_list) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(initialized_); if (is_service_worker) { base::PostTask(FROM_HERE, {BrowserThread::IO}, base::BindOnce(&OnServiceWorkerCookiesChangedOnIO, @@ -1250,6 +1302,7 @@ const GURL& site_for_cookies, const std::vector<net::CookieWithStatus>& cookie_list) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(initialized_); if (is_service_worker) { base::PostTask( FROM_HERE, {BrowserThread::IO}, @@ -1554,6 +1607,7 @@ uint32_t quota_storage_remove_mask, const GURL& storage_origin) { DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(initialized_); CookieDeletionFilterPtr deletion_filter = CookieDeletionFilter::New(); if (!storage_origin.host().empty()) deletion_filter->host_name = storage_origin.host(); @@ -1568,6 +1622,7 @@ const base::Time begin, const base::Time end, base::OnceClosure callback) { + DCHECK(initialized_); CookieDeletionFilterPtr deletion_filter = CookieDeletionFilter::New(); if (!storage_origin.host().empty()) deletion_filter->host_name = storage_origin.host(); @@ -1587,6 +1642,7 @@ const base::Time begin, const base::Time end, base::OnceClosure callback) { + DCHECK(initialized_); ClearDataImpl(remove_mask, quota_storage_remove_mask, GURL(), origin_matcher, std::move(cookie_deletion_filter), perform_storage_cleanup, begin, end, std::move(callback)); @@ -1597,6 +1653,7 @@ const base::Time end, const base::RepeatingCallback<bool(const GURL&)>& url_matcher, base::OnceClosure callback) { + DCHECK(initialized_); // StoragePartitionCodeCacheDataRemover deletes itself when it is done. StoragePartitionCodeCacheDataRemover::Create(this, url_matcher, begin, end) ->Remove(std::move(callback)); @@ -1604,11 +1661,13 @@ void StoragePartitionImpl::Flush() { DCHECK_CURRENTLY_ON(BrowserThread::UI); + DCHECK(initialized_); if (GetDOMStorageContext()) GetDOMStorageContext()->Flush(); } void StoragePartitionImpl::ResetURLLoaderFactories() { + DCHECK(initialized_); GetNetworkContext()->ResetURLLoaderFactories(); url_loader_factory_for_browser_process_.reset(); url_loader_factory_for_browser_process_with_corb_.reset(); @@ -1616,10 +1675,12 @@ } void StoragePartitionImpl::ClearBluetoothAllowedDevicesMapForTesting() { + DCHECK(initialized_); bluetooth_allowed_devices_map_->Clear(); } void StoragePartitionImpl::FlushNetworkInterfaceForTesting() { + DCHECK(initialized_); DCHECK(network_context_); network_context_.FlushForTesting(); if (url_loader_factory_for_browser_process_) @@ -1633,6 +1694,7 @@ } void StoragePartitionImpl::WaitForDeletionTasksForTesting() { + DCHECK(initialized_); if (deletion_helpers_running_) { base::RunLoop loop; on_deletion_helpers_done_callback_ = loop.QuitClosure(); @@ -1641,6 +1703,7 @@ } void StoragePartitionImpl::WaitForCodeCacheShutdownForTesting() { + DCHECK(initialized_); if (generated_code_cache_context_) { // If this is still running its initialization task it may check // enabled features on a sequenced worker pool which could race @@ -1662,30 +1725,36 @@ mojo::BindingId StoragePartitionImpl::Bind( int process_id, mojo::InterfaceRequest<blink::mojom::StoragePartitionService> request) { + DCHECK(initialized_); return bindings_.AddBinding(this, std::move(request), process_id); } void StoragePartitionImpl::Unbind(mojo::BindingId binding_id) { + DCHECK(initialized_); bindings_.RemoveBinding(binding_id); } void StoragePartitionImpl::OverrideQuotaManagerForTesting( storage::QuotaManager* quota_manager) { + DCHECK(initialized_); quota_manager_ = quota_manager; } void StoragePartitionImpl::OverrideSpecialStoragePolicyForTesting( storage::SpecialStoragePolicy* special_storage_policy) { + DCHECK(initialized_); special_storage_policy_ = special_storage_policy; } void StoragePartitionImpl::ShutdownBackgroundSyncContextForTesting() { + DCHECK(initialized_); if (GetBackgroundSyncContext()) GetBackgroundSyncContext()->Shutdown(); } void StoragePartitionImpl::OverrideBackgroundSyncContextForTesting( BackgroundSyncContextImpl* background_sync_context) { + DCHECK(initialized_); DCHECK(!GetBackgroundSyncContext() || !GetBackgroundSyncContext()->background_sync_manager()); background_sync_context_ = background_sync_context; @@ -1754,6 +1823,7 @@ network::mojom::OriginPolicyManager* StoragePartitionImpl::GetOriginPolicyManagerForBrowserProcess() { + DCHECK(initialized_); if (!origin_policy_manager_for_browser_process_ || origin_policy_manager_for_browser_process_.encountered_error()) { GetNetworkContext()->GetOriginPolicyManager( @@ -1764,12 +1834,14 @@ void StoragePartitionImpl::SetOriginPolicyManagerForBrowserProcessForTesting( network::mojom::OriginPolicyManagerPtr test_origin_policy_manager) { + DCHECK(initialized_); origin_policy_manager_for_browser_process_ = std::move(test_origin_policy_manager); } void StoragePartitionImpl:: ResetOriginPolicyManagerForBrowserProcessForTesting() { + DCHECK(initialized_); origin_policy_manager_for_browser_process_ = nullptr; }
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h index 40df282f6..2ef45ac 100644 --- a/content/browser/storage_partition_impl.h +++ b/content/browser/storage_partition_impl.h
@@ -302,6 +302,8 @@ // If |in_memory| is true, the |relative_partition_path| is (ab)used as a way // of distinguishing different in-memory partitions, but nothing is persisted // on to disk. + // + // Initialize() must be called on the StoragePartitionImpl before using it. static std::unique_ptr<StoragePartitionImpl> Create( BrowserContext* context, bool in_memory, @@ -310,8 +312,18 @@ StoragePartitionImpl(BrowserContext* browser_context, const base::FilePath& partition_path, + bool is_in_memory, + const base::FilePath& relative_partition_path, + const std::string& partition_domain, storage::SpecialStoragePolicy* special_storage_policy); + // This must be called before calling any members of the StoragePartitionImpl + // except for GetPath and browser_context(). + // The purpose of the Create, Initialize sequence is that code that + // initializes members of the StoragePartitionImpl and gets a pointer to it + // can query properties of the StoragePartitionImpl (notably GetPath()). + void Initialize(); + // We will never have both remove_origin be populated and a cookie_matcher. void ClearDataImpl( uint32_t remove_mask, @@ -337,11 +349,24 @@ network::mojom::URLLoaderFactory* GetURLLoaderFactoryForBrowserProcessInternal(bool corb_enabled); - // |is_in_memory_| and |relative_partition_path_| are cached from - // |StoragePartitionImpl::Create()| in order to re-create |NetworkContext|. - bool is_in_memory_; - base::FilePath relative_partition_path_; - base::FilePath partition_path_; + // Raw pointer that should always be valid. The BrowserContext owns the + // StoragePartitionImplMap which then owns StoragePartitionImpl. When the + // BrowserContext is destroyed, |this| will be destroyed too. + BrowserContext* browser_context_; + + const base::FilePath partition_path_; + + // |is_in_memory_|, |relative_partition_path_| and |partition_domain_| are + // cached from |StoragePartitionImpl::Create()| in order to re-create + // |NetworkContext|. + const bool is_in_memory_; + const base::FilePath relative_partition_path_; + const std::string partition_domain_; + + // Until a StoragePartitionImpl is initialized using Initialize(), only + // querying its path abd BrowserContext is allowed. + bool initialized_ = false; + scoped_refptr<URLLoaderFactoryGetter> url_loader_factory_getter_; scoped_refptr<storage::QuotaManager> quota_manager_; scoped_refptr<ChromeAppCacheService> appcache_service_; @@ -410,11 +435,6 @@ network::mojom::OriginPolicyManagerPtr origin_policy_manager_for_browser_process_; - // Raw pointer that should always be valid. The BrowserContext owns the - // StoragePartitionImplMap which then owns StoragePartitionImpl. When the - // BrowserContext is destroyed, |this| will be destroyed too. - BrowserContext* browser_context_; - // See comments for site_for_service_worker(). GURL site_for_service_worker_;
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc index a68b4c5..b11e9dd 100644 --- a/content/browser/storage_partition_impl_map.cc +++ b/content/browser/storage_partition_impl_map.cc
@@ -350,6 +350,7 @@ relative_partition_path, partition_domain)); StoragePartitionImpl* partition = partition_ptr.get(); partitions_[partition_config] = std::move(partition_ptr); + partition->Initialize(); // Arm the serviceworker cookie change observation API. partition->GetCookieStoreContext()->ListenToCookieChanges(
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc index e579ec4..a8cccaa6 100644 --- a/content/browser/utility_process_host.cc +++ b/content/browser/utility_process_host.cc
@@ -416,6 +416,7 @@ #if defined(OS_ANDROID) switches::kEnableReachedCodeProfiler, #endif + switches::kEnableExperimentalWebPlatformFeatures, // These flags are used by the audio service: switches::kAudioBufferSize, switches::kAudioServiceQuitTimeoutMs,
diff --git a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc index 8ebd2f5..e44752d 100644 --- a/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc +++ b/content/browser/webrtc/webrtc_audio_debug_recordings_browsertest.cc
@@ -119,7 +119,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); // We must navigate somewhere first so that the render process is created. - NavigateToURL(shell(), GURL("")); + EXPECT_TRUE(NavigateToURL(shell(), GURL(url::kAboutBlankURL))); // Create a temp directory and setup base file path. base::FilePath temp_dir_path; @@ -133,7 +133,7 @@ // Make a call. GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});"); ExecuteJavascriptAndWaitForOk("hangup();"); @@ -205,7 +205,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); // We must navigate somewhere first so that the render process is created. - NavigateToURL(shell(), GURL("")); + EXPECT_TRUE(NavigateToURL(shell(), GURL(url::kAboutBlankURL))); // Create a temp directory and setup base file path. base::FilePath temp_dir_path; @@ -220,7 +220,7 @@ // Make a call. GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});"); ExecuteJavascriptAndWaitForOk("hangup();"); @@ -254,11 +254,11 @@ ASSERT_TRUE(embedded_test_server()->Start()); // We must navigate somewhere first so that the render process is created. - NavigateToURL(shell(), GURL("")); + EXPECT_TRUE(NavigateToURL(shell(), GURL(""))); // Create a second window. Shell* shell2 = CreateBrowser(); - NavigateToURL(shell2, GURL("")); + EXPECT_TRUE(NavigateToURL(shell2, GURL(""))); // Create a temp directory and setup base file path. base::FilePath temp_dir_path; @@ -272,8 +272,8 @@ // Make the calls. GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); - NavigateToURL(shell(), url); - NavigateToURL(shell2, url); + EXPECT_TRUE(NavigateToURL(shell(), url)); + EXPECT_TRUE(NavigateToURL(shell2, url)); ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});"); std::string result; EXPECT_TRUE(ExecuteScriptAndExtractString(
diff --git a/content/browser/webrtc/webrtc_constraints_browsertest.cc b/content/browser/webrtc/webrtc_constraints_browsertest.cc index 30f8ab0b..1fb7773 100644 --- a/content/browser/webrtc/webrtc_constraints_browsertest.cc +++ b/content/browser/webrtc/webrtc_constraints_browsertest.cc
@@ -74,7 +74,7 @@ user_media().min_frame_rate, user_media().max_frame_rate); DVLOG(1) << "Calling getUserMedia: " << call; - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(call); }
diff --git a/content/browser/webrtc/webrtc_content_browsertest_base.cc b/content/browser/webrtc/webrtc_content_browsertest_base.cc index 61672cc..1fa2f98e 100644 --- a/content/browser/webrtc/webrtc_content_browsertest_base.cc +++ b/content/browser/webrtc/webrtc_content_browsertest_base.cc
@@ -84,7 +84,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL(html_file)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(javascript); }
diff --git a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc index a82d8fc6..11e34a7 100644 --- a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc +++ b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
@@ -89,7 +89,7 @@ GURL url( embedded_test_server()->GetURL("/media/getusermedia-depth-capture.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(base::StringPrintf( "%s({video: true});", kGetDepthStreamAndCallCreateImageBitmap)); @@ -101,7 +101,7 @@ GURL url( embedded_test_server()->GetURL("/media/getusermedia-depth-capture.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", kGetStreamsByVideoKind)); @@ -113,7 +113,7 @@ GURL url( embedded_test_server()->GetURL("/media/getusermedia-depth-capture.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", kGetStreamsByVideoKindNoDepth));
diff --git a/content/browser/webrtc/webrtc_getusermedia_browsertest.cc b/content/browser/webrtc/webrtc_getusermedia_browsertest.cc index 10ab3d4..0f66441 100644 --- a/content/browser/webrtc/webrtc_getusermedia_browsertest.cc +++ b/content/browser/webrtc/webrtc_getusermedia_browsertest.cc
@@ -130,7 +130,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string command = "twoGetUserMedia(" + constraints1 + ',' + constraints2 + ')'; @@ -141,7 +141,7 @@ void GetInputDevices(std::vector<std::string>* audio_ids, std::vector<std::string>* video_ids) { GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string devices_as_json = ExecuteJavascriptAndReturnResult( "getSources()"); @@ -198,7 +198,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", kGetUserMediaAndStop)); @@ -217,7 +217,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", @@ -229,8 +229,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); - + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", @@ -242,7 +241,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", @@ -254,7 +253,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( base::StringPrintf("%s({video: true});", @@ -266,7 +265,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(base::StringPrintf( "%s({video: true, audio: true});", kGetUserMediaAndStop)); @@ -277,7 +276,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getUserMediaAndClone();"); } @@ -288,7 +287,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getUserMediaAndRenderInSeveralVideoTags();"); } @@ -310,7 +309,7 @@ GetInputDevices(&audio_ids, &video_ids); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Test all combinations of mandatory sourceID; for (std::vector<std::string>::const_iterator video_it = video_ids.begin(); @@ -338,7 +337,7 @@ GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); // Test with invalid mandatory audio sourceID. - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_EQ("OverconstrainedError", ExecuteJavascriptAndReturnResult( GenerateGetUserMediaWithMandatorySourceID( @@ -370,7 +369,7 @@ GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); // Test with invalid optional audio sourceID. - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_EQ(kOK, ExecuteJavascriptAndReturnResult( GenerateGetUserMediaWithOptionalSourceID( kGetUserMediaAndStop, @@ -396,7 +395,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk( "twoGetUserMediaAndStop({video: true, audio: true});"); @@ -465,7 +464,7 @@ large_value, large_value, large_value); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); EXPECT_EQ("OverconstrainedError", ExecuteJavascriptAndReturnResult(call)); } @@ -475,7 +474,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Make sure we'll fail creating the audio stream. base::CommandLine::ForCurrentProcess()->AppendSwitch( @@ -495,7 +494,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); int large_value = 99999; const std::string gum_with_impossible_constraints = @@ -535,7 +534,7 @@ std::string constraints_4_3 = GenerateGetUserMediaCall( kGetUserMediaAndAnalyseAndStop, 640, 640, 480, 480, 10, 30); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ASSERT_EQ("w=640:h=480", ExecuteJavascriptAndReturnResult(constraints_4_3)); } @@ -551,7 +550,7 @@ std::string constraints_16_9 = GenerateGetUserMediaCall( kGetUserMediaAndAnalyseAndStop, 640, 640, 360, 360, 10, 30); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ASSERT_EQ("w=640:h=360", ExecuteJavascriptAndReturnResult(constraints_16_9)); } @@ -566,7 +565,7 @@ std::string constraints_1_1 = GenerateGetUserMediaCall( kGetUserMediaAndAnalyseAndStop, 320, 320, 320, 320, 10, 30); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ASSERT_EQ("w=320:h=320", ExecuteJavascriptAndReturnResult(constraints_1_1)); } @@ -579,7 +578,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string call = "getUserMediaInIframeAndCloseInSuccessCb({audio: true});"; @@ -592,7 +591,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string call = "getUserMediaInIframeAndCloseInSuccessCb({video: true});"; @@ -616,7 +615,7 @@ large_value, large_value, large_value); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(call); } @@ -630,7 +629,7 @@ std::string call = GenerateGetUserMediaWithMandatorySourceID( "getUserMediaInIframeAndCloseInFailureCb", "invalid", "invalid"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk(call); } @@ -642,7 +641,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); MediaStreamManager* manager = BrowserMainLoop::GetInstance()->media_stream_manager(); @@ -666,7 +665,7 @@ IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, GetAudioSettingsDefault) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getAudioSettingsDefault()"); } @@ -674,7 +673,7 @@ GetAudioSettingsNoEchoCancellation) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getAudioSettingsNoEchoCancellation()"); } @@ -682,14 +681,14 @@ GetAudioSettingsDeviceId) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getAudioSettingsDeviceId()"); } IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, SrcObjectAddVideoTrack) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("srcObjectAddVideoTrack()"); } @@ -698,7 +697,7 @@ DISABLED_SrcObjectReplaceInactiveTracks) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("srcObjectReplaceInactiveTracks()"); } @@ -707,7 +706,7 @@ DISABLED_SrcObjectRemoveVideoTrack) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("srcObjectRemoveVideoTrack()"); } @@ -716,7 +715,7 @@ DISABLED_SrcObjectRemoveFirstOfTwoVideoTracks) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("srcObjectRemoveFirstOfTwoVideoTracks()"); } @@ -728,14 +727,14 @@ SrcObjectReassignSameObject) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("srcObjectReassignSameObject()"); } IN_PROC_BROWSER_TEST_P(WebRtcGetUserMediaBrowserTest, ApplyConstraintsVideo) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("applyConstraintsVideo()"); } @@ -743,7 +742,7 @@ ApplyConstraintsVideoTwoStreams) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("applyConstraintsVideoTwoStreams()"); } @@ -751,7 +750,7 @@ ApplyConstraintsVideoOverconstrained) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("applyConstraintsVideoOverconstrained()"); } @@ -766,7 +765,7 @@ MAYBE_ApplyConstraintsNonDevice) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("applyConstraintsNonDevice()"); } @@ -774,7 +773,7 @@ ConcurrentGetUserMediaStop) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("concurrentGetUserMediaStop()"); } @@ -782,7 +781,7 @@ GetUserMediaAfterStopElementCapture) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getUserMediaAfterStopCanvasCapture()"); } @@ -790,7 +789,7 @@ GetUserMediaEchoCancellationOnAndOff) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getUserMediaEchoCancellationOnAndOff()"); } @@ -804,7 +803,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Expect stream to initially not be muted media::FakeAudioInputStream::SetGlobalMutedState(false); @@ -833,7 +832,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Expect stream to initially be muted media::FakeAudioInputStream::SetGlobalMutedState(true); @@ -862,7 +861,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("setUpForAudioServiceCrash()"); @@ -887,7 +886,7 @@ MAYBE_GetUserMediaCloneAndApplyConstraints) { ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/getusermedia.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ExecuteJavascriptAndWaitForOk("getUserMediaCloneAndApplyConstraints()"); }
diff --git a/content/browser/webrtc/webrtc_image_capture_browsertest.cc b/content/browser/webrtc/webrtc_image_capture_browsertest.cc index 1946783..2dc1aee 100644 --- a/content/browser/webrtc/webrtc_image_capture_browsertest.cc +++ b/content/browser/webrtc/webrtc_image_capture_browsertest.cc
@@ -118,7 +118,7 @@ #endif GURL url(embedded_test_server()->GetURL(kImageCaptureHtmlFile)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); if (!IsWebcamAvailableOnSystem(shell()->web_contents())) { DVLOG(1) << "No video device; skipping test...";
diff --git a/content/browser/webrtc/webrtc_internals_browsertest.cc b/content/browser/webrtc/webrtc_internals_browsertest.cc index a8d2d8ae..d4bd38f0 100644 --- a/content/browser/webrtc/webrtc_internals_browsertest.cc +++ b/content/browser/webrtc/webrtc_internals_browsertest.cc
@@ -503,7 +503,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, AddAndRemovePeerConnection) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Add two PeerConnections and then remove them. PeerConnectionEntry pc_1(1, 0); @@ -525,7 +525,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, UpdateAllPeerConnections) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc_0(1, 0); pc_0.AddEvent("e1", "v1"); @@ -542,7 +542,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, UpdatePeerConnection) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); // Add one PeerConnection and send one update. PeerConnectionEntry pc_1(1, 0); @@ -579,7 +579,7 @@ // Tests that adding random named stats updates the dataSeries and graphs. IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, AddStats) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc(1, 0); ExecuteAddPeerConnectionJs(pc); @@ -605,7 +605,7 @@ // Tests that the bandwidth estimation values are drawn on a single graph. IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, BweCompoundGraph) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc(1, 0); ExecuteAddPeerConnectionJs(pc); @@ -645,7 +645,7 @@ // and the converted data is drawn. IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, ConvertedGraphs) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc(1, 0); ExecuteAddPeerConnectionJs(pc); @@ -690,14 +690,14 @@ // Start a peerconnection call in the first window. ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); ASSERT_TRUE(ExecuteJavascript("call({video:true});")); ExpectTitle("OK"); // Open webrtc-internals in the second window. GURL url2("chrome://webrtc-internals"); Shell* shell2 = CreateBrowser(); - NavigateToURL(shell2, url2); + EXPECT_TRUE(NavigateToURL(shell2, url2)); const int NUMBER_OF_PEER_CONNECTIONS = 2; @@ -770,7 +770,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, CreatePageDump) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc_0(1, 0); pc_0.AddEvent("e1", "v1"); @@ -815,7 +815,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, UpdateGetUserMedia) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); UserMediaRequestEntry request1(1, 1, "origin", "ac", "vc"); UserMediaRequestEntry request2(2, 2, "origin2", "ac2", "vc2"); @@ -841,7 +841,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcInternalsBrowserTest, ReceivedPropagationDelta) { GURL url("chrome://webrtc-internals"); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); PeerConnectionEntry pc(1, 0); ExecuteAddPeerConnectionJs(pc);
diff --git a/content/browser/webrtc/webrtc_stress_image_capture_browsertest.cc b/content/browser/webrtc/webrtc_stress_image_capture_browsertest.cc index 4f9c57a..526f30ff 100644 --- a/content/browser/webrtc/webrtc_stress_image_capture_browsertest.cc +++ b/content/browser/webrtc/webrtc_stress_image_capture_browsertest.cc
@@ -73,7 +73,7 @@ // skipped or it works as intended, or false otherwise. virtual bool RunImageCaptureTestCase(const std::string& command) { GURL url(embedded_test_server()->GetURL(kImageCaptureStressHtmlFile)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); if (!IsWebcamAvailableOnSystem(shell()->web_contents())) { LOG(WARNING) << "No video device; skipping test...";
diff --git a/content/browser/webrtc/webrtc_video_capture_browsertest.cc b/content/browser/webrtc/webrtc_video_capture_browsertest.cc index e2ad80c..b2d1d15 100644 --- a/content/browser/webrtc/webrtc_video_capture_browsertest.cc +++ b/content/browser/webrtc/webrtc_video_capture_browsertest.cc
@@ -69,7 +69,7 @@ return; GURL url(embedded_test_server()->GetURL(kVideoCaptureHtmlFile)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string result; // Start video capture and wait until it started rendering
diff --git a/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc b/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc index 72d7d4f..3f3ab1d 100644 --- a/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc +++ b/content/browser/webrtc/webrtc_video_capture_service_browsertest.cc
@@ -471,7 +471,7 @@ DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); embedded_test_server()->StartAcceptingConnections(); GURL url(embedded_test_server()->GetURL(kVideoCaptureHtmlFile)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); std::string javascript_to_execute = base::StringPrintf( kStartVideoCaptureAndVerify, video_size_.width(), video_size_.height());
diff --git a/content/browser/webrtc/webrtc_video_capture_service_enumeration_browsertest.cc b/content/browser/webrtc/webrtc_video_capture_service_enumeration_browsertest.cc index aa96d37..fa160bf6 100644 --- a/content/browser/webrtc/webrtc_video_capture_service_enumeration_browsertest.cc +++ b/content/browser/webrtc/webrtc_video_capture_service_enumeration_browsertest.cc
@@ -212,8 +212,8 @@ ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); embedded_test_server()->StartAcceptingConnections(); - NavigateToURL(shell(), - GURL(embedded_test_server()->GetURL(kVideoCaptureHtmlFile))); + EXPECT_TRUE(NavigateToURL( + shell(), GURL(embedded_test_server()->GetURL(kVideoCaptureHtmlFile)))); } std::map<std::string, video_capture::mojom::TextureVirtualDevicePtr>
diff --git a/content/browser/webrtc/webrtc_video_capture_shared_device_browsertest.cc b/content/browser/webrtc/webrtc_video_capture_shared_device_browsertest.cc index 5b5ae1c4..467a2b3 100644 --- a/content/browser/webrtc/webrtc_video_capture_shared_device_browsertest.cc +++ b/content/browser/webrtc/webrtc_video_capture_shared_device_browsertest.cc
@@ -99,7 +99,7 @@ DCHECK(main_task_runner_->RunsTasksInCurrentSequence()); embedded_test_server()->StartAcceptingConnections(); GURL url(embedded_test_server()->GetURL(kVideoCaptureHtmlFile)); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); const std::string javascript_to_execute = base::StringPrintf( kStartVideoCaptureAndVerify, kVideoSize.width(), kVideoSize.height());
diff --git a/content/browser/webrtc/webrtc_webcam_browsertest.cc b/content/browser/webrtc/webrtc_webcam_browsertest.cc index 353cc98..f9c31b6c 100644 --- a/content/browser/webrtc/webrtc_webcam_browsertest.cc +++ b/content/browser/webrtc/webrtc_webcam_browsertest.cc
@@ -72,7 +72,7 @@ ASSERT_TRUE(embedded_test_server()->Start()); GURL url(embedded_test_server()->GetURL( "/media/getusermedia-real-webcam.html")); - NavigateToURL(shell(), url); + EXPECT_TRUE(NavigateToURL(shell(), url)); if (!IsWebcamAvailableOnSystem(shell()->web_contents())) { DVLOG(0) << "No video device; skipping test...";
diff --git a/content/browser/webui/web_ui_data_source_impl.cc b/content/browser/webui/web_ui_data_source_impl.cc index 1cd6992..7606238 100644 --- a/content/browser/webui/web_ui_data_source_impl.cc +++ b/content/browser/webui/web_ui_data_source_impl.cc
@@ -97,6 +97,9 @@ return parent_->deny_xframe_options_; } bool ShouldServeMimeTypeAsContentTypeHeader() override { return true; } + bool ShouldReplaceI18nInJS() override { + return parent_->ShouldReplaceI18nInJS(); + } private: WebUIDataSourceImpl* parent_; @@ -113,7 +116,8 @@ frame_src_set_(false), deny_xframe_options_(true), add_load_time_data_defaults_(true), - replace_existing_source_(true) {} + replace_existing_source_(true), + should_replace_i18n_in_js_(false) {} WebUIDataSourceImpl::~WebUIDataSourceImpl() { } @@ -215,6 +219,10 @@ deny_xframe_options_ = false; } +void WebUIDataSourceImpl::EnableReplaceI18nInJS() { + should_replace_i18n_in_js_ = true; +} + const ui::TemplateReplacements* WebUIDataSourceImpl::GetReplacements() const { return &replacements_; } @@ -297,6 +305,10 @@ return &localized_strings_; } +bool WebUIDataSourceImpl::ShouldReplaceI18nInJS() const { + return should_replace_i18n_in_js_; +} + int WebUIDataSourceImpl::PathToIdrOrDefault(const std::string& path) const { auto it = path_to_idr_map_.find(path); return it == path_to_idr_map_.end() ? default_resource_ : it->second;
diff --git a/content/browser/webui/web_ui_data_source_impl.h b/content/browser/webui/web_ui_data_source_impl.h index 5038f82..f6281fb 100644 --- a/content/browser/webui/web_ui_data_source_impl.h +++ b/content/browser/webui/web_ui_data_source_impl.h
@@ -50,6 +50,7 @@ void OverrideContentSecurityPolicyObjectSrc(const std::string& data) override; void OverrideContentSecurityPolicyChildSrc(const std::string& data) override; void DisableDenyXFrameOptions() override; + void EnableReplaceI18nInJS() override; std::string GetSource() override; // URLDataSourceImpl: @@ -91,6 +92,8 @@ add_load_time_data_defaults_ = false; } + bool ShouldReplaceI18nInJS() const; + // The name of this source. // E.g., for favicons, this could be "favicon", which results in paths for // specific resources like "favicon/34" getting sent to this source. @@ -119,6 +122,7 @@ bool deny_xframe_options_; bool add_load_time_data_defaults_; bool replace_existing_source_; + bool should_replace_i18n_in_js_; DISALLOW_COPY_AND_ASSIGN(WebUIDataSourceImpl); };
diff --git a/content/browser/webui/web_ui_url_loader_factory.cc b/content/browser/webui/web_ui_url_loader_factory.cc index 0ba5cf0..58787a5 100644 --- a/content/browser/webui/web_ui_url_loader_factory.cc +++ b/content/browser/webui/web_ui_url_loader_factory.cc
@@ -55,6 +55,7 @@ void ReadData(scoped_refptr<network::ResourceResponse> headers, const ui::TemplateReplacements* replacements, + bool replace_in_js, scoped_refptr<URLDataSourceImpl> data_source, network::mojom::URLLoaderClientPtrInfo client_info, scoped_refptr<base::RefCountedMemory> bytes) { @@ -72,7 +73,13 @@ // use an intermediate string. base::StringPiece input(reinterpret_cast<const char*>(bytes->front()), bytes->size()); - std::string temp_str = ui::ReplaceTemplateExpressions(input, *replacements); + std::string temp_str; + if (replace_in_js) { + CHECK( + ui::ReplaceTemplateExpressionsInJS(input, *replacements, &temp_str)); + } else { + temp_str = ui::ReplaceTemplateExpressions(input, *replacements); + } bytes = base::RefCountedString::TakeString(&temp_str); } @@ -101,6 +108,7 @@ void DataAvailable(scoped_refptr<network::ResourceResponse> headers, const ui::TemplateReplacements* replacements, + bool replace_in_js, scoped_refptr<URLDataSourceImpl> source, network::mojom::URLLoaderClientPtrInfo client_info, scoped_refptr<base::RefCountedMemory> bytes) { @@ -111,8 +119,8 @@ {base::ThreadPool(), base::TaskPriority::USER_BLOCKING, base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN}) ->PostTask(FROM_HERE, - base::BindOnce(ReadData, headers, replacements, source, - std::move(client_info), bytes)); + base::BindOnce(ReadData, headers, replacements, replace_in_js, + source, std::move(client_info), bytes)); } void StartURLLoader(const network::ResourceRequest& request, @@ -158,14 +166,19 @@ WebContents::Getter wc_getter = base::Bind(WebContents::FromFrameTreeNodeId, frame_tree_node_id); + bool replace_in_js = + source->source()->ShouldReplaceI18nInJS() && + source->source()->GetMimeType(path) == "application/javascript"; + const ui::TemplateReplacements* replacements = nullptr; - if (source->source()->GetMimeType(path) == "text/html") + if (source->source()->GetMimeType(path) == "text/html" || replace_in_js) replacements = source->GetReplacements(); + // To keep the same behavior as the old WebUI code, we call the source to get // the value for |replacements| on the IO thread. Since |replacements| is // owned by |source| keep a reference to it in the callback. auto data_available_callback = - base::Bind(DataAvailable, resource_response, replacements, + base::Bind(DataAvailable, resource_response, replacements, replace_in_js, base::RetainedRef(source), base::Passed(&client_info)); // TODO(jam): once we only have this code path for WebUI, and not the
diff --git a/content/browser/worker_host/dedicated_worker_host.cc b/content/browser/worker_host/dedicated_worker_host.cc index 3f5f28c..a73808b 100644 --- a/content/browser/worker_host/dedicated_worker_host.cc +++ b/content/browser/worker_host/dedicated_worker_host.cc
@@ -41,9 +41,8 @@ RegisterMojoInterfaces(); } -DedicatedWorkerHost::~DedicatedWorkerHost() {} +DedicatedWorkerHost::~DedicatedWorkerHost() = default; -// service_manager::mojom::InterfaceProvider: void DedicatedWorkerHost::GetInterface( const std::string& interface_name, mojo::ScopedMessagePipeHandle interface_pipe) { @@ -68,7 +67,6 @@ broker_receiver_.Bind(std::move(receiver)); } - // PlzDedicatedWorker: void DedicatedWorkerHost::StartScriptLoad( const GURL& script_url, const url::Origin& request_initiator_origin, @@ -169,21 +167,6 @@ &DedicatedWorkerHost::CreateIdleManager, base::Unretained(this))); } - // Called from WorkerScriptFetchInitiator. Continues starting the dedicated - // worker in the renderer process. - // - // |main_script_load_params| is sent to the renderer process and to be used to - // load the dedicated worker main script pre-requested by the browser process. - // - // |subresource_loader_factories| is sent to the renderer process and is to be - // used to request subresources where applicable. For example, this allows the - // dedicated worker to load chrome-extension:// URLs which the renderer's - // default loader factory can't load. - // - // NetworkService (PlzWorker): - // |controller| contains information about the service worker controller. Once - // a ServiceWorker object about the controller is prepared, it is registered - // to |controller_service_worker_object_host|. void DedicatedWorkerHost::DidStartScriptLoad( std::unique_ptr<blink::URLLoaderFactoryBundleInfo> subresource_loader_factories, @@ -319,7 +302,6 @@ ->CreateService(std::move(request)); } -// May return a nullptr. RenderFrameHostImpl* DedicatedWorkerHost::GetAncestorRenderFrameHost() { // Use |worker_process_id_| as the ancestor render frame's process ID as the // frame surely lives in the same process for dedicated workers.
diff --git a/content/browser/worker_host/dedicated_worker_host.h b/content/browser/worker_host/dedicated_worker_host.h index f97635b..cb1bdd5 100644 --- a/content/browser/worker_host/dedicated_worker_host.h +++ b/content/browser/worker_host/dedicated_worker_host.h
@@ -37,7 +37,8 @@ // A host for a single dedicated worker. Its lifetime is managed by the // DedicatedWorkerGlobalScope of the corresponding worker in the renderer via a // StrongBinding. This lives on the UI thread. -class DedicatedWorkerHost : public service_manager::mojom::InterfaceProvider { +class DedicatedWorkerHost final + : public service_manager::mojom::InterfaceProvider { public: DedicatedWorkerHost(int worker_process_id, int ancestor_render_frame_id, @@ -81,7 +82,6 @@ // dedicated worker to load chrome-extension:// URLs which the renderer's // default loader factory can't load. // - // NetworkService (PlzWorker): // |controller| contains information about the service worker controller. Once // a ServiceWorker object about the controller is prepared, it is registered // to |controller_service_worker_object_host|. @@ -109,6 +109,7 @@ // May return a nullptr. RenderFrameHostImpl* GetAncestorRenderFrameHost(); + // The ID of the render process host that hosts this worker. const int worker_process_id_;
diff --git a/content/browser/worker_host/shared_worker_service_impl.cc b/content/browser/worker_host/shared_worker_service_impl.cc index 195875f..17224009 100644 --- a/content/browser/worker_host/shared_worker_service_impl.cc +++ b/content/browser/worker_host/shared_worker_service_impl.cc
@@ -237,12 +237,15 @@ // credentials mode specified by WorkerOptions for module script. const auto credentials_mode = network::mojom::CredentialsMode::kSameOrigin; - // TODO(crbug.com/955476): Populate the network isolation key based - // on script origin here and add test coverage. + RenderFrameHostImpl* render_frame_host = + RenderFrameHostImpl::FromID(weak_host->worker_process_id(), frame_id); + url::Origin origin(render_frame_host->frame_tree_node()->current_origin()); + WorkerScriptFetchInitiator::Start( weak_host->worker_process_id(), weak_host->instance()->url(), - weak_host->instance()->constructor_origin(), net::NetworkIsolationKey(), - credentials_mode, std::move(outside_fetch_client_settings_object), + weak_host->instance()->constructor_origin(), + net::NetworkIsolationKey(origin, origin), credentials_mode, + std::move(outside_fetch_client_settings_object), ResourceType::kSharedWorker, service_worker_context_, service_worker_handle_raw, appcache_handle_core, std::move(blob_url_loader_factory), url_loader_factory_override_,
diff --git a/content/browser/worker_network_isolation_key_browsertest.cc b/content/browser/worker_network_isolation_key_browsertest.cc index 55bc6e9..a1c5ffa 100644 --- a/content/browser/worker_network_isolation_key_browsertest.cc +++ b/content/browser/worker_network_isolation_key_browsertest.cc
@@ -358,4 +358,84 @@ ServiceWorkerMainScriptRequestNetworkIsolationKeyBrowserTest, testing::Bool()); +using SharedWorkerMainScriptRequestNetworkIsolationKeyBrowserTest = + ServiceWorkerMainScriptRequestNetworkIsolationKeyBrowserTest; + +// Test that network isolation key is filled in correctly for shared worker's +// main script request. The test navigates to "a.com" and creates an iframe +// having origin "c.com" that creates |worker1|. The test then navigates to +// "b.com" and creates an iframe also having origin "c.com" that creates +// |worker1| again. +// +// We expect the second creation request for |worker1| to exist in the cache. +// +// Note that it's sufficient not to test the cache miss when subframe origins +// are different as in that case the two script urls must be different. +IN_PROC_BROWSER_TEST_P( + SharedWorkerMainScriptRequestNetworkIsolationKeyBrowserTest, + SharedWorkerMainScriptRequest) { + if (!SupportsSharedWorker()) + return; + + // Discard the old process to clear the in-memory cache. + CrossProcessNavigation(); + + net::EmbeddedTestServer subframe_server; + subframe_server.ServeFilesFromSourceDirectory(GetTestDataFilePath()); + ASSERT_TRUE(subframe_server.Start()); + + net::EmbeddedTestServer new_tab_server; + new_tab_server.ServeFilesFromSourceDirectory(GetTestDataFilePath()); + ASSERT_TRUE(new_tab_server.Start()); + + size_t num_completed = 0; + std::string main_script_file = "empty.js"; + GURL main_script_request_url = + subframe_server.GetURL("/workers/" + main_script_file); + + base::RunLoop cache_status_waiter; + URLLoaderInterceptor interceptor( + base::BindLambdaForTesting( + [&](URLLoaderInterceptor::RequestParams* params) { return false; }), + base::BindLambdaForTesting( + [&](const GURL& request_url, + const network::URLLoaderCompletionStatus& status) { + if (request_url == main_script_request_url) { + num_completed += 1; + if (num_completed == 1) { + EXPECT_FALSE(status.exists_in_cache); + } else if (num_completed == 2) { + EXPECT_TRUE(status.exists_in_cache); + cache_status_waiter.Quit(); + } else { + NOTREACHED(); + } + } + }), + {}); + + // Navigate to "a.com" and create the iframe "c.com", which creates |worker1|. + NavigateToURLBlockUntilNavigationsComplete( + shell(), embedded_test_server()->GetURL("/workers/frame_factory.html"), + 1); + RenderFrameHost* subframe_rfh_1 = CreateSubframe( + subframe_server.GetURL("/workers/service_worker_setup.html")); + RegisterWorker(subframe_rfh_1, WorkerType::kSharedWorker, "empty.js"); + + // Navigate to "b.com" and create the another iframe on "c.com", which creates + // |worker1| again. + NavigateToURLBlockUntilNavigationsComplete( + shell(), new_tab_server.GetURL("/workers/frame_factory.html"), 1); + RenderFrameHost* subframe_rfh_2 = CreateSubframe( + subframe_server.GetURL("/workers/service_worker_setup.html")); + RegisterWorker(subframe_rfh_2, WorkerType::kSharedWorker, "empty.js"); + + cache_status_waiter.Run(); +} + +INSTANTIATE_TEST_SUITE_P( + /* no prefix */, + SharedWorkerMainScriptRequestNetworkIsolationKeyBrowserTest, + testing::Bool()); + } // namespace content
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc index acf0685..a9f8282e 100644 --- a/content/child/blink_platform_impl.cc +++ b/content/child/blink_platform_impl.cc
@@ -436,18 +436,6 @@ // Not limited to Linux since it's used for mobile layouts in inspector. {"linux.css", IDR_UASTYLE_THEME_CHROMIUM_LINUX_CSS, ui::SCALE_FACTOR_NONE, true}, - {"input_multiple_fields.css", IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS, - ui::SCALE_FACTOR_NONE, true}, -#if defined(OS_MACOSX) - {"mac.css", IDR_UASTYLE_THEME_MAC_CSS, ui::SCALE_FACTOR_NONE, true}, -#endif - {"win.css", IDR_UASTYLE_THEME_WIN_CSS, ui::SCALE_FACTOR_NONE, true}, - {"win_quirks.css", IDR_UASTYLE_THEME_WIN_QUIRKS_CSS, ui::SCALE_FACTOR_NONE, - true}, - {"controls_refresh.css", IDR_UASTYLE_THEME_CONTROLS_REFRESH_CSS, - ui::SCALE_FACTOR_NONE, true}, - {"forced_colors.css", IDR_UASTYLE_THEME_FORCED_COLORS_CSS, - ui::SCALE_FACTOR_NONE, true}, #if defined(ENABLE_TOUCHLESS_UASTYLE_THEME) {"touchless.css", IDR_UASTYLE_THEME_TOUCHLESS_CSS, ui::SCALE_FACTOR_NONE, true},
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 9cc7f0c..567de30 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -18,6 +18,7 @@ #include "content/public/common/content_switches.h" #include "gpu/config/gpu_switches.h" #include "media/base/media_switches.h" +#include "net/base/features.h" #include "services/device/public/cpp/device_features.h" #include "services/network/public/cpp/features.h" #include "third_party/blink/public/common/features.h" @@ -548,6 +549,17 @@ WebRuntimeFeatures::EnableBackForwardCache( base::FeatureList::IsEnabled(features::kBackForwardCache)); + + if (base::FeatureList::IsEnabled(features::kCookieDeprecationMessages)) + WebRuntimeFeatures::EnableCookieDeprecationMessages(true); + + if (base::FeatureList::IsEnabled(net::features::kSameSiteByDefaultCookies)) + WebRuntimeFeatures::EnableSameSiteByDefaultCookies(true); + + if (base::FeatureList::IsEnabled( + net::features::kCookiesWithoutSameSiteMustBeSecure)) { + WebRuntimeFeatures::EnableCookiesWithoutSameSiteMustBeSecure(true); + } } } // namespace
diff --git a/content/common/content_param_traits.cc b/content/common/content_param_traits.cc index 8ac05ba..7a5c824a 100644 --- a/content/common/content_param_traits.cc +++ b/content/common/content_param_traits.cc
@@ -187,45 +187,6 @@ void ParamTraits<ui::AXMode>::Log(const param_type& p, std::string* l) {} -void ParamTraits<scoped_refptr<storage::BlobHandle>>::Write( - base::Pickle* m, - const param_type& p) { - WriteParam(m, p != nullptr); - if (p) { - auto info = p->Clone().PassInterface(); - m->WriteUInt32(info.version()); - MojoMessageHelper::WriteMessagePipeTo(m, info.PassHandle()); - } -} - -bool ParamTraits<scoped_refptr<storage::BlobHandle>>::Read( - const base::Pickle* m, - base::PickleIterator* iter, - param_type* r) { - bool is_not_null; - if (!ReadParam(m, iter, &is_not_null)) - return false; - if (!is_not_null) - return true; - - uint32_t version; - if (!ReadParam(m, iter, &version)) - return false; - mojo::ScopedMessagePipeHandle handle; - if (!MojoMessageHelper::ReadMessagePipeFrom(m, iter, &handle)) - return false; - DCHECK(handle.is_valid()); - blink::mojom::BlobPtr blob; - blob.Bind(blink::mojom::BlobPtrInfo(std::move(handle), version)); - *r = base::MakeRefCounted<storage::BlobHandle>(std::move(blob)); - return true; -} - -void ParamTraits<scoped_refptr<storage::BlobHandle>>::Log(const param_type& p, - std::string* l) { - l->append("<storage::BlobHandle>"); -} - // static void ParamTraits<content::FrameMsg_ViewChanged_Params>::Write( base::Pickle* m,
diff --git a/content/common/content_param_traits.h b/content/common/content_param_traits.h index cc59887e..29ebdf6 100644 --- a/content/common/content_param_traits.h +++ b/content/common/content_param_traits.h
@@ -14,11 +14,11 @@ #ifndef CONTENT_COMMON_CONTENT_PARAM_TRAITS_H_ #define CONTENT_COMMON_CONTENT_PARAM_TRAITS_H_ +#include "base/memory/ref_counted.h" #include "content/common/content_param_traits_macros.h" #include "content/common/cursors/webcursor.h" #include "ipc/ipc_mojo_param_traits.h" #include "net/base/hash_value.h" -#include "storage/common/blob_storage/blob_handle.h" #include "third_party/blink/public/platform/web_input_event.h" #include "ui/accessibility/ax_mode.h" @@ -96,16 +96,6 @@ }; template <> -struct CONTENT_EXPORT ParamTraits<scoped_refptr<storage::BlobHandle>> { - typedef scoped_refptr<storage::BlobHandle> param_type; - static void Write(base::Pickle* m, const param_type& p); - static bool Read(const base::Pickle* m, - base::PickleIterator* iter, - param_type* r); - static void Log(const param_type& p, std::string* l); -}; - -template <> struct CONTENT_EXPORT ParamTraits< scoped_refptr<base::RefCountedData<blink::TransferableMessage>>> { typedef scoped_refptr<base::RefCountedData<blink::TransferableMessage>>
diff --git a/content/common/pepper_file_util.cc b/content/common/pepper_file_util.cc index 4e5df94..db18f03d 100644 --- a/content/common/pepper_file_util.cc +++ b/content/common/pepper_file_util.cc
@@ -7,20 +7,6 @@ namespace content { -storage::FileSystemType PepperFileSystemTypeToFileSystemType( - PP_FileSystemType type) { - switch (type) { - case PP_FILESYSTEMTYPE_LOCALTEMPORARY: - return storage::kFileSystemTypeTemporary; - case PP_FILESYSTEMTYPE_LOCALPERSISTENT: - return storage::kFileSystemTypePersistent; - case PP_FILESYSTEMTYPE_EXTERNAL: - return storage::kFileSystemTypeExternal; - default: - return storage::kFileSystemTypeUnknown; - } -} - int IntegerFromSyncSocketHandle( const base::SyncSocket::Handle& socket_handle) { return ppapi::PlatformFileToInt(socket_handle);
diff --git a/content/common/pepper_file_util.h b/content/common/pepper_file_util.h index bded20a..ee50b3c 100644 --- a/content/common/pepper_file_util.h +++ b/content/common/pepper_file_util.h
@@ -9,7 +9,6 @@ #include "base/sync_socket.h" #include "ppapi/buildflags/buildflags.h" #include "ppapi/c/pp_file_info.h" -#include "storage/common/fileapi/file_system_types.h" #if !BUILDFLAG(ENABLE_PLUGINS) #error "Plugins should be enabled" @@ -17,9 +16,6 @@ namespace content { -storage::FileSystemType PepperFileSystemTypeToFileSystemType( - PP_FileSystemType type); - int IntegerFromSyncSocketHandle( const base::SyncSocket::Handle& socket_handle);
diff --git a/content/public/browser/content_index_provider.h b/content/public/browser/content_index_provider.h index 0504e1e..3d5a793 100644 --- a/content/public/browser/content_index_provider.h +++ b/content/public/browser/content_index_provider.h
@@ -6,6 +6,7 @@ #define CONTENT_PUBLIC_BROWSER_CONTENT_INDEX_PROVIDER_H_ #include <string> +#include <vector> #include "base/callback_forward.h" #include "base/macros.h" @@ -13,6 +14,7 @@ #include "base/time/time.h" #include "content/common/content_export.h" #include "third_party/blink/public/mojom/content_index/content_index.mojom.h" +#include "ui/gfx/geometry/size.h" #include "url/gurl.h" namespace url { @@ -49,6 +51,10 @@ ContentIndexProvider(); virtual ~ContentIndexProvider(); + // Returns the number of icons needed and their ideal sizes (in pixels). + virtual std::vector<gfx::Size> GetIconSizes( + blink::mojom::ContentCategory category) = 0; + // Called when a new entry is registered. Must be called on the UI thread. virtual void OnContentAdded(ContentIndexEntry entry) = 0;
diff --git a/content/public/browser/render_process_host.h b/content/public/browser/render_process_host.h index ae7e5b3c..5ec999b5 100644 --- a/content/public/browser/render_process_host.h +++ b/content/public/browser/render_process_host.h
@@ -29,6 +29,7 @@ #include "services/network/public/mojom/network_context.mojom-forward.h" #include "services/network/public/mojom/url_loader_factory.mojom-forward.h" #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom-forward.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom-forward.h" #include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom-forward.h" #include "ui/gfx/native_widget_types.h" @@ -476,6 +477,13 @@ virtual void BindCacheStorage(blink::mojom::CacheStorageRequest request, const url::Origin& origin) = 0; + // Binds |request| to the FileSystemManager instance. The binding is + // sent to the IO thread. This is for internal use only, and is only exposed + // here to support MockRenderProcessHost usage in tests. + virtual void BindFileSystemManager( + const url::Origin& origin, + mojo::PendingReceiver<blink::mojom::FileSystemManager> receiver) = 0; + // Binds |request| to the IndexedDBDispatcherHost instance. The binding is // sent to the IO thread. This is for internal use only, and is only exposed // here to support MockRenderProcessHost usage in tests.
diff --git a/content/public/browser/url_data_source.cc b/content/public/browser/url_data_source.cc index 696bee3..8a7bcece 100644 --- a/content/public/browser/url_data_source.cc +++ b/content/public/browser/url_data_source.cc
@@ -116,4 +116,8 @@ void URLDataSource::DisablePolymer2ForHost(const std::string& host) {} +bool URLDataSource::ShouldReplaceI18nInJS() { + return false; +} + } // namespace content
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h index e6f7041..2c7c507 100644 --- a/content/public/browser/url_data_source.h +++ b/content/public/browser/url_data_source.h
@@ -167,6 +167,10 @@ // TODO (rbpotter): Remove this function when the OOBE page Polymer 2 // migration is complete. virtual void DisablePolymer2ForHost(const std::string& host); + + // Whether i18n template expression replacement should be allowed in HTML + // templates within JS files. + virtual bool ShouldReplaceI18nInJS(); }; } // namespace content
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc index 7657acf..e63e6888 100644 --- a/content/public/browser/web_contents_delegate.cc +++ b/content/public/browser/web_contents_delegate.cc
@@ -146,7 +146,8 @@ return nullptr; } -std::unique_ptr<SmsDialog> WebContentsDelegate::CreateSmsDialog() { +std::unique_ptr<SmsDialog> WebContentsDelegate::CreateSmsDialog( + const url::Origin&) { return nullptr; }
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index 23c2a2bd..531622c 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h
@@ -410,7 +410,7 @@ const BluetoothChooser::EventHandler& event_handler); // Creates a dialog for the user to control the receiving of the SMS. - virtual std::unique_ptr<SmsDialog> CreateSmsDialog(); + virtual std::unique_ptr<SmsDialog> CreateSmsDialog(const url::Origin&); // Shows a prompt for the user to allow/block Bluetooth scanning. The // observer must live at least as long as the returned prompt object.
diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h index d200317..43e0303 100644 --- a/content/public/browser/web_ui_data_source.h +++ b/content/public/browser/web_ui_data_source.h
@@ -118,6 +118,10 @@ const std::string& data) = 0; virtual void DisableDenyXFrameOptions() = 0; + // Replace i18n template strings in JS files. Needed for Web UIs that are + // using Polymer 3. + virtual void EnableReplaceI18nInJS() = 0; + // The |source_name| this WebUIDataSource was created with. virtual std::string GetSource() = 0; };
diff --git a/content/public/common/content_switch_dependent_feature_overrides.cc b/content/public/common/content_switch_dependent_feature_overrides.cc index 6883f00..312b6b4 100644 --- a/content/public/common/content_switch_dependent_feature_overrides.cc +++ b/content/public/common/content_switch_dependent_feature_overrides.cc
@@ -4,6 +4,10 @@ #include "content/public/common/content_switch_dependent_feature_overrides.h" +#include "content/public/common/content_features.h" +#include "content/public/common/content_switches.h" +#include "net/base/features.h" + namespace content { std::vector<base::FeatureList::FeatureOverrideInfo> @@ -18,8 +22,16 @@ // State to override the feature with. base::FeatureList::OverrideState override_state; } override_info[] = { - // TODO(chlily): Add the Experimental Cookie SameSite features. (Coming in - // next CL, https://crrev.com/c/1691522). + // Experimental Cookie SameSite features. + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(net::features::kSameSiteByDefaultCookies), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(net::features::kCookiesWithoutSameSiteMustBeSecure), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, + {switches::kEnableExperimentalWebPlatformFeatures, + std::cref(features::kCookieDeprecationMessages), + base::FeatureList::OVERRIDE_ENABLE_FEATURE}, }; // TODO(chlily): There are currently a few places where, to check if some
diff --git a/content/public/common/network_service_util.cc b/content/public/common/network_service_util.cc index f31da6a..03324aa 100644 --- a/content/public/common/network_service_util.cc +++ b/content/public/common/network_service_util.cc
@@ -8,7 +8,6 @@ #include "build/build_config.h" #include "content/public/common/content_features.h" #include "content/public/common/content_switches.h" -#include "services/network/public/cpp/features.h" #if defined(OS_ANDROID) #include "base/metrics/field_trial_params.h" @@ -19,12 +18,16 @@ namespace { #if defined(OS_ANDROID) +const base::Feature kNetworkServiceOutOfProcessMemoryThreshold{ + "NetworkServiceOutOfProcessMemoryThreshold", + base::FEATURE_ENABLED_BY_DEFAULT}; + // Using 1077 rather than 1024 because 1) it helps ensure that devices with // exactly 1GB of RAM won't get included because of inaccuracies or off-by-one // errors and 2) this is the bucket boundary in Memory.Stats.Win.TotalPhys2. constexpr base::FeatureParam<int> kNetworkServiceOutOfProcessThresholdMb{ - &network::features::kNetworkService, "network_services_oop_threshold_mb", - 1077}; + &kNetworkServiceOutOfProcessMemoryThreshold, + "network_service_oop_threshold_mb", 1077}; #endif // Indicates whether the network service is forced to be running in the browser
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc index 2cc8bff..6847fbe 100644 --- a/content/public/test/browser_test_utils.cc +++ b/content/public/test/browser_test_utils.cc
@@ -1762,8 +1762,12 @@ BrowserContext::GetDefaultStoragePartition(browser_context) ->GetNetworkContext() ->GetCookieManager(mojo::MakeRequest(&cookie_manager)); + // Allow access to SameSite cookies in tests. + net::CookieOptions options; + options.set_same_site_cookie_context( + net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); cookie_manager->GetCookieList( - url, net::CookieOptions(), + url, options, base::BindOnce( [](std::string* cookies_out, base::RunLoop* run_loop, const std::vector<net::CanonicalCookie>& cookies, @@ -1785,8 +1789,12 @@ BrowserContext::GetDefaultStoragePartition(browser_context) ->GetNetworkContext() ->GetCookieManager(mojo::MakeRequest(&cookie_manager)); + // Allow access to SameSite cookies in tests. + net::CookieOptions options; + options.set_same_site_cookie_context( + net::CookieOptions::SameSiteCookieContext::SAME_SITE_STRICT); cookie_manager->GetCookieList( - url, net::CookieOptions(), + url, options, base::BindOnce( [](base::RunLoop* run_loop, std::vector<net::CanonicalCookie>* cookies_out, @@ -3143,6 +3151,8 @@ request->url = url; request->render_frame_id = render_frame_id; request->load_flags = load_flags; + // Allow access to SameSite cookies in tests. + request->site_for_cookies = url; content::SimpleURLLoaderTestHelper simple_loader_helper; std::unique_ptr<network::SimpleURLLoader> simple_loader =
diff --git a/content/public/test/mock_render_process_host.h b/content/public/test/mock_render_process_host.h index ee18b229..b4de633f 100644 --- a/content/public/test/mock_render_process_host.h +++ b/content/public/test/mock_render_process_host.h
@@ -162,6 +162,10 @@ const GURL& lock_url) override; void BindCacheStorage(blink::mojom::CacheStorageRequest request, const url::Origin& origin) override; + void BindFileSystemManager( + const url::Origin& origin, + mojo::PendingReceiver<blink::mojom::FileSystemManager> receiver) + override {} void BindIndexedDB(blink::mojom::IDBFactoryRequest request, const url::Origin& origin) override; void CleanupCorbExceptionForPluginUponDestruction() override;
diff --git a/content/public/test/ppapi_test_utils.h b/content/public/test/ppapi_test_utils.h index 93f229d..c0a936b 100644 --- a/content/public/test/ppapi_test_utils.h +++ b/content/public/test/ppapi_test_utils.h
@@ -49,7 +49,7 @@ using CreateUDPSocketCallback = base::RepeatingCallback<void( network::mojom::NetworkContext* network_context, network::mojom::UDPSocketRequest socket_request, - network::mojom::UDPSocketReceiverPtr socket_receiver)>; + network::mojom::UDPSocketListenerPtr socket_listener)>; // Sets a NetworkContext to be used by the Pepper TCP classes for testing. // Passed in NetworkContext must remain valid until the method is called again
diff --git a/content/public/test/test_browser_thread_bundle.cc b/content/public/test/test_browser_thread_bundle.cc index 9d5e289..c3cf8a7 100644 --- a/content/public/test/test_browser_thread_bundle.cc +++ b/content/public/test/test_browser_thread_bundle.cc
@@ -13,7 +13,7 @@ #include "base/task/post_task.h" #include "base/threading/thread_task_runner_handle.h" #include "content/browser/after_startup_task_utils.h" -#include "content/browser/scheduler/browser_io_task_environment.h" +#include "content/browser/scheduler/browser_io_thread_delegate.h" #include "content/browser/scheduler/browser_task_executor.h" #include "content/browser/scheduler/browser_ui_thread_scheduler.h" #include "content/public/browser/browser_task_traits.h" @@ -91,14 +91,14 @@ sequence_manager(), GetTimeDomain()); auto default_ui_task_runner = browser_ui_thread_scheduler->GetHandle()->GetDefaultTaskRunner(); - auto browser_io_task_environment = + auto browser_io_thread_delegate = real_io_thread_ - ? std::make_unique<BrowserIOTaskEnvironment>() - : BrowserIOTaskEnvironment::CreateForTesting(sequence_manager()); - browser_io_task_environment->SetAllowBlockingForTesting(); + ? std::make_unique<BrowserIOThreadDelegate>() + : BrowserIOThreadDelegate::CreateForTesting(sequence_manager()); + browser_io_thread_delegate->SetAllowBlockingForTesting(); BrowserTaskExecutor::CreateForTesting(std::move(browser_ui_thread_scheduler), - std::move(browser_io_task_environment)); + std::move(browser_io_thread_delegate)); DeferredInitFromSubclass(std::move(default_ui_task_runner)); if (HasIOMainLoop()) {
diff --git a/content/public/test/test_browser_thread_bundle_unittest.cc b/content/public/test/test_browser_thread_bundle_unittest.cc index 0726a62c..58d01da9 100644 --- a/content/public/test/test_browser_thread_bundle_unittest.cc +++ b/content/public/test/test_browser_thread_bundle_unittest.cc
@@ -7,6 +7,7 @@ #include "base/atomicops.h" #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/message_loop/message_loop_current.h" #include "base/synchronization/waitable_event.h" #include "base/task/post_task.h" #include "content/public/browser/browser_task_traits.h"
diff --git a/content/public/test/test_utils.cc b/content/public/test/test_utils.cc index 44b79b1..25d9e746 100644 --- a/content/public/test/test_utils.cc +++ b/content/public/test/test_utils.cc
@@ -11,13 +11,13 @@ #include "base/command_line.h" #include "base/location.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "base/task/sequence_manager/sequence_manager.h" +#include "base/task/task_observer.h" #include "base/task/thread_pool/thread_pool.h" #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" @@ -72,12 +72,12 @@ } // Monitors if any task is processed by the message loop. -class TaskObserver : public base::MessageLoop::TaskObserver { +class TaskObserver : public base::TaskObserver { public: TaskObserver() : processed_(false) {} ~TaskObserver() override {} - // MessageLoop::TaskObserver overrides. + // TaskObserver overrides. void WillProcessTask(const base::PendingTask& pending_task) override {} void DidProcessTask(const base::PendingTask& pending_task) override { processed_ = true;
diff --git a/content/renderer/blob_storage/OWNERS b/content/renderer/blob_storage/OWNERS deleted file mode 100644 index 2c35e94..0000000 --- a/content/renderer/blob_storage/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -file://content/browser/blob_storage/OWNERS - -# TEAM: storage-dev@chromium.org -# COMPONENT: Blink>Storage>FileAPI
diff --git a/content/renderer/media/webrtc/rtc_rtp_source.cc b/content/renderer/media/webrtc/rtc_rtp_source.cc index 9b7bee96..308f39f 100644 --- a/content/renderer/media/webrtc/rtc_rtp_source.cc +++ b/content/renderer/media/webrtc/rtc_rtp_source.cc
@@ -28,8 +28,9 @@ } } -double RTCRtpSource::TimestampMs() const { - return source_.timestamp_ms(); +base::TimeTicks RTCRtpSource::Timestamp() const { + return base::TimeTicks() + + base::TimeDelta::FromMilliseconds(source_.timestamp_ms()); } uint32_t RTCRtpSource::Source() const {
diff --git a/content/renderer/media/webrtc/rtc_rtp_source.h b/content/renderer/media/webrtc/rtc_rtp_source.h index 8821d2d..ecf3fd73 100644 --- a/content/renderer/media/webrtc/rtc_rtp_source.h +++ b/content/renderer/media/webrtc/rtc_rtp_source.h
@@ -19,7 +19,7 @@ ~RTCRtpSource() override; blink::WebRTCRtpSource::Type SourceType() const override; - double TimestampMs() const override; + base::TimeTicks Timestamp() const override; uint32_t Source() const override; base::Optional<double> AudioLevel() const override; uint32_t RtpTimestamp() const override;
diff --git a/content/renderer/pepper/pepper_file_system_host.cc b/content/renderer/pepper/pepper_file_system_host.cc index 131e44c..f4e1a1b9 100644 --- a/content/renderer/pepper/pepper_file_system_host.cc +++ b/content/renderer/pepper/pepper_file_system_host.cc
@@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/callback.h" +#include "base/optional.h" #include "content/common/pepper_file_util.h" #include "content/public/common/service_names.mojom.h" #include "content/public/renderer/render_view.h" @@ -19,14 +20,32 @@ #include "ppapi/shared_impl/file_system_util.h" #include "ppapi/shared_impl/file_type_conversion.h" #include "services/service_manager/public/cpp/connector.h" -#include "storage/common/fileapi/file_system_type_converters.h" #include "storage/common/fileapi/file_system_util.h" +#include "third_party/blink/public/mojom/filesystem/file_system.mojom.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_view.h" namespace content { +namespace { + +base::Optional<blink::mojom::FileSystemType> +PepperFileSystemTypeToMojoFileSystemType(PP_FileSystemType type) { + switch (type) { + case PP_FILESYSTEMTYPE_LOCALTEMPORARY: + return blink::mojom::FileSystemType::kTemporary; + case PP_FILESYSTEMTYPE_LOCALPERSISTENT: + return blink::mojom::FileSystemType::kPersistent; + case PP_FILESYSTEMTYPE_EXTERNAL: + return blink::mojom::FileSystemType::kExternal; + default: + return base::nullopt; + } +} + +} // namespace + PepperFileSystemHost::PepperFileSystemHost(RendererPpapiHost* host, PP_Instance instance, PP_Resource resource, @@ -97,9 +116,9 @@ return PP_ERROR_INPROGRESS; called_open_ = true; - storage::FileSystemType file_system_type = - PepperFileSystemTypeToFileSystemType(type_); - if (file_system_type == storage::kFileSystemTypeUnknown) + base::Optional<blink::mojom::FileSystemType> file_system_type = + PepperFileSystemTypeToMojoFileSystemType(type_); + if (!file_system_type.has_value()) return PP_ERROR_FAILED; GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance()); @@ -108,8 +127,7 @@ reply_context_ = context->MakeReplyMessageContext(); GetFileSystemManager().Open( - url::Origin::Create(document_url), - mojo::ConvertTo<blink::mojom::FileSystemType>(file_system_type), + url::Origin::Create(document_url), file_system_type.value(), base::BindOnce(&PepperFileSystemHost::DidOpenFileSystem, AsWeakPtr())); return PP_OK_COMPLETIONPENDING; }
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index afcd435..31790be 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -1302,10 +1302,6 @@ // Adding a new message? Add platform independent ones first, then put the // platform specific ones at the end. - - // Have the widget handle all other messages. - // TODO(ajwong): Remove this cross-object dispatch. - IPC_MESSAGE_UNHANDLED(handled = ForwardToWidgetAndCheckIfHandled(message)) IPC_END_MESSAGE_MAP() return handled; @@ -2273,13 +2269,4 @@ ->CleanupTaskRunner(); } -bool RenderViewImpl::ForwardToWidgetAndCheckIfHandled( - const IPC::Message& message) { - // TODO(https://crbug.com/990607): This CHECK is temporary and will be - // removed, assuming nothing crashes in the wild. - bool handled = GetWidget()->OnMessageReceived(message); - CHECK(!handled); - return handled; -} - } // namespace content
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 5ab7fcd..5aa150e 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -516,8 +516,6 @@ void UpdateThemePrefs() {} #endif - bool ForwardToWidgetAndCheckIfHandled(const IPC::Message& message); - // --------------------------------------------------------------------------- // ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put // it in the same order in the .cc file as it was in the header.
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc index b40d242..c23ecca 100644 --- a/content/renderer/service_worker/service_worker_context_client.cc +++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -41,7 +41,6 @@ #include "services/network/public/cpp/features.h" #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h" #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h" -#include "storage/common/blob_storage/blob_handle.h" #include "third_party/blink/public/common/messaging/message_port_channel.h" #include "third_party/blink/public/common/service_worker/service_worker_status_code.h" #include "third_party/blink/public/common/service_worker/service_worker_utils.h"
diff --git a/content/shell/browser/shell_browser_context.cc b/content/shell/browser/shell_browser_context.cc index 4477ce8..33d55fdb 100644 --- a/content/shell/browser/shell_browser_context.cc +++ b/content/shell/browser/shell_browser_context.cc
@@ -26,6 +26,7 @@ #include "content/public/common/content_switches.h" #include "content/shell/browser/shell_download_manager_delegate.h" #include "content/shell/browser/shell_permission_manager.h" +#include "content/shell/browser/web_test/web_test_content_index_provider.h" #include "content/shell/common/shell_switches.h" #include "content/test/mock_background_sync_controller.h" @@ -210,4 +211,10 @@ return nullptr; } +ContentIndexProvider* ShellBrowserContext::GetContentIndexProvider() { + if (!content_index_provider_) + content_index_provider_ = std::make_unique<WebTestContentIndexProvider>(); + return content_index_provider_.get(); +} + } // namespace content
diff --git a/content/shell/browser/shell_browser_context.h b/content/shell/browser/shell_browser_context.h index df8c0bc..e167ef3 100644 --- a/content/shell/browser/shell_browser_context.h +++ b/content/shell/browser/shell_browser_context.h
@@ -20,6 +20,7 @@ namespace content { class BackgroundSyncController; +class ContentIndexProvider; class DownloadManagerDelegate; class PermissionControllerDelegate; class ShellDownloadManagerDelegate; @@ -58,6 +59,7 @@ BackgroundFetchDelegate* GetBackgroundFetchDelegate() override; BackgroundSyncController* GetBackgroundSyncController() override; BrowsingDataRemoverDelegate* GetBrowsingDataRemoverDelegate() override; + ContentIndexProvider* GetContentIndexProvider() override; protected: // Contains URLRequestContextGetter required for resource loading. @@ -76,6 +78,7 @@ std::unique_ptr<ShellDownloadManagerDelegate> download_manager_delegate_; std::unique_ptr<PermissionControllerDelegate> permission_manager_; std::unique_ptr<BackgroundSyncController> background_sync_controller_; + std::unique_ptr<ContentIndexProvider> content_index_provider_; private: // Performs initialization of the ShellBrowserContext while IO is still
diff --git a/content/shell/browser/web_test/web_test_content_index_provider.cc b/content/shell/browser/web_test/web_test_content_index_provider.cc index 1da729d..e2d414d 100644 --- a/content/shell/browser/web_test/web_test_content_index_provider.cc +++ b/content/shell/browser/web_test/web_test_content_index_provider.cc
@@ -6,10 +6,16 @@ namespace content { -WebTestContentIndexProvider::WebTestContentIndexProvider() = default; +WebTestContentIndexProvider::WebTestContentIndexProvider() + : icon_sizes_({{96, 96}}) {} WebTestContentIndexProvider::~WebTestContentIndexProvider() = default; +std::vector<gfx::Size> WebTestContentIndexProvider::GetIconSizes( + blink::mojom::ContentCategory category) { + return icon_sizes_; +} + void WebTestContentIndexProvider::OnContentAdded(ContentIndexEntry entry) { entries_[entry.description->id] = { entry.service_worker_registration_id,
diff --git a/content/shell/browser/web_test/web_test_content_index_provider.h b/content/shell/browser/web_test/web_test_content_index_provider.h index 4755dc5..e700d09 100644 --- a/content/shell/browser/web_test/web_test_content_index_provider.h +++ b/content/shell/browser/web_test/web_test_content_index_provider.h
@@ -7,10 +7,12 @@ #include <map> #include <string> +#include <vector> #include "base/macros.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/content_index_provider.h" +#include "ui/gfx/geometry/size.h" #include "url/origin.h" namespace content { @@ -23,6 +25,8 @@ ~WebTestContentIndexProvider() override; // ContentIndexProvider implementation. + std::vector<gfx::Size> GetIconSizes( + blink::mojom::ContentCategory category) override; void OnContentAdded(ContentIndexEntry entry) override; void OnContentDeleted(int64_t service_worker_registration_id, const url::Origin& origin, @@ -34,10 +38,16 @@ std::pair<int64_t, url::Origin> GetRegistrationDataFromId( const std::string& id); + void set_icon_sizes(std::vector<gfx::Size> icon_sizes) { + icon_sizes_ = std::move(icon_sizes); + } + private: // Map from |description_id| to <|service_worker_registration_id|, |origin|>. std::map<std::string, std::pair<int64_t, url::Origin>> entries_; + std::vector<gfx::Size> icon_sizes_; + DISALLOW_COPY_AND_ASSIGN(WebTestContentIndexProvider); };
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 4bfcd3f5..75156916 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -873,6 +873,7 @@ "../browser/browsing_data/same_site_data_remover_impl_browsertest.cc", "../browser/child_process_launcher_browsertest.cc", "../browser/child_process_security_policy_browsertest.cc", + "../browser/content_index/content_index_browsertest.cc", "../browser/content_service_browsertest.cc", "../browser/cross_site_transfer_browsertest.cc", "../browser/database_browsertest.cc", @@ -1775,7 +1776,7 @@ "../browser/renderer_host/web_database_host_impl_unittest.cc", "../browser/resolve_proxy_msg_helper_unittest.cc", "../browser/sandbox_mac_unittest.mm", - "../browser/scheduler/browser_io_task_environment_unittest.cc", + "../browser/scheduler/browser_io_thread_delegate_unittest.cc", "../browser/scheduler/browser_task_executor_unittest.cc", "../browser/scheduler/browser_task_queues_unittest.cc", "../browser/scheduler/browser_ui_thread_scheduler_unittest.cc",
diff --git a/content/test/data/accessibility/html/audio-expected-uia-win.txt b/content/test/data/accessibility/html/audio-expected-uia-win.txt new file mode 100644 index 0000000..3a44967 --- /dev/null +++ b/content/test/data/accessibility/html/audio-expected-uia-win.txt
@@ -0,0 +1,17 @@ +document LocalizedControlType='document' +++group LocalizedControlType='group' +++++group LocalizedControlType='audio' +++++++group LocalizedControlType='group' +++++++++group LocalizedControlType='group' +++++++++++group LocalizedControlType='group' +++++++++++++button LocalizedControlType='button' Name='play' +++++++++++++group LocalizedControlType='group' Name='elapsed time: 0:00' +++++++++++++++description LocalizedControlType='text' Name='0:00' +++++++++++++group LocalizedControlType='group' Name='remaining time: / 0:00' +++++++++++++++description LocalizedControlType='text' Name='/ 0:00' +++++++++++++slider LocalizedControlType='slider' Name='audio time scrubber 0:00 / 0:00' RangeValue.IsReadOnly=false RangeValue.LargeChange=10.00 RangeValue.SmallChange=1.00 RangeValue.Maximum=0.31 RangeValue.Minimum=0.00 RangeValue.Value=0.00 Value.Value='elapsed time: 0:00' +++++++++++++group LocalizedControlType='group' +++++++++++++++group LocalizedControlType='group' +++++++++++++++slider LocalizedControlType='slider' Name='volume' RangeValue.IsReadOnly=false RangeValue.LargeChange=10.00 RangeValue.SmallChange=1.00 RangeValue.Maximum=100.00 RangeValue.Minimum=0.00 RangeValue.Value=100.00 Value.Value='1' +++++++++++++++button LocalizedControlType='button' Name='mute' +++++++++++++button LocalizedControlType='button' Name='show more media controls'
diff --git a/content/test/data/accessibility/html/audio-expected-win.txt b/content/test/data/accessibility/html/audio-expected-win.txt index b69bb8f..7f72fe1 100644 --- a/content/test/data/accessibility/html/audio-expected-win.txt +++ b/content/test/data/accessibility/html/audio-expected-win.txt
@@ -1,11 +1,17 @@ -#<skip -- crbug.com/281952> ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE -++IA2_ROLE_SECTION READONLY -++++ROLE_SYSTEM_CLIENT name='0:00' FOCUSABLE -++++++ROLE_SYSTEM_TOOLBAR name='audio' READONLY -++++++++ROLE_SYSTEM_TOOLBAR name='audio' READONLY -++++++++++ROLE_SYSTEM_PUSHBUTTON name='play' FOCUSABLE xml-roles:button description='begin playback' -++++++++++ROLE_SYSTEM_SLIDER name='movie time scrubber' FOCUSABLE xml-roles:slider -++++++++++IA2_ROLE_SECTION READONLY -++++++++++++ROLE_SYSTEM_STATICTEXT name='0:00' -++++++++++ROLE_SYSTEM_PUSHBUTTON name='mute' FOCUSABLE xml-roles:button description='mute audio track' +++IA2_ROLE_SECTION +++++ROLE_SYSTEM_GROUPING FOCUSABLE localized_extended_role='audio' +++++++IA2_ROLE_SECTION +++++++++IA2_ROLE_SECTION +++++++++++IA2_ROLE_SECTION +++++++++++++ROLE_SYSTEM_PUSHBUTTON name='play' FOCUSABLE xml-roles:button +++++++++++++IA2_ROLE_SECTION name='elapsed time: 0:00' +++++++++++++++ROLE_SYSTEM_STATICTEXT name='0:00' +++++++++++++IA2_ROLE_SECTION name='remaining time: / 0:00' +++++++++++++++ROLE_SYSTEM_STATICTEXT name='/ 0:00' +++++++++++++ROLE_SYSTEM_SLIDER name='audio time scrubber 0:00 / 0:00' value='elapsed time: 0:00' FOCUSABLE IA2_STATE_HORIZONTAL xml-roles:slider +++++++++++++IA2_ROLE_SECTION +++++++++++++++IA2_ROLE_SECTION +++++++++++++++ROLE_SYSTEM_SLIDER name='volume' value='1' FOCUSABLE IA2_STATE_HORIZONTAL xml-roles:slider +++++++++++++++ROLE_SYSTEM_PUSHBUTTON name='mute' FOCUSABLE xml-roles:button +++++++++++++ROLE_SYSTEM_PUSHBUTTON name='show more media controls' FOCUSABLE xml-roles:button description='more options'
diff --git a/content/test/data/accessibility/html/audio.html b/content/test/data/accessibility/html/audio.html index 2a824a2..0b166eaa 100644 --- a/content/test/data/accessibility/html/audio.html +++ b/content/test/data/accessibility/html/audio.html
@@ -1,4 +1,6 @@ <!-- +@UIA-WIN-ALLOW:LocalizedControlType=* +@WIN-ALLOW:localized_extended_role=* @WIN-ALLOW:xml-roles* @WIN-ALLOW:description* @AURALINUX-ALLOW:xml-roles*
diff --git a/content/test/data/accessibility/html/details-expected-uia-win.txt b/content/test/data/accessibility/html/details-expected-uia-win.txt index cafe146e..6754eff 100644 --- a/content/test/data/accessibility/html/details-expected-uia-win.txt +++ b/content/test/data/accessibility/html/details-expected-uia-win.txt
@@ -1,8 +1,8 @@ document -++group +++group LocalizedControlType='details' ++++button Name='details tag' ExpandCollapse.ExpandCollapseState='Collapsed' ++++++description Name='details tag' -++group +++group LocalizedControlType='details' ++++button Name='details tag open' ExpandCollapse.ExpandCollapseState='Expanded' ++++++description Name='details tag open' ++++group
diff --git a/content/test/data/accessibility/html/details-expected-win.txt b/content/test/data/accessibility/html/details-expected-win.txt index c0001e1..4238082b 100644 --- a/content/test/data/accessibility/html/details-expected-win.txt +++ b/content/test/data/accessibility/html/details-expected-win.txt
@@ -1,8 +1,8 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE -++ROLE_SYSTEM_GROUPING +++ROLE_SYSTEM_GROUPING localized_extended_role='details' ++++ROLE_SYSTEM_PUSHBUTTON name='details tag' COLLAPSED FOCUSABLE ++++++ROLE_SYSTEM_STATICTEXT name='details tag' -++ROLE_SYSTEM_GROUPING +++ROLE_SYSTEM_GROUPING localized_extended_role='details' ++++ROLE_SYSTEM_PUSHBUTTON name='details tag open' EXPANDED FOCUSABLE ++++++ROLE_SYSTEM_STATICTEXT name='details tag open' ++++IA2_ROLE_PARAGRAPH
diff --git a/content/test/data/accessibility/html/details.html b/content/test/data/accessibility/html/details.html index d65dcaa7..e08f421 100644 --- a/content/test/data/accessibility/html/details.html +++ b/content/test/data/accessibility/html/details.html
@@ -1,8 +1,10 @@ <!-- @MAC-ALLOW:AXRole* @MAC-ALLOW:AXExpanded=* +@UIA-WIN-ALLOW:LocalizedControlType='details' @WIN-ALLOW:EXPANDED @WIN-ALLOW:COLLAPSED +@WIN-ALLOW:localized_extended_role=* @AURALINUX-ALLOW:expand* @AURALINUX-ALLOW:focus* -->
diff --git a/content/test/data/accessibility/html/input-email-expected-uia-win.txt b/content/test/data/accessibility/html/input-email-expected-uia-win.txt index 13da42cd..7dba3ee2 100644 --- a/content/test/data/accessibility/html/input-email-expected-uia-win.txt +++ b/content/test/data/accessibility/html/input-email-expected-uia-win.txt
@@ -1,3 +1,3 @@ -document -++group -++++textbox Value.Value='someone@example.com' +document LocalizedControlType='document' +++group LocalizedControlType='group' +++++textbox LocalizedControlType='email' Value.Value='someone@example.com'
diff --git a/content/test/data/accessibility/html/input-email-expected-win.txt b/content/test/data/accessibility/html/input-email-expected-win.txt index 942be6a..3bce6e64 100644 --- a/content/test/data/accessibility/html/input-email-expected-win.txt +++ b/content/test/data/accessibility/html/input-email-expected-win.txt
@@ -1,3 +1,3 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ia2_hypertext='<obj0>' n_selections=0 ++IA2_ROLE_SECTION ia2_hypertext='<obj0>' n_selections=0 -++++ROLE_SYSTEM_TEXT value='someone@example.com' FOCUSABLE text-input-type:email ia2_hypertext='someone@example.com' caret_offset=0 n_selections=0 +++++ROLE_SYSTEM_TEXT value='someone@example.com' FOCUSABLE text-input-type:email ia2_hypertext='someone@example.com' caret_offset=0 n_selections=0 localized_extended_role='email'
diff --git a/content/test/data/accessibility/html/input-email.html b/content/test/data/accessibility/html/input-email.html index d3b94a3c..efd6f9d 100644 --- a/content/test/data/accessibility/html/input-email.html +++ b/content/test/data/accessibility/html/input-email.html
@@ -2,8 +2,10 @@ @BLINK-ALLOW:inputType=* @BLINK-ALLOW:textSel* @MAC-ALLOW:AXRole* +@UIA-WIN-ALLOW:LocalizedControlType=* @WIN-ALLOW:caret_offset* @WIN-ALLOW:ia2_hypertext=* +@WIN-ALLOW:localized_extended_role=* @WIN-ALLOW:n_selections* @WIN-ALLOW:selection_start* @WIN-ALLOW:selection_end*
diff --git a/content/test/data/accessibility/html/meter-expected-uia-win.txt b/content/test/data/accessibility/html/meter-expected-uia-win.txt index bc073bb8..89e72c96 100644 --- a/content/test/data/accessibility/html/meter-expected-uia-win.txt +++ b/content/test/data/accessibility/html/meter-expected-uia-win.txt
@@ -1,3 +1,3 @@ -document -++group -++++progressbar RangeValue.IsReadOnly=false RangeValue.LargeChange=0.00 RangeValue.SmallChange=0.00 RangeValue.Maximum=10.00 RangeValue.Minimum=1.00 RangeValue.Value=2.00 Value.Value='2' +document LocalizedControlType='document' +++group LocalizedControlType='group' +++++progressbar LocalizedControlType='meter' RangeValue.IsReadOnly=false RangeValue.LargeChange=0.00 RangeValue.SmallChange=0.00 RangeValue.Maximum=10.00 RangeValue.Minimum=1.00 RangeValue.Value=2.00 Value.Value='2'
diff --git a/content/test/data/accessibility/html/meter-expected-win.txt b/content/test/data/accessibility/html/meter-expected-win.txt index 84007fa..9469ef3 100644 --- a/content/test/data/accessibility/html/meter-expected-win.txt +++ b/content/test/data/accessibility/html/meter-expected-win.txt
@@ -1,3 +1,3 @@ ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE ++IA2_ROLE_SECTION -++++ROLE_SYSTEM_PROGRESSBAR value='2' currentValue=2.00 minimumValue=1.00 maximumValue=10.00 +++++ROLE_SYSTEM_PROGRESSBAR value='2' currentValue=2.00 minimumValue=1.00 maximumValue=10.00 localized_extended_role='meter'
diff --git a/content/test/data/accessibility/html/meter.html b/content/test/data/accessibility/html/meter.html index 220ee8f..7fa523d9 100644 --- a/content/test/data/accessibility/html/meter.html +++ b/content/test/data/accessibility/html/meter.html
@@ -3,7 +3,9 @@ @MAC-ALLOW:AXMaxValue=* @MAC-ALLOW:AXMinValue=* @MAC-ALLOW:AXValue=* +@UIA-WIN-ALLOW:LocalizedControlType=* @WIN-ALLOW:currentValue=* +@WIN-ALLOW:localized_extended_role=* @WIN-ALLOW:maximumValue=* @WIN-ALLOW:minimumValue=* -->
diff --git a/tools/metrics/histograms/test_files/empty_OWNERS b/content/test/data/content_index/sw.js similarity index 100% rename from tools/metrics/histograms/test_files/empty_OWNERS rename to content/test/data/content_index/sw.js
diff --git a/content/test/data/content_index/test.html b/content/test/data/content_index/test.html new file mode 100644 index 0000000..fe79218 --- /dev/null +++ b/content/test/data/content_index/test.html
@@ -0,0 +1,31 @@ +<!DOCTYPE html> +<html> + <head> + <title>Content Index API Test</title> + <script src="../result_queue.js"></script> + </head> + <body> + <h1>Content Index Test</h1> + <script> + navigator.serviceWorker.register('sw.js'); + + async function addContent(id, category) { + try { + const registration = await navigator.serviceWorker.ready; + await registration.index.add({ + id, + title: 'Title!', + description: 'Description!', + category: 'article', + iconUrl: '/single_face.jpg', + launchUrl: '/content_index/test.html', + }); + sendResultToTest('ok'); + } catch (e) { + sendErrorToTest(e); + } + } + + </script> + </body> +</html>
diff --git a/content/test/data/cross_site_iframe_factory.html b/content/test/data/cross_site_iframe_factory.html index 1472a5e..a446bd1 100644 --- a/content/test/data/cross_site_iframe_factory.html +++ b/content/test/data/cross_site_iframe_factory.html
@@ -27,6 +27,11 @@ <iframe src="http://a.com:1234/cross_site_iframe_factory.html?b()" allowfullscreen> <iframe src="http://c.com:1234/cross_site_iframe_factory.html?c{sandbox-allow-scripts}(d())" sandbox="allow-scripts"> +To specify the site for each iframe, you can use a simple identifier like "a" +or "b", and ".com" will be automatically appended. You can also specify a port +number to use for each site by using a label like "a:12345". If no port number +is given, the port will default to the port number of the top level frame. + These options are supported: allowfullscreen @@ -97,15 +102,29 @@ return pastelColorForFirstCharacter(site, .32); } + +/** + * Extract the specified port number, if any. Returns empty string if not + * specified. + */ +function sitePortNumber(siteString) { + let index = siteString.indexOf(':'); + if (index == -1) + return "" + return siteString.substring(index + 1); +} + /** * Adds ".com" to an argument if it doesn't already have a top level domain. * This cuts down on noise in the query string, letting you use single-letter - * names. + * names. Adds the specified port number, if any, or the default port otherwise. */ -function canonicalizeSite(siteString) { - if (siteString.indexOf('.') == -1) - return siteString + '.com'; - return siteString; +function canonicalizeSiteAndPort(siteString, defaultPort) { + var portNumber = sitePortNumber(siteString) || defaultPort; + var hostName = siteString.split(':')[0]; + if (hostName !== "localhost" && hostName.indexOf('.') == -1) + hostName = hostName + '.com'; + return hostName + (portNumber ? ':' + portNumber : ""); } /** @@ -177,7 +196,7 @@ var goCrossSite = !window.location.protocol.startsWith('file'); var queryString = decodeURIComponent(window.location.search.substring(1)); var frameTree = TreeParserUtil.parse(queryString); - var currentSite = canonicalizeSite(frameTree.value); + var currentSite = canonicalizeSiteAndPort(frameTree.value, ""); // Apply style to the current document. document.getElementById('siteNameHeading').appendChild( @@ -189,13 +208,11 @@ for (var i = 0; i < frameTree.children.length; i++) { // Compute the URL for this iframe. - var site = canonicalizeSite(frameTree.children[i].value); + var siteAndPort = canonicalizeSiteAndPort(frameTree.children[i].value, window.location.port); var subtreeString = TreeParserUtil.flatten(frameTree.children[i]); var url = ''; url += window.location.protocol + '//'; // scheme (preserved) - url += goCrossSite ? site : window.location.host; // host - if (window.location.port) - url += ':' + window.location.port; // port (preserved) + url += goCrossSite ? siteAndPort : window.location.host; // host and port url += window.location.pathname; // path (preserved) url += '?' + encodeURIComponent(subtreeString); // query @@ -203,7 +220,7 @@ var iframe = document.createElement('iframe'); iframe.src = url; iframe.id = "child-" + i; - iframe.style.borderColor = borderColorForSite(site); + iframe.style.borderColor = borderColorForSite(siteAndPort); iframe.width = frameTree.children[i].layoutX; iframe.height = frameTree.children[i].layoutY; // Apply any additional attributes.
diff --git a/content/test/data/service_worker/code_cache_strategy_worker.js b/content/test/data/service_worker/code_cache_strategy_worker.js index dcd2175..ff94ce8e 100644 --- a/content/test/data/service_worker/code_cache_strategy_worker.js +++ b/content/test/data/service_worker/code_cache_strategy_worker.js
@@ -45,6 +45,15 @@ await cache.addAll([ `${SCRIPT_PATH}?cached_in_install_event`, ]); + + // Create a synthetic response with a mime-type that has a charset + const script_body = "function test_function() { return 'SUCCESS'; }"; + const response = new Response(script_body, { + headers: { 'content-type': 'application/javascript; charset=utf-8' } + }); + await cache.put( + `${SCRIPT_PATH}?cached_in_install_event_with_mime_type_param`, + response); }()); });
diff --git a/content/test/data/tree_parser_util.js b/content/test/data/tree_parser_util.js index 8afd676f..42986cd 100644 --- a/content/test/data/tree_parser_util.js +++ b/content/test/data/tree_parser_util.js
@@ -121,7 +121,7 @@ if (tokenStream.length == 0) throw new Error('Expected an identifier, but found end-of-stream.'); var token = tokenStream.shift(); - if (!token.match(/^[a-zA-Z0-9.-]+$/)) + if (!token.match(/^[a-zA-Z0-9:.-]+$/)) throw new Error('Expected an identifier, but found "' + token + '".'); return token; }
diff --git a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt index a737700..3d1a981 100644 --- a/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt
@@ -190,6 +190,9 @@ # Also producing blank images on Intel crbug.com/974383 [ linux skia-renderer use-vulkan intel ] Pixel_CanvasDisplayLinearRGBAccelerated2D [ Skip ] +# Fails on Intel +crbug.com/991289 [ linux skia-renderer intel ] Pixel_CSS3DBlueBox [ Skip ] + # Fails when the browser features SkiaRenderer & Vulkan are enabled on Android crbug.com/969864 [ android skia-renderer use-vulkan ] Pixel_2DCanvasWebGL [ Failure ] crbug.com/969864 [ android skia-renderer use-vulkan ] Pixel_BackgroundImage [ Skip ]
diff --git a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt index 906c3dc..07f507e 100644 --- a/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt +++ b/content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt
@@ -560,7 +560,6 @@ crbug.com/905003 [ linux nvidia ] conformance2/textures/misc/integer-cubemap-specification-order-bug.html [ Failure ] crbug.com/680278 [ opengl linux nvidia ] conformance2/rendering/framebuffer-texture-level1.html [ Failure ] crbug.com/680282 [ linux nvidia-0xf02 ] conformance2/textures/image/tex-3d-rg8ui-rg_integer-unsigned_byte.html [ Failure ] -crbug.com/694354 [ linux no-passthrough nvidia ] conformance2/textures/image_bitmap_from_image_data/tex-2d-srgb8-rgb-unsigned_byte.html [ RetryOnFailure ] # Observed flaky on Swarmed bots. Some of these were directly # observed, some not. We can't afford any flakes on the tryservers
diff --git a/crypto/aead.cc b/crypto/aead.cc index be6ea52..012752b 100644 --- a/crypto/aead.cc +++ b/crypto/aead.cc
@@ -15,7 +15,7 @@ namespace crypto { -Aead::Aead(AeadAlgorithm algorithm) : key_(nullptr) { +Aead::Aead(AeadAlgorithm algorithm) { EnsureOpenSSLInit(); switch (algorithm) { case AES_128_CTR_HMAC_SHA256: @@ -32,88 +32,93 @@ Aead::~Aead() = default; -void Aead::Init(const std::string* key) { +void Aead::Init(base::span<const uint8_t> key) { DCHECK(!key_); - DCHECK_EQ(KeyLength(), key->size()); + DCHECK_EQ(KeyLength(), key.size()); key_ = key; } +static base::span<const uint8_t> ToSpan(base::StringPiece sp) { + return base::as_bytes(base::make_span(sp)); +} + +void Aead::Init(const std::string* key) { + Init(ToSpan(*key)); +} + +std::vector<uint8_t> Aead::Seal( + base::span<const uint8_t> plaintext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data) const { + const size_t max_output_length = + EVP_AEAD_max_overhead(aead_) + plaintext.size(); + CHECK(max_output_length >= plaintext.size()); + std::vector<uint8_t> ret; + ret.resize(max_output_length); + + size_t output_length; + CHECK(Seal(plaintext, nonce, additional_data, ret.data(), &output_length, + max_output_length)); + ret.resize(output_length); + return ret; +} + bool Aead::Seal(base::StringPiece plaintext, base::StringPiece nonce, base::StringPiece additional_data, std::string* ciphertext) const { - DCHECK(key_); - DCHECK_EQ(NonceLength(), nonce.size()); - EVP_AEAD_CTX ctx; - - if (!EVP_AEAD_CTX_init(&ctx, aead_, - reinterpret_cast<const uint8_t*>(key_->data()), - key_->size(), EVP_AEAD_DEFAULT_TAG_LENGTH, nullptr)) { - return false; - } - - std::string result; const size_t max_output_length = EVP_AEAD_max_overhead(aead_) + plaintext.size(); - size_t output_length; + CHECK(max_output_length + 1 >= plaintext.size()); uint8_t* out_ptr = reinterpret_cast<uint8_t*>( - base::WriteInto(&result, max_output_length + 1)); + base::WriteInto(ciphertext, max_output_length + 1)); - if (!EVP_AEAD_CTX_seal( - &ctx, out_ptr, &output_length, max_output_length, - reinterpret_cast<const uint8_t*>(nonce.data()), nonce.size(), - reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size(), - reinterpret_cast<const uint8_t*>(additional_data.data()), - additional_data.size())) { - EVP_AEAD_CTX_cleanup(&ctx); + size_t output_length; + if (!Seal(ToSpan(plaintext), ToSpan(nonce), ToSpan(additional_data), out_ptr, + &output_length, max_output_length)) { + ciphertext->clear(); return false; } - DCHECK_LE(output_length, max_output_length); - result.resize(output_length); - - ciphertext->swap(result); - EVP_AEAD_CTX_cleanup(&ctx); - + ciphertext->resize(output_length); return true; } +base::Optional<std::vector<uint8_t>> Aead::Open( + base::span<const uint8_t> ciphertext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data) const { + const size_t max_output_length = ciphertext.size(); + std::vector<uint8_t> ret; + ret.resize(max_output_length); + + size_t output_length; + if (!Open(ciphertext, nonce, additional_data, ret.data(), &output_length, + max_output_length)) { + return base::nullopt; + } + + ret.resize(output_length); + return ret; +} + bool Aead::Open(base::StringPiece ciphertext, base::StringPiece nonce, base::StringPiece additional_data, std::string* plaintext) const { - DCHECK(key_); - EVP_AEAD_CTX ctx; - - if (!EVP_AEAD_CTX_init(&ctx, aead_, - reinterpret_cast<const uint8_t*>(key_->data()), - key_->size(), EVP_AEAD_DEFAULT_TAG_LENGTH, nullptr)) { - return false; - } - - std::string result; const size_t max_output_length = ciphertext.size(); - size_t output_length; + CHECK(max_output_length + 1 > max_output_length); uint8_t* out_ptr = reinterpret_cast<uint8_t*>( - base::WriteInto(&result, max_output_length + 1)); + base::WriteInto(plaintext, max_output_length + 1)); - if (!EVP_AEAD_CTX_open( - &ctx, out_ptr, &output_length, max_output_length, - reinterpret_cast<const uint8_t*>(nonce.data()), nonce.size(), - reinterpret_cast<const uint8_t*>(ciphertext.data()), - ciphertext.size(), - reinterpret_cast<const uint8_t*>(additional_data.data()), - additional_data.size())) { - EVP_AEAD_CTX_cleanup(&ctx); + size_t output_length; + if (!Open(ToSpan(ciphertext), ToSpan(nonce), ToSpan(additional_data), out_ptr, + &output_length, max_output_length)) { + plaintext->clear(); return false; } - DCHECK_LE(output_length, max_output_length); - result.resize(output_length); - - plaintext->swap(result); - EVP_AEAD_CTX_cleanup(&ctx); - + plaintext->resize(output_length); return true; } @@ -125,4 +130,50 @@ return EVP_AEAD_nonce_length(aead_); } +bool Aead::Seal(base::span<const uint8_t> plaintext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data, + uint8_t* out, + size_t* output_length, + size_t max_output_length) const { + DCHECK(key_); + DCHECK_EQ(NonceLength(), nonce.size()); + bssl::ScopedEVP_AEAD_CTX ctx; + + if (!EVP_AEAD_CTX_init(ctx.get(), aead_, key_->data(), key_->size(), + EVP_AEAD_DEFAULT_TAG_LENGTH, nullptr) || + !EVP_AEAD_CTX_seal(ctx.get(), out, output_length, max_output_length, + nonce.data(), nonce.size(), plaintext.data(), + plaintext.size(), additional_data.data(), + additional_data.size())) { + return false; + } + + DCHECK_LE(*output_length, max_output_length); + return true; +} + +bool Aead::Open(base::span<const uint8_t> plaintext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data, + uint8_t* out, + size_t* output_length, + size_t max_output_length) const { + DCHECK(key_); + DCHECK_EQ(NonceLength(), nonce.size()); + bssl::ScopedEVP_AEAD_CTX ctx; + + if (!EVP_AEAD_CTX_init(ctx.get(), aead_, key_->data(), key_->size(), + EVP_AEAD_DEFAULT_TAG_LENGTH, nullptr) || + !EVP_AEAD_CTX_open(ctx.get(), out, output_length, max_output_length, + nonce.data(), nonce.size(), plaintext.data(), + plaintext.size(), additional_data.data(), + additional_data.size())) { + return false; + } + + DCHECK_LE(*output_length, max_output_length); + return true; +} + } // namespace crypto
diff --git a/crypto/aead.h b/crypto/aead.h index 5802c7e..7a855fd 100644 --- a/crypto/aead.h +++ b/crypto/aead.h
@@ -6,9 +6,13 @@ #define CRYPTO_AEAD_H_ #include <stddef.h> +#include <stdint.h> #include <string> +#include <vector> +#include "base/containers/span.h" +#include "base/optional.h" #include "base/strings/string_piece.h" #include "crypto/crypto_export.h" @@ -16,22 +20,41 @@ namespace crypto { -// This class exposes the AES-128-CTR-HMAC-SHA256 and AES_256_GCM AEAD. +// This class exposes the AES-128-CTR-HMAC-SHA256 and AES_256_GCM AEAD. Note +// that there are two versions of most methods: an historical version based +// around |StringPiece| and a more modern version that takes |base::span|. +// Prefer the latter in new code. class CRYPTO_EXPORT Aead { public: enum AeadAlgorithm { AES_128_CTR_HMAC_SHA256, AES_256_GCM, AES_256_GCM_SIV }; explicit Aead(AeadAlgorithm algorithm); - + Aead(const Aead&) = delete; + Aead& operator=(const Aead&) = delete; ~Aead(); + // Note that Init keeps a reference to the data pointed to by |key| thus that + // data must outlive this object. + void Init(base::span<const uint8_t> key); + + // Note that Init keeps a reference to the data pointed to by |key| thus that + // data must outlive this object. void Init(const std::string* key); + std::vector<uint8_t> Seal(base::span<const uint8_t> plaintext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data) const; + bool Seal(base::StringPiece plaintext, base::StringPiece nonce, base::StringPiece additional_data, std::string* ciphertext) const; + base::Optional<std::vector<uint8_t>> Open( + base::span<const uint8_t> ciphertext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data) const; + bool Open(base::StringPiece ciphertext, base::StringPiece nonce, base::StringPiece additional_data, @@ -42,7 +65,21 @@ size_t NonceLength() const; private: - const std::string* key_; + bool Seal(base::span<const uint8_t> plaintext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data, + uint8_t* out, + size_t* output_length, + size_t max_output_length) const; + + bool Open(base::span<const uint8_t> ciphertext, + base::span<const uint8_t> nonce, + base::span<const uint8_t> additional_data, + uint8_t* out, + size_t* output_length, + size_t max_output_length) const; + + base::Optional<base::span<const uint8_t>> key_; const evp_aead_st* aead_; };
diff --git a/crypto/aead_unittest.cc b/crypto/aead_unittest.cc index 1af24e7..50b73dc 100644 --- a/crypto/aead_unittest.cc +++ b/crypto/aead_unittest.cc
@@ -37,6 +37,31 @@ EXPECT_EQ(plaintext, decrypted); } +TEST_P(AeadTest, SealOpenSpan) { + crypto::Aead::AeadAlgorithm alg = GetParam(); + crypto::Aead aead(alg); + std::vector<uint8_t> key(aead.KeyLength(), 0u); + aead.Init(key); + std::vector<uint8_t> nonce(aead.NonceLength(), 0u); + static constexpr uint8_t kPlaintext[] = "plaintext"; + static constexpr uint8_t kAdditionalData[] = "additional data input"; + std::vector<uint8_t> ciphertext = + aead.Seal(kPlaintext, nonce, kAdditionalData); + EXPECT_LT(sizeof(kPlaintext), ciphertext.size()); + + base::Optional<std::vector<uint8_t>> decrypted = + aead.Open(ciphertext, nonce, kAdditionalData); + ASSERT_TRUE(decrypted); + ASSERT_EQ(decrypted->size(), sizeof(kPlaintext)); + ASSERT_EQ(0, memcmp(decrypted->data(), kPlaintext, sizeof(kPlaintext))); + + std::vector<uint8_t> wrong_key(aead.KeyLength(), 1u); + crypto::Aead aead_wrong_key(alg); + aead_wrong_key.Init(wrong_key); + decrypted = aead_wrong_key.Open(ciphertext, nonce, kAdditionalData); + EXPECT_FALSE(decrypted); +} + TEST_P(AeadTest, SealOpenWrongKey) { crypto::Aead::AeadAlgorithm alg = GetParam(); crypto::Aead aead(alg);
diff --git a/dbus/bus.cc b/dbus/bus.cc index 858fb04..0f50eb9d 100644 --- a/dbus/bus.cc +++ b/dbus/bus.cc
@@ -103,8 +103,7 @@ // calls. class Timeout { public: - explicit Timeout(DBusTimeout* timeout) - : raw_timeout_(timeout), weak_ptr_factory_(this) { + explicit Timeout(DBusTimeout* timeout) : raw_timeout_(timeout) { // Associated |this| with the underlying DBusTimeout. dbus_timeout_set_data(raw_timeout_, this, nullptr); } @@ -141,7 +140,7 @@ DBusTimeout* raw_timeout_; - base::WeakPtrFactory<Timeout> weak_ptr_factory_; + base::WeakPtrFactory<Timeout> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Timeout); };
diff --git a/dbus/object_manager.cc b/dbus/object_manager.cc index 44f1208..0c7e6ecc 100644 --- a/dbus/object_manager.cc +++ b/dbus/object_manager.cc
@@ -54,8 +54,7 @@ service_name_(service_name), object_path_(object_path), setup_success_(false), - cleanup_called_(false), - weak_ptr_factory_(this) { + cleanup_called_(false) { LOG_IF(FATAL, !object_path_.IsValid()) << object_path_.value(); DVLOG(1) << "Creating ObjectManager for " << service_name_ << " " << object_path_.value();
diff --git a/dbus/object_manager.h b/dbus/object_manager.h index 4b5fb790..1cea2f7 100644 --- a/dbus/object_manager.h +++ b/dbus/object_manager.h
@@ -359,7 +359,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<ObjectManager> weak_ptr_factory_; + base::WeakPtrFactory<ObjectManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ObjectManager); };
diff --git a/dbus/property.cc b/dbus/property.cc index 489ef99..15b99179 100644 --- a/dbus/property.cc +++ b/dbus/property.cc
@@ -42,8 +42,7 @@ const PropertyChangedCallback& property_changed_callback) : object_proxy_(object_proxy), interface_(interface), - property_changed_callback_(property_changed_callback), - weak_ptr_factory_(this) {} + property_changed_callback_(property_changed_callback) {} PropertySet::~PropertySet() = default;
diff --git a/dbus/property.h b/dbus/property.h index 68cf38b3..1f1d44a 100644 --- a/dbus/property.h +++ b/dbus/property.h
@@ -346,7 +346,7 @@ // Weak pointer factory as D-Bus callbacks may last longer than these // objects. - base::WeakPtrFactory<PropertySet> weak_ptr_factory_; + base::WeakPtrFactory<PropertySet> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PropertySet); };
diff --git a/device/bluetooth/adapter.cc b/device/bluetooth/adapter.cc index ec2deae5..dd2091c 100644 --- a/device/bluetooth/adapter.cc +++ b/device/bluetooth/adapter.cc
@@ -17,7 +17,7 @@ namespace bluetooth { Adapter::Adapter(scoped_refptr<device::BluetoothAdapter> adapter) - : adapter_(std::move(adapter)), client_(nullptr), weak_ptr_factory_(this) { + : adapter_(std::move(adapter)), client_(nullptr) { adapter_->AddObserver(this); }
diff --git a/device/bluetooth/adapter.h b/device/bluetooth/adapter.h index 0897fff..743707e 100644 --- a/device/bluetooth/adapter.h +++ b/device/bluetooth/adapter.h
@@ -71,7 +71,7 @@ // The adapter client that listens to this service. mojom::AdapterClientPtr client_; - base::WeakPtrFactory<Adapter> weak_ptr_factory_; + base::WeakPtrFactory<Adapter> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Adapter); };
diff --git a/device/bluetooth/bluetooth_adapter.cc b/device/bluetooth/bluetooth_adapter.cc index 250ed1a8..efe6f9b4 100644 --- a/device/bluetooth/bluetooth_adapter.cc +++ b/device/bluetooth/bluetooth_adapter.cc
@@ -346,7 +346,7 @@ BluetoothAdapter::SetPoweredCallbacks::SetPoweredCallbacks() = default; BluetoothAdapter::SetPoweredCallbacks::~SetPoweredCallbacks() = default; -BluetoothAdapter::BluetoothAdapter() : weak_ptr_factory_(this) {} +BluetoothAdapter::BluetoothAdapter() {} BluetoothAdapter::~BluetoothAdapter() { // If there's a pending powered request, run its error callback.
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h index 7961317..0e24b27c 100644 --- a/device/bluetooth/bluetooth_adapter.h +++ b/device/bluetooth/bluetooth_adapter.h
@@ -797,7 +797,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_{this}; }; } // namespace device
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc index caa18e22..8c336959 100644 --- a/device/bluetooth/bluetooth_adapter_factory.cc +++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -216,8 +216,8 @@ } #endif // defined(OS_CHROMEOS) -BluetoothAdapterFactory::GlobalValuesForTesting::GlobalValuesForTesting() - : weak_ptr_factory_(this) {} +BluetoothAdapterFactory::GlobalValuesForTesting::GlobalValuesForTesting() = + default; BluetoothAdapterFactory::GlobalValuesForTesting::~GlobalValuesForTesting() = default;
diff --git a/device/bluetooth/bluetooth_adapter_factory.h b/device/bluetooth/bluetooth_adapter_factory.h index 12262054..d33b22a 100644 --- a/device/bluetooth/bluetooth_adapter_factory.h +++ b/device/bluetooth/bluetooth_adapter_factory.h
@@ -109,7 +109,7 @@ private: bool le_supported_ = false; - base::WeakPtrFactory<GlobalValuesForTesting> weak_ptr_factory_; + base::WeakPtrFactory<GlobalValuesForTesting> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlobalValuesForTesting); };
diff --git a/device/bluetooth/bluetooth_adapter_factory_wrapper.cc b/device/bluetooth/bluetooth_adapter_factory_wrapper.cc index 26f264d..4925403 100644 --- a/device/bluetooth/bluetooth_adapter_factory_wrapper.cc +++ b/device/bluetooth/bluetooth_adapter_factory_wrapper.cc
@@ -89,8 +89,7 @@ set_adapter(std::move(mock_adapter)); } -BluetoothAdapterFactoryWrapper::BluetoothAdapterFactoryWrapper() - : weak_ptr_factory_(this) { +BluetoothAdapterFactoryWrapper::BluetoothAdapterFactoryWrapper() { DCHECK(thread_checker_.CalledOnValidThread()); }
diff --git a/device/bluetooth/bluetooth_adapter_factory_wrapper.h b/device/bluetooth/bluetooth_adapter_factory_wrapper.h index e91b46af..656dcd4e 100644 --- a/device/bluetooth/bluetooth_adapter_factory_wrapper.h +++ b/device/bluetooth/bluetooth_adapter_factory_wrapper.h
@@ -86,7 +86,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAdapterFactoryWrapper> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAdapterFactoryWrapper> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterFactoryWrapper); };
diff --git a/device/bluetooth/bluetooth_discovery_session.cc b/device/bluetooth/bluetooth_discovery_session.cc index d3e4135..d924ef9 100644 --- a/device/bluetooth/bluetooth_discovery_session.cc +++ b/device/bluetooth/bluetooth_discovery_session.cc
@@ -19,8 +19,7 @@ : active_(true), is_stop_in_progress_(false), adapter_(adapter), - discovery_filter_(discovery_filter.release()), - weak_ptr_factory_(this) { + discovery_filter_(discovery_filter.release()) { DCHECK(adapter_.get()); }
diff --git a/device/bluetooth/bluetooth_discovery_session.h b/device/bluetooth/bluetooth_discovery_session.h index a97fa7c..0415c3a 100644 --- a/device/bluetooth/bluetooth_discovery_session.h +++ b/device/bluetooth/bluetooth_discovery_session.h
@@ -116,7 +116,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothDiscoverySession> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothDiscoverySession> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothDiscoverySession); };
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic.cc index 21a6ec2..5962a15 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic.cc +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic.cc
@@ -15,8 +15,7 @@ namespace device { -BluetoothRemoteGattCharacteristic::BluetoothRemoteGattCharacteristic() - : weak_ptr_factory_(this) {} +BluetoothRemoteGattCharacteristic::BluetoothRemoteGattCharacteristic() {} BluetoothRemoteGattCharacteristic::~BluetoothRemoteGattCharacteristic() { while (!pending_notify_commands_.empty()) {
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic.h b/device/bluetooth/bluetooth_remote_gatt_characteristic.h index f7ab17f..64b0875 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic.h +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic.h
@@ -291,7 +291,8 @@ // Set of active notify sessions. std::set<BluetoothGattNotifySession*> notify_sessions_; - base::WeakPtrFactory<BluetoothRemoteGattCharacteristic> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothRemoteGattCharacteristic> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristic); };
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc index ecf7cff..e3a7f3e0 100644 --- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -263,8 +263,7 @@ initialized_(false), dbus_is_shutdown_(false), discovery_request_pending_(false), - force_deactivate_discovery_(false), - weak_ptr_factory_(this) { + force_deactivate_discovery_(false) { ui_task_runner_ = base::ThreadTaskRunnerHandle::Get(); socket_thread_ = device::BluetoothSocketThread::Get();
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.h b/device/bluetooth/bluez/bluetooth_adapter_bluez.h index 62f1c82..3de2d943 100644 --- a/device/bluetooth/bluez/bluetooth_adapter_bluez.h +++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.h
@@ -559,7 +559,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAdapterBlueZ> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.cc index adc8038..1586236d 100644 --- a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.cc
@@ -40,7 +40,7 @@ BluetoothAdapterProfileBlueZ::BluetoothAdapterProfileBlueZ( const device::BluetoothUUID& uuid) - : uuid_(uuid), weak_ptr_factory_(this) { + : uuid_(uuid) { std::string uuid_path; base::ReplaceChars(uuid.canonical_value(), ":-", "_", &uuid_path); object_path_ =
diff --git a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h index f27da5f..00e6b6e 100644 --- a/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h +++ b/device/bluetooth/bluez/bluetooth_adapter_profile_bluez.h
@@ -107,7 +107,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAdapterProfileBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAdapterProfileBlueZ> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterProfileBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.cc b/device/bluetooth/bluez/bluetooth_device_bluez.cc index f7002ed0..8c6f47b 100644 --- a/device/bluetooth/bluez/bluetooth_device_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_device_bluez.cc
@@ -163,8 +163,7 @@ object_path_(object_path), num_connecting_calls_(0), ui_task_runner_(ui_task_runner), - socket_thread_(socket_thread), - weak_ptr_factory_(this) { + socket_thread_(socket_thread) { bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()->AddObserver( this);
diff --git a/device/bluetooth/bluez/bluetooth_device_bluez.h b/device/bluetooth/bluez/bluetooth_device_bluez.h index 0779be84..e934cec 100644 --- a/device/bluetooth/bluez/bluetooth_device_bluez.h +++ b/device/bluetooth/bluez/bluetooth_device_bluez.h
@@ -298,7 +298,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothDeviceBlueZ> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.cc index 2782d8b..fc35863 100644 --- a/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.cc
@@ -11,7 +11,7 @@ BluetoothGattCharacteristicBlueZ::BluetoothGattCharacteristicBlueZ( dbus::ObjectPath object_path) - : object_path_(object_path), weak_ptr_factory_(this) {} + : object_path_(object_path) {} BluetoothGattCharacteristicBlueZ::~BluetoothGattCharacteristicBlueZ() = default;
diff --git a/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h index aa96696..a0769f5e 100644 --- a/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h +++ b/device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h
@@ -36,7 +36,8 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothGattCharacteristicBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothGattCharacteristicBlueZ> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc index 1fb2e331..d785432 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
@@ -47,8 +47,7 @@ uuid_(uuid), properties_(properties), permissions_(permissions), - service_(service), - weak_ptr_factory_(this) { + service_(service) { VLOG(1) << "Creating local GATT characteristic with identifier: " << GetIdentifier(); service->AddCharacteristic(base::WrapUnique(this));
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h index 6f70019..5bf6c40 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h +++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
@@ -74,7 +74,8 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothLocalGattCharacteristicBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothLocalGattCharacteristicBlueZ> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristicBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.cc index 3dd666ae..e0925df 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.cc
@@ -42,8 +42,7 @@ characteristic->object_path().value() + "/descriptor")), uuid_(uuid), permissions_(permissions), - characteristic_(characteristic), - weak_ptr_factory_(this) { + characteristic_(characteristic) { DCHECK(characteristic->GetService()); VLOG(1) << "Creating local GATT descriptor with identifier: " << GetIdentifier();
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h index 1cd0b35..261ae25 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h +++ b/device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h
@@ -50,7 +50,8 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc index 4a25ef9..4551056 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc
@@ -43,8 +43,7 @@ "/service")), uuid_(uuid), is_primary_(is_primary), - delegate_(delegate), - weak_ptr_factory_(this) { + delegate_(delegate) { VLOG(1) << "Creating local GATT service with identifier: " << GetIdentifier(); adapter->AddLocalGattService(base::WrapUnique(this)); }
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h index 1fdc972..9e5cfccb 100644 --- a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h +++ b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h
@@ -88,7 +88,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattServiceBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc index c3f4568..f1e4e79 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.cc
@@ -47,8 +47,7 @@ : BluetoothGattCharacteristicBlueZ(object_path), has_notify_session_(false), service_(service), - num_of_characteristic_value_read_in_progress_(0), - weak_ptr_factory_(this) { + num_of_characteristic_value_read_in_progress_(0) { VLOG(1) << "Creating remote GATT characteristic with identifier: " << GetIdentifier() << ", UUID: " << GetUUID().canonical_value(); bluez::BluezDBusManager::Get()
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h index 2259b46..f435e4d 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
@@ -140,7 +140,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothRemoteGattCharacteristicBlueZ> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattCharacteristicBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.cc b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.cc index eedf09f5..1bcd8453 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.cc
@@ -39,8 +39,7 @@ BluetoothRemoteGattCharacteristicBlueZ* characteristic, const dbus::ObjectPath& object_path) : BluetoothGattDescriptorBlueZ(object_path), - characteristic_(characteristic), - weak_ptr_factory_(this) { + characteristic_(characteristic) { VLOG(1) << "Creating remote GATT descriptor with identifier: " << GetIdentifier() << ", UUID: " << GetUUID().canonical_value(); }
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h index 6b4f4766..513185b 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h
@@ -59,7 +59,8 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothRemoteGattDescriptorBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothRemoteGattDescriptorBlueZ> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorBlueZ); };
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc index ea34248..b2fd577 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc
@@ -22,9 +22,7 @@ BluetoothAdapterBlueZ* adapter, BluetoothDeviceBlueZ* device, const dbus::ObjectPath& object_path) - : BluetoothGattServiceBlueZ(adapter, object_path), - device_(device), - weak_ptr_factory_(this) { + : BluetoothGattServiceBlueZ(adapter, object_path), device_(device) { VLOG(1) << "Creating remote GATT service with identifier: " << object_path.value(); DCHECK(GetAdapter());
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h index d3b7753d..3d288d8 100644 --- a/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h +++ b/device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h
@@ -98,7 +98,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothRemoteGattServiceBlueZ> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceBlueZ); };
diff --git a/device/bluetooth/dbus/bluetooth_adapter_client.cc b/device/bluetooth/dbus/bluetooth_adapter_client.cc index e9eaa3f1..dc694f3e 100644 --- a/device/bluetooth/dbus/bluetooth_adapter_client.cc +++ b/device/bluetooth/dbus/bluetooth_adapter_client.cc
@@ -187,8 +187,7 @@ class BluetoothAdapterClientImpl : public BluetoothAdapterClient, public dbus::ObjectManager::Interface { public: - BluetoothAdapterClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothAdapterClientImpl() : object_manager_(nullptr) {} ~BluetoothAdapterClientImpl() override { // There is an instance of this client that is created but not initialized @@ -614,7 +613,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAdapterClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAdapterClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc index d774a55..0f2bbe6 100644 --- a/device/bluetooth/dbus/bluetooth_agent_manager_client.cc +++ b/device/bluetooth/dbus/bluetooth_agent_manager_client.cc
@@ -24,7 +24,7 @@ class BluetoothAgentManagerClientImpl : public BluetoothAgentManagerClient, public dbus::ObjectManager::Interface { public: - BluetoothAgentManagerClientImpl() : weak_ptr_factory_(this) {} + BluetoothAgentManagerClientImpl() {} ~BluetoothAgentManagerClientImpl() override = default; @@ -177,7 +177,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAgentManagerClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAgentManagerClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAgentManagerClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc index b878013..ed8a3d3f 100644 --- a/device/bluetooth/dbus/bluetooth_agent_service_provider.cc +++ b/device/bluetooth/dbus/bluetooth_agent_service_provider.cc
@@ -30,8 +30,7 @@ : origin_thread_id_(base::PlatformThread::CurrentId()), bus_(bus), delegate_(delegate), - object_path_(object_path), - weak_ptr_factory_(this) { + object_path_(object_path) { VLOG(1) << "Creating Bluetooth Agent: " << object_path_.value(); exported_object_ = bus_->GetExportedObject(object_path_); @@ -425,7 +424,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothAgentServiceProviderImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothAgentServiceProviderImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAgentServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_device_client.cc b/device/bluetooth/dbus/bluetooth_device_client.cc index f2b982bd..4ef0162 100644 --- a/device/bluetooth/dbus/bluetooth_device_client.cc +++ b/device/bluetooth/dbus/bluetooth_device_client.cc
@@ -218,8 +218,7 @@ class BluetoothDeviceClientImpl : public BluetoothDeviceClient, public dbus::ObjectManager::Interface { public: - BluetoothDeviceClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothDeviceClientImpl() : object_manager_(nullptr) {} ~BluetoothDeviceClientImpl() override { // There is an instance of this client that is created but not initialized @@ -670,7 +669,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothDeviceClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothDeviceClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc index 6c7909e..b8754c0 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.cc
@@ -18,8 +18,7 @@ services) : origin_thread_id_(base::PlatformThread::CurrentId()), bus_(bus), - object_path_(object_path), - weak_ptr_factory_(this) { + object_path_(object_path) { VLOG(1) << "Creating Bluetooth GATT application: " << object_path_.value(); DCHECK(object_path_.IsValid()); if (!bus_)
diff --git a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h index 2e8ece1..701dd22 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h +++ b/device/bluetooth/dbus/bluetooth_gatt_application_service_provider_impl.h
@@ -97,7 +97,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothGattApplicationServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattApplicationServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc index 5dbdc04..43a33b4 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_client.cc
@@ -45,8 +45,7 @@ : public BluetoothGattCharacteristicClient, public dbus::ObjectManager::Interface { public: - BluetoothGattCharacteristicClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothGattCharacteristicClientImpl() : object_manager_(nullptr) {} ~BluetoothGattCharacteristicClientImpl() override { object_manager_->UnregisterInterface( @@ -332,7 +331,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothGattCharacteristicClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothGattCharacteristicClientImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.cc index 7fe9b49a..4b5fe33 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.cc
@@ -39,8 +39,7 @@ bus_(bus), delegate_(std::move(delegate)), object_path_(object_path), - service_path_(service_path), - weak_ptr_factory_(this) { + service_path_(service_path) { VLOG(1) << "Created Bluetooth GATT characteristic: " << object_path.value() << " UUID: " << uuid; if (!bus_)
diff --git a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h index e2fc5f1..95c140e7 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h +++ b/device/bluetooth/dbus/bluetooth_gatt_characteristic_service_provider_impl.h
@@ -152,7 +152,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothGattCharacteristicServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattCharacteristicServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc index e3c41e56..2406a7d 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_client.cc
@@ -50,8 +50,7 @@ : public BluetoothGattDescriptorClient, public dbus::ObjectManager::Interface { public: - BluetoothGattDescriptorClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothGattDescriptorClientImpl() : object_manager_(nullptr) {} ~BluetoothGattDescriptorClientImpl() override { object_manager_->UnregisterInterface( @@ -250,7 +249,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothGattDescriptorClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothGattDescriptorClientImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.cc index 26b4aa7..7760031b 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.cc
@@ -38,8 +38,7 @@ bus_(bus), delegate_(std::move(delegate)), object_path_(object_path), - characteristic_path_(characteristic_path), - weak_ptr_factory_(this) { + characteristic_path_(characteristic_path) { VLOG(1) << "Created Bluetooth GATT characteristic descriptor: " << object_path.value() << " UUID: " << uuid; if (!bus_)
diff --git a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h index 9038d616..199256f7 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h +++ b/device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h
@@ -128,7 +128,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothGattDescriptorServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc index 8f22ec7a..3e6aa12 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_manager_client.cc
@@ -22,8 +22,7 @@ // The BluetoothGattManagerClient implementation used in production. class BluetoothGattManagerClientImpl : public BluetoothGattManagerClient { public: - BluetoothGattManagerClientImpl() - : object_manager_(nullptr), weak_ptr_factory_(this) {} + BluetoothGattManagerClientImpl() : object_manager_(nullptr) {} ~BluetoothGattManagerClientImpl() override = default; @@ -125,7 +124,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothGattManagerClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothGattManagerClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattManagerClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc index 232ac02a..06b69f8 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_service_client.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_service_client.cc
@@ -31,8 +31,7 @@ class BluetoothGattServiceClientImpl : public BluetoothGattServiceClient, public dbus::ObjectManager::Interface { public: - BluetoothGattServiceClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothGattServiceClientImpl() : object_manager_(nullptr) {} ~BluetoothGattServiceClientImpl() override { object_manager_->UnregisterInterface( @@ -127,7 +126,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothGattServiceClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothGattServiceClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc index c72be59..5bb3e3d 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc +++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.cc
@@ -30,8 +30,7 @@ is_primary_(is_primary), includes_(includes), bus_(bus), - object_path_(object_path), - weak_ptr_factory_(this) { + object_path_(object_path) { VLOG(1) << "Creating Bluetooth GATT service: " << object_path_.value() << " UUID: " << uuid; if (!bus_)
diff --git a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h index 3658924..eb68394 100644 --- a/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h +++ b/device/bluetooth/dbus/bluetooth_gatt_service_service_provider_impl.h
@@ -92,7 +92,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothGattServiceServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_input_client.cc b/device/bluetooth/dbus/bluetooth_input_client.cc index 85a39cb1..9d37cd6 100644 --- a/device/bluetooth/dbus/bluetooth_input_client.cc +++ b/device/bluetooth/dbus/bluetooth_input_client.cc
@@ -32,7 +32,7 @@ class BluetoothInputClientImpl : public BluetoothInputClient, public dbus::ObjectManager::Interface { public: - BluetoothInputClientImpl() : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothInputClientImpl() : object_manager_(nullptr) {} ~BluetoothInputClientImpl() override { object_manager_->UnregisterInterface( @@ -115,7 +115,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothInputClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothInputClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothInputClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc index bf5fc8ff..58ae1064 100644 --- a/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc +++ b/device/bluetooth/dbus/bluetooth_le_advertisement_service_provider.cc
@@ -45,8 +45,7 @@ service_uuids_(std::move(service_uuids)), manufacturer_data_(std::move(manufacturer_data)), solicit_uuids_(std::move(solicit_uuids)), - service_data_(std::move(service_data)), - weak_ptr_factory_(this) { + service_data_(std::move(service_data)) { DCHECK(bus); DCHECK(delegate); @@ -399,7 +398,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothAdvertisementServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc index e953d3d..12e07a68 100644 --- a/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc +++ b/device/bluetooth/dbus/bluetooth_le_advertising_manager_client.cc
@@ -24,8 +24,7 @@ : public BluetoothLEAdvertisingManagerClient, public dbus::ObjectManager::Interface { public: - BluetoothAdvertisementManagerClientImpl() - : object_manager_(NULL), weak_ptr_factory_(this) {} + BluetoothAdvertisementManagerClientImpl() : object_manager_(nullptr) {} ~BluetoothAdvertisementManagerClientImpl() override { if (object_manager_) { @@ -211,7 +210,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothAdvertisementManagerClientImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothAdvertisementManagerClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_media_client.cc b/device/bluetooth/dbus/bluetooth_media_client.cc index 39f31d8b..ccf6d3f 100644 --- a/device/bluetooth/dbus/bluetooth_media_client.cc +++ b/device/bluetooth/dbus/bluetooth_media_client.cc
@@ -50,8 +50,7 @@ class BluetoothMediaClientImpl : public BluetoothMediaClient, dbus::ObjectManager::Interface { public: - BluetoothMediaClientImpl() - : object_manager_(nullptr), weak_ptr_factory_(this) {} + BluetoothMediaClientImpl() : object_manager_(nullptr) {} ~BluetoothMediaClientImpl() override { object_manager_->UnregisterInterface(kBluetoothMediaInterface); @@ -210,7 +209,7 @@ // List of observers interested in event notifications from us. base::ObserverList<BluetoothMediaClient::Observer>::Unchecked observers_; - base::WeakPtrFactory<BluetoothMediaClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothMediaClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothMediaClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc index 5bcad8ac..04fe714 100644 --- a/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc +++ b/device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.cc
@@ -48,8 +48,7 @@ : origin_thread_id_(base::PlatformThread::CurrentId()), bus_(bus), delegate_(delegate), - object_path_(object_path), - weak_ptr_factory_(this) { + object_path_(object_path) { VLOG(1) << "Creating Bluetooth Media Endpoint: " << object_path_.value(); DCHECK(bus_); DCHECK(delegate_); @@ -283,7 +282,7 @@ // Note This should remain the last member so it'll be destroyed and // invalidate it's weak pointers before any other members are destroyed. base::WeakPtrFactory<BluetoothMediaEndpointServiceProviderImpl> - weak_ptr_factory_; + weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluetoothMediaEndpointServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_media_transport_client.cc b/device/bluetooth/dbus/bluetooth_media_transport_client.cc index bc877c8..28898ed 100644 --- a/device/bluetooth/dbus/bluetooth_media_transport_client.cc +++ b/device/bluetooth/dbus/bluetooth_media_transport_client.cc
@@ -60,8 +60,7 @@ : public BluetoothMediaTransportClient, public dbus::ObjectManager::Interface { public: - BluetoothMediaTransportClientImpl() - : object_manager_(nullptr), weak_ptr_factory_(this) {} + BluetoothMediaTransportClientImpl() : object_manager_(nullptr) {} ~BluetoothMediaTransportClientImpl() override { object_manager_->UnregisterInterface( @@ -272,7 +271,8 @@ base::ObserverList<BluetoothMediaTransportClient::Observer>::Unchecked observers_; - base::WeakPtrFactory<BluetoothMediaTransportClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothMediaTransportClientImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothMediaTransportClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc index 5eb4b1e..86eab733 100644 --- a/device/bluetooth/dbus/bluetooth_profile_manager_client.cc +++ b/device/bluetooth/dbus/bluetooth_profile_manager_client.cc
@@ -24,7 +24,7 @@ // The BluetoothProfileManagerClient implementation used in production. class BluetoothProfileManagerClientImpl : public BluetoothProfileManagerClient { public: - BluetoothProfileManagerClientImpl() : weak_ptr_factory_(this) {} + BluetoothProfileManagerClientImpl() {} ~BluetoothProfileManagerClientImpl() override = default; @@ -220,7 +220,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothProfileManagerClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothProfileManagerClientImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClientImpl); };
diff --git a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc index 1650e48..2f8dcd20 100644 --- a/device/bluetooth/dbus/bluetooth_profile_service_provider.cc +++ b/device/bluetooth/dbus/bluetooth_profile_service_provider.cc
@@ -30,8 +30,7 @@ : origin_thread_id_(base::PlatformThread::CurrentId()), bus_(bus), delegate_(delegate), - object_path_(object_path), - weak_ptr_factory_(this) { + object_path_(object_path) { VLOG(1) << "Creating Bluetooth Profile: " << object_path_.value(); exported_object_ = bus_->GetExportedObject(object_path_); @@ -228,7 +227,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluetoothProfileServiceProviderImpl> weak_ptr_factory_; + base::WeakPtrFactory<BluetoothProfileServiceProviderImpl> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProviderImpl); };
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.cc b/device/bluetooth/dbus/bluez_dbus_manager.cc index 739adba1..853fe8a 100644 --- a/device/bluetooth/dbus/bluez_dbus_manager.cc +++ b/device/bluetooth/dbus/bluez_dbus_manager.cc
@@ -46,8 +46,7 @@ : bus_(bus), alternate_bus_(alternate_bus), object_manager_support_known_(false), - object_manager_supported_(false), - weak_ptr_factory_(this) { + object_manager_supported_(false) { // On Chrome OS, Bluez might not be ready by the time we initialize the // BluezDBusManager so we initialize the clients anyway. bool should_check_object_manager = true;
diff --git a/device/bluetooth/dbus/bluez_dbus_manager.h b/device/bluetooth/dbus/bluez_dbus_manager.h index 4fb2e74..7ba6f01bf 100644 --- a/device/bluetooth/dbus/bluez_dbus_manager.h +++ b/device/bluetooth/dbus/bluez_dbus_manager.h
@@ -173,7 +173,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BluezDBusManager> weak_ptr_factory_; + base::WeakPtrFactory<BluezDBusManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BluezDBusManager); };
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc index f19914c..42b8acff 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.cc
@@ -81,8 +81,7 @@ authorized_(true), authenticated_(true), calories_burned_(0), - extra_requests_(0), - weak_ptr_factory_(this) {} + extra_requests_(0) {} FakeBluetoothGattCharacteristicClient:: ~FakeBluetoothGattCharacteristicClient() {
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h index 7810e27e..217636c 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_characteristic_client.h
@@ -201,7 +201,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> weak_ptr_factory_; + base::WeakPtrFactory<FakeBluetoothGattCharacteristicClient> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattCharacteristicClient); };
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc index fa46713..df5f8e3 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.cc
@@ -55,8 +55,7 @@ FakeBluetoothGattDescriptorClient::DescriptorData::~DescriptorData() = default; -FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() - : weak_ptr_factory_(this) {} +FakeBluetoothGattDescriptorClient::FakeBluetoothGattDescriptorClient() {} FakeBluetoothGattDescriptorClient::~FakeBluetoothGattDescriptorClient() { for (auto iter = properties_.begin(); iter != properties_.end(); iter++)
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h index a1ae410db..ef30c5ec 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_descriptor_client.h
@@ -97,7 +97,8 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FakeBluetoothGattDescriptorClient> weak_ptr_factory_; + base::WeakPtrFactory<FakeBluetoothGattDescriptorClient> weak_ptr_factory_{ + this}; DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorClient); };
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc index b3781d6..e7d13ab 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.cc
@@ -55,8 +55,7 @@ std::move(callback).Run(false); } -FakeBluetoothGattServiceClient::FakeBluetoothGattServiceClient() - : weak_ptr_factory_(this) {} +FakeBluetoothGattServiceClient::FakeBluetoothGattServiceClient() {} FakeBluetoothGattServiceClient::~FakeBluetoothGattServiceClient() = default;
diff --git a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h index cac2a56..cb5f2be6 100644 --- a/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h +++ b/device/bluetooth/dbus/fake_bluetooth_gatt_service_client.h
@@ -120,7 +120,7 @@ // than we do. // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_; + base::WeakPtrFactory<FakeBluetoothGattServiceClient> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattServiceClient); };
diff --git a/device/bluetooth/device.cc b/device/bluetooth/device.cc index 324ff41..75c276e 100644 --- a/device/bluetooth/device.cc +++ b/device/bluetooth/device.cc
@@ -305,9 +305,7 @@ Device::Device(scoped_refptr<device::BluetoothAdapter> adapter, std::unique_ptr<device::BluetoothGattConnection> connection) - : adapter_(std::move(adapter)), - connection_(std::move(connection)), - weak_ptr_factory_(this) { + : adapter_(std::move(adapter)), connection_(std::move(connection)) { adapter_->AddObserver(this); }
diff --git a/device/bluetooth/device.h b/device/bluetooth/device.h index c024f62e..b74276b5 100644 --- a/device/bluetooth/device.h +++ b/device/bluetooth/device.h
@@ -128,7 +128,7 @@ // services to be discovered for this device. std::vector<base::Closure> pending_services_requests_; - base::WeakPtrFactory<Device> weak_ptr_factory_; + base::WeakPtrFactory<Device> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Device); };
diff --git a/device/bluetooth/device_unittest.cc b/device/bluetooth/device_unittest.cc index b43aa6a..b8a0f83 100644 --- a/device/bluetooth/device_unittest.cc +++ b/device/bluetooth/device_unittest.cc
@@ -72,8 +72,7 @@ kTestLeDeviceName0, kTestLeDeviceAddress0, false, - true), - weak_factory_(this) { + true) { ON_CALL(*adapter_, GetDevice(kTestLeDeviceAddress0)) .WillByDefault(Return(&device_)); @@ -185,7 +184,7 @@ int actual_callback_count_ = 0; int expected_callback_count_ = 0; - base::WeakPtrFactory<BluetoothInterfaceDeviceTest> weak_factory_; + base::WeakPtrFactory<BluetoothInterfaceDeviceTest> weak_factory_{this}; }; } // namespace
diff --git a/device/bluetooth/discovery_session.cc b/device/bluetooth/discovery_session.cc index 0ccb89c..f8ce69d 100644 --- a/device/bluetooth/discovery_session.cc +++ b/device/bluetooth/discovery_session.cc
@@ -11,7 +11,7 @@ namespace bluetooth { DiscoverySession::DiscoverySession( std::unique_ptr<device::BluetoothDiscoverySession> session) - : discovery_session_(std::move(session)), weak_ptr_factory_(this) {} + : discovery_session_(std::move(session)) {} DiscoverySession::~DiscoverySession() = default;
diff --git a/device/bluetooth/discovery_session.h b/device/bluetooth/discovery_session.h index b8d931c5..fbed24b 100644 --- a/device/bluetooth/discovery_session.h +++ b/device/bluetooth/discovery_session.h
@@ -37,7 +37,7 @@ // The underlying discovery session. std::unique_ptr<device::BluetoothDiscoverySession> discovery_session_; - base::WeakPtrFactory<DiscoverySession> weak_ptr_factory_; + base::WeakPtrFactory<DiscoverySession> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DiscoverySession); };
diff --git a/device/bluetooth/test/bluetooth_test.cc b/device/bluetooth/test/bluetooth_test.cc index e4a1bcd3..fc8ae24 100644 --- a/device/bluetooth/test/bluetooth_test.cc +++ b/device/bluetooth/test/bluetooth_test.cc
@@ -78,7 +78,7 @@ const char BluetoothTestBase::kTestUuidFormattedClientEid[] = "00010203-0405-0607-0809-101112131415"; -BluetoothTestBase::BluetoothTestBase() : weak_factory_(this) {} +BluetoothTestBase::BluetoothTestBase() {} BluetoothTestBase::~BluetoothTestBase() = default; void BluetoothTestBase::StartLowEnergyDiscoverySession() {
diff --git a/device/bluetooth/test/bluetooth_test.h b/device/bluetooth/test/bluetooth_test.h index 2c74ff88..8c476bc 100644 --- a/device/bluetooth/test/bluetooth_test.h +++ b/device/bluetooth/test/bluetooth_test.h
@@ -685,7 +685,7 @@ bool unexpected_success_callback_ = false; bool unexpected_error_callback_ = false; - base::WeakPtrFactory<BluetoothTestBase> weak_factory_; + base::WeakPtrFactory<BluetoothTestBase> weak_factory_{this}; }; } // namespace device
diff --git a/device/bluetooth/test/fake_peripheral.cc b/device/bluetooth/test/fake_peripheral.cc index c0838d2..91c8162 100644 --- a/device/bluetooth/test/fake_peripheral.cc +++ b/device/bluetooth/test/fake_peripheral.cc
@@ -24,8 +24,7 @@ system_connected_(false), gatt_connected_(false), last_service_id_(0), - pending_gatt_discovery_(false), - weak_ptr_factory_(this) {} + pending_gatt_discovery_(false) {} FakePeripheral::~FakePeripheral() = default;
diff --git a/device/bluetooth/test/fake_peripheral.h b/device/bluetooth/test/fake_peripheral.h index 797cf79..e9107e0 100644 --- a/device/bluetooth/test/fake_peripheral.h +++ b/device/bluetooth/test/fake_peripheral.h
@@ -153,7 +153,7 @@ // Mutable because IsGattServicesDiscoveryComplete needs to post a task but // is const. - mutable base::WeakPtrFactory<FakePeripheral> weak_ptr_factory_; + mutable base::WeakPtrFactory<FakePeripheral> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakePeripheral); };
diff --git a/device/bluetooth/test/fake_remote_gatt_characteristic.cc b/device/bluetooth/test/fake_remote_gatt_characteristic.cc index bc0c159..f8104a7 100644 --- a/device/bluetooth/test/fake_remote_gatt_characteristic.cc +++ b/device/bluetooth/test/fake_remote_gatt_characteristic.cc
@@ -23,8 +23,7 @@ device::BluetoothRemoteGattService* service) : characteristic_id_(characteristic_id), characteristic_uuid_(characteristic_uuid), - service_(service), - weak_ptr_factory_(this) { + service_(service) { properties_ = PROPERTY_NONE; if (properties->broadcast) properties_ |= PROPERTY_BROADCAST;
diff --git a/device/bluetooth/test/fake_remote_gatt_characteristic.h b/device/bluetooth/test/fake_remote_gatt_characteristic.h index 2d1f41b..c7bcef3 100644 --- a/device/bluetooth/test/fake_remote_gatt_characteristic.h +++ b/device/bluetooth/test/fake_remote_gatt_characteristic.h
@@ -154,7 +154,7 @@ size_t last_descriptor_id_; - base::WeakPtrFactory<FakeRemoteGattCharacteristic> weak_ptr_factory_; + base::WeakPtrFactory<FakeRemoteGattCharacteristic> weak_ptr_factory_{this}; }; } // namespace bluetooth
diff --git a/device/bluetooth/test/fake_remote_gatt_descriptor.cc b/device/bluetooth/test/fake_remote_gatt_descriptor.cc index 4a704c0..74b5801f 100644 --- a/device/bluetooth/test/fake_remote_gatt_descriptor.cc +++ b/device/bluetooth/test/fake_remote_gatt_descriptor.cc
@@ -18,8 +18,7 @@ device::BluetoothRemoteGattCharacteristic* characteristic) : descriptor_id_(descriptor_id), descriptor_uuid_(descriptor_uuid), - characteristic_(characteristic), - weak_ptr_factory_(this) {} + characteristic_(characteristic) {} FakeRemoteGattDescriptor::~FakeRemoteGattDescriptor() = default;
diff --git a/device/bluetooth/test/fake_remote_gatt_descriptor.h b/device/bluetooth/test/fake_remote_gatt_descriptor.h index 3a997a5..0516fc1 100644 --- a/device/bluetooth/test/fake_remote_gatt_descriptor.h +++ b/device/bluetooth/test/fake_remote_gatt_descriptor.h
@@ -87,7 +87,7 @@ // is called. base::Optional<uint16_t> next_write_response_; - base::WeakPtrFactory<FakeRemoteGattDescriptor> weak_ptr_factory_; + base::WeakPtrFactory<FakeRemoteGattDescriptor> weak_ptr_factory_{this}; }; } // namespace bluetooth
diff --git a/device/fido/bio/enrollment_handler.cc b/device/fido/bio/enrollment_handler.cc index 1fdd87a0b..194ee40 100644 --- a/device/fido/bio/enrollment_handler.cc +++ b/device/fido/bio/enrollment_handler.cc
@@ -22,8 +22,7 @@ : FidoRequestHandlerBase(connector, factory, supported_transports), ready_callback_(std::move(ready_callback)), error_callback_(std::move(error_callback)), - get_pin_callback_(std::move(get_pin_callback)), - weak_factory_(this) { + get_pin_callback_(std::move(get_pin_callback)) { Start(); }
diff --git a/device/fido/bio/enrollment_handler.h b/device/fido/bio/enrollment_handler.h index 1964f66..607d0b3 100644 --- a/device/fido/bio/enrollment_handler.h +++ b/device/fido/bio/enrollment_handler.h
@@ -113,7 +113,7 @@ ErrorCallback error_callback_; GetPINCallback get_pin_callback_; base::Optional<pin::TokenResponse> pin_token_response_; - base::WeakPtrFactory<BioEnrollmentHandler> weak_factory_; + base::WeakPtrFactory<BioEnrollmentHandler> weak_factory_{this}; BioEnrollmentHandler(const BioEnrollmentHandler&) = delete; BioEnrollmentHandler(BioEnrollmentHandler&&) = delete;
diff --git a/device/fido/ble/fido_ble_connection.cc b/device/fido/ble/fido_ble_connection.cc index 23dadd9..235d898 100644 --- a/device/fido/ble/fido_ble_connection.cc +++ b/device/fido/ble/fido_ble_connection.cc
@@ -149,14 +149,12 @@ } // namespace -FidoBleConnection::FidoBleConnection( - BluetoothAdapter* adapter, - std::string device_address, - ReadCallback read_callback) +FidoBleConnection::FidoBleConnection(BluetoothAdapter* adapter, + std::string device_address, + ReadCallback read_callback) : adapter_(adapter), address_(std::move(device_address)), - read_callback_(std::move(read_callback)), - weak_factory_(this) { + read_callback_(std::move(read_callback)) { DCHECK(adapter_); adapter_->AddObserver(this); DCHECK(!address_.empty()); @@ -176,9 +174,7 @@ FidoBleConnection::FidoBleConnection(BluetoothAdapter* adapter, std::string device_address) - : adapter_(adapter), - address_(std::move(device_address)), - weak_factory_(this) { + : adapter_(adapter), address_(std::move(device_address)) { adapter_->AddObserver(this); }
diff --git a/device/fido/ble/fido_ble_connection.h b/device/fido/ble/fido_ble_connection.h index 0b403bcb..796126d 100644 --- a/device/fido/ble/fido_ble_connection.h +++ b/device/fido/ble/fido_ble_connection.h
@@ -124,7 +124,7 @@ base::Optional<std::string> service_revision_id_; base::Optional<std::string> service_revision_bitfield_id_; - base::WeakPtrFactory<FidoBleConnection> weak_factory_; + base::WeakPtrFactory<FidoBleConnection> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoBleConnection); };
diff --git a/device/fido/ble/fido_ble_device.cc b/device/fido/ble/fido_ble_device.cc index f570521..a2839f1 100644 --- a/device/fido/ble/fido_ble_device.cc +++ b/device/fido/ble/fido_ble_device.cc
@@ -19,8 +19,7 @@ namespace device { -FidoBleDevice::FidoBleDevice(BluetoothAdapter* adapter, std::string address) - : weak_factory_(this) { +FidoBleDevice::FidoBleDevice(BluetoothAdapter* adapter, std::string address) { connection_ = std::make_unique<FidoBleConnection>( adapter, std::move(address), base::BindRepeating(&FidoBleDevice::OnStatusMessage, @@ -28,7 +27,7 @@ } FidoBleDevice::FidoBleDevice(std::unique_ptr<FidoBleConnection> connection) - : connection_(std::move(connection)), weak_factory_(this) {} + : connection_(std::move(connection)) {} FidoBleDevice::~FidoBleDevice() = default;
diff --git a/device/fido/ble/fido_ble_device.h b/device/fido/ble/fido_ble_device.h index e7487b31..57c10e2b 100644 --- a/device/fido/ble/fido_ble_device.h +++ b/device/fido/ble/fido_ble_device.h
@@ -108,7 +108,7 @@ base::Optional<CancelToken> current_token_; base::Optional<FidoBleTransaction> transaction_; - base::WeakPtrFactory<FidoBleDevice> weak_factory_; + base::WeakPtrFactory<FidoBleDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoBleDevice); };
diff --git a/device/fido/ble/fido_ble_discovery.cc b/device/fido/ble/fido_ble_discovery.cc index 996805709..6a2e73d6 100644 --- a/device/fido/ble/fido_ble_discovery.cc +++ b/device/fido/ble/fido_ble_discovery.cc
@@ -23,8 +23,7 @@ namespace device { FidoBleDiscovery::FidoBleDiscovery() - : FidoBleDiscoveryBase(FidoTransportProtocol::kBluetoothLowEnergy), - weak_factory_(this) {} + : FidoBleDiscoveryBase(FidoTransportProtocol::kBluetoothLowEnergy) {} FidoBleDiscovery::~FidoBleDiscovery() = default;
diff --git a/device/fido/ble/fido_ble_discovery.h b/device/fido/ble/fido_ble_discovery.h index f786fc0..a2ca985 100644 --- a/device/fido/ble/fido_ble_discovery.h +++ b/device/fido/ble/fido_ble_discovery.h
@@ -73,7 +73,7 @@ // Maps Bluetooth FIDO authenticators that are known to be in pairing mode. std::map<std::string, std::unique_ptr<base::OneShotTimer>> pairing_mode_device_tracker_; - base::WeakPtrFactory<FidoBleDiscovery> weak_factory_; + base::WeakPtrFactory<FidoBleDiscovery> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoBleDiscovery); };
diff --git a/device/fido/ble/fido_ble_discovery_base.cc b/device/fido/ble/fido_ble_discovery_base.cc index 0758e0f..5b094531 100644 --- a/device/fido/ble/fido_ble_discovery_base.cc +++ b/device/fido/ble/fido_ble_discovery_base.cc
@@ -20,7 +20,7 @@ namespace device { FidoBleDiscoveryBase::FidoBleDiscoveryBase(FidoTransportProtocol transport) - : FidoDeviceDiscovery(transport), weak_factory_(this) {} + : FidoDeviceDiscovery(transport) {} FidoBleDiscoveryBase::~FidoBleDiscoveryBase() { if (adapter_)
diff --git a/device/fido/ble/fido_ble_discovery_base.h b/device/fido/ble/fido_ble_discovery_base.h index 42e6aa6..d23774c 100644 --- a/device/fido/ble/fido_ble_discovery_base.h +++ b/device/fido/ble/fido_ble_discovery_base.h
@@ -50,7 +50,7 @@ scoped_refptr<BluetoothAdapter> adapter_; std::unique_ptr<BluetoothDiscoverySession> discovery_session_; - base::WeakPtrFactory<FidoBleDiscoveryBase> weak_factory_; + base::WeakPtrFactory<FidoBleDiscoveryBase> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoBleDiscoveryBase); };
diff --git a/device/fido/ble/fido_ble_transaction.cc b/device/fido/ble/fido_ble_transaction.cc index d7c111a..ae3a4dd 100644 --- a/device/fido/ble/fido_ble_transaction.cc +++ b/device/fido/ble/fido_ble_transaction.cc
@@ -17,9 +17,7 @@ FidoBleTransaction::FidoBleTransaction(FidoBleConnection* connection, uint16_t control_point_length) - : connection_(connection), - control_point_length_(control_point_length), - weak_factory_(this) { + : connection_(connection), control_point_length_(control_point_length) { buffer_.reserve(control_point_length_); }
diff --git a/device/fido/ble/fido_ble_transaction.h b/device/fido/ble/fido_ble_transaction.h index 53ab478..87c12e5 100644 --- a/device/fido/ble/fido_ble_transaction.h +++ b/device/fido/ble/fido_ble_transaction.h
@@ -65,7 +65,7 @@ // cancel_sent_ records whether a cancel message has already been sent. bool cancel_sent_ = false; - base::WeakPtrFactory<FidoBleTransaction> weak_factory_; + base::WeakPtrFactory<FidoBleTransaction> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoBleTransaction); };
diff --git a/device/fido/ble_adapter_manager.cc b/device/fido/ble_adapter_manager.cc index 0ba25bfd..168b0900 100644 --- a/device/fido/ble_adapter_manager.cc +++ b/device/fido/ble_adapter_manager.cc
@@ -15,7 +15,7 @@ namespace device { BleAdapterManager::BleAdapterManager(FidoRequestHandlerBase* request_handler) - : request_handler_(request_handler), weak_factory_(this) { + : request_handler_(request_handler) { BluetoothAdapterFactory::Get().GetAdapter( base::BindOnce(&BleAdapterManager::Start, weak_factory_.GetWeakPtr())); }
diff --git a/device/fido/ble_adapter_manager.h b/device/fido/ble_adapter_manager.h index cb38693f..45ac0157 100644 --- a/device/fido/ble_adapter_manager.h +++ b/device/fido/ble_adapter_manager.h
@@ -53,7 +53,7 @@ FidoBlePairingDelegate pairing_delegate_; bool adapter_powered_on_programmatically_ = false; - base::WeakPtrFactory<BleAdapterManager> weak_factory_; + base::WeakPtrFactory<BleAdapterManager> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BleAdapterManager); };
diff --git a/device/fido/cable/fido_cable_device.cc b/device/fido/cable/fido_cable_device.cc index a277074..914f8baf 100644 --- a/device/fido/cable/fido_cable_device.cc +++ b/device/fido/cable/fido_cable_device.cc
@@ -51,9 +51,11 @@ if (!nonce) return false; - DCHECK_EQ(nonce->size(), encryption_data->aes_key.NonceLength()); + crypto::Aead aes_key(crypto::Aead::AES_256_GCM); + aes_key.Init(&encryption_data->session_key); + DCHECK_EQ(nonce->size(), aes_key.NonceLength()); std::string ciphertext; - bool encryption_success = encryption_data->aes_key.Seal( + bool encryption_success = aes_key.Seal( fido_parsing_utils::ConvertToStringPiece(*message_to_encrypt), fido_parsing_utils::ConvertToStringPiece(*nonce), std::string(1, base::strict_cast<uint8_t>(FidoBleDeviceCommand::kMsg)), @@ -77,10 +79,12 @@ if (!nonce) return false; - DCHECK_EQ(nonce->size(), encryption_data->aes_key.NonceLength()); + crypto::Aead aes_key(crypto::Aead::AES_256_GCM); + aes_key.Init(&encryption_data->session_key); + DCHECK_EQ(nonce->size(), aes_key.NonceLength()); std::string plaintext; - bool decryption_success = encryption_data->aes_key.Open( + bool decryption_success = aes_key.Open( fido_parsing_utils::ConvertToStringPiece(incoming_frame->data()), fido_parsing_utils::ConvertToStringPiece(*nonce), std::string(1, base::strict_cast<uint8_t>(incoming_frame->command())), @@ -100,10 +104,7 @@ std::string encryption_key, base::span<const uint8_t, 8> nonce) : session_key(std::move(encryption_key)), - nonce(fido_parsing_utils::Materialize(nonce)) { - DCHECK_EQ(session_key.size(), aes_key.KeyLength()); - aes_key.Init(&session_key); -} + nonce(fido_parsing_utils::Materialize(nonce)) {} FidoCableDevice::EncryptionData::EncryptionData(EncryptionData&& data) = default; @@ -116,10 +117,10 @@ // FidoCableDevice::EncryptionData ---------------------------------------- FidoCableDevice::FidoCableDevice(BluetoothAdapter* adapter, std::string address) - : FidoBleDevice(adapter, std::move(address)), weak_factory_(this) {} + : FidoBleDevice(adapter, std::move(address)) {} FidoCableDevice::FidoCableDevice(std::unique_ptr<FidoBleConnection> connection) - : FidoBleDevice(std::move(connection)), weak_factory_(this) {} + : FidoBleDevice(std::move(connection)) {} FidoCableDevice::~FidoCableDevice() = default;
diff --git a/device/fido/cable/fido_cable_device.h b/device/fido/cable/fido_cable_device.h index 0ea84bbb..7902b8d 100644 --- a/device/fido/cable/fido_cable_device.h +++ b/device/fido/cable/fido_cable_device.h
@@ -36,7 +36,6 @@ std::string session_key; std::array<uint8_t, 8> nonce; - crypto::Aead aes_key{crypto::Aead::AES_256_GCM}; uint32_t write_sequence_num = 0; uint32_t read_sequence_num = 0; @@ -71,7 +70,7 @@ TestCableDeviceErrorOnMaxCounter); base::Optional<EncryptionData> encryption_data_; - base::WeakPtrFactory<FidoCableDevice> weak_factory_; + base::WeakPtrFactory<FidoCableDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoCableDevice); };
diff --git a/device/fido/cable/fido_cable_discovery.cc b/device/fido/cable/fido_cable_discovery.cc index 48e1b55..ac40c56 100644 --- a/device/fido/cable/fido_cable_discovery.cc +++ b/device/fido/cable/fido_cable_discovery.cc
@@ -132,8 +132,7 @@ std::vector<CableDiscoveryData> discovery_data) : FidoBleDiscoveryBase( FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy), - discovery_data_(std::move(discovery_data)), - weak_factory_(this) { + discovery_data_(std::move(discovery_data)) { // Windows currently does not support multiple EIDs, thus we ignore any extra // discovery data. // TODO(https://crbug.com/837088): Add support for multiple EIDs on Windows.
diff --git a/device/fido/cable/fido_cable_discovery.h b/device/fido/cable/fido_cable_discovery.h index 09dfc2c..302b7c0 100644 --- a/device/fido/cable/fido_cable_discovery.h +++ b/device/fido/cable/fido_cable_discovery.h
@@ -107,7 +107,7 @@ std::map<EidArray, scoped_refptr<BluetoothAdvertisement>> advertisements_; std::vector<std::unique_ptr<FidoCableHandshakeHandler>> cable_handshake_handlers_; - base::WeakPtrFactory<FidoCableDiscovery> weak_factory_; + base::WeakPtrFactory<FidoCableDiscovery> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoCableDiscovery); };
diff --git a/device/fido/cable/fido_cable_handshake_handler.cc b/device/fido/cable/fido_cable_handshake_handler.cc index c08fc60..b41b2e0 100644 --- a/device/fido/cable/fido_cable_handshake_handler.cc +++ b/device/fido/cable/fido_cable_handshake_handler.cc
@@ -86,8 +86,7 @@ handshake_key_(GenerateKey( fido_parsing_utils::ConvertToStringPiece(session_pre_key_), fido_parsing_utils::ConvertToStringPiece(nonce_), - kCableHandshakeKeyInfo)), - weak_factory_(this) { + kCableHandshakeKeyInfo)) { crypto::RandBytes(client_session_random_.data(), client_session_random_.size()); }
diff --git a/device/fido/cable/fido_cable_handshake_handler.h b/device/fido/cable/fido_cable_handshake_handler.h index 175b55d..7cd3f291 100644 --- a/device/fido/cable/fido_cable_handshake_handler.h +++ b/device/fido/cable/fido_cable_handshake_handler.h
@@ -52,7 +52,7 @@ std::array<uint8_t, 16> client_session_random_; std::string handshake_key_; - base::WeakPtrFactory<FidoCableHandshakeHandler> weak_factory_; + base::WeakPtrFactory<FidoCableHandshakeHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoCableHandshakeHandler); };
diff --git a/device/fido/credential_management_handler.cc b/device/fido/credential_management_handler.cc index 06d85b7..bc22ccea 100644 --- a/device/fido/credential_management_handler.cc +++ b/device/fido/credential_management_handler.cc
@@ -30,8 +30,7 @@ supported_transports), ready_callback_(std::move(ready_callback)), get_pin_callback_(std::move(get_pin_callback)), - finished_callback_(std::move(finished_callback)), - weak_factory_(this) { + finished_callback_(std::move(finished_callback)) { Start(); }
diff --git a/device/fido/credential_management_handler.h b/device/fido/credential_management_handler.h index f67532b8..4720fc9c8 100644 --- a/device/fido/credential_management_handler.h +++ b/device/fido/credential_management_handler.h
@@ -134,7 +134,7 @@ GetCredentialsCallback get_credentials_callback_; FinishedCallback finished_callback_; - base::WeakPtrFactory<CredentialManagementHandler> weak_factory_; + base::WeakPtrFactory<CredentialManagementHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(CredentialManagementHandler); };
diff --git a/device/fido/ctap2_device_operation.h b/device/fido/ctap2_device_operation.h index 0dc6b90..4a36e5cf 100644 --- a/device/fido/ctap2_device_operation.h +++ b/device/fido/ctap2_device_operation.h
@@ -69,8 +69,7 @@ std::move(request), std::move(callback)), device_response_parser_(std::move(device_response_parser)), - string_fixup_predicate_(string_fixup_predicate), - weak_factory_(this) {} + string_fixup_predicate_(string_fixup_predicate) {} ~Ctap2DeviceOperation() override = default; @@ -204,7 +203,7 @@ private: DeviceResponseParser device_response_parser_; const CBORPathPredicate string_fixup_predicate_; - base::WeakPtrFactory<Ctap2DeviceOperation> weak_factory_; + base::WeakPtrFactory<Ctap2DeviceOperation> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Ctap2DeviceOperation); };
diff --git a/device/fido/fido_device_authenticator.cc b/device/fido/fido_device_authenticator.cc index d6357b0f..3f74148 100644 --- a/device/fido/fido_device_authenticator.cc +++ b/device/fido/fido_device_authenticator.cc
@@ -25,7 +25,7 @@ FidoDeviceAuthenticator::FidoDeviceAuthenticator( std::unique_ptr<FidoDevice> device) - : device_(std::move(device)), weak_factory_(this) {} + : device_(std::move(device)) {} FidoDeviceAuthenticator::~FidoDeviceAuthenticator() = default; void FidoDeviceAuthenticator::InitializeAuthenticator(
diff --git a/device/fido/fido_device_authenticator.h b/device/fido/fido_device_authenticator.h index 180d7ac1..6ca4a1a 100644 --- a/device/fido/fido_device_authenticator.h +++ b/device/fido/fido_device_authenticator.h
@@ -165,7 +165,7 @@ base::Optional<AuthenticatorSupportedOptions> options_; std::unique_ptr<FidoTask> task_; std::unique_ptr<GenericDeviceOperation> operation_; - base::WeakPtrFactory<FidoDeviceAuthenticator> weak_factory_; + base::WeakPtrFactory<FidoDeviceAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoDeviceAuthenticator); };
diff --git a/device/fido/fido_device_discovery.cc b/device/fido/fido_device_discovery.cc index 7aa1cc0d..ae9ab15 100644 --- a/device/fido/fido_device_discovery.cc +++ b/device/fido/fido_device_discovery.cc
@@ -17,7 +17,7 @@ FidoDeviceDiscovery::Observer::~Observer() = default; FidoDeviceDiscovery::FidoDeviceDiscovery(FidoTransportProtocol transport) - : FidoDiscoveryBase(transport), weak_factory_(this) {} + : FidoDiscoveryBase(transport) {} FidoDeviceDiscovery::~FidoDeviceDiscovery() = default;
diff --git a/device/fido/fido_device_discovery.h b/device/fido/fido_device_discovery.h index fd8037f0..dd9b5d1 100644 --- a/device/fido/fido_device_discovery.h +++ b/device/fido/fido_device_discovery.h
@@ -74,7 +74,7 @@ private: State state_ = State::kIdle; - base::WeakPtrFactory<FidoDeviceDiscovery> weak_factory_; + base::WeakPtrFactory<FidoDeviceDiscovery> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoDeviceDiscovery); };
diff --git a/device/fido/fido_request_handler_base.cc b/device/fido/fido_request_handler_base.cc index dcad2b1..d5b1ef7 100644 --- a/device/fido/fido_request_handler_base.cc +++ b/device/fido/fido_request_handler_base.cc
@@ -49,9 +49,7 @@ service_manager::Connector* connector, FidoDiscoveryFactory* fido_discovery_factory, const base::flat_set<FidoTransportProtocol>& available_transports) - : fido_discovery_factory_(fido_discovery_factory), - connector_(connector), - weak_factory_(this) { + : fido_discovery_factory_(fido_discovery_factory), connector_(connector) { #if defined(OS_WIN) InitDiscoveriesWin(available_transports); #else
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h index af0f5e4a..cfcf6493 100644 --- a/device/fido/fido_request_handler_base.h +++ b/device/fido/fido_request_handler_base.h
@@ -275,7 +275,7 @@ std::unique_ptr<BleAdapterManager> bluetooth_adapter_manager_; service_manager::Connector* const connector_; - base::WeakPtrFactory<FidoRequestHandlerBase> weak_factory_; + base::WeakPtrFactory<FidoRequestHandlerBase> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoRequestHandlerBase); };
diff --git a/device/fido/fido_request_handler_unittest.cc b/device/fido/fido_request_handler_unittest.cc index 8517667..ebbd7b6 100644 --- a/device/fido/fido_request_handler_unittest.cc +++ b/device/fido/fido_request_handler_unittest.cc
@@ -179,7 +179,7 @@ class FakeFidoTask : public FidoTask { public: FakeFidoTask(FidoDevice* device, FakeTaskCallback callback) - : FidoTask(device), callback_(std::move(callback)), weak_factory_(this) {} + : FidoTask(device), callback_(std::move(callback)) {} ~FakeFidoTask() override = default; void Cancel() override { @@ -225,7 +225,7 @@ private: base::Optional<FidoDevice::CancelToken> token_; FakeTaskCallback callback_; - base::WeakPtrFactory<FakeFidoTask> weak_factory_; + base::WeakPtrFactory<FakeFidoTask> weak_factory_{this}; }; class FakeFidoRequestHandler : public FidoRequestHandler<std::vector<uint8_t>> { @@ -237,8 +237,7 @@ : FidoRequestHandler(connector, fake_discovery_factory, protocols, - std::move(callback)), - weak_factory_(this) { + std::move(callback)) { Start(); } FakeFidoRequestHandler(test::FakeFidoDiscoveryFactory* fake_discovery_factory, @@ -288,7 +287,7 @@ OnAuthenticatorResponse(authenticator, *maybe_result, std::move(response)); } - base::WeakPtrFactory<FakeFidoRequestHandler> weak_factory_; + base::WeakPtrFactory<FakeFidoRequestHandler> weak_factory_{this}; }; std::vector<uint8_t> CreateFakeSuccessDeviceResponse() {
diff --git a/device/fido/fido_task.cc b/device/fido/fido_task.cc index 138e967..f0f48c95 100644 --- a/device/fido/fido_task.cc +++ b/device/fido/fido_task.cc
@@ -13,7 +13,7 @@ namespace device { -FidoTask::FidoTask(FidoDevice* device) : device_(device), weak_factory_(this) { +FidoTask::FidoTask(FidoDevice* device) : device_(device) { DCHECK(device_); DCHECK(device_->SupportedProtocolIsInitialized()); base::SequencedTaskRunnerHandle::Get()->PostTask(
diff --git a/device/fido/fido_task.h b/device/fido/fido_task.h index 9480f31..d4295a8 100644 --- a/device/fido/fido_task.h +++ b/device/fido/fido_task.h
@@ -45,7 +45,7 @@ private: FidoDevice* const device_; - base::WeakPtrFactory<FidoTask> weak_factory_; + base::WeakPtrFactory<FidoTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoTask); };
diff --git a/device/fido/get_assertion_request_handler.cc b/device/fido/get_assertion_request_handler.cc index 1eebcb6..e9e8e7f 100644 --- a/device/fido/get_assertion_request_handler.cc +++ b/device/fido/get_assertion_request_handler.cc
@@ -210,8 +210,7 @@ supported_transports, GetTransportsAllowedAndConfiguredByRP(request)), std::move(completion_callback)), - request_(std::move(request)), - weak_factory_(this) { + request_(std::move(request)) { transport_availability_info().request_type = FidoRequestHandlerBase::RequestType::kGetAssertion; transport_availability_info().has_empty_allow_list =
diff --git a/device/fido/get_assertion_request_handler.h b/device/fido/get_assertion_request_handler.h index bf4f3e7..a6fdc87 100644 --- a/device/fido/get_assertion_request_handler.h +++ b/device/fido/get_assertion_request_handler.h
@@ -93,7 +93,7 @@ // read when multiple responses are returned. size_t remaining_responses_ = 0; SEQUENCE_CHECKER(my_sequence_checker_); - base::WeakPtrFactory<GetAssertionRequestHandler> weak_factory_; + base::WeakPtrFactory<GetAssertionRequestHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GetAssertionRequestHandler); };
diff --git a/device/fido/get_assertion_task.cc b/device/fido/get_assertion_task.cc index c94ec89..79bcb99 100644 --- a/device/fido/get_assertion_task.cc +++ b/device/fido/get_assertion_task.cc
@@ -34,8 +34,7 @@ GetAssertionTaskCallback callback) : FidoTask(device), request_(std::move(request)), - callback_(std::move(callback)), - weak_factory_(this) { + callback_(std::move(callback)) { // This code assumes that user-presence is requested in order to implement // possible U2F-fallback. DCHECK(request_.user_presence_required);
diff --git a/device/fido/get_assertion_task.h b/device/fido/get_assertion_task.h index 51177e2..56a6ad7 100644 --- a/device/fido/get_assertion_task.h +++ b/device/fido/get_assertion_task.h
@@ -90,7 +90,7 @@ size_t current_credential_ = 0; bool canceled_ = false; - base::WeakPtrFactory<GetAssertionTask> weak_factory_; + base::WeakPtrFactory<GetAssertionTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GetAssertionTask); };
diff --git a/device/fido/hid/fido_hid_device.cc b/device/fido/hid/fido_hid_device.cc index 61c1093..f28e03c 100644 --- a/device/fido/hid/fido_hid_device.cc +++ b/device/fido/hid/fido_hid_device.cc
@@ -28,8 +28,7 @@ : FidoDevice(), output_report_size_(device_info->max_output_report_size), hid_manager_(hid_manager), - device_info_(std::move(device_info)), - weak_factory_(this) { + device_info_(std::move(device_info)) { DCHECK_GE(std::numeric_limits<decltype(output_report_size_)>::max(), device_info_->max_output_report_size); // These limits on the report size are enforced in fido_hid_discovery.cc.
diff --git a/device/fido/hid/fido_hid_device.h b/device/fido/hid/fido_hid_device.h index e3e35994..72e7c14 100644 --- a/device/fido/hid/fido_hid_device.h +++ b/device/fido/hid/fido_hid_device.h
@@ -139,7 +139,7 @@ device::mojom::HidManager* hid_manager_; device::mojom::HidDeviceInfoPtr device_info_; device::mojom::HidConnectionPtr connection_; - base::WeakPtrFactory<FidoHidDevice> weak_factory_; + base::WeakPtrFactory<FidoHidDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoHidDevice); };
diff --git a/device/fido/hid/fido_hid_discovery.cc b/device/fido/hid/fido_hid_discovery.cc index 7a9ad01..c471cd02 100644 --- a/device/fido/hid/fido_hid_discovery.cc +++ b/device/fido/hid/fido_hid_discovery.cc
@@ -17,8 +17,7 @@ FidoHidDiscovery::FidoHidDiscovery(::service_manager::Connector* connector) : FidoDeviceDiscovery(FidoTransportProtocol::kUsbHumanInterfaceDevice), connector_(connector), - binding_(this), - weak_factory_(this) { + binding_(this) { // TODO(piperc@): Give this constant a name. filter_.SetUsagePage(0xf1d0); }
diff --git a/device/fido/hid/fido_hid_discovery.h b/device/fido/hid/fido_hid_discovery.h index f2aae1a..204bb25 100644 --- a/device/fido/hid/fido_hid_discovery.h +++ b/device/fido/hid/fido_hid_discovery.h
@@ -46,7 +46,7 @@ device::mojom::HidManagerPtr hid_manager_; mojo::AssociatedBinding<device::mojom::HidManagerClient> binding_; HidDeviceFilter filter_; - base::WeakPtrFactory<FidoHidDiscovery> weak_factory_; + base::WeakPtrFactory<FidoHidDiscovery> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FidoHidDiscovery); };
diff --git a/device/fido/make_credential_request_handler.cc b/device/fido/make_credential_request_handler.cc index aa726ca2..2a48e8b 100644 --- a/device/fido/make_credential_request_handler.cc +++ b/device/fido/make_credential_request_handler.cc
@@ -157,8 +157,7 @@ std::move(completion_callback)), request_(std::move(request)), authenticator_selection_criteria_( - std::move(authenticator_selection_criteria)), - weak_factory_(this) { + std::move(authenticator_selection_criteria)) { transport_availability_info().request_type = FidoRequestHandlerBase::RequestType::kMakeCredential;
diff --git a/device/fido/make_credential_request_handler.h b/device/fido/make_credential_request_handler.h index fb90ddd..87d9a80 100644 --- a/device/fido/make_credential_request_handler.h +++ b/device/fido/make_credential_request_handler.h
@@ -90,7 +90,7 @@ // and this pointer is cleared if it's removed during processing. FidoAuthenticator* authenticator_ = nullptr; SEQUENCE_CHECKER(my_sequence_checker_); - base::WeakPtrFactory<MakeCredentialRequestHandler> weak_factory_; + base::WeakPtrFactory<MakeCredentialRequestHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MakeCredentialRequestHandler); };
diff --git a/device/fido/make_credential_task.cc b/device/fido/make_credential_task.cc index 5156d25..3fb6eed 100644 --- a/device/fido/make_credential_task.cc +++ b/device/fido/make_credential_task.cc
@@ -47,8 +47,7 @@ MakeCredentialTaskCallback callback) : FidoTask(device), request_(std::move(request)), - callback_(std::move(callback)), - weak_factory_(this) { + callback_(std::move(callback)) { // The UV parameter should have been made binary by this point because CTAP2 // only takes a binary value. DCHECK_NE(request_.user_verification,
diff --git a/device/fido/make_credential_task.h b/device/fido/make_credential_task.h index f7db14e..e2f9bb4 100644 --- a/device/fido/make_credential_task.h +++ b/device/fido/make_credential_task.h
@@ -79,7 +79,7 @@ bool probing_alternative_rp_id_ = false; bool canceled_ = false; - base::WeakPtrFactory<MakeCredentialTask> weak_factory_; + base::WeakPtrFactory<MakeCredentialTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MakeCredentialTask); };
diff --git a/device/fido/mock_fido_device.cc b/device/fido/mock_fido_device.cc index cacb195..fc83966d 100644 --- a/device/fido/mock_fido_device.cc +++ b/device/fido/mock_fido_device.cc
@@ -90,7 +90,7 @@ return !arg.empty() && arg[0] == base::strict_cast<uint8_t>(expected_command); } -MockFidoDevice::MockFidoDevice() : weak_factory_(this) {} +MockFidoDevice::MockFidoDevice() {} MockFidoDevice::MockFidoDevice( ProtocolVersion protocol_version, base::Optional<AuthenticatorGetInfoResponse> device_info)
diff --git a/device/fido/mock_fido_device.h b/device/fido/mock_fido_device.h index 9c86d00..f693212 100644 --- a/device/fido/mock_fido_device.h +++ b/device/fido/mock_fido_device.h
@@ -98,7 +98,7 @@ private: FidoTransportProtocol transport_protocol_ = FidoTransportProtocol::kUsbHumanInterfaceDevice; - base::WeakPtrFactory<FidoDevice> weak_factory_; + base::WeakPtrFactory<FidoDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MockFidoDevice); };
diff --git a/device/fido/reset_request_handler.cc b/device/fido/reset_request_handler.cc index 5f00d73..7f37f5d 100644 --- a/device/fido/reset_request_handler.cc +++ b/device/fido/reset_request_handler.cc
@@ -24,8 +24,7 @@ supported_transports), reset_sent_callback_(std::move(reset_sent_callback)), finished_callback_(std::move(finished_callback)), - fido_discovery_factory_(std::move(fido_discovery_factory)), - weak_factory_(this) { + fido_discovery_factory_(std::move(fido_discovery_factory)) { Start(); }
diff --git a/device/fido/reset_request_handler.h b/device/fido/reset_request_handler.h index 984c8be..d358d7d 100644 --- a/device/fido/reset_request_handler.h +++ b/device/fido/reset_request_handler.h
@@ -67,7 +67,7 @@ bool processed_touch_ = false; std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory_; SEQUENCE_CHECKER(my_sequence_checker_); - base::WeakPtrFactory<ResetRequestHandler> weak_factory_; + base::WeakPtrFactory<ResetRequestHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ResetRequestHandler); };
diff --git a/device/fido/set_pin_request_handler.cc b/device/fido/set_pin_request_handler.cc index 9360633a..d2ee242 100644 --- a/device/fido/set_pin_request_handler.cc +++ b/device/fido/set_pin_request_handler.cc
@@ -25,8 +25,7 @@ supported_transports), get_pin_callback_(std::move(get_pin_callback)), finished_callback_(std::move(finished_callback)), - fido_discovery_factory_(std::move(fido_discovery_factory)), - weak_factory_(this) { + fido_discovery_factory_(std::move(fido_discovery_factory)) { Start(); }
diff --git a/device/fido/set_pin_request_handler.h b/device/fido/set_pin_request_handler.h index 4f9054b64..43344ca9 100644 --- a/device/fido/set_pin_request_handler.h +++ b/device/fido/set_pin_request_handler.h
@@ -111,7 +111,7 @@ FidoAuthenticator* authenticator_ = nullptr; std::unique_ptr<FidoDiscoveryFactory> fido_discovery_factory_; SEQUENCE_CHECKER(my_sequence_checker_); - base::WeakPtrFactory<SetPINRequestHandler> weak_factory_; + base::WeakPtrFactory<SetPINRequestHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SetPINRequestHandler); };
diff --git a/device/fido/u2f_register_operation.cc b/device/fido/u2f_register_operation.cc index 90700ea7..e49c58f 100644 --- a/device/fido/u2f_register_operation.cc +++ b/device/fido/u2f_register_operation.cc
@@ -26,8 +26,7 @@ FidoDevice* device, const CtapMakeCredentialRequest& request, DeviceResponseCallback callback) - : DeviceOperation(device, request, std::move(callback)), - weak_factory_(this) {} + : DeviceOperation(device, request, std::move(callback)) {} U2fRegisterOperation::~U2fRegisterOperation() = default;
diff --git a/device/fido/u2f_register_operation.h b/device/fido/u2f_register_operation.h index bc05811..f21958e 100644 --- a/device/fido/u2f_register_operation.h +++ b/device/fido/u2f_register_operation.h
@@ -58,7 +58,7 @@ // thus the exclude list is being probed a second time with the alternative RP // ID. bool probing_alternative_rp_id_ = false; - base::WeakPtrFactory<U2fRegisterOperation> weak_factory_; + base::WeakPtrFactory<U2fRegisterOperation> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(U2fRegisterOperation); };
diff --git a/device/fido/u2f_sign_operation.cc b/device/fido/u2f_sign_operation.cc index f687553..02fd5046b 100644 --- a/device/fido/u2f_sign_operation.cc +++ b/device/fido/u2f_sign_operation.cc
@@ -23,8 +23,7 @@ U2fSignOperation::U2fSignOperation(FidoDevice* device, const CtapGetAssertionRequest& request, DeviceResponseCallback callback) - : DeviceOperation(device, request, std::move(callback)), - weak_factory_(this) {} + : DeviceOperation(device, request, std::move(callback)) {} U2fSignOperation::~U2fSignOperation() = default;
diff --git a/device/fido/u2f_sign_operation.h b/device/fido/u2f_sign_operation.h index 9c6d7a8..19a1606 100644 --- a/device/fido/u2f_sign_operation.h +++ b/device/fido/u2f_sign_operation.h
@@ -54,7 +54,7 @@ // primary value) or an RP-provided U2F AppID. ApplicationParameterType app_param_type_ = ApplicationParameterType::kPrimary; bool canceled_ = false; - base::WeakPtrFactory<U2fSignOperation> weak_factory_; + base::WeakPtrFactory<U2fSignOperation> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(U2fSignOperation); };
diff --git a/device/fido/virtual_ctap2_device.cc b/device/fido/virtual_ctap2_device.cc index 672b61c..6500d3a1 100644 --- a/device/fido/virtual_ctap2_device.cc +++ b/device/fido/virtual_ctap2_device.cc
@@ -525,17 +525,14 @@ const Config&) = default; VirtualCtap2Device::Config::~Config() = default; -VirtualCtap2Device::VirtualCtap2Device() - : VirtualFidoDevice(), weak_factory_(this) { +VirtualCtap2Device::VirtualCtap2Device() : VirtualFidoDevice() { device_info_ = AuthenticatorGetInfoResponse({ProtocolVersion::kCtap2}, kDeviceAaguid); } VirtualCtap2Device::VirtualCtap2Device(scoped_refptr<State> state, const Config& config) - : VirtualFidoDevice(std::move(state)), - config_(config), - weak_factory_(this) { + : VirtualFidoDevice(std::move(state)), config_(config) { std::vector<ProtocolVersion> versions = {ProtocolVersion::kCtap2}; if (config.u2f_support) { versions.emplace_back(ProtocolVersion::kU2f);
diff --git a/device/fido/virtual_ctap2_device.h b/device/fido/virtual_ctap2_device.h index 0dc4d33b9..62114aae 100644 --- a/device/fido/virtual_ctap2_device.h +++ b/device/fido/virtual_ctap2_device.h
@@ -133,7 +133,7 @@ std::unique_ptr<VirtualU2fDevice> u2f_device_; const Config config_; - base::WeakPtrFactory<FidoDevice> weak_factory_; + base::WeakPtrFactory<FidoDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(VirtualCtap2Device); };
diff --git a/device/fido/virtual_u2f_device.cc b/device/fido/virtual_u2f_device.cc index fed784f..b815c91f 100644 --- a/device/fido/virtual_u2f_device.cc +++ b/device/fido/virtual_u2f_device.cc
@@ -51,11 +51,10 @@ transport); } -VirtualU2fDevice::VirtualU2fDevice() - : VirtualFidoDevice(), weak_factory_(this) {} +VirtualU2fDevice::VirtualU2fDevice() : VirtualFidoDevice() {} VirtualU2fDevice::VirtualU2fDevice(scoped_refptr<State> state) - : VirtualFidoDevice(std::move(state)), weak_factory_(this) { + : VirtualFidoDevice(std::move(state)) { DCHECK(IsTransportSupported(mutable_state()->transport)); }
diff --git a/device/fido/virtual_u2f_device.h b/device/fido/virtual_u2f_device.h index a6e1cac2..fa3f425 100644 --- a/device/fido/virtual_u2f_device.h +++ b/device/fido/virtual_u2f_device.h
@@ -46,7 +46,7 @@ uint8_t p2, base::span<const uint8_t> data); - base::WeakPtrFactory<FidoDevice> weak_factory_; + base::WeakPtrFactory<FidoDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(VirtualU2fDevice); };
diff --git a/device/gamepad/abstract_haptic_gamepad.cc b/device/gamepad/abstract_haptic_gamepad.cc index fc711a8..caeefed 100644 --- a/device/gamepad/abstract_haptic_gamepad.cc +++ b/device/gamepad/abstract_haptic_gamepad.cc
@@ -120,9 +120,8 @@ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, - base::BindOnce(&AbstractHapticGamepad::StartVibration, - weak_factory_.GetWeakPtr(), sequence_id, duration, - strong_magnitude, weak_magnitude), + base::BindOnce(&AbstractHapticGamepad::StartVibration, GetWeakPtr(), + sequence_id, duration, strong_magnitude, weak_magnitude), base::TimeDelta::FromMillisecondsD(start_delay)); } @@ -142,15 +141,15 @@ double remaining_duration = duration - max_duration; base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, - base::BindOnce(&AbstractHapticGamepad::StartVibration, - weak_factory_.GetWeakPtr(), sequence_id, - remaining_duration, strong_magnitude, weak_magnitude), + base::BindOnce(&AbstractHapticGamepad::StartVibration, GetWeakPtr(), + sequence_id, remaining_duration, strong_magnitude, + weak_magnitude), base::TimeDelta::FromMillisecondsD(max_duration)); } else { base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, - base::BindOnce(&AbstractHapticGamepad::FinishEffect, - weak_factory_.GetWeakPtr(), sequence_id), + base::BindOnce(&AbstractHapticGamepad::FinishEffect, GetWeakPtr(), + sequence_id), base::TimeDelta::FromMillisecondsD(duration)); } }
diff --git a/device/gamepad/abstract_haptic_gamepad.h b/device/gamepad/abstract_haptic_gamepad.h index 6503c44..7ccb15ba 100644 --- a/device/gamepad/abstract_haptic_gamepad.h +++ b/device/gamepad/abstract_haptic_gamepad.h
@@ -65,6 +65,8 @@ // must be divided into effects of this duration or less. virtual double GetMaxEffectDurationMillis(); + virtual base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() = 0; + private: // Override to perform additional shutdown actions after vibration effects // are halted and callbacks are issued. @@ -88,7 +90,6 @@ playing_effect_callback_; scoped_refptr<base::SequencedTaskRunner> callback_runner_; THREAD_CHECKER(thread_checker_); - base::WeakPtrFactory<AbstractHapticGamepad> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/abstract_haptic_gamepad_unittest.cc b/device/gamepad/abstract_haptic_gamepad_unittest.cc index 87e32645..1522e9d 100644 --- a/device/gamepad/abstract_haptic_gamepad_unittest.cc +++ b/device/gamepad/abstract_haptic_gamepad_unittest.cc
@@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" #include "device/gamepad/public/mojom/gamepad.mojom.h" @@ -33,7 +34,7 @@ // An implementation of AbstractHapticGamepad that records how many times its // SetVibration and SetZeroVibration methods have been called. -class FakeHapticGamepad : public AbstractHapticGamepad { +class FakeHapticGamepad final : public AbstractHapticGamepad { public: FakeHapticGamepad() : set_vibration_count_(0), set_zero_vibration_count_(0) {} ~FakeHapticGamepad() override = default; @@ -44,8 +45,13 @@ void SetZeroVibration() override { set_zero_vibration_count_++; } + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override { + return weak_factory_.GetWeakPtr(); + } + int set_vibration_count_; int set_zero_vibration_count_; + base::WeakPtrFactory<FakeHapticGamepad> weak_factory_{this}; }; // Main test fixture
diff --git a/device/gamepad/dualshock4_controller_base.h b/device/gamepad/dualshock4_controller_base.h index 229989b..32b52391 100644 --- a/device/gamepad/dualshock4_controller_base.h +++ b/device/gamepad/dualshock4_controller_base.h
@@ -16,6 +16,7 @@ static bool IsDualshock4(uint16_t vendor_id, uint16_t product_id); + // AbstractHapticGamepad implementation. void SetVibration(double strong_magnitude, double weak_magnitude) override; virtual size_t WriteOutputReport(void* report, size_t report_length);
diff --git a/device/gamepad/dualshock4_controller_linux.cc b/device/gamepad/dualshock4_controller_linux.cc index d13368f..64510544 100644 --- a/device/gamepad/dualshock4_controller_linux.cc +++ b/device/gamepad/dualshock4_controller_linux.cc
@@ -19,4 +19,8 @@ return bytes_written < 0 ? 0 : static_cast<size_t>(bytes_written); } +base::WeakPtr<AbstractHapticGamepad> Dualshock4ControllerLinux::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/dualshock4_controller_linux.h b/device/gamepad/dualshock4_controller_linux.h index 82b159c51..e32e35e 100644 --- a/device/gamepad/dualshock4_controller_linux.h +++ b/device/gamepad/dualshock4_controller_linux.h
@@ -5,22 +5,26 @@ #ifndef DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_LINUX_ #define DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_LINUX_ -#include "device/gamepad/dualshock4_controller_base.h" - #include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" +#include "device/gamepad/dualshock4_controller_base.h" namespace device { -class Dualshock4ControllerLinux : public Dualshock4ControllerBase { +class Dualshock4ControllerLinux final : public Dualshock4ControllerBase { public: Dualshock4ControllerLinux(const base::ScopedFD& fd); ~Dualshock4ControllerLinux() override; + // AbstractHapticGamepad implementation. + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + + // Dualshock4ControllerBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: - // Not owned. - int fd_; + int fd_; // Not owned. + base::WeakPtrFactory<Dualshock4ControllerLinux> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/dualshock4_controller_mac.cc b/device/gamepad/dualshock4_controller_mac.cc index c3f801e..9f851aaee 100644 --- a/device/gamepad/dualshock4_controller_mac.cc +++ b/device/gamepad/dualshock4_controller_mac.cc
@@ -29,4 +29,8 @@ return (success == kIOReturnSuccess) ? report_length : 0; } +base::WeakPtr<AbstractHapticGamepad> Dualshock4ControllerMac::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/dualshock4_controller_mac.h b/device/gamepad/dualshock4_controller_mac.h index e0d47639..0fca08d 100644 --- a/device/gamepad/dualshock4_controller_mac.h +++ b/device/gamepad/dualshock4_controller_mac.h
@@ -5,23 +5,28 @@ #ifndef DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_MAC_H_ #define DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_MAC_H_ -#include "device/gamepad/dualshock4_controller_base.h" - #include <IOKit/hid/IOHIDManager.h> +#include "base/memory/weak_ptr.h" +#include "device/gamepad/dualshock4_controller_base.h" + namespace device { -class Dualshock4ControllerMac : public Dualshock4ControllerBase { +class Dualshock4ControllerMac final : public Dualshock4ControllerBase { public: Dualshock4ControllerMac(IOHIDDeviceRef device_ref); ~Dualshock4ControllerMac() override; + // AbstractHapticGamepad implementation. void DoShutdown() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + // Dualshock4ControllerBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: IOHIDDeviceRef device_ref_; + base::WeakPtrFactory<Dualshock4ControllerMac> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/dualshock4_controller_win.cc b/device/gamepad/dualshock4_controller_win.cc index 20a5d400..4565561 100644 --- a/device/gamepad/dualshock4_controller_win.cc +++ b/device/gamepad/dualshock4_controller_win.cc
@@ -75,4 +75,8 @@ return write_success ? bytes_written : 0; } +base::WeakPtr<AbstractHapticGamepad> Dualshock4ControllerWin::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/dualshock4_controller_win.h b/device/gamepad/dualshock4_controller_win.h index ced6fe11..d526fbb7 100644 --- a/device/gamepad/dualshock4_controller_win.h +++ b/device/gamepad/dualshock4_controller_win.h
@@ -5,23 +5,27 @@ #ifndef DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_WIN_ #define DEVICE_GAMEPAD_DUALSHOCK4_CONTROLLER_WIN_ +#include "base/memory/weak_ptr.h" #include "base/win/scoped_handle.h" #include "device/gamepad/dualshock4_controller_base.h" namespace device { -class Dualshock4ControllerWin : public Dualshock4ControllerBase { +class Dualshock4ControllerWin final : public Dualshock4ControllerBase { public: explicit Dualshock4ControllerWin(HANDLE device_handle); ~Dualshock4ControllerWin() override; - // Close the HID handle. + // AbstractHapticGamepad implementation. void DoShutdown() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + // Dualshock4ControllerBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: base::win::ScopedHandle hid_handle_; + base::WeakPtrFactory<Dualshock4ControllerWin> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/gamepad_device_linux.cc b/device/gamepad/gamepad_device_linux.cc index b2c7236..5091925 100644 --- a/device/gamepad/gamepad_device_linux.cc +++ b/device/gamepad/gamepad_device_linux.cc
@@ -652,4 +652,8 @@ StartOrStopEffect(evdev_fd_, effect_id_, false); } +base::WeakPtr<AbstractHapticGamepad> GamepadDeviceLinux::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/gamepad_device_linux.h b/device/gamepad/gamepad_device_linux.h index 8a3cffe..c660e36b 100644 --- a/device/gamepad/gamepad_device_linux.h +++ b/device/gamepad/gamepad_device_linux.h
@@ -10,6 +10,7 @@ #include <vector> #include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" #include "device/gamepad/abstract_haptic_gamepad.h" #include "device/gamepad/dualshock4_controller_linux.h" #include "device/gamepad/gamepad_id_list.h" @@ -31,7 +32,7 @@ // // For some devices, haptics are not supported through evdev and are instead // sent through the raw HID (hidraw) interface. -class GamepadDeviceLinux : public AbstractHapticGamepad { +class GamepadDeviceLinux final : public AbstractHapticGamepad { public: using OpenDeviceNodeCallback = base::OnceCallback<void(GamepadDeviceLinux*)>; @@ -39,9 +40,6 @@ scoped_refptr<base::SequencedTaskRunner> dbus_runner); ~GamepadDeviceLinux() override; - // Delete any stored effect and close file descriptors. - void DoShutdown() override; - // Returns true if no device nodes are associated with this device. bool IsEmpty() const; @@ -93,9 +91,11 @@ // Closes the hidraw device node and shuts down haptics. void CloseHidrawNode(); - // AbstractHapticGamepad + // AbstractHapticGamepad implementation. + void DoShutdown() override; void SetVibration(double strong_magnitude, double weak_magnitude) override; void SetZeroVibration() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; private: using OpenPathCallback = base::OnceCallback<void(base::ScopedFD)>;
diff --git a/device/gamepad/gamepad_device_mac.h b/device/gamepad/gamepad_device_mac.h index 808cdacb..16614ac 100644 --- a/device/gamepad/gamepad_device_mac.h +++ b/device/gamepad/gamepad_device_mac.h
@@ -5,11 +5,13 @@ #ifndef DEVICE_GAMEPAD_GAMEPAD_DEVICE_MAC_H_ #define DEVICE_GAMEPAD_GAMEPAD_DEVICE_MAC_H_ +#include <stddef.h> + #include <CoreFoundation/CoreFoundation.h> #include <ForceFeedback/ForceFeedback.h> #include <IOKit/hid/IOHIDManager.h> -#include <stddef.h> +#include "base/memory/weak_ptr.h" #include "device/gamepad/abstract_haptic_gamepad.h" #include "device/gamepad/dualshock4_controller_mac.h" #include "device/gamepad/hid_haptic_gamepad_mac.h" @@ -23,7 +25,7 @@ // // Dualshock4 haptics are not supported through ForceFeedback and are instead // sent through the raw HID interface. -class GamepadDeviceMac : public AbstractHapticGamepad { +class GamepadDeviceMac final : public AbstractHapticGamepad { public: GamepadDeviceMac(int location_id, IOHIDDeviceRef device_ref, @@ -49,14 +51,13 @@ // ForceFeedback framework. bool SupportsVibration(); - // Starts vibrating the device with the specified magnitudes. + // AbstractHapticGamepad implementation. void SetVibration(double strong_magnitude, double weak_magnitude) override; - - // Stop vibration by canceling any ongoing vibration effect. void SetZeroVibration() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; private: - // Stop vibration and release held resources. + // AbstractHapticGamepad implementation. void DoShutdown() override; // Initialize button capabilities for |gamepad|. @@ -109,6 +110,8 @@ // A controller that uses a HID output report for vibration effects. std::unique_ptr<HidHapticGamepadMac> hid_haptics_; + + base::WeakPtrFactory<GamepadDeviceMac> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/gamepad_device_mac.mm b/device/gamepad/gamepad_device_mac.mm index 4dfb391..f132016f 100644 --- a/device/gamepad/gamepad_device_mac.mm +++ b/device/gamepad/gamepad_device_mac.mm
@@ -487,4 +487,8 @@ return ff_effect_ref; } +base::WeakPtr<AbstractHapticGamepad> GamepadDeviceMac::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/gamepad_provider_unittest.cc b/device/gamepad/gamepad_provider_unittest.cc index d9877737..2829c0e0 100644 --- a/device/gamepad/gamepad_provider_unittest.cc +++ b/device/gamepad/gamepad_provider_unittest.cc
@@ -24,7 +24,7 @@ // Helper class to generate and record user gesture callbacks. class UserGestureListener { public: - UserGestureListener() : has_user_gesture_(false), weak_factory_(this) {} + UserGestureListener() : has_user_gesture_(false) {} base::Closure GetClosure() { return base::Bind(&UserGestureListener::GotUserGesture, @@ -37,7 +37,7 @@ void GotUserGesture() { has_user_gesture_ = true; } bool has_user_gesture_; - base::WeakPtrFactory<UserGestureListener> weak_factory_; + base::WeakPtrFactory<UserGestureListener> weak_factory_{this}; }; // Main test fixture
diff --git a/device/gamepad/hid_haptic_gamepad_base_unittest.cc b/device/gamepad/hid_haptic_gamepad_base_unittest.cc index d3a0ca5..7ac176c 100644 --- a/device/gamepad/hid_haptic_gamepad_base_unittest.cc +++ b/device/gamepad/hid_haptic_gamepad_base_unittest.cc
@@ -8,6 +8,7 @@ #include "base/bind.h" #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" #include "device/gamepad/public/mojom/gamepad.mojom.h" @@ -51,7 +52,7 @@ base::TimeDelta::FromMillisecondsD(kDurationMillis); // An implementation of HidHapticGamepadBase that records its output reports. -class FakeHidHapticGamepad : public HidHapticGamepadBase { +class FakeHidHapticGamepad final : public HidHapticGamepadBase { public: FakeHidHapticGamepad(const HidHapticGamepadBase::HapticReportData& data) : HidHapticGamepadBase(data) {} @@ -66,7 +67,12 @@ return report_length; } + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override { + return weak_factory_.GetWeakPtr(); + } + std::vector<std::vector<uint8_t>> output_reports_; + base::WeakPtrFactory<FakeHidHapticGamepad> weak_factory_{this}; }; // Main test fixture
diff --git a/device/gamepad/hid_haptic_gamepad_linux.cc b/device/gamepad/hid_haptic_gamepad_linux.cc index cbc53b3..1f86c85 100644 --- a/device/gamepad/hid_haptic_gamepad_linux.cc +++ b/device/gamepad/hid_haptic_gamepad_linux.cc
@@ -31,4 +31,8 @@ return bytes_written < 0 ? 0 : static_cast<size_t>(bytes_written); } +base::WeakPtr<AbstractHapticGamepad> HidHapticGamepadLinux::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/hid_haptic_gamepad_linux.h b/device/gamepad/hid_haptic_gamepad_linux.h index 6656a740..07a4d5e8 100644 --- a/device/gamepad/hid_haptic_gamepad_linux.h +++ b/device/gamepad/hid_haptic_gamepad_linux.h
@@ -10,10 +10,11 @@ #include <memory> #include "base/files/scoped_file.h" +#include "base/memory/weak_ptr.h" namespace device { -class HidHapticGamepadLinux : public HidHapticGamepadBase { +class HidHapticGamepadLinux final : public HidHapticGamepadBase { public: HidHapticGamepadLinux(const base::ScopedFD& fd, const HapticReportData& data); ~HidHapticGamepadLinux() override; @@ -21,11 +22,17 @@ static std::unique_ptr<HidHapticGamepadLinux> Create(uint16_t vendor_id, uint16_t product_id, const base::ScopedFD& fd); + // AbstractHapticGamepad implementation. + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + + // HidHapticGamepadBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: // Not owned. int fd_; + + base::WeakPtrFactory<HidHapticGamepadLinux> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/hid_haptic_gamepad_mac.cc b/device/gamepad/hid_haptic_gamepad_mac.cc index 4393b7f4..aa18fd3 100644 --- a/device/gamepad/hid_haptic_gamepad_mac.cc +++ b/device/gamepad/hid_haptic_gamepad_mac.cc
@@ -41,4 +41,8 @@ return (success == kIOReturnSuccess) ? report_length : 0; } +base::WeakPtr<AbstractHapticGamepad> HidHapticGamepadMac::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/hid_haptic_gamepad_mac.h b/device/gamepad/hid_haptic_gamepad_mac.h index 621d584239..d9d75e20 100644 --- a/device/gamepad/hid_haptic_gamepad_mac.h +++ b/device/gamepad/hid_haptic_gamepad_mac.h
@@ -5,15 +5,16 @@ #ifndef DEVICE_GAMEPAD_HID_HAPTIC_GAMEPAD_MAC_H_ #define DEVICE_GAMEPAD_HID_HAPTIC_GAMEPAD_MAC_H_ -#include "device/gamepad/hid_haptic_gamepad_base.h" - #include <memory> #include <IOKit/hid/IOHIDManager.h> +#include "base/memory/weak_ptr.h" +#include "device/gamepad/hid_haptic_gamepad_base.h" + namespace device { -class HidHapticGamepadMac : public HidHapticGamepadBase { +class HidHapticGamepadMac final : public HidHapticGamepadBase { public: HidHapticGamepadMac(IOHIDDeviceRef device_ref, const HapticReportData& data); ~HidHapticGamepadMac() override; @@ -22,12 +23,16 @@ uint16_t product_id, IOHIDDeviceRef device_ref); + // AbstractHapticGamepad implementation. void DoShutdown() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + // HidHapticGamepadBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: IOHIDDeviceRef device_ref_; + base::WeakPtrFactory<HidHapticGamepadMac> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/hid_haptic_gamepad_win.cc b/device/gamepad/hid_haptic_gamepad_win.cc index 71d03168..80ec71b 100644 --- a/device/gamepad/hid_haptic_gamepad_win.cc +++ b/device/gamepad/hid_haptic_gamepad_win.cc
@@ -96,4 +96,8 @@ return write_success ? bytes_written : 0; } +base::WeakPtr<AbstractHapticGamepad> HidHapticGamepadWin::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/hid_haptic_gamepad_win.h b/device/gamepad/hid_haptic_gamepad_win.h index 1e3af00..6edc9823 100644 --- a/device/gamepad/hid_haptic_gamepad_win.h +++ b/device/gamepad/hid_haptic_gamepad_win.h
@@ -5,6 +5,7 @@ #ifndef DEVICE_GAMEPAD_HID_HAPTIC_GAMEPAD_WIN_H_ #define DEVICE_GAMEPAD_HID_HAPTIC_GAMEPAD_WIN_H_ +#include "base/memory/weak_ptr.h" #include "base/win/scoped_handle.h" #include "device/gamepad/hid_haptic_gamepad_base.h" @@ -12,7 +13,7 @@ namespace device { -class HidHapticGamepadWin : public HidHapticGamepadBase { +class HidHapticGamepadWin final : public HidHapticGamepadBase { public: HidHapticGamepadWin(HANDLE device_handle, const HapticReportData& data); ~HidHapticGamepadWin() override; @@ -21,12 +22,16 @@ uint16_t product_id, HANDLE device_handle); + // AbstractHapticGamepad implementation. void DoShutdown() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; + // HidHapticGamepadBase implementation. size_t WriteOutputReport(void* report, size_t report_length) override; private: base::win::ScopedHandle hid_handle_; + base::WeakPtrFactory<HidHapticGamepadWin> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/nintendo_controller.cc b/device/gamepad/nintendo_controller.cc index 86a6169..2caa9b6 100644 --- a/device/gamepad/nintendo_controller.cc +++ b/device/gamepad/nintendo_controller.cc
@@ -812,8 +812,7 @@ bus_type_(GAMEPAD_BUS_UNKNOWN), output_report_size_bytes_(0), device_info_(std::move(device_info)), - hid_manager_(hid_manager), - weak_factory_(this) { + hid_manager_(hid_manager) { if (device_info_) { bus_type_ = BusTypeFromDeviceInfo(device_info_.get()); output_report_size_bytes_ = device_info_->max_output_report_size; @@ -829,10 +828,7 @@ std::unique_ptr<NintendoController> composite1, std::unique_ptr<NintendoController> composite2, mojom::HidManager* hid_manager) - : source_id_(source_id), - is_composite_(true), - hid_manager_(hid_manager), - weak_factory_(this) { + : source_id_(source_id), is_composite_(true), hid_manager_(hid_manager) { // Require exactly one left component and one right component, but allow them // to be provided in either order. DCHECK(composite1); @@ -1737,4 +1733,8 @@ } } +base::WeakPtr<AbstractHapticGamepad> NintendoController::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/nintendo_controller.h b/device/gamepad/nintendo_controller.h index 1c3e639..0a2cb9c1 100644 --- a/device/gamepad/nintendo_controller.h +++ b/device/gamepad/nintendo_controller.h
@@ -9,6 +9,7 @@ #include <vector> #include "base/cancelable_callback.h" +#include "base/memory/weak_ptr.h" #include "base/optional.h" #include "device/gamepad/abstract_haptic_gamepad.h" #include "device/gamepad/gamepad_id_list.h" @@ -56,7 +57,7 @@ // strong and weak effect magnitudes. When a vibration effect is played on a // composite device, the effect is split so that each component receives one // channel of the dual-rumble effect. -class NintendoController : public AbstractHapticGamepad { +class NintendoController final : public AbstractHapticGamepad { public: struct SwitchCalibrationData { SwitchCalibrationData(); @@ -181,6 +182,7 @@ void DoShutdown() override; void SetVibration(double strong_magnitude, double weak_magnitude) override; double GetMaxEffectDurationMillis() override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; NintendoController(int source_id, mojom::HidDeviceInfoPtr device_info, @@ -402,7 +404,7 @@ // becomes ready. base::OnceClosure device_ready_closure_; - base::WeakPtrFactory<NintendoController> weak_factory_; + base::WeakPtrFactory<NintendoController> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/nintendo_data_fetcher.cc b/device/gamepad/nintendo_data_fetcher.cc index 0477a5b..3764b7fb 100644 --- a/device/gamepad/nintendo_data_fetcher.cc +++ b/device/gamepad/nintendo_data_fetcher.cc
@@ -14,8 +14,7 @@ namespace device { -NintendoDataFetcher::NintendoDataFetcher() - : binding_(this), weak_factory_(this) {} +NintendoDataFetcher::NintendoDataFetcher() : binding_(this) {} NintendoDataFetcher::~NintendoDataFetcher() { for (auto& entry : controllers_) {
diff --git a/device/gamepad/nintendo_data_fetcher.h b/device/gamepad/nintendo_data_fetcher.h index 32f1c5f0..c0964a2e 100644 --- a/device/gamepad/nintendo_data_fetcher.h +++ b/device/gamepad/nintendo_data_fetcher.h
@@ -112,7 +112,7 @@ mojom::HidManagerPtr hid_manager_; mojo::AssociatedBinding<mojom::HidManagerClient> binding_; - base::WeakPtrFactory<NintendoDataFetcher> weak_factory_; + base::WeakPtrFactory<NintendoDataFetcher> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(NintendoDataFetcher); };
diff --git a/device/gamepad/raw_input_gamepad_device_win.cc b/device/gamepad/raw_input_gamepad_device_win.cc index d65c6838..2d7a9b2e 100644 --- a/device/gamepad/raw_input_gamepad_device_win.cc +++ b/device/gamepad/raw_input_gamepad_device_win.cc
@@ -508,4 +508,8 @@ } } +base::WeakPtr<AbstractHapticGamepad> RawInputGamepadDeviceWin::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/raw_input_gamepad_device_win.h b/device/gamepad/raw_input_gamepad_device_win.h index cb067288..752ad54 100644 --- a/device/gamepad/raw_input_gamepad_device_win.h +++ b/device/gamepad/raw_input_gamepad_device_win.h
@@ -15,6 +15,7 @@ #include <memory> #include <vector> +#include "base/memory/weak_ptr.h" #include "device/gamepad/abstract_haptic_gamepad.h" #include "device/gamepad/dualshock4_controller_win.h" #include "device/gamepad/hid_dll_functions_win.h" @@ -23,7 +24,7 @@ namespace device { -class RawInputGamepadDeviceWin : public AbstractHapticGamepad { +class RawInputGamepadDeviceWin final : public AbstractHapticGamepad { public: // Relevant usage IDs within the Generic Desktop usage page. RawInput gamepads // must have one of these usage IDs. @@ -57,8 +58,9 @@ // Read the current gamepad state into |pad|. void ReadPadState(Gamepad* pad) const; - // Set the vibration magnitude for the strong and weak vibration actuators. + // AbstractHapticGamepad implementation. void SetVibration(double strong_magnitude, double weak_magnitude) override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; private: // Axis state and capabilities for a single RawInput axis. @@ -69,7 +71,7 @@ unsigned long bitmask; }; - // Stop vibration and release held resources. + // AbstractHapticGamepad implementation. void DoShutdown() override; // Fetch information about this device. Returns true if the device appears to @@ -140,6 +142,8 @@ // A controller that uses a HID output report for vibration effects. std::unique_ptr<HidHapticGamepadWin> hid_haptics_; + + base::WeakPtrFactory<RawInputGamepadDeviceWin> weak_factory_{this}; }; } // namespace device
diff --git a/device/gamepad/xbox_controller_mac.h b/device/gamepad/xbox_controller_mac.h index 20ab56ee..c2d421e2 100644 --- a/device/gamepad/xbox_controller_mac.h +++ b/device/gamepad/xbox_controller_mac.h
@@ -15,6 +15,7 @@ #include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_ioplugininterface.h" #include "base/macros.h" +#include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner.h" #include "device/gamepad/abstract_haptic_gamepad.h" #include "device/gamepad/public/mojom/gamepad.mojom.h" @@ -24,7 +25,7 @@ namespace device { -class XboxControllerMac : public AbstractHapticGamepad { +class XboxControllerMac final : public AbstractHapticGamepad { public: static const uint16_t kVendorMicrosoft = 0x045e; static const uint16_t kProductXbox360Controller = 0x028e; @@ -112,6 +113,7 @@ void DoShutdown() override; double GetMaxEffectDurationMillis() override; void SetVibration(double strong_magnitude, double weak_magnitude) override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; UInt32 location_id() { return location_id_; } uint16_t GetVendorId() const; @@ -172,6 +174,8 @@ uint8_t counter_ = 0; + base::WeakPtrFactory<XboxControllerMac> weak_factory_{this}; + DISALLOW_COPY_AND_ASSIGN(XboxControllerMac); };
diff --git a/device/gamepad/xbox_controller_mac.mm b/device/gamepad/xbox_controller_mac.mm index 122de0d..5e5d5eb 100644 --- a/device/gamepad/xbox_controller_mac.mm +++ b/device/gamepad/xbox_controller_mac.mm
@@ -887,4 +887,8 @@ } } +base::WeakPtr<AbstractHapticGamepad> XboxControllerMac::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/xinput_haptic_gamepad_win.cc b/device/gamepad/xinput_haptic_gamepad_win.cc index cf9076e..b0e03dcd 100644 --- a/device/gamepad/xinput_haptic_gamepad_win.cc +++ b/device/gamepad/xinput_haptic_gamepad_win.cc
@@ -32,4 +32,8 @@ TRACE_EVENT_END1("GAMEPAD", "XInputSetState", "id", pad_id_); } +base::WeakPtr<AbstractHapticGamepad> XInputHapticGamepadWin::GetWeakPtr() { + return weak_factory_.GetWeakPtr(); +} + } // namespace device
diff --git a/device/gamepad/xinput_haptic_gamepad_win.h b/device/gamepad/xinput_haptic_gamepad_win.h index 9abfbfc..fd5dd4d 100644 --- a/device/gamepad/xinput_haptic_gamepad_win.h +++ b/device/gamepad/xinput_haptic_gamepad_win.h
@@ -8,11 +8,12 @@ #include <Unknwn.h> #include <XInput.h> +#include "base/memory/weak_ptr.h" #include "device/gamepad/abstract_haptic_gamepad.h" namespace device { -class XInputHapticGamepadWin : public AbstractHapticGamepad { +class XInputHapticGamepadWin final : public AbstractHapticGamepad { public: typedef DWORD(WINAPI* XInputSetStateFunc)(DWORD dwUserIndex, XINPUT_VIBRATION* pVibration); @@ -20,11 +21,14 @@ XInputHapticGamepadWin(int pad_id, XInputSetStateFunc xinput_set_state); ~XInputHapticGamepadWin() override; + // AbstractHapticGamepad implementation. void SetVibration(double strong_magnitude, double weak_magnitude) override; + base::WeakPtr<AbstractHapticGamepad> GetWeakPtr() override; private: int pad_id_; XInputSetStateFunc xinput_set_state_; + base::WeakPtrFactory<XInputHapticGamepadWin> weak_factory_{this}; }; } // namespace device
diff --git a/docs/chromium_browser_vs_google_chrome.md b/docs/chromium_browser_vs_google_chrome.md index bd778bc..0d9f566 100644 --- a/docs/chromium_browser_vs_google_chrome.md +++ b/docs/chromium_browser_vs_google_chrome.md
@@ -2,7 +2,7 @@ Chromium on Linux has two general flavors: You can either get [Google Chrome](http://www.google.com/chrome?platform=linux) or chromium-browser -(see [Linux Chromium Packages](linux_chromium_packages.md). +(see [Linux Chromium Packages](linux_chromium_packages.md)). This page tries to describe the differences between the two. In short, Google Chrome is the Chromium open source project built, packaged, and
diff --git a/docs/clang.md b/docs/clang.md index eb4139f..55b2fed6 100644 --- a/docs/clang.md +++ b/docs/clang.md
@@ -98,7 +98,7 @@ lines set `cc` and `cxx` to your clang binary. If things look good, run `ninja -C out/gn` to build. -If your clang revision is very different from the one currently used in chromium - -* Check `tools/clang/scripts/update.py` to find chromium's clang revision -* You might have to tweak warning flags. +Chromium tries to be buildable with its currently pinned clang, and with clang +trunk. Set `llvm_force_head_revision = true` in your args.gn if the clang you're +trying to build with is closer to clang trunk than to Chromium's pinned clang +(which `tools/clang/scripts/update.py --print-revision` prints).
diff --git a/docs/login/user_types.md b/docs/login/user_types.md index 991334b3..230b414 100644 --- a/docs/login/user_types.md +++ b/docs/login/user_types.md
@@ -59,7 +59,7 @@ cryptohome is mounted on tmpfs, and none of the data from the user session is persisted after the guest session ends. -To test guest session state, use `GaiaSessionMixin` - this will set up +To test guest session state, use `GuestSessionMixin` - this will set up appropriate guest session flags. Testing guest user login is more complicated, as guest login required Chrome
diff --git a/docs/patterns/fortesting-methods.md b/docs/patterns/fortesting-methods.md new file mode 100644 index 0000000..49718c00 --- /dev/null +++ b/docs/patterns/fortesting-methods.md
@@ -0,0 +1,52 @@ +# The ForTesting Methods Pattern + +The ForTesting pattern involves creating public helper methods on a class to +provide access to test-only functionality, and giving them a specific type of +name (`XForTesting` or `XForTest`) to provide a signal at the call site that they +are not intended for regular use. + +## Use this pattern when: + +You have a widely-used object that you need to expose a small amount of test +functionality on. + +## Don't use this pattern when: + +* You have lots of different ForTesting methods: consider the [TestApi] pattern + instead. +* Only a small set of test cases need access: consider the [friend the tests] + pattern instead, to avoid polluting the public API. + +## Alternatives / See also: + +* [Friend the tests] +* [TestApi] +* [ForTesting in the style guide](../../styleguide/c++/c++.md) + +## How to use this pattern: + +``` +class Foo { + public: + // ... regular public API ... + + void DoStuffForTesting(); +}; +``` + +The ForTesting suffix indicates to code reviewers that the method should not be +called in production code. There is a very similar antipattern in which the +suffix is missing: + +``` +class Foo { + public: + // ... regular public API ... + + // Do not call! Only for testing! + void DoStuff(); +}; +``` + +[testapi]: testapi.md +[friend the tests]: friend-the-tests.md
diff --git a/docs/patterns/friend-the-tests.md b/docs/patterns/friend-the-tests.md new file mode 100644 index 0000000..e9310b9 --- /dev/null +++ b/docs/patterns/friend-the-tests.md
@@ -0,0 +1,52 @@ +# The Friend-the-tests Pattern + +The Friend-the-tests pattern involves friending test fixture classes from the +class under test. Chromium has a macro named `FRIEND_TEST_ALL_PREFIXES` that +makes this convenient to do. + +**Note**: Friending test classes is usually not the best way to provide testing +access to a class. It makes it far too easy to unintentionally depend on the +class's implementation rather than its interface. It is better to use a proper +testing interface than to friend test classes. + +## Use this pattern when: + +A test needs simple access to the internals of a class, such as access to +individual fields or methods. + +## Don't use this pattern when: + +* Many different test classes need access to a class's internals: you will have + to friend too many things and the class under test will end up coupled with + too many unit tests. +* You're doing it to test private methods: in general, you should not separately + test private methods; the correctness of the private methods should be + observable from the correctness of the public methods, and if a piece of + private behavior has no effect on the public behavior of a class, it might + actually be unnecessary. + +## Alternatives / See also: + +* [TestApi] +* [ForTesting methods] +* ["Test the contract, not the implementation"](https://abseil.io/tips/135) +* [Discussion thread on cxx@](https://groups.google.com/a/chromium.org/d/msg/cxx/AOsKCPCBYhk/RDVLSMRGCgAJ) + +## How to use this pattern: + +``` +class Foo { + public: + // ... public API ... + + private: + FRIEND_TEST_ALL_PREFIXES(FooTest, TestSomeProperty); + FRIEND_TEST_ALL_PREFIXES(FooTest, TestABehavior); + + // or if every test in the suite needs private access: + friend class FooTest; +}; +``` + +[fortesting methods]: fortesting-methods.md +[testapi]: testapi.md
diff --git a/docs/patterns/testapi.md b/docs/patterns/testapi.md new file mode 100644 index 0000000..3367764 --- /dev/null +++ b/docs/patterns/testapi.md
@@ -0,0 +1,73 @@ +# The TestApi Pattern + +The TestApi pattern involves creating a helper class to provide access to +test-only functionality on a commonly-used class. + +## Use this pattern when: + +You have a widely-used object that you need to expose test functionality on, but +you want to be confident that this test functionality is not used outside tests. + +## Don't use this pattern when: + +* The commonly-used class only needs "test access" from its own tests or + closely-related tests; in this case, simply [friend the tests]. +* Only a handful of simple test-access methods are needed, like trivial setters; + in this case, the [ForTesting methods] pattern is lighter-weight. + +## Alternatives / See also: + +* [Friend the tests] +* [ForTesting methods] + +## How to use this pattern: + +`//foo/commonly_used.h`: +``` + +class CommonlyUsed { + public: + // ... big public API ... + + private: + friend class CommonlyUsedTestApi; + + // Any private methods to be used by CommonlyUsedTestApi, possibly using the + // [passkey pattern](passkey.md). +}; +``` + +`//foo/commonly_used_test_api.h`: +``` +class CommonlyUsedTestApi { + public: + CommonlyUsedTestApi(CommonlyUsed* thing); + void DoTestStuff(...); + + // or maybe just: + static void DoTestStuff(CommonlyUsed* thing, ...); + + // and maybe also: + std::unique_ptr<CommonlyUsed> CreateTestCommonlyUsed(...); +}; +``` + +And then client code can do: +``` + CommonlyUsedTestApi(commonly_used).DoTestStuff(...); +``` + +Then only link `commonly_used_test_api.{cc,h}` in test targets, so these methods +cannot accidentally be used in production code. This way, CommonlyUsed is not +polluted with code paths that are only used in tests, and code that has "test +access" to CommonlyUsed is very easy to find. Also, coupling between +CommonlyUsed and tests that exercise its test functionality is reduced. + +Note that this pattern should be used only judiciously - an extensive TestApi is +often a sign that a class is doing too much or has too much internal state, or +is simply un-ergonomic to use and therefore requires extensive setup. Also, if +many different tests need access to test-only functionality, that may indicate a +gap in the class under test's public API. + +[friend the tests]: friend-the-tests.md +[fortesting methods]: fortesting-methods.md
diff --git a/docs/security/rule-of-2-drawing.png b/docs/security/rule-of-2-drawing.png new file mode 100644 index 0000000..10aeaef --- /dev/null +++ b/docs/security/rule-of-2-drawing.png Binary files differ
diff --git a/docs/security/rule-of-2.md b/docs/security/rule-of-2.md index 13bcb62..4f8c2a9 100644 --- a/docs/security/rule-of-2.md +++ b/docs/security/rule-of-2.md
@@ -9,6 +9,13 @@ * unsafe implementation language; and * high privilege. + + +(drawing source +[here](https://docs.google.com/drawings/d/1JsXilEJA3y_-jZMBZ_ZaQEBT8c4_VoFhTlD1eocUNeA/edit?usp=sharing)) + ## Why? When code that handles untrustworthy inputs at high privilege has bugs, the
diff --git a/docs/updating_clang.md b/docs/updating_clang.md index 0109854..654152c 100644 --- a/docs/updating_clang.md +++ b/docs/updating_clang.md
@@ -45,7 +45,8 @@ -b linux_chromium_cfi_rel_ng \ -b linux_chromium_chromeos_asan_rel_ng -b linux_chromium_msan_rel_ng \ -b linux_chromium_chromeos_msan_rel_ng -b linux-chromeos-dbg \ - -b win-asan -b chromeos-amd64-generic-cfi-thin-lto-rel && + -b win-asan -b chromeos-amd64-generic-cfi-thin-lto-rel \ + -b linux_chromium_compile_dbg_32_ng && git cl try -B luci.chrome.try -b iphone-device -b ipad-device ```
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc index 1afe92ad..25afd691 100644 --- a/extensions/browser/api/socket/socket_api.cc +++ b/extensions/browser/api/socket/socket_api.cc
@@ -241,12 +241,12 @@ case extensions::api::socket::SOCKET_TYPE_UDP: { socket_type_ = kSocketTypeUDP; - network::mojom::UDPSocketReceiverPtr receiver_ptr; - socket_receiver_request_ = mojo::MakeRequest(&receiver_ptr); + network::mojom::UDPSocketListenerPtr listener_ptr; + socket_listener_request_ = mojo::MakeRequest(&listener_ptr); content::BrowserContext::GetDefaultStoragePartition(browser_context()) ->GetNetworkContext() ->CreateUDPSocket(mojo::MakeRequest(&socket_), - std::move(receiver_ptr)); + std::move(listener_ptr)); break; } case extensions::api::socket::SOCKET_TYPE_NONE: @@ -263,7 +263,7 @@ socket = new TCPSocket(browser_context(), extension_->id()); } else if (socket_type_ == kSocketTypeUDP) { socket = - new UDPSocket(std::move(socket_), std::move(socket_receiver_request_), + new UDPSocket(std::move(socket_), std::move(socket_listener_request_), extension_->id()); } DCHECK(socket);
diff --git a/extensions/browser/api/socket/socket_api.h b/extensions/browser/api/socket/socket_api.h index 2d41eb7..79abac3 100644 --- a/extensions/browser/api/socket/socket_api.h +++ b/extensions/browser/api/socket/socket_api.h
@@ -196,7 +196,7 @@ // These two fields are only applicable if |socket_type_| is UDP. network::mojom::UDPSocketPtrInfo socket_; - network::mojom::UDPSocketReceiverRequest socket_receiver_request_; + network::mojom::UDPSocketListenerRequest socket_listener_request_; std::unique_ptr<api::socket::Create::Params> params_; SocketType socket_type_;
diff --git a/extensions/browser/api/socket/udp_socket.cc b/extensions/browser/api/socket/udp_socket.cc index 7d63bee..8103ff6 100644 --- a/extensions/browser/api/socket/udp_socket.cc +++ b/extensions/browser/api/socket/udp_socket.cc
@@ -32,14 +32,14 @@ } UDPSocket::UDPSocket(network::mojom::UDPSocketPtrInfo socket, - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const std::string& owner_extension_id) : Socket(owner_extension_id), socket_(std::move(socket)), socket_options_(network::mojom::UDPSocketOptions::New()), is_bound_(false), - receiver_binding_(this) { - receiver_binding_.Bind(std::move(receiver_request)); + listener_binding_(this) { + listener_binding_.Bind(std::move(listener_request)); } UDPSocket::~UDPSocket() { @@ -387,10 +387,10 @@ ResumableUDPSocket::ResumableUDPSocket( network::mojom::UDPSocketPtrInfo socket, - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const std::string& owner_extension_id) : UDPSocket(std::move(socket), - std::move(receiver_request), + std::move(listener_request), owner_extension_id), persistent_(false), buffer_size_(0),
diff --git a/extensions/browser/api/socket/udp_socket.h b/extensions/browser/api/socket/udp_socket.h index ab6f9305..270409f 100644 --- a/extensions/browser/api/socket/udp_socket.h +++ b/extensions/browser/api/socket/udp_socket.h
@@ -19,10 +19,10 @@ namespace extensions { -class UDPSocket : public Socket, public network::mojom::UDPSocketReceiver { +class UDPSocket : public Socket, public network::mojom::UDPSocketListener { public: UDPSocket(network::mojom::UDPSocketPtrInfo socket, - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const std::string& owner_extension_id); ~UDPSocket() override; @@ -71,7 +71,7 @@ bool IsConnectedOrBound() const; - // network::mojom::UDPSocketReceiver implementation. + // network::mojom::UDPSocketListener implementation. void OnReceived(int32_t result, const base::Optional<net::IPEndPoint>& src_addr, base::Optional<base::span<const uint8_t>> data) override; @@ -100,7 +100,7 @@ network::mojom::UDPSocketOptionsPtr socket_options_; bool is_bound_; - mojo::Binding<network::mojom::UDPSocketReceiver> receiver_binding_; + mojo::Binding<network::mojom::UDPSocketListener> listener_binding_; base::Optional<net::IPEndPoint> local_addr_; base::Optional<net::IPEndPoint> peer_addr_; @@ -117,7 +117,7 @@ class ResumableUDPSocket : public UDPSocket { public: ResumableUDPSocket(network::mojom::UDPSocketPtrInfo socket, - network::mojom::UDPSocketReceiverRequest receiver_request, + network::mojom::UDPSocketListenerRequest listener_request, const std::string& owner_extension_id); // Overriden from ApiResource
diff --git a/extensions/browser/api/sockets_udp/sockets_udp_api.cc b/extensions/browser/api/sockets_udp/sockets_udp_api.cc index 7b23e937..3c766fb 100644 --- a/extensions/browser/api/sockets_udp/sockets_udp_api.cc +++ b/extensions/browser/api/sockets_udp/sockets_udp_api.cc
@@ -96,17 +96,17 @@ params_ = sockets_udp::Create::Params::Create(*args_); EXTENSION_FUNCTION_VALIDATE(params_.get()); - network::mojom::UDPSocketReceiverPtr receiver_ptr; - socket_receiver_request_ = mojo::MakeRequest(&receiver_ptr); + network::mojom::UDPSocketListenerPtr listener_ptr; + socket_listener_request_ = mojo::MakeRequest(&listener_ptr); content::BrowserContext::GetDefaultStoragePartition(browser_context()) ->GetNetworkContext() - ->CreateUDPSocket(mojo::MakeRequest(&socket_), std::move(receiver_ptr)); + ->CreateUDPSocket(mojo::MakeRequest(&socket_), std::move(listener_ptr)); return true; } void SocketsUdpCreateFunction::Work() { ResumableUDPSocket* socket = new ResumableUDPSocket( - std::move(socket_), std::move(socket_receiver_request_), + std::move(socket_), std::move(socket_listener_request_), extension_->id()); sockets_udp::SocketProperties* properties = params_->properties.get();
diff --git a/extensions/browser/api/sockets_udp/sockets_udp_api.h b/extensions/browser/api/sockets_udp/sockets_udp_api.h index ee5ddac..d9c6a2a8 100644 --- a/extensions/browser/api/sockets_udp/sockets_udp_api.h +++ b/extensions/browser/api/sockets_udp/sockets_udp_api.h
@@ -58,7 +58,7 @@ FRIEND_TEST_ALL_PREFIXES(SocketsUdpUnitTest, Create); network::mojom::UDPSocketPtrInfo socket_; - network::mojom::UDPSocketReceiverRequest socket_receiver_request_; + network::mojom::UDPSocketListenerRequest socket_listener_request_; std::unique_ptr<sockets_udp::Create::Params> params_; };
diff --git a/fuchsia/runners/cast/named_message_port_connector.cc b/fuchsia/runners/cast/named_message_port_connector.cc index 23e1061..7bdf4ad 100644 --- a/fuchsia/runners/cast/named_message_port_connector.cc +++ b/fuchsia/runners/cast/named_message_port_connector.cc
@@ -20,8 +20,8 @@ namespace { -const char kBindingsJsPath[] = - FILE_PATH_LITERAL("chromecast/bindings/named_message_port_connector.js"); +const char kBindingsJsPath[] = FILE_PATH_LITERAL( + "chromecast/bindings/resources/named_message_port_connector.js"); const char kControlPortConnectMessage[] = "cast.master.connect"; } // namespace
diff --git a/gin/runner.cc b/gin/runner.cc index dd04c15..7ce7608 100644 --- a/gin/runner.cc +++ b/gin/runner.cc
@@ -6,8 +6,7 @@ namespace gin { -Runner::Runner() : weak_factory_(this) { -} +Runner::Runner() {} Runner::~Runner() = default;
diff --git a/gin/runner.h b/gin/runner.h index 928275d5..784687d 100644 --- a/gin/runner.h +++ b/gin/runner.h
@@ -53,7 +53,7 @@ private: friend class Scope; - base::WeakPtrFactory<Runner> weak_factory_; + base::WeakPtrFactory<Runner> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Runner); };
diff --git a/google_apis/drive/auth_service.cc b/google_apis/drive/auth_service.cc index b2fbfda..ab73b92 100644 --- a/google_apis/drive/auth_service.cc +++ b/google_apis/drive/auth_service.cc
@@ -118,8 +118,7 @@ : identity_manager_(identity_manager), account_id_(account_id), url_loader_factory_(url_loader_factory), - scopes_(scopes), - weak_ptr_factory_(this) { + scopes_(scopes) { DCHECK(identity_manager_); identity_manager_->AddObserver(this);
diff --git a/google_apis/drive/auth_service.h b/google_apis/drive/auth_service.h index 1a2fc93..0e49064 100644 --- a/google_apis/drive/auth_service.h +++ b/google_apis/drive/auth_service.h
@@ -78,7 +78,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<AuthService> weak_ptr_factory_; + base::WeakPtrFactory<AuthService> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AuthService); };
diff --git a/google_apis/drive/base_requests.cc b/google_apis/drive/base_requests.cc index 4c3de77..49227c7d 100644 --- a/google_apis/drive/base_requests.cc +++ b/google_apis/drive/base_requests.cc
@@ -255,8 +255,7 @@ sender_(sender), upload_progress_callback_(upload_progress_callback), download_progress_callback_(download_progress_callback), - response_content_length_(-1), - weak_ptr_factory_(this) {} + response_content_length_(-1) {} UrlFetchRequestBase::~UrlFetchRequestBase() {} @@ -684,8 +683,7 @@ const GURL& upload_url, const ProgressCallback& progress_callback) : UrlFetchRequestBase(sender, progress_callback, ProgressCallback()), - upload_url_(upload_url), - weak_ptr_factory_(this) {} + upload_url_(upload_url) {} UploadRangeRequestBase::~UploadRangeRequestBase() {} @@ -880,8 +878,7 @@ content_type_(content_type), local_path_(local_file_path), callback_(callback), - progress_callback_(progress_callback), - weak_ptr_factory_(this) { + progress_callback_(progress_callback) { DCHECK(!content_type.empty()); DCHECK_GE(content_length, 0); DCHECK(!local_file_path.empty());
diff --git a/google_apis/drive/base_requests.h b/google_apis/drive/base_requests.h index 874bd109..5d056c2 100644 --- a/google_apis/drive/base_requests.h +++ b/google_apis/drive/base_requests.h
@@ -281,7 +281,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<UrlFetchRequestBase> weak_ptr_factory_; + base::WeakPtrFactory<UrlFetchRequestBase> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(UrlFetchRequestBase); }; @@ -462,7 +462,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<UploadRangeRequestBase> weak_ptr_factory_; + base::WeakPtrFactory<UploadRangeRequestBase> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(UploadRangeRequestBase); }; @@ -609,7 +609,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<MultipartUploadRequestBase> weak_ptr_factory_; + base::WeakPtrFactory<MultipartUploadRequestBase> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MultipartUploadRequestBase); };
diff --git a/google_apis/drive/drive_api_requests.cc b/google_apis/drive/drive_api_requests.cc index d7aa381..c780569 100644 --- a/google_apis/drive/drive_api_requests.cc +++ b/google_apis/drive/drive_api_requests.cc
@@ -1109,8 +1109,7 @@ // class and cannot outlive this instance. base::Unretained(this)), ProgressCallback()), - delegate_(std::move(delegate)), - weak_ptr_factory_(this) {} + delegate_(std::move(delegate)) {} SingleBatchableDelegateRequest::~SingleBatchableDelegateRequest() { } @@ -1181,8 +1180,7 @@ sender_(sender), url_generator_(url_generator), committed_(false), - last_progress_value_(0), - weak_ptr_factory_(this) {} + last_progress_value_(0) {} BatchUploadRequest::~BatchUploadRequest() { }
diff --git a/google_apis/drive/drive_api_requests.h b/google_apis/drive/drive_api_requests.h index 53300571..4ec8bd9 100644 --- a/google_apis/drive/drive_api_requests.h +++ b/google_apis/drive/drive_api_requests.h
@@ -143,9 +143,7 @@ // |callback| is called when the request finishes either by success or by // failure. On success, a JSON Value object is passed. It must not be null. DriveApiDataRequest(RequestSender* sender, const Callback& callback) - : DriveApiPartialFieldRequest(sender), - callback_(callback), - weak_ptr_factory_(this) { + : DriveApiPartialFieldRequest(sender), callback_(callback) { DCHECK(!callback_.is_null()); } ~DriveApiDataRequest() override {} @@ -197,7 +195,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<DriveApiDataRequest> weak_ptr_factory_; + base::WeakPtrFactory<DriveApiDataRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DriveApiDataRequest); }; @@ -1169,7 +1167,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<SingleBatchableDelegateRequest> weak_ptr_factory_; + base::WeakPtrFactory<SingleBatchableDelegateRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SingleBatchableDelegateRequest); }; @@ -1266,7 +1264,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_; + base::WeakPtrFactory<BatchUploadRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BatchUploadRequest); };
diff --git a/google_apis/drive/files_list_request_runner.cc b/google_apis/drive/files_list_request_runner.cc index 8b25e1c..38042b5 100644 --- a/google_apis/drive/files_list_request_runner.cc +++ b/google_apis/drive/files_list_request_runner.cc
@@ -18,10 +18,7 @@ FilesListRequestRunner::FilesListRequestRunner( RequestSender* request_sender, const google_apis::DriveApiUrlGenerator& url_generator) - : request_sender_(request_sender), - url_generator_(url_generator), - weak_ptr_factory_(this) { -} + : request_sender_(request_sender), url_generator_(url_generator) {} FilesListRequestRunner::~FilesListRequestRunner() { }
diff --git a/google_apis/drive/files_list_request_runner.h b/google_apis/drive/files_list_request_runner.h index a4993ceb..1e3027b 100644 --- a/google_apis/drive/files_list_request_runner.h +++ b/google_apis/drive/files_list_request_runner.h
@@ -66,7 +66,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<FilesListRequestRunner> weak_ptr_factory_; + base::WeakPtrFactory<FilesListRequestRunner> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FilesListRequestRunner); };
diff --git a/google_apis/drive/request_sender.cc b/google_apis/drive/request_sender.cc index 5614632..86abc74 100644 --- a/google_apis/drive/request_sender.cc +++ b/google_apis/drive/request_sender.cc
@@ -23,8 +23,7 @@ url_loader_factory_(url_loader_factory), blocking_task_runner_(blocking_task_runner), custom_user_agent_(custom_user_agent), - traffic_annotation_(traffic_annotation), - weak_ptr_factory_(this) {} + traffic_annotation_(traffic_annotation) {} RequestSender::~RequestSender() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/google_apis/drive/request_sender.h b/google_apis/drive/request_sender.h index 44a21ee..5deb974 100644 --- a/google_apis/drive/request_sender.h +++ b/google_apis/drive/request_sender.h
@@ -111,7 +111,7 @@ // Note: This should remain the last member so it'll be destroyed and // invalidate its weak pointers before any other members are destroyed. - base::WeakPtrFactory<RequestSender> weak_ptr_factory_; + base::WeakPtrFactory<RequestSender> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(RequestSender); };
diff --git a/google_apis/drive/request_sender_unittest.cc b/google_apis/drive/request_sender_unittest.cc index 67032a3..d61444c5 100644 --- a/google_apis/drive/request_sender_unittest.cc +++ b/google_apis/drive/request_sender_unittest.cc
@@ -83,9 +83,7 @@ FinishReason* finish_reason) : sender_(sender), start_called_(start_called), - finish_reason_(finish_reason), - weak_ptr_factory_(this) { - } + finish_reason_(finish_reason) {} // Test the situation that the request has finished. void FinishRequestWithSuccess() { @@ -133,7 +131,7 @@ FinishReason* finish_reason_; std::string passed_access_token_; ReAuthenticateCallback passed_reauth_callback_; - base::WeakPtrFactory<TestRequest> weak_ptr_factory_; + base::WeakPtrFactory<TestRequest> weak_ptr_factory_{this}; }; } // namespace
diff --git a/google_apis/gaia/fake_oauth2_access_token_manager.cc b/google_apis/gaia/fake_oauth2_access_token_manager.cc index 5aabb8c4..252309b 100644 --- a/google_apis/gaia/fake_oauth2_access_token_manager.cc +++ b/google_apis/gaia/fake_oauth2_access_token_manager.cc
@@ -22,8 +22,7 @@ FakeOAuth2AccessTokenManager::FakeOAuth2AccessTokenManager( OAuth2AccessTokenManager::Delegate* delegate) : OAuth2AccessTokenManager(delegate), - auto_post_fetch_response_on_message_loop_(false), - weak_ptr_factory_(this) {} + auto_post_fetch_response_on_message_loop_(false) {} FakeOAuth2AccessTokenManager::~FakeOAuth2AccessTokenManager() {}
diff --git a/google_apis/gaia/fake_oauth2_access_token_manager.h b/google_apis/gaia/fake_oauth2_access_token_manager.h index 6ce90527..7feeafe 100644 --- a/google_apis/gaia/fake_oauth2_access_token_manager.h +++ b/google_apis/gaia/fake_oauth2_access_token_manager.h
@@ -115,7 +115,7 @@ // |IssueTokenForScope| in this case. bool auto_post_fetch_response_on_message_loop_; - base::WeakPtrFactory<FakeOAuth2AccessTokenManager> weak_ptr_factory_; + base::WeakPtrFactory<FakeOAuth2AccessTokenManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeOAuth2AccessTokenManager); };
diff --git a/google_apis/gaia/gaia_auth_fetcher.cc b/google_apis/gaia/gaia_auth_fetcher.cc index 56e02351..e20bb74c 100644 --- a/google_apis/gaia/gaia_auth_fetcher.cc +++ b/google_apis/gaia/gaia_auth_fetcher.cc
@@ -112,25 +112,38 @@ return GaiaAuthConsumer::TokenRevocationStatus::kUnknownError; } -std::string GaiaSourceToString(gaia::GaiaSource source) { +} // namespace + +namespace gaia { + +GaiaSource::GaiaSource(Type type) : type_(type) {} + +GaiaSource::GaiaSource(Type type, const std::string& suffix) + : type_(type), suffix_(suffix) {} + +void GaiaSource::SetGaiaSourceSuffix(const std::string& suffix) { + suffix_ = suffix; +} + +std::string GaiaSource::ToString() { std::string source_string; - switch (source) { - case gaia::GaiaSource::kChrome: + switch (type_) { + case Type::kChrome: source_string = GaiaConstants::kChromeSource; break; - case gaia::GaiaSource::kChromeOS: + case Type::kChromeOS: source_string = GaiaConstants::kChromeOSSource; break; - case gaia::GaiaSource::kAccountReconcilorDice: + case Type::kAccountReconcilorDice: source_string = "ChromiumAccountReconcilorDice"; break; - case gaia::GaiaSource::kAccountReconcilorMirror: + case Type::kAccountReconcilorMirror: source_string = "ChromiumAccountReconcilor"; break; - case gaia::GaiaSource::kOAuth2LoginVerifier: + case Type::kOAuth2LoginVerifier: source_string = "ChromiumOAuth2LoginVerifier"; break; - case gaia::GaiaSource::kPrimaryAccountManager: + case Type::kPrimaryAccountManager: // Even though this string refers to an old name from the Chromium POV, it // should not be changed as it is passed server-side. source_string = "ChromiumSigninManager"; @@ -141,10 +154,10 @@ DCHECK(source_string == "chromeos" || base::StartsWith(source_string, "Chromium", base::CompareCase::SENSITIVE)); - return source_string; + return source_string + suffix_; } -} // namespace +} // namespace gaia // static const char GaiaAuthFetcher::kIssueAuthTokenFormat[] = @@ -203,7 +216,7 @@ scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory) : url_loader_factory_(url_loader_factory), consumer_(consumer), - source_(GaiaSourceToString(source)), + source_(source.ToString()), oauth2_token_gurl_(GaiaUrls::GetInstance()->oauth2_token_url()), oauth2_revoke_gurl_(GaiaUrls::GetInstance()->oauth2_revoke_url()), get_user_info_gurl_(GaiaUrls::GetInstance()->get_user_info_url()),
diff --git a/google_apis/gaia/gaia_auth_fetcher.h b/google_apis/gaia/gaia_auth_fetcher.h index ffb869e..79964d2 100644 --- a/google_apis/gaia/gaia_auth_fetcher.h +++ b/google_apis/gaia/gaia_auth_fetcher.h
@@ -43,13 +43,26 @@ }; // Specifies the "source" parameter for Gaia calls. -enum class GaiaSource { - kChrome, - kChromeOS, - kAccountReconcilorDice, - kAccountReconcilorMirror, - kOAuth2LoginVerifier, - kPrimaryAccountManager +class GaiaSource { + public: + enum Type { + kChrome, + kChromeOS, + kAccountReconcilorDice, + kAccountReconcilorMirror, + kOAuth2LoginVerifier, + kPrimaryAccountManager + }; + + // Implicit conversion is necessary to avoid boilerplate code. + GaiaSource(Type type); + GaiaSource(Type source, const std::string& suffix); + void SetGaiaSourceSuffix(const std::string& suffix); + std::string ToString(); + + private: + Type type_; + std::string suffix_; }; } // namespace gaia
diff --git a/google_apis/gaia/gaia_constants.cc b/google_apis/gaia/gaia_constants.cc index 812f352..63cb6bd0 100644 --- a/google_apis/gaia/gaia_constants.cc +++ b/google_apis/gaia/gaia_constants.cc
@@ -11,6 +11,7 @@ // Gaia uses this for accounting where login is coming from. const char kChromeOSSource[] = "chromeos"; const char kChromeSource[] = "ChromiumBrowser"; +const char kUnexpectedServiceResponse[] = "UnexpectedServiceResponse"; // Service name for Gaia. Used to convert to cookie auth. const char kGaiaService[] = "gaia";
diff --git a/google_apis/gaia/gaia_constants.h b/google_apis/gaia/gaia_constants.h index f7d87c0..5694050 100644 --- a/google_apis/gaia/gaia_constants.h +++ b/google_apis/gaia/gaia_constants.h
@@ -12,6 +12,9 @@ // Gaia sources for accounting extern const char kChromeOSSource[]; extern const char kChromeSource[]; +// Used as Gaia source suffix to detect retry requests because of +// |GoogleServiceAuthError::UNEXPECTED_SERVICE_RESPONSE|. +extern const char kUnexpectedServiceResponse[]; // Gaia services for requesting extern const char kGaiaService[]; // uber token
diff --git a/google_apis/gaia/gaia_oauth_client.cc b/google_apis/gaia/gaia_oauth_client.cc index fb38b4d2..4e0335bf 100644 --- a/google_apis/gaia/gaia_oauth_client.cc +++ b/google_apis/gaia/gaia_oauth_client.cc
@@ -43,8 +43,7 @@ max_retries_(0), url_loader_factory_(url_loader_factory), delegate_(nullptr), - request_type_(NO_PENDING_REQUEST), - weak_ptr_factory_(this) { + request_type_(NO_PENDING_REQUEST) { backoff_policy_.num_errors_to_ignore = net::URLRequestThrottlerEntry::kDefaultNumErrorsToIgnore; backoff_policy_.initial_delay_ms = @@ -142,7 +141,7 @@ std::unique_ptr<network::SimpleURLLoader> request_; RequestType request_type_; - base::WeakPtrFactory<Core> weak_ptr_factory_; + base::WeakPtrFactory<Core> weak_ptr_factory_{this}; }; void GaiaOAuthClient::Core::GetTokensFromAuthCode(
diff --git a/google_apis/gaia/oauth2_mint_token_flow.cc b/google_apis/gaia/oauth2_mint_token_flow.cc index 216afac..98d8da5f 100644 --- a/google_apis/gaia/oauth2_mint_token_flow.cc +++ b/google_apis/gaia/oauth2_mint_token_flow.cc
@@ -128,8 +128,7 @@ OAuth2MintTokenFlow::OAuth2MintTokenFlow(Delegate* delegate, const Parameters& parameters) - : delegate_(delegate), parameters_(parameters), weak_factory_(this) { -} + : delegate_(delegate), parameters_(parameters) {} OAuth2MintTokenFlow::~OAuth2MintTokenFlow() { }
diff --git a/google_apis/gaia/oauth2_mint_token_flow.h b/google_apis/gaia/oauth2_mint_token_flow.h index 4a50391d8..caed408 100644 --- a/google_apis/gaia/oauth2_mint_token_flow.h +++ b/google_apis/gaia/oauth2_mint_token_flow.h
@@ -131,7 +131,7 @@ Delegate* delegate_; Parameters parameters_; - base::WeakPtrFactory<OAuth2MintTokenFlow> weak_factory_; + base::WeakPtrFactory<OAuth2MintTokenFlow> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(OAuth2MintTokenFlow); };
diff --git a/google_apis/gcm/BUILD.gn b/google_apis/gcm/BUILD.gn index fc9fe07..5c86513 100644 --- a/google_apis/gcm/BUILD.gn +++ b/google_apis/gcm/BUILD.gn
@@ -62,6 +62,7 @@ public_deps = [ ":proto", + "//google_apis", ] deps = [ "//base", @@ -165,6 +166,7 @@ ":test_support", "//base", "//base/test:test_support", + "//google_apis", "//google_apis:run_all_unittests", "//mojo/public/cpp/system:system", "//net",
diff --git a/google_apis/gcm/base/socket_stream.cc b/google_apis/gcm/base/socket_stream.cc index 8038dc0..d9759e7 100644 --- a/google_apis/gcm/base/socket_stream.cc +++ b/google_apis/gcm/base/socket_stream.cc
@@ -30,8 +30,7 @@ base::MakeRefCounted<net::DrainableIOBuffer>(io_buffer_, kDefaultBufferSize)), next_pos_(0), - last_error_(net::OK), - weak_ptr_factory_(this) { + last_error_(net::OK) { stream_watcher_.Watch( stream_.get(), MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED, @@ -226,8 +225,7 @@ io_buffer_( base::MakeRefCounted<net::IOBufferWithSize>(kDefaultBufferSize)), next_pos_(0), - last_error_(net::OK), - weak_ptr_factory_(this) { + last_error_(net::OK) { stream_watcher_.Watch( stream_.get(), MOJO_HANDLE_SIGNAL_WRITABLE | MOJO_HANDLE_SIGNAL_PEER_CLOSED,
diff --git a/google_apis/gcm/base/socket_stream.h b/google_apis/gcm/base/socket_stream.h index 63556b2..109f4168 100644 --- a/google_apis/gcm/base/socket_stream.h +++ b/google_apis/gcm/base/socket_stream.h
@@ -128,7 +128,7 @@ // Note: last_error_ == net::ERR_IO_PENDING implies GetState() == READING. net::Error last_error_; - base::WeakPtrFactory<SocketInputStream> weak_ptr_factory_; + base::WeakPtrFactory<SocketInputStream> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SocketInputStream); }; @@ -201,7 +201,7 @@ // Note: last_error_ == net::ERR_IO_PENDING implies GetState() == FLUSHING. net::Error last_error_; - base::WeakPtrFactory<SocketOutputStream> weak_ptr_factory_; + base::WeakPtrFactory<SocketOutputStream> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SocketOutputStream); };
diff --git a/google_apis/gcm/engine/checkin_request.cc b/google_apis/gcm/engine/checkin_request.cc index 031a05fe..b2723cd 100644 --- a/google_apis/gcm/engine/checkin_request.cc +++ b/google_apis/gcm/engine/checkin_request.cc
@@ -110,8 +110,7 @@ checkin_url_(checkin_url), request_info_(request_info), io_task_runner_(std::move(io_task_runner)), - recorder_(recorder), - weak_ptr_factory_(this) { + recorder_(recorder) { DCHECK(io_task_runner_); }
diff --git a/google_apis/gcm/engine/checkin_request.h b/google_apis/gcm/engine/checkin_request.h index eb00a26..bd1b2853 100644 --- a/google_apis/gcm/engine/checkin_request.h +++ b/google_apis/gcm/engine/checkin_request.h
@@ -98,7 +98,7 @@ // Recorder that records GCM activities for debugging purpose. Not owned. GCMStatsRecorder* recorder_; - base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_; + base::WeakPtrFactory<CheckinRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(CheckinRequest); };
diff --git a/google_apis/gcm/engine/connection_factory_impl.cc b/google_apis/gcm/engine/connection_factory_impl.cc index 790b9a8..98ef194 100644 --- a/google_apis/gcm/engine/connection_factory_impl.cc +++ b/google_apis/gcm/engine/connection_factory_impl.cc
@@ -68,8 +68,7 @@ io_task_runner_(std::move(io_task_runner)), recorder_(recorder), network_connection_tracker_(network_connection_tracker), - listener_(nullptr), - weak_ptr_factory_(this) { + listener_(nullptr) { DCHECK_GE(mcs_endpoints_.size(), 1U); DCHECK(io_task_runner_); }
diff --git a/google_apis/gcm/engine/connection_factory_impl.h b/google_apis/gcm/engine/connection_factory_impl.h index bbce25fe..2dbcbc1 100644 --- a/google_apis/gcm/engine/connection_factory_impl.h +++ b/google_apis/gcm/engine/connection_factory_impl.h
@@ -194,7 +194,7 @@ // The currently registered listener to notify of connection changes. ConnectionListener* listener_; - base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_; + base::WeakPtrFactory<ConnectionFactoryImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ConnectionFactoryImpl); };
diff --git a/google_apis/gcm/engine/connection_handler_impl.cc b/google_apis/gcm/engine/connection_handler_impl.cc index b5e0481..e80aff55 100644 --- a/google_apis/gcm/engine/connection_handler_impl.cc +++ b/google_apis/gcm/engine/connection_handler_impl.cc
@@ -58,8 +58,7 @@ read_callback_(read_callback), write_callback_(write_callback), connection_callback_(connection_callback), - size_packet_so_far_(0), - weak_ptr_factory_(this) { + size_packet_so_far_(0) { DCHECK(io_task_runner_); DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); }
diff --git a/google_apis/gcm/engine/connection_handler_impl.h b/google_apis/gcm/engine/connection_handler_impl.h index 13a482c..25106378 100644 --- a/google_apis/gcm/engine/connection_handler_impl.h +++ b/google_apis/gcm/engine/connection_handler_impl.h
@@ -135,7 +135,7 @@ // will be empty otherwise). std::vector<uint8_t> payload_input_buffer_; - base::WeakPtrFactory<ConnectionHandlerImpl> weak_ptr_factory_; + base::WeakPtrFactory<ConnectionHandlerImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ConnectionHandlerImpl); };
diff --git a/google_apis/gcm/engine/gcm_store.h b/google_apis/gcm/engine/gcm_store.h index d9d0595b..d48c22a 100644 --- a/google_apis/gcm/engine/gcm_store.h +++ b/google_apis/gcm/engine/gcm_store.h
@@ -18,6 +18,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/time/time.h" +#include "google_apis/gaia/core_account_id.h" #include "google_apis/gcm/base/gcm_export.h" #include "google_apis/gcm/engine/account_mapping.h" @@ -137,7 +138,7 @@ // Sets the account information related to device to account mapping. virtual void AddAccountMapping(const AccountMapping& account_mapping, const UpdateCallback& callback) = 0; - virtual void RemoveAccountMapping(const std::string& account_id, + virtual void RemoveAccountMapping(const CoreAccountId& account_id, const UpdateCallback& callback) = 0; // Sets last token fetch time.
diff --git a/google_apis/gcm/engine/gcm_store_impl.cc b/google_apis/gcm/engine/gcm_store_impl.cc index cc333cdc..07bba2b2 100644 --- a/google_apis/gcm/engine/gcm_store_impl.cc +++ b/google_apis/gcm/engine/gcm_store_impl.cc
@@ -146,12 +146,12 @@ return key.substr(base::size(kGServiceSettingKeyStart) - 1); } -std::string MakeAccountKey(const std::string& account_id) { - return kAccountKeyStart + account_id; +std::string MakeAccountKey(const CoreAccountId& account_id) { + return kAccountKeyStart + account_id.id; } -std::string ParseAccountKey(const std::string& key) { - return key.substr(base::size(kAccountKeyStart) - 1); +CoreAccountId ParseAccountKey(const std::string& key) { + return CoreAccountId(key.substr(base::size(kAccountKeyStart) - 1)); } std::string MakeHeartbeatKey(const std::string& scope) { @@ -223,7 +223,7 @@ const UpdateCallback& callback); void AddAccountMapping(const AccountMapping& account_mapping, const UpdateCallback& callback); - void RemoveAccountMapping(const std::string& account_id, + void RemoveAccountMapping(const CoreAccountId& account_id, const UpdateCallback& callback); void SetLastTokenFetchTime(const base::Time& time, const UpdateCallback& callback); @@ -745,7 +745,7 @@ } void GCMStoreImpl::Backend::RemoveAccountMapping( - const std::string& account_id, + const CoreAccountId& account_id, const UpdateCallback& callback) { if (!db_.get()) { LOG(ERROR) << "GCMStore db doesn't exist."; @@ -1181,8 +1181,7 @@ : backend_(new Backend(path, base::ThreadTaskRunnerHandle::Get(), std::move(encryptor))), - blocking_task_runner_(blocking_task_runner), - weak_ptr_factory_(this) {} + blocking_task_runner_(blocking_task_runner) {} GCMStoreImpl::~GCMStoreImpl() {} @@ -1342,7 +1341,7 @@ backend_, account_mapping, callback)); } -void GCMStoreImpl::RemoveAccountMapping(const std::string& account_id, +void GCMStoreImpl::RemoveAccountMapping(const CoreAccountId& account_id, const UpdateCallback& callback) { blocking_task_runner_->PostTask( FROM_HERE, base::BindOnce(&GCMStoreImpl::Backend::RemoveAccountMapping,
diff --git a/google_apis/gcm/engine/gcm_store_impl.h b/google_apis/gcm/engine/gcm_store_impl.h index 764772c9..95a4d67 100644 --- a/google_apis/gcm/engine/gcm_store_impl.h +++ b/google_apis/gcm/engine/gcm_store_impl.h
@@ -90,7 +90,7 @@ // Sets the account information related to device to account mapping. void AddAccountMapping(const AccountMapping& account_mapping, const UpdateCallback& callback) override; - void RemoveAccountMapping(const std::string& account_id, + void RemoveAccountMapping(const CoreAccountId& account_id, const UpdateCallback& callback) override; // Sets last token fetch time. @@ -146,7 +146,7 @@ scoped_refptr<Backend> backend_; scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; - base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_; + base::WeakPtrFactory<GCMStoreImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GCMStoreImpl); };
diff --git a/google_apis/gcm/engine/gservices_settings.cc b/google_apis/gcm/engine/gservices_settings.cc index 6de0e1c..1d53f9f2 100644 --- a/google_apis/gcm/engine/gservices_settings.cc +++ b/google_apis/gcm/engine/gservices_settings.cc
@@ -200,7 +200,7 @@ return digest; } -GServicesSettings::GServicesSettings() : weak_ptr_factory_(this) { +GServicesSettings::GServicesSettings() { digest_ = CalculateDigest(settings_); }
diff --git a/google_apis/gcm/engine/gservices_settings.h b/google_apis/gcm/engine/gservices_settings.h index 663b8b2..92a96c12 100644 --- a/google_apis/gcm/engine/gservices_settings.h +++ b/google_apis/gcm/engine/gservices_settings.h
@@ -70,7 +70,7 @@ SettingsMap settings_; // Factory for creating references in callbacks. - base::WeakPtrFactory<GServicesSettings> weak_ptr_factory_; + base::WeakPtrFactory<GServicesSettings> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GServicesSettings); };
diff --git a/google_apis/gcm/engine/heartbeat_manager.cc b/google_apis/gcm/engine/heartbeat_manager.cc index 71e3f02..6da8336 100644 --- a/google_apis/gcm/engine/heartbeat_manager.cc +++ b/google_apis/gcm/engine/heartbeat_manager.cc
@@ -49,8 +49,7 @@ server_interval_ms_(0), client_interval_ms_(0), io_task_runner_(std::move(io_task_runner)), - heartbeat_timer_(new base::RetainingOneShotTimer()), - weak_ptr_factory_(this) { + heartbeat_timer_(new base::RetainingOneShotTimer()) { DCHECK(io_task_runner_); DCHECK(io_task_runner_->RunsTasksInCurrentSequence()); // Set the heartbeat timer task runner to |maybe_power_wrapped_io_task_runner|
diff --git a/google_apis/gcm/engine/heartbeat_manager.h b/google_apis/gcm/engine/heartbeat_manager.h index a517114..cdfde435 100644 --- a/google_apis/gcm/engine/heartbeat_manager.h +++ b/google_apis/gcm/engine/heartbeat_manager.h
@@ -137,7 +137,7 @@ base::Closure send_heartbeat_callback_; ReconnectCallback trigger_reconnect_callback_; - base::WeakPtrFactory<HeartbeatManager> weak_ptr_factory_; + base::WeakPtrFactory<HeartbeatManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HeartbeatManager); };
diff --git a/google_apis/gcm/engine/mcs_client.cc b/google_apis/gcm/engine/mcs_client.cc index 16d98e6..5597933 100644 --- a/google_apis/gcm/engine/mcs_client.cc +++ b/google_apis/gcm/engine/mcs_client.cc
@@ -181,8 +181,7 @@ io_task_runner_(io_task_runner), heartbeat_manager_(std::move(base::ThreadTaskRunnerHandle::Get()), std::move(io_task_runner)), - recorder_(recorder), - weak_ptr_factory_(this) { + recorder_(recorder) { DCHECK(io_task_runner_); }
diff --git a/google_apis/gcm/engine/mcs_client.h b/google_apis/gcm/engine/mcs_client.h index 344855a..163b6ea 100644 --- a/google_apis/gcm/engine/mcs_client.h +++ b/google_apis/gcm/engine/mcs_client.h
@@ -309,7 +309,7 @@ // Recorder that records GCM activities for debugging purpose. Not owned. GCMStatsRecorder* recorder_; - base::WeakPtrFactory<MCSClient> weak_ptr_factory_; + base::WeakPtrFactory<MCSClient> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MCSClient); };
diff --git a/google_apis/gcm/engine/registration_request.cc b/google_apis/gcm/engine/registration_request.cc index 620e1155..a99879d 100644 --- a/google_apis/gcm/engine/registration_request.cc +++ b/google_apis/gcm/engine/registration_request.cc
@@ -135,8 +135,7 @@ retries_left_(max_retry_count), io_task_runner_(io_task_runner), recorder_(recorder), - source_to_record_(source_to_record), - weak_ptr_factory_(this) { + source_to_record_(source_to_record) { DCHECK(io_task_runner_); DCHECK_GE(max_retry_count, 0); }
diff --git a/google_apis/gcm/engine/registration_request.h b/google_apis/gcm/engine/registration_request.h index 650290c..50afce8 100644 --- a/google_apis/gcm/engine/registration_request.h +++ b/google_apis/gcm/engine/registration_request.h
@@ -158,7 +158,7 @@ GCMStatsRecorder* recorder_; std::string source_to_record_; - base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_; + base::WeakPtrFactory<RegistrationRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(RegistrationRequest); };
diff --git a/google_apis/gcm/engine/unregistration_request.cc b/google_apis/gcm/engine/unregistration_request.cc index 6bfa4ff6..ca1a7c2 100644 --- a/google_apis/gcm/engine/unregistration_request.cc +++ b/google_apis/gcm/engine/unregistration_request.cc
@@ -120,8 +120,7 @@ retries_left_(max_retry_count), io_task_runner_(io_task_runner), recorder_(recorder), - source_to_record_(source_to_record), - weak_ptr_factory_(this) { + source_to_record_(source_to_record) { DCHECK(io_task_runner_); DCHECK_GE(max_retry_count, 0); }
diff --git a/google_apis/gcm/engine/unregistration_request.h b/google_apis/gcm/engine/unregistration_request.h index eb3ae42..3317a619 100644 --- a/google_apis/gcm/engine/unregistration_request.h +++ b/google_apis/gcm/engine/unregistration_request.h
@@ -153,7 +153,7 @@ GCMStatsRecorder* recorder_; std::string source_to_record_; - base::WeakPtrFactory<UnregistrationRequest> weak_ptr_factory_; + base::WeakPtrFactory<UnregistrationRequest> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(UnregistrationRequest); };
diff --git a/gpu/command_buffer/common/shared_image_usage.h b/gpu/command_buffer/common/shared_image_usage.h index 5ef87676..76cdd80 100644 --- a/gpu/command_buffer/common/shared_image_usage.h +++ b/gpu/command_buffer/common/shared_image_usage.h
@@ -31,6 +31,10 @@ SHARED_IMAGE_USAGE_WEBGPU = 1 << 7, // Image will be used in a protected Vulkan context on Fuchsia. SHARED_IMAGE_USAGE_PROTECTED = 1 << 8, + // Image may use concurrent read/write access. Used by single buffered canvas. + // TODO(crbug.com/969114): This usage is currently not supported in GL/Vulkan + // interop cases. + SHARED_IMAGE_USAGE_CONCURRENT_READ_WRITE = 1 << 9, }; } // namespace gpu
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc index 44d34ab..601c7752 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -777,6 +777,7 @@ "GL_EXT_blend_minmax", "GL_EXT_discard_framebuffer", "GL_EXT_disjoint_timer_query", + "GL_EXT_multisampled_render_to_texture", "GL_EXT_occlusion_query_boolean", "GL_EXT_sRGB", "GL_EXT_sRGB_write_control",
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc index c061f69..e42d52a6 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
@@ -3223,9 +3223,9 @@ GLenum internalformat, GLsizei width, GLsizei height) { - // This is for GL_EXT_multisampled_render_to_texture, which is not currently - // supported by ANGLE. - NOTREACHED(); + DCHECK(feature_info_->feature_flags().multisampled_render_to_texture); + api()->glRenderbufferStorageMultisampleEXTFn(target, samples, internalformat, + width, height); return error::kNoError; } @@ -3236,9 +3236,16 @@ GLuint texture, GLint level, GLsizei samples) { - // This is for GL_EXT_multisampled_render_to_texture, which is not currently - // supported by ANGLE. - NOTREACHED(); + DCHECK(feature_info_->feature_flags().multisampled_render_to_texture); + if (IsEmulatedFramebufferBound(target)) { + InsertError(GL_INVALID_OPERATION, + "Cannot change the attachments of the default framebuffer."); + return error::kNoError; + } + BindPendingImageForClientIDIfNeeded(texture); + api()->glFramebufferTexture2DMultisampleEXTFn( + target, attachment, textarget, + GetTextureServiceID(api(), texture, resources_, false), level, samples); return error::kNoError; }
diff --git a/gpu/command_buffer/service/service_transfer_cache.cc b/gpu/command_buffer/service/service_transfer_cache.cc index 83ad1fe9..d8fc008 100644 --- a/gpu/command_buffer/service/service_transfer_cache.cc +++ b/gpu/command_buffer/service/service_transfer_cache.cc
@@ -267,6 +267,7 @@ GrContext* context, std::vector<sk_sp<SkImage>> plane_images, cc::YUVDecodeFormat plane_images_format, + SkYUVColorSpace yuv_color_space, size_t buffer_byte_size, bool needs_mips) { EntryKey key(decoder_id, cc::TransferCacheEntryType::kImage, entry_id); @@ -276,9 +277,9 @@ // Create the service-side image transfer cache entry. auto entry = std::make_unique<cc::ServiceImageTransferCacheEntry>(); - if (!entry->BuildFromHardwareDecodedImage(context, std::move(plane_images), - plane_images_format, - buffer_byte_size, needs_mips)) { + if (!entry->BuildFromHardwareDecodedImage( + context, std::move(plane_images), plane_images_format, + yuv_color_space, buffer_byte_size, needs_mips)) { return false; }
diff --git a/gpu/command_buffer/service/service_transfer_cache.h b/gpu/command_buffer/service/service_transfer_cache.h index 6afe8293b..61ac93b0 100644 --- a/gpu/command_buffer/service/service_transfer_cache.h +++ b/gpu/command_buffer/service/service_transfer_cache.h
@@ -19,6 +19,7 @@ #include "gpu/command_buffer/common/discardable_handle.h" #include "gpu/command_buffer/service/context_group.h" #include "gpu/gpu_gles2_export.h" +#include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkRefCnt.h" class GrContext; @@ -74,6 +75,7 @@ GrContext* context, std::vector<sk_sp<SkImage>> plane_images, cc::YUVDecodeFormat plane_images_format, + SkYUVColorSpace yuv_color_space, size_t buffer_byte_size, bool needs_mips);
diff --git a/gpu/command_buffer/service/shared_image_backing.cc b/gpu/command_buffer/service/shared_image_backing.cc index aed8536..6e86c3a 100644 --- a/gpu/command_buffer/service/shared_image_backing.cc +++ b/gpu/command_buffer/service/shared_image_backing.cc
@@ -35,11 +35,9 @@ have_context_ = false; } -#if defined(OS_WIN) bool SharedImageBacking::PresentSwapChain() { return false; } -#endif // OS_WIN std::unique_ptr<SharedImageRepresentationGLTexture> SharedImageBacking::ProduceGLTexture(SharedImageManager* manager,
diff --git a/gpu/command_buffer/service/shared_image_backing.h b/gpu/command_buffer/service/shared_image_backing.h index 0c7566e..78cd693 100644 --- a/gpu/command_buffer/service/shared_image_backing.h +++ b/gpu/command_buffer/service/shared_image_backing.h
@@ -13,7 +13,6 @@ #include "base/memory/scoped_refptr.h" #include "base/optional.h" #include "base/synchronization/lock.h" -#include "build/build_config.h" #include "components/viz/common/resources/resource_format.h" #include "gpu/command_buffer/common/mailbox.h" #include "gpu/gpu_gles2_export.h" @@ -83,11 +82,7 @@ // Destroys the underlying backing. Must be called before destruction. virtual void Destroy() = 0; -#if defined(OS_WIN) - // Swaps buffers of the swap chain associated with this backing. Returns true - // on success. virtual bool PresentSwapChain(); -#endif // OS_WIN // Allows the backing to attach additional data to the dump or dump // additional sub paths.
diff --git a/gpu/command_buffer/service/shared_image_factory.cc b/gpu/command_buffer/service/shared_image_factory.cc index 873afc1a..f1405a3 100644 --- a/gpu/command_buffer/service/shared_image_factory.cc +++ b/gpu/command_buffer/service/shared_image_factory.cc
@@ -342,6 +342,15 @@ LOG_IF(ERROR, !interop_backing_factory_) << "Unable to create SharedImage backing: GL / Vulkan interoperability " "is not supported on this platform"; + + // TODO(crbug.com/969114): Not all shared image factory implementations + // support concurrent read/write usage. + if (usage & SHARED_IMAGE_USAGE_CONCURRENT_READ_WRITE) { + LOG(ERROR) << "Unable to create SharedImage backing: Interoperability is " + "not supported for concurrent read/write usage"; + return nullptr; + } + return interop_backing_factory_.get(); }
diff --git a/gpu/command_buffer/service/shared_image_representation.h b/gpu/command_buffer/service/shared_image_representation.h index 703c643..627a0a6b 100644 --- a/gpu/command_buffer/service/shared_image_representation.h +++ b/gpu/command_buffer/service/shared_image_representation.h
@@ -80,12 +80,10 @@ void Update(std::unique_ptr<gfx::GpuFence> in_fence) { backing()->Update(std::move(in_fence)); } -#if defined(OS_WIN) - void PresentSwapChain() { backing()->PresentSwapChain(); } -#endif // OS_WIN bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) { return backing()->ProduceLegacyMailbox(mailbox_manager); } + bool PresentSwapChain() { return backing()->PresentSwapChain(); } }; class GPU_GLES2_EXPORT SharedImageRepresentationGLTexture
diff --git a/gpu/command_buffer/service/swap_chain_factory_dxgi.cc b/gpu/command_buffer/service/swap_chain_factory_dxgi.cc index 3ec45c3..b9ec152c 100644 --- a/gpu/command_buffer/service/swap_chain_factory_dxgi.cc +++ b/gpu/command_buffer/service/swap_chain_factory_dxgi.cc
@@ -4,15 +4,15 @@ #include "gpu/command_buffer/service/swap_chain_factory_dxgi.h" -#include <d3d11.h> - #include "base/trace_event/memory_dump_manager.h" #include "components/viz/common/resources/resource_format_utils.h" #include "gpu/command_buffer/common/shared_image_trace_utils.h" #include "gpu/command_buffer/service/mailbox_manager.h" #include "gpu/command_buffer/service/shared_image_backing.h" +#include "gpu/command_buffer/service/shared_image_manager.h" #include "gpu/command_buffer/service/shared_image_representation.h" #include "gpu/command_buffer/service/texture_manager.h" +#include "ui/gfx/buffer_format_util.h" #include "ui/gl/direct_composition_surface_win.h" #include "ui/gl/gl_angle_util_win.h" #include "ui/gl/gl_bindings.h" @@ -23,18 +23,23 @@ namespace { -GLuint MakeTextureAndSetParameters(gl::GLApi* api, GLenum target) { - GLuint service_id = 0; - api->glGenTexturesFn(1, &service_id); - api->glBindTextureFn(target, service_id); - api->glTexParameteriFn(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - api->glTexParameteriFn(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - api->glTexParameteriFn(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - api->glTexParameteriFn(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - api->glTexParameteriFn(target, GL_TEXTURE_USAGE_ANGLE, - GL_FRAMEBUFFER_ATTACHMENT_ANGLE); - return service_id; -} +class ScopedRestoreTexture2D { + public: + ScopedRestoreTexture2D(gl::GLApi* api) : api_(api) { + GLint binding = 0; + api->glGetIntegervFn(GL_TEXTURE_BINDING_2D, &binding); + prev_binding_ = binding; + } + + ~ScopedRestoreTexture2D() { + api_->glBindTextureFn(GL_TEXTURE_2D, prev_binding_); + } + + private: + gl::GLApi* const api_; + GLuint prev_binding_ = 0; + DISALLOW_COPY_AND_ASSIGN(ScopedRestoreTexture2D); +}; bool ClearBackBuffer(Microsoft::WRL::ComPtr<IDXGISwapChain1>& swap_chain, Microsoft::WRL::ComPtr<ID3D11Device>& d3d11_device) { @@ -65,17 +70,6 @@ return true; } -bool SupportedFormat(viz::ResourceFormat format) { - switch (format) { - case viz::RGBA_F16: - case viz::RGBA_8888: - case viz::RGBX_8888: - return true; - default: - return false; - }; -} - } // anonymous namespace // Representation of a SharedImageBackingDXGISwapChain as a GL Texture. @@ -132,27 +126,30 @@ uint32_t usage, Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain, gles2::Texture* texture, - scoped_refptr<gles2::TexturePassthrough> passthrough_texture) + scoped_refptr<gles2::TexturePassthrough> texture_passthrough, + scoped_refptr<gl::GLImageDXGISwapChain> image, + size_t buffer_index) : SharedImageBacking(mailbox, format, size, color_space, usage, texture ? texture->estimated_size() - : passthrough_texture->estimated_size(), + : texture_passthrough->estimated_size(), false /* is_thread_safe */), - swap_chain_(swap_chain), + swap_chain_(std::move(swap_chain)), texture_(texture), - texture_passthrough_(std::move(passthrough_texture)) { + texture_passthrough_(std::move(texture_passthrough)), + image_(std::move(image)), + buffer_index_(buffer_index) { DCHECK(swap_chain_); DCHECK((texture_ && !texture_passthrough_) || (!texture_ && texture_passthrough_)); } ~SharedImageBackingDXGISwapChain() override { - DCHECK(!swap_chain_); - DCHECK(!texture_); - DCHECK(!texture_passthrough_); + // Destroy() is safe to call even if it's already been called. + Destroy(); } // Texture is cleared on initialization. @@ -166,10 +163,9 @@ } bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override { - if (texture_) + if (texture_) { mailbox_manager->ProduceTexture(mailbox(), texture_); - else { - DCHECK(texture_passthrough_); + } else { mailbox_manager->ProduceTexture(mailbox(), texture_passthrough_.get()); } return true; @@ -179,15 +175,12 @@ if (texture_) { texture_->RemoveLightweightRef(have_context()); texture_ = nullptr; - } else { - DCHECK(texture_passthrough_); + } else if (texture_passthrough_) { if (!have_context()) texture_passthrough_->MarkContextLost(); - texture_passthrough_.reset(); + texture_passthrough_ = nullptr; } - - DCHECK(swap_chain_); - swap_chain_.Reset(); + swap_chain_ = nullptr; } void OnMemoryDump(const std::string& dump_name, @@ -197,31 +190,29 @@ // Add a |service_guid| which expresses shared ownership between the // various GPU dumps. auto client_guid = GetSharedImageGUIDForTracing(mailbox()); - base::trace_event::MemoryAllocatorDumpGuid service_guid; - if (texture_) - service_guid = - gl::GetGLTextureServiceGUIDForTracing(texture_->service_id()); - else { - DCHECK(texture_passthrough_); - service_guid = gl::GetGLTextureServiceGUIDForTracing( - texture_passthrough_->service_id()); - } + GLuint service_id = + texture_ ? texture_->service_id() : texture_passthrough_->service_id(); + base::trace_event::MemoryAllocatorDumpGuid service_guid = + gl::GetGLTextureServiceGUIDForTracing(service_id); pmd->CreateSharedGlobalAllocatorDump(service_guid); - // TODO(piman): coalesce constant with TextureManager::DumpTextureRef. int importance = 2; // This client always owns the ref. - pmd->AddOwnershipEdge(client_guid, service_guid, importance); - // Dump all sub-levels held by the texture. They will appear below the - // main gl/textures/client_X/mailbox_Y dump. - texture_->DumpLevelMemory(pmd, client_tracing_id, dump_name); + // Swap chain textures only have one level backed by an image. + image_->OnMemoryDump(pmd, client_tracing_id, dump_name); } bool PresentSwapChain() override { + if (buffer_index_ != 0) { + DLOG(ERROR) << "Swap chain backing does not correspond to back buffer"; + return false; + } + DXGI_PRESENT_PARAMETERS params = {}; params.DirtyRectsCount = 0; params.pDirtyRects = nullptr; + HRESULT hr = swap_chain_->Present1(0 /* interval */, 0 /* flags */, ¶ms); if (FAILED(hr)) { @@ -229,20 +220,16 @@ return false; } - gl::GLImage* image; - unsigned target = GL_TEXTURE_2D; - if (texture_) { - gles2::Texture::ImageState image_state; - image = texture_->GetLevelImage(target, 0, &image_state); - DCHECK_EQ(image_state, gles2::Texture::BOUND); - } else { - DCHECK(texture_passthrough_); - image = texture_passthrough_->GetLevelImage(target, 0); - } - DCHECK(image); + gl::GLApi* const api = gl::g_current_gl_context; + ScopedRestoreTexture2D scoped_restore(api); - if (!image->BindTexImage(target)) { - DLOG(ERROR) << "Failed to rebind texture to new surface."; + const GLenum target = GL_TEXTURE_2D; + const GLuint service_id = + texture_ ? texture_->service_id() : texture_passthrough_->service_id(); + api->glBindTextureFn(target, service_id); + + if (!image_->BindTexImage(target)) { + DLOG(ERROR) << "GLImageDXGISwapChain::BindTexImage failed"; return false; } return true; @@ -253,6 +240,7 @@ SharedImageManager* manager, MemoryTypeTracker* tracker) override { DCHECK(texture_); + TRACE_EVENT0("gpu", "SharedImageBackingDXGISwapChain::ProduceGLTexture"); return std::make_unique<SharedImageRepresentationGLTextureDXGISwapChain>( manager, this, tracker, texture_); } @@ -261,6 +249,8 @@ ProduceGLTexturePassthrough(SharedImageManager* manager, MemoryTypeTracker* tracker) override { DCHECK(texture_passthrough_); + TRACE_EVENT0( + "gpu", "SharedImageBackingDXGISwapChain::ProduceGLTexturePassthrough"); return std::make_unique< SharedImageRepresentationGLTexturePassthroughDXGISwapChain>( manager, this, tracker, texture_passthrough_); @@ -270,11 +260,16 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain_; gles2::Texture* texture_ = nullptr; scoped_refptr<gles2::TexturePassthrough> texture_passthrough_; + scoped_refptr<gl::GLImageDXGISwapChain> image_; + const size_t buffer_index_; DISALLOW_COPY_AND_ASSIGN(SharedImageBackingDXGISwapChain); }; SwapChainFactoryDXGI::SwapChainFactoryDXGI(bool use_passthrough) - : use_passthrough_(use_passthrough) {} + : use_passthrough_(use_passthrough), + d3d11_device_(gl::QueryD3D11DeviceObjectFromANGLE()) { + DCHECK(d3d11_device_); +} SwapChainFactoryDXGI::~SwapChainFactoryDXGI() = default; @@ -305,7 +300,19 @@ const gfx::ColorSpace& color_space, uint32_t usage, const Microsoft::WRL::ComPtr<IDXGISwapChain1>& swap_chain, - int buffer_index) { + size_t buffer_index) { + gl::GLApi* const api = gl::g_current_gl_context; + ScopedRestoreTexture2D scoped_restore(api); + + const GLenum target = GL_TEXTURE_2D; + GLuint service_id = 0; + api->glGenTexturesFn(1, &service_id); + api->glBindTextureFn(target, service_id); + api->glTexParameteriFn(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + api->glTexParameteriFn(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + api->glTexParameteriFn(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + api->glTexParameteriFn(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture; HRESULT hr = swap_chain->GetBuffer(buffer_index, IID_PPV_ARGS(&d3d11_texture)); @@ -315,35 +322,35 @@ } DCHECK(d3d11_texture); - const unsigned target = GL_TEXTURE_2D; - gl::GLApi* api = gl::g_current_gl_context; - const GLuint service_id = MakeTextureAndSetParameters(api, target); + gfx::BufferFormat buffer_format = format == viz::RGBA_F16 + ? gfx::BufferFormat::RGBA_F16 + : gfx::BufferFormat::BGRA_8888; auto image = base::MakeRefCounted<gl::GLImageDXGISwapChain>( - size, viz::BufferFormat(format), d3d11_texture, swap_chain); + size, buffer_format, std::move(d3d11_texture), swap_chain); if (!image->Initialize()) { - DLOG(ERROR) << "Failed to create EGL image"; + DLOG(ERROR) << "GLImageDXGISwapChain::Initialize failed"; return nullptr; } if (!image->BindTexImage(target)) { - DLOG(ERROR) << "Failed to bind image to swap chain D3D11 texture."; + DLOG(ERROR) << "GLImageDXGISwapChain::BindTexImage failed"; return nullptr; } gles2::Texture* texture = nullptr; - scoped_refptr<gles2::TexturePassthrough> passthrough_texture; + scoped_refptr<gles2::TexturePassthrough> texture_passthrough; if (use_passthrough_) { - passthrough_texture = + texture_passthrough = base::MakeRefCounted<gles2::TexturePassthrough>(service_id, target); - passthrough_texture->SetLevelImage(target, 0, image.get()); + texture_passthrough->SetLevelImage(target, 0, image.get()); GLint texture_memory_size = 0; api->glGetTexParameterivFn(target, GL_MEMORY_SIZE_ANGLE, &texture_memory_size); - passthrough_texture->SetEstimatedSize(texture_memory_size); + texture_passthrough->SetEstimatedSize(texture_memory_size); } else { - GLuint internal_format = viz::GLInternalFormat(format); - DCHECK_EQ(internal_format, image->GetInternalFormat()); + // Image internal format could be different from |format| e.g. BGRA vs RGBA. + GLuint internal_format = image->GetInternalFormat(); GLenum gl_format = gles2::TextureManager::ExtractFormatFromStorageFormat(internal_format); GLenum gl_type = @@ -356,16 +363,17 @@ texture->sampler_state_.mag_filter = GL_LINEAR; texture->sampler_state_.wrap_s = GL_CLAMP_TO_EDGE; texture->sampler_state_.wrap_t = GL_CLAMP_TO_EDGE; - texture->SetLevelInfo(target, 0, internal_format, size.width(), - size.height(), 1, 0, gl_format, gl_type, - gfx::Rect(size)); - texture->SetLevelImage(target, 0, image.get(), gles2::Texture::BOUND); + texture->SetLevelInfo(target, 0 /* level */, internal_format, size.width(), + size.height(), 1 /* depth */, 0 /* border */, + gl_format, gl_type, gfx::Rect(size)); + texture->SetLevelImage(target, 0 /* level */, image.get(), + gles2::Texture::BOUND); texture->SetImmutable(true, false); } return std::make_unique<SharedImageBackingDXGISwapChain>( - mailbox, format, size, color_space, usage, swap_chain, texture, - passthrough_texture); + mailbox, format, size, color_space, usage, std::move(swap_chain), texture, + std::move(texture_passthrough), std::move(image), buffer_index); } SwapChainFactoryDXGI::SwapChainBackings SwapChainFactoryDXGI::CreateSwapChain( @@ -375,16 +383,14 @@ const gfx::Size& size, const gfx::ColorSpace& color_space, uint32_t usage) { - if (!SupportedFormat(format)) { - DLOG(ERROR) << format << " format is not supported by swap chain."; + if (format != viz::RGBA_8888 && format != viz::RGBA_F16) { + DLOG(ERROR) << gfx::BufferFormatToString(viz::BufferFormat(format)) + << " format is not supported by swap chain."; return {nullptr, nullptr}; } - Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device = - gl::QueryD3D11DeviceObjectFromANGLE(); - DCHECK(d3d11_device); Microsoft::WRL::ComPtr<IDXGIDevice> dxgi_device; - d3d11_device.As(&dxgi_device); + d3d11_device_.As(&dxgi_device); DCHECK(dxgi_device); Microsoft::WRL::ComPtr<IDXGIAdapter> dxgi_adapter; dxgi_device->GetAdapter(&dxgi_adapter); @@ -412,7 +418,7 @@ Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain; HRESULT hr = dxgi_factory->CreateSwapChainForComposition( - d3d11_device.Get(), &desc, nullptr, &swap_chain); + d3d11_device_.Get(), &desc, nullptr, &swap_chain); if (FAILED(hr)) { DLOG(ERROR) << "CreateSwapChainForComposition failed with error " @@ -422,25 +428,31 @@ // Explicitly clear front and back buffers to ensure that there are no // uninitialized pixels. - if (!ClearBackBuffer(swap_chain, d3d11_device)) + if (!ClearBackBuffer(swap_chain, d3d11_device_)) return {nullptr, nullptr}; + DXGI_PRESENT_PARAMETERS params = {}; params.DirtyRectsCount = 0; params.pDirtyRects = nullptr; - swap_chain->Present1(0 /* interval */, 0 /* flags */, ¶ms); - if (!ClearBackBuffer(swap_chain, d3d11_device)) + hr = swap_chain->Present1(0 /* interval */, 0 /* flags */, ¶ms); + if (FAILED(hr)) { + DLOG(ERROR) << "Present1 failed with error " << std::hex << hr; + return {nullptr, nullptr}; + } + + if (!ClearBackBuffer(swap_chain, d3d11_device_)) return {nullptr, nullptr}; - std::unique_ptr<SharedImageBacking> front_buffer_backing = - MakeBacking(front_buffer_mailbox, format, size, color_space, usage, - swap_chain, 1 /* buffer index */); - - std::unique_ptr<SharedImageBacking> back_buffer_backing = + auto back_buffer_backing = MakeBacking(back_buffer_mailbox, format, size, color_space, usage, - swap_chain, 0 /* buffer index */); + swap_chain, 0 /* buffer_index */); + if (!back_buffer_backing) + return {nullptr, nullptr}; - // To avoid registering one backing when the other backing does not exist. - if (!(front_buffer_backing && back_buffer_backing)) + auto front_buffer_backing = + MakeBacking(front_buffer_mailbox, format, size, color_space, usage, + swap_chain, 1 /* buffer_index */); + if (!front_buffer_backing) return {nullptr, nullptr}; return {std::move(front_buffer_backing), std::move(back_buffer_backing)};
diff --git a/gpu/command_buffer/service/swap_chain_factory_dxgi.h b/gpu/command_buffer/service/swap_chain_factory_dxgi.h index 4859954..a0cb413 100644 --- a/gpu/command_buffer/service/swap_chain_factory_dxgi.h +++ b/gpu/command_buffer/service/swap_chain_factory_dxgi.h
@@ -5,9 +5,11 @@ #ifndef GPU_COMMAND_BUFFER_SERVICE_SWAP_CHAIN_FACTORY_DXGI_H_ #define GPU_COMMAND_BUFFER_SERVICE_SWAP_CHAIN_FACTORY_DXGI_H_ -#include <windows.h> +#include <d3d11.h> #include <dxgi1_2.h> +#include <windows.h> #include <wrl/client.h> + #include <memory> #include "base/macros.h" @@ -65,10 +67,12 @@ const gfx::ColorSpace& color_space, uint32_t usage, const Microsoft::WRL::ComPtr<IDXGISwapChain1>& swap_chain, - int buffer_index); + size_t buffer_index); + // Whether we're using the passthrough command decoder and should generate // passthrough textures. - bool use_passthrough_ = false; + const bool use_passthrough_ = false; + Microsoft::WRL::ComPtr<ID3D11Device> d3d11_device_; DISALLOW_COPY_AND_ASSIGN(SwapChainFactoryDXGI); };
diff --git a/gpu/command_buffer/service/swap_chain_factory_dxgi_unittest.cc b/gpu/command_buffer/service/swap_chain_factory_dxgi_unittest.cc index 2e2ed8d..fb4335c 100644 --- a/gpu/command_buffer/service/swap_chain_factory_dxgi_unittest.cc +++ b/gpu/command_buffer/service/swap_chain_factory_dxgi_unittest.cc
@@ -24,9 +24,45 @@ namespace gpu { namespace { -class SwapChainFactoryDXGITest : public testing::Test { +static const char* kVertexShaderSrc = + "attribute vec2 a_position;\n" + "varying vec2 v_texCoord;\n" + "void main() {\n" + " gl_Position = vec4(a_position.x, a_position.y, 0.0, 1.0);\n" + " v_texCoord = (a_position + vec2(1.0, 1.0)) * 0.5;\n" + "}\n"; + +static const char* kFragmentShaderSrc = + "precision mediump float;\n" + "uniform mediump sampler2D u_texture;\n" + "varying vec2 v_texCoord;\n" + "void main() {\n" + " gl_FragColor = texture2D(u_texture, v_texCoord);" + "}\n"; + +GLuint MakeTextureAndSetParameters(gl::GLApi* api, GLenum target, bool fbo) { + GLuint texture_id = 0; + api->glGenTexturesFn(1, &texture_id); + api->glBindTextureFn(target, texture_id); + api->glTexParameteriFn(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + api->glTexParameteriFn(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + api->glTexParameteriFn(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + api->glTexParameteriFn(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + if (fbo) { + api->glTexParameteriFn(target, GL_TEXTURE_USAGE_ANGLE, + GL_FRAMEBUFFER_ATTACHMENT_ANGLE); + } + return texture_id; +} + +class SwapChainFactoryDXGITest : public testing::TestWithParam<bool> { public: void SetUp() override { + if (!SwapChainFactoryDXGI::IsSupported()) + return; + + use_passthrough_texture_ = GetParam(); + surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size()); ASSERT_TRUE(surface_); context_ = gl::init::CreateGLContext(nullptr, surface_.get(), @@ -39,246 +75,25 @@ shared_image_representation_factory_ = std::make_unique<SharedImageRepresentationFactory>( &shared_image_manager_, nullptr); + swap_chain_factory_ = + std::make_unique<SwapChainFactoryDXGI>(use_passthrough_texture_); } protected: - bool UsesPassthrough() const { - return gles2::PassthroughCommandDecoderSupported(); - } - void CreateAndPresentSwapChain(bool uses_passthrough_texture); - + bool use_passthrough_texture_ = false; scoped_refptr<gl::GLSurface> surface_; scoped_refptr<gl::GLContext> context_; SharedImageManager shared_image_manager_; std::unique_ptr<MemoryTypeTracker> memory_type_tracker_; std::unique_ptr<SharedImageRepresentationFactory> shared_image_representation_factory_; + std::unique_ptr<SwapChainFactoryDXGI> swap_chain_factory_; }; -void SwapChainFactoryDXGITest::CreateAndPresentSwapChain( - bool uses_passthrough_texture) { - DCHECK(SwapChainFactoryDXGI::IsSupported()); - std::unique_ptr<SwapChainFactoryDXGI> swap_chain_factory_ = - std::make_unique<SwapChainFactoryDXGI>(uses_passthrough_texture); - auto front_buffer_mailbox = Mailbox::GenerateForSharedImage(); - auto back_buffer_mailbox = Mailbox::GenerateForSharedImage(); - auto format = viz::RGBA_8888; - gfx::Size size(1, 1); - auto color_space = gfx::ColorSpace::CreateSRGB(); - uint32_t usage = gpu::SHARED_IMAGE_USAGE_GLES2 | - gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | - gpu::SHARED_IMAGE_USAGE_DISPLAY | - gpu::SHARED_IMAGE_USAGE_SCANOUT; - - auto backings = swap_chain_factory_->CreateSwapChain( - front_buffer_mailbox, back_buffer_mailbox, format, size, color_space, - usage); - ASSERT_TRUE(backings.front_buffer); - ASSERT_TRUE(backings.back_buffer); - - GLenum expected_target = GL_TEXTURE_2D; - Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture; - scoped_refptr<gles2::TexturePassthrough> back_passthrough_texture; - gles2::Texture* back_texture = nullptr; - gl::GLImageDXGISwapChain* back_image = nullptr; - gl::GLImageDXGISwapChain* front_image = nullptr; - - std::unique_ptr<SharedImageRepresentationFactoryRef> back_factory_ref = - shared_image_manager_.Register(std::move(backings.back_buffer), - memory_type_tracker_.get()); - std::unique_ptr<SharedImageRepresentationFactoryRef> front_factory_ref = - shared_image_manager_.Register(std::move(backings.front_buffer), - memory_type_tracker_.get()); - - if (uses_passthrough_texture) { - auto back_gl_representation = - shared_image_representation_factory_->ProduceGLTexturePassthrough( - back_buffer_mailbox); - ASSERT_TRUE(back_gl_representation); - back_passthrough_texture = back_gl_representation->GetTexturePassthrough(); - EXPECT_TRUE(back_passthrough_texture); - EXPECT_EQ(TextureBase::Type::kPassthrough, - back_passthrough_texture->GetType()); - EXPECT_EQ(expected_target, back_passthrough_texture->target()); - back_gl_representation.reset(); - - back_image = gl::GLImageDXGISwapChain::FromGLImage( - back_passthrough_texture->GetLevelImage( - back_passthrough_texture->target(), 0)); - ASSERT_TRUE(back_image); - - auto front_gl_representation = - shared_image_representation_factory_->ProduceGLTexturePassthrough( - front_buffer_mailbox); - ASSERT_TRUE(front_gl_representation); - auto front_passthrough_texture = - front_gl_representation->GetTexturePassthrough(); - EXPECT_TRUE(front_passthrough_texture); - EXPECT_EQ(TextureBase::Type::kPassthrough, - front_passthrough_texture->GetType()); - EXPECT_EQ(expected_target, front_passthrough_texture->target()); - front_gl_representation.reset(); - - front_image = gl::GLImageDXGISwapChain::FromGLImage( - front_passthrough_texture->GetLevelImage( - front_passthrough_texture->target(), 0)); - ASSERT_TRUE(front_image); - front_passthrough_texture.reset(); - } else { - auto back_gl_representation = - shared_image_representation_factory_->ProduceGLTexture( - back_buffer_mailbox); - ASSERT_TRUE(back_gl_representation); - back_texture = back_gl_representation->GetTexture(); - EXPECT_TRUE(back_texture); - EXPECT_EQ(TextureBase::Type::kValidated, back_texture->GetType()); - EXPECT_EQ(expected_target, back_texture->target()); - // Ensures that back buffer is explicitly cleared. - EXPECT_TRUE(back_texture->IsLevelCleared(back_texture->target(), 0)); - back_gl_representation.reset(); - - gles2::Texture::ImageState image_state; - back_image = gl::GLImageDXGISwapChain::FromGLImage( - back_texture->GetLevelImage(back_texture->target(), 0, &image_state)); - ASSERT_TRUE(back_image); - EXPECT_EQ(gles2::Texture::BOUND, image_state); - - auto front_gl_representation = - shared_image_representation_factory_->ProduceGLTexture( - front_buffer_mailbox); - ASSERT_TRUE(front_gl_representation); - gles2::Texture* front_texture = front_gl_representation->GetTexture(); - EXPECT_TRUE(front_texture); - EXPECT_EQ(TextureBase::Type::kValidated, front_texture->GetType()); - EXPECT_EQ(expected_target, front_texture->target()); - // Ensures that front buffer is explicitly cleared. - EXPECT_TRUE(front_texture->IsLevelCleared(front_texture->target(), 0)); - front_gl_representation.reset(); - - front_image = gl::GLImageDXGISwapChain::FromGLImage( - front_texture->GetLevelImage(front_texture->target(), 0, &image_state)); - ASSERT_TRUE(front_image); - EXPECT_EQ(gles2::Texture::BOUND, image_state); - } - - EXPECT_EQ(S_OK, back_image->swap_chain()->GetBuffer( - 0 /* buffer_index */, IID_PPV_ARGS(&d3d11_texture))); - EXPECT_TRUE(d3d11_texture); - EXPECT_EQ(d3d11_texture, back_image->texture()); - d3d11_texture.Reset(); - - EXPECT_EQ(S_OK, front_image->swap_chain()->GetBuffer( - 1 /* buffer_index */, IID_PPV_ARGS(&d3d11_texture))); - EXPECT_TRUE(d3d11_texture); - EXPECT_EQ(d3d11_texture, front_image->texture()); - d3d11_texture.Reset(); - - GLenum target; - GLuint service_id; - if (uses_passthrough_texture) { - target = back_passthrough_texture->target(); - service_id = back_passthrough_texture->service_id(); - back_passthrough_texture.reset(); - } else { - target = back_texture->target(); - service_id = back_texture->service_id(); - } - - // Create an FBO. - GLuint fbo = 0; - gl::GLApi* api = gl::g_current_gl_context; - api->glGenFramebuffersEXTFn(1, &fbo); - api->glBindFramebufferEXTFn(GL_FRAMEBUFFER, fbo); - api->glBindTextureFn(target, service_id); - ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); - - // Attach the texture to FBO. - api->glFramebufferTexture2DEXTFn(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target, - service_id, 0); - EXPECT_EQ(api->glCheckFramebufferStatusEXTFn(GL_FRAMEBUFFER), - static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE)); - ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); - - api->glViewportFn(0, 0, size.width(), size.height()); - // Set the clear color to green. - api->glClearColorFn(0.0f, 1.0f, 0.0f, 1.0f); - api->glClearFn(GL_COLOR_BUFFER_BIT); - ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); - - { - GLubyte pixel_color[4]; - const uint8_t expected_color[4] = {0, 255, 0, 255}; - // Checks if rendering to back buffer was successful. - api->glReadPixelsFn(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel_color); - EXPECT_EQ(expected_color[0], pixel_color[0]); - EXPECT_EQ(expected_color[1], pixel_color[1]); - EXPECT_EQ(expected_color[2], pixel_color[2]); - EXPECT_EQ(expected_color[3], pixel_color[3]); - } - - back_factory_ref->PresentSwapChain(); - - { - GLubyte pixel_color[4]; - const uint8_t expected_color[4] = {0, 0, 0, 255}; - // After present, back buffer should now have a clear texture. - api->glReadPixelsFn(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel_color); - EXPECT_EQ(expected_color[0], pixel_color[0]); - EXPECT_EQ(expected_color[1], pixel_color[1]); - EXPECT_EQ(expected_color[2], pixel_color[2]); - EXPECT_EQ(expected_color[3], pixel_color[3]); - } - - { - // A staging texture must be used to check front buffer since it cannot be - // bound to an FBO or use ReadPixels. - D3D11_TEXTURE2D_DESC desc = {}; - desc.Width = 1; - desc.Height = 1; - desc.Format = DXGI_FORMAT_B8G8R8A8_UNORM; - desc.MipLevels = 1; - desc.ArraySize = 1; - desc.Usage = D3D11_USAGE_STAGING; - desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ; - desc.SampleDesc.Count = 1; - - auto d3d11_device = gl::QueryD3D11DeviceObjectFromANGLE(); - ASSERT_TRUE(d3d11_device); - - Microsoft::WRL::ComPtr<ID3D11Texture2D> staging_texture; - ASSERT_TRUE(SUCCEEDED( - d3d11_device->CreateTexture2D(&desc, nullptr, &staging_texture))); - - Microsoft::WRL::ComPtr<ID3D11DeviceContext> context; - d3d11_device->GetImmediateContext(&context); - ASSERT_TRUE(context); - - context->CopyResource(staging_texture.Get(), front_image->texture().Get()); - - D3D11_MAPPED_SUBRESOURCE mapped_resource; - ASSERT_TRUE(SUCCEEDED(context->Map(staging_texture.Get(), 0, D3D11_MAP_READ, - 0, &mapped_resource))); - ASSERT_GE(mapped_resource.RowPitch, 4u); - // After present, front buffer should have color rendered to back buffer. - const uint8_t* pixel_color = - static_cast<const uint8_t*>(mapped_resource.pData); - const uint8_t expected_color[4] = {0, 255, 0, 255}; - EXPECT_EQ(expected_color[0], pixel_color[0]); - EXPECT_EQ(expected_color[1], pixel_color[1]); - EXPECT_EQ(expected_color[2], pixel_color[2]); - EXPECT_EQ(expected_color[3], pixel_color[3]); - - context->Unmap(staging_texture.Get(), 0); - } - - api->glDeleteFramebuffersEXTFn(1, &fbo); -} - -TEST_F(SwapChainFactoryDXGITest, InvalidFormat) { +TEST_P(SwapChainFactoryDXGITest, InvalidFormat) { if (!SwapChainFactoryDXGI::IsSupported()) return; - std::unique_ptr<SwapChainFactoryDXGI> swap_chain_factory_ = - std::make_unique<SwapChainFactoryDXGI>(false /* use_passthrough */); + auto front_buffer_mailbox = Mailbox::GenerateForSharedImage(); auto back_buffer_mailbox = Mailbox::GenerateForSharedImage(); gfx::Size size(1, 1); @@ -295,7 +110,7 @@ backings.back_buffer->Destroy(); } { - auto invalid_format = viz::BGRA_8888; + auto invalid_format = viz::RGBA_4444; auto backings = swap_chain_factory_->CreateSwapChain( front_buffer_mailbox, back_buffer_mailbox, invalid_format, size, color_space, usage); @@ -304,17 +119,261 @@ } } -TEST_F(SwapChainFactoryDXGITest, CreateAndPresentSwapChain) { - if (!SwapChainFactoryDXGI::IsSupported() || UsesPassthrough()) +TEST_P(SwapChainFactoryDXGITest, CreateAndPresentSwapChain) { + if (!SwapChainFactoryDXGI::IsSupported()) return; - CreateAndPresentSwapChain(false /* uses_passthrough_texture */); + + auto front_buffer_mailbox = Mailbox::GenerateForSharedImage(); + auto back_buffer_mailbox = Mailbox::GenerateForSharedImage(); + auto format = viz::RGBA_8888; + gfx::Size size(1, 1); + auto color_space = gfx::ColorSpace::CreateSRGB(); + uint32_t usage = gpu::SHARED_IMAGE_USAGE_GLES2 | + gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT | + gpu::SHARED_IMAGE_USAGE_DISPLAY | + gpu::SHARED_IMAGE_USAGE_SCANOUT; + + auto backings = swap_chain_factory_->CreateSwapChain( + front_buffer_mailbox, back_buffer_mailbox, format, size, color_space, + usage); + EXPECT_TRUE(backings.front_buffer); + EXPECT_TRUE(backings.back_buffer); + + std::unique_ptr<SharedImageRepresentationFactoryRef> back_factory_ref = + shared_image_manager_.Register(std::move(backings.back_buffer), + memory_type_tracker_.get()); + std::unique_ptr<SharedImageRepresentationFactoryRef> front_factory_ref = + shared_image_manager_.Register(std::move(backings.front_buffer), + memory_type_tracker_.get()); + + GLuint back_texture_id, front_texture_id = 0u; + gl::GLImageDXGISwapChain *back_image, *front_image = 0u; + if (use_passthrough_texture_) { + auto back_texture = shared_image_representation_factory_ + ->ProduceGLTexturePassthrough(back_buffer_mailbox) + ->GetTexturePassthrough(); + ASSERT_TRUE(back_texture); + EXPECT_EQ(back_texture->target(), static_cast<unsigned>(GL_TEXTURE_2D)); + + back_texture_id = back_texture->service_id(); + EXPECT_NE(back_texture_id, 0u); + + back_image = gl::GLImageDXGISwapChain::FromGLImage( + back_texture->GetLevelImage(GL_TEXTURE_2D, 0)); + + auto front_texture = shared_image_representation_factory_ + ->ProduceGLTexturePassthrough(front_buffer_mailbox) + ->GetTexturePassthrough(); + ASSERT_TRUE(front_texture); + EXPECT_EQ(front_texture->target(), static_cast<unsigned>(GL_TEXTURE_2D)); + + front_texture_id = front_texture->service_id(); + EXPECT_NE(front_texture_id, 0u); + + front_image = gl::GLImageDXGISwapChain::FromGLImage( + front_texture->GetLevelImage(GL_TEXTURE_2D, 0)); + } else { + auto* back_texture = shared_image_representation_factory_ + ->ProduceGLTexture(back_buffer_mailbox) + ->GetTexture(); + ASSERT_TRUE(back_texture); + EXPECT_EQ(back_texture->target(), static_cast<unsigned>(GL_TEXTURE_2D)); + + back_texture_id = back_texture->service_id(); + EXPECT_NE(back_texture_id, 0u); + + gles2::Texture::ImageState image_state = gles2::Texture::UNBOUND; + back_image = gl::GLImageDXGISwapChain::FromGLImage( + back_texture->GetLevelImage(GL_TEXTURE_2D, 0, &image_state)); + EXPECT_EQ(image_state, gles2::Texture::BOUND); + + auto* front_texture = shared_image_representation_factory_ + ->ProduceGLTexture(front_buffer_mailbox) + ->GetTexture(); + ASSERT_TRUE(front_texture); + EXPECT_EQ(front_texture->target(), static_cast<unsigned>(GL_TEXTURE_2D)); + + front_texture_id = front_texture->service_id(); + EXPECT_NE(front_texture_id, 0u); + + image_state = gles2::Texture::UNBOUND; + front_image = gl::GLImageDXGISwapChain::FromGLImage( + front_texture->GetLevelImage(GL_TEXTURE_2D, 0, &image_state)); + EXPECT_EQ(image_state, gles2::Texture::BOUND); + } + + ASSERT_TRUE(back_image); + EXPECT_EQ(back_image->ShouldBindOrCopy(), gl::GLImage::BIND); + + Microsoft::WRL::ComPtr<ID3D11Texture2D> d3d11_texture; + EXPECT_EQ(S_OK, back_image->swap_chain()->GetBuffer( + 0 /* buffer_index */, IID_PPV_ARGS(&d3d11_texture))); + EXPECT_TRUE(d3d11_texture); + EXPECT_EQ(d3d11_texture, back_image->texture()); + d3d11_texture.Reset(); + + ASSERT_TRUE(front_image); + EXPECT_EQ(front_image->ShouldBindOrCopy(), gl::GLImage::BIND); + + EXPECT_EQ(S_OK, front_image->swap_chain()->GetBuffer( + 1 /* buffer_index */, IID_PPV_ARGS(&d3d11_texture))); + EXPECT_TRUE(d3d11_texture); + EXPECT_EQ(d3d11_texture, front_image->texture()); + d3d11_texture.Reset(); + + gl::GLApi* api = gl::g_current_gl_context; + // Create a multisampled FBO. + GLuint multisample_fbo, renderbuffer = 0u; + api->glGenFramebuffersEXTFn(1, &multisample_fbo); + api->glBindFramebufferEXTFn(GL_FRAMEBUFFER, multisample_fbo); + api->glGenRenderbuffersEXTFn(1, &renderbuffer); + api->glBindRenderbufferEXTFn(GL_RENDERBUFFER, renderbuffer); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + api->glRenderbufferStorageMultisampleFn(GL_RENDERBUFFER, 4 /* sample_count */, + GL_RGBA8_OES, 1, 1); + api->glFramebufferRenderbufferEXTFn(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_RENDERBUFFER, renderbuffer); + EXPECT_EQ(api->glCheckFramebufferStatusEXTFn(GL_FRAMEBUFFER), + static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE)); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + // Set the clear color to green. + api->glViewportFn(0, 0, size.width(), size.height()); + api->glClearColorFn(0.0f, 1.0f, 0.0f, 1.0f); + api->glClearFn(GL_COLOR_BUFFER_BIT); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + api->glBindFramebufferEXTFn(GL_READ_FRAMEBUFFER, multisample_fbo); + + // Attach the back buffer texture to an FBO. + GLuint fbo = 0u; + api->glGenFramebuffersEXTFn(1, &fbo); + api->glBindFramebufferEXTFn(GL_DRAW_FRAMEBUFFER, fbo); + api->glBindTextureFn(GL_TEXTURE_2D, back_texture_id); + api->glFramebufferTexture2DEXTFn(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, back_texture_id, 0); + EXPECT_EQ(api->glCheckFramebufferStatusEXTFn(GL_DRAW_FRAMEBUFFER), + static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE)); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + api->glBlitFramebufferFn(0, 0, 1, 1, 0, 0, 1, 1, GL_COLOR_BUFFER_BIT, + GL_NEAREST); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + api->glBindFramebufferEXTFn(GL_FRAMEBUFFER, fbo); + + // Checks if rendering to back buffer was successful. + { + GLubyte pixel_color[4]; + const uint8_t expected_color[4] = {0, 255, 0, 255}; + api->glReadPixelsFn(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel_color); + EXPECT_EQ(expected_color[0], pixel_color[0]); + EXPECT_EQ(expected_color[1], pixel_color[1]); + EXPECT_EQ(expected_color[2], pixel_color[2]); + EXPECT_EQ(expected_color[3], pixel_color[3]); + } + + EXPECT_TRUE(back_factory_ref->PresentSwapChain()); + + // After present, back buffer should now have a clear texture. + { + GLubyte pixel_color[4]; + const uint8_t expected_color[4] = {0, 0, 0, 255}; + api->glReadPixelsFn(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel_color); + EXPECT_EQ(expected_color[0], pixel_color[0]); + EXPECT_EQ(expected_color[1], pixel_color[1]); + EXPECT_EQ(expected_color[2], pixel_color[2]); + EXPECT_EQ(expected_color[3], pixel_color[3]); + } + + // And front buffer should have the rendered contents. Test that binding + // front buffer as a sampler works. + { + // Create a destination texture to render into since we can't bind front + // buffer to an FBO. + GLuint dest_texture_id = + MakeTextureAndSetParameters(api, GL_TEXTURE_2D, true); + api->glTexImage2DFn(GL_TEXTURE_2D, 0, GL_RGBA, 1, 1, 0, GL_RGBA, + GL_UNSIGNED_BYTE, nullptr); + api->glFramebufferTexture2DEXTFn(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + GL_TEXTURE_2D, dest_texture_id, 0); + EXPECT_EQ(api->glCheckFramebufferStatusEXTFn(GL_FRAMEBUFFER), + static_cast<unsigned>(GL_FRAMEBUFFER_COMPLETE)); + api->glClearColorFn(0.0f, 0.0f, 0.0f, 0.0f); + api->glClearFn(GL_COLOR_BUFFER_BIT); + ASSERT_EQ(api->glGetErrorFn(), static_cast<GLenum>(GL_NO_ERROR)); + + GLint status = 0; + GLuint vertex_shader = api->glCreateShaderFn(GL_VERTEX_SHADER); + ASSERT_NE(vertex_shader, 0u); + api->glShaderSourceFn(vertex_shader, 1, &kVertexShaderSrc, nullptr); + api->glCompileShaderFn(vertex_shader); + api->glGetShaderivFn(vertex_shader, GL_COMPILE_STATUS, &status); + ASSERT_NE(status, 0); + + GLuint fragment_shader = api->glCreateShaderFn(GL_FRAGMENT_SHADER); + ASSERT_NE(fragment_shader, 0u); + api->glShaderSourceFn(fragment_shader, 1, &kFragmentShaderSrc, nullptr); + api->glCompileShaderFn(fragment_shader); + api->glGetShaderivFn(fragment_shader, GL_COMPILE_STATUS, &status); + ASSERT_NE(status, 0); + + GLuint program = api->glCreateProgramFn(); + ASSERT_NE(program, 0u); + api->glAttachShaderFn(program, vertex_shader); + api->glAttachShaderFn(program, fragment_shader); + api->glLinkProgramFn(program); + api->glGetProgramivFn(program, GL_LINK_STATUS, &status); + ASSERT_NE(status, 0); + + GLuint vbo = 0u; + api->glGenBuffersARBFn(1, &vbo); + ASSERT_NE(vbo, 0u); + api->glBindBufferFn(GL_ARRAY_BUFFER, vbo); + static const float vertices[] = { + 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, + 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, + }; + api->glBufferDataFn(GL_ARRAY_BUFFER, sizeof(vertices), vertices, + GL_STATIC_DRAW); + GLint vertex_location = api->glGetAttribLocationFn(program, "a_position"); + ASSERT_NE(vertex_location, -1); + api->glEnableVertexAttribArrayFn(vertex_location); + api->glVertexAttribPointerFn(vertex_location, 2, GL_FLOAT, GL_FALSE, 0, 0); + + GLint sampler_location = api->glGetUniformLocationFn(program, "u_texture"); + ASSERT_NE(sampler_location, -1); + api->glActiveTextureFn(GL_TEXTURE0); + // ExpectUnboundAndBindOrCopyTexImage(front_buffer_mailbox); + api->glBindTextureFn(GL_TEXTURE_2D, front_texture_id); + api->glUniform1iFn(sampler_location, 0); + + api->glUseProgramFn(program); + api->glDrawArraysFn(GL_TRIANGLES, 0, 6); + + { + GLubyte pixel_color[4]; + const uint8_t expected_color[4] = {0, 255, 0, 255}; + api->glReadPixelsFn(0, 0, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel_color); + EXPECT_EQ(expected_color[0], pixel_color[0]); + EXPECT_EQ(expected_color[1], pixel_color[1]); + EXPECT_EQ(expected_color[2], pixel_color[2]); + EXPECT_EQ(expected_color[3], pixel_color[3]); + } + + api->glDeleteProgramFn(program); + api->glDeleteShaderFn(vertex_shader); + api->glDeleteShaderFn(fragment_shader); + api->glDeleteBuffersARBFn(1, &vbo); + } + + api->glDeleteFramebuffersEXTFn(1, &fbo); } -TEST_F(SwapChainFactoryDXGITest, CreateAndPresentSwapChain_PassthroughTexture) { - if (!SwapChainFactoryDXGI::IsSupported() || !UsesPassthrough()) - return; - CreateAndPresentSwapChain(true /* uses_passthrough_texture */); -} +INSTANTIATE_TEST_SUITE_P(/* no prefix */, + SwapChainFactoryDXGITest, + testing::Bool()); } // anonymous namespace } // namespace gpu
diff --git a/gpu/ipc/service/gpu_watchdog_thread.h b/gpu/ipc/service/gpu_watchdog_thread.h index 1eee0494..1893ec54 100644 --- a/gpu/ipc/service/gpu_watchdog_thread.h +++ b/gpu/ipc/service/gpu_watchdog_thread.h
@@ -9,9 +9,9 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" -#include "base/message_loop/message_loop_current.h" #include "base/metrics/histogram_macros.h" #include "base/power_monitor/power_observer.h" +#include "base/task/task_observer.h" #include "base/threading/thread.h" #include "base/time/time.h" #include "build/build_config.h" @@ -99,13 +99,12 @@ private: // An object of this type intercepts the reception and completion of all tasks // on the watched thread and checks whether the watchdog is armed. - class GpuWatchdogTaskObserver - : public base::MessageLoopCurrent::TaskObserver { + class GpuWatchdogTaskObserver : public base::TaskObserver { public: explicit GpuWatchdogTaskObserver(GpuWatchdogThreadImplV1* watchdog); ~GpuWatchdogTaskObserver() override; - // Implements MessageLoopCurrent::TaskObserver. + // Implements TaskObserver. void WillProcessTask(const base::PendingTask& pending_task) override; void DidProcessTask(const base::PendingTask& pending_task) override;
diff --git a/gpu/ipc/service/gpu_watchdog_thread_v2.h b/gpu/ipc/service/gpu_watchdog_thread_v2.h index 3c19615..9084ddb 100644 --- a/gpu/ipc/service/gpu_watchdog_thread_v2.h +++ b/gpu/ipc/service/gpu_watchdog_thread_v2.h
@@ -11,7 +11,7 @@ class GPU_IPC_SERVICE_EXPORT GpuWatchdogThreadImplV2 : public GpuWatchdogThread, - public base::MessageLoopCurrent::TaskObserver { + public base::TaskObserver { public: static std::unique_ptr<GpuWatchdogThreadImplV2> Create( bool start_backgrounded); @@ -37,7 +37,7 @@ // Implements gl::ProgressReporter. void ReportProgress() override; - // Implements MessageLoopCurrent::TaskObserver. + // Implements TaskObserver. void WillProcessTask(const base::PendingTask& pending_task) override; void DidProcessTask(const base::PendingTask& pending_task) override;
diff --git a/gpu/ipc/service/image_decode_accelerator_stub.cc b/gpu/ipc/service/image_decode_accelerator_stub.cc index 207a5ef..21aa72df 100644 --- a/gpu/ipc/service/image_decode_accelerator_stub.cc +++ b/gpu/ipc/service/image_decode_accelerator_stub.cc
@@ -438,6 +438,7 @@ completed_decode->buffer_format == gfx::BufferFormat::YVU_420 ? cc::YUVDecodeFormat::kYVU3 : cc::YUVDecodeFormat::kYUV2, + completed_decode->yuv_color_space, completed_decode->buffer_byte_size, params.needs_mips)) { DLOG(ERROR) << "Could not create and insert the transfer cache entry"; OnError();
diff --git a/gpu/ipc/service/image_decode_accelerator_worker.h b/gpu/ipc/service/image_decode_accelerator_worker.h index 106ca36..cd50e6e1 100644 --- a/gpu/ipc/service/image_decode_accelerator_worker.h +++ b/gpu/ipc/service/image_decode_accelerator_worker.h
@@ -14,6 +14,7 @@ #include "base/callback.h" #include "base/containers/span.h" #include "gpu/config/gpu_info.h" +#include "third_party/skia/include/core/SkImageInfo.h" #include "ui/gfx/buffer_types.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/gpu_memory_buffer.h" @@ -32,6 +33,7 @@ gfx::Size visible_size; gfx::BufferFormat buffer_format; size_t buffer_byte_size; + SkYUVColorSpace yuv_color_space; }; using CompletedDecodeCB =
diff --git a/headless/BUILD.gn b/headless/BUILD.gn index a202f16..aec3d2e 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn
@@ -439,8 +439,6 @@ sources += [ "lib/browser/headless_content_browser_client.cc", "lib/browser/headless_content_browser_client.h", - "lib/browser/headless_overlay_manifests.cc", - "lib/browser/headless_overlay_manifests.h", "lib/browser/headless_web_contents_impl.cc", "lib/browser/headless_web_contents_impl.h", "lib/headless_content_main_delegate.cc", @@ -462,7 +460,6 @@ deps += [ "//components/crash/core/common:crash_key", "//components/security_state/content", - "//components/services/pdf_compositor/public/cpp:manifest", "//components/services/pdf_compositor/public/mojom", "//gin", "//third_party/blink/public:blink", @@ -482,7 +479,7 @@ deps += [ "//components/printing/browser", "//components/printing/renderer", - "//components/services/pdf_compositor/public/cpp:factory", + "//components/services/pdf_compositor", "//components/services/pdf_compositor/public/mojom", ] } @@ -597,8 +594,6 @@ sources += [ "lib/browser/headless_content_browser_client.cc", "lib/browser/headless_content_browser_client.h", - "lib/browser/headless_overlay_manifests.cc", - "lib/browser/headless_overlay_manifests.h", "lib/utility/headless_content_utility_client.cc", "lib/utility/headless_content_utility_client.h", ] @@ -609,7 +604,6 @@ "//base/test:run_all_unittests", "//base/test:test_support", "//components/security_state/content", - "//components/services/pdf_compositor/public/cpp:manifest", "//components/services/pdf_compositor/public/mojom", "//content/public/app:both", "//content/public/child:child", @@ -630,7 +624,7 @@ sources += [ "lib/browser/headless_printing_unittest.cc" ] deps += [ "//components/printing/browser", - "//components/services/pdf_compositor/public/cpp:factory", + "//components/services/pdf_compositor", "//third_party/blink/public:blink", ] } @@ -748,8 +742,6 @@ sources += [ "lib/browser/headless_content_browser_client.cc", "lib/browser/headless_content_browser_client.h", - "lib/browser/headless_overlay_manifests.cc", - "lib/browser/headless_overlay_manifests.h", "lib/utility/headless_content_utility_client.cc", "lib/utility/headless_content_utility_client.h", ] @@ -759,7 +751,6 @@ ":headless_shell_lib", "//base", "//components/security_state/content", - "//components/services/pdf_compositor/public/cpp:manifest", "//components/services/pdf_compositor/public/mojom", "//content/test:test_support", "//services/network/public/mojom", @@ -791,7 +782,7 @@ if (enable_basic_printing) { deps += [ "//components/printing/browser", - "//components/services/pdf_compositor/public/cpp:factory", + "//components/services/pdf_compositor", "//pdf", ] } @@ -807,14 +798,11 @@ "app/headless_shell_win.cc", "lib/browser/headless_content_browser_client.cc", "lib/browser/headless_content_browser_client.h", - "lib/browser/headless_overlay_manifests.cc", - "lib/browser/headless_overlay_manifests.h", "public/headless_shell.h", ] deps = [ ":headless_non_renderer", "//build:branding_buildflags", - "//components/services/pdf_compositor/public/cpp:manifest", "//components/services/pdf_compositor/public/mojom", "//content:sandbox_helper_win", "//content/public/browser", @@ -888,8 +876,6 @@ sources += [ "lib/browser/headless_content_browser_client.cc", "lib/browser/headless_content_browser_client.h", - "lib/browser/headless_overlay_manifests.cc", - "lib/browser/headless_overlay_manifests.h", "lib/utility/headless_content_utility_client.cc", "lib/utility/headless_content_utility_client.h", ] @@ -900,7 +886,6 @@ "//build:branding_buildflags", "//components/os_crypt", "//components/security_state/content", - "//components/services/pdf_compositor/public/cpp:manifest", "//components/services/pdf_compositor/public/mojom", "//content/public/app:both", "//content/public/browser", @@ -924,7 +909,7 @@ deps += [ "//components/printing/browser", "//components/printing/renderer", - "//components/services/pdf_compositor/public/cpp:factory", + "//components/services/pdf_compositor", ] }
diff --git a/headless/DEPS b/headless/DEPS index e67886e..48af79e 100644 --- a/headless/DEPS +++ b/headless/DEPS
@@ -4,8 +4,7 @@ "+components/crash/content/browser", "+components/crash/core/common/crash_key.h", "+components/os_crypt", - "+components/services/pdf_compositor/public/cpp", - "+components/services/pdf_compositor/public/mojom", + "+components/services/pdf_compositor/public", "+content/public/app", "+content/public/browser", "+content/public/renderer",
diff --git a/headless/app/headless_example.cc b/headless/app/headless_example.cc index 48e7ccb..7235b4c 100644 --- a/headless/app/headless_example.cc +++ b/headless/app/headless_example.cc
@@ -55,7 +55,7 @@ // The DevTools client used to control the tab. std::unique_ptr<headless::HeadlessDevToolsClient> devtools_client_; // A helper for creating weak pointers to this class. - base::WeakPtrFactory<HeadlessExample> weak_factory_; + base::WeakPtrFactory<HeadlessExample> weak_factory_{this}; }; namespace { @@ -66,8 +66,7 @@ headless::HeadlessWebContents* web_contents) : browser_(browser), web_contents_(web_contents), - devtools_client_(headless::HeadlessDevToolsClient::Create()), - weak_factory_(this) { + devtools_client_(headless::HeadlessDevToolsClient::Create()) { web_contents_->AddObserver(this); }
diff --git a/headless/app/headless_shell.cc b/headless/app/headless_shell.cc index f7b2740..bd98b73 100644 --- a/headless/app/headless_shell.cc +++ b/headless/app/headless_shell.cc
@@ -220,7 +220,7 @@ } // namespace -HeadlessShell::HeadlessShell() : weak_factory_(this) {} +HeadlessShell::HeadlessShell() = default; HeadlessShell::~HeadlessShell() = default;
diff --git a/headless/app/headless_shell.h b/headless/app/headless_shell.h index 2873f062..0d0eea12 100644 --- a/headless/app/headless_shell.h +++ b/headless/app/headless_shell.h
@@ -106,7 +106,7 @@ bool processed_page_ready_ = false; scoped_refptr<base::SequencedTaskRunner> file_task_runner_; std::unique_ptr<base::FileProxy> file_proxy_; - base::WeakPtrFactory<HeadlessShell> weak_factory_; + base::WeakPtrFactory<HeadlessShell> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HeadlessShell); };
diff --git a/headless/lib/browser/DEPS b/headless/lib/browser/DEPS index 6830530..acfa328 100644 --- a/headless/lib/browser/DEPS +++ b/headless/lib/browser/DEPS
@@ -4,7 +4,6 @@ "+components/printing/browser", "+components/printing/common", "+components/security_state", - "+components/services/pdf_compositor/public/cpp", "+components/viz", "+printing", "+services/network",
diff --git a/headless/lib/browser/OWNERS b/headless/lib/browser/OWNERS deleted file mode 100644 index 6640f18..0000000 --- a/headless/lib/browser/OWNERS +++ /dev/null
@@ -1,4 +0,0 @@ -per-file headless_overlay_manifests.cc=set noparent -per-file headless_overlay_manifests.cc=file://ipc/SECURITY_OWNERS -per-file headless_overlay_manifests.h=set noparent -per-file headless_overlay_manifests.h=file://ipc/SECURITY_OWNERS
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc index 272e69f..9f13324 100644 --- a/headless/lib/browser/headless_browser_impl.cc +++ b/headless/lib/browser/headless_browser_impl.cc
@@ -42,8 +42,7 @@ options_(std::move(options)), browser_main_parts_(nullptr), default_browser_context_(nullptr), - agent_host_(nullptr), - weak_ptr_factory_(this) {} + agent_host_(nullptr) {} HeadlessBrowserImpl::~HeadlessBrowserImpl() = default;
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h index 7203861..08e98bbf 100644 --- a/headless/lib/browser/headless_browser_impl.h +++ b/headless/lib/browser/headless_browser_impl.h
@@ -106,7 +106,7 @@ scoped_refptr<content::DevToolsAgentHost> agent_host_; std::unique_ptr<HeadlessRequestContextManager> system_request_context_manager_; - base::WeakPtrFactory<HeadlessBrowserImpl> weak_ptr_factory_; + base::WeakPtrFactory<HeadlessBrowserImpl> weak_ptr_factory_{this}; private: DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl);
diff --git a/headless/lib/browser/headless_content_browser_client.cc b/headless/lib/browser/headless_content_browser_client.cc index 9e78231..069b516 100644 --- a/headless/lib/browser/headless_content_browser_client.cc +++ b/headless/lib/browser/headless_content_browser_client.cc
@@ -21,13 +21,11 @@ #include "content/public/browser/render_view_host.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/content_switches.h" -#include "content/public/common/service_names.mojom.h" #include "headless/app/headless_shell_switches.h" #include "headless/lib/browser/headless_browser_context_impl.h" #include "headless/lib/browser/headless_browser_impl.h" #include "headless/lib/browser/headless_browser_main_parts.h" #include "headless/lib/browser/headless_devtools_manager_delegate.h" -#include "headless/lib/browser/headless_overlay_manifests.h" #include "headless/lib/browser/headless_quota_permission_context.h" #include "headless/lib/headless_macros.h" #include "net/base/url_util.h" @@ -144,18 +142,6 @@ return new HeadlessDevToolsManagerDelegate(browser_->GetWeakPtr()); } -base::Optional<service_manager::Manifest> -HeadlessContentBrowserClient::GetServiceManifestOverlay( - base::StringPiece name) { - if (name == content::mojom::kBrowserServiceName) - return GetHeadlessContentBrowserOverlayManifest(); - - if (name == content::mojom::kPackagedServicesServiceName) - return GetHeadlessContentPackagedServicesOverlayManifest(); - - return base::nullopt; -} - scoped_refptr<content::QuotaPermissionContext> HeadlessContentBrowserClient::CreateQuotaPermissionContext() { return new HeadlessQuotaPermissionContext();
diff --git a/headless/lib/browser/headless_content_browser_client.h b/headless/lib/browser/headless_content_browser_client.h index b360f4e0..31b2be1e 100644 --- a/headless/lib/browser/headless_content_browser_client.h +++ b/headless/lib/browser/headless_content_browser_client.h
@@ -25,8 +25,6 @@ void OverrideWebkitPrefs(content::RenderViewHost* render_view_host, content::WebPreferences* prefs) override; content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override; - base::Optional<service_manager::Manifest> GetServiceManifestOverlay( - base::StringPiece name) override; scoped_refptr<content::QuotaPermissionContext> CreateQuotaPermissionContext() override; void GetQuotaSettings( @@ -69,10 +67,6 @@ std::string GetUserAgent() override; private: - std::unique_ptr<base::Value> GetBrowserServiceManifestOverlay(); - std::unique_ptr<base::Value> GetRendererServiceManifestOverlay(); - std::unique_ptr<base::Value> GetPackagedServicesServiceManifestOverlay(); - HeadlessBrowserImpl* browser_; // Not owned. // We store the callback here because we may call it from the I/O thread.
diff --git a/headless/lib/browser/headless_devtools_client_impl.cc b/headless/lib/browser/headless_devtools_client_impl.cc index 405bec70..f33185a 100644 --- a/headless/lib/browser/headless_devtools_client_impl.cc +++ b/headless/lib/browser/headless_devtools_client_impl.cc
@@ -71,8 +71,7 @@ security_domain_(this), service_worker_domain_(this), target_domain_(this), - tracing_domain_(this), - weak_ptr_factory_(this) {} + tracing_domain_(this) {} HeadlessDevToolsClientImpl::~HeadlessDevToolsClientImpl() { if (parent_client_)
diff --git a/headless/lib/browser/headless_overlay_manifests.cc b/headless/lib/browser/headless_overlay_manifests.cc deleted file mode 100644 index e6cda74..0000000 --- a/headless/lib/browser/headless_overlay_manifests.cc +++ /dev/null
@@ -1,33 +0,0 @@ -// Copyright 2019 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 "headless/lib/browser/headless_overlay_manifests.h" - -#include "base/no_destructor.h" -#include "components/services/pdf_compositor/public/cpp/manifest.h" -#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" -#include "services/service_manager/public/cpp/manifest_builder.h" - -namespace headless { - -const service_manager::Manifest& GetHeadlessContentBrowserOverlayManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .RequireCapability(printing::mojom::kServiceName, "compositor") - .Build()}; - - return *manifest; -} - -const service_manager::Manifest& -GetHeadlessContentPackagedServicesOverlayManifest() { - static base::NoDestructor<service_manager::Manifest> manifest{ - service_manager::ManifestBuilder() - .PackageService(printing::GetPdfCompositorManifest()) - .Build()}; - - return *manifest; -} - -} // namespace headless
diff --git a/headless/lib/browser/headless_overlay_manifests.h b/headless/lib/browser/headless_overlay_manifests.h deleted file mode 100644 index 710c326f..0000000 --- a/headless/lib/browser/headless_overlay_manifests.h +++ /dev/null
@@ -1,25 +0,0 @@ -// Copyright 2019 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. - -#ifndef HEADLESS_LIB_BROWSER_HEADLESS_OVERLAY_MANIFESTS_H_ -#define HEADLESS_LIB_BROWSER_HEADLESS_OVERLAY_MANIFESTS_H_ - -#include "services/service_manager/public/cpp/manifest.h" - -namespace headless { - -// Returns the manifest headless Chrome amends to Content's content_browser -// service manifest. This allows headless Chrome to extend the capabilities -// exposed and/or required by content_browser service instances. -const service_manager::Manifest& GetHeadlessContentBrowserOverlayManifest(); - -// Returns the manifest headless Chrome amends to Content's -// content_packaged_services service manifest. This allows headless Chrome to -// extend the set of in- and out-of- process services packaged by the browser. -const service_manager::Manifest& -GetHeadlessContentPackagedServicesOverlayManifest(); - -} // namespace headless - -#endif // HEADLESS_LIB_BROWSER_HEADLESS_OVERLAY_MANIFESTS_H_
diff --git a/headless/lib/browser/headless_request_context_manager.cc b/headless/lib/browser/headless_request_context_manager.cc index 071412c..b3cb5ef 100644 --- a/headless/lib/browser/headless_request_context_manager.cc +++ b/headless/lib/browser/headless_request_context_manager.cc
@@ -15,8 +15,10 @@ #include "content/public/browser/resource_context.h" #include "headless/app/headless_shell_switches.h" #include "headless/lib/browser/headless_browser_context_options.h" +#include "net/http/http_auth_preferences.h" #include "services/network/network_service.h" #include "services/network/public/cpp/features.h" +#include "services/network/public/mojom/network_service.mojom.h" #include "services/network/url_request_context_builder_mojo.h" namespace headless { @@ -225,6 +227,11 @@ context_params->accept_language = accept_language_; context_params->primary_network_context = is_system; + // TODO(https://crbug.com/458508): Allow + // context_params->allow_default_credentials to be controllable by a flag. + context_params->allow_default_credentials = + net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS; + if (!user_data_path_.empty()) { context_params->enable_encrypted_cookies = cookie_encryption_enabled_; context_params->cookie_path =
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc index 5c94cb1..998cf6ce 100644 --- a/headless/lib/browser/headless_web_contents_impl.cc +++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -290,8 +290,7 @@ agent_host_( content::DevToolsAgentHost::GetOrCreateFor(web_contents_.get())), browser_context_(browser_context), - render_process_host_(web_contents_->GetMainFrame()->GetProcess()), - weak_ptr_factory_(this) { + render_process_host_(web_contents_->GetMainFrame()->GetProcess()) { #if BUILDFLAG(ENABLE_PRINTING) && !defined(CHROME_MULTIPLE_DLL_CHILD) HeadlessPrintManager::CreateForWebContents(web_contents_.get()); // TODO(weili): Add support for printing OOPIFs.
diff --git a/headless/lib/browser/headless_web_contents_impl.h b/headless/lib/browser/headless_web_contents_impl.h index 2654775..96b6bd3 100644 --- a/headless/lib/browser/headless_web_contents_impl.h +++ b/headless/lib/browser/headless_web_contents_impl.h
@@ -176,7 +176,7 @@ base::ObserverList<HeadlessWebContents::Observer>::Unchecked observers_; - base::WeakPtrFactory<HeadlessWebContentsImpl> weak_ptr_factory_; + base::WeakPtrFactory<HeadlessWebContentsImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); };
diff --git a/headless/lib/browser/protocol/page_handler.cc b/headless/lib/browser/protocol/page_handler.cc index 79fc6b62..98a18b3 100644 --- a/headless/lib/browser/protocol/page_handler.cc +++ b/headless/lib/browser/protocol/page_handler.cc
@@ -28,8 +28,7 @@ content::WebContents* web_contents) : DomainHandler(Page::Metainfo::domainName, browser), agent_host_(agent_host), - web_contents_(web_contents), - weak_factory_(this) { + web_contents_(web_contents) { DCHECK(web_contents_); DCHECK(agent_host_); }
diff --git a/headless/lib/browser/protocol/page_handler.h b/headless/lib/browser/protocol/page_handler.h index 7ea5bdd..cc72b3f 100644 --- a/headless/lib/browser/protocol/page_handler.h +++ b/headless/lib/browser/protocol/page_handler.h
@@ -60,7 +60,7 @@ #endif scoped_refptr<content::DevToolsAgentHost> agent_host_; content::WebContents* web_contents_; - base::WeakPtrFactory<PageHandler> weak_factory_; + base::WeakPtrFactory<PageHandler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PageHandler); };
diff --git a/headless/lib/utility/DEPS b/headless/lib/utility/DEPS index a0c8f05..17f72113 100644 --- a/headless/lib/utility/DEPS +++ b/headless/lib/utility/DEPS
@@ -1,4 +1,4 @@ include_rules = [ - "+components/services/pdf_compositor/", + "+components/services/pdf_compositor", "+content/public/utility", ]
diff --git a/headless/lib/utility/headless_content_utility_client.cc b/headless/lib/utility/headless_content_utility_client.cc index 7dc362f..ead2113c 100644 --- a/headless/lib/utility/headless_content_utility_client.cc +++ b/headless/lib/utility/headless_content_utility_client.cc
@@ -6,11 +6,14 @@ #include "base/bind.h" #include "base/lazy_instance.h" +#include "base/no_destructor.h" #include "content/public/utility/utility_thread.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/service_factory.h" #include "printing/buildflags/buildflags.h" -#if BUILDFLAG(ENABLE_PRINTING) -#include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h" +#if BUILDFLAG(ENABLE_PRINTING) && !defined(CHROME_MULTIPLE_DLL_BROWSER) +#include "components/services/pdf_compositor/pdf_compositor_impl.h" #include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h" #endif @@ -22,6 +25,15 @@ HeadlessContentUtilityClient::NetworkBinderCreationCallback>::Leaky g_network_binder_creation_callback = LAZY_INSTANCE_INITIALIZER; +#if BUILDFLAG(ENABLE_PRINTING) && !defined(CHROME_MULTIPLE_DLL_BROWSER) +auto RunPdfCompositor( + mojo::PendingReceiver<printing::mojom::PdfCompositor> receiver) { + return std::make_unique<printing::PdfCompositorImpl>( + std::move(receiver), true /* initialize_environment */, + content::UtilityThread::Get()->GetIOTaskRunner()); +} +#endif + } // namespace // static @@ -36,20 +48,14 @@ HeadlessContentUtilityClient::~HeadlessContentUtilityClient() = default; -bool HeadlessContentUtilityClient::HandleServiceRequest( - const std::string& service_name, - service_manager::mojom::ServiceRequest request) { +mojo::ServiceFactory* +HeadlessContentUtilityClient::GetMainThreadServiceFactory() { + static base::NoDestructor<mojo::ServiceFactory> factory { #if BUILDFLAG(ENABLE_PRINTING) && !defined(CHROME_MULTIPLE_DLL_BROWSER) - if (service_name == printing::mojom::kServiceName) { - service_manager::Service::RunAsyncUntilTermination( - printing::CreatePdfCompositorService(std::move(request)), - base::BindOnce( - [] { content::UtilityThread::Get()->ReleaseProcess(); })); - return true; - } + RunPdfCompositor, #endif - - return false; + }; + return factory.get(); } void HeadlessContentUtilityClient::RegisterNetworkBinders(
diff --git a/headless/lib/utility/headless_content_utility_client.h b/headless/lib/utility/headless_content_utility_client.h index b493ddc..c42fb6d3 100644 --- a/headless/lib/utility/headless_content_utility_client.h +++ b/headless/lib/utility/headless_content_utility_client.h
@@ -26,9 +26,7 @@ ~HeadlessContentUtilityClient() override; // content::ContentUtilityClient: - bool HandleServiceRequest( - const std::string& service_name, - service_manager::mojom::ServiceRequest request) override; + mojo::ServiceFactory* GetMainThreadServiceFactory() override; void RegisterNetworkBinders( service_manager::BinderRegistry* registry) override;
diff --git a/headless/public/internal/headless_devtools_client_impl.h b/headless/public/internal/headless_devtools_client_impl.h index cba1a53..92b44db 100644 --- a/headless/public/internal/headless_devtools_client_impl.h +++ b/headless/public/internal/headless_devtools_client_impl.h
@@ -221,7 +221,7 @@ target::ExperimentalDomain target_domain_; tracing::ExperimentalDomain tracing_domain_; scoped_refptr<base::SequencedTaskRunner> browser_main_thread_; - base::WeakPtrFactory<HeadlessDevToolsClientImpl> weak_ptr_factory_; + base::WeakPtrFactory<HeadlessDevToolsClientImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HeadlessDevToolsClientImpl); };
diff --git a/headless/test/headless_js_bindings_browsertest.cc b/headless/test/headless_js_bindings_browsertest.cc index c9265ea..65505eb 100644 --- a/headless/test/headless_js_bindings_browsertest.cc +++ b/headless/test/headless_js_bindings_browsertest.cc
@@ -56,7 +56,7 @@ using EvaluateResult = headless::runtime::EvaluateResult; using RemoteObject = headless::runtime::RemoteObject; - HeadlessJsBindingsTest() : weak_factory_(this) {} + HeadlessJsBindingsTest() {} void SetUpOnMainThread() override { base::ThreadRestrictions::SetIOAllowed(true); @@ -217,7 +217,7 @@ protected: bool connection_established_ = false; - base::WeakPtrFactory<HeadlessJsBindingsTest> weak_factory_; + base::WeakPtrFactory<HeadlessJsBindingsTest> weak_factory_{this}; }; class SimpleCommandJsBindingsTest : public HeadlessJsBindingsTest {
diff --git a/headless/test/test_network_interceptor.cc b/headless/test/test_network_interceptor.cc index be02da2..156a4ad 100644 --- a/headless/test/test_network_interceptor.cc +++ b/headless/test/test_network_interceptor.cc
@@ -163,7 +163,7 @@ TestNetworkInterceptor::Response::~Response() {} -TestNetworkInterceptor::TestNetworkInterceptor() : weak_factory_(this) { +TestNetworkInterceptor::TestNetworkInterceptor() { impl_.reset(new Impl(weak_factory_.GetWeakPtr())); interceptor_ = std::make_unique<content::URLLoaderInterceptor>( base::BindRepeating(&TestNetworkInterceptor::Impl::RequestHandler,
diff --git a/headless/test/test_network_interceptor.h b/headless/test/test_network_interceptor.h index e9bd1b0..c5c8edc 100644 --- a/headless/test/test_network_interceptor.h +++ b/headless/test/test_network_interceptor.h
@@ -53,7 +53,7 @@ std::unique_ptr<Impl> impl_; std::unique_ptr<content::URLLoaderInterceptor> interceptor_; - base::WeakPtrFactory<TestNetworkInterceptor> weak_factory_; + base::WeakPtrFactory<TestNetworkInterceptor> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TestNetworkInterceptor); };
diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg index ddddaf1..cc5cc33 100644 --- a/infra/config/cr-buildbucket.cfg +++ b/infra/config/cr-buildbucket.cfg
@@ -352,6 +352,15 @@ } builder_mixins { + name: "android-gpu-fyi-ci-tester" + dimensions: "cores:2" + mixins: "linux-xenial" + mixins: "builderless" + mixins: "gpu-fyi-ci" + mixins: "gpu-slow-bot" +} + +builder_mixins { name: "android-optional-gpu-try" mixins: "linux-xenial" mixins: "android-try" @@ -1011,6 +1020,11 @@ } builders { + name: "Android FYI 64 Perf (Pixel 2)" + mixins: "android-gpu-fyi-ci-tester" + } + + builders { name: "Android FYI 64 Vk Release (Pixel 2)" mixins: "android-gpu-fyi-ci" mixins: "goma-rbe-prod" @@ -1290,6 +1304,11 @@ } builders { + name: "GPU FYI Perf Android 64 Builder" + mixins: "android-gpu-fyi-ci" + } + + builders { name: "KitKat Phone Tester (dbg)" mixins: "android-ci" mixins: "linux-xenial" @@ -2322,7 +2341,7 @@ mixins: "linux-gpu-fyi-ci-tester" # TODO(https://crbug.com/986939): Remove this increased timeout once # more devices are added. - execution_timeout_secs: 43200 # 12h. + execution_timeout_secs: 64800 # 18h. } builders { name: "Win10 FYI x64 Release (NVIDIA GeForce GTX 1660)"
diff --git a/infra/config/luci-milo.cfg b/infra/config/luci-milo.cfg index cfc60d9..262f79e 100644 --- a/infra/config/luci-milo.cfg +++ b/infra/config/luci-milo.cfg
@@ -3539,6 +3539,16 @@ category: "Android|skv|P32" short_name: "P2" } + builders { + name: "buildbucket/luci.chromium.ci/GPU FYI Perf Android 64 Builder" + category: "Android|Perf|Builder" + short_name: "64" + } + builders { + name: "buildbucket/luci.chromium.ci/Android FYI 64 Perf (Pixel 2)" + category: "Android|Perf|Q64" + short_name: "P2" + } } consoles {
diff --git a/infra/config/luci-notify.cfg b/infra/config/luci-notify.cfg index 7aa0c57..4d7eb55 100644 --- a/infra/config/luci-notify.cfg +++ b/infra/config/luci-notify.cfg
@@ -259,3 +259,24 @@ bucket: "ci" } } + +notifiers { + name: "release-tarballs" + notifications { + on_success: false + on_failure: true + email { + recipients: "raphael.kubo.da.costa@intel.com" + recipients: "thestig@chromium.org" + recipients: "thomasanderson@chromium.org" + } + } + builders { + name: "Build From Tarball" + bucket: "ci" + } + builders { + name: "publish_tarball" + bucket: "ci" + } +}
diff --git a/infra/config/luci-scheduler.cfg b/infra/config/luci-scheduler.cfg index d12d4f70..05453ca 100644 --- a/infra/config/luci-scheduler.cfg +++ b/infra/config/luci-scheduler.cfg
@@ -156,6 +156,7 @@ triggers: "GPU FYI Mac Builder (dbg)" triggers: "GPU FYI Mac Builder" triggers: "GPU FYI Mac dEQP Builder" + triggers: "GPU FYI Perf Android 64 Builder" triggers: "GPU FYI Win Builder (dbg)" triggers: "GPU FYI Win Builder" triggers: "GPU FYI Win dEQP Builder" @@ -296,7 +297,6 @@ triggers: "WinMSVC64 Goma Latest Client" triggers: "Windows deterministic" triggers: "android-asan" - triggers: "android-code-coverage" triggers: "android-cronet-arm-dbg" triggers: "android-cronet-arm-rel" triggers: "android-cronet-arm64-dbg" @@ -484,6 +484,17 @@ } job { + id: "Android FYI 64 Perf (Pixel 2)" + # Triggered by "GPU FYI Perf Android 64 Builder" + acl_sets: "triggered-by-parent-builders" + buildbucket: { + server: "cr-buildbucket.appspot.com" + bucket: "luci.chromium.ci" + builder: "Android FYI 64 Perf (Pixel 2)" + } +} + +job { id: "Android FYI 64 Vk Release (Pixel 2)" acl_sets: "default" buildbucket: { @@ -905,6 +916,16 @@ } job { + id: "GPU FYI Perf Android 64 Builder" + acl_sets: "default" + buildbucket: { + server: "cr-buildbucket.appspot.com" + bucket: "luci.chromium.ci" + builder: "GPU FYI Perf Android 64 Builder" + } +} + +job { id: "KitKat Phone Tester (dbg)" # triggered by "Android arm Builder (dbg)" acl_sets: "triggered-by-parent-builders"
diff --git a/ios/BUILD.gn b/ios/BUILD.gn index 20da26e6..93df8be 100644 --- a/ios/BUILD.gn +++ b/ios/BUILD.gn
@@ -8,25 +8,6 @@ import("//build/config/ios/ios_sdk.gni") import("//ios/features.gni") -declare_args() { - # TODO(brettw) bug 684096: Remove these. These are to prevent unused - # override warnings on iOS from the setting of the default_args in the - # toplevel //.gn file. Since iOS doesn't compile V8, GN complains that - # the overrides are never used. - v8_extra_library_files = [] - v8_experimental_extra_library_files = [] - v8_enable_gdbjit = false - v8_imminent_deprecation_warnings = false - v8_check_microtasks_scopes_consistency = false -} - -# Prevent warnings for unused build args above. -assert(v8_extra_library_files != 0) -assert(v8_experimental_extra_library_files != 0) -assert(!v8_enable_gdbjit) -assert(!v8_imminent_deprecation_warnings) -assert(!v8_check_microtasks_scopes_consistency) - # This list all targets that needs to be build as part of "gn_all" on iOS. # This list should generally only include executables, but since some code # has not yet been upstreamed it will sometimes also include targets that
diff --git a/ios/build/bots/chromium.fyi/ios13-beta-simulator.json b/ios/build/bots/chromium.fyi/ios13-beta-simulator.json index 4684b90..7faf9da9 100644 --- a/ios/build/bots/chromium.fyi/ios13-beta-simulator.json +++ b/ios/build/bots/chromium.fyi/ios13-beta-simulator.json
@@ -87,7 +87,6 @@ } }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPhone X", "os": "13.0", @@ -101,7 +100,6 @@ } }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPad Pro (12.9-inch)", "os": "13.0", @@ -115,7 +113,6 @@ } }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone X", "os": "13.0", @@ -129,7 +126,6 @@ } }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPad Air (3rd generation)", "os": "13.0",
diff --git a/ios/build/bots/chromium.fyi/ios13-sdk-simulator.json b/ios/build/bots/chromium.fyi/ios13-sdk-simulator.json index 9fe9b7a..8d89188 100644 --- a/ios/build/bots/chromium.fyi/ios13-sdk-simulator.json +++ b/ios/build/bots/chromium.fyi/ios13-sdk-simulator.json
@@ -58,7 +58,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone 7", "os": "13.0", @@ -72,7 +71,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPad Air 2", "os": "13.0", @@ -86,7 +84,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone X", "os": "13.0", @@ -100,7 +97,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPhone X", "os": "13.0", @@ -114,7 +110,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPad Air 2", "os": "13.0",
diff --git a/ios/build/bots/chromium.mac/ios13-beta-simulator.json b/ios/build/bots/chromium.mac/ios13-beta-simulator.json index ca678384..268fdb2d 100644 --- a/ios/build/bots/chromium.mac/ios13-beta-simulator.json +++ b/ios/build/bots/chromium.mac/ios13-beta-simulator.json
@@ -89,7 +89,6 @@ } }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPhone X", "os": "13.0", @@ -103,7 +102,6 @@ } }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPad Pro (12.9-inch)", "os": "13.0", @@ -117,7 +115,6 @@ } }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone X", "os": "13.0", @@ -131,7 +128,6 @@ } }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPad Air (3rd generation)", "os": "13.0",
diff --git a/ios/build/bots/chromium.mac/ios13-sdk-simulator.json b/ios/build/bots/chromium.mac/ios13-sdk-simulator.json index 6aa418d..706185d9 100644 --- a/ios/build/bots/chromium.mac/ios13-sdk-simulator.json +++ b/ios/build/bots/chromium.mac/ios13-sdk-simulator.json
@@ -61,7 +61,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone 7", "os": "13.0", @@ -75,7 +74,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPad Air 2", "os": "13.0", @@ -89,7 +87,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_tests.json", "device type": "iPhone X", "os": "13.0", @@ -103,7 +100,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPhone X", "os": "13.0", @@ -117,7 +113,6 @@ "priority": 30 }, { - "shards": 1, "include": "eg_cq_tests.json", "device type": "iPad Air 2", "os": "13.0",
diff --git a/ios/chrome/browser/infobars/infobar_badge_tab_helper_unittest.mm b/ios/chrome/browser/infobars/infobar_badge_tab_helper_unittest.mm index 7c7232e..1b72d55 100644 --- a/ios/chrome/browser/infobars/infobar_badge_tab_helper_unittest.mm +++ b/ios/chrome/browser/infobars/infobar_badge_tab_helper_unittest.mm
@@ -100,7 +100,8 @@ animated:NO completion:^{ self.bannerIsPresenting = NO; - }]; + } + userInitiated:NO]; } - (void)destroyInfobar { [self.infobarCoordinator detachView];
diff --git a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h index 5af6fe2d..d788344e 100644 --- a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h +++ b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.h
@@ -41,6 +41,7 @@ base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override; bool Cancel() override; + void InfoBarDismissed() override; // Updates the credentials being saved with |username| and |password|. void UpdateCredentials(NSString* username, NSString* password);
diff --git a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm index 2af864f..2b84c94 100644 --- a/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm +++ b/ios/chrome/browser/passwords/ios_chrome_save_password_infobar_delegate.mm
@@ -207,6 +207,11 @@ return true; } +void IOSChromeSavePasswordInfoBarDelegate::InfoBarDismissed() { + DCHECK(form_to_save()); + set_infobar_response(password_manager::metrics_util::CLICKED_CANCEL); +} + bool IOSChromeSavePasswordInfoBarDelegate::ShouldExpire( const NavigationDetails& details) const { return !details.is_redirect && ConfirmInfoBarDelegate::ShouldExpire(details);
diff --git a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.h b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.h index 5e99efb4..be03640 100644 --- a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.h +++ b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.h
@@ -64,7 +64,7 @@ int GetButtons() const override; base::string16 GetButtonLabel(InfoBarButton button) const override; bool Accept() override; - bool Cancel() override; + void InfoBarDismissed() override; base::string16 GetLinkText() const override; // The credential that should be displayed in the infobar, and for which the
diff --git a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm index 36fa3236..c069f2fd 100644 --- a/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm +++ b/ios/chrome/browser/passwords/ios_chrome_update_password_infobar_delegate.mm
@@ -115,10 +115,9 @@ return true; } -bool IOSChromeUpdatePasswordInfoBarDelegate::Cancel() { +void IOSChromeUpdatePasswordInfoBarDelegate::InfoBarDismissed() { DCHECK(form_to_save()); set_infobar_response(password_manager::metrics_util::CLICKED_CANCEL); - return true; } base::string16 IOSChromeUpdatePasswordInfoBarDelegate::GetLinkText() const {
diff --git a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm index f4e03652..13e1fe8 100644 --- a/ios/chrome/browser/ui/browser_view/browser_view_controller.mm +++ b/ios/chrome/browser/ui/browser_view/browser_view_controller.mm
@@ -956,8 +956,6 @@ _browserState); ChromeBroadcaster* broadcaster = fullscreenController->broadcaster(); if (_broadcasting) { - fullscreenController->SetWebStateList(self.tabModel.webStateList); - _toolbarUIUpdater = [[LegacyToolbarUIUpdater alloc] initWithToolbarUI:[[ToolbarUIState alloc] init] toolbarOwner:self @@ -972,6 +970,8 @@ webStateList:self.tabModel.webStateList]; StartBroadcastingMainContentUI(self, broadcaster); + fullscreenController->SetWebStateList(self.tabModel.webStateList); + _fullscreenUIUpdater = std::make_unique<FullscreenUIUpdater>(self); fullscreenController->AddObserver(_fullscreenUIUpdater.get()); [self updateForFullscreenProgress:fullscreenController->GetProgress()]; @@ -1381,8 +1381,8 @@ const CGFloat kAnimatedViewSize = 50; BackgroundTabAnimationView* animatedView = [[BackgroundTabAnimationView alloc] - initWithFrame:CGRectMake(0, 0, kAnimatedViewSize, - kAnimatedViewSize)]; + initWithFrame:CGRectMake(0, 0, kAnimatedViewSize, kAnimatedViewSize) + incognito:self.isOffTheRecord]; __weak UIView* weakAnimatedView = animatedView; auto completionBlock = ^() { self.inNewTabAnimation = NO;
diff --git a/ios/chrome/browser/ui/elements/chrome_activity_overlay_view_controller.mm b/ios/chrome/browser/ui/elements/chrome_activity_overlay_view_controller.mm index eb0c9b2..258ae6cc 100644 --- a/ios/chrome/browser/ui/elements/chrome_activity_overlay_view_controller.mm +++ b/ios/chrome/browser/ui/elements/chrome_activity_overlay_view_controller.mm
@@ -73,6 +73,11 @@ [self.view addSubview:containerView]; AddSameCenterConstraints(self.view, containerView); + + // To allow message text to be read by screen reader, and to make sure the + // speech will finish. + UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, + self.messageText); } @end
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h index f56c6b5..b10a070 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.h
@@ -58,6 +58,12 @@ int index, bool user_action) override; + // Called when |web_state| is activated in |web_state_list_|. + void WebStateWasActivated(web::WebState* web_state); + + // Called when |web_state| is removed from |web_state_list_|. + void WebStateWasRemoved(web::WebState* web_state); + // Whether |web_state| has been activated during the lifetime of this object. bool HasWebStateBeenActivated(web::WebState* web_state);
diff --git a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.mm b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.mm index af307e1..e1b8f32 100644 --- a/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.mm +++ b/ios/chrome/browser/ui/fullscreen/fullscreen_web_state_list_observer.mm
@@ -40,7 +40,7 @@ web_state_list_ = web_state_list; if (web_state_list_) { web_state_list_->AddObserver(this); - web_state_observer_.SetWebState(web_state_list_->GetActiveWebState()); + WebStateWasActivated(web_state_list_->GetActiveWebState()); } else { web_state_observer_.SetWebState(nullptr); } @@ -73,16 +73,11 @@ web::WebState* old_web_state, web::WebState* new_web_state, int index) { - if (HasWebStateBeenActivated(old_web_state)) - activated_web_states_.erase(old_web_state); + WebStateWasRemoved(old_web_state); if (new_web_state == web_state_list->GetActiveWebState()) { // Reset the model if the active WebState is replaced. - web_state_observer_.SetWebState(new_web_state); model_->ResetForNavigation(); - if (new_web_state) { - MoveContentBelowHeader(new_web_state->GetWebViewProxy(), model_); - activated_web_states_.insert(new_web_state); - } + WebStateWasActivated(new_web_state); } } @@ -92,21 +87,14 @@ web::WebState* new_web_state, int active_index, int reason) { - web_state_observer_.SetWebState(new_web_state); - // If this is the first time the WebState was activated, move its content - // below the header. - if (new_web_state && !HasWebStateBeenActivated(new_web_state)) { - MoveContentBelowHeader(new_web_state->GetWebViewProxy(), model_); - activated_web_states_.insert(new_web_state); - } + WebStateWasActivated(new_web_state); } void FullscreenWebStateListObserver::WebStateDetachedAt( WebStateList* web_state_list, web::WebState* web_state, int index) { - if (HasWebStateBeenActivated(web_state)) - activated_web_states_.erase(web_state); + WebStateWasRemoved(web_state); } void FullscreenWebStateListObserver::WillCloseWebStateAt( @@ -114,6 +102,20 @@ web::WebState* web_state, int index, bool user_action) { + WebStateWasRemoved(web_state); +} + +void FullscreenWebStateListObserver::WebStateWasActivated( + web::WebState* web_state) { + web_state_observer_.SetWebState(web_state); + if (web_state && !HasWebStateBeenActivated(web_state)) { + MoveContentBelowHeader(web_state->GetWebViewProxy(), model_); + activated_web_states_.insert(web_state); + } +} + +void FullscreenWebStateListObserver::WebStateWasRemoved( + web::WebState* web_state) { if (HasWebStateBeenActivated(web_state)) activated_web_states_.erase(web_state); }
diff --git a/ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h b/ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h index 171e98f..c342405 100644 --- a/ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h +++ b/ios/chrome/browser/ui/infobars/banners/infobar_banner_delegate.h
@@ -16,9 +16,14 @@ - (void)bannerInfobarButtonWasPressed:(UIButton*)sender; // Asks the delegate to dismiss the InfobarBanner. |completion| will always run. +// If dismissal is directly triggered by a user action e.g. swiping up the +// banner, |userInitiated| is YES. For all other cases, even if the banner is +// dismissed indirectly by a user action e.g. Accepting the banner, presenting +// settings, etc. |userInitiated| is NO. - (void)dismissInfobarBanner:(id)sender animated:(BOOL)animated - completion:(ProceduralBlock)completion; + completion:(ProceduralBlock)completion + userInitiated:(BOOL)userInitiated; // Asks the delegate to present the InfobarModal for this InfobarBanner. - (void)presentInfobarModalFromBanner;
diff --git a/ios/chrome/browser/ui/infobars/banners/infobar_banner_view_controller.mm b/ios/chrome/browser/ui/infobars/banners/infobar_banner_view_controller.mm index 5b290a469..64390c3 100644 --- a/ios/chrome/browser/ui/infobars/banners/infobar_banner_view_controller.mm +++ b/ios/chrome/browser/ui/infobars/banners/infobar_banner_view_controller.mm
@@ -268,7 +268,10 @@ if (!self.touchInProgress) { [self.metricsRecorder recordBannerDismissType:MobileMessagesBannerDismissType::TimedOut]; - [self.delegate dismissInfobarBanner:self animated:YES completion:nil]; + [self.delegate dismissInfobarBanner:self + animated:YES + completion:nil + userInitiated:NO]; } self.shouldDismissAfterTouchesEnded = YES; } @@ -330,11 +333,18 @@ if (dragUpExceededThreshold) { [self.metricsRecorder recordBannerDismissType:MobileMessagesBannerDismissType::SwipedUp]; + [self.delegate dismissInfobarBanner:self + animated:YES + completion:nil + userInitiated:YES]; } else { [self.metricsRecorder recordBannerDismissType:MobileMessagesBannerDismissType::TimedOut]; + [self.delegate dismissInfobarBanner:self + animated:YES + completion:nil + userInitiated:NO]; } - [self.delegate dismissInfobarBanner:self animated:YES completion:nil]; } else { [self.metricsRecorder recordBannerEvent:MobileMessagesBannerEvent::ReturnedToOrigin]; @@ -469,7 +479,10 @@ } - (BOOL)dismiss { - [self.delegate dismissInfobarBanner:self animated:YES completion:nil]; + [self.delegate dismissInfobarBanner:self + animated:YES + completion:nil + userInitiated:YES]; return NO; }
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm index 35af3796..0890966 100644 --- a/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm +++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_confirm_coordinator.mm
@@ -98,6 +98,11 @@ self.confirmInfobarDelegate->Accept(); } +- (void)infobarBannerWillBeDismissed:(BOOL)userInitiated { + if (userInitiated && self.confirmInfobarDelegate) + self.confirmInfobarDelegate->InfoBarDismissed(); +} + - (void)infobarWasDismissed { // Release these strong ViewControllers at the time of infobar dismissal. self.bannerViewController = nil;
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm index a22ec62..0282710 100644 --- a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm +++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator.mm
@@ -212,7 +212,8 @@ - (void)dismissInfobarBanner:(id)sender animated:(BOOL)animated - completion:(void (^)())completion { + completion:(void (^)())completion + userInitiated:(BOOL)userInitiated { DCHECK(self.baseViewController); // Make sure the banner is completely presented before trying to dismiss it. [self.bannerTransitionDriver completePresentationTransitionIfRunning]; @@ -220,6 +221,7 @@ if (self.baseViewController.presentedViewController && self.baseViewController.presentedViewController == self.bannerViewController) { + [self infobarBannerWillBeDismissed:userInitiated]; [self.baseViewController dismissViewControllerAnimated:animated completion:^{ @@ -352,6 +354,10 @@ NOTREACHED() << "Subclass must implement."; } +- (void)infobarBannerWillBeDismissed:(BOOL)userInitiated { + NOTREACHED() << "Subclass must implement."; +} + - (void)infobarWasDismissed { NOTREACHED() << "Subclass must implement."; } @@ -415,4 +421,14 @@ } } +// Helper method for non-user initiated InfobarBanner dismissals. +- (void)dismissInfobarBanner:(id)sender + animated:(BOOL)animated + completion:(void (^)())completion { + [self dismissInfobarBanner:sender + animated:animated + completion:completion + userInitiated:NO]; +} + @end
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h index 41a5d9ef..eea8dd6 100644 --- a/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h +++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_coordinator_implementation.h
@@ -30,6 +30,9 @@ // Performs the main Infobar action. e.g. "Save Password", "Restore",etc. - (void)performInfobarAction; +// Called right before the InfobarBanner will be dismissed. +- (void)infobarBannerWillBeDismissed:(BOOL)userInitiated; + // Called after the Infobar (either Modal or Banner) has been dismissed. // Transitioning from Banner to Modal won't call this method. - (void)infobarWasDismissed;
diff --git a/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm b/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm index 634b8b7..2edf607 100644 --- a/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm +++ b/ios/chrome/browser/ui/infobars/coordinators/infobar_password_coordinator.mm
@@ -171,6 +171,11 @@ self.passwordInfoBarDelegate->Accept(); } +- (void)infobarBannerWillBeDismissed:(BOOL)userInitiated { + if (userInitiated && self.passwordInfoBarDelegate) + self.passwordInfoBarDelegate->InfoBarDismissed(); +} + - (void)infobarWasDismissed { // Release these strong ViewControllers at the time of infobar dismissal. self.bannerViewController = nil;
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_coordinator_unittest.mm b/ios/chrome/browser/ui/location_bar/location_bar_coordinator_unittest.mm index 839ba98..2f765ec 100644 --- a/ios/chrome/browser/ui/location_bar/location_bar_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/location_bar/location_bar_coordinator_unittest.mm
@@ -119,6 +119,12 @@ EXPECT_TRUE(coordinator_.locationBarViewController == nil); } +// Removes the existing WebState to ensure that nothing breaks when there is no +// active WebState. +TEST_F(LocationBarCoordinatorTest, RemoveLastWebState) { + web_state_list_.CloseWebStateAt(0, 0); +} + // Calls -loadGURLFromLocationBar:transition: with https://www.google.com/ URL. // Verifies that URLLoader receives correct load request, which also includes // variations header.
diff --git a/ios/chrome/browser/ui/omnibox/omnibox_egtest.mm b/ios/chrome/browser/ui/omnibox/omnibox_egtest.mm index 730a1a8..28e364f1 100644 --- a/ios/chrome/browser/ui/omnibox/omnibox_egtest.mm +++ b/ios/chrome/browser/ui/omnibox/omnibox_egtest.mm
@@ -15,6 +15,7 @@ #import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_matchers_app_interface.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h" +#import "ios/chrome/test/earl_grey/hardware_keyboard_util.h" #include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_response.h" #include "ui/base/l10n/l10n_util.h" @@ -178,6 +179,62 @@ assertWithMatcher:grey_nil()]; } +// Copies and pastes a URL, then performs an undo of the paste, and attempts to +// perform a second undo. +- (void)testCopyPasteUndo { + [self openPage1]; + + [ChromeEarlGreyUI focusOmnibox]; + [self checkLocationBarEditState]; + + chrome_test_util::SimulatePhysicalKeyboardEvent(UIKeyModifierCommand, @"C"); + + // Edit menu takes a while to copy, and not waiting here will cause Page 2 to + // load before the copy happens, so Page 2 URL may be copied. + GREYCondition* copyCondition = [GREYCondition + conditionWithName:@"page1 URL copied condition" + block:^BOOL { + return [UIPasteboard.generalPasteboard.string + hasSuffix:base::SysUTF8ToNSString(kPage1URL)]; + }]; + // Wait for copy to happen or timeout after 5 seconds. + BOOL success = [copyCondition waitWithTimeout:5]; + GREYAssertTrue(success, @"Copying page 1 URL failed"); + + // Defocus the omnibox. + if ([ChromeEarlGrey isIPadIdiom]) { + id<GREYMatcher> typingShield = grey_accessibilityID(@"Typing Shield"); + [[EarlGrey selectElementWithMatcher:typingShield] performAction:grey_tap()]; + } else { + [[EarlGrey selectElementWithMatcher:grey_buttonTitle(@"Cancel")] + performAction:grey_tap()]; + } + + [self openPage2]; + + [ChromeEarlGreyUI focusOmnibox]; + + // Attempt to paste. + chrome_test_util::SimulatePhysicalKeyboardEvent(UIKeyModifierCommand, @"V"); + + // Verify that paste happened. + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] + assertWithMatcher:chrome_test_util::OmniboxContainingText(kPage1URL)]; + + // Attempt to undo. + chrome_test_util::SimulatePhysicalKeyboardEvent(UIKeyModifierCommand, @"Z"); + + // Verify that undo happened. + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] + assertWithMatcher:chrome_test_util::OmniboxContainingText(kPage2URL)]; + + // Attempt to undo again. Nothing should happen. In the past this could lead + // to a crash. + chrome_test_util::SimulatePhysicalKeyboardEvent(UIKeyModifierCommand, @"Z"); + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] + assertWithMatcher:chrome_test_util::OmniboxContainingText(kPage2URL)]; +} + #pragma mark - Helpers // Navigates to Page 1 in a tab and waits for it to load.
diff --git a/ios/chrome/browser/ui/omnibox/popup/BUILD.gn b/ios/chrome/browser/ui/omnibox/popup/BUILD.gn index c9950ff7d..1e58dbe5 100644 --- a/ios/chrome/browser/ui/omnibox/popup/BUILD.gn +++ b/ios/chrome/browser/ui/omnibox/popup/BUILD.gn
@@ -140,6 +140,7 @@ configs += [ "//build/config/compiler:enable_arc" ] testonly = true sources = [ + "omnibox_popup_row_cell_unittest.mm", "omnibox_popup_view_controller_unittest.mm", ] deps = [
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_egtest.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_egtest.mm index bb6ff81..46fdba8 100644 --- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_egtest.mm +++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_egtest.mm
@@ -273,6 +273,14 @@ // Tests that switching to closed tab opens the tab in foreground, except if it // is from NTP without history. - (void)testSwitchToClosedTab { +#if defined(CHROME_EARL_GREY_2) + if (@available(iOS 13, *)) { + if ([ChromeEarlGrey isIPadIdiom]) { + // TODO(crbug.com/992480):test fails on iPad. + EARL_GREY_TEST_DISABLED(@"Test disabled on iPad."); + } + } +#endif GURL URL1 = self.testServer->GetURL(kPage1URL); // Open the first page.
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.mm index 132c29e..f86378f 100644 --- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.mm +++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.mm
@@ -380,7 +380,7 @@ } - (NSString*)accessibilityValue { - return self.detailTruncatingLabel.hidden + return self.suggestion.hasAnswer ? self.detailAnswerLabel.attributedText.string : self.detailTruncatingLabel.attributedText.string; }
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell_unittest.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell_unittest.mm new file mode 100644 index 0000000..43fbde8 --- /dev/null +++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell_unittest.mm
@@ -0,0 +1,82 @@ +// Copyright 2019 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. + +#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.h" + +#import "ios/chrome/browser/ui/omnibox/popup/autocomplete_suggestion.h" +#import "ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row.h" +#include "testing/gtest_mac.h" +#include "testing/platform_test.h" +#include "url/gurl.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +// Implements AutocompleteSuggestion protocol for use in tests. Can be populated +// directly into properties. +@interface FakeAutocompleteMatch : NSObject <AutocompleteSuggestion> +@property(nonatomic, assign) BOOL supportsDeletion; +@property(nonatomic, assign) BOOL hasAnswer; +@property(nonatomic, assign) BOOL isURL; +@property(nonatomic, assign, getter=isAppendable) BOOL appendable; +@property(nonatomic, strong) UIImage* suggestionTypeIcon; +@property(nonatomic, assign) BOOL isTabMatch; +@property(nonatomic, strong) NSAttributedString* text; +@property(nonatomic, strong) NSAttributedString* detailText; +@property(nonatomic, assign) NSInteger numberOfLines; +@property(nonatomic, assign) BOOL hasImage; +@property(nonatomic, assign) GURL imageURL; +@property(nonatomic, assign) GURL faviconPageURL; +@property(nonatomic, strong) id<OmniboxIcon> icon; + +@end + +@implementation FakeAutocompleteMatch +@end + +namespace { + +class OmniboxPopupRowCellTest : public PlatformTest { + protected: + void SetUp() override { + PlatformTest::SetUp(); + cell_ = [[OmniboxPopupRowCell alloc] init]; + } + + OmniboxPopupRowCell* cell_; +}; + +TEST_F(OmniboxPopupRowCellTest, ReadsAnswersInVoiceover) { + FakeAutocompleteMatch* fakeAnswerMatch = [[FakeAutocompleteMatch alloc] init]; + fakeAnswerMatch.hasAnswer = YES; + + // The detail for answers is the suggested question, for example if user types + // "how tall is" the detail text might be "how tall is the Eiffel tower". + fakeAnswerMatch.detailText = + [[NSAttributedString alloc] initWithString:@"question"]; + fakeAnswerMatch.text = [[NSAttributedString alloc] initWithString:@"answer"]; + + [cell_ setupWithAutocompleteSuggestion:fakeAnswerMatch incognito:NO]; + + EXPECT_NSEQ([cell_ accessibilityValue], @"question"); + EXPECT_NSEQ([cell_ accessibilityLabel], @"answer"); +} + +TEST_F(OmniboxPopupRowCellTest, ReadsNonAnswersInVoiceover) { + FakeAutocompleteMatch* fakeNonAnswerMatch = + [[FakeAutocompleteMatch alloc] init]; + fakeNonAnswerMatch.hasAnswer = NO; + + fakeNonAnswerMatch.detailText = + [[NSAttributedString alloc] initWithString:@"detail"]; + fakeNonAnswerMatch.text = [[NSAttributedString alloc] initWithString:@"body"]; + + [cell_ setupWithAutocompleteSuggestion:fakeNonAnswerMatch incognito:NO]; + + EXPECT_NSEQ([cell_ accessibilityValue], @"detail"); + EXPECT_NSEQ([cell_ accessibilityLabel], @"body"); +} + +} // namespace
diff --git a/ios/chrome/browser/ui/tabs/background_tab_animation_view.h b/ios/chrome/browser/ui/tabs/background_tab_animation_view.h index 746952ec..be439b7 100644 --- a/ios/chrome/browser/ui/tabs/background_tab_animation_view.h +++ b/ios/chrome/browser/ui/tabs/background_tab_animation_view.h
@@ -11,6 +11,12 @@ // tab has been opened in background. @interface BackgroundTabAnimationView : UIView +- (instancetype)initWithFrame:(CGRect)frame + incognito:(BOOL)incognito NS_DESIGNATED_INITIALIZER; + +- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; +- (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; + // Starts an Open In New Tab animation in |parentView|, from |originPoint| with // a |completion| block. The named layout guide for the TabGrid button should be // accessible from |parentView|. |originPoint| should be in window coordinates.
diff --git a/ios/chrome/browser/ui/tabs/background_tab_animation_view.mm b/ios/chrome/browser/ui/tabs/background_tab_animation_view.mm index 8931d26..7b4f833 100644 --- a/ios/chrome/browser/ui/tabs/background_tab_animation_view.mm +++ b/ios/chrome/browser/ui/tabs/background_tab_animation_view.mm
@@ -9,6 +9,8 @@ #import "ios/chrome/browser/ui/util/named_guide.h" #import "ios/chrome/browser/ui/util/named_guide_util.h" #import "ios/chrome/browser/ui/util/uikit_ui_util.h" +#import "ios/chrome/common/colors/incognito_color_util.h" +#import "ios/chrome/common/colors/semantic_color_names.h" #import "ios/chrome/common/material_timing.h" #import "ios/chrome/common/ui_util/constraints_ui_util.h" @@ -23,8 +25,31 @@ CGFloat kRotationAngleInRadians = 20.0 / 180 * M_PI; } // namespace +@interface BackgroundTabAnimationView () + +// Whether the animation is taking place in incognito. +@property(nonatomic, assign) BOOL incognito; + +@end + @implementation BackgroundTabAnimationView +- (instancetype)initWithFrame:(CGRect)frame incognito:(BOOL)incognito { + self = [super initWithFrame:frame]; + if (self) { + _incognito = incognito; + +#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0) + if (@available(iOS 13, *)) { + self.overrideUserInterfaceStyle = incognito + ? UIUserInterfaceStyleDark + : UIUserInterfaceStyleUnspecified; + } +#endif + } + return self; +} + #pragma mark - Public - (void)animateFrom:(CGPoint)originPoint @@ -96,7 +121,9 @@ [super didMoveToSuperview]; if (self.subviews.count == 0) { - self.backgroundColor = [UIColor colorWithWhite:0.98 alpha:1]; + self.backgroundColor = color::IncognitoDynamicColor( + self.incognito, [UIColor colorNamed:kBackgroundColor], + [UIColor colorNamed:kBackgroundDarkColor]); self.layer.shadowRadius = 20; self.layer.shadowOpacity = 0.4; self.layer.shadowOffset = CGSizeMake(0, 3); @@ -106,7 +133,9 @@ [[UIImage imageNamed:@"open_new_tab_background"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; linkImage.translatesAutoresizingMaskIntoConstraints = NO; - linkImage.tintColor = [UIColor colorWithWhite:0.4 alpha:1]; + linkImage.tintColor = color::IncognitoDynamicColor( + self.incognito, [UIColor colorNamed:kToolbarButtonColor], + [UIColor colorNamed:kToolbarButtonDarkColor]); [self addSubview:linkImage];
diff --git a/ios/chrome/browser/ui/webui/crashes_ui.cc b/ios/chrome/browser/ui/webui/crashes_ui.cc index fc654ba..cc1883c 100644 --- a/ios/chrome/browser/ui/webui/crashes_ui.cc +++ b/ios/chrome/browser/ui/webui/crashes_ui.cc
@@ -34,17 +34,18 @@ web::WebUIIOSDataSource* source = web::WebUIIOSDataSource::Create(kChromeUICrashesHost); - for (size_t i = 0; i < crash::kCrashesUILocalizedStringsCount; ++i) { + for (size_t i = 0; i < crash_reporter::kCrashesUILocalizedStringsCount; ++i) { source->AddLocalizedString( - crash::kCrashesUILocalizedStrings[i].name, - crash::kCrashesUILocalizedStrings[i].resource_id); + crash_reporter::kCrashesUILocalizedStrings[i].name, + crash_reporter::kCrashesUILocalizedStrings[i].resource_id); } - source->AddLocalizedString(crash::kCrashesUIShortProductName, + source->AddLocalizedString(crash_reporter::kCrashesUIShortProductName, IDS_IOS_SHORT_PRODUCT_NAME); source->SetJsonPath("strings.js"); - source->AddResourcePath(crash::kCrashesUICrashesJS, IDR_CRASH_CRASHES_JS); + source->AddResourcePath(crash_reporter::kCrashesUICrashesJS, + IDR_CRASH_CRASHES_JS); source->SetDefaultResource(IDR_CRASH_CRASHES_HTML); return source; } @@ -95,7 +96,7 @@ upload_list_->Load(base::BindOnce(&CrashesDOMHandler::OnUploadListAvailable, base::Unretained(this))); web_ui()->RegisterMessageCallback( - crash::kCrashesUIRequestCrashList, + crash_reporter::kCrashesUIRequestCrashList, base::BindRepeating(&CrashesDOMHandler::HandleRequestCrashes, base::Unretained(this))); } @@ -123,7 +124,7 @@ IOSChromeMetricsServiceAccessor::IsMetricsAndCrashReportingEnabled(); base::ListValue crash_list; if (crash_reporting_enabled) - crash::UploadListToValue(upload_list_.get(), &crash_list); + crash_reporter::UploadListToValue(upload_list_.get(), &crash_list); base::Value enabled(crash_reporting_enabled); base::Value dynamic_backend(false); base::Value manual_uploads(false); @@ -138,7 +139,8 @@ args.push_back(&crash_list); args.push_back(&version); args.push_back(&os_string); - web_ui()->CallJavascriptFunction(crash::kCrashesUIUpdateCrashList, args); + web_ui()->CallJavascriptFunction(crash_reporter::kCrashesUIUpdateCrashList, + args); } } // namespace
diff --git a/ios/chrome/browser/web/BUILD.gn b/ios/chrome/browser/web/BUILD.gn index fb9e377..59ab45b 100644 --- a/ios/chrome/browser/web/BUILD.gn +++ b/ios/chrome/browser/web/BUILD.gn
@@ -379,6 +379,7 @@ sources = [ "child_window_open_by_dom_egtest.mm", "error_page_egtest.mm", + "js_print_egtest.mm", ] deps = [
diff --git a/ios/chrome/browser/web/js_print_egtest.mm b/ios/chrome/browser/web/js_print_egtest.mm index 0d5cdafa..dd4f821a 100644 --- a/ios/chrome/browser/web/js_print_egtest.mm +++ b/ios/chrome/browser/web/js_print_egtest.mm
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#import <EarlGrey/EarlGrey.h> #import <XCTest/XCTest.h> #include <map> @@ -10,6 +9,7 @@ #import "ios/chrome/test/earl_grey/chrome_matchers.h" #import "ios/chrome/test/earl_grey/chrome_test_case.h" #import "ios/testing/earl_grey/disabled_test_macros.h" +#import "ios/testing/earl_grey/earl_grey_test.h" #import "ios/web/public/test/http_server/http_server.h" #include "ios/web/public/test/http_server/http_server_util.h"
diff --git a/ios/chrome/test/earl_grey/BUILD.gn b/ios/chrome/test/earl_grey/BUILD.gn index 0ed36c61..d060a97 100644 --- a/ios/chrome/test/earl_grey/BUILD.gn +++ b/ios/chrome/test/earl_grey/BUILD.gn
@@ -212,6 +212,8 @@ "chrome_test_case.mm", "chrome_test_case_app_interface.h", "chrome_test_case_app_interface.mm", + "hardware_keyboard_util.h", + "hardware_keyboard_util.mm", "scoped_block_popups_pref.h", "scoped_block_popups_pref.mm", ] @@ -285,6 +287,7 @@ "OCHamcrest.framework", "WebKit.framework", "XCTest.framework", + "IOKit.framework", ] } @@ -317,6 +320,8 @@ "chrome_matchers_app_interface.mm", "chrome_test_case_app_interface.h", "chrome_test_case_app_interface.mm", + "hardware_keyboard_util.h", + "hardware_keyboard_util.mm", ] deps = [ @@ -368,6 +373,7 @@ "//ui/base", "//ui/base:test_support", ] + libs = [ "IOKit.framework" ] } source_set("eg_test_support+eg2") {
diff --git a/ios/chrome/test/earl_grey/hardware_keyboard_util.h b/ios/chrome/test/earl_grey/hardware_keyboard_util.h new file mode 100644 index 0000000..d35a8476 --- /dev/null +++ b/ios/chrome/test/earl_grey/hardware_keyboard_util.h
@@ -0,0 +1,21 @@ +// Copyright 2019 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. + +#ifndef IOS_CHROME_TEST_EARL_GREY_HARDWARE_KEYBOARD_UTIL_H_ +#define IOS_CHROME_TEST_EARL_GREY_HARDWARE_KEYBOARD_UTIL_H_ + +#import <UIKit/UIKit.h> + +namespace chrome_test_util { + +// Simulates a physical keyboard event. +// The input is similar to UIKeyCommand parameters, and is designed for testing +// keyboard shortcuts. +// Accepts any strings and also UIKeyInput{Up|Down|Left|Right}Arrow and +// UIKeyInputEscape constants as |input|. +void SimulatePhysicalKeyboardEvent(UIKeyModifierFlags flags, NSString* input); + +} // namespace chrome_test_util + +#endif // IOS_CHROME_TEST_EARL_GREY_HARDWARE_KEYBOARD_UTIL_H_
diff --git a/ios/chrome/test/earl_grey/hardware_keyboard_util.mm b/ios/chrome/test/earl_grey/hardware_keyboard_util.mm new file mode 100644 index 0000000..d81cb89 --- /dev/null +++ b/ios/chrome/test/earl_grey/hardware_keyboard_util.mm
@@ -0,0 +1,432 @@ +// Copyright 2019 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. + +#import "ios/chrome/test/earl_grey/hardware_keyboard_util.h" + +#import "base/test/ios/wait_util.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +#pragma mark - Private API from IOKit to support CreateHIDKeyEvent + +typedef UInt32 IOOptionBits; + +typedef struct __IOHIDEvent* IOHIDEventRef; + +extern "C" { + +// This function is privately defined in IOKit framework. +IOHIDEventRef IOHIDEventCreateKeyboardEvent(CFAllocatorRef, + uint64_t, + uint32_t, + uint32_t, + boolean_t, + IOOptionBits); +} + +// This enum is defined in IOKit framework. +typedef enum { + kUIKeyboardInputRepeat = 1 << 0, + kUIKeyboardInputPopupVariant = 1 << 1, + kUIKeyboardInputMultitap = 1 << 2, + kUIKeyboardInputSkipCandidateSelection = 1 << 3, + kUIKeyboardInputDeadKey = 1 << 4, + kUIKeyboardInputModifierFlagsChanged = 1 << 5, + kUIKeyboardInputFlick = 1 << 6, + kUIKeyboardInputPreProcessed = 1 << 7, +} UIKeyboardInputFlags; + +// This enum is defined in IOKit framework. +enum { + kHIDUsage_KeyboardA = 0x04, + kHIDUsage_Keyboard1 = 0x1E, + kHIDUsage_Keyboard2 = 0x1F, + kHIDUsage_Keyboard3 = 0x20, + kHIDUsage_Keyboard4 = 0x21, + kHIDUsage_Keyboard5 = 0x22, + kHIDUsage_Keyboard6 = 0x23, + kHIDUsage_Keyboard7 = 0x24, + kHIDUsage_Keyboard8 = 0x25, + kHIDUsage_Keyboard9 = 0x26, + kHIDUsage_Keyboard0 = 0x27, + kHIDUsage_KeyboardReturnOrEnter = 0x28, + kHIDUsage_KeyboardEscape = 0x29, + kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, + kHIDUsage_KeyboardTab = 0x2B, + kHIDUsage_KeyboardSpacebar = 0x2C, + kHIDUsage_KeyboardHyphen = 0x2D, + kHIDUsage_KeyboardEqualSign = 0x2E, + kHIDUsage_KeyboardOpenBracket = 0x2F, + kHIDUsage_KeyboardCloseBracket = 0x30, + kHIDUsage_KeyboardBackslash = 0x31, + kHIDUsage_KeyboardSemicolon = 0x33, + kHIDUsage_KeyboardQuote = 0x34, + kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, + kHIDUsage_KeyboardComma = 0x36, + kHIDUsage_KeyboardPeriod = 0x37, + kHIDUsage_KeyboardSlash = 0x38, + kHIDUsage_KeyboardCapsLock = 0x39, + kHIDUsage_KeyboardF1 = 0x3A, + kHIDUsage_KeyboardF12 = 0x45, + kHIDUsage_KeyboardPrintScreen = 0x46, + kHIDUsage_KeyboardInsert = 0x49, + kHIDUsage_KeyboardHome = 0x4A, + kHIDUsage_KeyboardPageUp = 0x4B, + kHIDUsage_KeyboardDeleteForward = 0x4C, + kHIDUsage_KeyboardEnd = 0x4D, + kHIDUsage_KeyboardPageDown = 0x4E, + kHIDUsage_KeyboardRightArrow = 0x4F, + kHIDUsage_KeyboardLeftArrow = 0x50, + kHIDUsage_KeyboardDownArrow = 0x51, + kHIDUsage_KeyboardUpArrow = 0x52, + kHIDUsage_KeypadNumLock = 0x53, + kHIDUsage_KeyboardF13 = 0x68, + kHIDUsage_KeyboardF24 = 0x73, + kHIDUsage_KeyboardMenu = 0x76, + kHIDUsage_KeypadComma = 0x85, + kHIDUsage_KeyboardLeftControl = 0xE0, + kHIDUsage_KeyboardLeftShift = 0xE1, + kHIDUsage_KeyboardLeftAlt = 0xE2, + kHIDUsage_KeyboardLeftGUI = 0xE3, + kHIDUsage_KeyboardRightControl = 0xE4, + kHIDUsage_KeyboardRightShift = 0xE5, + kHIDUsage_KeyboardRightAlt = 0xE6, + kHIDUsage_KeyboardRightGUI = 0xE7, +}; + +// This function is privately defined in IOKit framework. +static uint32_t keyCodeForFunctionKey(NSString* key) { + // Compare the input string with the function-key names (i.e. "F1",...,"F24"). + for (int i = 1; i <= 12; ++i) { + if ([key isEqualToString:[NSString stringWithFormat:@"F%d", i]]) + return kHIDUsage_KeyboardF1 + i - 1; + } + for (int i = 13; i <= 24; ++i) { + if ([key isEqualToString:[NSString stringWithFormat:@"F%d", i]]) + return kHIDUsage_KeyboardF13 + i - 13; + } + return 0; +} + +// This function is privately defined in IOKit framework. +static inline uint32_t hidUsageCodeForCharacter(NSString* key) { + const int uppercaseAlphabeticOffset = 'A' - kHIDUsage_KeyboardA; + const int lowercaseAlphabeticOffset = 'a' - kHIDUsage_KeyboardA; + const int numericNonZeroOffset = '1' - kHIDUsage_Keyboard1; + if (key.length == 1) { + // Handle alphanumeric characters and basic symbols. + int keyCode = [key characterAtIndex:0]; + if (97 <= keyCode && keyCode <= 122) // Handle a-z. + return keyCode - lowercaseAlphabeticOffset; + + if (65 <= keyCode && keyCode <= 90) // Handle A-Z. + return keyCode - uppercaseAlphabeticOffset; + + if (49 <= keyCode && keyCode <= 57) // Handle 1-9. + return keyCode - numericNonZeroOffset; + + // Handle all other cases. + switch (keyCode) { + case '`': + case '~': + return kHIDUsage_KeyboardGraveAccentAndTilde; + case '!': + return kHIDUsage_Keyboard1; + case '@': + return kHIDUsage_Keyboard2; + case '#': + return kHIDUsage_Keyboard3; + case '$': + return kHIDUsage_Keyboard4; + case '%': + return kHIDUsage_Keyboard5; + case '^': + return kHIDUsage_Keyboard6; + case '&': + return kHIDUsage_Keyboard7; + case '*': + return kHIDUsage_Keyboard8; + case '(': + return kHIDUsage_Keyboard9; + case ')': + case '0': + return kHIDUsage_Keyboard0; + case '-': + case '_': + return kHIDUsage_KeyboardHyphen; + case '=': + case '+': + return kHIDUsage_KeyboardEqualSign; + case '\b': + return kHIDUsage_KeyboardDeleteOrBackspace; + case '\t': + return kHIDUsage_KeyboardTab; + case '[': + case '{': + return kHIDUsage_KeyboardOpenBracket; + case ']': + case '}': + return kHIDUsage_KeyboardCloseBracket; + case '\\': + case '|': + return kHIDUsage_KeyboardBackslash; + case ';': + case ':': + return kHIDUsage_KeyboardSemicolon; + case '\'': + case '"': + return kHIDUsage_KeyboardQuote; + case '\r': + case '\n': + return kHIDUsage_KeyboardReturnOrEnter; + case ',': + case '<': + return kHIDUsage_KeyboardComma; + case '.': + case '>': + return kHIDUsage_KeyboardPeriod; + case '/': + case '?': + return kHIDUsage_KeyboardSlash; + case ' ': + return kHIDUsage_KeyboardSpacebar; + } + } + + uint32_t keyCode = keyCodeForFunctionKey(key); + if (keyCode) + return keyCode; + + if ([key isEqualToString:@"capsLock"] || [key isEqualToString:@"capsLockKey"]) + return kHIDUsage_KeyboardCapsLock; + if ([key isEqualToString:@"pageUp"]) + return kHIDUsage_KeyboardPageUp; + if ([key isEqualToString:@"pageDown"]) + return kHIDUsage_KeyboardPageDown; + if ([key isEqualToString:@"home"]) + return kHIDUsage_KeyboardHome; + if ([key isEqualToString:@"insert"]) + return kHIDUsage_KeyboardInsert; + if ([key isEqualToString:@"end"]) + return kHIDUsage_KeyboardEnd; + if ([key isEqualToString:@"escape"]) + return kHIDUsage_KeyboardEscape; + if ([key isEqualToString:@"return"] || [key isEqualToString:@"enter"]) + return kHIDUsage_KeyboardReturnOrEnter; + if ([key isEqualToString:@"leftArrow"]) + return kHIDUsage_KeyboardLeftArrow; + if ([key isEqualToString:@"rightArrow"]) + return kHIDUsage_KeyboardRightArrow; + if ([key isEqualToString:@"upArrow"]) + return kHIDUsage_KeyboardUpArrow; + if ([key isEqualToString:@"downArrow"]) + return kHIDUsage_KeyboardDownArrow; + if ([key isEqualToString:@"delete"]) + return kHIDUsage_KeyboardDeleteOrBackspace; + if ([key isEqualToString:@"forwardDelete"]) + return kHIDUsage_KeyboardDeleteForward; + if ([key isEqualToString:@"leftCommand"] || [key isEqualToString:@"metaKey"]) + return kHIDUsage_KeyboardLeftGUI; + if ([key isEqualToString:@"rightCommand"]) + return kHIDUsage_KeyboardRightGUI; + if ([key isEqualToString:@"clear"]) // Num Lock / Clear + return kHIDUsage_KeypadNumLock; + if ([key isEqualToString:@"leftControl"] || [key isEqualToString:@"ctrlKey"]) + return kHIDUsage_KeyboardLeftControl; + if ([key isEqualToString:@"rightControl"]) + return kHIDUsage_KeyboardRightControl; + if ([key isEqualToString:@"leftShift"] || [key isEqualToString:@"shiftKey"]) + return kHIDUsage_KeyboardLeftShift; + if ([key isEqualToString:@"rightShift"]) + return kHIDUsage_KeyboardRightShift; + if ([key isEqualToString:@"leftAlt"] || [key isEqualToString:@"altKey"]) + return kHIDUsage_KeyboardLeftAlt; + if ([key isEqualToString:@"rightAlt"]) + return kHIDUsage_KeyboardRightAlt; + if ([key isEqualToString:@"numpadComma"]) + return kHIDUsage_KeypadComma; + + return 0; +} + +// These are privately defined in IOKit framework. +enum { kHIDPage_KeyboardOrKeypad = 0x07, kHIDPage_VendorDefinedStart = 0xFF00 }; + +enum { + kIOHIDEventOptionNone = 0, +}; + +#pragma mark - Private API to fake keyboard events. + +// Convenience wrapper for IOHIDEventCreateKeyboardEvent. +IOHIDEventRef CreateHIDKeyEvent(NSString* character, + uint64_t timestamp, + bool isKeyDown) { + return IOHIDEventCreateKeyboardEvent( + kCFAllocatorDefault, timestamp, kHIDPage_KeyboardOrKeypad, + hidUsageCodeForCharacter(character), isKeyDown, kIOHIDEventOptionNone); +} + +// A fake class that mirrors UIPhysicalKeyboardEvent private class' fields. +// This class is never used, but it allows to call UIPhysicalKeyboardEvent's API +// by casting an instance of UIPhysicalKeyboardEvent to PhysicalKeyboardEvent. +@interface PhysicalKeyboardEvent : UIEvent ++ (id)_eventWithInput:(id)arg1 inputFlags:(int)arg2; +- (void)_setHIDEvent:(IOHIDEventRef)event keyboard:(void*)gsKeyboard; +@property(nonatomic) UIKeyModifierFlags _modifierFlags; +@end + +// Private API in UIKit. +@interface UIApplication () +- (void)handleKeyUIEvent:(id)event; +- (void)handleKeyHIDEvent:(id)event; +@end + +#pragma mark - Implementation + +namespace { + +// Delay between simulated keyboard press events. +const double kKeyPressDelay = 0.02; + +// Utility to describe modifier flags. Useful in debugging. +NSString* DescribeFlags(UIKeyModifierFlags flags) __attribute__((unused)); +NSString* DescribeFlags(UIKeyModifierFlags flags) { + NSMutableString* s = [NSMutableString new]; + if (flags & UIKeyModifierAlphaShift) { + [s appendString:@"CapsLock+"]; + } + if (flags & UIKeyModifierShift) { + [s appendString:@"Shift+"]; + } + if (flags & UIKeyModifierControl) { + [s appendString:@"Ctrl+"]; + } + if (flags & UIKeyModifierAlternate) { + [s appendString:@"Alt+"]; + } + if (flags & UIKeyModifierCommand) { + [s appendString:@"Command+"]; + } + if (flags & UIKeyModifierNumericPad) { + [s appendString:@"NumPad+"]; + } + + return s; +} + +// Sends an individual keyboard press event. +void SendKBEventWithModifiers(UIKeyModifierFlags flags, NSString* input) { + // Fake up an event. + PhysicalKeyboardEvent* keyboardEvent = + [NSClassFromString(@"UIPhysicalKeyboardEvent") _eventWithInput:input + inputFlags:0]; + keyboardEvent._modifierFlags = flags; + IOHIDEventRef hidEvent = + CreateHIDKeyEvent(input, keyboardEvent.timestamp, true); + [keyboardEvent _setHIDEvent:hidEvent keyboard:0]; + [[UIApplication sharedApplication] handleKeyUIEvent:keyboardEvent]; +} + +// Lifts the keypresses one by one. +// Once all keypresses are reversed, executes |completion| on the main thread. +void UnwindFakeKeyboardPressWithFlags(UIKeyModifierFlags flags, + NSString* input, + void (^completion)()) { + if (flags == 0 && input.length == 0) { + if (completion) { + completion(); + } + return; + } + + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, kKeyPressDelay * NSEC_PER_SEC), + dispatch_get_main_queue(), ^{ + // First release all the non-modifier keys. + if (input.length > 0) { + NSString* remainingInput = [input substringFromIndex:1]; + + SendKBEventWithModifiers(flags, remainingInput); + UnwindFakeKeyboardPressWithFlags(flags, remainingInput, completion); + return; + } + + // Unwind the modifier keys. + for (int i = 16; i < 22; i++) { + UIKeyModifierFlags flag = 1 << i; + if (flags & flag) { + SendKBEventWithModifiers(flags & ~flag, input); + UnwindFakeKeyboardPressWithFlags(flags & ~flag, input, completion); + } + } + }); +} + +// Programmatically simulates pressing the keys one by one, starting with +// modifier keys and moving to input string through recursion, then calls +// unwindFakeKeyboardPressWithFlags to release the pressed keys in reverse +// order. +// Once all key downs and key ups are simulated, executes |completion| on the +// main thread. +void SimulatePhysicalKeyboardEventInternal(UIKeyModifierFlags flags, + NSString* input, + UIKeyModifierFlags previousFlags, + NSString* previousInput, + void (^completion)()) { + dispatch_after( + dispatch_time(DISPATCH_TIME_NOW, kKeyPressDelay * NSEC_PER_SEC), + dispatch_get_main_queue(), ^{ + // First dial in all the modifier keys. + for (int i = 15; i < 25; i++) { + UIKeyModifierFlags flag = 1 << i; + if (flags & flag) { + SendKBEventWithModifiers(previousFlags ^ flag, previousInput); + SimulatePhysicalKeyboardEventInternal(flags & ~flag, input, + previousFlags ^ flag, + previousInput, completion); + return; + } + } + + // Now add the next input char. + if (input.length > 0) { + NSString* pressedKey = [input substringToIndex:1]; + NSString* remainingInput = [input substringFromIndex:1]; + NSString* alreadyPressedString = + [previousInput stringByAppendingString:pressedKey]; + + SendKBEventWithModifiers(previousFlags, alreadyPressedString); + SimulatePhysicalKeyboardEventInternal( + flags, remainingInput, previousFlags, alreadyPressedString, + completion); + } else { + // Time to unwind the presses. + UnwindFakeKeyboardPressWithFlags(previousFlags, previousInput, + completion); + } + }); +} + +} // namespace + +#pragma mark - Public + +namespace chrome_test_util { + +void SimulatePhysicalKeyboardEvent(UIKeyModifierFlags flags, NSString* input) { + __block BOOL keyPressesFinished = NO; + + SimulatePhysicalKeyboardEventInternal(flags, input, 0, @"", ^{ + keyPressesFinished = YES; + }); + + BOOL __unused result = base::test::ios::WaitUntilConditionOrTimeout(1.0, ^{ + return keyPressesFinished; + }); +} + +} // namespace chrome_test_util
diff --git a/ios/showcase/infobars/sc_infobar_banner_coordinator.mm b/ios/showcase/infobars/sc_infobar_banner_coordinator.mm index 5ec8280..87996852 100644 --- a/ios/showcase/infobars/sc_infobar_banner_coordinator.mm +++ b/ios/showcase/infobars/sc_infobar_banner_coordinator.mm
@@ -96,13 +96,13 @@ } - (void)dealloc { - [self dismissInfobarBanner:nil animated:YES completion:nil]; + [self dismissInfobarBanner:nil animated:YES completion:nil userInitiated:NO]; } #pragma mark InfobarBannerDelegate - (void)bannerInfobarButtonWasPressed:(id)sender { - [self dismissInfobarBanner:nil animated:YES completion:nil]; + [self dismissInfobarBanner:nil animated:YES completion:nil userInitiated:NO]; } - (void)presentInfobarModalFromBanner { @@ -125,7 +125,8 @@ - (void)dismissInfobarBanner:(id)sender animated:(BOOL)animated - completion:(ProceduralBlock)completion { + completion:(ProceduralBlock)completion + userInitiated:(BOOL)userInitiated { [self.baseViewController dismissViewControllerAnimated:animated completion:nil]; }
diff --git a/ios/web/public/test/web_test_with_web_state.h b/ios/web/public/test/web_test_with_web_state.h index f29f0c5..420d654 100644 --- a/ios/web/public/test/web_test_with_web_state.h +++ b/ios/web/public/test/web_test_with_web_state.h
@@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #import "base/ios/block_types.h" -#include "base/message_loop/message_loop.h" +#include "base/task/task_observer.h" #include "ios/web/public/test/web_test.h" #include "ui/base/page_transition_types.h" #include "url/gurl.h" @@ -20,8 +20,7 @@ class WebState; // Base test fixture that provides WebState for testing. -class WebTestWithWebState : public WebTest, - public base::MessageLoop::TaskObserver { +class WebTestWithWebState : public WebTest, public base::TaskObserver { public: // Destroys underlying WebState. web_state() will return null after this call. void DestroyWebState(); @@ -73,7 +72,7 @@ const web::WebState* web_state() const; private: - // base::MessageLoop::TaskObserver overrides. + // base::TaskObserver overrides. void WillProcessTask(const base::PendingTask& pending_task) override; void DidProcessTask(const base::PendingTask& pending_task) override;
diff --git a/ios/web/web_state/ui/crw_context_menu_controller.mm b/ios/web/web_state/ui/crw_context_menu_controller.mm index a802303..667583f4 100644 --- a/ios/web/web_state/ui/crw_context_menu_controller.mm +++ b/ios/web/web_state/ui/crw_context_menu_controller.mm
@@ -35,6 +35,9 @@ // If our detection duration is shorter, our gesture recognizer will fire // first in order to cancel the system context menu gesture recognizer. const NSTimeInterval kLongPressDurationSeconds = 0.55 - 0.1; +// Since iOS 13, our gesture recognizer needs to allow enough time for drag and +// drop to trigger first. +const NSTimeInterval kLongPressDurationSecondsIOS13 = 0.75; // If there is a movement bigger than |kLongPressMoveDeltaPixels|, the context // menu will not be triggered. @@ -113,8 +116,9 @@ void OverrideGestureRecognizers(UIGestureRecognizer* contextMenuRecognizer, WKWebView* webView) { NSString* fragment = nil; + if (@available(iOS 13, *)) { - fragment = @"action=_handleGestureRecognizer:"; + fragment = @"com.apple.UIKit.clickPresentationFailure"; } else { fragment = @"action=_longPressRecognized:"; } @@ -123,27 +127,17 @@ if (systemContextMenuRecognizer) { [systemContextMenuRecognizer requireGestureRecognizerToFail:contextMenuRecognizer]; - // requireGestureRecognizerToFail: doesn't retain the recognizer, so it - // is possible for |iRecognizer| to outlive |recognizer| and end up with - // a dangling pointer. Add a retaining associative reference to ensure - // that the lifetimes work out. - // Note that normally using the value as the key wouldn't make any - // sense, but here it's fine since nothing needs to look up the value. + // requireGestureRecognizerToFail: doesn't retain the recognizer, so it is + // possible for |systemContextMenuRecognizer| to outlive + // |contextMenuRecognizer| and end up with a dangling pointer. Add a + // retaining associative reference to ensure that the lifetimes work out. + // Note that normally using the value as the key wouldn't make any sense, + // but here it's fine since nothing needs to look up the value. void* associated_object_key = (__bridge void*)contextMenuRecognizer; objc_setAssociatedObject(systemContextMenuRecognizer.view, associated_object_key, contextMenuRecognizer, OBJC_ASSOCIATION_RETAIN_NONATOMIC); } - - if (@available(iOS 13, *)) { - fragment = @"com.apple.UIKit.clickPresentationFailure"; - systemContextMenuRecognizer = - GestureRecognizerWithDescriptionFragment(fragment, webView); - if (systemContextMenuRecognizer) { - [systemContextMenuRecognizer - requireGestureRecognizerToFail:contextMenuRecognizer]; - } - } } } // namespace @@ -232,7 +226,13 @@ initWithTarget:self action:@selector(longPressDetectedByGestureRecognizer:)]; - [_contextMenuRecognizer setMinimumPressDuration:kLongPressDurationSeconds]; + if (@available(iOS 13, *)) { + [_contextMenuRecognizer + setMinimumPressDuration:kLongPressDurationSecondsIOS13]; + } else { + [_contextMenuRecognizer + setMinimumPressDuration:kLongPressDurationSeconds]; + } [_contextMenuRecognizer setAllowableMovement:kLongPressMoveDeltaPixels]; [_contextMenuRecognizer setDelegate:self]; [_webView addGestureRecognizer:_contextMenuRecognizer];
diff --git a/ios/web/web_state/ui/wk_web_view_configuration_provider.mm b/ios/web/web_state/ui/wk_web_view_configuration_provider.mm index a9b1a0c..0d1196f4 100644 --- a/ios/web/web_state/ui/wk_web_view_configuration_provider.mm +++ b/ios/web/web_state/ui/wk_web_view_configuration_provider.mm
@@ -107,6 +107,18 @@ [configuration_ setIgnoresViewportScaleLimits:YES]; } + if (@available(iOS 13, *)) { + @try { + // Disable system context menu on iOS 13 and later. Disabling + // "longPressActions" prevents the WKWebView ContextMenu from being + // displayed. + // https://github.com/WebKit/webkit/blob/1233effdb7826a5f03b3cdc0f67d713741e70976/Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm#L307 + [configuration_ setValue:@NO forKey:@"longPressActionsEnabled"]; + } @catch (NSException* exception) { + NOTREACHED() << "Error setting value for longPressActionsEnabled"; + } + } + [configuration_ setAllowsInlineMediaPlayback:YES]; // setJavaScriptCanOpenWindowsAutomatically is required to support popups. [[configuration_ preferences] setJavaScriptCanOpenWindowsAutomatically:YES];
diff --git a/ios/web_view/internal/autofill/cwv_autofill_controller_unittest.mm b/ios/web_view/internal/autofill/cwv_autofill_controller_unittest.mm index 23d7cda7..1da1f43f 100644 --- a/ios/web_view/internal/autofill/cwv_autofill_controller_unittest.mm +++ b/ios/web_view/internal/autofill/cwv_autofill_controller_unittest.mm
@@ -55,7 +55,9 @@ class CWVAutofillControllerTest : public TestWithLocaleAndResources { protected: - CWVAutofillControllerTest() : browser_state_(/*off_the_record=*/false) { + CWVAutofillControllerTest() + : web_thread_bundle_(web::TestWebThreadBundle::IO_MAINLOOP), + browser_state_(/*off_the_record=*/false) { web::SetWebClient(&web_client_); test_web_state_.SetBrowserState(&browser_state_); @@ -104,8 +106,7 @@ }; // Tests CWVAutofillController fetch suggestions. -// TODO(crbug.com/990938): Flaky test -TEST_F(CWVAutofillControllerTest, DISABLED_FetchSuggestions) { +TEST_F(CWVAutofillControllerTest, FetchSuggestions) { FormSuggestion* suggestion = [FormSuggestion suggestionWithValue:kTestFieldValue displayDescription:nil
diff --git a/ipc/ipc_channel_mojo.cc b/ipc/ipc_channel_mojo.cc index fc33968..8cfe044 100644 --- a/ipc/ipc_channel_mojo.cc +++ b/ipc/ipc_channel_mojo.cc
@@ -116,10 +116,7 @@ Listener* listener, const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, const scoped_refptr<base::SingleThreadTaskRunner>& proxy_task_runner) - : task_runner_(ipc_task_runner), - pipe_(handle.get()), - listener_(listener), - weak_factory_(this) { + : task_runner_(ipc_task_runner), pipe_(handle.get()), listener_(listener) { weak_ptr_ = weak_factory_.GetWeakPtr(); bootstrap_ = MojoBootstrap::Create(std::move(handle), mode, ipc_task_runner, proxy_task_runner);
diff --git a/ipc/ipc_channel_mojo.h b/ipc/ipc_channel_mojo.h index ba769f8..3445708 100644 --- a/ipc/ipc_channel_mojo.h +++ b/ipc/ipc_channel_mojo.h
@@ -133,7 +133,7 @@ std::map<std::string, GenericAssociatedInterfaceFactory> associated_interfaces_; - base::WeakPtrFactory<ChannelMojo> weak_factory_; + base::WeakPtrFactory<ChannelMojo> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ChannelMojo); };
diff --git a/jingle/glue/network_service_config_test_util.cc b/jingle/glue/network_service_config_test_util.cc index a34b2f1..89c5892 100644 --- a/jingle/glue/network_service_config_test_util.cc +++ b/jingle/glue/network_service_config_test_util.cc
@@ -19,8 +19,7 @@ NetworkServiceConfigTestUtil::NetworkServiceConfigTestUtil( scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) - : url_request_context_getter_(std::move(url_request_context_getter)), - weak_ptr_factory_(this) { + : url_request_context_getter_(std::move(url_request_context_getter)) { net_runner_ = url_request_context_getter_->GetNetworkTaskRunner(); mojo_runner_ = base::SequencedTaskRunnerHandle::Get(); if (net_runner_->BelongsToCurrentThread()) { @@ -46,8 +45,7 @@ NetworkContextGetter network_context_getter) : net_runner_(base::CreateSingleThreadTaskRunner({base::ThreadPool()})), mojo_runner_(base::SequencedTaskRunnerHandle::Get()), - network_context_getter_(network_context_getter), - weak_ptr_factory_(this) {} + network_context_getter_(network_context_getter) {} NetworkServiceConfigTestUtil::~NetworkServiceConfigTestUtil() { if (!net_runner_->BelongsToCurrentThread()) {
diff --git a/jingle/glue/network_service_config_test_util.h b/jingle/glue/network_service_config_test_util.h index 57d79a8..192c84e 100644 --- a/jingle/glue/network_service_config_test_util.h +++ b/jingle/glue/network_service_config_test_util.h
@@ -70,8 +70,8 @@ network_context_; // lives on |net_runner_| network::mojom::NetworkContextPtr network_context_ptr_; // lives on |mojo_runner_| - base::WeakPtrFactory<NetworkServiceConfigTestUtil> - weak_ptr_factory_; // lives on |mojo_runner_| + base::WeakPtrFactory<NetworkServiceConfigTestUtil> weak_ptr_factory_{ + this}; // lives on |mojo_runner_| }; } // namespace jingle_glue
diff --git a/jingle/glue/task_pump.cc b/jingle/glue/task_pump.cc index ff154ce..74cdab79 100644 --- a/jingle/glue/task_pump.cc +++ b/jingle/glue/task_pump.cc
@@ -10,11 +10,7 @@ namespace jingle_glue { -TaskPump::TaskPump() - : posted_wake_(false), - stopped_(false), - weak_factory_(this) { -} +TaskPump::TaskPump() : posted_wake_(false), stopped_(false) {} TaskPump::~TaskPump() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/jingle/glue/task_pump.h b/jingle/glue/task_pump.h index 59aa20c..4eefcf2 100644 --- a/jingle/glue/task_pump.h +++ b/jingle/glue/task_pump.h
@@ -37,7 +37,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<TaskPump> weak_factory_; + base::WeakPtrFactory<TaskPump> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TaskPump); };
diff --git a/jingle/glue/thread_wrapper.cc b/jingle/glue/thread_wrapper.cc index 68204ab..f047e3b 100644 --- a/jingle/glue/thread_wrapper.cc +++ b/jingle/glue/thread_wrapper.cc
@@ -71,8 +71,7 @@ send_allowed_(false), last_task_id_(0), pending_send_event_(base::WaitableEvent::ResetPolicy::MANUAL, - base::WaitableEvent::InitialState::NOT_SIGNALED), - weak_ptr_factory_(this) { + base::WaitableEvent::InitialState::NOT_SIGNALED) { DCHECK(task_runner->BelongsToCurrentThread()); DCHECK(!rtc::Thread::Current()); weak_ptr_ = weak_ptr_factory_.GetWeakPtr();
diff --git a/jingle/glue/thread_wrapper.h b/jingle/glue/thread_wrapper.h index 5468884..e4a891a 100644 --- a/jingle/glue/thread_wrapper.h +++ b/jingle/glue/thread_wrapper.h
@@ -137,7 +137,7 @@ base::WaitableEvent pending_send_event_; base::WeakPtr<JingleThreadWrapper> weak_ptr_; - base::WeakPtrFactory<JingleThreadWrapper> weak_ptr_factory_; + base::WeakPtrFactory<JingleThreadWrapper> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(JingleThreadWrapper); };
diff --git a/jingle/notifier/base/weak_xmpp_client.cc b/jingle/notifier/base/weak_xmpp_client.cc index 1d360de..49986dc1 100644 --- a/jingle/notifier/base/weak_xmpp_client.cc +++ b/jingle/notifier/base/weak_xmpp_client.cc
@@ -9,8 +9,7 @@ namespace notifier { WeakXmppClient::WeakXmppClient(jingle_xmpp::TaskParent* parent) - : jingle_xmpp::XmppClient(parent), - weak_ptr_factory_(this) {} + : jingle_xmpp::XmppClient(parent) {} WeakXmppClient::~WeakXmppClient() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/jingle/notifier/base/weak_xmpp_client.h b/jingle/notifier/base/weak_xmpp_client.h index 209efa5..d685ff3 100644 --- a/jingle/notifier/base/weak_xmpp_client.h +++ b/jingle/notifier/base/weak_xmpp_client.h
@@ -48,7 +48,7 @@ // We use our own WeakPtrFactory instead of inheriting from // SupportsWeakPtr since we want to invalidate in other places // besides the destructor. - base::WeakPtrFactory<WeakXmppClient> weak_ptr_factory_; + base::WeakPtrFactory<WeakXmppClient> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WeakXmppClient); };
diff --git a/jingle/notifier/listener/non_blocking_push_client.cc b/jingle/notifier/listener/non_blocking_push_client.cc index db4a8a7..322e014 100644 --- a/jingle/notifier/listener/non_blocking_push_client.cc +++ b/jingle/notifier/listener/non_blocking_push_client.cc
@@ -156,8 +156,7 @@ const scoped_refptr<base::SingleThreadTaskRunner>& delegate_task_runner, const CreateBlockingPushClientCallback& create_blocking_push_client_callback) - : delegate_task_runner_(delegate_task_runner), - weak_ptr_factory_(this) { + : delegate_task_runner_(delegate_task_runner) { core_ = new Core(delegate_task_runner_, weak_ptr_factory_.GetWeakPtr()); delegate_task_runner_->PostTask( FROM_HERE,
diff --git a/jingle/notifier/listener/non_blocking_push_client.h b/jingle/notifier/listener/non_blocking_push_client.h index b2543aa..0ccd04b9 100644 --- a/jingle/notifier/listener/non_blocking_push_client.h +++ b/jingle/notifier/listener/non_blocking_push_client.h
@@ -67,7 +67,7 @@ base::ObserverList<PushClientObserver>::Unchecked observers_; - base::WeakPtrFactory<NonBlockingPushClient> weak_ptr_factory_; + base::WeakPtrFactory<NonBlockingPushClient> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(NonBlockingPushClient); };
diff --git a/media/filters/fuchsia/fuchsia_video_decoder.cc b/media/filters/fuchsia/fuchsia_video_decoder.cc index 6e8f58f..de64a4e9 100644 --- a/media/filters/fuchsia/fuchsia_video_decoder.cc +++ b/media/filters/fuchsia/fuchsia_video_decoder.cc
@@ -9,6 +9,7 @@ #include <zircon/rights.h> #include "base/bind.h" +#include "base/bits.h" #include "base/callback_helpers.h" #include "base/fuchsia/fuchsia_logging.h" #include "base/fuchsia/service_directory_client.h" @@ -17,6 +18,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "base/process/process_metrics.h" #include "base/threading/sequenced_task_runner_handle.h" #include "media/base/bind_to_current_loop.h" #include "media/base/cdm_context.h" @@ -162,15 +164,50 @@ class InputBuffer { public: - InputBuffer() = default; + InputBuffer() {} - ~InputBuffer() { CallDecodeCallbackIfAny(DecodeStatus::ABORTED); } + ~InputBuffer() { + if (base_address_) { + size_t mapped_bytes = + base::bits::Align(offset_ + size_, base::GetPageSize()); + zx_status_t status = zx::vmar::root_self()->unmap( + reinterpret_cast<uintptr_t>(base_address_), mapped_bytes); + ZX_DCHECK(status == ZX_OK, status) << "zx_vmar_unmap"; + } - bool Initialize(const fuchsia::media::StreamBufferConstraints& constraints) { - return buffer_.Initialize(constraints); + CallDecodeCallbackIfAny(DecodeStatus::ABORTED); } - CodecBuffer& buffer() { return buffer_; } + InputBuffer(InputBuffer&&) = default; + InputBuffer& operator=(InputBuffer&&) = default; + + bool Initialize(zx::vmo vmo, + size_t offset, + size_t size, + fuchsia::sysmem::CoherencyDomain coherency_domain) { + DCHECK(!base_address_); + DCHECK(vmo); + + // zx_vmo_write() doesn't work for sysmem-allocated VMOs (see ZX-4854), so + // the VMOs have to be mapped. + size_t bytes_to_map = base::bits::Align(offset + size, base::GetPageSize()); + uintptr_t addr; + zx_status_t status = zx::vmar::root_self()->map( + /*vmar_offset=*/0, vmo, /*vmo_offset=*/0, bytes_to_map, + ZX_VM_PERM_READ | ZX_VM_PERM_WRITE, &addr); + if (status != ZX_OK) { + ZX_DLOG(ERROR, status) << "zx_vmar_map"; + return false; + } + + base_address_ = reinterpret_cast<uint8_t*>(addr); + offset_ = offset; + size_ = size; + coherency_domain_ = coherency_domain; + + return true; + } + bool is_used() const { return is_used_; } // Copies as much data as possible from |pending_decode| to this input buffer. @@ -178,12 +215,15 @@ DCHECK(!is_used_); is_used_ = true; - size_t bytes_to_fill = - std::min(buffer_.size(), pending_decode->bytes_left()); + size_t bytes_to_fill = std::min(size_, pending_decode->bytes_left()); + memcpy(base_address_ + offset_, pending_decode->data(), bytes_to_fill); - zx_status_t status = - buffer_.vmo().write(pending_decode->data(), 0, bytes_to_fill); - ZX_CHECK(status == ZX_OK, status) << "zx_vmo_write"; + // Flush CPU cache if the codec reads from RAM. + if (coherency_domain_ == fuchsia::sysmem::CoherencyDomain::RAM) { + zx_status_t status = zx_cache_flush(base_address_ + offset_, + bytes_to_fill, ZX_CACHE_FLUSH_DATA); + ZX_DCHECK(status == ZX_OK, status) << "zx_cache_flush"; + } pending_decode->AdvanceCurrentPos(bytes_to_fill); @@ -208,7 +248,12 @@ } private: - CodecBuffer buffer_; + uint8_t* base_address_ = nullptr; + + // Buffer settings provided by sysmem. + size_t offset_ = 0; + size_t size_ = 0; + fuchsia::sysmem::CoherencyDomain coherency_domain_; // Set to true when this buffer is being used by the codec. bool is_used_ = false; @@ -216,8 +261,6 @@ // Decode callback for the DecodeBuffer of which this InputBuffer is a part. // This is only set on the final InputBuffer in each DecodeBuffer. VideoDecoder::DecodeCB decode_cb_; - - DISALLOW_COPY_AND_ASSIGN(InputBuffer); }; // Output buffer used to pass decoded frames from the decoder. Ref-counted @@ -311,8 +354,15 @@ void OnError(); // Called by OnInputConstraints() to initialize input buffers. - bool InitializeInputBuffers( - fuchsia::media::StreamBufferConstraints constraints); + void InitializeInputBufferCollection( + fuchsia::media::StreamBufferConstraints constraints, + fuchsia::sysmem::BufferCollectionTokenPtr sysmem_token); + + // Callback for BufferCollection::WaitForBuffersAllocated() when initializing + // input buffer collection. + void OnInputBuffersAllocated( + zx_status_t status, + fuchsia::sysmem::BufferCollectionInfo_2 buffer_collection_info); // Pumps |pending_decodes_| to the decoder. void PumpInput(); @@ -335,6 +385,7 @@ float container_pixel_aspect_ratio_ = 1.0; fuchsia::media::StreamProcessorPtr codec_; + fuchsia::sysmem::AllocatorPtr sysmem_allocator_; uint64_t stream_lifetime_ordinal_ = 1; @@ -342,11 +393,14 @@ // stream_lifetime_ordinal_. bool active_stream_ = false; + // Input buffers. std::list<PendingDecode> pending_decodes_; uint64_t input_buffer_lifetime_ordinal_ = 1; + fuchsia::sysmem::BufferCollectionPtr input_buffers_collection_; std::vector<InputBuffer> input_buffers_; int num_used_input_buffers_ = 0; + // Output buffers. fuchsia::media::VideoUncompressedFormat output_format_; uint64_t output_buffer_lifetime_ordinal_ = 1; std::vector<scoped_refptr<OutputBuffer>> output_buffers_; @@ -403,6 +457,15 @@ output_cb_ = output_cb; container_pixel_aspect_ratio_ = config.GetPixelAspectRatio(); + sysmem_allocator_ = base::fuchsia::ServiceDirectoryClient::ForCurrentProcess() + ->ConnectToService<fuchsia::sysmem::Allocator>(); + sysmem_allocator_.set_error_handler([](zx_status_t status) { + // Just log a warning. We will handle BufferCollection the failure when + // trying to create a new BufferCollection. + ZX_DLOG(WARNING, status) + << "The fuchsia.sysmem.Allocator channel was terminated."; + }); + fuchsia::mediacodec::CreateDecoder_Params codec_params; codec_params.mutable_input_details()->set_format_details_version_ordinal(0); @@ -524,14 +587,51 @@ } void FuchsiaVideoDecoder::OnInputConstraints( - fuchsia::media::StreamBufferConstraints input_constraints) { - if (!InitializeInputBuffers(std::move(input_constraints))) { - DLOG(ERROR) << "Failed to initialize input buffers."; + fuchsia::media::StreamBufferConstraints constraints) { + // Buffer lifetime ordinal is an odd number incremented by 2 for each buffer + // generation as required by StreamProcessor. + input_buffer_lifetime_ordinal_ += 2; + + if (!constraints.has_default_settings() || + !constraints.default_settings().has_packet_count_for_server() || + !constraints.default_settings().has_packet_count_for_client()) { + DLOG(ERROR) << "Received InitializeInputBufferCollection() with missing " + "required fields."; OnError(); return; } - PumpInput(); + input_buffers_collection_.Unbind(); + input_buffers_.clear(); + + // Create a new sysmem buffer collection token for the output buffers. + fuchsia::sysmem::BufferCollectionTokenPtr collection_token; + sysmem_allocator_->AllocateSharedCollection(collection_token.NewRequest()); + + // Create collection token for the codec. + fuchsia::sysmem::BufferCollectionTokenPtr collection_token_for_codec; + collection_token->Duplicate(ZX_RIGHT_SAME_RIGHTS, + collection_token_for_codec.NewRequest()); + + // Convert the token to a BufferCollection connection. + sysmem_allocator_->BindSharedCollection( + std::move(collection_token), input_buffers_collection_.NewRequest()); + input_buffers_collection_.set_error_handler( + [this](zx_status_t status) { + ZX_LOG(ERROR, status) + << "The fuchsia.sysmem.BufferCollection channel was terminated."; + OnError(); + }); + + // BufferCollection needs to be synchronized to ensure that all token + // duplicate requests have been processed and sysmem knows about all clients + // that will be using this buffer collection. + input_buffers_collection_->Sync([this, constraints = std::move(constraints), + collection_token_for_codec = std::move( + collection_token_for_codec)]() mutable { + InitializeInputBufferCollection(std::move(constraints), + std::move(collection_token_for_codec)); + }); } void FuchsiaVideoDecoder::OnFreeInputPacket( @@ -775,6 +875,7 @@ pending_decodes_.clear(); + input_buffers_collection_.Unbind(); num_used_input_buffers_ = 0; input_buffers_.clear(); @@ -782,44 +883,69 @@ output_buffers_.clear(); } -bool FuchsiaVideoDecoder::InitializeInputBuffers( - fuchsia::media::StreamBufferConstraints constraints) { - input_buffer_lifetime_ordinal_ += 2; - - if (!constraints.has_default_settings() || - !constraints.default_settings().has_packet_count_for_server() || - !constraints.default_settings().has_packet_count_for_client()) { - DLOG(ERROR) - << "Received InitializeInputBuffers() with missing required fields."; - OnError(); - return false; - } - - auto settings = fidl::Clone(constraints.default_settings()); +void FuchsiaVideoDecoder::InitializeInputBufferCollection( + fuchsia::media::StreamBufferConstraints constraints, + fuchsia::sysmem::BufferCollectionTokenPtr sysmem_token) { + fuchsia::media::StreamBufferPartialSettings settings; settings.set_buffer_lifetime_ordinal(input_buffer_lifetime_ordinal_); - codec_->SetInputBufferSettings(fidl::Clone(settings)); + settings.set_buffer_constraints_version_ordinal( + constraints.buffer_constraints_version_ordinal()); + settings.set_single_buffer_mode(false); + settings.set_packet_count_for_server( + constraints.default_settings().packet_count_for_server()); + settings.set_packet_count_for_client( + constraints.default_settings().packet_count_for_client()); + settings.set_sysmem_token(std::move(sysmem_token)); + codec_->SetInputBufferPartialSettings(std::move(settings)); - int total_buffers = - settings.packet_count_for_server() + settings.packet_count_for_client(); - std::vector<InputBuffer> new_buffers(total_buffers); + fuchsia::sysmem::BufferCollectionConstraints buffer_constraints; - for (int i = 0; i < total_buffers; ++i) { - fuchsia::media::StreamBuffer codec_buffer; + // Currently we have to map buffers VMOs to write to them (see ZX-4854) and + // memory cannot be mapped as write-only (see ZX-4872), so request RW access + // even though we will never need to read from these buffers. + buffer_constraints.usage.cpu = + fuchsia::sysmem::cpuUsageRead | fuchsia::sysmem::cpuUsageWrite; - if (!new_buffers[i].Initialize(constraints) || - !new_buffers[i].buffer().ToFidlCodecBuffer( - input_buffer_lifetime_ordinal_, i, /*read_only=*/true, - &codec_buffer)) { - return false; - } + buffer_constraints.min_buffer_count_for_camping = + settings.packet_count_for_client(); + buffer_constraints.has_buffer_memory_constraints = true; + buffer_constraints.buffer_memory_constraints.min_size_bytes = + constraints.has_per_packet_buffer_bytes_recommended(); + buffer_constraints.buffer_memory_constraints.ram_domain_supported = true; + buffer_constraints.buffer_memory_constraints.cpu_domain_supported = true; + input_buffers_collection_->SetConstraints( + /*has_constraints=*/true, std::move(buffer_constraints)); - codec_->AddInputBuffer(std::move(codec_buffer)); + input_buffers_collection_->WaitForBuffersAllocated( + fit::bind_member(this, &FuchsiaVideoDecoder::OnInputBuffersAllocated)); +} + +void FuchsiaVideoDecoder::OnInputBuffersAllocated( + zx_status_t status, + fuchsia::sysmem::BufferCollectionInfo_2 buffer_collection_info) { + if (status != ZX_OK) { + ZX_DLOG(ERROR, status) << "Failed to allocate buffer collection for input."; + OnError(); + return; } + std::vector<InputBuffer> new_buffers; + new_buffers.resize(buffer_collection_info.buffer_count); + fuchsia::sysmem::BufferMemorySettings& settings = + buffer_collection_info.settings.buffer_settings; + for (size_t i = 0; i < buffer_collection_info.buffer_count; ++i) { + fuchsia::sysmem::VmoBuffer& buffer = buffer_collection_info.buffers[i]; + if (!new_buffers[i].Initialize(std::move(buffer.vmo), + buffer.vmo_usable_start, settings.size_bytes, + settings.coherency_domain)) { + OnError(); + return; + } + } num_used_input_buffers_ = 0; input_buffers_ = std::move(new_buffers); - return true; + PumpInput(); } void FuchsiaVideoDecoder::PumpInput() {
diff --git a/media/gpu/vaapi/BUILD.gn b/media/gpu/vaapi/BUILD.gn index 975c0af7..ecaa728 100644 --- a/media/gpu/vaapi/BUILD.gn +++ b/media/gpu/vaapi/BUILD.gn
@@ -97,6 +97,10 @@ "//ui/gfx/geometry", ] + public_deps = [ + "//skia", + ] + if (is_chromeos) { sources += [ "vaapi_jpeg_encode_accelerator.cc",
diff --git a/media/gpu/vaapi/vaapi_image_decode_accelerator_worker.cc b/media/gpu/vaapi/vaapi_image_decode_accelerator_worker.cc index 3d402ce3..2c08aa0 100644 --- a/media/gpu/vaapi/vaapi_image_decode_accelerator_worker.cc +++ b/media/gpu/vaapi/vaapi_image_decode_accelerator_worker.cc
@@ -111,6 +111,7 @@ result->visible_size = exported_pixmap->pixmap->GetBufferSize(); result->buffer_format = exported_pixmap->pixmap->GetBufferFormat(); result->buffer_byte_size = exported_pixmap->byte_size; + result->yuv_color_space = decoder->GetYUVColorSpace(); std::move(scoped_decode_callback).Run(std::move(result)); }
diff --git a/media/gpu/vaapi/vaapi_image_decode_accelerator_worker_unittest.cc b/media/gpu/vaapi/vaapi_image_decode_accelerator_worker_unittest.cc index 7a26781..d9af91e0 100644 --- a/media/gpu/vaapi/vaapi_image_decode_accelerator_worker_unittest.cc +++ b/media/gpu/vaapi/vaapi_image_decode_accelerator_worker_unittest.cc
@@ -15,6 +15,7 @@ #include "base/bind.h" #include "base/containers/span.h" +#include "base/logging.h" #include "base/macros.h" #include "base/memory/ptr_util.h" #include "base/memory/scoped_refptr.h" @@ -24,6 +25,7 @@ #include "media/gpu/vaapi/vaapi_image_decode_accelerator_worker.h" #include "media/gpu/vaapi/vaapi_image_decoder.h" #include "media/gpu/vaapi/vaapi_wrapper.h" +#include "third_party/skia/include/core/SkImageInfo.h" #include "ui/gfx/buffer_types.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/linux/native_pixmap_dmabuf.h" @@ -92,6 +94,17 @@ ~MockVaapiImageDecoder() override = default; gpu::ImageDecodeAcceleratorType GetType() const override { return type_; } + SkYUVColorSpace GetYUVColorSpace() const override { + switch (type_) { + case gpu::ImageDecodeAcceleratorType::kJpeg: + return SkYUVColorSpace::kJPEG_SkYUVColorSpace; + case gpu::ImageDecodeAcceleratorType::kWebP: + return SkYUVColorSpace::kRec601_SkYUVColorSpace; + case gpu::ImageDecodeAcceleratorType::kUnknown: + NOTREACHED(); + return SkYUVColorSpace::kIdentity_SkYUVColorSpace; + } + } gpu::ImageDecodeAcceleratorSupportedProfile GetSupportedProfile() const override {
diff --git a/media/gpu/vaapi/vaapi_image_decoder.h b/media/gpu/vaapi/vaapi_image_decoder.h index a62eb8c..9b8e906 100644 --- a/media/gpu/vaapi/vaapi_image_decoder.h +++ b/media/gpu/vaapi/vaapi_image_decoder.h
@@ -10,12 +10,12 @@ #include <memory> - #include "base/callback_forward.h" #include "base/containers/span.h" #include "base/macros.h" #include "base/memory/scoped_refptr.h" #include "gpu/config/gpu_info.h" +#include "third_party/skia/include/core/SkImageInfo.h" namespace gfx { class NativePixmapDmaBuf; @@ -78,6 +78,10 @@ // Returns the type of image supported by this decoder. virtual gpu::ImageDecodeAcceleratorType GetType() const = 0; + // Returns the type of mapping needed to convert the NativePixmapDmaBuf + // returned by ExportAsNativePixmapDmaBuf() from YUV to RGB. + virtual SkYUVColorSpace GetYUVColorSpace() const = 0; + // Returns the image profile supported by this decoder. virtual gpu::ImageDecodeAcceleratorSupportedProfile GetSupportedProfile() const;
diff --git a/media/gpu/vaapi/vaapi_jpeg_decoder.cc b/media/gpu/vaapi/vaapi_jpeg_decoder.cc index c533bf8..76711faf 100644 --- a/media/gpu/vaapi/vaapi_jpeg_decoder.cc +++ b/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -318,6 +318,10 @@ return gpu::ImageDecodeAcceleratorType::kJpeg; } +SkYUVColorSpace VaapiJpegDecoder::GetYUVColorSpace() const { + return SkYUVColorSpace::kJPEG_SkYUVColorSpace; +} + std::unique_ptr<ScopedVAImage> VaapiJpegDecoder::GetImage( uint32_t preferred_image_fourcc, VaapiImageDecodeStatus* status) {
diff --git a/media/gpu/vaapi/vaapi_jpeg_decoder.h b/media/gpu/vaapi/vaapi_jpeg_decoder.h index 1c74235..c7b1588 100644 --- a/media/gpu/vaapi/vaapi_jpeg_decoder.h +++ b/media/gpu/vaapi/vaapi_jpeg_decoder.h
@@ -29,6 +29,7 @@ // VaapiImageDecoder implementation. gpu::ImageDecodeAcceleratorType GetType() const override; + SkYUVColorSpace GetYUVColorSpace() const override; // Get the decoded data from the last Decode() call as a ScopedVAImage. The // VAImage's format will be either |preferred_image_fourcc| if the conversion
diff --git a/media/gpu/vaapi/vaapi_webp_decoder.cc b/media/gpu/vaapi/vaapi_webp_decoder.cc index 8b11273..fecda19 100644 --- a/media/gpu/vaapi/vaapi_webp_decoder.cc +++ b/media/gpu/vaapi/vaapi_webp_decoder.cc
@@ -84,6 +84,10 @@ return gpu::ImageDecodeAcceleratorType::kWebP; } +SkYUVColorSpace VaapiWebPDecoder::GetYUVColorSpace() const { + return SkYUVColorSpace::kRec601_SkYUVColorSpace; +} + VaapiImageDecodeStatus VaapiWebPDecoder::AllocateVASurfaceAndSubmitVABuffers( base::span<const uint8_t> encoded_image) { DCHECK(vaapi_wrapper_);
diff --git a/media/gpu/vaapi/vaapi_webp_decoder.h b/media/gpu/vaapi/vaapi_webp_decoder.h index ec0647b..9cf621e 100644 --- a/media/gpu/vaapi/vaapi_webp_decoder.h +++ b/media/gpu/vaapi/vaapi_webp_decoder.h
@@ -19,6 +19,7 @@ // VaapiImageDecoder implementation. gpu::ImageDecodeAcceleratorType GetType() const override; + SkYUVColorSpace GetYUVColorSpace() const override; private: // VaapiImageDecoder implementation.
diff --git a/media/mojo/services/watch_time_recorder.cc b/media/mojo/services/watch_time_recorder.cc index 2eaba1ef..d3e60fc 100644 --- a/media/mojo/services/watch_time_recorder.cc +++ b/media/mojo/services/watch_time_recorder.cc
@@ -43,6 +43,7 @@ kMojo = 5, // MojoVideoDecoder kDecrypting = 6, // DecryptingVideoDecoder kDav1d = 7, // Dav1dVideoDecoder + kFuchsia = 8, // FuchsiaVideoDecoder }; static AudioDecoderName ConvertAudioDecoderNameToEnum(const std::string& name) { @@ -81,6 +82,8 @@ return VideoDecoderName::kDecrypting; case 0xcd46efa0: return VideoDecoderName::kDav1d; + case 0x27b31c6a: + return VideoDecoderName::kFuchsia; default: DLOG_IF(WARNING, !name.empty()) << "Unknown decoder name encountered; metrics need updating: "
diff --git a/media/mojo/services/watch_time_recorder_unittest.cc b/media/mojo/services/watch_time_recorder_unittest.cc index 225daedc..5428599 100644 --- a/media/mojo/services/watch_time_recorder_unittest.cc +++ b/media/mojo/services/watch_time_recorder_unittest.cc
@@ -1245,7 +1245,7 @@ "FFmpegAudioDecoder", "FFmpegVideoDecoder", "GpuVideoDecoder", "MojoVideoDecoder", "MojoAudioDecoder", "VpxVideoDecoder", "AomVideoDecoder", "DecryptingAudioDecoder", "DecryptingVideoDecoder", - "Dav1dVideoDecoder"}; + "Dav1dVideoDecoder", "FuchsiaVideoDecoder"}; printf("%18s = 0\n", "None"); for (const auto& name : kDecoderNames) printf("%18s = 0x%x\n", name.c_str(), base::PersistentHash(name));
diff --git a/media/renderers/paint_canvas_video_renderer.cc b/media/renderers/paint_canvas_video_renderer.cc index 0a572e4..0494bca 100644 --- a/media/renderers/paint_canvas_video_renderer.cc +++ b/media/renderers/paint_canvas_video_renderer.cc
@@ -634,14 +634,20 @@ -SkFloatToScalar(image.height() * 0.5f)); } - // As we are using SharedImages to handle the image we are not using the skia - // internals to handle the image or the drawing in the canvas. The cache is - // modified to track the mailbox for the source texture, rather than a - // SkImage, to be able to import it into multiple contexts. Also the cached - // shared image is reused if possible (same context provider, same size) to - // reflect equivalent skia optimizations (SkImage pooling). See - // https://chromium-review.googlesource.com/c/chromium/src/+/1616978 - // todo(juanmihd) remove the above comment once we are sure this is not needed + // This is a workaround for crbug.com/524717. A texture backed image is not + // safe to access on another thread or GL context. So if we're drawing into a + // recording canvas we read the texture back into CPU memory and record that + // sw image into the SkPicture. The long term solution is for Skia to provide + // a SkPicture filter that makes a picture safe for multiple CPU raster + // threads. (skbug.com/4321). + if (canvas->imageInfo().colorType() == kUnknown_SkColorType && + image.IsTextureBacked()) { + sk_sp<SkImage> non_texture_image = + image.GetSkImage()->makeNonTextureImage(); + image = cc::PaintImageBuilder::WithProperties(image) + .set_image(std::move(non_texture_image), image.content_id()) + .TakePaintImage(); + } canvas->drawImage(image, 0, 0, &video_flags); if (need_transform)
diff --git a/media/test/data/test-25fps.h264.md5 b/media/test/data/test-25fps.h264.md5 index 98f5f97..0aab2c20 100644 --- a/media/test/data/test-25fps.h264.md5 +++ b/media/test/data/test-25fps.h264.md5
@@ -22,3 +22,5 @@ e0ae5fbb0ef06922ae13b84e001f263c # AMD - Stoney Ridge 7ad287d048d6bdee63fbe37a3cd2c760 +# ARM - AMLogic - T931 +4c183194e3596b579af75f8a04b9eaa9
diff --git a/mojo/docs/basics.md b/mojo/docs/basics.md index 7636ac4a..642b921 100644 --- a/mojo/docs/basics.md +++ b/mojo/docs/basics.md
@@ -32,7 +32,7 @@ This will generate C++ (and optionally, Java and JavaScript) interfaces. Writing code to handle IPCs is a simple matter of implementing the generated interface: -``` +```c++ class MathImpl : public math::mojom::Math { public: explicit MathImpl(mojo::PendingReceiver<math::mojom::Math> receiver) @@ -68,7 +68,7 @@ additional conventions on top of message pipes, where one endpoint is the sender/caller, represented as: -``` +```c++ // Wraps a message pipe endpoint for making remote calls. May only be used on // the sequence where the mojo::Remote was bound. mojo::Remote<math::mojom::Math> remote_math = ...; @@ -76,7 +76,7 @@ And the other endpoint is the receiving/callee, represented as: -``` +```c++ // Usually a class member. Wraps a message pipe endpoint that receives incoming // messages. Routes and dispatches IPCs to the handler—typically |this|—on the // sequence where the mojo::Receiver was bound. @@ -97,7 +97,7 @@ `mojo::PendingReceiver<T>` for the receiver/callee to bind to a `mojo::Receiver<T>`. -``` +```c++ mojo::Remote<math::mojom::Math> remote_math; // BindNewPipeAndPassReceiver() returns a @@ -118,7 +118,8 @@ retained for itself to receive IPCs, and the other endpoint is returned as an unbound `mojo::PendingRemote<T>` for the sender/callee to bind to a `mojo::Remote<T>`. -``` + +```c++ class MathImpl : public math::mojom::MathImpl { // ...addition to the previous MathImpl definition... @@ -143,7 +144,7 @@ version: this allows either endpoint to be passed between sequences in the same process or even between processes over IPC. -``` +```c++ mojo::Remote<math::mojom::MathImpl> remote = ...; // |pending_remote| is movable and may be passed around. While unbound, the // endpoint cannot be used to send IPCs. The pending remote may be passed to @@ -152,7 +153,7 @@ mojo::PendingRemote<math::mojom::MathImpl> pending_remote = remote.Unbind(); ``` -``` +```c++ mojo::Receiver<math::mojom::MathImpl> receiver = ...; // |pending_receiver| is movable and may be passed around. While unbound, // received IPCs are buffered and not processed. The pending receiver may be
diff --git a/mojo/public/cpp/bindings/associated_remote.h b/mojo/public/cpp/bindings/associated_remote.h index 1feadc1..5b86569 100644 --- a/mojo/public/cpp/bindings/associated_remote.h +++ b/mojo/public/cpp/bindings/associated_remote.h
@@ -78,6 +78,7 @@ // Shorthand form of |get()|. See above. typename Interface::Proxy_* operator->() const { return get(); } + typename Interface::Proxy_& operator*() const { return *get(); } // Indicates whether this AssociatedRemote is bound and thus can issue // Interface method calls via the above accessors.
diff --git a/mojo/public/cpp/bindings/interface_ptr_set.h b/mojo/public/cpp/bindings/interface_ptr_set.h index faf91ad..c782e15 100644 --- a/mojo/public/cpp/bindings/interface_ptr_set.h +++ b/mojo/public/cpp/bindings/interface_ptr_set.h
@@ -89,8 +89,7 @@ private: class Element { public: - explicit Element(Ptr<Interface> ptr) - : ptr_(std::move(ptr)), weak_ptr_factory_(this) { + explicit Element(Ptr<Interface> ptr) : ptr_(std::move(ptr)) { ptr_.set_connection_error_handler(base::Bind(&DeleteElement, this)); } @@ -118,7 +117,7 @@ static void DeleteElement(Element* element) { delete element; } Ptr<Interface> ptr_; - base::WeakPtrFactory<Element> weak_ptr_factory_; + base::WeakPtrFactory<Element> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Element); };
diff --git a/mojo/public/cpp/bindings/pending_receiver.h b/mojo/public/cpp/bindings/pending_receiver.h index bffc6e9..3940eef 100644 --- a/mojo/public/cpp/bindings/pending_receiver.h +++ b/mojo/public/cpp/bindings/pending_receiver.h
@@ -49,7 +49,9 @@ // Temporary implicit move constructor to aid in converting from use of // InterfaceRequest<Interface> to PendingReceiver. PendingReceiver(InterfaceRequest<Interface>&& request) - : PendingReceiver(request.PassMessagePipe()) {} + : PendingReceiver(request.PassMessagePipe()) { + set_connection_group(request.PassConnectionGroupRef()); + } // Constructs a valid PendingReceiver from a valid raw message pipe handle. explicit PendingReceiver(ScopedMessagePipeHandle pipe) @@ -62,7 +64,9 @@ // Temporary implicit conversion operator to InterfaceRequest<Interface> to // aid in converting usage to PendingReceiver. operator InterfaceRequest<Interface>() { - return InterfaceRequest<Interface>(PassPipe()); + InterfaceRequest<Interface> request(PassPipe()); + request.set_connection_group(PassConnectionGroupRef()); + return request; } // Indicates whether the PendingReceiver is valid, meaning it can ne used to
diff --git a/mojo/public/cpp/bindings/remote.h b/mojo/public/cpp/bindings/remote.h index 60744438..a36d2882 100644 --- a/mojo/public/cpp/bindings/remote.h +++ b/mojo/public/cpp/bindings/remote.h
@@ -99,6 +99,7 @@ // Shorthand form of |get()|. See above. typename Interface::Proxy_* operator->() const { return get(); } + typename Interface::Proxy_& operator*() const { return *get(); } // Indicates whether this Remote is bound and thus can issue Interface method // calls via the above accessors.
diff --git a/mojo/public/cpp/bindings/strong_associated_binding.h b/mojo/public/cpp/bindings/strong_associated_binding.h index f017956..f734772 100644 --- a/mojo/public/cpp/bindings/strong_associated_binding.h +++ b/mojo/public/cpp/bindings/strong_associated_binding.h
@@ -96,8 +96,7 @@ AssociatedInterfaceRequest<Interface> request, scoped_refptr<base::SequencedTaskRunner> task_runner) : impl_(std::move(impl)), - binding_(impl_.get(), std::move(request), std::move(task_runner)), - weak_factory_(this) { + binding_(impl_.get(), std::move(request), std::move(task_runner)) { binding_.set_connection_error_with_reason_handler(base::Bind( &StrongAssociatedBinding::OnConnectionError, base::Unretained(this))); } @@ -119,7 +118,7 @@ base::OnceClosure connection_error_handler_; ConnectionErrorWithReasonCallback connection_error_with_reason_handler_; AssociatedBinding<Interface> binding_; - base::WeakPtrFactory<StrongAssociatedBinding> weak_factory_; + base::WeakPtrFactory<StrongAssociatedBinding> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(StrongAssociatedBinding); };
diff --git a/mojo/public/cpp/bindings/tests/BUILD.gn b/mojo/public/cpp/bindings/tests/BUILD.gn index 51e2da44..76a86ef 100644 --- a/mojo/public/cpp/bindings/tests/BUILD.gn +++ b/mojo/public/cpp/bindings/tests/BUILD.gn
@@ -20,6 +20,7 @@ "container_test_util.cc", "container_test_util.h", "data_view_unittest.cc", + "enum_headers_unittest.cc", "equals_unittest.cc", "handle_passing_unittest.cc", "hash_unittest.cc", @@ -43,6 +44,7 @@ "sample_service_unittest.cc", "serialization_warning_unittest.cc", "service_factory_unittest.cc", + "struct_headers_unittest.cc", "struct_unittest.cc", "sync_handle_registry_unittest.cc", "sync_method_unittest.cc", @@ -135,9 +137,11 @@ testonly = true sources = [ "connection_group_unittest.test-mojom", + "enum_headers_unittest.test-mojom", "idle_tracking_unittest.test-mojom", "receiver_unittest.test-mojom", "service_factory_unittest.test-mojom", + "struct_headers_unittest.test-mojom", ] public_deps = [
diff --git a/mojo/public/cpp/bindings/tests/connection_group_unittest.cc b/mojo/public/cpp/bindings/tests/connection_group_unittest.cc index 9710886b..fcba7cf 100644 --- a/mojo/public/cpp/bindings/tests/connection_group_unittest.cc +++ b/mojo/public/cpp/bindings/tests/connection_group_unittest.cc
@@ -234,6 +234,25 @@ ptr->BindRequest(MakeRequest(&ptr2)); ptr2.FlushForTesting(); EXPECT_EQ(1u, group->GetNumRefsForTesting()); + + // Also verify that implicit conversion between PendingReceiver and + // InterfaceRequest retains the connection group reference. First we set up + // a new PendingReceiver holding a strong ConnectionGroup ref. + ref = ConnectionGroup::Create(base::DoNothing(), nullptr); + group = ref.GetGroupForTesting(); + mojo::Remote<mojom::TestInterface> remote; + auto receiver = remote.BindNewPipeAndPassReceiver(); + receiver.set_connection_group(ref); + EXPECT_EQ(1u, group->GetNumRefsForTesting()); + + // Now verify implicit conversion both to and from the InterfaceRequest type. + request = std::move(receiver); + receiver.reset(); + EXPECT_EQ(1u, group->GetNumRefsForTesting()); + + receiver = std::move(request); + request = {}; + EXPECT_EQ(1u, group->GetNumRefsForTesting()); } INSTANTIATE_MOJO_BINDINGS_TEST_SUITE_P(ConnectionGroupBindingsTest);
diff --git a/mojo/public/cpp/bindings/tests/enum_headers_unittest.cc b/mojo/public/cpp/bindings/tests/enum_headers_unittest.cc new file mode 100644 index 0000000..673214a --- /dev/null +++ b/mojo/public/cpp/bindings/tests/enum_headers_unittest.cc
@@ -0,0 +1,30 @@ +// Copyright 2019 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 "mojo/public/cpp/bindings/tests/enum_headers_unittest.test-mojom.h" + +// This file contains compile-time assertions about the mojo C++ bindings +// generator to ensure it does not transitively include unnecessary headers. +// It just checks a few common ones - the list doesn't have to be exhaustive. +// +// If this file won't compile, check module.h.tmpl and related .tmpl files. + +#ifndef MOJO_PUBLIC_CPP_BINDINGS_ENUM_TRAITS_H_ +#error Mojo header guards changed, tests below are invalid. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ +#error interface_ptr.h should not be included by the generated header \ + for a mojom containing only an enum. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_ +#error associated_interface_ptr.h should not be included by the generated \ + header for a mojom containing only an enum. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ +#error interface_request.h should not be included by the generated header \ + for a mojom containing only an enum. +#endif
diff --git a/chromeos/services/cellular_setup/public/mojom/constants.mojom b/mojo/public/cpp/bindings/tests/enum_headers_unittest.test-mojom similarity index 65% copy from chromeos/services/cellular_setup/public/mojom/constants.mojom copy to mojo/public/cpp/bindings/tests/enum_headers_unittest.test-mojom index 2f9f321..db3029b 100644 --- a/chromeos/services/cellular_setup/public/mojom/constants.mojom +++ b/mojo/public/cpp/bindings/tests/enum_headers_unittest.test-mojom
@@ -2,6 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module chromeos.cellular_setup.mojom; +module mojo.test.enum_headers_unittest.mojom; -const string kServiceName = "cellular_setup"; +enum Foo { + kBar, + kBaz +};
diff --git a/mojo/public/cpp/bindings/tests/struct_headers_unittest.cc b/mojo/public/cpp/bindings/tests/struct_headers_unittest.cc new file mode 100644 index 0000000..1f8dbec --- /dev/null +++ b/mojo/public/cpp/bindings/tests/struct_headers_unittest.cc
@@ -0,0 +1,30 @@ +// Copyright 2019 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 "mojo/public/cpp/bindings/tests/struct_headers_unittest.test-mojom.h" + +// This file contains compile-time assertions about the mojo C++ bindings +// generator to ensure it does not transitively include unnecessary headers. +// It just checks a few common ones - the list doesn't have to be exhaustive. +// +// If this file won't compile, check module.h.tmpl and related .tmpl files. + +#ifndef MOJO_PUBLIC_CPP_BINDINGS_STRUCT_TRAITS_H_ +#error Mojo header guards changed, tests below are invalid. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_PTR_H_ +#error interface_ptr.h should not be included by the generated header \ + for a mojom containing only a struct. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_ASSOCIATED_INTERFACE_PTR_H_ +#error associated_interface_ptr.h should not be included by the generated \ + header for a mojom containing only a struct. +#endif + +#ifdef MOJO_PUBLIC_CPP_BINDINGS_INTERFACE_REQUEST_H_ +#error interface_request.h should not be included by the generated header \ + for a mojom containing only a struct. +#endif
diff --git a/chromeos/services/cellular_setup/public/mojom/constants.mojom b/mojo/public/cpp/bindings/tests/struct_headers_unittest.test-mojom similarity index 65% rename from chromeos/services/cellular_setup/public/mojom/constants.mojom rename to mojo/public/cpp/bindings/tests/struct_headers_unittest.test-mojom index 2f9f321..d13ab266 100644 --- a/chromeos/services/cellular_setup/public/mojom/constants.mojom +++ b/mojo/public/cpp/bindings/tests/struct_headers_unittest.test-mojom
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module chromeos.cellular_setup.mojom; +module mojo.test.struct_headers_unittest.mojom; -const string kServiceName = "cellular_setup"; +struct Foo { + int32 bar; +};
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl index e935bff..4b006ec 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/module-shared.h.tmpl
@@ -56,7 +56,8 @@ #include "{{import.path}}-shared.h" {%- endfor %} -{% if not disallow_interfaces -%} +{#- Avoid transitive includes of interface headers if possible. #} +{% if not disallow_interfaces and uses_interfaces -%} #include "mojo/public/cpp/bindings/lib/interface_serialization.h" {%- endif %}
diff --git a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl index 28b8a6f..be15f0b4 100644 --- a/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl +++ b/mojo/public/tools/bindings/generators/cpp_templates/module.h.tmpl
@@ -101,7 +101,7 @@ #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" {%- endif %} -{% if not disallow_interfaces -%} +{% if not disallow_interfaces and uses_interfaces -%} #include "mojo/public/cpp/bindings/associated_interface_ptr.h" #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" #include "mojo/public/cpp/bindings/associated_interface_request.h"
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py index fb6e0827b..59cad33 100644 --- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py +++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -273,6 +273,17 @@ headers.update(typemap.get("public_headers", [])) return sorted(headers) + def _ReferencesAnyHandleOrInterfaceType(self): + """Returns whether this module uses interfaces directly or indirectly. + + When false, the generated headers do not need to include interface_ptr.h + and similar. + """ + if len(self.module.interfaces) > 0: + return True + return any(map(mojom.ContainsHandlesOrInterfaces, + self.module.structs + self.module.unions)) + def _GetDirectlyUsedKinds(self): for struct in self.module.structs + self.module.unions: for field in struct.fields: @@ -310,6 +321,7 @@ "structs": self.module.structs, "support_lazy_serialization": self.support_lazy_serialization, "unions": self.module.unions, + "uses_interfaces": self._ReferencesAnyHandleOrInterfaceType(), "variant": self.variant, }
diff --git a/net/cert/internal/ocsp.cc b/net/cert/internal/ocsp.cc index d10d1ac..8266ea9 100644 --- a/net/cert/internal/ocsp.cc +++ b/net/cert/internal/ocsp.cc
@@ -728,12 +728,12 @@ return result; } -} // namespace - OCSPRevocationStatus CheckOCSP( base::StringPiece raw_response, base::StringPiece certificate_der, + const ParsedCertificate* certificate, base::StringPiece issuer_certificate_der, + const ParsedCertificate* issuer_certificate, const base::Time& verify_time, const base::TimeDelta& max_age, OCSPVerifyResult::ResponseStatus* response_details) { @@ -781,10 +781,16 @@ return OCSPRevocationStatus::UNKNOWN; } - scoped_refptr<ParsedCertificate> certificate = - OCSPParseCertificate(certificate_der); - scoped_refptr<ParsedCertificate> issuer_certificate = - OCSPParseCertificate(issuer_certificate_der); + scoped_refptr<ParsedCertificate> parsed_certificate; + scoped_refptr<ParsedCertificate> parsed_issuer_certificate; + if (!certificate) { + parsed_certificate = OCSPParseCertificate(certificate_der); + certificate = parsed_certificate.get(); + } + if (!issuer_certificate) { + parsed_issuer_certificate = OCSPParseCertificate(issuer_certificate_der); + issuer_certificate = parsed_issuer_certificate.get(); + } if (!certificate || !issuer_certificate) { *response_details = OCSPVerifyResult::NOT_CHECKED; @@ -801,9 +807,9 @@ // Look through all of the OCSPSingleResponses for a match (based on CertID // and time). - OCSPRevocationStatus status = GetRevocationStatusForCert( - response_data, certificate.get(), issuer_certificate.get(), verify_time, - max_age, response_details); + OCSPRevocationStatus status = + GetRevocationStatusForCert(response_data, certificate, issuer_certificate, + verify_time, max_age, response_details); // TODO(eroman): Process the OCSP extensions. In particular, must reject if // there are any critical extensions that are not understood. @@ -812,13 +818,39 @@ // signed directly by the issuing certificate, or a valid authorized // responder. if (!VerifyOCSPResponseSignature(response, response_data, - issuer_certificate.get())) { + issuer_certificate)) { return OCSPRevocationStatus::UNKNOWN; } return status; } +} // namespace + +OCSPRevocationStatus CheckOCSP( + base::StringPiece raw_response, + base::StringPiece certificate_der, + base::StringPiece issuer_certificate_der, + const base::Time& verify_time, + const base::TimeDelta& max_age, + OCSPVerifyResult::ResponseStatus* response_details) { + return CheckOCSP(raw_response, certificate_der, nullptr, + issuer_certificate_der, nullptr, verify_time, max_age, + response_details); +} + +OCSPRevocationStatus CheckOCSP( + base::StringPiece raw_response, + const ParsedCertificate* certificate, + const ParsedCertificate* issuer_certificate, + const base::Time& verify_time, + const base::TimeDelta& max_age, + OCSPVerifyResult::ResponseStatus* response_details) { + return CheckOCSP(raw_response, base::StringPiece(), certificate, + base::StringPiece(), issuer_certificate, verify_time, + max_age, response_details); +} + bool CreateOCSPRequest(const ParsedCertificate* cert, const ParsedCertificate* issuer, std::vector<uint8_t>* request_der) {
diff --git a/net/cert/internal/ocsp.h b/net/cert/internal/ocsp.h index 5a4dca1..f53c056 100644 --- a/net/cert/internal/ocsp.h +++ b/net/cert/internal/ocsp.h
@@ -271,7 +271,7 @@ OCSPResponse* out); // Checks the revocation status of the certificate |certificate_der| by using -// the der-encoded |raw_response|. +// the DER-encoded |raw_response|. // // Returns GOOD if the OCSP response indicates the certificate is not revoked, // REVOKED if it indicates it is revoked, or UNKNOWN for all other cases. @@ -295,6 +295,19 @@ const base::TimeDelta& max_age, OCSPVerifyResult::ResponseStatus* response_details) WARN_UNUSED_RESULT; +// Checks the revocation status of |certificate| by using the DER-encoded +// |raw_response|. +// +// Arguments are the same as above, except that it takes already parsed +// instances of the certificate and issuer certificate. +NET_EXPORT OCSPRevocationStatus CheckOCSP( + base::StringPiece raw_response, + const ParsedCertificate* certificate, + const ParsedCertificate* issuer_certificate, + const base::Time& verify_time, + const base::TimeDelta& max_age, + OCSPVerifyResult::ResponseStatus* response_details) WARN_UNUSED_RESULT; + // Creates a DER-encoded OCSPRequest for |cert|. The request is fairly basic: // * No signature // * No requestorName
diff --git a/net/cert/internal/revocation_checker.cc b/net/cert/internal/revocation_checker.cc index 1cc8f161..db98b640 100644 --- a/net/cert/internal/revocation_checker.cc +++ b/net/cert/internal/revocation_checker.cc
@@ -47,12 +47,9 @@ // Check using stapled OCSP, if available. if (!stapled_ocsp_response.empty() && issuer_cert) { - // TODO(eroman): CheckOCSP() re-parses the certificates, perhaps just pass - // ParsedCertificate into it. OCSPVerifyResult::ResponseStatus response_details; OCSPRevocationStatus ocsp_status = - CheckOCSP(stapled_ocsp_response, cert->der_cert().AsStringPiece(), - issuer_cert->der_cert().AsStringPiece(), base::Time::Now(), + CheckOCSP(stapled_ocsp_response, cert, issuer_cert, base::Time::Now(), max_age, &response_details); // TODO(eroman): Save the stapled OCSP response to cache. @@ -135,9 +132,7 @@ base::StringPiece( reinterpret_cast<const char*>(ocsp_response_bytes.data()), ocsp_response_bytes.size()), - cert->der_cert().AsStringPiece(), - issuer_cert->der_cert().AsStringPiece(), base::Time::Now(), max_age, - &response_details); + cert, issuer_cert, base::Time::Now(), max_age, &response_details); switch (ocsp_status) { case OCSPRevocationStatus::REVOKED:
diff --git a/net/cert_net/nss_ocsp.cc b/net/cert_net/nss_ocsp.cc index 826d297f..0c8d346 100644 --- a/net/cert_net/nss_ocsp.cc +++ b/net/cert_net/nss_ocsp.cc
@@ -24,7 +24,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/metrics/histogram_macros.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h"
diff --git a/net/dns/dns_reloader.cc b/net/dns/dns_reloader.cc index 03e248c9..952cff4 100644 --- a/net/dns/dns_reloader.cc +++ b/net/dns/dns_reloader.cc
@@ -12,7 +12,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/synchronization/lock.h" #include "base/threading/thread_local.h" #include "net/base/network_change_notifier.h"
diff --git a/net/http/http_auth_controller.cc b/net/http/http_auth_controller.cc index 9f7923b..2442e7b 100644 --- a/net/http/http_auth_controller.cc +++ b/net/http/http_auth_controller.cc
@@ -141,12 +141,14 @@ const GURL& auth_url, HttpAuthCache* http_auth_cache, HttpAuthHandlerFactory* http_auth_handler_factory, - HostResolver* host_resolver) + HostResolver* host_resolver, + HttpAuthPreferences::DefaultCredentials allow_default_credentials) : target_(target), auth_url_(auth_url), auth_origin_(auth_url.GetOrigin()), auth_path_(auth_url.path()), embedded_identity_used_(false), + allow_default_credentials_(allow_default_credentials), default_credentials_used_(false), http_auth_cache_(http_auth_cache), http_auth_handler_factory_(http_auth_handler_factory), @@ -528,12 +530,17 @@ return true; } - // Use default credentials (single sign on) if this is the first attempt - // at identity. Do not allow multiple times as it will infinite loop. - // We use default credentials after checking the auth cache so that if - // single sign-on doesn't work, we won't try default credentials for future - // transactions. - if (!default_credentials_used_ && handler_->AllowsDefaultCredentials()) { + // Use default credentials (single sign-on) if they're allowed and this is the + // first attempt at using an identity. Do not allow multiple times as it will + // infinite loop. We use default credentials after checking the auth cache so + // that if single sign-on doesn't work, we won't try default credentials for + // future transactions. + if (!default_credentials_used_ && handler_->AllowsDefaultCredentials() && + // TODO(https://crbug.com/458508): Refactor |AllowsDefaultCredentials| + // to internally process |allow_default_credentials_| once it is + // passed along with the other |HttpAuthPreferences|. + allow_default_credentials_ == + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS) { identity_.source = HttpAuth::IDENT_SRC_DEFAULT_CREDENTIALS; identity_.invalid = false; default_credentials_used_ = true;
diff --git a/net/http/http_auth_controller.h b/net/http/http_auth_controller.h index e868520..414554f 100644 --- a/net/http/http_auth_controller.h +++ b/net/http/http_auth_controller.h
@@ -15,6 +15,7 @@ #include "net/base/completion_once_callback.h" #include "net/base/net_export.h" #include "net/http/http_auth.h" +#include "net/http/http_auth_preferences.h" #include "net/log/net_log_with_source.h" #include "url/gurl.h" @@ -74,11 +75,16 @@ // * |host_resolver| is used for determining the canonical hostname given a // possibly non-canonical host name. Name canonicalization is used for // NTLM and Negotiate HTTP authentication schemes. - HttpAuthController(HttpAuth::Target target, - const GURL& auth_url, - HttpAuthCache* http_auth_cache, - HttpAuthHandlerFactory* http_auth_handler_factory, - HostResolver* host_resolver); + // + // * |allow_default_credentials| is used for determining if the current + // context allows ambient authentication using default credentials. + HttpAuthController( + HttpAuth::Target target, + const GURL& auth_url, + HttpAuthCache* http_auth_cache, + HttpAuthHandlerFactory* http_auth_handler_factory, + HostResolver* host_resolver, + HttpAuthPreferences::DefaultCredentials allow_default_credentials); // Generate an authentication token for |target| if necessary. The return // value is a net error code. |OK| will be returned both in the case that @@ -213,6 +219,13 @@ // preventing an infinite auth restart loop. bool embedded_identity_used_; + // If the current context allows ambient authentication using default + // credentials. + // TODO(https://crbug.com/458508): Refactor |allow_default_credentials_| + // to be passed along with the other |HttpAuthPreferences|, rather then being + // passed directly to |HttpAuthController|. + HttpAuthPreferences::DefaultCredentials allow_default_credentials_; + // True if default credentials have already been tried for this transaction // in response to an HTTP authentication challenge. bool default_credentials_used_;
diff --git a/net/http/http_auth_controller_unittest.cc b/net/http/http_auth_controller_unittest.cc index 90fa3a8c..db47310 100644 --- a/net/http/http_auth_controller_unittest.cc +++ b/net/http/http_auth_controller_unittest.cc
@@ -77,7 +77,8 @@ scoped_refptr<HttpAuthController> controller(new HttpAuthController( HttpAuth::AUTH_PROXY, GURL("http://example.com"), &dummy_auth_cache, - &auth_handler_factory, host_resolver.get())); + &auth_handler_factory, host_resolver.get(), + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS)); SSLInfo null_ssl_info; ASSERT_EQ(OK, controller->HandleAuthChallenge(headers, null_ssl_info, false, false, net_log)); @@ -259,7 +260,8 @@ scoped_refptr<HttpAuthController> controller(new HttpAuthController( HttpAuth::AUTH_SERVER, GURL("http://example.com"), &dummy_auth_cache, - &auth_handler_factory, host_resolver.get())); + &auth_handler_factory, host_resolver.get(), + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS)); SSLInfo null_ssl_info; ASSERT_EQ(OK, controller->HandleAuthChallenge(headers, null_ssl_info, false, false, dummy_log));
diff --git a/net/http/http_auth_preferences.h b/net/http/http_auth_preferences.h index 8f44323..8045bdd6 100644 --- a/net/http/http_auth_preferences.h +++ b/net/http/http_auth_preferences.h
@@ -24,6 +24,13 @@ // them accessible from the IO thread. class NET_EXPORT HttpAuthPreferences { public: + // |DefaultCredentials| influences the behavior of codepaths that use + // IdentitySource::IDENT_SRC_DEFAULT_CREDENTIALS in |HttpAuthController| + enum DefaultCredentials { + DISALLOW_DEFAULT_CREDENTIALS = 0, + ALLOW_DEFAULT_CREDENTIALS = 1, + }; + HttpAuthPreferences(); virtual ~HttpAuthPreferences();
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc index ada5de2..d32f251 100644 --- a/net/http/http_cache_transaction.cc +++ b/net/http/http_cache_transaction.cc
@@ -195,6 +195,8 @@ HttpCache::Transaction::~Transaction() { TRACE_EVENT0("io", "HttpCacheTransaction::~Transaction"); + RecordHistograms(); + // We may have to issue another IO, but we should never invoke the callback_ // after this point. callback_.Reset(); @@ -628,8 +630,6 @@ } void HttpCache::Transaction::WriterAboutToBeRemovedFromEntry(int result) { - RecordHistograms(); - // Since the transaction can no longer access the network transaction, save // all network related info now. if (moved_network_transaction_to_writers_ && @@ -3127,11 +3127,6 @@ if (!entry_) return; - // For a writer, histograms will be recorded in - // WriterAboutToBeRemovedFromEntry. - if (!InWriters()) - RecordHistograms(); - cache_->DoneWithEntry(entry_, this, entry_is_complete, partial_ != nullptr); entry_ = nullptr; mode_ = NONE; // switch to 'pass through' mode @@ -3230,8 +3225,11 @@ // WRITE + Doom + STATE_INIT_ENTRY == STATE_CREATE_ENTRY (without an attempt // to Doom the entry again). - mode_ = WRITE; ResetPartialState(!range_requested_); + + // Change mode to WRITE after ResetPartialState as that may have changed the + // mode to NONE. + mode_ = WRITE; TransitionToState(STATE_CREATE_ENTRY); return OK; }
diff --git a/net/http/http_cache_unittest.cc b/net/http/http_cache_unittest.cc index 8d4f37b..22dc870 100644 --- a/net/http/http_cache_unittest.cc +++ b/net/http/http_cache_unittest.cc
@@ -1590,6 +1590,50 @@ } } +// Tests that when a range request transaction becomes a writer for the first +// range and then fails conditionalization for the next range and decides to +// doom the entry, then there should not be a dcheck assertion hit. +TEST_F(HttpCacheTest, RangeGET_OverlappingRangesCouldntConditionalize) { + MockHttpCache cache; + + { + ScopedMockTransaction transaction_pre(kRangeGET_TransactionOK); + transaction_pre.request_headers = "Range: bytes = 10-19\r\n" EXTRA_HEADER; + transaction_pre.data = "rg: 10-19 "; + MockHttpRequest request_pre(transaction_pre); + + HttpResponseInfo response_pre; + RunTransactionTestWithRequest(cache.http_cache(), transaction_pre, + request_pre, &response_pre); + ASSERT_TRUE(response_pre.headers != nullptr); + EXPECT_EQ(206, response_pre.headers->response_code()); + EXPECT_EQ(1, cache.network_layer()->transaction_count()); + EXPECT_EQ(0, cache.disk_cache()->open_count()); + EXPECT_EQ(1, cache.disk_cache()->create_count()); + } + + { + // First range skips validation because the response is fresh while the + // second range requires validation since that range is not present in the + // cache and during validation it fails conditionalization. + cache.FailConditionalizations(); + ScopedMockTransaction transaction_pre(kRangeGET_TransactionOK); + transaction_pre.request_headers = "Range: bytes = 10-29\r\n" EXTRA_HEADER; + + // TODO(crbug.com/992521): Fix this scenario to not return the cached bytes + // repeatedly. + transaction_pre.data = "rg: 10-19 rg: 10-19 rg: 20-29 "; + MockHttpRequest request_pre(transaction_pre); + HttpResponseInfo response_pre; + RunTransactionTestWithRequest(cache.http_cache(), transaction_pre, + request_pre, &response_pre); + ASSERT_TRUE(response_pre.headers != nullptr); + EXPECT_EQ(2, cache.network_layer()->transaction_count()); + EXPECT_EQ(1, cache.disk_cache()->open_count()); + EXPECT_EQ(2, cache.disk_cache()->create_count()); + } +} + TEST_F(HttpCacheTest, RangeGET_FullAfterPartialReuse) { MockHttpCache cache; @@ -2027,6 +2071,7 @@ EXPECT_EQ(1, cache.disk_cache()->open_count()); EXPECT_EQ(1, cache.disk_cache()->create_count()); + context_list.clear(); histograms.ExpectBucketCount( histogram_name, static_cast<int>(HttpCache::PARALLEL_WRITING_NOT_JOIN_RANGE), 1); @@ -3395,6 +3440,7 @@ EXPECT_EQ(0, cache.disk_cache()->open_count()); EXPECT_EQ(1, cache.disk_cache()->create_count()); + context_list.clear(); histograms.ExpectBucketCount( histogram_name, static_cast<int>(HttpCache::PARALLEL_WRITING_NOT_JOIN_METHOD_NOT_GET), 1); @@ -3484,6 +3530,7 @@ } // Verify metrics. + context_list.clear(); histograms.ExpectBucketCount( histogram_name, static_cast<int>(HttpCache::PARALLEL_WRITING_CREATE), 1); histograms.ExpectBucketCount( @@ -3564,6 +3611,7 @@ EXPECT_EQ(kNumTransactions, cache.network_layer()->transaction_count()); // Verify metrics. + context_list.clear(); histograms.ExpectBucketCount( histogram_name, static_cast<int>(HttpCache::PARALLEL_WRITING_CREATE), 1); histograms.ExpectBucketCount(
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h index 75c7d13..e37b5eb 100644 --- a/net/http/http_network_session.h +++ b/net/http/http_network_session.h
@@ -27,6 +27,7 @@ #include "net/base/host_port_pair.h" #include "net/base/net_export.h" #include "net/http/http_auth_cache.h" +#include "net/http/http_auth_preferences.h" #include "net/http/http_stream_factory.h" #include "net/net_buildflags.h" #include "net/quic/quic_stream_factory.h" @@ -147,6 +148,10 @@ // If true, idle sockets won't be closed when memory pressure happens. bool disable_idle_sockets_close_on_memory_pressure; + + // If authentication APIs that support ambient authentication are allowed + // to use the default credentials. + HttpAuthPreferences::DefaultCredentials allow_default_credentials; }; // Structure with pointers to the dependencies of the HttpNetworkSession.
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc index c453a8d..be26b28 100644 --- a/net/http/http_network_transaction.cc +++ b/net/http/http_network_transaction.cc
@@ -884,7 +884,8 @@ if (!auth_controllers_[target].get()) auth_controllers_[target] = new HttpAuthController( target, AuthURL(target), session_->http_auth_cache(), - session_->http_auth_handler_factory(), session_->host_resolver()); + session_->http_auth_handler_factory(), session_->host_resolver(), + session_->params().allow_default_credentials); return auth_controllers_[target]->MaybeGenerateAuthToken(request_, io_callback_, net_log_); @@ -903,7 +904,8 @@ if (!auth_controllers_[target].get()) { auth_controllers_[target] = new HttpAuthController( target, AuthURL(target), session_->http_auth_cache(), - session_->http_auth_handler_factory(), session_->host_resolver()); + session_->http_auth_handler_factory(), session_->host_resolver(), + session_->params().allow_default_credentials); if (request_->load_flags & LOAD_DO_NOT_USE_EMBEDDED_IDENTITY) auth_controllers_[target]->DisableEmbeddedIdentity(); }
diff --git a/net/http/http_proxy_client_socket_fuzzer.cc b/net/http/http_proxy_client_socket_fuzzer.cc index 45c36cc..d77473b 100644 --- a/net/http/http_proxy_client_socket_fuzzer.cc +++ b/net/http/http_proxy_client_socket_fuzzer.cc
@@ -20,6 +20,7 @@ #include "net/http/http_auth_handler_basic.h" #include "net/http/http_auth_handler_digest.h" #include "net/http/http_auth_handler_factory.h" +#include "net/http/http_auth_preferences.h" #include "net/http/http_auth_scheme.h" #include "net/log/test_net_log.h" #include "net/socket/fuzzed_socket.h" @@ -53,9 +54,10 @@ net::kDigestAuthScheme, new net::HttpAuthHandlerDigest::Factory()); scoped_refptr<net::HttpAuthController> auth_controller( - new net::HttpAuthController(net::HttpAuth::AUTH_PROXY, - GURL("http://proxy:42/"), &auth_cache, - &auth_handler_factory, nullptr)); + new net::HttpAuthController( + net::HttpAuth::AUTH_PROXY, GURL("http://proxy:42/"), &auth_cache, + &auth_handler_factory, nullptr, + net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS)); // Determine if the HttpProxyClientSocket should be told the underlying socket // is HTTPS. net::HttpProxyClientSocket socket(
diff --git a/net/http/http_proxy_connect_job.cc b/net/http/http_proxy_connect_job.cc index 30ccddd..6ee20a1 100644 --- a/net/http/http_proxy_connect_job.cc +++ b/net/http/http_proxy_connect_job.cc
@@ -187,7 +187,8 @@ GetDestination().ToString()), common_connect_job_params->http_auth_cache, common_connect_job_params->http_auth_handler_factory, - host_resolver()) + host_resolver(), + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS) : nullptr) {} HttpProxyConnectJob::~HttpProxyConnectJob() {}
diff --git a/net/http/http_server_properties.cc b/net/http/http_server_properties.cc index dc2c93d..28728e1 100644 --- a/net/http/http_server_properties.cc +++ b/net/http/http_server_properties.cc
@@ -34,6 +34,24 @@ HttpServerProperties::PrefDelegate::~PrefDelegate() = default; +HttpServerProperties::ServerInfo::ServerInfo() = default; +HttpServerProperties::ServerInfo::ServerInfo(const ServerInfo& server_info) = + default; +HttpServerProperties::ServerInfo::ServerInfo(ServerInfo&& server_info) = + default; +HttpServerProperties::ServerInfo::~ServerInfo() = default; + +HttpServerProperties::ServerInfoMap::ServerInfoMap() + : base::MRUCache<url::SchemeHostPort, ServerInfo>(kMaxServerInfoEntries) {} + +HttpServerProperties::ServerInfoMap::iterator +HttpServerProperties::ServerInfoMap::GetOrPut(const url::SchemeHostPort& key) { + auto it = Get(key); + if (it != end()) + return it; + return Put(key, ServerInfo()); +} + HttpServerProperties::HttpServerProperties( std::unique_ptr<PrefDelegate> pref_delegate, NetLog* net_log, @@ -79,7 +97,7 @@ void HttpServerProperties::Clear(base::OnceClosure callback) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - spdy_servers_map_.Clear(); + server_info_map_.Clear(); alternative_service_map_.Clear(); broken_alternative_services_.Clear(); canonical_alt_svc_map_.clear(); @@ -129,33 +147,25 @@ if (server.host().empty()) return false; - auto spdy_server = spdy_servers_map_.Get(server.Serialize()); - return spdy_server != spdy_servers_map_.end() && spdy_server->second; + auto spdy_info = server_info_map_.Get(server); + return spdy_info != server_info_map_.end() && + spdy_info->second.supports_spdy.value_or(false); } void HttpServerProperties::SetSupportsSpdy(const url::SchemeHostPort& server, - bool support_spdy) { + bool supports_spdy) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (server.host().empty()) return; - auto spdy_server = spdy_servers_map_.Get(server.Serialize()); - if ((spdy_server != spdy_servers_map_.end()) && - (spdy_server->second == support_spdy)) { - return; - } + auto server_info = server_info_map_.GetOrPut(server); + // If value is already the same as |supports_spdy|, or value is unset and + // |supports_spdy| is false, don't queue a write. + bool queue_write = + server_info->second.supports_spdy.value_or(false) != supports_spdy; + server_info->second.supports_spdy = supports_spdy; - // If |supports_spdy| is false, and the server doesn't appear in the map, add - // the server to the map, but don't call MaybeQueueWriteProperties(). - // - // TODO(mmenke): Can lack of SPDY support always be represented by not being - // in the cache instead? GetSupportsSpdy() does not distinguish between - // missing entries and entries that affirmatively do not support SPDY. - bool changed = !(spdy_server == spdy_servers_map_.end() && !support_spdy); - - // Cache the data. - spdy_servers_map_.Put(server.Serialize(), support_spdy); - if (changed) + if (queue_write) MaybeQueueWriteProperties(); } @@ -749,7 +759,7 @@ } void HttpServerProperties::OnPrefsLoaded( - std::unique_ptr<SpdyServersMap> spdy_servers_map, + std::unique_ptr<ServerInfoMap> server_info_map, std::unique_ptr<AlternativeServiceMap> alternative_service_map, std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map, const IPAddress& last_quic_address, @@ -764,8 +774,8 @@ // Either all of these are nullptr, or none of them are (except the broken alt // service fields). - if (spdy_servers_map) { - OnSpdyServersLoaded(std::move(spdy_servers_map)); + if (server_info_map) { + OnServerInfoLoaded(std::move(server_info_map)); OnAlternativeServiceServersLoaded(std::move(alternative_service_map)); OnServerNetworkStatsLoaded(std::move(server_network_stats_map)); OnSupportsQuicLoaded(last_quic_address); @@ -788,20 +798,28 @@ } } -void HttpServerProperties::OnSpdyServersLoaded( - std::unique_ptr<SpdyServersMap> spdy_servers_map) { +void HttpServerProperties::OnServerInfoLoaded( + std::unique_ptr<ServerInfoMap> server_info_map) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); - // Add the entries from persisted data. - spdy_servers_map_.Swap(*spdy_servers_map); + // Swap in the entries from persisted data. This allows the MRU cache to be + // sorted based on the order of the entries in the newer in-memory cache. + server_info_map_.Swap(*server_info_map); // Add the entries from the memory cache. - for (auto it = spdy_servers_map->rbegin(); it != spdy_servers_map->rend(); + for (auto it = server_info_map->rbegin(); it != server_info_map->rend(); ++it) { - // Add the entry if it is not in the cache, otherwise move it to the front - // of recency list. - if (spdy_servers_map_.Get(it->first) == spdy_servers_map_.end()) - spdy_servers_map_.Put(it->first, it->second); + // If there's no corresponding old entry, add the new entry directly. + auto old_entry = server_info_map_.Get(it->first); + if (old_entry == server_info_map_.end()) { + server_info_map_.Put(it->first, std::move(it->second)); + continue; + } + + // Otherwise, merge the old and new entries. Prefer values from older + // entries. + if (!old_entry->second.supports_spdy.has_value()) + old_entry->second.supports_spdy = it->second.supports_spdy; } } @@ -940,7 +958,7 @@ DCHECK(!prefs_update_timer_.IsRunning()); properties_manager_->WriteToPrefs( - spdy_servers_map_, alternative_service_map_, + server_info_map_, alternative_service_map_, base::BindRepeating(&HttpServerProperties::GetCanonicalSuffix, base::Unretained(this)), server_network_stats_map_, last_quic_address_, quic_server_info_map_,
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h index 7657e4f8..47c4e89f 100644 --- a/net/http/http_server_properties.h +++ b/net/http/http_server_properties.h
@@ -19,6 +19,7 @@ #include "base/containers/mru_cache.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "base/optional.h" #include "base/threading/thread_checker.h" #include "base/time/time.h" #include "base/timer/timer.h" @@ -81,9 +82,6 @@ typedef std::vector<AlternativeService> AlternativeServiceVector; typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector; -// Store at most 300 MRU SupportsSpdyServerHostPortPairs in memory and disk. -const int kMaxSupportsSpdyServerEntries = 300; - // Store at most 200 MRU AlternateProtocolHostPortPairs in memory and disk. const int kMaxAlternateProtocolEntries = 200; @@ -98,14 +96,6 @@ // Store at most 5 MRU QUIC servers by default. This is mainly used by cronet. const int kDefaultMaxQuicServerEntries = 5; -// Stores flattened representation of servers (scheme, host, port) and whether -// or not they support SPDY. -class SpdyServersMap : public base::MRUCache<std::string, bool> { - public: - SpdyServersMap() - : base::MRUCache<std::string, bool>(kMaxSupportsSpdyServerEntries) {} -}; - class AlternativeServiceMap : public base::MRUCache<url::SchemeHostPort, AlternativeServiceInfoVector> { public: @@ -136,6 +126,9 @@ class NET_EXPORT HttpServerProperties : public BrokenAlternativeServices::Delegate { public: + // Store at most 500 MRU ServerInfos in memory and disk. + static const int kMaxServerInfoEntries = 500; + // Provides an interface to interact with persistent preferences storage // implemented by the embedder. The prefs are assumed not to have been loaded // before HttpServerPropertiesManager construction. @@ -160,6 +153,44 @@ virtual void WaitForPrefLoad(base::OnceClosure pref_loaded_callback) = 0; }; + // Contains metadata about a particular server. + struct NET_EXPORT ServerInfo { + ServerInfo(); + ServerInfo(const ServerInfo& server_info); + ServerInfo(ServerInfo&& server_info); + ~ServerInfo(); + + // IMPORTANT: When adding a field here, be sure to update + // HttpServerProperties::OnServerInfoLoaded() as well as + // HttpServerPropertiesManager to correctly load/save the from/to the pref + // store. + + // Whether or not a server is known to support H2/SPDY. False indicates + // known lack of support, true indicates known support, and not set + // indicates unknown. The difference between false and not set only matters + // when loading from disk, when an initialized false value will take + // priority over a not set value. + base::Optional<bool> supports_spdy; + + // TODO(mmenke): Add a base::Optional<AlternativeServiceInfoVector> and + // base::Optional<ServerNetworkStats>, and probably other per-server data as + // well (Http11ServerHostPortSet, QUIC server info). + }; + + class NET_EXPORT ServerInfoMap + : public base::MRUCache<url::SchemeHostPort, ServerInfo> { + public: + ServerInfoMap(); + + // If there's an entry corresponding to |key|, brings that entry to the + // front and returns an iterator to it. Otherwise, inserts an empty + // ServerInfo using |key|, and returns an iterator to it. + iterator GetOrPut(const url::SchemeHostPort& key); + + private: + DISALLOW_COPY_AND_ASSIGN(ServerInfoMap); + }; + // If a |pref_delegate| is specified, it will be used to read/write the // properties to a pref file. Writes are rate limited to improve performance. // @@ -193,7 +224,7 @@ // Add |server| into the persistent store. Should only be called from IO // thread. - void SetSupportsSpdy(const url::SchemeHostPort& server, bool support_spdy); + void SetSupportsSpdy(const url::SchemeHostPort& server, bool supports_spdy); // Returns true if |server| has required HTTP/1.1 via HTTP/2 error code. bool RequiresHTTP11(const HostPortPair& server); @@ -324,9 +355,9 @@ // Test-only routines that call the methods used to load the specified // field(s) from a prefs file. Unlike OnPrefsLoaded(), these may be invoked // multiple times. - void OnSpdyServersLoadedForTesting( - std::unique_ptr<SpdyServersMap> spdy_servers_map) { - OnSpdyServersLoaded(std::move(spdy_servers_map)); + void OnServerInfoLoadedForTesting( + std::unique_ptr<ServerInfoMap> server_info_map) { + OnServerInfoLoaded(std::move(server_info_map)); } void OnAlternativeServiceServersLoadedForTesting( std::unique_ptr<AlternativeServiceMap> alternate_protocol_servers) { @@ -358,8 +389,8 @@ return GetCanonicalSuffix(host); } - const SpdyServersMap& spdy_servers_map_for_testing() const { - return spdy_servers_map_; + const ServerInfoMap& server_info_map_for_testing() const { + return server_info_map_; } // TODO(mmenke): Look into removing this. @@ -407,7 +438,7 @@ const std::string* GetCanonicalSuffix(const std::string& host) const; void OnPrefsLoaded( - std::unique_ptr<SpdyServersMap> spdy_servers_map, + std::unique_ptr<ServerInfoMap> server_info_map, std::unique_ptr<AlternativeServiceMap> alternative_service_map, std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map, const IPAddress& last_quic_address, @@ -420,7 +451,7 @@ // These methods are called by OnPrefsLoaded to handle merging properties // loaded from prefs with what has been learned while waiting for prefs to // load. - void OnSpdyServersLoaded(std::unique_ptr<SpdyServersMap> spdy_servers_map); + void OnServerInfoLoaded(std::unique_ptr<ServerInfoMap> server_info_map); void OnAlternativeServiceServersLoaded( std::unique_ptr<AlternativeServiceMap> alternate_protocol_servers); void OnServerNetworkStatsLoaded( @@ -458,7 +489,7 @@ // Used to load/save properties from/to preferences. May be nullptr. std::unique_ptr<HttpServerPropertiesManager> properties_manager_; - SpdyServersMap spdy_servers_map_; + ServerInfoMap server_info_map_; Http11ServerHostPortSet http11_servers_; AlternativeServiceMap alternative_service_map_;
diff --git a/net/http/http_server_properties_manager.cc b/net/http/http_server_properties_manager.cc index 4f42ecb..fc9b755 100644 --- a/net/http/http_server_properties_manager.cc +++ b/net/http/http_server_properties_manager.cc
@@ -68,6 +68,9 @@ // A local or temporary data structure to hold preferences for a server. // This is used only in UpdatePrefs. +// +// TODO(mmenke): Replace this with HttpServerProperties::ServerInfo, once it +// contains all the relevant data. struct ServerPref { bool supports_spdy = false; AlternativeServiceInfoVector alternative_service_info_vector; @@ -128,7 +131,7 @@ } void HttpServerPropertiesManager::ReadPrefs( - std::unique_ptr<SpdyServersMap>* spdy_servers_map, + std::unique_ptr<HttpServerProperties::ServerInfoMap>* server_info_map, std::unique_ptr<AlternativeServiceMap>* alternative_service_map, std::unique_ptr<ServerNetworkStatsMap>* server_network_stats_map, IPAddress* last_quic_address, @@ -181,7 +184,7 @@ ReadSupportsQuic(*http_server_properties_dict, last_quic_address); - *spdy_servers_map = std::make_unique<SpdyServersMap>(); + *server_info_map = std::make_unique<HttpServerProperties::ServerInfoMap>(); *alternative_service_map = std::make_unique<AlternativeServiceMap>(); *server_network_stats_map = std::make_unique<ServerNetworkStatsMap>(); *quic_server_info_map = std::make_unique<QuicServerInfoMap>( @@ -196,7 +199,7 @@ DVLOG(1) << "Malformed http_server_properties for servers dictionary."; continue; } - AddServersData(*servers_dict, spdy_servers_map->get(), + AddServersData(*servers_dict, server_info_map->get(), alternative_service_map->get(), server_network_stats_map->get()); } @@ -232,8 +235,9 @@ // Set the properties loaded from prefs on |http_server_properties_impl_|. - UMA_HISTOGRAM_COUNTS_1M("Net.CountOfSpdyServers", - (*spdy_servers_map)->size()); + // TODO(mmenke): Rename this once more information is stored in this map. + UMA_HISTOGRAM_COUNTS_1M("Net.HttpServerProperties.CountOfServers", + (*server_info_map)->size()); // Update the cached data and use the new alternative service list from // preferences. @@ -316,7 +320,7 @@ void HttpServerPropertiesManager::AddServersData( const base::DictionaryValue& servers_dict, - SpdyServersMap* spdy_servers_map, + HttpServerProperties::ServerInfoMap* server_info_map, AlternativeServiceMap* alternative_service_map, ServerNetworkStatsMap* network_stats_map) { for (base::DictionaryValue::Iterator it(servers_dict); !it.IsAtEnd(); @@ -337,10 +341,11 @@ } // Get if server supports Spdy. - bool supports_spdy = false; - if (server_pref_dict->GetBoolean(kSupportsSpdyKey, &supports_spdy) && - supports_spdy) { - spdy_servers_map->Put(spdy_server.Serialize(), supports_spdy); + bool supports_spdy; + if (server_pref_dict->GetBoolean(kSupportsSpdyKey, &supports_spdy)) { + HttpServerProperties::ServerInfo server_info; + server_info.supports_spdy = supports_spdy; + server_info_map->Put(spdy_server, std::move(server_info)); } if (AddToAlternativeServiceMap(spdy_server, *server_pref_dict, @@ -589,7 +594,7 @@ } void HttpServerPropertiesManager::WriteToPrefs( - const SpdyServersMap& spdy_servers_map, + const HttpServerProperties::ServerInfoMap& server_info_map, const AlternativeServiceMap& alternative_service_map, const GetCannonicalSuffix& get_canonical_suffix, const ServerNetworkStatsMap& server_network_stats_map, @@ -609,14 +614,12 @@ ServerPrefMap server_pref_map(ServerPrefMap::NO_AUTO_EVICT); // Add SPDY servers to |server_pref_map|. - for (auto it = spdy_servers_map.rbegin(); it != spdy_servers_map.rend(); - ++it) { + for (auto it = server_info_map.rbegin(); it != server_info_map.rend(); ++it) { // Only add servers that support SPDY. - if (!it->second) + if (!it->second.supports_spdy.value_or(false)) continue; - url::SchemeHostPort server(GURL(it->first)); - auto map_it = server_pref_map.Put(server, ServerPref()); + auto map_it = server_pref_map.Put(it->first, ServerPref()); map_it->second.supports_spdy = true; } @@ -884,7 +887,7 @@ if (!on_prefs_loaded_callback_) return; - std::unique_ptr<SpdyServersMap> spdy_servers_map; + std::unique_ptr<HttpServerProperties::ServerInfoMap> server_info_map; std::unique_ptr<AlternativeServiceMap> alternative_service_map; std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map; IPAddress last_quic_address; @@ -893,13 +896,13 @@ std::unique_ptr<RecentlyBrokenAlternativeServices> recently_broken_alternative_services; - ReadPrefs(&spdy_servers_map, &alternative_service_map, + ReadPrefs(&server_info_map, &alternative_service_map, &server_network_stats_map, &last_quic_address, &quic_server_info_map, &broken_alternative_service_list, &recently_broken_alternative_services); std::move(on_prefs_loaded_callback_) - .Run(std::move(spdy_servers_map), std::move(alternative_service_map), + .Run(std::move(server_info_map), std::move(alternative_service_map), std::move(server_network_stats_map), last_quic_address, std::move(quic_server_info_map), std::move(broken_alternative_service_list),
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h index 11d3d86..d6495b4 100644 --- a/net/http/http_server_properties_manager.h +++ b/net/http/http_server_properties_manager.h
@@ -41,7 +41,7 @@ // |broken_alternative_service_list| and // |recently_broken_alternative_services|, which may be null. using OnPrefsLoadedCallback = base::OnceCallback<void( - std::unique_ptr<SpdyServersMap> spdy_servers_map, + std::unique_ptr<HttpServerProperties::ServerInfoMap> server_info_map, std::unique_ptr<AlternativeServiceMap> alternative_service_map, std::unique_ptr<ServerNetworkStatsMap> server_network_stats_map, const IPAddress& last_quic_address, @@ -82,7 +82,7 @@ // TODO(mmenke): Consider always populating fields, unconditionally, for a // simpler API. void ReadPrefs( - std::unique_ptr<SpdyServersMap>* spdy_servers_map, + std::unique_ptr<HttpServerProperties::ServerInfoMap>* server_info_map, std::unique_ptr<AlternativeServiceMap>* alternative_service_map, std::unique_ptr<ServerNetworkStatsMap>* server_network_stats_map, IPAddress* last_quic_address, @@ -105,7 +105,7 @@ // by the time this method is called, calling this will prevent it from ever // being invoked, as this method will overwrite any previous preferences. void WriteToPrefs( - const SpdyServersMap& spdy_servers_map, + const HttpServerProperties::ServerInfoMap& server_info_map, const AlternativeServiceMap& alternative_service_map, const GetCannonicalSuffix& get_canonical_suffix, const ServerNetworkStatsMap& server_network_stats_map, @@ -128,7 +128,7 @@ FRIEND_TEST_ALL_PREFIXES(HttpServerPropertiesManagerTest, DoNotLoadExpiredAlternativeService); void AddServersData(const base::DictionaryValue& server_dict, - SpdyServersMap* spdy_servers_map, + HttpServerProperties::ServerInfoMap* server_info_map, AlternativeServiceMap* alternative_service_map, ServerNetworkStatsMap* network_stats_map); // Helper method used for parsing an alternative service from JSON.
diff --git a/net/http/http_server_properties_unittest.cc b/net/http/http_server_properties_unittest.cc index 300d254..f032903 100644 --- a/net/http/http_server_properties_unittest.cc +++ b/net/http/http_server_properties_unittest.cc
@@ -108,140 +108,151 @@ HttpServerProperties impl_; }; -typedef HttpServerPropertiesTest SpdyServerPropertiesTest; - -TEST_F(SpdyServerPropertiesTest, SetWithSchemeHostPort) { +TEST_F(HttpServerPropertiesTest, SetSupportsSpdy) { // Check spdy servers are correctly set with SchemeHostPort key. url::SchemeHostPort https_www_server("https", "www.google.com", 443); url::SchemeHostPort http_photo_server("http", "photos.google.com", 80); + url::SchemeHostPort https_mail_server("https", "mail.google.com", 443); // Servers with port equal to default port in scheme will drop port components // when calling Serialize(). - std::string spdy_server_g = https_www_server.Serialize(); - std::string spdy_server_p = http_photo_server.Serialize(); url::SchemeHostPort http_google_server("http", "www.google.com", 443); url::SchemeHostPort https_photos_server("https", "photos.google.com", 443); url::SchemeHostPort valid_google_server((GURL("https://www.google.com"))); - // Initializing https://www.google.com:443 and https://photos.google.com:443 - // as spdy servers. - std::unique_ptr<SpdyServersMap> spdy_servers1 = - std::make_unique<SpdyServersMap>(); - spdy_servers1->Put(spdy_server_g, true); - spdy_servers1->Put(spdy_server_p, true); - impl_.OnSpdyServersLoadedForTesting(std::move(spdy_servers1)); - EXPECT_TRUE(impl_.SupportsRequestPriority(http_photo_server)); + impl_.SetSupportsSpdy(https_www_server, true); + impl_.SetSupportsSpdy(http_photo_server, true); + impl_.SetSupportsSpdy(https_mail_server, false); + EXPECT_TRUE(impl_.GetSupportsSpdy(https_www_server)); EXPECT_TRUE(impl_.SupportsRequestPriority(https_www_server)); + EXPECT_TRUE(impl_.GetSupportsSpdy(http_photo_server)); + EXPECT_TRUE(impl_.SupportsRequestPriority(http_photo_server)); + EXPECT_FALSE(impl_.GetSupportsSpdy(https_mail_server)); + EXPECT_FALSE(impl_.SupportsRequestPriority(https_mail_server)); + EXPECT_FALSE(impl_.GetSupportsSpdy(http_google_server)); EXPECT_FALSE(impl_.SupportsRequestPriority(http_google_server)); + EXPECT_FALSE(impl_.GetSupportsSpdy(https_photos_server)); EXPECT_FALSE(impl_.SupportsRequestPriority(https_photos_server)); + EXPECT_TRUE(impl_.GetSupportsSpdy(valid_google_server)); EXPECT_TRUE(impl_.SupportsRequestPriority(valid_google_server)); + + // Flip values of two servers. + impl_.SetSupportsSpdy(https_www_server, false); + impl_.SetSupportsSpdy(https_mail_server, true); + EXPECT_FALSE(impl_.GetSupportsSpdy(https_www_server)); + EXPECT_FALSE(impl_.SupportsRequestPriority(https_www_server)); + EXPECT_TRUE(impl_.GetSupportsSpdy(https_mail_server)); + EXPECT_TRUE(impl_.SupportsRequestPriority(https_mail_server)); } -TEST_F(SpdyServerPropertiesTest, Set) { +TEST_F(HttpServerPropertiesTest, LoadSupportsSpdy) { + HttpServerProperties::ServerInfo supports_spdy; + supports_spdy.supports_spdy = true; + HttpServerProperties::ServerInfo no_spdy; + no_spdy.supports_spdy = false; + url::SchemeHostPort spdy_server_google("https", "www.google.com", 443); - std::string spdy_server_g = spdy_server_google.Serialize(); - url::SchemeHostPort spdy_server_photos("https", "photos.google.com", 443); - std::string spdy_server_p = spdy_server_photos.Serialize(); - url::SchemeHostPort spdy_server_docs("https", "docs.google.com", 443); - std::string spdy_server_d = spdy_server_docs.Serialize(); - url::SchemeHostPort spdy_server_mail("https", "mail.google.com", 443); - std::string spdy_server_m = spdy_server_mail.Serialize(); // Check by initializing empty spdy servers. - std::unique_ptr<SpdyServersMap> spdy_servers = - std::make_unique<SpdyServersMap>(); - impl_.OnSpdyServersLoadedForTesting(std::move(spdy_servers)); - EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_google)); + std::unique_ptr<HttpServerProperties::ServerInfoMap> spdy_servers = + std::make_unique<HttpServerProperties::ServerInfoMap>(); + impl_.OnServerInfoLoadedForTesting(std::move(spdy_servers)); + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_google)); // Check by initializing www.google.com:443 and photos.google.com:443 as spdy // servers. - std::unique_ptr<SpdyServersMap> spdy_servers1 = - std::make_unique<SpdyServersMap>(); - spdy_servers1->Put(spdy_server_g, true); - spdy_servers1->Put(spdy_server_p, true); - impl_.OnSpdyServersLoadedForTesting(std::move(spdy_servers1)); + std::unique_ptr<HttpServerProperties::ServerInfoMap> spdy_servers1 = + std::make_unique<HttpServerProperties::ServerInfoMap>(); + spdy_servers1->Put(spdy_server_google, supports_spdy); + spdy_servers1->Put(spdy_server_photos, no_spdy); + impl_.OnServerInfoLoadedForTesting(std::move(spdy_servers1)); // Note: these calls affect MRU order. - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_google)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_photos)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_google)); + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_photos)); - // Verify spdy_server_g and spdy_server_d are in the list in MRU order. - ASSERT_EQ(2U, impl_.spdy_servers_map_for_testing().size()); - auto it = impl_.spdy_servers_map_for_testing().begin(); - EXPECT_EQ(spdy_server_p, it->first); - EXPECT_TRUE(it->second); + // Verify google and photos are in the list in MRU order. + ASSERT_EQ(2U, impl_.server_info_map_for_testing().size()); + auto it = impl_.server_info_map_for_testing().begin(); + EXPECT_EQ(spdy_server_photos, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_FALSE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_g, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_google, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); - // Check by initializing mail.google.com:443 and docs.google.com:443 as spdy - // servers. - std::unique_ptr<SpdyServersMap> spdy_servers2 = - std::make_unique<SpdyServersMap>(); - spdy_servers2->Put(spdy_server_m, true); - spdy_servers2->Put(spdy_server_d, true); - impl_.OnSpdyServersLoadedForTesting(std::move(spdy_servers2)); + // Check by initializing mail.google.com:443 and docs.google.com:443. + std::unique_ptr<HttpServerProperties::ServerInfoMap> spdy_servers2 = + std::make_unique<HttpServerProperties::ServerInfoMap>(); + spdy_servers2->Put(spdy_server_mail, supports_spdy); + spdy_servers2->Put(spdy_server_docs, supports_spdy); + impl_.OnServerInfoLoadedForTesting(std::move(spdy_servers2)); // Verify all the servers are in the list in MRU order. Note that - // OnSpdyServersLoadedForTesting will put existing spdy server entries in + // OnServerInfoLoadedForTesting will put existing spdy server entries in // front of newly added entries. - ASSERT_EQ(4U, impl_.spdy_servers_map_for_testing().size()); - it = impl_.spdy_servers_map_for_testing().begin(); - EXPECT_EQ(spdy_server_p, it->first); - EXPECT_TRUE(it->second); + ASSERT_EQ(4U, impl_.server_info_map_for_testing().size()); + it = impl_.server_info_map_for_testing().begin(); + EXPECT_EQ(spdy_server_photos, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_FALSE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_g, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_google, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_d, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_docs, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_m, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_mail, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); // Check these in reverse MRU order so that MRU order stays the same. - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_mail)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_docs)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_google)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_photos)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_mail)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_docs)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_google)); + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_photos)); - // Verify new data that is being initialized overwrites what is already in the - // memory and also verify the recency list order. - // - // Change supports SPDY value for photos and mails servers and order of - // initalization shouldn't matter. - std::unique_ptr<SpdyServersMap> spdy_servers3 = - std::make_unique<SpdyServersMap>(); - spdy_servers3->Put(spdy_server_m, false); - spdy_servers3->Put(spdy_server_p, false); - impl_.OnSpdyServersLoadedForTesting(std::move(spdy_servers3)); + // Verify that old values loaded from disk take precedence over newer learned + // values and also verify the recency list order is unchanged. + std::unique_ptr<HttpServerProperties::ServerInfoMap> spdy_servers3 = + std::make_unique<HttpServerProperties::ServerInfoMap>(); + spdy_servers3->Put(spdy_server_mail, no_spdy); + spdy_servers3->Put(spdy_server_photos, supports_spdy); + impl_.OnServerInfoLoadedForTesting(std::move(spdy_servers3)); // Verify the entries are in the same order. - ASSERT_EQ(4U, impl_.spdy_servers_map_for_testing().size()); - it = impl_.spdy_servers_map_for_testing().begin(); - EXPECT_EQ(spdy_server_p, it->first); - EXPECT_FALSE(it->second); + ASSERT_EQ(4U, impl_.server_info_map_for_testing().size()); + it = impl_.server_info_map_for_testing().begin(); + EXPECT_EQ(spdy_server_photos, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_g, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_google, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_d, it->first); - EXPECT_TRUE(it->second); + EXPECT_EQ(spdy_server_docs, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_TRUE(*it->second.supports_spdy); ++it; - EXPECT_EQ(spdy_server_m, it->first); - EXPECT_FALSE(it->second); + EXPECT_EQ(spdy_server_mail, it->first); + ASSERT_TRUE(it->second.supports_spdy.has_value()); + EXPECT_FALSE(*it->second.supports_spdy); - // Verify photos and mail servers don't support SPDY and other servers support - // SPDY. - EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_mail)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_docs)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_google)); - EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_photos)); + // Verify photos server doesn't support SPDY and other servers support SPDY. + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_mail)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_docs)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_google)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_photos)); } -TEST_F(SpdyServerPropertiesTest, SupportsRequestPriorityTest) { +TEST_F(HttpServerPropertiesTest, SupportsRequestPriority) { url::SchemeHostPort spdy_server_empty("https", std::string(), 443); EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_empty)); @@ -281,15 +292,15 @@ EXPECT_TRUE(impl_.SupportsRequestPriority(example_server)); } -TEST_F(SpdyServerPropertiesTest, Clear) { +TEST_F(HttpServerPropertiesTest, ClearSupportsSpdy) { // Add www.google.com:443 and mail.google.com:443 as supporting SPDY. url::SchemeHostPort spdy_server_google("https", "www.google.com", 443); impl_.SetSupportsSpdy(spdy_server_google, true); url::SchemeHostPort spdy_server_mail("https", "mail.google.com", 443); impl_.SetSupportsSpdy(spdy_server_mail, true); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_google)); - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_mail)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_google)); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_mail)); base::RunLoop run_loop; bool callback_invoked_ = false; @@ -299,8 +310,8 @@ std::move(quit_closure).Run(); }, &callback_invoked_, run_loop.QuitClosure())); - EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_google)); - EXPECT_FALSE(impl_.SupportsRequestPriority(spdy_server_mail)); + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_google)); + EXPECT_FALSE(impl_.GetSupportsSpdy(spdy_server_mail)); // Callback should be run asynchronously. EXPECT_FALSE(callback_invoked_); @@ -308,34 +319,32 @@ EXPECT_TRUE(callback_invoked_); } -TEST_F(SpdyServerPropertiesTest, MRUOfSpdyServersMap) { +TEST_F(HttpServerPropertiesTest, MRUOfServerInfoMap) { url::SchemeHostPort spdy_server_google("https", "www.google.com", 443); - std::string spdy_server_g = spdy_server_google.Serialize(); url::SchemeHostPort spdy_server_mail("https", "mail.google.com", 443); - std::string spdy_server_m = spdy_server_mail.Serialize(); // Add www.google.com:443 as supporting SPDY. impl_.SetSupportsSpdy(spdy_server_google, true); - ASSERT_EQ(1u, impl_.spdy_servers_map_for_testing().size()); - auto it = impl_.spdy_servers_map_for_testing().begin(); - ASSERT_EQ(spdy_server_g, it->first); + ASSERT_EQ(1u, impl_.server_info_map_for_testing().size()); + auto it = impl_.server_info_map_for_testing().begin(); + ASSERT_EQ(spdy_server_google, it->first); // Add mail.google.com:443 as supporting SPDY. Verify mail.google.com:443 and // www.google.com:443 are in the list. impl_.SetSupportsSpdy(spdy_server_mail, true); - ASSERT_EQ(2u, impl_.spdy_servers_map_for_testing().size()); - it = impl_.spdy_servers_map_for_testing().begin(); - ASSERT_EQ(spdy_server_m, it->first); + ASSERT_EQ(2u, impl_.server_info_map_for_testing().size()); + it = impl_.server_info_map_for_testing().begin(); + ASSERT_EQ(spdy_server_mail, it->first); ++it; - ASSERT_EQ(spdy_server_g, it->first); + ASSERT_EQ(spdy_server_google, it->first); // Get www.google.com:443. It should become the most-recently-used server. - EXPECT_TRUE(impl_.SupportsRequestPriority(spdy_server_google)); - ASSERT_EQ(2u, impl_.spdy_servers_map_for_testing().size()); - it = impl_.spdy_servers_map_for_testing().begin(); - ASSERT_EQ(spdy_server_g, it->first); + EXPECT_TRUE(impl_.GetSupportsSpdy(spdy_server_google)); + ASSERT_EQ(2u, impl_.server_info_map_for_testing().size()); + it = impl_.server_info_map_for_testing().begin(); + ASSERT_EQ(spdy_server_google, it->first); ++it; - ASSERT_EQ(spdy_server_m, it->first); + ASSERT_EQ(spdy_server_mail, it->first); } typedef HttpServerPropertiesTest AlternateProtocolServerPropertiesTest;
diff --git a/net/http/transport_security_persister_unittest.cc b/net/http/transport_security_persister_unittest.cc index e74c841..370821e 100644 --- a/net/http/transport_security_persister_unittest.cc +++ b/net/http/transport_security_persister_unittest.cc
@@ -12,7 +12,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/test/scoped_feature_list.h" #include "base/threading/thread_task_runner_handle.h"
diff --git a/net/quic/quic_proxy_client_socket_unittest.cc b/net/quic/quic_proxy_client_socket_unittest.cc index 75b361d2..682982a 100644 --- a/net/quic/quic_proxy_client_socket_unittest.cc +++ b/net/quic/quic_proxy_client_socket_unittest.cc
@@ -265,7 +265,8 @@ new HttpAuthController( HttpAuth::AUTH_PROXY, GURL("https://" + proxy_host_port_.ToString()), &http_auth_cache_, - http_auth_handler_factory_.get(), host_resolver_.get()))); + http_auth_handler_factory_.get(), host_resolver_.get(), + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS))); session_->StartReading(); }
diff --git a/net/socket/ssl_connect_job.cc b/net/socket/ssl_connect_job.cc index d72579f5..b0b90ee 100644 --- a/net/socket/ssl_connect_job.cc +++ b/net/socket/ssl_connect_job.cc
@@ -403,18 +403,6 @@ ssl_info.key_exchange_group); } - if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_RESUME) { - UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Resume_Handshake", - connect_duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(1), 100); - } else if (ssl_info.handshake_type == SSLInfo::HANDSHAKE_FULL) { - UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_Full_Handshake", - connect_duration, - base::TimeDelta::FromMilliseconds(1), - base::TimeDelta::FromMinutes(1), 100); - } - if (tls13_supported) { UMA_HISTOGRAM_CUSTOM_TIMES("Net.SSL_Connection_Latency_TLS13Experiment", connect_duration,
diff --git a/net/spdy/spdy_proxy_client_socket_unittest.cc b/net/spdy/spdy_proxy_client_socket_unittest.cc index 6e1652f15..e6328d0 100644 --- a/net/spdy/spdy_proxy_client_socket_unittest.cc +++ b/net/spdy/spdy_proxy_client_socket_unittest.cc
@@ -17,6 +17,7 @@ #include "net/base/test_completion_callback.h" #include "net/base/winsock_init.h" #include "net/dns/mock_host_resolver.h" +#include "net/http/http_auth_preferences.h" #include "net/http/http_proxy_connect_job.h" #include "net/http/http_response_headers.h" #include "net/http/http_response_info.h" @@ -268,7 +269,8 @@ new HttpAuthController( HttpAuth::AUTH_PROXY, GURL("https://" + proxy_host_port_.ToString()), session_->http_auth_cache(), session_->http_auth_handler_factory(), - session_->host_resolver())); + session_->host_resolver(), + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS)); } scoped_refptr<IOBufferWithSize> SpdyProxyClientSocketTest::CreateBuffer(
diff --git a/net/spdy/spdy_session_test_util.h b/net/spdy/spdy_session_test_util.h index 819b15c8..2bdec6d1 100644 --- a/net/spdy/spdy_session_test_util.h +++ b/net/spdy/spdy_session_test_util.h
@@ -9,15 +9,15 @@ #include <string> -#include "base/message_loop/message_loop.h" #include "base/pending_task.h" +#include "base/task/task_observer.h" namespace net { -// SpdySessionTestTaskObserver is a MessageLoop::TaskObserver that monitors the +// SpdySessionTestTaskObserver is a TaskObserver that monitors the // completion of all tasks executed by the current MessageLoop, recording the // number of tasks that refer to a specific function and filename. -class SpdySessionTestTaskObserver : public base::MessageLoop::TaskObserver { +class SpdySessionTestTaskObserver : public base::TaskObserver { public: // Creates a SpdySessionTaskObserver that will record all tasks that are // executed that were posted by the function named by |function_name|, located @@ -29,7 +29,7 @@ const std::string& function_name); ~SpdySessionTestTaskObserver() override; - // Implements MessageLoop::TaskObserver. + // Implements TaskObserver. void WillProcessTask(const base::PendingTask& pending_task) override; void DidProcessTask(const base::PendingTask& pending_task) override;
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc index 3d7710b5..c6f9033 100644 --- a/net/spdy/spdy_test_util_common.cc +++ b/net/spdy/spdy_test_util_common.cc
@@ -343,7 +343,9 @@ net_log(nullptr), http_09_on_non_default_ports_enabled(false), disable_idle_sockets_close_on_memory_pressure(false), - enable_early_data(false) { + enable_early_data(false), + allow_default_credentials( + HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS) { http2_settings[spdy::SETTINGS_INITIAL_WINDOW_SIZE] = kDefaultInitialWindowSize; } @@ -397,6 +399,7 @@ params.disable_idle_sockets_close_on_memory_pressure = session_deps->disable_idle_sockets_close_on_memory_pressure; params.enable_early_data = session_deps->enable_early_data; + params.allow_default_credentials = session_deps->allow_default_credentials; return params; }
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index b5902199..b36208f 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h
@@ -25,6 +25,7 @@ #include "net/cert/cert_verifier.h" #include "net/dns/mock_host_resolver.h" #include "net/http/http_auth_handler_factory.h" +#include "net/http/http_auth_preferences.h" #include "net/http/http_network_session.h" #include "net/http/http_response_info.h" #include "net/http/http_server_properties.h" @@ -236,6 +237,7 @@ bool http_09_on_non_default_ports_enabled; bool disable_idle_sockets_close_on_memory_pressure; bool enable_early_data; + HttpAuthPreferences::DefaultCredentials allow_default_credentials; }; class SpdyURLRequestContext : public URLRequestContext {
diff --git a/ppapi/proxy/host_dispatcher.cc b/ppapi/proxy/host_dispatcher.cc index 8a69dfc0..a3e04a51 100644 --- a/ppapi/proxy/host_dispatcher.cc +++ b/ppapi/proxy/host_dispatcher.cc
@@ -68,8 +68,7 @@ : Dispatcher(local_get_interface, permissions), pp_module_(module), ppb_proxy_(NULL), - allow_plugin_reentrancy_(false), - weak_ptr_factory_(this) { + allow_plugin_reentrancy_(false) { if (!g_module_to_dispatcher) g_module_to_dispatcher = new ModuleToDispatcherMap; (*g_module_to_dispatcher)[pp_module_] = this;
diff --git a/ppapi/proxy/host_dispatcher.h b/ppapi/proxy/host_dispatcher.h index 8c7e9fc..4fd1bf57 100644 --- a/ppapi/proxy/host_dispatcher.h +++ b/ppapi/proxy/host_dispatcher.h
@@ -152,7 +152,7 @@ std::vector<IPC::Listener*> filters_; - base::WeakPtrFactory<HostDispatcher> weak_ptr_factory_; + base::WeakPtrFactory<HostDispatcher> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HostDispatcher); };
diff --git a/ppapi/proxy/plugin_globals.cc b/ppapi/proxy/plugin_globals.cc index a8e543b5..2e65866 100644 --- a/ppapi/proxy/plugin_globals.cc +++ b/ppapi/proxy/plugin_globals.cc
@@ -64,8 +64,7 @@ ipc_task_runner_(ipc_task_runner), resource_reply_thread_registrar_( new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())), - udp_socket_filter_(new UDPSocketFilter()), - weak_factory_(this) { + udp_socket_filter_(new UDPSocketFilter()) { DCHECK(!plugin_globals_); plugin_globals_ = this; @@ -85,8 +84,7 @@ callback_tracker_(new CallbackTracker), ipc_task_runner_(ipc_task_runner), resource_reply_thread_registrar_( - new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())), - weak_factory_(this) { + new ResourceReplyThreadRegistrar(GetMainThreadMessageLoop())) { DCHECK(!plugin_globals_); }
diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h index 09ce0d6b..4663e3d7 100644 --- a/ppapi/proxy/plugin_globals.h +++ b/ppapi/proxy/plugin_globals.h
@@ -187,7 +187,7 @@ scoped_refptr<UDPSocketFilter> udp_socket_filter_; // Member variables should appear before the WeakPtrFactory, see weak_ptr.h. - base::WeakPtrFactory<PluginGlobals> weak_factory_; + base::WeakPtrFactory<PluginGlobals> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PluginGlobals); };
diff --git a/ppapi/proxy/ppb_image_data_proxy.cc b/ppapi/proxy/ppb_image_data_proxy.cc index fe88fca..af6ff939 100644 --- a/ppapi/proxy/ppb_image_data_proxy.cc +++ b/ppapi/proxy/ppb_image_data_proxy.cc
@@ -222,7 +222,7 @@ class ImageDataCache { public: - ImageDataCache() : weak_factory_(this) {} + ImageDataCache() {} ~ImageDataCache() {} static ImageDataCache* GetInstance(); @@ -256,7 +256,7 @@ // scope of the object. Technically, since this class is a leaked static, // this will never happen and this factory is unnecessary. However, it's // probably better not to make assumptions about the lifetime of this class. - base::WeakPtrFactory<ImageDataCache> weak_factory_; + base::WeakPtrFactory<ImageDataCache> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ImageDataCache); };
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc index e388b53..925c8de7 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.cc +++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc
@@ -280,11 +280,8 @@ } // namespace -PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy( - Dispatcher* dispatcher) - : InterfaceProxy(dispatcher), - ppb_var_impl_(NULL), - task_factory_(this) { +PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher) + : InterfaceProxy(dispatcher), ppb_var_impl_(nullptr) { if (!dispatcher->IsPlugin()) { ppb_var_impl_ = static_cast<const PPB_Var_Deprecated*>( dispatcher->local_get_interface()(PPB_VAR_DEPRECATED_INTERFACE));
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h index a281018..62cb002 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.h +++ b/ppapi/proxy/ppb_var_deprecated_proxy.h
@@ -94,7 +94,7 @@ const PPB_Var_Deprecated* ppb_var_impl_; - base::WeakPtrFactory<PPB_Var_Deprecated_Proxy> task_factory_; + base::WeakPtrFactory<PPB_Var_Deprecated_Proxy> task_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PPB_Var_Deprecated_Proxy); };
diff --git a/ppapi/shared_impl/resource_tracker.cc b/ppapi/shared_impl/resource_tracker.cc index d79c699..775b8d7 100644 --- a/ppapi/shared_impl/resource_tracker.cc +++ b/ppapi/shared_impl/resource_tracker.cc
@@ -16,7 +16,7 @@ namespace ppapi { ResourceTracker::ResourceTracker(ThreadMode thread_mode) - : last_resource_value_(0), weak_ptr_factory_(this) { + : last_resource_value_(0) { if (thread_mode == SINGLE_THREADED) thread_checker_.reset(new base::ThreadChecker); }
diff --git a/ppapi/shared_impl/resource_tracker.h b/ppapi/shared_impl/resource_tracker.h index c6a27ce..04f26b86 100644 --- a/ppapi/shared_impl/resource_tracker.h +++ b/ppapi/shared_impl/resource_tracker.h
@@ -131,7 +131,7 @@ // is protected by the proxy lock and is thread-safe, so this will be NULL. std::unique_ptr<base::ThreadChecker> thread_checker_; - base::WeakPtrFactory<ResourceTracker> weak_ptr_factory_; + base::WeakPtrFactory<ResourceTracker> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ResourceTracker); };
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc index d7395f5..9be7d0e 100644 --- a/printing/emf_win_unittest.cc +++ b/printing/emf_win_unittest.cc
@@ -11,6 +11,7 @@ #include <memory> #include <string> +#include <utility> #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -82,14 +83,15 @@ if (IsTestCaseDisabled()) return; - PrintSettings settings; + auto settings = std::make_unique<PrintSettings>(); // My test case is a HP Color LaserJet 4550 PCL. - settings.set_device_name(L"UnitTest Printer"); + settings->set_device_name(L"UnitTest Printer"); // Initialize it. PrintingContextWin context(this); - EXPECT_EQ(PrintingContext::OK, context.InitWithSettingsForTest(settings)); + EXPECT_EQ(PrintingContext::OK, + context.InitWithSettingsForTest(std::move(settings))); base::FilePath emf_file; EXPECT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &emf_file));
diff --git a/printing/print_dialog_gtk_interface.h b/printing/print_dialog_gtk_interface.h index 374acc4..439c04b 100644 --- a/printing/print_dialog_gtk_interface.h +++ b/printing/print_dialog_gtk_interface.h
@@ -5,6 +5,8 @@ #ifndef PRINTING_PRINT_DIALOG_GTK_INTERFACE_H_ #define PRINTING_PRINT_DIALOG_GTK_INTERFACE_H_ +#include <memory> + #include "base/strings/string16.h" #include "printing/printing_context_linux.h" #include "ui/gfx/native_widget_types.h" @@ -24,7 +26,7 @@ // Updates the dialog to use |settings|. Only used when printing without the // system print dialog. E.g. for Print Preview. - virtual void UpdateSettings(PrintSettings* settings) = 0; + virtual void UpdateSettings(std::unique_ptr<PrintSettings> settings) = 0; // Shows the dialog and handles the response with |callback|. Only used when // printing with the native print dialog.
diff --git a/printing/print_settings.cc b/printing/print_settings.cc index bc22112..5cc1b55 100644 --- a/printing/print_settings.cc +++ b/printing/print_settings.cc
@@ -153,8 +153,6 @@ Clear(); } -PrintSettings::PrintSettings(const PrintSettings& other) = default; - PrintSettings::~PrintSettings() = default; void PrintSettings::Clear() {
diff --git a/printing/print_settings.h b/printing/print_settings.h index 3d9c3c5f..47c0a63 100644 --- a/printing/print_settings.h +++ b/printing/print_settings.h
@@ -8,6 +8,7 @@ #include <algorithm> #include <string> +#include "base/macros.h" #include "base/strings/string16.h" #include "printing/page_range.h" #include "printing/page_setup.h" @@ -59,7 +60,6 @@ }; PrintSettings(); - PrintSettings(const PrintSettings& other); ~PrintSettings(); // Reinitialize the settings to the default values. @@ -295,6 +295,8 @@ // PIN code entered by the user. std::string pin_value_; #endif + + DISALLOW_COPY_AND_ASSIGN(PrintSettings); }; } // namespace printing
diff --git a/printing/printed_document.cc b/printing/printed_document.cc index 1f3c0c0..3d974c5e 100644 --- a/printing/printed_document.cc +++ b/printing/printed_document.cc
@@ -103,16 +103,16 @@ } // namespace -PrintedDocument::PrintedDocument(const PrintSettings& settings, +PrintedDocument::PrintedDocument(std::unique_ptr<PrintSettings> settings, const base::string16& name, int cookie) - : immutable_(settings, name, cookie) { + : immutable_(std::move(settings), name, cookie) { // If there is a range, set the number of page - for (const PageRange& range : settings.ranges()) + for (const PageRange& range : immutable_.settings_->ranges()) mutable_.expected_page_count_ += range.to - range.from + 1; if (HasDebugDumpPath()) - DebugDumpSettings(name, settings); + DebugDumpSettings(name, *immutable_.settings_); } PrintedDocument::~PrintedDocument() = default; @@ -192,7 +192,7 @@ if (mutable_.converting_pdf_) return true; - PageNumber page(immutable_.settings_, mutable_.page_count_); + PageNumber page(*immutable_.settings_, mutable_.page_count_); if (page == PageNumber::npos()) return false; @@ -213,7 +213,7 @@ base::AutoLock lock(lock_); DCHECK_EQ(0, mutable_.page_count_); mutable_.page_count_ = max_page; - if (immutable_.settings_.ranges().empty()) { + if (immutable_.settings_->ranges().empty()) { mutable_.expected_page_count_ = max_page; } else { // If there is a range, don't bother since expected_page_count_ is already @@ -300,10 +300,10 @@ PrintedDocument::Mutable::~Mutable() = default; -PrintedDocument::Immutable::Immutable(const PrintSettings& settings, +PrintedDocument::Immutable::Immutable(std::unique_ptr<PrintSettings> settings, const base::string16& name, int cookie) - : settings_(settings), name_(name), cookie_(cookie) {} + : settings_(std::move(settings)), name_(name), cookie_(cookie) {} PrintedDocument::Immutable::~Immutable() = default;
diff --git a/printing/printed_document.h b/printing/printed_document.h index aaf24958..8d14326 100644 --- a/printing/printed_document.h +++ b/printing/printed_document.h
@@ -38,7 +38,7 @@ public: // The cookie shall be unique and has a specific relationship with its // originating source and settings. - PrintedDocument(const PrintSettings& settings, + PrintedDocument(std::unique_ptr<PrintSettings> settings, const base::string16& name, int cookie); @@ -102,7 +102,7 @@ int expected_page_count() const; // Getters. All these items are immutable hence thread-safe. - const PrintSettings& settings() const { return immutable_.settings_; } + const PrintSettings& settings() const { return *immutable_.settings_; } const base::string16& name() const { return immutable_.name_; } int cookie() const { return immutable_.cookie_; } @@ -174,13 +174,13 @@ // any lock held. This is because it can't be changed after the object's // construction. struct Immutable { - Immutable(const PrintSettings& settings, + Immutable(std::unique_ptr<PrintSettings> settings, const base::string16& name, int cookie); ~Immutable(); // Print settings used to generate this document. Immutable. - PrintSettings settings_; + std::unique_ptr<PrintSettings> settings_; // Document name. Immutable. base::string16 name_;
diff --git a/printing/printed_document_mac.cc b/printing/printed_document_mac.cc index 1cfa1ee..0df77e6 100644 --- a/printing/printed_document_mac.cc +++ b/printing/printed_document_mac.cc
@@ -27,7 +27,7 @@ } DCHECK(metafile); - const PageSetup& page_setup = immutable_.settings_.page_setup_device_units(); + const PageSetup& page_setup = immutable_.settings_->page_setup_device_units(); gfx::Rect content_area = GetCenteredPageContentRect( page_setup.physical_size(), page_size, page_content_rect);
diff --git a/printing/printed_document_unittest.cc b/printing/printed_document_unittest.cc index efb2aa8..9f17af1 100644 --- a/printing/printed_document_unittest.cc +++ b/printing/printed_document_unittest.cc
@@ -10,12 +10,12 @@ TEST(PrintedDocumentTest, GetCenteredPageContentRect) { scoped_refptr<PrintedDocument> document; - PrintSettings settings; gfx::Rect page_content; const base::string16 name(base::ASCIIToUTF16("name")); // No centering. - document = base::MakeRefCounted<PrintedDocument>(settings, name, 1); + document = base::MakeRefCounted<PrintedDocument>( + std::make_unique<PrintSettings>(), name, 1); gfx::Size page_size = gfx::Size(1200, 1200); gfx::Rect page_content_rect = gfx::Rect(0, 0, 400, 1100); page_content = document->GetCenteredPageContentRect( @@ -26,7 +26,8 @@ EXPECT_EQ(1100, page_content.height()); // X centered. - document = base::MakeRefCounted<PrintedDocument>(settings, name, 1); + document = base::MakeRefCounted<PrintedDocument>( + std::make_unique<PrintSettings>(), name, 1); page_size = gfx::Size(500, 1200); page_content = document->GetCenteredPageContentRect( gfx::Size(1000, 1000), page_size, page_content_rect); @@ -36,7 +37,8 @@ EXPECT_EQ(1100, page_content.height()); // Y centered. - document = base::MakeRefCounted<PrintedDocument>(settings, name, 1); + document = base::MakeRefCounted<PrintedDocument>( + std::make_unique<PrintSettings>(), name, 1); page_size = gfx::Size(1200, 500); page_content = document->GetCenteredPageContentRect( gfx::Size(1000, 1000), page_size, page_content_rect); @@ -46,7 +48,8 @@ EXPECT_EQ(1100, page_content.height()); // Both X and Y centered. - document = base::MakeRefCounted<PrintedDocument>(settings, name, 1); + document = base::MakeRefCounted<PrintedDocument>( + std::make_unique<PrintSettings>(), name, 1); page_size = gfx::Size(500, 500), page_content = document->GetCenteredPageContentRect( gfx::Size(1000, 1000), page_size, page_content_rect);
diff --git a/printing/printed_document_win.cc b/printing/printed_document_win.cc index e083520..fae513e 100644 --- a/printing/printed_document_win.cc +++ b/printing/printed_document_win.cc
@@ -41,7 +41,7 @@ DCHECK(context); - const PageSetup& page_setup = immutable_.settings_.page_setup_device_units(); + const PageSetup& page_setup = immutable_.settings_->page_setup_device_units(); gfx::Rect content_area = GetCenteredPageContentRect( page_setup.physical_size(), page.page_size(), page.page_content_rect());
diff --git a/printing/printing_context.cc b/printing/printing_context.cc index 78e3c3b2..cd5c27c 100644 --- a/printing/printing_context.cc +++ b/printing/printing_context.cc
@@ -4,6 +4,8 @@ #include "printing/printing_context.h" +#include <utility> + #include "base/logging.h" #include "printing/page_setup.h" #include "printing/page_size_margins.h" @@ -18,7 +20,10 @@ } PrintingContext::PrintingContext(Delegate* delegate) - : delegate_(delegate), in_print_job_(false), abort_printing_(false) { + : settings_(std::make_unique<PrintSettings>()), + delegate_(delegate), + in_print_job_(false), + abort_printing_(false) { DCHECK(delegate_); } @@ -26,25 +31,36 @@ void PrintingContext::set_margin_type(MarginType type) { DCHECK(type != CUSTOM_MARGINS); - settings_.set_margin_type(type); + settings_->set_margin_type(type); } void PrintingContext::set_is_modifiable(bool is_modifiable) { - settings_.set_is_modifiable(is_modifiable); + settings_->set_is_modifiable(is_modifiable); #if defined(OS_WIN) - settings_.set_print_text_with_gdi(is_modifiable); + settings_->set_print_text_with_gdi(is_modifiable); #endif } +const PrintSettings& PrintingContext::settings() const { + DCHECK(!in_print_job_); + return *settings_; +} + void PrintingContext::ResetSettings() { ReleaseContext(); - settings_.Clear(); + settings_->Clear(); in_print_job_ = false; abort_printing_ = false; } +std::unique_ptr<PrintSettings> PrintingContext::TakeAndResetSettings() { + std::unique_ptr<PrintSettings> result = std::move(settings_); + settings_ = std::make_unique<PrintSettings>(); + return result; +} + PrintingContext::Result PrintingContext::OnError() { Result result = abort_printing_ ? CANCEL : FAILED; ResetSettings(); @@ -79,7 +95,7 @@ base::Value job_settings) { ResetSettings(); - if (!PrintSettingsFromJobSettings(job_settings, &settings_)) { + if (!PrintSettingsFromJobSettings(job_settings, settings_.get())) { NOTREACHED(); return OnError(); } @@ -111,24 +127,25 @@ if (!open_in_external_preview && (print_to_pdf || print_to_cloud || is_cloud_dialog || print_with_privet || print_with_extension)) { - settings_.set_dpi(kDefaultPdfDpi); + settings_->set_dpi(kDefaultPdfDpi); gfx::Size paper_size(GetPdfPaperSizeDeviceUnits()); - if (!settings_.requested_media().size_microns.IsEmpty()) { + if (!settings_->requested_media().size_microns.IsEmpty()) { float device_microns_per_device_unit = static_cast<float>(kMicronsPerInch) / - settings_.device_units_per_inch(); - paper_size = gfx::Size(settings_.requested_media().size_microns.width() / - device_microns_per_device_unit, - settings_.requested_media().size_microns.height() / - device_microns_per_device_unit); + settings_->device_units_per_inch(); + paper_size = + gfx::Size(settings_->requested_media().size_microns.width() / + device_microns_per_device_unit, + settings_->requested_media().size_microns.height() / + device_microns_per_device_unit); } gfx::Rect paper_rect(0, 0, paper_size.width(), paper_size.height()); if (print_to_cloud || print_with_privet) { paper_rect.Inset( - kCloudPrintMarginInch * settings_.device_units_per_inch(), - kCloudPrintMarginInch * settings_.device_units_per_inch()); + kCloudPrintMarginInch * settings_->device_units_per_inch(), + kCloudPrintMarginInch * settings_->device_units_per_inch()); } - settings_.SetPrinterPrintableArea(paper_size, paper_rect, true); + settings_->SetPrinterPrintableArea(paper_size, paper_rect, true); return OK; } @@ -142,7 +159,7 @@ PrintingContext::Result PrintingContext::UpdatePrintSettingsFromPOD( std::unique_ptr<PrintSettings> job_settings) { ResetSettings(); - settings_ = *job_settings; + settings_ = std::move(job_settings); return UpdatePrinterSettings(false /* external_preview */, false /* show_system_dialog */,
diff --git a/printing/printing_context.h b/printing/printing_context.h index 9ccc1a66..6a5a7c9 100644 --- a/printing/printing_context.h +++ b/printing/printing_context.h
@@ -125,7 +125,9 @@ void set_margin_type(MarginType type); void set_is_modifiable(bool is_modifiable); - const PrintSettings& settings() const { return settings_; } + const PrintSettings& settings() const; + + std::unique_ptr<PrintSettings> TakeAndResetSettings(); int job_id() const { return job_id_; } @@ -139,7 +141,7 @@ PrintingContext::Result OnError(); // Complete print context settings. - PrintSettings settings_; + std::unique_ptr<PrintSettings> settings_; // Printing context delegate. Delegate* const delegate_;
diff --git a/printing/printing_context_android.cc b/printing/printing_context_android.cc index 05f9ed6..6bad14c 100644 --- a/printing/printing_context_android.cc +++ b/printing/printing_context_android.cc
@@ -6,6 +6,8 @@ #include <stdint.h> +#include <memory> +#include <utility> #include <vector> #include "base/android/jni_android.h" @@ -126,14 +128,14 @@ // TODO(thestig): See if the call to set_device_name() can be removed. fd_ = Java_PrintingContext_getFileDescriptor(env, j_printing_context_); DCHECK(is_file_descriptor_valid()); - settings_.set_device_name(base::NumberToString16(fd_)); + settings_->set_device_name(base::NumberToString16(fd_)); ScopedJavaLocalRef<jintArray> intArr = Java_PrintingContext_getPages(env, j_printing_context_); if (!intArr.is_null()) { PageRanges range_vector; GetPageRanges(env, intArr, &range_vector); - settings_.set_ranges(range_vector); + settings_->set_ranges(range_vector); } int dpi = Java_PrintingContext_getDpi(env, j_printing_context_); @@ -141,7 +143,7 @@ int height = Java_PrintingContext_getHeight(env, j_printing_context_); width = ConvertUnit(width, kMilsPerInch, dpi); height = ConvertUnit(height, kMilsPerInch, dpi); - SetSizes(&settings_, dpi, width, height); + SetSizes(settings_.get(), dpi, width, height); std::move(callback_).Run(OK); } @@ -166,9 +168,9 @@ DCHECK(!in_print_job_); ResetSettings(); - settings_.set_dpi(kDefaultPdfDpi); + settings_->set_dpi(kDefaultPdfDpi); gfx::Size physical_size = GetPdfPaperSizeDeviceUnits(); - SetSizes(&settings_, kDefaultPdfDpi, physical_size.width(), + SetSizes(settings_.get(), kDefaultPdfDpi, physical_size.width(), physical_size.height()); return OK; } @@ -185,13 +187,13 @@ LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: " << error; width = - static_cast<int>(kLetterWidthInch * settings_.device_units_per_inch()); - height = - static_cast<int>(kLetterHeightInch * settings_.device_units_per_inch()); + static_cast<int>(kLetterWidthInch * settings_->device_units_per_inch()); + height = static_cast<int>(kLetterHeightInch * + settings_->device_units_per_inch()); } else { // ulocdata_getPaperSize returns the width and height in mm. // Convert this to pixels based on the dpi. - float multiplier = settings_.device_units_per_inch() / kMicronsPerMil; + float multiplier = settings_->device_units_per_inch() / kMicronsPerMil; width *= multiplier; height *= multiplier; }
diff --git a/printing/printing_context_chromeos.cc b/printing/printing_context_chromeos.cc index ed78b761..b48cbe1 100644 --- a/printing/printing_context_chromeos.cc +++ b/printing/printing_context_chromeos.cc
@@ -178,15 +178,15 @@ ResetSettings(); - std::string device_name = base::UTF16ToUTF8(settings_.device_name()); + std::string device_name = base::UTF16ToUTF8(settings_->device_name()); if (device_name.empty()) return OnError(); // TODO(skau): https://crbug.com/613779. See UpdatePrinterSettings for more // info. - if (settings_.dpi() == 0) { + if (settings_->dpi() == 0) { DVLOG(1) << "Using Default DPI"; - settings_.set_dpi(kDefaultPdfDpi); + settings_->set_dpi(kDefaultPdfDpi); } // Retrieve device information and set it @@ -202,9 +202,9 @@ PrintSettings::RequestedMedia media; media.vendor_id = paper.vendor_id; media.size_microns = paper.size_um; - settings_.set_requested_media(media); + settings_->set_requested_media(media); - SetPrintableArea(&settings_, media, true /* flip landscape */); + SetPrintableArea(settings_.get(), media, true /* flip landscape */); return OK; } @@ -220,13 +220,13 @@ LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: " << error; width = - static_cast<int>(kLetterWidthInch * settings_.device_units_per_inch()); - height = - static_cast<int>(kLetterHeightInch * settings_.device_units_per_inch()); + static_cast<int>(kLetterWidthInch * settings_->device_units_per_inch()); + height = static_cast<int>(kLetterHeightInch * + settings_->device_units_per_inch()); } else { // ulocdata_getPaperSize returns the width and height in mm. // Convert this to pixels based on the dpi. - float multiplier = settings_.device_units_per_inch() / kMicronsPerMil; + float multiplier = settings_->device_units_per_inch() / kMicronsPerMil; width *= multiplier; height *= multiplier; } @@ -239,20 +239,20 @@ int page_count) { DCHECK(!show_system_dialog); - if (InitializeDevice(base::UTF16ToUTF8(settings_.device_name())) != OK) + if (InitializeDevice(base::UTF16ToUTF8(settings_->device_name())) != OK) return OnError(); // TODO(skau): Convert to DCHECK when https://crbug.com/613779 is resolved // Print quality suffers when this is set to the resolution reported by the // printer but print quality is fine at this resolution. UseDefaultSettings // exhibits the same problem. - if (settings_.dpi() == 0) { + if (settings_->dpi() == 0) { DVLOG(1) << "Using Default DPI"; - settings_.set_dpi(kDefaultPdfDpi); + settings_->set_dpi(kDefaultPdfDpi); } // compute paper size - PrintSettings::RequestedMedia media = settings_.requested_media(); + PrintSettings::RequestedMedia media = settings_->requested_media(); if (media.IsDefault()) { DCHECK(printer_); @@ -260,13 +260,13 @@ media.vendor_id = paper.vendor_id; media.size_microns = paper.size_um; - settings_.set_requested_media(media); + settings_->set_requested_media(media); } - SetPrintableArea(&settings_, media, true); - cups_options_ = SettingsToCupsOptions(settings_); - send_user_info_ = settings_.send_user_info(); - username_ = send_user_info_ ? settings_.username() : std::string(); + SetPrintableArea(settings_.get(), media, true); + cups_options_ = SettingsToCupsOptions(*settings_); + send_user_info_ = settings_->send_user_info(); + username_ = send_user_info_ ? settings_->username() : std::string(); return OK; }
diff --git a/printing/printing_context_linux.cc b/printing/printing_context_linux.cc index 5adcfd3..38d9e8e 100644 --- a/printing/printing_context_linux.cc +++ b/printing/printing_context_linux.cc
@@ -122,14 +122,19 @@ print_dialog_->AddRefToDialog(); } - print_dialog_->UpdateSettings(&settings_); + // PrintDialogGtk::UpdateSettings() calls InitWithSettings() so settings_ will + // remain non-null after this line. + print_dialog_->UpdateSettings(std::move(settings_)); + DCHECK(settings_); + return OK; } -void PrintingContextLinux::InitWithSettings(const PrintSettings& settings) { +void PrintingContextLinux::InitWithSettings( + std::unique_ptr<PrintSettings> settings) { DCHECK(!in_print_job_); - settings_ = settings; + settings_ = std::move(settings); } PrintingContext::Result PrintingContextLinux::NewDocument(
diff --git a/printing/printing_context_linux.h b/printing/printing_context_linux.h index 2ceb3be..81932116 100644 --- a/printing/printing_context_linux.h +++ b/printing/printing_context_linux.h
@@ -5,6 +5,7 @@ #ifndef PRINTING_PRINTING_CONTEXT_LINUX_H_ #define PRINTING_PRINTING_CONTEXT_LINUX_H_ +#include <memory> #include <string> #include "base/macros.h" @@ -33,7 +34,7 @@ void PrintDocument(const MetafilePlayer& metafile); // Initializes with predefined settings. - void InitWithSettings(const PrintSettings& settings); + void InitWithSettings(std::unique_ptr<PrintSettings> settings); // PrintingContext implementation. void AskUserForSettings(int max_pages,
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm index dc1694d..121b010 100644 --- a/printing/printing_context_mac.mm +++ b/printing/printing_context_mac.mm
@@ -131,7 +131,7 @@ NSInteger selection = [panel runModalWithPrintInfo:printInfo]; if (selection == NSOKButton) { print_info_.reset([[panel printInfo] retain]); - settings_.set_ranges(GetPageRangesFromPrintInfo()); + settings_->set_ranges(GetPageRangesFromPrintInfo()); InitPrintSettingsFromPrintInfo(); std::move(block_callback).Run(OK); } else { @@ -154,7 +154,7 @@ // Device units are in points. Units per inch is 72. gfx::Size physical_size_device_units((paper_rect.right - paper_rect.left), (paper_rect.bottom - paper_rect.top)); - DCHECK(settings_.device_units_per_inch() == kPointsPerInch); + DCHECK(settings_->device_units_per_inch() == kPointsPerInch); return physical_size_device_units; } @@ -162,7 +162,7 @@ DCHECK(!in_print_job_); print_info_.reset([[NSPrintInfo sharedPrintInfo] copy]); - settings_.set_ranges(GetPageRangesFromPrintInfo()); + settings_->set_ranges(GetPageRangesFromPrintInfo()); InitPrintSettingsFromPrintInfo(); return OK; @@ -184,17 +184,17 @@ return OnError(); } else { // Don't need this for preview. - if (!SetPrinter(base::UTF16ToUTF8(settings_.device_name())) || - !SetCopiesInPrintSettings(settings_.copies()) || - !SetCollateInPrintSettings(settings_.collate()) || - !SetDuplexModeInPrintSettings(settings_.duplex_mode()) || - !SetOutputColor(settings_.color())) { + if (!SetPrinter(base::UTF16ToUTF8(settings_->device_name())) || + !SetCopiesInPrintSettings(settings_->copies()) || + !SetCollateInPrintSettings(settings_->collate()) || + !SetDuplexModeInPrintSettings(settings_->duplex_mode()) || + !SetOutputColor(settings_->color())) { return OnError(); } } if (!UpdatePageFormatWithPaperInfo() || - !SetOrientationIsLandscape(settings_.landscape())) { + !SetOrientationIsLandscape(settings_->landscape())) { return OnError(); } @@ -221,7 +221,7 @@ PMPrinter printer; PMSessionGetCurrentPrinter(print_session, &printer); PrintSettingsInitializerMac::InitPrintSettings(printer, page_format, - &settings_); + settings_.get()); } bool PrintingContextMac::SetPrinter(const std::string& device_name) { @@ -272,7 +272,7 @@ base::ScopedCFTypeRef<CFStringRef> paper_name; PMPaperMargins margins = {0}; - const PrintSettings::RequestedMedia& media = settings_.requested_media(); + const PrintSettings::RequestedMedia& media = settings_->requested_media(); if (media.IsDefault()) { PMPaper default_paper; if (PMGetPageFormatPaper(default_page_format, &default_paper) != noErr ||
diff --git a/printing/printing_context_no_system_dialog.cc b/printing/printing_context_no_system_dialog.cc index 65d9bd2..106314b1 100644 --- a/printing/printing_context_no_system_dialog.cc +++ b/printing/printing_context_no_system_dialog.cc
@@ -8,6 +8,7 @@ #include <unicode/ulocdata.h> #include <memory> +#include <utility> #include "base/logging.h" #include "base/values.h" @@ -44,12 +45,12 @@ DCHECK(!in_print_job_); ResetSettings(); - settings_.set_dpi(kDefaultPdfDpi); + settings_->set_dpi(kDefaultPdfDpi); gfx::Size physical_size = GetPdfPaperSizeDeviceUnits(); // Assume full page is printable for now. gfx::Rect printable_area(0, 0, physical_size.width(), physical_size.height()); - DCHECK_EQ(settings_.device_units_per_inch(), kDefaultPdfDpi); - settings_.SetPrinterPrintableArea(physical_size, printable_area, true); + DCHECK_EQ(settings_->device_units_per_inch(), kDefaultPdfDpi); + settings_->SetPrinterPrintableArea(physical_size, printable_area, true); return OK; } @@ -64,13 +65,13 @@ LOG(WARNING) << "ulocdata_getPaperSize failed, using 8.5 x 11, error: " << error; width = - static_cast<int>(kLetterWidthInch * settings_.device_units_per_inch()); - height = - static_cast<int>(kLetterHeightInch * settings_.device_units_per_inch()); + static_cast<int>(kLetterWidthInch * settings_->device_units_per_inch()); + height = static_cast<int>(kLetterHeightInch * + settings_->device_units_per_inch()); } else { // ulocdata_getPaperSize returns the width and height in mm. // Convert this to pixels based on the dpi. - float multiplier = settings_.device_units_per_inch() / kMicronsPerMil; + float multiplier = settings_->device_units_per_inch() / kMicronsPerMil; width *= multiplier; height *= multiplier; } @@ -83,7 +84,7 @@ int page_count) { DCHECK(!show_system_dialog); - if (settings_.dpi() == 0) + if (settings_->dpi() == 0) UseDefaultSettings(); return OK;
diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc index 1c2d08a7..a53e404 100644 --- a/printing/printing_context_system_dialog_win.cc +++ b/printing/printing_context_system_dialog_win.cc
@@ -132,11 +132,11 @@ } } - settings_.set_ranges(ranges_vector); - settings_.set_device_name(new_device_name); - settings_.set_selection_only(selection_only); + settings_->set_ranges(ranges_vector); + settings_->set_device_name(new_device_name); + settings_->set_selection_only(selection_only); PrintSettingsInitializerWin::InitPrintSettings(context(), dev_mode, - &settings_); + settings_.get()); return true; } @@ -146,11 +146,11 @@ // If the user clicked OK or Apply then Cancel, but not only Cancel. if (dialog_options.dwResultAction != PD_RESULT_CANCEL) { // Start fresh, but preserve is_modifiable and GDI print setting. - bool is_modifiable = settings_.is_modifiable(); - bool print_text_with_gdi = settings_.print_text_with_gdi(); + bool is_modifiable = settings_->is_modifiable(); + bool print_text_with_gdi = settings_->print_text_with_gdi(); ResetSettings(); - settings_.set_is_modifiable(is_modifiable); - settings_.set_print_text_with_gdi(print_text_with_gdi); + settings_->set_is_modifiable(is_modifiable); + settings_->set_print_text_with_gdi(print_text_with_gdi); DEVMODE* dev_mode = NULL; if (dialog_options.hDevMode) {
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc index 7f323ed0..7115067 100644 --- a/printing/printing_context_win.cc +++ b/printing/printing_context_win.cc
@@ -8,6 +8,7 @@ #include <winspool.h> #include <algorithm> +#include <utility> #include <vector> #include "base/bind.h" @@ -140,8 +141,8 @@ break; } } - return gfx::Size(paper_size.width() * settings_.device_units_per_inch(), - paper_size.height() * settings_.device_units_per_inch()); + return gfx::Size(paper_size.width() * settings_->device_units_per_inch(), + paper_size.height() * settings_->device_units_per_inch()); } PrintingContext::Result PrintingContextWin::UpdatePrinterSettings( @@ -152,27 +153,27 @@ DCHECK(!external_preview) << "Not implemented"; ScopedPrinterHandle printer; - if (!printer.OpenPrinterWithName(settings_.device_name().c_str())) + if (!printer.OpenPrinterWithName(settings_->device_name().c_str())) return OnError(); // Make printer changes local to Chrome. // See MSDN documentation regarding DocumentProperties. std::unique_ptr<DEVMODE, base::FreeDeleter> scoped_dev_mode = - CreateDevModeWithColor(printer.Get(), settings_.device_name(), - settings_.color() != GRAY); + CreateDevModeWithColor(printer.Get(), settings_->device_name(), + settings_->color() != GRAY); if (!scoped_dev_mode) return OnError(); { DEVMODE* dev_mode = scoped_dev_mode.get(); - dev_mode->dmCopies = std::max(settings_.copies(), 1); + dev_mode->dmCopies = std::max(settings_->copies(), 1); if (dev_mode->dmCopies > 1) { // do not change unless multiple copies dev_mode->dmFields |= DM_COPIES; dev_mode->dmCollate = - settings_.collate() ? DMCOLLATE_TRUE : DMCOLLATE_FALSE; + settings_->collate() ? DMCOLLATE_TRUE : DMCOLLATE_FALSE; } - switch (settings_.duplex_mode()) { + switch (settings_->duplex_mode()) { case LONG_EDGE: dev_mode->dmFields |= DM_DUPLEX; dev_mode->dmDuplex = DMDUP_VERTICAL; @@ -191,19 +192,19 @@ dev_mode->dmFields |= DM_ORIENTATION; dev_mode->dmOrientation = - settings_.landscape() ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT; + settings_->landscape() ? DMORIENT_LANDSCAPE : DMORIENT_PORTRAIT; - if (settings_.dpi_horizontal() > 0) { - dev_mode->dmPrintQuality = settings_.dpi_horizontal(); + if (settings_->dpi_horizontal() > 0) { + dev_mode->dmPrintQuality = settings_->dpi_horizontal(); dev_mode->dmFields |= DM_PRINTQUALITY; } - if (settings_.dpi_vertical() > 0) { - dev_mode->dmYResolution = settings_.dpi_vertical(); + if (settings_->dpi_vertical() > 0) { + dev_mode->dmYResolution = settings_->dpi_vertical(); dev_mode->dmFields |= DM_YRESOLUTION; } const PrintSettings::RequestedMedia& requested_media = - settings_.requested_media(); + settings_->requested_media(); unsigned id = 0; // If the paper size is a custom user size, setting by ID may not work. if (base::StringToUint(requested_media.vendor_id, &id) && id && @@ -227,24 +228,24 @@ } // Set printer then refresh printer settings. scoped_dev_mode = CreateDevMode(printer.Get(), scoped_dev_mode.get()); - return InitializeSettings(settings_.device_name(), scoped_dev_mode.get()); + return InitializeSettings(settings_->device_name(), scoped_dev_mode.get()); } PrintingContext::Result PrintingContextWin::InitWithSettingsForTest( - const PrintSettings& settings) { + std::unique_ptr<PrintSettings> settings) { DCHECK(!in_print_job_); - settings_ = settings; + settings_ = std::move(settings); // TODO(maruel): settings_.ToDEVMODE() ScopedPrinterHandle printer; - if (!printer.OpenPrinterWithName(settings_.device_name().c_str())) + if (!printer.OpenPrinterWithName(settings_->device_name().c_str())) return FAILED; std::unique_ptr<DEVMODE, base::FreeDeleter> dev_mode = CreateDevMode(printer.Get(), nullptr); - return InitializeSettings(settings_.device_name(), dev_mode.get()); + return InitializeSettings(settings_->device_name(), dev_mode.get()); } PrintingContext::Result PrintingContextWin::NewDocument( @@ -366,9 +367,9 @@ skia::InitializeDC(context_); DCHECK(!in_print_job_); - settings_.set_device_name(device_name); + settings_->set_device_name(device_name); PrintSettingsInitializerWin::InitPrintSettings(context_, *dev_mode, - &settings_); + settings_.get()); return OK; }
diff --git a/printing/printing_context_win.h b/printing/printing_context_win.h index bc427a0..672307c 100644 --- a/printing/printing_context_win.h +++ b/printing/printing_context_win.h
@@ -22,7 +22,7 @@ ~PrintingContextWin() override; // Initializes with predefined settings. - Result InitWithSettingsForTest(const PrintSettings& settings); + Result InitWithSettingsForTest(std::unique_ptr<PrintSettings> settings); // PrintingContext implementation. void AskUserForSettings(int max_pages,
diff --git a/printing/printing_context_win_unittest.cc b/printing/printing_context_win_unittest.cc index 59aabfc..2c6bfa516 100644 --- a/printing/printing_context_win_unittest.cc +++ b/printing/printing_context_win_unittest.cc
@@ -7,6 +7,8 @@ #include <stddef.h> #include <stdint.h> +#include <utility> + #include "base/bind.h" #include "base/test/scoped_task_environment.h" #include "base/win/scoped_handle.h" @@ -175,11 +177,12 @@ if (IsTestCaseDisabled()) return; - PrintSettings settings; - settings.set_device_name(GetDefaultPrinter()); + auto settings = std::make_unique<PrintSettings>(); + settings->set_device_name(GetDefaultPrinter()); // Initialize it. PrintingContextWin context(this); - EXPECT_EQ(PrintingContext::OK, context.InitWithSettingsForTest(settings)); + EXPECT_EQ(PrintingContext::OK, + context.InitWithSettingsForTest(std::move(settings))); // The print may lie to use and may not support world transformation. // Verify right now.
diff --git a/remoting/base/buffered_socket_writer.cc b/remoting/base/buffered_socket_writer.cc index 16e1745..3ece800 100644 --- a/remoting/base/buffered_socket_writer.cc +++ b/remoting/base/buffered_socket_writer.cc
@@ -51,7 +51,7 @@ return result; } -BufferedSocketWriter::BufferedSocketWriter() : weak_factory_(this) {} +BufferedSocketWriter::BufferedSocketWriter() {} BufferedSocketWriter::~BufferedSocketWriter() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/base/buffered_socket_writer.h b/remoting/base/buffered_socket_writer.h index f3ee7de8..f3abd0f 100644 --- a/remoting/base/buffered_socket_writer.h +++ b/remoting/base/buffered_socket_writer.h
@@ -73,7 +73,7 @@ bool write_pending_ = false; - base::WeakPtrFactory<BufferedSocketWriter> weak_factory_; + base::WeakPtrFactory<BufferedSocketWriter> weak_factory_{this}; }; } // namespace remoting
diff --git a/remoting/base/grpc_support/grpc_async_executor.cc b/remoting/base/grpc_support/grpc_async_executor.cc index 96d87ca..6e8a345d 100644 --- a/remoting/base/grpc_support/grpc_async_executor.cc +++ b/remoting/base/grpc_support/grpc_async_executor.cc
@@ -89,7 +89,7 @@ } // namespace -GrpcAsyncExecutor::GrpcAsyncExecutor() : weak_factory_(this) { +GrpcAsyncExecutor::GrpcAsyncExecutor() { DETACH_FROM_SEQUENCE(sequence_checker_); }
diff --git a/remoting/base/grpc_support/grpc_async_executor.h b/remoting/base/grpc_support/grpc_async_executor.h index b63b5f3..6c8a400 100644 --- a/remoting/base/grpc_support/grpc_async_executor.h +++ b/remoting/base/grpc_support/grpc_async_executor.h
@@ -49,7 +49,7 @@ // destruction. PendingRequestList pending_requests_; - base::WeakPtrFactory<GrpcAsyncExecutor> weak_factory_; + base::WeakPtrFactory<GrpcAsyncExecutor> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GrpcAsyncExecutor); };
diff --git a/remoting/base/grpc_support/grpc_async_request.cc b/remoting/base/grpc_support/grpc_async_request.cc index b599fcf..4c0ad00 100644 --- a/remoting/base/grpc_support/grpc_async_request.cc +++ b/remoting/base/grpc_support/grpc_async_request.cc
@@ -8,7 +8,7 @@ namespace remoting { -GrpcAsyncRequest::GrpcAsyncRequest() : grpc_async_request_weak_factory_(this) {} +GrpcAsyncRequest::GrpcAsyncRequest() = default; GrpcAsyncRequest::~GrpcAsyncRequest() = default;
diff --git a/remoting/base/grpc_support/grpc_async_request.h b/remoting/base/grpc_support/grpc_async_request.h index 462c896..f5c8a28 100644 --- a/remoting/base/grpc_support/grpc_async_request.h +++ b/remoting/base/grpc_support/grpc_async_request.h
@@ -80,7 +80,7 @@ private: grpc_impl::ClientContext context_; - base::WeakPtrFactory<GrpcAsyncRequest> grpc_async_request_weak_factory_; + base::WeakPtrFactory<GrpcAsyncRequest> grpc_async_request_weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GrpcAsyncRequest); };
diff --git a/remoting/base/grpc_support/grpc_async_server_streaming_request.cc b/remoting/base/grpc_support/grpc_async_server_streaming_request.cc index f58257e4..9a053b9 100644 --- a/remoting/base/grpc_support/grpc_async_server_streaming_request.cc +++ b/remoting/base/grpc_support/grpc_async_server_streaming_request.cc
@@ -26,8 +26,7 @@ GrpcAsyncServerStreamingRequestBase::GrpcAsyncServerStreamingRequestBase( base::OnceClosure on_channel_ready, base::OnceCallback<void(const grpc::Status&)> on_channel_closed, - std::unique_ptr<ScopedGrpcServerStream>* scoped_stream) - : weak_factory_(this) { + std::unique_ptr<ScopedGrpcServerStream>* scoped_stream) { DCHECK(on_channel_closed); DCHECK_NE(nullptr, scoped_stream); on_channel_ready_ = std::move(on_channel_ready);
diff --git a/remoting/base/grpc_support/grpc_async_server_streaming_request.h b/remoting/base/grpc_support/grpc_async_server_streaming_request.h index e2ca25c..14823673 100644 --- a/remoting/base/grpc_support/grpc_async_server_streaming_request.h +++ b/remoting/base/grpc_support/grpc_async_server_streaming_request.h
@@ -101,7 +101,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<GrpcAsyncServerStreamingRequestBase> weak_factory_; + base::WeakPtrFactory<GrpcAsyncServerStreamingRequestBase> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GrpcAsyncServerStreamingRequestBase); };
diff --git a/remoting/base/grpc_support/grpc_authenticated_executor.cc b/remoting/base/grpc_support/grpc_authenticated_executor.cc index 601d26c..3c9b220 100644 --- a/remoting/base/grpc_support/grpc_authenticated_executor.cc +++ b/remoting/base/grpc_support/grpc_authenticated_executor.cc
@@ -15,8 +15,7 @@ namespace remoting { GrpcAuthenticatedExecutor::GrpcAuthenticatedExecutor( - OAuthTokenGetter* token_getter) - : weak_factory_(this) { + OAuthTokenGetter* token_getter) { DCHECK(token_getter); token_getter_ = token_getter; executor_ = std::make_unique<GrpcAsyncExecutor>();
diff --git a/remoting/base/grpc_support/grpc_authenticated_executor.h b/remoting/base/grpc_support/grpc_authenticated_executor.h index d28d92e..d97e32cf 100644 --- a/remoting/base/grpc_support/grpc_authenticated_executor.h +++ b/remoting/base/grpc_support/grpc_authenticated_executor.h
@@ -41,7 +41,7 @@ OAuthTokenGetter* token_getter_; std::unique_ptr<GrpcExecutor> executor_; - base::WeakPtrFactory<GrpcAuthenticatedExecutor> weak_factory_; + base::WeakPtrFactory<GrpcAuthenticatedExecutor> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GrpcAuthenticatedExecutor); };
diff --git a/remoting/base/grpc_support/scoped_grpc_server_stream.cc b/remoting/base/grpc_support/scoped_grpc_server_stream.cc index fb446726..86a2415 100644 --- a/remoting/base/grpc_support/scoped_grpc_server_stream.cc +++ b/remoting/base/grpc_support/scoped_grpc_server_stream.cc
@@ -10,7 +10,7 @@ ScopedGrpcServerStream::ScopedGrpcServerStream( base::WeakPtr<GrpcAsyncServerStreamingRequestBase> request) - : request_(request), weak_factory_(this) {} + : request_(request) {} ScopedGrpcServerStream::~ScopedGrpcServerStream() { if (request_) {
diff --git a/remoting/base/grpc_support/scoped_grpc_server_stream.h b/remoting/base/grpc_support/scoped_grpc_server_stream.h index bf398d7d..3e35e6b 100644 --- a/remoting/base/grpc_support/scoped_grpc_server_stream.h +++ b/remoting/base/grpc_support/scoped_grpc_server_stream.h
@@ -24,7 +24,7 @@ private: base::WeakPtr<GrpcAsyncServerStreamingRequestBase> request_; - base::WeakPtrFactory<ScopedGrpcServerStream> weak_factory_; + base::WeakPtrFactory<ScopedGrpcServerStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ScopedGrpcServerStream); };
diff --git a/remoting/base/oauth_token_getter_impl.cc b/remoting/base/oauth_token_getter_impl.cc index 308c82c5..438c185f 100644 --- a/remoting/base/oauth_token_getter_impl.cc +++ b/remoting/base/oauth_token_getter_impl.cc
@@ -35,8 +35,7 @@ : intermediate_credentials_(std::move(intermediate_credentials)), gaia_oauth_client_(new gaia::GaiaOAuthClient(url_loader_factory)), credentials_updated_callback_(on_credentials_update), - token_exchanger_(url_loader_factory), - weak_factory_(this) { + token_exchanger_(url_loader_factory) { if (auto_refresh) { refresh_timer_.reset(new base::OneShotTimer()); } @@ -51,8 +50,7 @@ : authorization_credentials_(std::move(authorization_credentials)), gaia_oauth_client_(new gaia::GaiaOAuthClient(url_loader_factory)), refresh_token_updated_callback_(on_refresh_token_updated), - token_exchanger_(url_loader_factory), - weak_factory_(this) { + token_exchanger_(url_loader_factory) { if (auto_refresh) { refresh_timer_.reset(new base::OneShotTimer()); }
diff --git a/remoting/base/oauth_token_getter_impl.h b/remoting/base/oauth_token_getter_impl.h index 1df91cc..fd8a883 100644 --- a/remoting/base/oauth_token_getter_impl.h +++ b/remoting/base/oauth_token_getter_impl.h
@@ -97,7 +97,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<OAuthTokenGetterImpl> weak_factory_; + base::WeakPtrFactory<OAuthTokenGetterImpl> weak_factory_{this}; }; } // namespace remoting
diff --git a/remoting/base/oauth_token_getter_proxy_unittest.cc b/remoting/base/oauth_token_getter_proxy_unittest.cc index a979dfe8..5c61ae8b 100644 --- a/remoting/base/oauth_token_getter_proxy_unittest.cc +++ b/remoting/base/oauth_token_getter_proxy_unittest.cc
@@ -48,11 +48,11 @@ THREAD_CHECKER(thread_checker_); - base::WeakPtrFactory<FakeOAuthTokenGetter> weak_factory_; + base::WeakPtrFactory<FakeOAuthTokenGetter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeOAuthTokenGetter); }; -FakeOAuthTokenGetter::FakeOAuthTokenGetter() : weak_factory_(this) { +FakeOAuthTokenGetter::FakeOAuthTokenGetter() { DETACH_FROM_THREAD(thread_checker_); }
diff --git a/remoting/base/socket_reader.cc b/remoting/base/socket_reader.cc index 6f90b10..cdb55d8 100644 --- a/remoting/base/socket_reader.cc +++ b/remoting/base/socket_reader.cc
@@ -19,10 +19,7 @@ int kReadBufferSize = 4096; } // namespace -SocketReader::SocketReader() - : socket_(NULL), - weak_factory_(this) { -} +SocketReader::SocketReader() : socket_(nullptr) {} SocketReader::~SocketReader() = default;
diff --git a/remoting/base/socket_reader.h b/remoting/base/socket_reader.h index 1c5c957..5dd3d3b 100644 --- a/remoting/base/socket_reader.h +++ b/remoting/base/socket_reader.h
@@ -46,7 +46,7 @@ ReadResultCallback read_result_callback_; scoped_refptr<net::IOBuffer> read_buffer_; - base::WeakPtrFactory<SocketReader> weak_factory_; + base::WeakPtrFactory<SocketReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SocketReader); };
diff --git a/remoting/client/chromoting_session.cc b/remoting/client/chromoting_session.cc index 6f3c83e5..7dde9b6 100644 --- a/remoting/client/chromoting_session.cc +++ b/remoting/client/chromoting_session.cc
@@ -203,7 +203,7 @@ // |weak_ptr_| in GetWeakPtr() so that its copies are still invalidated once // InvalidateWeakPtrs() is called. base::WeakPtr<Core> weak_ptr_; - base::WeakPtrFactory<Core> weak_factory_; + base::WeakPtrFactory<Core> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Core); }; @@ -212,8 +212,7 @@ std::unique_ptr<SessionContext> session_context) : runtime_(runtime), logger_(std::move(logger)), - session_context_(std::move(session_context)), - weak_factory_(this) { + session_context_(std::move(session_context)) { DCHECK(ui_task_runner()->BelongsToCurrentThread()); DCHECK(runtime_); DCHECK(logger_);
diff --git a/remoting/client/display/fake_canvas.cc b/remoting/client/display/fake_canvas.cc index fb7fde6b..5af4f1e6 100644 --- a/remoting/client/display/fake_canvas.cc +++ b/remoting/client/display/fake_canvas.cc
@@ -6,7 +6,7 @@ namespace remoting { -FakeCanvas::FakeCanvas() : weak_factory_(this) {} +FakeCanvas::FakeCanvas() {} FakeCanvas::~FakeCanvas() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/client/display/fake_canvas.h b/remoting/client/display/fake_canvas.h index 036091f..e150dac 100644 --- a/remoting/client/display/fake_canvas.h +++ b/remoting/client/display/fake_canvas.h
@@ -33,7 +33,7 @@ private: base::ThreadChecker thread_checker_; - base::WeakPtrFactory<Canvas> weak_factory_; + base::WeakPtrFactory<Canvas> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeCanvas); };
diff --git a/remoting/client/display/gl_canvas.cc b/remoting/client/display/gl_canvas.cc index 1eee53b2..cc5b513 100644 --- a/remoting/client/display/gl_canvas.cc +++ b/remoting/client/display/gl_canvas.cc
@@ -65,8 +65,7 @@ namespace remoting { -GlCanvas::GlCanvas(int gl_version) - : gl_version_(gl_version), weak_factory_(this) { +GlCanvas::GlCanvas(int gl_version) : gl_version_(gl_version) { glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size_); vertex_shader_ = CompileShader(GL_VERTEX_SHADER, kTexCoordToViewVert);
diff --git a/remoting/client/display/gl_canvas.h b/remoting/client/display/gl_canvas.h index 77608ce..9ed50d35 100644 --- a/remoting/client/display/gl_canvas.h +++ b/remoting/client/display/gl_canvas.h
@@ -57,7 +57,7 @@ GLuint tex_cord_location_; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<Canvas> weak_factory_; + base::WeakPtrFactory<Canvas> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlCanvas); };
diff --git a/remoting/client/display/gl_cursor.cc b/remoting/client/display/gl_cursor.cc index cabb758ec..3dad73a 100644 --- a/remoting/client/display/gl_cursor.cc +++ b/remoting/client/display/gl_cursor.cc
@@ -18,7 +18,7 @@ const int kDefaultCursorDataSize = 32 * 32 * GlRenderLayer::kBytesPerPixel; } // namespace -GlCursor::GlCursor() : weak_factory_(this) {} +GlCursor::GlCursor() {} GlCursor::~GlCursor() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/client/display/gl_cursor.h b/remoting/client/display/gl_cursor.h index 07997e0..a15fe16 100644 --- a/remoting/client/display/gl_cursor.h +++ b/remoting/client/display/gl_cursor.h
@@ -62,7 +62,7 @@ float cursor_y_ = 0; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<Drawable> weak_factory_; + base::WeakPtrFactory<Drawable> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlCursor); };
diff --git a/remoting/client/display/gl_cursor_feedback.cc b/remoting/client/display/gl_cursor_feedback.cc index 0e6fbfb..bbb88fc4 100644 --- a/remoting/client/display/gl_cursor_feedback.cc +++ b/remoting/client/display/gl_cursor_feedback.cc
@@ -43,7 +43,7 @@ namespace remoting { -GlCursorFeedback::GlCursorFeedback() : weak_factory_(this) {} +GlCursorFeedback::GlCursorFeedback() {} GlCursorFeedback::~GlCursorFeedback() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/client/display/gl_cursor_feedback.h b/remoting/client/display/gl_cursor_feedback.h index 70876e80..dcba54a0 100644 --- a/remoting/client/display/gl_cursor_feedback.h +++ b/remoting/client/display/gl_cursor_feedback.h
@@ -42,7 +42,7 @@ base::TimeTicks animation_start_time_; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<Drawable> weak_factory_; + base::WeakPtrFactory<Drawable> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlCursorFeedback); };
diff --git a/remoting/client/display/gl_desktop.cc b/remoting/client/display/gl_desktop.cc index fd7fb441..f628dcc 100644 --- a/remoting/client/display/gl_desktop.cc +++ b/remoting/client/display/gl_desktop.cc
@@ -57,7 +57,7 @@ webrtc::DesktopRect rect; }; -GlDesktop::GlDesktop() : weak_factory_(this) {} +GlDesktop::GlDesktop() {} GlDesktop::~GlDesktop() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/client/display/gl_desktop.h b/remoting/client/display/gl_desktop.h index 164ecc2..d5953dca 100644 --- a/remoting/client/display/gl_desktop.h +++ b/remoting/client/display/gl_desktop.h
@@ -48,7 +48,7 @@ int max_texture_size_ = 0; base::WeakPtr<Canvas> canvas_ = nullptr; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<Drawable> weak_factory_; + base::WeakPtrFactory<Drawable> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlDesktop); };
diff --git a/remoting/client/display/gl_renderer.cc b/remoting/client/display/gl_renderer.cc index 3a985944..13d9424 100644 --- a/remoting/client/display/gl_renderer.cc +++ b/remoting/client/display/gl_renderer.cc
@@ -27,8 +27,7 @@ } // namespace -GlRenderer::GlRenderer() : - weak_factory_(this) { +GlRenderer::GlRenderer() { weak_ptr_ = weak_factory_.GetWeakPtr(); thread_checker_.DetachFromThread(); }
diff --git a/remoting/client/display/gl_renderer.h b/remoting/client/display/gl_renderer.h index bd48ffb..1089fa79 100644 --- a/remoting/client/display/gl_renderer.h +++ b/remoting/client/display/gl_renderer.h
@@ -146,7 +146,7 @@ base::ThreadChecker thread_checker_; base::WeakPtr<GlRenderer> weak_ptr_; - base::WeakPtrFactory<GlRenderer> weak_factory_; + base::WeakPtrFactory<GlRenderer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GlRenderer); };
diff --git a/remoting/client/display/gl_renderer_unittest.cc b/remoting/client/display/gl_renderer_unittest.cc index e3b8785..03245536 100644 --- a/remoting/client/display/gl_renderer_unittest.cc +++ b/remoting/client/display/gl_renderer_unittest.cc
@@ -20,7 +20,7 @@ class FakeGlRendererDelegate : public GlRendererDelegate { public: - FakeGlRendererDelegate() : weak_factory_(this) {} + FakeGlRendererDelegate() {} bool CanRenderFrame() override { can_render_frame_call_count_++; @@ -69,14 +69,14 @@ int canvas_height_ = 0; base::Closure on_frame_rendered_callback_; - base::WeakPtrFactory<FakeGlRendererDelegate> weak_factory_; + base::WeakPtrFactory<FakeGlRendererDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeGlRendererDelegate); }; class FakeDrawable : public Drawable { public: - FakeDrawable() : weak_factory_(this) {} + FakeDrawable() {} void SetId(int id) { id_ = id; } int GetId() { return id_; } @@ -103,7 +103,7 @@ int id_ = -1; int z_index_ = -1; - base::WeakPtrFactory<FakeDrawable> weak_factory_; + base::WeakPtrFactory<FakeDrawable> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeDrawable); };
diff --git a/remoting/client/dual_buffer_frame_consumer.cc b/remoting/client/dual_buffer_frame_consumer.cc index c30f21b8..64a84c9 100644 --- a/remoting/client/dual_buffer_frame_consumer.cc +++ b/remoting/client/dual_buffer_frame_consumer.cc
@@ -70,10 +70,7 @@ const RenderCallback& callback, scoped_refptr<base::SingleThreadTaskRunner> task_runner, protocol::FrameConsumer::PixelFormat format) - : callback_(callback), - task_runner_(task_runner), - pixel_format_(format), - weak_factory_(this) { + : callback_(callback), task_runner_(task_runner), pixel_format_(format) { weak_ptr_ = weak_factory_.GetWeakPtr(); thread_checker_.DetachFromThread(); }
diff --git a/remoting/client/dual_buffer_frame_consumer.h b/remoting/client/dual_buffer_frame_consumer.h index 1932d8a..837abb1 100644 --- a/remoting/client/dual_buffer_frame_consumer.h +++ b/remoting/client/dual_buffer_frame_consumer.h
@@ -70,7 +70,7 @@ PixelFormat pixel_format_; base::ThreadChecker thread_checker_; base::WeakPtr<DualBufferFrameConsumer> weak_ptr_; - base::WeakPtrFactory<DualBufferFrameConsumer> weak_factory_; + base::WeakPtrFactory<DualBufferFrameConsumer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DualBufferFrameConsumer); };
diff --git a/remoting/client/gesture_interpreter.cc b/remoting/client/gesture_interpreter.cc index ec84a99..ef5cdbb 100644 --- a/remoting/client/gesture_interpreter.cc +++ b/remoting/client/gesture_interpreter.cc
@@ -27,8 +27,7 @@ scroll_animation_( kScrollFlingTimeConstant, base::Bind(&GestureInterpreter::ScrollWithoutAbortAnimations, - base::Unretained(this))), - weak_factory_(this) {} + base::Unretained(this))) {} GestureInterpreter::~GestureInterpreter() = default;
diff --git a/remoting/client/gesture_interpreter.h b/remoting/client/gesture_interpreter.h index 872fcac..7e1b2015 100644 --- a/remoting/client/gesture_interpreter.h +++ b/remoting/client/gesture_interpreter.h
@@ -119,7 +119,7 @@ FlingAnimation pan_animation_; FlingAnimation scroll_animation_; - base::WeakPtrFactory<GestureInterpreter> weak_factory_; + base::WeakPtrFactory<GestureInterpreter> weak_factory_{this}; // GestureInterpreter is neither copyable nor movable. DISALLOW_COPY_AND_ASSIGN(GestureInterpreter);
diff --git a/remoting/client/queued_task_poster.cc b/remoting/client/queued_task_poster.cc index 431fa5a..d31f279 100644 --- a/remoting/client/queued_task_poster.cc +++ b/remoting/client/queued_task_poster.cc
@@ -13,8 +13,7 @@ QueuedTaskPoster::QueuedTaskPoster( scoped_refptr<base::SingleThreadTaskRunner> target_task_runner) - : target_task_runner_(target_task_runner), - weak_factory_(this) {} + : target_task_runner_(target_task_runner) {} QueuedTaskPoster::~QueuedTaskPoster() { if (source_task_runner_) {
diff --git a/remoting/client/queued_task_poster.h b/remoting/client/queued_task_poster.h index 2976998f..1e5e90a 100644 --- a/remoting/client/queued_task_poster.h +++ b/remoting/client/queued_task_poster.h
@@ -40,7 +40,7 @@ bool transfer_task_scheduled_ = false; - base::WeakPtrFactory<QueuedTaskPoster> weak_factory_; + base::WeakPtrFactory<QueuedTaskPoster> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QueuedTaskPoster); };
diff --git a/remoting/client/software_video_renderer.cc b/remoting/client/software_video_renderer.cc index 58187fa..d3467c0 100644 --- a/remoting/client/software_video_renderer.cc +++ b/remoting/client/software_video_renderer.cc
@@ -46,7 +46,7 @@ } // namespace SoftwareVideoRenderer::SoftwareVideoRenderer(protocol::FrameConsumer* consumer) - : consumer_(consumer), weak_factory_(this) { + : consumer_(consumer) { thread_checker_.DetachFromThread(); }
diff --git a/remoting/client/software_video_renderer.h b/remoting/client/software_video_renderer.h index cdc0a19..cfa3ba4 100644 --- a/remoting/client/software_video_renderer.h +++ b/remoting/client/software_video_renderer.h
@@ -85,7 +85,7 @@ base::ThreadChecker thread_checker_; - base::WeakPtrFactory<SoftwareVideoRenderer> weak_factory_; + base::WeakPtrFactory<SoftwareVideoRenderer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SoftwareVideoRenderer); };
diff --git a/remoting/codec/webrtc_video_encoder_gpu.cc b/remoting/codec/webrtc_video_encoder_gpu.cc index 77f1c7f..ce331bc 100644 --- a/remoting/codec/webrtc_video_encoder_gpu.cc +++ b/remoting/codec/webrtc_video_encoder_gpu.cc
@@ -60,8 +60,7 @@ media::VideoCodecProfile codec_profile) : state_(UNINITIALIZED), codec_profile_(codec_profile), - bitrate_filter_(kH264MinimumTargetBitrateKbpsPerMegapixel), - weak_factory_(this) {} + bitrate_filter_(kH264MinimumTargetBitrateKbpsPerMegapixel) {} WebrtcVideoEncoderGpu::~WebrtcVideoEncoderGpu() = default;
diff --git a/remoting/codec/webrtc_video_encoder_gpu.h b/remoting/codec/webrtc_video_encoder_gpu.h index 15fbe07..82530ad2 100644 --- a/remoting/codec/webrtc_video_encoder_gpu.h +++ b/remoting/codec/webrtc_video_encoder_gpu.h
@@ -106,7 +106,7 @@ EncoderBitrateFilter bitrate_filter_; - base::WeakPtrFactory<WebrtcVideoEncoderGpu> weak_factory_; + base::WeakPtrFactory<WebrtcVideoEncoderGpu> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcVideoEncoderGpu); };
diff --git a/remoting/codec/webrtc_video_encoder_proxy.cc b/remoting/codec/webrtc_video_encoder_proxy.cc index 4cbfcde..d6c4030 100644 --- a/remoting/codec/webrtc_video_encoder_proxy.cc +++ b/remoting/codec/webrtc_video_encoder_proxy.cc
@@ -41,8 +41,7 @@ std::unique_ptr<WebrtcVideoEncoder> encoder, scoped_refptr<base::SequencedTaskRunner> encode_task_runner) : core_(new Core(std::move(encoder))), - encode_task_runner_(encode_task_runner), - weak_factory_(this) {} + encode_task_runner_(encode_task_runner) {} WebrtcVideoEncoderProxy::~WebrtcVideoEncoderProxy() { encode_task_runner_->DeleteSoon(FROM_HERE, core_.release());
diff --git a/remoting/codec/webrtc_video_encoder_proxy.h b/remoting/codec/webrtc_video_encoder_proxy.h index 4cc6c14e0..06e5328 100644 --- a/remoting/codec/webrtc_video_encoder_proxy.h +++ b/remoting/codec/webrtc_video_encoder_proxy.h
@@ -39,7 +39,7 @@ std::unique_ptr<Core> core_; scoped_refptr<base::SequencedTaskRunner> encode_task_runner_; - base::WeakPtrFactory<WebrtcVideoEncoderProxy> weak_factory_; + base::WeakPtrFactory<WebrtcVideoEncoderProxy> weak_factory_{this}; }; } // namespace remoting
diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc index a45e426..029947f 100644 --- a/remoting/host/chromoting_host.cc +++ b/remoting/host/chromoting_host.cc
@@ -77,8 +77,7 @@ video_encode_task_runner_(video_encode_task_runner), status_monitor_(new HostStatusMonitor()), login_backoff_(&kDefaultBackoffPolicy), - desktop_environment_options_(options), - weak_factory_(this) { + desktop_environment_options_(options) { jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop(); }
diff --git a/remoting/host/chromoting_host.h b/remoting/host/chromoting_host.h index 382b16c..29cc1c1 100644 --- a/remoting/host/chromoting_host.h +++ b/remoting/host/chromoting_host.h
@@ -175,7 +175,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<ChromotingHost> weak_factory_; + base::WeakPtrFactory<ChromotingHost> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ChromotingHost); };
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index 565e088..4c8760d 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc
@@ -75,8 +75,7 @@ // Note that |lossless_video_color_| defaults to true, but actually only // controls VP9 video stream color quality. lossless_video_color_(!base::CommandLine::ForCurrentProcess()->HasSwitch( - kDisableI444SwitchName)), - weak_factory_(this) { + kDisableI444SwitchName)) { connection_->session()->AddPlugin(&host_experiment_session_plugin_); connection_->SetEventHandler(this);
diff --git a/remoting/host/client_session.h b/remoting/host/client_session.h index a8b76d76..9bbaab34 100644 --- a/remoting/host/client_session.h +++ b/remoting/host/client_session.h
@@ -299,7 +299,7 @@ // Used to disable callbacks to |this| once DisconnectSession() has been // called. - base::WeakPtrFactory<ClientSessionControl> weak_factory_; + base::WeakPtrFactory<ClientSessionControl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ClientSession); };
diff --git a/remoting/host/config_file_watcher.cc b/remoting/host/config_file_watcher.cc index 376c5c9f..e161fd4 100644 --- a/remoting/host/config_file_watcher.cc +++ b/remoting/host/config_file_watcher.cc
@@ -83,7 +83,7 @@ scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; - base::WeakPtrFactory<ConfigFileWatcherImpl> weak_factory_; + base::WeakPtrFactory<ConfigFileWatcherImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ConfigFileWatcherImpl); }; @@ -113,8 +113,7 @@ retries_(0), delegate_(nullptr), main_task_runner_(main_task_runner), - io_task_runner_(io_task_runner), - weak_factory_(this) { + io_task_runner_(io_task_runner) { DCHECK(main_task_runner_->BelongsToCurrentThread()); }
diff --git a/remoting/host/desktop_capturer_proxy.cc b/remoting/host/desktop_capturer_proxy.cc index 3873154..4a99509 100644 --- a/remoting/host/desktop_capturer_proxy.cc +++ b/remoting/host/desktop_capturer_proxy.cc
@@ -130,8 +130,7 @@ base::WeakPtr<ClientSessionControl> client_session_control) : capture_task_runner_(capture_task_runner), client_session_control_(client_session_control), - desktop_display_info_(new DesktopDisplayInfo()), - weak_factory_(this) { + desktop_display_info_(new DesktopDisplayInfo()) { core_.reset(new Core(weak_factory_.GetWeakPtr())); }
diff --git a/remoting/host/desktop_capturer_proxy.h b/remoting/host/desktop_capturer_proxy.h index eab6fd94b..a5cb6a4 100644 --- a/remoting/host/desktop_capturer_proxy.h +++ b/remoting/host/desktop_capturer_proxy.h
@@ -71,7 +71,7 @@ // Contains the most recently gathered info about the desktop displays. std::unique_ptr<DesktopDisplayInfo> desktop_display_info_; - base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_; + base::WeakPtrFactory<DesktopCapturerProxy> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DesktopCapturerProxy); };
diff --git a/remoting/host/desktop_process.cc b/remoting/host/desktop_process.cc index 9b576db..0576be8 100644 --- a/remoting/host/desktop_process.cc +++ b/remoting/host/desktop_process.cc
@@ -14,7 +14,7 @@ #include "base/debug/alias.h" #include "base/logging.h" #include "base/memory/ref_counted.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/message_loop/message_pump_type.h" #include "base/strings/string_util.h" #include "build/build_config.h" @@ -39,8 +39,7 @@ : caller_task_runner_(caller_task_runner), input_task_runner_(input_task_runner), io_task_runner_(io_task_runner), - daemon_channel_handle_(std::move(daemon_channel_handle)), - weak_factory_(this) { + daemon_channel_handle_(std::move(daemon_channel_handle)) { DCHECK(caller_task_runner_->BelongsToCurrentThread()); DCHECK(base::MessageLoopCurrentForUI::IsSet()); }
diff --git a/remoting/host/desktop_process.h b/remoting/host/desktop_process.h index 0c084e92..74ac227 100644 --- a/remoting/host/desktop_process.h +++ b/remoting/host/desktop_process.h
@@ -89,7 +89,7 @@ // the network process. scoped_refptr<DesktopSessionAgent> desktop_agent_; - base::WeakPtrFactory<DesktopProcess> weak_factory_; + base::WeakPtrFactory<DesktopProcess> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DesktopProcess); };
diff --git a/remoting/host/desktop_session_agent.cc b/remoting/host/desktop_session_agent.cc index 1feea43..c287c0e 100644 --- a/remoting/host/desktop_session_agent.cc +++ b/remoting/host/desktop_session_agent.cc
@@ -213,8 +213,7 @@ caller_task_runner_(caller_task_runner), input_task_runner_(input_task_runner), io_task_runner_(io_task_runner), - current_process_stats_("DesktopSessionAgent"), - weak_factory_(this) { + current_process_stats_("DesktopSessionAgent") { DCHECK(caller_task_runner_->BelongsToCurrentThread()); }
diff --git a/remoting/host/desktop_session_agent.h b/remoting/host/desktop_session_agent.h index 195f65b3..3e0372a 100644 --- a/remoting/host/desktop_session_agent.h +++ b/remoting/host/desktop_session_agent.h
@@ -241,7 +241,7 @@ CurrentProcessStatsAgent current_process_stats_; // Used to disable callbacks to |this|. - base::WeakPtrFactory<DesktopSessionAgent> weak_factory_; + base::WeakPtrFactory<DesktopSessionAgent> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgent); };
diff --git a/remoting/host/desktop_session_agent_unittest.cc b/remoting/host/desktop_session_agent_unittest.cc index 2267641..bb5ffc2d 100644 --- a/remoting/host/desktop_session_agent_unittest.cc +++ b/remoting/host/desktop_session_agent_unittest.cc
@@ -45,12 +45,11 @@ private: FakeDesktopEnvironmentFactory factory_; - base::WeakPtrFactory<FakeDelegate> weak_ptr_; + base::WeakPtrFactory<FakeDelegate> weak_ptr_{this}; }; FakeDelegate::FakeDelegate(scoped_refptr<base::SingleThreadTaskRunner> runner) - : factory_(runner), - weak_ptr_(this) {} + : factory_(runner) {} class ProcessStatsListener : public IPC::Listener { public:
diff --git a/remoting/host/fake_desktop_environment.cc b/remoting/host/fake_desktop_environment.cc index 88fd127..7e73f45 100644 --- a/remoting/host/fake_desktop_environment.cc +++ b/remoting/host/fake_desktop_environment.cc
@@ -15,7 +15,7 @@ namespace remoting { -FakeInputInjector::FakeInputInjector() : weak_factory_(this) {} +FakeInputInjector::FakeInputInjector() {} FakeInputInjector::~FakeInputInjector() = default; void FakeInputInjector::Start( @@ -57,9 +57,7 @@ FakeDesktopEnvironment::FakeDesktopEnvironment( scoped_refptr<base::SingleThreadTaskRunner> capture_thread, const DesktopEnvironmentOptions& options) - : capture_thread_(std::move(capture_thread)), - options_(options), - weak_factory_(this) {} + : capture_thread_(std::move(capture_thread)), options_(options) {} FakeDesktopEnvironment::~FakeDesktopEnvironment() = default;
diff --git a/remoting/host/fake_desktop_environment.h b/remoting/host/fake_desktop_environment.h index a490c1d..ec75598e 100644 --- a/remoting/host/fake_desktop_environment.h +++ b/remoting/host/fake_desktop_environment.h
@@ -61,7 +61,7 @@ std::vector<protocol::TouchEvent>* touch_events_ = nullptr; std::vector<protocol::ClipboardEvent>* clipboard_events_ = nullptr; - base::WeakPtrFactory<FakeInputInjector> weak_factory_; + base::WeakPtrFactory<FakeInputInjector> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeInputInjector); }; @@ -118,7 +118,7 @@ const DesktopEnvironmentOptions options_; - base::WeakPtrFactory<FakeDesktopEnvironment> weak_factory_; + base::WeakPtrFactory<FakeDesktopEnvironment> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeDesktopEnvironment); };
diff --git a/remoting/host/file_transfer/fake_file_operations.cc b/remoting/host/file_transfer/fake_file_operations.cc index d8f4884..d947150 100644 --- a/remoting/host/file_transfer/fake_file_operations.cc +++ b/remoting/host/file_transfer/fake_file_operations.cc
@@ -36,7 +36,7 @@ base::FilePath filename_; std::size_t filesize_ = 0; std::size_t read_offset_ = 0; - base::WeakPtrFactory<FakeFileReader> weak_ptr_factory_; + base::WeakPtrFactory<FakeFileReader> weak_ptr_factory_{this}; }; class FakeFileOperations::FakeFileWriter : public FileOperations::Writer { @@ -57,7 +57,7 @@ TestIo* test_io_; base::FilePath filename_; std::vector<std::string> chunks_; - base::WeakPtrFactory<FakeFileWriter> weak_ptr_factory_; + base::WeakPtrFactory<FakeFileWriter> weak_ptr_factory_{this}; }; std::unique_ptr<FileOperations::Reader> FakeFileOperations::CreateReader() { @@ -110,7 +110,7 @@ FakeFileOperations::TestIo::~TestIo() = default; FakeFileOperations::FakeFileReader::FakeFileReader(TestIo* test_io) - : test_io_(test_io), weak_ptr_factory_(this) {} + : test_io_(test_io) {} FakeFileOperations::FakeFileReader::~FakeFileReader() = default; @@ -191,7 +191,7 @@ } FakeFileOperations::FakeFileWriter::FakeFileWriter(TestIo* test_io) - : test_io_(test_io), weak_ptr_factory_(this) {} + : test_io_(test_io) {} FakeFileOperations::FakeFileWriter::~FakeFileWriter() { if (state_ == FileOperations::kCreated ||
diff --git a/remoting/host/file_transfer/file_chooser_linux.cc b/remoting/host/file_transfer/file_chooser_linux.cc index 857b1ef..90d3641 100644 --- a/remoting/host/file_transfer/file_chooser_linux.cc +++ b/remoting/host/file_transfer/file_chooser_linux.cc
@@ -65,7 +65,7 @@ private: FileChooser::ResultCallback callback_; base::SequenceBound<GtkFileChooserOnUiThread> gtk_file_chooser_on_ui_thread_; - base::WeakPtrFactory<FileChooserLinux> weak_ptr_factory_; + base::WeakPtrFactory<FileChooserLinux> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileChooserLinux); }; @@ -151,7 +151,7 @@ FileChooserLinux::FileChooserLinux( scoped_refptr<base::SequencedTaskRunner> ui_task_runner, ResultCallback callback) - : callback_(std::move(callback)), weak_ptr_factory_(this) { + : callback_(std::move(callback)) { gtk_file_chooser_on_ui_thread_ = base::SequenceBound<GtkFileChooserOnUiThread>( ui_task_runner, base::SequencedTaskRunnerHandle::Get(),
diff --git a/remoting/host/file_transfer/file_transfer_message_handler.cc b/remoting/host/file_transfer/file_transfer_message_handler.cc index 4831e6e9..2b5f2aa 100644 --- a/remoting/host/file_transfer/file_transfer_message_handler.cc +++ b/remoting/host/file_transfer/file_transfer_message_handler.cc
@@ -40,8 +40,7 @@ std::unique_ptr<protocol::MessagePipe> pipe, std::unique_ptr<FileOperations> file_operations) : protocol::NamedMessagePipeHandler(name, std::move(pipe)), - file_operations_(std::move(file_operations)), - weak_ptr_factory_(this) { + file_operations_(std::move(file_operations)) { DCHECK(file_operations_); }
diff --git a/remoting/host/file_transfer/file_transfer_message_handler.h b/remoting/host/file_transfer/file_transfer_message_handler.h index 4db624e..7ede176 100644 --- a/remoting/host/file_transfer/file_transfer_message_handler.h +++ b/remoting/host/file_transfer/file_transfer_message_handler.h
@@ -86,7 +86,7 @@ base::Optional<BufferedFileWriter> buffered_file_writer_; std::unique_ptr<FileOperations::Reader> file_reader_; std::size_t queued_chunks_ = 0; - base::WeakPtrFactory<FileTransferMessageHandler> weak_ptr_factory_; + base::WeakPtrFactory<FileTransferMessageHandler> weak_ptr_factory_{this}; }; } // namespace remoting
diff --git a/remoting/host/file_transfer/ipc_file_operations.cc b/remoting/host/file_transfer/ipc_file_operations.cc index e325cf75..675e81a 100644 --- a/remoting/host/file_transfer/ipc_file_operations.cc +++ b/remoting/host/file_transfer/ipc_file_operations.cc
@@ -84,7 +84,7 @@ } IpcFileOperations::SharedState::SharedState(RequestHandler* request_handler) - : request_handler(request_handler), weak_ptr_factory(this) {} + : request_handler(request_handler) {} void IpcFileOperations::SharedState::Abort(std::uint64_t file_id) { request_handler->Cancel(file_id);
diff --git a/remoting/host/file_transfer/ipc_file_operations.h b/remoting/host/file_transfer/ipc_file_operations.h index 44f998f..2f2af81 100644 --- a/remoting/host/file_transfer/ipc_file_operations.h +++ b/remoting/host/file_transfer/ipc_file_operations.h
@@ -91,7 +91,7 @@ // The associated RequestHandler. RequestHandler* request_handler; - base::WeakPtrFactory<SharedState> weak_ptr_factory; + base::WeakPtrFactory<SharedState> weak_ptr_factory{this}; private: DISALLOW_COPY_AND_ASSIGN(SharedState);
diff --git a/remoting/host/file_transfer/local_file_operations.cc b/remoting/host/file_transfer/local_file_operations.cc index c362f922..b09064a 100644 --- a/remoting/host/file_transfer/local_file_operations.cc +++ b/remoting/host/file_transfer/local_file_operations.cc
@@ -97,7 +97,7 @@ std::unique_ptr<FileChooser> file_chooser_; base::Optional<base::FileProxy> file_proxy_; SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<LocalFileReader> weak_ptr_factory_; + base::WeakPtrFactory<LocalFileReader> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(LocalFileReader); }; @@ -147,14 +147,14 @@ scoped_refptr<base::SequencedTaskRunner> file_task_runner_; base::Optional<base::FileProxy> file_proxy_; SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<LocalFileWriter> weak_ptr_factory_; + base::WeakPtrFactory<LocalFileWriter> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(LocalFileWriter); }; LocalFileReader::LocalFileReader( scoped_refptr<base::SequencedTaskRunner> ui_task_runner) - : ui_task_runner_(std::move(ui_task_runner)), weak_ptr_factory_(this) {} + : ui_task_runner_(std::move(ui_task_runner)) {} LocalFileReader::~LocalFileReader() = default; @@ -296,7 +296,7 @@ state_ = state; } -LocalFileWriter::LocalFileWriter() : weak_ptr_factory_(this) {} +LocalFileWriter::LocalFileWriter() {} LocalFileWriter::~LocalFileWriter() { Cancel();
diff --git a/remoting/host/ftl_host_change_notification_listener.cc b/remoting/host/ftl_host_change_notification_listener.cc index 737cc5d8..dc9a119 100644 --- a/remoting/host/ftl_host_change_notification_listener.cc +++ b/remoting/host/ftl_host_change_notification_listener.cc
@@ -16,9 +16,7 @@ FtlHostChangeNotificationListener::FtlHostChangeNotificationListener( Listener* listener, SignalStrategy* signal_strategy) - : listener_(listener), - signal_strategy_(signal_strategy), - weak_factory_(this) { + : listener_(listener), signal_strategy_(signal_strategy) { DCHECK(signal_strategy_); signal_strategy_->AddListener(this);
diff --git a/remoting/host/ftl_host_change_notification_listener.h b/remoting/host/ftl_host_change_notification_listener.h index b6ac790..0e2ccab4 100644 --- a/remoting/host/ftl_host_change_notification_listener.h +++ b/remoting/host/ftl_host_change_notification_listener.h
@@ -47,7 +47,7 @@ Listener* listener_; SignalStrategy* signal_strategy_; - base::WeakPtrFactory<FtlHostChangeNotificationListener> weak_factory_; + base::WeakPtrFactory<FtlHostChangeNotificationListener> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FtlHostChangeNotificationListener); };
diff --git a/remoting/host/host_window_proxy.cc b/remoting/host/host_window_proxy.cc index 7f48f428..13f645c 100644 --- a/remoting/host/host_window_proxy.cc +++ b/remoting/host/host_window_proxy.cc
@@ -67,7 +67,7 @@ std::unique_ptr<HostWindow> host_window_; // Used to create the control pointer passed to |host_window_|. - base::WeakPtrFactory<ClientSessionControl> weak_factory_; + base::WeakPtrFactory<ClientSessionControl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Core); }; @@ -103,8 +103,7 @@ std::unique_ptr<HostWindow> host_window) : caller_task_runner_(caller_task_runner), ui_task_runner_(ui_task_runner), - host_window_(std::move(host_window)), - weak_factory_(this) { + host_window_(std::move(host_window)) { DCHECK(caller_task_runner->BelongsToCurrentThread()); }
diff --git a/remoting/host/ipc_audio_capturer.cc b/remoting/host/ipc_audio_capturer.cc index fe49ad8..622bdd34 100644 --- a/remoting/host/ipc_audio_capturer.cc +++ b/remoting/host/ipc_audio_capturer.cc
@@ -13,9 +13,7 @@ IpcAudioCapturer::IpcAudioCapturer( scoped_refptr<DesktopSessionProxy> desktop_session_proxy) - : desktop_session_proxy_(desktop_session_proxy), - weak_factory_(this) { -} + : desktop_session_proxy_(desktop_session_proxy) {} IpcAudioCapturer::~IpcAudioCapturer() = default;
diff --git a/remoting/host/ipc_audio_capturer.h b/remoting/host/ipc_audio_capturer.h index aac678d..d812e9f 100644 --- a/remoting/host/ipc_audio_capturer.h +++ b/remoting/host/ipc_audio_capturer.h
@@ -37,7 +37,7 @@ scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; // Used to cancel tasks pending on the capturer when it is stopped. - base::WeakPtrFactory<IpcAudioCapturer> weak_factory_; + base::WeakPtrFactory<IpcAudioCapturer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IpcAudioCapturer); };
diff --git a/remoting/host/ipc_desktop_environment.cc b/remoting/host/ipc_desktop_environment.cc index 20ffeb9..b504fd124 100644 --- a/remoting/host/ipc_desktop_environment.cc +++ b/remoting/host/ipc_desktop_environment.cc
@@ -97,8 +97,7 @@ : audio_task_runner_(audio_task_runner), caller_task_runner_(caller_task_runner), io_task_runner_(io_task_runner), - daemon_channel_(daemon_channel), - connector_factory_(this) {} + daemon_channel_(daemon_channel) {} IpcDesktopEnvironmentFactory::~IpcDesktopEnvironmentFactory() = default;
diff --git a/remoting/host/ipc_desktop_environment.h b/remoting/host/ipc_desktop_environment.h index 355af78..6b4e6db 100644 --- a/remoting/host/ipc_desktop_environment.h +++ b/remoting/host/ipc_desktop_environment.h
@@ -126,7 +126,7 @@ int next_id_ = 0; // Factory for weak pointers to DesktopSessionConnector interface. - base::WeakPtrFactory<DesktopSessionConnector> connector_factory_; + base::WeakPtrFactory<DesktopSessionConnector> connector_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IpcDesktopEnvironmentFactory); };
diff --git a/remoting/host/ipc_mouse_cursor_monitor.cc b/remoting/host/ipc_mouse_cursor_monitor.cc index 081e3fe..bbcdb61 100644 --- a/remoting/host/ipc_mouse_cursor_monitor.cc +++ b/remoting/host/ipc_mouse_cursor_monitor.cc
@@ -11,10 +11,7 @@ IpcMouseCursorMonitor::IpcMouseCursorMonitor( scoped_refptr<DesktopSessionProxy> desktop_session_proxy) - : callback_(nullptr), - desktop_session_proxy_(desktop_session_proxy), - weak_factory_(this) { -} + : callback_(nullptr), desktop_session_proxy_(desktop_session_proxy) {} IpcMouseCursorMonitor::~IpcMouseCursorMonitor() = default;
diff --git a/remoting/host/ipc_mouse_cursor_monitor.h b/remoting/host/ipc_mouse_cursor_monitor.h index 528e89d..b80012e 100644 --- a/remoting/host/ipc_mouse_cursor_monitor.h +++ b/remoting/host/ipc_mouse_cursor_monitor.h
@@ -40,7 +40,7 @@ scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; // Used to cancel tasks pending on the capturer when it is stopped. - base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_; + base::WeakPtrFactory<IpcMouseCursorMonitor> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IpcMouseCursorMonitor); };
diff --git a/remoting/host/ipc_video_frame_capturer.cc b/remoting/host/ipc_video_frame_capturer.cc index a6044f6b..81f5a30 100644 --- a/remoting/host/ipc_video_frame_capturer.cc +++ b/remoting/host/ipc_video_frame_capturer.cc
@@ -14,9 +14,7 @@ scoped_refptr<DesktopSessionProxy> desktop_session_proxy) : callback_(nullptr), desktop_session_proxy_(desktop_session_proxy), - capture_pending_(false), - weak_factory_(this) { -} + capture_pending_(false) {} IpcVideoFrameCapturer::~IpcVideoFrameCapturer() = default;
diff --git a/remoting/host/ipc_video_frame_capturer.h b/remoting/host/ipc_video_frame_capturer.h index 8677239b..45b9984 100644 --- a/remoting/host/ipc_video_frame_capturer.h +++ b/remoting/host/ipc_video_frame_capturer.h
@@ -47,7 +47,7 @@ bool capture_pending_; // Used to cancel tasks pending on the capturer when it is stopped. - base::WeakPtrFactory<IpcVideoFrameCapturer> weak_factory_; + base::WeakPtrFactory<IpcVideoFrameCapturer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IpcVideoFrameCapturer); };
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc index 0e4cfc1..605a7b6eb 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc +++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy.cc
@@ -77,8 +77,7 @@ It2MeConfirmationDialogProxy::It2MeConfirmationDialogProxy( scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, - std::unique_ptr<It2MeConfirmationDialog> dialog) - : weak_factory_(this) { + std::unique_ptr<It2MeConfirmationDialog> dialog) { core_.reset(new Core(ui_task_runner, base::ThreadTaskRunnerHandle::Get(), weak_factory_.GetWeakPtr(), std::move(dialog))); }
diff --git a/remoting/host/it2me/it2me_confirmation_dialog_proxy.h b/remoting/host/it2me/it2me_confirmation_dialog_proxy.h index 1fbf6c6..53925ea 100644 --- a/remoting/host/it2me/it2me_confirmation_dialog_proxy.h +++ b/remoting/host/it2me/it2me_confirmation_dialog_proxy.h
@@ -37,7 +37,7 @@ std::unique_ptr<Core> core_; It2MeConfirmationDialog::ResultCallback callback_; - base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_; + base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); };
diff --git a/remoting/host/it2me/it2me_host_unittest.cc b/remoting/host/it2me/it2me_host_unittest.cc index 103becf..3dc361ee 100644 --- a/remoting/host/it2me/it2me_host_unittest.cc +++ b/remoting/host/it2me/it2me_host_unittest.cc
@@ -199,12 +199,12 @@ scoped_refptr<AutoThreadTaskRunner> network_task_runner_; scoped_refptr<AutoThreadTaskRunner> ui_task_runner_; - base::WeakPtrFactory<It2MeHostTest> weak_factory_; + base::WeakPtrFactory<It2MeHostTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(It2MeHostTest); }; -It2MeHostTest::It2MeHostTest() : weak_factory_(this) {} +It2MeHostTest::It2MeHostTest() {} It2MeHostTest::~It2MeHostTest() = default; void It2MeHostTest::SetUp() {
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc index 7c95db5e..a6b2e81 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.cc +++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -103,8 +103,7 @@ : needs_elevation_(needs_elevation), host_context_(std::move(context)), factory_(std::move(factory)), - policy_watcher_(std::move(policy_watcher)), - weak_factory_(this) { + policy_watcher_(std::move(policy_watcher)) { weak_ptr_ = weak_factory_.GetWeakPtr(); // The policy watcher runs on the |file_task_runner| but we want to run the
diff --git a/remoting/host/it2me/it2me_native_messaging_host.h b/remoting/host/it2me/it2me_native_messaging_host.h index 5a6d628b..ac2cd561 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.h +++ b/remoting/host/it2me/it2me_native_messaging_host.h
@@ -169,7 +169,7 @@ base::Closure policy_error_closure_for_testing_; base::WeakPtr<It2MeNativeMessagingHost> weak_ptr_; - base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_; + base::WeakPtrFactory<It2MeNativeMessagingHost> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(It2MeNativeMessagingHost); };
diff --git a/remoting/host/linux/certificate_watcher.cc b/remoting/host/linux/certificate_watcher.cc index 2f412818..6e9c9d99 100644 --- a/remoting/host/linux/certificate_watcher.cc +++ b/remoting/host/linux/certificate_watcher.cc
@@ -174,8 +174,7 @@ : restart_action_(restart_action), caller_task_runner_(base::ThreadTaskRunnerHandle::Get()), io_task_runner_(io_task_runner), - delay_(base::TimeDelta::FromSeconds(kReadDelayInSeconds)), - weak_factory_(this) { + delay_(base::TimeDelta::FromSeconds(kReadDelayInSeconds)) { if (!base::PathService::Get(base::DIR_HOME, &cert_watch_path_)) { LOG(FATAL) << "Failed to get path of the home directory."; }
diff --git a/remoting/host/linux/certificate_watcher.h b/remoting/host/linux/certificate_watcher.h index c243e31..45ba8e8a 100644 --- a/remoting/host/linux/certificate_watcher.h +++ b/remoting/host/linux/certificate_watcher.h
@@ -94,7 +94,7 @@ // detected. base::TimeDelta delay_; - base::WeakPtrFactory<CertificateWatcher> weak_factory_; + base::WeakPtrFactory<CertificateWatcher> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(CertificateWatcher); };
diff --git a/remoting/host/mouse_cursor_monitor_proxy.cc b/remoting/host/mouse_cursor_monitor_proxy.cc index 355eb30..982f778 100644 --- a/remoting/host/mouse_cursor_monitor_proxy.cc +++ b/remoting/host/mouse_cursor_monitor_proxy.cc
@@ -115,7 +115,7 @@ MouseCursorMonitorProxy::MouseCursorMonitorProxy( scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, const webrtc::DesktopCaptureOptions& options) - : capture_task_runner_(capture_task_runner), weak_factory_(this) { + : capture_task_runner_(capture_task_runner) { core_.reset(new Core(weak_factory_.GetWeakPtr())); capture_task_runner_->PostTask( FROM_HERE, base::BindOnce(&Core::CreateMouseCursorMonitor,
diff --git a/remoting/host/mouse_cursor_monitor_proxy.h b/remoting/host/mouse_cursor_monitor_proxy.h index 916c2a1c..792da031 100644 --- a/remoting/host/mouse_cursor_monitor_proxy.h +++ b/remoting/host/mouse_cursor_monitor_proxy.h
@@ -49,7 +49,7 @@ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; Callback* callback_ = nullptr; - base::WeakPtrFactory<MouseCursorMonitorProxy> weak_factory_; + base::WeakPtrFactory<MouseCursorMonitorProxy> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MouseCursorMonitorProxy); };
diff --git a/remoting/host/native_messaging/log_message_handler.cc b/remoting/host/native_messaging/log_message_handler.cc index efaf21af..850cfbba 100644 --- a/remoting/host/native_messaging/log_message_handler.cc +++ b/remoting/host/native_messaging/log_message_handler.cc
@@ -25,12 +25,10 @@ LogMessageHandler* g_log_message_handler = nullptr; } // namespace -LogMessageHandler::LogMessageHandler( - const Delegate& delegate) +LogMessageHandler::LogMessageHandler(const Delegate& delegate) : delegate_(delegate), suppress_logging_(false), - caller_task_runner_(base::ThreadTaskRunnerHandle::Get()), - weak_ptr_factory_(this) { + caller_task_runner_(base::ThreadTaskRunnerHandle::Get()) { base::AutoLock lock(g_log_message_handler_lock.Get()); if (g_log_message_handler) { LOG(FATAL) << "LogMessageHandler is already registered. Only one instance "
diff --git a/remoting/host/native_messaging/log_message_handler.h b/remoting/host/native_messaging/log_message_handler.h index 7c5cea0..4ae3f642 100644 --- a/remoting/host/native_messaging/log_message_handler.h +++ b/remoting/host/native_messaging/log_message_handler.h
@@ -47,7 +47,7 @@ bool suppress_logging_; scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_; logging::LogMessageHandlerFunction previous_log_message_handler_; - base::WeakPtrFactory<LogMessageHandler> weak_ptr_factory_; + base::WeakPtrFactory<LogMessageHandler> weak_ptr_factory_{this}; }; } // namespace remoting
diff --git a/remoting/host/native_messaging/native_messaging_reader.cc b/remoting/host/native_messaging/native_messaging_reader.cc index 6ee6fa5..f5ada47c 100644 --- a/remoting/host/native_messaging/native_messaging_reader.cc +++ b/remoting/host/native_messaging/native_messaging_reader.cc
@@ -144,8 +144,7 @@ } NativeMessagingReader::NativeMessagingReader(base::File file) - : reader_thread_("Reader"), - weak_factory_(this) { + : reader_thread_("Reader") { reader_thread_.StartWithOptions( base::Thread::Options(base::MessagePumpType::IO, /*size=*/0));
diff --git a/remoting/host/native_messaging/native_messaging_reader.h b/remoting/host/native_messaging/native_messaging_reader.h index 482d48fb..415ba98 100644 --- a/remoting/host/native_messaging/native_messaging_reader.h +++ b/remoting/host/native_messaging/native_messaging_reader.h
@@ -63,7 +63,7 @@ // Allows the reader to be deleted safely even when tasks may be pending on // it. - base::WeakPtrFactory<NativeMessagingReader> weak_factory_; + base::WeakPtrFactory<NativeMessagingReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(NativeMessagingReader); };
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.cc b/remoting/host/native_messaging/pipe_messaging_channel.cc index 93cd273..54f89e0 100644 --- a/remoting/host/native_messaging/pipe_messaging_channel.cc +++ b/remoting/host/native_messaging/pipe_messaging_channel.cc
@@ -51,8 +51,7 @@ : native_messaging_reader_(DuplicatePlatformFile(std::move(input))), native_messaging_writer_( new NativeMessagingWriter(DuplicatePlatformFile(std::move(output)))), - event_handler_(nullptr), - weak_factory_(this) { + event_handler_(nullptr) { weak_ptr_ = weak_factory_.GetWeakPtr(); }
diff --git a/remoting/host/native_messaging/pipe_messaging_channel.h b/remoting/host/native_messaging/pipe_messaging_channel.h index 4ebd2f4..873c95e 100644 --- a/remoting/host/native_messaging/pipe_messaging_channel.h +++ b/remoting/host/native_messaging/pipe_messaging_channel.h
@@ -56,7 +56,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<PipeMessagingChannel> weak_factory_; + base::WeakPtrFactory<PipeMessagingChannel> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PipeMessagingChannel); };
diff --git a/remoting/host/resizing_host_observer.cc b/remoting/host/resizing_host_observer.cc index 371daff..ffc6027 100644 --- a/remoting/host/resizing_host_observer.cc +++ b/remoting/host/resizing_host_observer.cc
@@ -122,8 +122,7 @@ bool restore) : desktop_resizer_(std::move(desktop_resizer)), restore_(restore), - now_function_(base::Bind(base::TimeTicks::Now)), - weak_factory_(this) {} + now_function_(base::Bind(base::TimeTicks::Now)) {} ResizingHostObserver::~ResizingHostObserver() { if (restore_)
diff --git a/remoting/host/resizing_host_observer.h b/remoting/host/resizing_host_observer.h index 927c8dcb..8f55ad9 100644 --- a/remoting/host/resizing_host_observer.h +++ b/remoting/host/resizing_host_observer.h
@@ -56,7 +56,7 @@ base::TimeTicks previous_resize_time_; base::Callback<base::TimeTicks(void)> now_function_; - base::WeakPtrFactory<ResizingHostObserver> weak_factory_; + base::WeakPtrFactory<ResizingHostObserver> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver); };
diff --git a/remoting/host/security_key/fake_security_key_ipc_client.cc b/remoting/host/security_key/fake_security_key_ipc_client.cc index 7c10862..97d3501a 100644 --- a/remoting/host/security_key/fake_security_key_ipc_client.cc +++ b/remoting/host/security_key/fake_security_key_ipc_client.cc
@@ -22,7 +22,7 @@ FakeSecurityKeyIpcClient::FakeSecurityKeyIpcClient( const base::Closure& channel_event_callback) - : channel_event_callback_(channel_event_callback), weak_factory_(this) { + : channel_event_callback_(channel_event_callback) { DCHECK(!channel_event_callback_.is_null()); }
diff --git a/remoting/host/security_key/fake_security_key_ipc_client.h b/remoting/host/security_key/fake_security_key_ipc_client.h index f8d784a8..863d8831 100644 --- a/remoting/host/security_key/fake_security_key_ipc_client.h +++ b/remoting/host/security_key/fake_security_key_ipc_client.h
@@ -132,7 +132,7 @@ // Value returned by SendSecurityKeyRequest() method. std::string security_key_response_payload_; - base::WeakPtrFactory<FakeSecurityKeyIpcClient> weak_factory_; + base::WeakPtrFactory<FakeSecurityKeyIpcClient> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcClient); };
diff --git a/remoting/host/security_key/fake_security_key_ipc_server.cc b/remoting/host/security_key/fake_security_key_ipc_server.cc index d8c93dc..6ac80785 100644 --- a/remoting/host/security_key/fake_security_key_ipc_server.cc +++ b/remoting/host/security_key/fake_security_key_ipc_server.cc
@@ -31,8 +31,7 @@ : connection_id_(connection_id), send_message_callback_(send_message_callback), connect_callback_(connect_callback), - channel_closed_callback_(channel_closed_callback), - weak_factory_(this) {} + channel_closed_callback_(channel_closed_callback) {} FakeSecurityKeyIpcServer::~FakeSecurityKeyIpcServer() = default;
diff --git a/remoting/host/security_key/fake_security_key_ipc_server.h b/remoting/host/security_key/fake_security_key_ipc_server.h index 2162bf5..33d64b3 100644 --- a/remoting/host/security_key/fake_security_key_ipc_server.h +++ b/remoting/host/security_key/fake_security_key_ipc_server.h
@@ -103,7 +103,7 @@ std::unique_ptr<IPC::Channel> ipc_channel_; // NOTE: Weak pointers must be invalidated before all other member variables. - base::WeakPtrFactory<FakeSecurityKeyIpcServer> weak_factory_; + base::WeakPtrFactory<FakeSecurityKeyIpcServer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyIpcServer); };
diff --git a/remoting/host/security_key/fake_security_key_message_reader.cc b/remoting/host/security_key/fake_security_key_message_reader.cc index ee1f875..05532501 100644 --- a/remoting/host/security_key/fake_security_key_message_reader.cc +++ b/remoting/host/security_key/fake_security_key_message_reader.cc
@@ -10,8 +10,7 @@ namespace remoting { -FakeSecurityKeyMessageReader::FakeSecurityKeyMessageReader() - : weak_factory_(this) {} +FakeSecurityKeyMessageReader::FakeSecurityKeyMessageReader() {} FakeSecurityKeyMessageReader::~FakeSecurityKeyMessageReader() = default;
diff --git a/remoting/host/security_key/fake_security_key_message_reader.h b/remoting/host/security_key/fake_security_key_message_reader.h index 9287c1e..9b1a23de 100644 --- a/remoting/host/security_key/fake_security_key_message_reader.h +++ b/remoting/host/security_key/fake_security_key_message_reader.h
@@ -37,7 +37,7 @@ SecurityKeyMessageCallback message_callback_; base::Closure error_callback_; - base::WeakPtrFactory<FakeSecurityKeyMessageReader> weak_factory_; + base::WeakPtrFactory<FakeSecurityKeyMessageReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyMessageReader); };
diff --git a/remoting/host/security_key/fake_security_key_message_writer.cc b/remoting/host/security_key/fake_security_key_message_writer.cc index 22d55a7..7666d1e 100644 --- a/remoting/host/security_key/fake_security_key_message_writer.cc +++ b/remoting/host/security_key/fake_security_key_message_writer.cc
@@ -18,7 +18,7 @@ FakeSecurityKeyMessageWriter::FakeSecurityKeyMessageWriter( const base::Closure& write_callback) - : write_callback_(write_callback), weak_factory_(this) { + : write_callback_(write_callback) { DCHECK(!write_callback_.is_null()); }
diff --git a/remoting/host/security_key/fake_security_key_message_writer.h b/remoting/host/security_key/fake_security_key_message_writer.h index c131751..729ed55d5 100644 --- a/remoting/host/security_key/fake_security_key_message_writer.h +++ b/remoting/host/security_key/fake_security_key_message_writer.h
@@ -50,7 +50,7 @@ // Signaled whenever a write is requested. base::Closure write_callback_; - base::WeakPtrFactory<FakeSecurityKeyMessageWriter> weak_factory_; + base::WeakPtrFactory<FakeSecurityKeyMessageWriter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSecurityKeyMessageWriter); };
diff --git a/remoting/host/security_key/security_key_auth_handler_posix.cc b/remoting/host/security_key/security_key_auth_handler_posix.cc index d27115b9..d5541fc 100644 --- a/remoting/host/security_key/security_key_auth_handler_posix.cc +++ b/remoting/host/security_key/security_key_auth_handler_posix.cc
@@ -123,7 +123,7 @@ // Timeout used for a request. base::TimeDelta request_timeout_; - base::WeakPtrFactory<SecurityKeyAuthHandlerPosix> weak_factory_; + base::WeakPtrFactory<SecurityKeyAuthHandlerPosix> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SecurityKeyAuthHandlerPosix); }; @@ -147,8 +147,7 @@ scoped_refptr<base::SingleThreadTaskRunner> file_task_runner) : file_task_runner_(file_task_runner), request_timeout_( - base::TimeDelta::FromSeconds(kDefaultRequestTimeoutSeconds)), - weak_factory_(this) {} + base::TimeDelta::FromSeconds(kDefaultRequestTimeoutSeconds)) {} SecurityKeyAuthHandlerPosix::~SecurityKeyAuthHandlerPosix() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/host/security_key/security_key_ipc_client.cc b/remoting/host/security_key/security_key_ipc_client.cc index eb4f5230..48560df 100644 --- a/remoting/host/security_key/security_key_ipc_client.cc +++ b/remoting/host/security_key/security_key_ipc_client.cc
@@ -21,8 +21,7 @@ namespace remoting { SecurityKeyIpcClient::SecurityKeyIpcClient() - : named_channel_handle_(remoting::GetSecurityKeyIpcChannel()), - weak_factory_(this) {} + : named_channel_handle_(remoting::GetSecurityKeyIpcChannel()) {} SecurityKeyIpcClient::~SecurityKeyIpcClient() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/host/security_key/security_key_ipc_client.h b/remoting/host/security_key/security_key_ipc_client.h index dd7fe14..0252ac9 100644 --- a/remoting/host/security_key/security_key_ipc_client.h +++ b/remoting/host/security_key/security_key_ipc_client.h
@@ -111,7 +111,7 @@ base::ThreadChecker thread_checker_; - base::WeakPtrFactory<SecurityKeyIpcClient> weak_factory_; + base::WeakPtrFactory<SecurityKeyIpcClient> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcClient); };
diff --git a/remoting/host/security_key/security_key_ipc_client_unittest.cc b/remoting/host/security_key/security_key_ipc_client_unittest.cc index b1e79b5..830e7a6 100644 --- a/remoting/host/security_key/security_key_ipc_client_unittest.cc +++ b/remoting/host/security_key/security_key_ipc_client_unittest.cc
@@ -11,12 +11,17 @@ #include "base/macros.h" #include "base/run_loop.h" #include "base/test/scoped_task_environment.h" +#include "build/build_config.h" #include "ipc/ipc_channel.h" #include "mojo/public/cpp/platform/named_platform_channel.h" #include "remoting/host/security_key/fake_security_key_ipc_server.h" #include "remoting/host/security_key/security_key_ipc_constants.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_WIN) +#include <windows.h> +#endif + namespace { const int kTestConnectionId = 1; const char kNonexistentIpcChannelName[] = "Nonexistent_IPC_Channel";
diff --git a/remoting/host/security_key/security_key_ipc_server_impl.cc b/remoting/host/security_key/security_key_ipc_server_impl.cc index 5a02d9ac..04dc4fe 100644 --- a/remoting/host/security_key/security_key_ipc_server_impl.cc +++ b/remoting/host/security_key/security_key_ipc_server_impl.cc
@@ -54,8 +54,7 @@ initial_connect_timeout_(initial_connect_timeout), connect_callback_(connect_callback), done_callback_(done_callback), - message_callback_(message_callback), - weak_factory_(this) { + message_callback_(message_callback) { DCHECK_GT(connection_id_, 0); DCHECK(!done_callback_.is_null()); DCHECK(!message_callback_.is_null());
diff --git a/remoting/host/security_key/security_key_ipc_server_impl.h b/remoting/host/security_key/security_key_ipc_server_impl.h index bea35b2..0dbe684 100644 --- a/remoting/host/security_key/security_key_ipc_server_impl.h +++ b/remoting/host/security_key/security_key_ipc_server_impl.h
@@ -98,7 +98,7 @@ // Ensures SecurityKeyIpcServerImpl methods are called on the same thread. base::ThreadChecker thread_checker_; - base::WeakPtrFactory<SecurityKeyIpcServerImpl> weak_factory_; + base::WeakPtrFactory<SecurityKeyIpcServerImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SecurityKeyIpcServerImpl); };
diff --git a/remoting/host/security_key/security_key_ipc_server_unittest.cc b/remoting/host/security_key/security_key_ipc_server_unittest.cc index 6d265505..3984384 100644 --- a/remoting/host/security_key/security_key_ipc_server_unittest.cc +++ b/remoting/host/security_key/security_key_ipc_server_unittest.cc
@@ -23,6 +23,10 @@ #include "remoting/host/security_key/security_key_ipc_constants.h" #include "testing/gtest/include/gtest/gtest.h" +#if defined(OS_WIN) +#include <windows.h> +#endif + namespace { const int kTestConnectionId = 42; const int kInitialConnectTimeoutMs = 250;
diff --git a/remoting/host/security_key/security_key_message_reader_impl.cc b/remoting/host/security_key/security_key_message_reader_impl.cc index 53067c7..8cda2754 100644 --- a/remoting/host/security_key/security_key_message_reader_impl.cc +++ b/remoting/host/security_key/security_key_message_reader_impl.cc
@@ -22,8 +22,7 @@ SecurityKeyMessageReaderImpl::SecurityKeyMessageReaderImpl( base::File input_file) : read_stream_(std::move(input_file)), - reader_thread_("SecurityKeyMessageReaderImpl"), - weak_factory_(this) { + reader_thread_("SecurityKeyMessageReaderImpl") { base::Thread::Options options; options.message_pump_type = base::MessagePumpType::IO; reader_thread_.StartWithOptions(options);
diff --git a/remoting/host/security_key/security_key_message_reader_impl.h b/remoting/host/security_key/security_key_message_reader_impl.h index f36e512..d1ff7783 100644 --- a/remoting/host/security_key/security_key_message_reader_impl.h +++ b/remoting/host/security_key/security_key_message_reader_impl.h
@@ -61,7 +61,7 @@ scoped_refptr<base::SingleThreadTaskRunner> read_task_runner_; base::WeakPtr<SecurityKeyMessageReaderImpl> reader_; - base::WeakPtrFactory<SecurityKeyMessageReaderImpl> weak_factory_; + base::WeakPtrFactory<SecurityKeyMessageReaderImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SecurityKeyMessageReaderImpl); };
diff --git a/remoting/host/setup/host_starter.cc b/remoting/host/setup/host_starter.cc index b123c39..cba8517 100644 --- a/remoting/host/setup/host_starter.cc +++ b/remoting/host/setup/host_starter.cc
@@ -31,8 +31,7 @@ service_client_(std::move(service_client)), daemon_controller_(daemon_controller), consent_to_data_collection_(false), - unregistering_host_(false), - weak_ptr_factory_(this) { + unregistering_host_(false) { weak_ptr_ = weak_ptr_factory_.GetWeakPtr(); main_task_runner_ = base::ThreadTaskRunnerHandle::Get(); }
diff --git a/remoting/host/setup/host_starter.h b/remoting/host/setup/host_starter.h index ef269e05..3daecb7 100644 --- a/remoting/host/setup/host_starter.h +++ b/remoting/host/setup/host_starter.h
@@ -115,7 +115,7 @@ PendingGetTokensRequest pending_get_tokens_ = GET_TOKENS_NONE; base::WeakPtr<HostStarter> weak_ptr_; - base::WeakPtrFactory<HostStarter> weak_ptr_factory_; + base::WeakPtrFactory<HostStarter> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HostStarter); };
diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc index 7d27759..b20ff24 100644 --- a/remoting/host/setup/me2me_native_messaging_host.cc +++ b/remoting/host/setup/me2me_native_messaging_host.cc
@@ -83,8 +83,7 @@ host_context_(std::move(host_context)), daemon_controller_(daemon_controller), pairing_registry_(pairing_registry), - oauth_client_(std::move(oauth_client)), - weak_factory_(this) { + oauth_client_(std::move(oauth_client)) { weak_ptr_ = weak_factory_.GetWeakPtr(); }
diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h index 80af459..de4df7a 100644 --- a/remoting/host/setup/me2me_native_messaging_host.h +++ b/remoting/host/setup/me2me_native_messaging_host.h
@@ -150,7 +150,7 @@ std::unique_ptr<OAuthClient> oauth_client_; base::WeakPtr<Me2MeNativeMessagingHost> weak_ptr_; - base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_; + base::WeakPtrFactory<Me2MeNativeMessagingHost> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Me2MeNativeMessagingHost); };
diff --git a/remoting/host/token_validator_base.cc b/remoting/host/token_validator_base.cc index 6bf8e70..582b72b 100644 --- a/remoting/host/token_validator_base.cc +++ b/remoting/host/token_validator_base.cc
@@ -116,8 +116,7 @@ : third_party_auth_config_(third_party_auth_config), token_scope_(token_scope), request_context_getter_(request_context_getter), - buffer_(base::MakeRefCounted<net::IOBuffer>(kBufferSize)), - weak_factory_(this) { + buffer_(base::MakeRefCounted<net::IOBuffer>(kBufferSize)) { DCHECK(third_party_auth_config_.token_url.is_valid()); DCHECK(third_party_auth_config_.token_validation_url.is_valid()); }
diff --git a/remoting/host/token_validator_base.h b/remoting/host/token_validator_base.h index 65e875a..b79e33f 100644 --- a/remoting/host/token_validator_base.h +++ b/remoting/host/token_validator_base.h
@@ -87,7 +87,7 @@ base::Callback<void(const std::string& shared_secret)> on_token_validated_; - base::WeakPtrFactory<TokenValidatorBase> weak_factory_; + base::WeakPtrFactory<TokenValidatorBase> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TokenValidatorBase); };
diff --git a/remoting/host/win/rdp_client.cc b/remoting/host/win/rdp_client.cc index a29f5b4..6475ac6 100644 --- a/remoting/host/win/rdp_client.cc +++ b/remoting/host/win/rdp_client.cc
@@ -12,7 +12,7 @@ #include "base/bind_helpers.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/numerics/safe_conversions.h" #include "base/single_thread_task_runner.h" #include "net/base/ip_address.h"
diff --git a/remoting/protocol/audio_decode_scheduler.cc b/remoting/protocol/audio_decode_scheduler.cc index 5240dac..6685d55 100644 --- a/remoting/protocol/audio_decode_scheduler.cc +++ b/remoting/protocol/audio_decode_scheduler.cc
@@ -21,8 +21,7 @@ scoped_refptr<base::SingleThreadTaskRunner> audio_decode_task_runner, base::WeakPtr<protocol::AudioStub> audio_consumer) : audio_decode_task_runner_(audio_decode_task_runner), - audio_consumer_(audio_consumer), - weak_factory_(this) {} + audio_consumer_(audio_consumer) {} AudioDecodeScheduler::~AudioDecodeScheduler() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/protocol/audio_decode_scheduler.h b/remoting/protocol/audio_decode_scheduler.h index 0a2c7fa..d7d17c1 100644 --- a/remoting/protocol/audio_decode_scheduler.h +++ b/remoting/protocol/audio_decode_scheduler.h
@@ -53,7 +53,7 @@ base::ThreadChecker thread_checker_; - base::WeakPtrFactory<AudioDecodeScheduler> weak_factory_; + base::WeakPtrFactory<AudioDecodeScheduler> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AudioDecodeScheduler); };
diff --git a/remoting/protocol/audio_decode_scheduler_unittest.cc b/remoting/protocol/audio_decode_scheduler_unittest.cc index 87e0fc87..4148b67 100644 --- a/remoting/protocol/audio_decode_scheduler_unittest.cc +++ b/remoting/protocol/audio_decode_scheduler_unittest.cc
@@ -27,7 +27,7 @@ class FakeAudioConsumer : public AudioStub { public: - FakeAudioConsumer(): weak_factory_(this) {} + FakeAudioConsumer() {} ~FakeAudioConsumer() override = default; base::WeakPtr<FakeAudioConsumer> GetWeakPtr(){ @@ -42,7 +42,7 @@ } private: - base::WeakPtrFactory<FakeAudioConsumer> weak_factory_; + base::WeakPtrFactory<FakeAudioConsumer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeAudioConsumer); };
diff --git a/remoting/protocol/audio_pump.cc b/remoting/protocol/audio_pump.cc index 76f8786..df41e95b 100644 --- a/remoting/protocol/audio_pump.cc +++ b/remoting/protocol/audio_pump.cc
@@ -227,9 +227,7 @@ std::unique_ptr<AudioSource> audio_source, std::unique_ptr<AudioEncoder> audio_encoder, AudioStub* audio_stub) - : audio_task_runner_(audio_task_runner), - audio_stub_(audio_stub), - weak_factory_(this) { + : audio_task_runner_(audio_task_runner), audio_stub_(audio_stub) { DCHECK(audio_stub_); core_.reset(new Core(weak_factory_.GetWeakPtr(), std::move(audio_source),
diff --git a/remoting/protocol/audio_pump.h b/remoting/protocol/audio_pump.h index ce62621..1722fb8c 100644 --- a/remoting/protocol/audio_pump.h +++ b/remoting/protocol/audio_pump.h
@@ -61,7 +61,7 @@ std::unique_ptr<Core> core_; - base::WeakPtrFactory<AudioPump> weak_factory_; + base::WeakPtrFactory<AudioPump> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AudioPump); };
diff --git a/remoting/protocol/channel_multiplexer.cc b/remoting/protocol/channel_multiplexer.cc index bbeac3e..ea161bc5 100644 --- a/remoting/protocol/channel_multiplexer.cc +++ b/remoting/protocol/channel_multiplexer.cc
@@ -131,7 +131,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<MuxSocket> weak_factory_; + base::WeakPtrFactory<MuxSocket> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MuxSocket); }; @@ -216,8 +216,7 @@ : channel_(channel), read_buffer_size_(0), write_pending_(false), - write_result_(0), - weak_factory_(this) {} + write_result_(0) {} ChannelMultiplexer::MuxSocket::~MuxSocket() { channel_->OnSocketDestroyed(); @@ -314,8 +313,7 @@ const std::string& base_channel_name) : base_channel_factory_(factory), base_channel_name_(base_channel_name), - next_channel_id_(0), - weak_factory_(this) {} + next_channel_id_(0) {} ChannelMultiplexer::~ChannelMultiplexer() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/remoting/protocol/channel_multiplexer.h b/remoting/protocol/channel_multiplexer.h index c845aed6..4846bdf94 100644 --- a/remoting/protocol/channel_multiplexer.h +++ b/remoting/protocol/channel_multiplexer.h
@@ -85,7 +85,7 @@ BufferedSocketWriter writer_; MessageReader reader_; - base::WeakPtrFactory<ChannelMultiplexer> weak_factory_; + base::WeakPtrFactory<ChannelMultiplexer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ChannelMultiplexer); };
diff --git a/remoting/protocol/client_video_dispatcher.cc b/remoting/protocol/client_video_dispatcher.cc index d62aba0..032986da7 100644 --- a/remoting/protocol/client_video_dispatcher.cc +++ b/remoting/protocol/client_video_dispatcher.cc
@@ -34,8 +34,7 @@ ClientStub* client_stub) : ChannelDispatcherBase(kVideoChannelName), video_stub_(video_stub), - client_stub_(client_stub), - weak_factory_(this) {} + client_stub_(client_stub) {} ClientVideoDispatcher::~ClientVideoDispatcher() = default;
diff --git a/remoting/protocol/client_video_dispatcher.h b/remoting/protocol/client_video_dispatcher.h index b9d70c1..1a057a6 100644 --- a/remoting/protocol/client_video_dispatcher.h +++ b/remoting/protocol/client_video_dispatcher.h
@@ -43,7 +43,7 @@ webrtc::DesktopVector screen_dpi_ = webrtc::DesktopVector(kDefaultDpi, kDefaultDpi); - base::WeakPtrFactory<ClientVideoDispatcher> weak_factory_; + base::WeakPtrFactory<ClientVideoDispatcher> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ClientVideoDispatcher); };
diff --git a/remoting/protocol/connection_unittest.cc b/remoting/protocol/connection_unittest.cc index 5dade5d2..24a8c5d 100644 --- a/remoting/protocol/connection_unittest.cc +++ b/remoting/protocol/connection_unittest.cc
@@ -183,7 +183,7 @@ class FakeAudioPlayer : public AudioStub { public: - FakeAudioPlayer() : weak_factory_(this) {} + FakeAudioPlayer() {} ~FakeAudioPlayer() override = default; // AudioStub interface. @@ -253,7 +253,7 @@ base::RunLoop* run_loop_ = nullptr; size_t samples_expected_ = 0; - base::WeakPtrFactory<FakeAudioPlayer> weak_factory_; + base::WeakPtrFactory<FakeAudioPlayer> weak_factory_{this}; }; } // namespace
diff --git a/remoting/protocol/fake_authenticator.cc b/remoting/protocol/fake_authenticator.cc index 5c844c9..631c83c 100644 --- a/remoting/protocol/fake_authenticator.cc +++ b/remoting/protocol/fake_authenticator.cc
@@ -23,9 +23,7 @@ namespace protocol { FakeChannelAuthenticator::FakeChannelAuthenticator(bool accept, bool async) - : result_(accept ? net::OK : net::ERR_FAILED), - async_(async), - weak_factory_(this) {} + : result_(accept ? net::OK : net::ERR_FAILED), async_(async) {} FakeChannelAuthenticator::~FakeChannelAuthenticator() = default;
diff --git a/remoting/protocol/fake_authenticator.h b/remoting/protocol/fake_authenticator.h index 2f01124..6441b1d8 100644 --- a/remoting/protocol/fake_authenticator.h +++ b/remoting/protocol/fake_authenticator.h
@@ -38,7 +38,7 @@ bool did_read_bytes_ = false; bool did_write_bytes_ = false; - base::WeakPtrFactory<FakeChannelAuthenticator> weak_factory_; + base::WeakPtrFactory<FakeChannelAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeChannelAuthenticator); };
diff --git a/remoting/protocol/fake_connection_to_client.cc b/remoting/protocol/fake_connection_to_client.cc index 8e4721a..2a3163fa 100644 --- a/remoting/protocol/fake_connection_to_client.cc +++ b/remoting/protocol/fake_connection_to_client.cc
@@ -16,7 +16,7 @@ namespace remoting { namespace protocol { -FakeVideoStream::FakeVideoStream() : weak_factory_(this) {} +FakeVideoStream::FakeVideoStream() {} FakeVideoStream::~FakeVideoStream() = default; void FakeVideoStream::SetEventTimestampsSource(
diff --git a/remoting/protocol/fake_connection_to_client.h b/remoting/protocol/fake_connection_to_client.h index 5078cb14..007e75c 100644 --- a/remoting/protocol/fake_connection_to_client.h +++ b/remoting/protocol/fake_connection_to_client.h
@@ -41,7 +41,7 @@ private: Observer* observer_ = nullptr; - base::WeakPtrFactory<FakeVideoStream> weak_factory_; + base::WeakPtrFactory<FakeVideoStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeVideoStream); };
diff --git a/remoting/protocol/fake_datagram_socket.cc b/remoting/protocol/fake_datagram_socket.cc index a7bd322..016726fa 100644 --- a/remoting/protocol/fake_datagram_socket.cc +++ b/remoting/protocol/fake_datagram_socket.cc
@@ -19,10 +19,7 @@ namespace protocol { FakeDatagramSocket::FakeDatagramSocket() - : input_pos_(0), - task_runner_(base::ThreadTaskRunnerHandle::Get()), - weak_factory_(this) { -} + : input_pos_(0), task_runner_(base::ThreadTaskRunnerHandle::Get()) {} FakeDatagramSocket::~FakeDatagramSocket() { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); @@ -130,9 +127,7 @@ FakeDatagramChannelFactory::FakeDatagramChannelFactory() : task_runner_(base::ThreadTaskRunnerHandle::Get()), asynchronous_create_(false), - fail_create_(false), - weak_factory_(this) { -} + fail_create_(false) {} FakeDatagramChannelFactory::~FakeDatagramChannelFactory() { for (auto it = channels_.begin(); it != channels_.end(); ++it) {
diff --git a/remoting/protocol/fake_datagram_socket.h b/remoting/protocol/fake_datagram_socket.h index 81c79497..71884b6 100644 --- a/remoting/protocol/fake_datagram_socket.h +++ b/remoting/protocol/fake_datagram_socket.h
@@ -92,7 +92,7 @@ int input_pos_; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - base::WeakPtrFactory<FakeDatagramSocket> weak_factory_; + base::WeakPtrFactory<FakeDatagramSocket> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeDatagramSocket); }; @@ -138,7 +138,7 @@ bool fail_create_; - base::WeakPtrFactory<FakeDatagramChannelFactory> weak_factory_; + base::WeakPtrFactory<FakeDatagramChannelFactory> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeDatagramChannelFactory); };
diff --git a/remoting/protocol/fake_session.cc b/remoting/protocol/fake_session.cc index 6c59aae..6f88581 100644 --- a/remoting/protocol/fake_session.cc +++ b/remoting/protocol/fake_session.cc
@@ -19,7 +19,7 @@ const char kTestAuthKey[] = "test_auth_key"; FakeSession::FakeSession() - : config_(SessionConfig::ForTest()), jid_(kTestJid), weak_factory_(this) {} + : config_(SessionConfig::ForTest()), jid_(kTestJid) {} FakeSession::~FakeSession() = default; void FakeSession::SimulateConnection(FakeSession* peer) {
diff --git a/remoting/protocol/fake_session.h b/remoting/protocol/fake_session.h index 6390391..010262e 100644 --- a/remoting/protocol/fake_session.h +++ b/remoting/protocol/fake_session.h
@@ -78,7 +78,7 @@ std::vector<std::unique_ptr<jingle_xmpp::XmlElement>> attachments_; - base::WeakPtrFactory<FakeSession> weak_factory_; + base::WeakPtrFactory<FakeSession> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSession); };
diff --git a/remoting/protocol/fake_stream_socket.cc b/remoting/protocol/fake_stream_socket.cc index f9bbc0f..7d12d4f 100644 --- a/remoting/protocol/fake_stream_socket.cc +++ b/remoting/protocol/fake_stream_socket.cc
@@ -21,7 +21,7 @@ namespace protocol { FakeStreamSocket::FakeStreamSocket() - : task_runner_(base::ThreadTaskRunnerHandle::Get()), weak_factory_(this) {} + : task_runner_(base::ThreadTaskRunnerHandle::Get()) {} FakeStreamSocket::~FakeStreamSocket() { EXPECT_TRUE(task_runner_->BelongsToCurrentThread()); @@ -153,9 +153,7 @@ } FakeStreamChannelFactory::FakeStreamChannelFactory() - : task_runner_(base::ThreadTaskRunnerHandle::Get()), - weak_factory_(this) { -} + : task_runner_(base::ThreadTaskRunnerHandle::Get()) {} FakeStreamChannelFactory::~FakeStreamChannelFactory() = default;
diff --git a/remoting/protocol/fake_stream_socket.h b/remoting/protocol/fake_stream_socket.h index 91709f8..1d2e7a6 100644 --- a/remoting/protocol/fake_stream_socket.h +++ b/remoting/protocol/fake_stream_socket.h
@@ -102,7 +102,7 @@ int input_pos_ = 0; scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - base::WeakPtrFactory<FakeStreamSocket> weak_factory_; + base::WeakPtrFactory<FakeStreamSocket> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeStreamSocket); }; @@ -147,7 +147,7 @@ bool async_write_ = false; base::WeakPtr<FakeStreamChannelFactory> peer_factory_; - base::WeakPtrFactory<FakeStreamChannelFactory> weak_factory_; + base::WeakPtrFactory<FakeStreamChannelFactory> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeStreamChannelFactory); };
diff --git a/remoting/protocol/ice_transport.cc b/remoting/protocol/ice_transport.cc index 376dca3..8663647 100644 --- a/remoting/protocol/ice_transport.cc +++ b/remoting/protocol/ice_transport.cc
@@ -26,9 +26,7 @@ IceTransport::IceTransport(scoped_refptr<TransportContext> transport_context, EventHandler* event_handler) - : transport_context_(transport_context), - event_handler_(event_handler), - weak_factory_(this) { + : transport_context_(transport_context), event_handler_(event_handler) { transport_context->Prepare(); }
diff --git a/remoting/protocol/ice_transport.h b/remoting/protocol/ice_transport.h index ae378b6..7f1b715 100644 --- a/remoting/protocol/ice_transport.h +++ b/remoting/protocol/ice_transport.h
@@ -106,7 +106,7 @@ std::unique_ptr<IceTransportInfo> pending_transport_info_message_; base::OneShotTimer transport_info_timer_; - base::WeakPtrFactory<IceTransport> weak_factory_; + base::WeakPtrFactory<IceTransport> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IceTransport); };
diff --git a/remoting/protocol/ice_transport_channel.cc b/remoting/protocol/ice_transport_channel.cc index 48efe98f7..085db40 100644 --- a/remoting/protocol/ice_transport_channel.cc +++ b/remoting/protocol/ice_transport_channel.cc
@@ -50,11 +50,9 @@ IceTransportChannel::IceTransportChannel( scoped_refptr<TransportContext> transport_context) : transport_context_(transport_context), - ice_username_fragment_( - rtc::CreateRandomString(kIceUfragLength)), + ice_username_fragment_(rtc::CreateRandomString(kIceUfragLength)), connect_attempts_left_( - transport_context->network_settings().ice_reconnect_attempts), - weak_factory_(this) { + transport_context->network_settings().ice_reconnect_attempts) { DCHECK(!ice_username_fragment_.empty()); }
diff --git a/remoting/protocol/ice_transport_channel.h b/remoting/protocol/ice_transport_channel.h index ab6a4f1f..b3ded2b 100644 --- a/remoting/protocol/ice_transport_channel.h +++ b/remoting/protocol/ice_transport_channel.h
@@ -131,7 +131,7 @@ base::ThreadChecker thread_checker_; - base::WeakPtrFactory<IceTransportChannel> weak_factory_; + base::WeakPtrFactory<IceTransportChannel> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IceTransportChannel); };
diff --git a/remoting/protocol/jingle_session.cc b/remoting/protocol/jingle_session.cc index fbf0641..c48f0b4 100644 --- a/remoting/protocol/jingle_session.cc +++ b/remoting/protocol/jingle_session.cc
@@ -192,8 +192,7 @@ event_handler_(nullptr), state_(INITIALIZING), error_(OK), - message_queue_(new OrderedMessageQueue), - weak_factory_(this) {} + message_queue_(new OrderedMessageQueue) {} JingleSession::~JingleSession() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h index 69d3e32..6004ac4 100644 --- a/remoting/protocol/jingle_session.h +++ b/remoting/protocol/jingle_session.h
@@ -182,7 +182,7 @@ // The SessionPlugins attached to this session. std::vector<SessionPlugin*> plugins_; - base::WeakPtrFactory<JingleSession> weak_factory_; + base::WeakPtrFactory<JingleSession> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(JingleSession); };
diff --git a/remoting/protocol/message_reader.cc b/remoting/protocol/message_reader.cc index 1378ffb3..b129e6bc 100644 --- a/remoting/protocol/message_reader.cc +++ b/remoting/protocol/message_reader.cc
@@ -24,7 +24,7 @@ static const int kReadBufferSize = 4096; -MessageReader::MessageReader() : weak_factory_(this) {} +MessageReader::MessageReader() {} MessageReader::~MessageReader() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); }
diff --git a/remoting/protocol/message_reader.h b/remoting/protocol/message_reader.h index 38c7a9c..03f7083 100644 --- a/remoting/protocol/message_reader.h +++ b/remoting/protocol/message_reader.h
@@ -73,7 +73,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<MessageReader> weak_factory_; + base::WeakPtrFactory<MessageReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MessageReader); };
diff --git a/remoting/protocol/negotiating_client_authenticator.cc b/remoting/protocol/negotiating_client_authenticator.cc index e539991..ba9c00fc 100644 --- a/remoting/protocol/negotiating_client_authenticator.cc +++ b/remoting/protocol/negotiating_client_authenticator.cc
@@ -30,8 +30,7 @@ : NegotiatingAuthenticatorBase(MESSAGE_READY), local_id_(local_id), remote_id_(remote_id), - config_(config), - weak_factory_(this) { + config_(config) { if (!config_.fetch_third_party_token_callback.is_null()) { AddMethod(Method::THIRD_PARTY_SPAKE2_CURVE25519); AddMethod(Method::THIRD_PARTY_SPAKE2_P224);
diff --git a/remoting/protocol/negotiating_client_authenticator.h b/remoting/protocol/negotiating_client_authenticator.h index 5cce2d1a..f138ebb 100644 --- a/remoting/protocol/negotiating_client_authenticator.h +++ b/remoting/protocol/negotiating_client_authenticator.h
@@ -69,7 +69,7 @@ // Internal NegotiatingClientAuthenticator data. bool method_set_by_host_ = false; - base::WeakPtrFactory<NegotiatingClientAuthenticator> weak_factory_; + base::WeakPtrFactory<NegotiatingClientAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(NegotiatingClientAuthenticator); };
diff --git a/remoting/protocol/pairing_authenticator_base.cc b/remoting/protocol/pairing_authenticator_base.cc index d6243d70..0db2bc2 100644 --- a/remoting/protocol/pairing_authenticator_base.cc +++ b/remoting/protocol/pairing_authenticator_base.cc
@@ -20,7 +20,7 @@ const jingle_xmpp::StaticQName kPairingErrorAttribute = { "", "error" }; } // namespace -PairingAuthenticatorBase::PairingAuthenticatorBase() : weak_factory_(this) {} +PairingAuthenticatorBase::PairingAuthenticatorBase() {} PairingAuthenticatorBase::~PairingAuthenticatorBase() = default; Authenticator::State PairingAuthenticatorBase::state() const {
diff --git a/remoting/protocol/pairing_authenticator_base.h b/remoting/protocol/pairing_authenticator_base.h index 209581d..6e9bbc7 100644 --- a/remoting/protocol/pairing_authenticator_base.h +++ b/remoting/protocol/pairing_authenticator_base.h
@@ -80,7 +80,7 @@ bool HasErrorMessage(const jingle_xmpp::XmlElement* message) const; void CheckForFailedSpakeExchange(const base::Closure& resume_callback); - base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_; + base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PairingAuthenticatorBase); };
diff --git a/remoting/protocol/pairing_client_authenticator.cc b/remoting/protocol/pairing_client_authenticator.cc index b8bad3cd..c5cc8ba 100644 --- a/remoting/protocol/pairing_client_authenticator.cc +++ b/remoting/protocol/pairing_client_authenticator.cc
@@ -18,8 +18,7 @@ const ClientAuthenticationConfig& client_auth_config, const CreateBaseAuthenticatorCallback& create_base_authenticator_callback) : client_auth_config_(client_auth_config), - create_base_authenticator_callback_(create_base_authenticator_callback), - weak_factory_(this) {} + create_base_authenticator_callback_(create_base_authenticator_callback) {} PairingClientAuthenticator::~PairingClientAuthenticator() = default;
diff --git a/remoting/protocol/pairing_client_authenticator.h b/remoting/protocol/pairing_client_authenticator.h index fafd2d7..61dd5bb 100644 --- a/remoting/protocol/pairing_client_authenticator.h +++ b/remoting/protocol/pairing_client_authenticator.h
@@ -51,7 +51,7 @@ // yet been set. bool waiting_for_pin_ = false; - base::WeakPtrFactory<PairingClientAuthenticator> weak_factory_; + base::WeakPtrFactory<PairingClientAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PairingClientAuthenticator); };
diff --git a/remoting/protocol/pairing_host_authenticator.cc b/remoting/protocol/pairing_host_authenticator.cc index 8983fe9..3ee4b32b 100644 --- a/remoting/protocol/pairing_host_authenticator.cc +++ b/remoting/protocol/pairing_host_authenticator.cc
@@ -19,8 +19,7 @@ const std::string& pin) : pairing_registry_(pairing_registry), create_base_authenticator_callback_(create_base_authenticator_callback), - pin_(pin), - weak_factory_(this) {} + pin_(pin) {} void PairingHostAuthenticator::Initialize( const std::string& client_id,
diff --git a/remoting/protocol/pairing_host_authenticator.h b/remoting/protocol/pairing_host_authenticator.h index 9277441..4c72b2ad 100644 --- a/remoting/protocol/pairing_host_authenticator.h +++ b/remoting/protocol/pairing_host_authenticator.h
@@ -52,7 +52,7 @@ bool protocol_error_ = false; bool waiting_for_paired_secret_ = false; - base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_; + base::WeakPtrFactory<PairingHostAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PairingHostAuthenticator); };
diff --git a/remoting/protocol/port_allocator.cc b/remoting/protocol/port_allocator.cc index 0243e6f..cf5cf820 100644 --- a/remoting/protocol/port_allocator.cc +++ b/remoting/protocol/port_allocator.cc
@@ -71,8 +71,7 @@ component, ice_ufrag, ice_pwd), - transport_context_(allocator->transport_context()), - weak_factory_(this) {} + transport_context_(allocator->transport_context()) {} PortAllocatorSession::~PortAllocatorSession() = default;
diff --git a/remoting/protocol/port_allocator.h b/remoting/protocol/port_allocator.h index 7059ebb2..78b5d83f 100644 --- a/remoting/protocol/port_allocator.h +++ b/remoting/protocol/port_allocator.h
@@ -67,7 +67,7 @@ IceConfig ice_config_; - base::WeakPtrFactory<PortAllocatorSession> weak_factory_; + base::WeakPtrFactory<PortAllocatorSession> weak_factory_{this}; }; } // namespace protocol
diff --git a/remoting/protocol/third_party_client_authenticator.cc b/remoting/protocol/third_party_client_authenticator.cc index 9cb2aec5..f5218d5 100644 --- a/remoting/protocol/third_party_client_authenticator.cc +++ b/remoting/protocol/third_party_client_authenticator.cc
@@ -23,8 +23,7 @@ const FetchThirdPartyTokenCallback& fetch_token_callback) : ThirdPartyAuthenticatorBase(WAITING_MESSAGE), create_base_authenticator_callback_(create_base_authenticator_callback), - fetch_token_callback_(std::move(fetch_token_callback)), - weak_factory_(this) {} + fetch_token_callback_(std::move(fetch_token_callback)) {} ThirdPartyClientAuthenticator::~ThirdPartyClientAuthenticator() = default;
diff --git a/remoting/protocol/third_party_client_authenticator.h b/remoting/protocol/third_party_client_authenticator.h index 4e201d8..01a9c6f 100644 --- a/remoting/protocol/third_party_client_authenticator.h +++ b/remoting/protocol/third_party_client_authenticator.h
@@ -50,7 +50,7 @@ FetchThirdPartyTokenCallback fetch_token_callback_; std::string token_; - base::WeakPtrFactory<ThirdPartyClientAuthenticator> weak_factory_; + base::WeakPtrFactory<ThirdPartyClientAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ThirdPartyClientAuthenticator); };
diff --git a/remoting/protocol/validating_authenticator.cc b/remoting/protocol/validating_authenticator.cc index 88228ab..359b842 100644 --- a/remoting/protocol/validating_authenticator.cc +++ b/remoting/protocol/validating_authenticator.cc
@@ -27,8 +27,7 @@ std::unique_ptr<Authenticator> current_authenticator) : remote_jid_(remote_jid), validation_callback_(validation_callback), - current_authenticator_(std::move(current_authenticator)), - weak_factory_(this) { + current_authenticator_(std::move(current_authenticator)) { DCHECK(!remote_jid_.empty()); DCHECK(validation_callback_); DCHECK(current_authenticator_);
diff --git a/remoting/protocol/validating_authenticator.h b/remoting/protocol/validating_authenticator.h index 1da15f6..198324a7 100644 --- a/remoting/protocol/validating_authenticator.h +++ b/remoting/protocol/validating_authenticator.h
@@ -78,7 +78,7 @@ std::unique_ptr<jingle_xmpp::XmlElement> pending_auth_message_; - base::WeakPtrFactory<ValidatingAuthenticator> weak_factory_; + base::WeakPtrFactory<ValidatingAuthenticator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ValidatingAuthenticator); };
diff --git a/remoting/protocol/video_frame_pump.cc b/remoting/protocol/video_frame_pump.cc index 46e8b0f..3807939c 100644 --- a/remoting/protocol/video_frame_pump.cc +++ b/remoting/protocol/video_frame_pump.cc
@@ -54,8 +54,7 @@ base::Bind(&VideoFramePump::SendKeepAlivePacket, base::Unretained(this))), capture_scheduler_(base::Bind(&VideoFramePump::CaptureNextFrame, - base::Unretained(this))), - weak_factory_(this) { + base::Unretained(this))) { DCHECK(encoder_); DCHECK(video_stub_);
diff --git a/remoting/protocol/video_frame_pump.h b/remoting/protocol/video_frame_pump.h index 91a1906..ebd57815 100644 --- a/remoting/protocol/video_frame_pump.h +++ b/remoting/protocol/video_frame_pump.h
@@ -184,7 +184,7 @@ base::ThreadChecker thread_checker_; - base::WeakPtrFactory<VideoFramePump> weak_factory_; + base::WeakPtrFactory<VideoFramePump> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(VideoFramePump); };
diff --git a/remoting/protocol/webrtc_connection_to_client.cc b/remoting/protocol/webrtc_connection_to_client.cc index 48fb7b9..5cba90f 100644 --- a/remoting/protocol/webrtc_connection_to_client.cc +++ b/remoting/protocol/webrtc_connection_to_client.cc
@@ -48,8 +48,7 @@ video_encode_task_runner_(video_encode_task_runner), audio_task_runner_(audio_task_runner), control_dispatcher_(new HostControlDispatcher()), - event_dispatcher_(new HostEventDispatcher()), - weak_factory_(this) { + event_dispatcher_(new HostEventDispatcher()) { session_->SetEventHandler(this); session_->SetTransport(transport_.get()); }
diff --git a/remoting/protocol/webrtc_connection_to_client.h b/remoting/protocol/webrtc_connection_to_client.h index 7e027cd..1ee85ad 100644 --- a/remoting/protocol/webrtc_connection_to_client.h +++ b/remoting/protocol/webrtc_connection_to_client.h
@@ -88,7 +88,7 @@ std::unique_ptr<HostControlDispatcher> control_dispatcher_; std::unique_ptr<HostEventDispatcher> event_dispatcher_; - base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_; + base::WeakPtrFactory<WebrtcConnectionToClient> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcConnectionToClient); };
diff --git a/remoting/protocol/webrtc_data_stream_adapter.cc b/remoting/protocol/webrtc_data_stream_adapter.cc index c087255..ba8984d 100644 --- a/remoting/protocol/webrtc_data_stream_adapter.cc +++ b/remoting/protocol/webrtc_data_stream_adapter.cc
@@ -24,7 +24,7 @@ WebrtcDataStreamAdapter::WebrtcDataStreamAdapter( rtc::scoped_refptr<webrtc::DataChannelInterface> channel) - : channel_(channel.get()), weak_ptr_factory_(this) { + : channel_(channel.get()) { channel_->RegisterObserver(this); DCHECK_EQ(channel_->state(), webrtc::DataChannelInterface::kConnecting); }
diff --git a/remoting/protocol/webrtc_data_stream_adapter.h b/remoting/protocol/webrtc_data_stream_adapter.h index 8b8f4de5..ce98c15e 100644 --- a/remoting/protocol/webrtc_data_stream_adapter.h +++ b/remoting/protocol/webrtc_data_stream_adapter.h
@@ -73,7 +73,7 @@ // The data and done callbacks for queued but not yet sent messages. base::queue<PendingMessage> pending_messages_; - base::WeakPtrFactory<WebrtcDataStreamAdapter> weak_ptr_factory_; + base::WeakPtrFactory<WebrtcDataStreamAdapter> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcDataStreamAdapter); };
diff --git a/remoting/protocol/webrtc_frame_scheduler_simple.cc b/remoting/protocol/webrtc_frame_scheduler_simple.cc index db58984..3dade25 100644 --- a/remoting/protocol/webrtc_frame_scheduler_simple.cc +++ b/remoting/protocol/webrtc_frame_scheduler_simple.cc
@@ -76,8 +76,7 @@ : tick_clock_(base::DefaultTickClock::GetInstance()), pacing_bucket_(LeakyBucket::kUnlimitedDepth, 0), updated_region_area_(kStatsWindow), - bandwidth_estimator_(new WebrtcBandwidthEstimator()), - weak_factory_(this) {} + bandwidth_estimator_(new WebrtcBandwidthEstimator()) {} WebrtcFrameSchedulerSimple::~WebrtcFrameSchedulerSimple() { DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/remoting/protocol/webrtc_frame_scheduler_simple.h b/remoting/protocol/webrtc_frame_scheduler_simple.h index a32fb316..0bbdd96 100644 --- a/remoting/protocol/webrtc_frame_scheduler_simple.h +++ b/remoting/protocol/webrtc_frame_scheduler_simple.h
@@ -98,7 +98,7 @@ const std::unique_ptr<BandwidthEstimator> bandwidth_estimator_; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<WebrtcFrameSchedulerSimple> weak_factory_; + base::WeakPtrFactory<WebrtcFrameSchedulerSimple> weak_factory_{this}; }; } // namespace protocol
diff --git a/remoting/protocol/webrtc_transport.cc b/remoting/protocol/webrtc_transport.cc index 6d87a00f..8645851 100644 --- a/remoting/protocol/webrtc_transport.cc +++ b/remoting/protocol/webrtc_transport.cc
@@ -371,8 +371,7 @@ EventHandler* event_handler) : transport_context_(transport_context), event_handler_(event_handler), - handshake_hmac_(crypto::HMAC::SHA256), - weak_factory_(this) { + handshake_hmac_(crypto::HMAC::SHA256) { transport_context_->set_relay_mode(TransportContext::RelayMode::TURN); video_encoder_factory_ = new WebrtcDummyVideoEncoderFactory();
diff --git a/remoting/protocol/webrtc_transport.h b/remoting/protocol/webrtc_transport.h index d3a98f1..692dbe5f 100644 --- a/remoting/protocol/webrtc_transport.h +++ b/remoting/protocol/webrtc_transport.h
@@ -184,7 +184,7 @@ rtc::scoped_refptr<webrtc::RtpTransceiverInterface> video_transceiver_; - base::WeakPtrFactory<WebrtcTransport> weak_factory_; + base::WeakPtrFactory<WebrtcTransport> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcTransport); };
diff --git a/remoting/protocol/webrtc_video_renderer_adapter.cc b/remoting/protocol/webrtc_video_renderer_adapter.cc index 7f8e9e2..dabdd3a 100644 --- a/remoting/protocol/webrtc_video_renderer_adapter.cc +++ b/remoting/protocol/webrtc_video_renderer_adapter.cc
@@ -60,8 +60,7 @@ VideoRenderer* video_renderer) : label_(label), video_renderer_(video_renderer), - task_runner_(base::ThreadTaskRunnerHandle::Get()), - weak_factory_(this) {} + task_runner_(base::ThreadTaskRunnerHandle::Get()) {} WebrtcVideoRendererAdapter::~WebrtcVideoRendererAdapter() { DCHECK(task_runner_->BelongsToCurrentThread());
diff --git a/remoting/protocol/webrtc_video_renderer_adapter.h b/remoting/protocol/webrtc_video_renderer_adapter.h index 0c5f6891..5ad91510 100644 --- a/remoting/protocol/webrtc_video_renderer_adapter.h +++ b/remoting/protocol/webrtc_video_renderer_adapter.h
@@ -80,7 +80,7 @@ std::list<std::pair<uint32_t, ClientFrameStats>> client_stats_queue_; std::list<std::pair<uint32_t, HostFrameStats>> host_stats_queue_; - base::WeakPtrFactory<WebrtcVideoRendererAdapter> weak_factory_; + base::WeakPtrFactory<WebrtcVideoRendererAdapter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcVideoRendererAdapter); };
diff --git a/remoting/protocol/webrtc_video_stream.cc b/remoting/protocol/webrtc_video_stream.cc index b5503a9e..8839b64 100644 --- a/remoting/protocol/webrtc_video_stream.cc +++ b/remoting/protocol/webrtc_video_stream.cc
@@ -82,9 +82,7 @@ }; WebrtcVideoStream::WebrtcVideoStream(const SessionOptions& session_options) - : video_stats_dispatcher_(kStreamLabel), - session_options_(session_options), - weak_factory_(this) { + : video_stats_dispatcher_(kStreamLabel), session_options_(session_options) { encoder_selector_.RegisterEncoder( base::Bind(&WebrtcVideoEncoderVpx::IsSupportedByVP8), base::Bind(&WebrtcVideoEncoderVpx::CreateForVP8));
diff --git a/remoting/protocol/webrtc_video_stream.h b/remoting/protocol/webrtc_video_stream.h index 40457e0..f3b0dde 100644 --- a/remoting/protocol/webrtc_video_stream.h +++ b/remoting/protocol/webrtc_video_stream.h
@@ -105,7 +105,7 @@ const SessionOptions session_options_; - base::WeakPtrFactory<WebrtcVideoStream> weak_factory_; + base::WeakPtrFactory<WebrtcVideoStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(WebrtcVideoStream); };
diff --git a/remoting/signaling/delegating_signal_strategy.cc b/remoting/signaling/delegating_signal_strategy.cc index 9ac290c3..56a4253 100644 --- a/remoting/signaling/delegating_signal_strategy.cc +++ b/remoting/signaling/delegating_signal_strategy.cc
@@ -21,8 +21,7 @@ : local_address_(local_address), delegate_task_runner_(base::ThreadTaskRunnerHandle::Get()), client_task_runner_(client_task_runner), - send_iq_callback_(send_iq_callback), - weak_factory_(this) { + send_iq_callback_(send_iq_callback) { incoming_iq_callback_ = base::BindRepeating(&OnIncomingMessageFromDelegate, weak_factory_.GetWeakPtr(), client_task_runner_);
diff --git a/remoting/signaling/delegating_signal_strategy.h b/remoting/signaling/delegating_signal_strategy.h index f24980f..75670300 100644 --- a/remoting/signaling/delegating_signal_strategy.h +++ b/remoting/signaling/delegating_signal_strategy.h
@@ -70,7 +70,7 @@ IqCallback send_iq_callback_; base::ObserverList<Listener> listeners_; - base::WeakPtrFactory<DelegatingSignalStrategy> weak_factory_; + base::WeakPtrFactory<DelegatingSignalStrategy> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DelegatingSignalStrategy); };
diff --git a/remoting/signaling/fake_signal_strategy.cc b/remoting/signaling/fake_signal_strategy.cc index 9de5485..658df92 100644 --- a/remoting/signaling/fake_signal_strategy.cc +++ b/remoting/signaling/fake_signal_strategy.cc
@@ -31,8 +31,7 @@ FakeSignalStrategy::FakeSignalStrategy(const SignalingAddress& address) : main_thread_(base::ThreadTaskRunnerHandle::Get()), address_(address), - last_id_(0), - weak_factory_(this) { + last_id_(0) { DETACH_FROM_SEQUENCE(sequence_checker_); }
diff --git a/remoting/signaling/fake_signal_strategy.h b/remoting/signaling/fake_signal_strategy.h index 9717ce94..3c61e7e 100644 --- a/remoting/signaling/fake_signal_strategy.h +++ b/remoting/signaling/fake_signal_strategy.h
@@ -111,7 +111,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<FakeSignalStrategy> weak_factory_; + base::WeakPtrFactory<FakeSignalStrategy> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeSignalStrategy); };
diff --git a/remoting/signaling/ftl_message_reception_channel.cc b/remoting/signaling/ftl_message_reception_channel.cc index 534e025..d76b5f84 100644 --- a/remoting/signaling/ftl_message_reception_channel.cc +++ b/remoting/signaling/ftl_message_reception_channel.cc
@@ -16,11 +16,9 @@ namespace remoting { constexpr base::TimeDelta FtlMessageReceptionChannel::kPongTimeout; -constexpr base::TimeDelta FtlMessageReceptionChannel::kStreamLifetime; FtlMessageReceptionChannel::FtlMessageReceptionChannel() - : reconnect_retry_backoff_(&FtlGrpcContext::GetBackoffPolicy()), - weak_factory_(this) {} + : reconnect_retry_backoff_(&FtlGrpcContext::GetBackoffPolicy()) {} FtlMessageReceptionChannel::~FtlMessageReceptionChannel() = default; @@ -82,6 +80,15 @@ // Previously closed by the caller. return; } + if (status.error_code() == grpc::StatusCode::OK) { + // The backend closes the stream. This is not an error so we restart it + // without backoff. + VLOG(1) << "Stream has been closed by the server. Reconnecting..."; + reconnect_retry_backoff_.Reset(); + RetryStartReceivingMessages(); + return; + } + reconnect_retry_backoff_.InformOfRequest(false); if (status.error_code() == grpc::StatusCode::ABORTED || status.error_code() == grpc::StatusCode::UNAVAILABLE) { @@ -179,7 +186,6 @@ state_ = State::STOPPED; receive_messages_stream_.reset(); reconnect_retry_timer_.Stop(); - stream_lifetime_timer_.Stop(); stream_pong_timer_.reset(); } @@ -193,10 +199,6 @@ FROM_HERE, kPongTimeout, this, &FtlMessageReceptionChannel::OnPongTimeout); stream_pong_timer_->Reset(); - stream_lifetime_timer_.Start( - FROM_HERE, kStreamLifetime, - base::BindOnce(&FtlMessageReceptionChannel::OnStreamLifetimeExceeded, - base::Unretained(this))); } void FtlMessageReceptionChannel::OnPongTimeout() { @@ -205,10 +207,4 @@ RetryStartReceivingMessagesWithBackoff(); } -void FtlMessageReceptionChannel::OnStreamLifetimeExceeded() { - VLOG(1) << "Reached maximum lifetime for current stream."; - reconnect_retry_backoff_.Reset(); - RetryStartReceivingMessages(); -} - } // namespace remoting
diff --git a/remoting/signaling/ftl_message_reception_channel.h b/remoting/signaling/ftl_message_reception_channel.h index 7b28fe172..f6ae03f 100644 --- a/remoting/signaling/ftl_message_reception_channel.h +++ b/remoting/signaling/ftl_message_reception_channel.h
@@ -23,8 +23,6 @@ public: static constexpr base::TimeDelta kPongTimeout = base::TimeDelta::FromSeconds(15); - static constexpr base::TimeDelta kStreamLifetime = - base::TimeDelta::FromMinutes(13); FtlMessageReceptionChannel(); ~FtlMessageReceptionChannel() override; @@ -65,7 +63,6 @@ void BeginStreamTimers(); void OnPongTimeout(); - void OnStreamLifetimeExceeded(); StreamOpener stream_opener_; MessageCallback on_incoming_msg_; @@ -75,10 +72,9 @@ State state_ = State::STOPPED; net::BackoffEntry reconnect_retry_backoff_; base::OneShotTimer reconnect_retry_timer_; - base::OneShotTimer stream_lifetime_timer_; std::unique_ptr<base::DelayTimer> stream_pong_timer_; - base::WeakPtrFactory<FtlMessageReceptionChannel> weak_factory_; + base::WeakPtrFactory<FtlMessageReceptionChannel> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FtlMessageReceptionChannel); };
diff --git a/remoting/signaling/ftl_message_reception_channel_unittest.cc b/remoting/signaling/ftl_message_reception_channel_unittest.cc index a04d94e..52e689f 100644 --- a/remoting/signaling/ftl_message_reception_channel_unittest.cc +++ b/remoting/signaling/ftl_message_reception_channel_unittest.cc
@@ -42,8 +42,7 @@ // Fake stream implementation to allow probing if a stream is closed by client. class FakeScopedGrpcServerStream : public ScopedGrpcServerStream { public: - FakeScopedGrpcServerStream() - : ScopedGrpcServerStream(nullptr), weak_factory_(this) {} + FakeScopedGrpcServerStream() : ScopedGrpcServerStream(nullptr) {} ~FakeScopedGrpcServerStream() override = default; base::WeakPtr<FakeScopedGrpcServerStream> GetWeakPtr() { @@ -51,7 +50,7 @@ } private: - base::WeakPtrFactory<FakeScopedGrpcServerStream> weak_factory_; + base::WeakPtrFactory<FakeScopedGrpcServerStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakeScopedGrpcServerStream); }; @@ -302,12 +301,13 @@ on_incoming_msg.Run(response); response.Clear(); - std::move(on_channel_closed).Run(grpc::Status::OK); + std::move(on_channel_closed).Run(grpc::Status::CANCELLED); })); channel_->StartReceivingMessages( - base::DoNothing(), test::CheckStatusThenQuitRunLoopCallback( - FROM_HERE, grpc::StatusCode::OK, &run_loop)); + base::DoNothing(), + test::CheckStatusThenQuitRunLoopCallback( + FROM_HERE, grpc::StatusCode::CANCELLED, &run_loop)); run_loop.Run(); } @@ -353,7 +353,7 @@ run_loop.Run(); } -TEST_F(FtlMessageReceptionChannelTest, LifetimeExceeded_ResetsStream) { +TEST_F(FtlMessageReceptionChannelTest, ServerClosesStream_ResetsStream) { base::RunLoop run_loop; base::WeakPtr<FakeScopedGrpcServerStream> old_stream; @@ -365,18 +365,8 @@ auto fake_server_stream = CreateFakeServerStream(); std::move(on_channel_ready).Run(); - // Keep sending pong until lifetime exceeded. - base::TimeDelta pong_period = - FtlMessageReceptionChannel::kPongTimeout - - base::TimeDelta::FromSeconds(1); - ASSERT_LT(base::TimeDelta(), pong_period); - base::TimeDelta ticked_time; - - // The last FastForwardBy() will make the channel reopen the stream. - while (ticked_time <= FtlMessageReceptionChannel::kPongTimeout) { - scoped_task_environment_.FastForwardBy(pong_period); - ticked_time += pong_period; - } + // Close the stream with OK. + std::move(on_channel_closed).Run(grpc::Status::OK); }, &old_stream)) .WillOnce(StartStream(
diff --git a/remoting/signaling/ftl_signal_strategy.cc b/remoting/signaling/ftl_signal_strategy.cc index ca2b4776..edd769c 100644 --- a/remoting/signaling/ftl_signal_strategy.cc +++ b/remoting/signaling/ftl_signal_strategy.cc
@@ -106,15 +106,14 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<Core> weak_factory_; + base::WeakPtrFactory<Core> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Core); }; FtlSignalStrategy::Core::Core( std::unique_ptr<OAuthTokenGetter> oauth_token_getter, std::unique_ptr<RegistrationManager> registration_manager, - std::unique_ptr<MessagingClient> messaging_client) - : weak_factory_(this) { + std::unique_ptr<MessagingClient> messaging_client) { DETACH_FROM_SEQUENCE(sequence_checker_); DCHECK(oauth_token_getter); DCHECK(registration_manager);
diff --git a/remoting/signaling/iq_sender.cc b/remoting/signaling/iq_sender.cc index 94ffa39..0e664e5 100644 --- a/remoting/signaling/iq_sender.cc +++ b/remoting/signaling/iq_sender.cc
@@ -132,10 +132,7 @@ IqRequest::IqRequest(IqSender* sender, const IqSender::ReplyCallback& callback, const std::string& addressee) - : sender_(sender), - callback_(callback), - addressee_(addressee), - weak_factory_(this) {} + : sender_(sender), callback_(callback), addressee_(addressee) {} IqRequest::~IqRequest() { sender_->RemoveRequest(this);
diff --git a/remoting/signaling/iq_sender.h b/remoting/signaling/iq_sender.h index d14b6af..4361196 100644 --- a/remoting/signaling/iq_sender.h +++ b/remoting/signaling/iq_sender.h
@@ -103,7 +103,7 @@ IqSender::ReplyCallback callback_; std::string addressee_; - base::WeakPtrFactory<IqRequest> weak_factory_; + base::WeakPtrFactory<IqRequest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(IqRequest); };
diff --git a/remoting/signaling/xmpp_log_to_server.cc b/remoting/signaling/xmpp_log_to_server.cc index 380ce25..53070b3 100644 --- a/remoting/signaling/xmpp_log_to_server.cc +++ b/remoting/signaling/xmpp_log_to_server.cc
@@ -25,8 +25,7 @@ scoped_refptr<base::SequencedTaskRunner> caller_task_runner) : mode_(mode), signal_strategy_(signal_strategy), - directory_bot_jid_(directory_bot_jid), - weak_factory_(this) { + directory_bot_jid_(directory_bot_jid) { DETACH_FROM_SEQUENCE(sequence_checker_); if (!caller_task_runner || caller_task_runner->RunsTasksInCurrentSequence()) { Init();
diff --git a/remoting/signaling/xmpp_log_to_server.h b/remoting/signaling/xmpp_log_to_server.h index ba13056..98cf5ed 100644 --- a/remoting/signaling/xmpp_log_to_server.h +++ b/remoting/signaling/xmpp_log_to_server.h
@@ -61,7 +61,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<XmppLogToServer> weak_factory_; + base::WeakPtrFactory<XmppLogToServer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(XmppLogToServer); };
diff --git a/remoting/test/fake_network_manager.cc b/remoting/test/fake_network_manager.cc index 7a29d8a5..e2a4aff 100644 --- a/remoting/test/fake_network_manager.cc +++ b/remoting/test/fake_network_manager.cc
@@ -15,8 +15,7 @@ namespace remoting { FakeNetworkManager::FakeNetworkManager(const rtc::IPAddress& address) - : started_(false), - weak_factory_(this) { + : started_(false) { network_.reset(new rtc::Network("fake", "Fake Network", address, 32)); network_->AddIP(address); }
diff --git a/remoting/test/fake_network_manager.h b/remoting/test/fake_network_manager.h index 23b0b649..2dda87c 100644 --- a/remoting/test/fake_network_manager.h +++ b/remoting/test/fake_network_manager.h
@@ -30,7 +30,7 @@ bool started_; std::unique_ptr<rtc::Network> network_; - base::WeakPtrFactory<FakeNetworkManager> weak_factory_; + base::WeakPtrFactory<FakeNetworkManager> weak_factory_{this}; }; } // namespace remoting
diff --git a/remoting/test/fake_socket_factory.cc b/remoting/test/fake_socket_factory.cc index c0c9364..c99edcd 100644 --- a/remoting/test/fake_socket_factory.cc +++ b/remoting/test/fake_socket_factory.cc
@@ -182,8 +182,7 @@ dispatcher_(dispatcher), address_(dispatcher_->AllocateAddress()), out_of_order_rate_(0.0), - next_port_(kPortRangeStart), - weak_factory_(this) { + next_port_(kPortRangeStart) { dispatcher_->AddNode(this); }
diff --git a/remoting/test/fake_socket_factory.h b/remoting/test/fake_socket_factory.h index 9ec23ba..bf30b37 100644 --- a/remoting/test/fake_socket_factory.h +++ b/remoting/test/fake_socket_factory.h
@@ -137,7 +137,7 @@ base::TimeDelta total_buffer_delay_; base::TimeDelta max_buffer_delay_; - base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_; + base::WeakPtrFactory<FakePacketSocketFactory> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FakePacketSocketFactory); };
diff --git a/remoting/test/ftl_services_playground.cc b/remoting/test/ftl_services_playground.cc index d209e93..24f8b3f 100644 --- a/remoting/test/ftl_services_playground.cc +++ b/remoting/test/ftl_services_playground.cc
@@ -44,7 +44,7 @@ namespace remoting { -FtlServicesPlayground::FtlServicesPlayground() : weak_factory_(this) {} +FtlServicesPlayground::FtlServicesPlayground() {} FtlServicesPlayground::~FtlServicesPlayground() = default;
diff --git a/remoting/test/ftl_services_playground.h b/remoting/test/ftl_services_playground.h index 19cdf61..1383aa53 100644 --- a/remoting/test/ftl_services_playground.h +++ b/remoting/test/ftl_services_playground.h
@@ -88,7 +88,7 @@ base::OnceClosure receive_messages_done_callback_; - base::WeakPtrFactory<FtlServicesPlayground> weak_factory_; + base::WeakPtrFactory<FtlServicesPlayground> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FtlServicesPlayground); };
diff --git a/remoting/test/it2me_cli_host.cc b/remoting/test/it2me_cli_host.cc index d43f216..bc728d5 100644 --- a/remoting/test/it2me_cli_host.cc +++ b/remoting/test/it2me_cli_host.cc
@@ -96,7 +96,7 @@ .c_str()); } -It2MeCliHost::It2MeCliHost() : weak_factory_(this) {} +It2MeCliHost::It2MeCliHost() {} It2MeCliHost::~It2MeCliHost() = default; void It2MeCliHost::Start() {
diff --git a/remoting/test/it2me_cli_host.h b/remoting/test/it2me_cli_host.h index 37f3f24..a06f915 100644 --- a/remoting/test/it2me_cli_host.h +++ b/remoting/test/it2me_cli_host.h
@@ -80,7 +80,7 @@ // True if remote session was established. bool remote_connected_; - base::WeakPtrFactory<It2MeCliHost> weak_factory_; + base::WeakPtrFactory<It2MeCliHost> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(It2MeCliHost); };
diff --git a/remoting/test/test_oauth_token_getter.cc b/remoting/test/test_oauth_token_getter.cc index f202bbc..475b7755 100644 --- a/remoting/test/test_oauth_token_getter.cc +++ b/remoting/test/test_oauth_token_getter.cc
@@ -64,8 +64,7 @@ return email.find("@chromoting.gserviceaccount.com") != std::string::npos; } -TestOAuthTokenGetter::TestOAuthTokenGetter(TestTokenStorage* token_storage) - : weak_factory_(this) { +TestOAuthTokenGetter::TestOAuthTokenGetter(TestTokenStorage* token_storage) { DCHECK(token_storage); token_storage_ = token_storage; auto url_request_context_getter =
diff --git a/remoting/test/test_oauth_token_getter.h b/remoting/test/test_oauth_token_getter.h index 89c20100..81240d0 100644 --- a/remoting/test/test_oauth_token_getter.h +++ b/remoting/test/test_oauth_token_getter.h
@@ -76,7 +76,7 @@ bool is_authenticating_ = false; base::queue<base::OnceClosure> on_authentication_done_; - base::WeakPtrFactory<TestOAuthTokenGetter> weak_factory_; + base::WeakPtrFactory<TestOAuthTokenGetter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TestOAuthTokenGetter); };
diff --git a/remoting/test/test_video_renderer.cc b/remoting/test/test_video_renderer.cc index 0ed0de4..e0f7c7e 100644 --- a/remoting/test/test_video_renderer.cc +++ b/remoting/test/test_video_renderer.cc
@@ -272,8 +272,7 @@ TestVideoRenderer::TestVideoRenderer() : video_decode_thread_( - new base::Thread("TestVideoRendererVideoDecodingThread")), - weak_factory_(this) { + new base::Thread("TestVideoRendererVideoDecodingThread")) { DCHECK(thread_checker_.CalledOnValidThread()); core_.reset(new Core());
diff --git a/remoting/test/test_video_renderer.h b/remoting/test/test_video_renderer.h index 0a76499..91e6273 100644 --- a/remoting/test/test_video_renderer.h +++ b/remoting/test/test_video_renderer.h
@@ -88,7 +88,7 @@ // Used to weakly bind |this| to methods. // NOTE: Weak pointers must be invalidated before all other member variables. - base::WeakPtrFactory<TestVideoRenderer> weak_factory_; + base::WeakPtrFactory<TestVideoRenderer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TestVideoRenderer); };
diff --git a/services/audio/debug_recording.cc b/services/audio/debug_recording.cc index 4dd189b..12b2fd3 100644 --- a/services/audio/debug_recording.cc +++ b/services/audio/debug_recording.cc
@@ -19,8 +19,7 @@ TracedServiceRef service_ref) : audio_manager_(audio_manager), receiver_(this, std::move(receiver)), - service_ref_(std::move(service_ref)), - weak_factory_(this) { + service_ref_(std::move(service_ref)) { DCHECK(audio_manager_ != nullptr); DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
diff --git a/services/audio/debug_recording.h b/services/audio/debug_recording.h index 5fee2a3..9a13b78b 100644 --- a/services/audio/debug_recording.h +++ b/services/audio/debug_recording.h
@@ -53,7 +53,7 @@ mojo::Remote<mojom::DebugRecordingFileProvider> file_provider_; TracedServiceRef service_ref_; - base::WeakPtrFactory<DebugRecording> weak_factory_; + base::WeakPtrFactory<DebugRecording> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DebugRecording); };
diff --git a/services/audio/device_notifier.cc b/services/audio/device_notifier.cc index 5c57ff5..4b5aef2 100644 --- a/services/audio/device_notifier.cc +++ b/services/audio/device_notifier.cc
@@ -14,8 +14,7 @@ namespace audio { DeviceNotifier::DeviceNotifier() - : task_runner_(base::SequencedTaskRunnerHandle::Get()), - weak_factory_(this) { + : task_runner_(base::SequencedTaskRunnerHandle::Get()) { base::SystemMonitor::Get()->AddDevicesChangedObserver(this); }
diff --git a/services/audio/device_notifier.h b/services/audio/device_notifier.h index 4c28ad8..42a5c17 100644 --- a/services/audio/device_notifier.h +++ b/services/audio/device_notifier.h
@@ -47,7 +47,7 @@ base::flat_map<int, mojo::Remote<mojom::DeviceListener>> listeners_; mojo::ReceiverSet<mojom::DeviceNotifier, TracedServiceRef> receivers_; const scoped_refptr<base::SequencedTaskRunner> task_runner_; - base::WeakPtrFactory<DeviceNotifier> weak_factory_; + base::WeakPtrFactory<DeviceNotifier> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DeviceNotifier); };
diff --git a/services/audio/input_controller.cc b/services/audio/input_controller.cc index c88dde8..04ae7fe 100644 --- a/services/audio/input_controller.cc +++ b/services/audio/input_controller.cc
@@ -402,8 +402,7 @@ type_(type), user_input_monitor_(user_input_monitor), stream_monitor_coordinator_(stream_monitor_coordinator), - processing_config_(std::move(processing_config)), - weak_ptr_factory_(this) { + processing_config_(std::move(processing_config)) { DCHECK_CALLED_ON_VALID_THREAD(owning_thread_); DCHECK(handler_); DCHECK(sync_writer_);
diff --git a/services/audio/input_controller.h b/services/audio/input_controller.h index 07a8d849..9ba2d71 100644 --- a/services/audio/input_controller.h +++ b/services/audio/input_controller.h
@@ -358,7 +358,7 @@ // the error notification is pending and then make a callback from an // InputController that has already been closed. // All outstanding weak pointers, are invalidated at the end of DoClose. - base::WeakPtrFactory<InputController> weak_ptr_factory_; + base::WeakPtrFactory<InputController> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(InputController); };
diff --git a/services/audio/input_controller_unittest.cc b/services/audio/input_controller_unittest.cc index 02a7e1c7..dd1fa6c 100644 --- a/services/audio/input_controller_unittest.cc +++ b/services/audio/input_controller_unittest.cc
@@ -105,11 +105,12 @@ }; // Parameter: use audio processing. -class InputControllerTest : public ::testing::TestWithParam<bool> { +template <base::test::ScopedTaskEnvironment::TimeSource TimeSource = + base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME> +class TimeSourceInputControllerTest : public ::testing::TestWithParam<bool> { public: - InputControllerTest() - : task_environment_( - base::test::ScopedTaskEnvironment::TimeSource::MOCK_TIME), + TimeSourceInputControllerTest() + : task_environment_(TimeSource), audio_manager_(std::make_unique<media::FakeAudioManager>( std::make_unique<media::TestAudioThread>(false), &log_factory_)), @@ -125,7 +126,7 @@ #endif } - ~InputControllerTest() override { + ~TimeSourceInputControllerTest() override { audio_manager_->Shutdown(); task_environment_.RunUntilIdle(); } @@ -165,9 +166,13 @@ mojo::Remote<mojom::AudioProcessorControls> remote_controls_; private: - DISALLOW_COPY_AND_ASSIGN(InputControllerTest); + DISALLOW_COPY_AND_ASSIGN(TimeSourceInputControllerTest); }; +using SystemTimeInputControllerTest = TimeSourceInputControllerTest< + base::test::ScopedTaskEnvironment::TimeSource::SYSTEM_TIME>; +using InputControllerTest = TimeSourceInputControllerTest<>; + TEST_P(InputControllerTest, CreateAndCloseWithoutRecording) { EXPECT_CALL(event_handler_, OnCreated(_)); CreateAudioController(); @@ -179,7 +184,10 @@ } // Test a normal call sequence of create, record and close. -TEST_P(InputControllerTest, CreateRecordAndClose) { +// Note: Must use system time as MOCK_TIME does not support the threads created +// by the FakeAudioInputStream. The callbacks to sync_writer_.Write() are on +// that thread, and thus we must use SYSTEM_TIME. +TEST_P(SystemTimeInputControllerTest, CreateRecordAndClose) { EXPECT_CALL(event_handler_, OnCreated(_)); CreateAudioController(); ASSERT_TRUE(controller_.get()); @@ -272,8 +280,12 @@ #if defined(AUDIO_PROCESSING_IN_AUDIO_SERVICE) INSTANTIATE_TEST_SUITE_P(, InputControllerTest, ::testing::Bool()); +INSTANTIATE_TEST_SUITE_P(, SystemTimeInputControllerTest, ::testing::Bool()); #else INSTANTIATE_TEST_SUITE_P(, InputControllerTest, testing::Values(false)); +INSTANTIATE_TEST_SUITE_P(, + SystemTimeInputControllerTest, + ::testing::Values(false)); #endif } // namespace audio
diff --git a/services/audio/input_stream.cc b/services/audio/input_stream.cc index 2cfca44e..54b34bc 100644 --- a/services/audio/input_stream.cc +++ b/services/audio/input_stream.cc
@@ -56,8 +56,7 @@ shared_memory_count, params, &foreign_socket_)), - user_input_monitor_(std::move(user_input_monitor)), - weak_factory_(this) { + user_input_monitor_(std::move(user_input_monitor)) { DCHECK(audio_manager); DCHECK(receiver_.is_bound()); DCHECK(client_);
diff --git a/services/audio/input_stream.h b/services/audio/input_stream.h index 8461290..1688fedf 100644 --- a/services/audio/input_stream.h +++ b/services/audio/input_stream.h
@@ -98,7 +98,7 @@ SEQUENCE_CHECKER(owning_sequence_); - base::WeakPtrFactory<InputStream> weak_factory_; + base::WeakPtrFactory<InputStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(InputStream); };
diff --git a/services/audio/loopback_stream.cc b/services/audio/loopback_stream.cc index c30ec22e..32a34b9f 100644 --- a/services/audio/loopback_stream.cc +++ b/services/audio/loopback_stream.cc
@@ -52,8 +52,7 @@ observer_(std::move(observer)), coordinator_(coordinator), group_id_(group_id), - network_(nullptr, base::OnTaskRunnerDeleter(flow_task_runner)), - weak_factory_(this) { + network_(nullptr, base::OnTaskRunnerDeleter(flow_task_runner)) { DCHECK(coordinator_); TRACE_EVENT1("audio", "LoopbackStream::LoopbackStream", "params",
diff --git a/services/audio/loopback_stream.h b/services/audio/loopback_stream.h index aa15bbe..a2db772 100644 --- a/services/audio/loopback_stream.h +++ b/services/audio/loopback_stream.h
@@ -251,7 +251,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<LoopbackStream> weak_factory_; + base::WeakPtrFactory<LoopbackStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(LoopbackStream); };
diff --git a/services/audio/output_controller.cc b/services/audio/output_controller.cc index faf7e55..daa9969 100644 --- a/services/audio/output_controller.cc +++ b/services/audio/output_controller.cc
@@ -112,8 +112,7 @@ processing_id_(processing_id), power_monitor_( params.sample_rate(), - TimeDelta::FromMilliseconds(kPowerMeasurementTimeConstantMillis)), - weak_factory_for_stream_(this) { + TimeDelta::FromMilliseconds(kPowerMeasurementTimeConstantMillis)) { DCHECK(audio_manager); DCHECK(handler_); DCHECK(sync_reader_);
diff --git a/services/audio/output_controller.h b/services/audio/output_controller.h index ba979115..e510063 100644 --- a/services/audio/output_controller.h +++ b/services/audio/output_controller.h
@@ -306,7 +306,7 @@ // WeakPtrFactory+WeakPtr that is used to post tasks that are canceled when a // stream is closed. base::WeakPtr<OutputController> weak_this_for_stream_; - base::WeakPtrFactory<OutputController> weak_factory_for_stream_; + base::WeakPtrFactory<OutputController> weak_factory_for_stream_{this}; DISALLOW_COPY_AND_ASSIGN(OutputController); };
diff --git a/services/audio/output_stream.cc b/services/audio/output_stream.cc index 81c0e2b..0fa7547 100644 --- a/services/audio/output_stream.cc +++ b/services/audio/output_stream.cc
@@ -52,8 +52,7 @@ &reader_, stream_monitor_coordinator, processing_id), - loopback_group_id_(loopback_group_id), - weak_factory_(this) { + loopback_group_id_(loopback_group_id) { DCHECK(receiver_.is_bound()); DCHECK(created_callback); DCHECK(delete_callback_);
diff --git a/services/audio/output_stream.h b/services/audio/output_stream.h index 5f3bfa9..fad9be7 100644 --- a/services/audio/output_stream.h +++ b/services/audio/output_stream.h
@@ -107,7 +107,7 @@ base::RepeatingTimer poll_timer_; bool is_audible_ = false; - base::WeakPtrFactory<OutputStream> weak_factory_; + base::WeakPtrFactory<OutputStream> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(OutputStream); };
diff --git a/services/audio/public/cpp/output_device.cc b/services/audio/public/cpp/output_device.cc index f0c2c1cb..d00557e 100644 --- a/services/audio/public/cpp/output_device.cc +++ b/services/audio/public/cpp/output_device.cc
@@ -23,9 +23,7 @@ const media::AudioParameters& params, media::AudioRendererSink::RenderCallback* render_callback, const std::string& device_id) - : audio_parameters_(params), - render_callback_(render_callback), - weak_factory_(this) { + : audio_parameters_(params), render_callback_(render_callback) { DETACH_FROM_SEQUENCE(sequence_checker_); DCHECK(params.IsValid()); connector->Connect(audio::mojom::kServiceName,
diff --git a/services/audio/public/cpp/output_device.h b/services/audio/public/cpp/output_device.h index 9cff1f1b..e306455 100644 --- a/services/audio/public/cpp/output_device.h +++ b/services/audio/public/cpp/output_device.h
@@ -51,7 +51,7 @@ mojo::Remote<media::mojom::AudioOutputStream> stream_; mojo::Remote<audio::mojom::StreamFactory> stream_factory_; - base::WeakPtrFactory<OutputDevice> weak_factory_; + base::WeakPtrFactory<OutputDevice> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(OutputDevice); };
diff --git a/services/device/battery/battery_status_manager_linux.h b/services/device/battery/battery_status_manager_linux.h index ca1d9b0a..0163b93 100644 --- a/services/device/battery/battery_status_manager_linux.h +++ b/services/device/battery/battery_status_manager_linux.h
@@ -7,6 +7,10 @@ #include "services/device/battery/battery_status_manager.h" #include "services/device/public/mojom/battery_status.mojom.h" +namespace base { +class Thread; +} + namespace dbus { class Bus; } // namespace dbus
diff --git a/services/device/device_service.cc b/services/device/device_service.cc index 8ba0500f..4054179 100644 --- a/services/device/device_service.cc +++ b/services/device/device_service.cc
@@ -190,12 +190,17 @@ #if (defined(OS_LINUX) && defined(USE_UDEV)) || defined(OS_WIN) || \ defined(OS_MACOSX) - // SerialPortManagerImpl must live on a thread that is allowed to do - // blocking IO. serial_port_manager_ = std::make_unique<SerialPortManagerImpl>( io_task_runner_, base::ThreadTaskRunnerHandle::Get()); +#if defined(OS_MACOSX) + // On macOS the SerialDeviceEnumerator needs to run on the UI thread so that + // it has access to a CFRunLoop where it can register a notification source. + serial_port_manager_task_runner_ = base::ThreadTaskRunnerHandle::Get(); +#else + // On other platforms it must be allowed to do blocking IO. serial_port_manager_task_runner_ = base::CreateSequencedTaskRunner( {base::ThreadPool(), base::MayBlock(), base::TaskPriority::BEST_EFFORT}); +#endif registry_.AddInterface<mojom::SerialPortManager>( base::BindRepeating(&SerialPortManagerImpl::Bind, base::Unretained(serial_port_manager_.get())),
diff --git a/services/device/public/mojom/BUILD.gn b/services/device/public/mojom/BUILD.gn index 5a7910f1..e0bcbb0 100644 --- a/services/device/public/mojom/BUILD.gn +++ b/services/device/public/mojom/BUILD.gn
@@ -60,9 +60,6 @@ "//third_party/blink/renderer/platform:blink_platform_public_deps", "//third_party/blink/public/mojom:mojom_platform_blink", ] - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true } mojom("generic_sensor") { @@ -136,9 +133,6 @@ "//third_party/blink/renderer/modules/webusb", "//chrome/browser/ui/webui/usb_internals:mojo_bindings_blink", ] - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true } mojom("usb_test") { @@ -149,7 +143,4 @@ public_deps = [ "//url/mojom:url_mojom_gurl", ] - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true }
diff --git a/services/device/screen_orientation/screen_orientation_listener_android.cc b/services/device/screen_orientation/screen_orientation_listener_android.cc index 0487ab81..37d0e522 100644 --- a/services/device/screen_orientation/screen_orientation_listener_android.cc +++ b/services/device/screen_orientation/screen_orientation_listener_android.cc
@@ -5,7 +5,7 @@ #include "services/device/screen_orientation/screen_orientation_listener_android.h" #include "base/android/jni_android.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "mojo/public/cpp/bindings/strong_binding.h" #include "services/device/screen_orientation/screen_orientation_jni_headers/ScreenOrientationListener_jni.h"
diff --git a/services/device/serial/serial_device_enumerator_mac.cc b/services/device/serial/serial_device_enumerator_mac.cc index f91c271e..a1c0c44 100644 --- a/services/device/serial/serial_device_enumerator_mac.cc +++ b/services/device/serial/serial_device_enumerator_mac.cc
@@ -24,6 +24,7 @@ #include "base/metrics/histogram_functions.h" #include "base/strings/pattern.h" #include "base/strings/string_util.h" +#include "base/strings/stringprintf.h" #include "base/strings/sys_string_conversions.h" #include "base/threading/scoped_blocking_call.h" @@ -31,6 +32,10 @@ namespace { +std::string HexErrorCode(IOReturn error_code) { + return base::StringPrintf("0x%08x", error_code); +} + // Searches a service and all ancestor services for a property with the // specified key, returning NULL if no such key was found. CFTypeRef GetCFProperty(io_service_t service, const CFStringRef key) { @@ -97,11 +102,6 @@ return false; } -// Returns value clamped to the range of [min, max]. -int Clamp(int value, int min, int max) { - return std::min(std::max(value, min), max); -} - } // namespace // static @@ -109,76 +109,98 @@ return std::make_unique<SerialDeviceEnumeratorMac>(); } -SerialDeviceEnumeratorMac::SerialDeviceEnumeratorMac() {} +SerialDeviceEnumeratorMac::SerialDeviceEnumeratorMac() { + notify_port_.reset(IONotificationPortCreate(kIOMasterPortDefault)); + CFRunLoopAddSource(CFRunLoopGetMain(), + IONotificationPortGetRunLoopSource(notify_port_.get()), + kCFRunLoopDefaultMode); + + IOReturn result = IOServiceAddMatchingNotification( + notify_port_.get(), kIOFirstMatchNotification, + IOServiceMatching(kIOSerialBSDServiceValue), FirstMatchCallback, this, + devices_added_iterator_.InitializeInto()); + if (result != kIOReturnSuccess) { + DLOG(ERROR) << "Failed to listen for device arrival: " + << HexErrorCode(result); + return; + } + + // Drain |devices_added_iterator_| to arm the notification. + AddDevices(); + + result = IOServiceAddMatchingNotification( + notify_port_.get(), kIOTerminatedNotification, + IOServiceMatching(kIOSerialBSDServiceValue), TerminatedCallback, this, + devices_removed_iterator_.InitializeInto()); + if (result != kIOReturnSuccess) { + DLOG(ERROR) << "Failed to listen for device removal: " + << HexErrorCode(result); + return; + } + + // Drain |devices_removed_iterator_| to arm the notification. + RemoveDevices(); +} SerialDeviceEnumeratorMac::~SerialDeviceEnumeratorMac() {} std::vector<mojom::SerialPortInfoPtr> SerialDeviceEnumeratorMac::GetDevices() { - std::vector<mojom::SerialPortInfoPtr> devices = GetDevicesNew(); - std::vector<mojom::SerialPortInfoPtr> old_devices = GetDevicesOld(); - - base::UmaHistogramSparse("Hardware.Serial.NewMinusOldDeviceListSize", - Clamp(devices.size() - old_devices.size(), -10, 10)); - - // Add devices found from both the new and old methods of enumeration. If a - // device is found using both the new and the old enumeration method, then we - // take the device from the new enumeration method because it's able to - // collect more information. We do this by inserting the new devices first, - // because insertions are ignored if the key already exists. - std::unordered_set<base::FilePath> devices_seen; - for (const auto& device : devices) { - bool inserted = devices_seen.insert(device->path).second; - DCHECK(inserted); - } - for (auto& device : old_devices) { - if (devices_seen.insert(device->path).second) - devices.push_back(std::move(device)); - } - return devices; + std::vector<mojom::SerialPortInfoPtr> ports; + ports.reserve(ports_.size()); + for (const auto& map_entry : ports_) + ports.push_back(map_entry.second->Clone()); + return ports; } -// Returns an array of devices as retrieved through the new method of -// enumerating serial devices (IOKit). This new method gives more information -// about the devices than the old method. -std::vector<mojom::SerialPortInfoPtr> -SerialDeviceEnumeratorMac::GetDevicesNew() { - std::vector<mojom::SerialPortInfoPtr> devices; +base::Optional<base::FilePath> SerialDeviceEnumeratorMac::GetPathFromToken( + const base::UnguessableToken& token) { + auto it = ports_.find(token); + if (it == ports_.end()) + return base::nullopt; + return it->second->path; +} - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, - base::BlockingType::MAY_BLOCK); - // Make a service query to find all serial devices. - CFMutableDictionaryRef matchingDict = - IOServiceMatching(kIOSerialBSDServiceValue); - if (!matchingDict) - return devices; +// static +void SerialDeviceEnumeratorMac::FirstMatchCallback(void* context, + io_iterator_t iterator) { + auto* enumerator = static_cast<SerialDeviceEnumeratorMac*>(context); + DCHECK_EQ(enumerator->devices_added_iterator_, iterator); + enumerator->AddDevices(); +} - io_iterator_t it; - kern_return_t kr = - IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &it); - if (kr != KERN_SUCCESS) - return devices; +// static +void SerialDeviceEnumeratorMac::TerminatedCallback(void* context, + io_iterator_t iterator) { + auto* enumerator = static_cast<SerialDeviceEnumeratorMac*>(context); + DCHECK_EQ(enumerator->devices_removed_iterator_, iterator); + enumerator->RemoveDevices(); +} - base::mac::ScopedIOObject<io_iterator_t> scoped_it(it); - base::mac::ScopedIOObject<io_service_t> scoped_device; - while (scoped_device.reset(IOIteratorNext(scoped_it.get())), scoped_device) { +void SerialDeviceEnumeratorMac::AddDevices() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + + base::mac::ScopedIOObject<io_service_t> device; + while (device.reset(IOIteratorNext(devices_added_iterator_)), device) { + uint64_t entry_id; + IOReturn result = IORegistryEntryGetRegistryEntryID(device, &entry_id); + if (result != kIOReturnSuccess) + continue; + auto callout_info = mojom::SerialPortInfo::New(); - uint16_t vendorId; - if (GetUInt16Property(scoped_device.get(), CFSTR(kUSBVendorID), - &vendorId)) { + if (GetUInt16Property(device.get(), CFSTR(kUSBVendorID), &vendorId)) { callout_info->has_vendor_id = true; callout_info->vendor_id = vendorId; } uint16_t productId; - if (GetUInt16Property(scoped_device.get(), CFSTR(kUSBProductID), - &productId)) { + if (GetUInt16Property(device.get(), CFSTR(kUSBProductID), &productId)) { callout_info->has_product_id = true; callout_info->product_id = productId; } std::string display_name; - if (GetStringProperty(scoped_device.get(), CFSTR(kUSBProductString), + if (GetStringProperty(device.get(), CFSTR(kUSBProductString), &display_name)) { callout_info->display_name = std::move(display_name); } @@ -187,68 +209,49 @@ // "dialin" path starting with "tty" and a "callout" path starting with // "cu". Each of these is considered a different device from Chrome's // standpoint, but both should share the device's USB properties. - std::string dialinDevice; - if (GetStringProperty(scoped_device.get(), CFSTR(kIODialinDeviceKey), - &dialinDevice)) { + std::string dialin_device; + if (GetStringProperty(device.get(), CFSTR(kIODialinDeviceKey), + &dialin_device)) { + auto token = base::UnguessableToken::Create(); mojom::SerialPortInfoPtr dialin_info = callout_info.Clone(); - dialin_info->path = base::FilePath(dialinDevice); - dialin_info->token = GetTokenFromPath(dialin_info->path); - devices.push_back(std::move(dialin_info)); + dialin_info->path = base::FilePath(dialin_device); + dialin_info->token = token; + ports_.insert(std::make_pair(token, std::move(dialin_info))); + entries_[entry_id].first = token; } - std::string calloutDevice; - if (GetStringProperty(scoped_device.get(), CFSTR(kIOCalloutDeviceKey), - &calloutDevice)) { - callout_info->path = base::FilePath(calloutDevice); - callout_info->token = GetTokenFromPath(callout_info->path); - devices.push_back(std::move(callout_info)); + std::string callout_device; + if (GetStringProperty(device.get(), CFSTR(kIOCalloutDeviceKey), + &callout_device)) { + auto token = base::UnguessableToken::Create(); + callout_info->path = base::FilePath(callout_device); + callout_info->token = token; + ports_.insert(std::make_pair(token, std::move(callout_info))); + entries_[entry_id].second = token; } } - - return devices; } -// Returns an array of devices as retrieved through the old method of -// enumerating serial devices (pattern matching in /dev/). This old method gives -// less information about the devices than the new method. -std::vector<mojom::SerialPortInfoPtr> -SerialDeviceEnumeratorMac::GetDevicesOld() { - const base::FilePath kDevRoot("/dev"); - const int kFilesAndSymLinks = - base::FileEnumerator::FILES | base::FileEnumerator::SHOW_SYM_LINKS; +void SerialDeviceEnumeratorMac::RemoveDevices() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - std::set<std::string> valid_patterns; - valid_patterns.insert("/dev/*Bluetooth*"); - valid_patterns.insert("/dev/*Modem*"); - valid_patterns.insert("/dev/*bluetooth*"); - valid_patterns.insert("/dev/*modem*"); - valid_patterns.insert("/dev/*serial*"); - valid_patterns.insert("/dev/tty.*"); - valid_patterns.insert("/dev/cu.*"); + base::mac::ScopedIOObject<io_service_t> device; + while (device.reset(IOIteratorNext(devices_removed_iterator_)), device) { + uint64_t entry_id; + IOReturn result = IORegistryEntryGetRegistryEntryID(device, &entry_id); + if (result != kIOReturnSuccess) + continue; - base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, - base::BlockingType::MAY_BLOCK); - std::vector<mojom::SerialPortInfoPtr> devices; - base::FileEnumerator enumerator(kDevRoot, false, kFilesAndSymLinks); - do { - const base::FilePath next_device_path(enumerator.Next()); - const std::string next_device = next_device_path.value(); - if (next_device.empty()) - break; + auto it = entries_.find(entry_id); + if (it == entries_.end()) + continue; - std::set<std::string>::const_iterator i = valid_patterns.begin(); - for (; i != valid_patterns.end(); ++i) { - if (base::MatchPattern(next_device, *i)) { - auto info = mojom::SerialPortInfo::New(); - - info->path = base::FilePath(next_device); - info->token = GetTokenFromPath(info->path); - devices.push_back(std::move(info)); - break; - } - } - } while (true); - return devices; + if (it->second.first) + ports_.erase(it->second.first); + if (it->second.second) + ports_.erase(it->second.second); + entries_.erase(it); + } } } // namespace device
diff --git a/services/device/serial/serial_device_enumerator_mac.h b/services/device/serial/serial_device_enumerator_mac.h index 284a3b6b..608d6ea9 100644 --- a/services/device/serial/serial_device_enumerator_mac.h +++ b/services/device/serial/serial_device_enumerator_mac.h
@@ -5,9 +5,16 @@ #ifndef SERVICES_DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_MAC_H_ #define SERVICES_DEVICE_SERIAL_SERIAL_DEVICE_ENUMERATOR_MAC_H_ -#include <vector> +#include <IOKit/IOKitLib.h> +#include <map> +#include <string> + +#include "base/mac/scoped_ionotificationportref.h" +#include "base/mac/scoped_ioobject.h" #include "base/macros.h" +#include "base/sequence_checker.h" +#include "base/unguessable_token.h" #include "services/device/serial/serial_device_enumerator.h" namespace device { @@ -18,12 +25,29 @@ SerialDeviceEnumeratorMac(); ~SerialDeviceEnumeratorMac() override; - // Implementation for SerialDeviceEnumerator. + // SerialDeviceEnumerator std::vector<mojom::SerialPortInfoPtr> GetDevices() override; + base::Optional<base::FilePath> GetPathFromToken( + const base::UnguessableToken& token) override; private: - std::vector<mojom::SerialPortInfoPtr> GetDevicesNew(); - std::vector<mojom::SerialPortInfoPtr> GetDevicesOld(); + static void FirstMatchCallback(void* context, io_iterator_t iterator); + static void TerminatedCallback(void* context, io_iterator_t iterator); + + void AddDevices(); + void RemoveDevices(); + + std::map<base::UnguessableToken, mojom::SerialPortInfoPtr> ports_; + // Each IORegistry entry potentially creates two serial ports for the dialin + // and callout device nodes. + std::map<uint64_t, std::pair<base::UnguessableToken, base::UnguessableToken>> + entries_; + + base::mac::ScopedIONotificationPortRef notify_port_; + base::mac::ScopedIOObject<io_iterator_t> devices_added_iterator_; + base::mac::ScopedIOObject<io_iterator_t> devices_removed_iterator_; + + SEQUENCE_CHECKER(sequence_checker_); DISALLOW_COPY_AND_ASSIGN(SerialDeviceEnumeratorMac); };
diff --git a/services/metrics/public/cpp/mojo_ukm_recorder.cc b/services/metrics/public/cpp/mojo_ukm_recorder.cc index 6b70d5c..f347562 100644 --- a/services/metrics/public/cpp/mojo_ukm_recorder.cc +++ b/services/metrics/public/cpp/mojo_ukm_recorder.cc
@@ -13,7 +13,7 @@ namespace ukm { MojoUkmRecorder::MojoUkmRecorder(mojom::UkmRecorderInterfacePtr interface) - : interface_(std::move(interface)), weak_factory_(this) {} + : interface_(std::move(interface)) {} MojoUkmRecorder::~MojoUkmRecorder() = default; // static
diff --git a/services/metrics/public/cpp/mojo_ukm_recorder.h b/services/metrics/public/cpp/mojo_ukm_recorder.h index 2b01308..1e77bcdee 100644 --- a/services/metrics/public/cpp/mojo_ukm_recorder.h +++ b/services/metrics/public/cpp/mojo_ukm_recorder.h
@@ -53,7 +53,7 @@ mojom::UkmRecorderInterfacePtr interface_; - base::WeakPtrFactory<MojoUkmRecorder> weak_factory_; + base::WeakPtrFactory<MojoUkmRecorder> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MojoUkmRecorder); };
diff --git a/services/network/network_context.cc b/services/network/network_context.cc index f112f52..dd1d63d 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc
@@ -1163,8 +1163,8 @@ #endif // BUILDFLAG(IS_CT_SUPPORTED) void NetworkContext::CreateUDPSocket(mojom::UDPSocketRequest request, - mojom::UDPSocketReceiverPtr receiver) { - socket_factory_->CreateUDPSocket(std::move(request), std::move(receiver)); + mojom::UDPSocketListenerPtr listener) { + socket_factory_->CreateUDPSocket(std::move(request), std::move(listener)); } void NetworkContext::CreateTCPServerSocket( @@ -1921,6 +1921,8 @@ *base::CommandLine::ForCurrentProcess(), is_quic_force_disabled, params_->quic_user_agent_id, &session_params); + session_params.allow_default_credentials = params_->allow_default_credentials; + session_params.http_09_on_non_default_ports_enabled = params_->http_09_on_non_default_ports_enabled; session_params.disable_idle_sockets_close_on_memory_pressure = @@ -1930,7 +1932,7 @@ builder.SetCreateHttpTransactionFactoryCallback( base::BindOnce([](net::HttpNetworkSession* session) - -> std::unique_ptr<net::HttpTransactionFactory> { + -> std::unique_ptr<net::HttpTransactionFactory> { return std::make_unique<ThrottlingNetworkTransactionFactory>(session); }));
diff --git a/services/network/network_context.h b/services/network/network_context.h index f921eb6..bae29f0 100644 --- a/services/network/network_context.h +++ b/services/network/network_context.h
@@ -235,7 +235,7 @@ GetExpectCTStateCallback callback) override; #endif // BUILDFLAG(IS_CT_SUPPORTED) void CreateUDPSocket(mojom::UDPSocketRequest request, - mojom::UDPSocketReceiverPtr receiver) override; + mojom::UDPSocketListenerPtr listener) override; void CreateTCPServerSocket( const net::IPEndPoint& local_addr, uint32_t backlog,
diff --git a/services/network/network_context_unittest.cc b/services/network/network_context_unittest.cc index ecde06c3..e8f8ae0 100644 --- a/services/network/network_context_unittest.cc +++ b/services/network/network_context_unittest.cc
@@ -2404,15 +2404,15 @@ CreateContextWithParams(CreateContextParams()); // Create a server socket to listen for incoming datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); net::IPEndPoint server_addr(GetLocalHostWithAnyPort()); mojom::UDPSocketPtr server_socket; network_context->CreateUDPSocket(mojo::MakeRequest(&server_socket), - std::move(receiver_interface_ptr)); + std::move(listener_interface_ptr)); test::UDPSocketTestHelper helper(&server_socket); ASSERT_EQ(net::OK, helper.BindSync(server_addr, nullptr, &server_addr)); @@ -2440,11 +2440,11 @@ EXPECT_EQ(net::OK, result); } - receiver.WaitForReceivedResults(kDatagramCount); - EXPECT_EQ(kDatagramCount, receiver.results().size()); + listener.WaitForReceivedResults(kDatagramCount); + EXPECT_EQ(kDatagramCount, listener.results().size()); int i = 0; - for (const auto& result : receiver.results()) { + for (const auto& result : listener.results()) { EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(result.src_addr, client_addr); EXPECT_EQ(CreateTestMessage(static_cast<uint8_t>(i), kDatagramSize),
diff --git a/services/network/public/cpp/BUILD.gn b/services/network/public/cpp/BUILD.gn index 1d895a1e..d872758 100644 --- a/services/network/public/cpp/BUILD.gn +++ b/services/network/public/cpp/BUILD.gn
@@ -198,6 +198,7 @@ "cors/preflight_result_unittest.cc", "cross_thread_shared_url_loader_factory_info_unittest.cc", "digitally_signed_mojom_traits_unittest.cc", + "default_credentials_mojom_traits_unittest.cc", "header_util_unittest.cc", "host_resolver_mojom_traits_unittest.cc", "ip_address_mojom_traits_unittest.cc",
diff --git a/services/network/public/cpp/default_credentials.typemap b/services/network/public/cpp/default_credentials.typemap new file mode 100644 index 0000000..09530f085 --- /dev/null +++ b/services/network/public/cpp/default_credentials.typemap
@@ -0,0 +1,17 @@ +mojom = "//services/network/public/mojom/default_credentials.mojom" +public_headers = [ + "//ipc/ipc_message_utils.h", + "//net/http/http_auth_preferences.h", +] +traits_headers = [ + "//services/network/public/cpp/default_credentials_mojom_traits.h", +] +sources = [ + "//services/network/public/cpp/default_credentials_mojom_traits.cc", +] +public_deps = [ + "//net", +] +type_mappings = [ + "network.mojom.DefaultCredentials=net::HttpAuthPreferences::DefaultCredentials", +]
diff --git a/services/network/public/cpp/default_credentials_mojom_traits.cc b/services/network/public/cpp/default_credentials_mojom_traits.cc new file mode 100644 index 0000000..c38a237 --- /dev/null +++ b/services/network/public/cpp/default_credentials_mojom_traits.cc
@@ -0,0 +1,38 @@ +// Copyright 2019 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 "services/network/public/cpp/default_credentials_mojom_traits.h" + +namespace mojo { + +network::mojom::DefaultCredentials +EnumTraits<network::mojom::DefaultCredentials, + net::HttpAuthPreferences::DefaultCredentials>:: + ToMojom(net::HttpAuthPreferences::DefaultCredentials input) { + switch (input) { + case net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS: + return network::mojom::DefaultCredentials::ALLOW_DEFAULT_CREDENTIALS; + case net::HttpAuthPreferences::DISALLOW_DEFAULT_CREDENTIALS: + return network::mojom::DefaultCredentials::DISALLOW_DEFAULT_CREDENTIALS; + } + NOTREACHED(); + return network::mojom::DefaultCredentials::ALLOW_DEFAULT_CREDENTIALS; +} + +bool EnumTraits<network::mojom::DefaultCredentials, + net::HttpAuthPreferences::DefaultCredentials>:: + FromMojom(network::mojom::DefaultCredentials input, + net::HttpAuthPreferences::DefaultCredentials* output) { + switch (input) { + case network::mojom::DefaultCredentials::ALLOW_DEFAULT_CREDENTIALS: + *output = net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS; + return true; + case network::mojom::DefaultCredentials::DISALLOW_DEFAULT_CREDENTIALS: + *output = net::HttpAuthPreferences::DISALLOW_DEFAULT_CREDENTIALS; + return true; + } + return false; +} + +} // namespace mojo
diff --git a/services/network/public/cpp/default_credentials_mojom_traits.h b/services/network/public/cpp/default_credentials_mojom_traits.h new file mode 100644 index 0000000..50f429c --- /dev/null +++ b/services/network/public/cpp/default_credentials_mojom_traits.h
@@ -0,0 +1,27 @@ +// Copyright 2019 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. + +#ifndef SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_ +#define SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_ + +#include "ipc/ipc_message_utils.h" +#include "mojo/public/cpp/bindings/enum_traits.h" +#include "net/http/http_auth_preferences.h" +#include "services/network/public/mojom/default_credentials.mojom.h" + +namespace mojo { + +template <> +struct EnumTraits<network::mojom::DefaultCredentials, + net::HttpAuthPreferences::DefaultCredentials> { + static network::mojom::DefaultCredentials ToMojom( + net::HttpAuthPreferences::DefaultCredentials input); + + static bool FromMojom(network::mojom::DefaultCredentials input, + net::HttpAuthPreferences::DefaultCredentials* output); +}; + +} // namespace mojo + +#endif // SERVICES_NETWORK_PUBLIC_CPP_DEFAULT_CREDENTIALS_MOJOM_TRAITS_H_
diff --git a/services/network/public/cpp/default_credentials_mojom_traits_unittest.cc b/services/network/public/cpp/default_credentials_mojom_traits_unittest.cc new file mode 100644 index 0000000..4adc8fdc --- /dev/null +++ b/services/network/public/cpp/default_credentials_mojom_traits_unittest.cc
@@ -0,0 +1,36 @@ +// Copyright 2019 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 "services/network/public/cpp/default_credentials_mojom_traits.h" + +#include <vector> + +#include "base/test/gtest_util.h" +#include "mojo/public/cpp/test_support/test_utils.h" +#include "services/network/public/cpp/default_credentials_mojom_traits.h" +#include "services/network/public/mojom/default_credentials.mojom.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace network { +namespace { + +template <typename MojoType, typename NativeType> +bool SerializeAndDeserializeEnum(NativeType in, NativeType* out) { + MojoType intermediate = mojo::EnumTraits<MojoType, NativeType>::ToMojom(in); + return mojo::EnumTraits<MojoType, NativeType>::FromMojom(intermediate, out); +} + +TEST(DefaultCredentialsTraitsTest, Roundtrips_DefaultCredentials) { + for (net::HttpAuthPreferences::DefaultCredentials default_credentials : + {net::HttpAuthPreferences::ALLOW_DEFAULT_CREDENTIALS, + net::HttpAuthPreferences::DISALLOW_DEFAULT_CREDENTIALS}) { + net::HttpAuthPreferences::DefaultCredentials roundtrip; + ASSERT_TRUE(SerializeAndDeserializeEnum<mojom::DefaultCredentials>( + default_credentials, &roundtrip)); + EXPECT_EQ(default_credentials, roundtrip); + } +} + +} // namespace +} // namespace network
diff --git a/services/network/public/cpp/typemaps.gni b/services/network/public/cpp/typemaps.gni index 7d9ac2860..9317ce41 100644 --- a/services/network/public/cpp/typemaps.gni +++ b/services/network/public/cpp/typemaps.gni
@@ -8,6 +8,7 @@ "//services/network/public/cpp/address_family.typemap", "//services/network/public/cpp/address_list.typemap", "//services/network/public/cpp/cookie_manager.typemap", + "//services/network/public/cpp/default_credentials.typemap", "//services/network/public/cpp/cors_error_status.typemap", "//services/network/public/cpp/digitally_signed.typemap", "//services/network/public/cpp/http_request_headers.typemap",
diff --git a/services/network/public/mojom/BUILD.gn b/services/network/public/mojom/BUILD.gn index 2a3ab723..0c705f73 100644 --- a/services/network/public/mojom/BUILD.gn +++ b/services/network/public/mojom/BUILD.gn
@@ -40,9 +40,6 @@ export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_header_blink = "third_party/blink/public/platform/web_common.h" } - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true } mojom("mutable_network_traffic_annotation_interface") { @@ -72,14 +69,12 @@ export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_header_blink = "third_party/blink/public/platform/web_common.h" } - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true } mojom("mojom") { sources = [ "cookie_manager.mojom", + "default_credentials.mojom", "cors.mojom", "cors_origin_pattern.mojom", "digitally_signed.mojom", @@ -158,7 +153,4 @@ enabled_features += [ "is_trial_comparison_cert_verifier_supported" ] sources += [ "trial_comparison_cert_verifier.mojom" ] } - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true }
diff --git a/services/network/public/mojom/default_credentials.mojom b/services/network/public/mojom/default_credentials.mojom new file mode 100644 index 0000000..8036a07af --- /dev/null +++ b/services/network/public/mojom/default_credentials.mojom
@@ -0,0 +1,11 @@ +// Copyright 2017 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. + +module network.mojom; + +// To be kept in sync with net/http/http_auth_preferences.h |DefaultCredentials| +enum DefaultCredentials { + DISALLOW_DEFAULT_CREDENTIALS = 0, + ALLOW_DEFAULT_CREDENTIALS = 1, +};
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom index b9e1d666..ecccb54c 100644 --- a/services/network/public/mojom/network_context.mojom +++ b/services/network/public/mojom/network_context.mojom
@@ -11,6 +11,7 @@ import "mojo/public/mojom/base/values.mojom"; import "services/network/public/mojom/address_list.mojom"; import "services/network/public/mojom/cookie_manager.mojom"; +import "services/network/public/mojom/default_credentials.mojom"; import "services/network/public/mojom/cors_origin_pattern.mojom"; import "services/network/public/mojom/host_resolver.mojom"; import "services/network/public/mojom/http_request_headers.mojom"; @@ -254,6 +255,11 @@ // If true, idle sockets won't be closed when memory pressure happens. bool disable_idle_sockets_close_on_memory_pressure = false; + // Whether authentication APIs that support fallback to the default account + // on the system can be used without specifying an account. + DefaultCredentials allow_default_credentials = + DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS; + // SSL configuration. |initial_proxy_config| is the initial SSL configuration // to use. If nullptr, uses the default configuration. Updated SSL // configurations can be passed in via |ssl_config_client_request|. @@ -762,12 +768,12 @@ [EnableIf=is_ct_supported] GetExpectCTState(string domain) => (mojo_base.mojom.DictionaryValue state); - // Creates a UDP socket. Caller can supply a |receiver| interface pointer - // to listen for incoming datagrams. A null |receiver| is acceptable if caller + // Creates a UDP socket. Caller can supply a |listener| interface pointer + // to listen for incoming datagrams. A null |listener| is acceptable if caller // is not interested in incoming data. // Any sockets that are created but are yet to be destroyed will be destroyed // when NetworkContext goes away. - CreateUDPSocket(UDPSocket& request, UDPSocketReceiver? receiver); + CreateUDPSocket(UDPSocket& request, UDPSocketListener? listener); // Creates a TCP server socket that listens on |local_addr|. The socket // created can only be used for the purpose specified in |traffic_annotation|,
diff --git a/services/network/public/mojom/udp_socket.mojom b/services/network/public/mojom/udp_socket.mojom index c97b333..8e6d9af 100644 --- a/services/network/public/mojom/udp_socket.mojom +++ b/services/network/public/mojom/udp_socket.mojom
@@ -66,22 +66,22 @@ // Sets the OS receive buffer size (in bytes) for the socket. This is the // SO_RCVBUF socket option. The kernel allocates this much to hold the data // arriving into this socket between the time when data arrives over the - // network and when it is read by UDPSocketReceiver. If buffer is full, + // network and when it is read by UDPSocketListener. If buffer is full, // new packets will be discarded. Default value is 0, in which case, OS's // default value will be used. int32 receive_buffer_size = 0; }; // UDPSocket is an interface that exposes UDP socket functionalities. -// UDPSocketReceiver is an interface that allows consumers to consume data +// UDPSocketListener is an interface that allows consumers to consume data // received by the UDPSocket. The typical flow of using the interfaces is: // - Acquire a UDPSocket interface pointer and optionally supply a non-null -// UDPSocketReceiverPtr. If consumers are not interested in received data, a -// null UDPSocketReceiverPtr is acceptable. +// UDPSocketListenerPtr. If consumers are not interested in received data, a +// null UDPSocketListenerPtr is acceptable. // - Use either Bind() or Connect() before datagrams can be sent or received. // - (optional) Invoke setters (e.g. SetBroadcast()). // - Send / request to receive datagrams. Received datagrams will be delivered -// to the bound receiver's OnReceived() call. +// to the bound listener's OnReceived() call. // - Close the socket by destroying the interface pointer. interface UDPSocket { // Binds the address/port for this socket to |local_addr|. Caller can use port @@ -128,8 +128,8 @@ // group before destroying the socket. Returns a net error code. LeaveGroup(IPAddress group_address) => (int32 result); - // Notifies that the receiver is ready to accept |number| of datagrams. - // Correspondingly, OnReceived() of the UDPSocketReceiver interface will be + // Notifies that the listener is ready to accept |number| of datagrams. + // Correspondingly, OnReceived() of the UDPSocketListener interface will be // called |number| times (errors also count), unless the connection is closed // before that. The implementation may return net::ERR_INSUFFICIENT_RESOURCES // in an OnReceived() callback if the service doesn't have enough resource to @@ -207,7 +207,7 @@ // An interface the consumers of UDPSocket can implement to listen for incoming // packets. This interface is to be used together when requesting a UDPSocket. -interface UDPSocketReceiver { +interface UDPSocketListener { // Invoked when data is received. // - When UDPSocket is used with Bind(): // On success, |result| is net::OK. |src_addr| indicates the address of the
diff --git a/services/network/socket_factory.cc b/services/network/socket_factory.cc index b6c6406..75d7f39 100644 --- a/services/network/socket_factory.cc +++ b/services/network/socket_factory.cc
@@ -42,9 +42,9 @@ SocketFactory::~SocketFactory() {} void SocketFactory::CreateUDPSocket(mojom::UDPSocketRequest request, - mojom::UDPSocketReceiverPtr receiver) { + mojom::UDPSocketListenerPtr listener) { udp_socket_bindings_.AddBinding( - std::make_unique<UDPSocket>(std::move(receiver), net_log_), + std::make_unique<UDPSocket>(std::move(listener), net_log_), std::move(request)); }
diff --git a/services/network/socket_factory.h b/services/network/socket_factory.h index 9bf1188..11cc405 100644 --- a/services/network/socket_factory.h +++ b/services/network/socket_factory.h
@@ -43,7 +43,7 @@ // These all correspond to the NetworkContext methods of the same name. void CreateUDPSocket(mojom::UDPSocketRequest request, - mojom::UDPSocketReceiverPtr receiver); + mojom::UDPSocketListenerPtr listener); void CreateTCPServerSocket( const net::IPEndPoint& local_addr, int backlog,
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h index 670d2b8..99aef1f 100644 --- a/services/network/test/test_network_context.h +++ b/services/network/test/test_network_context.h
@@ -115,7 +115,7 @@ GetExpectCTStateCallback callback) override {} #endif // BUILDFLAG(IS_CT_SUPPORTED) void CreateUDPSocket(mojom::UDPSocketRequest request, - mojom::UDPSocketReceiverPtr receiver) override {} + mojom::UDPSocketListenerPtr listener) override {} void CreateTCPServerSocket( const net::IPEndPoint& local_addr, uint32_t backlog,
diff --git a/services/network/udp_socket.cc b/services/network/udp_socket.cc index 2134e5f..2fefb8f 100644 --- a/services/network/udp_socket.cc +++ b/services/network/udp_socket.cc
@@ -153,11 +153,11 @@ UDPSocket::PendingSendRequest::~PendingSendRequest() {} -UDPSocket::UDPSocket(mojom::UDPSocketReceiverPtr receiver, net::NetLog* net_log) +UDPSocket::UDPSocket(mojom::UDPSocketListenerPtr listener, net::NetLog* net_log) : net_log_(net_log), is_bound_(false), is_connected_(false), - receiver_(std::move(receiver)), + listener_(std::move(listener)), remaining_recv_slots_(0) {} UDPSocket::~UDPSocket() {} @@ -259,10 +259,10 @@ void UDPSocket::ReceiveMoreWithBufferSize(uint32_t num_additional_datagrams, uint32_t buffer_size) { - if (!receiver_) + if (!listener_) return; if (!IsConnectedOrBound()) { - receiver_->OnReceived(net::ERR_UNEXPECTED, base::nullopt, base::nullopt); + listener_->OnReceived(net::ERR_UNEXPECTED, base::nullopt, base::nullopt); return; } if (num_additional_datagrams == 0) @@ -331,7 +331,7 @@ } void UDPSocket::DoRecvFrom(uint32_t buffer_size) { - DCHECK(receiver_); + DCHECK(listener_); DCHECK(!recvfrom_buffer_); DCHECK_GT(remaining_recv_slots_, 0u); DCHECK_GE(kMaxReadSize, buffer_size); @@ -417,14 +417,14 @@ DCHECK(recvfrom_buffer_); if (net_result >= 0) { - receiver_->OnReceived( + listener_->OnReceived( net::OK, is_bound_ ? base::make_optional(recvfrom_address_) : base::nullopt, base::span<const uint8_t>( reinterpret_cast<const uint8_t*>(recvfrom_buffer_->data()), static_cast<size_t>(net_result))); } else { - receiver_->OnReceived(net_result, base::nullopt, base::nullopt); + listener_->OnReceived(net_result, base::nullopt, base::nullopt); } recvfrom_buffer_ = nullptr; DCHECK_GT(remaining_recv_slots_, 0u);
diff --git a/services/network/udp_socket.h b/services/network/udp_socket.h index f085202..55a0a0a 100644 --- a/services/network/udp_socket.h +++ b/services/network/udp_socket.h
@@ -71,7 +71,7 @@ net::CompletionOnceCallback callback) = 0; }; - UDPSocket(mojom::UDPSocketReceiverPtr receiver, net::NetLog* net_log); + UDPSocket(mojom::UDPSocketListenerPtr listener, net::NetLog* net_log); ~UDPSocket() override; // UDPSocket implementation. @@ -147,7 +147,7 @@ bool is_connected_; // The interface which gets data from fulfilled receive requests. - mojom::UDPSocketReceiverPtr receiver_; + mojom::UDPSocketListenerPtr listener_; std::unique_ptr<SocketWrapper> wrapped_socket_;
diff --git a/services/network/udp_socket_test_util.cc b/services/network/udp_socket_test_util.cc index e7887f8..a22c903 100644 --- a/services/network/udp_socket_test_util.cc +++ b/services/network/udp_socket_test_util.cc
@@ -147,7 +147,7 @@ return net_error; } -UDPSocketReceiverImpl::ReceivedResult::ReceivedResult( +UDPSocketListenerImpl::ReceivedResult::ReceivedResult( int net_error_arg, const base::Optional<net::IPEndPoint>& src_addr_arg, base::Optional<std::vector<uint8_t>> data_arg) @@ -155,18 +155,18 @@ src_addr(src_addr_arg), data(std::move(data_arg)) {} -UDPSocketReceiverImpl::ReceivedResult::ReceivedResult( +UDPSocketListenerImpl::ReceivedResult::ReceivedResult( const ReceivedResult& other) = default; -UDPSocketReceiverImpl::ReceivedResult::~ReceivedResult() {} +UDPSocketListenerImpl::ReceivedResult::~ReceivedResult() {} -UDPSocketReceiverImpl::UDPSocketReceiverImpl() +UDPSocketListenerImpl::UDPSocketListenerImpl() : run_loop_(std::make_unique<base::RunLoop>()), expected_receive_count_(0) {} -UDPSocketReceiverImpl::~UDPSocketReceiverImpl() {} +UDPSocketListenerImpl::~UDPSocketListenerImpl() {} -void UDPSocketReceiverImpl::WaitForReceivedResults(size_t count) { +void UDPSocketListenerImpl::WaitForReceivedResults(size_t count) { DCHECK_LE(results_.size(), count); DCHECK_EQ(0u, expected_receive_count_); @@ -178,7 +178,7 @@ run_loop_ = std::make_unique<base::RunLoop>(); } -void UDPSocketReceiverImpl::OnReceived( +void UDPSocketListenerImpl::OnReceived( int32_t result, const base::Optional<net::IPEndPoint>& src_addr, base::Optional<base::span<const uint8_t>> data) {
diff --git a/services/network/udp_socket_test_util.h b/services/network/udp_socket_test_util.h index 8218209..8e6ea97a 100644 --- a/services/network/udp_socket_test_util.h +++ b/services/network/udp_socket_test_util.h
@@ -47,8 +47,8 @@ mojom::UDPSocketPtr* socket_; }; -// An implementation of mojom::UDPSocketReceiver that records received results. -class UDPSocketReceiverImpl : public mojom::UDPSocketReceiver { +// An implementation of mojom::UDPSocketListener that records received results. +class UDPSocketListenerImpl : public mojom::UDPSocketListener { public: struct ReceivedResult { ReceivedResult(int net_error_arg, @@ -62,8 +62,8 @@ base::Optional<std::vector<uint8_t>> data; }; - UDPSocketReceiverImpl(); - ~UDPSocketReceiverImpl() override; + UDPSocketListenerImpl(); + ~UDPSocketListenerImpl() override; const std::vector<ReceivedResult>& results() const { return results_; } @@ -77,7 +77,7 @@ std::vector<ReceivedResult> results_; size_t expected_receive_count_; - DISALLOW_COPY_AND_ASSIGN(UDPSocketReceiverImpl); + DISALLOW_COPY_AND_ASSIGN(UDPSocketListenerImpl); }; } // namespace test
diff --git a/services/network/udp_socket_unittest.cc b/services/network/udp_socket_unittest.cc index ca1c837..f07e22b 100644 --- a/services/network/udp_socket_unittest.cc +++ b/services/network/udp_socket_unittest.cc
@@ -252,14 +252,14 @@ // should only be used after Bind(). TEST_F(UDPSocketTest, TestSendToWithConnect) { // Create a server socket to listen for incoming datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); mojom::UDPSocketPtr server_socket; factory()->CreateUDPSocket(mojo::MakeRequest(&server_socket), - std::move(receiver_interface_ptr)); + std::move(listener_interface_ptr)); net::IPEndPoint server_addr(GetLocalHostWithAnyPort()); test::UDPSocketTestHelper helper(&server_socket); @@ -313,7 +313,7 @@ // ERR_IO_PENDING, udp_socket.cc doesn't free the send buffer. TEST_F(UDPSocketTest, TestBufferValid) { mojom::UDPSocketPtr socket_ptr; - UDPSocket impl(nullptr /*receiver*/, nullptr /*net_log*/); + UDPSocket impl(nullptr /*listener*/, nullptr /*net_log*/); mojo::Binding<mojom::UDPSocket> binding(&impl); binding.Bind(mojo::MakeRequest(&socket_ptr)); @@ -353,7 +353,7 @@ // ERR_INSUFFICIENT_RESOURCES is returned appropriately. TEST_F(UDPSocketTest, TestInsufficientResources) { mojom::UDPSocketPtr socket_ptr; - UDPSocket impl(nullptr /*receiver*/, nullptr /*net_log*/); + UDPSocket impl(nullptr /*listener*/, nullptr /*net_log*/); mojo::Binding<mojom::UDPSocket> binding(&impl); binding.Bind(mojo::MakeRequest(&socket_ptr)); @@ -396,13 +396,13 @@ TEST_F(UDPSocketTest, TestReceiveMoreOverflow) { // Create a server socket to listen for incoming datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); mojom::UDPSocketPtr server_socket; - UDPSocket impl(std::move(receiver_interface_ptr), nullptr /*net_log*/); + UDPSocket impl(std::move(listener_interface_ptr), nullptr /*net_log*/); mojo::Binding<mojom::UDPSocket> binding(&impl); binding.Bind(mojo::MakeRequest(&server_socket)); @@ -420,14 +420,14 @@ TEST_F(UDPSocketTest, TestReadSend) { // Create a server socket to listen for incoming datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); mojom::UDPSocketPtr server_socket; factory()->CreateUDPSocket(mojo::MakeRequest(&server_socket), - std::move(receiver_interface_ptr)); + std::move(listener_interface_ptr)); net::IPEndPoint server_addr(GetLocalHostWithAnyPort()); test::UDPSocketTestHelper helper(&server_socket); @@ -451,11 +451,11 @@ EXPECT_EQ(net::OK, result); } - receiver.WaitForReceivedResults(kDatagramCount); - EXPECT_EQ(kDatagramCount, receiver.results().size()); + listener.WaitForReceivedResults(kDatagramCount); + EXPECT_EQ(kDatagramCount, listener.results().size()); int i = 0; - for (const auto& result : receiver.results()) { + for (const auto& result : listener.results()) { EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(result.src_addr, client_addr); EXPECT_EQ(CreateTestMessage(static_cast<uint8_t>(i), kDatagramSize), @@ -478,10 +478,10 @@ std::vector<uint8_t> msg(CreateTestMessage(0, kDatagramSize)); EXPECT_EQ(net::OK, client_helper.SendSync(msg)); - receiver.WaitForReceivedResults(kDatagramCount + 1); - ASSERT_EQ(kDatagramCount + 1, receiver.results().size()); + listener.WaitForReceivedResults(kDatagramCount + 1); + ASSERT_EQ(kDatagramCount + 1, listener.results().size()); - auto result = receiver.results()[kDatagramCount]; + auto result = listener.results()[kDatagramCount]; EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(result.src_addr, client_addr); EXPECT_EQ(msg, result.data.value()); @@ -497,14 +497,14 @@ ASSERT_EQ(net::OK, helper.BindSync(server_addr, nullptr, &server_addr)); // Create a client socket to send datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr client_receiver_ptr; - receiver_binding.Bind(mojo::MakeRequest(&client_receiver_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr client_listener_ptr; + listener_binding.Bind(mojo::MakeRequest(&client_listener_ptr)); mojom::UDPSocketPtr client_socket; factory()->CreateUDPSocket(mojo::MakeRequest(&client_socket), - std::move(client_receiver_ptr)); + std::move(client_listener_ptr)); net::IPEndPoint client_addr(GetLocalHostWithAnyPort()); test::UDPSocketTestHelper client_helper(&client_socket); ASSERT_EQ(net::OK, @@ -520,11 +520,11 @@ EXPECT_EQ(net::OK, result); } - receiver.WaitForReceivedResults(kDatagramCount); - EXPECT_EQ(kDatagramCount, receiver.results().size()); + listener.WaitForReceivedResults(kDatagramCount); + EXPECT_EQ(kDatagramCount, listener.results().size()); int i = 0; - for (const auto& result : receiver.results()) { + for (const auto& result : listener.results()) { EXPECT_EQ(net::OK, result.net_error); EXPECT_FALSE(result.src_addr); EXPECT_EQ(CreateTestMessage(static_cast<uint8_t>(i), kDatagramSize), @@ -544,10 +544,10 @@ std::vector<uint8_t> msg(CreateTestMessage(0, kDatagramSize)); EXPECT_EQ(net::OK, helper.SendToSync(client_addr, msg)); - receiver.WaitForReceivedResults(kDatagramCount + 1); - ASSERT_EQ(kDatagramCount + 1, receiver.results().size()); + listener.WaitForReceivedResults(kDatagramCount + 1); + ASSERT_EQ(kDatagramCount + 1, listener.results().size()); - auto result = receiver.results()[kDatagramCount]; + auto result = listener.results()[kDatagramCount]; EXPECT_EQ(net::OK, result.net_error); EXPECT_FALSE(result.src_addr); EXPECT_EQ(msg, result.data.value()); @@ -555,14 +555,14 @@ TEST_F(UDPSocketTest, TestReceiveMoreWithBufferSize) { // Create a server socket to listen for incoming datagrams. - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); mojom::UDPSocketPtr server_socket; factory()->CreateUDPSocket(mojo::MakeRequest(&server_socket), - std::move(receiver_interface_ptr)); + std::move(listener_interface_ptr)); net::IPEndPoint server_addr(GetLocalHostWithAnyPort()); test::UDPSocketTestHelper helper(&server_socket); @@ -584,9 +584,9 @@ std::vector<uint8_t> test_msg(CreateTestMessage(0, kDatagramSize)); ASSERT_EQ(net::OK, client_helper.SendSync(test_msg)); - receiver.WaitForReceivedResults(1); - ASSERT_EQ(1u, receiver.results().size()); - auto result = receiver.results()[0]; + listener.WaitForReceivedResults(1); + ASSERT_EQ(1u, listener.results().size()); + auto result = listener.results()[0]; EXPECT_EQ(net::ERR_MSG_TOO_BIG, result.net_error); EXPECT_FALSE(result.data); @@ -594,9 +594,9 @@ server_socket->ReceiveMoreWithBufferSize(1, kDatagramSize); ASSERT_EQ(net::OK, client_helper.SendSync(test_msg)); - receiver.WaitForReceivedResults(2); - ASSERT_EQ(2u, receiver.results().size()); - result = receiver.results()[1]; + listener.WaitForReceivedResults(2); + ASSERT_EQ(2u, listener.results().size()); + result = listener.results()[1]; EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(client_addr, result.src_addr.value()); EXPECT_EQ(test_msg, result.data.value()); @@ -629,16 +629,16 @@ run_loop.Run(); } -// Tests that it is legal for UDPSocketReceiver::OnReceive() to be called with +// Tests that it is legal for UDPSocketListener::OnReceive() to be called with // 0 byte payload. TEST_F(UDPSocketTest, TestReadZeroByte) { - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - mojom::UDPSocketReceiverPtr receiver_interface_ptr; - receiver_binding.Bind(mojo::MakeRequest(&receiver_interface_ptr)); + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + mojom::UDPSocketListenerPtr listener_interface_ptr; + listener_binding.Bind(mojo::MakeRequest(&listener_interface_ptr)); mojom::UDPSocketPtr socket_ptr; - UDPSocket impl(std::move(receiver_interface_ptr), nullptr /*net_log*/); + UDPSocket impl(std::move(listener_interface_ptr), nullptr /*net_log*/); mojo::Binding<mojom::UDPSocket> binding(&impl); binding.Bind(mojo::MakeRequest(&socket_ptr)); @@ -650,10 +650,10 @@ socket_ptr->ReceiveMore(1); - receiver.WaitForReceivedResults(1); - ASSERT_EQ(1u, receiver.results().size()); + listener.WaitForReceivedResults(1); + ASSERT_EQ(1u, listener.results().size()); - auto result = receiver.results()[0]; + auto result = listener.results()[0]; EXPECT_EQ(net::OK, result.net_error); EXPECT_TRUE(result.data); EXPECT_EQ(std::vector<uint8_t>(), result.data.value()); @@ -673,12 +673,12 @@ net::IPAddress group_ip; EXPECT_TRUE(group_ip.AssignFromIPLiteral(kGroup)); mojom::UDPSocketPtr socket_ptr; - mojom::UDPSocketReceiverPtr receiver_ptr; - test::UDPSocketReceiverImpl receiver; - mojo::Binding<mojom::UDPSocketReceiver> receiver_binding(&receiver); - receiver_binding.Bind(mojo::MakeRequest(&receiver_ptr)); + mojom::UDPSocketListenerPtr listener_ptr; + test::UDPSocketListenerImpl listener; + mojo::Binding<mojom::UDPSocketListener> listener_binding(&listener); + listener_binding.Bind(mojo::MakeRequest(&listener_ptr)); factory()->CreateUDPSocket(mojo::MakeRequest(&socket_ptr), - std::move(receiver_ptr)); + std::move(listener_ptr)); test::UDPSocketTestHelper helper(&socket_ptr); @@ -707,9 +707,9 @@ net::IPEndPoint group_alias(group_ip, port); EXPECT_EQ(net::OK, helper.SendToSync(group_alias, test_msg)); socket_ptr->ReceiveMore(1); - receiver.WaitForReceivedResults(1); - ASSERT_EQ(1u, receiver.results().size()); - auto result = receiver.results()[0]; + listener.WaitForReceivedResults(1); + ASSERT_EQ(1u, listener.results().size()); + auto result = listener.results()[0]; EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(port, result.src_addr.value().port()); EXPECT_EQ(test_msg, result.data.value()); @@ -727,9 +727,9 @@ // First socket should receive packet sent by the second socket. socket_ptr->ReceiveMore(1); - receiver.WaitForReceivedResults(2); - ASSERT_EQ(2u, receiver.results().size()); - result = receiver.results()[1]; + listener.WaitForReceivedResults(2); + ASSERT_EQ(2u, listener.results().size()); + result = listener.results()[1]; EXPECT_EQ(net::OK, result.net_error); EXPECT_EQ(second_port, result.src_addr.value().port()); EXPECT_EQ(test_msg, result.data.value()); @@ -743,7 +743,7 @@ ASSERT_EQ(net::OK, second_socket_helper.SendToSync(group_alias, test_msg)); socket_ptr->ReceiveMore(1); socket_ptr.FlushForTesting(); - ASSERT_EQ(2u, receiver.results().size()); + ASSERT_EQ(2u, listener.results().size()); } TEST_F(UDPSocketTest, ErrorHappensDuringSocketOptionsConfiguration) {
diff --git a/services/preferences/public/cpp/persistent_pref_store_client.cc b/services/preferences/public/cpp/persistent_pref_store_client.cc index e468804e2..e9a284b 100644 --- a/services/preferences/public/cpp/persistent_pref_store_client.cc +++ b/services/preferences/public/cpp/persistent_pref_store_client.cc
@@ -145,8 +145,7 @@ }; PersistentPrefStoreClient::PersistentPrefStoreClient( - mojom::PersistentPrefStoreConnectionPtr connection) - : weak_factory_(this) { + mojom::PersistentPrefStoreConnectionPtr connection) { read_error_ = connection->read_error; read_only_ = connection->read_only; pref_store_.Bind(std::move(connection->pref_store));
diff --git a/services/preferences/public/cpp/persistent_pref_store_client.h b/services/preferences/public/cpp/persistent_pref_store_client.h index d863f14..eeb7ae3d 100644 --- a/services/preferences/public/cpp/persistent_pref_store_client.h +++ b/services/preferences/public/cpp/persistent_pref_store_client.h
@@ -93,7 +93,7 @@ base::queue<std::vector<InFlightWrite>> in_flight_writes_queue_; std::map<std::string, InFlightWriteTrie> in_flight_writes_tries_; - base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_; + base::WeakPtrFactory<PersistentPrefStoreClient> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PersistentPrefStoreClient); };
diff --git a/services/proxy_resolver/public/mojom/BUILD.gn b/services/proxy_resolver/public/mojom/BUILD.gn index 3716742..e67cde41 100644 --- a/services/proxy_resolver/public/mojom/BUILD.gn +++ b/services/proxy_resolver/public/mojom/BUILD.gn
@@ -18,7 +18,4 @@ export_define_blink = "BLINK_PLATFORM_IMPLEMENTATION=1" export_header_blink = "third_party/blink/public/platform/web_common.h" } - - # TODO(https://crbug.com/968369): Change to use new names. - use_old_js_lite_bindings_names = true }
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc index a158a453..418af38 100644 --- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc +++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
@@ -67,8 +67,7 @@ CoordinatorImpl::CoordinatorImpl(service_manager::Connector* connector) : next_dump_id_(0), - client_process_timeout_(base::TimeDelta::FromSeconds(15)), - weak_ptr_factory_(this) { + client_process_timeout_(base::TimeDelta::FromSeconds(15)) { process_map_ = std::make_unique<ProcessMap>(connector); DCHECK(!g_coordinator_impl); g_coordinator_impl = this;
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h index c3432de..cefc0c4 100644 --- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.h +++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.h
@@ -204,7 +204,7 @@ mojom::HeapProfilerPtr heap_profiler_; THREAD_CHECKER(thread_checker_); - base::WeakPtrFactory<CoordinatorImpl> weak_ptr_factory_; + base::WeakPtrFactory<CoordinatorImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(CoordinatorImpl); };
diff --git a/services/service_manager/public/cpp/binder_registry.h b/services/service_manager/public/cpp/binder_registry.h index f0b144b..c1f768fc 100644 --- a/services/service_manager/public/cpp/binder_registry.h +++ b/services/service_manager/public/cpp/binder_registry.h
@@ -23,7 +23,7 @@ using Binder = base::Callback< void(const std::string&, mojo::ScopedMessagePipeHandle, BinderArgs...)>; - BinderRegistryWithArgs() : weak_factory_(this) {} + BinderRegistryWithArgs() {} ~BinderRegistryWithArgs() = default; // Adds an interface inferring the interface name via the templated @@ -133,7 +133,7 @@ InterfaceNameToBinderMap binders_; - base::WeakPtrFactory<BinderRegistryWithArgs> weak_factory_; + base::WeakPtrFactory<BinderRegistryWithArgs> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BinderRegistryWithArgs); };
diff --git a/services/service_manager/public/cpp/connector.cc b/services/service_manager/public/cpp/connector.cc index f3ad01d9..58d923f 100644 --- a/services/service_manager/public/cpp/connector.cc +++ b/services/service_manager/public/cpp/connector.cc
@@ -11,12 +11,12 @@ namespace service_manager { Connector::Connector(mojom::ConnectorPtrInfo unbound_state) - : unbound_state_(std::move(unbound_state)), weak_factory_(this) { + : unbound_state_(std::move(unbound_state)) { DETACH_FROM_SEQUENCE(sequence_checker_); } Connector::Connector(mojom::ConnectorPtr connector) - : connector_(std::move(connector)), weak_factory_(this) { + : connector_(std::move(connector)) { connector_.set_connection_error_handler( base::Bind(&Connector::OnConnectionError, base::Unretained(this))); }
diff --git a/services/service_manager/public/cpp/connector.h b/services/service_manager/public/cpp/connector.h index 734c3bb..297089f 100644 --- a/services/service_manager/public/cpp/connector.h +++ b/services/service_manager/public/cpp/connector.h
@@ -265,7 +265,7 @@ std::map<service_manager::ServiceFilter, BinderOverrideMap> local_binder_overrides_; - base::WeakPtrFactory<Connector> weak_factory_; + base::WeakPtrFactory<Connector> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Connector); };
diff --git a/services/service_manager/public/cpp/interface_provider.cc b/services/service_manager/public/cpp/interface_provider.cc index b04f9d73..b8bdcf62 100644 --- a/services/service_manager/public/cpp/interface_provider.cc +++ b/services/service_manager/public/cpp/interface_provider.cc
@@ -9,13 +9,13 @@ namespace service_manager { -InterfaceProvider::InterfaceProvider() : weak_factory_(this) { +InterfaceProvider::InterfaceProvider() { pending_request_ = MakeRequest(&interface_provider_); } InterfaceProvider::InterfaceProvider( mojom::InterfaceProviderPtr interface_provider) - : interface_provider_(std::move(interface_provider)), weak_factory_(this) {} + : interface_provider_(std::move(interface_provider)) {} InterfaceProvider::~InterfaceProvider() {}
diff --git a/services/service_manager/public/cpp/interface_provider.h b/services/service_manager/public/cpp/interface_provider.h index 5a3f2fc..d9e816f 100644 --- a/services/service_manager/public/cpp/interface_provider.h +++ b/services/service_manager/public/cpp/interface_provider.h
@@ -139,7 +139,7 @@ // InterfaceProvider pipe. ForwardCallback forward_callback_; - base::WeakPtrFactory<InterfaceProvider> weak_factory_; + base::WeakPtrFactory<InterfaceProvider> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(InterfaceProvider); };
diff --git a/services/service_manager/sandbox/fuchsia/sandbox_policy_fuchsia.cc b/services/service_manager/sandbox/fuchsia/sandbox_policy_fuchsia.cc index 433eda5d..0f33ab8a 100644 --- a/services/service_manager/sandbox/fuchsia/sandbox_policy_fuchsia.cc +++ b/services/service_manager/sandbox/fuchsia/sandbox_policy_fuchsia.cc
@@ -73,22 +73,28 @@ { SANDBOX_TYPE_GPU, base::make_span((const char* const[]){ + fuchsia::sysmem::Allocator::Name_, + "fuchsia.vulkan.loader.Loader", fuchsia::ui::scenic::Scenic::Name_, - fuchsia::sysmem::Allocator::Name_, "fuchsia.vulkan.loader.Loader"}), + }), kProvideVulkanResources, }, { SANDBOX_TYPE_NETWORK, base::make_span((const char* const[]){ - fuchsia::net::NameLookup::Name_, fuchsia::netstack::Netstack::Name_, - "fuchsia.posix.socket.Provider"}), + fuchsia::net::NameLookup::Name_, + fuchsia::netstack::Netstack::Name_, + "fuchsia.posix.socket.Provider", + }), kProvideSslConfig, }, { SANDBOX_TYPE_RENDERER, - base::make_span( - (const char* const[]){fuchsia::fonts::Provider::Name_, - fuchsia::mediacodec::CodecFactory::Name_}), + base::make_span((const char* const[]){ + fuchsia::fonts::Provider::Name_, + fuchsia::mediacodec::CodecFactory::Name_, + fuchsia::sysmem::Allocator::Name_, + }), 0, }, };
diff --git a/services/tracing/coordinator.cc b/services/tracing/coordinator.cc index 2d406e95..328c044 100644 --- a/services/tracing/coordinator.cc +++ b/services/tracing/coordinator.cc
@@ -286,8 +286,7 @@ // priority only when blocking the tracing UI. backend_task_runner_(base::CreateSequencedTaskRunner( {base::ThreadPool(), base::TaskPriority::USER_VISIBLE, - base::MayBlock(), base::WithBaseSyncPrimitives()})), - weak_ptr_factory_(this) { + base::MayBlock(), base::WithBaseSyncPrimitives()})) { DCHECK(agent_registry_); }
diff --git a/services/tracing/coordinator.h b/services/tracing/coordinator.h index 409720f..0b4d3b7 100644 --- a/services/tracing/coordinator.h +++ b/services/tracing/coordinator.h
@@ -122,7 +122,7 @@ uint32_t approximate_event_count_ = 0; RequestBufferUsageCallback request_buffer_usage_callback_; - base::WeakPtrFactory<Coordinator> weak_ptr_factory_; + base::WeakPtrFactory<Coordinator> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Coordinator); };
diff --git a/services/tracing/perfetto/perfetto_tracing_coordinator.cc b/services/tracing/perfetto/perfetto_tracing_coordinator.cc index 7af17ff..d9e2cf5 100644 --- a/services/tracing/perfetto/perfetto_tracing_coordinator.cc +++ b/services/tracing/perfetto/perfetto_tracing_coordinator.cc
@@ -240,8 +240,7 @@ AgentRegistry* agent_registry, base::RepeatingClosure on_disconnect_callback) : Coordinator(agent_registry, std::move(on_disconnect_callback)), - binding_(this), - weak_factory_(this) { + binding_(this) { DETACH_FROM_SEQUENCE(sequence_checker_); }
diff --git a/services/tracing/perfetto/perfetto_tracing_coordinator.h b/services/tracing/perfetto/perfetto_tracing_coordinator.h index 4bdeb2e..0bc350e 100644 --- a/services/tracing/perfetto/perfetto_tracing_coordinator.h +++ b/services/tracing/perfetto/perfetto_tracing_coordinator.h
@@ -63,7 +63,7 @@ std::unique_ptr<TracingSession> tracing_session_; SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<PerfettoTracingCoordinator> weak_factory_; + base::WeakPtrFactory<PerfettoTracingCoordinator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PerfettoTracingCoordinator); };
diff --git a/services/tracing/public/cpp/perfetto/perfetto_producer.cc b/services/tracing/public/cpp/perfetto/perfetto_producer.cc index 9d0a0f88..209189b 100644 --- a/services/tracing/public/cpp/perfetto/perfetto_producer.cc +++ b/services/tracing/public/cpp/perfetto/perfetto_producer.cc
@@ -26,16 +26,16 @@ } std::unique_ptr<perfetto::TraceWriter> PerfettoProducer::CreateTraceWriter( - perfetto::BufferID target_buffer) { + perfetto::BufferID target_buffer, + perfetto::BufferExhaustedPolicy buffer_exhausted_policy) { DCHECK(GetSharedMemoryArbiter()); // Chromium uses BufferExhaustedPolicy::kDrop to avoid stalling trace writers // when the chunks in the SMB are exhausted. Stalling could otherwise lead to // deadlocks in chromium, because a stalled mojo IPC thread could prevent // CommitRequest messages from reaching the perfetto service. - auto smb_exhausted_policy = - perfetto::SharedMemoryArbiter::BufferExhaustedPolicy::kDrop; + buffer_exhausted_policy = perfetto::BufferExhaustedPolicy::kDrop; return GetSharedMemoryArbiter()->CreateTraceWriter(target_buffer, - smb_exhausted_policy); + buffer_exhausted_policy); } PerfettoTaskRunner* PerfettoProducer::task_runner() {
diff --git a/services/tracing/public/cpp/perfetto/perfetto_producer.h b/services/tracing/public/cpp/perfetto/perfetto_producer.h index a73f86c..40b4ca52 100644 --- a/services/tracing/public/cpp/perfetto/perfetto_producer.h +++ b/services/tracing/public/cpp/perfetto/perfetto_producer.h
@@ -47,7 +47,9 @@ // Should only be called while a tracing session is active and a // SharedMemoryArbiter exists. std::unique_ptr<perfetto::TraceWriter> CreateTraceWriter( - perfetto::BufferID target_buffer) override; + perfetto::BufferID target_buffer, + perfetto::BufferExhaustedPolicy = + perfetto::BufferExhaustedPolicy::kDefault) override; // Informs the PerfettoProducer a new Data Source was added. This instance // will also be found in |data_sources| having just be inserted before this
diff --git a/services/tracing/public/cpp/perfetto/producer_client.cc b/services/tracing/public/cpp/perfetto/producer_client.cc index 5b98411..c2f5fec7 100644 --- a/services/tracing/public/cpp/perfetto/producer_client.cc +++ b/services/tracing/public/cpp/perfetto/producer_client.cc
@@ -21,7 +21,7 @@ namespace tracing { ProducerClient::ProducerClient(PerfettoTaskRunner* task_runner) - : PerfettoProducer(task_runner), weak_ptr_factory_(this) { + : PerfettoProducer(task_runner) { DETACH_FROM_SEQUENCE(sequence_checker_); }
diff --git a/services/tracing/public/cpp/perfetto/producer_client.h b/services/tracing/public/cpp/perfetto/producer_client.h index 7f064c5d..f578d29 100644 --- a/services/tracing/public/cpp/perfetto/producer_client.h +++ b/services/tracing/public/cpp/perfetto/producer_client.h
@@ -115,7 +115,7 @@ SEQUENCE_CHECKER(sequence_checker_); // NOTE: Weak pointers must be invalidated before all other member variables. - base::WeakPtrFactory<ProducerClient> weak_ptr_factory_; + base::WeakPtrFactory<ProducerClient> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ProducerClient); };
diff --git a/services/tracing/public/cpp/perfetto/task_runner_unittest.cc b/services/tracing/public/cpp/perfetto/task_runner_unittest.cc index a9f25d1..ce93b41 100644 --- a/services/tracing/public/cpp/perfetto/task_runner_unittest.cc +++ b/services/tracing/public/cpp/perfetto/task_runner_unittest.cc
@@ -25,8 +25,7 @@ base::OnceClosure on_complete) : expected_tasks_(expected_tasks), on_complete_(std::move(on_complete)), - last_task_id_(number_of_sequences), - weak_ptr_factory_(this) {} + last_task_id_(number_of_sequences) {} size_t tasks_run() const { return tasks_run_; } @@ -51,7 +50,7 @@ std::vector<int> last_task_id_; size_t tasks_run_ = 0; - base::WeakPtrFactory<TaskDestination> weak_ptr_factory_; + base::WeakPtrFactory<TaskDestination> weak_ptr_factory_{this}; }; class PosterThread : public base::SimpleThread {
diff --git a/services/tracing/public/cpp/perfetto/trace_event_data_source.cc b/services/tracing/public/cpp/perfetto/trace_event_data_source.cc index a2e6dae..cd529bef 100644 --- a/services/tracing/public/cpp/perfetto/trace_event_data_source.cc +++ b/services/tracing/public/cpp/perfetto/trace_event_data_source.cc
@@ -544,10 +544,9 @@ // otherwise lead to deadlocks in chromium, because a stalled mojo IPC // thread could prevent CommitRequest messages from reaching the perfetto // service. - auto smb_exhausted_policy = - perfetto::SharedMemoryArbiter::BufferExhaustedPolicy::kDrop; + auto buffer_exhausted_policy = perfetto::BufferExhaustedPolicy::kDrop; trace_writer = startup_writer_registry_->CreateUnboundTraceWriter( - smb_exhausted_policy); + buffer_exhausted_policy); } else if (producer_) { trace_writer = std::make_unique<perfetto::StartupTraceWriter>( producer_->CreateTraceWriter(target_buffer_));
diff --git a/services/tracing/public/cpp/perfetto/trace_event_data_source_unittest.cc b/services/tracing/public/cpp/perfetto/trace_event_data_source_unittest.cc index 2aa69df..c235c42 100644 --- a/services/tracing/public/cpp/perfetto/trace_event_data_source_unittest.cc +++ b/services/tracing/public/cpp/perfetto/trace_event_data_source_unittest.cc
@@ -59,7 +59,9 @@ } std::unique_ptr<perfetto::TraceWriter> CreateTraceWriter( - perfetto::BufferID target_buffer) override; + perfetto::BufferID target_buffer, + perfetto::BufferExhaustedPolicy = + perfetto::BufferExhaustedPolicy::kDefault) override; void FlushPacketIfPossible() { // GetNewBuffer() in ScatteredStreamWriterNullDelegate doesn't @@ -194,7 +196,8 @@ }; std::unique_ptr<perfetto::TraceWriter> MockProducerClient::CreateTraceWriter( - perfetto::BufferID target_buffer) { + perfetto::BufferID target_buffer, + perfetto::BufferExhaustedPolicy) { // We attempt to destroy TraceWriters on thread shutdown in // ThreadLocalStorage::Slot, by posting them to the ProducerClient taskrunner, // but there's no guarantee that this will succeed if that taskrunner is also
diff --git a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc index 9c0ad98..3239d06 100644 --- a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc +++ b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler_unittest.cc
@@ -92,7 +92,9 @@ task_runner_(std::move(task_runner)) {} std::unique_ptr<perfetto::TraceWriter> CreateTraceWriter( - perfetto::BufferID target_buffer) override { + perfetto::BufferID target_buffer, + perfetto::BufferExhaustedPolicy = + perfetto::BufferExhaustedPolicy::kDefault) override { auto packet_callback = base::BindRepeating( [](base::WeakPtr<MockPerfettoProducer> weak_self, scoped_refptr<base::SequencedTaskRunner> task_runner,
diff --git a/services/tracing/public/cpp/trace_event_agent.cc b/services/tracing/public/cpp/trace_event_agent.cc index 99aa261..d0082726 100644 --- a/services/tracing/public/cpp/trace_event_agent.cc +++ b/services/tracing/public/cpp/trace_event_agent.cc
@@ -42,8 +42,7 @@ : BaseAgent(kTraceEventLabel, mojom::TraceDataType::ARRAY, base::trace_event::TraceLog::GetInstance()->process_id()), - enabled_tracing_modes_(0), - weak_ptr_factory_(this) { + enabled_tracing_modes_(0) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); // These filters are used by TraceLog in the legacy tracing system and JSON
diff --git a/services/tracing/public/cpp/trace_event_agent.h b/services/tracing/public/cpp/trace_event_agent.h index 2b532c3..0a269203 100644 --- a/services/tracing/public/cpp/trace_event_agent.h +++ b/services/tracing/public/cpp/trace_event_agent.h
@@ -64,7 +64,7 @@ std::vector<MetadataGeneratorFunction> metadata_generator_functions_; THREAD_CHECKER(thread_checker_); - base::WeakPtrFactory<TraceEventAgent> weak_ptr_factory_; + base::WeakPtrFactory<TraceEventAgent> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(TraceEventAgent); };
diff --git a/services/tracing/recorder.cc b/services/tracing/recorder.cc index e62df71b..3c75c7e 100644 --- a/services/tracing/recorder.cc +++ b/services/tracing/recorder.cc
@@ -19,8 +19,7 @@ : is_recording_(true), data_type_(data_type), on_data_change_callback_(on_data_change_callback), - binding_(this, std::move(request)), - weak_ptr_factory_(this) { + binding_(this, std::move(request)) { binding_.set_connection_error_handler(base::BindOnce( &Recorder::OnConnectionError, weak_ptr_factory_.GetWeakPtr())); }
diff --git a/services/tracing/recorder.h b/services/tracing/recorder.h index 86fe765..34d8ad810 100644 --- a/services/tracing/recorder.h +++ b/services/tracing/recorder.h
@@ -61,7 +61,7 @@ base::RepeatingClosure on_data_change_callback_; mojo::Binding<mojom::Recorder> binding_; - base::WeakPtrFactory<Recorder> weak_ptr_factory_; + base::WeakPtrFactory<Recorder> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(Recorder); };
diff --git a/services/video_capture/broadcasting_receiver.cc b/services/video_capture/broadcasting_receiver.cc index bac28db4..fc0e5a8 100644 --- a/services/video_capture/broadcasting_receiver.cc +++ b/services/video_capture/broadcasting_receiver.cc
@@ -219,8 +219,7 @@ BroadcastingReceiver::BroadcastingReceiver() : status_(Status::kOnStartedHasNotYetBeenCalled), error_(media::VideoCaptureError::kNone), - next_client_id_(0), - weak_factory_(this) {} + next_client_id_(0) {} BroadcastingReceiver::~BroadcastingReceiver() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/services/video_capture/broadcasting_receiver.h b/services/video_capture/broadcasting_receiver.h index 4105216..75ede94c 100644 --- a/services/video_capture/broadcasting_receiver.h +++ b/services/video_capture/broadcasting_receiver.h
@@ -157,7 +157,7 @@ // for each client. int32_t next_client_id_; - base::WeakPtrFactory<BroadcastingReceiver> weak_factory_; + base::WeakPtrFactory<BroadcastingReceiver> weak_factory_{this}; }; } // namespace video_capture
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.cc b/services/video_capture/device_factory_media_to_mojo_adapter.cc index 59416448..b017d2a 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.cc +++ b/services/video_capture/device_factory_media_to_mojo_adapter.cc
@@ -93,8 +93,7 @@ DeviceFactoryMediaToMojoAdapter::DeviceFactoryMediaToMojoAdapter( std::unique_ptr<media::VideoCaptureSystem> capture_system) : capture_system_(std::move(capture_system)), - has_called_get_device_infos_(false), - weak_factory_(this) {} + has_called_get_device_infos_(false) {} #endif // defined(OS_CHROMEOS) DeviceFactoryMediaToMojoAdapter::~DeviceFactoryMediaToMojoAdapter() = default;
diff --git a/services/video_capture/device_factory_media_to_mojo_adapter.h b/services/video_capture/device_factory_media_to_mojo_adapter.h index ff2260ca..2b9157e 100644 --- a/services/video_capture/device_factory_media_to_mojo_adapter.h +++ b/services/video_capture/device_factory_media_to_mojo_adapter.h
@@ -90,7 +90,7 @@ #endif // defined(OS_CHROMEOS) bool has_called_get_device_infos_; - base::WeakPtrFactory<DeviceFactoryMediaToMojoAdapter> weak_factory_; + base::WeakPtrFactory<DeviceFactoryMediaToMojoAdapter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(DeviceFactoryMediaToMojoAdapter); };
diff --git a/services/video_capture/device_media_to_mojo_adapter.cc b/services/video_capture/device_media_to_mojo_adapter.cc index 1ce673c..4a35999 100644 --- a/services/video_capture/device_media_to_mojo_adapter.cc +++ b/services/video_capture/device_media_to_mojo_adapter.cc
@@ -46,12 +46,11 @@ : device_(std::move(device)), jpeg_decoder_factory_callback_(std::move(jpeg_decoder_factory_callback)), jpeg_decoder_task_runner_(std::move(jpeg_decoder_task_runner)), - device_started_(false), - weak_factory_(this) {} + device_started_(false) {} #else DeviceMediaToMojoAdapter::DeviceMediaToMojoAdapter( std::unique_ptr<media::VideoCaptureDevice> device) - : device_(std::move(device)), device_started_(false), weak_factory_(this) {} + : device_(std::move(device)), device_started_(false) {} #endif // defined(OS_CHROMEOS) DeviceMediaToMojoAdapter::~DeviceMediaToMojoAdapter() {
diff --git a/services/video_capture/device_media_to_mojo_adapter.h b/services/video_capture/device_media_to_mojo_adapter.h index 2e9d1ec..fc32e9dd 100644 --- a/services/video_capture/device_media_to_mojo_adapter.h +++ b/services/video_capture/device_media_to_mojo_adapter.h
@@ -63,7 +63,7 @@ std::unique_ptr<ReceiverMojoToMediaAdapter> receiver_; bool device_started_; base::ThreadChecker thread_checker_; - base::WeakPtrFactory<DeviceMediaToMojoAdapter> weak_factory_; + base::WeakPtrFactory<DeviceMediaToMojoAdapter> weak_factory_{this}; }; } // namespace video_capture
diff --git a/services/video_capture/push_video_stream_subscription_impl.cc b/services/video_capture/push_video_stream_subscription_impl.cc index 276030d..abec017f 100644 --- a/services/video_capture/push_video_stream_subscription_impl.cc +++ b/services/video_capture/push_video_stream_subscription_impl.cc
@@ -24,8 +24,7 @@ broadcaster_(broadcaster), device_(device), status_(Status::kCreationCallbackNotYetRun), - broadcaster_client_id_(0), - weak_factory_(this) { + broadcaster_client_id_(0) { DCHECK(broadcaster_); DCHECK(device_); }
diff --git a/services/video_capture/push_video_stream_subscription_impl.h b/services/video_capture/push_video_stream_subscription_impl.h index 92cde96..e7d539e5 100644 --- a/services/video_capture/push_video_stream_subscription_impl.h +++ b/services/video_capture/push_video_stream_subscription_impl.h
@@ -70,7 +70,7 @@ // kClosed via a call to Close(). base::OnceCallback<void(base::OnceClosure done_cb)> on_closed_handler_; - base::WeakPtrFactory<PushVideoStreamSubscriptionImpl> weak_factory_; + base::WeakPtrFactory<PushVideoStreamSubscriptionImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PushVideoStreamSubscriptionImpl); };
diff --git a/services/video_capture/receiver_mojo_to_media_adapter.cc b/services/video_capture/receiver_mojo_to_media_adapter.cc index 0b6ac891..63e3d1f 100644 --- a/services/video_capture/receiver_mojo_to_media_adapter.cc +++ b/services/video_capture/receiver_mojo_to_media_adapter.cc
@@ -11,7 +11,7 @@ ReceiverMojoToMediaAdapter::ReceiverMojoToMediaAdapter( mojom::ReceiverPtr receiver) - : receiver_(std::move(receiver)), weak_factory_(this) {} + : receiver_(std::move(receiver)) {} ReceiverMojoToMediaAdapter::~ReceiverMojoToMediaAdapter() = default;
diff --git a/services/video_capture/receiver_mojo_to_media_adapter.h b/services/video_capture/receiver_mojo_to_media_adapter.h index 5aaa4a89..917c150 100644 --- a/services/video_capture/receiver_mojo_to_media_adapter.h +++ b/services/video_capture/receiver_mojo_to_media_adapter.h
@@ -40,7 +40,7 @@ private: mojom::ReceiverPtr receiver_; - base::WeakPtrFactory<ReceiverMojoToMediaAdapter> weak_factory_; + base::WeakPtrFactory<ReceiverMojoToMediaAdapter> weak_factory_{this}; }; } // namespace video_capture
diff --git a/services/video_capture/video_source_impl.cc b/services/video_capture/video_source_impl.cc index 91b1e48..dd41fee1 100644 --- a/services/video_capture/video_source_impl.cc +++ b/services/video_capture/video_source_impl.cc
@@ -18,8 +18,7 @@ device_id_(device_id), on_last_binding_closed_cb_(std::move(on_last_binding_closed_cb)), device_status_(DeviceStatus::kNotStarted), - restart_device_once_when_stop_complete_(false), - weak_factory_(this) { + restart_device_once_when_stop_complete_(false) { // Unretained(this) is safe because |this| owns |bindings_|. bindings_.set_connection_error_handler(base::BindRepeating( &VideoSourceImpl::OnClientDisconnected, base::Unretained(this)));
diff --git a/services/video_capture/video_source_impl.h b/services/video_capture/video_source_impl.h index 8cf68af..1cc0349 100644 --- a/services/video_capture/video_source_impl.h +++ b/services/video_capture/video_source_impl.h
@@ -73,7 +73,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<VideoSourceImpl> weak_factory_; + base::WeakPtrFactory<VideoSourceImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(VideoSourceImpl); };
diff --git a/services/video_capture/virtual_device_enabled_device_factory.cc b/services/video_capture/virtual_device_enabled_device_factory.cc index cd41361..6e3de4d 100644 --- a/services/video_capture/virtual_device_enabled_device_factory.cc +++ b/services/video_capture/virtual_device_enabled_device_factory.cc
@@ -87,7 +87,7 @@ VirtualDeviceEnabledDeviceFactory::VirtualDeviceEnabledDeviceFactory( std::unique_ptr<DeviceFactory> device_factory) - : device_factory_(std::move(device_factory)), weak_factory_(this) {} + : device_factory_(std::move(device_factory)) {} VirtualDeviceEnabledDeviceFactory::~VirtualDeviceEnabledDeviceFactory() = default;
diff --git a/services/video_capture/virtual_device_enabled_device_factory.h b/services/video_capture/virtual_device_enabled_device_factory.h index 4b42dd2..583e4b4f 100644 --- a/services/video_capture/virtual_device_enabled_device_factory.h +++ b/services/video_capture/virtual_device_enabled_device_factory.h
@@ -68,7 +68,7 @@ const std::unique_ptr<DeviceFactory> device_factory_; std::vector<mojom::DevicesChangedObserverPtr> devices_changed_observers_; - base::WeakPtrFactory<VirtualDeviceEnabledDeviceFactory> weak_factory_; + base::WeakPtrFactory<VirtualDeviceEnabledDeviceFactory> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(VirtualDeviceEnabledDeviceFactory); };
diff --git a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.cc b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.cc index 1d02f26..9cfa1c0b 100644 --- a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.cc +++ b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
@@ -35,8 +35,7 @@ mojom::GpuMemoryBufferFactoryPtr gpu) : thread_("GpuMemoryThread"), gpu_memory_buffer_support_( - std::make_unique<gpu::GpuMemoryBufferSupport>()), - weak_ptr_factory_(this) { + std::make_unique<gpu::GpuMemoryBufferSupport>()) { CHECK(thread_.Start()); // The thread is owned by this object. Which means the task will not run if // the object has been destroyed. So Unretained() is safe.
diff --git a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h index bddfb58..293a2cd 100644 --- a/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h +++ b/services/viz/public/cpp/gpu/client_gpu_memory_buffer_manager.h
@@ -65,7 +65,7 @@ base::WeakPtr<ClientGpuMemoryBufferManager> weak_ptr_; std::set<base::WaitableEvent*> pending_allocation_waiters_; std::unique_ptr<gpu::GpuMemoryBufferSupport> gpu_memory_buffer_support_; - base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_; + base::WeakPtrFactory<ClientGpuMemoryBufferManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ClientGpuMemoryBufferManager); };
diff --git a/skia/config/SkUserConfig.h b/skia/config/SkUserConfig.h index 80c9462..94e9588a 100644 --- a/skia/config/SkUserConfig.h +++ b/skia/config/SkUserConfig.h
@@ -139,12 +139,6 @@ // converted to type3 when producing PDFs, and reduces build size. #define SK_PDF_DO_NOT_SUPPORT_TYPE_1_FONTS -// Please see: b/138674523. Turning on explicit resource allocation prevented -// reusing textures in some cases (esp. blur image filters using -// SkImage::makeWithFilter). Temporarily keep this bug (via this define) because -// the fix needs to be turned on atomically with some cc unit test rebaselines. -#define SK_CRIPPLE_TEXTURE_REUSE - #ifdef SK_DEBUG #define SK_REF_CNT_MIXIN_INCLUDE "skia/config/sk_ref_cnt_ext_debug.h" #else
diff --git a/storage/browser/BUILD.gn b/storage/browser/BUILD.gn index 718481c..1a7f5e4 100644 --- a/storage/browser/BUILD.gn +++ b/storage/browser/BUILD.gn
@@ -19,6 +19,8 @@ "blob/blob_data_snapshot.h", "blob/blob_entry.cc", "blob/blob_entry.h", + "blob/blob_handle.cc", + "blob/blob_handle.h", "blob/blob_impl.cc", "blob/blob_impl.h", "blob/blob_memory_controller.cc", @@ -27,6 +29,8 @@ "blob/blob_reader.h", "blob/blob_registry_impl.cc", "blob/blob_registry_impl.h", + "blob/blob_storage_constants.cc", + "blob/blob_storage_constants.h", "blob/blob_storage_context.cc", "blob/blob_storage_context.h", "blob/blob_storage_registry.cc", @@ -182,6 +186,7 @@ "quota/quota_disk_info_helper.h", "quota/quota_features.cc", "quota/quota_features.h", + "quota/quota_limit_type.h", "quota/quota_macros.h", "quota/quota_manager.cc", "quota/quota_manager.h",
diff --git a/storage/browser/blob/blob_builder_from_stream.cc b/storage/browser/blob/blob_builder_from_stream.cc index 840bfa0..cdfaf2a 100644 --- a/storage/browser/blob/blob_builder_from_stream.cc +++ b/storage/browser/blob/blob_builder_from_stream.cc
@@ -316,8 +316,7 @@ context_(std::move(context)), callback_(std::move(callback)), content_type_(std::move(content_type)), - content_disposition_(std::move(content_disposition)), - weak_factory_(this) { + content_disposition_(std::move(content_disposition)) { DCHECK(context_); }
diff --git a/storage/browser/blob/blob_builder_from_stream.h b/storage/browser/blob/blob_builder_from_stream.h index 80bc732..18b0389e 100644 --- a/storage/browser/blob/blob_builder_from_stream.h +++ b/storage/browser/blob/blob_builder_from_stream.h
@@ -155,7 +155,7 @@ std::vector<scoped_refptr<ShareableBlobDataItem>> items_; uint64_t current_total_size_ = 0; base::WeakPtr<BlobMemoryController::QuotaAllocationTask> pending_quota_task_; - base::WeakPtrFactory<BlobBuilderFromStream> weak_factory_; + base::WeakPtrFactory<BlobBuilderFromStream> weak_factory_{this}; }; } // namespace storage
diff --git a/storage/browser/blob/blob_data_handle.h b/storage/browser/blob/blob_data_handle.h index 9324afd..1db1d45 100644 --- a/storage/browser/blob/blob_data_handle.h +++ b/storage/browser/blob/blob_data_handle.h
@@ -16,7 +16,7 @@ #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner_helpers.h" #include "base/supports_user_data.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" namespace base { class SequencedTaskRunner;
diff --git a/storage/common/blob_storage/blob_handle.cc b/storage/browser/blob/blob_handle.cc similarity index 89% rename from storage/common/blob_storage/blob_handle.cc rename to storage/browser/blob/blob_handle.cc index 50b02d08..1d6db68 100644 --- a/storage/common/blob_storage/blob_handle.cc +++ b/storage/browser/blob/blob_handle.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "storage/common/blob_storage/blob_handle.h" +#include "storage/browser/blob/blob_handle.h" namespace storage {
diff --git a/storage/common/blob_storage/blob_handle.h b/storage/browser/blob/blob_handle.h similarity index 81% rename from storage/common/blob_storage/blob_handle.h rename to storage/browser/blob/blob_handle.h index 8ba9e9b..9b3e7de 100644 --- a/storage/common/blob_storage/blob_handle.h +++ b/storage/browser/blob/blob_handle.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_HANDLE_H_ -#define STORAGE_COMMON_BLOB_STORAGE_BLOB_HANDLE_H_ +#ifndef STORAGE_BROWSER_BLOB_BLOB_HANDLE_H_ +#define STORAGE_BROWSER_BLOB_BLOB_HANDLE_H_ #include "base/component_export.h" #include "base/memory/ref_counted.h" @@ -12,7 +12,7 @@ namespace storage { // Refcounted wrapper around a mojom::BlobPtr. -class COMPONENT_EXPORT(STORAGE_COMMON) BlobHandle +class COMPONENT_EXPORT(STORAGE_BROWSER) BlobHandle : public base::RefCounted<BlobHandle> { public: explicit BlobHandle(blink::mojom::BlobPtr blob); @@ -34,4 +34,4 @@ } // namespace storage -#endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_HANDLE_H_ +#endif // STORAGE_BROWSER_BLOB_BLOB_HANDLE_H_
diff --git a/storage/browser/blob/blob_impl.cc b/storage/browser/blob/blob_impl.cc index bf6aa8c..ffd7d430 100644 --- a/storage/browser/blob/blob_impl.cc +++ b/storage/browser/blob/blob_impl.cc
@@ -192,7 +192,7 @@ BlobImpl::BlobImpl(std::unique_ptr<BlobDataHandle> handle, blink::mojom::BlobRequest request) - : handle_(std::move(handle)), weak_ptr_factory_(this) { + : handle_(std::move(handle)) { DCHECK(handle_); bindings_.AddBinding(this, std::move(request)); bindings_.set_connection_error_handler(base::BindRepeating(
diff --git a/storage/browser/blob/blob_impl.h b/storage/browser/blob/blob_impl.h index 5397e48..46c4dcc4 100644 --- a/storage/browser/blob/blob_impl.h +++ b/storage/browser/blob/blob_impl.h
@@ -52,7 +52,7 @@ mojo::BindingSet<blink::mojom::Blob> bindings_; mojo::BindingSet<network::mojom::DataPipeGetter> data_pipe_getter_bindings_; - base::WeakPtrFactory<BlobImpl> weak_ptr_factory_; + base::WeakPtrFactory<BlobImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobImpl); };
diff --git a/storage/browser/blob/blob_memory_controller.cc b/storage/browser/blob/blob_memory_controller.cc index 06a744cd..0c21a91e 100644 --- a/storage/browser/blob/blob_memory_controller.cc +++ b/storage/browser/blob/blob_memory_controller.cc
@@ -324,8 +324,7 @@ : controller_(controller), pending_items_(std::move(pending_items)), done_callback_(std::move(done_callback)), - allocation_size_(quota_request_size), - weak_factory_(this) {} + allocation_size_(quota_request_size) {} ~MemoryQuotaAllocationTask() override = default; @@ -365,7 +364,7 @@ size_t allocation_size_; PendingMemoryQuotaTaskList::iterator my_list_position_; - base::WeakPtrFactory<MemoryQuotaAllocationTask> weak_factory_; + base::WeakPtrFactory<MemoryQuotaAllocationTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MemoryQuotaAllocationTask); }; @@ -379,8 +378,7 @@ std::vector<scoped_refptr<ShareableBlobDataItem>> unreserved_file_items, FileQuotaRequestCallback done_callback) : controller_(memory_controller), - done_callback_(std::move(done_callback)), - weak_factory_(this) { + done_callback_(std::move(done_callback)) { // Get the file sizes and total size. uint64_t total_size = GetTotalSizeAndFileSizes(unreserved_file_items, &file_sizes_); @@ -523,7 +521,7 @@ uint64_t allocation_size_; PendingFileQuotaTaskList::iterator my_list_position_; - base::WeakPtrFactory<FileQuotaAllocationTask> weak_factory_; + base::WeakPtrFactory<FileQuotaAllocationTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileQuotaAllocationTask); }; @@ -538,8 +536,7 @@ base::MRUCache<uint64_t, ShareableBlobDataItem*>::NO_AUTO_EVICT), memory_pressure_listener_( base::BindRepeating(&BlobMemoryController::OnMemoryPressure, - base::Unretained(this))), - weak_factory_(this) {} + base::Unretained(this))) {} BlobMemoryController::~BlobMemoryController() = default;
diff --git a/storage/browser/blob/blob_memory_controller.h b/storage/browser/blob/blob_memory_controller.h index 4e51600..997fd93 100644 --- a/storage/browser/blob/blob_memory_controller.h +++ b/storage/browser/blob/blob_memory_controller.h
@@ -29,7 +29,7 @@ #include "base/memory/weak_ptr.h" #include "base/optional.h" #include "base/time/time.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" namespace base { class TaskRunner; @@ -317,7 +317,7 @@ base::MemoryPressureListener memory_pressure_listener_; - base::WeakPtrFactory<BlobMemoryController> weak_factory_; + base::WeakPtrFactory<BlobMemoryController> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobMemoryController); };
diff --git a/storage/browser/blob/blob_reader.cc b/storage/browser/blob/blob_reader.cc index dc06cc49a..1a33f26 100644 --- a/storage/browser/blob/blob_reader.cc +++ b/storage/browser/blob/blob_reader.cc
@@ -74,8 +74,7 @@ : file_task_runner_( base::CreateTaskRunner({base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_VISIBLE})), - net_error_(net::OK), - weak_factory_(this) { + net_error_(net::OK) { if (blob_handle) { if (blob_handle->IsBroken()) { net_error_ = ConvertBlobErrorToNetError(blob_handle->GetBlobStatus());
diff --git a/storage/browser/blob/blob_reader.h b/storage/browser/blob/blob_reader.h index 312b65f..aa89fcb 100644 --- a/storage/browser/blob/blob_reader.h +++ b/storage/browser/blob/blob_reader.h
@@ -18,7 +18,7 @@ #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" #include "net/base/completion_once_callback.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" class GURL; @@ -248,7 +248,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<BlobReader> weak_factory_; + base::WeakPtrFactory<BlobReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobReader); };
diff --git a/storage/browser/blob/blob_registry_impl.cc b/storage/browser/blob/blob_registry_impl.cc index 1630806..12ed1b2 100644 --- a/storage/browser/blob/blob_registry_impl.cc +++ b/storage/browser/blob/blob_registry_impl.cc
@@ -41,8 +41,7 @@ : blob_registry_(blob_registry), uuid_(uuid), builder_(std::make_unique<BlobDataBuilder>(uuid)), - bad_message_callback_(std::move(bad_message_callback)), - weak_ptr_factory_(this) { + bad_message_callback_(std::move(bad_message_callback)) { builder_->set_content_type(content_type); builder_->set_content_disposition(content_disposition); for (auto& element : elements) @@ -206,7 +205,7 @@ // Number of dependent blobs that have started constructing. size_t ready_dependent_blob_count_ = 0; - base::WeakPtrFactory<BlobUnderConstruction> weak_ptr_factory_; + base::WeakPtrFactory<BlobUnderConstruction> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobUnderConstruction); }; @@ -476,8 +475,7 @@ base::WeakPtr<BlobStorageContext> context, scoped_refptr<FileSystemContext> file_system_context) : context_(std::move(context)), - file_system_context_(std::move(file_system_context)), - weak_ptr_factory_(this) {} + file_system_context_(std::move(file_system_context)) {} BlobRegistryImpl::~BlobRegistryImpl() { // BlobBuilderFromStream needs to be aborted before it can be destroyed, but
diff --git a/storage/browser/blob/blob_registry_impl.h b/storage/browser/blob/blob_registry_impl.h index 653feea..cbc4789 100644 --- a/storage/browser/blob/blob_registry_impl.h +++ b/storage/browser/blob/blob_registry_impl.h
@@ -96,7 +96,7 @@ base::UniquePtrComparator> blobs_being_streamed_; - base::WeakPtrFactory<BlobRegistryImpl> weak_ptr_factory_; + base::WeakPtrFactory<BlobRegistryImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobRegistryImpl); };
diff --git a/storage/common/blob_storage/blob_storage_constants.cc b/storage/browser/blob/blob_storage_constants.cc similarity index 97% rename from storage/common/blob_storage/blob_storage_constants.cc rename to storage/browser/blob/blob_storage_constants.cc index ebeabdc..4348e72 100644 --- a/storage/common/blob_storage/blob_storage_constants.cc +++ b/storage/browser/blob/blob_storage_constants.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" #include "base/command_line.h" #include "base/logging.h"
diff --git a/storage/common/blob_storage/blob_storage_constants.h b/storage/browser/blob/blob_storage_constants.h similarity index 92% rename from storage/common/blob_storage/blob_storage_constants.h rename to storage/browser/blob/blob_storage_constants.h index 48c405a..0803c4d 100644 --- a/storage/common/blob_storage/blob_storage_constants.h +++ b/storage/browser/blob/blob_storage_constants.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ -#define STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ +#ifndef STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONSTANTS_H_ +#define STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONSTANTS_H_ #include <stddef.h> #include <stdint.h> @@ -35,7 +35,7 @@ "blob-transport-by-file-trigger"; // All sizes are in bytes. -struct COMPONENT_EXPORT(STORAGE_COMMON) BlobStorageLimits { +struct COMPONENT_EXPORT(STORAGE_BROWSER) BlobStorageLimits { BlobStorageLimits(); ~BlobStorageLimits(); BlobStorageLimits(const BlobStorageLimits&); @@ -150,14 +150,14 @@ using BlobStatusCallback = base::OnceCallback<void(BlobStatus)>; // Returns if the status is an error code. -COMPONENT_EXPORT(STORAGE_COMMON) bool BlobStatusIsError(BlobStatus status); +COMPONENT_EXPORT(STORAGE_BROWSER) bool BlobStatusIsError(BlobStatus status); -COMPONENT_EXPORT(STORAGE_COMMON) bool BlobStatusIsPending(BlobStatus status); +COMPONENT_EXPORT(STORAGE_BROWSER) bool BlobStatusIsPending(BlobStatus status); // Returns if the status is a bad enough error to flag the IPC as bad. This is // only INVALID_CONSTRUCTION_ARGUMENTS. -COMPONENT_EXPORT(STORAGE_COMMON) bool BlobStatusIsBadIPC(BlobStatus status); +COMPONENT_EXPORT(STORAGE_BROWSER) bool BlobStatusIsBadIPC(BlobStatus status); } // namespace storage -#endif // STORAGE_COMMON_BLOB_STORAGE_BLOB_STORAGE_CONSTANTS_H_ +#endif // STORAGE_BROWSER_BLOB_BLOB_STORAGE_CONSTANTS_H_
diff --git a/storage/browser/blob/blob_storage_context.cc b/storage/browser/blob/blob_storage_context.cc index 705aaa4..253037f 100644 --- a/storage/browser/blob/blob_storage_context.cc +++ b/storage/browser/blob/blob_storage_context.cc
@@ -39,8 +39,7 @@ } // namespace BlobStorageContext::BlobStorageContext() - : memory_controller_(base::FilePath(), scoped_refptr<base::TaskRunner>()), - ptr_factory_(this) { + : memory_controller_(base::FilePath(), scoped_refptr<base::TaskRunner>()) { base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( this, "BlobStorageContext", base::ThreadTaskRunnerHandle::Get()); } @@ -48,8 +47,7 @@ BlobStorageContext::BlobStorageContext( base::FilePath storage_directory, scoped_refptr<base::TaskRunner> file_runner) - : memory_controller_(std::move(storage_directory), std::move(file_runner)), - ptr_factory_(this) { + : memory_controller_(std::move(storage_directory), std::move(file_runner)) { base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider( this, "BlobStorageContext", base::ThreadTaskRunnerHandle::Get()); }
diff --git a/storage/browser/blob/blob_storage_context.h b/storage/browser/blob/blob_storage_context.h index 25b32c6..9730b0c 100644 --- a/storage/browser/blob/blob_storage_context.h +++ b/storage/browser/blob/blob_storage_context.h
@@ -23,8 +23,8 @@ #include "storage/browser/blob/blob_data_handle.h" #include "storage/browser/blob/blob_entry.h" #include "storage/browser/blob/blob_memory_controller.h" +#include "storage/browser/blob/blob_storage_constants.h" #include "storage/browser/blob/blob_storage_registry.h" -#include "storage/common/blob_storage/blob_storage_constants.h" #include "third_party/blink/public/mojom/blob/blob.mojom.h" class GURL; @@ -236,7 +236,7 @@ BlobStorageRegistry registry_; BlobMemoryController memory_controller_; - base::WeakPtrFactory<BlobStorageContext> ptr_factory_; + base::WeakPtrFactory<BlobStorageContext> ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobStorageContext); };
diff --git a/storage/browser/blob/blob_storage_registry.h b/storage/browser/blob/blob_storage_registry.h index 86e6bffb..7bb79e7 100644 --- a/storage/browser/blob/blob_storage_registry.h +++ b/storage/browser/blob/blob_storage_registry.h
@@ -17,7 +17,7 @@ #include "base/component_export.h" #include "base/macros.h" #include "base/unguessable_token.h" -#include "storage/common/blob_storage/blob_storage_constants.h" +#include "storage/browser/blob/blob_storage_constants.h" class GURL;
diff --git a/storage/browser/blob/blob_url_loader.cc b/storage/browser/blob/blob_url_loader.cc index 4846edf..cc2fc27 100644 --- a/storage/browser/blob/blob_url_loader.cc +++ b/storage/browser/blob/blob_url_loader.cc
@@ -98,8 +98,7 @@ std::unique_ptr<BlobDataHandle> blob_handle) : binding_(this, std::move(url_loader_request)), client_(std::move(client)), - blob_handle_(std::move(blob_handle)), - weak_factory_(this) { + blob_handle_(std::move(blob_handle)) { // PostTask since it might destruct. base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(&BlobURLLoader::Start,
diff --git a/storage/browser/blob/blob_url_loader.h b/storage/browser/blob/blob_url_loader.h index 8e9474f..a2ce67a 100644 --- a/storage/browser/blob/blob_url_loader.h +++ b/storage/browser/blob/blob_url_loader.h
@@ -71,7 +71,7 @@ mojo::ScopedDataPipeProducerHandle response_body_producer_handle_; mojo::ScopedDataPipeConsumerHandle response_body_consumer_handle_; - base::WeakPtrFactory<BlobURLLoader> weak_factory_; + base::WeakPtrFactory<BlobURLLoader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobURLLoader); };
diff --git a/storage/browser/blob/blob_url_store_impl.cc b/storage/browser/blob/blob_url_store_impl.cc index 7589554..1cca0d7 100644 --- a/storage/browser/blob/blob_url_store_impl.cc +++ b/storage/browser/blob/blob_url_store_impl.cc
@@ -62,9 +62,7 @@ BlobURLStoreImpl::BlobURLStoreImpl(base::WeakPtr<BlobStorageContext> context, BlobRegistryImpl::Delegate* delegate) - : context_(std::move(context)), - delegate_(delegate), - weak_ptr_factory_(this) {} + : context_(std::move(context)), delegate_(delegate) {} BlobURLStoreImpl::~BlobURLStoreImpl() { if (context_) {
diff --git a/storage/browser/blob/blob_url_store_impl.h b/storage/browser/blob/blob_url_store_impl.h index 959ed1e..80927c8b 100644 --- a/storage/browser/blob/blob_url_store_impl.h +++ b/storage/browser/blob/blob_url_store_impl.h
@@ -44,7 +44,7 @@ std::set<GURL> urls_; - base::WeakPtrFactory<BlobURLStoreImpl> weak_ptr_factory_; + base::WeakPtrFactory<BlobURLStoreImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(BlobURLStoreImpl); };
diff --git a/storage/browser/blob/mojo_blob_reader.cc b/storage/browser/blob/mojo_blob_reader.cc index 96233d1..fe897605 100644 --- a/storage/browser/blob/mojo_blob_reader.cc +++ b/storage/browser/blob/mojo_blob_reader.cc
@@ -37,8 +37,7 @@ base::SequencedTaskRunnerHandle::Get()), peer_closed_handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, - base::SequencedTaskRunnerHandle::Get()), - weak_factory_(this) { + base::SequencedTaskRunnerHandle::Get()) { TRACE_EVENT_ASYNC_BEGIN1("Blob", "BlobReader", this, "uuid", handle->uuid()); DCHECK(delegate_); base::SequencedTaskRunnerHandle::Get()->PostTask(
diff --git a/storage/browser/blob/mojo_blob_reader.h b/storage/browser/blob/mojo_blob_reader.h index 42796fd0..d311e321 100644 --- a/storage/browser/blob/mojo_blob_reader.h +++ b/storage/browser/blob/mojo_blob_reader.h
@@ -133,7 +133,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<MojoBlobReader> weak_factory_; + base::WeakPtrFactory<MojoBlobReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MojoBlobReader); };
diff --git a/storage/browser/blob/view_blob_internals_job.cc b/storage/browser/blob/view_blob_internals_job.cc index 91b390f3..bb0fe8688 100644 --- a/storage/browser/blob/view_blob_internals_job.cc +++ b/storage/browser/blob/view_blob_internals_job.cc
@@ -25,10 +25,10 @@ #include "net/base/net_errors.h" #include "storage/browser/blob/blob_data_item.h" #include "storage/browser/blob/blob_entry.h" +#include "storage/browser/blob/blob_storage_constants.h" #include "storage/browser/blob/blob_storage_context.h" #include "storage/browser/blob/blob_storage_registry.h" #include "storage/browser/blob/shareable_blob_data_item.h" -#include "storage/common/blob_storage/blob_storage_constants.h" namespace { using storage::BlobStatus;
diff --git a/storage/browser/database/database_quota_client_unittest.cc b/storage/browser/database/database_quota_client_unittest.cc index 417a885..d0635f3 100644 --- a/storage/browser/database/database_quota_client_unittest.cc +++ b/storage/browser/database/database_quota_client_unittest.cc
@@ -132,8 +132,7 @@ kOriginB(url::Origin::Create(GURL("http://host:8000"))), kOriginOther(url::Origin::Create(GURL("http://other"))), usage_(0), - mock_tracker_(new MockDatabaseTracker), - weak_factory_(this) {} + mock_tracker_(new MockDatabaseTracker) {} int64_t GetOriginUsage(storage::QuotaClient* client, const url::Origin& origin, @@ -204,7 +203,7 @@ std::set<url::Origin> origins_; blink::mojom::QuotaStatusCode delete_status_; scoped_refptr<MockDatabaseTracker> mock_tracker_; - base::WeakPtrFactory<DatabaseQuotaClientTest> weak_factory_; + base::WeakPtrFactory<DatabaseQuotaClientTest> weak_factory_{this}; }; TEST_F(DatabaseQuotaClientTest, GetOriginUsage) {
diff --git a/storage/browser/fileapi/copy_or_move_operation_delegate.cc b/storage/browser/fileapi/copy_or_move_operation_delegate.cc index 9e8a664..df61d43 100644 --- a/storage/browser/fileapi/copy_or_move_operation_delegate.cc +++ b/storage/browser/fileapi/copy_or_move_operation_delegate.cc
@@ -113,8 +113,7 @@ option_(option), validator_factory_(validator_factory), file_progress_callback_(file_progress_callback), - cancel_requested_(false), - weak_factory_(this) {} + cancel_requested_(false) {} void Run(CopyOrMoveOperationDelegate::StatusCallback callback) override { file_progress_callback_.Run(0); @@ -351,7 +350,7 @@ std::unique_ptr<CopyOrMoveFileValidator> validator_; FileSystemOperation::CopyFileProgressCallback file_progress_callback_; bool cancel_requested_; - base::WeakPtrFactory<SnapshotCopyOrMoveImpl> weak_factory_; + base::WeakPtrFactory<SnapshotCopyOrMoveImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SnapshotCopyOrMoveImpl); }; @@ -388,8 +387,7 @@ reader_(std::move(reader)), writer_(std::move(writer)), file_progress_callback_(file_progress_callback), - cancel_requested_(false), - weak_factory_(this) {} + cancel_requested_(false) {} void Run(CopyOrMoveOperationDelegate::StatusCallback callback) override { // Reader can be created even if the entry does not exist or the entry is @@ -584,7 +582,7 @@ FileSystemOperation::CopyFileProgressCallback file_progress_callback_; std::unique_ptr<CopyOrMoveOperationDelegate::StreamCopyHelper> copy_helper_; bool cancel_requested_; - base::WeakPtrFactory<StreamCopyOrMoveImpl> weak_factory_; + base::WeakPtrFactory<StreamCopyOrMoveImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(StreamCopyOrMoveImpl); }; @@ -606,8 +604,7 @@ previous_flush_offset_(0), min_progress_callback_invocation_span_( min_progress_callback_invocation_span), - cancel_requested_(false), - weak_factory_(this) {} + cancel_requested_(false) {} CopyOrMoveOperationDelegate::StreamCopyHelper::~StreamCopyHelper() = default; @@ -745,8 +742,7 @@ option_(option), error_behavior_(error_behavior), progress_callback_(progress_callback), - callback_(std::move(callback)), - weak_factory_(this) { + callback_(std::move(callback)) { same_file_system_ = src_root_.IsInSameFileSystem(dest_root_); }
diff --git a/storage/browser/fileapi/copy_or_move_operation_delegate.h b/storage/browser/fileapi/copy_or_move_operation_delegate.h index 8a08a12..f54a359 100644 --- a/storage/browser/fileapi/copy_or_move_operation_delegate.h +++ b/storage/browser/fileapi/copy_or_move_operation_delegate.h
@@ -87,7 +87,7 @@ base::Time last_progress_callback_invocation_time_; base::TimeDelta min_progress_callback_invocation_span_; bool cancel_requested_; - base::WeakPtrFactory<StreamCopyHelper> weak_factory_; + base::WeakPtrFactory<StreamCopyHelper> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(StreamCopyHelper); }; @@ -153,7 +153,7 @@ StatusCallback callback_; std::map<CopyOrMoveImpl*, std::unique_ptr<CopyOrMoveImpl>> running_copy_set_; - base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_; + base::WeakPtrFactory<CopyOrMoveOperationDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(CopyOrMoveOperationDelegate); };
diff --git a/storage/browser/fileapi/file_system_file_stream_reader.cc b/storage/browser/fileapi/file_system_file_stream_reader.cc index 5f9a679..dffd4b9e 100644 --- a/storage/browser/fileapi/file_system_file_stream_reader.cc +++ b/storage/browser/fileapi/file_system_file_stream_reader.cc
@@ -46,8 +46,7 @@ url_(url), initial_offset_(initial_offset), expected_modification_time_(expected_modification_time), - has_pending_create_snapshot_(false), - weak_factory_(this) {} + has_pending_create_snapshot_(false) {} FileSystemFileStreamReader::~FileSystemFileStreamReader() = default;
diff --git a/storage/browser/fileapi/file_system_file_stream_reader.h b/storage/browser/fileapi/file_system_file_stream_reader.h index 8239c76..1132df7 100644 --- a/storage/browser/fileapi/file_system_file_stream_reader.h +++ b/storage/browser/fileapi/file_system_file_stream_reader.h
@@ -77,7 +77,7 @@ std::unique_ptr<storage::FileStreamReader> file_reader_; scoped_refptr<storage::ShareableFileReference> snapshot_ref_; bool has_pending_create_snapshot_; - base::WeakPtrFactory<FileSystemFileStreamReader> weak_factory_; + base::WeakPtrFactory<FileSystemFileStreamReader> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemFileStreamReader); };
diff --git a/storage/browser/fileapi/file_system_operation_context.h b/storage/browser/fileapi/file_system_operation_context.h index 1e4fd76a..dbaeffe 100644 --- a/storage/browser/fileapi/file_system_operation_context.h +++ b/storage/browser/fileapi/file_system_operation_context.h
@@ -13,7 +13,7 @@ #include "base/supports_user_data.h" #include "base/threading/thread_checker.h" #include "storage/browser/fileapi/task_runner_bound_observer_list.h" -#include "storage/common/quota/quota_limit_type.h" +#include "storage/browser/quota/quota_limit_type.h" namespace base { class SequencedTaskRunner;
diff --git a/storage/browser/fileapi/file_system_operation_impl.cc b/storage/browser/fileapi/file_system_operation_impl.cc index 1782d6e18..408d2d0 100644 --- a/storage/browser/fileapi/file_system_operation_impl.cc +++ b/storage/browser/fileapi/file_system_operation_impl.cc
@@ -379,8 +379,7 @@ : file_system_context_(file_system_context), operation_context_(std::move(operation_context)), async_file_util_(nullptr), - pending_operation_(kOperationNone), - weak_factory_(this) { + pending_operation_(kOperationNone) { weak_ptr_ = weak_factory_.GetWeakPtr(); DCHECK(operation_context_.get());
diff --git a/storage/browser/fileapi/file_system_operation_impl.h b/storage/browser/fileapi/file_system_operation_impl.h index 2f117fb7..73847d6c 100644 --- a/storage/browser/fileapi/file_system_operation_impl.h +++ b/storage/browser/fileapi/file_system_operation_impl.h
@@ -202,7 +202,7 @@ OperationType pending_operation_; base::WeakPtr<FileSystemOperationImpl> weak_ptr_; - base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_; + base::WeakPtrFactory<FileSystemOperationImpl> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImpl); };
diff --git a/storage/browser/fileapi/file_system_operation_impl_unittest.cc b/storage/browser/fileapi/file_system_operation_impl_unittest.cc index 264502a..d87f7f34 100644 --- a/storage/browser/fileapi/file_system_operation_impl_unittest.cc +++ b/storage/browser/fileapi/file_system_operation_impl_unittest.cc
@@ -59,8 +59,7 @@ public: FileSystemOperationImplTest() : scoped_task_environment_( - base::test::ScopedTaskEnvironment::MainThreadType::IO), - weak_factory_(this) {} + base::test::ScopedTaskEnvironment::MainThreadType::IO) {} protected: void SetUp() override { @@ -483,7 +482,7 @@ storage::MockFileUpdateObserver update_observer_; storage::UpdateObserverList update_observers_; - base::WeakPtrFactory<FileSystemOperationImplTest> weak_factory_; + base::WeakPtrFactory<FileSystemOperationImplTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImplTest); };
diff --git a/storage/browser/fileapi/file_system_operation_impl_write_unittest.cc b/storage/browser/fileapi/file_system_operation_impl_write_unittest.cc index a705c39..727d262 100644 --- a/storage/browser/fileapi/file_system_operation_impl_write_unittest.cc +++ b/storage/browser/fileapi/file_system_operation_impl_write_unittest.cc
@@ -57,8 +57,7 @@ status_(base::File::FILE_OK), cancel_status_(base::File::FILE_ERROR_FAILED), bytes_written_(0), - complete_(false), - weak_factory_(this) { + complete_(false) { change_observers_ = storage::MockFileChangeObserver::CreateList(&change_observer_); } @@ -166,7 +165,7 @@ storage::MockFileChangeObserver change_observer_; storage::ChangeObserverList change_observers_; - base::WeakPtrFactory<FileSystemOperationImplWriteTest> weak_factory_; + base::WeakPtrFactory<FileSystemOperationImplWriteTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemOperationImplWriteTest); };
diff --git a/storage/browser/fileapi/file_system_operation_runner.cc b/storage/browser/fileapi/file_system_operation_runner.cc index af2c6fc..79f2b6b 100644 --- a/storage/browser/fileapi/file_system_operation_runner.cc +++ b/storage/browser/fileapi/file_system_operation_runner.cc
@@ -540,7 +540,7 @@ FileSystemOperationRunner::FileSystemOperationRunner( FileSystemContext* file_system_context) - : file_system_context_(file_system_context), weak_factory_(this) { + : file_system_context_(file_system_context) { weak_ptr_ = weak_factory_.GetWeakPtr(); }
diff --git a/storage/browser/fileapi/file_system_operation_runner.h b/storage/browser/fileapi/file_system_operation_runner.h index d29e26d0..3b9bebd 100644 --- a/storage/browser/fileapi/file_system_operation_runner.h +++ b/storage/browser/fileapi/file_system_operation_runner.h
@@ -317,7 +317,7 @@ std::map<OperationID, StatusCallback> stray_cancel_callbacks_; base::WeakPtr<FileSystemOperationRunner> weak_ptr_; - base::WeakPtrFactory<FileSystemOperationRunner> weak_factory_; + base::WeakPtrFactory<FileSystemOperationRunner> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemOperationRunner); };
diff --git a/storage/browser/fileapi/file_system_quota_client_unittest.cc b/storage/browser/fileapi/file_system_quota_client_unittest.cc index b3e58fd..354792ba 100644 --- a/storage/browser/fileapi/file_system_quota_client_unittest.cc +++ b/storage/browser/fileapi/file_system_quota_client_unittest.cc
@@ -47,8 +47,7 @@ public: FileSystemQuotaClientTest() : additional_callback_count_(0), - deletion_status_(blink::mojom::QuotaStatusCode::kUnknown), - weak_factory_(this) {} + deletion_status_(blink::mojom::QuotaStatusCode::kUnknown) {} void SetUp() override { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); @@ -239,7 +238,7 @@ int additional_callback_count_; std::set<url::Origin> origins_; blink::mojom::QuotaStatusCode deletion_status_; - base::WeakPtrFactory<FileSystemQuotaClientTest> weak_factory_; + base::WeakPtrFactory<FileSystemQuotaClientTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemQuotaClientTest); };
diff --git a/storage/browser/fileapi/file_system_usage_cache.cc b/storage/browser/fileapi/file_system_usage_cache.cc index a94d963..c62c12e 100644 --- a/storage/browser/fileapi/file_system_usage_cache.cc +++ b/storage/browser/fileapi/file_system_usage_cache.cc
@@ -25,7 +25,7 @@ } // namespace FileSystemUsageCache::FileSystemUsageCache(bool is_incognito) - : is_incognito_(is_incognito), weak_factory_(this) { + : is_incognito_(is_incognito) { DETACH_FROM_SEQUENCE(sequence_checker_); }
diff --git a/storage/browser/fileapi/file_system_usage_cache.h b/storage/browser/fileapi/file_system_usage_cache.h index cad8a48..a9fa200 100644 --- a/storage/browser/fileapi/file_system_usage_cache.h +++ b/storage/browser/fileapi/file_system_usage_cache.h
@@ -101,7 +101,7 @@ std::map<base::FilePath, std::unique_ptr<base::File>> cache_files_; - base::WeakPtrFactory<FileSystemUsageCache> weak_factory_; + base::WeakPtrFactory<FileSystemUsageCache> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileSystemUsageCache); };
diff --git a/storage/browser/fileapi/file_writer_delegate.cc b/storage/browser/fileapi/file_writer_delegate.cc index 084d406..5d55919 100644 --- a/storage/browser/fileapi/file_writer_delegate.cc +++ b/storage/browser/fileapi/file_writer_delegate.cc
@@ -36,8 +36,8 @@ bytes_written_(0), bytes_read_(0), io_buffer_(base::MakeRefCounted<net::IOBufferWithSize>(kReadBufSize)), - data_pipe_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL), - weak_factory_(this) {} + data_pipe_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL) { +} FileWriterDelegate::~FileWriterDelegate() = default;
diff --git a/storage/browser/fileapi/file_writer_delegate.h b/storage/browser/fileapi/file_writer_delegate.h index c60db4be..4e245e1 100644 --- a/storage/browser/fileapi/file_writer_delegate.h +++ b/storage/browser/fileapi/file_writer_delegate.h
@@ -101,7 +101,7 @@ mojo::ScopedDataPipeConsumerHandle data_pipe_; mojo::SimpleWatcher data_pipe_watcher_; - base::WeakPtrFactory<FileWriterDelegate> weak_factory_; + base::WeakPtrFactory<FileWriterDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(FileWriterDelegate); };
diff --git a/storage/browser/fileapi/local_file_stream_reader.cc b/storage/browser/fileapi/local_file_stream_reader.cc index 5a84940..d06277a4 100644 --- a/storage/browser/fileapi/local_file_stream_reader.cc +++ b/storage/browser/fileapi/local_file_stream_reader.cc
@@ -101,8 +101,7 @@ file_path_(file_path), initial_offset_(initial_offset), expected_modification_time_(expected_modification_time), - has_pending_open_(false), - weak_factory_(this) {} + has_pending_open_(false) {} void LocalFileStreamReader::Open(net::CompletionOnceCallback callback) { DCHECK(!has_pending_open_);
diff --git a/storage/browser/fileapi/local_file_stream_reader.h b/storage/browser/fileapi/local_file_stream_reader.h index bcd5e91..ecd1b493 100644 --- a/storage/browser/fileapi/local_file_stream_reader.h +++ b/storage/browser/fileapi/local_file_stream_reader.h
@@ -77,7 +77,7 @@ const int64_t initial_offset_; const base::Time expected_modification_time_; bool has_pending_open_; - base::WeakPtrFactory<LocalFileStreamReader> weak_factory_; + base::WeakPtrFactory<LocalFileStreamReader> weak_factory_{this}; }; } // namespace storage
diff --git a/storage/browser/fileapi/local_file_stream_writer.cc b/storage/browser/fileapi/local_file_stream_writer.cc index f3ceffd..ed3af07 100644 --- a/storage/browser/fileapi/local_file_stream_writer.cc +++ b/storage/browser/fileapi/local_file_stream_writer.cc
@@ -96,8 +96,7 @@ open_or_create_(open_or_create), initial_offset_(initial_offset), task_runner_(task_runner), - has_pending_operation_(false), - weak_factory_(this) {} + has_pending_operation_(false) {} int LocalFileStreamWriter::InitiateOpen(base::OnceClosure main_operation) { DCHECK(has_pending_operation_);
diff --git a/storage/browser/fileapi/local_file_stream_writer.h b/storage/browser/fileapi/local_file_stream_writer.h index 466b36c8..6e1d832d 100644 --- a/storage/browser/fileapi/local_file_stream_writer.h +++ b/storage/browser/fileapi/local_file_stream_writer.h
@@ -87,7 +87,7 @@ net::CompletionOnceCallback write_callback_; net::CompletionOnceCallback cancel_callback_; - base::WeakPtrFactory<LocalFileStreamWriter> weak_factory_; + base::WeakPtrFactory<LocalFileStreamWriter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(LocalFileStreamWriter); };
diff --git a/storage/browser/fileapi/obfuscated_file_util_memory_delegate.cc b/storage/browser/fileapi/obfuscated_file_util_memory_delegate.cc index 356308d9..19d2fc7 100644 --- a/storage/browser/fileapi/obfuscated_file_util_memory_delegate.cc +++ b/storage/browser/fileapi/obfuscated_file_util_memory_delegate.cc
@@ -55,7 +55,7 @@ ObfuscatedFileUtilMemoryDelegate::ObfuscatedFileUtilMemoryDelegate( const base::FilePath& file_system_directory) - : root_(std::make_unique<Entry>(Entry::kDirectory)), weak_factory_(this) { + : root_(std::make_unique<Entry>(Entry::kDirectory)) { file_system_directory.GetComponents(&root_path_components_); }
diff --git a/storage/browser/fileapi/obfuscated_file_util_memory_delegate.h b/storage/browser/fileapi/obfuscated_file_util_memory_delegate.h index c64200c..1cac768 100644 --- a/storage/browser/fileapi/obfuscated_file_util_memory_delegate.h +++ b/storage/browser/fileapi/obfuscated_file_util_memory_delegate.h
@@ -132,7 +132,7 @@ // The components of root path, kept for faster processing. std::vector<base::FilePath::StringType> root_path_components_; - base::WeakPtrFactory<ObfuscatedFileUtilMemoryDelegate> weak_factory_; + base::WeakPtrFactory<ObfuscatedFileUtilMemoryDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtilMemoryDelegate); };
diff --git a/storage/browser/fileapi/obfuscated_file_util_unittest.cc b/storage/browser/fileapi/obfuscated_file_util_unittest.cc index c49af97..09b3fd6 100644 --- a/storage/browser/fileapi/obfuscated_file_util_unittest.cc +++ b/storage/browser/fileapi/obfuscated_file_util_unittest.cc
@@ -175,8 +175,7 @@ type_(storage::kFileSystemTypeTemporary), sandbox_file_system_(origin_, type_), quota_status_(blink::mojom::QuotaStatusCode::kUnknown), - usage_(-1), - weak_factory_(this) { + usage_(-1) { if (GetParam() == TestMode::kRegular) { is_incognito_ = false; return; @@ -848,7 +847,7 @@ int64_t usage_; storage::MockFileChangeObserver change_observer_; storage::ChangeObserverList change_observers_; - base::WeakPtrFactory<ObfuscatedFileUtilTest> weak_factory_; + base::WeakPtrFactory<ObfuscatedFileUtilTest> weak_factory_{this}; private: DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtilTest);
diff --git a/storage/browser/fileapi/plugin_private_file_system_backend.cc b/storage/browser/fileapi/plugin_private_file_system_backend.cc index bbd94173..81b61d5 100644 --- a/storage/browser/fileapi/plugin_private_file_system_backend.cc +++ b/storage/browser/fileapi/plugin_private_file_system_backend.cc
@@ -103,8 +103,7 @@ file_system_options_(file_system_options), base_path_(profile_path.Append(kFileSystemDirectory) .Append(kPluginPrivateDirectory)), - plugin_map_(new FileSystemIDToPluginMap(file_task_runner)), - weak_factory_(this) { + plugin_map_(new FileSystemIDToPluginMap(file_task_runner)) { file_util_ = std::make_unique<AsyncFileUtilAdapter>(new ObfuscatedFileUtil( special_storage_policy, base_path_, env_override, base::BindRepeating(&FileSystemIDToPluginMap::GetPluginIDForURL,
diff --git a/storage/browser/fileapi/plugin_private_file_system_backend.h b/storage/browser/fileapi/plugin_private_file_system_backend.h index 8fb94aac..79c83c3 100644 --- a/storage/browser/fileapi/plugin_private_file_system_backend.h +++ b/storage/browser/fileapi/plugin_private_file_system_backend.h
@@ -146,7 +146,7 @@ const base::FilePath base_path_; std::unique_ptr<AsyncFileUtil> file_util_; FileSystemIDToPluginMap* plugin_map_; // Owned by file_util_. - base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_; + base::WeakPtrFactory<PluginPrivateFileSystemBackend> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(PluginPrivateFileSystemBackend); };
diff --git a/storage/browser/fileapi/quota/quota_backend_impl.cc b/storage/browser/fileapi/quota/quota_backend_impl.cc index a15dc773..656495d 100644 --- a/storage/browser/fileapi/quota/quota_backend_impl.cc +++ b/storage/browser/fileapi/quota/quota_backend_impl.cc
@@ -29,9 +29,7 @@ : file_task_runner_(file_task_runner), obfuscated_file_util_(obfuscated_file_util), file_system_usage_cache_(file_system_usage_cache), - quota_manager_proxy_(quota_manager_proxy), - weak_ptr_factory_(this) { -} + quota_manager_proxy_(quota_manager_proxy) {} QuotaBackendImpl::~QuotaBackendImpl() = default;
diff --git a/storage/browser/fileapi/quota/quota_backend_impl.h b/storage/browser/fileapi/quota/quota_backend_impl.h index 496a470a..dcbc8be7 100644 --- a/storage/browser/fileapi/quota/quota_backend_impl.h +++ b/storage/browser/fileapi/quota/quota_backend_impl.h
@@ -92,7 +92,7 @@ scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_; - base::WeakPtrFactory<QuotaBackendImpl> weak_ptr_factory_; + base::WeakPtrFactory<QuotaBackendImpl> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaBackendImpl); };
diff --git a/storage/browser/fileapi/quota/quota_reservation.cc b/storage/browser/fileapi/quota/quota_reservation.cc index 56dfa60a..959ff87 100644 --- a/storage/browser/fileapi/quota/quota_reservation.cc +++ b/storage/browser/fileapi/quota/quota_reservation.cc
@@ -75,13 +75,11 @@ return reservation_buffer_->type(); } -QuotaReservation::QuotaReservation( - QuotaReservationBuffer* reservation_buffer) +QuotaReservation::QuotaReservation(QuotaReservationBuffer* reservation_buffer) : client_crashed_(false), running_refresh_request_(false), remaining_quota_(0), - reservation_buffer_(reservation_buffer), - weak_ptr_factory_(this) { + reservation_buffer_(reservation_buffer) { DCHECK(sequence_checker_.CalledOnValidSequence()); }
diff --git a/storage/browser/fileapi/quota/quota_reservation.h b/storage/browser/fileapi/quota/quota_reservation.h index c93b04d..2a5606b 100644 --- a/storage/browser/fileapi/quota/quota_reservation.h +++ b/storage/browser/fileapi/quota/quota_reservation.h
@@ -91,7 +91,7 @@ scoped_refptr<QuotaReservationBuffer> reservation_buffer_; base::SequenceChecker sequence_checker_; - base::WeakPtrFactory<QuotaReservation> weak_ptr_factory_; + base::WeakPtrFactory<QuotaReservation> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaReservation); };
diff --git a/storage/browser/fileapi/quota/quota_reservation_manager.cc b/storage/browser/fileapi/quota/quota_reservation_manager.cc index f948659..7cb0ca5 100644 --- a/storage/browser/fileapi/quota/quota_reservation_manager.cc +++ b/storage/browser/fileapi/quota/quota_reservation_manager.cc
@@ -17,7 +17,7 @@ QuotaReservationManager::QuotaReservationManager( std::unique_ptr<QuotaBackend> backend) - : backend_(std::move(backend)), weak_ptr_factory_(this) { + : backend_(std::move(backend)) { sequence_checker_.DetachFromSequence(); }
diff --git a/storage/browser/fileapi/quota/quota_reservation_manager.h b/storage/browser/fileapi/quota/quota_reservation_manager.h index 3a16ac1..3f243ad 100644 --- a/storage/browser/fileapi/quota/quota_reservation_manager.h +++ b/storage/browser/fileapi/quota/quota_reservation_manager.h
@@ -120,7 +120,7 @@ ReservationBufferByOriginAndType reservation_buffers_; base::SequenceChecker sequence_checker_; - base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_; + base::WeakPtrFactory<QuotaReservationManager> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaReservationManager); };
diff --git a/storage/browser/fileapi/recursive_operation_delegate_unittest.cc b/storage/browser/fileapi/recursive_operation_delegate_unittest.cc index 4c0f63e1..37cc39dd 100644 --- a/storage/browser/fileapi/recursive_operation_delegate_unittest.cc +++ b/storage/browser/fileapi/recursive_operation_delegate_unittest.cc
@@ -47,8 +47,7 @@ StatusCallback callback) : storage::RecursiveOperationDelegate(file_system_context), root_(root), - callback_(std::move(callback)), - weak_factory_(this) {} + callback_(std::move(callback)) {} ~LoggingRecursiveOperation() override = default; const std::vector<LogEntry>& log_entries() const { return log_entries_; } @@ -122,7 +121,7 @@ std::vector<LogEntry> log_entries_; FileSystemURL error_url_; - base::WeakPtrFactory<LoggingRecursiveOperation> weak_factory_; + base::WeakPtrFactory<LoggingRecursiveOperation> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(LoggingRecursiveOperation); };
diff --git a/storage/browser/fileapi/remove_operation_delegate.cc b/storage/browser/fileapi/remove_operation_delegate.cc index aaa5f75..3f925ee 100644 --- a/storage/browser/fileapi/remove_operation_delegate.cc +++ b/storage/browser/fileapi/remove_operation_delegate.cc
@@ -16,8 +16,7 @@ StatusCallback callback) : RecursiveOperationDelegate(file_system_context), url_(url), - callback_(std::move(callback)), - weak_factory_(this) {} + callback_(std::move(callback)) {} RemoveOperationDelegate::~RemoveOperationDelegate() = default;
diff --git a/storage/browser/fileapi/remove_operation_delegate.h b/storage/browser/fileapi/remove_operation_delegate.h index 74319a5e..afd7c45 100644 --- a/storage/browser/fileapi/remove_operation_delegate.h +++ b/storage/browser/fileapi/remove_operation_delegate.h
@@ -37,7 +37,7 @@ #endif FileSystemURL url_; StatusCallback callback_; - base::WeakPtrFactory<RemoveOperationDelegate> weak_factory_; + base::WeakPtrFactory<RemoveOperationDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(RemoveOperationDelegate); };
diff --git a/storage/browser/fileapi/sandbox_file_stream_writer.cc b/storage/browser/fileapi/sandbox_file_stream_writer.cc index cf734fc1..fd018c9 100644 --- a/storage/browser/fileapi/sandbox_file_stream_writer.cc +++ b/storage/browser/fileapi/sandbox_file_stream_writer.cc
@@ -60,8 +60,7 @@ total_bytes_written_(0), allowed_bytes_to_write_(0), has_pending_operation_(false), - default_quota_(std::numeric_limits<int64_t>::max()), - weak_factory_(this) { + default_quota_(std::numeric_limits<int64_t>::max()) { DCHECK(url_.is_valid()); }
diff --git a/storage/browser/fileapi/sandbox_file_stream_writer.h b/storage/browser/fileapi/sandbox_file_stream_writer.h index e8cb6f7..44647fb 100644 --- a/storage/browser/fileapi/sandbox_file_stream_writer.h +++ b/storage/browser/fileapi/sandbox_file_stream_writer.h
@@ -86,7 +86,7 @@ int64_t default_quota_; - base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_; + base::WeakPtrFactory<SandboxFileStreamWriter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SandboxFileStreamWriter); };
diff --git a/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc b/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc index 85570b43..7ff6192f 100644 --- a/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc +++ b/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc
@@ -207,8 +207,7 @@ quota_manager_proxy)))), special_storage_policy_(special_storage_policy), file_system_options_(file_system_options), - is_filesystem_opened_(false), - weak_factory_(this) { + is_filesystem_opened_(false) { // Prepopulate database only if it can run asynchronously (i.e. the current // sequence is not file_task_runner). Usually this is the case but may not // in test code.
diff --git a/storage/browser/fileapi/sandbox_file_system_backend_delegate.h b/storage/browser/fileapi/sandbox_file_system_backend_delegate.h index 93c5b01f..8e8fba4 100644 --- a/storage/browser/fileapi/sandbox_file_system_backend_delegate.h +++ b/storage/browser/fileapi/sandbox_file_system_backend_delegate.h
@@ -267,7 +267,7 @@ base::Time next_release_time_for_open_filesystem_stat_; - base::WeakPtrFactory<SandboxFileSystemBackendDelegate> weak_factory_; + base::WeakPtrFactory<SandboxFileSystemBackendDelegate> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(SandboxFileSystemBackendDelegate); };
diff --git a/storage/common/quota/quota_limit_type.h b/storage/browser/quota/quota_limit_type.h similarity index 70% rename from storage/common/quota/quota_limit_type.h rename to storage/browser/quota/quota_limit_type.h index 67d7791..69ee4fb 100644 --- a/storage/common/quota/quota_limit_type.h +++ b/storage/browser/quota/quota_limit_type.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef STORAGE_COMMON_QUOTA_QUOTA_LIMIT_TYPE_H_ -#define STORAGE_COMMON_QUOTA_QUOTA_LIMIT_TYPE_H_ +#ifndef STORAGE_BROWSER_QUOTA_QUOTA_LIMIT_TYPE_H_ +#define STORAGE_BROWSER_QUOTA_QUOTA_LIMIT_TYPE_H_ namespace storage { @@ -16,4 +16,4 @@ } // namespace storage -#endif // STORAGE_COMMON_QUOTA_QUOTA_LIMIT_TYPE_H_ +#endif // STORAGE_BROWSER_QUOTA_QUOTA_LIMIT_TYPE_H_
diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc index 5414fe1b..883e83b 100644 --- a/storage/browser/quota/quota_manager.cc +++ b/storage/browser/quota/quota_manager.cc
@@ -212,8 +212,7 @@ type_(type), is_unlimited_(is_unlimited), is_session_only_(is_session_only), - is_incognito_(is_incognito), - weak_factory_(this) {} + is_incognito_(is_incognito) {} protected: void Run() override { @@ -361,7 +360,7 @@ SEQUENCE_CHECKER(sequence_checker_); // Weak pointers are used to support cancelling work. - base::WeakPtrFactory<UsageAndQuotaInfoGatherer> weak_factory_; + base::WeakPtrFactory<UsageAndQuotaInfoGatherer> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(UsageAndQuotaInfoGatherer); }; @@ -369,9 +368,7 @@ public: EvictionRoundInfoHelper(QuotaManager* manager, EvictionRoundInfoCallback callback) - : QuotaTask(manager), - callback_(std::move(callback)), - weak_factory_(this) {} + : QuotaTask(manager), callback_(std::move(callback)) {} protected: void Run() override { @@ -457,16 +454,14 @@ int64_t total_space_ = 0; int64_t global_usage_ = 0; bool global_usage_is_complete_ = false; - base::WeakPtrFactory<EvictionRoundInfoHelper> weak_factory_; + base::WeakPtrFactory<EvictionRoundInfoHelper> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(EvictionRoundInfoHelper); }; class QuotaManager::GetUsageInfoTask : public QuotaTask { public: GetUsageInfoTask(QuotaManager* manager, GetUsageInfoCallback callback) - : QuotaTask(manager), - callback_(std::move(callback)), - weak_factory_(this) {} + : QuotaTask(manager), callback_(std::move(callback)) {} protected: void Run() override { @@ -523,7 +518,7 @@ GetUsageInfoCallback callback_; UsageInfoEntries entries_; int remaining_trackers_; - base::WeakPtrFactory<GetUsageInfoTask> weak_factory_; + base::WeakPtrFactory<GetUsageInfoTask> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(GetUsageInfoTask); }; @@ -544,8 +539,7 @@ remaining_clients_(0), skipped_clients_(0), is_eviction_(is_eviction), - callback_(std::move(callback)), - weak_factory_(this) {} + callback_(std::move(callback)) {} protected: void Run() override { @@ -614,7 +608,7 @@ bool is_eviction_; StatusCallback callback_; - base::WeakPtrFactory<OriginDataDeleter> weak_factory_; + base::WeakPtrFactory<OriginDataDeleter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(OriginDataDeleter); }; @@ -632,8 +626,7 @@ error_count_(0), remaining_clients_(0), remaining_deleters_(0), - callback_(std::move(callback)), - weak_factory_(this) {} + callback_(std::move(callback)) {} protected: void Run() override { @@ -711,7 +704,7 @@ size_t remaining_deleters_; StatusCallback callback_; - base::WeakPtrFactory<HostDataDeleter> weak_factory_; + base::WeakPtrFactory<HostDataDeleter> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(HostDataDeleter); }; @@ -724,8 +717,7 @@ : QuotaTask(manager), type_(type), quota_client_mask_(quota_client_mask), - callback_(std::move(callback)), - weak_factory_(this) {} + callback_(std::move(callback)) {} protected: void Run() override { @@ -765,7 +757,7 @@ StorageType type_; int quota_client_mask_; base::OnceClosure callback_; - base::WeakPtrFactory<StorageCleanupHelper> weak_factory_; + base::WeakPtrFactory<StorageCleanupHelper> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(StorageCleanupHelper); }; @@ -897,8 +889,7 @@ get_settings_function_(get_settings_function), is_getting_eviction_origin_(false), special_storage_policy_(std::move(special_storage_policy)), - get_volume_info_fn_(&QuotaManager::GetVolumeInfo), - weak_factory_(this) { + get_volume_info_fn_(&QuotaManager::GetVolumeInfo) { DCHECK_EQ(settings_.refresh_interval, base::TimeDelta::Max()); if (!get_settings_function.is_null()) { // Reset the interval to ensure we use the get_settings_function
diff --git a/storage/browser/quota/quota_manager.h b/storage/browser/quota/quota_manager.h index 2ad77f8..cc4717a 100644 --- a/storage/browser/quota/quota_manager.h +++ b/storage/browser/quota/quota_manager.h
@@ -482,7 +482,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<QuotaManager> weak_factory_; + base::WeakPtrFactory<QuotaManager> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaManager); };
diff --git a/storage/browser/quota/quota_manager_unittest.cc b/storage/browser/quota/quota_manager_unittest.cc index e6ac568d..1c674245 100644 --- a/storage/browser/quota/quota_manager_unittest.cc +++ b/storage/browser/quota/quota_manager_unittest.cc
@@ -87,10 +87,7 @@ using OriginInfoTableEntries = QuotaManager::OriginInfoTableEntries; public: - QuotaManagerTest() - : mock_time_counter_(0), - weak_factory_(this) { - } + QuotaManagerTest() : mock_time_counter_(0) {} void SetUp() override { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); @@ -515,7 +512,7 @@ int mock_time_counter_; - base::WeakPtrFactory<QuotaManagerTest> weak_factory_; + base::WeakPtrFactory<QuotaManagerTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaManagerTest); };
diff --git a/storage/browser/quota/quota_temporary_storage_evictor.cc b/storage/browser/quota/quota_temporary_storage_evictor.cc index ba4076f5..86ef5b9 100644 --- a/storage/browser/quota/quota_temporary_storage_evictor.cc +++ b/storage/browser/quota/quota_temporary_storage_evictor.cc
@@ -45,8 +45,7 @@ int64_t interval_ms) : quota_eviction_handler_(quota_eviction_handler), interval_ms_(interval_ms), - timer_disabled_for_testing_(false), - weak_factory_(this) { + timer_disabled_for_testing_(false) { DCHECK(quota_eviction_handler); }
diff --git a/storage/browser/quota/quota_temporary_storage_evictor.h b/storage/browser/quota/quota_temporary_storage_evictor.h index 09c902b2..451d3dc 100644 --- a/storage/browser/quota/quota_temporary_storage_evictor.h +++ b/storage/browser/quota/quota_temporary_storage_evictor.h
@@ -111,7 +111,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_; + base::WeakPtrFactory<QuotaTemporaryStorageEvictor> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictor); };
diff --git a/storage/browser/quota/quota_temporary_storage_evictor_unittest.cc b/storage/browser/quota/quota_temporary_storage_evictor_unittest.cc index ab7f169..cf5f922 100644 --- a/storage/browser/quota/quota_temporary_storage_evictor_unittest.cc +++ b/storage/browser/quota/quota_temporary_storage_evictor_unittest.cc
@@ -151,8 +151,7 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test { public: QuotaTemporaryStorageEvictorTest() - : num_get_usage_and_quota_for_eviction_(0), - weak_factory_(this) {} + : num_get_usage_and_quota_for_eviction_(0) {} void SetUp() override { quota_eviction_handler_.reset(new MockQuotaEvictionHandler(this)); @@ -219,7 +218,7 @@ std::unique_ptr<MockQuotaEvictionHandler> quota_eviction_handler_; std::unique_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_; int num_get_usage_and_quota_for_eviction_; - base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_; + base::WeakPtrFactory<QuotaTemporaryStorageEvictorTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(QuotaTemporaryStorageEvictorTest); };
diff --git a/storage/browser/quota/usage_tracker.cc b/storage/browser/quota/usage_tracker.cc index 989a9bc..66fcaf08 100644 --- a/storage/browser/quota/usage_tracker.cc +++ b/storage/browser/quota/usage_tracker.cc
@@ -35,7 +35,7 @@ UsageTracker::UsageTracker(const std::vector<QuotaClient*>& clients, blink::mojom::StorageType type, SpecialStoragePolicy* special_storage_policy) - : type_(type), weak_factory_(this) { + : type_(type) { for (auto* client : clients) { if (client->DoesSupport(type)) { client_tracker_map_[client->id()] = std::make_unique<ClientUsageTracker>(
diff --git a/storage/browser/quota/usage_tracker.h b/storage/browser/quota/usage_tracker.h index 18863c15..ee3bb55 100644 --- a/storage/browser/quota/usage_tracker.h +++ b/storage/browser/quota/usage_tracker.h
@@ -107,7 +107,7 @@ SEQUENCE_CHECKER(sequence_checker_); - base::WeakPtrFactory<UsageTracker> weak_factory_; + base::WeakPtrFactory<UsageTracker> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(UsageTracker); };
diff --git a/storage/browser/test/mock_quota_manager.cc b/storage/browser/test/mock_quota_manager.cc index 95310b3..df205cc 100644 --- a/storage/browser/test/mock_quota_manager.cc +++ b/storage/browser/test/mock_quota_manager.cc
@@ -41,8 +41,7 @@ profile_path, std::move(io_thread), std::move(special_storage_policy), - storage::GetQuotaSettingsFunc()), - weak_factory_(this) {} + storage::GetQuotaSettingsFunc()) {} void MockQuotaManager::GetUsageAndQuota(const url::Origin& origin, StorageType type,
diff --git a/storage/browser/test/mock_quota_manager.h b/storage/browser/test/mock_quota_manager.h index f196ab1..927154c 100644 --- a/storage/browser/test/mock_quota_manager.h +++ b/storage/browser/test/mock_quota_manager.h
@@ -140,7 +140,7 @@ std::vector<OriginInfo> origins_; std::map<std::pair<url::Origin, StorageType>, StorageInfo> usage_and_quota_map_; - base::WeakPtrFactory<MockQuotaManager> weak_factory_; + base::WeakPtrFactory<MockQuotaManager> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MockQuotaManager); };
diff --git a/storage/browser/test/mock_quota_manager_unittest.cc b/storage/browser/test/mock_quota_manager_unittest.cc index d1e4d37c..94e83fd 100644 --- a/storage/browser/test/mock_quota_manager_unittest.cc +++ b/storage/browser/test/mock_quota_manager_unittest.cc
@@ -39,10 +39,7 @@ class MockQuotaManagerTest : public testing::Test { public: - MockQuotaManagerTest() - : deletion_callback_count_(0), - weak_factory_(this) { - } + MockQuotaManagerTest() : deletion_callback_count_(0) {} void SetUp() override { ASSERT_TRUE(data_dir_.CreateUniqueTempDir()); @@ -110,7 +107,7 @@ std::set<url::Origin> origins_; StorageType type_; - base::WeakPtrFactory<MockQuotaManagerTest> weak_factory_; + base::WeakPtrFactory<MockQuotaManagerTest> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MockQuotaManagerTest); };
diff --git a/storage/browser/test/mock_storage_client.cc b/storage/browser/test/mock_storage_client.cc index a5e7c37b..0ee280d 100644 --- a/storage/browser/test/mock_storage_client.cc +++ b/storage/browser/test/mock_storage_client.cc
@@ -20,13 +20,13 @@ using std::make_pair; -MockStorageClient::MockStorageClient( - QuotaManagerProxy* quota_manager_proxy, - const MockOriginData* mock_data, QuotaClient::ID id, size_t mock_data_size) +MockStorageClient::MockStorageClient(QuotaManagerProxy* quota_manager_proxy, + const MockOriginData* mock_data, + QuotaClient::ID id, + size_t mock_data_size) : quota_manager_proxy_(quota_manager_proxy), id_(id), - mock_time_counter_(0), - weak_factory_(this) { + mock_time_counter_(0) { Populate(mock_data, mock_data_size); }
diff --git a/storage/browser/test/mock_storage_client.h b/storage/browser/test/mock_storage_client.h index eb677c130..94d7b44 100644 --- a/storage/browser/test/mock_storage_client.h +++ b/storage/browser/test/mock_storage_client.h
@@ -97,7 +97,7 @@ int mock_time_counter_; - base::WeakPtrFactory<MockStorageClient> weak_factory_; + base::WeakPtrFactory<MockStorageClient> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(MockStorageClient); };
diff --git a/storage/common/BUILD.gn b/storage/common/BUILD.gn index 5168f01..3d55d197 100644 --- a/storage/common/BUILD.gn +++ b/storage/common/BUILD.gn
@@ -7,10 +7,6 @@ component("common") { output_name = "storage_common" sources = [ - "blob_storage/blob_handle.cc", - "blob_storage/blob_handle.h", - "blob_storage/blob_storage_constants.cc", - "blob_storage/blob_storage_constants.h", "database/database_connections.cc", "database/database_connections.h", "database/database_identifier.cc", @@ -18,11 +14,9 @@ "fileapi/file_system_info.cc", "fileapi/file_system_info.h", "fileapi/file_system_mount_option.h", - "fileapi/file_system_type_converters.h", "fileapi/file_system_types.h", "fileapi/file_system_util.cc", "fileapi/file_system_util.h", - "quota/quota_limit_type.h", "storage_histograms.cc", "storage_histograms.h", ]
diff --git a/storage/common/fileapi/file_system_type_converters.h b/storage/common/fileapi/file_system_type_converters.h deleted file mode 100644 index 88965e2..0000000 --- a/storage/common/fileapi/file_system_type_converters.h +++ /dev/null
@@ -1,98 +0,0 @@ -// 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. - -#ifndef STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_ -#define STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_ - -#include "storage/common/fileapi/file_system_info.h" -#include "storage/common/fileapi/file_system_types.h" -#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h" - -namespace mojo { - -template <> -struct TypeConverter<blink::mojom::FileSystemType, storage::FileSystemType> { - static blink::mojom::FileSystemType Convert( - const storage::FileSystemType& type) { - switch (type) { - case storage::FileSystemType::kFileSystemTypeTemporary: - return blink::mojom::FileSystemType::kTemporary; - case storage::FileSystemType::kFileSystemTypePersistent: - return blink::mojom::FileSystemType::kPersistent; - case storage::FileSystemType::kFileSystemTypeIsolated: - return blink::mojom::FileSystemType::kIsolated; - case storage::FileSystemType::kFileSystemTypeExternal: - return blink::mojom::FileSystemType::kExternal; - // Internal enum types - case storage::FileSystemType::kFileSystemTypeUnknown: - case storage::FileSystemType::kFileSystemInternalTypeEnumStart: - case storage::FileSystemType::kFileSystemTypeTest: - case storage::FileSystemType::kFileSystemTypeNativeLocal: - case storage::FileSystemType::kFileSystemTypeRestrictedNativeLocal: - case storage::FileSystemType::kFileSystemTypeDragged: - case storage::FileSystemType::kFileSystemTypeNativeMedia: - case storage::FileSystemType::kFileSystemTypeDeviceMedia: - case storage::FileSystemType::kFileSystemTypeDrive: - case storage::FileSystemType::kFileSystemTypeSyncable: - case storage::FileSystemType::kFileSystemTypeSyncableForInternalSync: - case storage::FileSystemType::kFileSystemTypeNativeForPlatformApp: - case storage::FileSystemType::kFileSystemTypeForTransientFile: - case storage::FileSystemType::kFileSystemTypePluginPrivate: - case storage::FileSystemType::kFileSystemTypeCloudDevice: - case storage::FileSystemType::kFileSystemTypeProvided: - case storage::FileSystemType::kFileSystemTypeDeviceMediaAsFileStorage: - case storage::FileSystemType::kFileSystemTypeArcContent: - case storage::FileSystemType::kFileSystemTypeArcDocumentsProvider: - case storage::FileSystemType::kFileSystemTypeDriveFs: - case storage::FileSystemType::kFileSystemInternalTypeEnumEnd: - NOTREACHED(); - return blink::mojom::FileSystemType::kTemporary; - } - NOTREACHED(); - return blink::mojom::FileSystemType::kTemporary; - } -}; - -template <> -struct TypeConverter<storage::FileSystemType, blink::mojom::FileSystemType> { - static storage::FileSystemType Convert( - const blink::mojom::FileSystemType& type) { - switch (type) { - case blink::mojom::FileSystemType::kTemporary: - return storage::FileSystemType::kFileSystemTypeTemporary; - case blink::mojom::FileSystemType::kPersistent: - return storage::FileSystemType::kFileSystemTypePersistent; - case blink::mojom::FileSystemType::kIsolated: - return storage::FileSystemType::kFileSystemTypeIsolated; - case blink::mojom::FileSystemType::kExternal: - return storage::FileSystemType::kFileSystemTypeExternal; - } - NOTREACHED(); - return storage::FileSystemType::kFileSystemTypeTemporary; - } -}; - -template <> -struct TypeConverter<blink::mojom::FileSystemInfoPtr, storage::FileSystemInfo> { - static blink::mojom::FileSystemInfoPtr Convert( - const storage::FileSystemInfo& info) { - return blink::mojom::FileSystemInfo::New( - info.name, info.root_url, - mojo::ConvertTo<blink::mojom::FileSystemType>(info.mount_type)); - } -}; - -template <> -struct TypeConverter<storage::FileSystemInfo, blink::mojom::FileSystemInfoPtr> { - static storage::FileSystemInfo Convert( - const blink::mojom::FileSystemInfoPtr& info) { - return storage::FileSystemInfo( - info->name, info->root_url, - mojo::ConvertTo<storage::FileSystemType>(info->mount_type)); - } -}; - -} // namespace mojo - -#endif // STORAGE_COMMON_FILEAPI_FILE_SYSTEM_TYPE_CONVERTERS_H_
diff --git a/storage/common/quota/OWNERS b/storage/common/quota/OWNERS deleted file mode 100644 index c5fd619..0000000 --- a/storage/common/quota/OWNERS +++ /dev/null
@@ -1,9 +0,0 @@ -# TEAM: storage-dev@chromium.org -# COMPONENT: Blink>Storage>Quota - -per-file *.mojom=file://ipc/SECURITY_OWNERS -per-file *.mojom=set noparent -per-file *.typemap=file://ipc/SECURITY_OWNERS -per-file *.typemap=set noparent -per-file *_struct_traits*.*=file://ipc/SECURITY_OWNERS -per-file *_struct_traits*.*=set noparent
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 7c4635b9..36d87d7d 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -1394,7 +1394,7 @@ "name": "shard #${SHARD_INDEX} logcats" } ], - "shards": 5 + "shards": 10 }, "test": "content_browsertests" },
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 811f99d..ad1eb50 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -2972,6 +2972,35 @@ } ] }, + "Android FYI 64 Perf (Pixel 2)": { + "isolated_scripts": [ + { + "args": [ + "--gtest-benchmark-name=angle_perftests", + "-v", + "--shard-timeout=600" + ], + "isolate_name": "angle_perftests", + "merge": { + "script": "//tools/perf/process_perf_results.py" + }, + "name": "angle_perftests", + "swarming": { + "can_use_on_swarming_builders": true, + "containment_type": "AUTO", + "dimension_sets": [ + { + "device_os": "Q", + "device_os_type": "userdebug", + "device_type": "walleye", + "os": "Android", + "pool": "Chrome-GPU" + } + ] + } + } + ] + }, "Android FYI 64 Vk Release (Pixel 2)": { "additional_compile_targets": [ "angle_apks" @@ -7602,207 +7631,10 @@ ] }, "Linux FYI Experimental Release (Intel HD 630)": { - "gtest_tests": [ - { - "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "shards": 4 - }, - "test": "angle_end2end_tests" - }, - { - "args": [ - "--use-gpu-in-tests", - "--test-launcher-retry-limit=0", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "angle_unittests" - }, - { - "args": [ - "--test-launcher-retry-limit=0" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "angle_white_box_tests" - }, - { - "args": [ - "--enable-gpu", - "--test-launcher-bot-mode", - "--test-launcher-jobs=1", - "--test-launcher-filter-file=../../testing/buildbot/filters/vulkan.content_browsertests.filter", - "--enable-features=VizDisplayCompositor,UseSkiaRenderer,UiGpuRasterization", - "--use-vulkan=native", - "--enable-oop-rasterization", - "--enable-gpu-rasterization", - "--force-gpu-rasterization", - "--disable-software-compositing-fallback", - "--disable-vulkan-fallback-to-gl-for-testing", - "--disable-headless-mode", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "name": "vulkan_content_browsertests", - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "content_browsertests" - }, - { - "args": [ - "--use-gpu-in-tests", - "--use-cmd-decoder=validating" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "gl_tests" - }, - { - "args": [ - "--use-gpu-in-tests", - "--no-xvfb" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "gl_unittests" - }, - { - "args": [ - "--use-gpu-in-tests" - ], - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "gles2_conform_test" - }, - { - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600 - }, - "test": "swiftshader_unittests" - } - ], "isolated_scripts": [ { "args": [ - "context_lost", + "noop_sleep", "--show-stdout", "--browser=release", "--passthrough", @@ -7814,7 +7646,7 @@ "args": [], "script": "//testing/merge_scripts/standard_isolated_script_merge.py" }, - "name": "context_lost_tests", + "name": "noop_sleep_tests", "should_retry_with_patch": false, "swarming": { "can_use_on_swarming_builders": true, @@ -7829,402 +7661,6 @@ "expiration": 21600, "idempotent": false } - }, - { - "args": [ - "depth_capture", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "depth_capture_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "gpu_process", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "gpu_process_launch_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "hardware_accelerated_feature", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "hardware_accelerated_feature_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "info_collection", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", - "--expected-vendor-id", - "8086", - "--expected-device-id", - "5912" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "info_collection_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "maps", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", - "--dont-restore-color-profile-after-test", - "--os-type", - "linux", - "--build-revision", - "${got_revision}", - "--test-machine-name", - "${buildername}" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "maps_pixel_test", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "pixel", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", - "--dont-restore-color-profile-after-test", - "--os-type", - "linux", - "--build-revision", - "${got_revision}", - "--test-machine-name", - "${buildername}" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "pixel_skia_gold_test", - "precommit_args": [ - "--review-patch-issue", - "${patch_issue}", - "--review-patch-set", - "${patch_set}", - "--buildbucket-build-id", - "${buildbucket_build_id}" - ], - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false, - "service_account": "chrome-gpu-gold@chops-service-accounts.iam.gserviceaccount.com" - } - }, - { - "args": [ - "screenshot_sync", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", - "--dont-restore-color-profile-after-test" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "screenshot_sync_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "trace_test", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "trace_test", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false - } - }, - { - "args": [ - "webgl_conformance", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle --use-angle=gl --use-cmd-decoder=passthrough", - "--webgl-conformance-version=2.0.1", - "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "webgl2_conformance_gl_passthrough_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false, - "shards": 20 - } - }, - { - "args": [ - "webgl_conformance", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc", - "--webgl-conformance-version=2.0.1", - "--read-abbreviated-json-results-from=../../content/test/data/gpu/webgl2_conformance_tests_output.json" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "webgl2_conformance_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false, - "shards": 20 - } - }, - { - "args": [ - "webgl_conformance", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc --use-gl=angle --use-angle=gl --use-cmd-decoder=passthrough" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "webgl_conformance_gl_passthrough_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false, - "shards": 2 - } - }, - { - "args": [ - "webgl_conformance", - "--show-stdout", - "--browser=release", - "--passthrough", - "-v", - "--extra-browser-args=--enable-logging=stderr --js-flags=--expose-gc" - ], - "isolate_name": "telemetry_gpu_integration_test", - "merge": { - "args": [], - "script": "//testing/merge_scripts/standard_isolated_script_merge.py" - }, - "name": "webgl_conformance_tests", - "should_retry_with_patch": false, - "swarming": { - "can_use_on_swarming_builders": true, - "containment_type": "AUTO", - "dimension_sets": [ - { - "gpu": "8086:5912-19.0.2", - "os": "Ubuntu-19.04", - "pool": "Chrome-GPU" - } - ], - "expiration": 21600, - "idempotent": false, - "shards": 2 - } } ] }, @@ -27670,7 +27106,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "shards": 4 }, "test": "angle_end2end_tests" @@ -27693,7 +27129,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "angle_gles1_conformance_tests" }, @@ -27717,7 +27153,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "angle_unittests" }, @@ -27740,7 +27176,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "angle_white_box_tests" }, @@ -27766,7 +27202,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "browser_tests" }, @@ -27789,7 +27225,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gl_tests" }, @@ -27813,7 +27249,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gl_tests" }, @@ -27835,7 +27271,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gl_unittests" }, @@ -27857,7 +27293,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gles2_conform_test" }, @@ -27881,7 +27317,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gles2_conform_test" }, @@ -27906,7 +27342,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gles2_conform_test" }, @@ -27925,7 +27361,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "gpu_unittests" }, @@ -27944,7 +27380,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "swiftshader_unittests" }, @@ -27969,7 +27405,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "video_decode_accelerator_unittest" }, @@ -27994,7 +27430,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "video_decode_accelerator_unittest" }, @@ -28017,7 +27453,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 }, "test": "xr_browser_tests" } @@ -28047,7 +27483,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 } }, { @@ -28076,7 +27512,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28106,7 +27542,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28136,7 +27572,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28166,7 +27602,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28200,7 +27636,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28237,7 +27673,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28282,7 +27718,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "service_account": "chrome-gpu-gold@chops-service-accounts.iam.gserviceaccount.com" } @@ -28313,7 +27749,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28340,7 +27776,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800 + "expiration": 14400 } }, { @@ -28370,7 +27806,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28400,7 +27836,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false } }, @@ -28432,7 +27868,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 20 } @@ -28465,7 +27901,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 20 } @@ -28498,7 +27934,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 20 } @@ -28529,7 +27965,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 2 } @@ -28560,7 +27996,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 2 } @@ -28591,7 +28027,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 2 } @@ -28622,7 +28058,7 @@ "pool": "Chrome-GPU" } ], - "expiration": 10800, + "expiration": 14400, "idempotent": false, "shards": 2 }
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json index bddf0d3..9f42e7d 100644 --- a/testing/buildbot/chromium.linux.json +++ b/testing/buildbot/chromium.linux.json
@@ -1993,6 +1993,25 @@ "test": "service_manager_unittests" }, { + "args": [ + "--test-launcher-filter-file=../../testing/buildbot/filters/fuchsia.services_unittests.filter" + ], + "merge": { + "args": [], + "script": "//testing/merge_scripts/standard_gtest_merge.py" + }, + "swarming": { + "can_use_on_swarming_builders": true, + "dimension_sets": [ + { + "kvm": "1", + "os": "Ubuntu-16.04" + } + ] + }, + "test": "services_unittests" + }, + { "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py"
diff --git a/testing/buildbot/filters/bfcache.browser_tests.filter b/testing/buildbot/filters/bfcache.browser_tests.filter index 9d1ba54..a7398fb 100644 --- a/testing/buildbot/filters/bfcache.browser_tests.filter +++ b/testing/buildbot/filters/bfcache.browser_tests.filter
@@ -44,3 +44,11 @@ -TabManagerTest.TabFreezeAndMakeVisible -TabManagerTest.TabFreezeAndUnfreeze -TabManagerTest.TabFreezeAndUrgentDiscard + +# An extension is non-idle because its option page is opened. When it is +# navigated to about:blank, it should become idle again. This doesn't happen +# with the BackForwardCache, because the old page is still there. +-ExtensionCrxInstallerTest.InstallDelayedUntilNextUpdate + +# Very flaky. Can't reproduce locally, it always succeed. +-SystemNetworkContextManagerMaxConnectionsPerProxyBrowsertest.MaxConnectionsPerProxy
diff --git a/testing/buildbot/filters/bfcache.content_browsertests.filter b/testing/buildbot/filters/bfcache.content_browsertests.filter index 2ad2b8ac6..7c3ee33 100644 --- a/testing/buildbot/filters/bfcache.content_browsertests.filter +++ b/testing/buildbot/filters/bfcache.content_browsertests.filter
@@ -128,3 +128,9 @@ # A frozen page failed to execute Javascript. # See https://crbug.com/991194 -WebContentsImplBrowserTest.SetPageFrozen + +# Check failed: popup_ || pepper_fullscreen_ in RenderWidget::OnClose() +# https://crbug.com/992891 +-WebContentsSplitCacheBrowserTestEnabled.SplitCacheDedicatedWorkerScripts/1 +-WebContentsSplitCacheBrowserTestEnabled.SplitCacheDedicatedWorkerScripts/0 +
diff --git a/testing/buildbot/mixins.pyl b/testing/buildbot/mixins.pyl index 5ee6810..7ccb1a6 100644 --- a/testing/buildbot/mixins.pyl +++ b/testing/buildbot/mixins.pyl
@@ -600,11 +600,11 @@ 'pool': 'Chrome-GPU', }, # ~50% of the WebGL2 conformance tests time out with the default - # 1 hour expiration, so use 3 times that until more devices are - # available. + # 1 hour expiration, but the last shard times out with a 3 hour + # expiration, so use 4 hours. # TODO(https://crbug.com/986939): Remove this when more devices # are added. - 'expiration': 10800, + 'expiration': 14400, }, }, 'win10_nvidia_geforce_gtx_1660': {
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 08f2783..e30d126 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -1087,6 +1087,13 @@ 'Lollipop Tablet Tester', 'Marshmallow Tablet Tester', ], + 'modifications': { + 'android-pie-x86-fyi-rel': { + 'swarming': { + 'shards': 10, + }, + }, + }, }, 'network_service_out_of_process_content_shell_test_apk': { 'remove_from': [ @@ -1386,8 +1393,6 @@ # chromium.gpu.fyi # The face and barcode detection tests fail on the Mac Pros. 'Mac Pro FYI Release (AMD)', - # chromium.linux - 'Fuchsia x64', # chromium.memory 'Linux ChromiumOS MSan Tests', # https://crbug.com/831676 'Linux MSan Tests', # https://crbug.com/831676 @@ -1446,7 +1451,6 @@ 'Win10 FYI x64 Debug (NVIDIA)', 'Win7 FYI Debug (AMD)', # Disabled due to dbus crashes crbug.com/927465 - 'Linux FYI Experimental Release (Intel HD 630)', 'Linux FYI Release (Intel HD 630)', 'Linux FYI Release (NVIDIA)', 'Linux FYI SkiaRenderer Vulkan (Intel HD 630)',
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index fdf5330..b019f75 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -3150,9 +3150,25 @@ }, }, + # Actually uploads results to the perf dashboard + 'gpu_angle_perf_isolated_scripts': { + 'angle_perftests': { + 'args': [ + '--gtest-benchmark-name=angle_perftests', + '-v', + ], + 'android_args': [ + '--shard-timeout=600', + ], + 'merge': { + 'script': '//tools/perf/process_perf_results.py', + }, + }, + }, + # The angle perf tests should eventually be run on every platform # ANGLE supports. Currently they run on Windows, Linux and Android. - 'gpu_angle_perf_isolated_scripts': { + 'gpu_angle_perf_smoke_isolated_scripts': { 'angle_perftests': { 'args': [ '--gtest-benchmark-name=angle_perftests', @@ -3165,6 +3181,7 @@ ], 'merge': { 'script': '//tools/perf/process_perf_results.py', + # Does not upload to the perf dashboard 'args': [ '--smoke-test-mode', ], @@ -5001,12 +5018,12 @@ # BEGIN composition test suites used by the GPU bots 'gpu_angle_and_desktop_representative_perf_fyi_isolated_scripts': [ - 'gpu_angle_perf_isolated_scripts', + 'gpu_angle_perf_smoke_isolated_scripts', 'rendering_desktop_representative_perf_tests_isolated_scripts', ], 'gpu_angle_and_mobile_representative_perf_fyi_isolated_scripts': [ - 'gpu_angle_perf_isolated_scripts', + 'gpu_angle_perf_smoke_isolated_scripts', 'rendering_mobile_representative_perf_tests_isolated_scripts', ], @@ -5069,14 +5086,14 @@ ], 'gpu_angle_fyi_win_optional_and_representative_perf_isolated_scripts': [ - 'gpu_angle_perf_isolated_scripts', + 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_command_buffer_perf_passthrough_isolated_scripts', 'gpu_command_buffer_perf_validating_isolated_scripts', 'rendering_desktop_representative_perf_tests_isolated_scripts', ], 'gpu_angle_fyi_win_optional_isolated_scripts': [ - 'gpu_angle_perf_isolated_scripts', + 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_command_buffer_perf_passthrough_isolated_scripts', 'gpu_command_buffer_perf_validating_isolated_scripts', ], @@ -5116,8 +5133,8 @@ 'gpu_webgl_conformance_telemetry_tests', ], - 'gpu_angle_perf_isolated_scripts_and_test_buildbucket_api_gpu_use_cases': [ - 'gpu_angle_perf_isolated_scripts', + 'gpu_angle_perf_smoke_isolated_scripts_and_test_buildbucket_api_gpu_use_cases': [ + 'gpu_angle_perf_smoke_isolated_scripts', 'test_buildbucket_api_gpu_use_cases', ],
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 5c8d2ae..9db8255c 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -2252,7 +2252,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_webgl_conformance_gles_passthrough_telemetry_tests', }, }, @@ -2264,7 +2264,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_linux_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_angle_linux_telemetry_tests', }, }, @@ -2276,7 +2276,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_linux_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_angle_linux_telemetry_tests', }, }, @@ -2321,7 +2321,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_win_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_angle_win_intel_telemetry_tests', }, }, @@ -2351,7 +2351,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', }, }, 'Android FYI 32 dEQP Vk Release (Pixel 2)': { @@ -2366,6 +2366,17 @@ 'gtest_tests': 'gpu_angle_deqp_android_vulkan_gtests', }, }, + 'Android FYI 64 Perf (Pixel 2)': { + 'os_type': 'android', + 'mixins': [ + 'gpu_pool', + 'android_q', + 'walleye', + ], + 'test_suites': { + 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + }, + }, 'Android FYI 64 Vk Release (Pixel 2)': { 'os_type': 'android', 'skip_merge_script': True, @@ -2379,7 +2390,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_angle_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', }, }, 'Android FYI 64 dEQP Vk Release (Pixel 2)': { @@ -2405,7 +2416,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_android_and_mac_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_common_telemetry_tests', }, }, @@ -2449,7 +2460,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_android_and_mac_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_common_telemetry_tests', }, }, @@ -2464,7 +2475,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_android_and_mac_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_common_telemetry_tests', }, }, @@ -2479,7 +2490,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_android_and_mac_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_common_telemetry_tests', }, }, @@ -2560,10 +2571,12 @@ 'limited_capacity_bot', 'linux_intel_hd_630_experimental', ], + # Currently the experimental driver is identical to the stable + # driver. If it's upgraded, change these test_suites to be the same as + # 'Linux FYI Release (Intel HD 630)'. 'test_suites': { - 'gtest_tests': 'gpu_fyi_linux_release_gtests', - 'gpu_telemetry_tests': 'gpu_fyi_linux_intel_and_nvidia_release_telemetry_tests', - } + 'gpu_telemetry_tests': 'gpu_noop_sleep_telemetry_test', + }, }, 'Linux FYI Experimental Release (NVIDIA)': { 'os_type': 'linux', @@ -2590,7 +2603,7 @@ # This bot doesn't run any browser-based tests # (tab_capture_end2end_tests) either. 'gtest_tests': 'gpu_fyi_linux_debug_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', }, }, 'Linux FYI Ozone (Intel)': { @@ -2638,7 +2651,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_linux_release_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_fyi_linux_intel_and_nvidia_release_telemetry_tests', }, }, @@ -2921,7 +2934,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_linux_optional_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts_and_test_buildbucket_api_gpu_use_cases', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts_and_test_buildbucket_api_gpu_use_cases', 'gpu_telemetry_tests': 'gpu_fyi_optional_linux_telemetry_tests', }, }, @@ -2967,7 +2980,7 @@ ], 'test_suites': { 'gtest_tests': 'gpu_fyi_win_optional_gtests', - 'isolated_scripts': 'gpu_angle_perf_isolated_scripts', + 'isolated_scripts': 'gpu_angle_perf_smoke_isolated_scripts', 'gpu_telemetry_tests': 'gpu_optional_win_intel_telemetry_tests', }, },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 401cf53c..342fe5e 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -92,6 +92,33 @@ ] } ], + "AddToHomescreenMessaging": [ + { + "platforms": [ + "android" + ], + "experiments": [ + { + "name": "InstallApp", + "params": { + "include_no_download_required": "false" + }, + "enable_features": [ + "AddToHomescreenMessaging" + ] + }, + { + "name": "InstallAppNoDownloadRequired", + "params": { + "include_no_download_required": "true" + }, + "enable_features": [ + "AddToHomescreenMessaging" + ] + } + ] + } + ], "AllowClientHintsToThirdParty": [ { "platforms": [ @@ -3071,7 +3098,7 @@ ], "experiments": [ { - "name": "EnabledTaskPolicy", + "name": "Enabled", "enable_features": [ "MacAllowBackgroundingProcesses" ]
diff --git a/third_party/blink/public/mojom/content_index/content_index.mojom b/third_party/blink/public/mojom/content_index/content_index.mojom index 4407c74..ef9db11d 100644 --- a/third_party/blink/public/mojom/content_index/content_index.mojom +++ b/third_party/blink/public/mojom/content_index/content_index.mojom
@@ -6,6 +6,7 @@ import "skia/public/mojom/bitmap.mojom"; import "url/mojom/url.mojom"; +import "ui/gfx/geometry/mojom/geometry.mojom"; // As per https://github.com/rknoll/content-index. @@ -52,6 +53,9 @@ interface ContentIndexService { const int32 kMaxIconResolution = 65536; // 256x256 + // Returns how many icons are needed and their sizes (in pixels). + GetIconSizes(ContentCategory category) => (array<gfx.mojom.Size> icon_sizes); + Add(int64 service_worker_registration_id, ContentDescription description, array<skia.mojom.Bitmap> icon,
diff --git a/third_party/blink/public/mojom/web_feature/web_feature.mojom b/third_party/blink/public/mojom/web_feature/web_feature.mojom index 4a9a8da..af4ac6e 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -2375,6 +2375,8 @@ kContactsManagerSelect = 2993, kV8MediaSession_SetPositionState_Method = 2994, kCSSValueOverflowOverlay = 2995, + kRequestedFileSystemTemporary = 2996, + kRequestedFileSystemPersistent = 2997, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/platform/web_rtc_rtp_source.h b/third_party/blink/public/platform/web_rtc_rtp_source.h index 3e052ce..f90acbd 100644 --- a/third_party/blink/public/platform/web_rtc_rtp_source.h +++ b/third_party/blink/public/platform/web_rtc_rtp_source.h
@@ -8,6 +8,10 @@ #include "base/optional.h" #include "third_party/blink/public/platform/web_common.h" +namespace base { +class TimeTicks; +} + namespace blink { // Represents both SSRCs and CSRCs. @@ -23,7 +27,7 @@ virtual ~WebRTCRtpSource(); virtual Type SourceType() const = 0; - virtual double TimestampMs() const = 0; + virtual base::TimeTicks Timestamp() const = 0; virtual uint32_t Source() const = 0; virtual base::Optional<double> AudioLevel() const = 0; virtual uint32_t RtpTimestamp() const = 0;
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index 5cfc6eb..0b68d07 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -87,9 +87,13 @@ BLINK_PLATFORM_EXPORT static void EnableBlockingFocusWithoutUserActivation( bool); BLINK_PLATFORM_EXPORT static void EnableCacheInlineScriptCode(bool); + BLINK_PLATFORM_EXPORT static void EnableCookieDeprecationMessages(bool); + BLINK_PLATFORM_EXPORT static void EnableCookiesWithoutSameSiteMustBeSecure( + bool); BLINK_PLATFORM_EXPORT static void EnableWasmCodeCache(bool); BLINK_PLATFORM_EXPORT static void EnableCanvas2dImageChromium(bool); BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool); + BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool); BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool); BLINK_PLATFORM_EXPORT static void EnableKeyboardFocusableScrollers(bool); BLINK_PLATFORM_EXPORT static void EnableDatabase(bool);
diff --git a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h index f9b3d3e..c89e6e9 100644 --- a/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h +++ b/third_party/blink/public/web/modules/mediastream/media_stream_constraints_util_sets.h
@@ -390,10 +390,20 @@ static ResolutionSet FromConstraintSet( const WebMediaTrackConstraintSet& constraint_set); + private: + FRIEND_TEST_ALL_PREFIXES(MediaStreamConstraintsUtilSetsTest, + ResolutionPointSetClosestPoint); + FRIEND_TEST_ALL_PREFIXES(MediaStreamConstraintsUtilSetsTest, + ResolutionLineSetClosestPoint); + FRIEND_TEST_ALL_PREFIXES(MediaStreamConstraintsUtilSetsTest, + ResolutionGeneralSetClosestPoint); + FRIEND_TEST_ALL_PREFIXES(MediaStreamConstraintsUtilSetsTest, + ResolutionIdealOutsideSinglePoint); + FRIEND_TEST_ALL_PREFIXES(MediaStreamConstraintsUtilSetsTest, + ResolutionVertices); + // Returns the closest point in this set to |point|. If |point| is included in // this set, Point is returned. If this set is empty, behavior is undefined. - // TODO(crbug.com/704136): Make this method private once dependent tests are - // moved to Blink. Point ClosestPointTo(const Point& point) const; // Returns a list of the vertices defined by the constraints on a height-width @@ -407,8 +417,6 @@ // consecutive vertices (modulo the size of the list) corresponds to a side of // the polygon, with the vertices given in counterclockwise order. // The list cannot contain more than six points. - // TODO(crbug.com/704136): Make this method private once dependent tests are - // moved to Blink. std::vector<Point> ComputeVertices() const; private:
diff --git a/third_party/blink/public/web/modules/mediastream/mock_media_stream_video_sink.h b/third_party/blink/public/web/modules/mediastream/mock_media_stream_video_sink.h index 75c42b7..42f4e05 100644 --- a/third_party/blink/public/web/modules/mediastream/mock_media_stream_video_sink.h +++ b/third_party/blink/public/web/modules/mediastream/mock_media_stream_video_sink.h
@@ -57,7 +57,7 @@ WebMediaStreamSource::ReadyState state_; gfx::Size frame_size_; scoped_refptr<media::VideoFrame> last_frame_; - base::WeakPtrFactory<MockMediaStreamVideoSink> weak_factory_; + base::WeakPtrFactory<MockMediaStreamVideoSink> weak_factory_{this}; }; } // namespace blink
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc index 2cdc9f97..13496ca 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_embedder_graph_builder.cc
@@ -423,7 +423,7 @@ void V8EmbedderGraphBuilder::BuildEmbedderGraph() { isolate_->VisitHandlesWithClassIds(this); v8::EmbedderHeapTracer* const tracer = static_cast<v8::EmbedderHeapTracer*>( - ThreadState::Current()->unified_heap_controller()); + Visitor::State()->unified_heap_controller()); tracer->IterateTracedGlobalHandles(this); // At this point we collected ScriptWrappables in three groups: // attached, detached, and unknown. @@ -638,7 +638,7 @@ std::unique_ptr<Graph::Node>(new EmbedderRootNode("Blink roots")))); EnsureRootState(root); ParentScope parent(this, root); - ThreadState::Current()->GetPersistentRegion()->TracePersistentNodes(this); + Visitor::State()->GetPersistentRegion()->TracePersistentNodes(this); } { EmbedderNode* root = @@ -647,7 +647,8 @@ EnsureRootState(root); ParentScope parent(this, root); MutexLocker persistent_lock(ProcessHeap::CrossThreadPersistentMutex()); - ProcessHeap::GetCrossThreadPersistentRegion().TracePersistentNodes(this); + Visitor::State()->GetCrossThreadPersistentRegion()->TracePersistentNodes( + this); } }
diff --git a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn index 5e9befa..4adf793e2 100644 --- a/third_party/blink/renderer/bindings/modules/v8/BUILD.gn +++ b/third_party/blink/renderer/bindings/modules/v8/BUILD.gn
@@ -125,6 +125,7 @@ ":bindings_modules_origin_trial_features", ":bindings_modules_v8_generated", ":generate_mojo_bindings", + "//third_party/blink/renderer/modules/mediarecorder:buildflags", "//third_party/dawn/src/dawn:dawn_headers", ]
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn index 2ec75f7..eb6b50a 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn
@@ -1362,6 +1362,7 @@ "layout/ng/inline/ng_baseline_test.cc", "layout/ng/inline/ng_caret_position_test.cc", "layout/ng/inline/ng_fragment_item_test.cc", + "layout/ng/inline/ng_inline_cursor_test.cc", "layout/ng/inline/ng_inline_fragment_traversal_test.cc", "layout/ng/inline/ng_inline_items_builder_test.cc", "layout/ng/inline/ng_inline_layout_algorithm_test.cc",
diff --git a/third_party/blink/renderer/core/animation/effect_stack.cc b/third_party/blink/renderer/core/animation/effect_stack.cc index 8f8d8b4e..27f9f233 100644 --- a/third_party/blink/renderer/core/animation/effect_stack.cc +++ b/third_party/blink/renderer/core/animation/effect_stack.cc
@@ -48,19 +48,25 @@ PropertyHandle property = interpolation->GetProperty(); if (property_handle_filter && !property_handle_filter(property)) continue; + ActiveInterpolationsMap::AddResult entry = - target.insert(property, ActiveInterpolations(1)); + target.insert(property, ActiveInterpolations()); ActiveInterpolations& active_interpolations = entry.stored_value->value; - if (!entry.is_new_entry && - (RuntimeEnabledFeatures::StackedCSSPropertyAnimationsEnabled() || - !property.IsCSSProperty() || property.IsPresentationAttribute()) && + + // Assuming stacked effects are enabled, interpolations that depend on + // underlying values (e.g. have a non-replace composite mode) should be + // added onto the 'stack' of active interpolations. However any 'replace' + // effect erases everything that came before it, so we must clear the stack + // when that happens. + const bool allow_stacked_effects = + RuntimeEnabledFeatures::StackedCSSPropertyAnimationsEnabled() || + !property.IsCSSProperty() || property.IsPresentationAttribute(); + const bool effect_depends_on_underlying_value = interpolation->IsInvalidatableInterpolation() && - ToInvalidatableInterpolation(*interpolation) - .DependsOnUnderlyingValue()) { - active_interpolations.push_back(interpolation); - } else { - active_interpolations.at(0) = interpolation; - } + ToInvalidatableInterpolation(*interpolation).DependsOnUnderlyingValue(); + if (!allow_stacked_effects || !effect_depends_on_underlying_value) + active_interpolations.clear(); + active_interpolations.push_back(interpolation); } }
diff --git a/third_party/blink/renderer/core/css/css_default_style_sheets.cc b/third_party/blink/renderer/core/css/css_default_style_sheets.cc index fcab6adc..2a2805a 100644 --- a/third_party/blink/renderer/core/css/css_default_style_sheets.cc +++ b/third_party/blink/renderer/core/css/css_default_style_sheets.cc
@@ -185,6 +185,8 @@ ParseUASheet(UncompressResourceAsASCIIString(IDR_UASTYLE_SVG_CSS)); default_style_->AddRulesFromSheet(SvgStyleSheet(), ScreenEval()); default_print_style_->AddRulesFromSheet(SvgStyleSheet(), PrintEval()); + default_forced_color_style_->AddRulesFromSheet(SvgStyleSheet(), + ForcedColorsEval()); changed_default_style = true; }
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index 275835a8..ac4a680 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -1677,6 +1677,7 @@ setter: "SetFillPaint", getter: "FillPaint", converter: "ConvertSVGPaint", + affected_by_forced_colors: true, }, { name: "fill-opacity", @@ -3023,6 +3024,7 @@ setter: "SetStrokePaint", getter: "StrokePaint", converter: "ConvertSVGPaint", + affected_by_forced_colors: true, }, { name: "stroke-dasharray", @@ -3174,6 +3176,7 @@ typedom_types: ["Keyword"], converter: "ConvertStyleColor", style_builder_template: "color", + affected_by_forced_colors: true, }, { name: "text-decoration-line", @@ -3959,6 +3962,7 @@ computed_style_custom_functions: ["getter", "setter"], converter: "ConvertStyleColor", style_builder_template: "color", + affected_by_forced_colors: true, }, { name: "-webkit-text-emphasis-position",
diff --git a/third_party/blink/renderer/core/css/resolver/style_resolver.cc b/third_party/blink/renderer/core/css/resolver/style_resolver.cc index 583152f..dc68bf3 100644 --- a/third_party/blink/renderer/core/css/resolver/style_resolver.cc +++ b/third_party/blink/renderer/core/css/resolver/style_resolver.cc
@@ -1699,12 +1699,17 @@ ApplyProperty(GetCSSPropertyBorderRightColor(), state, *unset, apply_mask); ApplyProperty(GetCSSPropertyBorderTopColor(), state, *unset, apply_mask); ApplyProperty(GetCSSPropertyBoxShadow(), state, *unset, apply_mask); - ApplyProperty(GetCSSPropertyOutlineColor(), state, *unset, apply_mask); - ApplyProperty(GetCSSPropertyTextShadow(), state, *unset, apply_mask); ApplyProperty(GetCSSPropertyColumnRuleColor(), state, *unset, apply_mask); + ApplyProperty(GetCSSPropertyFill(), state, *unset, apply_mask); + ApplyProperty(GetCSSPropertyOutlineColor(), state, *unset, apply_mask); + ApplyProperty(GetCSSPropertyStroke(), state, *unset, apply_mask); + ApplyProperty(GetCSSPropertyTextDecorationColor(), state, *unset, + apply_mask); + ApplyProperty(GetCSSPropertyTextShadow(), state, *unset, apply_mask); ApplyProperty(GetCSSPropertyWebkitTapHighlightColor(), state, *unset, apply_mask); - ApplyProperty(GetCSSPropertyOutlineColor(), state, *unset, apply_mask); + ApplyProperty(GetCSSPropertyWebkitTextEmphasisColor(), state, *unset, + apply_mask); } auto force_colors = ForcedColorFilter::kEnabled;
diff --git a/third_party/blink/renderer/core/css/svg.css b/third_party/blink/renderer/core/css/svg.css index ce01fef..7c8ccba 100644 --- a/third_party/blink/renderer/core/css/svg.css +++ b/third_party/blink/renderer/core/css/svg.css
@@ -89,3 +89,18 @@ foreignObject { -internal-effective-zoom: initial !important; } + +/* + This is added as to not break SVG content in forced colors mode: + https://drafts.csswg.org/css-color-adjust-1/#forced-colors-properties +*/ +@media forced-colors { + svg { + forced-color-adjust: none; + } + + text, foreignObject { + fill: WindowText; + forced-color-adjust: auto; + } +}
diff --git a/third_party/blink/renderer/core/display_lock/display_lock_context.cc b/third_party/blink/renderer/core/display_lock/display_lock_context.cc index 2578121..3e884e5 100644 --- a/third_party/blink/renderer/core/display_lock/display_lock_context.cc +++ b/third_party/blink/renderer/core/display_lock/display_lock_context.cc
@@ -154,19 +154,13 @@ ? options->timeout() : kDefaultLockTimeoutMs; - if (IsLocked()) { - // If we're locked, the activatable flag might change the activation - // blocking lock count. If we're not locked, the activation blocking lock - // count will be updated when we changed the state. - state_.UpdateActivationBlockingCount(activatable_, - options && options->activatable()); - } - activatable_ = options && options->activatable(); + // We always reschedule a timeout task even if we're not starting a new + // acquire. The reason for this is that the last acquire dictates the timeout + // interval. Note that the following call cancels any existing timeout tasks. + RescheduleTimeoutTask(timeout_ms); - // If we're acquiring something that isn't currently locked, we need to recalc - // the layout size. Otherwise if we're re-acquiring, we only need to recalc if - // the locked size has changed. - bool should_recalc_layout_size = !IsLocked(); + // We need to recalc if the locked size has changed. + bool should_recalc_layout_size = false; if (options && options->hasSize()) { auto parsed_size = ParseAndVerifySize(options->size()); if (!parsed_size) @@ -181,11 +175,6 @@ locked_content_logical_size_ = LayoutSize(); } - // We always reschedule a timeout task even if we're not starting a new - // acquire. The reason for this is that the last acquire dictates the timeout - // interval. Note that the following call cancels any existing timeout tasks. - RescheduleTimeoutTask(timeout_ms); - if (should_recalc_layout_size && ConnectedToView()) { if (auto* layout_object = element_->GetLayoutObject()) { layout_object->SetNeedsLayoutAndPrefWidthsRecalc( @@ -194,6 +183,8 @@ ScheduleAnimation(); } + SetActivatable(options && options->activatable()); + if (acquire_resolver_) return acquire_resolver_->Promise(); @@ -209,39 +200,60 @@ // property is false). FinishCommitResolver(kResolve); + StartAcquire(); + + // If we're not connected, resolve immediately. + if (!ConnectedToView()) + return GetResolvedPromise(script_state); + + MakeResolver(script_state, &acquire_resolver_); + return acquire_resolver_->Promise(); +} + +void DisplayLockContext::SetActivatable(bool activatable) { + if (IsLocked()) { + // If we're locked, the activatable flag might change the activation + // blocking lock count. If we're not locked, the activation blocking lock + // count will be updated when we changed the state. + state_.UpdateActivationBlockingCount(activatable_, activatable); + } + activatable_ = activatable; +} + +void DisplayLockContext::StartAcquire() { + DCHECK(!IsLocked()); update_budget_.reset(); state_ = kLocked; // If we're already connected then we need to ensure that we update our style // to check for containment later, layout size based on the options, and // also clear the painted output. - if (ConnectedToView()) { - element_->SetNeedsStyleRecalc( - kLocalStyleChange, - StyleChangeReasonForTracing::Create(style_change_reason::kDisplayLock)); - MakeResolver(script_state, &acquire_resolver_); + if (!ConnectedToView()) + return; + + element_->SetNeedsStyleRecalc( + kLocalStyleChange, + StyleChangeReasonForTracing::Create(style_change_reason::kDisplayLock)); + ScheduleAnimation(); + + auto* layout_object = element_->GetLayoutObject(); + if (!layout_object) { is_horizontal_writing_mode_ = true; - if (auto* layout_object = element_->GetLayoutObject()) { - is_horizontal_writing_mode_ = layout_object->IsHorizontalWritingMode(); - // GraphicsLayer collection would normally skip layers if paint is blocked - // by display-locking (see: CollectDrawableLayersForLayerListRecursively - // in LocalFrameView). However, if we don't trigger this collection, then - // we might use the cached result instead. In order to ensure we skip the - // newly locked layers, we need to set |need_graphics_layer_collection_| - // before marking the layer for repaint. - needs_graphics_layer_collection_ = true; - MarkPaintLayerNeedsRepaint(); - } - // TODO(vmpstr): This needs to be set after invalidation above, since we - // want the object to layout once. After the changes to separate self and - // child layout, this would no longer be required and we can set the - // container as locked earlier. - state_ = kLocked; - return acquire_resolver_->Promise(); + return; } - // Otherwise (if we're not connected), resolve immediately. - return GetResolvedPromise(script_state); + layout_object->SetNeedsLayoutAndPrefWidthsRecalc( + layout_invalidation_reason::kDisplayLock); + + is_horizontal_writing_mode_ = layout_object->IsHorizontalWritingMode(); + // GraphicsLayer collection would normally skip layers if paint is blocked + // by display-locking (see: CollectDrawableLayersForLayerListRecursively + // in LocalFrameView). However, if we don't trigger this collection, then + // we might use the cached result instead. In order to ensure we skip the + // newly locked layers, we need to set |need_graphics_layer_collection_| + // before marking the layer for repaint. + needs_graphics_layer_collection_ = true; + MarkPaintLayerNeedsRepaint(); } ScriptPromise DisplayLockContext::update(ScriptState* script_state) { @@ -517,6 +529,10 @@ DCHECK(ConnectedToView()); DCHECK(ShouldCommitForActivation()); StartCommit(); + // Since setting the attribute might trigger a commit if we are still locked, + // we set it after we start the commit. + if (element_->hasAttribute(html_names::kRendersubtreeAttr)) + element_->setAttribute(html_names::kRendersubtreeAttr, "visible"); } bool DisplayLockContext::ShouldCommitForActivation() const { @@ -555,6 +571,7 @@ } void DisplayLockContext::StartCommit() { + DCHECK(IsLocked()); // Since we are starting a commit, cancel the timeout task. CancelTimeoutTask(); if (CleanupAndRejectCommitIfNotConnected())
diff --git a/third_party/blink/renderer/core/display_lock/display_lock_context.h b/third_party/blink/renderer/core/display_lock/display_lock_context.h index 2617a07..cf7e198 100644 --- a/third_party/blink/renderer/core/display_lock/display_lock_context.h +++ b/third_party/blink/renderer/core/display_lock/display_lock_context.h
@@ -103,6 +103,13 @@ ScriptPromise commit(ScriptState*); ScriptPromise updateAndCommit(ScriptState*); + void SetActivatable(bool activatable); + + // Acquire the lock, should only be called when unlocked. + void StartAcquire(); + // Initiate a commit. + void StartCommit(); + enum LifecycleTarget { kSelf, kChildren }; // Lifecycle observation / state functions. @@ -217,8 +224,6 @@ UntracedMember<DisplayLockContext> context_; }; - // Initiate a commit. - void StartCommit(); // Initiate an update. void StartUpdateIfNeeded();
diff --git a/third_party/blink/renderer/core/dom/element.cc b/third_party/blink/renderer/core/dom/element.cc index ceda072..8274888 100644 --- a/third_party/blink/renderer/core/dom/element.cc +++ b/third_party/blink/renderer/core/dom/element.cc
@@ -973,6 +973,13 @@ return 0; } +PaintLayerScrollableArea* Element::GetScrollableArea() const { + LayoutBox* box = GetLayoutBox(); + if (!box || !box->HasOverflowClip()) + return nullptr; + return box->GetScrollableArea(); +} + double Element::scrollLeft() { if (!InActiveDocument()) return 0; @@ -985,8 +992,10 @@ return 0; } - if (LayoutBox* box = GetLayoutBox()) { - return AdjustForAbsoluteZoom::AdjustScroll(box->ScrollLeft(), *box); + if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { + DCHECK(GetLayoutBox()); + return AdjustForAbsoluteZoom::AdjustScroll( + scrollable_area->ScrollPosition().X(), *GetLayoutBox()); } return 0; @@ -1004,8 +1013,10 @@ return 0; } - if (LayoutBox* box = GetLayoutBox()) { - return AdjustForAbsoluteZoom::AdjustScroll(box->ScrollTop(), *box); + if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { + DCHECK(GetLayoutBox()); + return AdjustForAbsoluteZoom::AdjustScroll( + scrollable_area->ScrollPosition().Y(), *GetLayoutBox()); } return 0; @@ -1025,13 +1036,11 @@ options->setLeft(new_left); window->scrollTo(options); } - } else { + } else if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { LayoutBox* box = GetLayoutBox(); - if (!box) - return; - + DCHECK(box); FloatPoint end_point(new_left * box->Style()->EffectiveZoom(), - box->ScrollTop().ToFloat()); + scrollable_area->ScrollPosition().Y()); std::unique_ptr<cc::SnapSelectionStrategy> strategy = cc::SnapSelectionStrategy::CreateForEndPosition( gfx::ScrollOffset(end_point), true, false); @@ -1039,7 +1048,11 @@ .GetSnapCoordinator() ->GetSnapPosition(*box, *strategy) .value_or(end_point); - box->SetScrollLeft(LayoutUnit::FromFloatRound(end_point.X())); + + FloatPoint new_position(end_point.X(), + scrollable_area->ScrollPosition().Y()); + scrollable_area->ScrollToAbsolutePosition(new_position, + kScrollBehaviorAuto); } } @@ -1057,12 +1070,10 @@ options->setTop(new_top); window->scrollTo(options); } - } else { + } else if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { LayoutBox* box = GetLayoutBox(); - if (!box) - return; - - FloatPoint end_point(box->ScrollLeft().ToFloat(), + DCHECK(box); + FloatPoint end_point(scrollable_area->ScrollPosition().X(), new_top * box->Style()->EffectiveZoom()); std::unique_ptr<cc::SnapSelectionStrategy> strategy = cc::SnapSelectionStrategy::CreateForEndPosition( @@ -1071,7 +1082,10 @@ .GetSnapCoordinator() ->GetSnapPosition(*box, *strategy) .value_or(end_point); - box->SetScrollTop(LayoutUnit::FromFloatRound(end_point.Y())); + FloatPoint new_position(scrollable_area->ScrollPosition().X(), + end_point.Y()); + scrollable_area->ScrollToAbsolutePosition(new_position, + kScrollBehaviorAuto); } } @@ -1177,10 +1191,11 @@ ScrollBehavior scroll_behavior = kScrollBehaviorAuto; ScrollableArea::ScrollBehaviorFromString(scroll_to_options->behavior(), scroll_behavior); - LayoutBox* box = GetLayoutBox(); - if (box) { - gfx::ScrollOffset current_position(box->ScrollLeft().ToFloat(), - box->ScrollTop().ToFloat()); + if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { + LayoutBox* box = GetLayoutBox(); + DCHECK(box); + gfx::ScrollOffset current_position(scrollable_area->ScrollPosition().X(), + scrollable_area->ScrollPosition().Y()); displacement.Scale(box->Style()->EffectiveZoom()); gfx::ScrollOffset new_offset(current_position + displacement); FloatPoint new_position(new_offset.x(), new_offset.y()); @@ -1192,7 +1207,7 @@ .GetSnapCoordinator() ->GetSnapPosition(*box, *strategy) .value_or(new_position); - box->ScrollToPosition(new_position, scroll_behavior); + scrollable_area->ScrollToAbsolutePosition(new_position, scroll_behavior); } } @@ -1201,10 +1216,11 @@ ScrollableArea::ScrollBehaviorFromString(scroll_to_options->behavior(), scroll_behavior); - LayoutBox* box = GetLayoutBox(); - if (box) { - FloatPoint new_position(box->ScrollLeft().ToFloat(), - box->ScrollTop().ToFloat()); + if (PaintLayerScrollableArea* scrollable_area = GetScrollableArea()) { + LayoutBox* box = GetLayoutBox(); + DCHECK(box); + FloatPoint new_position(scrollable_area->ScrollPosition().X(), + scrollable_area->ScrollPosition().Y()); if (scroll_to_options->hasLeft()) { new_position.SetX( ScrollableArea::NormalizeNonFiniteScroll(scroll_to_options->left()) * @@ -1224,7 +1240,7 @@ .GetSnapCoordinator() ->GetSnapPosition(*box, *strategy) .value_or(new_position); - box->ScrollToPosition(new_position, scroll_behavior); + scrollable_area->ScrollToAbsolutePosition(new_position, scroll_behavior); } } @@ -1911,6 +1927,24 @@ name == html_names::kInvisibleAttr && params.old_value != params.new_value) { InvisibleAttributeChanged(params.old_value, params.new_value); + } else if (RuntimeEnabledFeatures::DisplayLockingEnabled() && + name == html_names::kRendersubtreeAttr && + params.old_value != params.new_value) { + const bool should_be_invisible = + EqualIgnoringASCIICase(params.new_value, "invisible"); + const bool should_be_invisible_activatable = + EqualIgnoringASCIICase(params.new_value, "invisible-activatable"); + if (should_be_invisible || should_be_invisible_activatable) { + // Getting locked. + EnsureDisplayLockContext().SetActivatable( + should_be_invisible_activatable); + if (!GetDisplayLockContext()->IsLocked()) + GetDisplayLockContext()->StartAcquire(); + } else { + // Getting unlocked. + if (EnsureDisplayLockContext().IsLocked()) + GetDisplayLockContext()->StartCommit(); + } } } @@ -4113,6 +4147,11 @@ : nullptr; } +DisplayLockContext& Element::EnsureDisplayLockContext() { + return *EnsureElementRareData().EnsureDisplayLockContext( + this, GetExecutionContext()); +} + // Step 1 of http://domparsing.spec.whatwg.org/#insertadjacenthtml() static Element* ContextElementForInsertion(const String& where, Element* element,
diff --git a/third_party/blink/renderer/core/dom/element.h b/third_party/blink/renderer/core/dom/element.h index 7177784..6f0cb78 100644 --- a/third_party/blink/renderer/core/dom/element.h +++ b/third_party/blink/renderer/core/dom/element.h
@@ -324,6 +324,9 @@ virtual void scrollBy(const ScrollToOptions*); void scrollTo(double x, double y); virtual void scrollTo(const ScrollToOptions*); + // This will return the |GetScrollableArea| of correspond LayoutBox. For + // LayoutTextControlSingleLine, it will return its |InnerEditorElement|'s. + virtual PaintLayerScrollableArea* GetScrollableArea() const; IntRect BoundsInViewport() const; // Returns an intersection rectangle of the bounds rectangle and the visual @@ -908,6 +911,7 @@ DisplayLockContext* getDisplayLockForBindings(); DisplayLockContext* GetDisplayLockContext() const; + DisplayLockContext& EnsureDisplayLockContext(); bool StyleRecalcBlockedByDisplayLock( DisplayLockContext::LifecycleTarget) const;
diff --git a/third_party/blink/renderer/core/dom/element.idl b/third_party/blink/renderer/core/dom/element.idl index a6ea0464..a823cf7c 100644 --- a/third_party/blink/renderer/core/dom/element.idl +++ b/third_party/blink/renderer/core/dom/element.idl
@@ -144,6 +144,8 @@ // Display locking. Returns a display lock context. [RuntimeEnabled=DisplayLocking, ImplementedAs=getDisplayLockForBindings] readonly attribute DisplayLockContext displayLock; + // Declarative display locking. + [RuntimeEnabled=DisplayLocking, CEReactions, CustomElementCallbacks, Reflect, ReflectOnly=("invisible-activatable","invisible", "visible"), ReflectInvalid="visible", ReflectEmpty="visible"] attribute DOMString renderSubtree; // Element Timing [RuntimeEnabled=ElementTiming, Affects=Nothing, CEReactions, Reflect=elementtiming] attribute DOMString elementTiming;
diff --git a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc index a0a0a43b..ed94e01 100644 --- a/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc +++ b/third_party/blink/renderer/core/editing/commands/delete_selection_command.cc
@@ -114,9 +114,9 @@ // For HRs, we'll get a position at (HR,1) when hitting delete from the // beginning of the previous line, or (HR,0) when forward deleting, but in // these cases, we want to delete it, so manually expand the selection - if (IsHTMLHRElement(*start.AnchorNode())) + if (IsA<HTMLHRElement>(*start.AnchorNode())) start = Position::BeforeNode(*start.AnchorNode()); - else if (IsHTMLHRElement(*end.AnchorNode())) + else if (IsA<HTMLHRElement>(*end.AnchorNode())) end = Position::AfterNode(*end.AnchorNode()); // FIXME: This is only used so that moveParagraphs can avoid the bugs in
diff --git a/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc b/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc index edc26d5..af34ccc 100644 --- a/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc +++ b/third_party/blink/renderer/core/editing/commands/insert_line_break_command.cc
@@ -104,7 +104,7 @@ if (IsEndOfParagraph(CreateVisiblePosition(caret.ToPositionWithAffinity())) && !LineBreakExistsAtVisiblePosition(caret)) { - bool need_extra_line_break = !IsHTMLHRElement(*pos.AnchorNode()) && + bool need_extra_line_break = !IsA<HTMLHRElement>(*pos.AnchorNode()) && !IsHTMLTableElement(*pos.AnchorNode()); InsertNodeAt(node_to_insert, pos, editing_state);
diff --git a/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc b/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc index 305e7f7..43386672 100644 --- a/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc +++ b/third_party/blink/renderer/core/editing/commands/insert_paragraph_separator_command.cc
@@ -225,7 +225,7 @@ || (!canonical_pos.IsNull() && IsDisplayInsideTable(canonical_pos.AnchorNode())) || (!canonical_pos.IsNull() && - IsHTMLHRElement(*canonical_pos.AnchorNode()))) { + IsA<HTMLHRElement>(*canonical_pos.AnchorNode()))) { ApplyCommandToComposite( MakeGarbageCollected<InsertLineBreakCommand>(GetDocument()), editing_state);
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 382039e3..8be58c3 100644 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -143,6 +143,7 @@ #include "third_party/blink/renderer/core/paint/first_meaningful_paint_detector.h" #include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" #include "third_party/blink/renderer/core/paint/paint_timing_detector.h" +#include "third_party/blink/renderer/core/probe/core_probes.h" #include "third_party/blink/renderer/core/scroll/scrollbar_theme.h" #include "third_party/blink/renderer/core/timing/dom_window_performance.h" #include "third_party/blink/renderer/core/timing/window_performance.h" @@ -1534,6 +1535,8 @@ MainFrameImpl()->GetFrame()->View()->EnsureUkmAggregator().RecordSample( LocalFrameUkmAggregator::kUpdateLayers, update_layers_start_time_.value(), base::TimeTicks::Now()); + if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) + probe::LayerTreeDidChange(MainFrameImpl()->GetFrame()); } update_layers_start_time_.reset(); }
diff --git a/third_party/blink/renderer/core/frame/visual_viewport.cc b/third_party/blink/renderer/core/frame/visual_viewport.cc index 824136e..1abd92c 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport.cc +++ b/third_party/blink/renderer/core/frame/visual_viewport.cc
@@ -36,6 +36,7 @@ #include "cc/layers/picture_layer.h" #include "cc/layers/scrollbar_layer_interface.h" #include "third_party/blink/public/platform/task_type.h" +#include "third_party/blink/public/platform/web_scroll_into_view_params.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_client.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" @@ -46,8 +47,10 @@ #include "third_party/blink/renderer/core/fullscreen/fullscreen.h" #include "third_party/blink/renderer/core/input/event_handler.h" #include "third_party/blink/renderer/core/inspector/identifiers_factory.h" +#include "third_party/blink/renderer/core/layout/layout_box.h" #include "third_party/blink/renderer/core/page/chrome_client.h" #include "third_party/blink/renderer/core/page/page.h" +#include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h" #include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h" #include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" #include "third_party/blink/renderer/core/paint/paint_property_tree_builder.h" @@ -55,6 +58,7 @@ #include "third_party/blink/renderer/core/scroll/scroll_animator_base.h" #include "third_party/blink/renderer/core/scroll/scrollbar.h" #include "third_party/blink/renderer/core/scroll/scrollbar_theme_overlay.h" +#include "third_party/blink/renderer/core/scroll/smooth_scroll_sequencer.h" #include "third_party/blink/renderer/platform/geometry/double_rect.h" #include "third_party/blink/renderer/platform/geometry/float_size.h" #include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h" @@ -813,6 +817,32 @@ scroll_behavior, std::move(on_finish)); } +PhysicalRect VisualViewport::ScrollIntoView( + const PhysicalRect& rect_in_absolute, + const WebScrollIntoViewParams& params) { + PhysicalRect scroll_snapport_rect = VisibleScrollSnapportRect(); + + ScrollOffset new_scroll_offset = + ClampScrollOffset(ScrollAlignment::GetScrollOffsetToExpose( + scroll_snapport_rect, rect_in_absolute, params.GetScrollAlignmentX(), + params.GetScrollAlignmentY(), GetScrollOffset())); + + if (new_scroll_offset != GetScrollOffset()) { + ScrollBehavior behavior = params.GetScrollBehavior(); + if (params.is_for_scroll_sequence) { + DCHECK(params.GetScrollType() == kProgrammaticScroll || + params.GetScrollType() == kUserScroll); + GetSmoothScrollSequencer()->QueueAnimation(this, new_scroll_offset, + behavior); + } else { + SetScrollOffset(new_scroll_offset, params.GetScrollType(), behavior, + ScrollCallback()); + } + } + + return rect_in_absolute; +} + int VisualViewport::ScrollSize(ScrollbarOrientation orientation) const { IntSize scroll_dimensions = MaximumScrollOffsetInt() - MinimumScrollOffsetInt();
diff --git a/third_party/blink/renderer/core/frame/visual_viewport.h b/third_party/blink/renderer/core/frame/visual_viewport.h index 2406019a..924a9636 100644 --- a/third_party/blink/renderer/core/frame/visual_viewport.h +++ b/third_party/blink/renderer/core/frame/visual_viewport.h
@@ -190,6 +190,8 @@ ScrollType, ScrollBehavior, ScrollCallback on_finish) override; + PhysicalRect ScrollIntoView(const PhysicalRect&, + const WebScrollIntoViewParams&) override; bool IsThrottled() const override { // VisualViewport is always in the main frame, so the frame does not get // throttled.
diff --git a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc index edb297f..566ecf3 100644 --- a/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc +++ b/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
@@ -81,6 +81,7 @@ #include "third_party/blink/renderer/core/page/pointer_lock_controller.h" #include "third_party/blink/renderer/core/page/validation_message_client.h" #include "third_party/blink/renderer/core/paint/compositing/paint_layer_compositor.h" +#include "third_party/blink/renderer/core/probe/core_probes.h" #include "third_party/blink/renderer/platform/graphics/color.h" #include "third_party/blink/renderer/platform/keyboard_codes.h" @@ -317,6 +318,8 @@ LocalRootImpl()->GetFrame()->View()->EnsureUkmAggregator().RecordSample( LocalFrameUkmAggregator::kUpdateLayers, update_layers_start_time_.value(), base::TimeTicks::Now()); + if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) + probe::LayerTreeDidChange(LocalRootImpl()->GetFrame()); } update_layers_start_time_.reset(); }
diff --git a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc index e95dd3bd..ae3bf862 100644 --- a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc +++ b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.cc
@@ -88,7 +88,7 @@ auto response_callback = WTF::Bind(&ExternalDateTimeChooser::ResponseHandler, WrapPersistent(this)); - GetDateTimeChooser(frame)->OpenDateTimeDialog( + GetDateTimeChooser(frame).OpenDateTimeDialog( std::move(date_time_dialog_value), std::move(response_callback)); } @@ -105,11 +105,15 @@ return client_; } -mojom::blink::DateTimeChooser* ExternalDateTimeChooser::GetDateTimeChooser( +mojom::blink::DateTimeChooser& ExternalDateTimeChooser::GetDateTimeChooser( LocalFrame* frame) { - if (!date_time_chooser_) - frame->GetInterfaceProvider().GetInterface(&date_time_chooser_); - return date_time_chooser_.get(); + if (!date_time_chooser_) { + frame->GetInterfaceProvider().GetInterface( + date_time_chooser_.BindNewPipeAndPassReceiver()); + } + + DCHECK(date_time_chooser_); + return *date_time_chooser_.get(); } void ExternalDateTimeChooser::DidChooseValue(double value) {
diff --git a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.h b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.h index 3ded679..ae2a001 100644 --- a/third_party/blink/renderer/core/html/forms/external_date_time_chooser.h +++ b/third_party/blink/renderer/core/html/forms/external_date_time_chooser.h
@@ -26,6 +26,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_EXTERNAL_DATE_TIME_CHOOSER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_FORMS_EXTERNAL_DATE_TIME_CHOOSER_H_ +#include "mojo/public/cpp/bindings/remote.h" #include "third_party/blink/public/mojom/choosers/date_time_chooser.mojom-blink.h" #include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/core/html/forms/date_time_chooser.h" @@ -58,9 +59,9 @@ void EndChooser() override; AXObject* RootAXObject() override; - mojom::blink::DateTimeChooser* GetDateTimeChooser(LocalFrame* frame); + mojom::blink::DateTimeChooser& GetDateTimeChooser(LocalFrame* frame); - mojom::blink::DateTimeChooserPtr date_time_chooser_; + mojo::Remote<mojom::blink::DateTimeChooser> date_time_chooser_; Member<DateTimeChooserClient> client_; };
diff --git a/third_party/blink/renderer/core/html/forms/external_popup_menu.cc b/third_party/blink/renderer/core/html/forms/external_popup_menu.cc index 8d0e81e..d58f665 100644 --- a/third_party/blink/renderer/core/html/forms/external_popup_menu.cc +++ b/third_party/blink/renderer/core/html/forms/external_popup_menu.cc
@@ -252,7 +252,7 @@ popup_item.label = owner_element.ItemText(item_element); popup_item.tool_tip = item_element.title(); popup_item.checked = false; - if (IsHTMLHRElement(item_element)) { + if (IsA<HTMLHRElement>(item_element)) { popup_item.type = WebMenuItemInfo::kSeparator; } else if (IsHTMLOptGroupElement(item_element)) { popup_item.type = WebMenuItemInfo::kGroup;
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.cc b/third_party/blink/renderer/core/html/forms/html_input_element.cc index 974f1a6..48ddafcf 100644 --- a/third_party/blink/renderer/core/html/forms/html_input_element.cc +++ b/third_party/blink/renderer/core/html/forms/html_input_element.cc
@@ -1987,4 +1987,13 @@ ContainerNode::ChildrenChanged(change); } +PaintLayerScrollableArea* HTMLInputElement::GetScrollableArea() const { + // If it's LayoutTextControlSingleLine, return InnerEditorElement's scrollable + // area. + if (IsTextField() && InnerEditorElement()) + return InnerEditorElement()->GetScrollableArea(); + + return Element::GetScrollableArea(); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/html/forms/html_input_element.h b/third_party/blink/renderer/core/html/forms/html_input_element.h index 33e9225..bd0c4d2d 100644 --- a/third_party/blink/renderer/core/html/forms/html_input_element.h +++ b/third_party/blink/renderer/core/html/forms/html_input_element.h
@@ -311,6 +311,8 @@ void ChildrenChanged(const ChildrenChange&) override; + PaintLayerScrollableArea* GetScrollableArea() const final; + protected: void DefaultEventHandler(Event&) override; void CreateShadowSubtree();
diff --git a/third_party/blink/renderer/core/html/forms/html_select_element.cc b/third_party/blink/renderer/core/html/forms/html_select_element.cc index 869f8a0..e3165bd 100644 --- a/third_party/blink/renderer/core/html/forms/html_select_element.cc +++ b/third_party/blink/renderer/core/html/forms/html_select_element.cc
@@ -784,7 +784,7 @@ if (IsHTMLOptionElement(*current_html_element)) list_items_.push_back(current_html_element); - if (IsHTMLHRElement(*current_html_element)) + if (IsA<HTMLHRElement>(*current_html_element)) list_items_.push_back(current_html_element); // In conforming HTML code, only <optgroup> and <option> will be found
diff --git a/third_party/blink/renderer/core/html/html_attribute_names.json5 b/third_party/blink/renderer/core/html/html_attribute_names.json5 index a7e30885..794d8664 100644 --- a/third_party/blink/renderer/core/html/html_attribute_names.json5 +++ b/third_party/blink/renderer/core/html/html_attribute_names.json5
@@ -274,6 +274,7 @@ "preload", "pseudo", "readonly", + "rendersubtree", "referrerpolicy", "rel", "required",
diff --git a/third_party/blink/renderer/core/input/scroll_snap_test.cc b/third_party/blink/renderer/core/input/scroll_snap_test.cc index b9f78b1..a044260 100644 --- a/third_party/blink/renderer/core/input/scroll_snap_test.cc +++ b/third_party/blink/renderer/core/input/scroll_snap_test.cc
@@ -8,6 +8,7 @@ #include "third_party/blink/renderer/core/input/event_handler.h" #include "third_party/blink/renderer/core/input/scroll_manager.h" #include "third_party/blink/renderer/core/layout/layout_box.h" +#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h" #include "third_party/blink/renderer/core/style/computed_style.h" #include "third_party/blink/renderer/core/testing/sim/sim_compositor.h" #include "third_party/blink/renderer/core/testing/sim/sim_request.h" @@ -136,8 +137,8 @@ void ScrollSnapTest::SetInitialScrollOffset(double x, double y) { Element* scroller = GetDocument().getElementById("scroller"); - scroller->GetLayoutBox()->SetScrollLeft(LayoutUnit::FromFloatRound(x)); - scroller->GetLayoutBox()->SetScrollTop(LayoutUnit::FromFloatRound(y)); + scroller->GetScrollableArea()->ScrollToAbsolutePosition(FloatPoint(x, y), + kScrollBehaviorAuto); ASSERT_EQ(scroller->scrollLeft(), x); ASSERT_EQ(scroller->scrollTop(), y); }
diff --git a/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc b/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc index f66a0f38..4c6388b 100644 --- a/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_layer_tree_agent.cc
@@ -274,8 +274,10 @@ if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled() || RuntimeEnabledFeatures::CompositeAfterPaintEnabled()) { - if (document->Lifecycle().GetState() >= DocumentLifecycle::kPaintClean) + if (document->Lifecycle().GetState() >= DocumentLifecycle::kPaintClean) { LayerTreePainted(); + LayerTreeDidChange(); + } } else if (document->Lifecycle().GetState() >= DocumentLifecycle::kCompositingClean) { LayerTreeDidChange(); @@ -290,8 +292,6 @@ } void InspectorLayerTreeAgent::LayerTreeDidChange() { - DCHECK(!RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled() && - !RuntimeEnabledFeatures::CompositeAfterPaintEnabled()); GetFrontend()->layerTreeDidChange(BuildLayerTree()); } @@ -320,8 +320,6 @@ DCHECK(RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled() || RuntimeEnabledFeatures::CompositeAfterPaintEnabled()); - GetFrontend()->layerTreeDidChange(BuildLayerTree()); - for (const auto& layer : inspected_frames_->Root()->View()->RootCcLayer()->children()) { if (!layer->update_rect().IsEmpty()) {
diff --git a/third_party/blink/renderer/core/layout/BUILD.gn b/third_party/blink/renderer/core/layout/BUILD.gn index be0de26..8cef1b8 100644 --- a/third_party/blink/renderer/core/layout/BUILD.gn +++ b/third_party/blink/renderer/core/layout/BUILD.gn
@@ -346,6 +346,8 @@ "ng/inline/ng_inline_break_token.h", "ng/inline/ng_inline_child_layout_context.cc", "ng/inline/ng_inline_child_layout_context.h", + "ng/inline/ng_inline_cursor.cc", + "ng/inline/ng_inline_cursor.h", "ng/inline/ng_inline_fragment_traversal.cc", "ng/inline/ng_inline_fragment_traversal.h", "ng/inline/ng_inline_item.cc",
diff --git a/third_party/blink/renderer/core/layout/layout_box.cc b/third_party/blink/renderer/core/layout/layout_box.cc index 9baa8a2..c09a476 100644 --- a/third_party/blink/renderer/core/layout/layout_box.cc +++ b/third_party/blink/renderer/core/layout/layout_box.cc
@@ -39,6 +39,7 @@ #include "third_party/blink/renderer/core/frame/local_frame_client.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/settings.h" +#include "third_party/blink/renderer/core/frame/visual_viewport.h" #include "third_party/blink/renderer/core/html/html_element.h" #include "third_party/blink/renderer/core/html/html_frame_element_base.h" #include "third_party/blink/renderer/core/html/html_frame_owner_element.h" @@ -600,18 +601,6 @@ return std::max(ClientHeight(), LayoutOverflowRect().MaxY() - BorderTop()); } -LayoutUnit LayoutBox::ScrollLeft() const { - return HasOverflowClip() - ? LayoutUnit(GetScrollableArea()->ScrollPosition().X()) - : LayoutUnit(); -} - -LayoutUnit LayoutBox::ScrollTop() const { - return HasOverflowClip() - ? LayoutUnit(GetScrollableArea()->ScrollPosition().Y()) - : LayoutUnit(); -} - int LayoutBox::PixelSnappedScrollWidth() const { return SnapSizeToPixel(ScrollWidth(), Location().X() + ClientLeft()); } @@ -625,46 +614,6 @@ return SnapSizeToPixel(ScrollHeight(), Location().Y() + ClientTop()); } -void LayoutBox::SetScrollLeft(LayoutUnit new_left) { - // This doesn't hit in any tests, but since the equivalent code in - // setScrollTop does, presumably this code does as well. - DisableCompositingQueryAsserts disabler; - - if (!HasOverflowClip()) - return; - - PaintLayerScrollableArea* scrollable_area = GetScrollableArea(); - FloatPoint new_position(new_left.ToFloat(), - scrollable_area->ScrollPosition().Y()); - scrollable_area->ScrollToAbsolutePosition(new_position, kScrollBehaviorAuto); -} - -void LayoutBox::SetScrollTop(LayoutUnit new_top) { - // Hits in - // compositing/overflow/do-not-assert-on-invisible-composited-layers.html - DisableCompositingQueryAsserts disabler; - - if (!HasOverflowClip()) - return; - - PaintLayerScrollableArea* scrollable_area = GetScrollableArea(); - FloatPoint new_position(scrollable_area->ScrollPosition().X(), - new_top.ToFloat()); - scrollable_area->ScrollToAbsolutePosition(new_position, kScrollBehaviorAuto); -} - -void LayoutBox::ScrollToPosition(const FloatPoint& position, - ScrollBehavior scroll_behavior) { - // This doesn't hit in any tests, but since the equivalent code in - // setScrollTop does, presumably this code does as well. - DisableCompositingQueryAsserts disabler; - - if (!HasOverflowClip()) - return; - - GetScrollableArea()->ScrollToAbsolutePosition(position, scroll_behavior); -} - PhysicalRect LayoutBox::ScrollRectToVisibleRecursive( const PhysicalRect& absolute_rect, const WebScrollIntoViewParams& params) { @@ -722,10 +671,19 @@ absolute_rect_for_parent = absolute_rect_to_scroll; } - // If we are fixed-position and stick to the viewport, it is useless to - // scroll the parent. - if (StyleRef().GetPosition() == EPosition::kFixed && Container() == View()) - return absolute_rect_for_parent; + // If we're in a position:fixed element, scrolling the layout viewport won't + // have any effect, so we avoid using the RootFrameViewport and explicitly + // scroll the visual viewport if we can. If not, we're done. + if (StyleRef().GetPosition() == EPosition::kFixed && Container() == View() && + params.make_visible_in_visual_viewport) { + if (GetFrame()->IsMainFrame()) { + // TODO(donnd): We should continue the recursion if we're in a subframe. + return GetFrame()->GetPage()->GetVisualViewport().ScrollIntoView( + absolute_rect_for_parent, params); + } else { + return absolute_rect_for_parent; + } + } if (parent_box) { return parent_box->ScrollRectToVisibleRecursive(absolute_rect_for_parent,
diff --git a/third_party/blink/renderer/core/layout/layout_box.h b/third_party/blink/renderer/core/layout/layout_box.h index 51fc685..7e046d0d 100644 --- a/third_party/blink/renderer/core/layout/layout_box.h +++ b/third_party/blink/renderer/core/layout/layout_box.h
@@ -681,21 +681,19 @@ // scrollWidth/scrollHeight will be the same as clientWidth/clientHeight // unless the object has overflow:hidden/scroll/auto specified and also has - // overflow. scrollLeft/Top return the current scroll position. These methods - // are virtual so that objects like textareas can scroll shadow content (but - // pretend that they are the objects that are scrolling). - virtual LayoutUnit ScrollLeft() const; - virtual LayoutUnit ScrollTop() const; + // overflow. These methods are virtual so that objects like textareas can + // scroll shadow content (but pretend that they are the objects that are + // scrolling). + + // Replaced ScrollLeft/Top by using Element::GetScrollableArea to return the + // correct ScrollableArea. + // TODO(cathiechen): We should do the same with ScrollWidth|Height . virtual LayoutUnit ScrollWidth() const; virtual LayoutUnit ScrollHeight() const; // TODO(crbug.com/962299): This is incorrect in some cases. int PixelSnappedScrollWidth() const; int PixelSnappedScrollHeight() const; - virtual void SetScrollLeft(LayoutUnit); - virtual void SetScrollTop(LayoutUnit); - void ScrollToPosition(const FloatPoint&, - ScrollBehavior = kScrollBehaviorInstant); void ScrollByRecursively(const ScrollOffset& delta); // If makeVisibleInVisualViewport is set, the visual viewport will be scrolled // if required to make the rect visible.
diff --git a/third_party/blink/renderer/core/layout/layout_inline.cc b/third_party/blink/renderer/core/layout/layout_inline.cc index 82714fd3..b41f93b 100644 --- a/third_party/blink/renderer/core/layout/layout_inline.cc +++ b/third_party/blink/renderer/core/layout/layout_inline.cc
@@ -1613,6 +1613,7 @@ inline_position = FirstLineBox()->LogicalLeft(); block_position = FirstLineBox()->LogicalTop(); } else { + DCHECK(Layer()); inline_position = Layer()->StaticInlinePosition(); block_position = Layer()->StaticBlockPosition(); }
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 2a3ff0c3..5fc76c2 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -311,7 +311,7 @@ } bool LayoutObject::IsHR() const { - return IsHTMLHRElement(GetNode()); + return IsA<HTMLHRElement>(GetNode()); } void LayoutObject::SetIsInsideFlowThreadIncludingDescendants( @@ -1245,12 +1245,12 @@ if (!style) return false; // https://www.w3.org/TR/filter-effects-1/#FilterProperty - if (style->HasFilter() && !this->IsDocumentElement()) + if (style->HasFilter() && !IsDocumentElement()) return true; // Backdrop-filter creates a containing block for fixed and absolute // positioned elements: // https://drafts.fxtf.org/filter-effects-2/#backdrop-filter-operation - if (style->HasBackdropFilter() && !this->IsDocumentElement()) + if (style->HasBackdropFilter() && !IsDocumentElement()) return true; // The LayoutView is always a container of fixed positioned descendants. In // addition, SVG foreignObjects become such containers, so that descendants @@ -1258,17 +1258,16 @@ // select elements inside that are created by user agent shadow DOM, and we // have (C++) code that assumes that the elements are indeed contained by the // text control. So just make sure this is the case. - if (this->IsLayoutView() || this->IsSVGForeignObject() || - this->IsTextControl()) + if (IsLayoutView() || IsSVGForeignObject() || IsTextControl()) return true; // https://www.w3.org/TR/css-transforms-1/#containing-block-for-all-descendants if (style->HasTransformRelatedProperty()) { - if (!this->IsInline() || this->IsAtomicInlineLevel()) + if (!IsInline() || IsAtomicInlineLevel()) return true; } // https://www.w3.org/TR/css-contain-1/#containment-layout - if (this->ShouldApplyPaintContainment(*style) || - this->ShouldApplyLayoutContainment(*style)) + if (ShouldApplyPaintContainment(*style) || + ShouldApplyLayoutContainment(*style)) return true; return false; }
diff --git a/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc b/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc index 135c0ce4..8969f7c 100644 --- a/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc +++ b/third_party/blink/renderer/core/layout/layout_text_control_single_line.cc
@@ -299,28 +299,6 @@ return LayoutBlockFlow::ScrollHeight(); } -LayoutUnit LayoutTextControlSingleLine::ScrollLeft() const { - if (InnerEditorElement()) - return LayoutUnit(InnerEditorElement()->scrollLeft()); - return LayoutBlockFlow::ScrollLeft(); -} - -LayoutUnit LayoutTextControlSingleLine::ScrollTop() const { - if (InnerEditorElement()) - return LayoutUnit(InnerEditorElement()->scrollTop()); - return LayoutBlockFlow::ScrollTop(); -} - -void LayoutTextControlSingleLine::SetScrollLeft(LayoutUnit new_left) { - if (InnerEditorElement()) - InnerEditorElement()->setScrollLeft(new_left); -} - -void LayoutTextControlSingleLine::SetScrollTop(LayoutUnit new_top) { - if (InnerEditorElement()) - InnerEditorElement()->setScrollTop(new_top); -} - HTMLInputElement* LayoutTextControlSingleLine::InputElement() const { return ToHTMLInputElement(GetNode()); }
diff --git a/third_party/blink/renderer/core/layout/layout_text_control_single_line.h b/third_party/blink/renderer/core/layout/layout_text_control_single_line.h index 8916592..e13d7dc8 100644 --- a/third_party/blink/renderer/core/layout/layout_text_control_single_line.h +++ b/third_party/blink/renderer/core/layout/layout_text_control_single_line.h
@@ -64,12 +64,8 @@ void Autoscroll(const PhysicalOffset&) final; // Subclassed to forward to our inner div. - LayoutUnit ScrollLeft() const final; - LayoutUnit ScrollTop() const final; LayoutUnit ScrollWidth() const final; LayoutUnit ScrollHeight() const final; - void SetScrollLeft(LayoutUnit) final; - void SetScrollTop(LayoutUnit) final; int TextBlockWidth() const; float GetAvgCharWidth(const AtomicString& family) const final;
diff --git a/third_party/blink/renderer/core/layout/layout_theme_default.cc b/third_party/blink/renderer/core/layout/layout_theme_default.cc index a037947..84f738a 100644 --- a/third_party/blink/renderer/core/layout/layout_theme_default.cc +++ b/third_party/blink/renderer/core/layout/layout_theme_default.cc
@@ -26,6 +26,7 @@ #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/web_theme_engine.h" +#include "third_party/blink/public/resources/grit/blink_resources.h" #include "third_party/blink/renderer/core/css_value_keywords.h" #include "third_party/blink/renderer/core/layout/layout_theme_font_provider.h" #include "third_party/blink/renderer/core/page/chrome_client.h" @@ -91,16 +92,19 @@ String extra_style_sheet = LayoutTheme::ExtraDefaultStyleSheet(); String multiple_fields_style_sheet = RuntimeEnabledFeatures::InputMultipleFieldsUIEnabled() - ? GetDataResourceAsASCIIString("input_multiple_fields.css") + ? UncompressResourceAsASCIIString( + IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS) : String(); - String windows_style_sheet = GetDataResourceAsASCIIString("win.css"); + String windows_style_sheet = + UncompressResourceAsASCIIString(IDR_UASTYLE_THEME_WIN_CSS); String controls_refresh_style_sheet = RuntimeEnabledFeatures::FormControlsRefreshEnabled() - ? GetDataResourceAsASCIIString("controls_refresh.css") + ? UncompressResourceAsASCIIString( + IDR_UASTYLE_THEME_CONTROLS_REFRESH_CSS) : String(); String forced_colors_style_sheet = RuntimeEnabledFeatures::ForcedColorsEnabled() - ? GetDataResourceAsASCIIString("forced_colors.css") + ? UncompressResourceAsASCIIString(IDR_UASTYLE_THEME_FORCED_COLORS_CSS) : String(); StringBuilder builder; builder.ReserveCapacity( @@ -116,7 +120,7 @@ } String LayoutThemeDefault::ExtraQuirksStyleSheet() { - return GetDataResourceAsASCIIString("win_quirks.css"); + return UncompressResourceAsASCIIString(IDR_UASTYLE_THEME_WIN_QUIRKS_CSS); } Color LayoutThemeDefault::ActiveListBoxSelectionBackgroundColor() const {
diff --git a/third_party/blink/renderer/core/layout/layout_theme_mac.mm b/third_party/blink/renderer/core/layout/layout_theme_mac.mm index fb493b5..3d2e0a3 100644 --- a/third_party/blink/renderer/core/layout/layout_theme_mac.mm +++ b/third_party/blink/renderer/core/layout/layout_theme_mac.mm
@@ -28,6 +28,7 @@ #import "base/mac/mac_util.h" #import "third_party/blink/public/platform/mac/web_sandbox_support.h" #import "third_party/blink/public/platform/platform.h" +#import "third_party/blink/public/resources/grit/blink_resources.h" #import "third_party/blink/renderer/core/css_value_keywords.h" #import "third_party/blink/renderer/core/fileapi/file_list.h" #import "third_party/blink/renderer/core/html_names.h" @@ -1067,8 +1068,9 @@ String LayoutThemeMac::ExtraDefaultStyleSheet() { return LayoutTheme::ExtraDefaultStyleSheet() + - GetDataResourceAsASCIIString("input_multiple_fields.css") + - GetDataResourceAsASCIIString("mac.css"); + UncompressResourceAsASCIIString( + IDR_UASTYLE_THEME_INPUT_MULTIPLE_FIELDS_CSS) + + UncompressResourceAsASCIIString(IDR_UASTYLE_THEME_MAC_CSS); } bool LayoutThemeMac::ThemeDrawsFocusRing(const ComputedStyle& style) const {
diff --git a/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h b/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h index c17e3bf..56f8dec8 100644 --- a/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h +++ b/third_party/blink/renderer/core/layout/line/breaking_context_inline_headers.h
@@ -311,6 +311,7 @@ // determine our position as though we were an inline. // Set |staticInlinePosition| and |staticBlockPosition| on the relative // positioned inline so that we can obtain the value later. + DCHECK(LineLayoutInline(container_block).Layer()); LineLayoutInline(container_block) .Layer() ->SetStaticInlinePosition(
diff --git a/third_party/blink/renderer/core/layout/map_coordinates_test.cc b/third_party/blink/renderer/core/layout/map_coordinates_test.cc index 9299880..65a078279 100644 --- a/third_party/blink/renderer/core/layout/map_coordinates_test.cc +++ b/third_party/blink/renderer/core/layout/map_coordinates_test.cc
@@ -153,7 +153,9 @@ LayoutObject* target = GetLayoutObjectByElementId("target"); LayoutObject* overflow = GetLayoutObjectByElementId("overflow"); - ToLayoutBox(overflow)->ScrollToPosition(FloatPoint(32, 54)); + To<Element>(overflow->GetNode()) + ->GetScrollableArea() + ->ScrollToAbsolutePosition(FloatPoint(32, 54)); PhysicalOffset mapped_point = MapLocalToAncestor(target, ToLayoutBoxModelObject(target->Parent()), @@ -1720,7 +1722,9 @@ PhysicalOffset(0, 10), MapLocalToAncestor(box, scroller, PhysicalOffset(), kIgnoreScrollOffset)); - scroller->ScrollToPosition(FloatPoint(0, 50)); + To<Element>(scroller->GetNode()) + ->GetScrollableArea() + ->ScrollToAbsolutePosition(FloatPoint(0, 50)); EXPECT_EQ(PhysicalOffset(0, -40), MapLocalToAncestor(box, scroller, PhysicalOffset())); @@ -1756,7 +1760,9 @@ PhysicalOffset(0, 10), MapLocalToAncestor(box, scroller, PhysicalOffset(), kIgnoreScrollOffset)); - scroller->ScrollToPosition(FloatPoint(0, 50)); + To<Element>(scroller->GetNode()) + ->GetScrollableArea() + ->ScrollToAbsolutePosition(FloatPoint(0, 50)); EXPECT_EQ(PhysicalOffset(0, 10), MapLocalToAncestor(box, scroller, PhysicalOffset())); @@ -1783,6 +1789,7 @@ LayoutBox* scroller = ToLayoutBox(GetLayoutObjectByElementId("scroller")); LayoutBox* box = ToLayoutBox(GetLayoutObjectByElementId("box")); + auto* scroll_element = To<Element>(scroller->GetNode()); EXPECT_EQ(PhysicalOffset(90, 10), MapLocalToAncestor(box, scroller, PhysicalOffset())); @@ -1790,7 +1797,8 @@ PhysicalOffset(1990, 10), MapLocalToAncestor(box, scroller, PhysicalOffset(), kIgnoreScrollOffset)); - scroller->ScrollToPosition(FloatPoint(0, 50)); + scroll_element->GetScrollableArea()->ScrollToAbsolutePosition( + FloatPoint(0, 50)); EXPECT_EQ(PhysicalOffset(1990, -40), MapLocalToAncestor(box, scroller, PhysicalOffset())); @@ -1798,7 +1806,8 @@ PhysicalOffset(1990, 10), MapLocalToAncestor(box, scroller, PhysicalOffset(), kIgnoreScrollOffset)); - scroller->ScrollToPosition(FloatPoint(1900, 50)); + scroll_element->GetScrollableArea()->ScrollToAbsolutePosition( + FloatPoint(1900, 50)); EXPECT_EQ(PhysicalOffset(90, -40), MapLocalToAncestor(box, scroller, PhysicalOffset())); @@ -1837,7 +1846,10 @@ PhysicalOffset(1990, 10), MapLocalToAncestor(box, scroller, PhysicalOffset(), kIgnoreScrollOffset)); - scroller->ScrollToPosition(FloatPoint(0, 0)); + To<Element>(scroller->GetNode()) + ->GetScrollableArea() + ->ScrollToAbsolutePosition(FloatPoint(0, 0)); + // The box is now on the right of the scrollbar therefore there is nothing // between the box and the right border of the content. EXPECT_EQ(PhysicalOffset(1990, 10),
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc index 0bdaf39..e680123e 100644 --- a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_box_state.cc
@@ -618,13 +618,7 @@ for (unsigned i = fragment_start; i < fragment_end; i++) { NGLineBoxFragmentBuilder::Child& child = (*line_box)[i]; - if (child.layout_result) { - box.AddChild(child.layout_result->PhysicalFragment(), - child.offset - offset); - child.layout_result.reset(); - } else if (child.fragment) { - box.AddChild(std::move(child.fragment), child.offset - offset); - } else if (child.out_of_flow_positioned_box) { + if (child.out_of_flow_positioned_box) { DCHECK(item->GetLayoutObject()->IsLayoutInline()); NGBlockNode oof_box(ToLayoutBox(child.out_of_flow_positioned_box)); @@ -636,6 +630,22 @@ box.AddOutOfFlowChildCandidate(oof_box, static_offset, child.container_direction); child.out_of_flow_positioned_box = nullptr; + continue; + } + + if (RuntimeEnabledFeatures::LayoutNGFragmentItemEnabled()) { + // |NGFragmentItems| has a flat list of all descendants, except OOF + // objects. Still creates |NGPhysicalBoxFragment|, but don't add children + // to it and keep them in the flat list. + continue; + } + + if (child.layout_result) { + box.AddChild(child.layout_result->PhysicalFragment(), + child.offset - offset); + child.layout_result.reset(); + } else if (child.fragment) { + box.AddChild(std::move(child.fragment), child.offset - offset); } }
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.cc new file mode 100644 index 0000000..13ebbada --- /dev/null +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.cc
@@ -0,0 +1,115 @@ +// Copyright 2019 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 "third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h" + +#include "third_party/blink/renderer/core/layout/layout_block_flow.h" +#include "third_party/blink/renderer/core/layout/ng/inline/ng_fragment_items.h" +#include "third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.h" +#include "third_party/blink/renderer/core/paint/ng/ng_paint_fragment.h" + +namespace blink { + +NGInlineCursor::NGInlineCursor(LayoutBlockFlow* block_flow) { + DCHECK(block_flow); + + if (const NGPhysicalBoxFragment* fragment = block_flow->CurrentFragment()) { + if (const NGFragmentItems* items = fragment->Items()) { + SetRoot(items); + return; + } + } + + if (const NGPaintFragment* paint_fragment = block_flow->PaintFragment()) { + SetRoot(paint_fragment); + return; + } + + NOTREACHED(); +} + +void NGInlineCursor::SetRoot(const NGFragmentItems* items) { + items_ = items; +} + +void NGInlineCursor::SetRoot(const NGPaintFragment* root_paint_fragment) { + root_paint_fragment_ = root_paint_fragment; + current_paint_fragment_ = root_paint_fragment; +} + +bool NGInlineCursor::IsLineBox() const { + if (current_item_) + return current_item_->Type() == NGFragmentItem::kLine; + if (current_paint_fragment_) + return current_paint_fragment_->PhysicalFragment().IsLineBox(); + NOTREACHED(); + return false; +} + +const LayoutObject* NGInlineCursor::CurrentLayoutObject() const { + if (current_item_) + return current_item_->GetLayoutObject(); + if (current_paint_fragment_) + return current_paint_fragment_->GetLayoutObject(); + NOTREACHED(); + return nullptr; +} + +bool NGInlineCursor::MoveToNext() { + if (items_) + return MoveToNextItem(); + if (root_paint_fragment_) + return MoveToNextPaintFragment(); + NOTREACHED(); + return false; +} + +bool NGInlineCursor::MoveToNextItem() { + DCHECK(items_); + if (next_item_index_ < items_->Items().size()) { + current_item_ = items_->Items()[next_item_index_++].get(); + return true; + } + return false; +} + +bool NGInlineCursor::MoveToParentPaintFragment() { + DCHECK(root_paint_fragment_ && current_paint_fragment_); + const NGPaintFragment* parent = current_paint_fragment_->Parent(); + DCHECK(parent); + if (parent == root_paint_fragment_) + return false; + current_paint_fragment_ = parent; + return true; +} + +bool NGInlineCursor::MoveToNextPaintFragment() { + DCHECK(root_paint_fragment_ && current_paint_fragment_); + if (const NGPaintFragment* child = current_paint_fragment_->FirstChild()) { + current_paint_fragment_ = child; + return true; + } + return MoveToNextPaintFragmentSkippingChildren(); +} + +bool NGInlineCursor::MoveToNextSibilingPaintFragment() { + DCHECK(root_paint_fragment_ && current_paint_fragment_); + if (const NGPaintFragment* next = current_paint_fragment_->NextSibling()) { + current_paint_fragment_ = next; + return true; + } + return false; +} + +bool NGInlineCursor::MoveToNextPaintFragmentSkippingChildren() { + DCHECK(root_paint_fragment_ && current_paint_fragment_); + while (true) { + if (MoveToNextSibilingPaintFragment()) + return true; + if (!MoveToParentPaintFragment()) + return false; + } +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h new file mode 100644 index 0000000..4692984 --- /dev/null +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h
@@ -0,0 +1,78 @@ +// Copyright 2019 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. + +#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_INLINE_CURSOR_H_ +#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_INLINE_CURSOR_H_ + +#include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" + +namespace blink { + +class LayoutObject; +class LayoutBlockFlow; +class NGFragmentItem; +class NGFragmentItems; +class NGPaintFragment; + +// This class traverses fragments in an inline formatting context. +// +// When constructed, the initial position is empty. Call |MoveToNext()| to move +// to the first fragment. +// +// TODO(kojii): |NGPaintFragment| should be gone when |NGPaintFragment| is +// deprecated and all its uses are removed. +class CORE_EXPORT NGInlineCursor { + STACK_ALLOCATED(); + + public: + NGInlineCursor(LayoutBlockFlow*); + + // + // Functions to query the current position. + // + + // True if the current position is a line box. + bool IsLineBox() const; + + // |Current*| functions return an object for the current position. + const NGFragmentItem* CurrentItem() const { return current_item_; } + const NGPaintFragment* CurrentPaintFragment() const { + return current_paint_fragment_; + } + const LayoutObject* CurrentLayoutObject() const; + + // + // Functions to move the current position. + // + + // Move the current position to the next fragment in pre-order DFS. Returns + // |true| if the move was successful. + bool MoveToNext(); + // TODO(kojii): Add more variations as needed, NextSibling, + // NextSkippingChildren, Previous, etc. + + private: + void SetRoot(const NGFragmentItems* items); + void SetRoot(const NGPaintFragment* root_paint_fragment); + + bool MoveToNextItem(); + + bool MoveToParentPaintFragment(); + bool MoveToNextPaintFragment(); + bool MoveToNextSibilingPaintFragment(); + bool MoveToNextPaintFragmentSkippingChildren(); + + const NGFragmentItems* items_ = nullptr; + const NGPaintFragment* root_paint_fragment_ = nullptr; + + const NGFragmentItem* current_item_ = nullptr; + const NGPaintFragment* current_paint_fragment_ = nullptr; + + unsigned next_item_index_ = 0; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_INLINE_NG_INLINE_CURSOR_H_
diff --git a/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor_test.cc b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor_test.cc new file mode 100644 index 0000000..ec98bd2 --- /dev/null +++ b/third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor_test.cc
@@ -0,0 +1,80 @@ +// Copyright 2019 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 "third_party/blink/renderer/core/layout/ng/inline/ng_inline_cursor.h" + +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/blink/renderer/core/layout/layout_text.h" +#include "third_party/blink/renderer/core/layout/ng/ng_layout_test.h" + +namespace blink { + +using ::testing::ElementsAre; + +class NGInlineCursorTest : public NGLayoutTest, + private ScopedLayoutNGFragmentItemForTest, + public testing::WithParamInterface<bool> { + public: + NGInlineCursorTest() : ScopedLayoutNGFragmentItemForTest(GetParam()) {} + + protected: + Vector<String> ToDebugStringList(NGInlineCursor* cursor) { + Vector<String> list; + while (cursor->MoveToNext()) + list.push_back(ToDebugString(*cursor)); + return list; + } + + String ToDebugString(const NGInlineCursor& cursor) { + if (const LayoutObject* layout_object = cursor.CurrentLayoutObject()) { + if (const LayoutText* text = ToLayoutTextOrNull(layout_object)) + return text->GetText().StripWhiteSpace(); + + if (const Element* element = + DynamicTo<Element>(layout_object->GetNode())) { + if (const AtomicString& id = element->GetIdAttribute()) + return "#" + id; + } + + return layout_object->DebugName(); + } + + if (cursor.IsLineBox()) + return "#linebox"; + return "#null"; + } +}; + +INSTANTIATE_TEST_SUITE_P(NGInlineCursorTest, + NGInlineCursorTest, + testing::Bool()); + +TEST_P(NGInlineCursorTest, Next) { + SetBodyInnerHTML(R"HTML( + <style> + span { background: gray; } + </style> + <div id=root> + text1 + <span id="span1"> + text2 + <span id="span2"> + text3 + </span> + text4 + </span> + text5 + </div> + )HTML"); + + LayoutBlockFlow* block_flow = + To<LayoutBlockFlow>(GetLayoutObjectByElementId("root")); + NGInlineCursor cursor(block_flow); + Vector<String> list = ToDebugStringList(&cursor); + EXPECT_THAT(list, ElementsAre("#linebox", "text1", "#span1", "text2", + "#span2", "text3", "text4", "text5")); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_break_token.cc b/third_party/blink/renderer/core/layout/ng/ng_block_break_token.cc index dd12fc0f..98efb5b 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_break_token.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_block_break_token.cc
@@ -22,12 +22,12 @@ NGBlockBreakToken::NGBlockBreakToken( NGLayoutInputNode node, - LayoutUnit used_block_size, + LayoutUnit consumed_block_size, const NGBreakTokenVector& child_break_tokens, bool has_last_resort_break, bool has_seen_all_children) : NGBreakToken(kBlockBreakToken, kUnfinished, node), - used_block_size_(used_block_size), + consumed_block_size_(consumed_block_size), num_children_(child_break_tokens.size()) { has_last_resort_break_ = has_last_resort_break; has_seen_all_children_ = has_seen_all_children; @@ -71,8 +71,8 @@ String NGBlockBreakToken::ToString() const { StringBuilder string_builder; string_builder.Append(NGBreakToken::ToString()); - string_builder.Append(" used:"); - string_builder.Append(used_block_size_.ToString()); + string_builder.Append(" consumed:"); + string_builder.Append(consumed_block_size_.ToString()); string_builder.Append("px"); return string_builder.ToString(); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_break_token.h b/third_party/blink/renderer/core/layout/ng/ng_block_break_token.h index 4362508e..81858b1e 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_break_token.h +++ b/third_party/blink/renderer/core/layout/ng/ng_block_break_token.h
@@ -26,7 +26,7 @@ // anonymous box. static scoped_refptr<NGBlockBreakToken> Create( NGLayoutInputNode node, - LayoutUnit used_block_size, + LayoutUnit consumed_block_size, const NGBreakTokenVector& child_break_tokens, bool has_last_resort_break, bool has_seen_all_children) { @@ -37,7 +37,7 @@ sizeof(NGBlockBreakToken) + child_break_tokens.size() * sizeof(NGBreakToken*), ::WTF::GetStringWithTypeName<NGBlockBreakToken>()); - new (data) NGBlockBreakToken(node, used_block_size, child_break_tokens, + new (data) NGBlockBreakToken(node, consumed_block_size, child_break_tokens, has_last_resort_break, has_seen_all_children); return base::AdoptRef(static_cast<NGBlockBreakToken*>(data)); } @@ -57,12 +57,14 @@ token->Release(); } - // Represents the amount of block size used in previous fragments. + // Represents the amount of block-size consumed by previous fragments. // - // E.g. if the layout block specifies a block size of 200px, and the previous - // fragments of this block used 150px (used block size), the next fragment - // should have a size of 50px (assuming no additional fragmentation). - LayoutUnit UsedBlockSize() const { return used_block_size_; } + // E.g. if the node specifies a block-size of 200px, and the previous + // fragments generated for this box consumed 150px in total (which is what + // this method would return then), there's 50px left to consume. The next + // fragment will become 50px tall, assuming no additional fragmentation (if + // the fragmentainer is shorter than 50px, for instance). + LayoutUnit ConsumedBlockSize() const { return consumed_block_size_; } // Return true if this is a break token that was produced without any // "preceding" fragment. This happens when we determine that the first @@ -102,14 +104,14 @@ // Must only be called from Create(), because it assumes that enough space // has been allocated in the flexible array to store the children. NGBlockBreakToken(NGLayoutInputNode node, - LayoutUnit used_block_size, + LayoutUnit consumed_block_size, const NGBreakTokenVector& child_break_tokens, bool has_last_resort_break, bool has_seen_all_children); explicit NGBlockBreakToken(NGLayoutInputNode node); - LayoutUnit used_block_size_; + LayoutUnit consumed_block_size_; wtf_size_t num_children_; // This must be the last member, because it is a flexible array.
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc index fe2e38c..fd5330f 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_block_layout_algorithm.cc
@@ -1841,15 +1841,15 @@ container_builder_.SetDidBreak(); } - LayoutUnit used_block_size = - BreakToken() ? BreakToken()->UsedBlockSize() : LayoutUnit(); + LayoutUnit consumed_block_size = + BreakToken() ? BreakToken()->ConsumedBlockSize() : LayoutUnit(); LayoutUnit block_size = ComputeBlockSizeForFragment(ConstraintSpace(), Node(), border_padding_, - used_block_size + intrinsic_block_size_); + consumed_block_size + intrinsic_block_size_); - block_size -= used_block_size; + block_size -= consumed_block_size; DCHECK_GE(block_size, LayoutUnit()) - << "Adding and subtracting the used_block_size shouldn't leave the " + << "Adding and subtracting the consumed_block_size shouldn't leave the " "block_size for this fragment smaller than zero."; LayoutUnit space_left = FragmentainerSpaceAvailable(); @@ -1871,8 +1871,8 @@ if (container_builder_.DidBreak()) { // One of our children broke. Even if we fit within the remaining space we // need to prepare a break token. - container_builder_.SetUsedBlockSize(std::min(space_left, block_size) + - used_block_size); + container_builder_.SetConsumedBlockSize(std::min(space_left, block_size) + + consumed_block_size); container_builder_.SetBlockSize(std::min(space_left, block_size)); container_builder_.SetIntrinsicBlockSize(space_left); @@ -1895,7 +1895,7 @@ if (block_size > space_left) { // Need a break inside this block. - container_builder_.SetUsedBlockSize(space_left + used_block_size); + container_builder_.SetConsumedBlockSize(space_left + consumed_block_size); container_builder_.SetDidBreak(); container_builder_.SetBlockSize(space_left); container_builder_.SetIntrinsicBlockSize(space_left); @@ -1904,7 +1904,7 @@ } // The end of the block fits in the current fragmentainer. - container_builder_.SetUsedBlockSize(used_block_size + block_size); + container_builder_.SetConsumedBlockSize(consumed_block_size + block_size); container_builder_.SetBlockSize(block_size); container_builder_.SetIntrinsicBlockSize(intrinsic_block_size_); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc index dbde21f..effd5af 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_block_node.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_block_node.cc
@@ -711,7 +711,7 @@ << "Variable fragment inline size not supported"; LayoutUnit logical_height = fragment_logical_size.block_size; if (previous_break_token) - logical_height += previous_break_token->UsedBlockSize(); + logical_height += previous_break_token->ConsumedBlockSize(); box_->SetLogicalHeight(logical_height); intrinsic_content_logical_height = box_->IntrinsicContentLogicalHeight(); } @@ -753,7 +753,7 @@ // TODO(mstensho): writing modes if (previous_break_token) - offset_from_start.top = previous_break_token->UsedBlockSize(); + offset_from_start.top = previous_break_token->ConsumedBlockSize(); } PlaceChildrenInLayoutBox(physical_fragment, offset_from_start); } @@ -762,7 +762,7 @@ if (LIKELY(block && is_last_fragment)) { LayoutUnit intrinsic_block_size = layout_result.IntrinsicBlockSize(); if (UNLIKELY(previous_break_token)) - intrinsic_block_size += previous_break_token->UsedBlockSize(); + intrinsic_block_size += previous_break_token->ConsumedBlockSize(); #if DCHECK_IS_ON() block->CheckPositionedObjectsNeedLayout(); @@ -847,7 +847,7 @@ const auto* column = To<NGPhysicalBoxFragment>(child.get()); PlaceChildrenInLayoutBox(*column, offset); if (const auto* token = To<NGBlockBreakToken>(column->BreakToken())) - flowthread_offset = token->UsedBlockSize(); + flowthread_offset = token->ConsumedBlockSize(); } }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc b/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc index 90bd798..736d92a 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.cc
@@ -224,8 +224,8 @@ } if (did_break_) { break_token_ = NGBlockBreakToken::Create( - node_, used_block_size_, child_break_tokens_, has_last_resort_break_, - has_seen_all_children_); + node_, consumed_block_size_, child_break_tokens_, + has_last_resort_break_, has_seen_all_children_); } } @@ -305,7 +305,7 @@ void NGBoxFragmentBuilder::CheckNoBlockFragmentation() const { DCHECK(!did_break_); DCHECK(!has_forced_break_); - DCHECK_EQ(used_block_size_, LayoutUnit()); + DCHECK_EQ(consumed_block_size_, LayoutUnit()); DCHECK_EQ(minimal_space_shortage_, LayoutUnit::Max()); DCHECK_EQ(initial_break_before_, EBreakBetween::kAuto); DCHECK_EQ(previous_break_after_, EBreakBetween::kAuto);
diff --git a/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h index 1d107aa..1cac2e4 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h +++ b/third_party/blink/renderer/core/layout/ng/ng_box_fragment_builder.h
@@ -107,9 +107,11 @@ const NGLogicalStaticPosition&, const LayoutInline* inline_container); - // Set how much of the block size we've used so far for this box. - NGBoxFragmentBuilder& SetUsedBlockSize(LayoutUnit used_block_size) { - used_block_size_ = used_block_size; + // Set how much of the block-size we've used so far for this box. This will be + // the sum of the block-size of all previous fragments PLUS the one we're + // building now. + NGBoxFragmentBuilder& SetConsumedBlockSize(LayoutUnit size) { + consumed_block_size_ = size; return *this; } @@ -264,7 +266,7 @@ bool has_forced_break_ = false; bool is_new_fc_ = false; bool has_seen_all_children_ = false; - LayoutUnit used_block_size_; + LayoutUnit consumed_block_size_; LayoutUnit minimal_space_shortage_ = LayoutUnit::Max();
diff --git a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc index 6613d290..5f30e46df 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_column_layout_algorithm.cc
@@ -88,14 +88,14 @@ // Figure out how much space we've already been able to process in previous // fragments, if this multicol container participates in an outer // fragmentation context. - LayoutUnit previously_used_block_size; + LayoutUnit previously_consumed_block_size; if (const auto* token = BreakToken()) - previously_used_block_size = token->UsedBlockSize(); + previously_consumed_block_size = token->ConsumedBlockSize(); bool needs_more_fragments_in_outer = false; if (ConstraintSpace().HasBlockFragmentation()) { // Subtract the space for content we've processed in previous fragments. - column_size.block_size -= previously_used_block_size; + column_size.block_size -= previously_consumed_block_size; // Check if we can fit everything (that's remaining), block-wise, within the // current outer fragmentainer. If we can't, we need to adjust the block @@ -203,17 +203,17 @@ // Calculate how much block space we've been able to process so far, in // this fragment and all previous fragments generated for this multicol // container. - LayoutUnit used_block_size = fragment_block_size; + LayoutUnit consumed_block_size = fragment_block_size; // If this isn't the first fragment, add the amount that we were able to // process in previous fragments. Otherwise, we're the first fragment, // and we have to add leading border+padding+scrollbar to the fragment // size (which would otherwise only be the size of the columns), since // that's put at the start of the first fragment. - if (previously_used_block_size) - used_block_size += previously_used_block_size; + if (previously_consumed_block_size) + consumed_block_size += previously_consumed_block_size; else fragment_block_size += border_scrollbar_padding_.block_start; - container_builder_.SetUsedBlockSize(used_block_size); + container_builder_.SetConsumedBlockSize(consumed_block_size); container_builder_.SetBlockSize(fragment_block_size); container_builder_.SetDidBreak(); break; @@ -266,7 +266,7 @@ } else { // TODO(mstensho): end border and padding may overflow the parent // fragmentainer, and we should avoid that. - block_size = border_box_size.block_size - previously_used_block_size; + block_size = border_box_size.block_size - previously_consumed_block_size; } container_builder_.SetBlockSize(block_size); }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc index 71c17da..898d05f4 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc
@@ -98,9 +98,10 @@ has_padding_ = !padding.IsZero(); if (has_padding_) *const_cast<NGPhysicalBoxStrut*>(ComputePaddingAddress()) = padding; - // used_block_size_ is only updated if we're in block fragmentation. Otherwise - // it will always be 0. - is_first_for_node_ = builder->used_block_size_ <= builder->size_.block_size; + // consumed_block_size_ is only updated if we're in block + // fragmentation. Otherwise it will always be 0. + is_first_for_node_ = + builder->consumed_block_size_ <= builder->size_.block_size; is_fieldset_container_ = builder->is_fieldset_container_; is_legacy_layout_root_ = builder->is_legacy_layout_root_; border_edge_ = builder->border_edges_.ToPhysical(builder->GetWritingMode());
diff --git a/third_party/blink/renderer/core/layout/visual_rect_mapping_test.cc b/third_party/blink/renderer/core/layout/visual_rect_mapping_test.cc index a938d0a..d651440 100644 --- a/third_party/blink/renderer/core/layout/visual_rect_mapping_test.cc +++ b/third_party/blink/renderer/core/layout/visual_rect_mapping_test.cc
@@ -119,7 +119,10 @@ auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); auto* text = GetLayoutObjectByElementId("text")->SlowFirstChild(); - container->SetScrollTop(LayoutUnit(50)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + scrollable_area->ScrollToAbsolutePosition( + FloatPoint(scrollable_area->ScrollPosition().X(), 50)); UpdateAllLifecyclePhasesForTest(); PhysicalRect original_rect(0, 60, 20, 80); @@ -156,7 +159,10 @@ auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); auto* text = GetLayoutObjectByElementId("text")->SlowFirstChild(); - container->SetScrollTop(LayoutUnit(50)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + scrollable_area->ScrollToAbsolutePosition( + FloatPoint(scrollable_area->ScrollPosition().X(), 50)); UpdateAllLifecyclePhasesForTest(); // All results are the same as VisualRectMappingTest.LayoutText because all @@ -191,7 +197,10 @@ auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); LayoutObject* leaf = container->LastChild(); - container->SetScrollTop(LayoutUnit(50)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + scrollable_area->ScrollToAbsolutePosition( + FloatPoint(scrollable_area->ScrollPosition().X(), 50)); UpdateAllLifecyclePhasesForTest(); PhysicalRect original_rect(0, 60, 20, 80); @@ -228,7 +237,10 @@ auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); LayoutObject* leaf = container->LastChild(); - container->SetScrollTop(LayoutUnit(50)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + scrollable_area->ScrollToAbsolutePosition( + FloatPoint(scrollable_area->ScrollPosition().X(), 50)); UpdateAllLifecyclePhasesForTest(); // All results are the same as VisualRectMappingTest.LayoutInline because all @@ -442,10 +454,11 @@ )HTML"); auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); - EXPECT_EQ(LayoutUnit(), container->ScrollTop()); - EXPECT_EQ(LayoutUnit(), container->ScrollLeft()); - container->SetScrollTop(LayoutUnit(7)); - container->SetScrollLeft(LayoutUnit(8)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + EXPECT_EQ(0, scrollable_area->ScrollPosition().Y()); + EXPECT_EQ(0, scrollable_area->ScrollPosition().X()); + scrollable_area->ScrollToAbsolutePosition(FloatPoint(8, 7)); UpdateAllLifecyclePhasesForTest(); auto* target = To<LayoutBlock>(GetLayoutObjectByElementId("target")); @@ -500,14 +513,15 @@ )HTML"); auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); - EXPECT_EQ(LayoutUnit(), container->ScrollTop()); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + EXPECT_EQ(0, scrollable_area->ScrollPosition().Y()); // The initial scroll offset is to the left-most because of flipped blocks // writing mode. // 150 = total_layout_overflow(100 + 100) - width(50) - EXPECT_EQ(LayoutUnit(150), container->ScrollLeft()); - container->SetScrollTop(LayoutUnit(7)); + EXPECT_EQ(150, scrollable_area->ScrollPosition().X()); // Scroll to the right by 8 pixels. - container->SetScrollLeft(LayoutUnit(142)); + scrollable_area->ScrollToAbsolutePosition(FloatPoint(142, 7)); UpdateAllLifecyclePhasesForTest(); auto* target = To<LayoutBlock>(GetLayoutObjectByElementId("target")); @@ -572,10 +586,11 @@ )HTML"); auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); - EXPECT_EQ(LayoutUnit(), container->ScrollTop()); - EXPECT_EQ(LayoutUnit(), container->ScrollLeft()); - container->SetScrollTop(LayoutUnit(27)); - container->SetScrollLeft(LayoutUnit(28)); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + EXPECT_EQ(0, scrollable_area->ScrollPosition().Y()); + EXPECT_EQ(0, scrollable_area->ScrollPosition().X()); + scrollable_area->ScrollToAbsolutePosition(FloatPoint(28, 27)); UpdateAllLifecyclePhasesForTest(); auto* target = To<LayoutBlock>(GetLayoutObjectByElementId("target")); @@ -605,13 +620,14 @@ )HTML"); auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); - EXPECT_EQ(LayoutUnit(), container->ScrollTop()); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + EXPECT_EQ(0, scrollable_area->ScrollPosition().Y()); // The initial scroll offset is to the left-most because of flipped blocks // writing mode. // 150 = total_layout_overflow(100 + 100) - width(50) - EXPECT_EQ(LayoutUnit(150), container->ScrollLeft()); - container->SetScrollTop(LayoutUnit(7)); - container->SetScrollLeft(LayoutUnit(82)); // Scroll to the right by 8 pixels. + EXPECT_EQ(150, scrollable_area->ScrollPosition().X()); + scrollable_area->ScrollToAbsolutePosition(FloatPoint(82, 7)); UpdateAllLifecyclePhasesForTest(); auto* target = To<LayoutBlock>(GetLayoutObjectByElementId("target")); @@ -644,14 +660,15 @@ )HTML"); auto* container = To<LayoutBlock>(GetLayoutObjectByElementId("container")); - EXPECT_EQ(LayoutUnit(), container->ScrollTop()); + auto* scrollable_area = + To<Element>(container->GetNode())->GetScrollableArea(); + EXPECT_EQ(0, scrollable_area->ScrollPosition().Y()); // The initial scroll offset is to the left-most because of flipped blocks // writing mode. // 150 = total_layout_overflow(100 + 100) - width(50) - EXPECT_EQ(LayoutUnit(150), container->ScrollLeft()); - container->SetScrollTop(LayoutUnit(7)); - container->SetScrollLeft( - LayoutUnit(142)); // Scroll to the right by 8 pixels. + EXPECT_EQ(150, scrollable_area->ScrollPosition().X()); + // Scroll to the right by 8 pixels. + scrollable_area->ScrollToAbsolutePosition(FloatPoint(142, 7)); UpdateAllLifecyclePhasesForTest(); auto* target = To<LayoutBlock>(GetLayoutObjectByElementId("target")); @@ -694,8 +711,9 @@ )HTML"); auto* scroller = To<LayoutBlock>(GetLayoutObjectByElementId("scroller")); - scroller->SetScrollTop(LayoutUnit(77)); - scroller->SetScrollLeft(LayoutUnit(88)); + To<Element>(scroller->GetNode()) + ->GetScrollableArea() + ->ScrollToAbsolutePosition(FloatPoint(88, 77)); UpdateAllLifecyclePhasesForTest(); auto* normal_flow =
diff --git a/third_party/blink/renderer/core/page/spatial_navigation.cc b/third_party/blink/renderer/core/page/spatial_navigation.cc index 53a2557..3814fd55 100644 --- a/third_party/blink/renderer/core/page/spatial_navigation.cc +++ b/third_party/blink/renderer/core/page/spatial_navigation.cc
@@ -263,7 +263,7 @@ case SpatialNavigationDirection::kRight: // TODO(bokan, https://crbug.com/952326): Fix this DCHECK. // DCHECK_GT(container->GetLayoutBox()->ScrollWidth(), - // container->GetLayoutBox()->ScrollLeft() + + // container->GetScrollableArea()->ScrollPosition().X() + // container->GetLayoutBox()->ClientWidth()); dx = pixels_per_line_step; break; @@ -273,7 +273,7 @@ case SpatialNavigationDirection::kDown: // TODO(bokan, https://crbug.com/952326): Fix this DCHECK. // DCHECK_GT(container->GetLayoutBox()->ScrollHeight(), - // container->GetLayoutBox()->ScrollTop() + + // container->GetScrollableArea()->ScrollPosition().Y() + // container->GetLayoutBox()->ClientHeight()); dy = pixels_per_line_step; break; @@ -358,26 +358,33 @@ if (!IsScrollableNode(container)) return false; + const Element* container_element = DynamicTo<Element>(container); + if (!container_element) + return false; + auto* scrollable_area = container_element->GetScrollableArea(); + if (!scrollable_area) + return false; + DCHECK(container->GetLayoutObject()); switch (direction) { case SpatialNavigationDirection::kLeft: return (container->GetLayoutObject()->Style()->OverflowX() != EOverflow::kHidden && - container->GetLayoutBox()->ScrollLeft() > 0); + scrollable_area->ScrollPosition().X() > 0); case SpatialNavigationDirection::kUp: return (container->GetLayoutObject()->Style()->OverflowY() != EOverflow::kHidden && - container->GetLayoutBox()->ScrollTop() > 0); + scrollable_area->ScrollPosition().Y() > 0); case SpatialNavigationDirection::kRight: return (container->GetLayoutObject()->Style()->OverflowX() != EOverflow::kHidden && - container->GetLayoutBox()->ScrollLeft() + + LayoutUnit(scrollable_area->ScrollPosition().X()) + container->GetLayoutBox()->ClientWidth() < container->GetLayoutBox()->ScrollWidth()); case SpatialNavigationDirection::kDown: return (container->GetLayoutObject()->Style()->OverflowY() != EOverflow::kHidden && - container->GetLayoutBox()->ScrollTop() + + LayoutUnit(scrollable_area->ScrollPosition().Y()) + container->GetLayoutBox()->ClientHeight() < container->GetLayoutBox()->ScrollHeight()); default:
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc index dae96c44..bc1bd55 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
@@ -3137,7 +3137,11 @@ int page_count = ceilf(view->DocumentRect().Height() / page_height); context_.fragments.resize(page_count); - context_.fragments[0].fixed_position.paint_offset.top -= view->ScrollTop(); + if (auto* scrollable_area = view->GetScrollableArea()) { + context_.fragments[0].fixed_position.paint_offset.top -= + LayoutUnit(scrollable_area->ScrollPosition().Y()); + } + for (int page = 1; page < page_count; page++) { context_.fragments[page] = context_.fragments[page - 1]; context_.fragments[page].fixed_position.paint_offset.top += page_height; @@ -3155,7 +3159,10 @@ context_.repeating_table_section_bounding_box = BoundingBoxInPaginationContainer(object_, *view->Layer()); // Convert the bounding box into the scrolling contents space. - context_.repeating_table_section_bounding_box.offset.top += view->ScrollTop(); + if (auto* scrollable_area = view->GetScrollableArea()) { + context_.repeating_table_section_bounding_box.offset.top += + LayoutUnit(scrollable_area->ScrollPosition().Y()); + } auto page_height = view->PageLogicalHeight(); const auto& bounding_box = context_.repeating_table_section_bounding_box;
diff --git a/third_party/blink/renderer/core/timing/performance_user_timing.cc b/third_party/blink/renderer/core/timing/performance_user_timing.cc index c097e1b..aac57ba 100644 --- a/third_party/blink/renderer/core/timing/performance_user_timing.cc +++ b/third_party/blink/renderer/core/timing/performance_user_timing.cc
@@ -25,15 +25,10 @@ #include "third_party/blink/renderer/core/timing/performance_user_timing.h" -#include "third_party/blink/public/platform/platform.h" -#include "third_party/blink/renderer/core/frame/local_dom_window.h" -#include "third_party/blink/renderer/core/timing/dom_window_performance.h" -#include "third_party/blink/renderer/core/timing/performance.h" #include "third_party/blink/renderer/core/timing/performance_mark.h" #include "third_party/blink/renderer/core/timing/performance_mark_options.h" #include "third_party/blink/renderer/core/timing/performance_measure.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h" -#include "third_party/blink/renderer/platform/instrumentation/histogram.h" #include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h" #include "third_party/blink/renderer/platform/wtf/text/string_hash.h" @@ -41,6 +36,7 @@ namespace { +typedef uint64_t (PerformanceTiming::*NavigationTimingFunction)() const; using RestrictedKeyMap = HashMap<AtomicString, NavigationTimingFunction>; const RestrictedKeyMap& GetRestrictedKeyMap() { @@ -148,10 +144,6 @@ TRACE_EVENT_COPY_MARK("blink.user_timing", mark.name().Utf8().c_str()); } InsertPerformanceEntry(marks_map_, mark); - DEFINE_THREAD_SAFE_STATIC_LOCAL(CustomCountHistogram, - user_timing_mark_histogram, - ("PLT.UserTiming_Mark", 0, 600000, 100)); - user_timing_mark_histogram.Count(static_cast<int>(mark.startTime())); } void UserTiming::ClearMarks(const AtomicString& mark_name) { @@ -255,12 +247,6 @@ if (!measure) return nullptr; InsertPerformanceEntry(measures_map_, *measure); - if (end_time >= start_time) { - DEFINE_THREAD_SAFE_STATIC_LOCAL( - CustomCountHistogram, measure_duration_histogram, - ("PLT.UserTiming_MeasureDuration", 0, 600000, 100)); - measure_duration_histogram.Count(static_cast<int>(end_time - start_time)); - } return measure; }
diff --git a/third_party/blink/renderer/core/timing/performance_user_timing.h b/third_party/blink/renderer/core/timing/performance_user_timing.h index fc8df66..2ee0502 100644 --- a/third_party/blink/renderer/core/timing/performance_user_timing.h +++ b/third_party/blink/renderer/core/timing/performance_user_timing.h
@@ -26,18 +26,16 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TIMING_PERFORMANCE_USER_TIMING_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_TIMING_PERFORMANCE_USER_TIMING_H_ -#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h" #include "third_party/blink/renderer/core/timing/performance.h" #include "third_party/blink/renderer/core/timing/performance_timing.h" -#include "third_party/blink/renderer/platform/heap/handle.h" -#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" +#include "third_party/blink/renderer/platform/heap/heap_allocator.h" +#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h" namespace blink { class ExceptionState; class Performance; -typedef uint64_t (PerformanceTiming::*NavigationTimingFunction)() const; using PerformanceEntryMap = HeapHashMap<AtomicString, PerformanceEntryVector>; class UserTiming final : public GarbageCollected<UserTiming> { @@ -82,4 +80,4 @@ } // namespace blink -#endif // !defined(PerformanceUserTiming_h) +#endif // THIRD_PARTY_BLINK_RENDERER_CORE_TIMING_PERFORMANCE_USER_TIMING_H_
diff --git a/third_party/blink/renderer/devtools/front_end/resources/BackgroundServiceView.js b/third_party/blink/renderer/devtools/front_end/resources/BackgroundServiceView.js index 6d26a148..d64cfe43d 100644 --- a/third_party/blink/renderer/devtools/front_end/resources/BackgroundServiceView.js +++ b/third_party/blink/renderer/devtools/front_end/resources/BackgroundServiceView.js
@@ -303,9 +303,10 @@ recordKey.textContent = UI.shortcutRegistry.shortcutDescriptorsForAction('background-service.toggle-recording')[0].name; - centered.createChild('p').appendChild(UI.formatLocalized( - 'Click the record button %s or hit %s to start recording.', - [UI.createInlineButton(landingRecordButton), recordKey])); + const inlineButton = UI.createInlineButton(landingRecordButton); + inlineButton.classList.add('background-service-record-inline-button'); + centered.createChild('p').appendChild( + UI.formatLocalized('Click the record button %s or hit %s to start recording.', [inlineButton, recordKey])); } this._preview.show(this._previewPanel.contentElement);
diff --git a/third_party/blink/renderer/devtools/front_end/resources/backgroundServiceView.css b/third_party/blink/renderer/devtools/front_end/resources/backgroundServiceView.css index 3b5591e2..0fd3c0c 100644 --- a/third_party/blink/renderer/devtools/front_end/resources/backgroundServiceView.css +++ b/third_party/blink/renderer/devtools/front_end/resources/backgroundServiceView.css
@@ -62,3 +62,7 @@ color: #888; font-style: italic; } + +.background-service-record-inline-button { + margin-bottom: 6px; +}
diff --git a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc index 4c09c9d..d4f06d5 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_node_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_node_object.cc
@@ -703,7 +703,7 @@ if (IsEmbeddedObject()) return ax::mojom::Role::kEmbeddedObject; - if (IsHTMLHRElement(*GetNode())) + if (IsA<HTMLHRElement>(*GetNode())) return ax::mojom::Role::kSplitter; if (IsFieldset())
diff --git a/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc b/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc index cde029d..b0e5de5 100644 --- a/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc +++ b/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc
@@ -540,16 +540,7 @@ SetCurrentTime(current_time); } -bool WorkletAnimation::StartOnCompositor() { - DCHECK(IsMainThread()); - // There is no need to proceed if an animation has already started on main - // thread. - // TODO(majidvp): If keyframes have changed then it may be possible to now - // run the animation on compositor. The current logic does not allow this - // switch from main to compositor to happen. https://crbug.com/972691. - if (running_on_main_thread_) - return false; - +bool WorkletAnimation::CanStartOnCompositor() { if (effects_.size() > 1) { // Compositor doesn't support multiple effects but they can be run via main. return false; @@ -571,9 +562,8 @@ GetEffect()->Model()->SnapshotAllCompositorKeyframesIfNecessary( target, target.ComputedStyleRef(), target.ParentComputedStyle()); - double playback_rate = 1; CompositorAnimations::FailureReasons failure_reasons = - GetEffect()->CheckCanStartAnimationOnCompositor(nullptr, playback_rate); + GetEffect()->CheckCanStartAnimationOnCompositor(nullptr, playback_rate_); if (failure_reasons != CompositorAnimations::kNoFailure) return false; @@ -581,6 +571,22 @@ if (!CheckElementComposited(target)) return false; + return true; +} + +bool WorkletAnimation::StartOnCompositor() { + DCHECK(IsMainThread()); + // There is no need to proceed if an animation has already started on main + // thread. + // TODO(majidvp): If keyframes have changed then it may be possible to now + // run the animation on compositor. The current logic does not allow this + // switch from main to compositor to happen. https://crbug.com/972691. + if (running_on_main_thread_) + return false; + + if (!CanStartOnCompositor()) + return false; + if (!compositor_animation_) { // TODO(smcgruer): If the scroll source later gets a LayoutBox (e.g. was // display:none and now isn't) or the writing mode changes, we need to @@ -599,7 +605,7 @@ document_->Timeline().CompositorTimeline()) compositor_timeline->AnimationAttached(*this); - CompositorAnimations::AttachCompositedLayers(target, + CompositorAnimations::AttachCompositedLayers(*GetEffect()->target(), compositor_animation_.get()); // TODO(smcgruer): We need to start all of the effects, not just the first. @@ -613,13 +619,21 @@ if (effect_needs_restart_) { // We want to update the keyframe effect on compositor animation without // destroying the compositor animation instance. This is achieved by - // canceling, and start the blink keyframe effect on compositor. + // canceling, and starting the blink keyframe effect on compositor. effect_needs_restart_ = false; GetEffect()->CancelAnimationOnCompositor(compositor_animation_.get()); - if (!GetEffect()->target()) { + if (!CanStartOnCompositor()) { + // Destroy the compositor animation if the animation is no longer + // compositable. + // + // TODO(821910): At the moment destroying the compositor animation + // instance also deletes the animator instance which is problematic for + // stateful animators. A more seamless hand-off is needed here and for + // pause. DestroyCompositorAnimation(); return false; } + StartEffectOnCompositor(compositor_animation_.get(), GetEffect()); }
diff --git a/third_party/blink/renderer/modules/animationworklet/worklet_animation.h b/third_party/blink/renderer/modules/animationworklet/worklet_animation.h index 4f17161..b11658dd 100644 --- a/third_party/blink/renderer/modules/animationworklet/worklet_animation.h +++ b/third_party/blink/renderer/modules/animationworklet/worklet_animation.h
@@ -147,6 +147,7 @@ bool IsCurrentTimeInitialized() const; base::Optional<base::TimeDelta> InitialCurrentTime() const; + bool CanStartOnCompositor(); // Attempts to start the animation on the compositor side, returning true if // it succeeds or false otherwise. If false is returned and the animation // cannot be started on main.
diff --git a/third_party/blink/renderer/modules/cache_storage/cache.cc b/third_party/blink/renderer/modules/cache_storage/cache.cc index d167d89..130fbe4 100644 --- a/third_party/blink/renderer/modules/cache_storage/cache.cc +++ b/third_party/blink/renderer/modules/cache_storage/cache.cc
@@ -45,6 +45,7 @@ #include "third_party/blink/renderer/platform/instrumentation/tracing/traced_value.h" #include "third_party/blink/renderer/platform/loader/fetch/cached_metadata.h" #include "third_party/blink/renderer/platform/network/http_names.h" +#include "third_party/blink/renderer/platform/network/http_parsers.h" #include "third_party/blink/renderer/platform/network/mime/mime_type_registry.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" #include "third_party/blink/renderer/platform/scheduler/worker/worker_thread_scheduler.h" @@ -67,6 +68,14 @@ return false; } +bool HasJavascriptMimeType(const Response* response) { + // Strip charset parameters from the MIME type since MIMETypeRegistry does + // not expect them to be present. + auto mime_type = + ExtractMIMETypeFromMediaType(AtomicString(response->InternalMIMEType())); + return MIMETypeRegistry::IsSupportedJavaScriptMIMEType(mime_type); +} + enum class CodeCacheGenerateTiming { kDontGenerate, kGenerateNow, @@ -85,10 +94,8 @@ if (!global_scope) return CodeCacheGenerateTiming::kDontGenerate; - if (!MIMETypeRegistry::IsSupportedJavaScriptMIMEType( - response->InternalMIMEType())) { + if (!HasJavascriptMimeType(response)) return CodeCacheGenerateTiming::kDontGenerate; - } if (!response->InternalBodyBuffer()) return CodeCacheGenerateTiming::kDontGenerate;
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc index 39c7b13..29ca9fb 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.cc
@@ -34,6 +34,7 @@ #include "third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h" #include "base/metrics/histogram_functions.h" +#include "base/rand_util.h" #include "third_party/blink/public/common/features.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/public/platform/task_type.h" @@ -133,7 +134,9 @@ canvas->GetDocument().GetTaskRunner(TaskType::kMiscPlatformAPI), this, &CanvasRenderingContext2D::TryRestoreContextEvent), - should_prune_local_font_cache_(false) { + should_prune_local_font_cache_(false), + random_generator_((uint32_t)base::RandUint64()), + bernoulli_distribution_(kRasterMetricProbability) { if (canvas->GetDocument().GetSettings() && canvas->GetDocument().GetSettings()->GetAntialiasedClips2dCanvasEnabled()) clip_antialiasing_ = kAntiAliased; @@ -576,10 +579,11 @@ new_font); // Create a string copy since newFont can be // deleted inside realizeSaves. ModifiableState().SetUnparsedFont(new_font_safe_copy); - - base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; - base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( - "Canvas.TextMetrics.SetFont", elapsed); + if (bernoulli_distribution_(random_generator_)) { + base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; + base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( + "Canvas.TextMetrics.SetFont", elapsed); + } } void CanvasRenderingContext2D::DidProcessTask( @@ -811,9 +815,11 @@ TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>( font, direction, GetState().GetTextBaseline(), GetState().GetTextAlign(), text); - base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; - base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( - "Canvas.TextMetrics.MeasureText", elapsed); + if (bernoulli_distribution_(random_generator_)) { + base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; + base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( + "Canvas.TextMetrics.MeasureText", elapsed); + } return text_metrics; }
diff --git a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h index 6a4c206..8d85a581 100644 --- a/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h +++ b/third_party/blink/renderer/modules/canvas/canvas2d/canvas_rendering_context_2d.h
@@ -27,6 +27,8 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_CANVAS_RENDERING_CONTEXT_2D_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_CANVAS2D_CANVAS_RENDERING_CONTEXT_2D_H_ +#include <random> + #include "base/macros.h" #include "third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h" #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h" @@ -270,6 +272,10 @@ HashMap<String, Font> fonts_resolved_using_current_style_; bool should_prune_local_font_cache_; LinkedHashSet<String> font_lru_list_; + + static constexpr float kRasterMetricProbability = 0.01; + std::mt19937 random_generator_; + std::bernoulli_distribution bernoulli_distribution_; }; } // namespace blink
diff --git a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.cc b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.cc index 8f166bc..685d7ea 100644 --- a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.cc +++ b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.cc
@@ -29,6 +29,7 @@ namespace { const size_t kHardMaxCachedFonts = 250; const size_t kMaxCachedFonts = 25; +const float kUMASampleProbability = 0.01; class OffscreenFontCache { public: @@ -77,7 +78,9 @@ OffscreenCanvasRenderingContext2D::OffscreenCanvasRenderingContext2D( OffscreenCanvas* canvas, const CanvasContextCreationAttributesCore& attrs) - : CanvasRenderingContext(canvas, attrs) { + : CanvasRenderingContext(canvas, attrs), + random_generator_((uint32_t)base::RandUint64()), + bernoulli_distribution_(kUMASampleProbability) { ExecutionContext* execution_context = canvas->GetTopExecutionContext(); if (auto* document = DynamicTo<Document>(execution_context)) { Settings* settings = document->GetSettings(); @@ -362,9 +365,11 @@ ModifiableState().SetFont(font, Host()->GetFontSelector()); } ModifiableState().SetUnparsedFont(new_font); - base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; - base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( - "OffscreenCanvas.TextMetrics.SetFont", elapsed); + if (bernoulli_distribution_(random_generator_)) { + base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; + base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( + "OffscreenCanvas.TextMetrics.SetFont", elapsed); + } } static inline TextDirection ToTextDirection( @@ -534,9 +539,11 @@ TextMetrics* text_metrics = MakeGarbageCollected<TextMetrics>( font, direction, GetState().GetTextBaseline(), GetState().GetTextAlign(), text); - base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; - base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( - "OffscreenCanvas.TextMetrics.MeasureText", elapsed); + if (bernoulli_distribution_(random_generator_)) { + base::TimeDelta elapsed = base::TimeTicks::Now() - start_time; + base::UmaHistogramMicrosecondsTimesUnderTenMilliseconds( + "OffscreenCanvas.TextMetrics.MeasureText", elapsed); + } return text_metrics; }
diff --git a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.h b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.h index 755f078..89270c56 100644 --- a/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.h +++ b/third_party/blink/renderer/modules/canvas/offscreencanvas2d/offscreen_canvas_rendering_context_2d.h
@@ -6,6 +6,8 @@ #define THIRD_PARTY_BLINK_RENDERER_MODULES_CANVAS_OFFSCREENCANVAS2D_OFFSCREEN_CANVAS_RENDERING_CONTEXT_2D_H_ #include <memory> +#include <random> + #include "third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h" #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context.h" #include "third_party/blink/renderer/core/html/canvas/canvas_rendering_context_factory.h" @@ -146,6 +148,9 @@ String ColorSpaceAsString() const override; CanvasPixelFormat PixelFormat() const override; SkIRect dirty_rect_for_commit_; + + std::mt19937 random_generator_; + std::bernoulli_distribution bernoulli_distribution_; }; DEFINE_TYPE_CASTS(OffscreenCanvasRenderingContext2D,
diff --git a/third_party/blink/renderer/modules/content_index/DEPS b/third_party/blink/renderer/modules/content_index/DEPS new file mode 100644 index 0000000..cf9e7414 --- /dev/null +++ b/third_party/blink/renderer/modules/content_index/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+base/barrier_closure.h", +]
diff --git a/third_party/blink/renderer/modules/content_index/content_index.cc b/third_party/blink/renderer/modules/content_index/content_index.cc index b319a58..97f7b70 100644 --- a/third_party/blink/renderer/modules/content_index/content_index.cc +++ b/third_party/blink/renderer/modules/content_index/content_index.cc
@@ -4,6 +4,7 @@ #include "third_party/blink/renderer/modules/content_index/content_index.h" +#include "base/barrier_closure.h" #include "base/optional.h" #include "base/time/time.h" #include "services/service_manager/public/cpp/interface_provider.h" @@ -64,6 +65,20 @@ return WTF::String(); } +void FetchIcon(ExecutionContext* execution_context, + const KURL& icon_url, + const WebSize& icon_size, + ThreadedIconLoader::IconCallback callback) { + ResourceRequest resource_request(icon_url); + resource_request.SetRequestContext(mojom::RequestContextType::IMAGE); + resource_request.SetPriority(ResourceLoadPriority::kMedium); + resource_request.SetTimeoutInterval(kIconFetchTimeout); + + auto* threaded_icon_loader = MakeGarbageCollected<ThreadedIconLoader>(); + threaded_icon_loader->Start(execution_context, resource_request, icon_size, + std::move(callback)); +} + } // namespace ContentIndex::ContentIndex(ServiceWorkerRegistration* registration, @@ -95,44 +110,66 @@ auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); ScriptPromise promise = resolver->Promise(); - KURL icon_url = - registration_->GetExecutionContext()->CompleteURL(description->iconUrl()); - ResourceRequest resource_request(icon_url); - resource_request.SetRequestContext(mojom::RequestContextType::IMAGE); - resource_request.SetPriority(ResourceLoadPriority::kMedium); - resource_request.SetTimeoutInterval(kIconFetchTimeout); - - auto* threaded_icon_loader = MakeGarbageCollected<ThreadedIconLoader>(); - // TODO(crbug.com/973844): Use ideal icon dimensions instead of the max. - threaded_icon_loader->Start( - registration_->GetExecutionContext(), resource_request, - /* resize_dimensions= */ WebSize(256, 256), - WTF::Bind(&ContentIndex::DidGetIcon, WrapPersistent(this), - WrapPersistent(resolver), WrapPersistent(threaded_icon_loader), - mojom::blink::ContentDescription::From(description))); + auto mojo_description = mojom::blink::ContentDescription::From(description); + auto category = mojo_description->category; + GetService()->GetIconSizes( + category, + WTF::Bind(&ContentIndex::DidGetIconSizes, WrapPersistent(this), + WrapPersistent(resolver), std::move(mojo_description))); return promise; } -void ContentIndex::DidGetIcon(ScriptPromiseResolver* resolver, - ThreadedIconLoader* loader, - mojom::blink::ContentDescriptionPtr description, - SkBitmap icon, - double resize_scale) { +void ContentIndex::DidGetIconSizes( + ScriptPromiseResolver* resolver, + mojom::blink::ContentDescriptionPtr description, + const Vector<WebSize>& icon_sizes) { + KURL icon_url = + registration_->GetExecutionContext()->CompleteURL(description->icon_url); + + auto icons = std::make_unique<Vector<SkBitmap>>(); + icons->ReserveCapacity(icon_sizes.size()); + Vector<SkBitmap>* icons_ptr = icons.get(); + auto barrier_closure = base::BarrierClosure( + icon_sizes.size(), + WTF::Bind(&ContentIndex::DidGetIcons, WrapPersistent(this), + WrapPersistent(resolver), std::move(description), + std::move(icons))); + + for (const auto& icon_size : icon_sizes) { + // |icons_ptr| is safe to use since it is owned by |barrier_closure|. + FetchIcon( + registration_->GetExecutionContext(), icon_url, icon_size, + WTF::Bind( + [](base::OnceClosure done_closure, Vector<SkBitmap>* icons_ptr, + SkBitmap icon, double resize_scale) { + icons_ptr->push_back(std::move(icon)); + std::move(done_closure).Run(); + }, + barrier_closure, WTF::Unretained(icons_ptr))); + } +} + +void ContentIndex::DidGetIcons(ScriptPromiseResolver* resolver, + mojom::blink::ContentDescriptionPtr description, + std::unique_ptr<Vector<SkBitmap>> icons) { + DCHECK(icons); ScriptState* script_state = resolver->GetScriptState(); ScriptState::Scope scope(script_state); - if (icon.isNull()) { - resolver->Reject(V8ThrowException::CreateTypeError( - script_state->GetIsolate(), "Icon could not be loaded")); - return; + for (const auto& icon : *icons) { + if (icon.isNull()) { + resolver->Reject(V8ThrowException::CreateTypeError( + script_state->GetIsolate(), "Icon could not be loaded")); + return; + } } KURL launch_url = registration_->GetExecutionContext()->CompleteURL( description->launch_url); GetService()->Add(registration_->RegistrationId(), std::move(description), - {std::move(icon)}, launch_url, + *icons, launch_url, WTF::Bind(&ContentIndex::DidAdd, WrapPersistent(this), WrapPersistent(resolver))); }
diff --git a/third_party/blink/renderer/modules/content_index/content_index.h b/third_party/blink/renderer/modules/content_index/content_index.h index 8ffc627..569c50ee 100644 --- a/third_party/blink/renderer/modules/content_index/content_index.h +++ b/third_party/blink/renderer/modules/content_index/content_index.h
@@ -18,7 +18,6 @@ class ScriptPromiseResolver; class ScriptState; class ServiceWorkerRegistration; -class ThreadedIconLoader; class ContentIndex final : public ScriptWrappable { DEFINE_WRAPPERTYPEINFO(); @@ -40,11 +39,12 @@ mojom::blink::ContentIndexService* GetService(); // Callbacks. - void DidGetIcon(ScriptPromiseResolver* resolver, - ThreadedIconLoader* loader, - mojom::blink::ContentDescriptionPtr description, - SkBitmap icon, - double resize_scale); + void DidGetIconSizes(ScriptPromiseResolver* resolver, + mojom::blink::ContentDescriptionPtr description, + const Vector<WebSize>& icon_sizes); + void DidGetIcons(ScriptPromiseResolver* resolver, + mojom::blink::ContentDescriptionPtr description, + std::unique_ptr<Vector<SkBitmap>> icons); void DidAdd(ScriptPromiseResolver* resolver, mojom::blink::ContentIndexError error); void DidDeleteDescription(ScriptPromiseResolver* resolver,
diff --git a/third_party/blink/renderer/modules/device_orientation/BUILD.gn b/third_party/blink/renderer/modules/device_orientation/BUILD.gn index 40a0c8b..3a8e13d 100644 --- a/third_party/blink/renderer/modules/device_orientation/BUILD.gn +++ b/third_party/blink/renderer/modules/device_orientation/BUILD.gn
@@ -37,4 +37,7 @@ "dom_window_device_motion.h", "dom_window_device_orientation.h", ] + deps = [ + "//services/device/public/mojom:generic_sensor", + ] }
diff --git a/third_party/blink/renderer/modules/exported/BUILD.gn b/third_party/blink/renderer/modules/exported/BUILD.gn index 835a823..01feb46 100644 --- a/third_party/blink/renderer/modules/exported/BUILD.gn +++ b/third_party/blink/renderer/modules/exported/BUILD.gn
@@ -17,6 +17,10 @@ ] defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ] + + deps = [ + "//ui/accessibility:ax_enums_mojo_blink", + ] } static_library("test_support") {
diff --git a/third_party/blink/renderer/modules/filesystem/dom_window_file_system.cc b/third_party/blink/renderer/modules/filesystem/dom_window_file_system.cc index dd3bfd1d..12f09dc 100644 --- a/third_party/blink/renderer/modules/filesystem/dom_window_file_system.cc +++ b/third_party/blink/renderer/modules/filesystem/dom_window_file_system.cc
@@ -78,6 +78,12 @@ return; } + if (file_system_type == mojom::blink::FileSystemType::kTemporary) { + UseCounter::Count(document, WebFeature::kRequestedFileSystemTemporary); + } else if (file_system_type == mojom::blink::FileSystemType::kPersistent) { + UseCounter::Count(document, WebFeature::kRequestedFileSystemPersistent); + } + auto success_callback_wrapper = AsyncCallbackHelper::SuccessCallback<DOMFileSystem>(success_callback);
diff --git a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc index af00b1c..75b53fb0 100644 --- a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc +++ b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.cc
@@ -601,4 +601,8 @@ cancellable_operations_.erase(it); } +void FileSystemDispatcher::Prefinalize() { + op_listeners_.CloseAllBindings(); +} + } // namespace blink
diff --git a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h index ea012ca5..4491c0e 100644 --- a/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h +++ b/third_party/blink/renderer/modules/filesystem/file_system_dispatcher.h
@@ -31,6 +31,7 @@ : public GarbageCollectedFinalized<FileSystemDispatcher>, public Supplement<ExecutionContext> { USING_GARBAGE_COLLECTED_MIXIN(FileSystemDispatcher); + USING_PRE_FINALIZER(FileSystemDispatcher, Prefinalize); public: using StatusCallback = base::OnceCallback<void(base::File::Error error)>; @@ -194,6 +195,8 @@ void RemoveOperationPtr(int operation_id); + void Prefinalize(); + mojo::Remote<mojom::blink::FileSystemManager> file_system_manager_; using OperationsMap = HashMap<int, mojom::blink::FileSystemCancellableOperationPtr>;
diff --git a/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.cc b/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.cc index 61f4c04..c51ecc54 100644 --- a/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.cc +++ b/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.cc
@@ -139,9 +139,9 @@ ImageDownloaderImpl::~ImageDownloaderImpl() {} void ImageDownloaderImpl::CreateMojoService( - mojom::blink::ImageDownloaderRequest request) { - binding_.Bind(std::move(request)); - binding_.set_connection_error_handler( + mojo::PendingReceiver<mojom::blink::ImageDownloader> receiver) { + receiver_.Bind(std::move(receiver)); + receiver_.set_disconnect_handler( WTF::Bind(&ImageDownloaderImpl::Dispose, WrapWeakPersistent(this))); } @@ -187,7 +187,7 @@ } void ImageDownloaderImpl::Dispose() { - binding_.Close(); + receiver_.reset(); } void ImageDownloaderImpl::FetchImage(const KURL& image_url,
diff --git a/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.h b/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.h index 9d768d57..90211f4 100644 --- a/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.h +++ b/third_party/blink/renderer/modules/image_downloader/image_downloader_impl.h
@@ -5,7 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_IMAGE_DOWNLOADER_IMAGE_DOWNLOADER_IMPL_H_ -#include "mojo/public/cpp/bindings/binding.h" +#include "mojo/public/cpp/bindings/receiver.h" #include "third_party/blink/public/mojom/image_downloader/image_downloader.mojom-blink.h" #include "third_party/blink/renderer/core/execution_context/context_lifecycle_observer.h" #include "third_party/blink/renderer/platform/supplementable.h" @@ -61,7 +61,8 @@ int32_t http_status_code, const WTF::Vector<SkBitmap>& images); - void CreateMojoService(mojom::blink::ImageDownloaderRequest request); + void CreateMojoService( + mojo::PendingReceiver<mojom::blink::ImageDownloader> receiver); // USING_PRE_FINALIZER interface. // Called before the object gets garbage collected. @@ -89,7 +90,7 @@ // ImageResourceFetchers schedule via FetchImage. ImageResourceFetcherList image_fetchers_; - mojo::Binding<mojom::blink::ImageDownloader> binding_{this}; + mojo::Receiver<mojom::blink::ImageDownloader> receiver_{this}; DISALLOW_COPY_AND_ASSIGN(ImageDownloaderImpl); };
diff --git a/third_party/blink/renderer/modules/media_capabilities/BUILD.gn b/third_party/blink/renderer/modules/media_capabilities/BUILD.gn index 4774828..61c308cff 100644 --- a/third_party/blink/renderer/modules/media_capabilities/BUILD.gn +++ b/third_party/blink/renderer/modules/media_capabilities/BUILD.gn
@@ -15,6 +15,9 @@ "worker_navigator_media_capabilities.cc", "worker_navigator_media_capabilities.h", ] + deps = [ + "//third_party/blink/renderer/modules/mediarecorder", + ] } fuzzable_proto_library("fuzzer_media_configuration_proto") {
diff --git a/third_party/blink/renderer/modules/mediastream/BUILD.gn b/third_party/blink/renderer/modules/mediastream/BUILD.gn index 65fce9a..298c67bd 100644 --- a/third_party/blink/renderer/modules/mediastream/BUILD.gn +++ b/third_party/blink/renderer/modules/mediastream/BUILD.gn
@@ -89,6 +89,9 @@ "webmediaplayer_ms_compositor.cc", "webmediaplayer_ms_compositor.h", ] + deps = [ + "//media/capture/mojom:image_capture_blink", + ] } jumbo_source_set("test_support") {
diff --git a/third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.cc b/third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.cc index ec81de6c..64c01ffd 100644 --- a/third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.cc +++ b/third_party/blink/renderer/modules/mediastream/mock_media_stream_video_sink.cc
@@ -13,8 +13,7 @@ : number_of_frames_(0), enabled_(true), format_(media::PIXEL_FORMAT_UNKNOWN), - state_(blink::WebMediaStreamSource::kReadyStateLive), - weak_factory_(this) {} + state_(blink::WebMediaStreamSource::kReadyStateLive) {} MockMediaStreamVideoSink::~MockMediaStreamVideoSink() {}
diff --git a/third_party/blink/renderer/modules/mediastream/user_media_client_impl.cc b/third_party/blink/renderer/modules/mediastream/user_media_client_impl.cc index b73cf6c..b6bb6e7458 100644 --- a/third_party/blink/renderer/modules/mediastream/user_media_client_impl.cc +++ b/third_party/blink/renderer/modules/mediastream/user_media_client_impl.cc
@@ -251,10 +251,9 @@ is_processing_request_ = false; if (!pending_request_infos_.empty()) { frame_->GetTaskRunner(blink::TaskType::kInternalMedia) - ->PostTask( - FROM_HERE, - base::BindOnce(&UserMediaClientImpl::MaybeProcessNextRequestInfo, - weak_factory_.GetWeakPtr())); + ->PostTask(FROM_HERE, + WTF::Bind(&UserMediaClientImpl::MaybeProcessNextRequestInfo, + weak_factory_.GetWeakPtr())); } }
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc index 10f109b..a40b6f0 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
@@ -3301,11 +3301,9 @@ MediaStreamObserver::Trace(visitor); } -base::TimeTicks RTCPeerConnection::WebRtcMsToBlinkTimeTicks( - double webrtc_monotonic_time_ms) const { - return base::TimeTicks() + - base::TimeDelta::FromMilliseconds(webrtc_monotonic_time_ms) + - blink_webrtc_time_diff_; +base::TimeTicks RTCPeerConnection::WebRtcTimestampToBlinkTimestamp( + base::TimeTicks webrtc_monotonic_time) const { + return webrtc_monotonic_time + blink_webrtc_time_diff_; } int RTCPeerConnection::PeerConnectionCount() {
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h index 1cd005d..939d2821 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.h
@@ -358,8 +358,8 @@ void Trace(blink::Visitor*) override; - base::TimeTicks WebRtcMsToBlinkTimeTicks( - double webrtc_monotonic_time_ms) const; + base::TimeTicks WebRtcTimestampToBlinkTimestamp( + base::TimeTicks webrtc_monotonic_time) const; private: FRIEND_TEST_ALL_PREFIXES(RTCPeerConnectionTest, GetAudioTrack);
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc index d6bd48d..6efc41f5 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_rtp_receiver.cc
@@ -83,7 +83,7 @@ synchronization_source->setTimestamp( time_converter .MonotonicTimeToPseudoWallTime( - pc_->WebRtcMsToBlinkTimeTicks(web_source->TimestampMs())) + pc_->WebRtcTimestampToBlinkTimestamp(web_source->Timestamp())) .InMilliseconds()); synchronization_source->setSource(web_source->Source()); if (web_source->AudioLevel()) @@ -110,7 +110,7 @@ contributing_source->setTimestamp( time_converter .MonotonicTimeToPseudoWallTime( - pc_->WebRtcMsToBlinkTimeTicks(web_source->TimestampMs())) + pc_->WebRtcTimestampToBlinkTimestamp(web_source->Timestamp())) .InMilliseconds()); contributing_source->setSource(web_source->Source()); if (web_source->AudioLevel())
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.idl b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.idl index db68a46..88ad7c0 100644 --- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.idl +++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope.idl
@@ -38,8 +38,6 @@ readonly attribute Clients clients; readonly attribute ServiceWorkerRegistration registration; - [CallWith=ScriptState, RaisesException] Promise<Response> fetch(RequestInfo input, optional RequestInit init); - [CallWith=ScriptState] Promise<void> skipWaiting(); attribute EventHandler onactivate;
diff --git a/third_party/blink/renderer/modules/xr/xr_session.cc b/third_party/blink/renderer/modules/xr/xr_session.cc index e032d0b..28a20fa 100644 --- a/third_party/blink/renderer/modules/xr/xr_session.cc +++ b/third_party/blink/renderer/modules/xr/xr_session.cc
@@ -134,6 +134,7 @@ sensorless_session_(sensorless_session) { render_state_ = MakeGarbageCollected<XRRenderState>(immersive()); blurred_ = !HasAppropriateFocus(); + visibility_state_string_ = HasAppropriateFocus() ? "visible" : "hidden"; switch (environment_blend_mode) { case kBlendModeOpaque: @@ -537,7 +538,9 @@ return; blurred_ = false; - DispatchEvent(*XRSessionEvent::Create(event_type_names::kFocus, this)); + visibility_state_string_ = "visible"; + DispatchEvent( + *XRSessionEvent::Create(event_type_names::kVisibilitychange, this)); } void XRSession::OnBlur() { @@ -545,7 +548,9 @@ return; blurred_ = true; - DispatchEvent(*XRSessionEvent::Create(event_type_names::kBlur, this)); + visibility_state_string_ = "hidden"; + DispatchEvent( + *XRSessionEvent::Create(event_type_names::kVisibilitychange, this)); } // Immersive sessions may still not be blurred in headset even if the page isn't
diff --git a/third_party/blink/renderer/modules/xr/xr_session.h b/third_party/blink/renderer/modules/xr/xr_session.h index 4105210..6ab5fe2 100644 --- a/third_party/blink/renderer/modules/xr/xr_session.h +++ b/third_party/blink/renderer/modules/xr/xr_session.h
@@ -73,19 +73,19 @@ XR* xr() const { return xr_; } const String& environmentBlendMode() const { return blend_mode_string_; } + const String& visibilityState() const { return visibility_state_string_; } XRRenderState* renderState() const { return render_state_; } XRWorldTrackingState* worldTrackingState() { return world_tracking_state_; } XRSpace* viewerSpace() const; bool immersive() const; - DEFINE_ATTRIBUTE_EVENT_LISTENER(blur, kBlur) - DEFINE_ATTRIBUTE_EVENT_LISTENER(focus, kFocus) DEFINE_ATTRIBUTE_EVENT_LISTENER(end, kEnd) DEFINE_ATTRIBUTE_EVENT_LISTENER(select, kSelect) DEFINE_ATTRIBUTE_EVENT_LISTENER(inputsourceschange, kInputsourceschange) DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart, kSelectstart) DEFINE_ATTRIBUTE_EVENT_LISTENER(selectend, kSelectend) + DEFINE_ATTRIBUTE_EVENT_LISTENER(visibilitychange, kVisibilitychange) void updateRenderState(XRRenderStateInit* render_state_init, ExceptionState& exception_state); @@ -232,6 +232,7 @@ const SessionMode mode_; const bool environment_integration_; String blend_mode_string_; + String visibility_state_string_; Member<XRRenderState> render_state_; Member<XRWorldTrackingState> world_tracking_state_; Member<XRWorldInformation> world_information_;
diff --git a/third_party/blink/renderer/modules/xr/xr_session.idl b/third_party/blink/renderer/modules/xr/xr_session.idl index cb850363..293af1a 100644 --- a/third_party/blink/renderer/modules/xr/xr_session.idl +++ b/third_party/blink/renderer/modules/xr/xr_session.idl
@@ -16,6 +16,12 @@ "alpha-blend", }; +enum XRVisibilityState { + "visible", + "visible-blurred", + "hidden", +}; + [ ActiveScriptWrappable, SecureContext, @@ -23,16 +29,16 @@ RuntimeEnabled=WebXR ] interface XRSession : EventTarget { readonly attribute XREnvironmentBlendMode environmentBlendMode; + readonly attribute XRVisibilityState visibilityState; [SameObject] readonly attribute XRRenderState renderState; [MeasureAs=XRSessionGetInputSources, SameObject] readonly attribute XRInputSourceArray inputSources; - attribute EventHandler onblur; - attribute EventHandler onfocus; attribute EventHandler onend; attribute EventHandler onselect; attribute EventHandler oninputsourceschange; attribute EventHandler onselectstart; attribute EventHandler onselectend; + attribute EventHandler onvisibilitychange; [RaisesException] void updateRenderState(optional XRRenderStateInit init);
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index f79e45f..2a710ada 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -116,6 +116,14 @@ RuntimeEnabledFeatures::SetCacheInlineScriptCodeEnabled(enable); } +void WebRuntimeFeatures::EnableCookieDeprecationMessages(bool enable) { + RuntimeEnabledFeatures::SetCookieDeprecationMessagesEnabled(enable); +} + +void WebRuntimeFeatures::EnableCookiesWithoutSameSiteMustBeSecure(bool enable) { + RuntimeEnabledFeatures::SetCookiesWithoutSameSiteMustBeSecureEnabled(enable); +} + void WebRuntimeFeatures::EnableWasmCodeCache(bool enable) { RuntimeEnabledFeatures::SetWasmCodeCacheEnabled(enable); } @@ -140,6 +148,10 @@ RuntimeEnabledFeatures::SetCSSHexAlphaColorEnabled(enable); } +void WebRuntimeFeatures::EnableSameSiteByDefaultCookies(bool enable) { + RuntimeEnabledFeatures::SetSameSiteByDefaultCookiesEnabled(enable); +} + void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) { RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable); }
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource.cc b/third_party/blink/renderer/platform/graphics/canvas_resource.cc index 0a04302c..b0e44fd 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource.cc
@@ -685,7 +685,8 @@ SkFilterQuality filter_quality, const CanvasColorParams& color_params, bool is_overlay_candidate, - bool is_origin_top_left) + bool is_origin_top_left, + bool allow_concurrent_read_write_access) : CanvasResource(std::move(provider), filter_quality, color_params), context_provider_wrapper_(std::move(context_provider_wrapper)), is_overlay_candidate_(is_overlay_candidate), @@ -713,6 +714,8 @@ gpu::SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT; if (is_overlay_candidate_) flags |= gpu::SHARED_IMAGE_USAGE_SCANOUT; + if (allow_concurrent_read_write_access) + flags |= gpu::SHARED_IMAGE_USAGE_CONCURRENT_READ_WRITE; auto shared_image_mailbox = shared_image_interface->CreateSharedImage( ColorParams().TransferableResourceFormat(), gfx::Size(size), @@ -724,8 +727,15 @@ auto* gl = ContextGL(); DCHECK(gl); owning_thread_data().shared_image_mailbox = shared_image_mailbox; - owning_thread_data().texture_id = + owning_thread_data().texture_id_for_read_access = gl->CreateAndTexStorage2DSharedImageCHROMIUM(shared_image_mailbox.name); + if (allow_concurrent_read_write_access) { + owning_thread_data().texture_id_for_write_access = + gl->CreateAndTexStorage2DSharedImageCHROMIUM(shared_image_mailbox.name); + } else { + owning_thread_data().texture_id_for_write_access = + owning_thread_data().texture_id_for_read_access; + } } scoped_refptr<CanvasResourceSharedImage> CanvasResourceSharedImage::Create( @@ -735,11 +745,13 @@ SkFilterQuality filter_quality, const CanvasColorParams& color_params, bool is_overlay_candidate, - bool is_origin_top_left) { + bool is_origin_top_left, + bool allow_concurrent_read_write_access) { TRACE_EVENT0("blink", "CanvasResourceSharedImage::Create"); auto resource = base::AdoptRef(new CanvasResourceSharedImage( size, std::move(context_provider_wrapper), std::move(provider), - filter_quality, color_params, is_overlay_candidate, is_origin_top_left)); + filter_quality, color_params, is_overlay_candidate, is_origin_top_left, + allow_concurrent_read_write_access)); return resource->IsValid() ? resource : nullptr; } @@ -768,10 +780,19 @@ shared_image_interface->DestroySharedImage(shared_image_sync_token, mailbox()); } - if (gl && owning_thread_data().texture_id) - gl->DeleteTextures(1, &owning_thread_data().texture_id); + if (gl) { + if (owning_thread_data().texture_id_for_read_access) { + gl->DeleteTextures(1, &owning_thread_data().texture_id_for_read_access); + } + if (owning_thread_data().texture_id_for_write_access) { + gl->DeleteTextures(1, + &owning_thread_data().texture_id_for_write_access); + } + } } - owning_thread_data().texture_id = 0u; + + owning_thread_data().texture_id_for_read_access = 0u; + owning_thread_data().texture_id_for_write_access = 0u; } void CanvasResourceSharedImage::Abandon() { @@ -815,7 +836,7 @@ if (resource->owning_thread_data().bitmap_image_read_refs == 0u && resource->ContextGL()) { resource->ContextGL()->EndSharedImageAccessDirectCHROMIUM( - resource->owning_thread_data().texture_id); + resource->owning_thread_data().texture_id_for_read_access); } } @@ -859,7 +880,7 @@ const bool has_read_ref_on_texture = !is_cross_thread(); GLuint texture_id_for_image = 0u; if (has_read_ref_on_texture) { - texture_id_for_image = owning_thread_data().texture_id; + texture_id_for_image = owning_thread_data().texture_id_for_read_access; owning_thread_data().bitmap_image_read_refs++; if (owning_thread_data().bitmap_image_read_refs == 1u && ContextGL()) { ContextGL()->BeginSharedImageAccessDirectCHROMIUM( @@ -919,7 +940,7 @@ !WeakProvider()) return; - ContextGL()->BindTexture(TextureTarget(), GetTextureIdForBackendTexture()); + ContextGL()->BindTexture(TextureTarget(), GetTextureIdForReadAccess()); ContextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GLFilter()); ContextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GLFilter()); ContextGL()->BindTexture(TextureTarget(), 0u);
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource.h b/third_party/blink/renderer/platform/graphics/canvas_resource.h index 0e0f682..d402fbb 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource.h +++ b/third_party/blink/renderer/platform/graphics/canvas_resource.h
@@ -334,7 +334,8 @@ SkFilterQuality, const CanvasColorParams&, bool is_overlay_candidate, - bool is_origin_top_left); + bool is_origin_top_left, + bool allow_concurrent_read_write_access); ~CanvasResourceSharedImage() override; bool IsRecycleable() const final { return true; } @@ -359,9 +360,13 @@ void TakeSkImage(sk_sp<SkImage> image) final { NOTREACHED(); } void NotifyResourceLost() final; - GLuint GetTextureIdForBackendTexture() const { - return owning_thread_data().texture_id; + GLuint GetTextureIdForReadAccess() const { + return owning_thread_data().texture_id_for_read_access; } + GLuint GetTextureIdForWriteAccess() const { + return owning_thread_data().texture_id_for_write_access; + } + void WillDraw(); bool is_cross_thread() const { return base::PlatformThread::CurrentId() != owning_thread_id_; @@ -382,9 +387,16 @@ gpu::SyncToken sync_token; bool needs_gl_filter_reset = true; size_t bitmap_image_read_refs = 0u; - GLuint texture_id = 0u; MailboxSyncMode mailbox_sync_mode = kVerifiedSyncToken; bool is_lost = false; + + // We need to create 2 representations if canvas is operating in single + // buffered mode to allow concurrent scopes for read and write access, + // because the Begin/EndSharedImageAccessDirectCHROMIUM APIs allow only one + // active access mode for a representation. + // In non single buffered mode, the 2 texture ids are the same. + GLuint texture_id_for_read_access = 0u; + GLuint texture_id_for_write_access = 0u; }; static void OnBitmapImageDestroyed( @@ -409,7 +421,8 @@ SkFilterQuality, const CanvasColorParams&, bool is_overlay_candidate, - bool is_origin_top_left); + bool is_origin_top_left, + bool allow_concurrent_read_write_access); void SetGLFilterIfNeeded(); OwningThreadData& owning_thread_data() {
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc index 9eb1749..8176b93 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -465,7 +465,8 @@ context_provider_wrapper, base::WeakPtr<CanvasResourceDispatcher> resource_dispatcher, bool is_origin_top_left, - bool is_overlay_candidate) + bool is_overlay_candidate, + bool maybe_single_buffered) : CanvasResourceProvider( kSharedImage, size, @@ -474,7 +475,8 @@ std::move(resource_dispatcher)), msaa_sample_count_(msaa_sample_count), is_origin_top_left_(is_origin_top_left), - is_overlay_candidate_(is_overlay_candidate) { + is_overlay_candidate_(is_overlay_candidate), + maybe_single_buffered_(maybe_single_buffered) { resource_ = NewOrRecycledResource(); if (resource_) EnsureWriteAccess(); @@ -485,14 +487,16 @@ bool IsValid() const final { return GetSkSurface() && !IsGpuContextLost(); } bool IsAccelerated() const final { return true; } bool SupportsDirectCompositing() const override { return true; } - bool SupportsSingleBuffering() const override { return false; } + bool SupportsSingleBuffering() const override { + return maybe_single_buffered_; + } GLuint GetBackingTextureHandleForOverwrite() override { if (IsGpuContextLost()) return 0u; FlushGrContext(); WillDraw(); - return resource()->GetTextureIdForBackendTexture(); + return resource()->GetTextureIdForWriteAccess(); } scoped_refptr<CanvasResource> CreateResource() final { @@ -500,9 +504,11 @@ if (IsGpuContextLost()) return nullptr; + bool allow_concurrent_read_write_access = maybe_single_buffered_; return CanvasResourceSharedImage::Create( Size(), ContextProviderWrapper(), CreateWeakPtr(), FilterQuality(), - ColorParams(), is_overlay_candidate_, is_origin_top_left_); + ColorParams(), is_overlay_candidate_, is_origin_top_left_, + allow_concurrent_read_write_access); } void NotifyTexParamsModified(const CanvasResource* resource) override { @@ -568,6 +574,9 @@ // Since the resource will be updated, the cached snapshot is no longer // valid. Note that it is important to release this reference here to not // trigger copy-on-write below from the resource ref in the snapshot. + // Note that this is valid for single buffered mode also, since while the + // resource/mailbox remains the same, the snapshot needs an updated sync + // token for these writes. cached_snapshot_.reset(); if (DoCopyOnWrite()) { @@ -585,7 +594,7 @@ // Take read access to the outgoing resource for the skia copy below. if (!old_resource_shared_image->has_read_access()) { ContextGL()->BeginSharedImageAccessDirectCHROMIUM( - old_resource_shared_image->GetTextureIdForBackendTexture(), + old_resource_shared_image->GetTextureIdForReadAccess(), GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM); } surface_->replaceBackendTexture(CreateGrTextureForResource(), @@ -593,7 +602,7 @@ surface_->flush(); if (!old_resource_shared_image->has_read_access()) { ContextGL()->EndSharedImageAccessDirectCHROMIUM( - old_resource_shared_image->GetTextureIdForBackendTexture()); + old_resource_shared_image->GetTextureIdForReadAccess()); } } } @@ -607,6 +616,11 @@ if (resource()->is_lost()) return true; + // If the canvas is single buffered, concurrent read/writes to the resource + // are allowed. + if (IsSingleBuffered()) + return false; + // We have the only ref to the resource which implies there are no active // readers. if (resource_->HasOneRef()) @@ -639,7 +653,7 @@ GrBackendTexture CreateGrTextureForResource() const { GrGLTextureInfo texture_info = {}; - texture_info.fID = resource()->GetTextureIdForBackendTexture(); + texture_info.fID = resource()->GetTextureIdForWriteAccess(); texture_info.fTarget = resource_->TextureTarget(); texture_info.fFormat = ColorParams().GLSizedInternalFormat(); return GrBackendTexture(Size().Width(), Size().Height(), GrMipMapped::kNo, @@ -660,7 +674,7 @@ void EnsureWriteAccess() { DCHECK(resource_); - DCHECK(resource_->HasOneRef()) + DCHECK(resource_->HasOneRef() || IsSingleBuffered()) << "Write access requires exclusive access to the resource"; DCHECK(!resource()->is_cross_thread()) << "Write access is only allowed on the owning thread"; @@ -668,7 +682,7 @@ if (current_resource_has_write_access_ || IsGpuContextLost()) return; - auto texture_id = resource()->GetTextureIdForBackendTexture(); + auto texture_id = resource()->GetTextureIdForWriteAccess(); ContextGL()->BeginSharedImageAccessDirectCHROMIUM( texture_id, GL_SHARED_IMAGE_ACCESS_MODE_READWRITE_CHROMIUM); current_resource_has_write_access_ = true; @@ -682,7 +696,7 @@ // Issue any skia work using this resource before releasing write access. FlushGrContext(); - auto texture_id = resource()->GetTextureIdForBackendTexture(); + auto texture_id = resource()->GetTextureIdForWriteAccess(); ContextGL()->EndSharedImageAccessDirectCHROMIUM(texture_id); current_resource_has_write_access_ = false; } @@ -697,6 +711,7 @@ const unsigned msaa_sample_count_; const bool is_origin_top_left_; const bool is_overlay_candidate_; + const bool maybe_single_buffered_; bool current_resource_has_write_access_ = false; scoped_refptr<CanvasResource> resource_; scoped_refptr<StaticBitmapImage> cached_snapshot_; @@ -753,6 +768,8 @@ enum class CanvasResourceType { kDirect3DGpuMemoryBuffer, + // TODO(khushalsagar): Delete Direct2D and TextureGpuMemoryBuffer types once + // shared image for single buffered canvas sticks. kDirect2DGpuMemoryBuffer, kTextureGpuMemoryBuffer, kBitmapGpuMemoryBuffer, @@ -777,6 +794,8 @@ }); static const Vector<CanvasResourceType> kSoftwareCompositedFallbackList({ + // TODO(khushalsagar): Use shared image once it supports software raster + // with GMBs. CanvasResourceType::kBitmapGpuMemoryBuffer, CanvasResourceType::kSharedBitmap, // Fallback to no direct compositing support @@ -800,11 +819,9 @@ kSoftwareCompositedFallbackList.end())); static const Vector<CanvasResourceType> kAcceleratedDirect2DFallbackList({ - // TODO(khushalsagar): This is used for low-latency canvas. We'll need - // support for single buffering to use shared images here. + CanvasResourceType::kSharedImage, CanvasResourceType::kDirect2DGpuMemoryBuffer, // The rest is equal to |kAcceleratedCompositedFallbackList|. - CanvasResourceType::kSharedImage, CanvasResourceType::kTextureGpuMemoryBuffer, CanvasResourceType::kTexture, // Fallback to software composited @@ -813,9 +830,9 @@ // Fallback to no direct compositing support CanvasResourceType::kBitmap, }); - DCHECK(std::equal(kAcceleratedDirect2DFallbackList.begin() + 1, + DCHECK(std::equal(kAcceleratedDirect2DFallbackList.begin() + 2, kAcceleratedDirect2DFallbackList.end(), - kAcceleratedCompositedFallbackList.begin(), + kAcceleratedCompositedFallbackList.begin() + 1, kAcceleratedCompositedFallbackList.end())); static const Vector<CanvasResourceType> kAcceleratedDirect3DFallbackList({ @@ -825,9 +842,9 @@ // compositor. CanvasResourceType::kDirect3DSwapChain, CanvasResourceType::kDirect3DGpuMemoryBuffer, - CanvasResourceType::kDirect2DGpuMemoryBuffer, - // The rest is equal to |kAcceleratedCompositedFallbackList|. + // The rest is equal to |kAcceleratedDirect2DFallbackList|. CanvasResourceType::kSharedImage, + CanvasResourceType::kDirect2DGpuMemoryBuffer, CanvasResourceType::kTextureGpuMemoryBuffer, CanvasResourceType::kTexture, // Fallback to software composited @@ -983,23 +1000,28 @@ size, color_params, context_provider_wrapper, resource_dispatcher); break; case CanvasResourceType::kSharedImage: { - if (usage == ResourceUsage::kAcceleratedDirect2DResourceUsage || - usage == ResourceUsage::kAcceleratedDirect3DResourceUsage) { - // Shared images don't work for single buffered canvas yet. - continue; - } - - // TODO(khushalsagar): Also kAcceleratedDirect2DResourceUsage when we - // switch it to use shared images. - const bool is_overlay_candidate = - usage == ResourceUsage::kAcceleratedCompositedResourceUsage && + const bool usage_wants_single_buffered = + usage == ResourceUsage::kAcceleratedDirect2DResourceUsage || + usage == ResourceUsage::kAcceleratedDirect3DResourceUsage; + const bool usage_wants_overlays = + usage_wants_single_buffered || + usage == ResourceUsage::kAcceleratedCompositedResourceUsage; + // texture_storage_image is required to create shared images supporting + // scanout usage. + const bool can_use_overlays = is_gpu_memory_buffer_image_allowed && context_provider_wrapper->ContextProvider() ->GetCapabilities() .texture_storage_image; + + const bool is_overlay_candidate = + usage_wants_overlays && can_use_overlays; + const bool maybe_single_buffered = + usage_wants_single_buffered && can_use_overlays; provider = std::make_unique<CanvasResourceProviderSharedImage>( size, msaa_sample_count, color_params, context_provider_wrapper, - resource_dispatcher, is_origin_top_left, is_overlay_candidate); + resource_dispatcher, is_origin_top_left, is_overlay_candidate, + maybe_single_buffered); } break; } if (!provider->IsValid()) @@ -1036,7 +1058,7 @@ case CanvasResourceProvider::kSharedImage: return std::make_unique<CanvasResourceProviderSharedImage>( size, msaa_sample_count, color_params, context_provider_wrapper, - resource_dispatcher, is_origin_top_left, false); + resource_dispatcher, is_origin_top_left, false, false); case CanvasResourceProvider::kTextureGpuMemoryBuffer: return std::make_unique<CanvasResourceProviderTextureGpuMemoryBuffer>( size, msaa_sample_count, color_params, context_provider_wrapper,
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc index 151c37b..97185d5 100644 --- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc +++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider_test.cc
@@ -142,6 +142,14 @@ ->SetCapabilities(capabilities); } + void EnsureOverlaysSupported() { + auto* context_provider = context_provider_wrapper_->ContextProvider(); + auto capabilities = context_provider->GetCapabilities(); + capabilities.texture_storage_image = true; + static_cast<MockWebGraphisContext3DProviderWrapper*>(context_provider) + ->SetCapabilities(capabilities); + } + protected: base::WeakPtr<WebGraphicsContext3DProviderWrapper> context_provider_wrapper_; ScopedTestingPlatformSupport<GpuMemoryBufferTestPlatform> platform_; @@ -400,6 +408,7 @@ const CanvasColorParams kColorParams(kSRGBCanvasColorSpace, kRGBA8CanvasPixelFormat, kNonOpaque); EnsureBufferFormatIsSupported(kColorParams.GetBufferFormat()); + EnsureOverlaysSupported(); auto provider = CanvasResourceProvider::Create( kSize,
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.cc b/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.cc index 1133aea..f14ba372 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.cc +++ b/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.cc
@@ -3,7 +3,9 @@ // found in the LICENSE file. #include "third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h" + #include "third_party/blink/renderer/platform/graphics/darkmode/darkmode_classifier.h" +#include "third_party/blink/renderer/platform/graphics/image.h" namespace blink { namespace { @@ -13,32 +15,39 @@ const float kHighColorCountThreshold[2] = {1, 0.025635}; DarkModeClassification ClassifyUsingDecisionTree( - const Vector<float>& features) { - DCHECK_EQ(features.size(), 5u); - - int is_color = features[0] > 0; - float color_count_ratio = features[1]; - float low_color_count_threshold = kLowColorCountThreshold[is_color]; - float high_color_count_threshold = kHighColorCountThreshold[is_color]; + const DarkModeImageClassifier::Features& features) { + float low_color_count_threshold = + kLowColorCountThreshold[features.is_colorful]; + float high_color_count_threshold = + kHighColorCountThreshold[features.is_colorful]; // Very few colors means it's not a photo, apply the filter. - if (color_count_ratio < low_color_count_threshold) + if (features.color_buckets_ratio < low_color_count_threshold) return DarkModeClassification::kApplyFilter; // Too many colors means it's probably photorealistic, do not apply it. - if (color_count_ratio > high_color_count_threshold) + if (features.color_buckets_ratio > high_color_count_threshold) return DarkModeClassification::kDoNotApplyFilter; // In-between, decision tree cannot give a precise result. return DarkModeClassification::kNotClassified; } +// The neural network expects these features to be in a specific order within +// the vector. Do not change the order here without also changing the neural +// network code! +Vector<float> ToVector(const DarkModeImageClassifier::Features& features) { + return {features.is_colorful, features.color_buckets_ratio, + features.transparency_ratio, features.background_ratio, + features.is_svg}; +} + } // namespace DarkModeGenericClassifier::DarkModeGenericClassifier() {} DarkModeClassification DarkModeGenericClassifier::ClassifyWithFeatures( - const Vector<float> features) { + const Features& features) { DarkModeClassification result = ClassifyUsingDecisionTree(features); // If decision tree cannot decide, we use a neural network to decide whether @@ -46,7 +55,8 @@ if (result == DarkModeClassification::kNotClassified) { darkmode_tfnative_model::FixedAllocations nn_temp; float nn_out; - darkmode_tfnative_model::Inference(&features[0], &nn_out, &nn_temp); + auto feature_vector = ToVector(features); + darkmode_tfnative_model::Inference(&feature_vector[0], &nn_out, &nn_temp); result = nn_out > 0 ? DarkModeClassification::kApplyFilter : DarkModeClassification::kDoNotApplyFilter; } @@ -56,7 +66,7 @@ DarkModeClassification DarkModeGenericClassifier::ClassifyUsingDecisionTreeForTesting( - const Vector<float>& features) { + const Features& features) { return ClassifyUsingDecisionTree(features); }
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h b/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h index a3739bdc..d231a26 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h +++ b/third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h
@@ -20,10 +20,10 @@ ~DarkModeGenericClassifier() = default; DarkModeClassification ClassifyWithFeatures( - const Vector<float> features) override; + const Features& features) override; DarkModeClassification ClassifyUsingDecisionTreeForTesting( - const Vector<float>& features); + const Features& features); }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.cc b/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.cc index 0192da2..59476956 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.cc +++ b/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.cc
@@ -9,7 +9,7 @@ DarkModeIconClassifier::DarkModeIconClassifier() {} DarkModeClassification DarkModeIconClassifier::ClassifyWithFeatures( - const Vector<float> features) { + const Features& features) { return DarkModeClassification::kDoNotApplyFilter; }
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.h b/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.h index 268ac76..2666e93b 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.h +++ b/third_party/blink/renderer/platform/graphics/dark_mode_icon_classifier.h
@@ -19,7 +19,7 @@ ~DarkModeIconClassifier() = default; DarkModeClassification ClassifyWithFeatures( - const Vector<float> features) override; + const Features& features) override; }; } // namespace blink
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc index e6b113d..ab422de 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc +++ b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.cc
@@ -3,6 +3,9 @@ // found in the LICENSE file. #include "third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.h" + +#include "base/optional.h" +#include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" #include "third_party/blink/renderer/platform/wtf/hash_traits.h" #include "third_party/blink/renderer/platform/wtf/text/string_hash.h" @@ -45,23 +48,22 @@ return result; } - Vector<float> features; - if (!GetFeatures(image, src_rect, &features)) { + auto features_or_null = GetFeatures(image, src_rect); + if (!features_or_null) { // Do not cache this classification. return DarkModeClassification::kDoNotApplyFilter; } - result = ClassifyWithFeatures(features); + result = ClassifyWithFeatures(features_or_null.value()); image->AddDarkModeClassification(src_rect, result); return result; } -bool DarkModeImageClassifier::GetFeatures(Image* image, - const FloatRect& src_rect, - Vector<float>* features) { +base::Optional<DarkModeImageClassifier::Features> +DarkModeImageClassifier::GetFeatures(Image* image, const FloatRect& src_rect) { SkBitmap bitmap; if (!image->GetImageBitmap(src_rect, &bitmap)) - return false; + return base::nullopt; if (pixels_to_sample_ > src_rect.Width() * src_rect.Height()) pixels_to_sample_ = src_rect.Width() * src_rect.Height(); @@ -74,11 +76,9 @@ // loaded and how we can fetch the correct resource. This condition will // prevent going further with the rest of the classification logic. if (sampled_pixels.size() == 0) - return false; + return base::nullopt; - ComputeFeatures(sampled_pixels, transparency_ratio, background_ratio, - features); - return true; + return ComputeFeatures(sampled_pixels, transparency_ratio, background_ratio); } // Extracts sample pixels from the image. The image is separated into uniformly @@ -170,19 +170,10 @@ } } -// This function computes a single feature vector from a sample set of image -// pixels. The current features are: -// 0: 1 if color, 0 if grayscale. -// 1: Ratio of the number of bucketed colors used in the image to all -// possibilities. Color buckets are represented with 4 bits per color -// channel. -// 2: Ratio of transparent area to the whole image. -// 3: Ratio of the background area to the whole image. -void DarkModeImageClassifier::ComputeFeatures( +DarkModeImageClassifier::Features DarkModeImageClassifier::ComputeFeatures( const Vector<SkColor>& sampled_pixels, const float transparency_ratio, - const float background_ratio, - Vector<float>* features) { + const float background_ratio) { int samples_count = static_cast<int>(sampled_pixels.size()); // Is image grayscale. @@ -195,22 +186,15 @@ ? ColorMode::kColor : ColorMode::kGrayscale; - features->resize(5); + DarkModeImageClassifier::Features features; + features.is_colorful = color_mode == ColorMode::kColor; + features.color_buckets_ratio = + ComputeColorBucketsRatio(sampled_pixels, color_mode); + features.transparency_ratio = transparency_ratio; + features.background_ratio = background_ratio; + features.is_svg = image_type_ == ImageType::kSvg; - // Feature 0: Is Colorful? - (*features)[0] = color_mode == ColorMode::kColor; - - // Feature 1: Color Buckets Ratio. - (*features)[1] = ComputeColorBucketsRatio(sampled_pixels, color_mode); - - // Feature 2: Transparency Ratio - (*features)[2] = transparency_ratio; - - // Feature 3: Background Ratio. - (*features)[3] = background_ratio; - - // Feature 4: Is SVG? - (*features)[4] = image_type_ == ImageType::kSvg; + return features; } float DarkModeImageClassifier::ComputeColorBucketsRatio(
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.h b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.h index 15e91f51..259a1df7 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.h +++ b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier.h
@@ -5,13 +5,16 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_DARK_MODE_IMAGE_CLASSIFIER_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GRAPHICS_DARK_MODE_IMAGE_CLASSIFIER_H_ +#include "base/optional.h" #include "third_party/blink/renderer/platform/geometry/float_rect.h" #include "third_party/blink/renderer/platform/graphics/graphics_types.h" -#include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" +#include "third_party/skia/include/core/SkBitmap.h" namespace blink { +class Image; + class PLATFORM_EXPORT DarkModeImageClassifier { DISALLOW_NEW(); @@ -19,23 +22,31 @@ DarkModeImageClassifier(); ~DarkModeImageClassifier() = default; - bool GetFeaturesForTesting(Image* image, Vector<float>* features) { - Vector<SkColor> sampled_pixels; - return GetFeatures(image, - FloatRect(0, 0, static_cast<float>(image->width()), - static_cast<float>(image->height())), - features); - } - DarkModeClassification Classify(Image* image, const FloatRect& src_rect); - // Computes the features vector for a given image. - bool GetFeatures(Image* image, - const FloatRect& src_rect, - Vector<float>* features); + struct Features { + // True if the image is in color, false if it is grayscale. + bool is_colorful; + + // Whether the image was originally an SVG. + bool is_svg; + + // Ratio of the number of bucketed colors used in the image to all + // possibilities. Color buckets are represented with 4 bits per color + // channel. + float color_buckets_ratio; + + // How much of the image is transparent or considered part of the + // background. + float background_ratio; + float transparency_ratio; + }; + + // Computes the features for a given image. + base::Optional<Features> GetFeatures(Image* image, const FloatRect& src_rect); virtual DarkModeClassification ClassifyWithFeatures( - const Vector<float> features) { + const Features& features) { return DarkModeClassification::kDoNotApplyFilter; } @@ -62,11 +73,10 @@ int* transparent_pixels_count); // Given |sampled_pixels|, |transparency_ratio|, and |background_ratio| for an - // image, computes the required |features| for classification. - void ComputeFeatures(const Vector<SkColor>& sampled_pixels, - const float transparency_ratio, - const float background_ratio, - Vector<float>* features); + // image, computes and returns the features required for classification. + Features ComputeFeatures(const Vector<SkColor>& sampled_pixels, + const float transparency_ratio, + const float background_ratio); // Receives sampled pixels and color mode, and returns the ratio of color // buckets count to all possible color buckets. If image is in color, a color
diff --git a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier_test.cc b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier_test.cc index 3b3166f..8d30e9c 100644 --- a/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier_test.cc +++ b/third_party/blink/renderer/platform/graphics/dark_mode_image_classifier_test.cc
@@ -7,6 +7,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/renderer/platform/graphics/bitmap_image.h" #include "third_party/blink/renderer/platform/graphics/dark_mode_generic_classifier.h" +#include "third_party/blink/renderer/platform/graphics/image.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_image.h" #include "third_party/blink/renderer/platform/testing/testing_platform_support_with_mock_scheduler.h" #include "third_party/blink/renderer/platform/testing/unit_test_helpers.h" @@ -53,34 +54,26 @@ class DarkModeImageClassifierTest : public testing::Test { public: - // Loads the image from |file_name|, computes features vector into |features|, + // Loads the image from |file_name|, computes features into |features|, // and returns the classification result. - bool GetFeaturesAndClassification(const String& file_name, - Vector<float>* features) { + bool GetFeaturesAndClassification( + const String& file_name, + DarkModeImageClassifier::Features* features) { + CHECK(features); SCOPED_TRACE(file_name); scoped_refptr<BitmapImage> image = LoadImage(file_name); DarkModeImageClassifier dark_mode_image_classifier; dark_mode_image_classifier.SetImageType( DarkModeImageClassifier::ImageType::kBitmap); - if (!dark_mode_image_classifier.GetFeatures( - image.get(), FloatRect(0, 0, image->width(), image->height()), - features)) { - return false; - } + auto features_or_null = dark_mode_image_classifier.GetFeatures( + image.get(), FloatRect(0, 0, image->width(), image->height())); + CHECK(features_or_null.has_value()); + (*features) = features_or_null.value(); DarkModeClassification result = dark_mode_generic_classifier_.ClassifyWithFeatures(*features); return result == DarkModeClassification::kApplyFilter; } - void AssertFeaturesEqual(const Vector<float>& features, - const Vector<float>& expected_features) { - EXPECT_EQ(features.size(), expected_features.size()); - for (unsigned i = 0; i < features.size(); i++) { - EXPECT_NEAR(features[i], expected_features[i], kEpsilon) - << "Feature " << i; - } - } - DarkModeGenericClassifier* classifier() { return &dark_mode_generic_classifier_; } @@ -102,7 +95,7 @@ }; TEST_F(DarkModeImageClassifierTest, FeaturesAndClassification) { - Vector<float> features; + DarkModeImageClassifier::Features features; // Test Case 1: // Grayscale @@ -113,7 +106,11 @@ &features)); EXPECT_EQ(classifier()->ClassifyUsingDecisionTreeForTesting(features), DarkModeClassification::kApplyFilter); - AssertFeaturesEqual(features, {0.0f, 0.1875f, 0.0f, 0.0f, 0.0f}); + EXPECT_FALSE(features.is_colorful); + EXPECT_FALSE(features.is_svg); + EXPECT_NEAR(0.1875f, features.color_buckets_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.transparency_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.background_ratio, kEpsilon); // Test Case 2: // Grayscale @@ -124,7 +121,11 @@ &features)); EXPECT_EQ(classifier()->ClassifyUsingDecisionTreeForTesting(features), DarkModeClassification::kNotClassified); - AssertFeaturesEqual(features, {0.0f, 0.8125f, 0.446667f, 0.03f, 0.0f}); + EXPECT_FALSE(features.is_colorful); + EXPECT_FALSE(features.is_svg); + EXPECT_NEAR(0.8125f, features.color_buckets_ratio, kEpsilon); + EXPECT_NEAR(0.446667f, features.transparency_ratio, kEpsilon); + EXPECT_NEAR(0.03f, features.background_ratio, kEpsilon); // Test Case 3: // Color @@ -135,8 +136,11 @@ "/images/resources/twitter_favicon.ico", &features)); EXPECT_EQ(classifier()->ClassifyUsingDecisionTreeForTesting(features), DarkModeClassification::kApplyFilter); - AssertFeaturesEqual(features, - {1.0f, 0.0002441f, 0.542092f, 0.1500000f, 0.0f}); + EXPECT_TRUE(features.is_colorful); + EXPECT_FALSE(features.is_svg); + EXPECT_NEAR(0.0002441f, features.color_buckets_ratio, kEpsilon); + EXPECT_NEAR(0.542092f, features.transparency_ratio, kEpsilon); + EXPECT_NEAR(0.1500000f, features.background_ratio, kEpsilon); // Test Case 4: // Color @@ -147,7 +151,11 @@ "/images/resources/blue-wheel-srgb-color-profile.png", &features)); EXPECT_EQ(classifier()->ClassifyUsingDecisionTreeForTesting(features), DarkModeClassification::kDoNotApplyFilter); - AssertFeaturesEqual(features, {1.0f, 0.032959f, 0.0f, 0.0f, 0.0f}); + EXPECT_TRUE(features.is_colorful); + EXPECT_FALSE(features.is_svg); + EXPECT_NEAR(0.032959f, features.color_buckets_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.transparency_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.background_ratio, kEpsilon); // Test Case 5: // Color @@ -158,7 +166,11 @@ "/images/resources/ycbcr-444-float.jpg", &features)); EXPECT_EQ(classifier()->ClassifyUsingDecisionTreeForTesting(features), DarkModeClassification::kApplyFilter); - AssertFeaturesEqual(features, {1.0f, 0.0151367f, 0.0f, 0.0f, 0.0f}); + EXPECT_TRUE(features.is_colorful); + EXPECT_FALSE(features.is_svg); + EXPECT_NEAR(0.0151367f, features.color_buckets_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.transparency_ratio, kEpsilon); + EXPECT_NEAR(0.0f, features.background_ratio, kEpsilon); } TEST_F(DarkModeImageClassifierTest, Caching) {
diff --git a/third_party/blink/renderer/platform/graphics/decoding_image_generator.cc b/third_party/blink/renderer/platform/graphics/decoding_image_generator.cc index d5f5350..b9dd053 100644 --- a/third_party/blink/renderer/platform/graphics/decoding_image_generator.cc +++ b/third_party/blink/renderer/platform/graphics/decoding_image_generator.cc
@@ -245,12 +245,6 @@ TRACE_EVENT0("blink", "DecodingImageGenerator::queryYUVA8"); - // TODO(crbug.com/915707): Set the colorspace based on image type. - // Can pass |color_space| to GetYUVComponentSizes and query a method - // in ImageDecoder (to be added) to get the proper value. - if (color_space) - *color_space = kJPEG_SkYUVColorSpace; - // Indicate that we have three separate planes indices[SkYUVAIndex::kY_Index] = {0, SkColorChannel::kR}; indices[SkYUVAIndex::kU_Index] = {1, SkColorChannel::kR}; @@ -258,7 +252,8 @@ indices[SkYUVAIndex::kA_Index] = {-1, SkColorChannel::kR}; DCHECK(all_data_received_); - return frame_generator_->GetYUVComponentSizes(data_.get(), size_info); + return frame_generator_->GetYUVComponentSizes(data_.get(), size_info, + color_space); } bool DecodingImageGenerator::GetYUVA8Planes(const SkYUVASizeInfo& size_info,
diff --git a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc index f7bff4a..60a3456 100644 --- a/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc +++ b/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
@@ -433,6 +433,8 @@ } else { // If we can't discard the backbuffer, create (or recycle) a buffer to put // in the mailbox, and copy backbuffer's contents there. + // TODO(sunnyps): We can skip this test if explicit resolve is used since + // we'll render to the multisample fbo which will be preserved. color_buffer_for_mailbox = CreateOrRecycleColorBuffer(); gl_->CopySubTextureCHROMIUM( back_color_buffer_->texture_id, 0, texture_target_, @@ -711,14 +713,19 @@ } auto webgl_preferences = ContextProvider()->GetWebglPreferences(); + // We can't use anything other than explicit resolve for swap chain. + bool supports_implicit_resolve = + !UsingSwapChain() && extensions_util_->SupportsExtension( + "GL_EXT_multisampled_render_to_texture"); + bool supports_screen_space_aa = + !UsingSwapChain() && extensions_util_->SupportsExtension( + "GL_CHROMIUM_screen_space_antialiasing"); if (webgl_preferences.anti_aliasing_mode == kAntialiasingModeUnspecified) { if (use_multisampling) { anti_aliasing_mode_ = kAntialiasingModeMSAAExplicitResolve; - if (extensions_util_->SupportsExtension( - "GL_EXT_multisampled_render_to_texture")) { + if (supports_implicit_resolve) { anti_aliasing_mode_ = kAntialiasingModeMSAAImplicitResolve; - } else if (extensions_util_->SupportsExtension( - "GL_CHROMIUM_screen_space_antialiasing") && + } else if (supports_screen_space_aa && ContextProvider()->GetGpuFeatureInfo().IsWorkaroundEnabled( gpu::USE_FRAMEBUFFER_CMAA)) { anti_aliasing_mode_ = kAntialiasingModeScreenSpaceAntialiasing; @@ -727,14 +734,12 @@ anti_aliasing_mode_ = kAntialiasingModeNone; } } else { - if ((webgl_preferences.anti_aliasing_mode == - kAntialiasingModeMSAAImplicitResolve && - !extensions_util_->SupportsExtension( - "GL_EXT_multisampled_render_to_texture")) || - (webgl_preferences.anti_aliasing_mode == - kAntialiasingModeScreenSpaceAntialiasing && - !extensions_util_->SupportsExtension( - "GL_CHROMIUM_screen_space_antialiasing"))) { + bool prefer_implicit_resolve = (webgl_preferences.anti_aliasing_mode == + kAntialiasingModeMSAAImplicitResolve); + bool prefer_screen_space_aa = (webgl_preferences.anti_aliasing_mode == + kAntialiasingModeScreenSpaceAntialiasing); + if ((prefer_implicit_resolve && !supports_implicit_resolve) || + (prefer_screen_space_aa && !supports_screen_space_aa)) { DLOG(ERROR) << "Invalid anti-aliasing mode specified."; return false; } @@ -805,6 +810,16 @@ allocate_alpha_channel_ = false; have_alpha_channel_ = true; } + if (UsingSwapChain()) { + // Swap chains always have an alpha channel, and multisample resolve + // doesn't work if we pretend we don't have one. + // This configuration will + // - allow invalid CopyTexImage to RGBA targets + // - fail valid FramebufferBlit from RGB targets + // TODO(sunnyps): Copy into intermediate texture for blitFramebuffer. + allocate_alpha_channel_ = true; + have_alpha_channel_ = true; + } } state_restorer_->SetFramebufferBindingDirty(); @@ -1018,8 +1033,9 @@ // GpuMemoryBuffers are being used, allocate a non-GMB texture which will hold // the non-premultiplied rendering results. These will be copied into the GMB // via CopySubTextureCHROMIUM, performing the premultiplication step then. - if (ShouldUseChromiumImage() && allocate_alpha_channel_ && - !premultiplied_alpha_) { + // This also applies to swap chains which are exported via AsCanvasResource(). + if ((ShouldUseChromiumImage() || UsingSwapChain()) && + allocate_alpha_channel_ && !premultiplied_alpha_) { gpu::SharedImageInterface* sii = ContextProvider()->SharedImageInterface(); state_restorer_->SetTextureBindingDirty(); // TODO(kbr): unify with code in CreateColorBuffer. @@ -1419,12 +1435,43 @@ void DrawingBuffer::PresentSwapChain() { DCHECK(UsingSwapChain()); + DCHECK_EQ(texture_target_, static_cast<unsigned>(GL_TEXTURE_2D)); + + ScopedStateRestorer scoped_state_restorer(this); + ResolveIfNeeded(); + + if (premultiplied_alpha_false_texture_) { + // The rendering results are in |premultiplied_alpha_false_texture_| rather + // than the |back_color_buffer_|'s texture. Copy them in, multiplying the + // alpha channel into the color channels. + gl_->CopySubTextureCHROMIUM(premultiplied_alpha_false_texture_, 0, + texture_target_, back_color_buffer_->texture_id, + 0, 0, 0, 0, 0, size_.Width(), size_.Height(), + GL_FALSE, GL_TRUE, GL_FALSE); + } + gpu::SyncToken sync_token; gl_->GenUnverifiedSyncTokenCHROMIUM(sync_token.GetData()); + auto* sii = ContextProvider()->SharedImageInterface(); sii->PresentSwapChain(sync_token, back_color_buffer_->mailbox); + sync_token = sii->GenUnverifiedSyncToken(); gl_->WaitSyncTokenCHROMIUM(sync_token.GetConstData()); + + // If a multisample fbo is used it already preserves the previous contents. + if (preserve_drawing_buffer_ == kPreserve && !WantExplicitResolve()) { + // If premultiply alpha is false rendering results are in + // |premultiplied_alpha_false_texture_|. + GLuint dest_texture_id = premultiplied_alpha_false_texture_ + ? premultiplied_alpha_false_texture_ + : back_color_buffer_->texture_id; + gl_->CopySubTextureCHROMIUM(front_color_buffer_->texture_id, 0, + texture_target_, dest_texture_id, 0, 0, 0, 0, 0, + size_.Width(), size_.Height(), GL_FALSE, + GL_FALSE, GL_FALSE); + } + ResetBuffersToAutoClear(); } scoped_refptr<DrawingBuffer::ColorBuffer> DrawingBuffer::CreateColorBuffer( @@ -1451,6 +1498,7 @@ format = use_half_float_storage_ ? viz::RGBA_F16 : viz::RGBA_8888; } else { DCHECK(!use_half_float_storage_); + DCHECK(!UsingSwapChain()); format = viz::RGBX_8888; }
diff --git a/third_party/blink/renderer/platform/graphics/image_frame_generator.cc b/third_party/blink/renderer/platform/graphics/image_frame_generator.cc index c76a4a160..0deed33 100644 --- a/third_party/blink/renderer/platform/graphics/image_frame_generator.cc +++ b/third_party/blink/renderer/platform/graphics/image_frame_generator.cc
@@ -220,8 +220,10 @@ return true; } -bool ImageFrameGenerator::GetYUVComponentSizes(SegmentReader* data, - SkYUVASizeInfo* size_info) { +bool ImageFrameGenerator::GetYUVComponentSizes( + SegmentReader* data, + SkYUVASizeInfo* size_info, + SkYUVColorSpace* yuv_color_space) { TRACE_EVENT2("blink", "ImageFrameGenerator::getYUVComponentSizes", "width", full_size_.width(), "height", full_size_.height()); @@ -241,6 +243,7 @@ decoder->SetImagePlanes(std::move(dummy_image_planes)); DCHECK(decoder->CanDecodeToYUV()); + *yuv_color_space = decoder->GetYUVColorSpace(); return UpdateYUVComponentSizes(decoder.get(), size_info->fSizes, size_info->fWidthBytes);
diff --git a/third_party/blink/renderer/platform/graphics/image_frame_generator.h b/third_party/blink/renderer/platform/graphics/image_frame_generator.h index c696f97..036bca1 100644 --- a/third_party/blink/renderer/platform/graphics/image_frame_generator.h +++ b/third_party/blink/renderer/platform/graphics/image_frame_generator.h
@@ -112,7 +112,7 @@ bool HasAlpha(size_t index); // TODO(crbug.com/943519): Do not call unless the SkROBuffer has all the data. - bool GetYUVComponentSizes(SegmentReader*, SkYUVASizeInfo*); + bool GetYUVComponentSizes(SegmentReader*, SkYUVASizeInfo*, SkYUVColorSpace*); private: class ClientMutexLocker {
diff --git a/third_party/blink/renderer/platform/heap/heap.cc b/third_party/blink/renderer/platform/heap/heap.cc index 470f967f73..7b159414 100644 --- a/third_party/blink/renderer/platform/heap/heap.cc +++ b/third_party/blink/renderer/platform/heap/heap.cc
@@ -235,6 +235,7 @@ stats_collector(), ThreadHeapStatsCollector::kMarkNotFullyConstructedObjects); + DCHECK_EQ(WorklistTaskId::MainThread, visitor->task_id()); NotFullyConstructedItem item; while ( not_fully_constructed_worklist_->Pop(WorklistTaskId::MainThread, &item)) { @@ -261,6 +262,8 @@ for (auto& tuple : ephemeron_callbacks_) tuple.value(visitor, tuple.key); + DCHECK_EQ(WorklistTaskId::MainThread, visitor->task_id()); + // Then we iterate over the new callbacks found by the marking visitor. while (!weak_table_worklist_->IsGlobalEmpty()) { // Read ephemeron callbacks from worklist to ephemeron_callbacks_ hashmap. @@ -283,12 +286,13 @@ template <typename Worklist, typename Callback> bool DrainWorklistWithDeadline(base::TimeTicks deadline, Worklist* worklist, - Callback callback) { + Callback callback, + int task_id) { const size_t kDeadlineCheckInterval = 2500; size_t processed_callback_count = 0; typename Worklist::EntryType item; - while (worklist->Pop(WorklistTaskId::MainThread, &item)) { + while (worklist->Pop(task_id, &item)) { callback(item); processed_callback_count++; if (++processed_callback_count == kDeadlineCheckInterval) { @@ -305,6 +309,8 @@ bool ThreadHeap::AdvanceMarking(MarkingVisitor* visitor, base::TimeTicks deadline) { + DCHECK_EQ(WorklistTaskId::MainThread, visitor->task_id()); + FlushV8References(visitor); bool finished; @@ -322,7 +328,8 @@ DCHECK(!HeapObjectHeader::FromPayload(item.object) ->IsInConstruction()); item.callback(visitor, item.object); - }); + }, + WorklistTaskId::MainThread); if (!finished) return false; @@ -333,7 +340,8 @@ deadline, previously_not_fully_constructed_worklist_.get(), [visitor](const NotFullyConstructedItem& item) { visitor->DynamicallyMarkAddress(reinterpret_cast<Address>(item)); - }); + }, + WorklistTaskId::MainThread); if (!finished) return false; } @@ -351,7 +359,7 @@ return true; } -void ThreadHeap::WeakProcessing(Visitor* visitor) { +void ThreadHeap::WeakProcessing(MarkingVisitor* visitor) { ThreadHeapStatsCollector::Scope stats_scope( stats_collector(), ThreadHeapStatsCollector::kMarkWeakProcessing); @@ -359,6 +367,8 @@ // resurrecting them or allocating new ones. ThreadState::NoAllocationScope allocation_forbidden(ThreadState::Current()); + DCHECK_EQ(WorklistTaskId::MainThread, visitor->task_id()); + // Call weak callbacks on objects that may now be pointing to dead objects. CustomCallbackItem item; while (weak_callback_worklist_->Pop(WorklistTaskId::MainThread, &item)) { @@ -636,12 +646,14 @@ UnifiedHeapMarkingVisitor* unified_visitor = reinterpret_cast<UnifiedHeapMarkingVisitor*>(visitor); - DCHECK(unified_visitor->is_concurrent_marking_enabled() || + DCHECK((unified_visitor->task_id() != WorklistTaskId::MainThread) || v8_references_worklist_->IsGlobalEmpty()); // TODO(omerkatz): In concurrent marking, this should flush all visitors unified_visitor->FlushV8References(); + DCHECK_EQ(WorklistTaskId::MainThread, visitor->task_id()); + V8ReferencesWorklist::View v8_references(v8_references_worklist_.get(), WorklistTaskId::MainThread); V8Reference reference;
diff --git a/third_party/blink/renderer/platform/heap/heap.h b/third_party/blink/renderer/platform/heap/heap.h index 58b2b928..70084ee7 100644 --- a/third_party/blink/renderer/platform/heap/heap.h +++ b/third_party/blink/renderer/platform/heap/heap.h
@@ -273,7 +273,7 @@ template <typename T> static Address Allocate(size_t); - void WeakProcessing(Visitor*); + void WeakProcessing(MarkingVisitor*); // Moves not fully constructed objects to previously not fully constructed // objects. Such objects can be iterated using the Trace() method and do
diff --git a/third_party/blink/renderer/platform/heap/heap_allocator.h b/third_party/blink/renderer/platform/heap/heap_allocator.h index fce7b03..a1ac976 100644 --- a/third_party/blink/renderer/platform/heap/heap_allocator.h +++ b/third_party/blink/renderer/platform/heap/heap_allocator.h
@@ -473,8 +473,6 @@ DISALLOW_NEW(); static void CheckType() { - static_assert(std::is_trivially_destructible<HeapHashMap>::value, - "HeapHashMap must be trivially destructible."); static_assert( IsAllowedInContainer<KeyArg>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); @@ -484,7 +482,7 @@ static_assert( WTF::IsTraceable<KeyArg>::value || WTF::IsTraceable<MappedArg>::value, "For hash maps without traceable elements, use HashMap<> " - "instead of HeapHashMap<>."); + "instead of HeapHashMap<>"); } public: @@ -506,14 +504,12 @@ DISALLOW_NEW(); static void CheckType() { - static_assert(std::is_trivially_destructible<HeapHashSet>::value, - "HeapHashSet must be trivially destructible."); static_assert( IsAllowedInContainer<ValueArg>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<ValueArg>::value, "For hash sets without traceable elements, use HashSet<> " - "instead of HeapHashSet<>."); + "instead of HeapHashSet<>"); } public: @@ -542,7 +538,7 @@ "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<ValueArg>::value, "For sets without traceable elements, use LinkedHashSet<> " - "instead of HeapLinkedHashSet<>."); + "instead of HeapLinkedHashSet<>"); } public: @@ -568,14 +564,12 @@ DISALLOW_NEW(); static void CheckType() { - static_assert(std::is_trivially_destructible<HeapListHashSet>::value, - "HeapListHashSet must be trivially destructible."); static_assert( IsAllowedInContainer<ValueArg>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<ValueArg>::value, "For sets without traceable elements, use ListHashSet<> " - "instead of HeapListHashSet<>."); + "instead of HeapListHashSet<>"); } public: @@ -596,14 +590,12 @@ DISALLOW_NEW(); static void CheckType() { - static_assert(std::is_trivially_destructible<HeapHashCountedSet>::value, - "HeapHashCountedSet must be trivially destructible."); static_assert( IsAllowedInContainer<Value>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<Value>::value, "For counted sets without traceable elements, use " - "HashCountedSet<> instead of HeapHashCountedSet<>."); + "HashCountedSet<> instead of HeapHashCountedSet<>"); } public: @@ -622,14 +614,11 @@ static void CheckType() { static_assert( - std::is_trivially_destructible<HeapVector>::value || inlineCapacity, - "HeapVector must be trivially destructible."); - static_assert( IsAllowedInContainer<T>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<T>::value, "For vectors without traceable elements, use Vector<> " - "instead of HeapVector<>."); + "instead of HeapVector<>"); } public: @@ -673,9 +662,6 @@ static void CheckType() { static_assert( - std::is_trivially_destructible<HeapDeque>::value || inlineCapacity, - "HeapDeque must be trivially destructible."); - static_assert( IsAllowedInContainer<T>::value, "Not allowed to directly nest type. Use Member<> indirection instead."); static_assert(WTF::IsTraceable<T>::value,
diff --git a/third_party/blink/renderer/platform/heap/heap_test.cc b/third_party/blink/renderer/platform/heap/heap_test.cc index 2be04be..67cca87 100644 --- a/third_party/blink/renderer/platform/heap/heap_test.cc +++ b/third_party/blink/renderer/platform/heap/heap_test.cc
@@ -6013,6 +6013,86 @@ EXPECT_TRUE(string.Impl()->HasOneRef()); } +TEST_F(HeapTest, PromptlyFreeStackAllocatedHeapVector) { + NormalPageArena* normal_arena; + Address before; + { + HeapVector<Member<IntWrapper>> vector; + vector.push_back(MakeGarbageCollected<IntWrapper>(0)); + NormalPage* normal_page = + static_cast<NormalPage*>(PageFromObject(vector.data())); + normal_arena = normal_page->ArenaForNormalPage(); + CHECK(normal_arena); + before = normal_arena->CurrentAllocationPoint(); + } + Address after = normal_arena->CurrentAllocationPoint(); + // We check the allocation point to see if promptly freed + EXPECT_NE(after, before); +} + +TEST_F(HeapTest, PromptlyFreeStackAllocatedHeapDeque) { + NormalPageArena* normal_arena; + Address before; + { + HeapDeque<Member<IntWrapper>> deque; + deque.push_back(MakeGarbageCollected<IntWrapper>(0)); + NormalPage* normal_page = + static_cast<NormalPage*>(PageFromObject(&deque.front())); + normal_arena = normal_page->ArenaForNormalPage(); + CHECK(normal_arena); + before = normal_arena->CurrentAllocationPoint(); + } + Address after = normal_arena->CurrentAllocationPoint(); + // We check the allocation point to see if promptly freed + EXPECT_NE(after, before); +} + +TEST_F(HeapTest, PromptlyFreeStackAllocatedHeapHashSet) { + NormalPageArena* normal_arena = static_cast<NormalPageArena*>( + ThreadState::Current()->Heap().Arena(BlinkGC::kHashTableArenaIndex)); + CHECK(normal_arena); + Address before; + { + HeapHashSet<Member<IntWrapper>> hash_set; + hash_set.insert(MakeGarbageCollected<IntWrapper>(0)); + before = normal_arena->CurrentAllocationPoint(); + } + Address after = normal_arena->CurrentAllocationPoint(); + // We check the allocation point to see if promptly freed + EXPECT_NE(after, before); +} + +TEST_F(HeapTest, PromptlyFreeStackAllocatedHeapListHashSet) { + ClearOutOldGarbage(); + NormalPageArena* normal_arena = static_cast<NormalPageArena*>( + ThreadState::Current()->Heap().Arena(BlinkGC::kHashTableArenaIndex)); + CHECK(normal_arena); + Address before; + { + HeapListHashSet<Member<IntWrapper>> list_hash_set; + list_hash_set.insert(MakeGarbageCollected<IntWrapper>(0)); + before = normal_arena->CurrentAllocationPoint(); + } + Address after = normal_arena->CurrentAllocationPoint(); + // We check the allocation point to see if promptly freed + EXPECT_NE(after, before); +} + +TEST_F(HeapTest, PromptlyFreeStackAllocatedHeapLinkedHashSet) { + NormalPageArena* normal_arena = static_cast<NormalPageArena*>( + ThreadState::Current()->Heap().Arena(BlinkGC::kHashTableArenaIndex)); + CHECK(normal_arena); + Address before; + { + HeapLinkedHashSet<Member<IntWrapper>> linked_hash_set; + linked_hash_set.insert(MakeGarbageCollected<IntWrapper>(0)); + before = normal_arena->CurrentAllocationPoint(); + } + Address after = normal_arena->CurrentAllocationPoint(); + // We check the allocation point to see if promptly freed + EXPECT_NE(after, before); +} + TEST_F(HeapTest, ShrinkVector) { // Regression test: https://crbug.com/823289
diff --git a/third_party/blink/renderer/platform/heap/marking_visitor.cc b/third_party/blink/renderer/platform/heap/marking_visitor.cc index 4a8c8ee2..11340af 100644 --- a/third_party/blink/renderer/platform/heap/marking_visitor.cc +++ b/third_party/blink/renderer/platform/heap/marking_visitor.cc
@@ -4,6 +4,7 @@ #include "third_party/blink/renderer/platform/heap/marking_visitor.h" +#include "third_party/blink/renderer/platform/heap/blink_gc.h" #include "third_party/blink/renderer/platform/heap/heap.h" #include "third_party/blink/renderer/platform/heap/thread_state.h" @@ -18,21 +19,20 @@ } // namespace MarkingVisitorBase::MarkingVisitorBase(ThreadState* state, - MarkingMode marking_mode) + MarkingMode marking_mode, + int task_id) : Visitor(state), - marking_worklist_(Heap().GetMarkingWorklist(), - WorklistTaskId::MainThread), + marking_worklist_(Heap().GetMarkingWorklist(), task_id), not_fully_constructed_worklist_(Heap().GetNotFullyConstructedWorklist(), - WorklistTaskId::MainThread), - weak_callback_worklist_(Heap().GetWeakCallbackWorklist(), - WorklistTaskId::MainThread), + task_id), + weak_callback_worklist_(Heap().GetWeakCallbackWorklist(), task_id), movable_reference_worklist_(Heap().GetMovableReferenceWorklist(), - WorklistTaskId::MainThread), - weak_table_worklist_(Heap().GetWeakTableWorklist(), - WorklistTaskId::MainThread), + task_id), + weak_table_worklist_(Heap().GetWeakTableWorklist(), task_id), backing_store_callback_worklist_(Heap().GetBackingStoreCallbackWorklist(), - WorklistTaskId::MainThread), - marking_mode_(marking_mode) { + task_id), + marking_mode_(marking_mode), + task_id_(task_id) { DCHECK(state->InAtomicMarkingPause()); #if DCHECK_IS_ON() DCHECK(state->CheckThread()); @@ -86,6 +86,14 @@ weak_table_worklist_.FlushToGlobal(); } +void MarkingVisitorBase::AdjustMarkedBytes(HeapObjectHeader* header, + size_t old_size) { + DCHECK(header->IsMarked()); + // Currently, only expansion of an object is supported during marking. + DCHECK_GE(header->size(), old_size); + marked_bytes_ += header->size() - old_size; +} + void MarkingVisitor::WriteBarrierSlow(void* value) { if (!value || IsHashTableDeleteValue(value)) return; @@ -135,11 +143,9 @@ } MarkingVisitor::MarkingVisitor(ThreadState* state, MarkingMode marking_mode) - : MarkingVisitorBase(state, marking_mode) { + : MarkingVisitorBase(state, marking_mode, WorklistTaskId::MainThread) { DCHECK(state->InAtomicMarkingPause()); -#if DCHECK_IS_ON() DCHECK(state->CheckThread()); -#endif // DCHECK_IS_ON() } void MarkingVisitor::DynamicallyMarkAddress(Address address) { @@ -200,12 +206,13 @@ } } -void MarkingVisitor::AdjustMarkedBytes(HeapObjectHeader* header, - size_t old_size) { - DCHECK(header->IsMarked()); - // Currently, only expansion of an object is supported during marking. - DCHECK_GE(header->size(), old_size); - marked_bytes_ += header->size() - old_size; +ConcurrentMarkingVisitor::ConcurrentMarkingVisitor(ThreadState* state, + MarkingMode marking_mode, + int task_id) + : MarkingVisitorBase(state, marking_mode, task_id) { + DCHECK(state->InAtomicMarkingPause()); + DCHECK(state->CheckThread()); + DCHECK_NE(WorklistTaskId::MainThread, task_id); } } // namespace blink
diff --git a/third_party/blink/renderer/platform/heap/marking_visitor.h b/third_party/blink/renderer/platform/heap/marking_visitor.h index fbee227..89aa039 100644 --- a/third_party/blink/renderer/platform/heap/marking_visitor.h +++ b/third_party/blink/renderer/platform/heap/marking_visitor.h
@@ -116,8 +116,12 @@ size_t marked_bytes() const { return marked_bytes_; } + int task_id() const { return task_id_; } + + void AdjustMarkedBytes(HeapObjectHeader*, size_t); + protected: - MarkingVisitorBase(ThreadState*, MarkingMode); + MarkingVisitorBase(ThreadState*, MarkingMode, int task_id); ~MarkingVisitorBase() override = default; // Marks an object and adds a tracing callback for processing of the object. @@ -141,6 +145,7 @@ BackingStoreCallbackWorklist::View backing_store_callback_worklist_; size_t marked_bytes_ = 0; const MarkingMode marking_mode_; + int task_id_; }; ALWAYS_INLINE void MarkingVisitorBase::AccountMarkedBytes( @@ -210,8 +215,6 @@ // to be in construction. void DynamicallyMarkAddress(Address); - void AdjustMarkedBytes(HeapObjectHeader*, size_t); - private: // Exact version of the marking write barriers. static void WriteBarrierSlow(void*); @@ -236,6 +239,13 @@ TraceMarkedBackingStoreSlow(value); } +// Visitor used to mark Oilpan objects on concurrent threads. +class PLATFORM_EXPORT ConcurrentMarkingVisitor : public MarkingVisitorBase { + public: + ConcurrentMarkingVisitor(ThreadState*, MarkingMode, int); + ~ConcurrentMarkingVisitor() override = default; +}; + } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_MARKING_VISITOR_H_
diff --git a/third_party/blink/renderer/platform/heap/persistent.h b/third_party/blink/renderer/platform/heap/persistent.h index 9f11046..2dd3e5f 100644 --- a/third_party/blink/renderer/platform/heap/persistent.h +++ b/third_party/blink/renderer/platform/heap/persistent.h
@@ -256,6 +256,11 @@ NO_SANITIZE_ADDRESS void Assign(T* ptr) { if (crossThreadnessConfiguration == kCrossThreadPersistentConfiguration) { + // In case CrossThreadPersistent gets reused across multiple threads we + // need to uninitialize before writing a new value. + if (persistent_node_.IsInitialized()) { + Uninitialize(); + } MutexLocker persistent_lock(ProcessHeap::CrossThreadPersistentMutex()); raw_ = ptr; } else { @@ -295,7 +300,9 @@ TraceCallback trace_callback = TraceMethodDelegate<PersistentBase, &PersistentBase::TracePersistent>::Trampoline; - persistent_node_.Initialize(this, trace_callback); + persistent_node_.Initialize( + this, const_cast<typename std::remove_const<T>::type*>(raw_), + trace_callback); } void Uninitialize() { persistent_node_.Uninitialize(); }
diff --git a/third_party/blink/renderer/platform/heap/persistent_node.h b/third_party/blink/renderer/platform/heap/persistent_node.h index 9423e85..00fa1e0 100644 --- a/third_party/blink/renderer/platform/heap/persistent_node.h +++ b/third_party/blink/renderer/platform/heap/persistent_node.h
@@ -28,8 +28,6 @@ DISALLOW_NEW(); public: - PersistentNode() : self_(nullptr), trace_(nullptr) { DCHECK(IsUnused()); } - #if DCHECK_IS_ON() ~PersistentNode() { // If you hit this assert, it means that the thread finished @@ -57,10 +55,11 @@ trace_(visitor, self_); } - void Initialize(void* self, TraceCallback trace) { + void Initialize(PersistentRegion* region, void* self, TraceCallback trace) { DCHECK(IsUnused()); self_ = self; trace_ = trace; + region_ = region; } void SetFreeListNext(PersistentNode* node) { @@ -80,16 +79,19 @@ bool IsUnused() const { return !trace_; } void* Self() const { return self_; } + PersistentRegion* Region() const { return region_; } private: // If this PersistentNode is in use: - // - m_self points to the corresponding Persistent handle. - // - m_trace points to the trace method. + // - |self_| points to the corresponding Persistent handle. + // - |trace_| points to the trace method. // If this PersistentNode is freed: - // - m_self points to the next freed PersistentNode. - // - m_trace is nullptr. - void* self_; - TraceCallback trace_; + // - |self_| points to the next freed PersistentNode. + // - |trace_| is nullptr. + void* self_ = nullptr; + TraceCallback trace_ = nullptr; + // PersistentRegion this PersistentNode is assigned to. + PersistentRegion* region_ = nullptr; }; struct PersistentNodeSlots final { @@ -115,7 +117,7 @@ PersistentNode* Get() const { return ptr_; } bool IsInitialized() const { return ptr_; } - void Initialize(void* owner, TraceCallback); + void Initialize(void*, void*, TraceCallback); void Uninitialize(); private: @@ -141,7 +143,7 @@ } bool IsInitialized() const { return ptr_.load(std::memory_order_acquire); } - void Initialize(void* owner, TraceCallback); + void Initialize(void*, void*, TraceCallback); void Uninitialize(); void ClearWithLockHeld(); @@ -173,7 +175,7 @@ DCHECK(free_list_head_); PersistentNode* node = free_list_head_; free_list_head_ = free_list_head_->FreeListNext(); - node->Initialize(self, trace); + node->Initialize(this, self, trace); DCHECK(!node->IsUnused()); return node; } @@ -273,6 +275,7 @@ WeaknessPersistentConfiguration weakness_configuration> void PersistentNodePtr<affinity, weakness_configuration>::Initialize( void* owner, + void* object, TraceCallback trace_callback) { ThreadState* state = ThreadStateFor<affinity>::GetState(); DCHECK(state->CheckThread()); @@ -309,13 +312,15 @@ template <WeaknessPersistentConfiguration weakness_configuration> void CrossThreadPersistentNodePtr<weakness_configuration>::Initialize( void* owner, + void* object, TraceCallback trace_callback) { - CrossThreadPersistentRegion& region = + ThreadState* state = ThreadState::FromObject(object); + CrossThreadPersistentRegion* region = weakness_configuration == kWeakPersistentConfiguration - ? ProcessHeap::GetCrossThreadWeakPersistentRegion() - : ProcessHeap::GetCrossThreadPersistentRegion(); + ? state->GetCrossThreadWeakPersistentRegion() + : state->GetCrossThreadPersistentRegion(); MutexLocker lock(ProcessHeap::CrossThreadPersistentMutex()); - PersistentNode* node = region.AllocatePersistentNode(owner, trace_callback); + PersistentNode* node = region->AllocatePersistentNode(owner, trace_callback); ptr_.store(node, std::memory_order_release); } @@ -333,12 +338,11 @@ if (!ptr_.load(std::memory_order_acquire)) return; - CrossThreadPersistentRegion& region = - weakness_configuration == kWeakPersistentConfiguration - ? ProcessHeap::GetCrossThreadWeakPersistentRegion() - : ProcessHeap::GetCrossThreadPersistentRegion(); MutexLocker lock(ProcessHeap::CrossThreadPersistentMutex()); - region.FreePersistentNode(ptr_.load(std::memory_order_relaxed)); + PersistentNode* node = ptr_.load(std::memory_order_relaxed); + CrossThreadPersistentRegion* region = + reinterpret_cast<CrossThreadPersistentRegion*>(node->Region()); + region->FreePersistentNode(node); ptr_.store(nullptr, std::memory_order_release); } @@ -347,11 +351,14 @@ #if DCHECK_IS_ON() ProcessHeap::CrossThreadPersistentMutex().AssertAcquired(); #endif - CrossThreadPersistentRegion& region = - weakness_configuration == kWeakPersistentConfiguration - ? ProcessHeap::GetCrossThreadWeakPersistentRegion() - : ProcessHeap::GetCrossThreadPersistentRegion(); - region.FreePersistentNode(ptr_.load(std::memory_order_relaxed)); + + if (!ptr_.load(std::memory_order_acquire)) + return; + + PersistentNode* node = ptr_.load(std::memory_order_relaxed); + CrossThreadPersistentRegion* region = + reinterpret_cast<CrossThreadPersistentRegion*>(node->Region()); + region->FreePersistentNode(ptr_.load(std::memory_order_relaxed)); ptr_.store(nullptr, std::memory_order_release); }
diff --git a/third_party/blink/renderer/platform/heap/process_heap.cc b/third_party/blink/renderer/platform/heap/process_heap.cc index 604eb8d..02350f6 100644 --- a/third_party/blink/renderer/platform/heap/process_heap.cc +++ b/third_party/blink/renderer/platform/heap/process_heap.cc
@@ -42,18 +42,6 @@ total_allocated_object_size_ = 0; } -CrossThreadPersistentRegion& ProcessHeap::GetCrossThreadPersistentRegion() { - DEFINE_THREAD_SAFE_STATIC_LOCAL(CrossThreadPersistentRegion, - persistent_region, ()); - return persistent_region; -} - -CrossThreadPersistentRegion& ProcessHeap::GetCrossThreadWeakPersistentRegion() { - DEFINE_THREAD_SAFE_STATIC_LOCAL(CrossThreadPersistentRegion, - persistent_region, ()); - return persistent_region; -} - Mutex& ProcessHeap::CrossThreadPersistentMutex() { DEFINE_THREAD_SAFE_STATIC_LOCAL(Mutex, mutex, ()); return mutex;
diff --git a/third_party/blink/renderer/platform/heap/process_heap.h b/third_party/blink/renderer/platform/heap/process_heap.h index 58d1026b..315f56cb 100644 --- a/third_party/blink/renderer/platform/heap/process_heap.h +++ b/third_party/blink/renderer/platform/heap/process_heap.h
@@ -20,9 +20,6 @@ public: static void Init(); - static CrossThreadPersistentRegion& GetCrossThreadPersistentRegion(); - static CrossThreadPersistentRegion& GetCrossThreadWeakPersistentRegion(); - // Access to the CrossThreadPersistentRegion from multiple threads has to be // prevented as allocation, freeing, and iteration of nodes may otherwise // cause data races.
diff --git a/third_party/blink/renderer/platform/heap/thread_state.cc b/third_party/blink/renderer/platform/heap/thread_state.cc index cda9d95..3e933ead 100644 --- a/third_party/blink/renderer/platform/heap/thread_state.cc +++ b/third_party/blink/renderer/platform/heap/thread_state.cc
@@ -129,6 +129,10 @@ : thread_(CurrentThread()), persistent_region_(std::make_unique<PersistentRegion>()), weak_persistent_region_(std::make_unique<PersistentRegion>()), + cross_thread_persistent_region_( + std::make_unique<CrossThreadPersistentRegion>()), + cross_thread_weak_persistent_region_( + std::make_unique<CrossThreadPersistentRegion>()), start_of_stack_(reinterpret_cast<Address*>(WTF::GetStackStart())), #if defined(ADDRESS_SANITIZER) asan_fake_stack_(__asan_get_current_fake_stack()), @@ -230,8 +234,7 @@ // PrepareForThreadStateTermination removes strong references so no need to // call it on CrossThreadWeakPersistentRegion. - ProcessHeap::GetCrossThreadPersistentRegion() - .PrepareForThreadStateTermination(this); + GetCrossThreadPersistentRegion()->PrepareForThreadStateTermination(this); // Do thread local GC's as long as the count of thread local Persistents // changes and is above zero. @@ -346,7 +349,7 @@ ThreadHeapStatsCollector::kVisitCrossThreadPersistents); // See ProcessHeap::CrossThreadPersistentMutex(). MutexLocker persistent_lock(ProcessHeap::CrossThreadPersistentMutex()); - ProcessHeap::GetCrossThreadPersistentRegion().TracePersistentNodes(visitor); + GetCrossThreadPersistentRegion()->TracePersistentNodes(visitor); } { ThreadHeapStatsCollector::Scope inner_stats_scope( @@ -356,8 +359,7 @@ } void ThreadState::VisitWeakPersistents(Visitor* visitor) { - ProcessHeap::GetCrossThreadWeakPersistentRegion().TracePersistentNodes( - visitor); + cross_thread_weak_persistent_region_->TracePersistentNodes(visitor); weak_persistent_region_->TracePersistentNodes(visitor); } @@ -1552,10 +1554,8 @@ // CrossThreadPersistents in unmarked objects may be accessed from other // threads (e.g. in CrossThreadPersistentRegion::ShouldTracePersistent) and // that would be fine. - ProcessHeap::GetCrossThreadPersistentRegion() - .UnpoisonCrossThreadPersistents(); - ProcessHeap::GetCrossThreadWeakPersistentRegion() - .UnpoisonCrossThreadPersistents(); + GetCrossThreadPersistentRegion()->UnpoisonCrossThreadPersistents(); + GetCrossThreadWeakPersistentRegion()->UnpoisonCrossThreadPersistents(); } // Similarly, unmarked object may contain handles to V8 that may be accessed @@ -1675,7 +1675,7 @@ } void ThreadState::MarkPhaseEpilogue(BlinkGC::MarkingType marking_type) { - Visitor* visitor = current_gc_data_.visitor.get(); + MarkingVisitor* visitor = current_gc_data_.visitor.get(); { // See ProcessHeap::CrossThreadPersistentMutex(). MutexLocker persistent_lock(ProcessHeap::CrossThreadPersistentMutex());
diff --git a/third_party/blink/renderer/platform/heap/thread_state.h b/third_party/blink/renderer/platform/heap/thread_state.h index f1a6670..cdf7c43 100644 --- a/third_party/blink/renderer/platform/heap/thread_state.h +++ b/third_party/blink/renderer/platform/heap/thread_state.h
@@ -63,6 +63,7 @@ class IncrementalMarkingTestDriver; } // namespace incremental_marking_test +class CrossThreadPersistentRegion; class MarkingVisitor; class PersistentNode; class PersistentRegion; @@ -353,6 +354,14 @@ return weak_persistent_region_.get(); } + CrossThreadPersistentRegion* GetCrossThreadPersistentRegion() const { + return cross_thread_persistent_region_.get(); + } + + CrossThreadPersistentRegion* GetCrossThreadWeakPersistentRegion() const { + return cross_thread_weak_persistent_region_.get(); + } + struct GCSnapshotInfo { STACK_ALLOCATED(); @@ -575,8 +584,13 @@ std::unique_ptr<ThreadHeap> heap_; base::PlatformThreadId thread_; + std::unique_ptr<PersistentRegion> persistent_region_; std::unique_ptr<PersistentRegion> weak_persistent_region_; + // References from other threads to this particular heap. + std::unique_ptr<CrossThreadPersistentRegion> cross_thread_persistent_region_; + std::unique_ptr<CrossThreadPersistentRegion> + cross_thread_weak_persistent_region_; // Start of the stack which is the boundary until conservative stack scanning // needs to search for managed pointers.
diff --git a/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.cc b/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.cc index e75eefe..13dc902 100644 --- a/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.cc +++ b/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.cc
@@ -8,6 +8,7 @@ #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/bindings/trace_wrapper_v8_reference.h" #include "third_party/blink/renderer/platform/bindings/v8_per_isolate_data.h" +#include "third_party/blink/renderer/platform/heap/blink_gc.h" #include "third_party/blink/renderer/platform/heap/thread_state.h" #include "third_party/blink/renderer/platform/heap/unified_heap_controller.h" @@ -15,24 +16,22 @@ UnifiedHeapMarkingVisitorBase::UnifiedHeapMarkingVisitorBase( ThreadState* thread_state, - MarkingMode mode, - v8::Isolate* isolate) - : MarkingVisitor(thread_state, mode), - isolate_(isolate), + v8::Isolate* isolate, + int task_id) + : isolate_(isolate), controller_(thread_state->unified_heap_controller()), - is_concurrent_marking_enabled_(base::FeatureList::IsEnabled( - blink::features::kBlinkHeapConcurrentMarking)), - v8_references_worklist_(Heap().GetV8ReferencesWorklist(), - WorklistTaskId::MainThread) { + task_id_(task_id), + v8_references_worklist_(thread_state->Heap().GetV8ReferencesWorklist(), + task_id) { DCHECK(controller_); } -void UnifiedHeapMarkingVisitorBase::Visit( +void UnifiedHeapMarkingVisitorBase::VisitImpl( const TraceWrapperV8Reference<v8::Value>& v8_reference) { if (v8_reference.Get().IsEmpty()) return; DCHECK(isolate_); - if (is_concurrent_marking_enabled_) { + if (task_id_ != WorklistTaskId::MainThread) { // This is a temporary solution. Pushing directly from concurrent threads // to V8 marking worklist will currently result in data races. This // solution guarantees correctness until we implement a long-term solution @@ -45,13 +44,17 @@ } void UnifiedHeapMarkingVisitorBase::FlushV8References() { - v8_references_worklist_.FlushToGlobal(); + if (task_id_ != WorklistTaskId::MainThread) + v8_references_worklist_.FlushToGlobal(); } UnifiedHeapMarkingVisitor::UnifiedHeapMarkingVisitor(ThreadState* thread_state, MarkingMode mode, v8::Isolate* isolate) - : UnifiedHeapMarkingVisitorBase(thread_state, mode, isolate) {} + : MarkingVisitor(thread_state, mode), + UnifiedHeapMarkingVisitorBase(thread_state, + isolate, + WorklistTaskId::MainThread) {} void UnifiedHeapMarkingVisitor::WriteBarrier( const TraceWrapperV8Reference<v8::Value>& object) { @@ -81,4 +84,12 @@ wrapper_type_info->Trace(thread_state->CurrentVisitor(), object); } +ConcurrentUnifiedHeapMarkingVisitor::ConcurrentUnifiedHeapMarkingVisitor( + ThreadState* thread_state, + MarkingMode mode, + v8::Isolate* isolate, + int task_id) + : ConcurrentMarkingVisitor(thread_state, mode, task_id), + UnifiedHeapMarkingVisitorBase(thread_state, isolate, task_id) {} + } // namespace blink
diff --git a/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h b/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h index 61b6a2c..77cab26 100644 --- a/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h +++ b/third_party/blink/renderer/platform/heap/unified_heap_marking_visitor.h
@@ -20,49 +20,71 @@ // Oilpan marking visitor by also providing write barriers and visitation // methods that allow for announcing reachable objects to V8. Visitor can be // used from any thread. -class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase : public MarkingVisitor { +class PLATFORM_EXPORT UnifiedHeapMarkingVisitorBase { public: - ~UnifiedHeapMarkingVisitorBase() override = default; + virtual ~UnifiedHeapMarkingVisitorBase() = default; // Visitation methods that announce reachable wrappers to V8. - void Visit(const TraceWrapperV8Reference<v8::Value>&) final; - - bool is_concurrent_marking_enabled() const { - return is_concurrent_marking_enabled_; - } + void VisitImpl(const TraceWrapperV8Reference<v8::Value>&); // Flush all V8 references in the private segments to the global pool. void FlushV8References(); protected: - UnifiedHeapMarkingVisitorBase(ThreadState*, MarkingMode, v8::Isolate*); + UnifiedHeapMarkingVisitorBase(ThreadState*, v8::Isolate*, int); v8::Isolate* const isolate_; v8::EmbedderHeapTracer* const controller_; - DISALLOW_COPY_AND_ASSIGN(UnifiedHeapMarkingVisitorBase); - private: - bool is_concurrent_marking_enabled_; + int task_id_; V8ReferencesWorklist::View v8_references_worklist_; + + DISALLOW_COPY_AND_ASSIGN(UnifiedHeapMarkingVisitorBase); }; // Same as the base visitor with the difference that it is bound to main thread. // Also implements various sorts of write barriers that should only be called // from the main thread. class PLATFORM_EXPORT UnifiedHeapMarkingVisitor - : public UnifiedHeapMarkingVisitorBase { + : public MarkingVisitor, + public UnifiedHeapMarkingVisitorBase { public: UnifiedHeapMarkingVisitor(ThreadState*, MarkingMode, v8::Isolate*); + ~UnifiedHeapMarkingVisitor() override = default; // Write barriers for annotating a write during incremental marking. static void WriteBarrier(const TraceWrapperV8Reference<v8::Value>&); static void WriteBarrier(v8::Isolate*, const WrapperTypeInfo*, void*); + void Visit(const TraceWrapperV8Reference<v8::Value>& v) final { + VisitImpl(v); + } + private: DISALLOW_COPY_AND_ASSIGN(UnifiedHeapMarkingVisitor); }; +// Same as the base visitor with the difference that it is bound to a +// concurrent thread. +class PLATFORM_EXPORT ConcurrentUnifiedHeapMarkingVisitor + : public ConcurrentMarkingVisitor, + public UnifiedHeapMarkingVisitorBase { + public: + ConcurrentUnifiedHeapMarkingVisitor(ThreadState*, + MarkingMode, + v8::Isolate*, + int task_id); + ~ConcurrentUnifiedHeapMarkingVisitor() override = default; + + void Visit(const TraceWrapperV8Reference<v8::Value>& v) final { + VisitImpl(v); + } + + private: + DISALLOW_COPY_AND_ASSIGN(ConcurrentUnifiedHeapMarkingVisitor); +}; + } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_HEAP_UNIFIED_HEAP_MARKING_VISITOR_H_
diff --git a/third_party/blink/renderer/platform/image-decoders/image_decoder.h b/third_party/blink/renderer/platform/image-decoders/image_decoder.h index df788ae..a86a13e 100644 --- a/third_party/blink/renderer/platform/image-decoders/image_decoder.h +++ b/third_party/blink/renderer/platform/image-decoders/image_decoder.h
@@ -42,6 +42,7 @@ #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "third_party/blink/renderer/platform/wtf/vector.h" +#include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/third_party/skcms/skcms.h" class SkColorSpace; @@ -234,6 +235,14 @@ return 0; } + // Image decoders that support YUV decoding must override this to + // return the SkYUVColorSpace that is used to convert from YUV + // to RGB. + virtual SkYUVColorSpace GetYUVColorSpace() const { + NOTREACHED(); + return SkYUVColorSpace::kIdentity_SkYUVColorSpace; + } + // This will only differ from size() for ICO (where each frame is a // different icon) or other formats where different frames are different // sizes. This does NOT differ from size() for GIF or WebP, since
diff --git a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc index 010fe43..26d9ef7 100644 --- a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc +++ b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.cc
@@ -949,6 +949,11 @@ } } +// TODO(crbug.com/919627): Confirm that this is correct for all cases. +SkYUVColorSpace JPEGImageDecoder::GetYUVColorSpace() const { + return SkYUVColorSpace::kJPEG_SkYUVColorSpace; +} + void JPEGImageDecoder::SetImagePlanes( std::unique_ptr<ImagePlanes> image_planes) { image_planes_ = std::move(image_planes);
diff --git a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.h b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.h index 9f69965b..4321085b 100644 --- a/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.h +++ b/third_party/blink/renderer/platform/image-decoders/jpeg/jpeg_image_decoder.h
@@ -48,6 +48,7 @@ size_t DecodedYUVWidthBytes(int component) const override; bool CanDecodeToYUV() override; void DecodeToYUV() override; + SkYUVColorSpace GetYUVColorSpace() const override; void SetImagePlanes(std::unique_ptr<ImagePlanes>) override; Vector<SkISize> GetSupportedDecodeSizes() const override; bool HasImagePlanes() const { return image_planes_.get(); }
diff --git a/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc b/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc index 5043440e..a7be357 100644 --- a/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc +++ b/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.cc
@@ -445,6 +445,10 @@ return 0; } +SkYUVColorSpace WEBPImageDecoder::GetYUVColorSpace() const { + return SkYUVColorSpace::kRec601_SkYUVColorSpace; +} + bool WEBPImageDecoder::CanReusePreviousFrameBuffer(size_t frame_index) const { DCHECK(frame_index < frame_buffer_cache_.size()); return frame_buffer_cache_[frame_index].GetAlphaBlendSource() !=
diff --git a/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.h b/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.h index b78ce22..fa74807 100644 --- a/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.h +++ b/third_party/blink/renderer/platform/image-decoders/webp/webp_image_decoder.h
@@ -62,6 +62,7 @@ void SetImagePlanes(std::unique_ptr<ImagePlanes>) override; bool CanDecodeToYUV() override; void DecodeToYUV() override; + SkYUVColorSpace GetYUVColorSpace() const override; WEBP_CSP_MODE RGBOutputMode(); // Returns true if the image data received so far (as stored in
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 5002d9a..c2e494c1 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -304,11 +304,19 @@ status: "experimental", }, { + name: "CookieDeprecationMessages", + status: "experimental", + }, + { name: "CookieStore", origin_trial_feature_name: "CookieStore", status: "experimental", }, { + name: "CookiesWithoutSameSiteMustBeSecure", + status: "experimental", + }, + { name: "CorsRFC1918", }, { @@ -1404,6 +1412,10 @@ { name: "RTCUnifiedPlanByDefault", }, + { + name: "SameSiteByDefaultCookies", + status: "experimental", + }, // WebSpeech API with both speech recognition and synthesis functionality // is not fully enabled on all platforms. {
diff --git a/third_party/blink/renderer/platform/wtf/deque.h b/third_party/blink/renderer/platform/wtf/deque.h index 4a98ffb..80c92ec 100644 --- a/third_party/blink/renderer/platform/wtf/deque.h +++ b/third_party/blink/renderer/platform/wtf/deque.h
@@ -52,9 +52,7 @@ template <typename T, wtf_size_t inlineCapacity = 0, typename Allocator = PartitionAllocator> -class Deque : public ConditionalDestructor<Deque<T, INLINE_CAPACITY, Allocator>, - (INLINE_CAPACITY == 0) && - Allocator::kIsGarbageCollected> { +class Deque { USE_ALLOCATOR(Deque, Allocator); public: @@ -68,8 +66,9 @@ Deque& operator=(const Deque&); Deque(Deque&&); Deque& operator=(Deque&&); + ~Deque(); - void Finalize(); + void FinalizeGarbageCollectedObject() { NOTREACHED(); } void Swap(Deque&); @@ -375,18 +374,16 @@ // For design of the destructor, please refer to // [here](https://docs.google.com/document/d/1AoGTvb3tNLx2tD1hNqAfLRLmyM59GM0O-7rCHTT_7_U/) template <typename T, wtf_size_t inlineCapacity, typename Allocator> -inline void Deque<T, inlineCapacity, Allocator>::Finalize() { - static_assert(!Allocator::kIsGarbageCollected || INLINE_CAPACITY, - "GarbageCollected collections without inline capacity cannot " - "be finalized."); +inline Deque<T, inlineCapacity, Allocator>::~Deque() { if ((!INLINE_CAPACITY && !buffer_.Buffer())) return; if (!IsEmpty() && !(Allocator::kIsGarbageCollected && buffer_.HasOutOfLineBuffer())) DestroyAll(); - // For garbage collected deque HeapAllocator::BackingFree() will bail out - // during sweeping. + // If this is called during sweeping, it must not touch the OutOfLineBuffer. + if (Allocator::IsSweepForbidden()) + return; buffer_.Destruct(); }
diff --git a/third_party/blink/renderer/platform/wtf/hash_table.h b/third_party/blink/renderer/platform/wtf/hash_table.h index 4ab6b1e3..eb73aac 100644 --- a/third_party/blink/renderer/platform/wtf/hash_table.h +++ b/third_party/blink/renderer/platform/wtf/hash_table.h
@@ -29,7 +29,6 @@ #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/allocator/partition_allocator.h" #include "third_party/blink/renderer/platform/wtf/assertions.h" -#include "third_party/blink/renderer/platform/wtf/conditional_destructor.h" #include "third_party/blink/renderer/platform/wtf/construct_traits.h" #include "third_party/blink/renderer/platform/wtf/hash_traits.h" @@ -695,15 +694,7 @@ typename Traits, typename KeyTraits, typename Allocator> -class HashTable final - : public ConditionalDestructor<HashTable<Key, - Value, - Extractor, - HashFunctions, - Traits, - KeyTraits, - Allocator>, - Allocator::kIsGarbageCollected> { +class HashTable final { DISALLOW_NEW(); public: @@ -735,11 +726,15 @@ HashTable(); - void Finalize() { - static_assert(!Allocator::kIsGarbageCollected, - "GCed collections can't be finalized."); + // For design of the destructor, please refer to + // [here](https://docs.google.com/document/d/1AoGTvb3tNLx2tD1hNqAfLRLmyM59GM0O-7rCHTT_7_U/) + ~HashTable() { if (LIKELY(!table_)) return; + // If this is called during sweeping, it must not touch other heap objects + // such as the backing. + if (Allocator::IsSweepForbidden()) + return; EnterAccessForbiddenScope(); DeleteAllBucketsAndDeallocate(table_, table_size_); LeaveAccessForbiddenScope();
diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set.h b/third_party/blink/renderer/platform/wtf/list_hash_set.h index 78bd279..046d8390 100644 --- a/third_party/blink/renderer/platform/wtf/list_hash_set.h +++ b/third_party/blink/renderer/platform/wtf/list_hash_set.h
@@ -25,7 +25,6 @@ #include <memory> #include "third_party/blink/renderer/platform/wtf/allocator/partition_allocator.h" -#include "third_party/blink/renderer/platform/wtf/conditional_destructor.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" namespace WTF { @@ -77,10 +76,7 @@ typename HashArg = typename DefaultHash<ValueArg>::Hash, typename AllocatorArg = ListHashSetAllocator<ValueArg, inlineCapacity>> -class ListHashSet - : public ConditionalDestructor< - ListHashSet<ValueArg, inlineCapacity, HashArg, AllocatorArg>, - AllocatorArg::kIsGarbageCollected> { +class ListHashSet { typedef AllocatorArg Allocator; USE_ALLOCATOR(ListHashSet, Allocator); @@ -152,7 +148,7 @@ ListHashSet(ListHashSet&&); ListHashSet& operator=(const ListHashSet&); ListHashSet& operator=(ListHashSet&&); - void Finalize(); + ~ListHashSet(); void Swap(ListHashSet&); @@ -808,10 +804,14 @@ allocator_provider_.Swap(other.allocator_provider_); } +// For design of the destructor, please refer to +// [here](https://docs.google.com/document/d/1AoGTvb3tNLx2tD1hNqAfLRLmyM59GM0O-7rCHTT_7_U/) template <typename T, size_t inlineCapacity, typename U, typename V> -inline void ListHashSet<T, inlineCapacity, U, V>::Finalize() { - static_assert(!Allocator::kIsGarbageCollected, - "GCed collections can't be finalized"); +inline ListHashSet<T, inlineCapacity, U, V>::~ListHashSet() { + // If this is called during GC sweeping, it must not touch other heap objects + // such as the ListHashSetNodes that is touching in DeleteAllNodes(). + if (Allocator::IsSweepForbidden()) + return; DeleteAllNodes(); allocator_provider_.ReleaseAllocator(); }
diff --git a/third_party/blink/renderer/platform/wtf/vector.h b/third_party/blink/renderer/platform/wtf/vector.h index 43a27f7..3091e1c0 100644 --- a/third_party/blink/renderer/platform/wtf/vector.h +++ b/third_party/blink/renderer/platform/wtf/vector.h
@@ -31,7 +31,6 @@ #include "base/template_util.h" #include "build/build_config.h" #include "third_party/blink/renderer/platform/wtf/allocator/partition_allocator.h" -#include "third_party/blink/renderer/platform/wtf/conditional_destructor.h" #include "third_party/blink/renderer/platform/wtf/construct_traits.h" #include "third_party/blink/renderer/platform/wtf/container_annotations.h" #include "third_party/blink/renderer/platform/wtf/forward.h" // For default Vector template parameters. @@ -974,11 +973,7 @@ // store iterators in another heap object. template <typename T, wtf_size_t inlineCapacity, typename Allocator> -class Vector - : private VectorBuffer<T, INLINE_CAPACITY, Allocator>, - public ConditionalDestructor<Vector<T, INLINE_CAPACITY, Allocator>, - (INLINE_CAPACITY == 0) && - Allocator::kIsGarbageCollected> { +class Vector : private VectorBuffer<T, INLINE_CAPACITY, Allocator> { USE_ALLOCATOR(Vector, Allocator); using Base = VectorBuffer<T, INLINE_CAPACITY, Allocator>; using TypeOperations = VectorTypeOperations<T, Allocator>; @@ -1262,12 +1257,12 @@ return Allocator::template MaxElementCountInBackingStore<T>(); } - void Finalize() { - static_assert(!Allocator::kIsGarbageCollected || INLINE_CAPACITY, - "GarbageCollected collections without inline capacity cannot " - "be finalized."); - if (!INLINE_CAPACITY && LIKELY(!Base::Buffer())) { - return; + // For design of the destructor, please refer to + // [here](https://docs.google.com/document/d/1AoGTvb3tNLx2tD1hNqAfLRLmyM59GM0O-7rCHTT_7_U/) + ~Vector() { + if (!INLINE_CAPACITY) { + if (LIKELY(!Base::Buffer())) + return; } ANNOTATE_DELETE_BUFFER(begin(), capacity(), size_); if (LIKELY(size_) && @@ -1276,11 +1271,21 @@ size_ = 0; // Partial protection against use-after-free. } - // For garbage collected vector HeapAllocator::BackingFree() will bail out - // during sweeping. + // If this is called during sweeping, the backing should not be touched. + // Other collections have an early return here if IsSweepForbidden(), but + // adding that resulted in performance regression for shadow dom benchmarks + // (crbug.com/866084) because of the additional access to TLS. The check has + // been removed but the same check exists in HeapAllocator::BackingFree() so + // things should be fine as long as VectorBase does not touch the backing. + Base::Destruct(); } + // This method will be referenced when creating an on-heap HeapVector with + // inline capacity and elements requiring destruction. However usage of such a + // type is banned with a static assert. + void FinalizeGarbageCollectedObject() { NOTREACHED(); } + template <typename VisitorDispatcher, typename A = Allocator> std::enable_if_t<A::kIsGarbageCollected> Trace(VisitorDispatcher);
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-blink-features=LayoutNG b/third_party/blink/web_tests/FlagExpectations/disable-blink-features=LayoutNG index 600b724..1881dac8 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-blink-features=LayoutNG +++ b/third_party/blink/web_tests/FlagExpectations/disable-blink-features=LayoutNG
@@ -297,11 +297,9 @@ # Just because these need a re-baseline from "LayoutNGBlockFlow" to "LayoutBlockFlow" crbug.com/591099 paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky.html [ Failure ] crbug.com/591099 virtual/compositor_threaded_scrollbar_scrolling/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky.html [ Failure ] crbug.com/591099 external/wpt/css/css-flexbox/percentage-heights-006.html [ Failure ] # These would need a rebaseline back from LayoutNGBlockFlow to LayoutBlockFlow crbug.com/591099 compositing/overflow/scroll-parent-absolute-with-backdrop-filter.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/compositing/overflow/scroll-parent-absolute-with-backdrop-filter.html [ Failure ] crbug.com/591099 virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-parent-absolute-with-backdrop-filter.html [ Failure ] \ No newline at end of file
diff --git a/third_party/blink/web_tests/FlagExpectations/disable-features=NetworkService b/third_party/blink/web_tests/FlagExpectations/disable-features=NetworkService index c39c5626..5d31e3fc 100644 --- a/third_party/blink/web_tests/FlagExpectations/disable-features=NetworkService +++ b/third_party/blink/web_tests/FlagExpectations/disable-features=NetworkService
@@ -38,7 +38,7 @@ Bug(none) http/tests/security/script-crossorigin-redirect-credentials.html [ Skip ] Bug(none) http/tests/xmlhttprequest/cross-origin-unsupported-url.html [ Skip ] Bug(none) http/tests/xmlhttprequest/workers/cross-origin-unsupported-url.html [ Skip ] -Bug(none) http/tests/security/img-redirect-to-crossorigin-credentials.html [ Skip ] +Bug(none) http/tests/security/img-redirect-to-crossorigin-credentials.https.html [ Skip ] Bug(none) mhtml/cid_in_html_resource.html [ Skip ] Bug(none) virtual/omt-worker-fetch [ Skip ]
diff --git a/third_party/blink/web_tests/FlagExpectations/enable-blink-features=CompositeAfterPaint b/third_party/blink/web_tests/FlagExpectations/enable-blink-features=CompositeAfterPaint index 4c42f9e..2e1e3bc9 100644 --- a/third_party/blink/web_tests/FlagExpectations/enable-blink-features=CompositeAfterPaint +++ b/third_party/blink/web_tests/FlagExpectations/enable-blink-features=CompositeAfterPaint
@@ -2,8 +2,6 @@ # See: https://docs.google.com/document/d/1QCM912Dr6u38DqyQqd7pxQxDy8FFOoWMMDq7uAXqKdA/view Bug(none) http/tests/devtools/tracing/ [ Skip ] -Bug(none) virtual/disable-blink-gen-property-trees/ [ Skip ] - Bug(none) virtual/gpu/fast/canvas/ [ Skip ] Bug(none) virtual/layout_ng/ [ Skip ] Bug(none) virtual/layout_ng_experimental/ [ Skip ]
diff --git a/third_party/blink/web_tests/SlowTests b/third_party/blink/web_tests/SlowTests index 3ea40c6d..9a5e358 100644 --- a/third_party/blink/web_tests/SlowTests +++ b/third_party/blink/web_tests/SlowTests
@@ -397,7 +397,7 @@ crbug.com/874695 fast/webgl/webgl-composite-modes-tabswitching.html [ Slow ] crbug.com/874695 fast/workers/chromium/worker-document-leak.html [ Slow ] crbug.com/874695 fullscreen/full-screen-restrictions.html [ Slow ] -crbug.com/874695 http/tests/cookies/same-site/framed.html [ Slow ] +crbug.com/874695 http/tests/cookies/same-site/framed.https.html [ Slow ] crbug.com/874695 http/tests/credentialmanager/credentialscontainer-create-with-virtual-authenticator.html [ Slow ] crbug.com/874695 http/tests/credentialmanager/credentialscontainer-get-origins.html [ Slow ] crbug.com/874695 http/tests/credentialmanager/register-then-sign.html [ Slow ] @@ -607,7 +607,6 @@ crbug.com/874695 http/tests/devtools/sxg/sxg-disable-cache.js [ Slow ] crbug.com/874695 virtual/sxg-with-network-service/http/tests/devtools/sxg/sxg-disable-cache.js [ Slow ] crbug.com/874695 virtual/threaded/animations/svg/animated-filter-svg-element.html [ Slow ] -crbug.com/874695 virtual/disable-blink-gen-property-trees/animations/svg/animated-filter-svg-element.html [ Slow ] crbug.com/874695 virtual/threaded/fast/idle-callback/idle_periods.html [ Slow ] crbug.com/874695 virtual/threaded/fast/idle-callback/long_idle_periods.html [ Slow ] crbug.com/874695 virtual/threaded/fast/scroll-behavior/overscroll-behavior.html [ Slow ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 508b379..40c2239 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -164,7 +164,6 @@ crbug.com/504613 crbug.com/524248 [ Mac ] paint/images/image-backgrounds-not-antialiased.html [ Failure ] crbug.com/619103 paint/invalidation/background/background-resize-width.html [ Failure Pass ] -crbug.com/619103 virtual/disable-blink-gen-property-trees/paint/invalidation/background/background-resize-width.html [ Failure Pass ] crbug.com/784956 fast/history/frameset-repeated-name.html [ Pass Failure ] @@ -259,11 +258,12 @@ # Display locking failures crbug.com/955533 wpt_internal/display-lock/sizing/overflow-auto-with-overflow.html [ Failure ] +# Skip some tests for rendersubtree +crbug.com/991095 wpt_internal/display-lock/rendersubtree/containment [ Skip ] +crbug.com/991095 wpt_internal/display-lock/rendersubtree/sizing [ Skip ] # virtual-scroller failures crbug.com/986574 wpt_internal/virtual-scroller/ [ Failure ] -# Skip tests for rendersubtree for now. -crbug.com/991095 wpt_internal/display-lock/rendersubtree/ [ Skip ] # Sheriff 2018/05/25 crbug.com/846747 http/tests/navigation/navigation-interrupted-by-fragment.html [ Pass Timeout ] @@ -276,24 +276,6 @@ Bug(none) http/tests/devtools/layers/layer-sticky-position-constraint-get.js [ Skip ] Bug(none) inspector-protocol/layers/get-layers.js [ Skip ] -# Before we fully launch BlinkGenPropertyTrees, run visual/disable-blink-gen-property-trees/ on Linux. -crbug.com/836884 [ Win ] virtual/disable-blink-gen-property-trees/ [ Skip ] -crbug.com/836884 [ Mac ] virtual/disable-blink-gen-property-trees/ [ Skip ] -crbug.com/836884 [ Fuchsia ] virtual/disable-blink-gen-property-trees/ [ Skip ] - -# Failures in non-BlinkGenPropertyTree mode. -# TODO(wangxianzhu): Remove them when we remove non-BlinkGenPropertyTree code. -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/3d-cube.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/composited-canvas-with-overflowing-object-fit.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/gestures/gesture-tapHighlight-simple-longPress.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/gestures/gesture-tapHighlight-with-filter.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/overflow/composited-scroll-with-fractional-translation.html [ Failure ] -crbug.com/836884 virtual/disable-blink-gen-property-trees/compositing/video/video-controls-layer-creation-squashing.html [ Failure ] - -# Broken pre-BGPT after removing tiled masks code. -crbug.com/979679 virtual/disable-blink-gen-property-trees/compositing/masks/broken-mask.html [ Failure ] - # These fail when device_scale_factor is changed, but only for anti-aliasing: crbug.com/968791 virtual/scalefactor200/css3/filters/effect-blur-hw.html [ Failure ] crbug.com/968791 virtual/scalefactor200/css3/filters/filterRegions.html [ Failure ] @@ -356,7 +338,6 @@ crbug.com/836886 compositing/overflow/scaled-overflow.html [ Failure ] # Flaky subpixel AA difference (not necessarily incorrect, but flaky) crbug.com/921105 virtual/threaded/animations/skew-notsequential-compositor.html [ Failure Pass ] -crbug.com/921105 virtual/disable-blink-gen-property-trees/animations/skew-notsequential-compositor.html [ Skip ] crbug.com/946532 external/wpt/css/css-backgrounds/background-clip/clip-text-dynamic-2.html [ Failure ] @@ -787,14 +768,6 @@ crbug.com/591099 paint/invalidation/compositing/stacked-float-under-composited-inline.html [ Failure ] crbug.com/591099 paint/invalidation/selection/selection-clear.html [ Failure ] crbug.com/591099 virtual/composite-after-paint/paint/background/scrolling-background-with-negative-z-child.html [ Failure Crash ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/media-audio-no-spurious-repaints.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/text-match-document-change.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/composited-float-under-composited-inline-individual.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/composited-float-under-composited-inline.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/float-under-composited-inline.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/stacked-float-under-composited-inline.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/flexbox/scrollbars-changed.html [ Failure ] -crbug.com/591099 virtual/disable-blink-gen-property-trees/paint/invalidation/selection/selection-clear.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-multicol/multicol-span-all-list-item-002.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/fast/multicol/border-radius-clipped-layer.html [ Failure ] crbug.com/591099 editing/selection/paint-hyphen.html [ Failure Pass ] @@ -817,7 +790,7 @@ crbug.com/591099 [ Fuchsia ] fast/lists/003.html [ Failure ] crbug.com/591099 [ Fuchsia ] fast/lists/scrolled-marker-paint.html [ Failure ] crbug.com/591099 [ Fuchsia ] fast/table/border-collapsing/004.html [ Failure ] -crbug.com/591099 [ Fuchsia ] fast/text/international/003.html [ Failure ] +crbug.com/591099 [ Fuchsia ] fast/text/international/003.html [ Failure Timeout ] crbug.com/591099 [ Fuchsia ] fast/text/international/bidi-LDB-2-HTML.html [ Failure ] crbug.com/591099 [ Fuchsia ] fast/text/international/bidi-LDB-2-formatting-characters.html [ Failure ] crbug.com/591099 [ Fuchsia ] fast/text/international/bidi-neutral-directionality-paragraph-start.html [ Failure ] @@ -1342,6 +1315,9 @@ #crbug.com/591099 [ Mac ] virtual/mouseevent_fractional/fast/events/before-unload-return-value-from-listener.html [ Crash Timeout ] crbug.com/591099 [ Mac10.13 ] virtual/scroll_customization/fast/events/touch/compositor-touch-hit-rects-continuation.html [ Failure ] +crbug.com/992920 [ Mac10.13 ] fast/dom/collection-item-should-be-overridden-by-own-property.html [ Crash Pass ] +crbug.com/992920 [ Mac10.13 ] fast/text/forced-break-before-close-tag.html [ Crash Pass ] + #crbug.com/974725 [ Win7 ] fast/events/before-unload-return-value-from-listener.html [ Pass Crash ] # A few other lines for this test are commented out above to avoid conflicting expectations. @@ -2156,15 +2132,12 @@ ## Next 10 can be viewed in this run, by clicking on "Did not pass 11183": ## https://test-results.appspot.com/data/layout_results/linux-blink-rel/1237/webkit_layout_tests%20%28with%20patch%29/layout-test-results/results.html crbug.com/891427 virtual/threaded/animations/responsive/viewport-unit-transform-responsive.html [ Timeout ] -crbug.com/891427 virtual/disable-blink-gen-property-trees/animations/responsive/viewport-unit-transform-responsive.html [ Skip ] crbug.com/891427 virtual/threaded/animations/responsive/viewport-unit-translate-responsive.html [ Timeout ] -crbug.com/891427 virtual/disable-blink-gen-property-trees/animations/responsive/viewport-unit-translate-responsive.html [ Skip ] crbug.com/891427 fast/replaced/replaced-breaking.html [ Failure ] crbug.com/891427 virtual/android/fullscreen/rendering/backdrop-video.html [ Failure ] crbug.com/891427 virtual/android/url-bar/bottom-and-top-fixed-sticks-to-top.html [ Failure ] ## Next 4 here: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/linux_chromium_rel_ng/216317 crbug.com/891427 virtual/threaded/animations/timing/animation-duration-infinite.html [ Failure ] -crbug.com/891427 virtual/disable-blink-gen-property-trees/animations/timing/animation-duration-infinite.html [ Skip ] crbug.com/891427 fast/overflow/transformed-frame-scrollIntoView.html [ Crash ] ### Flaky on trybots: @@ -2235,8 +2208,7 @@ crbug.com/983799 [ Win ] virtual/blink-cors/http/tests/navigation/redirect-on-back-updates-history-item.html [ Timeout Pass ] crbug.com/983789 [ Win7 ] http/tests/cookies/js-set-null.html [ Pass Failure ] crbug.com/983788 http/tests/cookies/http-get-cookie-set-in-js.html [ Pass Failure ] -crbug.com/983788 http/tests/cookies/same-site/popup-cross-site.html [ Pass Timeout ] -crbug.com/983788 http/tests/cookies/same-site/popup-cross-site-post.html [ Pass Timeout ] +crbug.com/983788 http/tests/cookies/same-site/popup-cross-site.https.html [ Pass Timeout ] crbug.com/984438 external/wpt/css/css-scroll-snap/snap-at-user-scroll-end-manual.html [ Failure Pass ] crbug.com/982148 [ Win7 ] virtual/blink-cors/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/img-tag/keep-origin-redirect/same-origin-insecure.http.html [ Pass Timeout ] crbug.com/982148 [ Win7 ] virtual/omt-worker-fetch/external/wpt/referrer-policy/same-origin/http-rp/same-origin/http-http/img-tag/keep-origin-redirect/same-origin-insecure.http.html [ Pass Timeout ] @@ -5323,47 +5295,46 @@ crbug.com/827231 [ Win ] external/wpt/cookie-store/document_cookie.tentative.https.html [ Pass Failure Timeout ] # Failing SameSite cookies tests -crbug.com/843945 external/wpt/cookies/samesite/form-get-blank-reload.html [ Failure ] -crbug.com/843945 external/wpt/cookies/samesite/form-post-blank-reload.html [ Failure ] -crbug.com/843945 external/wpt/cookies/samesite/window-open-reload.html [ Failure ] -crbug.com/961745 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-get-blank-reload.html?samesite-by-default-cookies.tentative [ Failure ] -crbug.com/961745 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-post-blank-reload.html?samesite-by-default-cookies.tentative [ Failure ] -crbug.com/961745 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/window-open-reload.html?samesite-by-default-cookies.tentative [ Failure ] +crbug.com/843945 external/wpt/cookies/samesite/form-get-blank-reload.https.html [ Failure ] +crbug.com/843945 external/wpt/cookies/samesite/form-post-blank-reload.https.html [ Failure ] +crbug.com/843945 external/wpt/cookies/samesite/window-open-reload.https.html [ Failure ] +crbug.com/961745 virtual/legacy-samesite/external/wpt/cookies/samesite/form-get-blank-reload.https.html?legacy-samesite [ Failure ] +crbug.com/961745 virtual/legacy-samesite/external/wpt/cookies/samesite/form-post-blank-reload.https.html?legacy-samesite [ Failure ] +crbug.com/961745 virtual/legacy-samesite/external/wpt/cookies/samesite/window-open-reload.https.html?legacy-samesite [ Failure ] -# Tentative SameSite-by-default tests do not apply when SameSiteByDefaultCookies is not enabled. -crbug.com/961439 external/wpt/cookies/samesite/fetch.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/form-get-blank-reload.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/form-get-blank.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/form-post-blank-reload.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/form-post-blank.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/iframe-reload.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/iframe.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/img.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/setcookie-lax.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/setcookie-navigation.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/window-open-reload.html?samesite-by-default-cookies.tentative [ Skip ] -crbug.com/961439 external/wpt/cookies/samesite/window-open.html?samesite-by-default-cookies.tentative [ Skip ] +# When SameSiteByDefaultCookies is enabled (which is the case by default since +# it's one of the experimental-web-platform-features, the Lax-allow-unsafe +# intervention causes POST tests to fail. +crbug.com/990439 external/wpt/cookies/samesite/form-post-blank.https.html [ Failure ] +crbug.com/990439 http/tests/cookies/same-site/popup-cross-site-post.https.html [ Failure ] -# Regular SameSite cookie tests do not apply when SameSiteByDefaultCookies is enabled. -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/fetch.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-get-blank-reload.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-get-blank.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-post-blank-reload.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-post-blank.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/iframe-reload.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/iframe.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/img.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/setcookie-lax.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/setcookie-navigation.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/window-open-reload.html [ Skip ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/window-open.html [ Skip ] +# Legacy SameSite cookie tests do not apply when non-legacy behavior is in effect. +crbug.com/961439 external/wpt/cookies/samesite/fetch.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/form-get-blank-reload.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/form-get-blank.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/form-post-blank-reload.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/form-post-blank.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/iframe-reload.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/iframe.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/img.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/setcookie-lax.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/setcookie-navigation.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/window-open-reload.https.html?legacy-samesite [ Skip ] +crbug.com/961439 external/wpt/cookies/samesite/window-open.https.html?legacy-samesite [ Skip ] -# When SameSiteByDefaultCookies is enabled, the Lax-allow-unsafe intervention causes POST tests to fail. -crbug.com/990439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite/form-post-blank.html?samesite-by-default-cookies.tentative [ Failure ] - -# CookiesWithoutSameSiteMustBeSecure tests do not pass when that feature is not enabled. -crbug.com/961439 external/wpt/cookies/samesite-none-secure/ [ Failure ] -crbug.com/961439 virtual/samesite-by-default-cookies/external/wpt/cookies/samesite-none-secure/ [ Failure ] +# Non-legacy SameSite cookie tests do not apply when legacy SameSite behavior is in effect. +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/fetch.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/form-get-blank-reload.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/form-get-blank.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/form-post-blank-reload.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/form-post-blank.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/iframe-reload.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/iframe.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/img.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/setcookie-lax.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/setcookie-navigation.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/window-open-reload.https.html [ Skip ] +crbug.com/961439 virtual/legacy-samesite/external/wpt/cookies/samesite/window-open.https.html [ Skip ] # Sheriff failures 2017-11-15 crbug.com/785179 [ Win7 Debug ] http/tests/devtools/console/console-viewport-stick-to-bottom.js [ Skip ] @@ -5984,11 +5955,8 @@ crbug.com/922951 virtual/prefer_compositing_to_lcd_text/scrollbars/resize-scales-with-dpi-150.html [ Skip ] crbug.com/922951 virtual/scalefactor150/fast/events/synthetic-events/tap-on-scaled-screen.html [ Skip ] crbug.com/922951 virtual/threaded/animations/direction-and-fill/fill-mode-iteration-count-non-integer.html [ Skip ] -crbug.com/922951 virtual/disable-blink-gen-property-trees/animations/direction-and-fill/fill-mode-iteration-count-non-integer.html [ Skip ] crbug.com/922951 virtual/threaded/animations/direction-and-fill/fill-mode-missing-from-to-keyframes.html [ Skip ] -crbug.com/922951 virtual/disable-blink-gen-property-trees/animations/direction-and-fill/fill-mode-missing-from-to-keyframes.html [ Skip ] crbug.com/922951 virtual/threaded/animations/direction-and-fill/fill-mode.html [ Skip ] -crbug.com/922951 virtual/disable-blink-gen-property-trees/animations/direction-and-fill/fill-mode.html [ Skip ] crbug.com/922951 virtual/threaded/http/tests/devtools/tracing/frame-model-instrumentation.js [ Skip ] crbug.com/922951 virtual/threaded/http/tests/devtools/tracing/timeline-layout/timeline-layout-reason.js [ Skip ] crbug.com/922951 virtual/threaded/http/tests/devtools/tracing/timeline-layout/timeline-layout-with-invalidations.js [ Skip ] @@ -6061,6 +6029,7 @@ # Sheriff 2019-02-22 crbug.com/934636 http/tests/security/cross-origin-indexeddb-allowed.html [ Crash Pass ] crbug.com/934818 virtual/threaded/http/tests/devtools/tracing/decode-resize.js [ Failure Pass ] +crbug.com/934818 http/tests/devtools/tracing/decode-resize.js [ Failure Pass ] # Sheriff 2019-02-25 crbug.com/935689 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/counter-styles-3/symbols-function-invalid.html [ Failure Pass ] @@ -6097,7 +6066,6 @@ crbug.com/937811 [ Win Release ] http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-2.js [ Pass Failure ] crbug.com/935689 external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/counter-styles-3/symbols-function.html [ Failure Pass ] crbug.com/937858 [ Debug ] external/wpt/ambient-light/AmbientLightSensor.https.html [ Pass Failure ] -crbug.com/937902 [ Linux Debug ] virtual/disable-blink-gen-property-trees/compositing/overflow/overflow-scroll-with-local-background.html [ Pass Failure ] # Sheriff 2019-03-05 crbug.com/938200 http/tests/devtools/network/network-blocked-reason.js [ Timeout Pass ] @@ -6323,7 +6291,7 @@ crbug.com/966345 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped.html [ Failure ] crbug.com/905971 virtual/blink-cors/external/wpt/service-workers/service-worker/detached-context.https.html [ Pass Crash ] -crbug.com/905971 virtual/blink-cors/http/tests/security/img-redirect-to-crossorigin-credentials.html [ Failure ] +crbug.com/905971 virtual/blink-cors/http/tests/security/img-redirect-to-crossorigin-credentials.https.html [ Failure ] crbug.com/905971 virtual/blink-cors/http/tests/security/script-crossorigin-redirect-credentials.html [ Failure ] # Sheriff 2019-06-04 @@ -6492,6 +6460,10 @@ crbug.com/937811 [ Win Release ] http/tests/devtools/elements/shadow/elements-panel-shadow-selection-on-refresh-3.js [ Pass Failure Timeout ] crbug.com/988074 [ Linux ] virtual/cors-rfc1918/http/tests/security/cors-rfc1918/addressspace-serviceworker-basic.html [ Pass Failure ] +# Pending enabling navigation feature +crbug.com/705583 external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html [ Skip ] +crbug.com/705583 external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html [ Skip ] + # Sheriff 2019-07-30 crbug.com/987115 [ Win Linux ] virtual/threaded/fast/scrolling/scrollbars/scrollbar-button-gesture-target.html [ Crash Pass Failure ] crbug.com/626703 [ Mac ] external/wpt/css/cssom-view/scrollIntoView-sideways-lr-writing-mode-and-rtl-direction.html [ Failure ] @@ -6509,8 +6481,8 @@ crbug.com/979422 [ Mac ] fast/borders/border-radius-mask-canvas-with-mask.html [ Failure ] crbug.com/979422 [ Mac ] fast/borders/border-radius-mask-canvas-border.html [ Failure ] crbug.com/979422 [ Mac ] fast/borders/border-radius-mask-video.html [ Failure ] -crbug.com/989365 [ Win7 ] virtual/blink-cors/http/tests/security/img-crossorigin-redirect-credentials.html [ Pass Timeout ] -crbug.com/989365 [ Win7 ] http/tests/security/img-crossorigin-redirect-credentials.html [ Pass Timeout ] +crbug.com/989365 [ Win7 ] virtual/blink-cors/http/tests/security/img-crossorigin-redirect-credentials.https.html [ Pass Timeout ] +crbug.com/989365 [ Win7 ] http/tests/security/img-crossorigin-redirect-credentials.https.html [ Pass Timeout ] crbug.com/989014 [ Linux Debug ] external/wpt/cookie-store/serviceworker_cookieStore_subscriptions_eventhandler_attribute.tentative.https.html [ Pass Timeout ] crbug.com/989665 [ Win Linux ] virtual/omt-worker-fetch/external/wpt/resource-timing/resource_timing_buffer_full_eventually.html [ Pass Timeout ] @@ -6526,9 +6498,12 @@ crbug.com/991243 [ Linux ] external/wpt/workers/semantics/multiple-workers/003.html [ Pass Timeout ] crbug.com/991243 [ Linux ] virtual/omt-worker-fetch/external/wpt/workers/semantics/multiple-workers/003.html [ Pass Timeout ] -# Sheriff 2019-08-08 -crbug.com/992148 [ Linux ] virtual/disable-blink-gen-property-trees/animations/stability/animation-iteration-event-destroy-renderer.html [ Pass Timeout ] - # Expected failure for experimental Scheduling API when running without the # BlinkSchedulerDisableAntiStarvationForPriorities feature. crbug.com/979017 wpt_internal/scheduler/task_order.html [ Failure ] + +# Sheriff 2019-08-09 +crbug.com/992531 [ Linux ] virtual/audio-service/media/controls/doubletap-to-jump-backwards-at-start.html [ Pass Failure ] +crbug.com/992615 [ Linux ] external/wpt/import-maps/data.sub.tentative.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/generic-sensor/idlharness.https.window.html [ Pass Timeout ] +crbug.com/856601 [ Linux ] external/wpt/secure-contexts/idlharness.any.html [ Pass Timeout ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index db4a255..6ead432c 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -136,29 +136,6 @@ "--force-raster-color-profile=color-spin-gamma24"] }, { - "prefix": "disable-blink-gen-property-trees", - "base": "animations", - "args": ["--disable-blink-features=BlinkGenPropertyTrees", - "--enable-threaded-compositing", - "--disable-composited-antialiasing"] - }, - { - "prefix": "disable-blink-gen-property-trees", - "base": "transitions", - "args": ["--disable-blink-features=BlinkGenPropertyTrees", - "--enable-threaded-compositing"] - }, - { - "prefix": "disable-blink-gen-property-trees", - "base": "compositing", - "args": ["--disable-blink-features=BlinkGenPropertyTrees"] - }, - { - "prefix": "disable-blink-gen-property-trees", - "base": "paint", - "args": ["--disable-blink-features=BlinkGenPropertyTrees"] - }, - { "prefix": "stable", "base": "webexposed", "args": ["--stable-release-mode"] @@ -1001,14 +978,9 @@ "args": ["--disable-blink-features=CustomUserTiming"] }, { - "prefix": "samesite-by-default-cookies", - "base": "external/wpt/cookies", - "args": ["--enable-features=SameSiteByDefaultCookies"] - }, - { - "prefix": "cookies-without-samesite-must-be-secure", - "base": "external/wpt/cookies/samesite-none-secure", - "args": ["--enable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure"] + "prefix": "legacy-samesite", + "base": "external/wpt/cookies/samesite", + "args": ["--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure"] }, { "prefix": "blink-cors",
diff --git a/third_party/blink/web_tests/WPTOverrideExpectations b/third_party/blink/web_tests/WPTOverrideExpectations index ecc0e68..0c79361 100644 --- a/third_party/blink/web_tests/WPTOverrideExpectations +++ b/third_party/blink/web_tests/WPTOverrideExpectations
@@ -122,6 +122,8 @@ crbug.com/lpz external/wpt/client-hints/sec-ch-ua.https.html [ Failure ] crbug.com/lpz external/wpt/clipboard-apis/async-interfaces.https.html [ Failure ] crbug.com/lpz external/wpt/compat/idlharness.window.html [ Failure ] +crbug.com/lpz external/wpt/console/idlharness.any.html [ Failure ] +crbug.com/lpz external/wpt/console/idlharness.any.worker.html [ Failure ] crbug.com/lpz external/wpt/contacts/contacts-select.https.window.html [ Failure ] crbug.com/lpz external/wpt/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block.html [ Failure ] crbug.com/lpz external/wpt/content-security-policy/frame-ancestors/frame-ancestors-nested-cross-in-cross-self-block.html [ Failure ] @@ -1206,6 +1208,8 @@ crbug.com/lpz external/wpt/idle-detection/interceptor.https.html [ Failure ] crbug.com/lpz external/wpt/import-maps/resolving.tentative.html [ Failure ] crbug.com/lpz external/wpt/inert/inert-node-is-uneditable.tentative.html [ Failure ] +crbug.com/lpz external/wpt/inert/inert-retargeting-iframe.tentative.html [ Failure ] +crbug.com/lpz external/wpt/inert/inert-retargeting.tentative.html [ Failure ] crbug.com/lpz external/wpt/infrastructure/assumptions/ahem.html [ Failure ] crbug.com/lpz external/wpt/infrastructure/expected-fail/failing-test.html [ Failure ] crbug.com/lpz external/wpt/infrastructure/reftest/reftest_and_fail.html [ Failure ] @@ -1241,6 +1245,7 @@ crbug.com/lpz external/wpt/media-source/idlharness.any.html [ Failure ] crbug.com/lpz external/wpt/media-source/idlharness.any.worker.html [ Failure ] crbug.com/lpz external/wpt/media-source/mediasource-append-buffer.html [ Failure ] +crbug.com/lpz external/wpt/media-source/mediasource-detach.html [ Pass Failure ] crbug.com/lpz external/wpt/mediacapture-fromelement/historical.html [ Failure ] crbug.com/lpz external/wpt/mediacapture-fromelement/idlharness.window.html [ Failure ] crbug.com/lpz external/wpt/mediacapture-image/MediaStreamTrack-getConstraints-fast.html [ Failure ] @@ -1408,6 +1413,7 @@ crbug.com/lpz external/wpt/pointerevents/idlharness.window.html [ Failure ] crbug.com/lpz external/wpt/pointerevents/pointerevent_pointercapture_in_frame.html [ Failure ] crbug.com/lpz external/wpt/pointerevents/pointerlock/pointerevent_coordinates_when_locked.html [ Timeout ] +crbug.com/lpz external/wpt/pointerevents/pointerlock/pointerevent_movementxy.html [ Failure ] crbug.com/lpz external/wpt/pointerevents/pointerlock/pointerevent_movementxy_with_pointerlock.html [ Timeout ] crbug.com/lpz external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_after_pointercapture.html [ Failure ] crbug.com/lpz external/wpt/pointerevents/pointerlock/pointerevent_pointerlock_supercedes_capture.html [ Failure ] @@ -1766,9 +1772,11 @@ crbug.com/lpz external/wpt/web-animations/timing-model/animations/setting-the-target-effect-of-an-animation.html [ Failure ] crbug.com/lpz external/wpt/web-animations/timing-model/animations/setting-the-timeline-of-an-animation.html [ Failure ] crbug.com/lpz external/wpt/web-locks/clientids.tentative.https.html [ Failure ] +crbug.com/lpz external/wpt/web-locks/query-ordering.tentative.https.html [ Pass Failure ] crbug.com/lpz external/wpt/web-nfc/NFCWriter_push.https.html [ Failure ] crbug.com/lpz external/wpt/web-nfc/idlharness.https.window.html [ Failure ] crbug.com/lpz external/wpt/webaudio/idlharness.https.window.html [ Failure ] +crbug.com/lpz external/wpt/webaudio/the-audio-api/the-audioworklet-interface/audioworkletnode-output-channel-count.https.html [ Pass Failure ] crbug.com/lpz external/wpt/webaudio/the-audio-api/the-delaynode-interface/delaynode-channel-count-1.html [ Failure ] crbug.com/lpz external/wpt/webauthn/createcredential-extensions.https.html [ Timeout ] crbug.com/lpz external/wpt/webauthn/createcredential-timeout.https.html [ Failure ]
diff --git a/third_party/blink/web_tests/WebDriverExpectations b/third_party/blink/web_tests/WebDriverExpectations index 75b416a..7be26100f 100644 --- a/third_party/blink/web_tests/WebDriverExpectations +++ b/third_party/blink/web_tests/WebDriverExpectations
@@ -2,6 +2,8 @@ # WPT WebDriver tests are a part of layout tests, but are run by a # separate runner, run_webdriver_tests.py. Thus this is a separate # expectation file from TestExpectations. +crbug.com/992524 [ Linux ] external/wpt/webdriver/tests/perform_actions/pointer_origin.py>>test_element_in_view_center_point_partly_visible [ Failure Pass ] +crbug.com/992524 [ Linux ] external/wpt/webdriver/tests/perform_actions/pointer_origin.py>>test_element_larger_than_viewport [ Failure Pass ] crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/add_cookie/user_prompts.py>>test_dismiss_and_notify[capabilities0-alert-None] [ Failure Pass ] crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/back/user_prompts.py>>test_default[alert-None] [ Failure Pass ] crbug.com/977228 [ Linux ] external/wpt/webdriver/tests/close_window/user_prompts.py>>test_ignore[capabilities0-alert] [ Failure Pass ]
diff --git a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json index 0ef218a..f6a49b56 100644 --- a/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json +++ b/third_party/blink/web_tests/external/WPT_BASE_MANIFEST_6.json
@@ -48059,6 +48059,18 @@ {} ] ], + "css/css-fonts/font-weight-xxx-large.html": [ + [ + "css/css-fonts/font-weight-xxx-large.html", + [ + [ + "/css/css-fonts/font-weight-xxx-large-ref.html", + "==" + ] + ], + {} + ] + ], "css/css-fonts/matching/fixed-stretch-style-over-weight.html": [ [ "css/css-fonts/matching/fixed-stretch-style-over-weight.html", @@ -100193,6 +100205,18 @@ {} ] ], + "css/filter-effects/backdrop-filter-containing-block.html": [ + [ + "css/filter-effects/backdrop-filter-containing-block.html", + [ + [ + "/css/filter-effects/backdrop-filter-containing-block-ref.html", + "==" + ] + ], + {} + ] + ], "css/filter-effects/backdrop-filter-edge-clipping.html": [ [ "css/filter-effects/backdrop-filter-edge-clipping.html", @@ -123929,7 +123953,13 @@ ] }, "support": { - ".github/main.workflow": [ + ".github/workflows/pull_request.yml": [ + [] + ], + ".github/workflows/push-build-publish-documentation-website.yml": [ + [] + ], + ".github/workflows/push-build-release-manifest.yml": [ [] ], ".gitignore": [ @@ -123980,9 +124010,6 @@ "2dcontext/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm": [ [] ], - "2dcontext/clear-100x50.png": [ - [] - ], "2dcontext/compositing/2d.composite.canvas.copy.png": [ [] ], @@ -124190,9 +124217,6 @@ "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_self_ref.html": [ [] ], - "2dcontext/drawing-rectangles-to-the-canvas/clear-100x50.png": [ - [] - ], "2dcontext/drawing-text-to-the-canvas/2d.text.draw.fill.basic.png": [ [] ], @@ -125990,6 +126014,12 @@ "console/OWNERS": [ [] ], + "console/idlharness.any-expected.txt": [ + [] + ], + "console/idlharness.any.worker-expected.txt": [ + [] + ], "contacts/OWNERS": [ [] ], @@ -134123,6 +134153,9 @@ "css/css-fonts/font-weight-normal-001-ref.xht": [ [] ], + "css/css-fonts/font-weight-xxx-large-ref.html": [ + [] + ], "css/css-fonts/idlharness-expected.txt": [ [] ], @@ -148793,6 +148826,9 @@ "css/filter-effects/backdrop-filter-clipped-ref.html": [ [] ], + "css/filter-effects/backdrop-filter-containing-block-ref.html": [ + [] + ], "css/filter-effects/backdrop-filter-edge-pixels-ref.html": [ [] ], @@ -161888,6 +161924,9 @@ "images/canvas-line.png": [ [] ], + "images/clear-100x50.png": [ + [] + ], "images/colors.svg": [ [] ], @@ -163613,6 +163652,9 @@ "mediasession/README.md": [ [] ], + "mediasession/idlharness.window-expected.txt": [ + [] + ], "mimesniff/META.yml": [ [] ], @@ -200413,6 +200455,24 @@ {} ] ], + "css/css-align/parsing/column-gap-computed.html": [ + [ + "css/css-align/parsing/column-gap-computed.html", + {} + ] + ], + "css/css-align/parsing/column-gap-invalid.html": [ + [ + "css/css-align/parsing/column-gap-invalid.html", + {} + ] + ], + "css/css-align/parsing/column-gap-valid.html": [ + [ + "css/css-align/parsing/column-gap-valid.html", + {} + ] + ], "css/css-align/parsing/justify-content-computed.html": [ [ "css/css-align/parsing/justify-content-computed.html", @@ -200521,6 +200581,24 @@ {} ] ], + "css/css-align/parsing/row-gap-computed.html": [ + [ + "css/css-align/parsing/row-gap-computed.html", + {} + ] + ], + "css/css-align/parsing/row-gap-invalid.html": [ + [ + "css/css-align/parsing/row-gap-invalid.html", + {} + ] + ], + "css/css-align/parsing/row-gap-valid.html": [ + [ + "css/css-align/parsing/row-gap-valid.html", + {} + ] + ], "css/css-align/self-alignment/parse-align-self-001.html": [ [ "css/css-align/self-alignment/parse-align-self-001.html", @@ -201577,6 +201655,12 @@ {} ] ], + "css/css-box/parsing/visibility-computed.html": [ + [ + "css/css-box/parsing/visibility-computed.html", + {} + ] + ], "css/css-box/parsing/visibility-invalid.html": [ [ "css/css-box/parsing/visibility-invalid.html", @@ -206245,24 +206329,6 @@ {} ] ], - "css/css-multicol/parsing/column-gap-computed.html": [ - [ - "css/css-multicol/parsing/column-gap-computed.html", - {} - ] - ], - "css/css-multicol/parsing/column-gap-invalid.html": [ - [ - "css/css-multicol/parsing/column-gap-invalid.html", - {} - ] - ], - "css/css-multicol/parsing/column-gap-valid.html": [ - [ - "css/css-multicol/parsing/column-gap-valid.html", - {} - ] - ], "css/css-multicol/parsing/column-rule-color-computed.html": [ [ "css/css-multicol/parsing/column-rule-color-computed.html", @@ -279710,6 +279776,23 @@ {} ] ], + "service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js": [ + [ + "service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.serviceworker.html", + { + "script_metadata": [ + [ + "title", + "fetch method on the right interface" + ], + [ + "global", + "!default,serviceworker" + ] + ] + } + ] + ], "service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html": [ [ "service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html", @@ -287695,12 +287778,162 @@ {} ] ], + "svg/animations/animVal-basics.html": [ + [ + "svg/animations/animVal-basics.html", + {} + ] + ], + "svg/animations/animate-marker-orient-from-angle-to-auto.html": [ + [ + "svg/animations/animate-marker-orient-from-angle-to-auto.html", + {} + ] + ], + "svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html": [ + [ + "svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html", + {} + ] + ], + "svg/animations/animate-marker-orient-to-angle.html": [ + [ + "svg/animations/animate-marker-orient-to-angle.html", + {} + ] + ], + "svg/animations/animate-number-calcMode-discrete-keyTimes.html": [ + [ + "svg/animations/animate-number-calcMode-discrete-keyTimes.html", + {} + ] + ], + "svg/animations/animate-number-calcMode-discrete.html": [ + [ + "svg/animations/animate-number-calcMode-discrete.html", + {} + ] + ], + "svg/animations/animate-path-animation-Cc-Ss.html": [ + [ + "svg/animations/animate-path-animation-Cc-Ss.html", + {} + ] + ], + "svg/animations/animate-path-animation-Ll-Vv-Hh.html": [ + [ + "svg/animations/animate-path-animation-Ll-Vv-Hh.html", + {} + ] + ], + "svg/animations/animate-path-animation-Mm-Aa-Z.html": [ + [ + "svg/animations/animate-path-animation-Mm-Aa-Z.html", + {} + ] + ], + "svg/animations/animate-path-animation-Qq-Tt.html": [ + [ + "svg/animations/animate-path-animation-Qq-Tt.html", + {} + ] + ], + "svg/animations/animate-path-animation-cC-sS-inverse.html": [ + [ + "svg/animations/animate-path-animation-cC-sS-inverse.html", + {} + ] + ], + "svg/animations/animate-path-animation-lL-vV-hH-inverse.html": [ + [ + "svg/animations/animate-path-animation-lL-vV-hH-inverse.html", + {} + ] + ], + "svg/animations/animate-path-animation-mM-aA-Z-inverse.html": [ + [ + "svg/animations/animate-path-animation-mM-aA-Z-inverse.html", + {} + ] + ], + "svg/animations/animate-path-animation-qQ-tT-inverse.html": [ + [ + "svg/animations/animate-path-animation-qQ-tT-inverse.html", + {} + ] + ], + "svg/animations/animate-path-to-animation.html": [ + [ + "svg/animations/animate-path-to-animation.html", + {} + ] + ], + "svg/animations/animateMotion-fill-freeze.html": [ + [ + "svg/animations/animateMotion-fill-freeze.html", + {} + ] + ], + "svg/animations/animateMotion-fill-remove.html": [ + [ + "svg/animations/animateMotion-fill-remove.html", + {} + ] + ], + "svg/animations/animateMotion-multiple.html": [ + [ + "svg/animations/animateMotion-multiple.html", + {} + ] + ], + "svg/animations/animateMotion-still.html": [ + [ + "svg/animations/animateMotion-still.html", + {} + ] + ], + "svg/animations/animateTransform-pattern-transform.html": [ + [ + "svg/animations/animateTransform-pattern-transform.html", + {} + ] + ], + "svg/animations/attributeTypes.html": [ + [ + "svg/animations/attributeTypes.html", + {} + ] + ], + "svg/animations/change-css-property-while-animating-fill-freeze.html": [ + [ + "svg/animations/change-css-property-while-animating-fill-freeze.html", + {} + ] + ], + "svg/animations/change-css-property-while-animating-fill-remove.html": [ + [ + "svg/animations/change-css-property-while-animating-fill-remove.html", + {} + ] + ], + "svg/animations/change-target-while-animating-SVG-property.html": [ + [ + "svg/animations/change-target-while-animating-SVG-property.html", + {} + ] + ], "svg/animations/correct-events-for-short-animations-with-syncbases.html": [ [ "svg/animations/correct-events-for-short-animations-with-syncbases.html", {} ] ], + "svg/animations/cyclic-syncbase.html": [ + [ + "svg/animations/cyclic-syncbase.html", + {} + ] + ], "svg/animations/discard-on-discard.html": [ [ "svg/animations/discard-on-discard.html", @@ -314587,8 +314820,16 @@ } }, "paths": { - ".github/main.workflow": [ - "20a0f33256d791dcb59a057b319fadd2b58bd663", + ".github/workflows/pull_request.yml": [ + "0bedfe3d42ceadc2ffd32d8c66b9c38c120ab9ca", + "support" + ], + ".github/workflows/push-build-publish-documentation-website.yml": [ + "de226d173fb300dd07e4ff5855b3fa2b7325434b", + "support" + ], + ".github/workflows/push-build-release-manifest.yml": [ + "6c97a2f7b9f952a41df100a9982e31617498347b", "support" ], ".gitignore": [ @@ -314663,10 +314904,6 @@ "d04926ebaca2eefae7c9216d26fda5161ef6ec51", "reftest" ], - "2dcontext/clear-100x50.png": [ - "eeedd0ff05889ffd4468bf19a2e8e9e0a094201c", - "support" - ], "2dcontext/compositing/2d.composite.canvas.copy.html": [ "5f32421fb79c5cb96ae5e57857c47982e8502858", "testharness" @@ -315659,10 +315896,6 @@ "3e8c7d4bf236592291effa82709bb4b62bf3884e", "testharness" ], - "2dcontext/drawing-rectangles-to-the-canvas/clear-100x50.png": [ - "eeedd0ff05889ffd4468bf19a2e8e9e0a094201c", - "support" - ], "2dcontext/drawing-text-to-the-canvas/2d.text.draw.align.center.html": [ "85e69b06e64abbd457584ab0c0d1ed847228b39e", "testharness" @@ -323975,10 +324208,18 @@ "3b9e5cea21da8e98a2bb8306ed9d5e642134ee5c", "manual" ], + "console/idlharness.any-expected.txt": [ + "eec2e27240b7e7c4431542cc1af8267236b76778", + "support" + ], "console/idlharness.any.js": [ "1e7ba76ecddca2ad707784a7ff6edfc270428c26", "testharness" ], + "console/idlharness.any.worker-expected.txt": [ + "eec2e27240b7e7c4431542cc1af8267236b76778", + "support" + ], "contacts/OWNERS": [ "bb162e9181809ae7f97a15c1427d0836db644222", "support" @@ -344227,6 +344468,18 @@ "25ea093b20997419f4d560d47cb9300d136d090e", "testharness" ], + "css/css-align/parsing/column-gap-computed.html": [ + "01e04b04994ae61e1e94952f06757cc896ab75df", + "testharness" + ], + "css/css-align/parsing/column-gap-invalid.html": [ + "181e004e7ca857444100513b0b82faeeddcc9648", + "testharness" + ], + "css/css-align/parsing/column-gap-valid.html": [ + "4be3b50989f56de6d1209c196e6cb28cb2c2d151", + "testharness" + ], "css/css-align/parsing/justify-content-computed.html": [ "b04d2db1429c385d57b9d6b232282d7924d6589b", "testharness" @@ -344299,6 +344552,18 @@ "36a8bd5026eab2870307c223028b499c02c92099", "testharness" ], + "css/css-align/parsing/row-gap-computed.html": [ + "8108dcc63a1334bde0a8016fb88824a77949221d", + "testharness" + ], + "css/css-align/parsing/row-gap-invalid.html": [ + "a51ab7425c488d2452e869f58d5165094934fd10", + "testharness" + ], + "css/css-align/parsing/row-gap-valid.html": [ + "dacdd38254ddf1fac48d0530a0a2e5e650040a44", + "testharness" + ], "css/css-align/reference/baseline-of-scrollable-1-ref.html": [ "422660aff6b6b486ce3288469b4769e1497b071e", "support" @@ -348696,11 +348961,11 @@ "testharness" ], "css/css-box/inheritance-expected.txt": [ - "c21b16bcf873d6bb4732f2bd980a7daa656eb367", + "455b1e1fc4a194c67222019e8d0b96d305558db0", "support" ], "css/css-box/inheritance.html": [ - "22443bf9a94e169a8fce1bd6cfeeead4a12b0ba3", + "d18106faf6926c229c6470a90a6f17355bc99474", "testharness" ], "css/css-box/parsing/clear-computed.html": [ @@ -348807,6 +349072,10 @@ "ba3c3a7fd4aabdf998fbc39bbd9aee429d9ac564", "testharness" ], + "css/css-box/parsing/visibility-computed.html": [ + "f6d4c3f8e55f879e132435e267f824d33bf8f8d8", + "testharness" + ], "css/css-box/parsing/visibility-invalid.html": [ "73e611b2b80bc8645fd057d8922663573daf6978", "testharness" @@ -356631,6 +356900,14 @@ "21e70068f1876a9fc4cae1ec6ccc73be826063ae", "manual" ], + "css/css-fonts/font-weight-xxx-large-ref.html": [ + "0cc1184a83a8d87edbaf0648e664dc1d9e1f0932", + "support" + ], + "css/css-fonts/font-weight-xxx-large.html": [ + "327106668fdf7bc130112f3fee4968c21a1daea4", + "reftest" + ], "css/css-fonts/format-specifiers-variations.html": [ "8caf2f3d6000a28c548c84a6fbe2d4c8de2ee5b7", "testharness" @@ -369124,7 +369401,7 @@ "testharness" ], "css/css-multicol/inheritance.html": [ - "58e7a92669efad79a336b7342362290595bab874", + "e7938d3e9ffa2d21c57e4565283911431e56f17e", "testharness" ], "css/css-multicol/inline-block-and-column-span-all.html": [ @@ -370579,18 +370856,6 @@ "ad5913d0bc0e77a8aa6e2937d5eebf47a348391a", "testharness" ], - "css/css-multicol/parsing/column-gap-computed.html": [ - "d0f88d43b56efc85ed47e987f8429680ec321303", - "testharness" - ], - "css/css-multicol/parsing/column-gap-invalid.html": [ - "8ec92df6c4be54f272c1bfffd8f71ad8372aca45", - "testharness" - ], - "css/css-multicol/parsing/column-gap-valid.html": [ - "96ae68ee08813462c0eb9cb0d33d765fad376e0d", - "testharness" - ], "css/css-multicol/parsing/column-rule-color-computed.html": [ "d5cc24075114d158871dba9f9236ee4103d1e4c7", "testharness" @@ -404803,6 +405068,14 @@ "bc25b25944f47d6f053580939752803f0b929c99", "reftest" ], + "css/filter-effects/backdrop-filter-containing-block-ref.html": [ + "f429dd9a3351cc5580a312549e02a2fbe8db2ccc", + "support" + ], + "css/filter-effects/backdrop-filter-containing-block.html": [ + "7300d7da86988ee92137ff35ef8b027f96f061c4", + "reftest" + ], "css/filter-effects/backdrop-filter-edge-clipping.html": [ "5d09c414497de3d1d34bf2a6032c94c87a9bdb82", "reftest" @@ -420660,7 +420933,7 @@ "testharness" ], "fetch/api/idl.any.serviceworker-expected.txt": [ - "600ca7227b59f7cc1cf99ac568db81447c16b972", + "7f9da6eeccc591484330b525f8195e03f78057a0", "support" ], "fetch/api/idl.any.sharedworker-expected.txt": [ @@ -443547,6 +443820,10 @@ "30f8f4540560939e1295cccb0c665b9ced908ad4", "support" ], + "images/clear-100x50.png": [ + "eeedd0ff05889ffd4468bf19a2e8e9e0a094201c", + "support" + ], "images/colors.svg": [ "024de84a5bbac05f0d878c994bb45d12fa41646a", "support" @@ -444472,11 +444749,11 @@ "support" ], "interfaces/accelerometer.idl": [ - "3705d4ba0ec93e23254374bd9b8e60dfb2cf0a08", + "35b09b8d521640b9b4519d665247a3c48d649386", "support" ], "interfaces/ambient-light.idl": [ - "4e44c082b0709989870e7ed52e14cc77bfb5d6f2", + "ce335161a2570fa9f2ab8051c75c0ab71aa2df76", "support" ], "interfaces/animation-worklet.idl": [ @@ -444512,7 +444789,7 @@ "support" ], "interfaces/console.idl": [ - "53130711a1173f0517987f176bafa157a7a1f1c0", + "3cd3c06b54b022c61857a6a29e8e97bf4fa9b47b", "support" ], "interfaces/cookie-store.idl": [ @@ -444612,7 +444889,7 @@ "support" ], "interfaces/encoding.idl": [ - "b3086b8588cdfec129a4c038c074021cacff83c5", + "c89cad4f9a154c467224e3becbd8b12fcb8a1f23", "support" ], "interfaces/encrypted-media.idl": [ @@ -444632,7 +444909,7 @@ "support" ], "interfaces/fetch.idl": [ - "5f876e7a4ac439828ac54d11d71554beca40ef6e", + "f529c4501bf484f57858ab2eb616a9d42aea766f", "support" ], "interfaces/filter-effects.idl": [ @@ -444660,7 +444937,7 @@ "support" ], "interfaces/geolocation-sensor.idl": [ - "074d7bb9731524b5fd79f689fe748b4b2a135336", + "0083cdac19828f31de79d140d50e60d330417661", "support" ], "interfaces/geometry.idl": [ @@ -444680,7 +444957,7 @@ "support" ], "interfaces/html.idl": [ - "47abcda810a1f94f5704623db63fdec9805cc9c9", + "6dfb39215d0fec30d56027b16cc1c5b620eba0bc", "support" ], "interfaces/image-capture.idl": [ @@ -444716,7 +444993,7 @@ "support" ], "interfaces/magnetometer.idl": [ - "fd29af847679dcca3c4d2d3eedf56d1cf9af89ff", + "be6cbc9d47a8da6a16613c8d88bbc824e7372de3", "support" ], "interfaces/media-capabilities.idl": [ @@ -444744,7 +445021,7 @@ "support" ], "interfaces/mediasession.idl": [ - "5466300b6b48829493518fd4dd9f995509d7d337", + "237cea53adf296d8e626e6828847df80c8cda41a", "support" ], "interfaces/mediastream-recording.idl": [ @@ -444772,7 +445049,7 @@ "support" ], "interfaces/orientation-sensor.idl": [ - "a9aec968e0a072df3bf1eb1452045958f693bc96", + "9ee099881b0a59ca69da02e9aa3d1886e4bc05bc", "support" ], "interfaces/page-visibility.idl": [ @@ -444880,7 +445157,7 @@ "support" ], "interfaces/service-workers.idl": [ - "8e37060a180328d937d26623aaa030ad434eacc6", + "0feabd389cf556a6ff6d3978fd23e2e288624054", "support" ], "interfaces/shape-detection-api.idl": [ @@ -444912,7 +445189,7 @@ "support" ], "interfaces/user-timing.idl": [ - "8b0f813ba8e6efc34b979ac7323afcbcac41e72b", + "20fb2db9caac7ae112144f76e232da4836aa0e94", "support" ], "interfaces/vibration.idl": [ @@ -447887,6 +448164,10 @@ "7c7c9f8d57a46ae310b1a63df7c6117f89b56d63", "support" ], + "mediasession/idlharness.window-expected.txt": [ + "96abe20c3383370374570be8156a3b6ef7eaa391", + "support" + ], "mediasession/idlharness.window.js": [ "e4d914544ed5df95b20287f8bd5482fdd7fe1045", "testharness" @@ -471451,6 +471732,10 @@ "89efd7a4a615c1a3ef35b045690fa40b67fb5393", "testharness" ], + "service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js": [ + "9a9c8198057e3b98f5b278fcd4778a71a6211759", + "testharness" + ], "service-workers/service-worker/ServiceWorkerGlobalScope/isSecureContext.https.html": [ "399820dd2c313b5023f63ea7846cc1f39fcbb1d6", "testharness" @@ -476151,10 +476436,110 @@ "ee86b537ae987483687cc8ba6181db82f99ab162", "support" ], + "svg/animations/animVal-basics.html": [ + "7eb968af01e0b23fa270a71f8788415ea3eed049", + "testharness" + ], + "svg/animations/animate-marker-orient-from-angle-to-auto.html": [ + "40fc57b4f3c9bdc2c9a68e59c1d15495cc445124", + "testharness" + ], + "svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html": [ + "fedfe4a8c2818a335fe26ff5a7e6cce52abef02a", + "testharness" + ], + "svg/animations/animate-marker-orient-to-angle.html": [ + "6b4ba2bfef2fd6bbd15d05b47a97f8b2d4adf5c2", + "testharness" + ], + "svg/animations/animate-number-calcMode-discrete-keyTimes.html": [ + "0e80e03f887ba2de095e8f65bd6e952767350248", + "testharness" + ], + "svg/animations/animate-number-calcMode-discrete.html": [ + "11563233b4f228325efb15ce9f9ba8d9ef71eece", + "testharness" + ], + "svg/animations/animate-path-animation-Cc-Ss.html": [ + "63c450a6c70cacae1688a5bf4862190c178eb770", + "testharness" + ], + "svg/animations/animate-path-animation-Ll-Vv-Hh.html": [ + "4f6d85421a64863c604de1b43d0f638cc0c29fcc", + "testharness" + ], + "svg/animations/animate-path-animation-Mm-Aa-Z.html": [ + "777ca30137576f04fa300a35896b2e325bff0d80", + "testharness" + ], + "svg/animations/animate-path-animation-Qq-Tt.html": [ + "d964303fa2ded2efcece490376c08063b255b7f2", + "testharness" + ], + "svg/animations/animate-path-animation-cC-sS-inverse.html": [ + "709372706d87679c36d717ad48d27c9f01c4e43e", + "testharness" + ], + "svg/animations/animate-path-animation-lL-vV-hH-inverse.html": [ + "a5c6e88a1b9154822678c7c5c2aeb1d48445dbcd", + "testharness" + ], + "svg/animations/animate-path-animation-mM-aA-Z-inverse.html": [ + "3e7e6e3199a19f5c30cff0a11d42e1457e087146", + "testharness" + ], + "svg/animations/animate-path-animation-qQ-tT-inverse.html": [ + "85b98d4d5fee9dd03f71194e72479c9b43cf4a8d", + "testharness" + ], + "svg/animations/animate-path-to-animation.html": [ + "769113ce4907aeee04146014927aec1a8c385784", + "testharness" + ], + "svg/animations/animateMotion-fill-freeze.html": [ + "4e768efb0046972fdb62f9af6545134d97a9495c", + "testharness" + ], + "svg/animations/animateMotion-fill-remove.html": [ + "aeb74b4b0f22f14dca63e0c82a08da28bc88d1b8", + "testharness" + ], + "svg/animations/animateMotion-multiple.html": [ + "494d75a78550b40b7618f951b3cb81ec8c92fe55", + "testharness" + ], + "svg/animations/animateMotion-still.html": [ + "bf9007ac2f38fe9dbe85a9f56de28358ecb82b91", + "testharness" + ], + "svg/animations/animateTransform-pattern-transform.html": [ + "614444bf71c63bdef13226a3c8208625ec364517", + "testharness" + ], + "svg/animations/attributeTypes.html": [ + "7a9ad43dd98e00f7e2af4957365441a29aedf8e6", + "testharness" + ], + "svg/animations/change-css-property-while-animating-fill-freeze.html": [ + "6774c3475a681f9fc91e8280ded739e9e65f4606", + "testharness" + ], + "svg/animations/change-css-property-while-animating-fill-remove.html": [ + "a4e8a3ac40724c46fbf69b4038a279318a9067f6", + "testharness" + ], + "svg/animations/change-target-while-animating-SVG-property.html": [ + "68aa63a39d3acf927de8f2fae47c7b2ceac9e4a9", + "testharness" + ], "svg/animations/correct-events-for-short-animations-with-syncbases.html": [ "96552df4a7c35a264722848a17573e4278bddbbf", "testharness" ], + "svg/animations/cyclic-syncbase.html": [ + "c0351156e310a8a6f0fca3ebee506b80983a53bb", + "testharness" + ], "svg/animations/discard-on-discard.html": [ "4a6b9f9368dcb020120f502e4528860beb5f14c6", "testharness" @@ -483052,7 +483437,7 @@ "support" ], "tools/wptrunner/wptrunner/browsers/firefox.py": [ - "13739e5103ea0452cc9b6bbda784ebc811027b53", + "290fcff5ab22bd5ca19cedb4d3f38f5b8197768f", "support" ], "tools/wptrunner/wptrunner/browsers/firefox_android.py": [
diff --git a/third_party/blink/web_tests/external/wpt/.github/main.workflow b/third_party/blink/web_tests/external/wpt/.github/main.workflow deleted file mode 100644 index 20a0f33..0000000 --- a/third_party/blink/web_tests/external/wpt/.github/main.workflow +++ /dev/null
@@ -1,32 +0,0 @@ -workflow "Build & Release Manifest" { - on = "push" - resolves = ["manifest-build-and-tag"] -} - -action "manifest-build-and-tag" { - uses = "./tools/docker/github" - runs = ["python", "tools/ci/manifest_build.py"] - secrets = ["GITHUB_TOKEN"] -} - -workflow "Build & Publish Documentation Website" { - on = "push" - resolves = ["website-build-and-publish"] -} - -action "website-build-and-publish" { - uses = "./tools/docker/documentation" - runs = ["/bin/bash", "tools/ci/website_build.sh"] - secrets = ["DEPLOY_TOKEN"] -} - -workflow "Synchronize the Pull Request Preview" { - on = "pull_request" - resolves = "update-pr-preview" -} - -action "update-pr-preview" { - uses = "./tools/docker/github" - runs = ["python", "tools/ci/update_pr_preview.py", "https://api.github.com"] - secrets = ["GITHUB_TOKEN"] -}
diff --git a/third_party/blink/web_tests/external/wpt/.github/workflows/pull_request.yml b/third_party/blink/web_tests/external/wpt/.github/workflows/pull_request.yml new file mode 100644 index 0000000..0bedfe3 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/.github/workflows/pull_request.yml
@@ -0,0 +1,14 @@ +on: pull_request +name: Synchronize the Pull Request Preview +jobs: + update-pr-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: update-pr-preview + uses: ./tools/docker/github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: python + args: tools/ci/update_pr_preview.py https://api.github.com
diff --git a/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-publish-documentation-website.yml b/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-publish-documentation-website.yml new file mode 100644 index 0000000..de226d17 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-publish-documentation-website.yml
@@ -0,0 +1,14 @@ +on: push +name: Build & Publish Documentation Website +jobs: + website-build-and-publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: website-build-and-publish + uses: ./tools/docker/documentation + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + with: + entrypoint: /bin/bash + args: tools/ci/website_build.sh
diff --git a/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-release-manifest.yml b/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-release-manifest.yml new file mode 100644 index 0000000..6c97a2f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/.github/workflows/push-build-release-manifest.yml
@@ -0,0 +1,14 @@ +on: push +name: Build & Release Manifest +jobs: + manifest-build-and-tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: manifest-build-and-tag + uses: ./tools/docker/github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + entrypoint: python + args: tools/ci/manifest_build.py
diff --git a/third_party/blink/web_tests/external/wpt/2dcontext/drawing-rectangles-to-the-canvas/clear-100x50.png b/third_party/blink/web_tests/external/wpt/2dcontext/drawing-rectangles-to-the-canvas/clear-100x50.png deleted file mode 100644 index eeedd0f..0000000 --- a/third_party/blink/web_tests/external/wpt/2dcontext/drawing-rectangles-to-the-canvas/clear-100x50.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/external/wpt/console/idlharness.any-expected.txt b/third_party/blink/web_tests/external/wpt/console/idlharness.any-expected.txt new file mode 100644 index 0000000..eec2e272 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/console/idlharness.any-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +PASS idl_test setup +PASS console namespace: operation assert(boolean, any...) +PASS console namespace: operation clear() +PASS console namespace: operation debug(any...) +PASS console namespace: operation error(any...) +PASS console namespace: operation info(any...) +PASS console namespace: operation log(any...) +FAIL console namespace: operation table(any, [object Object]) assert_equals: operation has wrong .length expected 0 but got 1 +PASS console namespace: operation trace(any...) +PASS console namespace: operation warn(any...) +FAIL console namespace: operation dir(any, object) assert_equals: operation has wrong .length expected 0 but got 1 +PASS console namespace: operation dirxml(any...) +PASS console namespace: operation count(DOMString) +PASS console namespace: operation countReset(DOMString) +PASS console namespace: operation group(any...) +PASS console namespace: operation groupCollapsed(any...) +PASS console namespace: operation groupEnd() +PASS console namespace: operation time(DOMString) +PASS console namespace: operation timeLog(DOMString, any...) +PASS console namespace: operation timeEnd(DOMString) +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/console/idlharness.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/console/idlharness.any.worker-expected.txt new file mode 100644 index 0000000..eec2e272 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/console/idlharness.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +PASS idl_test setup +PASS console namespace: operation assert(boolean, any...) +PASS console namespace: operation clear() +PASS console namespace: operation debug(any...) +PASS console namespace: operation error(any...) +PASS console namespace: operation info(any...) +PASS console namespace: operation log(any...) +FAIL console namespace: operation table(any, [object Object]) assert_equals: operation has wrong .length expected 0 but got 1 +PASS console namespace: operation trace(any...) +PASS console namespace: operation warn(any...) +FAIL console namespace: operation dir(any, object) assert_equals: operation has wrong .length expected 0 but got 1 +PASS console namespace: operation dirxml(any...) +PASS console namespace: operation count(DOMString) +PASS console namespace: operation countReset(DOMString) +PASS console namespace: operation group(any...) +PASS console namespace: operation groupCollapsed(any...) +PASS console namespace: operation groupEnd() +PASS console namespace: operation time(DOMString) +PASS console namespace: operation timeLog(DOMString, any...) +PASS console namespace: operation timeEnd(DOMString) +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/cookies/resources/cookie-helper.sub.js b/third_party/blink/web_tests/external/wpt/cookies/resources/cookie-helper.sub.js index f0ca5d6d..668d0afd 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/resources/cookie-helper.sub.js +++ b/third_party/blink/web_tests/external/wpt/cookies/resources/cookie-helper.sub.js
@@ -2,21 +2,15 @@ (_ => { var HOST = "{{host}}"; var SECURE_PORT = ":{{ports[https][0]}}"; - var PORT = ":{{ports[http][0]}}"; var CROSS_ORIGIN_HOST = "{{hosts[alt][]}}"; - var SECURE_CROSS_ORIGIN_HOST = "{{hosts[alt][]}}"; //For secure cookie verification window.SECURE_ORIGIN = "https://" + HOST + SECURE_PORT; - window.INSECURE_ORIGIN = "http://" + HOST + PORT; //standard references - window.ORIGIN = "http://" + HOST + PORT; - window.WWW_ORIGIN = "http://{{domains[www]}}" + PORT; - window.SUBDOMAIN_ORIGIN = "http://{{domains[www1]}}" + PORT; - window.CROSS_SITE_ORIGIN = "http://" + CROSS_ORIGIN_HOST + PORT; - window.SECURE_CROSS_SITE_ORIGIN = "https://" + SECURE_CROSS_ORIGIN_HOST + SECURE_PORT; - window.CROSS_SITE_HOST = SECURE_CROSS_ORIGIN_HOST; + window.SECURE_SUBDOMAIN_ORIGIN = "https://{{domains[www1]}}" + SECURE_PORT; + window.SECURE_CROSS_SITE_ORIGIN = "https://" + CROSS_ORIGIN_HOST + SECURE_PORT; + window.CROSS_SITE_HOST = CROSS_ORIGIN_HOST; // Set the global cookie name. window.HTTP_COOKIE = "cookie_via_http"; @@ -159,8 +153,9 @@ } // Given an |expectedStatus| and |expectedValue|, assert the |cookies| contains the -// proper set of cookie names and values. -function verifySameSiteCookieState(expectedStatus, expectedValue, cookies) { +// proper set of cookie names and values, according to the legacy behavior where +// unspecified SameSite attribute defaults to SameSite=None behavior. +function verifySameSiteCookieStateLegacy(expectedStatus, expectedValue, cookies) { assert_equals(cookies["samesite_none"], expectedValue, "SameSite=None cookies are always sent."); assert_equals(cookies["samesite_unspecified"], expectedValue, "Unspecified-SameSite cookies are always sent."); if (expectedStatus == SameSiteStatus.CROSS_SITE) { @@ -195,10 +190,14 @@ } } +function isLegacySameSite() { + return location.search === "?legacy-samesite"; +} + // Get the proper verifier based on the test's variant type. function getSameSiteVerifier() { - return (location.search && location.search === "?samesite-by-default-cookies.tentative") ? - verifySameSiteCookieStateWithSameSiteByDefault : verifySameSiteCookieState; + return isLegacySameSite() ? + verifySameSiteCookieStateLegacy : verifySameSiteCookieStateWithSameSiteByDefault; } //
diff --git a/third_party/blink/web_tests/external/wpt/cookies/resources/setSameSite.py b/third_party/blink/web_tests/external/wpt/cookies/resources/setSameSite.py index fdf7e71..c2045f7 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/resources/setSameSite.py +++ b/third_party/blink/web_tests/external/wpt/cookies/resources/setSameSite.py
@@ -13,7 +13,8 @@ headers.append(("Content-Type", "text/html; charset=utf-8")) headers.append(makeCookieHeader("samesite_strict", value, {"SameSite":"Strict","path":"/"})) headers.append(makeCookieHeader("samesite_lax", value, {"SameSite":"Lax","path":"/"})) - headers.append(makeCookieHeader("samesite_none", value, {"SameSite":"None", "path":"/"})) + # SameSite=None cookies must be Secure. + headers.append(makeCookieHeader("samesite_none", value, {"SameSite":"None", "path":"/", "Secure": ""})) headers.append(makeCookieHeader("samesite_unspecified", value, {"path":"/"})) document = """
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.html deleted file mode 100644 index 6f1d92a..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.html +++ /dev/null
@@ -1,42 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<script> - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - return credFetch(target + "/cookies/resources/list.py") - - .then(r => r.json()) - .then(cookies => getSameSiteVerifier()(expectedStatus, value, cookies)); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain fetches are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host fetches are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host fetches are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host fetches are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain fetches are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.https.html new file mode 100644 index 0000000..4daf357 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/fetch.https.html
@@ -0,0 +1,42 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<script> + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + return credFetch(target + "/cookies/resources/list.py") + + .then(r => r.json()) + .then(cookies => getSameSiteVerifier()(expectedStatus, value, cookies)); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain fetches are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host fetches are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain fetches are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.https.html similarity index 79% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.https.html index 5fa8ab9..0262545 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank-reload.https.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"/> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> @@ -53,7 +53,7 @@ }, title); } - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host top-level form GETs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain top-level form GETs are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site top-level form GETs are laxly same-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host top-level form GETs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain top-level form GETs are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site top-level form GETs are laxly same-site"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.html deleted file mode 100644 index 47fc9fa3..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.html +++ /dev/null
@@ -1,69 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<script> - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - return new Promise((resolve, reject) => { - var f = document.createElement('form'); - f.action = target + "/cookies/resources/postToParent.py"; - f.target = "_blank"; - f.method = "GET"; - - // If |target| contains a `redir` parameter, extract it, and add it - // to the form so it doesn't get dropped in the submission. - var url = new URL(f.action); - if (url.pathname == "/cookies/resources/redirectWithCORSHeaders.py") { - var i = document.createElement("input"); - i.name = "location"; - i.type="hidden"; - i.value = url.searchParams.get("location"); - f.appendChild(i); - } - - var msgHandler = e => { - window.removeEventListener("message", msgHandler); - e.source.close(); - try { - getSameSiteVerifier()(expectedStatus, value, e.data); - resolve("Popup received the cookie."); - } catch (e) { - reject(e); - } - }; - window.addEventListener("message", msgHandler); - document.body.appendChild(f); - f.submit(); - }); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host top-level form GETs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain top-level form GETs are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Cross-site top-level form GETs are laxly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host top-level form GETs are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host top-level form GETs are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host top-level form GETs are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain top-level form GETs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain top-level form GETs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain top-level form GETs are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Same-host redirecting to cross-site top-level form GETs are laxly same-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Subdomain redirecting to cross-site top-level form GETs are laxly same-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Cross-site redirecting to cross-site top-level form GETs are laxly same-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.https.html new file mode 100644 index 0000000..61af9996 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-get-blank.https.html
@@ -0,0 +1,69 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<script> + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + return new Promise((resolve, reject) => { + var f = document.createElement('form'); + f.action = target + "/cookies/resources/postToParent.py"; + f.target = "_blank"; + f.method = "GET"; + + // If |target| contains a `redir` parameter, extract it, and add it + // to the form so it doesn't get dropped in the submission. + var url = new URL(f.action); + if (url.pathname == "/cookies/resources/redirectWithCORSHeaders.py") { + var i = document.createElement("input"); + i.name = "location"; + i.type="hidden"; + i.value = url.searchParams.get("location"); + f.appendChild(i); + } + + var msgHandler = e => { + window.removeEventListener("message", msgHandler); + e.source.close(); + try { + getSameSiteVerifier()(expectedStatus, value, e.data); + resolve("Popup received the cookie."); + } catch (e) { + reject(e); + } + }; + window.addEventListener("message", msgHandler); + document.body.appendChild(f); + f.submit(); + }); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host top-level form GETs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain top-level form GETs are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Cross-site top-level form GETs are laxly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host top-level form GETs are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host top-level form GETs are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host top-level form GETs are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain top-level form GETs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain top-level form GETs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain top-level form GETs are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Same-host redirecting to cross-site top-level form GETs are laxly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Subdomain redirecting to cross-site top-level form GETs are laxly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Cross-site redirecting to cross-site top-level form GETs are laxly same-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.https.html similarity index 74% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.https.html index 5098dfb..69f720e 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank-reload.https.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"/> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> @@ -43,7 +43,7 @@ }, title); } - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host top-level form POSTs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain top-level form POSTs are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Reloaded cross-site top-level form POSTs are not same-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host top-level form POSTs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain top-level form POSTs are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Reloaded cross-site top-level form POSTs are not same-site"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.html deleted file mode 100644 index 75d6024..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.html +++ /dev/null
@@ -1,58 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<script> - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - return new Promise((resolve, reject) => { - var f = document.createElement('form'); - f.action = target + "/cookies/resources/postToParent.py"; - f.target = "_blank"; - f.method = "POST"; - - var msgHandler = e => { - window.removeEventListener("message", msgHandler); - e.source.close(); - try { - getSameSiteVerifier()(expectedStatus, value, e.data); - resolve("Popup received the cookie."); - } catch (e) { - reject(e); - } - }; - window.addEventListener("message", msgHandler); - document.body.appendChild(f); - f.submit(); - }); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host top-level form POSTs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain top-level form POSTs are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site top-level form POSTs are cross-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host top-level form POSTs are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host top-level form POSTs are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host top-level form POSTs are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain top-level form POSTs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain top-level form POSTs are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain top-level form POSTs are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site top-level form POSTs are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site top-level form POSTs are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site top-level form POSTs are cross-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.https.html new file mode 100644 index 0000000..4ffd522 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/form-post-blank.https.html
@@ -0,0 +1,58 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<script> + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + return new Promise((resolve, reject) => { + var f = document.createElement('form'); + f.action = target + "/cookies/resources/postToParent.py"; + f.target = "_blank"; + f.method = "POST"; + + var msgHandler = e => { + window.removeEventListener("message", msgHandler); + e.source.close(); + try { + getSameSiteVerifier()(expectedStatus, value, e.data); + resolve("Popup received the cookie."); + } catch (e) { + reject(e); + } + }; + window.addEventListener("message", msgHandler); + document.body.appendChild(f); + f.submit(); + }); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host top-level form POSTs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain top-level form POSTs are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site top-level form POSTs are cross-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host top-level form POSTs are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host top-level form POSTs are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host top-level form POSTs are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain top-level form POSTs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain top-level form POSTs are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain top-level form POSTs are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site top-level form POSTs are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site top-level form POSTs are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site top-level form POSTs are cross-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.https.html similarity index 77% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.https.html index 11d34bb9..9bfbdfd 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe-reload.https.html
@@ -2,7 +2,7 @@ <meta charset="utf-8"/> <meta name="timeout" content="long"> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> @@ -44,7 +44,7 @@ }, title); } - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain fetches are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Reloaded cross-site fetches are cross-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain fetches are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Reloaded cross-site fetches are cross-site"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.html deleted file mode 100644 index 4cce830..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.html +++ /dev/null
@@ -1,62 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<!-- We're appending an <iframe> to the document's body, so execute tests after we have a body --> -<body> -<script> - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - return new Promise((resolve, reject) => { - var iframe = document.createElement("iframe"); - iframe.onerror = _ => reject("IFrame could not be loaded."); - - var msgHandler = e => { - if (e.source == iframe.contentWindow) { - // Cleanup, then verify cookie state: - document.body.removeChild(iframe); - window.removeEventListener("message", msgHandler); - try { - getSameSiteVerifier()(expectedStatus, value, e.data); - resolve(); - } catch(e) { - reject(e); - } - } - }; - window.addEventListener("message", msgHandler); - - iframe.src = target + "/cookies/resources/postToParent.py"; - document.body.appendChild(iframe); - }); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain fetches are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host fetches are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host fetches are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host fetches are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain fetches are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain fetches are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.https.html new file mode 100644 index 0000000..446b8c5 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/iframe.https.html
@@ -0,0 +1,62 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<!-- We're appending an <iframe> to the document's body, so execute tests after we have a body --> +<body> +<script> + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + return new Promise((resolve, reject) => { + var iframe = document.createElement("iframe"); + iframe.onerror = _ => reject("IFrame could not be loaded."); + + var msgHandler = e => { + if (e.source == iframe.contentWindow) { + // Cleanup, then verify cookie state: + document.body.removeChild(iframe); + window.removeEventListener("message", msgHandler); + try { + getSameSiteVerifier()(expectedStatus, value, e.data); + resolve(); + } catch(e) { + reject(e); + } + } + }; + window.addEventListener("message", msgHandler); + + iframe.src = target + "/cookies/resources/postToParent.py"; + document.body.appendChild(iframe); + }); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain fetches are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site fetches are cross-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host fetches are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host fetches are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain fetches are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain fetches are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site fetches are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site fetches are cross-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/img.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/img.html deleted file mode 100644 index 071c24fb..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/img.html +++ /dev/null
@@ -1,81 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<script> - function assert_cookie_present(origin, name, value) { - return new Promise((resolve, reject) => { - var img = document.createElement("img"); - img.onload = _ => resolve("'" + name + "=" + value + "' present on " + origin); - img.onerror = _ => reject("'" + name + "=" + value + "' not present on " + origin); - - // We need to URL encode the destination path/query if we're redirecting: - if (origin.match(/\/redir/)) - img.src = origin + encodeURIComponent("/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value); - else - img.src = origin + "/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value; - }); - } - - function assert_cookie_absent(origin, name, value) { - return new Promise((resolve, reject) => { - var img = document.createElement("img"); - img.onload = _ => reject("'" + name + "=" + value + "' present on " + origin); - img.onerror = _ => resolve("'" + name + "=" + value + "' not present on " + origin); - - // We need to URL encode the destination path/query if we're redirecting: - if (origin.match(/\/redir/)) - img.src = origin + encodeURIComponent("/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value); - else - img.src = origin + "/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value; - }); - } - - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - var asserts = [assert_cookie_present(target, "samesite_none", value), - expectedStatus == SameSiteStatus.STRICT ? - assert_cookie_present(target, "samesite_strict", value) : - assert_cookie_absent(target, "samesite_strict", value), - expectedStatus == SameSiteStatus.CROSS_SITE ? - assert_cookie_absent(target, "samesite_lax", value) : - assert_cookie_present(target, "samesite_lax", value)]; - if (location.search && location.search === "?samesite-by-default-cookies.tentative") { - asserts.push(expectedStatus == SameSiteStatus.CROSS_SITE ? - assert_cookie_absent(target, "samesite_unspecified", value) : - assert_cookie_present(target, "samesite_unspecified", value)); - } else { - asserts.push(assert_cookie_present(target, "samesite_unspecified", value)); - } - return Promise.all(asserts); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host images are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain images are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site images are cross-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host images are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host images are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host images are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain images are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain images are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain images are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site images are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site images are cross-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site images are cross-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/img.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/img.https.html new file mode 100644 index 0000000..bf76216 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/img.https.html
@@ -0,0 +1,82 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<script> + function assert_cookie_present(origin, name, value) { + return new Promise((resolve, reject) => { + var img = document.createElement("img"); + img.onload = _ => resolve("'" + name + "=" + value + "' present on " + origin); + img.onerror = _ => reject("'" + name + "=" + value + "' not present on " + origin); + + // We need to URL encode the destination path/query if we're redirecting: + if (origin.match(/\/redir/)) + img.src = origin + encodeURIComponent("/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value); + else + img.src = origin + "/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value; + }); + } + + function assert_cookie_absent(origin, name, value) { + return new Promise((resolve, reject) => { + var img = document.createElement("img"); + img.onload = _ => reject("'" + name + "=" + value + "' present on " + origin); + img.onerror = _ => resolve("'" + name + "=" + value + "' not present on " + origin); + + // We need to URL encode the destination path/query if we're redirecting: + if (origin.match(/\/redir/)) + img.src = origin + encodeURIComponent("/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value); + else + img.src = origin + "/cookies/resources/imgIfMatch.py?name=" + name + "&value=" + value; + }); + } + + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + var asserts = [assert_cookie_present(target, "samesite_none", value), + expectedStatus == SameSiteStatus.STRICT ? + assert_cookie_present(target, "samesite_strict", value) : + assert_cookie_absent(target, "samesite_strict", value), + expectedStatus == SameSiteStatus.CROSS_SITE ? + assert_cookie_absent(target, "samesite_lax", value) : + assert_cookie_present(target, "samesite_lax", value)]; + if (isLegacySameSite()) { + // Legacy behavior: unspecified SameSite acts like SameSite=None. + asserts.push(assert_cookie_present(target, "samesite_unspecified", value)); + } else { + asserts.push(expectedStatus == SameSiteStatus.CROSS_SITE ? + assert_cookie_absent(target, "samesite_unspecified", value) : + assert_cookie_present(target, "samesite_unspecified", value)); + } + return Promise.all(asserts); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host images are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain images are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.CROSS_SITE, "Cross-site images are cross-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host images are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host images are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host images are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain images are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain images are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain images are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Same-host redirecting to cross-site images are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Subdomain redirecting to cross-site images are cross-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.CROSS_SITE, "Cross-site redirecting to cross-site images are cross-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/navigate.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/navigate.html index ef40642a..7d0f87d4 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/navigate.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/navigate.html
@@ -7,7 +7,7 @@ }); window.addEventListener('message', function(e) { - if (ORIGIN !== window.location.origin) + if (SECURE_ORIGIN !== window.location.origin) return; if (window.location.origin !== e.origin) return;
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/puppet.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/puppet.html index 9f4f8e22..6d36132 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/puppet.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/resources/puppet.html
@@ -2,9 +2,9 @@ <script src="/cookies/resources/cookie-helper.sub.js"></script> <script> // Helper to either set or clear some cookies on its own origin, or - // (potentially) cross-site on ORIGIN. + // (potentially) cross-site on SECURE_ORIGIN. window.onmessage = e => { - var originToUse = ORIGIN; + var originToUse = SECURE_ORIGIN; if (e.data.useOwnOrigin) originToUse = self.origin;
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.https.html similarity index 66% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.https.html index 04b2ce2..0c09577 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-lax.https.html
@@ -1,17 +1,17 @@ <!DOCTYPE html> <meta charset="utf-8"/> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> <script> promise_test(async function(t) { - let w = window.open(ORIGIN + "/cookies/samesite/resources/puppet.html"); - await wait_for_message("READY", ORIGIN); + let w = window.open(SECURE_ORIGIN + "/cookies/samesite/resources/puppet.html"); + await wait_for_message("READY", SECURE_ORIGIN); let random = "" + Math.random(); w.postMessage({type: "set", value: random}, "*"); - let e = await wait_for_message("set-complete", ORIGIN) + let e = await wait_for_message("set-complete", SECURE_ORIGIN) assert_dom_cookie("samesite_strict", e.data.value, true); assert_dom_cookie("samesite_lax", e.data.value, true); assert_dom_cookie("samesite_none", e.data.value, true); @@ -20,16 +20,15 @@ }, "Same-site window should be able to set `SameSite=Lax` or `SameSite=Strict` cookies."); promise_test(async function(t) { - let w = window.open(CROSS_SITE_ORIGIN + "/cookies/samesite/resources/puppet.html"); - await wait_for_message("READY", CROSS_SITE_ORIGIN); + let w = window.open(SECURE_CROSS_SITE_ORIGIN + "/cookies/samesite/resources/puppet.html"); + await wait_for_message("READY", SECURE_CROSS_SITE_ORIGIN); let random = "" + Math.random(); w.postMessage({type: "set", value: random}, "*"); - let e = await wait_for_message("set-complete", CROSS_SITE_ORIGIN); + let e = await wait_for_message("set-complete", SECURE_CROSS_SITE_ORIGIN); assert_dom_cookie("samesite_strict", e.data.value, false); assert_dom_cookie("samesite_lax", e.data.value, false); assert_dom_cookie("samesite_none", e.data.value, true); - assert_dom_cookie("samesite_unspecified", e.data.value, - location.search !== "?samesite-by-default-cookies.tentative"); + assert_dom_cookie("samesite_unspecified", e.data.value, isLegacySameSite()); w.close(); }, "Cross-site window shouldn't be able to set `SameSite=Lax` or `SameSite=Strict` cookies."); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.https.html similarity index 67% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.https.html index 3663aa2..0c6140c4 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/setcookie-navigation.https.html
@@ -2,7 +2,7 @@ <meta charset="utf-8"> <meta name="timeout" content="long"> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> @@ -23,12 +23,12 @@ // a new random value on each run, so on each run we are overwriting and // checking for a cookie with a different random value. let value = "" + Math.random(); - let url_from = ORIGIN + "/cookies/samesite/resources/navigate.html"; + let url_from = SECURE_ORIGIN + "/cookies/samesite/resources/navigate.html"; let url_to = origin_to + "/cookies/resources/setSameSite.py?" + value; var w = window.open(url_from); - await wait_for_message('READY', ORIGIN); - assert_equals(ORIGIN, window.origin); - assert_equals(ORIGIN, w.origin); + await wait_for_message('READY', SECURE_ORIGIN); + assert_equals(SECURE_ORIGIN, window.origin); + assert_equals(SECURE_ORIGIN, w.origin); let command = (method === "POST") ? "post-form" : "navigate"; w.postMessage({ type: command, url: url_to }, "*"); let message = await wait_for_message('COOKIES_SET', origin_to); @@ -37,8 +37,8 @@ }, title); } - navigate_test("GET", ORIGIN, "Same-site top-level navigation should be able to set SameSite=* cookies."); - navigate_test("GET", CROSS_SITE_ORIGIN, "Cross-site top-level navigation should be able to set SameSite=* cookies."); - navigate_test("POST", ORIGIN, "Same-site top-level POST should be able to set SameSite=* cookies."); - navigate_test("POST", CROSS_SITE_ORIGIN, "Cross-site top-level POST should be able to set SameSite=* cookies."); + navigate_test("GET", SECURE_ORIGIN, "Same-site top-level navigation should be able to set SameSite=* cookies."); + navigate_test("GET", SECURE_CROSS_SITE_ORIGIN, "Cross-site top-level navigation should be able to set SameSite=* cookies."); + navigate_test("POST", SECURE_ORIGIN, "Same-site top-level POST should be able to set SameSite=* cookies."); + navigate_test("POST", SECURE_CROSS_SITE_ORIGIN, "Cross-site top-level POST should be able to set SameSite=* cookies."); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.https.html similarity index 73% rename from third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.html rename to third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.https.html index d8bc1123..9c30bd5 100644 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.html +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open-reload.https.html
@@ -1,7 +1,7 @@ <!DOCTYPE html> <meta charset="utf-8"/> <meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> +<meta name="variant" content="?legacy-samesite"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> <script src="/cookies/resources/cookie-helper.sub.js"></script> @@ -40,7 +40,7 @@ }, title); } - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host auxiliary navigations are strictly same-site."); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain auxiliary navigations are strictly same-site."); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site auxiliary navigations are laxly same-site"); + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Reloaded same-host auxiliary navigations are strictly same-site."); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Reloaded subdomain auxiliary navigations are strictly same-site."); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Reloaded cross-site auxiliary navigations are laxly same-site"); </script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.html deleted file mode 100644 index b7dc8361..0000000 --- a/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.html +++ /dev/null
@@ -1,56 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"/> -<meta name="timeout" content="long"> -<meta name="variant" content=""> -<meta name="variant" content="?samesite-by-default-cookies.tentative"> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/cookies/resources/cookie-helper.sub.js"></script> -<script> - function create_test(origin, target, expectedStatus, title) { - promise_test(t => { - var value = "" + Math.random(); - return resetSameSiteCookies(origin, value) - .then(_ => { - return new Promise((resolve, reject) => { - var w = window.open(origin + "/cookies/resources/postToParent.py"); - - var msgHandler = e => { - window.removeEventListener("message", msgHandler); - w.close(); - try { - getSameSiteVerifier()(expectedStatus, value, e.data); - resolve("Popup received the cookie."); - } catch (e) { - reject(e); - } - }; - window.addEventListener("message", msgHandler); - - if (!w) - reject("Popup could not be opened (did you whitelist the test site in your popup blocker?)."); - }); - }); - }, title); - } - - // No redirect: - create_test(ORIGIN, ORIGIN, SameSiteStatus.STRICT, "Same-host auxiliary navigations are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain auxiliary navigations are strictly same-site"); - create_test(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Cross-site auxiliary navigations are laxly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(ORIGIN, redirectTo(ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host auxiliary navigations are strictly same-site"); - create_test(ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host auxiliary navigations are strictly same-site"); - create_test(ORIGIN, redirectTo(CROSS_SITE_ORIGIN, ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host auxiliary navigations are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to same-host: - create_test(SUBDOMAIN_ORIGIN, redirectTo(ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain auxiliary navigations are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain auxiliary navigations are strictly same-site"); - create_test(SUBDOMAIN_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain auxiliary navigations are strictly same-site"); - - // Redirect from {same-host,subdomain,cross-site} to cross-site: - create_test(CROSS_SITE_ORIGIN, redirectTo(ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Same-host redirecting to cross-site auxiliary navigations are laxly same-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(SUBDOMAIN_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Subdomain redirecting to cross-site auxiliary navigations are laxly same-site"); - create_test(CROSS_SITE_ORIGIN, redirectTo(CROSS_SITE_ORIGIN, CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Cross-site redirecting to cross-site auxiliary navigations are laxly same-site"); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.https.html b/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.https.html new file mode 100644 index 0000000..fe2318a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/cookies/samesite/window-open.https.html
@@ -0,0 +1,56 @@ +<!DOCTYPE html> +<meta charset="utf-8"/> +<meta name="timeout" content="long"> +<meta name="variant" content=""> +<meta name="variant" content="?legacy-samesite"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/cookie-helper.sub.js"></script> +<script> + function create_test(origin, target, expectedStatus, title) { + promise_test(t => { + var value = "" + Math.random(); + return resetSameSiteCookies(origin, value) + .then(_ => { + return new Promise((resolve, reject) => { + var w = window.open(origin + "/cookies/resources/postToParent.py"); + + var msgHandler = e => { + window.removeEventListener("message", msgHandler); + w.close(); + try { + getSameSiteVerifier()(expectedStatus, value, e.data); + resolve("Popup received the cookie."); + } catch (e) { + reject(e); + } + }; + window.addEventListener("message", msgHandler); + + if (!w) + reject("Popup could not be opened (did you whitelist the test site in your popup blocker?)."); + }); + }); + }, title); + } + + // No redirect: + create_test(SECURE_ORIGIN, SECURE_ORIGIN, SameSiteStatus.STRICT, "Same-host auxiliary navigations are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN, SameSiteStatus.STRICT, "Subdomain auxiliary navigations are strictly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN, SameSiteStatus.LAX, "Cross-site auxiliary navigations are laxly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to same-host auxiliary navigations are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to same-host auxiliary navigations are strictly same-site"); + create_test(SECURE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to same-host auxiliary navigations are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to same-host: + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Same-host redirecting to subdomain auxiliary navigations are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Subdomain redirecting to subdomain auxiliary navigations are strictly same-site"); + create_test(SECURE_SUBDOMAIN_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_SUBDOMAIN_ORIGIN), SameSiteStatus.STRICT, "Cross-site redirecting to subdomain auxiliary navigations are strictly same-site"); + + // Redirect from {same-host,subdomain,cross-site} to cross-site: + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Same-host redirecting to cross-site auxiliary navigations are laxly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_SUBDOMAIN_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Subdomain redirecting to cross-site auxiliary navigations are laxly same-site"); + create_test(SECURE_CROSS_SITE_ORIGIN, redirectTo(SECURE_CROSS_SITE_ORIGIN, SECURE_CROSS_SITE_ORIGIN), SameSiteStatus.LAX, "Cross-site redirecting to cross-site auxiliary navigations are laxly same-site"); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-computed.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-computed.html similarity index 81% rename from third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-computed.html rename to third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-computed.html index d0f88d4..01e04b04 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-computed.html +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-computed.html
@@ -2,8 +2,8 @@ <html> <head> <meta charset="utf-8"> -<title>CSS Multi-column Layout: getComputedStyle().columnGap</title> -<link rel="help" href="https://drafts.csswg.org/css-multicol/#propdef-column-gap"> +<title>CSS Box Alignment Level 3: getComputedStyle().columnGap</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-column-gap"> <meta name="assert" content="column-gap computed value is as specified."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-invalid.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-invalid.html similarity index 80% rename from third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-invalid.html rename to third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-invalid.html index 8ec92df..181e004 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-invalid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-invalid.html
@@ -2,8 +2,8 @@ <html> <head> <meta charset="utf-8"> -<title>CSS Multi-column Layout: parsing column-gap with invalid values</title> -<link rel="help" href="https://drafts.csswg.org/css-multicol/#propdef-column-gap"> +<title>CSS Box Alignment Level 3: parsing column-gap with invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-column-gap"> <meta name="assert" content="column-gap supports only the grammar '<length-percentage> | normal'."> <meta name="assert" content="column-gap rejects negative <length-percentage>."> <script src="/resources/testharness.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-valid.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-valid.html similarity index 79% rename from third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-valid.html rename to third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-valid.html index 96ae68ee..4be3b50 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-multicol/parsing/column-gap-valid.html +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/column-gap-valid.html
@@ -2,8 +2,8 @@ <html> <head> <meta charset="utf-8"> -<title>CSS Multi-column Layout: parsing column-gap with valid values</title> -<link rel="help" href="https://drafts.csswg.org/css-multicol/#propdef-column-gap"> +<title>CSS Box Alignment Level 3: parsing column-gap with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-column-gap"> <meta name="assert" content="column-gap supports the full grammar '<length-percentage> | normal'."> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-computed.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-computed.html new file mode 100644 index 0000000..8108dcc6 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-computed.html
@@ -0,0 +1,30 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Box Alignment Level 3: getComputedStyle().rowGap</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-row-gap"> +<meta name="assert" content="row-gap computed value is a specified keyword or a computed <length-percentage>."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<style> + #target { + font-size: 40px; + } +</style> +</head> +<body> +<div id="target"></div> +<script> +test_computed_value("row-gap", "normal"); + +test_computed_value("row-gap", "10px"); +test_computed_value("row-gap", "20%"); +test_computed_value("row-gap", "calc(20% + 10px)"); + +test_computed_value("row-gap", "calc(-0.5em + 10px)", "0px"); +test_computed_value("row-gap", "calc(0.5em + 10px)", "30px"); +</script> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-invalid.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-invalid.html new file mode 100644 index 0000000..a51ab742 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-invalid.html
@@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Box Alignment Level 3: parsing row-gap with invalid values</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-row-gap"> +<meta name="assert" content="row-gap supports only the grammar 'normal | <length-percentage>'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_invalid_value("row-gap", "auto"); +test_invalid_value("row-gap", "-10px"); + +test_invalid_value("row-gap", "10px 20%"); +test_invalid_value("row-gap", "normal 10px"); +</script> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-valid.html b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-valid.html new file mode 100644 index 0000000..dacdd38 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-align/parsing/row-gap-valid.html
@@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS Box Alignment Level 3: parsing row-gap with valid values</title> +<link rel="help" href="https://drafts.csswg.org/css-align-3/#propdef-row-gap"> +<meta name="assert" content="row-gap supports the full grammar 'normal | <length-percentage>'."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +</head> +<body> +<script> +test_valid_value("row-gap", "normal"); + +test_valid_value("row-gap", "10px"); +test_valid_value("row-gap", "20%"); +test_valid_value("row-gap", "calc(20% + 10px)"); +test_valid_value("row-gap", "0", "0px"); +</script> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-box/inheritance-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-box/inheritance-expected.txt index c21b16bc..455b1e1 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-box/inheritance-expected.txt +++ b/third_party/blink/web_tests/external/wpt/css/css-box/inheritance-expected.txt
@@ -21,5 +21,7 @@ PASS Property padding-right does not inherit PASS Property padding-top has initial value 0px PASS Property padding-top does not inherit +PASS Property visibility has initial value visible +PASS Property visibility inherits Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/css/css-box/inheritance.html b/third_party/blink/web_tests/external/wpt/css/css-box/inheritance.html index 22443bf9..d18106fa 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-box/inheritance.html +++ b/third_party/blink/web_tests/external/wpt/css/css-box/inheritance.html
@@ -28,6 +28,8 @@ assert_not_inherited('padding-left', '0px', '10px'); assert_not_inherited('padding-right', '0px', '10px'); assert_not_inherited('padding-top', '0px', '10px'); + +assert_inherited('visibility', 'visible', 'collapse'); </script> </body> </html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-box/parsing/visibility-computed.html b/third_party/blink/web_tests/external/wpt/css/css-box/parsing/visibility-computed.html new file mode 100644 index 0000000..f6d4c3f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-box/parsing/visibility-computed.html
@@ -0,0 +1,20 @@ +<!DOCTYPE html> +<html> +<head> +<meta charset="utf-8"> +<title>CSS basic box model: getComputedStyle().visibility</title> +<link rel="help" href="https://www.w3.org/TR/CSS2/visufx.html#visibility"> +<meta name="assert" content="visibility computed value is as specified."> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +</head> +<body> +<div id="target"></div> +<script> +test_computed_value("visibility", "visible"); +test_computed_value("visibility", "hidden"); +test_computed_value("visibility", "collapse"); +</script> +</body> +</html>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large-ref.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large-ref.html new file mode 100644 index 0000000..0cc1184 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large-ref.html
@@ -0,0 +1,8 @@ +<!DOCTYPE html> +<html lang="en"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> +<title>CSS Test: font-size: xxx-large; size equivalence</title> +<link rel="author" title="Joel Olsson" href="joel_1st@hotmail.com"> +<body> +<p>Test passes if the line below is identical, with matching font size.</p> +<font size=7>Foo</font>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large.html b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large.html new file mode 100644 index 0000000..3271066 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-fonts/font-weight-xxx-large.html
@@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html lang="en"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> +<title>CSS Test: font-size: xxx-large; size equivalence</title> +<link rel="author" title="Joel Olsson" href="joel_1st@hotmail.com"> +<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#font-size-prop"> +<link rel="help" href="https://www.w3.org/TR/css-fonts-4/#absolute-size-mapping"> +<link rel="match" href="font-weight-xxx-large-ref.html"> +<body> +<p>Test passes if the line below is identical, with matching font size.</p> +<span style="font-size: xxx-large">Foo</span>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-multicol/inheritance.html b/third_party/blink/web_tests/external/wpt/css/css-multicol/inheritance.html index 58e7a926..e7938d3 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-multicol/inheritance.html +++ b/third_party/blink/web_tests/external/wpt/css/css-multicol/inheritance.html
@@ -34,7 +34,6 @@ assert_not_inherited('column-count', 'auto', '2'); assert_not_inherited('column-fill', 'balance', 'auto'); -assert_not_inherited('column-gap', 'normal', '10px'); assert_not_inherited('column-rule-color', 'rgba(42, 53, 64, 0.75)', 'rgba(2, 3, 5, 0.5)'); assert_not_inherited('column-rule-style', 'none', 'dashed'); assert_not_inherited('column-rule-width', mediumWidth, '10px');
diff --git a/third_party/blink/web_tests/external/wpt/fetch/api/idl.any.serviceworker-expected.txt b/third_party/blink/web_tests/external/wpt/fetch/api/idl.any.serviceworker-expected.txt index 600ca72..7f9da6e 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/api/idl.any.serviceworker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fetch/api/idl.any.serviceworker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. -Found 129 tests; 120 PASS, 9 FAIL, 0 TIMEOUT, 0 NOTRUN. +Found 129 tests; 123 PASS, 6 FAIL, 0 TIMEOUT, 0 NOTRUN. PASS idl_test setup PASS Partial interface mixin WindowOrWorkerGlobalScope: original interface mixin defined PASS Headers interface: existence and properties of interface object @@ -126,8 +126,8 @@ PASS Response interface: new Response() must inherit property "json()" with the proper type PASS Response interface: new Response() must inherit property "text()" with the proper type PASS Window interface: existence and properties of interface object -FAIL WorkerGlobalScope interface: operation fetch(RequestInfo, RequestInit) assert_unreached: Should have rejected: calling operation with this = null didn't throw TypeError Reached unreachable code -FAIL WorkerGlobalScope interface: self must inherit property "fetch(RequestInfo, RequestInit)" with the proper type assert_inherits: property "fetch" found on object expected in prototype chain -FAIL WorkerGlobalScope interface: calling fetch(RequestInfo, RequestInit) on self with too few arguments must throw TypeError assert_inherits: property "fetch" found on object expected in prototype chain +PASS WorkerGlobalScope interface: operation fetch(RequestInfo, RequestInit) +PASS WorkerGlobalScope interface: self must inherit property "fetch(RequestInfo, RequestInit)" with the proper type +PASS WorkerGlobalScope interface: calling fetch(RequestInfo, RequestInit) on self with too few arguments must throw TypeError Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html new file mode 100644 index 0000000..7a94f1c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back-2.html
@@ -0,0 +1,16 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Check that sandboxed iframe can navigate their self</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + var t = async_test(); + onmessage = t.step_func((e) => { + if (e.data == 'pushstatebackdone') t.done(); + }); + + function doNavigation() { + frames[0].postMessage('pushstateback', '*'); + } +</script> +<iframe id="child_frame" sandbox="allow-scripts" src="support/iframe-tried-to-be-navigated-by-history.html" onload="doNavigation();"></iframe>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html new file mode 100644 index 0000000..7026edf --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_back.html
@@ -0,0 +1,18 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Check that sandboxed iframe can not navigate their ancestors</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + var t = async_test(); + onpopstate = t.unreached_func('no pop state'); + + function doNavigation() { + history.pushState( {state: "one past"}, 'page 2', ''); + frames[0].postMessage('back', '*'); + t.step_timeout(() => { + t.done(); + }, 1000); + } +</script> +<iframe id="child_frame" sandbox="allow-scripts" src="support/iframe-tried-to-be-navigated-by-history.html" onload="doNavigation();"></iframe>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html new file mode 100644 index 0000000..e9d1def0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_history_go_forward.html
@@ -0,0 +1,28 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Check that sandboxed iframe can not navigate their ancestors</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> + var t = async_test(); + var pop_state_count = 0; + onpopstate = t.step_func((e) => { + pop_state_count++; + if (pop_state_count == 1) { + // Should not generate a pop state + frames[0].postMessage('forward', '*'); + t.step_timeout(() => { + t.done(); + }, 1000); + } else if (pop_state_count > 1) { + assert_unreached('no pop state'); + } + }); + + function doNavigation() { + history.pushState( {state: "one past"}, 'page 2', ''); + // Should generate a pop state + history.back(); + } +</script> +<iframe id="child_frame" sandbox="allow-scripts" src="support/iframe-tried-to-be-navigated-by-history.html" onload="doNavigation();"></iframe>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html new file mode 100644 index 0000000..c4ba801 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/the-iframe-element/support/iframe-tried-to-be-navigated-by-history.html
@@ -0,0 +1,18 @@ +<!DOCTYPE html> +<p>This is a frame that tries to navigate via history API.</p> +<script> +window.onmessage = (e) => { + if (e.data == 'back') { + history.back(); + } else if (e.data == 'forward') { + history.forward(); + } else if (e.data = 'pushstateback') { + onpopstate = (e) => { + parent.postMessage('pushstatebackdone', '*'); + }; + + history.pushState({someState: 'blah'}, ''); + history.back(); + } +}; +</script>
diff --git a/third_party/blink/web_tests/external/wpt/2dcontext/clear-100x50.png b/third_party/blink/web_tests/external/wpt/images/clear-100x50.png similarity index 100% rename from third_party/blink/web_tests/external/wpt/2dcontext/clear-100x50.png rename to third_party/blink/web_tests/external/wpt/images/clear-100x50.png Binary files differ
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/accelerometer.idl b/third_party/blink/web_tests/external/wpt/interfaces/accelerometer.idl index 3705d4ba..35b09b8 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/accelerometer.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/accelerometer.idl
@@ -3,7 +3,7 @@ // (https://github.com/tidoust/reffy-reports) // Source: Accelerometer (https://w3c.github.io/accelerometer/) -[Constructor(optional AccelerometerSensorOptions options), SecureContext, +[Constructor(optional AccelerometerSensorOptions options = {}), SecureContext, Exposed=Window] interface Accelerometer : Sensor { readonly attribute double? x; @@ -17,12 +17,12 @@ AccelerometerLocalCoordinateSystem referenceFrame = "device"; }; -[Constructor(optional AccelerometerSensorOptions options), SecureContext, +[Constructor(optional AccelerometerSensorOptions options = {}), SecureContext, Exposed=Window] interface LinearAccelerationSensor : Accelerometer { }; -[Constructor(optional AccelerometerSensorOptions options), SecureContext, +[Constructor(optional AccelerometerSensorOptions options = {}), SecureContext, Exposed=Window] interface GravitySensor : Accelerometer { };
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/ambient-light.idl b/third_party/blink/web_tests/external/wpt/interfaces/ambient-light.idl index 4e44c08..ce335161a 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/ambient-light.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/ambient-light.idl
@@ -3,7 +3,7 @@ // (https://github.com/tidoust/reffy-reports) // Source: Ambient Light Sensor (https://w3c.github.io/ambient-light/) -[Constructor(optional SensorOptions sensorOptions), SecureContext, Exposed=Window] +[Constructor(optional SensorOptions sensorOptions = {}), SecureContext, Exposed=Window] interface AmbientLightSensor : Sensor { readonly attribute double? illuminance; };
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/console.idl b/third_party/blink/web_tests/external/wpt/interfaces/console.idl index 5313071..3cd3c06 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/console.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/console.idl
@@ -12,10 +12,10 @@ void error(any... data); void info(any... data); void log(any... data); - void table(any tabularData, optional sequence<DOMString> properties); + void table(optional any tabularData, optional sequence<DOMString> properties); void trace(any... data); void warn(any... data); - void dir(any item, optional object? options); + void dir(optional any item, optional object? options); void dirxml(any... data); // Counting
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/encoding.idl b/third_party/blink/web_tests/external/wpt/interfaces/encoding.idl index b3086b8..c89cad4 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/encoding.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/encoding.idl
@@ -18,10 +18,10 @@ boolean stream = false; }; -[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), +[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}), Exposed=(Window,Worker)] interface TextDecoder { - USVString decode(optional BufferSource input, optional TextDecodeOptions options); + USVString decode(optional BufferSource input, optional TextDecodeOptions options = {}); }; TextDecoder includes TextDecoderCommon;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/fetch.idl b/third_party/blink/web_tests/external/wpt/interfaces/fetch.idl index 5f876e7..f529c450 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/fetch.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/fetch.idl
@@ -27,7 +27,7 @@ }; typedef (Request or USVString) RequestInfo; -[Constructor(RequestInfo input, optional RequestInit init), +[Constructor(RequestInfo input, optional RequestInit init = {}), Exposed=(Window,Worker)] interface Request { readonly attribute ByteString method; @@ -72,7 +72,7 @@ enum RequestCredentials { "omit", "same-origin", "include" }; enum RequestCache { "default", "no-store", "reload", "no-cache", "force-cache", "only-if-cached" }; enum RequestRedirect { "follow", "error", "manual" }; -[Constructor(optional BodyInit? body = null, optional ResponseInit init), Exposed=(Window,Worker)] +[Constructor(optional BodyInit? body = null, optional ResponseInit init = {}), Exposed=(Window,Worker)] interface Response { [NewObject] static Response error(); [NewObject] static Response redirect(USVString url, optional unsigned short status = 302);
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/geolocation-sensor.idl b/third_party/blink/web_tests/external/wpt/interfaces/geolocation-sensor.idl index 074d7bb9..0083cda 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/geolocation-sensor.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/geolocation-sensor.idl
@@ -3,11 +3,11 @@ // (https://github.com/tidoust/reffy-reports) // Source: Geolocation Sensor (https://wicg.github.io/geolocation-sensor/) -[Constructor(optional GeolocationSensorOptions options), +[Constructor(optional GeolocationSensorOptions options = {}), SecureContext, Exposed=(DedicatedWorker, Window)] interface GeolocationSensor : Sensor { - static Promise<GeolocationSensorReading> read(optional ReadOptions readOptions); + static Promise<GeolocationSensorReading> read(optional ReadOptions readOptions = {}); readonly attribute unrestricted double? latitude; readonly attribute unrestricted double? longitude; readonly attribute unrestricted double? altitude;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/html.idl b/third_party/blink/web_tests/external/wpt/interfaces/html.idl index 47abcda..6dfb3921 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/html.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/html.idl
@@ -134,7 +134,7 @@ attribute DOMString nonce; // intentionally no [CEReactions] [CEReactions] attribute long tabIndex; - void focus(optional FocusOptions options); + void focus(optional FocusOptions options = {}); void blur(); }; @@ -666,7 +666,7 @@ }; [Exposed=Window, - Constructor(DOMString type, optional TrackEventInit eventInitDict)] + Constructor(DOMString type, optional TrackEventInit eventInitDict = {})] interface TrackEvent : Event { readonly attribute (VideoTrack or AudioTrack or TextTrack)? track; }; @@ -1098,7 +1098,7 @@ }; [Exposed=Window, - Constructor(DOMString type, optional FormDataEventInit eventInitDict)] + Constructor(DOMString type, optional FormDataEventInit eventInitDict = {})] interface FormDataEvent : Event { readonly attribute FormData formData; }; @@ -1149,8 +1149,8 @@ HTMLConstructor] interface HTMLSlotElement : HTMLElement { [CEReactions] attribute DOMString name; - sequence<Node> assignedNodes(optional AssignedNodesOptions options); - sequence<Element> assignedElements(optional AssignedNodesOptions options); + sequence<Node> assignedNodes(optional AssignedNodesOptions options = {}); + sequence<Element> assignedElements(optional AssignedNodesOptions options = {}); }; dictionary AssignedNodesOptions { @@ -1231,7 +1231,7 @@ [NewObject] DOMMatrix getTransform(); void setTransform(unrestricted double a, unrestricted double b, unrestricted double c, unrestricted double d, unrestricted double e, unrestricted double f); - void setTransform(optional DOMMatrix2DInit transform); + void setTransform(optional DOMMatrix2DInit transform = {}); void resetTransform(); }; @@ -1373,7 +1373,7 @@ [Exposed=(Window,Worker)] interface CanvasPattern { // opaque object - void setTransform(optional DOMMatrix2DInit transform); + void setTransform(optional DOMMatrix2DInit transform = {}); }; [Exposed=(Window,Worker)] @@ -1408,7 +1408,7 @@ [Constructor(optional (Path2D or DOMString) path), Exposed=(Window,Worker)] interface Path2D { - void addPath(Path2D path, optional DOMMatrix2DInit transform); + void addPath(Path2D path, optional DOMMatrix2DInit transform = {}); }; Path2D includes CanvasPath; @@ -1438,7 +1438,7 @@ OffscreenRenderingContext? getContext(OffscreenRenderingContextId contextId, optional any options = null); ImageBitmap transferToImageBitmap(); - Promise<Blob> convertToBlob(optional ImageEncodeOptions options); + Promise<Blob> convertToBlob(optional ImageEncodeOptions options = {}); }; [Exposed=(Window,Worker)] @@ -1465,7 +1465,7 @@ [Exposed=Window] interface CustomElementRegistry { - [CEReactions] void define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options); + [CEReactions] void define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); any get(DOMString name); Promise<void> whenDefined(DOMString name); [CEReactions] void upgrade(Node root); @@ -1561,7 +1561,7 @@ callback FunctionStringCallback = void (DOMString data); [Exposed=Window, - Constructor(DOMString type, optional DragEventInit eventInitDict)] + Constructor(DOMString type, optional DragEventInit eventInitDict = {})] interface DragEvent : MouseEvent { readonly attribute DataTransfer? dataTransfer; }; @@ -1620,7 +1620,7 @@ void print(); void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); - void postMessage(any message, optional WindowPostMessageOptions options); + void postMessage(any message, optional WindowPostMessageOptions options = {}); }; Window includes GlobalEventHandlers; Window includes WindowEventHandlers; @@ -1668,7 +1668,7 @@ }; [Exposed=Window, - Constructor(DOMString type, optional PopStateEventInit eventInitDict)] + Constructor(DOMString type, optional PopStateEventInit eventInitDict = {})] interface PopStateEvent : Event { readonly attribute any state; }; @@ -1678,7 +1678,7 @@ }; [Exposed=Window, - Constructor(DOMString type, optional HashChangeEventInit eventInitDict)] + Constructor(DOMString type, optional HashChangeEventInit eventInitDict = {})] interface HashChangeEvent : Event { readonly attribute USVString oldURL; readonly attribute USVString newURL; @@ -1690,7 +1690,7 @@ }; [Exposed=Window, - Constructor(DOMString type, optional PageTransitionEventInit eventInitDict)] + Constructor(DOMString type, optional PageTransitionEventInit eventInitDict = {})] interface PageTransitionEvent : Event { readonly attribute boolean persisted; }; @@ -1737,7 +1737,8 @@ readonly attribute boolean onLine; }; -[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] +[Constructor(DOMString type, optional ErrorEventInit eventInitDict = {}), + Exposed=(Window,Worker)] interface ErrorEvent : Event { readonly attribute DOMString message; readonly attribute USVString filename; @@ -1887,8 +1888,8 @@ void queueMicrotask(VoidFunction callback); // ImageBitmap - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options); - Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {}); + Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {}); }; Window includes WindowOrWorkerGlobalScope; WorkerGlobalScope includes WindowOrWorkerGlobalScope; @@ -2012,7 +2013,8 @@ Window includes AnimationFrameProvider; DedicatedWorkerGlobalScope includes AnimationFrameProvider; -[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker,AudioWorklet)] +[Constructor(DOMString type, optional MessageEventInit eventInitDict = {}), + Exposed=(Window,Worker,AudioWorklet)] interface MessageEvent : Event { readonly attribute any data; readonly attribute USVString origin; @@ -2033,7 +2035,7 @@ typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource; -[Constructor(USVString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] +[Constructor(USVString url, optional EventSourceInit eventSourceInitDict = {}), Exposed=(Window,Worker)] interface EventSource : EventTarget { readonly attribute USVString url; readonly attribute boolean withCredentials; @@ -2085,7 +2087,8 @@ void send(ArrayBufferView data); }; -[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)] +[Constructor(DOMString type, optional CloseEventInit eventInitDict = {}), + Exposed=(Window,Worker)] interface CloseEvent : Event { readonly attribute boolean wasClean; readonly attribute unsigned short code; @@ -2107,7 +2110,7 @@ [Exposed=(Window,Worker,AudioWorklet), Transferable] interface MessagePort : EventTarget { void postMessage(any message, sequence<object> transfer); - void postMessage(any message, optional PostMessageOptions options); + void postMessage(any message, optional PostMessageOptions options = {}); void start(); void close(); @@ -2149,7 +2152,7 @@ [Replaceable] readonly attribute DOMString name; void postMessage(any message, sequence<object> transfer); - void postMessage(any message, optional PostMessageOptions options); + void postMessage(any message, optional PostMessageOptions options = {}); void close(); @@ -2170,12 +2173,13 @@ attribute EventHandler onerror; }; -[Constructor(USVString scriptURL, optional WorkerOptions options), Exposed=(Window,Worker)] +[Constructor(USVString scriptURL, optional WorkerOptions options = {}), + Exposed=(Window,Worker)] interface Worker : EventTarget { void terminate(); void postMessage(any message, sequence<object> transfer); - void postMessage(any message, optional PostMessageOptions options); + void postMessage(any message, optional PostMessageOptions options = {}); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; @@ -2190,7 +2194,7 @@ Worker includes AbstractWorker; -[Constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options), +[Constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {}), Exposed=(Window,Worker)] interface SharedWorker : EventTarget { readonly attribute MessagePort port; @@ -2242,7 +2246,7 @@ Window includes WindowLocalStorage; [Exposed=Window, - Constructor(DOMString type, optional StorageEventInit eventInitDict)] + Constructor(DOMString type, optional StorageEventInit eventInitDict = {})] interface StorageEvent : Event { readonly attribute DOMString? key; readonly attribute DOMString? oldValue;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/magnetometer.idl b/third_party/blink/web_tests/external/wpt/interfaces/magnetometer.idl index fd29af8..be6cbc9 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/magnetometer.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/magnetometer.idl
@@ -3,7 +3,7 @@ // (https://github.com/tidoust/reffy-reports) // Source: Magnetometer (https://w3c.github.io/magnetometer/) -[Constructor(optional MagnetometerSensorOptions sensorOptions), SecureContext, +[Constructor(optional MagnetometerSensorOptions sensorOptions = {}), SecureContext, Exposed=Window] interface Magnetometer : Sensor { readonly attribute double? x; @@ -17,7 +17,7 @@ MagnetometerLocalCoordinateSystem referenceFrame = "device"; }; -[Constructor(optional MagnetometerSensorOptions sensorOptions), SecureContext, +[Constructor(optional MagnetometerSensorOptions sensorOptions = {}), SecureContext, Exposed=Window] interface UncalibratedMagnetometer : Sensor { readonly attribute double? x;
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/mediasession.idl b/third_party/blink/web_tests/external/wpt/interfaces/mediasession.idl index 5466300b..237cea53 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/mediasession.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/mediasession.idl
@@ -36,7 +36,7 @@ void setActionHandler(MediaSessionAction action, MediaSessionActionHandler? handler); - void setPositionState(MediaPositionState? state); + void setPositionState(optional MediaPositionState? state); }; [Constructor(optional MediaMetadataInit init), Exposed=Window] @@ -61,9 +61,9 @@ }; dictionary MediaPositionState { - required double duration; - double playbackRate = 1.0; - double position = 0.0; + double duration; + double playbackRate; + double position; }; dictionary MediaSessionActionDetails {
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/orientation-sensor.idl b/third_party/blink/web_tests/external/wpt/interfaces/orientation-sensor.idl index a9aec96..9ee0998 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/orientation-sensor.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/orientation-sensor.idl
@@ -17,11 +17,11 @@ OrientationSensorLocalCoordinateSystem referenceFrame = "device"; }; -[Constructor(optional OrientationSensorOptions sensorOptions), SecureContext, Exposed=Window] +[Constructor(optional OrientationSensorOptions sensorOptions = {}), SecureContext, Exposed=Window] interface AbsoluteOrientationSensor : OrientationSensor { }; -[Constructor(optional OrientationSensorOptions sensorOptions), SecureContext, Exposed=Window] +[Constructor(optional OrientationSensorOptions sensorOptions = {}), SecureContext, Exposed=Window] interface RelativeOrientationSensor : OrientationSensor { };
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/service-workers.idl b/third_party/blink/web_tests/external/wpt/interfaces/service-workers.idl index 8e37060..0feabd3 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/service-workers.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/service-workers.idl
@@ -8,7 +8,7 @@ readonly attribute USVString scriptURL; readonly attribute ServiceWorkerState state; void postMessage(any message, sequence<object> transfer); - void postMessage(any message, optional PostMessageOptions options); + void postMessage(any message, optional PostMessageOptions options = {}); // event attribute EventHandler onstatechange; @@ -60,7 +60,7 @@ readonly attribute ServiceWorker? controller; readonly attribute Promise<ServiceWorkerRegistration> ready; - [NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options); + [NewObject] Promise<ServiceWorkerRegistration> register(USVString scriptURL, optional RegistrationOptions options = {}); [NewObject] Promise<any> getRegistration(optional USVString clientURL = ""); [NewObject] Promise<FrozenArray<ServiceWorkerRegistration>> getRegistrations(); @@ -115,7 +115,7 @@ readonly attribute DOMString id; readonly attribute ClientType type; void postMessage(any message, sequence<object> transfer); - void postMessage(any message, optional PostMessageOptions options); + void postMessage(any message, optional PostMessageOptions options = {}); }; [Exposed=ServiceWorker] @@ -138,7 +138,7 @@ interface Clients { // The objects returned will be new instances every time [NewObject] Promise<any> get(DOMString id); - [NewObject] Promise<FrozenArray<Client>> matchAll(optional ClientQueryOptions options); + [NewObject] Promise<FrozenArray<Client>> matchAll(optional ClientQueryOptions options = {}); [NewObject] Promise<WindowClient?> openWindow(USVString url); [NewObject] Promise<void> claim(); }; @@ -155,7 +155,7 @@ "all" }; -[Constructor(DOMString type, optional ExtendableEventInit eventInitDict), Exposed=ServiceWorker] +[Constructor(DOMString type, optional ExtendableEventInit eventInitDict = {}), Exposed=ServiceWorker] interface ExtendableEvent : Event { void waitUntil(Promise<any> f); }; @@ -183,7 +183,7 @@ DOMString replacesClientId = ""; }; -[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict), Exposed=ServiceWorker] +[Constructor(DOMString type, optional ExtendableMessageEventInit eventInitDict = {}), Exposed=ServiceWorker] interface ExtendableMessageEvent : ExtendableEvent { readonly attribute any data; readonly attribute USVString origin; @@ -206,13 +206,13 @@ [SecureContext, Exposed=(Window,Worker)] interface Cache { - [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options); - [NewObject] Promise<FrozenArray<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise<any> match(RequestInfo request, optional CacheQueryOptions options = {}); + [NewObject] Promise<FrozenArray<Response>> matchAll(optional RequestInfo request, optional CacheQueryOptions options = {}); [NewObject] Promise<void> add(RequestInfo request); [NewObject] Promise<void> addAll(sequence<RequestInfo> requests); [NewObject] Promise<void> put(RequestInfo request, Response response); - [NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options); - [NewObject] Promise<FrozenArray<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options); + [NewObject] Promise<boolean> delete(RequestInfo request, optional CacheQueryOptions options = {}); + [NewObject] Promise<FrozenArray<Request>> keys(optional RequestInfo request, optional CacheQueryOptions options = {}); }; dictionary CacheQueryOptions { @@ -223,7 +223,7 @@ [SecureContext, Exposed=(Window,Worker)] interface CacheStorage { - [NewObject] Promise<any> match(RequestInfo request, optional MultiCacheQueryOptions options); + [NewObject] Promise<any> match(RequestInfo request, optional MultiCacheQueryOptions options = {}); [NewObject] Promise<boolean> has(DOMString cacheName); [NewObject] Promise<Cache> open(DOMString cacheName); [NewObject] Promise<boolean> delete(DOMString cacheName);
diff --git a/third_party/blink/web_tests/external/wpt/interfaces/user-timing.idl b/third_party/blink/web_tests/external/wpt/interfaces/user-timing.idl index 8b0f813..20fb2db 100644 --- a/third_party/blink/web_tests/external/wpt/interfaces/user-timing.idl +++ b/third_party/blink/web_tests/external/wpt/interfaces/user-timing.idl
@@ -23,7 +23,7 @@ }; [Exposed=(Window,Worker), - Constructor(DOMString markName, optional PerformanceMarkOptions markOptions)] + Constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {})] interface PerformanceMark : PerformanceEntry { readonly attribute any detail; };
diff --git a/third_party/blink/web_tests/external/wpt/mediasession/idlharness.window-expected.txt b/third_party/blink/web_tests/external/wpt/mediasession/idlharness.window-expected.txt new file mode 100644 index 0000000..96abe20 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mediasession/idlharness.window-expected.txt
@@ -0,0 +1,42 @@ +This is a testharness.js-based test. +PASS idl_test setup +PASS Partial interface Navigator: original interface defined +PASS Partial interface Navigator: valid exposure set +PASS MediaSession interface: existence and properties of interface object +PASS MediaSession interface object length +PASS MediaSession interface object name +PASS MediaSession interface: existence and properties of interface prototype object +PASS MediaSession interface: existence and properties of interface prototype object's "constructor" property +PASS MediaSession interface: existence and properties of interface prototype object's @@unscopables property +PASS MediaSession interface: attribute metadata +PASS MediaSession interface: attribute playbackState +PASS MediaSession interface: operation setActionHandler(MediaSessionAction, MediaSessionActionHandler) +FAIL MediaSession interface: operation setPositionState(MediaPositionState) assert_equals: property has wrong .length expected 0 but got 1 +PASS MediaSession must be primary interface of navigator.mediaSession +PASS Stringification of navigator.mediaSession +PASS MediaSession interface: navigator.mediaSession must inherit property "metadata" with the proper type +PASS MediaSession interface: navigator.mediaSession must inherit property "playbackState" with the proper type +PASS MediaSession interface: navigator.mediaSession must inherit property "setActionHandler(MediaSessionAction, MediaSessionActionHandler)" with the proper type +PASS MediaSession interface: calling setActionHandler(MediaSessionAction, MediaSessionActionHandler) on navigator.mediaSession with too few arguments must throw TypeError +PASS MediaSession interface: navigator.mediaSession must inherit property "setPositionState(MediaPositionState)" with the proper type +PASS MediaSession interface: calling setPositionState(MediaPositionState) on navigator.mediaSession with too few arguments must throw TypeError +PASS MediaMetadata interface: existence and properties of interface object +PASS MediaMetadata interface object length +PASS MediaMetadata interface object name +PASS MediaMetadata interface: existence and properties of interface prototype object +PASS MediaMetadata interface: existence and properties of interface prototype object's "constructor" property +PASS MediaMetadata interface: existence and properties of interface prototype object's @@unscopables property +PASS MediaMetadata interface: attribute title +PASS MediaMetadata interface: attribute artist +PASS MediaMetadata interface: attribute album +PASS MediaMetadata interface: attribute artwork +PASS MediaMetadata must be primary interface of new MediaMetadata() +PASS Stringification of new MediaMetadata() +PASS MediaMetadata interface: new MediaMetadata() must inherit property "title" with the proper type +PASS MediaMetadata interface: new MediaMetadata() must inherit property "artist" with the proper type +PASS MediaMetadata interface: new MediaMetadata() must inherit property "album" with the proper type +PASS MediaMetadata interface: new MediaMetadata() must inherit property "artwork" with the proper type +PASS Navigator interface: attribute mediaSession +PASS Navigator interface: navigator must inherit property "mediaSession" with the proper type +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js new file mode 100644 index 0000000..9a9c819 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/ServiceWorkerGlobalScope/fetch-on-the-right-interface.https.any.js
@@ -0,0 +1,14 @@ +// META: title=fetch method on the right interface +// META: global=!default,serviceworker + +test(function() { + assert_false(self.hasOwnProperty('fetch'), 'ServiceWorkerGlobalScope ' + + 'instance should not have "fetch" method as its property.'); + assert_inherits(self, 'fetch', 'ServiceWorkerGlobalScope should ' + + 'inherit "fetch" method.'); + assert_own_property(self.__proto__.__proto__, 'fetch', + 'WorkerGlobalScope should have "fetch" propery in its prototype.'); + assert_equals(self.fetch, self.__proto__.__proto__.fetch, + 'ServiceWorkerGlobalScope.fetch should be the same as ' + + 'WorkerGlobalScope.fetch.'); +}, 'Fetch method on the right interface'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animVal-basics.html b/third_party/blink/web_tests/external/wpt/svg/animations/animVal-basics.html new file mode 100644 index 0000000..7eb968a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animVal-basics.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Trivial animVal testcase, to see wheter we support it at all. Should result in a 200x200 rect and only PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var rect = createSVGElement("rect"); +rect.setAttribute("id", "rect"); +rect.setAttribute("width", "200"); +rect.setAttribute("height", "200"); +rect.setAttribute("fill", "green"); +rect.setAttribute("onclick", "executeTest()"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "width"); +animate.setAttribute("from", "200"); +animate.setAttribute("to", "100"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +rect.appendChild(animate); +rootSVGElement.appendChild(rect); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_approx_equals(rect.width.animVal.value, 200, epsilon); + assert_equals(rect.width.baseVal.value, 200); +} + +function sample2() { + // Check half-time conditions + assert_approx_equals(rect.width.animVal.value, 150, epsilon); + assert_equals(rect.width.baseVal.value, 200); +} + +function sample3() { + // Check just before-end conditions + assert_approx_equals(rect.width.animVal.value, 100, epsilon); + assert_equals(rect.width.baseVal.value, 200); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 2.0, sample2], + ["animation", 3.999, sample3], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-angle-to-auto.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-angle-to-auto.html new file mode 100644 index 0000000..40fc57b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-angle-to-auto.html
@@ -0,0 +1,97 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Animate SVGMarkerElement orientAttr from an angle to auto</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document + +var marker = createSVGElement("marker"); +marker.setAttribute("id", "marker"); +marker.setAttribute("viewBox", "0 0 10 10"); +marker.setAttribute("markerWidth", "2"); +marker.setAttribute("markerHeight", "2"); +marker.setAttribute("refX", "5"); +marker.setAttribute("refY", "5"); +marker.setAttribute("markerUnits", "strokeWidth"); + +var markerPath = createSVGElement("path"); +markerPath.setAttribute("fill", "blue"); +markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); +marker.appendChild(markerPath); + +var defsElement = createSVGElement("defs"); +defsElement.appendChild(marker); +rootSVGElement.appendChild(defsElement); + +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("fill", "none"); +path.setAttribute("stroke", "green"); +path.setAttribute("stroke-width", "10"); +path.setAttribute("marker-start", "url(#marker)"); +path.setAttribute("marker-end", "url(#marker)"); +path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); +path.setAttribute("transform", "translate(-130, -120)"); +rootSVGElement.appendChild(path); + +var animate1 = createSVGElement("animate"); +animate1.setAttribute("id", "animation"); +animate1.setAttribute("attributeName", "orient"); +animate1.setAttribute("begin", "0s"); +animate1.setAttribute("dur", "4s"); +animate1.setAttribute("from", "90deg"); +animate1.setAttribute("to", "auto"); +animate1.setAttribute("fill", "freeze"); +marker.appendChild(animate1); + +// Setup animation test +function sample1() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample2() { + assert_approx_equals(marker.orientAngle.animVal.value, 90, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample3() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 0.001, sample2], + ["animation", 1.999, sample2], + ["animation", 2.001, sample3], + ["animation", 3.999, sample3], + ["animation", 4.001, sample3] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html new file mode 100644 index 0000000..fedfe4a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html
@@ -0,0 +1,97 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Animate SVGMarkerElement orientAttr from auto to auto-start-reverse</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document + +var marker = createSVGElement("marker"); +marker.setAttribute("id", "marker"); +marker.setAttribute("viewBox", "0 0 10 10"); +marker.setAttribute("markerWidth", "2"); +marker.setAttribute("markerHeight", "2"); +marker.setAttribute("refX", "5"); +marker.setAttribute("refY", "5"); +marker.setAttribute("markerUnits", "strokeWidth"); + +var markerPath = createSVGElement("path"); +markerPath.setAttribute("fill", "blue"); +markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); +marker.appendChild(markerPath); + +var defsElement = createSVGElement("defs"); +defsElement.appendChild(marker); +rootSVGElement.appendChild(defsElement); + +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("fill", "none"); +path.setAttribute("stroke", "green"); +path.setAttribute("stroke-width", "10"); +path.setAttribute("marker-start", "url(#marker)"); +path.setAttribute("marker-end", "url(#marker)"); +path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); +path.setAttribute("transform", "translate(-130, -120)"); +rootSVGElement.appendChild(path); + +var animate1 = createSVGElement("animate"); +animate1.setAttribute("id", "animation"); +animate1.setAttribute("attributeName", "orient"); +animate1.setAttribute("begin", "0s"); +animate1.setAttribute("dur", "4s"); +animate1.setAttribute("from", "auto"); +animate1.setAttribute("to", "auto-start-reverse"); +animate1.setAttribute("fill", "freeze"); +marker.appendChild(animate1); + +// Setup animation test +function sample1() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample2() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_AUTO); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample3() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 0.001, sample2], + ["animation", 1.999, sample2], + ["animation", 2.001, sample3], + ["animation", 3.999, sample3], + ["animation", 4.001, sample3] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-to-angle.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-to-angle.html new file mode 100644 index 0000000..6b4ba2b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-marker-orient-to-angle.html
@@ -0,0 +1,94 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Animate SVGMarkerElement orientAttr to an angle</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document + +var marker = createSVGElement("marker"); +marker.setAttribute("id", "marker"); +marker.setAttribute("viewBox", "0 0 10 10"); +marker.setAttribute("markerWidth", "2"); +marker.setAttribute("markerHeight", "2"); +marker.setAttribute("refX", "5"); +marker.setAttribute("refY", "5"); +marker.setAttribute("markerUnits", "strokeWidth"); + +var markerPath = createSVGElement("path"); +markerPath.setAttribute("fill", "blue"); +markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); +marker.appendChild(markerPath); + +var defsElement = createSVGElement("defs"); +defsElement.appendChild(marker); +rootSVGElement.appendChild(defsElement); + +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("fill", "none"); +path.setAttribute("stroke", "green"); +path.setAttribute("stroke-width", "10"); +path.setAttribute("marker-start", "url(#marker)"); +path.setAttribute("marker-end", "url(#marker)"); +path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); +path.setAttribute("transform", "translate(-130, -120)"); +rootSVGElement.appendChild(path); + +var animate1 = createSVGElement("animate"); +animate1.setAttribute("id", "animation"); +animate1.setAttribute("attributeName", "orient"); +animate1.setAttribute("begin", "0s"); +animate1.setAttribute("dur", "4s"); +animate1.setAttribute("to", "180deg"); +animate1.setAttribute("fill", "freeze"); +marker.appendChild(animate1); + +// Setup animation test +function sample1() { + assert_approx_equals(marker.orientAngle.animVal.value, 0, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample2() { + assert_approx_equals(marker.orientAngle.animVal.value, 90, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +function sample3() { + assert_approx_equals(marker.orientAngle.animVal.value, 180, epsilon); + assert_equals(marker.orientAngle.baseVal.value, 0); + + assert_equals(marker.orientType.animVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); + assert_equals(marker.orientType.baseVal, SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 2.0, sample2], + ["animation", 3.999, sample3], + ["animation", 4.001, sample3] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete-keyTimes.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete-keyTimes.html new file mode 100644 index 0000000..0e80e03 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete-keyTimes.html
@@ -0,0 +1,68 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var rect = createSVGElement("rect"); +rect.setAttribute("id", "rect"); +rect.setAttribute("x", "100"); +rect.setAttribute("width", "100"); +rect.setAttribute("height", "100"); +rect.setAttribute("fill", "green"); +rect.setAttribute("onclick", "executeTest()"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "x"); +animate.setAttribute("values", "100;200;300"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "3s"); +animate.setAttribute("keyTimes", "0;0.5;1"); +animate.setAttribute("calcMode", "discrete"); +animate.setAttribute("fill", "freeze"); +rect.appendChild(animate); +rootSVGElement.appendChild(rect); + +// Setup animation test +function sample1() { + assert_equals(rect.x.animVal.value, 100); + assert_equals(rect.x.baseVal.value, 100); +} + +function sample2() { + assert_equals(rect.x.animVal.value, 200); + assert_equals(rect.x.baseVal.value, 100); +} + +function sample3() { + assert_equals(rect.x.animVal.value, 300); + assert_equals(rect.x.baseVal.value, 100); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.499, sample1], + ["animation", 1.501, sample2], + ["animation", 2.999, sample2], + ["animation", 3.001, sample3] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.clickX = 150; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete.html new file mode 100644 index 0000000..1156323 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-number-calcMode-discrete.html
@@ -0,0 +1,63 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var rect = createSVGElement("rect"); +rect.setAttribute("id", "rect"); +rect.setAttribute("x", "100"); +rect.setAttribute("width", "100"); +rect.setAttribute("height", "100"); +rect.setAttribute("fill", "green"); +rect.setAttribute("onclick", "executeTest()"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "x"); +animate.setAttribute("from", "100"); +animate.setAttribute("to", "0"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +animate.setAttribute("calcMode", "discrete"); +rect.appendChild(animate); +rootSVGElement.appendChild(rect); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(rect.x.animVal.value, 100); + assert_equals(rect.x.baseVal.value, 100); +} + +function sample2() { + assert_equals(rect.x.animVal.value, 0); + assert_equals(rect.x.baseVal.value, 100); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.999, sample1], + ["animation", 2.001, sample2], + ["animation", 3.999, sample2], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.clickX = 150; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Cc-Ss.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Cc-Ss.html new file mode 100644 index 0000000..63c450a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Cc-Ss.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); +animate.setAttribute("to", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -20 -20 c 0.00999832 39.99 0.00999832 39.99 40 40 s 39.99 0.00499916 -0.00999832 -39.99 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Ll-Vv-Hh.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Ll-Vv-Hh.html new file mode 100644 index 0000000..4f6d854 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Ll-Vv-Hh.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M -30 -30 L 30 0 V 30 H 0 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M -30 -30 L 30 0 V 30 H 0 Z"); +animate.setAttribute("to", "M 30 30 l -60 -30 v -30 h 30 Z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -30 -30 L 30 0 V 30 H 0 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -15 -15 L 15 0 V 15 H 0 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M 15 15 l -30 -15 v -15 h 15 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M 29.985 29.985 l -59.97 -29.985 v -29.985 h 29.985 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Mm-Aa-Z.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Mm-Aa-Z.html new file mode 100644 index 0000000..777ca301 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Mm-Aa-Z.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); +animate.setAttribute("to", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "m -70.0025 30.0025 a 159.997 169.997 59.9925 1 1 60.005 40.005 m 119.98 69.9725 a 179.997 189.997 119.993 1 1 100.04 149.998 Z m 120.035 -59.975"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Qq-Tt.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Qq-Tt.html new file mode 100644 index 0000000..d964303 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-Qq-Tt.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); +animate.setAttribute("to", "M -30 -30 q 30 0 30 30 t -30 30 z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-cC-sS-inverse.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-cC-sS-inverse.html new file mode 100644 index 0000000..70937270 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-cC-sS-inverse.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); +animate.setAttribute("to", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -20 -20 C 19.99 -19.99 19.99 -19.99 20 20 S 20.01 39.995 -19.99 19.99 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-lL-vV-hH-inverse.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-lL-vV-hH-inverse.html new file mode 100644 index 0000000..a5c6e88a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-lL-vV-hH-inverse.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M 30 30 l -60 -30 v -30 h 30 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M 30 30 l -60 -30 v -30 h 30 Z"); +animate.setAttribute("to", "M -30 -30 L 30 0 V 30 H 0 Z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M 30 30 l -60 -30 v -30 h 30 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M 15 15 l -30 -15 v -15 h 15 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -15 -15 L 15 0 V 15 H 0 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -29.985 -29.985 L 29.985 0 V 29.985 H 0 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-mM-aA-Z-inverse.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-mM-aA-Z-inverse.html new file mode 100644 index 0000000..3e7e6e31 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-mM-aA-Z-inverse.html
@@ -0,0 +1,65 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); +animate.setAttribute("to", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "m -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -79.9975 39.9975 A 150.003 160.003 30.0075 1 1 -0.00249481 99.9925 M 40.0175 60.02 A 170.003 180.003 90.0075 1 1 299.977 200.022 Z M 299.982 99.995"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-qQ-tT-inverse.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-qQ-tT-inverse.html new file mode 100644 index 0000000..85b98d4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-animation-qQ-tT-inverse.html
@@ -0,0 +1,68 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test path animation where coordinate modes of start and end differ. You should see PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M -30 -30 q 30 0 30 30 t -30 30 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); +path.setAttribute("transform", "translate(50, 50)"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("from", "M -30 -30 q 30 0 30 30 t -30 30 Z"); +animate.setAttribute("to", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M -30 -30 q 30 0 30 30 t -30 30 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z"); +} + +function sample4() { + assert_equals(path.getAttribute('d'), "M -30 -30 Q 29.9925 -30 29.9925 0 T -30 30 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 1.0, sample2], + ["animation", 3.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.clickX = 40; +window.clickY = 70; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-to-animation.html b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-to-animation.html new file mode 100644 index 0000000..769113c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animate-path-to-animation.html
@@ -0,0 +1,58 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test calcMode spline with to animation. You should see a green 100x100 path and only PASS messages</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document +var path = createSVGElement("path"); +path.setAttribute("id", "path"); +path.setAttribute("d", "M 40 40 L 60 40 L 60 60 L 40 60 Z"); +path.setAttribute("fill", "green"); +path.setAttribute("onclick", "executeTest()"); + +var animate = createSVGElement("animate"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "d"); +animate.setAttribute("to", "M 0 0 L 100 0 L 100 100 L 0 100 z"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +path.appendChild(animate); +rootSVGElement.appendChild(path); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(path.getAttribute('d'), "M 40 40 L 60 40 L 60 60 L 40 60 Z"); +} + +function sample2() { + assert_equals(path.getAttribute('d'), "M 20 20 L 80 20 L 80 80 L 20 80 Z"); +} + +function sample3() { + assert_equals(path.getAttribute('d'), "M 0.00999928 0.00999928 L 99.99 0.00999928 L 99.99 99.99 L 0.00999928 99.99 Z"); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 2.0, sample2], + ["animation", 3.999, sample3], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-freeze.html b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-freeze.html new file mode 100644 index 0000000..4e768efb0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-freeze.html
@@ -0,0 +1,55 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test for animation freeze when repeatDur is not a multiple of dur</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect width="50" height="50" x="0" y="0" fill="green"> + <animateMotion id="anim" to="100,0" begin="0s" dur="4s" fill="freeze" /> + </rect> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +function sample2() { + assert_approx_equals(rootSVGElement.getBBox().x, 50, epsilon); +} + +function sample3() { + assert_approx_equals(rootSVGElement.getBBox().x, 100, epsilon); +} + +function sample4() { + assert_approx_equals(rootSVGElement.getBBox().x, 100, epsilon); +} + +smil_async_test((t) => { + var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["anim", 0.0, sample1], + ["anim", 2.0, sample2], + ["anim", 4.0, sample3], + ["anim", 6.0, sample4] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-remove.html b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-remove.html new file mode 100644 index 0000000..aeb74b4b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-fill-remove.html
@@ -0,0 +1,55 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test for animation freeze when repeatDur is not a multiple of dur</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect width="50" height="50" x="0" y="0" fill="green"> + <animateMotion id="anim" to="100,0" begin="0s" dur="4s" fill="remove" /> + </rect> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +function sample2() { + assert_approx_equals(rootSVGElement.getBBox().x, 50, epsilon); +} + +function sample3() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +function sample4() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +smil_async_test((t) => { + var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["anim", 0.0, sample1], + ["anim", 2.0, sample2], + ["anim", 4.0, sample3], + ["anim", 6.0, sample4] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-multiple.html b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-multiple.html new file mode 100644 index 0000000..494d75a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-multiple.html
@@ -0,0 +1,66 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test for checking position of the svg element when multiple animateMotion are acting on it</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect width="50" height="50" x="0" y="0" fill="green"> + <animateMotion id="anim" values="20,0" begin="0s"/> + <animateMotion values="40,0;80,0" begin="2s" dur="4s"/> + </rect> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rootSVGElement.getBBox().x, 20, epsilon); +} + +function sample2() { + assert_approx_equals(rootSVGElement.getBBox().x, 20, epsilon); +} + +function sample3() { + assert_approx_equals(rootSVGElement.getBBox().x, 40, epsilon); +} + +function sample4() { + assert_approx_equals(rootSVGElement.getBBox().x, 60, epsilon); +} + +function sample5() { + assert_approx_equals(rootSVGElement.getBBox().x, 20, epsilon); +} + +function sample6() { + assert_approx_equals(rootSVGElement.getBBox().x, 20, epsilon); +} + +smil_async_test((t) => { + var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["anim", 0.0, sample1], + ["anim", 1.0, sample2], + ["anim", 2.0, sample3], + ["anim", 4.0, sample4], + ["anim", 6.0, sample5], + ["anim", 7.0, sample6] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-still.html b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-still.html new file mode 100644 index 0000000..bf9007ac --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animateMotion-still.html
@@ -0,0 +1,61 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test animations that only express an offset</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <rect width="50" height="50" x="0" y="0" fill="green"> + <animateMotion id="anim" path="M 100 100 L 100 100" + begin="0s" dur="2s" repeatCount="2" accumulate="sum" fill="remove" /> + </rect> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rootSVGElement.getBBox().x, 100, epsilon); +} + +function sample2() { + assert_approx_equals(rootSVGElement.getBBox().x, 200, epsilon); +} + +function sample3() { + assert_approx_equals(rootSVGElement.getBBox().x, 200, epsilon); +} + +function sample4() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +function sample5() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); +} + +smil_async_test((t) => { + var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["anim", 1.0, sample1], + ["anim", 2.0, sample2], + ["anim", 3.0, sample3], + ["anim", 4.0, sample4], + ["anim", 5.0, sample5] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/animateTransform-pattern-transform.html b/third_party/blink/web_tests/external/wpt/svg/animations/animateTransform-pattern-transform.html new file mode 100644 index 0000000..614444b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/animateTransform-pattern-transform.html
@@ -0,0 +1,99 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Tests animation of 'patternTransform'. Should result in a 100x100 rect and only PASS messages.</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<svg> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup test document + +var defs = createSVGElement("defs"); +rootSVGElement.appendChild(defs); + +var pattern = createSVGElement("pattern"); +pattern.setAttribute("id", "pattern"); +pattern.setAttribute("width", "200"); +pattern.setAttribute("height", "200"); + +var rect = createSVGElement("rect"); +rect.setAttribute("id", "rect"); +rect.setAttribute("width", "200"); +rect.setAttribute("height", "200"); +rect.setAttribute("fill", "url(#pattern)"); +rect.setAttribute("onclick", "executeTest()"); + +var patternRect = createSVGElement("rect"); +patternRect.setAttribute("id", "patternRect"); +patternRect.setAttribute("width", "100"); +patternRect.setAttribute("height", "100"); +patternRect.setAttribute("fill", "green"); +pattern.appendChild(patternRect); + +var animate = createSVGElement("animateTransform"); +animate.setAttribute("id", "animation"); +animate.setAttribute("attributeName", "patternTransform"); +animate.setAttribute("type", "scale"); +animate.setAttribute("from", "1"); +animate.setAttribute("to", "2"); +animate.setAttribute("begin", "0s"); +animate.setAttribute("dur", "4s"); +pattern.appendChild(animate); +defs.appendChild(pattern); + +rootSVGElement.appendChild(rect); + +// Setup animation test +function sample1() { + // Check initial/end conditions + assert_equals(pattern.patternTransform.animVal.numberOfItems, 0); + assert_equals(pattern.patternTransform.baseVal.numberOfItems, 0); +} + +function sample2() { + assert_equals(pattern.patternTransform.animVal.numberOfItems, 1); + assert_equals(pattern.patternTransform.animVal.getItem(0).type, SVGTransform.SVG_TRANSFORM_SCALE); + assert_approx_equals(pattern.patternTransform.animVal.getItem(0).matrix.a, 1, epsilon); + + assert_equals(pattern.patternTransform.baseVal.numberOfItems, 0); +} + +function sample3() { + // Check half-time conditions + assert_equals(pattern.patternTransform.animVal.numberOfItems, 1); + assert_equals(pattern.patternTransform.animVal.getItem(0).type, SVGTransform.SVG_TRANSFORM_SCALE); + assert_approx_equals(pattern.patternTransform.animVal.getItem(0).matrix.a, 1.5, epsilon); + + assert_equals(pattern.patternTransform.baseVal.numberOfItems, 0); +} + +function sample4() { + // Check half-time conditions + assert_equals(pattern.patternTransform.animVal.numberOfItems, 1); + assert_equals(pattern.patternTransform.animVal.getItem(0).type, SVGTransform.SVG_TRANSFORM_SCALE); + assert_approx_equals(pattern.patternTransform.animVal.getItem(0).matrix.a, 2, epsilon); + + assert_equals(pattern.patternTransform.baseVal.numberOfItems, 0); +} + +smil_async_test((t) => { + const expectedValues = [ + // [animationId, time, sampleCallback] + ["animation", 0.0, sample1], + ["animation", 0.001, sample2], + ["animation", 2.0, sample3], + ["animation", 3.999, sample4], + ["animation", 4.001, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/attributeTypes.html b/third_party/blink/web_tests/external/wpt/svg/animations/attributeTypes.html new file mode 100644 index 0000000..7a9ad43 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/attributeTypes.html
@@ -0,0 +1,121 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>This verifies several attributeTypes combiniations</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + +<!-- 'width' is a XML attribute, attributeType is set to "auto": this animation runs. --> +<rect width="10" height="100" fill="green"> + <animate id="an1" attributeType="auto" attributeName="width" fill="freeze" from="10" to="100" begin="0s" dur="4s"/> +</rect> + +<!-- 'width' is a XML attribute, attributeType is set to "CSS". 'width' is not a presentation attribute, so this animation won't run. --> +<rect x="150" width="10" height="100" fill="green"> + <animate id="an2" attributeType="CSS" attributeName="width" fill="freeze" from="10" to="100" begin="0s" dur="4s"/> +</rect> + +<!-- 'fill' is a presentation attribute, mapped to CSS, attributeType is set to "auto": this animation runs. --> +<rect y="150" width="100" height="100" fill="red"> + <animate id="an3" attributeType="auto" attributeName="fill" fill="freeze" from="red" to="green" begin="0s" dur="4s"/> +</rect> + +<!-- 'fill' is a presentation attribute, mapped to CSS, attributeType is set to "XML": this animation runs. --> +<rect x="150" y="150" width="100" height="100" fill="red"> + <animate id="an4" attributeType="XML" attributeName="fill" fill="freeze" from="red" to="green" begin="0s" dur="4s"/> +</rect> + +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rect1.width.animVal.value, 10, epsilon); + assert_equals(rect1.width.baseVal.value, 10); + expectFillColor(rect1, 0, 128, 0); + + assert_equals(rect2.width.animVal.value, 10); + assert_equals(rect2.width.baseVal.value, 10); + expectFillColor(rect2, 0, 128, 0); + + assert_equals(rect3.width.animVal.value, 100); + assert_equals(rect3.width.baseVal.value, 100); + expectFillColor(rect3, 255, 0, 0); + assert_equals(rect3.getAttribute('fill'), "red"); + + assert_equals(rect4.width.animVal.value, 100); + assert_equals(rect4.width.baseVal.value, 100); + expectFillColor(rect4, 255, 0, 0); + assert_equals(rect4.getAttribute('fill'), "red"); +} + +function sample2() { + assert_approx_equals(rect1.width.animVal.value, 55, epsilon); + assert_equals(rect1.width.baseVal.value, 10); + expectFillColor(rect1, 0, 128, 0); + + assert_equals(rect2.width.animVal.value, 55); + assert_equals(rect2.width.baseVal.value, 10); + expectFillColor(rect2, 0, 128, 0); + + assert_equals(rect3.width.animVal.value, 100); + assert_equals(rect3.width.baseVal.value, 100); + expectFillColor(rect3, 128, 64, 0); + assert_equals(rect3.getAttribute('fill'), "red"); + + assert_equals(rect4.width.animVal.value, 100); + assert_equals(rect4.width.baseVal.value, 100); + expectFillColor(rect4, 128, 64, 0); + assert_equals(rect4.getAttribute('fill'), "red"); +} + +function sample3() { + assert_approx_equals(rect1.width.animVal.value, 100, epsilon); + assert_equals(rect1.width.baseVal.value, 10); + expectFillColor(rect1, 0, 128, 0); + + assert_equals(rect2.width.animVal.value, 100); + assert_equals(rect2.width.baseVal.value, 10); + expectFillColor(rect2, 0, 128, 0); + + assert_equals(rect3.width.animVal.value, 100); + assert_equals(rect3.width.baseVal.value, 100); + expectFillColor(rect3, 0, 128, 0); + assert_equals(rect3.getAttribute('fill'), "red"); + + assert_equals(rect4.width.animVal.value, 100); + assert_equals(rect4.width.baseVal.value, 100); + expectFillColor(rect4, 0, 128, 0); + assert_equals(rect4.getAttribute('fill'), "red"); +} + +smil_async_test((t) => { + rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + rect2 = rects[1]; + rect3 = rects[2]; + rect4 = rects[3]; + + // All animations in the test file use the same duration, so it's not needed to list all sample points individually for an5/an6/an7/an8. + const expectedValues = [ + // [animationId, time, sampleCallback] + ["an1", 0.0, sample1], + ["an1", 2.0, sample2], + ["an1", 4.0, sample3], + ["an1", 60.0, sample3], + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-freeze.html b/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-freeze.html new file mode 100644 index 0000000..6774c347 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-freeze.html
@@ -0,0 +1,64 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>This tests scripting a CSS property while animation is running</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + +<!-- an1: Change opacity from 0 to 0.5 in 4s, a script at 2s will set the opacity CSS property to 1, fill is freeze so this won't have any visible effect, nor any effect to the computed style --> +<rect opacity="0" width="100" height="100" fill="green"> + <animate id="an1" attributeType="CSS" attributeName="opacity" fill="freeze" from="0" to="0.5" begin="0s" dur="4s"/> +</rect> + +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0, epsilon); +} + +function sample2() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.25, epsilon); + rect.setAttribute("opacity", "1"); +} + +function sample3() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.25, epsilon); +} + +function sample4() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.5, epsilon); +} + +function sample5() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.5, epsilon); +} + +smil_async_test((t) => { + rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["an1", 0.0, sample1], + ["an1", 2.0, sample2], + ["an1", 2.001, sample3], + ["an1", 3.999, sample4], + ["an1", 4.001, sample5], + ["an1", 60.0, sample5] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-remove.html b/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-remove.html new file mode 100644 index 0000000..a4e8a3ac --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/change-css-property-while-animating-fill-remove.html
@@ -0,0 +1,64 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>This tests scripting a CSS property while animation is running</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + +<!-- an1: Change opacity from 0 to 0.5 in 4s, a script at 2s will set the opacity CSS property to 1, fill is not freeze, so after the animation ends the opacity should be 1, not 0 --> +<rect opacity="0" width="100" height="100" fill="green"> + <animate id="an1" attributeType="CSS" attributeName="opacity" fill="remove" from="0" to="0.5" begin="0s" dur="4s"/> +</rect> + +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0, epsilon); +} + +function sample2() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.25, epsilon); + rect.setAttribute("opacity", "1"); +} + +function sample3() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.25, epsilon); +} + +function sample4() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 0.5, epsilon); +} + +function sample5() { + assert_approx_equals(parseFloat(getComputedStyle(rect).opacity), 1, epsilon); +} + +smil_async_test((t) => { + rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["an1", 0.0, sample1], + ["an1", 2.0, sample2], + ["an1", 2.001, sample3], + ["an1", 3.999, sample4], + ["an1", 4.001, sample5], + ["an1", 60.0, sample5] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/change-target-while-animating-SVG-property.html b/third_party/blink/web_tests/external/wpt/svg/animations/change-target-while-animating-SVG-property.html new file mode 100644 index 0000000..68aa63a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/change-target-while-animating-SVG-property.html
@@ -0,0 +1,92 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>This changes the target of an animation while its running</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + +<rect id="target1" width="150" height="100" fill="green"/> +<rect id="target2" y="150" width="150" height="100" fill="green"/> + +<!-- an1: Change width by -100 in 4s on target1. The embedder script will change the target to 'target2' at 2s. --> +<!-- target1 should be 100px at 2s and remain this way. target2 should be 50px and remain this way. --> +<animate id="an1" xlink:href="#target1" attributeType="XML" attributeName="width" fill="freeze" by="-100" begin="0s" dur="4s"/> + +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rect1.width.animVal.value, 150, epsilon); + assert_equals(rect1.width.baseVal.value, 150); + + assert_approx_equals(rect2.width.animVal.value, 150, epsilon); + assert_equals(rect2.width.baseVal.value, 150); +} + +function sample2() { + assert_approx_equals(rect1.width.animVal.value, 100, epsilon); + assert_equals(rect1.width.baseVal.value, 150); + + assert_approx_equals(rect2.width.animVal.value, 150, epsilon); + assert_equals(rect2.width.baseVal.value, 150); + + // Switch to new target while animation is running. + // The effect is that rect1 is now reset to the initial state, before any animation was applied to it. + // Compatible with FF. In Opera it only works when not driving the timeline using setCurrentTime. + rootSVGElement.ownerDocument.getElementById("an1").setAttributeNS(xlinkNS, "xlink:href", "#target2"); +} + +function sample3() { + assert_approx_equals(rect1.width.animVal.value, 150, epsilon); + assert_equals(rect1.width.baseVal.value, 150); + + assert_approx_equals(rect2.width.animVal.value, 100, epsilon); + assert_equals(rect2.width.baseVal.value, 150); +} + +function sample4() { + assert_approx_equals(rect1.width.animVal.value, 150, epsilon); + assert_equals(rect1.width.baseVal.value, 150); + + assert_approx_equals(rect2.width.animVal.value, 50, epsilon); + assert_equals(rect2.width.baseVal.value, 150); +} + +function sample5() { + assert_equals(rect1.width.animVal.value, 150); + assert_equals(rect1.width.baseVal.value, 150); + + assert_equals(rect2.width.animVal.value, 50); + assert_equals(rect2.width.baseVal.value, 150); +} + +smil_async_test((t) => { + var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); + rect1 = rects[0]; + rect2 = rects[1]; + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["an1", 0.0, sample1], + ["an1", 2.0, sample2], + ["an1", 2.001, sample3], + ["an1", 3.999, sample4], + ["an1", 4.001, sample5], + ["an1", 60.0, sample5] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/svg/animations/cyclic-syncbase.html b/third_party/blink/web_tests/external/wpt/svg/animations/cyclic-syncbase.html new file mode 100644 index 0000000..c035115 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/svg/animations/cyclic-syncbase.html
@@ -0,0 +1,50 @@ +<!doctype html> +<html> +<meta charset="utf-8"> +<title>Test cyclic for svg animations for syncbases</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/SVGAnimationTestCase-testharness.js"></script> + +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + <animate id="anim" attributeName="visibility" to="visible" begin="0s" end="5s"/> + <rect x="0" y="0" width="50" height="50" fill="green"> + <set attributeName="x" to="100" id="anim1" begin="0; anim2.end" dur="1s"/> + <set attributeName="y" to="100" id="anim2" begin="anim1.end" dur="1s"/> + </rect> +</svg> + +<script> +var rootSVGElement = document.querySelector("svg"); +var epsilon = 1.0; + +// Setup animation test +function sample1() { + assert_approx_equals(rootSVGElement.getBBox().x, 100, epsilon); + assert_approx_equals(rootSVGElement.getBBox().y, 0, epsilon); +} + +function sample2() { + assert_approx_equals(rootSVGElement.getBBox().x, 0, epsilon); + assert_approx_equals(rootSVGElement.getBBox().y, 100, epsilon); +} + +smil_async_test((t) => { + + const expectedValues = [ + // [animationId, time, sampleCallback] + ["anim", 0.01, sample1], + ["anim", 1.01, sample2], + ["anim", 2.01, sample1], + ["anim", 3.01, sample2], + ["anim", 4.01, sample1] + ]; + + runAnimationTest(t, expectedValues); +}); + +window.animationStartsImmediately = true; + +</script> \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/browsers/firefox.py b/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/browsers/firefox.py index 13739e5..290fcff5 100644 --- a/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/browsers/firefox.py +++ b/third_party/blink/web_tests/external/wpt/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -125,6 +125,8 @@ options["prefs"] = { "network.dns.localDomains": ",".join(server_config.domains_set) } + for pref, value in kwargs["extra_prefs"]: + options["prefs"].update({pref: Preferences.cast(value)}) capabilities["moz:firefoxOptions"] = options if kwargs["certutil_binary"] is None: capabilities["acceptInsecureCerts"] = True
diff --git a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt index c8ff9a58..3292f15 100644 --- a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt +++ b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition-expected.txt
@@ -9,5 +9,6 @@ PASS Composite when mixing add and replace PASS add specified on a keyframe overrides the composite mode of the effect PASS unspecified composite mode on a keyframe is overriden by setting add of the effect +PASS Composite replace fully replaces the underlying animation value Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition.html b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition.html index 78f46c9..02c2fe1 100644 --- a/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition.html +++ b/third_party/blink/web_tests/external/wpt/web-animations/animation-model/combining-effects/effect-composition.html
@@ -82,4 +82,33 @@ + ` ${composite} of the effect`); } +test(t => { + const div = createDiv(t); + const anims = []; + anims.push(div.animate({ marginLeft: ['10px', '20px'], + composite: 'replace' }, + 100)); + anims.push(div.animate({ marginLeft: ['0px', '10px'], + composite: 'add' }, + 100)); + // This should fully replace the previous effects. + anims.push(div.animate({ marginLeft: ['20px', '30px'], + composite: 'replace' }, + 100)); + anims.push(div.animate({ marginLeft: ['30px', '40px'], + composite: 'add' }, + 100)); + + for (const anim of anims) { + anim.currentTime = 50; + } + + // The result of applying the above effect stack is: + // underlying = 0.5 * 20 + 0.5 * 30 = 25 + // result = 0.5 * (underlying + 30px) + 0.5 * (underlying + 40px) + // = 60 + assert_equals(getComputedStyle(div).marginLeft, '60px', + 'Animated style at 50%'); +}, 'Composite replace fully replaces the underlying animation value'); + </script>
diff --git a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt deleted file mode 100644 index e95d7884..0000000 --- a/third_party/blink/web_tests/external/wpt/webxr/idlharness.https.window-expected.txt +++ /dev/null
@@ -1,196 +0,0 @@ -This is a testharness.js-based test. -Found 192 tests; 190 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN. -PASS idl_test setup -PASS Partial interface Navigator: original interface defined -PASS Partial dictionary WebGLContextAttributes: original dictionary defined -PASS Partial interface mixin WebGLRenderingContextBase: original interface mixin defined -PASS XR interface: existence and properties of interface object -PASS XR interface object length -PASS XR interface object name -PASS XR interface: existence and properties of interface prototype object -PASS XR interface: existence and properties of interface prototype object's "constructor" property -PASS XR interface: existence and properties of interface prototype object's @@unscopables property -PASS XR interface: operation supportsSession(XRSessionMode) -PASS XR interface: operation requestSession(XRSessionMode, XRSessionInit) -PASS XR interface: attribute ondevicechange -PASS XR must be primary interface of navigator.xr -PASS Stringification of navigator.xr -PASS XR interface: navigator.xr must inherit property "supportsSession(XRSessionMode)" with the proper type -PASS XR interface: calling supportsSession(XRSessionMode) on navigator.xr with too few arguments must throw TypeError -PASS XR interface: navigator.xr must inherit property "requestSession(XRSessionMode, XRSessionInit)" with the proper type -PASS XR interface: calling requestSession(XRSessionMode, XRSessionInit) on navigator.xr with too few arguments must throw TypeError -PASS XR interface: navigator.xr must inherit property "ondevicechange" with the proper type -PASS XRSession interface: existence and properties of interface object -PASS XRSession interface object length -PASS XRSession interface object name -PASS XRSession interface: existence and properties of interface prototype object -PASS XRSession interface: existence and properties of interface prototype object's "constructor" property -PASS XRSession interface: existence and properties of interface prototype object's @@unscopables property -PASS XRSession interface: attribute environmentBlendMode -FAIL XRSession interface: attribute visibilityState assert_true: The prototype object must have a property "visibilityState" expected true got false -PASS XRSession interface: attribute renderState -PASS XRSession interface: attribute inputSources -PASS XRSession interface: operation updateRenderState(XRRenderStateInit) -PASS XRSession interface: operation requestReferenceSpace(XRReferenceSpaceType) -PASS XRSession interface: operation requestAnimationFrame(XRFrameRequestCallback) -PASS XRSession interface: operation cancelAnimationFrame(long) -PASS XRSession interface: operation end() -PASS XRSession interface: attribute onend -PASS XRSession interface: attribute onselect -PASS XRSession interface: attribute oninputsourceschange -PASS XRSession interface: attribute onselectstart -PASS XRSession interface: attribute onselectend -FAIL XRSession interface: attribute onvisibilitychange assert_true: The prototype object must have a property "onvisibilitychange" expected true got false -PASS XRRenderState interface: existence and properties of interface object -PASS XRRenderState interface object length -PASS XRRenderState interface object name -PASS XRRenderState interface: existence and properties of interface prototype object -PASS XRRenderState interface: existence and properties of interface prototype object's "constructor" property -PASS XRRenderState interface: existence and properties of interface prototype object's @@unscopables property -PASS XRRenderState interface: attribute depthNear -PASS XRRenderState interface: attribute depthFar -PASS XRRenderState interface: attribute inlineVerticalFieldOfView -PASS XRRenderState interface: attribute baseLayer -PASS XRFrame interface: existence and properties of interface object -PASS XRFrame interface object length -PASS XRFrame interface object name -PASS XRFrame interface: existence and properties of interface prototype object -PASS XRFrame interface: existence and properties of interface prototype object's "constructor" property -PASS XRFrame interface: existence and properties of interface prototype object's @@unscopables property -PASS XRFrame interface: attribute session -PASS XRFrame interface: operation getViewerPose(XRReferenceSpace) -PASS XRFrame interface: operation getPose(XRSpace, XRSpace) -PASS XRSpace interface: existence and properties of interface object -PASS XRSpace interface object length -PASS XRSpace interface object name -PASS XRSpace interface: existence and properties of interface prototype object -PASS XRSpace interface: existence and properties of interface prototype object's "constructor" property -PASS XRSpace interface: existence and properties of interface prototype object's @@unscopables property -PASS XRReferenceSpace interface: existence and properties of interface object -PASS XRReferenceSpace interface object length -PASS XRReferenceSpace interface object name -PASS XRReferenceSpace interface: existence and properties of interface prototype object -PASS XRReferenceSpace interface: existence and properties of interface prototype object's "constructor" property -PASS XRReferenceSpace interface: existence and properties of interface prototype object's @@unscopables property -PASS XRReferenceSpace interface: operation getOffsetReferenceSpace(XRRigidTransform) -PASS XRReferenceSpace interface: attribute onreset -PASS XRBoundedReferenceSpace interface: existence and properties of interface object -PASS XRBoundedReferenceSpace interface object length -PASS XRBoundedReferenceSpace interface object name -PASS XRBoundedReferenceSpace interface: existence and properties of interface prototype object -PASS XRBoundedReferenceSpace interface: existence and properties of interface prototype object's "constructor" property -PASS XRBoundedReferenceSpace interface: existence and properties of interface prototype object's @@unscopables property -PASS XRBoundedReferenceSpace interface: attribute boundsGeometry -PASS XRView interface: existence and properties of interface object -PASS XRView interface object length -PASS XRView interface object name -PASS XRView interface: existence and properties of interface prototype object -PASS XRView interface: existence and properties of interface prototype object's "constructor" property -PASS XRView interface: existence and properties of interface prototype object's @@unscopables property -PASS XRView interface: attribute eye -PASS XRView interface: attribute projectionMatrix -PASS XRView interface: attribute transform -PASS XRViewport interface: existence and properties of interface object -PASS XRViewport interface object length -PASS XRViewport interface object name -PASS XRViewport interface: existence and properties of interface prototype object -PASS XRViewport interface: existence and properties of interface prototype object's "constructor" property -PASS XRViewport interface: existence and properties of interface prototype object's @@unscopables property -PASS XRViewport interface: attribute x -PASS XRViewport interface: attribute y -PASS XRViewport interface: attribute width -PASS XRViewport interface: attribute height -PASS XRRigidTransform interface: existence and properties of interface object -PASS XRRigidTransform interface object length -PASS XRRigidTransform interface object name -PASS XRRigidTransform interface: existence and properties of interface prototype object -PASS XRRigidTransform interface: existence and properties of interface prototype object's "constructor" property -PASS XRRigidTransform interface: existence and properties of interface prototype object's @@unscopables property -PASS XRRigidTransform interface: attribute position -PASS XRRigidTransform interface: attribute orientation -PASS XRRigidTransform interface: attribute matrix -PASS XRRigidTransform interface: attribute inverse -PASS XRPose interface: existence and properties of interface object -PASS XRPose interface object length -PASS XRPose interface object name -PASS XRPose interface: existence and properties of interface prototype object -PASS XRPose interface: existence and properties of interface prototype object's "constructor" property -PASS XRPose interface: existence and properties of interface prototype object's @@unscopables property -PASS XRPose interface: attribute transform -PASS XRPose interface: attribute emulatedPosition -PASS XRViewerPose interface: existence and properties of interface object -PASS XRViewerPose interface object length -PASS XRViewerPose interface object name -PASS XRViewerPose interface: existence and properties of interface prototype object -PASS XRViewerPose interface: existence and properties of interface prototype object's "constructor" property -PASS XRViewerPose interface: existence and properties of interface prototype object's @@unscopables property -PASS XRViewerPose interface: attribute views -PASS XRInputSource interface: existence and properties of interface object -PASS XRInputSource interface object length -PASS XRInputSource interface object name -PASS XRInputSource interface: existence and properties of interface prototype object -PASS XRInputSource interface: existence and properties of interface prototype object's "constructor" property -PASS XRInputSource interface: existence and properties of interface prototype object's @@unscopables property -PASS XRInputSource interface: attribute handedness -PASS XRInputSource interface: attribute targetRayMode -PASS XRInputSource interface: attribute targetRaySpace -PASS XRInputSource interface: attribute gripSpace -PASS XRInputSource interface: attribute profiles -PASS XRInputSourceArray interface: existence and properties of interface object -PASS XRInputSourceArray interface object length -PASS XRInputSourceArray interface object name -PASS XRInputSourceArray interface: existence and properties of interface prototype object -PASS XRInputSourceArray interface: existence and properties of interface prototype object's "constructor" property -PASS XRInputSourceArray interface: existence and properties of interface prototype object's @@unscopables property -PASS XRInputSourceArray interface: iterable<XRInputSource> -PASS XRInputSourceArray interface: attribute length -PASS XRWebGLLayer interface: existence and properties of interface object -PASS XRWebGLLayer interface object length -PASS XRWebGLLayer interface object name -PASS XRWebGLLayer interface: existence and properties of interface prototype object -PASS XRWebGLLayer interface: existence and properties of interface prototype object's "constructor" property -PASS XRWebGLLayer interface: existence and properties of interface prototype object's @@unscopables property -PASS XRWebGLLayer interface: attribute antialias -PASS XRWebGLLayer interface: attribute ignoreDepthValues -PASS XRWebGLLayer interface: attribute framebuffer -PASS XRWebGLLayer interface: attribute framebufferWidth -PASS XRWebGLLayer interface: attribute framebufferHeight -PASS XRWebGLLayer interface: operation getViewport(XRView) -PASS XRWebGLLayer interface: operation getNativeFramebufferScaleFactor(XRSession) -PASS XRSessionEvent interface: existence and properties of interface object -PASS XRSessionEvent interface object length -PASS XRSessionEvent interface object name -PASS XRSessionEvent interface: existence and properties of interface prototype object -PASS XRSessionEvent interface: existence and properties of interface prototype object's "constructor" property -PASS XRSessionEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS XRSessionEvent interface: attribute session -PASS XRInputSourceEvent interface: existence and properties of interface object -PASS XRInputSourceEvent interface object length -PASS XRInputSourceEvent interface object name -PASS XRInputSourceEvent interface: existence and properties of interface prototype object -PASS XRInputSourceEvent interface: existence and properties of interface prototype object's "constructor" property -PASS XRInputSourceEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS XRInputSourceEvent interface: attribute frame -PASS XRInputSourceEvent interface: attribute inputSource -PASS XRInputSourcesChangeEvent interface: existence and properties of interface object -PASS XRInputSourcesChangeEvent interface object length -PASS XRInputSourcesChangeEvent interface object name -PASS XRInputSourcesChangeEvent interface: existence and properties of interface prototype object -PASS XRInputSourcesChangeEvent interface: existence and properties of interface prototype object's "constructor" property -PASS XRInputSourcesChangeEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS XRInputSourcesChangeEvent interface: attribute session -PASS XRInputSourcesChangeEvent interface: attribute added -PASS XRInputSourcesChangeEvent interface: attribute removed -PASS XRReferenceSpaceEvent interface: existence and properties of interface object -PASS XRReferenceSpaceEvent interface object length -PASS XRReferenceSpaceEvent interface object name -PASS XRReferenceSpaceEvent interface: existence and properties of interface prototype object -PASS XRReferenceSpaceEvent interface: existence and properties of interface prototype object's "constructor" property -PASS XRReferenceSpaceEvent interface: existence and properties of interface prototype object's @@unscopables property -PASS XRReferenceSpaceEvent interface: attribute referenceSpace -PASS XRReferenceSpaceEvent interface: attribute transform -PASS WebGLRenderingContext interface: operation makeXRCompatible() -PASS Navigator interface: attribute xr -PASS Navigator interface: navigator must inherit property "xr" with the proper type -Harness: the test ran to completion. -
diff --git a/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html b/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html new file mode 100644 index 0000000..ebad10095 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webxr/xrSession_visibilityState.https.html
@@ -0,0 +1,81 @@ +<!DOCTYPE html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/webxr_util.js"></script> +<script src="resources/webxr_test_constants.js"></script> +<canvas id="webgl-canvas"></canvas> + +<script> +let testName = "Ensures that the XRSession's visibilityState is correctly " + + "reported and that the associated visibilitychange event fires."; + +let watcherDone = new Event("watcherdone"); +let frameFired = new Event("framefired"); + +let fakeDeviceInitParams = TRACKED_IMMERSIVE_DEVICE; + +let testFunction = function(session, fakeDeviceController, t) { + let eventWatcher = new EventWatcher( + t, session, ["visibilitychange", "visibilitychange", "framefired", "watcherdone"]); + let eventPromise = eventWatcher.wait_for( + ["visibilitychange", "visibilitychange", "framefired", "watcherdone"]); + + function onFrame(t, frame) { + t.step( () => { + // The session should not fire any animation frames while the visibility + // state is hidden. + assert_not_equals(session.visibilityState, "hidden"); + }); + + // Make sure the frame does fire when the visibility is changed back to "visible" + session.dispatchEvent(frameFired); + } + + function onSessionVisibilityChangeHidden(event) { + t.step( () => { + assert_equals(session.visibilityState, "hidden"); + }); + + session.removeEventListener("visibilitychange", onSessionVisibilityChangeHidden, false); + session.addEventListener("visibilitychange", onSessionVisibilityChangeVisible, false); + + session.requestAnimationFrame() + + t.step_timeout(() => { + fakeDeviceController.simulateVisibilityChange("visible"); + }, 300); + } + + function onSessionVisibilityChangeVisible(event) { + t.step( () => { + assert_equals(session.visibilityState, "visible"); + }); + + session.removeEventListener("visibilitychange", onSessionVisibilityChangeVisible, false); + session.addEventListener("visibilitychange", onSessionVisibilityChangeInvalid, false); + fakeDeviceController.simulateVisibilityChange("visible"); + + t.step_timeout(() => { + session.dispatchEvent(watcherDone); + }, 300); + } + + function onSessionVisibilityChangeInvalid(event) { + t.step( () => { + assert_not_reached("Should not fire visibilitychange events for the same state"); + }); + } + + t.step( () => { + // Session visibility should start out as "visible" + assert_equals(session.visibilityState, "visible"); + }); + + session.addEventListener("visibilitychange", onSessionVisibilityChangeHidden, false); + fakeDeviceController.simulateVisibilityChange("hidden"); +}; + +xr_session_promise_test( + testName, testFunction, fakeDeviceInitParams, 'immersive-vr'); + +</script>
diff --git a/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html new file mode 100644 index 0000000..524a984f --- /dev/null +++ b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html
@@ -0,0 +1,17 @@ +<!DOCTYPE html> +<html> +<head> +<style> + p { + text-decoration: underline; + text-decoration-color: red; + -webkit-text-emphasis: '*' blue; + } +</style> +<body> + <p> + The text decoration and emphasis color for this text should have a + WindowText color in forced colors mode. + </p> +</body> +</html>
diff --git a/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17.html b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17.html new file mode 100644 index 0000000..061593b --- /dev/null +++ b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-17.html
@@ -0,0 +1,19 @@ +<!DOCTYPE html> +<html> +<head> +<title>Forced colors mode - text decoration and emphasis color.</title> +<link rel=match href=forced-colors-mode-17-expected.html> +<style> + p { + text-decoration: underline; + text-decoration-color: red; + -webkit-text-emphasis: '*' blue; + } +</style> +<body> + <p> + The text decoration and emphasis color for this text should have a + WindowText color in forced colors mode. + </p> +</body> +</html>
diff --git a/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html new file mode 100644 index 0000000..102a7be6 --- /dev/null +++ b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html
@@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> +<head> +<body> + <svg height="600" width="600"> + <text x="0" y="15" fill="red" stroke="blue"> + This text should have a WindowText fill and transparent stroke color in + forced colors mode. + </text> + <rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/> + <foreignObject x="20" y="30" width="160" height="160"> + <div xmlns="http://www.w3.org/1999/xhtml" style="color: blue;"> + This text should be WindowText color in forced colors mode. + </div> + <svg height="20" width="20"> + <rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/> + </svg> + </foreignObject> + </svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18.html b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18.html new file mode 100644 index 0000000..5f7e1235 --- /dev/null +++ b/third_party/blink/web_tests/fast/css/forced-colors-mode/forced-colors-mode-18.html
@@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> +<head> +<title>Forced colors mode - fill and stroke. + Only text and foreignObject svg elements should have fill and stroke + overridden in forced colors mode. +</title> +<link rel=match href=forced-colors-mode-18-expected.html> +<body> + <svg height="600" width="600"> + <text x="0" y="15" fill="red" stroke="blue"> + This text should have a WindowText fill and transparent stroke color in + forced colors mode. + </text> + <rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/> + <foreignObject x="20" y="30" width="160" height="160"> + <div xmlns="http://www.w3.org/1999/xhtml" style="color: blue;"> + This text should be WindowText color in forced colors mode. + </div> + <svg height="20" width="20"> + <rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/> + </svg> + </foreignObject> + </svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.html b/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.html index 21036d8..9ebd4722 100644 --- a/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.html +++ b/third_party/blink/web_tests/fast/scrolling/scrollbars/mouse-autoscrolling-on-scrollbar.html
@@ -28,7 +28,7 @@ <!-- Composited non-custom fast scroller --> <div id="scroller" class="appearance location fast"> - <div class="space"></div> + <div id="divContent" class="space"></div> </div> <script> @@ -99,4 +99,34 @@ err = `scroller.scrollTop = ${scroller.scrollTop} current_offset = ${current_offset}`; await conditionHolds(() => { return scroller.scrollTop == current_offset; }, err); },"Test track autoscroll down and autoscroll stop."); + + promise_test (async () => { + await waitForCompositorCommit(); + scroller.scrollTop = MAX_SCROLLER_OFFSET; + + // Schedule a scroller height increment 500ms out and immediately initiate autoscroll. + const content = document.getElementById("divContent"); + const originalDivHeight = content.clientHeight; + const extendedDivHeight = originalDivHeight + 500; + setTimeout(function() { + content.setAttribute("style","height:" + extendedDivHeight + "px"); + }, 500); + + const down_arrow_x = scrollerRect.right - BUTTON_WIDTH / 2; + const down_arrow_y = scrollerRect.bottom - SCROLL_CORNER - BUTTON_WIDTH / 2; + + // Keep the mouse pressed for 1000ms. Before this call completes, the previously + // scheduled scroller height increment kicks in. At this point, the autoscrolling + // is expected to take place. This should prove that scrolling occured *after* the + // scroller length was extended (as long as the pointer was kept pressed). + await mousePressOn(down_arrow_x, down_arrow_y, PRESS_DURATION); + var err = `Infinite autoscroll down failed (scroller.scrollTop = ${scroller.scrollTop})`; + + // Verify that autoscroll took place beyond the old bounds. If there is a regression here, + // the scroller.scrollTop would've stayed at MAX_SCROLLER_OFFSET. + assert_greater_than(scroller.scrollTop, MAX_SCROLLER_OFFSET, err); + + // Reset the scroller dimensions. + content.setAttribute("style","height:" + originalDivHeight + "px"); + },"Test infinite scrolling when content is extended dynamically."); </script>
diff --git a/third_party/blink/web_tests/http/tests/cookies/resources/testharness-helpers.js b/third_party/blink/web_tests/http/tests/cookies/resources/testharness-helpers.js index 804cb6265..6ba368e 100644 --- a/third_party/blink/web_tests/http/tests/cookies/resources/testharness-helpers.js +++ b/third_party/blink/web_tests/http/tests/cookies/resources/testharness-helpers.js
@@ -9,11 +9,12 @@ var STRICT_DOM = "strict_from_dom"; var LAX_DOM = "lax_from_dom"; -var NORMAL_DOM = "normal_from_dom"; +var UNSPECIFIED_DOM = "unspecified_from_dom"; +var NONE_DOM = "none_from_dom"; // Clear the three well-known cookies. function clearKnownCookies() { - var cookies = [ STRICT_DOM, LAX_DOM, NORMAL_DOM ]; + var cookies = [ STRICT_DOM, LAX_DOM, UNSPECIFIED_DOM, NONE_DOM ]; cookies.forEach(c => { document.cookie = c + "=0; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"; }); }
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/basics-insecure.html b/third_party/blink/web_tests/http/tests/cookies/same-site/basics-insecure.html new file mode 100644 index 0000000..66f40cf --- /dev/null +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/basics-insecure.html
@@ -0,0 +1,25 @@ +<!doctype html> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/cookies/resources/testharness-helpers.js"></script> +<script> +// This test cannot be done in basics.https.html because we disallow mixed content. +promise_test(_ => { + clearKnownCookies(); + assert_equals(document.cookie, ""); + + document.cookie = STRICT_DOM + "=2; SameSite=Strict; path=/"; + document.cookie = LAX_DOM + "=2; SameSite=Lax; path=/"; + document.cookie = UNSPECIFIED_DOM + "=2; path=/"; + // Not testing SameSite=None here because those cookies must be Secure. + assert_equals(document.cookie, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + UNSPECIFIED_DOM + "=2"); + return fetch("https://" + window.location.hostname + ":8443/cookies/resources/echo-json.php", {"credentials": "include"}) + .then(r => r.json()) + .then(j => { + assert_equals(j[STRICT_DOM], "2", "strict"); + assert_equals(j[LAX_DOM], "2", "lax"); + assert_equals(j[UNSPECIFIED_DOM], "2", "unspecified"); + }); +}, "HTTPS is same-site with HTTP."); +</script> +
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/basics.html b/third_party/blink/web_tests/http/tests/cookies/same-site/basics.https.html similarity index 62% rename from third_party/blink/web_tests/http/tests/cookies/same-site/basics.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/basics.https.html index 42ac828..379d564 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/basics.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/basics.https.html
@@ -5,13 +5,16 @@ <script> // Set cookies on ORIGINAL_HOST, then move ourselves to TEST_ROOT so // we can verify registrable domain and cross-origin behavior. +// Note: We are using https here because SameSite=None cookies must be Secure. if (window.location.hostname == "127.0.0.1") { window.location.hostname = ORIGINAL_HOST; } else if (window.location.hostname == ORIGINAL_HOST) { clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.location.hostname = TEST_HOST; } else { test(_ => { @@ -20,8 +23,9 @@ document.cookie = STRICT_DOM + "=2; SameSite=Strict; domain=" + TEST_HOST + "; path=/"; document.cookie = LAX_DOM + "=2; SameSite=Lax; domain=" + TEST_HOST + "; path=/"; - document.cookie = NORMAL_DOM + "=2; domain=" + TEST_HOST + "; path=/"; - assert_equals(document.cookie, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + NORMAL_DOM + "=2"); + document.cookie = UNSPECIFIED_DOM + "=2; domain=" + TEST_HOST + "; path=/"; + document.cookie = NONE_DOM + "=2; SameSite=None; Secure; domain=" + TEST_HOST + "; path=/"; + assert_equals(document.cookie, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + UNSPECIFIED_DOM + "=2; " + NONE_DOM + "=2"); }, "Cookies can be set from DOM."); promise_test(_ => { @@ -30,47 +34,41 @@ .then(j => { assert_equals(j[STRICT_DOM], "2", "strict"); assert_equals(j[LAX_DOM], "2", "lax"); - assert_equals(j[NORMAL_DOM], "2", "normal"); + assert_equals(j[UNSPECIFIED_DOM], "2", "unspecified"); + assert_equals(j[NONE_DOM], "2", "none"); }); - }, "SameSite set from DOM are sent via HTTP."); + }, "SameSite set from DOM are sent via HTTPS."); promise_test(_ => { - return fetch("https://" + TEST_HOST + ":8443/cookies/resources/echo-json.php", {"credentials": "include"}) + return fetch("https://subdomain." + TEST_HOST + ":8443/cookies/resources/echo-json.php", {"credentials": "include"}) .then(r => r.json()) .then(j => { assert_equals(j[STRICT_DOM], "2", "strict"); assert_equals(j[LAX_DOM], "2", "lax"); - assert_equals(j[NORMAL_DOM], "2", "normal"); - }); - }, "HTTPS is same-site with HTTP."); - - promise_test(_ => { - return fetch("http://subdomain." + TEST_HOST + ":8000/cookies/resources/echo-json.php", {"credentials": "include"}) - .then(r => r.json()) - .then(j => { - assert_equals(j[STRICT_DOM], "2", "strict"); - assert_equals(j[LAX_DOM], "2", "lax"); - assert_equals(j[NORMAL_DOM], "2", "normal"); + assert_equals(j[UNSPECIFIED_DOM], "2", "unspecified"); + assert_equals(j[NONE_DOM], "2", "none"); }); }, "Subdomains are same-site."); promise_test(_ => { - return fetch("http://" + TEST_ROOT + ":8000/cookies/resources/echo-json.php", {"credentials": "include"}) + return fetch("https://" + TEST_ROOT + ":8443/cookies/resources/echo-json.php", {"credentials": "include"}) .then(r => r.json()) .then(j => { assert_equals(j[STRICT_DOM], undefined, "strict"); assert_equals(j[LAX_DOM], undefined, "lax"); - assert_equals(j[NORMAL_DOM], undefined, "normal"); + assert_equals(j[UNSPECIFIED_DOM], undefined, "unspecified"); + assert_equals(j[NONE_DOM], undefined, "none"); }); }, "`" + TEST_ROOT + "` is same-site but the cookies don't match it: 'samesite' doesn't override matching rules."); promise_test(_ => { - return fetch("http://" + ORIGINAL_HOST + ":8000/cookies/resources/echo-json.php", {"credentials": "include"}) + return fetch("https://" + ORIGINAL_HOST + ":8443/cookies/resources/echo-json.php", {"credentials": "include"}) .then(r => r.json()) .then(j => { assert_equals(j[STRICT_DOM], undefined, "strict"); assert_equals(j[LAX_DOM], undefined, "lax"); - assert_equals(j[NORMAL_DOM], "1", "normal"); + assert_equals(j[UNSPECIFIED_DOM], undefined, "unspecified"); + assert_equals(j[NONE_DOM], "1", "none"); }); }, "'" + ORIGINAL_HOST + "' is not same-site with '" + TEST_HOST + "', so samesite cookies are not sent."); }
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/framed.html b/third_party/blink/web_tests/http/tests/cookies/same-site/framed.https.html similarity index 75% rename from third_party/blink/web_tests/http/tests/cookies/same-site/framed.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/framed.https.html index 41c8bb2b..a47db835 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/framed.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/framed.https.html
@@ -19,7 +19,9 @@ clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.location.hostname = TEST_HOST; } else { test(_ => { @@ -28,8 +30,9 @@ document.cookie = STRICT_DOM + "=2; SameSite=Strict; domain=" + TEST_HOST + "; path=/"; document.cookie = LAX_DOM + "=2; SameSite=Lax; domain=" + TEST_HOST + "; path=/"; - document.cookie = NORMAL_DOM + "=2; domain=" + TEST_HOST + "; path=/"; - assert_equals(document.cookie, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + NORMAL_DOM + "=2"); + document.cookie = UNSPECIFIED_DOM + "=2; domain=" + TEST_HOST + "; path=/"; + document.cookie = NONE_DOM + "=2; SameSite=None; Secure; domain=" + TEST_HOST + "; path=/"; + assert_equals(document.cookie, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + UNSPECIFIED_DOM + "=2; " + NONE_DOM + "=2"); }, "Set cookies for TEST_HOST"); // Framed @@ -40,10 +43,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], "2", "strict http"); assert_equals(http_cookies[LAX_DOM], "2", "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "2", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], "2", "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "2", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + NORMAL_DOM + "=2"); + assert_equals(dom_cookies, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + UNSPECIFIED_DOM + "=2; " + NONE_DOM + "=2"); r(); }; @@ -58,10 +62,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], undefined, "strict http"); assert_equals(http_cookies[LAX_DOM], undefined, "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "1", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], undefined, "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "1", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, NORMAL_DOM + "=1"); + assert_equals(dom_cookies, NONE_DOM + "=1"); r(); }; @@ -77,10 +82,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], "2", "strict http"); assert_equals(http_cookies[LAX_DOM], "2", "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "2", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], "2", "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "2", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + NORMAL_DOM + "=2"); + assert_equals(dom_cookies, STRICT_DOM + "=2; " + LAX_DOM + "=2; " + UNSPECIFIED_DOM + "=2; " + NONE_DOM + "=2"); r(); }; @@ -98,10 +104,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], undefined, "strict http"); assert_equals(http_cookies[LAX_DOM], undefined, "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "2", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], undefined, "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "2", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, NORMAL_DOM + "=2"); + assert_equals(dom_cookies, NONE_DOM + "=2"); r(); }; @@ -119,10 +126,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], undefined, "strict http"); assert_equals(http_cookies[LAX_DOM], undefined, "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "1", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], undefined, "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "1", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, NORMAL_DOM + "=1"); + assert_equals(dom_cookies, NONE_DOM + "=1"); r(); }; @@ -140,10 +148,11 @@ var http_cookies = e.data.http; assert_equals(http_cookies[STRICT_DOM], undefined, "strict http"); assert_equals(http_cookies[LAX_DOM], undefined, "lax http"); - assert_equals(http_cookies[NORMAL_DOM], "1", "normal http"); + assert_equals(http_cookies[UNSPECIFIED_DOM], undefined, "unspecified http"); + assert_equals(http_cookies[NONE_DOM], "1", "none http"); var dom_cookies = e.data.document; - assert_equals(dom_cookies, NORMAL_DOM + "=1"); + assert_equals(dom_cookies, NONE_DOM + "=1"); r(); };
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.html b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.https.html similarity index 73% rename from third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.https.html index 44be2fbe..220235f 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site-post.https.html
@@ -12,21 +12,24 @@ clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.location.hostname = TEST_HOST; } else { async_test(t => { window.addEventListener("message", t.step_func_done(e => { assert_equals(e.data.http[STRICT_DOM], undefined, "strict"); assert_equals(e.data.http[LAX_DOM], undefined, "lax"); - assert_equals(e.data.http[NORMAL_DOM], "1", "normal"); + assert_equals(e.data.http[UNSPECIFIED_DOM], undefined, "unspecified"); + assert_equals(e.data.http[NONE_DOM], "1", "none"); // TODO(mkwst): This should exclude the samesite cookies. - assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1"); + assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + UNSPECIFIED_DOM + "=1; " + NONE_DOM + "=1"); e.source.close(); })); var f = document.createElement('form'); - f.action = "http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-cookies-to-opener.php"; + f.action = "https://" + ORIGINAL_HOST + ":8443/cookies/resources/post-cookies-to-opener.php"; f.method = "POST"; f.target = "_blank" window.onload = t.step_func(f.submit.bind(f));
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.html b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.https.html similarity index 67% rename from third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.https.html index 46f72465..2554fd9 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-cross-site.https.html
@@ -11,17 +11,21 @@ clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.location.hostname = TEST_HOST; } else { async_test(t => { - var i = window.open("http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-cookies-to-opener.php"); + // https so that the SameSite=None Secure cookie shows up. + var i = window.open("https://" + ORIGINAL_HOST + ":8443/cookies/resources/post-cookies-to-opener.php"); window.addEventListener("message", t.step_func_done(e => { assert_equals(e.data.http[STRICT_DOM], undefined, "strict"); assert_equals(e.data.http[LAX_DOM], "1", "lax"); - assert_equals(e.data.http[NORMAL_DOM], "1", "normal"); + assert_equals(e.data.http[UNSPECIFIED_DOM], "1", "unspecified"); + assert_equals(e.data.http[NONE_DOM], "1", "none"); // TODO(mkwst): This should exclude the strict cookie. - assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1"); + assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + UNSPECIFIED_DOM + "=1; " + NONE_DOM + "=1"); })); }, "'" + ORIGINAL_HOST + "' is not same-site with '" + TEST_HOST + "', so strict samesite cookies are not sent."); }
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.html b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.https.html similarity index 69% rename from third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.https.html index dc68018..ab2e56f9 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site-post.https.html
@@ -11,18 +11,21 @@ clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.addEventListener("message", t.step_func_done(e => { assert_equals(e.data.http[STRICT_DOM], "1", "strict"); assert_equals(e.data.http[LAX_DOM], "1", "lax"); - assert_equals(e.data.http[NORMAL_DOM], "1", "normal"); - assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1"); + assert_equals(e.data.http[UNSPECIFIED_DOM], "1", "unspecified"); + assert_equals(e.data.http[NONE_DOM], "1", "none"); + assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + UNSPECIFIED_DOM + "=1; " + NONE_DOM + "=1"); e.source.close(); })); var f = document.createElement('form'); - f.action = "http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-cookies-to-opener.php"; + f.action = "https://" + ORIGINAL_HOST + ":8443/cookies/resources/post-cookies-to-opener.php"; f.method = "POST"; f.target = "_blank"; window.onload = t.step_func(f.submit.bind(f));
diff --git a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.html b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.https.html similarity index 64% rename from third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.html rename to third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.https.html index 1d2c2094..3370e8b 100644 --- a/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.html +++ b/third_party/blink/web_tests/http/tests/cookies/same-site/popup-same-site.https.html
@@ -10,16 +10,19 @@ clearKnownCookies(); document.cookie = STRICT_DOM + "=1; SameSite=Strict; Max-Age=100; path=/"; document.cookie = LAX_DOM + "=1; SameSite=Lax; Max-Age=100; path=/"; - document.cookie = NORMAL_DOM + "=1; Max-Age=100; path=/"; + document.cookie = UNSPECIFIED_DOM + "=1; Max-Age=100; path=/"; + // SameSite=None cookies must be Secure. + document.cookie = NONE_DOM + "=1; SameSite=None; Secure; Max-Age=100; path=/"; window.addEventListener("message", t.step_func_done(e => { assert_equals(e.data.http[STRICT_DOM], "1", "strict"); assert_equals(e.data.http[LAX_DOM], "1", "lax"); - assert_equals(e.data.http[NORMAL_DOM], "1", "normal"); - assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + NORMAL_DOM + "=1"); + assert_equals(e.data.http[UNSPECIFIED_DOM], "1", "unspecified"); + assert_equals(e.data.http[NONE_DOM], "1", "none"); + assert_equals(e.data.document, STRICT_DOM + "=1; " + LAX_DOM + "=1; " + UNSPECIFIED_DOM + "=1; " + NONE_DOM + "=1"); })); - var i = window.open("http://" + ORIGINAL_HOST + ":8000/cookies/resources/post-cookies-to-opener.php"); + var i = window.open("https://" + ORIGINAL_HOST + ":8443/cookies/resources/post-cookies-to-opener.php"); }, "'" + ORIGINAL_HOST + "' is same-site with itself, so samesite cookies are sent."); } </script>
diff --git a/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update-expected.txt b/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update-expected.txt new file mode 100644 index 0000000..fda867c --- /dev/null +++ b/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update-expected.txt
@@ -0,0 +1,4 @@ +Layers after update in Layers3DView + +Pass: Layer quads are unchanged by no-op update +
diff --git a/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update.js b/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update.js new file mode 100644 index 0000000..0f62e290 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/devtools/layers/layers-3d-view-after-update.js
@@ -0,0 +1,41 @@ +// Copyright 2019 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. + +(async function() { + TestRunner.addResult(`Layers after update in Layers3DView\n`); + await TestRunner.loadModule('layers_test_runner'); + + await TestRunner.loadHTML(` + <style> + #layer { + will-change: transform; + width: 300px; + height: 300px; + transform: translate(100px, 100px); + } + </style> + <div id="layer"></div> + `); + + TestRunner.showPanel('layers'); + await LayersTestRunner.requestLayers(); + var layer = LayersTestRunner.findLayerByNodeIdAttribute('layer'); + initialQuads = layer.quad().toString(); + + // Updating layers should not produce invalid layer to-screen transforms + // (see: https://crbug.com/977578). Backface visibility is changed, rather + // than just adjusting the transform, to ensure fast-path optimizations do not + // prevent a full layer tree update. + await LayersTestRunner.evaluateAndWaitForTreeChange( + 'layer.style.backfaceVisibility = "hidden";'); + + layer = LayersTestRunner.findLayerByNodeIdAttribute('layer'); + if (initialQuads === layer.quad().toString()) + TestRunner.addResult('Pass: Layer quads are unchanged by no-op update'); + else + TestRunner.addResult('Fail: Layer quads are changed by no-op update'); + + TestRunner.completeTest(); +})(); +
diff --git a/third_party/blink/web_tests/http/tests/fetch/resources/thorough-util.js b/third_party/blink/web_tests/http/tests/fetch/resources/thorough-util.js index 31838e2..5373b9e 100644 --- a/third_party/blink/web_tests/http/tests/fetch/resources/thorough-util.js +++ b/third_party/blink/web_tests/http/tests/fetch/resources/thorough-util.js
@@ -27,6 +27,16 @@ return []; } +// Cookies accessed in a cross-site context must be marked SameSite=None and +// Secure, so tests for cross-site cookies must only run on https. +function shouldIncludeCrossSiteCookieTests() { + return TEST_OPTIONS.indexOf("-other-https") !== -1; +} + +function onlyForCrossSiteCookieTest(checkFunc) { + return shouldIncludeCrossSiteCookieTests() ? checkFunc : cookieCheckNone; +} + // Functions to check the result from the ServiceWorker. var checkFetchResult = function(expected, url, data) { assert_equals(data.fetchResult, expected, url + ' should be ' + expected);
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth-nocors.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth-nocors.js index 6cf489e7..f8065385 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth-nocors.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth-nocors.js
@@ -31,7 +31,7 @@ onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'Auth', [fetchResolved, noBody, typeOpaque], - [authCheck2]]), + [onlyForCrossSiteCookieTest(authCheck2)]]), onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'Auth&credentials=omit', [fetchResolved, noBody, typeOpaque], @@ -39,7 +39,7 @@ onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'Auth&credentials=include', [fetchResolved, noBody, typeOpaque], - [authCheck2]]), + [onlyForCrossSiteCookieTest(authCheck2)]]), onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'Auth&credentials=same-origin', [fetchResolved, noBody, typeOpaque], @@ -51,7 +51,7 @@ onlyOnServiceWorkerProxiedTest([checkJsonpError])], [OTHER_BASE_URL + 'Auth&mode=no-cors&credentials=include', [fetchResolved, noBody, typeOpaque], - onlyOnServiceWorkerProxiedTest([authCheck2])], + onlyOnServiceWorkerProxiedTest([onlyForCrossSiteCookieTest(authCheck2)])], [OTHER_BASE_URL + 'Auth&mode=no-cors&credentials=same-origin', [fetchResolved, noBody, typeOpaque], onlyOnServiceWorkerProxiedTest([checkJsonpError])],
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth.js index 825750d..af3600f 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/auth.js
@@ -61,7 +61,7 @@ [fetchRejected]], [OTHER_BASE_URL + 'Auth&mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + '&ACACredentials=true', - [fetchResolved, hasBody, typeCors], [authCheck2]], + [fetchResolved, hasBody, typeCors], [onlyForCrossSiteCookieTest(authCheck2)]], [OTHER_BASE_URL + 'Auth&mode=cors&credentials=include&ACAOrigin=http://www.example.com&ACACredentials=true', [fetchRejected]], @@ -90,7 +90,7 @@ [OTHER_BASE_URL + 'Auth&mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + '&PACAOrigin=' + BASE_ORIGIN + '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&PreflightTest=200', - [fetchResolved, hasBody, typeCors], [authCheck2]], + [fetchResolved, hasBody, typeCors], [onlyForCrossSiteCookieTest(authCheck2)]], // Rejected because CORS preflight response returns 401. [OTHER_BASE_URL + 'PAuth&mode=cors&credentials=omit&ACAOrigin=*&PACAOrigin=*&method=PUT&PACAMethods=PUT&PreflightTest=200',
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie-nocors.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie-nocors.js index 4cdd338..bbd5399a 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie-nocors.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie-nocors.js
@@ -47,35 +47,37 @@ // Test cross-origin requests. -// URL to check current cookie. -var OTHER_CHECK_URL = - OTHER_BASE_URL + - 'mode=cors&credentials=include&method=POST&ACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&label='; +if (shouldIncludeCrossSiteCookieTests()) { + // URL to check current cookie. + var OTHER_CHECK_URL = + OTHER_BASE_URL + + 'mode=cors&credentials=include&method=POST&ACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&label='; -TEST_TARGETS.push( - // At first, cookie is cookie=cookie2. - // Tests for mode=no-cors. + TEST_TARGETS.push( + // At first, cookie is cookie=cookie2. + // Tests for mode=no-cors. - // Try to set cookieC, but - // cookie is not sent/updated because credentials flag is not set. - [OTHER_BASE_URL + 'mode=no-cors&credentials=omit&SetCookie=cookieC', - [fetchResolved, noBody, typeOpaque], - onlyOnServiceWorkerProxiedTest([cookieCheckNone])], - [OTHER_CHECK_URL + 'otherCheck1', [fetchResolved], [cookieCheck2]], + // Try to set cookieC, but + // cookie is not sent/updated because credentials flag is not set. + [OTHER_BASE_URL + 'mode=no-cors&credentials=omit&SetCookie=cookieC&SameSiteNone', + [fetchResolved, noBody, typeOpaque], + onlyOnServiceWorkerProxiedTest([cookieCheckNone])], + [OTHER_CHECK_URL + 'otherCheck1', [fetchResolved], [cookieCheck2]], - // Set cookieC with opaque response. Response is opaque, but cookie is set. - [OTHER_BASE_URL + 'mode=no-cors&credentials=include&SetCookie=cookieC', - [fetchResolved, noBody, typeOpaque], - onlyOnServiceWorkerProxiedTest([cookieCheck2])], - [OTHER_CHECK_URL + 'otherCheck2', [fetchResolved], [cookieCheckC]], + // Set cookieC with opaque response. Response is opaque, but cookie is set. + [OTHER_BASE_URL + 'mode=no-cors&credentials=include&SetCookie=cookieC&SameSiteNone', + [fetchResolved, noBody, typeOpaque], + onlyOnServiceWorkerProxiedTest([cookieCheck2])], + [OTHER_CHECK_URL + 'otherCheck2', [fetchResolved], [cookieCheckC]], - // Set cookieA with opaque response. Response is opaque and cookie is not set. - [OTHER_BASE_URL + 'mode=no-cors&credentials=same-origin&SetCookie=cookieA', - [fetchResolved, noBody, typeOpaque], - onlyOnServiceWorkerProxiedTest([cookieCheckNone])], - [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckC]] -); + // Set cookieA with opaque response. Response is opaque and cookie is not set. + [OTHER_BASE_URL + 'mode=no-cors&credentials=same-origin&SetCookie=cookieA&SameSiteNone', + [fetchResolved, noBody, typeOpaque], + onlyOnServiceWorkerProxiedTest([cookieCheckNone])], + [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckC]] + ); +} if (self.importScripts) { executeTests(TEST_TARGETS);
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie.js index 19532fa8..f4e258c9 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/cookie.js
@@ -45,110 +45,112 @@ // Test cross-origin requests. -// URL to check current cookie. -var OTHER_CHECK_URL = - OTHER_BASE_URL + - 'mode=cors&credentials=include&method=POST&ACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&label='; +if (shouldIncludeCrossSiteCookieTests()) { + // URL to check current cookie. + var OTHER_CHECK_URL = + OTHER_BASE_URL + + 'mode=cors&credentials=include&method=POST&ACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&label='; -TEST_TARGETS.push( - // At first, cookie is cookie=cookie2. + TEST_TARGETS.push( + // At first, cookie is cookie=cookie2. - // Tests for mode=cors. + // Tests for mode=cors. - // Set cookieA by a successful CORS. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&SetCookie=cookieA', - [fetchResolved, hasBody, typeCors], [cookieCheck2]], - // Check that cookie is set. - [OTHER_CHECK_URL + 'otherCheck1', [fetchResolved], [cookieCheckA]], + // Set cookieA by a successful CORS. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&SetCookie=cookieA&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheck2]], + // Check that cookie is set. + [OTHER_CHECK_URL + 'otherCheck1', [fetchResolved], [cookieCheckA]], - // Set cookieB by a rejected CORS. Fetch is rejected, but cookie is set. - // Spec: https://fetch.spec.whatwg.org/ - // Cookie is set in Step 13 of HTTP network or cache fetch - // (called from Step 3.5 of HTTP fetch), - // which is before CORS check in Step 3.6 of HTTP fetch. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=*&SetCookie=cookieB', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck2', [fetchResolved], [cookieCheckB]], + // Set cookieB by a rejected CORS. Fetch is rejected, but cookie is set. + // Spec: https://fetch.spec.whatwg.org/ + // Cookie is set in Step 13 of HTTP network or cache fetch + // (called from Step 3.5 of HTTP fetch), + // which is before CORS check in Step 3.6 of HTTP fetch. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=*&SetCookie=cookieB&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck2', [fetchResolved], [cookieCheckB]], - // Set cookieC by a rejected CORS. Fetch is rejected, but cookie is set. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&SetCookie=cookieC', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckC]], + // Set cookieC by a rejected CORS. Fetch is rejected, but cookie is set. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&SetCookie=cookieC&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck3', [fetchResolved], [cookieCheckC]], - // Set cookieA by a rejected CORS. Fetch is rejected, but cookie is set. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=*&ACACredentials=true&SetCookie=cookieA', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck4', [fetchResolved], [cookieCheckA]], + // Set cookieA by a rejected CORS. Fetch is rejected, but cookie is set. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=*&ACACredentials=true&SetCookie=cookieA&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck4', [fetchResolved], [cookieCheckA]], - // Try to set cookieB, but - // cookie is not sent/updated because credentials flag is not set. - [OTHER_BASE_URL + 'mode=cors&credentials=omit&ACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&SetCookie=cookieB', - [fetchResolved, hasBody, typeCors], [cookieCheckNone]], - [OTHER_CHECK_URL + 'otherCheck5', [fetchResolved], [cookieCheckA]], + // Try to set cookieB, but + // cookie is not sent/updated because credentials flag is not set. + [OTHER_BASE_URL + 'mode=cors&credentials=omit&ACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&SetCookie=cookieB&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckNone]], + [OTHER_CHECK_URL + 'otherCheck5', [fetchResolved], [cookieCheckA]], - // Try to set cookieB, but - // cookie is not sent/updated because credentials flag is not set. - [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&ACAOrigin=' + - BASE_ORIGIN + '&ACACredentials=true&SetCookie=cookieB', - [fetchResolved, hasBody, typeCors], [cookieCheckNone]], - [OTHER_CHECK_URL + 'otherCheck6', [fetchResolved], [cookieCheckA]], + // Try to set cookieB, but + // cookie is not sent/updated because credentials flag is not set. + [OTHER_BASE_URL + 'mode=cors&credentials=same-origin&ACAOrigin=' + + BASE_ORIGIN + '&ACACredentials=true&SetCookie=cookieB&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckNone]], + [OTHER_CHECK_URL + 'otherCheck6', [fetchResolved], [cookieCheckA]], - // Tests for CORS preflight. + // Tests for CORS preflight. - // Set cookieB by a successful CORS with CORS preflight. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&PACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&SetCookie=cookieB&PreflightTest=200', - [fetchResolved, hasBody, typeCors], [cookieCheckA]], - [OTHER_CHECK_URL + 'otherCheck7', [fetchResolved], [cookieCheckB]], - // Set-Cookie2 should be ignored for CORS. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&PACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&SetCookie2=cookieC&PreflightTest=200', - [fetchResolved, hasBody, typeCors], [cookieCheckB]], - [OTHER_CHECK_URL + 'otherCheck8', [fetchResolved], [cookieCheckB]], + // Set cookieB by a successful CORS with CORS preflight. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&PACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&SetCookie=cookieB&PreflightTest=200&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckA]], + [OTHER_CHECK_URL + 'otherCheck7', [fetchResolved], [cookieCheckB]], + // Set-Cookie2 should be ignored for CORS. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&PACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&SetCookie2=cookieC&PreflightTest=200&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckB]], + [OTHER_CHECK_URL + 'otherCheck8', [fetchResolved], [cookieCheckB]], - // Test that no Cookie header is sent in CORS preflight. - // Test that Set-Cookie in CORS preflight is ignored. + // Test that no Cookie header is sent in CORS preflight. + // Test that Set-Cookie in CORS preflight is ignored. - // Set-Cookie=cookieC is sent in CORS preflight, but this should be ignored. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&PACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&PSetCookie=cookieC&PreflightTest=200', - [fetchResolved, hasBody, typeCors], [cookieCheckB]], - [OTHER_CHECK_URL + 'otherCheck9', [fetchResolved], [cookieCheckB]], + // Set-Cookie=cookieC is sent in CORS preflight, but this should be ignored. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&PACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&PSetCookie=cookieC&PreflightTest=200&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckB]], + [OTHER_CHECK_URL + 'otherCheck9', [fetchResolved], [cookieCheckB]], - // Set-Cookie2=cookieC is sent in CORS preflight, but this should be ignored. - [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + - '&PACAOrigin=' + BASE_ORIGIN + - '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&PSetCookie2=cookieC&PreflightTest=200', - [fetchResolved, hasBody, typeCors], [cookieCheckB]], - [OTHER_CHECK_URL + 'otherCheck10', [fetchResolved], [cookieCheckB]], + // Set-Cookie2=cookieC is sent in CORS preflight, but this should be ignored. + [OTHER_BASE_URL + 'mode=cors&credentials=include&ACAOrigin=' + BASE_ORIGIN + + '&PACAOrigin=' + BASE_ORIGIN + + '&ACACredentials=true&PACACredentials=true&method=PUT&PACAMethods=PUT&PSetCookie2=cookieC&PreflightTest=200&SameSiteNone', + [fetchResolved, hasBody, typeCors], [cookieCheckB]], + [OTHER_CHECK_URL + 'otherCheck10', [fetchResolved], [cookieCheckB]], - // Tests for mode=same-origin. - // Rejected as Network Error before entering basic fetch or HTTP fetch, - // so no cookies are set. + // Tests for mode=same-origin. + // Rejected as Network Error before entering basic fetch or HTTP fetch, + // so no cookies are set. - // Try to set cookieC. - [OTHER_BASE_URL + 'mode=same-origin&credentials=omit&SetCookie=cookieC', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck11', [fetchResolved], [cookieCheckB]], + // Try to set cookieC. + [OTHER_BASE_URL + 'mode=same-origin&credentials=omit&SetCookie=cookieC&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck11', [fetchResolved], [cookieCheckB]], - // Try to set cookieC. - [OTHER_BASE_URL + 'mode=same-origin&credentials=include&SetCookie=cookieC', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck12', [fetchResolved], [cookieCheckB]], + // Try to set cookieC. + [OTHER_BASE_URL + 'mode=same-origin&credentials=include&SetCookie=cookieC&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck12', [fetchResolved], [cookieCheckB]], - // Try to set cookieC. - [OTHER_BASE_URL + - 'mode=same-origin&credentials=same-origin&SetCookie=cookieC', - [fetchRejected]], - [OTHER_CHECK_URL + 'otherCheck13', [fetchResolved], [cookieCheckB]] -); + // Try to set cookieC. + [OTHER_BASE_URL + + 'mode=same-origin&credentials=same-origin&SetCookie=cookieC&SameSiteNone', + [fetchRejected]], + [OTHER_CHECK_URL + 'otherCheck13', [fetchResolved], [cookieCheckB]] + ); +} if (self.importScripts) { executeTests(TEST_TARGETS);
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/nocors.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/nocors.js index 3ecc477..b3a1083 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/nocors.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/nocors.js
@@ -31,7 +31,7 @@ onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'method=GET&headers=CUSTOM', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque], - [methodIsGET, noCustomHeader, authCheck2]]), + [methodIsGET, noCustomHeader, onlyForCrossSiteCookieTest(authCheck2)]]), onlyOnServiceWorkerProxiedTest( [OTHER_BASE_URL + 'method=POST&headers=CUSTOM', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque], @@ -63,7 +63,8 @@ [OTHER_BASE_URL + 'mode=no-cors&method=GET&headers=CUSTOM', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque], - onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, + onlyForCrossSiteCookieTest(authCheck2)])], [OTHER_BASE_URL + 'mode=no-cors&method=POST&headers=CUSTOM', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque], onlyOnServiceWorkerProxiedTest([methodIsPOST, noCustomHeader])],
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-credentials.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-credentials.js index 22de324..d0e1aa8 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-credentials.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-credentials.js
@@ -52,7 +52,7 @@ '&ACAOrigin=' + BASE_ORIGIN + '&ACACredentials=true') + '&mode=cors&credentials=include&method=GET', [fetchResolved, hasContentLength, noServerHeader, hasBody, typeCors], - [methodIsGET, authCheck2]], + [methodIsGET, onlyForCrossSiteCookieTest(authCheck2)]], [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL + '&ACAOrigin=' + BASE_ORIGIN + '') +
diff --git a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-nocors.js b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-nocors.js index 6d70e84..71c2ad028 100644 --- a/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-nocors.js +++ b/third_party/blink/web_tests/http/tests/fetch/script-tests/thorough/redirect-nocors.js
@@ -16,7 +16,8 @@ '&mode=no-cors&method=GET&headers=CUSTOM', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, noCustomHeader, + onlyForCrossSiteCookieTest(authCheck2)])], // Status code tests for mode="no-cors" // The 301 redirect response changes POST method to GET method. @@ -24,25 +25,29 @@ '&mode=no-cors&method=POST&Status=301', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, + onlyForCrossSiteCookieTest(authCheck2)])], // The 302 redirect response changes POST method to GET method. [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) + '&mode=no-cors&method=POST', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, + onlyForCrossSiteCookieTest(authCheck2)])], // GET method must be used for 303 redirect. [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) + '&mode=no-cors&method=POST&Status=303', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, + onlyForCrossSiteCookieTest(authCheck2)])], // The 307 redirect response doesn't change the method. [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) + '&mode=no-cors&method=POST&Status=307', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsPOST, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsPOST, + onlyForCrossSiteCookieTest(authCheck2)])], // The 308 redirect response doesn't change the method. // FIXME: disabled due to https://crbug.com/451938 // [REDIRECT_URL + encodeURIComponent(OTHER_BASE_URL) + @@ -99,7 +104,8 @@ '&mode=no-cors&method=GET', [fetchResolved, noContentLength, noServerHeader, noBody, typeOpaque, responseNotRedirected, checkURLList.bind(self, [OTHER_BASE_URL])], - onlyOnServiceWorkerProxiedTest([methodIsGET, authCheck2])], + onlyOnServiceWorkerProxiedTest([methodIsGET, + onlyForCrossSiteCookieTest(authCheck2)])], ]; if (self.importScripts) {
diff --git a/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open-expected.txt b/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open-expected.txt deleted file mode 100644 index 813b163..0000000 --- a/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open-expected.txt +++ /dev/null
@@ -1,28 +0,0 @@ ---- Test begins --- -* "about:blank" -document.URL = about:blank -document.baseURI = about:blank -document.cookie = cookie=parent -* "" -document.URL = about:blank -document.baseURI = about:blank -document.cookie = cookie=parent ---- After document.open() --- -* "about:blank" -document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.cookie = cookie=parent -* "" -document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.cookie = cookie=parent ---- After document.close() --- -* "about:blank" -document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.cookie = cookie=parent -* "" -document.URL = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.baseURI = http://127.0.0.1:8000/security/aboutBlank/security-context-window-open.html -document.cookie = cookie=parent ---- Test ends ---
diff --git a/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https-expected.txt b/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https-expected.txt new file mode 100644 index 0000000..955b11f --- /dev/null +++ b/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https-expected.txt
@@ -0,0 +1,28 @@ +--- Test begins --- +* "about:blank" +document.URL = about:blank +document.baseURI = about:blank +document.cookie = cookie=parent +* "" +document.URL = about:blank +document.baseURI = about:blank +document.cookie = cookie=parent +--- After document.open() --- +* "about:blank" +document.URL = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.baseURI = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.cookie = cookie=parent +* "" +document.URL = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.baseURI = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.cookie = cookie=parent +--- After document.close() --- +* "about:blank" +document.URL = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.baseURI = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.cookie = cookie=parent +* "" +document.URL = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.baseURI = https://127.0.0.1:8443/security/aboutBlank/security-context-window-open.https.html +document.cookie = cookie=parent +--- Test ends ---
diff --git a/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.html b/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https.html similarity index 96% rename from third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.html rename to third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https.html index aa1b0c69..7e4a356 100644 --- a/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.html +++ b/third_party/blink/web_tests/http/tests/security/aboutBlank/security-context-window-open.https.html
@@ -7,7 +7,7 @@ testRunner.setCanOpenWindows(); } -document.cookie = 'cookie=parent'; +document.cookie = 'cookie=parent; SameSite=None; Secure'; function log(msg) { var line = document.createElement('div');
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/base-about-blank.html b/third_party/blink/web_tests/http/tests/security/cookies/base-about-blank.html index b6de58d1..e5f69e85 100644 --- a/third_party/blink/web_tests/http/tests/security/cookies/base-about-blank.html +++ b/third_party/blink/web_tests/http/tests/security/cookies/base-about-blank.html
@@ -4,6 +4,7 @@ if (window.testRunner) { testRunner.dumpAsText(); testRunner.waitUntilDone(); + testRunner.setDumpConsoleMessages(false); } document.cookie = "secret=PASS";
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/base-tag.html b/third_party/blink/web_tests/http/tests/security/cookies/base-tag.html index 5161049..46e3850 100644 --- a/third_party/blink/web_tests/http/tests/security/cookies/base-tag.html +++ b/third_party/blink/web_tests/http/tests/security/cookies/base-tag.html
@@ -4,6 +4,7 @@ if (window.testRunner) { testRunner.dumpAsText(); testRunner.waitUntilDone(); + testRunner.setDumpConsoleMessages(false); } document.cookie = "secret=PASS";
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/cookie-theft-with-javascript-doc.html b/third_party/blink/web_tests/http/tests/security/cookies/cookie-theft-with-javascript-doc.html index d585aa0..11d4e1ef 100644 --- a/third_party/blink/web_tests/http/tests/security/cookies/cookie-theft-with-javascript-doc.html +++ b/third_party/blink/web_tests/http/tests/security/cookies/cookie-theft-with-javascript-doc.html
@@ -6,6 +6,7 @@ testRunner.waitUntilDone(); testRunner.setCanOpenWindows(); testRunner.setCloseRemainingWindowsWhenComplete(true); + testRunner.setDumpConsoleMessages(false); } window.onload = function()
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/first-party-cookie-accepted.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/first-party-cookie-accepted.html deleted file mode 100644 index d060b65..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/first-party-cookie-accepted.html +++ /dev/null
@@ -1,32 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/websocket/resources/get-request-header.js"></script> -<script src="/websocket/resources/cookie-test-util.js"></script> -<script> -if (window.testRunner) { - // Block third-party cookies. - testRunner.setBlockThirdPartyCookies(true); -} - -const origin = WS_ORIGIN; - -promise_test(() => { - return setCookie(origin).then( - () => { - return connectAndGetRequestHeadersFrom(origin); - } - ).then( - headers => { - const cookie = headers['cookie']; - assert_not_equals(cookie, undefined, - 'headers should contain a cookie header.'); - assert_equals( - normalizeCookie(cookie), - 'same-site-lax=1; same-site-strict=1; ws-domain-local-ip=1; ' + - 'ws-path-root=1; ws=1'); - return clear(origin); - } - ); -}, "Test that first-party cookies not blocked for WebSockets."); -</script>
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/resources/set-cookie.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/resources/set-cookie.html deleted file mode 100644 index a0a59c11..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/resources/set-cookie.html +++ /dev/null
@@ -1,31 +0,0 @@ -<!DOCTYPE html> -<script src="/websocket/resources/get-request-header.js"></script> -<script src="/websocket/resources/cookie-test-util.js"></script> -<script> -function notifySuccess(value) { - window.parent.postMessage('DONE: ' + value, '*'); -} - -function notifyFailure(reason) { - window.parent.postMessage('FAIL: ' + reason, '*'); -} - -let origin = WS_ORIGIN; -if (location.search == '?remote') { - origin = WS_REMOTE_ORIGIN; -} - -setCookie(origin).then( - () => connectAndGetRequestHeadersFrom(origin), - notifyFailure -).then( - headers => { - const cookie = headers['cookie']; - return clear(origin).then(() => { - notifySuccess(JSON.stringify(cookie)); - }); - } -).catch( - notifyFailure -); -</script>
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-accepted.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-accepted.html deleted file mode 100644 index 0c1f45c..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-accepted.html +++ /dev/null
@@ -1,31 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/websocket/resources/get-request-header.js"></script> -<script src="/websocket/resources/cookie-test-util.js"></script> -<script> -if (window.testRunner) { - // Don't block third-party cookies. - testRunner.setBlockThirdPartyCookies(false); -} - -const origin = WS_REMOTE_ORIGIN; - -promise_test(t => { - return setCookie(origin).then( - () => { - return connectAndGetRequestHeadersFrom(origin); - } - ).then( - headers => { - const cookie = headers['cookie']; - assert_not_equals(cookie, undefined, - 'headers should contain a cookie header.'); - // Same-site cookies are not included. - assert_equals(normalizeCookie(cookie), 'ws-path-root=1; ws=1'); - return clear(origin); - } - ); -}, "Test that third-party cookies are accepted for WebSockets when blocking " + - "is disabled."); -</script>
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-cross-origin-websocket.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-cross-origin-websocket.html deleted file mode 100644 index 17ee16c..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-cross-origin-websocket.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -if (window.testRunner) { - // Block third-party cookies. - testRunner.setBlockThirdPartyCookies(true); -} - -async_test(t => { - window.addEventListener( - 'message', - t.step_func_done(event => { - assert_equals(event.data, 'DONE: undefined'); - }), - false); -}, "Test that first-party cookies are blocked for WebSockets conforming the " + - "requirements of the SameSite attribute."); -</script> -<!-- - The iframe is a remote origin. It uses the same origin as this test case file - for the WebSocket. ---> -<iframe src="http://localhost:8000/security/cookies/websocket/resources/set-cookie.html"></iframe>
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html deleted file mode 100644 index c93d819..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked-on-same-origin-websocket.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> -if (window.testRunner) { - // Block third-party cookies. - testRunner.setBlockThirdPartyCookies(true); -} - -async_test(t => { - window.addEventListener( - 'message', - t.step_func_done(event => { - assert_equals(event.data, 'DONE: undefined'); - }), - false); -}, "Test that third-party cookies are blocked for WebSockets even when the " + - "WebSocket's URL's domain is an exact match for the domain of its " + - "initiator."); -</script> -<!-- - The iframe is a remote origin. It uses a remote origin for the WebSocket. ---> -<iframe src="http://localhost:8000/security/cookies/websocket/resources/set-cookie.html?remote"></iframe>
diff --git a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html b/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html deleted file mode 100644 index 78fca21..0000000 --- a/third_party/blink/web_tests/http/tests/security/cookies/websocket/third-party-cookie-blocked.html +++ /dev/null
@@ -1,28 +0,0 @@ -<!DOCTYPE html> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script src="/websocket/resources/get-request-header.js"></script> -<script src="/websocket/resources/cookie-test-util.js"></script> -<script> -if (window.testRunner) { - // Block third-party cookies. - testRunner.setBlockThirdPartyCookies(true); -} - -const origin = WS_REMOTE_ORIGIN; - -promise_test(t => { - return setCookie(origin).then( - () => { - return connectAndGetRequestHeadersFrom(origin); - } - ).then( - headers => { - const cookie = headers['cookie']; - assert_equals(cookie, undefined, - 'headers should not contain any cookie header.'); - return clear(origin); - } - ); -}, "Test third-party cookie blocking for WebSockets"); -</script>
diff --git a/third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.html b/third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.https.html similarity index 89% rename from third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.html rename to third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.https.html index 7d93f63..67e088f9 100644 --- a/third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.html +++ b/third_party/blink/web_tests/http/tests/security/img-crossorigin-cookies.https.html
@@ -30,12 +30,13 @@ promise_test(function(t) { document.cookie = "TestCookie=same"; var host_info = get_host_info(); - var RESOURCES_PATH = host_info['HTTP_ORIGIN'] + '/security/resources/'; - var REMOTE_RESOURCES_PATH = host_info['HTTP_REMOTE_ORIGIN'] + + // HTTPS must be used because SameSite=None cookies must be Secure. + var RESOURCES_PATH = host_info['HTTPS_ORIGIN'] + '/security/resources/'; + var REMOTE_RESOURCES_PATH = host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/'; return fetch(new Request(REMOTE_RESOURCES_PATH + 'set-cookie.php?' + - 'name=TestCookie&value=cross', + 'name=TestCookie&value=cross&SameSiteNone', {mode: 'no-cors', credentials: 'include'})) .then(function() { return Promise.all([ @@ -71,11 +72,11 @@ assert_resolves( load_image( REMOTE_RESOURCES_PATH + 'abe-allow-credentials.php?' + - 'Cookie=cross', + 'Cookie=cross&Secure', 'use-credentials'), 'Cross-origin request for a resource whose CORS setting is ' + 'UseCredentials must contain cookies.'), ]);} ); }, 'Check request cookies for image resources with crossOrigin.'); -</script> \ No newline at end of file +</script>
diff --git a/third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.html b/third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.https.html similarity index 82% rename from third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.html rename to third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.https.html index e3632519..aff9259 100644 --- a/third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.html +++ b/third_party/blink/web_tests/http/tests/security/img-crossorigin-redirect-credentials.https.html
@@ -16,10 +16,10 @@ const set_cookie_promise = Promise.all([ fetch( - host_info['HTTP_REMOTE_ORIGIN'] + SET_COOKIE_PATH + '?name=TestCookie&value=cross', + host_info['HTTPS_REMOTE_ORIGIN'] + SET_COOKIE_PATH + '?name=TestCookie&value=cross&SameSiteNone', {mode: 'no-cors', credentials: 'include'}), fetch( - ANOTHER_REMOTE_ORIGIN + SET_COOKIE_PATH + '?name=TestCookie&value=cross', + ANOTHER_REMOTE_ORIGIN + SET_COOKIE_PATH + '?name=TestCookie&value=cross&SameSiteNone', {mode: 'no-cors', credentials: 'include'}) ]); @@ -57,9 +57,9 @@ const params = new URLSearchParams(); params.append('mode', 'use-credentials'); - params.append('url', url + '?' + destination_params.toString()); + params.append('url', url + (url.indexOf('?') == -1 ? '?' : '&') + destination_params.toString()); - img.src = host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/cors-redirect.php?' + params.toString(); + img.src = host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/cors-redirect.php?' + params.toString(); document.body.appendChild(img); }); @@ -68,7 +68,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe.png', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe.png', 'anonymous', false, undefined); @@ -76,7 +76,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe.png', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe.png', 'use-credentials', false, undefined); @@ -84,7 +84,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', 'anonymous', true, 'NotSet'); @@ -92,7 +92,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', 'use-credentials', false, undefined); @@ -100,7 +100,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-credentials.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-credentials.php?Secure', 'use-credentials', true, 'cross'); @@ -136,7 +136,7 @@ promise_test(() => { return load_image( - host_info['HTTP_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_ORIGIN'] + '/security/resources/abe-allow-star.php', 'anonymous', true, 'NotSet'); @@ -144,7 +144,7 @@ promise_test(() => { return load_image( - host_info['HTTP_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_ORIGIN'] + '/security/resources/abe-allow-star.php', 'use-credentials', false, undefined); @@ -152,7 +152,7 @@ promise_test(() => { return load_image( - host_info['HTTP_ORIGIN'] + '/security/resources/abe-allow-credentials.php', + host_info['HTTPS_ORIGIN'] + '/security/resources/abe-allow-credentials.php', 'use-credentials', false, undefined);
diff --git a/third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.html b/third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.https.html similarity index 78% rename from third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.html rename to third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.https.html index d98a265..a4aa008 100644 --- a/third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.html +++ b/third_party/blink/web_tests/http/tests/security/img-redirect-to-crossorigin-credentials.https.html
@@ -11,7 +11,7 @@ document.cookie = 'TestCookie=same'; const set_cookie_promise = fetch( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/set-cookie.php?name=TestCookie&value=cross', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/set-cookie.php?name=TestCookie&value=cross&SameSiteNone', {mode: 'no-cors', credentials: 'include'}); let count = 0; @@ -47,7 +47,7 @@ } const params = new URLSearchParams(); - params.append('url', url + '?' + destination_params.toString()); + params.append('url', url + (url.indexOf('?') == -1 ? '?' : '&') + destination_params.toString()); img.src = '/resources/redirect.php?' + params.toString(); @@ -58,7 +58,7 @@ promise_test(() => { return load_image( - host_info['HTTP_ORIGIN'] + '/security/resources/abe-cookie-check.php', + host_info['HTTPS_ORIGIN'] + '/security/resources/abe-cookie-check.php', 'anonymous', true, 'same'); @@ -66,7 +66,7 @@ promise_test(() => { return load_image( - host_info['HTTP_ORIGIN'] + '/security/resources/abe-cookie-check.php', + host_info['HTTPS_ORIGIN'] + '/security/resources/abe-cookie-check.php', 'use-credentials', true, 'same'); @@ -74,7 +74,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', 'anonymous', true, 'NotSet'); @@ -82,7 +82,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-star.php', 'use-credentials', false, undefined); @@ -90,7 +90,7 @@ promise_test(() => { return load_image( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/abe-allow-credentials.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/abe-allow-credentials.php?Secure', 'use-credentials', true, 'cross');
diff --git a/third_party/blink/web_tests/http/tests/security/resources/abe-allow-credentials.php b/third_party/blink/web_tests/http/tests/security/resources/abe-allow-credentials.php index bce72fa..2e6d30f 100644 --- a/third_party/blink/web_tests/http/tests/security/resources/abe-allow-credentials.php +++ b/third_party/blink/web_tests/http/tests/security/resources/abe-allow-credentials.php
@@ -12,7 +12,9 @@ } } -header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); +$secure = isset($_GET["Secure"]); +$origin = $secure ? "https://127.0.0.1:8443" : "http://127.0.0.1:8000"; +header("Access-Control-Allow-Origin: " . $origin); header("Access-Control-Allow-Credentials: true"); $name = 'abe.png';
diff --git a/third_party/blink/web_tests/http/tests/security/resources/set-cookie.php b/third_party/blink/web_tests/http/tests/security/resources/set-cookie.php index 2ff0898..89d6a73d 100644 --- a/third_party/blink/web_tests/http/tests/security/resources/set-cookie.php +++ b/third_party/blink/web_tests/http/tests/security/resources/set-cookie.php
@@ -1,4 +1,9 @@ <?php -setcookie($_GET["name"], $_GET["value"], 0, "/"); +$set_cookie_header_string = 'Set-Cookie: ' . $_GET["name"] . '=' . + $_GET["value"] . '; Path=/'; +if (isset($_GET["SameSiteNone"])) + $set_cookie_header_string .= '; SameSite=None; Secure'; + +header($set_cookie_header_string); ?> Set <?= $_GET["name"] ?>=<?= $_GET["value"] ?>
diff --git a/third_party/blink/web_tests/http/tests/sendbeacon/beacon-cross-origin-redirect-credentials.html b/third_party/blink/web_tests/http/tests/sendbeacon/beacon-cross-origin-redirect-credentials.html index 91aac3f..8f4e45c 100644 --- a/third_party/blink/web_tests/http/tests/sendbeacon/beacon-cross-origin-redirect-credentials.html +++ b/third_party/blink/web_tests/http/tests/sendbeacon/beacon-cross-origin-redirect-credentials.html
@@ -11,7 +11,7 @@ document.cookie = "TestCookie=same"; const set_cookie_promise = fetch( - host_info['HTTP_REMOTE_ORIGIN'] + '/security/resources/set-cookie.php?name=TestCookie&value=cross', + host_info['HTTPS_REMOTE_ORIGIN'] + '/security/resources/set-cookie.php?name=TestCookie&value=cross&SameSiteNone', {mode: 'no-cors', credentials: 'include'}); let count = 0; @@ -81,7 +81,7 @@ promise_test(() => { return run_test( - host_info['HTTP_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', 301, { cookie: 'TestCookie=cross', @@ -91,7 +91,7 @@ promise_test(() => { return run_test( - host_info['HTTP_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', 302, { cookie: 'TestCookie=cross', @@ -101,7 +101,7 @@ promise_test(() => { return run_test( - host_info['HTTP_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', 303, { cookie: 'TestCookie=cross', @@ -111,7 +111,7 @@ promise_test(() => { return run_test( - host_info['HTTP_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', + host_info['HTTPS_REMOTE_ORIGIN'] + '/sendbeacon/resources/save-beacon.php', 307, { cookie: 'TestCookie=cross',
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control-login.html b/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control-login.html index 4152c669..d788ab5 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control-login.html +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control-login.html
@@ -2,7 +2,8 @@ // Set authentication info window.addEventListener("message", function(evt) { var port = evt.ports[0]; - document.cookie = 'cookie=' + evt.data.cookie; + // Cookies intended for cross-site use must be marked SameSite=None and Secure. + document.cookie = 'cookie=' + evt.data.cookie + (evt.data.cookieCrossSite ? "; SameSite=None; Secure" : ""); var xhr = new XMLHttpRequest(); xhr.addEventListener('load', function() { port.postMessage({msg: 'LOGIN FINISHED'}); @@ -13,4 +14,4 @@ evt.data.username, evt.data.password); xhr.send(); }, false); -</script> \ No newline at end of file +</script>
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control.php b/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control.php index 5c3aa48..131c2009 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control.php +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/fetch-access-control.php
@@ -53,8 +53,19 @@ $_GET[$prefix . 'ACACredentials']); if (isset($_GET[$prefix . 'ACEHeaders'])) header('Access-Control-Expose-Headers: ' . $_GET[$prefix . 'ACEHeaders']); -if (isset($_GET[$prefix . 'SetCookie'])) - header('Set-Cookie: cookie=' . $_GET[$prefix . 'SetCookie']); + +// Whether the Set-Cookie line needs to include SameSite=None and Secure (for +// cross-site use). +$cookie_cross_site = isset($_GET['SameSiteNone']); + +if (isset($_GET[$prefix . 'SetCookie'])) { + if ($cookie_cross_site) { + header('Set-Cookie: cookie=' . $_GET[$prefix . 'SetCookie'] . + '; SameSite=None; Secure'); + } else { + header('Set-Cookie: cookie=' . $_GET[$prefix . 'SetCookie']); + } +} if (isset($_GET[$prefix . 'SetCookie2'])) header('Set-Cookie2: cookie=' . $_GET[$prefix . 'SetCookie2']);
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/resources/test-helpers.js b/third_party/blink/web_tests/http/tests/serviceworker/resources/test-helpers.js index 240db09..9d92fda2 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/resources/test-helpers.js +++ b/third_party/blink/web_tests/http/tests/serviceworker/resources/test-helpers.js
@@ -183,7 +183,7 @@ return location.pathname.replace(/\/[^\/]*$/, '/'); } -function test_login(test, origin, username, password, cookie) { +function test_login(test, origin, username, password, cookie, cookie_cross_site) { return new Promise(function(resolve, reject) { with_iframe( origin + @@ -195,7 +195,7 @@ resolve(); }); frame.contentWindow.postMessage( - {username: username, password: password, cookie: cookie}, + {username: username, password: password, cookie: cookie, cookieCrossSite: cookie_cross_site}, origin, [channel.port2]); })); }); @@ -204,10 +204,10 @@ function login(test, local, remote) { var suffix = (local.indexOf("https") != -1) ? "s": ""; return test_login(test, local, 'username1' + suffix, 'password1' + suffix, - 'cookie1') + 'cookie1', false /* cookie_cross_site */) .then(function() { return test_login(test, remote, 'username2' + suffix, - 'password2' + suffix, 'cookie2'); + 'password2' + suffix, 'cookie2', true /* cookie_cross_site */); }); }
diff --git a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt index 75c4cd4f..92aaa0b 100644 --- a/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt +++ b/third_party/blink/web_tests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -3712,7 +3712,6 @@ getter onpushsubscriptionchange getter onsync getter registration - method fetch method gc method skipWaiting setter cookieStore
diff --git a/third_party/blink/web_tests/http/tests/xmlhttprequest/cross-origin-cookie-storage.html b/third_party/blink/web_tests/http/tests/xmlhttprequest/cross-origin-cookie-storage.html index 9a7093a..2c0d293 100644 --- a/third_party/blink/web_tests/http/tests/xmlhttprequest/cross-origin-cookie-storage.html +++ b/third_party/blink/web_tests/http/tests/xmlhttprequest/cross-origin-cookie-storage.html
@@ -16,7 +16,7 @@ function resourceURL(resourceName) { - return "http://localhost:8000/xmlhttprequest/resources/" + resourceName; + return "https://localhost:8443/xmlhttprequest/resources/" + resourceName; } function clearCookies()
diff --git a/third_party/blink/web_tests/http/tests/xmlhttprequest/resources/cross-origin-set-cookies.php b/third_party/blink/web_tests/http/tests/xmlhttprequest/resources/cross-origin-set-cookies.php index cc38f4f..6a5fb7d 100644 --- a/third_party/blink/web_tests/http/tests/xmlhttprequest/resources/cross-origin-set-cookies.php +++ b/third_party/blink/web_tests/http/tests/xmlhttprequest/resources/cross-origin-set-cookies.php
@@ -1,9 +1,10 @@ <?php $age_string = ""; if ($_GET['clear']) { - $age_string = "expires=Thu, 19 Mar 1982 11:22:11 GMT"; + $age_string = "; expires=Thu, 19 Mar 1982 11:22:11 GMT"; } -header("Set-Cookie: WK-xhr-cookie-storage=MySpecialValue;$age_string"); +header("Set-Cookie: WK-xhr-cookie-storage=MySpecialValue" . $age_string . + "; SameSite=None; Secure"); header("Cache-Control: no-store"); header("Last-Modified: Thu, 19 Mar 2009 11:22:11 GMT"); header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
diff --git a/third_party/blink/web_tests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.js b/third_party/blink/web_tests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.js index d87c6c9..8375b30 100644 --- a/third_party/blink/web_tests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.js +++ b/third_party/blink/web_tests/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs.js
@@ -22,6 +22,7 @@ <div id="emoji">🌱🌲🌳🌴🌵🌷🌸🌹🌺🌻🌼💐🌾🌿🍀🍁🍂🍃🍄🌰</div> <div id="egyptian_hieroglyphs">𓀀𓀁𓀂𓀃𓀄𓀅𓀆𓀇𓀈𓀉𓀊𓀋𓀌𓀍𓀎𓀏</div> <div lang="km" id="khmer">ខ្ញុំអាចញុំកញ្ចក់បាន ដោយគ្មានបញ្ហារ</div> + <div id="text_presentation_arrows">⇦⇧⇨⇩</div> </div> </body> </html>
diff --git a/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png index 54e2e162..4509f81 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png index 22104a8c7..1df3bf1 100644 --- a/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png +++ b/third_party/blink/web_tests/platform/linux/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt b/third_party/blink/web_tests/platform/linux/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt index ad02f25..bd266eb2 100644 --- a/third_party/blink/web_tests/platform/linux/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt +++ b/third_party/blink/web_tests/platform/linux/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt
@@ -36,4 +36,8 @@ "Noto Sans Khmer" : 26, "Tinos" : 1 +⇦⇧⇨⇩ +#text_presentation_arrows: +"DejaVu Sans" : 4 +
diff --git a/third_party/blink/web_tests/platform/linux/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/linux/media/video-layer-crash-expected.png index 17b73d0..25098b6 100644 --- a/third_party/blink/web_tests/platform/linux/media/video-layer-crash-expected.png +++ b/third_party/blink/web_tests/platform/linux/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/linux/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..25098b6 --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png index 1ae39c5..55d61e1 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-anchor-point-expected.png index 54e2e162..4509f81 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-anchor-point-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-animated-expected.png index 22104a8c7..1df3bf1 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-animated-expected.png +++ b/third_party/blink/web_tests/platform/linux/virtual/disable-blink-gen-property-trees/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png new file mode 100644 index 0000000..c8c60ee --- /dev/null +++ b/third_party/blink/web_tests/platform/linux/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.10/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac-mac10.10/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..dac906f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.10/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.11/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..dac906f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.11/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-mac10.12/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..dac906f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-mac10.12/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac-retina/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac-retina/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..dac906f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac-retina/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png index 3e9b4da..093a659 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png index c3a44c3..6cd228bd 100644 --- a/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png +++ b/third_party/blink/web_tests/platform/mac/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt b/third_party/blink/web_tests/platform/mac/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt index 800d14d..f08432d 100644 --- a/third_party/blink/web_tests/platform/mac/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt +++ b/third_party/blink/web_tests/platform/mac/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt
@@ -36,4 +36,8 @@ "Khmer MN" : 26, "Times" : 1 +⇦⇧⇨⇩ +#text_presentation_arrows: +"Hiragino Mincho ProN" : 4 +
diff --git a/third_party/blink/web_tests/platform/mac/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac/media/video-layer-crash-expected.png index cf3ec775..dac906f 100644 --- a/third_party/blink/web_tests/platform/mac/media/video-layer-crash-expected.png +++ b/third_party/blink/web_tests/platform/mac/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/mac/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..dac906f --- /dev/null +++ b/third_party/blink/web_tests/platform/mac/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png index f032a01..6f4d26a 100644 --- a/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-animated-expected.png b/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-animated-expected.png index d30199a..17e1196 100644 --- a/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-animated-expected.png +++ b/third_party/blink/web_tests/platform/win/compositing/reflections/nested-reflection-animated-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/images/color-profile-layer-filter-expected.png b/third_party/blink/web_tests/platform/win/images/color-profile-layer-filter-expected.png deleted file mode 100644 index aa0ab37..0000000 --- a/third_party/blink/web_tests/platform/win/images/color-profile-layer-filter-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt b/third_party/blink/web_tests/platform/win/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt index 447c28c..3c7a75f 100644 --- a/third_party/blink/web_tests/platform/win/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt +++ b/third_party/blink/web_tests/platform/win/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt
@@ -35,4 +35,8 @@ "Leelawadee UI" : 26, "Times New Roman" : 1 +⇦⇧⇨⇩ +#text_presentation_arrows: +"Cambria Math" : 4 +
diff --git a/third_party/blink/web_tests/platform/win/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/win/media/video-layer-crash-expected.png index f51e113..a991cf96 100644 --- a/third_party/blink/web_tests/platform/win/media/video-layer-crash-expected.png +++ b/third_party/blink/web_tests/platform/win/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/win/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..a991cf96 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png index 7f401133..c8c60ee 100644 --- a/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png +++ b/third_party/blink/web_tests/platform/win/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt b/third_party/blink/web_tests/platform/win7/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt index 8ab5956..307f217 100644 --- a/third_party/blink/web_tests/platform/win7/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt +++ b/third_party/blink/web_tests/platform/win7/inspector-protocol/layout-fonts/languages-emoji-rare-glyphs-expected.txt
@@ -36,4 +36,8 @@ "Khmer UI" : 26, "Times New Roman" : 1 +⇦⇧⇨⇩ +#text_presentation_arrows: +"Cambria Math" : 4 +
diff --git a/third_party/blink/web_tests/platform/win7/virtual/audio-service/media/video-layer-crash-expected.png b/third_party/blink/web_tests/platform/win7/virtual/audio-service/media/video-layer-crash-expected.png new file mode 100644 index 0000000..a991cf96 --- /dev/null +++ b/third_party/blink/web_tests/platform/win7/virtual/audio-service/media/video-layer-crash-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win7/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png b/third_party/blink/web_tests/platform/win7/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png new file mode 100644 index 0000000..c8c60ee --- /dev/null +++ b/third_party/blink/web_tests/platform/win7/virtual/exotic-color-space/images/color-profile-layer-filter-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/svg/animations/animVal-basics-expected.txt b/third_party/blink/web_tests/svg/animations/animVal-basics-expected.txt deleted file mode 100644 index e62a2c8b9..0000000 --- a/third_party/blink/web_tests/svg/animations/animVal-basics-expected.txt +++ /dev/null
@@ -1,18 +0,0 @@ -SVG 1.1 dynamic animation tests - -Trivial animVal testcase, to see wheter we support it at all. Should result in a 200x200 rect and only PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rect.width.animVal.value is 200 -PASS rect.width.baseVal.value is 200 -PASS rect.width.animVal.value is 150 -PASS rect.width.baseVal.value is 200 -PASS rect.width.animVal.value is 100 -PASS rect.width.baseVal.value is 200 -PASS rect.width.animVal.value is 200 -PASS rect.width.baseVal.value is 200 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animVal-basics.html b/third_party/blink/web_tests/svg/animations/animVal-basics.html deleted file mode 100644 index d6b28ad..0000000 --- a/third_party/blink/web_tests/svg/animations/animVal-basics.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animVal-basics.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto-expected.txt b/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto-expected.txt deleted file mode 100644 index 288a338..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -SVG 1.1 dynamic animation tests - -Animate SVGMarkerElement orientAttr from an angle to auto - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 90 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 90 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto.html b/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto.html deleted file mode 100644 index 5798bc5..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-angle-to-auto.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-marker-orient-from-angle-to-auto.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse-expected.txt b/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse-expected.txt deleted file mode 100644 index 80a437f8..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -SVG 1.1 dynamic animation tests - -Animate SVGMarkerElement orientAttr from auto to auto-start-reverse - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_AUTO -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html b/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html deleted file mode 100644 index cbb7596..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-from-auto-to-auto-start-reverse.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-marker-orient-from-auto-to-auto-start-reverse.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle-expected.txt b/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle-expected.txt deleted file mode 100644 index 2813a45..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle-expected.txt +++ /dev/null
@@ -1,26 +0,0 @@ -SVG 1.1 dynamic animation tests - -Animate SVGMarkerElement orientAttr to an angle - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS marker.orientAngle.animVal.value is 0 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 90 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 180 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientAngle.animVal.value is 180 -PASS marker.orientAngle.baseVal.value is 0 -PASS marker.orientType.animVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS marker.orientType.baseVal is SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle.html b/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle.html deleted file mode 100644 index 3c5b39b..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-marker-orient-to-angle.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-marker-orient-to-angle.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-expected.txt b/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-expected.txt deleted file mode 100644 index 762c8d71d..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-expected.txt +++ /dev/null
@@ -1,20 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rect.x.animVal.value is 100 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 100 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 0 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 0 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 100 -PASS rect.x.baseVal.value is 100 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt b/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt deleted file mode 100644 index ce2cfd2..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes-expected.txt +++ /dev/null
@@ -1,20 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rect.x.animVal.value is 100 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 100 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 200 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 200 -PASS rect.x.baseVal.value is 100 -PASS rect.x.animVal.value is 300 -PASS rect.x.baseVal.value is 100 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes.html b/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes.html deleted file mode 100644 index 9ff2aa09e..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete-keyTimes.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-number-calcMode-discrete-keyTimes.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete.html b/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete.html deleted file mode 100644 index 0c90f25..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-number-calcMode-discrete.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-number-calcMode-discrete.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss-expected.txt deleted file mode 100644 index 74cdf5b..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z" -PASS path.getAttribute('d') is "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z" -PASS path.getAttribute('d') is "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z" -PASS path.getAttribute('d') is "M -20 -20 c 0.00999832 39.99 0.00999832 39.99 40 40 s 39.99 0.00499916 -0.00999832 -39.99 Z" -PASS path.getAttribute('d') is "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss.html deleted file mode 100644 index ccbc5e9..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Cc-Ss.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-Cc-Ss.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt deleted file mode 100644 index 0d7510af..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -30 -30 L 30 0 V 30 H 0 Z" -PASS path.getAttribute('d') is "M -15 -15 L 15 0 V 15 H 0 Z" -PASS path.getAttribute('d') is "M 15 15 l -30 -15 v -15 h 15 Z" -PASS path.getAttribute('d') is "M 29.985 29.985 l -59.97 -29.985 v -29.985 h 29.985 Z" -PASS path.getAttribute('d') is "M -30 -30 L 30 0 V 30 H 0 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh.html deleted file mode 100644 index 62aaf24..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Ll-Vv-Hh.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-Ll-Vv-Hh.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z-expected.txt deleted file mode 100644 index 202eb45..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100" -PASS path.getAttribute('d') is "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95" -PASS path.getAttribute('d') is "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35" -PASS path.getAttribute('d') is "m -70.0025 30.0025 a 159.997 169.997 59.9925 1 1 60.005 40.005 m 119.98 69.9725 a 179.997 189.997 119.993 1 1 100.04 149.998 Z m 120.035 -59.975" -PASS path.getAttribute('d') is "M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z.html deleted file mode 100644 index c3803ff..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Mm-Aa-Z.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-Mm-Aa-Z.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt-expected.txt deleted file mode 100644 index ce4be9c..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -30 -30 Q 30 -30 30 0 T -30 30 Z" -PASS path.getAttribute('d') is "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z" -PASS path.getAttribute('d') is "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z" -PASS path.getAttribute('d') is "M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z" -PASS path.getAttribute('d') is "M -30 -30 Q 30 -30 30 0 T -30 30 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt.html deleted file mode 100644 index a59604e..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-Qq-Tt.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-Qq-Tt.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse-expected.txt deleted file mode 100644 index 1655bd81..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z" -PASS path.getAttribute('d') is "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z" -PASS path.getAttribute('d') is "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z" -PASS path.getAttribute('d') is "M -20 -20 C 19.99 -19.99 19.99 -19.99 20 20 S 20.01 39.995 -19.99 19.99 Z" -PASS path.getAttribute('d') is "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse.html deleted file mode 100644 index 40e3f6e..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-cC-sS-inverse.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-cC-sS-inverse.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt deleted file mode 100644 index ca337639..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M 30 30 l -60 -30 v -30 h 30 Z" -PASS path.getAttribute('d') is "M 15 15 l -30 -15 v -15 h 15 Z" -PASS path.getAttribute('d') is "M -15 -15 L 15 0 V 15 H 0 Z" -PASS path.getAttribute('d') is "M -29.985 -29.985 L 29.985 0 V 29.985 H 0 Z" -PASS path.getAttribute('d') is "M 30 30 l -60 -30 v -30 h 30 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse.html deleted file mode 100644 index a6128982..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-lL-vV-hH-inverse.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-lL-vV-hH-inverse.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse-expected.txt deleted file mode 100644 index 04a4fc15..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "m -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60" -PASS path.getAttribute('d') is "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35" -PASS path.getAttribute('d') is "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95" -PASS path.getAttribute('d') is "M -79.9975 39.9975 A 150.003 160.003 30.0075 1 1 -0.00249481 99.9925 M 40.0175 60.02 A 170.003 180.003 90.0075 1 1 299.977 200.022 Z M 299.982 99.995" -PASS path.getAttribute('d') is "m -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse.html deleted file mode 100644 index 78c1886..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-mM-aA-Z-inverse.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-mM-aA-Z-inverse.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse-expected.txt deleted file mode 100644 index c432f1b33..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test path animation where coordinate modes of start and end differ. You should see PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M -30 -30 q 30 0 30 30 t -30 30 Z" -PASS path.getAttribute('d') is "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z" -PASS path.getAttribute('d') is "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z" -PASS path.getAttribute('d') is "M -30 -30 Q 29.9925 -30 29.9925 0 T -30 30 Z" -PASS path.getAttribute('d') is "M -30 -30 q 30 0 30 30 t -30 30 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse.html b/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse.html deleted file mode 100644 index 07af6b7..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-animation-qQ-tT-inverse.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-animation-qQ-tT-inverse.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-to-animation-expected.txt b/third_party/blink/web_tests/svg/animations/animate-path-to-animation-expected.txt deleted file mode 100644 index 10cde3b..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-to-animation-expected.txt +++ /dev/null
@@ -1,14 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test calcMode spline with to animation. You should see a green 100x100 path and only PASS messages - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS path.getAttribute('d') is "M 40 40 L 60 40 L 60 60 L 40 60 Z" -PASS path.getAttribute('d') is "M 20 20 L 80 20 L 80 80 L 20 80 Z" -PASS path.getAttribute('d') is "M 0.00999928 0.00999928 L 99.99 0.00999928 L 99.99 99.99 L 0.00999928 99.99 Z" -PASS path.getAttribute('d') is "M 40 40 L 60 40 L 60 60 L 40 60 Z" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animate-path-to-animation.html b/third_party/blink/web_tests/svg/animations/animate-path-to-animation.html deleted file mode 100644 index c89365a..0000000 --- a/third_party/blink/web_tests/svg/animations/animate-path-to-animation.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animate-path-to-animation.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze-expected.txt b/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze-expected.txt deleted file mode 100644 index 39078fe..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze-expected.txt +++ /dev/null
@@ -1,14 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test for animation freeze when repeatDur is not a multiple of dur - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().x is 50 -PASS rootSVGElement.getBBox().x is 100 -PASS rootSVGElement.getBBox().x is 100 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze.html b/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze.html deleted file mode 100644 index 3ecbfcd..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-fill-freeze.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animateMotion-fill-freeze.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove-expected.txt b/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove-expected.txt deleted file mode 100644 index 1d54422..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove-expected.txt +++ /dev/null
@@ -1,14 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test for animation freeze when repeatDur is not a multiple of dur - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().x is 50 -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().x is 0 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove.html b/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove.html deleted file mode 100644 index a7876548..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-fill-remove.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animateMotion-fill-remove.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-multiple-expected.txt b/third_party/blink/web_tests/svg/animations/animateMotion-multiple-expected.txt deleted file mode 100644 index 92d3124..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-multiple-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test for checking position of the svg element when multiple animateMotion are acting on it - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rootSVGElement.getBBox().x is 20 -PASS rootSVGElement.getBBox().x is 20 -PASS rootSVGElement.getBBox().x is 40 -PASS rootSVGElement.getBBox().x is 60 -PASS rootSVGElement.getBBox().x is 20 -PASS rootSVGElement.getBBox().x is 20 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-multiple.html b/third_party/blink/web_tests/svg/animations/animateMotion-multiple.html deleted file mode 100644 index f652685..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-multiple.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animateMotion-multiple.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-still-expected.txt b/third_party/blink/web_tests/svg/animations/animateMotion-still-expected.txt deleted file mode 100644 index 802fafe..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-still-expected.txt +++ /dev/null
@@ -1,15 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test animations that only express an offset - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rootSVGElement.getBBox().x is 100 -PASS rootSVGElement.getBBox().x is 200 -PASS rootSVGElement.getBBox().x is 200 -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().x is 0 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animateMotion-still.html b/third_party/blink/web_tests/svg/animations/animateMotion-still.html deleted file mode 100644 index 2211993d..0000000 --- a/third_party/blink/web_tests/svg/animations/animateMotion-still.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animateMotion-still.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform-expected.txt b/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform-expected.txt deleted file mode 100644 index d49c08a..0000000 --- a/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform-expected.txt +++ /dev/null
@@ -1,26 +0,0 @@ -SVG 1.1 dynamic animation tests - -Tests animation of 'patternTransform'. Should result in a 100x100 rect and only PASS messages. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS pattern.patternTransform.animVal.numberOfItems is 0 -PASS pattern.patternTransform.baseVal.numberOfItems is 0 -PASS pattern.patternTransform.animVal.numberOfItems is 1 -PASS pattern.patternTransform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_SCALE -PASS pattern.patternTransform.animVal.getItem(0).matrix.a is 1 -PASS pattern.patternTransform.baseVal.numberOfItems is 0 -PASS pattern.patternTransform.animVal.numberOfItems is 1 -PASS pattern.patternTransform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_SCALE -PASS pattern.patternTransform.animVal.getItem(0).matrix.a is 1.5 -PASS pattern.patternTransform.baseVal.numberOfItems is 0 -PASS pattern.patternTransform.animVal.numberOfItems is 1 -PASS pattern.patternTransform.animVal.getItem(0).type is SVGTransform.SVG_TRANSFORM_SCALE -PASS pattern.patternTransform.animVal.getItem(0).matrix.a is 2 -PASS pattern.patternTransform.baseVal.numberOfItems is 0 -PASS pattern.patternTransform.animVal.numberOfItems is 0 -PASS pattern.patternTransform.baseVal.numberOfItems is 0 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform.html b/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform.html deleted file mode 100644 index 105f90c..0000000 --- a/third_party/blink/web_tests/svg/animations/animateTransform-pattern-transform.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/animateTransform-pattern-transform.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/attributeTypes-expected.txt b/third_party/blink/web_tests/svg/animations/attributeTypes-expected.txt deleted file mode 100644 index eba25a27..0000000 --- a/third_party/blink/web_tests/svg/animations/attributeTypes-expected.txt +++ /dev/null
@@ -1,98 +0,0 @@ -SVG 1.1 dynamic animation tests - -This verifies several attributeTypes combiniations - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rect1.width.animVal.value is 10 -PASS rect1.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect2.width.animVal.value is 10 -PASS rect2.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.width.animVal.value is 100 -PASS rect3.width.baseVal.value is 100 -PASS colorComponents[1] is 255 -PASS colorComponents[2] is 0 -PASS colorComponents[3] is 0 -PASS rect3.getAttribute('fill') is "red" -PASS rect4.width.animVal.value is 100 -PASS rect4.width.baseVal.value is 100 -PASS colorComponents[1] is 255 -PASS colorComponents[2] is 0 -PASS colorComponents[3] is 0 -PASS rect4.getAttribute('fill') is "red" -PASS rect1.width.animVal.value is 55 -PASS rect1.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect2.width.animVal.value is 55 -PASS rect2.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.width.animVal.value is 100 -PASS rect3.width.baseVal.value is 100 -PASS colorComponents[1] is 128 -PASS colorComponents[2] is 64 -PASS colorComponents[3] is 0 -PASS rect3.getAttribute('fill') is "red" -PASS rect4.width.animVal.value is 100 -PASS rect4.width.baseVal.value is 100 -PASS colorComponents[1] is 128 -PASS colorComponents[2] is 64 -PASS colorComponents[3] is 0 -PASS rect4.getAttribute('fill') is "red" -PASS rect1.width.animVal.value is 100 -PASS rect1.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect2.width.animVal.value is 100 -PASS rect2.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.width.animVal.value is 100 -PASS rect3.width.baseVal.value is 100 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.getAttribute('fill') is "red" -PASS rect4.width.animVal.value is 100 -PASS rect4.width.baseVal.value is 100 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect4.getAttribute('fill') is "red" -PASS rect1.width.animVal.value is 100 -PASS rect1.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect2.width.animVal.value is 100 -PASS rect2.width.baseVal.value is 10 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.width.animVal.value is 100 -PASS rect3.width.baseVal.value is 100 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect3.getAttribute('fill') is "red" -PASS rect4.width.animVal.value is 100 -PASS rect4.width.baseVal.value is 100 -PASS colorComponents[1] is 0 -PASS colorComponents[2] is 128 -PASS colorComponents[3] is 0 -PASS rect4.getAttribute('fill') is "red" -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/attributeTypes.html b/third_party/blink/web_tests/svg/animations/attributeTypes.html deleted file mode 100644 index 1c9253f..0000000 --- a/third_party/blink/web_tests/svg/animations/attributeTypes.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/attributeTypes.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze-expected.txt b/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze-expected.txt deleted file mode 100644 index 960274a..0000000 --- a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -SVG 1.1 dynamic animation tests - -This tests scripting a CSS property while animation is running - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS parseFloat(getComputedStyle(rect).opacity) is 0 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.25 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.25 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.5 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.5 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.5 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze.html b/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze.html deleted file mode 100644 index 0d2541da..0000000 --- a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-freeze.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/change-css-property-while-animating-fill-freeze.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove-expected.txt b/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove-expected.txt deleted file mode 100644 index 328321c..0000000 --- a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove-expected.txt +++ /dev/null
@@ -1,16 +0,0 @@ -SVG 1.1 dynamic animation tests - -This tests scripting a CSS property while animation is running - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS parseFloat(getComputedStyle(rect).opacity) is 0 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.25 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.25 -PASS parseFloat(getComputedStyle(rect).opacity) is 0.5 -PASS parseFloat(getComputedStyle(rect).opacity) is 1 -PASS parseFloat(getComputedStyle(rect).opacity) is 1 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove.html b/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove.html deleted file mode 100644 index 77d247e..0000000 --- a/third_party/blink/web_tests/svg/animations/change-css-property-while-animating-fill-remove.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/change-css-property-while-animating-fill-remove.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property-expected.txt b/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property-expected.txt deleted file mode 100644 index 2933c9e..0000000 --- a/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -SVG 1.1 dynamic animation tests - -This changes the target of an animation while its running - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rect1.width.animVal.value is 150 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 150 -PASS rect2.width.baseVal.value is 150 -PASS rect1.width.animVal.value is 100 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 150 -PASS rect2.width.baseVal.value is 150 -PASS rect1.width.animVal.value is 150 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 100 -PASS rect2.width.baseVal.value is 150 -PASS rect1.width.animVal.value is 150 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 50 -PASS rect2.width.baseVal.value is 150 -PASS rect1.width.animVal.value is 150 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 50 -PASS rect2.width.baseVal.value is 150 -PASS rect1.width.animVal.value is 150 -PASS rect1.width.baseVal.value is 150 -PASS rect2.width.animVal.value is 50 -PASS rect2.width.baseVal.value is 150 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property.html b/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property.html deleted file mode 100644 index 2234fc1..0000000 --- a/third_party/blink/web_tests/svg/animations/change-target-while-animating-SVG-property.html +++ /dev/null
@@ -1,14 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/change-target-while-animating-SVG-property.js"></script> -</body> -</html>
diff --git a/third_party/blink/web_tests/svg/animations/cyclic-syncbase-expected.txt b/third_party/blink/web_tests/svg/animations/cyclic-syncbase-expected.txt deleted file mode 100644 index 5b8db99c..0000000 --- a/third_party/blink/web_tests/svg/animations/cyclic-syncbase-expected.txt +++ /dev/null
@@ -1,20 +0,0 @@ -SVG 1.1 dynamic animation tests - -Test cyclic for svg animations for syncbases - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS rootSVGElement.getBBox().x is 100 -PASS rootSVGElement.getBBox().y is 0 -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().y is 100 -PASS rootSVGElement.getBBox().x is 100 -PASS rootSVGElement.getBBox().y is 0 -PASS rootSVGElement.getBBox().x is 0 -PASS rootSVGElement.getBBox().y is 100 -PASS rootSVGElement.getBBox().x is 100 -PASS rootSVGElement.getBBox().y is 0 -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/svg/animations/cyclic-syncbase.html b/third_party/blink/web_tests/svg/animations/cyclic-syncbase.html deleted file mode 100644 index 0d73298..0000000 --- a/third_party/blink/web_tests/svg/animations/cyclic-syncbase.html +++ /dev/null
@@ -1,15 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> -<html> -<head> -<script src="../../resources/js-test.js"></script> -<script src="resources/SVGTestCase.js"></script> -<script src="resources/SVGAnimationTestCase.js"></script> -</head> -<body onload="runSMILTest()"> -<h1>SVG 1.1 dynamic animation tests</h1> -<p id="description"></p> -<div id="console"></div> -<script src="script-tests/cyclic-syncbase.js"></script> -</body> -</html> -
diff --git a/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-freeze.svg b/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-freeze.svg deleted file mode 100644 index 83612f5..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-freeze.svg +++ /dev/null
@@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <rect width="50" height="50" x="0" y="0" fill="green"> - <animateMotion id="anim" to="100,0" begin="0s" dur="4s" fill="freeze" /> - </rect> -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-remove.svg b/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-remove.svg deleted file mode 100644 index 61fb538..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/animateMotion-fill-remove.svg +++ /dev/null
@@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <rect width="50" height="50" x="0" y="0" fill="green"> - <animateMotion id="anim" to="100,0" begin="0s" dur="4s" fill="remove" /> - </rect> -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/animateMotion-multiple.svg b/third_party/blink/web_tests/svg/animations/resources/animateMotion-multiple.svg deleted file mode 100644 index 5d22294..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/animateMotion-multiple.svg +++ /dev/null
@@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <rect width="50" height="50" x="0" y="0" fill="green"> - <animateMotion id="anim" values="20,0" begin="0s"/> - <animateMotion values="40,0;80,0" begin="2s" dur="4s"/> - </rect> -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/animateMotion-still.svg b/third_party/blink/web_tests/svg/animations/resources/animateMotion-still.svg deleted file mode 100644 index 3199f07..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/animateMotion-still.svg +++ /dev/null
@@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <rect width="50" height="50" x="0" y="0" fill="green"> - <animateMotion id="anim" path="M 100 100 L 100 100" - begin="0s" dur="2s" repeatCount="2" accumulate="sum" fill="remove" /> - </rect> -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/attributeTypes.svg b/third_party/blink/web_tests/svg/animations/resources/attributeTypes.svg deleted file mode 100644 index eb558cd3..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/attributeTypes.svg +++ /dev/null
@@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - -<!-- 'width' is a XML attribute, attributeType is set to "auto": this animation runs. --> -<rect width="10" height="100" fill="green"> - <animate id="an1" attributeType="auto" attributeName="width" fill="freeze" from="10" to="100" begin="0s" dur="4s"/> -</rect> - -<!-- 'width' is a XML attribute, attributeType is set to "CSS". 'width' is not a presentation attribute, so this animation won't run. --> -<rect x="150" width="10" height="100" fill="green"> - <animate id="an2" attributeType="CSS" attributeName="width" fill="freeze" from="10" to="100" begin="0s" dur="4s"/> -</rect> - -<!-- 'fill' is a presentation attribute, mapped to CSS, attributeType is set to "auto": this animation runs. --> -<rect y="150" width="100" height="100" fill="red"> - <animate id="an3" attributeType="auto" attributeName="fill" fill="freeze" from="red" to="green" begin="0s" dur="4s"/> -</rect> - -<!-- 'fill' is a presentation attribute, mapped to CSS, attributeType is set to "XML": this animation runs. --> -<rect x="150" y="150" width="100" height="100" fill="red"> - <animate id="an4" attributeType="XML" attributeName="fill" fill="freeze" from="red" to="green" begin="0s" dur="4s"/> -</rect> - -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-freeze.svg b/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-freeze.svg deleted file mode 100644 index 364b1c3..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-freeze.svg +++ /dev/null
@@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - -<!-- an1: Change opacity from 0 to 0.5 in 4s, a script at 2s will set the opacity CSS property to 1, fill is freeze so this won't have any visible effect, nor any effect to the computed style --> -<rect opacity="0" width="100" height="100" fill="green"> - <animate id="an1" attributeType="CSS" attributeName="opacity" fill="freeze" from="0" to="0.5" begin="0s" dur="4s"/> -</rect> - -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-remove.svg b/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-remove.svg deleted file mode 100644 index 078f71a7..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/change-css-property-while-animating-fill-remove.svg +++ /dev/null
@@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - -<!-- an1: Change opacity from 0 to 0.5 in 4s, a script at 2s will set the opacity CSS property to 1, fill is not freeze, so after the animation ends the opacity should be 1, not 0 --> -<rect opacity="0" width="100" height="100" fill="green"> - <animate id="an1" attributeType="CSS" attributeName="opacity" fill="remove" from="0" to="0.5" begin="0s" dur="4s"/> -</rect> - -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/change-target-while-animating-SVG-property.svg b/third_party/blink/web_tests/svg/animations/resources/change-target-while-animating-SVG-property.svg deleted file mode 100644 index 60b2d80..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/change-target-while-animating-SVG-property.svg +++ /dev/null
@@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - -<rect id="target1" width="150" height="100" fill="green"/> -<rect id="target2" y="150" width="150" height="100" fill="green"/> - -<!-- an1: Change width by -100 in 4s on target1. The embedder script will change the target to 'target2' at 2s. --> -<!-- target1 should be 100px at 2s and remain this way. target2 should be 50px and remain this way. --> -<animate id="an1" xlink:href="#target1" attributeType="XML" attributeName="width" fill="freeze" by="-100" begin="0s" dur="4s"/> - -</svg>
diff --git a/third_party/blink/web_tests/svg/animations/resources/cyclic-syncbase.svg b/third_party/blink/web_tests/svg/animations/resources/cyclic-syncbase.svg deleted file mode 100644 index 6f8a03d1..0000000 --- a/third_party/blink/web_tests/svg/animations/resources/cyclic-syncbase.svg +++ /dev/null
@@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <animate id="anim" attributeName="visibility" to="visible" begin="0s" end="5s"/> - <rect x="0" y="0" width="50" height="50" fill="green"> - <set attributeName="x" to="100" id="anim1" begin="0; anim2.end" dur="1s"/> - <set attributeName="y" to="100" id="anim2" begin="anim1.end" dur="1s"/> - </rect> -</svg> -
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animVal-basics.js b/third_party/blink/web_tests/svg/animations/script-tests/animVal-basics.js deleted file mode 100644 index c5000ec..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animVal-basics.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Trivial animVal testcase, to see wheter we support it at all. Should result in a 200x200 rect and only PASS messages"); -createSVGTestCase(); - -// Setup test document -var rect = createSVGElement("rect"); -rect.setAttribute("id", "rect"); -rect.setAttribute("width", "200"); -rect.setAttribute("height", "200"); -rect.setAttribute("fill", "green"); -rect.setAttribute("onclick", "executeTest()"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "width"); -animate.setAttribute("from", "200"); -animate.setAttribute("to", "100"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -rect.appendChild(animate); -rootSVGElement.appendChild(rect); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeCloseEnough("rect.width.animVal.value", "200"); - shouldBe("rect.width.baseVal.value", "200"); -} - -function sample2() { - // Check half-time conditions - shouldBeCloseEnough("rect.width.animVal.value", "150"); - shouldBe("rect.width.baseVal.value", "200"); -} - -function sample3() { - // Check just before-end conditions - shouldBeCloseEnough("rect.width.animVal.value", "100"); - shouldBe("rect.width.baseVal.value", "200"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 2.0, sample2], - ["animation", 3.999, sample3], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-angle-to-auto.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-angle-to-auto.js deleted file mode 100644 index e4b91c30..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-angle-to-auto.js +++ /dev/null
@@ -1,85 +0,0 @@ -description("Animate SVGMarkerElement orientAttr from an angle to auto"); -createSVGTestCase(); - -// Setup test document - -var marker = createSVGElement("marker"); -marker.setAttribute("id", "marker"); -marker.setAttribute("viewBox", "0 0 10 10"); -marker.setAttribute("markerWidth", "2"); -marker.setAttribute("markerHeight", "2"); -marker.setAttribute("refX", "5"); -marker.setAttribute("refY", "5"); -marker.setAttribute("markerUnits", "strokeWidth"); - -var markerPath = createSVGElement("path"); -markerPath.setAttribute("fill", "blue"); -markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); -marker.appendChild(markerPath); - -var defsElement = createSVGElement("defs"); -defsElement.appendChild(marker); -rootSVGElement.appendChild(defsElement); - -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("fill", "none"); -path.setAttribute("stroke", "green"); -path.setAttribute("stroke-width", "10"); -path.setAttribute("marker-start", "url(#marker)"); -path.setAttribute("marker-end", "url(#marker)"); -path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); -path.setAttribute("transform", "translate(-130, -120)"); -rootSVGElement.appendChild(path); - -var animate1 = createSVGElement("animate"); -animate1.setAttribute("id", "animation"); -animate1.setAttribute("attributeName", "orient"); -animate1.setAttribute("begin", "path.click"); -animate1.setAttribute("dur", "4s"); -animate1.setAttribute("from", "90deg"); -animate1.setAttribute("to", "auto"); -animate1.setAttribute("fill", "freeze"); -marker.appendChild(animate1); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample2() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample3() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_AUTO"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 0.001, sample2], - ["animation", 1.999, sample2], - ["animation", 2.001, sample3], - ["animation", 3.999, sample3], - ["animation", 4.001, sample3] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-auto-to-auto-start-reverse.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-auto-to-auto-start-reverse.js deleted file mode 100644 index 58b3670..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-from-auto-to-auto-start-reverse.js +++ /dev/null
@@ -1,85 +0,0 @@ -description("Animate SVGMarkerElement orientAttr from auto to auto-start-reverse"); -createSVGTestCase(); - -// Setup test document - -var marker = createSVGElement("marker"); -marker.setAttribute("id", "marker"); -marker.setAttribute("viewBox", "0 0 10 10"); -marker.setAttribute("markerWidth", "2"); -marker.setAttribute("markerHeight", "2"); -marker.setAttribute("refX", "5"); -marker.setAttribute("refY", "5"); -marker.setAttribute("markerUnits", "strokeWidth"); - -var markerPath = createSVGElement("path"); -markerPath.setAttribute("fill", "blue"); -markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); -marker.appendChild(markerPath); - -var defsElement = createSVGElement("defs"); -defsElement.appendChild(marker); -rootSVGElement.appendChild(defsElement); - -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("fill", "none"); -path.setAttribute("stroke", "green"); -path.setAttribute("stroke-width", "10"); -path.setAttribute("marker-start", "url(#marker)"); -path.setAttribute("marker-end", "url(#marker)"); -path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); -path.setAttribute("transform", "translate(-130, -120)"); -rootSVGElement.appendChild(path); - -var animate1 = createSVGElement("animate"); -animate1.setAttribute("id", "animation"); -animate1.setAttribute("attributeName", "orient"); -animate1.setAttribute("begin", "path.click"); -animate1.setAttribute("dur", "4s"); -animate1.setAttribute("from", "auto"); -animate1.setAttribute("to", "auto-start-reverse"); -animate1.setAttribute("fill", "freeze"); -marker.appendChild(animate1); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample2() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_AUTO"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample3() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_UNKNOWN"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 0.001, sample2], - ["animation", 1.999, sample2], - ["animation", 2.001, sample3], - ["animation", 3.999, sample3], - ["animation", 4.001, sample3] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-to-angle.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-to-angle.js deleted file mode 100644 index 68b3cc4..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-marker-orient-to-angle.js +++ /dev/null
@@ -1,82 +0,0 @@ -description("Animate SVGMarkerElement orientAttr to an angle"); -createSVGTestCase(); - -// Setup test document - -var marker = createSVGElement("marker"); -marker.setAttribute("id", "marker"); -marker.setAttribute("viewBox", "0 0 10 10"); -marker.setAttribute("markerWidth", "2"); -marker.setAttribute("markerHeight", "2"); -marker.setAttribute("refX", "5"); -marker.setAttribute("refY", "5"); -marker.setAttribute("markerUnits", "strokeWidth"); - -var markerPath = createSVGElement("path"); -markerPath.setAttribute("fill", "blue"); -markerPath.setAttribute("d", "M 5 0 L 10 10 L 0 10 Z"); -marker.appendChild(markerPath); - -var defsElement = createSVGElement("defs"); -defsElement.appendChild(marker); -rootSVGElement.appendChild(defsElement); - -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("fill", "none"); -path.setAttribute("stroke", "green"); -path.setAttribute("stroke-width", "10"); -path.setAttribute("marker-start", "url(#marker)"); -path.setAttribute("marker-end", "url(#marker)"); -path.setAttribute("d", "M 130 135 L 180 135 L 180 185"); -path.setAttribute("transform", "translate(-130, -120)"); -rootSVGElement.appendChild(path); - -var animate1 = createSVGElement("animate"); -animate1.setAttribute("id", "animation"); -animate1.setAttribute("attributeName", "orient"); -animate1.setAttribute("begin", "path.click"); -animate1.setAttribute("dur", "4s"); -animate1.setAttribute("to", "180deg"); -animate1.setAttribute("fill", "freeze"); -marker.appendChild(animate1); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "0"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample2() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "90"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function sample3() { - shouldBeCloseEnough("marker.orientAngle.animVal.value", "180"); - shouldBe("marker.orientAngle.baseVal.value", "0"); - - shouldBe("marker.orientType.animVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); - shouldBe("marker.orientType.baseVal", "SVGMarkerElement.SVG_MARKER_ORIENT_ANGLE"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 2.0, sample2], - ["animation", 3.999, sample3], - ["animation", 4.001, sample3] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js deleted file mode 100644 index 198915a..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete-keyTimes.js +++ /dev/null
@@ -1,55 +0,0 @@ -description("Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages"); -createSVGTestCase(); - -// Setup test document -var rect = createSVGElement("rect"); -rect.setAttribute("id", "rect"); -rect.setAttribute("x", "100"); -rect.setAttribute("width", "100"); -rect.setAttribute("height", "100"); -rect.setAttribute("fill", "green"); -rect.setAttribute("onclick", "executeTest()"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "x"); -animate.setAttribute("values", "100;200;300"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "3s"); -animate.setAttribute("keyTimes", "0;0.5;1"); -animate.setAttribute("calcMode", "discrete"); -animate.setAttribute("fill", "freeze"); -rect.appendChild(animate); -rootSVGElement.appendChild(rect); - -// Setup animation test -function sample1() { - shouldBe("rect.x.animVal.value", "100"); - shouldBe("rect.x.baseVal.value", "100"); -} - -function sample2() { - shouldBe("rect.x.animVal.value", "200"); - shouldBe("rect.x.baseVal.value", "100"); -} - -function sample3() { - shouldBe("rect.x.animVal.value", "300"); - shouldBe("rect.x.baseVal.value", "100"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.499, sample1], - ["animation", 1.501, sample2], - ["animation", 2.999, sample2], - ["animation", 3.001, sample3] - ]; - - runAnimationTest(expectedValues); -} - -window.clickX = 150; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete.js deleted file mode 100644 index 7a0ca36e..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-number-calcMode-discrete.js +++ /dev/null
@@ -1,50 +0,0 @@ -description("Test calcMode discrete with from-to animation on numbers. You should see a green 100x100 rect and only PASS messages"); -createSVGTestCase(); - -// Setup test document -var rect = createSVGElement("rect"); -rect.setAttribute("id", "rect"); -rect.setAttribute("x", "100"); -rect.setAttribute("width", "100"); -rect.setAttribute("height", "100"); -rect.setAttribute("fill", "green"); -rect.setAttribute("onclick", "executeTest()"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "x"); -animate.setAttribute("from", "100"); -animate.setAttribute("to", "0"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -animate.setAttribute("calcMode", "discrete"); -rect.appendChild(animate); -rootSVGElement.appendChild(rect); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBe("rect.x.animVal.value", "100"); - shouldBe("rect.x.baseVal.value", "100"); -} - -function sample2() { - shouldBe("rect.x.animVal.value", "0"); - shouldBe("rect.x.baseVal.value", "100"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.999, sample1], - ["animation", 2.001, sample2], - ["animation", 3.999, sample2], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -window.clickX = 150; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Cc-Ss.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Cc-Ss.js deleted file mode 100644 index e4f3594..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Cc-Ss.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); -animate.setAttribute("to", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 c 0.00999832 39.99 0.00999832 39.99 40 40 s 39.99 0.00499916 -0.00999832 -39.99 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js deleted file mode 100644 index c68e4cd..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Ll-Vv-Hh.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M -30 -30 L 30 0 V 30 H 0 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M -30 -30 L 30 0 V 30 H 0 Z"); -animate.setAttribute("to", "M 30 30 l -60 -30 v -30 h 30 Z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 L 30 0 V 30 H 0 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -15 -15 L 15 0 V 15 H 0 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M 15 15 l -30 -15 v -15 h 15 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M 29.985 29.985 l -59.97 -29.985 v -29.985 h 29.985 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Mm-Aa-Z.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Mm-Aa-Z.js deleted file mode 100644 index e353416..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Mm-Aa-Z.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); -animate.setAttribute("to", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "m -70.0025 30.0025 a 159.997 169.997 59.9925 1 1 60.005 40.005 m 119.98 69.9725 a 179.997 189.997 119.993 1 1 100.04 149.998 Z m 120.035 -59.975"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js deleted file mode 100644 index 268f9ce9c..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-Qq-Tt.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); -animate.setAttribute("to", "M -30 -30 q 30 0 30 30 t -30 30 z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js deleted file mode 100644 index 75c6e71..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-cC-sS-inverse.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); -animate.setAttribute("to", "M -20 -20 C 20 -20 20 -20 20 20 S 20 40 -20 20 Z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 c 0 40 0 40 40 40 s 40 0 0 -40 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 c 10 30 10 30 40 40 s 30 5 -10 -30 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 C 10 -10 10 -10 20 20 S 30 35 -10 10 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -20 -20 C 19.99 -19.99 19.99 -19.99 20 20 S 20.01 39.995 -19.99 19.99 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js deleted file mode 100644 index 02b5e35..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-lL-vV-hH-inverse.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M 30 30 l -60 -30 v -30 h 30 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M 30 30 l -60 -30 v -30 h 30 Z"); -animate.setAttribute("to", "M -30 -30 L 30 0 V 30 H 0 Z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M 30 30 l -60 -30 v -30 h 30 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M 15 15 l -30 -15 v -15 h 15 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -15 -15 L 15 0 V 15 H 0 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -29.985 -29.985 L 29.985 0 V 29.985 H 0 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-mM-aA-Z-inverse.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-mM-aA-Z-inverse.js deleted file mode 100644 index 0a94a77..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-mM-aA-Z-inverse.js +++ /dev/null
@@ -1,53 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", 'm -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60'); -animate.setAttribute("to", 'M -80 40 A 150 160 30 1 1 0 100 M 40 60 A 170 180 90 1 1 300 200 Z M 300 100'); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "m -70 30 a 160 170 60 1 1 60 40 m 120 70 a 180 190 120 1 1 100 150 Z m 120 -60"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -79.9975 39.9975 A 150.003 160.003 30.0075 1 1 -0.00249481 99.9925 M 40.0175 60.02 A 170.003 180.003 90.0075 1 1 299.977 200.022 Z M 299.982 99.995"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js deleted file mode 100644 index 8b3f9b4..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-animation-qQ-tT-inverse.js +++ /dev/null
@@ -1,55 +0,0 @@ -description("Test path animation where coordinate modes of start and end differ. You should see PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M -30 -30 q 30 0 30 30 t -30 30 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); -path.setAttribute("transform", "translate(50, 50)"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("from", "M -30 -30 q 30 0 30 30 t -30 30 Z"); -animate.setAttribute("to", "M -30 -30 Q 30 -30 30 0 T -30 30 Z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 30 0 30 30 t -30 30 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z"); -} - -function sample4() { - shouldBeEqualToString("path.getAttribute('d')", "M -30 -30 Q 29.9925 -30 29.9925 0 T -30 30 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 1.0, sample2], - ["animation", 3.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -window.clickX = 40; -window.clickY = 70; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-to-animation.js b/third_party/blink/web_tests/svg/animations/script-tests/animate-path-to-animation.js deleted file mode 100644 index 235cecb0..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animate-path-to-animation.js +++ /dev/null
@@ -1,46 +0,0 @@ -description("Test calcMode spline with to animation. You should see a green 100x100 path and only PASS messages"); -createSVGTestCase(); - -// Setup test document -var path = createSVGElement("path"); -path.setAttribute("id", "path"); -path.setAttribute("d", "M 40 40 L 60 40 L 60 60 L 40 60 Z"); -path.setAttribute("fill", "green"); -path.setAttribute("onclick", "executeTest()"); - -var animate = createSVGElement("animate"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "d"); -animate.setAttribute("to", "M 0 0 L 100 0 L 100 100 L 0 100 z"); -animate.setAttribute("begin", "click"); -animate.setAttribute("dur", "4s"); -path.appendChild(animate); -rootSVGElement.appendChild(path); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBeEqualToString("path.getAttribute('d')", "M 40 40 L 60 40 L 60 60 L 40 60 Z"); -} - -function sample2() { - shouldBeEqualToString("path.getAttribute('d')", "M 20 20 L 80 20 L 80 80 L 20 80 Z"); -} - -function sample3() { - shouldBeEqualToString("path.getAttribute('d')", "M 0.00999928 0.00999928 L 99.99 0.00999928 L 99.99 99.99 L 0.00999928 99.99 Z"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 2.0, sample2], - ["animation", 3.999, sample3], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-freeze.js b/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-freeze.js deleted file mode 100644 index 98c40847..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-freeze.js +++ /dev/null
@@ -1,37 +0,0 @@ -description("Test for animation freeze when repeatDur is not a multiple of dur"); -embedSVGTestCase("resources/animateMotion-fill-freeze.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function sample2() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "50"); -} - -function sample3() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "100"); -} - -function sample4() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "100"); -} - -function executeTest() { - var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["anim", 0.0, sample1], - ["anim", 2.0, sample2], - ["anim", 4.0, sample3], - ["anim", 6.0, sample4] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-remove.js b/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-remove.js deleted file mode 100644 index d9ef991..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-fill-remove.js +++ /dev/null
@@ -1,37 +0,0 @@ -description("Test for animation freeze when repeatDur is not a multiple of dur"); -embedSVGTestCase("resources/animateMotion-fill-remove.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function sample2() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "50"); -} - -function sample3() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function sample4() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function executeTest() { - var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["anim", 0.0, sample1], - ["anim", 2.0, sample2], - ["anim", 4.0, sample3], - ["anim", 6.0, sample4] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-multiple.js b/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-multiple.js deleted file mode 100644 index 1b239e5..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-multiple.js +++ /dev/null
@@ -1,47 +0,0 @@ -description("Test for checking position of the svg element when multiple animateMotion are acting on it"); -embedSVGTestCase("resources/animateMotion-multiple.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); -} - -function sample2() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); -} - -function sample3() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "40"); -} - -function sample4() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "60"); -} - -function sample5() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); -} - -function sample6() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "20"); -} - -function executeTest() { - var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["anim", 0.0, sample1], - ["anim", 1.0, sample2], - ["anim", 2.0, sample3], - ["anim", 4.0, sample4], - ["anim", 6.0, sample5], - ["anim", 7.0, sample6] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-still.js b/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-still.js deleted file mode 100644 index c7bbc50..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animateMotion-still.js +++ /dev/null
@@ -1,42 +0,0 @@ -description("Test animations that only express an offset"); -embedSVGTestCase("resources/animateMotion-still.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "100"); -} - -function sample2() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "200"); -} - -function sample3() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "200"); -} - -function sample4() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function sample5() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); -} - -function executeTest() { - var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["anim", 1.0, sample1], - ["anim", 2.0, sample2], - ["anim", 3.0, sample3], - ["anim", 4.0, sample4], - ["anim", 5.0, sample5] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/animateTransform-pattern-transform.js b/third_party/blink/web_tests/svg/animations/script-tests/animateTransform-pattern-transform.js deleted file mode 100644 index c275d5a..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/animateTransform-pattern-transform.js +++ /dev/null
@@ -1,87 +0,0 @@ -description("Tests animation of 'patternTransform'. Should result in a 100x100 rect and only PASS messages."); -createSVGTestCase(); - -// Setup test document - -var defs = createSVGElement("defs"); -rootSVGElement.appendChild(defs); - -var pattern = createSVGElement("pattern"); -pattern.setAttribute("id", "pattern"); -pattern.setAttribute("width", "200"); -pattern.setAttribute("height", "200"); - -var rect = createSVGElement("rect"); -rect.setAttribute("id", "rect"); -rect.setAttribute("width", "200"); -rect.setAttribute("height", "200"); -rect.setAttribute("fill", "url(#pattern)"); -rect.setAttribute("onclick", "executeTest()"); - -var patternRect = createSVGElement("rect"); -patternRect.setAttribute("id", "patternRect"); -patternRect.setAttribute("width", "100"); -patternRect.setAttribute("height", "100"); -patternRect.setAttribute("fill", "green"); -pattern.appendChild(patternRect); - -var animate = createSVGElement("animateTransform"); -animate.setAttribute("id", "animation"); -animate.setAttribute("attributeName", "patternTransform"); -animate.setAttribute("type", "scale"); -animate.setAttribute("from", "1"); -animate.setAttribute("to", "2"); -animate.setAttribute("begin", "rect.click"); -animate.setAttribute("dur", "4s"); -pattern.appendChild(animate); -defs.appendChild(pattern); - -rootSVGElement.appendChild(rect); - -// Setup animation test -function sample1() { - // Check initial/end conditions - shouldBe("pattern.patternTransform.animVal.numberOfItems", "0"); - shouldBe("pattern.patternTransform.baseVal.numberOfItems", "0"); -} - -function sample2() { - shouldBe("pattern.patternTransform.animVal.numberOfItems", "1"); - shouldBe("pattern.patternTransform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE"); - shouldBeCloseEnough("pattern.patternTransform.animVal.getItem(0).matrix.a", "1"); - - shouldBe("pattern.patternTransform.baseVal.numberOfItems", "0"); -} - -function sample3() { - // Check half-time conditions - shouldBe("pattern.patternTransform.animVal.numberOfItems", "1"); - shouldBe("pattern.patternTransform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE"); - shouldBeCloseEnough("pattern.patternTransform.animVal.getItem(0).matrix.a", "1.5"); - - shouldBe("pattern.patternTransform.baseVal.numberOfItems", "0"); -} - -function sample4() { - // Check half-time conditions - shouldBe("pattern.patternTransform.animVal.numberOfItems", "1"); - shouldBe("pattern.patternTransform.animVal.getItem(0).type", "SVGTransform.SVG_TRANSFORM_SCALE"); - shouldBeCloseEnough("pattern.patternTransform.animVal.getItem(0).matrix.a", "2"); - - shouldBe("pattern.patternTransform.baseVal.numberOfItems", "0"); -} - -function executeTest() { - const expectedValues = [ - // [animationId, time, sampleCallback] - ["animation", 0.0, sample1], - ["animation", 0.001, sample2], - ["animation", 2.0, sample3], - ["animation", 3.999, sample4], - ["animation", 4.001, sample1] - ]; - - runAnimationTest(expectedValues); -} - -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/attributeTypes.js b/third_party/blink/web_tests/svg/animations/script-tests/attributeTypes.js deleted file mode 100644 index 4c857e9..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/attributeTypes.js +++ /dev/null
@@ -1,85 +0,0 @@ -description("This verifies several attributeTypes combiniations"); -embedSVGTestCase("resources/attributeTypes.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rect1.width.animVal.value", "10"); - shouldBe("rect1.width.baseVal.value", "10"); - expectFillColor(rect1, 0, 128, 0); - - shouldBe("rect2.width.animVal.value", "10"); - shouldBe("rect2.width.baseVal.value", "10"); - expectFillColor(rect2, 0, 128, 0); - - shouldBe("rect3.width.animVal.value", "100"); - shouldBe("rect3.width.baseVal.value", "100"); - expectFillColor(rect3, 255, 0, 0); - shouldBeEqualToString("rect3.getAttribute('fill')", "red"); - - shouldBe("rect4.width.animVal.value", "100"); - shouldBe("rect4.width.baseVal.value", "100"); - expectFillColor(rect4, 255, 0, 0); - shouldBeEqualToString("rect4.getAttribute('fill')", "red"); -} - -function sample2() { - shouldBeCloseEnough("rect1.width.animVal.value", "55"); - shouldBe("rect1.width.baseVal.value", "10"); - expectFillColor(rect1, 0, 128, 0); - - shouldBe("rect2.width.animVal.value", "55"); - shouldBe("rect2.width.baseVal.value", "10"); - expectFillColor(rect2, 0, 128, 0); - - shouldBe("rect3.width.animVal.value", "100"); - shouldBe("rect3.width.baseVal.value", "100"); - expectFillColor(rect3, 128, 64, 0); - shouldBeEqualToString("rect3.getAttribute('fill')", "red"); - - shouldBe("rect4.width.animVal.value", "100"); - shouldBe("rect4.width.baseVal.value", "100"); - expectFillColor(rect4, 128, 64, 0); - shouldBeEqualToString("rect4.getAttribute('fill')", "red"); -} - -function sample3() { - shouldBeCloseEnough("rect1.width.animVal.value", "100"); - shouldBe("rect1.width.baseVal.value", "10"); - expectFillColor(rect1, 0, 128, 0); - - shouldBe("rect2.width.animVal.value", "100"); - shouldBe("rect2.width.baseVal.value", "10"); - expectFillColor(rect2, 0, 128, 0); - - shouldBe("rect3.width.animVal.value", "100"); - shouldBe("rect3.width.baseVal.value", "100"); - expectFillColor(rect3, 0, 128, 0); - shouldBeEqualToString("rect3.getAttribute('fill')", "red"); - - shouldBe("rect4.width.animVal.value", "100"); - shouldBe("rect4.width.baseVal.value", "100"); - expectFillColor(rect4, 0, 128, 0); - shouldBeEqualToString("rect4.getAttribute('fill')", "red"); -} - -function executeTest() { - rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - rect2 = rects[1]; - rect3 = rects[2]; - rect4 = rects[3]; - - // All animations in the test file use the same duration, so it's not needed to list all sample points individually for an5/an6/an7/an8. - const expectedValues = [ - // [animationId, time, sampleCallback] - ["an1", 0.0, sample1], - ["an1", 2.0, sample2], - ["an1", 4.0, sample3], - ["an1", 60.0, sample3], - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-freeze.js b/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-freeze.js deleted file mode 100644 index b04fa75..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-freeze.js +++ /dev/null
@@ -1,43 +0,0 @@ -description("This tests scripting a CSS property while animation is running"); -embedSVGTestCase("resources/change-css-property-while-animating-fill-freeze.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0"); -} - -function sample2() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25"); - rect.setAttribute("opacity", "1"); -} - -function sample3() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25"); -} - -function sample4() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5"); -} - -function sample5() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5"); -} - -function executeTest() { - rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["an1", 0.0, sample1], - ["an1", 2.0, sample2], - ["an1", 2.001, sample3], - ["an1", 3.999, sample4], - ["an1", 4.001, sample5], - ["an1", 60.0, sample5] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-remove.js b/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-remove.js deleted file mode 100644 index c226aa8d..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/change-css-property-while-animating-fill-remove.js +++ /dev/null
@@ -1,43 +0,0 @@ -description("This tests scripting a CSS property while animation is running"); -embedSVGTestCase("resources/change-css-property-while-animating-fill-remove.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0"); -} - -function sample2() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25"); - rect.setAttribute("opacity", "1"); -} - -function sample3() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.25"); -} - -function sample4() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "0.5"); -} - -function sample5() { - shouldBeCloseEnough("parseFloat(getComputedStyle(rect).opacity)", "1"); -} - -function executeTest() { - rect = rootSVGElement.ownerDocument.getElementsByTagName("rect")[0]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["an1", 0.0, sample1], - ["an1", 2.0, sample2], - ["an1", 2.001, sample3], - ["an1", 3.999, sample4], - ["an1", 4.001, sample5], - ["an1", 60.0, sample5] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/change-target-while-animating-SVG-property.js b/third_party/blink/web_tests/svg/animations/script-tests/change-target-while-animating-SVG-property.js deleted file mode 100644 index c32254a..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/change-target-while-animating-SVG-property.js +++ /dev/null
@@ -1,69 +0,0 @@ -description("This changes the target of an animation while its running"); -embedSVGTestCase("resources/change-target-while-animating-SVG-property.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rect1.width.animVal.value", "150"); - shouldBe("rect1.width.baseVal.value", "150"); - - shouldBeCloseEnough("rect2.width.animVal.value", "150"); - shouldBe("rect2.width.baseVal.value", "150"); -} - -function sample2() { - shouldBeCloseEnough("rect1.width.animVal.value", "100"); - shouldBe("rect1.width.baseVal.value", "150"); - - shouldBeCloseEnough("rect2.width.animVal.value", "150"); - shouldBe("rect2.width.baseVal.value", "150"); - - // Switch to new target while animation is running. - // The effect is that rect1 is now reset to the initial state, before any animation was applied to it. - // Compatible with FF. In Opera it only works when not driving the timeline using setCurrentTime. - rootSVGElement.ownerDocument.getElementById("an1").setAttributeNS(xlinkNS, "xlink:href", "#target2"); -} - -function sample3() { - shouldBeCloseEnough("rect1.width.animVal.value", "150"); - shouldBe("rect1.width.baseVal.value", "150"); - - shouldBeCloseEnough("rect2.width.animVal.value", "100"); - shouldBe("rect2.width.baseVal.value", "150"); -} - -function sample4() { - shouldBeCloseEnough("rect1.width.animVal.value", "150"); - shouldBe("rect1.width.baseVal.value", "150"); - - shouldBeCloseEnough("rect2.width.animVal.value", "50"); - shouldBe("rect2.width.baseVal.value", "150"); -} - -function sample5() { - shouldBe("rect1.width.animVal.value", "150"); - shouldBe("rect1.width.baseVal.value", "150"); - - shouldBe("rect2.width.animVal.value", "50"); - shouldBe("rect2.width.baseVal.value", "150"); -} - -function executeTest() { - var rects = rootSVGElement.ownerDocument.getElementsByTagName("rect"); - rect1 = rects[0]; - rect2 = rects[1]; - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["an1", 0.0, sample1], - ["an1", 2.0, sample2], - ["an1", 2.001, sample3], - ["an1", 3.999, sample4], - ["an1", 4.001, sample5], - ["an1", 60.0, sample5] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true;
diff --git a/third_party/blink/web_tests/svg/animations/script-tests/cyclic-syncbase.js b/third_party/blink/web_tests/svg/animations/script-tests/cyclic-syncbase.js deleted file mode 100644 index 978b016..0000000 --- a/third_party/blink/web_tests/svg/animations/script-tests/cyclic-syncbase.js +++ /dev/null
@@ -1,31 +0,0 @@ -description("Test cyclic for svg animations for syncbases"); -embedSVGTestCase("resources/cyclic-syncbase.svg"); - -// Setup animation test -function sample1() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "100"); - shouldBeCloseEnough("rootSVGElement.getBBox().y", "0"); -} - -function sample2() { - shouldBeCloseEnough("rootSVGElement.getBBox().x", "0"); - shouldBeCloseEnough("rootSVGElement.getBBox().y", "100"); -} - -function executeTest() { - - const expectedValues = [ - // [animationId, time, sampleCallback] - ["anim", 0.01, sample1], - ["anim", 1.01, sample2], - ["anim", 2.01, sample1], - ["anim", 3.01, sample2], - ["anim", 4.01, sample1] - ]; - - runAnimationTest(expectedValues); -} - -window.animationStartsImmediately = true; -var successfullyParsed = true; -
diff --git a/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/README.md b/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/README.md deleted file mode 100644 index 79fc235..0000000 --- a/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/README.md +++ /dev/null
@@ -1,3 +0,0 @@ -This test suite is for testing the CookiesWithoutSameSiteMustBeSecure feature, -which requires that cookies with SameSite=None also specify Secure, and rejects -any SameSite=None cookies that are not secure.
diff --git a/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/external/wpt/cookies/samesite-none-secure/README.txt b/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/external/wpt/cookies/samesite-none-secure/README.txt deleted file mode 100644 index 79fc235..0000000 --- a/third_party/blink/web_tests/virtual/cookies-without-samesite-must-be-secure/external/wpt/cookies/samesite-none-secure/README.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This test suite is for testing the CookiesWithoutSameSiteMustBeSecure feature, -which requires that cookies with SameSite=None also specify Secure, and rejects -any SameSite=None cookies that are not secure.
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/README.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/README.txt deleted file mode 100644 index b67b879..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/README.txt +++ /dev/null
@@ -1,2 +0,0 @@ -# This suite runs tests with --disable-blink-features=BlinkGenPropertyTrees -# --enable-threaded-compositing and --disable-composited-antialiasing.
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png deleted file mode 100644 index 95695bb..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/animations/rotate-transform-equivalent-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/README.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/README.txt deleted file mode 100644 index 902eb3c2..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/README.txt +++ /dev/null
@@ -1 +0,0 @@ -# This suite runs tests with --disable-blink-features=BlinkGenPropertyTrees
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png deleted file mode 100644 index 446aa85..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-scaled-child-with-border-radius-parent-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png deleted file mode 100644 index 5393c95..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/composited-translated-child-with-border-radius-parent-clip-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/fixed-body-background-positioned-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/fixed-body-background-positioned-expected.txt deleted file mode 100644 index a9d5368..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/fixed-body-background-positioned-expected.txt +++ /dev/null
@@ -1,68 +0,0 @@ -{ - "layers": [ - { - "name": "Root Transform Layer", - "drawsContent": false - }, - { - "name": "Inner Viewport Container Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Overscroll Elasticity Layer", - "drawsContent": false - }, - { - "name": "Page Scale Layer", - "drawsContent": false - }, - { - "name": "Inner Viewport Scroll Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 3700], - "backgroundColor": "#FFFFFF", - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [785, 0], - "bounds": [15, 600], - "contentsOpaque": true, - "drawsContent": false - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -200, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-expected.txt deleted file mode 100644 index 100aca1..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-expected.txt +++ /dev/null
@@ -1,84 +0,0 @@ -Test CSS clip with composited layers. Left and right sides should look the same. - -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box'", - "bounds": [110, 110], - "backgroundColor": "#808080", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [215, 15], - "bounds": [110, 110], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'", - "bounds": [120, 120], - "backgroundColor": "#00000033", - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [15, 15, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [210, 10, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 4, - "parent": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-inside-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-inside-expected.txt deleted file mode 100644 index 3566aba2..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-inside-expected.txt +++ /dev/null
@@ -1,85 +0,0 @@ -Test CSS clip with composited layers. Left and right sides should look the same. - -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box'", - "bounds": [90, 80], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [225, 35], - "bounds": [90, 80], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'", - "bounds": [120, 120], - "backgroundColor": "#00000033", - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [25, 35, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [210, 10, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 4, - "parent": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-with-shadow-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-with-shadow-expected.txt deleted file mode 100644 index 3a44c3e..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/clip-with-shadow-expected.txt +++ /dev/null
@@ -1,82 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box'", - "bounds": [110, 110], - "backgroundColor": "#808080", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [215, 15], - "bounds": [110, 110], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='composited inner'", - "bounds": [120, 120], - "backgroundColor": "#00000033", - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [15, 15, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [210, 10, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 4, - "parent": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/foreground-layer-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/foreground-layer-expected.txt deleted file mode 100644 index 2b54597..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/foreground-layer-expected.txt +++ /dev/null
@@ -1,125 +0,0 @@ - -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='main box'", - "bounds": [340, 340], - "backgroundColor": "#FF0000", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='negative child'", - "bounds": [50, 50], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='main box' (foreground) Layer", - "bounds": [340, 340], - "transform": 1 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='main box'", - "bounds": [340, 340], - "backgroundColor": "#FF0000", - "transform": 4 - }, - { - "name": "Child Containment Layer", - "position": [70, 70], - "bounds": [200, 200], - "drawsContent": false, - "transform": 4 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='negative child'", - "bounds": [50, 50], - "drawsContent": false, - "transform": 6 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='main box' (foreground) Layer", - "position": [70, 70], - "bounds": [200, 200], - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 78, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [70, 70, 0, 1] - ] - }, - { - "id": 3, - "parent": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - }, - { - "id": 4, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [352, 8, 0, 1] - ] - }, - { - "id": 5, - "parent": 4, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [70, 70, 0, 1] - ] - }, - { - "id": 6, - "parent": 5, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/layer-due-to-layer-children-expected.png deleted file mode 100644 index 59e62676..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/geometry/layer-due-to-layer-children-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/become-composited-nested-iframes-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/become-composited-nested-iframes-expected.txt deleted file mode 100644 index 2021656..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/become-composited-nested-iframes-expected.txt +++ /dev/null
@@ -1,128 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 1500], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame IFRAME", - "position": [20, 120], - "bounds": [284, 204] - }, - { - "name": "LayoutView #document", - "position": [22, 122], - "bounds": [280, 200] - }, - { - "name": "Child Containment Layer", - "position": [22, 122], - "bounds": [280, 200], - "drawsContent": false - }, - { - "name": "LayoutIFrame IFRAME", - "position": [30, 130], - "bounds": [252, 172] - }, - { - "name": "LayoutView #document", - "position": [31, 131], - "bounds": [250, 170], - "backgroundColor": "#C0C0C0" - }, - { - "name": "Child Containment Layer", - "position": [31, 131], - "bounds": [250, 170], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "LayoutIFrame IFRAME", - "position": [20, 344], - "bounds": [284, 204] - }, - { - "name": "LayoutView #document", - "position": [22, 346], - "bounds": [280, 200] - }, - { - "name": "Child Containment Layer", - "position": [22, 346], - "bounds": [280, 200], - "drawsContent": false - }, - { - "name": "LayoutIFrame IFRAME", - "position": [30, 354], - "bounds": [252, 172] - }, - { - "name": "LayoutView #document", - "position": [31, 355], - "bounds": [250, 170], - "backgroundColor": "#C0C0C0" - }, - { - "name": "Child Containment Layer", - "position": [31, 355], - "bounds": [250, 170], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutBlockFlow DIV id='box' class='composited'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [49, 141, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [49, 365, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/invisible-nested-iframe-show-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/invisible-nested-iframe-show-expected.txt deleted file mode 100644 index 7403391..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/invisible-nested-iframe-show-expected.txt +++ /dev/null
@@ -1,117 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame IFRAME", - "position": [-22, -22], - "bounds": [390, 240] - }, - { - "name": "LayoutView #document", - "position": [23, 23], - "bounds": [300, 150], - "drawsContent": false - }, - { - "name": "Scrolling Layer", - "position": [23, 23], - "bounds": [285, 150], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [23, 23], - "bounds": [285, 193] - }, - { - "name": "LayoutIFrame IFRAME", - "position": [31, 31], - "bounds": [252, 172] - }, - { - "name": "LayoutView #document", - "position": [32, 32], - "bounds": [250, 170], - "backgroundColor": "#C0C0C0" - }, - { - "name": "Child Containment Layer", - "position": [32, 32], - "bounds": [250, 170], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [23, 23], - "bounds": [300, 150], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [308, 23], - "bounds": [15, 150], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 3 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 42, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [18, 203, 0, 1] - ] - }, - { - "id": 3, - "parent": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-iframe-iframe-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-iframe-iframe-expected.txt deleted file mode 100644 index c3c1d6f8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-iframe-iframe-expected.txt +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame (positioned) IFRAME", - "bounds": [304, 304] - }, - { - "name": "LayoutView #document", - "position": [2, 2], - "bounds": [300, 300], - "backgroundColor": "#C0C0C0" - }, - { - "name": "Child Containment Layer", - "position": [2, 2], - "bounds": [300, 300], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 1 - }, - { - "name": "LayoutIFrame (positioned) IFRAME id='overlap'", - "position": [250, 0], - "bounds": [304, 304] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [20, 12, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-nested-iframes-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-nested-iframes-expected.txt deleted file mode 100644 index 368814d..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/iframes/overlapped-nested-iframes-expected.txt +++ /dev/null
@@ -1,154 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 1650], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "transform": 1 - }, - { - "name": "LayoutIFrame IFRAME", - "position": [20, 150], - "bounds": [284, 204], - "transform": 1 - }, - { - "name": "LayoutView #document", - "position": [22, 152], - "bounds": [280, 200], - "transform": 1 - }, - { - "name": "Child Containment Layer", - "position": [22, 152], - "bounds": [280, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutIFrame IFRAME", - "position": [30, 160], - "bounds": [252, 172], - "transform": 1 - }, - { - "name": "LayoutView #document", - "position": [31, 161], - "bounds": [250, 170], - "backgroundColor": "#C0C0C0", - "transform": 1 - }, - { - "name": "Child Containment Layer", - "position": [31, 161], - "bounds": [250, 170], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutIFrame IFRAME", - "position": [20, 374], - "bounds": [284, 204], - "transform": 1 - }, - { - "name": "LayoutView #document", - "position": [22, 376], - "bounds": [280, 200], - "transform": 1 - }, - { - "name": "Child Containment Layer", - "position": [22, 376], - "bounds": [280, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutIFrame IFRAME", - "position": [30, 384], - "bounds": [252, 172], - "transform": 1 - }, - { - "name": "LayoutView #document", - "position": [31, 385], - "bounds": [250, 170], - "backgroundColor": "#C0C0C0", - "transform": 1 - }, - { - "name": "Child Containment Layer", - "position": [31, 385], - "bounds": [250, 170], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow DIV id='iframe-content' class='box'", - "bounds": [210, 210], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='banner'", - "position": [0, 100], - "bounds": [785, 120], - "backgroundColor": "#00000080", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -100, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [49, 171, 0, 1] - ] - }, - { - "id": 3, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [49, 395, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overflow-scroll-overlap-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overflow-scroll-overlap-expected.txt deleted file mode 100644 index 0bc9060..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overflow-scroll-overlap-expected.txt +++ /dev/null
@@ -1,67 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='composited'", - "bounds": [30, 30], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV id='scroller' class='overflow')", - "position": [20, 20], - "bounds": [306, 206] - }, - { - "name": "Ancestor Clipping Layer", - "position": [23, 23], - "bounds": [285, 200], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box'", - "position": [43, 29], - "bounds": [200, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV class='box')", - "position": [43, 184], - "bounds": [210, 100] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-clipping-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-clipping-expected.txt deleted file mode 100644 index 1d920582..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-clipping-expected.txt +++ /dev/null
@@ -1,129 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 812], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='to-animate1' class='box animating1'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='container'", - "position": [58, 230], - "bounds": [122, 462], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Child Containment Layer", - "position": [59, 231], - "bounds": [120, 460], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box gray force-layer'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 4 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='to-animate2' class='box animating2'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 6 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box yellow'", - "position": [69, 571], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#FFFF00" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box yellow'", - "position": [18, 702], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#FFFF00" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 3, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 4, - "parent": 3, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 5, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 6, - "parent": 5, - "transform": [ - [...], - [...], - [...], - [...] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-expected.txt deleted file mode 100644 index 0f1c74b..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-animation-expected.txt +++ /dev/null
@@ -1,69 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='container'", - "position": [8, 8], - "bounds": [122, 242] - }, - { - "name": "Child Containment Layer", - "position": [9, 9], - "bounds": [120, 240], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='to-animate' class='animating box'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box'", - "position": [19, 129], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [...], - [...], - [...], - [...] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [...], - [...], - [...], - [...] - ], - "origin": [50, 50] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-clipping-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-clipping-expected.txt deleted file mode 100644 index f2c359c09..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-clipping-expected.txt +++ /dev/null
@@ -1,73 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [50, 50], - "bounds": [100, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='child'", - "bounds": [500, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='child'", - "bounds": [500, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV id='overlap')", - "position": [450, 200], - "bounds": [100, 100] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 200, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt deleted file mode 100644 index 7f07d31..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container clips'", - "bounds": [100, 100], - "transform": 1 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='under composited'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#FF0000", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='over')", - "bounds": [100, 100], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [110, 0, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transforms-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transforms-expected.txt deleted file mode 100644 index 6d2c9d99..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/overlap-transforms-expected.txt +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='container'", - "position": [8, 8], - "bounds": [122, 242] - }, - { - "name": "Child Containment Layer", - "position": [9, 9], - "bounds": [120, 240], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='transformed box'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [19, 19, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt deleted file mode 100644 index 623ad00..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-creation/squashing-into-ancestor-clipping-layer-change-expected.txt +++ /dev/null
@@ -1,52 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [100, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='composited'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#FA8072", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV id='squashed')", - "position": [8, 58], - "bounds": [100, 100] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 58, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-tree-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-tree-expected.txt deleted file mode 100644 index 18acd2b..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/layer-tree-expected.txt +++ /dev/null
@@ -1,146 +0,0 @@ -Layer tree: -{ - "name": "Root Transform Layer", - "drawsContent": false, - "children": [ - { - "name": "Inner Viewport Container Layer", - "bounds": [800, 600], - "drawsContent": false, - "children": [ - { - "name": "Overscroll Elasticity Layer", - "drawsContent": false, - "children": [ - { - "name": "Page Scale Layer", - "drawsContent": false, - "children": [ - { - "name": "Inner Viewport Scroll Layer", - "bounds": [800, 600], - "drawsContent": false, - "children": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF", - "shouldFlattenTransform": false, - "children": [ - { - "name": "Scrolling Layer", - "bounds": [780, 580], - "drawsContent": false, - "flattenInheritedTransform": false, - "shouldFlattenTransform": false, - "children": [ - { - "name": "Scrolling Contents Layer", - "bounds": [1200, 900], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "flattenInheritedTransform": false - } - ] - } - ] - } - ] - } - ] - } - ] - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [800, 600], - "drawsContent": false, - "children": [ - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 580], - "bounds": [780, 20] - }, - { - "name": "Vertical Scrollbar Layer", - "position": [780, 0], - "bounds": [20, 580] - }, - { - "name": "Scroll Corner Layer", - "position": [780, 580], - "bounds": [20, 20] - } - ] - } - ] - } - ] -} - -Layer list -{ - "layers": [ - { - "name": "Root Transform Layer", - "drawsContent": false - }, - { - "name": "Inner Viewport Container Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Overscroll Elasticity Layer", - "drawsContent": false - }, - { - "name": "Page Scale Layer", - "drawsContent": false - }, - { - "name": "Inner Viewport Scroll Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [780, 580], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1200, 900], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 580], - "bounds": [780, 20] - }, - { - "name": "Vertical Scrollbar Layer", - "position": [780, 0], - "bounds": [20, 580] - }, - { - "name": "Scroll Corner Layer", - "position": [780, 580], - "bounds": [20, 20] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-expected.png deleted file mode 100644 index 312bcf9..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-with-opacity-expected.png deleted file mode 100644 index a88d0274c..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/lots-of-img-layers-with-opacity-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/direct-image-mask-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/direct-image-mask-expected.png deleted file mode 100644 index 187bc849..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/direct-image-mask-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png deleted file mode 100644 index 0b86911..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-added-filters-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png deleted file mode 100644 index bf05d030..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/mask-with-removed-filters-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/masked-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/masked-ancestor-expected.png deleted file mode 100644 index 651e08a..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/masked-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/multiple-masks-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/multiple-masks-expected.png deleted file mode 100644 index 50633eb..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/multiple-masks-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/simple-composited-mask-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/simple-composited-mask-expected.png deleted file mode 100644 index a4ea481..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/masks/simple-composited-mask-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/opacity-with-mask-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/opacity-with-mask-expected.png deleted file mode 100644 index b39d0c8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/opacity-with-mask-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-above-composited-subframe-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-above-composited-subframe-expected.png deleted file mode 100644 index 6fc1bc4..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-above-composited-subframe-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-composited-subframe-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-composited-subframe-expected.png deleted file mode 100644 index 467f6527..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-composited-subframe-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png deleted file mode 100644 index f4b4fff8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-grandparent-composited-grandchild-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png deleted file mode 100644 index f380d7a..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-parent-composited-grandchild-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png deleted file mode 100644 index 61743f1..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-on-two-ancestors-composited-grandchild-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-outside-bounds-of-compositing-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-outside-bounds-of-compositing-ancestor-expected.png deleted file mode 100644 index 29a0c21..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-outside-bounds-of-compositing-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png deleted file mode 100644 index 0a96ecf..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/border-radius-styles-with-composited-child-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clear-scroll-parent-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clear-scroll-parent-expected.txt deleted file mode 100644 index 9b7a2ba..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clear-scroll-parent-expected.txt +++ /dev/null
@@ -1,93 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV class='container'", - "position": [8, 8], - "bounds": [308, 208], - "backgroundColor": "#00FF0080" - }, - { - "name": "Scrolling Layer", - "position": [12, 12], - "bounds": [285, 200], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [12, 12], - "bounds": [285, 530], - "backgroundColor": "#00FF0080" - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [308, 208], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [297, 12], - "bounds": [15, 185], - "drawsContent": false - }, - { - "name": "Scroll Corner Layer", - "position": [297, 197], - "bounds": [15, 15] - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='fixed'", - "position": [50, 200], - "bounds": [200, 200], - "contentsOpaque": true, - "backgroundColor": "#008000" - }, - { - "name": "Ancestor Clipping Layer", - "position": [12, 12], - "bounds": [80, 80], - "drawsContent": false, - "hasScrollParent": true - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box red'", - "position": [22, 22], - "bounds": [100, 100], - "backgroundColor": "#FF000080" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false, - "hasScrollParent": true - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='box'", - "position": [22, 102], - "bounds": [100, 100], - "backgroundColor": "#0000FF80" - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV class='box')", - "position": [22, 212], - "bounds": [100, 320] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clip-descendents-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clip-descendents-expected.txt deleted file mode 100644 index 048aec8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/clip-descendents-expected.txt +++ /dev/null
@@ -1,166 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [48, 38], - "bounds": [60, 70], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='box'", - "bounds": [100, 150], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [240, 38], - "bounds": [60, 70], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='box'", - "bounds": [100, 150], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 4 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "position": [48, 230], - "bounds": [60, 70] - }, - { - "name": "Child Containment Layer", - "position": [48, 230], - "bounds": [60, 70], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='box'", - "bounds": [100, 150], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 6 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "position": [240, 230], - "bounds": [60, 70] - }, - { - "name": "Child Containment Layer", - "position": [240, 230], - "bounds": [60, 70], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='box'", - "bounds": [100, 150], - "contentsOpaque": true, - "backgroundColor": "#808080", - "transform": 8 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [242, 50, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 4, - "parent": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 5, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 242, 0, 1] - ] - }, - { - "id": 6, - "parent": 5, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - }, - { - "id": 7, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [242, 242, 0, 1] - ] - }, - { - "id": 8, - "parent": 7, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 0, 1, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/composited-layer-under-border-radius-under-composited-layer-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/composited-layer-under-border-radius-under-composited-layer-expected.png deleted file mode 100644 index b13b78b..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/composited-layer-under-border-radius-under-composited-layer-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-gains-scrollbars-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-gains-scrollbars-expected.txt deleted file mode 100644 index 285f901d..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-gains-scrollbars-expected.txt +++ /dev/null
@@ -1,210 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 1 - }, - { - "name": "Scrolling Layer", - "bounds": [85, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [85, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='vertical' class='content tall'", - "bounds": [10, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Vertical Scrollbar Layer", - "position": [85, 0], - "bounds": [15, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 2 - }, - { - "name": "Scrolling Layer", - "bounds": [100, 85], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [200, 85], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='horizontal' class='content wide'", - "bounds": [200, 10], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 85], - "bounds": [100, 15], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 3 - }, - { - "name": "Scrolling Layer", - "bounds": [85, 85], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [200, 200], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='both' class='content wide tall'", - "bounds": [200, 200], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 85], - "bounds": [85, 15], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Vertical Scrollbar Layer", - "position": [85, 0], - "bounds": [15, 85], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Scroll Corner Layer", - "position": [85, 85], - "bounds": [15, 15], - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='corner' class='container resizeWidget'", - "bounds": [100, 100], - "transform": 4 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 4 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "Scroll Corner Layer", - "position": [85, 85], - "bounds": [15, 15], - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 4, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-loses-scrollbars-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-loses-scrollbars-expected.txt deleted file mode 100644 index 28e47b8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/content-loses-scrollbars-expected.txt +++ /dev/null
@@ -1,132 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='vertical' class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='horizontal' class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='both' class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='corner' class='container'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 4, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png deleted file mode 100644 index b219e48..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-composited-with-border-radius-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png deleted file mode 100644 index b219e48..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/grandchild-with-border-radius-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png deleted file mode 100644 index 6a16719..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-border-radius-clipping-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-render-surfaces-with-rotation-expected.png deleted file mode 100644 index 1600edb..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/nested-render-surfaces-with-rotation-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt deleted file mode 100644 index cc0d374d..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/no-excessive-clip-parent-if-parent-escaped-expected.txt +++ /dev/null
@@ -1,43 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "position": [8, 8], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#FF0000" - }, - { - "name": "Child Containment Layer", - "position": [8, 8], - "bounds": [100, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV", - "position": [8, 8], - "bounds": [50, 50], - "contentsOpaque": true, - "backgroundColor": "#008000", - "hasClipParent": true - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/overflow-scrollbar-layers-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/overflow-scrollbar-layers-expected.txt deleted file mode 100644 index f679344..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/overflow-scrollbar-layers-expected.txt +++ /dev/null
@@ -1,210 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 1 - }, - { - "name": "Scrolling Layer", - "bounds": [85, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [85, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content tall'", - "bounds": [10, 200], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Vertical Scrollbar Layer", - "position": [85, 0], - "bounds": [15, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 2 - }, - { - "name": "Scrolling Layer", - "bounds": [100, 85], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [200, 85], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content wide'", - "bounds": [200, 10], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 85], - "bounds": [100, 15], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [100, 100], - "transform": 3 - }, - { - "name": "Scrolling Layer", - "bounds": [85, 85], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Scrolling Contents Layer", - "bounds": [200, 200], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content wide tall'", - "bounds": [200, 200], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [0, 85], - "bounds": [85, 15], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Vertical Scrollbar Layer", - "position": [85, 0], - "bounds": [15, 85], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Scroll Corner Layer", - "position": [85, 85], - "bounds": [15, 15], - "transform": 3 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container resizeWidget'", - "bounds": [100, 100], - "transform": 4 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='content'", - "bounds": [10, 10], - "drawsContent": false, - "transform": 4 - }, - { - "name": "Overflow Controls Host Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 4 - }, - { - "name": "Scroll Corner Layer", - "position": [85, 85], - "bounds": [15, 15], - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - }, - { - "id": 4, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 13, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/relpos-under-abspos-border-radius-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/relpos-under-abspos-border-radius-expected.png deleted file mode 100644 index 2c58692..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/relpos-under-abspos-border-radius-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt deleted file mode 100644 index c8f192a..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/reparented-scrollbars-non-sc-anc-expected.txt +++ /dev/null
@@ -1,85 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1208, 821], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [1200, 800], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='positioned'", - "position": [8, 8], - "bounds": [1200, 800] - }, - { - "name": "Child Containment Layer", - "position": [8, 8], - "bounds": [1200, 800], - "drawsContent": false - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [1200, 1000], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='scroller'", - "position": [8, 8], - "bounds": [1200, 1000] - }, - { - "name": "Scrolling Layer", - "position": [8, 8], - "bounds": [1200, 1000], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [8, 8], - "bounds": [1200, 10000] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='foreground'", - "position": [8, 10008], - "contentsOpaque": true, - "drawsContent": false - }, - { - "name": "Overflow Controls Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [1200, 1000], - "drawsContent": false - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [1200, 1000], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [1201, 8], - "bounds": [7, 1000], - "drawsContent": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-clip-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-clip-expected.txt deleted file mode 100644 index 9801d91..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-clip-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [240, 240], - "transform": 2 - }, - { - "name": "Child Containment Layer", - "position": [20, 20], - "bounds": [200, 200], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow DIV", - "position": [20, 20], - "bounds": [400, 400], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 100, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [120, 120] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.png deleted file mode 100644 index 6576faa..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt deleted file mode 100644 index a390599f..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-effect-interleave-expected.txt +++ /dev/null
@@ -1,94 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [240, 240], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [240, 240], - "opacity": 0.899999976158142, - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [20, 20], - "bounds": [200, 200], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow DIV", - "position": [20, 20], - "bounds": [400, 400], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV", - "position": [20, 0], - "bounds": [400, 100], - "contentsOpaque": true, - "backgroundColor": "#00FFFF", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [20, 20], - "bounds": [200, 200], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV", - "position": [20, 20], - "bounds": [100, 400], - "contentsOpaque": true, - "backgroundColor": "#FF00FF", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 100, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [120, 120] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-expected.txt deleted file mode 100644 index fbb4681..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [240, 240], - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "position": [20, 20], - "bounds": [200, 200], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow DIV", - "position": [20, 20], - "bounds": [400, 400], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 100, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [120, 120] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png deleted file mode 100644 index 0edab25..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt deleted file mode 100644 index f97eb4f..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/rotate-then-clip-z-order-interleave-expected.txt +++ /dev/null
@@ -1,82 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [300, 100], - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV", - "bounds": [200, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV", - "bounds": [200, 22], - "contentsOpaque": true, - "backgroundColor": "#FFFF00", - "transform": 2 - }, - { - "name": "Ancestor Clipping Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV", - "bounds": [50, 200], - "contentsOpaque": true, - "backgroundColor": "#FF0000", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 100, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [150, 50] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt deleted file mode 100644 index 15c58a53..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scroll-parent-with-non-stacking-context-composited-ancestor-expected.txt +++ /dev/null
@@ -1,82 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV id='intervening'", - "position": [98, 90], - "bounds": [300, 300], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#FFEFD5" - }, - { - "name": "LayoutBlockFlow DIV id='scroller'", - "position": [98, 90], - "bounds": [102, 102] - }, - { - "name": "Scrolling Layer", - "position": [99, 91], - "bounds": [100, 100], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [99, 91], - "bounds": [100, 180], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='fixed'", - "position": [60, 60], - "bounds": [80, 80], - "contentsOpaque": true, - "backgroundColor": "#008000" - }, - { - "name": "Squashing Containment Layer", - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='scrolled'", - "position": [103, 95], - "bounds": [60, 40], - "contentsOpaque": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (relative positioned) DIV class='scrolled')", - "position": [103, 139], - "bounds": [60, 128] - }, - { - "name": "Overflow Controls Host Layer", - "position": [98, 90], - "bounds": [102, 102], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [192, 91], - "bounds": [7, 100], - "drawsContent": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-expected.txt deleted file mode 100644 index 224eee29..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-expected.txt +++ /dev/null
@@ -1,217 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer A'", - "bounds": [352, 294] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='scroller'", - "position": [32, 32], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [67, 67], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [67, 67], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Overflow Controls Host Layer", - "position": [62, 62], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [280, 67], - "bounds": [7, 160], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer B'", - "position": [349, 0], - "bounds": [352, 294] - }, - { - "name": "LayoutBlockFlow DIV class='scroller'", - "position": [381, 32], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [416, 67], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [416, 67], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='content'", - "position": [428, 79], - "bounds": [196, 212], - "contentsOpaque": true, - "backgroundColor": "#DDDDDD" - }, - { - "name": "Overflow Controls Host Layer", - "position": [411, 62], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [629, 67], - "bounds": [7, 160], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer C'", - "position": [0, 291], - "bounds": [352, 294] - }, - { - "name": "Ancestor Clipping Layer", - "position": [46, 337], - "bounds": [260, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='scroller'", - "position": [31, 322], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [66, 357], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [66, 357], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='content'", - "position": [78, 369], - "bounds": [196, 212], - "contentsOpaque": true, - "backgroundColor": "#DDDDDD" - }, - { - "name": "Overflow Controls Ancestor Clipping Layer", - "position": [46, 337], - "bounds": [260, 100], - "drawsContent": false - }, - { - "name": "Overflow Controls Host Layer", - "position": [61, 352], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [279, 357], - "bounds": [7, 160], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='outer D'", - "position": [349, 291], - "bounds": [352, 294] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='clipper'", - "position": [379, 321], - "bounds": [292, 200] - }, - { - "name": "Child Containment Layer", - "position": [389, 331], - "bounds": [272, 180], - "drawsContent": false - }, - { - "name": "Ancestor Clipping Layer", - "position": [395, 337], - "bounds": [260, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='scroller'", - "position": [380, 322], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [415, 357], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [415, 357], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='content'", - "position": [427, 369], - "bounds": [196, 212], - "contentsOpaque": true, - "backgroundColor": "#DDDDDD" - }, - { - "name": "Overflow Controls Ancestor Clipping Layer", - "position": [395, 337], - "bounds": [260, 100], - "drawsContent": false - }, - { - "name": "Overflow Controls Host Layer", - "position": [410, 352], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [628, 357], - "bounds": [7, 160], - "drawsContent": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.png deleted file mode 100644 index d3100be..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt deleted file mode 100644 index d6d5879..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/scrollbar-layer-placement-negative-z-index-child-expected.txt +++ /dev/null
@@ -1,67 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutNGBlockFlow (positioned) DIV class='outer'", - "bounds": [352, 294] - }, - { - "name": "LayoutNGBlockFlow (relative positioned) DIV class='content'", - "position": [79, 79], - "bounds": [196, 212], - "contentsOpaque": true, - "backgroundColor": "#DDDDDD" - }, - { - "name": "LayoutNGBlockFlow (positioned) DIV class='outer' (foreground) Layer", - "bounds": [352, 294] - }, - { - "name": "LayoutNGBlockFlow DIV class='scroller'", - "position": [32, 32], - "bounds": [290, 230], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "position": [67, 67], - "bounds": [220, 160], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [67, 67], - "bounds": [220, 236], - "backgroundColor": "#FFFFFF" - }, - { - "name": "Overflow Controls Host Layer", - "position": [62, 62], - "bounds": [230, 170], - "drawsContent": false - }, - { - "name": "Vertical Scrollbar Layer", - "position": [280, 67], - "bounds": [7, 160], - "drawsContent": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png deleted file mode 100644 index b219e48..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png deleted file mode 100644 index ef41de3..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-with-border-radius-ancestor-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-with-border-radius-ancestor-expected.png deleted file mode 100644 index fa893ed..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/siblings-with-border-radius-ancestor-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png deleted file mode 100644 index 49e4d2e8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/overflow/tiled-mask-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perpendicular-layer-sorting-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perpendicular-layer-sorting-expected.png deleted file mode 100644 index fa252db..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perpendicular-layer-sorting-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perspective-interest-rect-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perspective-interest-rect-expected.png deleted file mode 100644 index 6beffe78..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/perspective-interest-rect-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-absolute-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-absolute-expected.txt deleted file mode 100644 index 11a5e14..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-absolute-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame (positioned) IFRAME", - "bounds": [400, 400] - }, - { - "name": "LayoutView #document", - "bounds": [400, 400], - "backgroundColor": "#FF0000" - }, - { - "name": "Child Containment Layer", - "bounds": [400, 400], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='positioned layer'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-fixed-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-fixed-expected.txt deleted file mode 100644 index 11a5e14..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-fixed-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame (positioned) IFRAME", - "bounds": [400, 400] - }, - { - "name": "LayoutView #document", - "bounds": [400, 400], - "backgroundColor": "#FF0000" - }, - { - "name": "Child Containment Layer", - "bounds": [400, 400], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='positioned layer'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [50, 50, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-relative-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-relative-expected.txt deleted file mode 100644 index 7d4fc5b..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/rtl/rtl-iframe-relative-expected.txt +++ /dev/null
@@ -1,53 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame (positioned) IFRAME", - "bounds": [400, 400] - }, - { - "name": "LayoutView #document", - "bounds": [400, 400] - }, - { - "name": "Child Containment Layer", - "bounds": [400, 400], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='layer'", - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#008000", - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [242, 58, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.png deleted file mode 100644 index 219172d..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/scrollbars/nested-overlay-scrollbars-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/clipping-ancestor-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/clipping-ancestor-expected.txt deleted file mode 100644 index 7298b1c..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/clipping-ancestor-expected.txt +++ /dev/null
@@ -1,54 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [200, 10], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='inner'", - "bounds": [200, 10], - "contentsOpaque": true, - "backgroundColor": "#F5F5F5", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='hoverable'", - "position": [8, 0], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#90EE90" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt deleted file mode 100644 index 4a56b34..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-another-clip-layer-expected.txt +++ /dev/null
@@ -1,59 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV", - "bounds": [784, 10], - "contentsOpaque": true, - "backgroundColor": "#ADD8E6", - "transform": 1 - }, - { - "name": "Child Containment Layer", - "bounds": [784, 10], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow DIV id='inner'", - "bounds": [784, 10], - "contentsOpaque": true, - "backgroundColor": "#F5F5F5", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='hoverable'", - "position": [8, 0], - "bounds": [216, 100], - "backgroundColor": "#90EE90" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt deleted file mode 100644 index f13b579..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/squashing/no-squashing-into-fixed-position-that-clips-expected.txt +++ /dev/null
@@ -1,59 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='fixedpos'", - "position": [0, 50], - "bounds": [800, 550], - "contentsOpaque": true, - "backgroundColor": "#ADD8E6" - }, - { - "name": "Child Containment Layer", - "position": [0, 50], - "bounds": [800, 550], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='compositedlayer'", - "bounds": [24, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='notsquashedelement'", - "bounds": [800, 60], - "contentsOpaque": true, - "backgroundColor": "#008000" - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [400, 40, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/video/video-controls-squashing-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/video/video-controls-squashing-expected.png deleted file mode 100644 index c663e2dd..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/video/video-controls-squashing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/visibility/layer-visible-content-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/visibility/layer-visible-content-expected.txt deleted file mode 100644 index 0b05974b..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/compositing/visibility/layer-visible-content-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='container'", - "bounds": [200, 200] - }, - { - "name": "Child Containment Layer", - "bounds": [200, 200], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='composited box'", - "bounds": [10, 10], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow PRE id='layer-tree'", - "bounds": [800, 16], - "opacity": 0 - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/README.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/README.txt deleted file mode 100644 index 902eb3c2..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/README.txt +++ /dev/null
@@ -1 +0,0 @@ -# This suite runs tests with --disable-blink-features=BlinkGenPropertyTrees
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-path-constant-repaint-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-path-constant-repaint-expected.txt deleted file mode 100644 index 6409953..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/clip/clip-path-constant-repaint-expected.txt +++ /dev/null
@@ -1,63 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='clip'", - "bounds": [800, 300], - "backfaceVisibility": "hidden", - "backgroundColor": "#FF0000E6", - "maskLayer": [ - { - "name": "Mask Layer", - "bounds": [800, 300], - "paintInvalidations": [ - { - "object": "Mask Layer", - "rect": [0, 0, 800, 300], - "reason": "paint property change" - } - ] - } - ], - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, 100, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt deleted file mode 100644 index 690d34d..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants-expected.txt +++ /dev/null
@@ -1,100 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 616], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='clipping-container'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 1 - }, - { - "name": "LayoutBlockFlow DIV class='clipped-composited-child'", - "bounds": [252, 252], - "contentsOpaque": true, - "backgroundColor": "#FFFF00", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='clipping-container with-initial-clipping'", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "Child Containment Layer", - "bounds": [100, 100], - "drawsContent": false, - "transform": 3 - }, - { - "name": "LayoutBlockFlow DIV class='clipped-composited-child'", - "bounds": [252, 252], - "contentsOpaque": true, - "backgroundColor": "#FFFF00", - "transform": 4 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 108, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-100, -100, 0, 1] - ] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [108, 408, 0, 1] - ] - }, - { - "id": 4, - "parent": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-100, -100, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-expected.txt deleted file mode 100644 index 42a6d0d5..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-expected.txt +++ /dev/null
@@ -1,42 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk disappeared" - } - ] - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='container'", - "position": [200, 100], - "bounds": [125, 125], - "backgroundColor": "#0000FF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-individual-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-individual-expected.txt deleted file mode 100644 index 42a6d0d5..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-added-individual-expected.txt +++ /dev/null
@@ -1,42 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk disappeared" - } - ] - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='container'", - "position": [200, 100], - "bounds": [125, 125], - "backgroundColor": "#0000FF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk appeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-expected.txt deleted file mode 100644 index 781ddf2..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-expected.txt +++ /dev/null
@@ -1,43 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk appeared" - } - ] - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='container'", - "position": [200, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-individual-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-individual-expected.txt deleted file mode 100644 index e92ac21..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/containing-block-removed-individual-expected.txt +++ /dev/null
@@ -1,44 +0,0 @@ -CONSOLE MESSAGE: line 30: debug -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk appeared" - } - ] - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='container'", - "position": [200, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='fixed'", - "rect": [50, 50, 75, 75], - "reason": "chunk disappeared" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/overlap-test-with-filter-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/overlap-test-with-filter-expected.txt deleted file mode 100644 index 06f94a7..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/overlap-test-with-filter-expected.txt +++ /dev/null
@@ -1,69 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutIFrame IFRAME", - "bounds": [300, 100] - }, - { - "name": "LayoutView #document", - "bounds": [300, 100], - "backgroundColor": "#FFFF00" - }, - { - "name": "Child Containment Layer", - "bounds": [300, 100], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow BODY", - "bounds": [284, 84], - "backgroundColor": "#FFFF00", - "transform": 1 - }, - { - "name": "LayoutBlockFlow (positioned) DIV", - "bounds": [300, 100], - "contentsOpaque": true, - "backgroundColor": "#D3D3D3", - "transform": 2 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ] - }, - { - "id": 2, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [151, 0, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt deleted file mode 100644 index 15fb475..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content-expected.txt +++ /dev/null
@@ -1,59 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [185, 185], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV id='foo2'", - "bounds": [150, 1000], - "contentsOpaque": true, - "backgroundColor": "#ADD8E6", - "transform": 1 - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV id='foo')", - "position": [8, 8], - "bounds": [100, 1000], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='foo'", - "rect": [0, 0, 100, 1000], - "reason": "background" - } - ] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt deleted file mode 100644 index e24b05c..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/scrolling-neg-z-index-descendants-expected.txt +++ /dev/null
@@ -1,84 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow HTML", - "bounds": [800, 318] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='neg-z'", - "position": [9, -81], - "bounds": [100, 410] - }, - { - "name": "LayoutBlockFlow HTML (foreground) Layer", - "bounds": [800, 318] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container'", - "position": [8, 8], - "bounds": [102, 302], - "backfaceVisibility": "hidden" - }, - { - "name": "Scrolling Layer", - "position": [9, 9], - "bounds": [100, 300], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [9, 9], - "bounds": [100, 430], - "drawsContent": false, - "transform": 1 - }, - { - "name": "Overflow Controls Host Layer", - "position": [8, 8], - "bounds": [102, 302], - "drawsContent": false, - "backfaceVisibility": "hidden" - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [9, 309], - "bounds": [100, 0] - }, - { - "name": "Vertical Scrollbar Layer", - "position": [109, 9], - "bounds": [0, 300] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -100, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt deleted file mode 100644 index b479ab4..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-expected.txt +++ /dev/null
@@ -1,56 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='composited-box'", - "position": [38, 38], - "bounds": [20, 70], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='composited-box'", - "rect": [0, 0, 20, 70], - "reason": "full layer" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='composited-box'", - "rect": [0, 0, 10, 60], - "reason": "full layer" - } - ] - }, - { - "name": "Child Containment Layer", - "position": [38, 38], - "bounds": [90, 90], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='composited child'", - "position": [8, 58], - "bounds": [50, 50], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000" - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt deleted file mode 100644 index 06aafe1..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change-expected.txt +++ /dev/null
@@ -1,65 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow DIV class='composited-child'", - "bounds": [100, 100], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000" - }, - { - "name": "Ancestor Clipping Layer", - "position": [0, 200], - "bounds": [200, 200], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow DIV class='composited-child'", - "position": [0, 200], - "bounds": [100, 100], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='composited-child overflow-child'", - "position": [150, 150], - "bounds": [100, 100], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000" - }, - { - "name": "Ancestor Clipping Layer", - "position": [0, 200], - "bounds": [200, 200], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV class='composited-child overflow-child'", - "position": [150, 350], - "bounds": [100, 100], - "contentsOpaque": true, - "backfaceVisibility": "hidden", - "backgroundColor": "#008000" - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/subpixel-offset-scaled-transform-composited-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/subpixel-offset-scaled-transform-composited-expected.txt deleted file mode 100644 index b89515a..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/compositing/subpixel-offset-scaled-transform-composited-expected.txt +++ /dev/null
@@ -1,193 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container1' class='container scale'", - "contentsOpaque": true, - "drawsContent": false, - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='child1' class='child composited'", - "bounds": [1, 1], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 2 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='child2' class='child scale composited'", - "bounds": [1, 1], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 4 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container3' class='container scale composited'", - "bounds": [1, 1], - "contentsOpaque": true, - "transform": 6 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container4' class='container composited'", - "position": [9, 158], - "bounds": [40, 40], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (relative positioned) DIV id='container4' class='container composited'", - "rect": [0, 0, 40, 40], - "reason": "full layer" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='container4' class='container composited'", - "rect": [0, 0, 40, 40], - "reason": "full layer" - } - ] - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container5' class='container scale composited'", - "contentsOpaque": true, - "drawsContent": false, - "transform": 8 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='child5' class='child composited'", - "bounds": [1, 1], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 8 - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='container6' class='container composited'", - "position": [8, 258], - "contentsOpaque": true, - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (relative positioned) DIV id='child6' class='child scale composited'", - "bounds": [1, 1], - "contentsOpaque": true, - "backgroundColor": "#0000FF", - "transform": 10 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 8, 0, 1] - ] - }, - { - "id": 2, - "parent": 1, - "transform": [ - [40, 0, 0, 0], - [0, 40, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [0, 0] - }, - { - "id": 3, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [9, 58, 0, 1] - ] - }, - { - "id": 4, - "parent": 3, - "transform": [ - [40, 0, 0, 0], - [0, 40, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [0, 0] - }, - { - "id": 5, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 108, 0, 1] - ] - }, - { - "id": 6, - "parent": 5, - "transform": [ - [40, 0, 0, 0], - [0, 40, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [0, 0] - }, - { - "id": 7, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [8, 208, 0, 1] - ] - }, - { - "id": 8, - "parent": 7, - "transform": [ - [40, 0, 0, 0], - [0, 40, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [0, 0] - }, - { - "id": 9, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [9, 258, 0, 1] - ] - }, - { - "id": 10, - "parent": 9, - "transform": [ - [40, 0, 0, 0], - [0, 40, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "origin": [0, 0] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt deleted file mode 100644 index 350810f8..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/outline/inline-outline-repaint-2-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutInline SPAN", - "rect": [210, 0, 50, 15], - "reason": "outline" - }, - { - "object": "InlineTextBox 'Test'", - "rect": [215, 0, 40, 10], - "reason": "style change" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt deleted file mode 100644 index 0d552916..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/reflection/reflection-with-rotation-expected.txt +++ /dev/null
@@ -1,29 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "NGPhysicalTextFragment 'PASS'", - "rect": [23, 51, 71, 109], - "reason": "full" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt deleted file mode 100644 index d7a9f930..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/composited-iframe-scroll-repaint-expected.txt +++ /dev/null
@@ -1,96 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [784, 159], - "drawsContent": false - }, - { - "name": "LayoutIFrame IFRAME", - "position": [8, 8], - "bounds": [304, 154] - }, - { - "name": "LayoutView #document", - "position": [10, 10], - "bounds": [300, 150], - "drawsContent": false, - "backgroundColor": "#EEEEEE" - }, - { - "name": "Scrolling Layer", - "position": [10, 10], - "bounds": [300, 150], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "position": [10, 10], - "bounds": [300, 516], - "backgroundColor": "#EEEEEE", - "transform": 1 - }, - { - "name": "LayoutBlockFlow BODY", - "bounds": [284, 500], - "transform": 2 - }, - { - "name": "Overflow Controls Host Layer", - "position": [10, 10], - "bounds": [300, 150], - "drawsContent": false - }, - { - "name": "Horizontal Scrollbar Layer", - "position": [10, 160], - "bounds": [300, 0] - }, - { - "name": "Vertical Scrollbar Layer", - "position": [310, 10], - "bounds": [0, 150] - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -20, 0, 1] - ], - "flattenInheritedTransform": false - }, - { - "id": 2, - "parent": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [18, 18, 0, 1] - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-img-src-change-after-scroll-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-img-src-change-after-scroll-expected.txt deleted file mode 100644 index b2394186..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/fixed-img-src-change-after-scroll-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 2016], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "transform": 1 - }, - { - "name": "LayoutImage (positioned) IMG id='img'", - "position": [0, 1050], - "bounds": [100, 100], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [0, -1000, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt deleted file mode 100644 index 04c2902..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/repaint-composited-child-in-scrolled-container-expected.txt +++ /dev/null
@@ -1,61 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "HorizontalScrollbar", - "rect": [8, 293, 285, 15], - "reason": "scroll control" - } - ] - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [285, 285], - "drawsContent": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV id='container'", - "bounds": [600, 600], - "contentsOpaque": true, - "backgroundColor": "#FF0000", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inner'", - "rect": [0, 0, 600, 600], - "reason": "appeared" - } - ], - "transform": 1 - } - ], - "transforms": [ - { - "id": 1, - "transform": [ - [1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, 1, 0], - [-307, 8, 0, 1] - ], - "flattenInheritedTransform": false - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt deleted file mode 100644 index caab7be..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/scroll/sticky/invalidate-after-composited-scroll-with-sticky-expected.txt +++ /dev/null
@@ -1,40 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 656], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "VerticalScrollbar", - "rect": [353, 8, 15, 640], - "reason": "scroll control" - } - ] - }, - { - "name": "Ancestor Clipping Layer", - "position": [8, 8], - "bounds": [345, 640], - "drawsContent": false - }, - { - "name": "LayoutNGBlockFlow (sticky positioned) DIV id='sticky'", - "position": [8, 8], - "bounds": [345, 20] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt deleted file mode 100644 index fe48b0a..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/paint/invalidation/selection/invalidation-rect-includes-newline-for-vertical-lr-expected.txt +++ /dev/null
@@ -1,34 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "InlineTextBox 'xx'", - "rect": [7, 8, 34, 48], - "reason": "geometry" - }, - { - "object": "InlineTextBox 'y'", - "rect": [7, 8, 34, 48], - "reason": "geometry" - } - ] - } - ] -} -
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/README.txt b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/README.txt deleted file mode 100644 index ef8bdb24..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/README.txt +++ /dev/null
@@ -1,2 +0,0 @@ -# This suite runs tests with --disable-blink-features=BlinkGenPropertyTrees -# and --enable-threaded-compositing.
diff --git a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/opacity-transform-transitions-inside-iframe-expected.png b/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/opacity-transform-transitions-inside-iframe-expected.png deleted file mode 100644 index 0cc6e8a0..0000000 --- a/third_party/blink/web_tests/virtual/disable-blink-gen-property-trees/transitions/opacity-transform-transitions-inside-iframe-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html b/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html new file mode 100644 index 0000000..6e046efa --- /dev/null +++ b/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-17-expected.html
@@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html> +<head> +<style> + p { + forced-color-adjust: none; + text-decoration: underline; + text-decoration-color: WindowText; + -webkit-text-emphasis: '*' WindowText; + } +</style> +<body> + <p> + The text decoration and emphasis color for this text should have a + WindowText color in forced colors mode. + </p> +</body> +</html>
diff --git a/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html b/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html new file mode 100644 index 0000000..f2f7271 --- /dev/null +++ b/third_party/blink/web_tests/virtual/forced-colors/fast/css/forced-colors-mode/forced-colors-mode-18-expected.html
@@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> +<head> +<style> + svg, text, foreignObject { + forced-color-adjust: none; + } +</style> +<body> + <svg height="600" width="600"> + <text x="0" y="15" fill="WindowText"> + This text should have a WindowText fill and transparent stroke color in + forced colors mode. + </text> + <rect x="0" height="60" y="30" width="180" style="fill: red; stroke: blue;"/> + <foreignObject x="20" y="30" width="160" height="160"> + <div xmlns="http://www.w3.org/1999/xhtml" style="color: WindowText;"> + This text should be WindowText color in forced colors mode. + </div> + <svg height="20" width="20"> + <rect x="0" height="20" y="0" width="20" style="fill: green; stroke: purple;"/> + </svg> + </foreignObject> + </svg> +</body> +</html>
diff --git a/third_party/blink/web_tests/virtual/legacy-samesite/README.md b/third_party/blink/web_tests/virtual/legacy-samesite/README.md new file mode 100644 index 0000000..175f0a1 --- /dev/null +++ b/third_party/blink/web_tests/virtual/legacy-samesite/README.md
@@ -0,0 +1,3 @@ +This virtual test suite is for testing the legacy cookie SameSite behavior: +- Cookies that don't specify SameSite default to behaving like SameSite=None. +- SameSite=None cookies are not required to also be Secure.
diff --git a/third_party/blink/web_tests/virtual/legacy-samesite/external/wpt/cookies/samesite/README.txt b/third_party/blink/web_tests/virtual/legacy-samesite/external/wpt/cookies/samesite/README.txt new file mode 100644 index 0000000..175f0a1 --- /dev/null +++ b/third_party/blink/web_tests/virtual/legacy-samesite/external/wpt/cookies/samesite/README.txt
@@ -0,0 +1,3 @@ +This virtual test suite is for testing the legacy cookie SameSite behavior: +- Cookies that don't specify SameSite default to behaving like SameSite=None. +- SameSite=None cookies are not required to also be Secure.
diff --git a/third_party/blink/web_tests/virtual/samesite-by-default-cookies/README.md b/third_party/blink/web_tests/virtual/samesite-by-default-cookies/README.md deleted file mode 100644 index cd9f4d8..0000000 --- a/third_party/blink/web_tests/virtual/samesite-by-default-cookies/README.md +++ /dev/null
@@ -1,3 +0,0 @@ -This test suite is for running cookies tests with SameSiteByDefaultCookies -enabled, to exercise the behavior where unspecified-SameSite cookies are treated -the same as SameSite=Lax cookies.
diff --git a/third_party/blink/web_tests/virtual/samesite-by-default-cookies/external/wpt/cookies/README.txt b/third_party/blink/web_tests/virtual/samesite-by-default-cookies/external/wpt/cookies/README.txt deleted file mode 100644 index cd9f4d8..0000000 --- a/third_party/blink/web_tests/virtual/samesite-by-default-cookies/external/wpt/cookies/README.txt +++ /dev/null
@@ -1,3 +0,0 @@ -This test suite is for running cookies tests with SameSiteByDefaultCookies -enabled, to exercise the behavior where unspecified-SameSite cookies are treated -the same as SameSite=Lax cookies.
diff --git a/third_party/blink/web_tests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt b/third_party/blink/web_tests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt index 08c25ae..d35ff53 100644 --- a/third_party/blink/web_tests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt +++ b/third_party/blink/web_tests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
@@ -2621,7 +2621,6 @@ getter onpush getter onsync getter registration - method fetch method gc method skipWaiting setter onabortpayment
diff --git a/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt b/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt index 3d94e252..f65be13a 100644 --- a/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/element-instance-property-listing-expected.txt
@@ -278,6 +278,7 @@ property removeAttributeNode property removeChild property removeEventListener + property renderSubtree property replaceChild property replaceWith property requestFullscreen @@ -1454,6 +1455,7 @@ property removeAttributeNode property removeChild property removeEventListener + property renderSubtree property replaceChild property replaceWith property requestFullscreen
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt index 06ba2ea2..a59995e 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt
@@ -2019,6 +2019,7 @@ getter part getter prefix getter previousElementSibling + getter renderSubtree getter role getter scrollHeight getter scrollLeft @@ -2141,6 +2142,7 @@ setter onwebkitfullscreenerror setter outerHTML setter part + setter renderSubtree setter role setter scrollLeft setter scrollTop @@ -10864,14 +10866,14 @@ attribute @@toStringTag getter environmentBlendMode getter inputSources - getter onblur getter onend - getter onfocus getter oninputsourceschange getter onselect getter onselectend getter onselectstart + getter onvisibilitychange getter renderState + getter visibilityState method cancelAnimationFrame method constructor method end @@ -10879,13 +10881,12 @@ method requestHitTest method requestReferenceSpace method updateRenderState - setter onblur setter onend - setter onfocus setter oninputsourceschange setter onselect setter onselectend setter onselectstart + setter onvisibilitychange interface XRSessionEvent : Event attribute @@toStringTag getter session
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-commit.html index 564c452..c80e6082 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-commit.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-commit.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-container-with-child-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -33,12 +34,12 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then(() => { + setInvisible(container).then(() => { const child = document.createElement("div"); child.id = "child"; container.appendChild(child); - container.displayLock.commit().then( + setVisible(container).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); }); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-commit-resolves.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-commit-resolves.html index ca88b181..0ce33a0 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-commit-resolves.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-commit-resolves.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-container-with-child-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -33,13 +34,13 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }); + setInvisible(container); const child = document.createElement("div"); child.id = "child"; container.appendChild(child); - container.displayLock.commit().then( + setVisible(container).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); }); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-update-and-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-update-and-commit.html index 08f175b..5f480c1b7 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-update-and-commit.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-immediate-update-and-commit.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-container-with-child-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -33,7 +34,7 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }); + setInvisible(container); const child = document.createElement("div"); child.id = "child";
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-breakable-div.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-breakable-div.html index d201d95..2f04d777 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-breakable-div.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-breakable-div.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="acquire-in-breakable-div-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -28,7 +29,7 @@ <script> async function runTest() { const container = document.getElementById("container"); - await container.displayLock.acquire({ timeout: Infinity }); + await setInvisible(container); takeScreenshot(); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-iframe.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-iframe.html index 67dc437..bd9b32a 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-iframe.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-in-iframe.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="acquire-in-iframe-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <div id="log"></div> <iframe id="frame" srcdoc=' @@ -28,7 +29,7 @@ function runTest() { const container = document.getElementById("frame").contentDocument.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then( + setInvisible(container).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); }); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-composited-layer.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-composited-layer.html index 7b356ce..4efc5c3 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-composited-layer.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-composited-layer.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -28,7 +29,7 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then( + setInvisible(container).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); } );
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-display-contents.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-display-contents.html index 41a7151..c6c5de2 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-display-contents.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-display-contents.html
@@ -7,18 +7,17 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> <body></body> <script> -const REJECTION_MESSAGE = "Element has unsupported display type (display: contents)."; - async_test(async (t) => { let div = document.createElement("div"); div.style = "display: contents; contain: style layout;"; document.body.appendChild(div); - await div.displayLock.acquire({ timeout: Infinity }).then( - null, (e) => { - t.step(() => assert_equals(e.message, REJECTION_MESSAGE)); + await setInvisible(div).then(() => { + // TODO(rakina): Change this once we support non-contained locking. + t.step(() => assert_false(div.displayLock.locked)); t.done(); }); }, "Elements with display:contents can't be locked"); @@ -27,9 +26,9 @@ let slot = document.createElement("slot"); slot.style = "contain: style layout;"; document.body.appendChild(slot); - await slot.displayLock.acquire({ timeout: Infinity }).then( - null, (e) => { - t.step(() => assert_equals(e.message, REJECTION_MESSAGE)); + await setInvisible(slot).then(() => { + // TODO(rakina): Change this once we support non-contained locking. + t.step(() => assert_false(slot.displayLock.locked)); t.done(); }); }, "<slot> can't be locked"); @@ -38,8 +37,9 @@ let slot = document.createElement("slot"); slot.style = "display: block; contain: style layout;"; document.body.appendChild(slot); - await slot.displayLock.acquire({ timeout: Infinity }).then( - () => { + await setInvisible(slot).then(() => { + // TODO(rakina): Change this once we support non-contained locking. + t.step(() => assert_true(slot.displayLock.locked)); t.done(); }); }, "<slot> with changed display type can be locked");
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-positioned-element.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-positioned-element.html index d8c8542..54537e53 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-positioned-element.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-on-positioned-element.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -31,7 +32,7 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then(() => { + setInvisible(container).then(() => { const child = document.createElement("div"); document.body.appendChild(child);
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit-ref.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit-ref.html deleted file mode 100644 index 9a6718ef..0000000 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit-ref.html +++ /dev/null
@@ -1,24 +0,0 @@ -<!doctype HTML> -<html> -<meta charset="utf8"> -<title>Display Locking: acquire rejects after quick commit (reference)</title> -<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> -<link rel="help" href="https://github.com/WICG/display-locking"> - -<style> -#container { - contain: style layout; - width: 150px; - height: 150px; - background: lightblue; -} -#child { - width: 50px; - height: 50px; - background: lightgreen; -} -</style> - -<div id="log">PASS Lock commit was requested.</div> -<div id="container"><div id="child"></div></div> -</html>
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit.html deleted file mode 100644 index 0df6921..0000000 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-rejects-after-immediate-commit.html +++ /dev/null
@@ -1,49 +0,0 @@ -<!doctype HTML> -<html class="reftest-wait"> -<meta charset="utf8"> -<title>Display Locking: acquire rejects after quick commit</title> -<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org"> -<link rel="help" href="https://github.com/WICG/display-locking"> -<link rel="match" href="acquire-rejects-after-immediate-commit-ref.html"> -<script src="/common/reftest-wait.js"></script> - -<style> -#container { - contain: style layout; - width: 150px; - height: 150px; - background: lightblue; -} -#child { - width: 50px; - height: 50px; - background: lightgreen; -} -</style> - -<div id="log"></div> -<div id="container"></div> - -<script> -function finishTest(status_string) { - if (document.getElementById("log").innerHTML === "") - document.getElementById("log").innerHTML = status_string; - takeScreenshot(); -} - -function runTest() { - const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then( - () => { finishTest("FAIL"); }, - (e) => { finishTest("PASS " + e.message); }); - - const child = document.createElement("div"); - child.id = "child"; - container.appendChild(child); - - container.displayLock.commit(); -} - -window.onload = runTest; -</script> -</html>
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-then-mark-for-reattach.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-then-mark-for-reattach.html index fbf5014c8..b9a107f 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-then-mark-for-reattach.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-then-mark-for-reattach.html
@@ -5,6 +5,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <div id="log"></div> <div id="host"><div id="slotted"></div></div> @@ -24,7 +25,7 @@ locked.style = "contain: style layout"; locked.innerHTML = "<slot></slot>"; locked.getBoundingClientRect(); - locked.displayLock.acquire({timeout: Infinity}); + setInvisible(locked); // Slotted will be recalced, because style dirtiness propagated // to the DOM ancestor (host) instead of flat-tree (<slot>), and @@ -34,7 +35,7 @@ host.getBoundingClientRect(); // Check that everything is OK after we commit. - locked.displayLock.commit().then(() => { + setVisible(locked).then(() => { locked.remove(); finishTest("PASS"); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-update-disconnect-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-update-disconnect-commit.html index fa774cb84..5035343f8 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-update-disconnect-commit.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/acquire-update-disconnect-commit.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -33,11 +34,11 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then(() => { + setInvisible(container).then(() => { // Update, then disconnect the element, and commit. const update_promise = container.displayLock.update(); container.remove(); - const commit_promise = container.displayLock.commit(); + const commit_promise = setVisible(container); // The update promise should reject and commit one should succeed. Promise.all([
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activatable-locked-element-allows-anchor-links.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activatable-locked-element-allows-anchor-links.html index 2d7f7154..ca8e6e7 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activatable-locked-element-allows-anchor-links.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activatable-locked-element-allows-anchor-links.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="activatable-locked-element-allows-anchor-links-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -32,7 +33,7 @@ <script> function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, activatable: true }).then(() => { + setInvisibleActivatable(container).then(() => { location.href += "#target"; requestAnimationFrame(takeScreenshot); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-commit-same-frame.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-commit-same-frame.html index 4705208..e52e254 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-commit-same-frame.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-commit-same-frame.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -35,11 +36,11 @@ async function runTest() { let container = document.getElementById("container"); - let acquire_promise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + let acquire_promise = setInvisibleActivatable(container); await acquire_promise; target.scrollIntoView(); - let commit_promise = container.displayLock.commit(); + let commit_promise = setVisible(container); await commit_promise; t.step(() => assert_false(container.displayLock.locked, "context after commit & activation is unlocked"));
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-and-commit-same-frame.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-and-commit-same-frame.html index df12bd4..6f2df7b 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-and-commit-same-frame.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-and-commit-same-frame.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -35,7 +36,7 @@ async function runTest() { let container = document.getElementById("container"); - let acquire_promise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + let acquire_promise = setInvisibleActivatable(container); await acquire_promise; target.scrollIntoView();
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-same-frame.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-same-frame.html index 4c37cb7..40228ab 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-same-frame.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/activate-update-same-frame.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -35,7 +36,7 @@ async function runTest() { let container = document.getElementById("container"); - let acquire_promise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + let acquire_promise = setInvisibleActivatable(container); await acquire_promise; target.scrollIntoView();
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links-ancestor.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links-ancestor.html index 962e9c3a..e3a5009 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links-ancestor.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links-ancestor.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> div { contain: style layout; @@ -29,8 +30,8 @@ 'use strict'; function prepareTest() { return Promise.all([ - outer.displayLock.acquire({ timeout: Infinity, activatable: true }), - inner.displayLock.acquire({ timeout: Infinity, activatable: true }) + setInvisibleActivatable(outer), + setInvisibleActivatable(inner) ]); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links.html index 99dab79..6b250eb 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/anchor-links.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> div { contain: style layout; @@ -27,8 +28,9 @@ 'use strict'; function prepareTest() { innermost.onbeforeactivate = inner.onbeforeactivate = outer.onbeforeactivate = null; - return Promise.all([outer.displayLock.acquire({ timeout: Infinity, activatable: true }), - inner.displayLock.acquire({ timeout: Infinity, activatable: true })]); + return Promise.all([ + setInvisibleActivatable(outer), + setInvisibleActivatable(inner)]); } promise_test(() => {
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/commit-in-beforeactivate.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/commit-in-beforeactivate.html index 7f2b1f67..5f17252d 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/commit-in-beforeactivate.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/commit-in-beforeactivate.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> div { @@ -20,13 +21,13 @@ async_test((t) => { async function commit(target) { - target.displayLock.commit(); + setVisible(target); t.done(); } async function runTest() { const target = document.getElementById("target"); - await target.displayLock.acquire({ timeout: Infinity, activatable: true }); + await setInvisibleActivatable(target); t.step(() => assert_true(target.displayLock.locked)); target.addEventListener("beforeactivate", () => commit(target));
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-empty-layout.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-empty-layout.html index 2a1e0b4..76aa47e 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-empty-layout.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-empty-layout.html
@@ -4,6 +4,7 @@ <title>Display Locking: focus on new element</title> <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> <link rel="help" href="https://github.com/WICG/display-locking"> +<script src="../resources/utils.js"></script> <!-- Focus on a div that doesn't have style/layout value yet. @@ -17,7 +18,7 @@ <script> promise_test((t) => { - const acquirePromise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + const acquirePromise = setInvisibleActivatable(container); return new Promise((resolve, reject) => { const focusable = document.createElement("div"); focusable.tabIndex = 0;
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-next-updated-style.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-next-updated-style.html index b094677b..3838981 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-next-updated-style.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-next-updated-style.html
@@ -4,6 +4,7 @@ <title>Display Locking: focus on skipped element</title> <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> <link rel="help" href="https://github.com/WICG/display-locking"> +<script src="../resources/utils.js"></script> <!-- Focus on a div that has updated style/layout. @@ -19,7 +20,7 @@ <script> promise_test((t) => { - const acquirePromise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + const acquirePromise = setInvisibleActivatable(container); return new Promise((resolve, reject) => { acquirePromise.then(() => { focusableA.style = "display: none;";
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-shadow.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-shadow.html index e4534906..0a3ff4c3a 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-shadow.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus-shadow.html
@@ -11,6 +11,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <script> promise_test((t) => { @@ -20,7 +21,7 @@ const shadowRoot = host.attachShadow({ mode: "open" }); shadowRoot.appendChild(container); - const acquirePromise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + const acquirePromise = setInvisibleActivatable(container); return new Promise((resolve, reject) => { const eventPromise = new Promise((resolve, reject) => {
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus.html index 2389d44..2e8f8a5a 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/focus.html
@@ -4,6 +4,7 @@ <title>Display Locking: focus via tab navigation</title> <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> <link rel="help" href="https://github.com/WICG/display-locking"> +<script src="../resources/utils.js"></script> <div id="container" style ="contain:style layout"> <div id="focusable" tabIndex="0"> @@ -16,7 +17,7 @@ <script> promise_test(() => { - const acquirePromise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + const acquirePromise = setInvisibleActivatable(container); return new Promise((resolve, reject) => { const eventPromise = new Promise((resolve, reject) => { container.onbeforeactivate = (e) => {
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-focus.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-focus.html index c01558b2..cac92fdc 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-focus.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-focus.html
@@ -13,12 +13,13 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <script> async_test((t) => { async function focusNonActivatableTest() { - const acquire_promise = container.displayLock.acquire({ timeout: Infinity }); + const acquire_promise = setInvisible(container); await acquire_promise; t.step(() => assert_not_equals(document.activeElement, focusable)); focusable.focus(); @@ -28,7 +29,7 @@ async function focusActivatableTest() { t.step(() => assert_not_equals(document.activeElement, focusable)); - const acquire_promise = container.displayLock.acquire({ timeout: Infinity, activatable: true }); + const acquire_promise = setInvisibleActivatable(container); await acquire_promise; focusable.focus(); t.step(() => assert_equals(document.activeElement, focusable));
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-anchor-links.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-anchor-links.html index f0f3582..b15bb308 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-anchor-links.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-anchor-links.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="spacer-and-container-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -32,7 +33,7 @@ <script> function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, size: [150, 150] }).then(() => { + setInvisible(container).then(() => { location.href += "#target"; requestAnimationFrame(takeScreenshot); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-scroll-into-view.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-scroll-into-view.html index 66e71f4..7553cca 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-scroll-into-view.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/locked-element-prevents-scroll-into-view.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="spacer-and-container-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -32,7 +33,7 @@ <script> function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, size: [150, 150] }).then(() => { + setInvisible(container).then(() => { document.getElementById("target").scrollIntoView(); requestAnimationFrame(takeScreenshot); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view-beforeactivate.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view-beforeactivate.html index c5aa628..04c9617 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view-beforeactivate.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view-beforeactivate.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="../resources/utils.js"></script> <style> div { contain: style layout; @@ -28,8 +29,8 @@ 'use strict'; function prepareTest() { return Promise.all([ - outer.displayLock.acquire({ timeout: Infinity, activatable: true }), - inner.displayLock.acquire({ timeout: Infinity, activatable: true }) + setInvisibleActivatable(outer), + setInvisibleActivatable(inner) ]); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view.html index 5882138..837c3890 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/activation/scroll-into-view.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="scroll-into-view-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="../resources/utils.js"></script> <style> .spacer { @@ -32,7 +33,7 @@ <script> function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, activatable: true }).then(() => { + setInvisibleActivatable(container).then(() => { document.getElementById("target").scrollIntoView(); requestAnimationFrame(takeScreenshot); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/attribute/values.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/attribute/values.html new file mode 100644 index 0000000..65854201 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/attribute/values.html
@@ -0,0 +1,85 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Tests rendersubtree attribute values</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> + +<script> +test(() => { + const element = document.createElement("div"); + element.setAttribute("rendersubtree", "visible"); + assert_equals(element.getAttribute("rendersubtree"), "visible"); + assert_equals(element.renderSubtree, "visible"); + + element.setAttribute("rendersubtree", "invisible"); + assert_equals(element.getAttribute("rendersubtree"), "invisible"); + assert_equals(element.renderSubtree, "invisible"); + + element.setAttribute("rendersubtree", "invisible-activatable"); + assert_equals(element.getAttribute("rendersubtree"), "invisible-activatable"); + assert_equals(element.renderSubtree, "invisible-activatable"); +}, "Valid values on the attribute are saved and reflected as is"); + +test(() => { + const element = document.createElement("div"); + element.setAttribute("rendersubtree", "not-visible"); + assert_equals(element.renderSubtree, "visible"); + + element.setAttribute("rendersubtree", ""); + assert_equals(element.renderSubtree, "visible"); + + element.setAttribute("rendersubtree", "invisibleactivatable"); + assert_equals(element.renderSubtree, "visible"); +}, "Invalid values on the attribute are reflected as visible on the renderSubtree property"); + +test(() => { + const element = document.createElement("div"); + element.setAttribute("rendersubtree", "not-visible"); + assert_equals(element.getAttribute("rendersubtree"), "not-visible"); + + element.setAttribute("rendersubtree", ""); + assert_equals(element.getAttribute("rendersubtree"), ""); + + element.setAttribute("rendersubtree", "invisibleactivatable"); + assert_equals(element.getAttribute("rendersubtree"), "invisibleactivatable"); +}, "Invalid values on the attribute are saved as-is in the rendersubtree attribute"); + +test(() => { + const element = document.createElement("div"); + element.renderSubtree = "visible"; + assert_equals(element.getAttribute("rendersubtree"), "visible"); + assert_equals(element.renderSubtree, "visible"); + + element.renderSubtree = "invisible"; + assert_equals(element.getAttribute("rendersubtree"), "invisible"); + assert_equals(element.renderSubtree, "invisible"); + + element.renderSubtree = "invisible-activatable"; + assert_equals(element.getAttribute("rendersubtree"), "invisible-activatable"); + assert_equals(element.renderSubtree, "invisible-activatable"); +}, "Valid values on the property are saved and reflected as is"); + +test(() => { + const element = document.createElement("div"); + element.renderSubtree = "not-visible"; + assert_equals(element.renderSubtree, "visible"); + + element.renderSubtree = ""; + assert_equals(element.renderSubtree, "visible"); + + element.renderSubtree = "invisibleactivatable"; + assert_equals(element.renderSubtree, "visible"); +}, "Invalid values on the property are reflected as visible on the renderSubtree property"); + +test(() => { + const element = document.createElement("div"); + element.renderSubtree = "not-visible"; + assert_equals(element.getAttribute("rendersubtree"), "not-visible"); + + element.renderSubtree = ""; + assert_equals(element.getAttribute("rendersubtree"), ""); + + element.renderSubtree = "invisibleactivatable"; + assert_equals(element.getAttribute("rendersubtree"), "invisibleactivatable"); +}, "Invalid values on the property are saved as-is in the rendersubtree attribute"); +</script>
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire-resolves.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire.html similarity index 74% rename from third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire-resolves.html rename to third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire.html index 6f6fda38..eb4aa24 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire-resolves.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/commit-immediate-acquire.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="commit-immediate-acquire-resolves-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -33,12 +34,12 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity }).then(() => { - container.displayLock.commit(); - container.displayLock.acquire({ timeout: Infinity }).then(() => { - container.displayLock.commit().then( - () => { finishTest("PASS"); }, - (e) => { finishTest("FAIL " + e.message); }); + setInvisible(container).then(() => { + setVisible(container); + setInvisible(container).then(() => { + setVisible(container).then(() => { + finishTest("PASS"); + }); }); }); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/delayed-acquire-removes-painted-output.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/delayed-acquire-removes-painted-output.html index 0f945d4..e63bf1a 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/delayed-acquire-removes-painted-output.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/delayed-acquire-removes-painted-output.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="delayed-acquire-removes-painted-output-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -41,7 +42,7 @@ <script> function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, size: [150, 150] }).then(takeScreenshot); + setInvisible(container).then(takeScreenshot); } window.onload = () => {
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/inner-text.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/inner-text.html index 2a06aec..e253d193 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/inner-text.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/inner-text.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -25,7 +26,7 @@ <script> promise_test(async () => { const container = document.getElementById("container"); - await container.displayLock.acquire({ timeout: Infinity }); + await setInvisible(container); assert_equals(document.body.innerText, "This text should be visible."); assert_equals(document.getElementById("inner").innerText, "");
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/intersection-observer.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/intersection-observer.html index 1787f6f..206d117 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/intersection-observer.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/intersection-observer.html
@@ -7,6 +7,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> <style> div { @@ -79,7 +80,7 @@ // Lock target3. async function enqueueStep2() { - await target3.displayLock.acquire({ timeout: Infinity }); + await setInvisible(target3); requestAnimationFrame(() => { requestAnimationFrame(() => { runStep2();
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-crossorigin-iframe-and-change-size.sub.https.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-crossorigin-iframe-and-change-size.sub.https.html index 42910776..1fc8487 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-crossorigin-iframe-and-change-size.sub.https.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-crossorigin-iframe-and-change-size.sub.https.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="lock-iframe-and-change-size-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> iframe { @@ -16,7 +17,7 @@ <script> async function runTest() { - await document.getElementById("frame").displayLock.acquire({ timeout: Infinity }); + await setInvisible(document.getElementById("frame")); document.getElementById("frame").height = 300; requestAnimationFrame(takeScreenshot); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-iframe-and-change-size.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-iframe-and-change-size.html index b22c7175..187ea1db 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-iframe-and-change-size.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/lock-iframe-and-change-size.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="lock-iframe-and-change-size-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> iframe { @@ -16,7 +17,7 @@ <script> async function runTest() { - await document.getElementById("frame").displayLock.acquire({ timeout: Infinity }); + await setInvisible(document.getElementById("frame")); document.getElementById("frame").height = 300; requestAnimationFrame(takeScreenshot); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-attribute.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-attribute.html index 2f893ff0..906047b 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-attribute.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-attribute.html
@@ -15,6 +15,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> <script> async_test((t) => { @@ -22,7 +23,7 @@ const container = document.getElementById("container"); t.step(() => assert_false(container.displayLock.locked, "initial context is unlocked")); - const acquire_promise = container.displayLock.acquire({ timeout: Infinity }); + const acquire_promise = setInvisible(container); t.step(() => assert_true(container.displayLock.locked, "context before acquire finishes is locked")); await acquire_promise; @@ -34,7 +35,7 @@ await update_promise; t.step(() => assert_true(container.displayLock.locked, "context after update is locked")); - const commit_promise = container.displayLock.commit(); + const commit_promise = setVisible(container); t.step(() => assert_false(container.displayLock.locked, "context during commit is unlocked")); await commit_promise;
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-element-shifted-down.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-element-shifted-down.html index 4eccf68ce..8b7aea9 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-element-shifted-down.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-element-shifted-down.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="locked-element-shifted-down-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> #container { @@ -39,7 +40,7 @@ function runTest() { const container = document.getElementById("container"); - container.displayLock.acquire({ timeout: Infinity, size: [150, 150] }).then(() => { + setInvisible(container).then(() => { document.getElementById("spacer").style.height = "100px"; finishTest("PASS"); });
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-shadow-descendant.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-shadow-descendant.html index 64c595d0..8923a71 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-shadow-descendant.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-shadow-descendant.html
@@ -11,6 +11,7 @@ <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> +<script src="resources/utils.js"></script> <script> let container = document.createElement("div"); @@ -25,7 +26,7 @@ t.step(() => assert_not_equals(document.activeElement, slotted)); t.step(() => assert_not_equals(shadowRoot.activeElement, slotted)); - const acquire_promise = container.displayLock.acquire({ timeout: Infinity }); + const acquire_promise = setInvisible(container); await acquire_promise; t.step(() => assert_not_equals(document.activeElement, slotted));
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-style.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-style.html index bd563333..45758ea 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-style.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/locked-style.html
@@ -4,6 +4,7 @@ <title>Display Locking: style on locked element & child</title> <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> <link rel="help" href="https://github.com/WICG/display-locking"> +<script src="resources/utils.js"></script> <style> #container { contain: style layout; @@ -23,7 +24,7 @@ async_test((t) => { async function runTest() { let container = document.getElementById("container"); - await container.displayLock.acquire({ timeout: Infinity }); + await setInvisible(container); container.style = "color: blue;"; t.step(() => assert_equals(getComputedStyle(container).color, "rgb(0, 0, 255)", "container color changed to blue")); @@ -36,9 +37,9 @@ t.step(() => assert_equals(getComputedStyle(grandchild).color, "rgb(0, 128, 0)", "grandchild inherits green color")); // Commit container, lock child. - await container.displayLock.commit(); + await setVisible(container); child.style = "contain: style layout"; - await child.displayLock.acquire({ timeout: Infinity }); + await setInvisible(child); // Update style outside of the locked subtree. container.style = "color: red;";
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-acquire.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-acquire.html index e88e3efc..7e2b0758 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-acquire.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-acquire.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> .container { @@ -43,10 +44,10 @@ const outer = document.getElementById("outer"); const inner = document.getElementById("inner"); - await outer.displayLock.acquire({ timeout: Infinity }); + await setInvisible(outer); // Dirty the inner layout inner.appendChild(document.createElement("div")); - inner.displayLock.acquire().then( + setInvisible(inner).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); }); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-commit.html index c6cb976..37890231 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-commit.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-commit.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> .container { @@ -44,11 +45,11 @@ const inner = document.getElementById("inner"); await Promise.all([ - outer.displayLock.acquire({ timeout: Infinity }), - inner.displayLock.acquire({ timeout: Infinity })]); + setInvisible(outer), + setInvisible(inner)]); // Dirty the inner layout inner.appendChild(document.createElement("div")); - inner.displayLock.commit().then( + setVisible(inner).then( () => { finishTest("PASS"); }, (e) => { finishTest("FAIL " + e.message); }); }
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update-and-commit.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update-and-commit.html index a2ff170..1a95dd8 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update-and-commit.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update-and-commit.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="pass-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> .container { @@ -44,8 +45,8 @@ const inner = document.getElementById("inner"); Promise.all([ - outer.displayLock.acquire({ timeout: Infinity }), - inner.displayLock.acquire({ timeout: Infinity })]) + setInvisible(outer), + setInvisible(inner)]) .then(() => { // Dirty the inner layout inner.appendChild(document.createElement("div"));
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update.html b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update.html index d22d7c4..f3a7584 100644 --- a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update.html +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/nested-update.html
@@ -6,6 +6,7 @@ <link rel="help" href="https://github.com/WICG/display-locking"> <link rel="match" href="nested-update-ref.html"> <script src="/common/reftest-wait.js"></script> +<script src="resources/utils.js"></script> <style> .container { @@ -44,8 +45,8 @@ const inner = document.getElementById("inner"); await Promise.all([ - outer.displayLock.acquire({ timeout: Infinity }), - inner.displayLock.acquire({ timeout: Infinity })]); + setInvisible(outer), + setInvisible(inner)]); // Dirty the inner layout inner.appendChild(document.createElement("div")); inner.displayLock.update().then(
diff --git a/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/resources/utils.js b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/resources/utils.js new file mode 100644 index 0000000..00e1144 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/display-lock/rendersubtree/resources/utils.js
@@ -0,0 +1,23 @@ + +function setInvisible(element) { + return setRenderSubtree(element, "invisible"); +} + +function setInvisibleActivatable(element) { + return setRenderSubtree(element, "invisible-activatable"); +} + +function setVisible(element) { + return setRenderSubtree(element, "visible"); +} + +function setRenderSubtree(element, value) { + element.setAttribute("rendersubtree", value); + return new Promise((resolve, reject) => { + // Returns a promise that resolves when the rendering changes take effect. + // TODO(rakina): Change to requestPostAnimationFrame when available? + requestAnimationFrame(() => { + requestAnimationFrame(resolve); + }); + }); +}
diff --git a/third_party/closure_compiler/closure_args.gni b/third_party/closure_compiler/closure_args.gni index a07a1ca..4acbcd9 100644 --- a/third_party/closure_compiler/closure_args.gni +++ b/third_party/closure_compiler/closure_args.gni
@@ -26,26 +26,28 @@ # Additional closure args for performing full checks. default_closure_args = strict_error_checking_closure_args + [ - "compilation_level=SIMPLE_OPTIMIZATIONS", + "compilation_level=SIMPLE_OPTIMIZATIONS", - "extra_annotation_name=attribute", - "extra_annotation_name=demo", - "extra_annotation_name=element", + "extra_annotation_name=attribute", + "extra_annotation_name=demo", + "extra_annotation_name=element", - "language_in=ECMASCRIPT_2017", - "language_out=ECMASCRIPT5_STRICT", + "language_in=ECMASCRIPT_2017", + "language_out=ECMASCRIPT5_STRICT", - "chrome_pass", - "polymer_pass", + "chrome_pass", + "polymer_pass", - "jscomp_off=duplicate", + "jscomp_off=duplicate", - "module_resolution=BROWSER_WITH_TRANSFORMED_PREFIXES", - "browser_resolver_prefix_replacements=\"chrome://resources/=../../ui/webui/resources/\"", + "js_module_root=../../ui/webui/resources/", + "js_module_root=gen/ui/webui/resources/", - "js_module_root=../../ui/webui/resources/", - "js_module_root=gen/ui/webui/resources/", - ] + # chrome://resources maps to root, since both ../../ui/webui/resources and + # gen/ui/webui/resources are js_module_roots. + "module_resolution=BROWSER_WITH_TRANSFORMED_PREFIXES", + "browser_resolver_prefix_replacements=\"chrome://resources/=./\"", +] polymer3_args = [ "browser_resolver_prefix_replacements=\"../polymer/polymer_bundled.min.js=../polymer/polymer_bundled.js\"",
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator.cc b/third_party/libaddressinput/chromium/chrome_address_validator.cc index 232ef1e..31cadf57c 100644 --- a/third_party/libaddressinput/chromium/chrome_address_validator.cc +++ b/third_party/libaddressinput/chromium/chrome_address_validator.cc
@@ -50,8 +50,7 @@ validator_(new ::i18n::addressinput::AddressValidator(supplier_.get())), validated_(BuildCallback(this, &AddressValidator::Validated)), rules_loaded_(BuildCallback(this, &AddressValidator::RulesLoaded)), - load_rules_listener_(load_rules_listener), - weak_factory_(this) {} + load_rules_listener_(load_rules_listener) {} AddressValidator::~AddressValidator() {} @@ -161,8 +160,7 @@ return supplier_->IsLoaded(region_code); } -AddressValidator::AddressValidator() - : load_rules_listener_(NULL), weak_factory_(this) {} +AddressValidator::AddressValidator() : load_rules_listener_(nullptr) {} base::TimeDelta AddressValidator::GetBaseRetryPeriod() const { return base::TimeDelta::FromSeconds(8);
diff --git a/third_party/libaddressinput/chromium/chrome_address_validator.h b/third_party/libaddressinput/chromium/chrome_address_validator.h index ef1f434..b1aab29d 100644 --- a/third_party/libaddressinput/chromium/chrome_address_validator.h +++ b/third_party/libaddressinput/chromium/chrome_address_validator.h
@@ -207,7 +207,7 @@ // Member variables should appear before the WeakPtrFactory, to ensure that // any WeakPtrs to AddressValidator are invalidated before its members // variable's destructors are executed, rendering them invalid. - base::WeakPtrFactory<AddressValidator> weak_factory_; + base::WeakPtrFactory<AddressValidator> weak_factory_{this}; DISALLOW_COPY_AND_ASSIGN(AddressValidator); };
diff --git a/third_party/webxr_test_pages/webxr-samples/positional-audio.html b/third_party/webxr_test_pages/webxr-samples/positional-audio.html index a2f6c4a..f80e9e6 100644 --- a/third_party/webxr_test_pages/webxr-samples/positional-audio.html +++ b/third_party/webxr_test_pages/webxr-samples/positional-audio.html
@@ -297,7 +297,7 @@ if (audioContext.state == 'running') { pauseAudio(); } else { - if("userActivation" in navigator) { + if ("userActivation" in navigator) { console.debug(navigator.userActivation); } playAudio(); @@ -408,10 +408,6 @@ } } - let draggingSource = null; - let draggingInput = null; - let draggingTransform = mat4.create(); - function hitTest(inputSource, frame, refSpace) { let pose = frame.getPose(inputSource.targetRaySpace, refSpace); if (pose) { @@ -419,11 +415,13 @@ let hitResult = scene.hitTest(targetRay) if (hitResult) { for (let source of audioSources) { - if (hitResult.node == source.node) { - draggingSource = source; - draggingInput = inputSource; - mat4.invert(draggingTransform, targetRay.matrix); - mat4.multiply(draggingTransform, draggingTransform, source.node.matrix); + if (hitResult.node === source.node) { + // Associate the input source with the audio source object until + // onSelectEnd event is raised with the same input source. + source.draggingInput = inputSource; + source.draggingTransform = mat4.create(); + mat4.invert(source.draggingTransform, targetRay.matrix); + mat4.multiply(source.draggingTransform, source.draggingTransform, source.node.matrix); return true; } } @@ -440,9 +438,16 @@ hitTest(ev.inputSource, ev.frame, refSpace); } + // Remove any references to the input source from the audio sources so + // that the objects are not dragged any further after the user releases + // the trigger. function onSelectEnd(ev) { - draggingSource = null; - draggingInput = null; + for (let source of audioSources) { + if (source.draggingInput === ev.inputSource) { + source.draggingInput = undefined; + source.draggingTransform = undefined; + } + } } let tmpMatrix = mat4.create(); @@ -459,13 +464,18 @@ scene.updateInputSources(frame, refSpace); - if (draggingSource) { - let draggingPose = frame.getPose(draggingInput.targetRaySpace, refSpace); - if (draggingPose) { - let pos = draggingSource.position; - mat4.multiply(tmpMatrix, draggingPose.transform.matrix, draggingTransform); - vec3.transformMat4(pos, [0, 0, 0], tmpMatrix); - draggingSource.source.setPosition(pos[0], pos[1], pos[2]); + // Update the position of all currently selected audio sources. It's + // possible to select multiple audio sources and drag them at the same + // time (one per controller that has the trigger held down). + for (let draggingSource of audioSources) { + if (draggingSource.draggingInput) { + let draggingPose = frame.getPose(draggingSource.draggingInput.targetRaySpace, refSpace); + if (draggingPose) { + let position = draggingSource.position; + mat4.multiply(tmpMatrix, draggingPose.transform.matrix, draggingSource.draggingTransform); + vec3.transformMat4(position, [0, 0, 0], tmpMatrix); + draggingSource.source.setPosition(position[0], position[1], position[2]); + } } }
diff --git a/third_party/zlib/google/zip_reader.cc b/third_party/zlib/google/zip_reader.cc index 63d23195..6bba0cf 100644 --- a/third_party/zlib/google/zip_reader.cc +++ b/third_party/zlib/google/zip_reader.cc
@@ -134,8 +134,7 @@ last_modified_ = base::Time::UnixEpoch(); } -ZipReader::ZipReader() - : weak_ptr_factory_(this) { +ZipReader::ZipReader() { Reset(); }
diff --git a/third_party/zlib/google/zip_reader.h b/third_party/zlib/google/zip_reader.h index aacffda..7a43d3a 100644 --- a/third_party/zlib/google/zip_reader.h +++ b/third_party/zlib/google/zip_reader.h
@@ -224,7 +224,7 @@ bool reached_end_; std::unique_ptr<EntryInfo> current_entry_info_; - base::WeakPtrFactory<ZipReader> weak_ptr_factory_; + base::WeakPtrFactory<ZipReader> weak_ptr_factory_{this}; DISALLOW_COPY_AND_ASSIGN(ZipReader); };
diff --git a/tools/cygprofile/symbol_extractor.py b/tools/cygprofile/symbol_extractor.py index 6912732..b0dc2a8 100644 --- a/tools/cygprofile/symbol_extractor.py +++ b/tools/cygprofile/symbol_extractor.py
@@ -97,7 +97,9 @@ if not m: return None - assert m.group('assert_scope') in set(['g', 'l']), line + # A symbol can be (g)lobal, (l)ocal, or neither (a space). Per objdump's + # manpage, "A symbol can be neither local or global for a variety of reasons". + assert m.group('assert_scope') in set(['g', 'l', ' ']), line assert m.group('assert_weak_or_strong') in set(['w', ' ']), line assert m.group('assert_tab') == '\t', line assert m.group('assert_4spaces') == ' ' * 4, line
diff --git a/tools/cygprofile/symbol_extractor_unittest.py b/tools/cygprofile/symbol_extractor_unittest.py index 175cf7b..4186e74b 100755 --- a/tools/cygprofile/symbol_extractor_unittest.py +++ b/tools/cygprofile/symbol_extractor_unittest.py
@@ -140,6 +140,16 @@ self.assertEquals('OUTLINED_FUNCTION_4', symbol_info.name) self.assertEquals('.text', symbol_info.section) + def testNeitherLocalNorGlobalSymbol(self): + # This happens, see crbug.com/992884. + # Symbol which is neither local nor global. + line = '0287ae50 w F .text\t000001e8 log2l' + symbol_info = symbol_extractor._FromObjdumpLine(line) + self.assertIsNotNone(symbol_info) + self.assertEquals(0x287ae50, symbol_info.offset) + self.assertEquals(0x1e8, symbol_info.size) + self.assertEquals('log2l', symbol_info.name) + self.assertEquals('.text', symbol_info.section) class TestSymbolInfosFromStream(unittest.TestCase):
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids index de165fe4..a4c39b1 100644 --- a/tools/gritsettings/resource_ids +++ b/tools/gritsettings/resource_ids
@@ -158,7 +158,7 @@ "chrome/browser/resources/webapks/webapks_ui_resources.grd": { "includes": [13910], }, - "chrome/browser/resources/welcome/onboarding_welcome_resources.grd": { + "chrome/browser/resources/welcome/welcome_resources.grd": { "includes": [13920], "structures": [13970], },
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 04d8396..a4232ec 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -393,6 +393,7 @@ 'GPU FYI Mac Builder': 'gpu_fyi_tests_release_trybot', 'GPU FYI Mac Builder (dbg)': 'gpu_fyi_tests_debug_trybot', 'GPU FYI Mac dEQP Builder': 'deqp_release_trybot', + 'GPU FYI Perf Android 64 Builder': 'gpu_tests_android_vulkan_release_trybot_arm64', 'GPU FYI Win Builder': 'gpu_fyi_tests_release_trybot_x86', 'GPU FYI Win Builder (dbg)': 'gpu_fyi_tests_debug_trybot_x86', 'GPU FYI Win dEQP Builder': 'deqp_release_trybot_x86',
diff --git a/tools/metrics/BUILD.gn b/tools/metrics/BUILD.gn index 3c4e605..7f7d0171 100644 --- a/tools/metrics/BUILD.gn +++ b/tools/metrics/BUILD.gn
@@ -101,7 +101,6 @@ "//tools/metrics/histograms/enums.xml", "//tools/metrics/histograms/expand_owners.py", - "//tools/metrics/histograms/expand_owners_in_histograms_xml_unittest.py", "//tools/metrics/histograms/expand_owners_unittest.py", "//tools/metrics/histograms/extract_histograms.py", "//tools/metrics/histograms/generate_expired_histograms_array.py",
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index b999b885..fed2744 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -24272,6 +24272,8 @@ <int value="2993" label="ContactsManagerSelect"/> <int value="2994" label="V8MediaSession_SetPositionState_Method"/> <int value="2995" label="CSSValueOverflowOverlay"/> + <int value="2996" label="RequestedFileSystemTemporary"/> + <int value="2997" label="RequestedFileSystemPersistent"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -34857,6 +34859,7 @@ <int value="-1158993534" label="PrintScaling:enabled"/> <int value="-1156179600" label="OmniboxRichEntitySuggestions:enabled"/> <int value="-1155543191" label="CopylessPaste:disabled"/> + <int value="-1154819618" label="FilesNG:enabled"/> <int value="-1154343236" label="VrBrowsingTabsView:disabled"/> <int value="-1151766565" label="enable-fullscreen-tab-detaching"/> <int value="-1145905507" label="SendTabToSelfWhenSignedIn:disabled"/> @@ -35246,6 +35249,8 @@ <int value="-619740638" label="ListAllDisplayModes:enabled"/> <int value="-617452890" label="media-router"/> <int value="-616818899" label="SameSiteByDefaultCookies:enabled"/> + <int value="-614223913" + label="ClickToCallContextMenuForSelectedText:enabled"/> <int value="-612633819" label="NotificationScrollBar:disabled"/> <int value="-612480090" label="FasterLocationReload:enabled"/> <int value="-610411643" label="enable-printer-app-search"/> @@ -36840,6 +36845,7 @@ <int value="1689183477" label="enable-merge-key-char-events"/> <int value="1690837904" label="save-previous-document-resources"/> <int value="1691568199" label="AndroidSpellCheckerNonLowEnd:disabled"/> + <int value="1693094211" label="FilesNG:disabled"/> <int value="1694766748" label="AutofillRestrictUnownedFieldsToFormlessCheckout:enabled"/> <int value="1694798717" label="NewNetErrorPageUI:enabled"/> @@ -36907,6 +36913,8 @@ <int value="1789517771" label="MacV2Sandbox:enabled"/> <int value="1789793147" label="HTTPSServerPreviewsUsingURLLoader:disabled"/> <int value="1792609232" label="NTPShortcuts:enabled"/> + <int value="1793023585" + label="ClickToCallContextMenuForSelectedText:disabled"/> <int value="1794057460" label="AutofillProfileClientValidation:enabled"/> <int value="1795186324" label="SyncPseudoUSSExtensionSettings:disabled"/> <int value="1798347197" @@ -61191,6 +61199,7 @@ <int value="0" label="Results do not match"/> <int value="1" label="Results match"/> <int value="2" label="Results changed"/> + <int value="3" label="HitTestData outdated"/> </enum> <enum name="VoiceInteractionEventSource">
diff --git a/tools/metrics/histograms/expand_owners.py b/tools/metrics/histograms/expand_owners.py index cde9615a..5967ed4 100644 --- a/tools/metrics/histograms/expand_owners.py +++ b/tools/metrics/histograms/expand_owners.py
@@ -2,13 +2,19 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -"""Functions for extracting email addresses from OWNERS files.""" +"""Functions for extracting emails and components from OWNERS files.""" import extract_histograms import os import re _EMAIL_PATTERN = r'^[\w\-\+\%\.]+\@[\w\-\+\%\.]+$' +_OWNERS = 'OWNERS' +# Three '..' are used because calling dirname() yields the path to this +# module's directory, histograms, and the directory above tools, which may or +# may not be src depending on the machine running the code, is up three +# directory levels from the histograms directory. +_DIR_ABOVE_TOOLS = [os.path.dirname(__file__), '..', '..', '..'] _SRC = 'src/' @@ -16,13 +22,84 @@ pass +def _AddTextNodeWithNewLineAndIndent(histogram, node_to_insert_before): + """Creates and adds a DOM Text Node before the given node in the histogram. + + Args: + histogram: The histogram node in which to insert a text node. + node_to_insert_before: A node before which to add the text node. + """ + histogram.insertBefore( + histogram.ownerDocument.createTextNode('\n '), + node_to_insert_before) + + +def _IsEmailOrPlaceholder(is_first_owner, owner_tag_text, histogram_name): + """Returns true if |owner_tag_text| is an email or the placeholder text. + + Also, verifies that a histogram's first owner tag contains either an email + address, e.g. 'ali@chromium.org' or the placeholder text. + + Args: + is_first_owner: True if a histogram's first owner tag is being checked. + owner_tag_text: The text of the owner tag being checked, e.g. + 'julie@google.com' or 'src/ios/net/cookies/OWNERS'. + histogram_name: The string name of the histogram. + + Raises: + Error: Raised if (A) the text is from the first owner tag and (B) the text + is not a primary owner. + """ + is_email_or_placeholder = (re.match(_EMAIL_PATTERN, owner_tag_text) or + owner_tag_text == extract_histograms.OWNER_PLACEHOLDER) + + if is_first_owner and not is_email_or_placeholder: + raise Error('The histogram {} must have a valid first owner, i.e. an ' + 'individual\'s email address.' + .format(histogram_name)) + + return is_email_or_placeholder + + def _IsWellFormattedFilePath(path): """Returns True if the given path begins with 'src/' and ends with 'OWNERS'. Args: path: The path to an OWNERS file, e.g. 'src/gin/OWNERS'. """ - return path.startswith(_SRC) and path.endswith('OWNERS') + return path.startswith(_SRC) and path.endswith(_OWNERS) + + +def _GetHigherLevelOwnersFilePath(path): + """Returns a path to an OWNERS file at a higher level than the given path. + + Returns an empty string if an OWNERS file path in a higher level directory + cannot be found. + + Suppose the given path is //stuff/chromium/src/jam/tea/milk/OWNERS. The + path //stuff/chromium/src/jam/tea/OWNERS will then be generated, and if it + exists, it will be returned. If not, the path //stuff/chromium/src/jam/OWNERS + will be generated, and if it exists, it will be returned. + + Args: + path: The path to an OWNERS file. + """ + # The highest directory that is searched for component information is one + # directory lower than the directory above tools. Depending on the machine + # running this code, the directory above tools may or may not be src. + path_to_limiting_dir = os.path.abspath(os.path.join(*_DIR_ABOVE_TOOLS)) + limiting_dir = path_to_limiting_dir.split(os.sep)[-1] + owners_file_limit = (os.sep).join([limiting_dir, _OWNERS]) + if path.endswith(owners_file_limit): + return '' + + parent_directory = os.path.dirname(os.path.dirname(path)) + parent_owners_file_path = os.path.join(parent_directory, _OWNERS) + + if (os.path.exists(parent_owners_file_path) and + os.path.isfile(parent_owners_file_path)): + return parent_owners_file_path + return _GetHigherLevelOwnersFilePath(parent_owners_file_path) def _GetOwnersFilePath(path): @@ -35,16 +112,12 @@ Error: Raised if the given path is not well-formatted. """ if _IsWellFormattedFilePath(path): - # Three '..' are used because calling dirname() yields the path to this - # module's directory, histograms, and the directory above tools is up three - # directory levels from the histograms directory. - path_to_dir_above_tools = [os.path.dirname(__file__), '..', '..', '..'] - # _SRC is removed because the file system on the machine running the code - # may not have an src directory. + # may not have a(n) src directory. path_without_src = path[len(_SRC):] + return os.path.abspath( - os.path.join(*(path_to_dir_above_tools + path_without_src.split('/')))) + os.path.join(*(_DIR_ABOVE_TOOLS + path_without_src.split(os.sep)))) else: raise Error('The given path {} is not well-formatted.' 'Well-formatted paths begin with "src/" and end with "OWNERS"' @@ -99,6 +172,37 @@ return extracted_emails +def _ExtractComponentFromOWNERS(path): + """Returns the string component associated with the file at the given path. + + Examples are 'Blink>Storage>FileAPI' and 'UI'. + + Returns an empty string if no component can be extracted from the OWNERS file + located at path or OWNERS files in higher level directories. + + Args: + path: The path to an OWNERS file, e.g. 'src/storage/OWNERS'. + """ + with open(path, 'r') as owners_file: + for line in [line.lstrip() + for line in owners_file.read().splitlines() if line]: + if line.startswith('# COMPONENT: '): + # A typical line is '# COMPONENT: UI>Browser>Bubbles''. The colon is + # always followed by exactly one space. And the symbol >, if present, + # is never preceded or followed by any spaces. + words = line.split(': ') + if len(words) == 2: + return words[1].rstrip() + raise Error('The component info in {} is poorly formatted.' + .format(path)) + + higher_level_owners_file_path = _GetHigherLevelOwnersFilePath(path) + if higher_level_owners_file_path: + return _ExtractComponentFromOWNERS(higher_level_owners_file_path) + + return '' + + def _MakeOwners(document, path, emails_with_dom_elements): """Makes DOM Elements for owners and returns the elements. @@ -140,8 +244,8 @@ return owner_elements -def _UpdateHistogram(histogram, owner_to_replace, owners_to_add): - """Updates the histogram by replacing owner_to_replace with owners_to_add. +def _UpdateHistogramOwners(histogram, owner_to_replace, owners_to_add): + """Replaces |owner_to_replace| with |owners_to_add| for the given histogram. Args: histogram: The DOM Element to update. @@ -152,29 +256,45 @@ """ node_after_owners_file = owner_to_replace.nextSibling replacement_done = False - new_line_plus_indent = '\n ' for owner_to_add in owners_to_add: if not replacement_done: histogram.replaceChild(owner_to_add, owner_to_replace) replacement_done = True else: - histogram.insertBefore( - histogram.ownerDocument.createTextNode(new_line_plus_indent), - node_after_owners_file) + _AddTextNodeWithNewLineAndIndent(histogram, node_after_owners_file) histogram.insertBefore(owner_to_add, node_after_owners_file) +def _AddHistogramComponent(histogram, component): + """Makes a DOM Element for the component and adds it to the given histogram. + + Args: + histogram: The DOM Element to update. + component: A string component to add, e.g. 'Internals>Network' or 'Build'. + """ + node_to_insert_before = histogram.lastChild + _AddTextNodeWithNewLineAndIndent(histogram, node_to_insert_before) + + document = histogram.ownerDocument + component_element = document.createElement('component') + component_element.appendChild(document.createTextNode(component)) + histogram.insertBefore(component_element, node_to_insert_before) + + def ExpandHistogramsOWNERS(histograms): """Updates the given DOM Element's descendants, if necessary. - The owner nodes associated with a single histogram need to be updated when - the text of an owner node is the path to an OWNERS file rather than an email - address, e.g. <owner>src/base/android/OWNERS</owner> instead of - <owner>joy@chromium.org</owner>. + When a histogram has an owner node whose text is an OWNERS file path rather + than an email address, e.g. <owner>src/base/android/OWNERS</owner> instead of + <owner>joy@chromium.org</owner>, then (A) the histogram's owners need to be + updated and (B) a component may be added. If the text of an owner node is an OWNERS file path, then this node is - replaced by owner nodes for the emails derived from the OWNERS file. + replaced by owner nodes for the emails derived from the OWNERS file. If a + component, e.g. UI>GFX, can be derived from the OWNERS file or an OWNERS file + in a higher-level directory, then a component tag will be added to the + histogram, e.g. <component>UI>GFX</component>. Args: histograms: The DOM Element whose descendants may be updated. @@ -187,33 +307,37 @@ for histogram in histograms.getElementsByTagName('histogram'): owners = histogram.getElementsByTagName('owner') - # owner is a DOM Element with a single child, which is a DOM Text node. + # owner is a DOM Element with a single child, which is a DOM Text Node. emails_with_dom_elements = set([ owner.childNodes[0].data for owner in owners if email_pattern.match(owner.childNodes[0].data)]) + # component is a DOM Element with a single child, which is a DOM Text Node. + components_with_dom_elements = set([ + extract_histograms.NormalizeString(component.childNodes[0].data) + for component in histogram.getElementsByTagName('component')]) + for index in range(len(owners)): owner = owners[index] owner_text = owner.childNodes[0].data - is_email = email_pattern.match(owner_text) - is_primary_owner = (is_email or - owner_text == extract_histograms.OWNER_PLACEHOLDER) - if index == 0 and not is_primary_owner: - raise Error('The histogram {} must have a primary owner, i.e. an ' - 'individual\'s email address.' - .format(histogram.getAttribute('name'))) + name = histogram.getAttribute('name') + if _IsEmailOrPlaceholder(index == 0, owner_text, name): + continue - if not is_primary_owner: - path = _GetOwnersFilePath(owner_text) - if os.path.exists(path) and os.path.isfile(path): - owners_to_add = _MakeOwners( - owner.ownerDocument, path, emails_with_dom_elements) - if owners_to_add: - _UpdateHistogram(histogram, owner, owners_to_add) - else: - raise Error('No email addresses could be derived from {}.' - .format(path)) - else: - raise Error('The path {} does not exist.'.format(path)) + path = _GetOwnersFilePath(owner_text) + if not os.path.exists(path) or not os.path.isfile(path): + raise Error('The file at {} does not exist.'.format(path)) + + owners_to_add = _MakeOwners( + owner.ownerDocument, path, emails_with_dom_elements) + if not owners_to_add: + raise Error('No emails could be derived from {}.'.format(path)) + + _UpdateHistogramOwners(histogram, owner, owners_to_add) + + component = _ExtractComponentFromOWNERS(path) + if component and component not in components_with_dom_elements: + components_with_dom_elements.add(component) + _AddHistogramComponent(histogram, component)
diff --git a/tools/metrics/histograms/expand_owners_in_histograms_xml_unittest.py b/tools/metrics/histograms/expand_owners_in_histograms_xml_unittest.py deleted file mode 100644 index 205a3a7..0000000 --- a/tools/metrics/histograms/expand_owners_in_histograms_xml_unittest.py +++ /dev/null
@@ -1,38 +0,0 @@ -# Copyright 2019 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. - -import unittest - -import expand_owners -import os -import xml.dom.minidom - - -class ExpandOwnersInHistogramsXmlTest(unittest.TestCase): - - # TODO(caitlinfischer): Figure out what to do with this test after seeing the - # results of attempting to submit dummy histograms in crrev.com/c/1737370. - def DISABLED_testExpandOwners(self): - """Checks that no errors are raised when expanding OWNERS files.""" - path = os.path.join(os.path.dirname(__file__), 'histograms.xml') - with open(path, 'r') as histograms_file: - document = xml.dom.minidom.parse(histograms_file) - histograms = document.getElementsByTagName('histograms')[0] - - num_histograms= len(document.getElementsByTagName('histogram')) - - expand_owners.ExpandHistogramsOWNERS(histograms) - - # Checking the number of histograms before and after the call to - # ExpandHistogramsOWNERS is a trivial assertion that is done in lieu of - # not having any assertion at all. - # - # The goal is to verify that no errors are raised when calling this - # function, which is tested in expand_owners_unittest.py. - self.assertEqual(len(document.getElementsByTagName('histogram')), - num_histograms) - - -if __name__ == '__main__': - unittest.main() \ No newline at end of file
diff --git a/tools/metrics/histograms/expand_owners_unittest.py b/tools/metrics/histograms/expand_owners_unittest.py index 87628a20..054e7384 100644 --- a/tools/metrics/histograms/expand_owners_unittest.py +++ b/tools/metrics/histograms/expand_owners_unittest.py
@@ -5,79 +5,246 @@ import unittest import expand_owners +import os +import shutil +import tempfile import xml.dom.minidom +_DEFAULT_COMPONENT = '# COMPONENT: Default>Component' + + +def _GetFileDirective(path): + """Returns a file directive line. + + Args: + path: An absolute path, e.g. '/some/directory/chromium/src/tools/OWNERS'. + + Returns: + A file directive that can be used in an OWNERS file, e.g. + file://tools/OWNERS. + """ + return ''.join(['file://', path.split('src/')[1]]) + + +def _GetSrcRelativePath(path): + """Returns a(n) src-relative path for the given file path. + + Args: + path: An absolute path, e.g. '/some/directory/chromium/src/tools/OWNERS'. + """ + return path.split('chromium/')[1] + + +def _MakeOwnersFile(filename, directory): + """Makes a temporary file in this directory and returns its absolute path. + + Args: + filename: A string filename, e.g. 'OWNERS'. + directory: A string directory under which to make the new file. + + Returns: + The temporary file's absolute path. + """ + if not directory: + directory = os.path.abspath(os.path.join(os.path.dirname(__file__))) + owners_file = tempfile.NamedTemporaryFile(suffix=filename, dir=directory) + return os.path.abspath(owners_file.name) + class ExpandOwnersTest(unittest.TestCase): - def testExpandOwnersWithBasicOWNERSFilePath(self): + def setUp(self): + super(ExpandOwnersTest, self).setUp() + self.temp_dir = tempfile.mkdtemp( + dir=os.path.abspath(os.path.join(os.path.dirname(__file__)))) + + def tearDown(self): + super(ExpandOwnersTest, self).tearDown() + shutil.rmtree(self.temp_dir) + + def testExpandOwnersWithSimpleOWNERSFilePath(self): """Checks that OWNERS files are expanded.""" + absolute_path = _MakeOwnersFile('simple_OWNERS', self.temp_dir) + src_relative_path = _GetSrcRelativePath(absolute_path) + + with open(absolute_path, 'w') as owners_file: + owners_file.write('\n'.join( + ['amy@chromium.org', _DEFAULT_COMPONENT, 'rae@chromium.org'])) + histograms = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> <owner>joe@chromium.org</owner> - <owner>src/tools/metrics/histograms/test_files/basic_OWNERS</owner> + <owner>{path}</owner> <summary>I like coffee.</summary> </histogram> -<histogram name="Maple.Syrup" units="mL"> +<histogram name="Maple.Syrup"> <owner>joe@chromium.org</owner> - <owner>src/tools/metrics/histograms/test_files/basic_OWNERS</owner> + <owner>{path}</owner> + <owner>kim@chromium.org</owner> <summary>I like maple syrup, too.</summary> </histogram> </histograms> -""") +""".format(path=src_relative_path)) + expected_histograms = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> <owner>joe@chromium.org</owner> - <owner>marypoppins@chromium.org</owner> - <owner>bert@google.com</owner> + <owner>amy@chromium.org</owner> + <owner>rae@chromium.org</owner> <summary>I like coffee.</summary> + <component>Default>Component</component> </histogram> -<histogram name="Maple.Syrup" units="mL"> +<histogram name="Maple.Syrup"> <owner>joe@chromium.org</owner> - <owner>marypoppins@chromium.org</owner> - <owner>bert@google.com</owner> + <owner>amy@chromium.org</owner> + <owner>rae@chromium.org</owner> + <owner>kim@chromium.org</owner> <summary>I like maple syrup, too.</summary> + <component>Default>Component</component> </histogram> </histograms> """) + + expand_owners.ExpandHistogramsOWNERS(histograms) + self.assertMultiLineEqual(histograms.toxml(), expected_histograms.toxml()) + + def testExpandOwnersWithDuplicateOwners(self): + """Checks that owners are unique.""" + absolute_path = _MakeOwnersFile('simple_OWNERS', self.temp_dir) + src_relative_path = _GetSrcRelativePath(absolute_path) + + with open(absolute_path, 'w') as owners_file: + owners_file.write('\n'.join( + ['amy@chromium.org', _DEFAULT_COMPONENT, 'rae@chromium.org'])) + + histograms = xml.dom.minidom.parseString(""" +<histograms> + +<histogram name="Caffeination" units="mg"> + <owner>rae@chromium.org</owner> + <owner>{}</owner> + <summary>I like coffee.</summary> +</histogram> + +</histograms> +""".format(src_relative_path)) + + expected_histograms = xml.dom.minidom.parseString(""" +<histograms> + +<histogram name="Caffeination" units="mg"> + <owner>rae@chromium.org</owner> + <owner>amy@chromium.org</owner> + <summary>I like coffee.</summary> + <component>Default>Component</component> +</histogram> + +</histograms> +""") + expand_owners.ExpandHistogramsOWNERS(histograms) self.assertMultiLineEqual(histograms.toxml(), expected_histograms.toxml()) def testExpandOwnersWithFileDirectiveOWNERSFilePath(self): """Checks that OWNERS files with file directives are expanded.""" + simple_absolute_path = _MakeOwnersFile('simple_OWNERS', self.temp_dir) + + with open(simple_absolute_path, 'w') as owners_file: + owners_file.write('naz@chromium.org') + + file_directive_absolute_path = ( + _MakeOwnersFile('file_directive_OWNERS', self.temp_dir)) + file_directive_src_relative_path = ( + _GetSrcRelativePath(file_directive_absolute_path)) + + directive = _GetFileDirective(simple_absolute_path) + with open(file_directive_absolute_path, 'w') as owners_file: + owners_file.write('\n'.join([ + 'amy@chromium.org', directive, 'rae@chromium.org', _DEFAULT_COMPONENT + ])) + histograms = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> <owner>joe@chromium.org</owner> - <owner>src/tools/metrics/histograms/test_files/file_directive_OWNERS</owner> - <owner>bert@google.com</owner> + <owner>{}</owner> <summary>I like coffee.</summary> </histogram> </histograms> -""") +""".format(file_directive_src_relative_path)) + expected_histograms = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> <owner>joe@chromium.org</owner> - <owner>marypoppins@chromium.org</owner> - <owner>ellen@google.com</owner> - <owner>bert@google.com</owner> + <owner>amy@chromium.org</owner> + <owner>naz@chromium.org</owner> + <owner>rae@chromium.org</owner> <summary>I like coffee.</summary> + <component>Default>Component</component> </histogram> </histograms> """) + + expand_owners.ExpandHistogramsOWNERS(histograms) + self.assertEqual(histograms.toxml(), expected_histograms.toxml()) + + def testExpandOwnersForOWNERSFileWithDuplicateComponents(self): + """Checks that only one component tag is added if there are duplicates.""" + absolute_path = _MakeOwnersFile('OWNERS', self.temp_dir) + src_relative_path = _GetSrcRelativePath(absolute_path) + + with open(absolute_path, 'w') as owners_file: + owners_file.write('\n'.join(['amy@chromium.org', _DEFAULT_COMPONENT])) + + duplicate_owner_absolute_path = ( + _MakeOwnersFile('duplicate_owner_OWNERS', self.temp_dir)) + duplicate_owner_src_relative_path = ( + _GetSrcRelativePath(duplicate_owner_absolute_path)) + + with open(duplicate_owner_absolute_path, 'w') as owners_file: + owners_file.write('\n'.join(['rae@chromium.org', _DEFAULT_COMPONENT])) + + histograms = xml.dom.minidom.parseString(""" +<histograms> + +<histogram name="Caffeination" units="mg"> + <owner>joe@chromium.org</owner> + <owner>{}</owner> + <owner>{}</owner> + <summary>I like coffee.</summary> + <component>Default>Component</component> +</histogram> + +</histograms> +""".format(src_relative_path, duplicate_owner_src_relative_path)) + + expected_histograms = xml.dom.minidom.parseString(""" +<histograms> + +<histogram name="Caffeination" units="mg"> + <owner>joe@chromium.org</owner> + <owner>amy@chromium.org</owner> + <owner>rae@chromium.org</owner> + <summary>I like coffee.</summary> + <component>Default>Component</component> +</histogram> + +</histograms> +""") + expand_owners.ExpandHistogramsOWNERS(histograms) self.assertEqual(histograms.toxml(), expected_histograms.toxml()) @@ -94,30 +261,33 @@ </histograms> """) + expected_histograms = histograms_without_file_paths expand_owners.ExpandHistogramsOWNERS(histograms_without_file_paths) self.assertEqual(histograms_without_file_paths, expected_histograms) - def testExpandOwnersWithoutPrimaryOwnerFirst(self): - """Checks that an error is raised when a primary owner is not listed first. + def testExpandOwnersWithoutValidFirstOwner(self): + """Checks that an error is raised when the first owner is not valid. - A primary owner is an individual's email address, e.g. rose@chromium.org. + A valid first owner is an individual's email address, e.g. rae@gmail.com, + or the owner placeholder. """ - histograms_without_primary_owner = xml.dom.minidom.parseString(""" + histograms_without_valid_first_owner = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> - <owner>src/tools/metrics/histograms/test_files/basic_OWNERS</owner> + <owner>src/OWNERS</owner> <summary>I like coffee.</summary> </histogram> </histograms> """) + with self.assertRaisesRegexp( expand_owners.Error, - 'The histogram Caffeination must have a primary owner, i.e. an ' + 'The histogram Caffeination must have a valid first owner, i.e. an ' 'individual\'s email address.'): - expand_owners.ExpandHistogramsOWNERS(histograms_without_primary_owner) + expand_owners.ExpandHistogramsOWNERS(histograms_without_valid_first_owner) def testExpandOwnersWithFakeFilePath(self): """Checks that an error is raised with a fake OWNERS file path.""" @@ -132,30 +302,36 @@ </histograms> """) + with self.assertRaisesRegexp( expand_owners.Error, - r'The path .*src/medium/medium/roast/OWNERS does not exist\.'): - expand_owners.ExpandHistogramsOWNERS(histograms_with_fake_file_path) - + r'The file at .*src/medium/medium/roast/OWNERS does not exist\.'): + expand_owners.ExpandHistogramsOWNERS(histograms_with_fake_file_path) def testExpandOwnersWithoutOwnersFromFile(self): """Checks that an error is raised when no owners can be derived.""" + absolute_path = _MakeOwnersFile('empty_OWNERS', self.temp_dir) + src_relative_path = _GetSrcRelativePath(absolute_path) + + with open(absolute_path, 'w') as owners_file: + owners_file.write('') # Write to the file so that it exists. + histograms_without_owners_from_file = xml.dom.minidom.parseString(""" <histograms> <histogram name="Caffeination" units="mg"> <owner>joe@chormium.org</owner> - <owner>src/tools/metrics/histograms/test_files/empty_OWNERS</owner> + <owner>{}</owner> <summary>I like coffee.</summary> </histogram> </histograms> -""") +""".format(src_relative_path)) + with self.assertRaisesRegexp( expand_owners.Error, - r'No email addresses could be derived from .*empty_OWNERS\.'): - expand_owners.ExpandHistogramsOWNERS( - histograms_without_owners_from_file) + r'No emails could be derived from .*empty_OWNERS\.'): + expand_owners.ExpandHistogramsOWNERS(histograms_without_owners_from_file) def testExpandOwnersWithoutOWNERSPathPrefix(self): """Checks that an error is raised when the path is not well-formatted.""" @@ -170,10 +346,11 @@ </histograms> """) + with self.assertRaisesRegexp( expand_owners.Error, r'The given path latte/OWNERS is not well-formatted.*\.'): - expand_owners.ExpandHistogramsOWNERS(histograms_without_src_prefix) + expand_owners.ExpandHistogramsOWNERS(histograms_without_src_prefix) def testExpandOwnersWithoutOWNERSPathSuffix(self): """Checks that an error is raised when the path is not well-formatted.""" @@ -188,13 +365,11 @@ </histograms> """) + with self.assertRaisesRegexp( expand_owners.Error, r'The given path src/latte/file is not well-formatted.*\.'): - expand_owners.ExpandHistogramsOWNERS(histograms_without_owners_suffix) - - -class ExtractEmailAddressesTest(unittest.TestCase): + expand_owners.ExpandHistogramsOWNERS(histograms_without_owners_suffix) def testExtractEmailAddressesUnsupportedSymbolsIgnored(self): """Checks that unsupported OWNERS files symbols are ignored. @@ -207,22 +382,57 @@ (iv) set noparent (v) white space, e.g. a space or a blank line """ - path = expand_owners._GetOwnersFilePath( - 'src/tools/metrics/histograms/test_files/ignored_symbols_OWNERS') + absolute_path = _MakeOwnersFile('OWNERS', self.temp_dir) + + joe = 'joe@chromium.org' + unsupported_symbols = [ + '# Words.', ' # Words.', '*', 'per-file *OWNERS=*', 'set noparent' + ] + + with open(absolute_path, 'w') as owners_file: + owners_file.write('\n'.join([joe + ' # Words.', _DEFAULT_COMPONENT] + + unsupported_symbols)) + self.assertEqual( - expand_owners._ExtractEmailAddressesFromOWNERS(path), - ['joe@chromium.org']) + expand_owners._ExtractEmailAddressesFromOWNERS(absolute_path), [joe]) def testExtractEmailAddressesLoopRaisesError(self): """Checks that an error is raised if OWNERS file path results in a loop.""" - path = expand_owners._GetOwnersFilePath( - 'src/tools/metrics/histograms/test_files/loop_OWNERS') + file_directive_absolute_path = _MakeOwnersFile('loop_OWNERS', self.temp_dir) + + directive = _GetFileDirective(file_directive_absolute_path) + with open(file_directive_absolute_path, 'w') as owners_file: + owners_file.write(directive) with self.assertRaisesRegexp( - expand_owners.Error, - r'.*The path.*loop_OWNERS may be part of an OWNERS loop\.'): - expand_owners._ExtractEmailAddressesFromOWNERS(path) + expand_owners.Error, + r'.*The path.*loop_OWNERS may be part of an OWNERS loop\.'): + expand_owners._ExtractEmailAddressesFromOWNERS( + file_directive_absolute_path) + + +class GetHigherLevelOwnersFilePathTest(unittest.TestCase): + + def testGetHigherLevelPathDerivedPathInSrcDirectory(self): + """Checks that higher directories are recursively checked for OWNERS.""" + path = expand_owners._GetOwnersFilePath('src/banana/chocolate/OWNERS') + self.assertRegexpMatches( + expand_owners._GetHigherLevelOwnersFilePath(path), r'.*src/OWNERS') + + def testGetHigherLevelPathGivenPathInSrcDirectory(self): + """Checks that '' is returned when the last directory is reached. + + If the directory above the tools directory is src, then receiving + 'src/OWNERS' is the point at which recursion stops. However, this directory + may not always be src. + """ + path_to_chromium_directory = [ + os.path.dirname(__file__), '..', '..', '..', '..' + ] + path = os.path.abspath( + os.path.join(*(path_to_chromium_directory + ['src/OWNERS']))) + self.assertEqual(expand_owners._GetHigherLevelOwnersFilePath(path), '') if __name__ == '__main__': - unittest.main() + unittest.main()
diff --git a/tools/metrics/histograms/extract_histograms.py b/tools/metrics/histograms/extract_histograms.py index 5cb1a726..fbb8f49 100644 --- a/tools/metrics/histograms/extract_histograms.py +++ b/tools/metrics/histograms/extract_histograms.py
@@ -96,7 +96,7 @@ if c.nodeType != xml.dom.minidom.Node.COMMENT_NODE).strip() -def _NormalizeString(s): +def NormalizeString(s): r"""Replaces all whitespace sequences with a single space. The function properly handles multi-line strings and XML escaped characters. @@ -125,7 +125,7 @@ """ if node.nodeType == xml.dom.minidom.Node.ELEMENT_NODE: for a in node.attributes.keys(): - node.attributes[a].value = _NormalizeString(node.attributes[a].value) + node.attributes[a].value = NormalizeString(node.attributes[a].value) for c in node.childNodes: _NormalizeAllAttributeValues(c) @@ -247,7 +247,7 @@ summary_nodes = enum.getElementsByTagName('summary') if summary_nodes: - enum_dict['summary'] = _NormalizeString(_JoinChildNodes(summary_nodes[0])) + enum_dict['summary'] = NormalizeString(_JoinChildNodes(summary_nodes[0])) enums[name] = enum_dict @@ -273,7 +273,7 @@ has_owner = False for owner_node in histogram.getElementsByTagName('owner'): - owner_text = _NormalizeString(_JoinChildNodes(owner_node)) + owner_text = NormalizeString(_JoinChildNodes(owner_node)) is_email = email_pattern.match(owner_text) if owner_text and (is_email or OWNER_PLACEHOLDER in owner_text): @@ -352,7 +352,7 @@ # Find <summary> tag. summary_nodes = histogram.getElementsByTagName('summary') if summary_nodes: - histogram_entry['summary'] = _NormalizeString( + histogram_entry['summary'] = NormalizeString( _JoinChildNodes(summary_nodes[0])) else: histogram_entry['summary'] = 'TBD' @@ -380,7 +380,7 @@ # Find <details> tag. details_nodes = histogram.getElementsByTagName('details') if details_nodes: - histogram_entry['details'] = _NormalizeString( + histogram_entry['details'] = NormalizeString( _JoinChildNodes(details_nodes[0])) # Handle enum types.
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 90eef75..0b1629e 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -71632,6 +71632,9 @@ </histogram> <histogram name="Net.CountOfSpdyServers" expires_after="M77"> + <obsolete> + Removed on 2016-08. + </obsolete> <owner>bnc@chromium.org</owner> <owner>rch@chromium.org</owner> <summary> @@ -73848,6 +73851,16 @@ </summary> </histogram> +<histogram name="Net.HttpServerProperties.CountOfServers" expires_after="M82"> + <owner>zhongyi@chromium.org</owner> + <owner>mmenke@chromium.org</owner> + <summary> + The total number of ServerInfo structs written to the network service's + prefs file, recorded each time the HttpServerProperties are serialized to + update the copy stored on disk. + </summary> +</histogram> + <histogram name="Net.HttpServerProperties.UpdatePrefs" enum="HttpServerPropertiesUpdatePrefsLocation" expires_after="2018-08-30"> <obsolete> @@ -78371,6 +78384,9 @@ </histogram> <histogram name="Net.SSL_Connection_Latency_Full_Handshake" units="ms"> + <obsolete> + Removed 2019-07-19. No longer tracked. + </obsolete> <owner>agl@chromium.org</owner> <summary> Time from when the Connect() starts until it completes for full handshakes. @@ -78488,6 +78504,9 @@ </histogram> <histogram name="Net.SSL_Connection_Latency_Resume_Handshake" units="ms"> + <obsolete> + Removed 2019-07-19. No longer tracked. + </obsolete> <owner>agl@chromium.org</owner> <summary> Time from when the Connect() starts until it completes for resumption @@ -124582,6 +124601,23 @@ <histogram name="ServiceWorkerCache.PeakParallelSharedOps" units="operations" expires_after="M85"> + <obsolete> + Replaced in M78 with ServiceWorkerCache.PeakParallelSharedOps2 that uses a + smaller histogram range with the same number of buckets in order to improve + bucket granularity. + </obsolete> + <owner>wanderview@chromium.org</owner> + <owner>chrome-owp-storage@google.com</owner> + <summary> + The peak number of shared operations that ran simultaneously during a single + "batch" of operations. A batch is defined as the time from when an + idle scheduler begins running a shared operation until the count of running + shared operations drops back to zero. + </summary> +</histogram> + +<histogram name="ServiceWorkerCache.PeakParallelSharedOps2" units="operations" + expires_after="M85"> <owner>wanderview@chromium.org</owner> <owner>chrome-owp-storage@google.com</owner> <summary> @@ -143629,20 +143665,30 @@ <owner>caitlinfischer@google.com</owner> <owner>src/base/metrics/OWNERS</owner> <summary> - The purpose of this histogram is to verify that email addresses can be - extracted from OWNERS files. After verifying, this histogram should be + The purpose of this histogram is to verify that components can be extracted + from an OWNERS file. After verifying, this histogram should be deleted. + </summary> +</histogram> + +<histogram + name="UMA.Dummy.Histogram.CheckOwnersExpansion.ComponentInHigherLevelDirectory"> + <owner>caitlinfischer@google.com</owner> + <owner>src/chrome/browser/metrics/oom/OWNERS</owner> + <summary> + The purpose of this histogram is to verify that a component from a + higher-level directory's OWNERS file is extracted when a component cannot be + found in the given OWNERS file. After verifying, this histogram should be deleted. </summary> </histogram> -<histogram name="UMA.Dummy.Histogram.CheckOwnersExpansion.FileDirective"> - <owner>asvitkine@chromium.org</owner> - <owner>src/testing/variations/OWNERS</owner> - <owner>rkaplow@chromium.org</owner> +<histogram name="UMA.Dummy.Histogram.CheckOwnersExpansion.NoComponent"> + <owner>caitlinfischer@google.com</owner> + <owner>src/jingle/OWNERS</owner> <summary> - The purpose of this histogram is to verify that email addresses can be - extracted from OWNERS files that include a file directive. After verifying, - this histogram should be deleted. + The purpose of this histogram is to verify that no component is added when a + component cannot be found in the given OWNERS file or in an OWNERS file in a + higher-level directory. After verifying, this histogram should be deleted. </summary> </histogram>
diff --git a/tools/metrics/histograms/histograms_print_style.py b/tools/metrics/histograms/histograms_print_style.py index 65828e6d..9dca5c1 100644 --- a/tools/metrics/histograms/histograms_print_style.py +++ b/tools/metrics/histograms/histograms_print_style.py
@@ -17,6 +17,7 @@ # { tag_name: [attribute_name, ...] } ATTRIBUTE_ORDER = { 'affected-histogram': ['name'], + 'component': [], 'details': [], 'enum': ['name'], 'enums': [], @@ -63,7 +64,7 @@ } # Tags that we allow to be squished into a single line for brevity. -TAGS_THAT_ALLOW_SINGLE_LINE = ['summary', 'int', 'owner'] +TAGS_THAT_ALLOW_SINGLE_LINE = ['summary', 'int', 'owner', 'component'] LOWERCASE_NAME_FN = lambda n: n.get('name').lower()
diff --git a/tools/metrics/histograms/pretty_print_test.py b/tools/metrics/histograms/pretty_print_test.py index 07f91e2..b3530a5 100755 --- a/tools/metrics/histograms/pretty_print_test.py +++ b/tools/metrics/histograms/pretty_print_test.py
@@ -25,11 +25,13 @@ Removed 1/2019. </obsolete> </histogram> - <histogram name="Foo.Bar" units="xxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyzzzz"> + <histogram name="Foo.Bar" units="xxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyzzzz"> <summary>Foo</summary> <obsolete>Obsolete 1</obsolete> <obsolete>Obsolete 2</obsolete> <enums>This shouldn't be here</enums> + <component>Component</component> + <component>Other>Component</component> </histogram> </histograms> <enums>This shouldn't be here</enums> @@ -45,11 +47,13 @@ <histograms> -<histogram name="Foo.Bar" units="xxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyzzzz"> +<histogram name="Foo.Bar" units="xxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyzzzz"> <obsolete> Obsolete 1 </obsolete> <summary>Foo</summary> + <component>Component</component> + <component>Other>Component</component> </histogram> <histogram name="Test.Histogram" units="microseconds">
diff --git a/tools/metrics/histograms/test_files/basic_OWNERS b/tools/metrics/histograms/test_files/basic_OWNERS deleted file mode 100644 index 2dcfe0d..0000000 --- a/tools/metrics/histograms/test_files/basic_OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -marypoppins@chromium.org -bert@google.com \ No newline at end of file
diff --git a/tools/metrics/histograms/test_files/file_directive_OWNERS b/tools/metrics/histograms/test_files/file_directive_OWNERS deleted file mode 100644 index 0565103..0000000 --- a/tools/metrics/histograms/test_files/file_directive_OWNERS +++ /dev/null
@@ -1,2 +0,0 @@ -file://tools/metrics/histograms/test_files/basic_OWNERS -ellen@google.com \ No newline at end of file
diff --git a/tools/metrics/histograms/test_files/ignored_symbols_OWNERS b/tools/metrics/histograms/test_files/ignored_symbols_OWNERS deleted file mode 100644 index b31ece0..0000000 --- a/tools/metrics/histograms/test_files/ignored_symbols_OWNERS +++ /dev/null
@@ -1,7 +0,0 @@ -per-file empty_OWNERS=* -* - -# Comment. - # Comment preceded by space. -joe@chromium.org # Comment after email address. -set noparent \ No newline at end of file
diff --git a/tools/metrics/histograms/test_files/loop_OWNERS b/tools/metrics/histograms/test_files/loop_OWNERS deleted file mode 100644 index ea737a0..0000000 --- a/tools/metrics/histograms/test_files/loop_OWNERS +++ /dev/null
@@ -1 +0,0 @@ -file://tools/metrics/histograms/test_files/loop_OWNERS \ No newline at end of file
diff --git a/tools/metrics/metrics_python_tests.py b/tools/metrics/metrics_python_tests.py index 591ada55..d9e3572 100755 --- a/tools/metrics/metrics_python_tests.py +++ b/tools/metrics/metrics_python_tests.py
@@ -21,7 +21,6 @@ sys.exit(typ.main(tests=resolve( 'actions/extract_actions_test.py', - 'histograms/expand_owners_in_histograms_xml_unittest.py', 'histograms/generate_expired_histograms_array_unittest.py', 'histograms/pretty_print_test.py', 'rappor/rappor_model_test.py',
diff --git a/tools/perf/benchmarks/benchmark_smoke_unittest.py b/tools/perf/benchmarks/benchmark_smoke_unittest.py index b9ad8db..519c165a 100644 --- a/tools/perf/benchmarks/benchmark_smoke_unittest.py +++ b/tools/perf/benchmarks/benchmark_smoke_unittest.py
@@ -86,7 +86,7 @@ single_page_benchmark = SinglePageBenchmark() with open(path_util.GetExpectationsPath()) as fp: - single_page_benchmark.AugmentExpectationsWithParser(fp.read()) + single_page_benchmark.AugmentExpectationsWithFile(fp.read()) return_code = single_page_benchmark.Run(options)
diff --git a/tools/perf/benchmarks/system_health_smoke_test.py b/tools/perf/benchmarks/system_health_smoke_test.py index 7534d96..82edcc7 100644 --- a/tools/perf/benchmarks/system_health_smoke_test.py +++ b/tools/perf/benchmarks/system_health_smoke_test.py
@@ -165,7 +165,9 @@ # crbug.com/934885 'system_health.memory_desktop/load_accessibility:media:wikipedia:2018' # crbug.com/942952 - 'system_health.memory_desktop/browse:news:hackernews:2018' + 'system_health.memory_desktop/browse:news:hackernews:2018', + # crbug.com/992436 + 'system_health.memory_desktop/browse:social:twitter:2018' # ] }) @@ -228,7 +230,7 @@ single_page_benchmark = SinglePageBenchmark() with open(path_util.GetExpectationsPath()) as fp: - single_page_benchmark.AugmentExpectationsWithParser(fp.read()) + single_page_benchmark.AugmentExpectationsWithFile(fp.read()) return_code = single_page_benchmark.Run(options)
diff --git a/tools/perf/contrib/media_router_benchmarks/run_benchmark.py b/tools/perf/contrib/media_router_benchmarks/run_benchmark.py index f71ff37..ac177d5 100644 --- a/tools/perf/contrib/media_router_benchmarks/run_benchmark.py +++ b/tools/perf/contrib/media_router_benchmarks/run_benchmark.py
@@ -7,12 +7,10 @@ # Add //tools/perf/ to system path. sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) - +from core import benchmark_runner from core import path_util sys.path.insert(1, path_util.GetTelemetryDir()) -from telemetry import benchmark_runner - from chrome_telemetry_build import chromium_config
diff --git a/tools/perf/core/find_dependencies.py b/tools/perf/core/find_dependencies.py index 8724370..b7a8f8bd 100644 --- a/tools/perf/core/find_dependencies.py +++ b/tools/perf/core/find_dependencies.py
@@ -137,7 +137,7 @@ # have Telemetry. dependencies |= FindPythonDependencies(os.path.realpath( os.path.join(path_util.GetTelemetryDir(), - 'telemetry', 'benchmark_runner.py'))) + 'telemetry', 'command_line', 'parser.py'))) dependencies |= FindPythonDependencies(os.path.realpath( os.path.join(path_util.GetTelemetryDir(), 'telemetry', 'testing', 'run_tests.py')))
diff --git a/tools/perf/core/story_expectation_validator.py b/tools/perf/core/story_expectation_validator.py index 1d32fc0..222ea54 100755 --- a/tools/perf/core/story_expectation_validator.py +++ b/tools/perf/core/story_expectation_validator.py
@@ -4,8 +4,6 @@ # found in the LICENSE file. """Script to check validity of StoryExpectations.""" -import argparse -import json import logging import os @@ -41,41 +39,7 @@ assert not unused_patterns, unused_patterns -def GetDisabledStories(benchmarks, raw_expectations_data): - # Creates a dictionary of the format: - # { - # 'benchmark_name1' : { - # 'story_1': [ - # {'conditions': conditions, 'reason': reason}, - # ... - # ], - # ... - # }, - # ... - # } - disables = {} - for benchmark in benchmarks: - name = benchmark.Name() - disables[name] = {} - b = benchmark() - b.AugmentExpectationsWithParser(raw_expectations_data) - expectations = b.expectations.AsDict()['stories'] - for story in expectations: - for conditions, reason in expectations[story]: - if not disables[name].get(story): - disables[name][story] = [] - conditions_str = [str(a) for a in conditions] - disables[name][story].append((conditions_str, reason)) - return disables - - -def main(args): - parser = argparse.ArgumentParser( - description=('Tests if disabled stories exist.')) - parser.add_argument( - '--list', action='store_true', default=False, - help=('Prints list of disabled stories.')) - options = parser.parse_args(args) +def main(): benchmarks = benchmark_finders.GetAllBenchmarks() with open(path_util.GetExpectationsPath()) as fp: raw_expectations_data = fp.read() @@ -84,9 +48,5 @@ if ret: logging.error(msg) return ret - if options.list: - stories = GetDisabledStories(benchmarks, raw_expectations_data) - print json.dumps(stories, sort_keys=True, indent=4, separators=(',', ': ')) - else: - validate_story_names(benchmarks, test_expectations) + validate_story_names(benchmarks, test_expectations) return 0
diff --git a/tools/perf/validate_story_expectation_data b/tools/perf/validate_story_expectation_data index a39435a..74fb461 100755 --- a/tools/perf/validate_story_expectation_data +++ b/tools/perf/validate_story_expectation_data
@@ -9,4 +9,4 @@ if __name__ == '__main__': - sys.exit(story_expectation_validator.main(sys.argv[1:])) + sys.exit(story_expectation_validator.main())
diff --git a/tools/traffic_annotation/summary/annotations.xml b/tools/traffic_annotation/summary/annotations.xml index 4554700..75eadcb0 100644 --- a/tools/traffic_annotation/summary/annotations.xml +++ b/tools/traffic_annotation/summary/annotations.xml
@@ -25,7 +25,7 @@ <item id="bidirectional_stream" hash_code="108665132" type="0" content_hash_code="130038340" os_list="linux,windows" file_path="net/http/bidirectional_stream.cc"/> <item id="blink_extension_resource_loader" hash_code="84165821" type="0" content_hash_code="3695143" os_list="linux,windows" file_path="content/renderer/loader/web_url_loader_impl.cc"/> <item id="blink_resource_loader" hash_code="101845102" type="0" content_hash_code="75331172" os_list="linux,windows" file_path="content/renderer/loader/web_url_loader_impl.cc"/> - <item id="blob_read" hash_code="112303907" type="0" content_hash_code="135449692" os_list="linux,windows" file_path="storage/browser/blob/blob_url_request_job_factory.cc"/> + <item id="blob_read" hash_code="112303907" type="0" deprecated="2019-08-09" content_hash_code="135449692" file_path=""/> <item id="blob_reader" hash_code="5154306" type="0" deprecated="2018-06-14" content_hash_code="39702178" file_path=""/> <item id="bluetooth_socket" hash_code="94099818" type="0" content_hash_code="30932349" os_list="linux,windows" file_path="device/bluetooth/bluetooth_socket_net.cc"/> <item id="brandcode_config" hash_code="109679553" type="0" content_hash_code="128843792" os_list="linux,windows" file_path="chrome/browser/profile_resetter/brandcode_config_fetcher.cc"/> @@ -145,6 +145,7 @@ <item id="lib_address_input" hash_code="50816767" type="0" content_hash_code="57977576" os_list="linux,windows" file_path="third_party/libaddressinput/chromium/chrome_metadata_source.cc"/> <item id="logo_service" hash_code="35473769" type="0" content_hash_code="20271299" os_list="linux,windows" file_path="components/search_provider_logos/logo_service_impl.cc"/> <item id="logo_tracker" hash_code="36859107" type="0" deprecated="2018-12-07" content_hash_code="67588075" file_path=""/> + <item id="lookup_single_password_leak" hash_code="16927377" type="0" content_hash_code="12158296" os_list="linux,windows" file_path="components/password_manager/core/browser/leak_detection/leak_detection_request.cc"/> <item id="metrics_report_ukm" hash_code="727478" type="0" content_hash_code="102972932" os_list="linux,windows" file_path="components/metrics/net/net_metrics_log_uploader.cc"/> <item id="metrics_report_uma" hash_code="727528" type="0" content_hash_code="10176197" os_list="linux,windows" file_path="components/metrics/net/net_metrics_log_uploader.cc"/> <item id="mirroring_get_setup_info" hash_code="78447809" type="0" content_hash_code="112561099" os_list="linux,windows" file_path="components/mirroring/service/session_monitor.cc"/>
diff --git a/ui/accessibility/platform/test_ax_node_wrapper.cc b/ui/accessibility/platform/test_ax_node_wrapper.cc index 5efa1c8f..acd18840 100644 --- a/ui/accessibility/platform/test_ax_node_wrapper.cc +++ b/ui/accessibility/platform/test_ax_node_wrapper.cc
@@ -555,6 +555,15 @@ base::string16 TestAXNodeWrapper::GetLocalizedStringForRoleDescription() const { const AXNodeData& data = GetData(); switch (data.role) { + case ax::mojom::Role::kAudio: + return base::ASCIIToUTF16("audio"); + + case ax::mojom::Role::kDetails: + return base::ASCIIToUTF16("details"); + + case ax::mojom::Role::kMeter: + return base::ASCIIToUTF16("meter"); + case ax::mojom::Role::kSearchBox: return base::ASCIIToUTF16("search box"); @@ -562,7 +571,9 @@ std::string input_type; if (data.GetStringAttribute(ax::mojom::StringAttribute::kInputType, &input_type)) { - if (input_type == "tel") { + if (input_type == "email") { + return base::ASCIIToUTF16("email"); + } else if (input_type == "tel") { return base::ASCIIToUTF16("telephone"); } else if (input_type == "url") { return base::ASCIIToUTF16("url");
diff --git a/ui/base/OWNERS b/ui/base/OWNERS index f66e0c2..c46a277 100644 --- a/ui/base/OWNERS +++ b/ui/base/OWNERS
@@ -1,4 +1,7 @@ -per-file template_expressions*=dschuyler@chromium.org +per-file template_expressions*=dbeam@chromium.org +per-file template_expressions*=dpapad@chromium.org +per-file template_expressions*=michaelpg@chromium.org +per-file template_expressions*=rbpotter@chromium.org # If you're doing structural changes get a review from one of the ui/OWNERS. per-file BUILD.gn=*
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc index 82bdc4e..87a8200 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc
@@ -15,7 +15,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/numerics/safe_conversions.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h"
diff --git a/ui/base/ime/linux/fake_input_method_context.h b/ui/base/ime/linux/fake_input_method_context.h index 0fd8fdf5..2b6953f1e 100644 --- a/ui/base/ime/linux/fake_input_method_context.h +++ b/ui/base/ime/linux/fake_input_method_context.h
@@ -5,13 +5,15 @@ #ifndef UI_BASE_IME_LINUX_FAKE_INPUT_METHOD_CONTEXT_H_ #define UI_BASE_IME_LINUX_FAKE_INPUT_METHOD_CONTEXT_H_ +#include "base/component_export.h" #include "base/macros.h" #include "ui/base/ime/linux/linux_input_method_context.h" namespace ui { // A fake implementation of LinuxInputMethodContext, which does nothing. -class FakeInputMethodContext : public LinuxInputMethodContext { +class COMPONENT_EXPORT(UI_BASE_IME_LINUX) FakeInputMethodContext + : public LinuxInputMethodContext { public: FakeInputMethodContext();
diff --git a/ui/base/ime/win/tsf_bridge.cc b/ui/base/ime/win/tsf_bridge.cc index 4cd0e61..5d4455e4 100644 --- a/ui/base/ime/win/tsf_bridge.cc +++ b/ui/base/ime/win/tsf_bridge.cc
@@ -8,7 +8,7 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/no_destructor.h" #include "base/stl_util.h" #include "base/threading/thread_local_storage.h"
diff --git a/ui/base/ime/win/tsf_input_scope.cc b/ui/base/ime/win/tsf_input_scope.cc index 71516e2..9015e8ba 100644 --- a/ui/base/ime/win/tsf_input_scope.cc +++ b/ui/base/ime/win/tsf_input_scope.cc
@@ -9,7 +9,7 @@ #include "base/compiler_specific.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/stl_util.h" #include "base/win/windows_version.h"
diff --git a/ui/base/material_design/material_design_controller.cc b/ui/base/material_design/material_design_controller.cc index 261c0c5..66d19aca 100644 --- a/ui/base/material_design/material_design_controller.cc +++ b/ui/base/material_design/material_design_controller.cc
@@ -10,7 +10,7 @@ #include "base/command_line.h" #include "base/feature_list.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/no_destructor.h" #include "base/observer_list.h" #include "base/strings/string_number_conversions.h"
diff --git a/ui/base/mpris/mpris_service_impl.cc b/ui/base/mpris/mpris_service_impl.cc index 2f9ee2e..648a0bc 100644 --- a/ui/base/mpris/mpris_service_impl.cc +++ b/ui/base/mpris/mpris_service_impl.cc
@@ -107,6 +107,11 @@ } void MprisServiceImpl::SetArtist(const base::string16& value) { + // xesam:artist is actually supposed to be a list of strings, but base::Value + // only supports lists of base::Value, which makes this difficult to correctly + // propagate to |AddPropertiesToWriter()|. Instead, we'll only track the + // string in |media_player2_player_properties_| and special-case within + // |AddPropertiesToWriter()|. SetMetadataPropertyInternal("xesam:artist", base::Value(value)); } @@ -378,7 +383,13 @@ } else if (interface == kMprisAPIPlayerInterfaceName) { auto property_iter = media_player2_player_properties_.find(property_name); if (property_iter != media_player2_player_properties_.end()) { - dbus::AppendValueDataAsVariant(&writer, property_iter->second); + if (property_name == "Metadata") { + const base::DictionaryValue* metadata = nullptr; + property_iter->second.GetAsDictionary(&metadata); + AddMetadataToWriter(&writer, metadata); + } else { + dbus::AppendValueDataAsVariant(&writer, property_iter->second); + } success = true; } } @@ -404,13 +415,62 @@ for (auto& property : properties) { array_writer.OpenDictEntry(&dict_entry_writer); dict_entry_writer.AppendString(property.first); - dbus::AppendValueDataAsVariant(&dict_entry_writer, property.second); + + if (property.first == "Metadata") { + const base::DictionaryValue* metadata = nullptr; + property.second.GetAsDictionary(&metadata); + AddMetadataToWriter(&dict_entry_writer, metadata); + } else { + dbus::AppendValueDataAsVariant(&dict_entry_writer, property.second); + } + array_writer.CloseContainer(&dict_entry_writer); } writer->CloseContainer(&array_writer); } +void MprisServiceImpl::AddMetadataToWriter( + dbus::MessageWriter* writer, + const base::DictionaryValue* metadata) { + // We need to special-case Metadata's xesam:artist when emitting properties, + // since |dbus::AppendValueDataAsVariant()| only supports arrays of variants + // and not arrays of strings. + DCHECK(writer); + DCHECK(metadata); + + dbus::MessageWriter metadata_variant_writer(nullptr); + writer->OpenVariant("a{sv}", &metadata_variant_writer); + dbus::MessageWriter metadata_writer(nullptr); + metadata_variant_writer.OpenArray("{sv}", &metadata_writer); + + for (base::DictionaryValue::Iterator iter(*metadata); !iter.IsAtEnd(); + iter.Advance()) { + dbus::MessageWriter metadata_entry_writer(nullptr); + metadata_writer.OpenDictEntry(&metadata_entry_writer); + metadata_entry_writer.AppendString(iter.key()); + + if (iter.key() == "xesam:artist") { + // Here, we convert our string value for artist into an array of + // strings to append to the message. + dbus::MessageWriter artist_writer(nullptr); + metadata_entry_writer.OpenVariant("as", &artist_writer); + + std::vector<std::string> artists{iter.value().GetString()}; + artist_writer.AppendArrayOfStrings(artists); + + metadata_entry_writer.CloseContainer(&artist_writer); + } else { + dbus::AppendValueDataAsVariant(&metadata_entry_writer, iter.value()); + } + + metadata_writer.CloseContainer(&metadata_entry_writer); + } + + metadata_variant_writer.CloseContainer(&metadata_writer); + writer->CloseContainer(&metadata_variant_writer); +} + void MprisServiceImpl::SetPropertyInternal(PropertyMap& property_map, const std::string& property_name, const base::Value& new_value) {
diff --git a/ui/base/mpris/mpris_service_impl.h b/ui/base/mpris/mpris_service_impl.h index 8999a77..2e4a404 100644 --- a/ui/base/mpris/mpris_service_impl.h +++ b/ui/base/mpris/mpris_service_impl.h
@@ -19,6 +19,7 @@ #include "ui/base/mpris/mpris_service.h" namespace base { +class DictionaryValue; class Value; } // namespace base @@ -113,6 +114,12 @@ void AddPropertiesToWriter(dbus::MessageWriter* writer, const PropertyMap& properties); + // Writes the metadata property onto writer. Metadata is handled differently + // than other properties since it has sub-properties that need to be handled + // as non-variants. + void AddMetadataToWriter(dbus::MessageWriter* writer, + const base::DictionaryValue* metadata); + // Map of org.mpris.MediaPlayer2 interface properties. PropertyMap media_player2_properties_;
diff --git a/ui/base/template_expressions.cc b/ui/base/template_expressions.cc index fbbeb320..c1e809a3 100644 --- a/ui/base/template_expressions.cc +++ b/ui/base/template_expressions.cc
@@ -7,6 +7,7 @@ #include <stddef.h> #include "base/logging.h" +#include "base/optional.h" #include "base/stl_util.h" #include "base/values.h" #include "net/base/escape.h" @@ -16,6 +17,50 @@ const size_t kLeaderSize = base::size(kLeader) - 1; const char kKeyOpen = '{'; const char kKeyClose = '}'; +const char kHtmlTemplateStart[] = "_template: html`"; +const size_t kHtmlTemplateStartSize = base::size(kHtmlTemplateStart) - 1; + +// Currently only legacy _template: html`...`, syntax is supported. +enum HtmlTemplateType { NONE = 0, LEGACY = 1 }; + +struct TemplatePosition { + HtmlTemplateType type; + base::StringPiece::size_type position; +}; + +TemplatePosition FindHtmlTemplateStart(const base::StringPiece& source) { + base::StringPiece::size_type found = source.find(kHtmlTemplateStart); + HtmlTemplateType type = found == base::StringPiece::npos ? NONE : LEGACY; + return {type, found + kHtmlTemplateStartSize}; +} + +TemplatePosition FindHtmlTemplateEnd(const base::StringPiece& source) { + enum State { OPEN, IN_ESCAPE, IN_TICK }; + State state = OPEN; + + for (base::StringPiece::size_type i = 0; i < source.length(); i++) { + if (state == IN_ESCAPE) { + state = OPEN; // Consume + continue; + } + + switch (source[i]) { + case '\\': + state = IN_ESCAPE; + break; + case '`': + state = IN_TICK; + break; + case ',': + if (state == IN_TICK) + return {LEGACY, i - 1}; + FALLTHROUGH; + default: + state = OPEN; + } + } + return {NONE, base::StringPiece::npos}; +} // Escape quotes and backslashes ('"\). std::string PolymerParameterEscape(const std::string& in_string) { @@ -42,29 +87,37 @@ return out; } -} // namespace - -namespace ui { - -void TemplateReplacementsFromDictionaryValue( - const base::DictionaryValue& dictionary, - TemplateReplacements* replacements) { - for (base::DictionaryValue::Iterator it(dictionary); !it.IsAtEnd(); - it.Advance()) { - if (it.value().is_string()) { - std::string str_value; - if (it.value().GetAsString(&str_value)) - (*replacements)[it.key()] = str_value; +bool EscapeForJS(const std::string& in_string, + base::Optional<char> in_previous, + std::string* out_string) { + out_string->reserve(in_string.size() * 2); + bool last_was_dollar = in_previous && in_previous.value() == '$'; + for (const char c : in_string) { + switch (c) { + case '`': + out_string->append("\\`"); + break; + case '{': + // Do not allow "${". + if (last_was_dollar) + return false; + *out_string += c; + break; + default: + *out_string += c; } + last_was_dollar = c == '$'; } + return true; } -std::string ReplaceTemplateExpressions( +bool ReplaceTemplateExpressionsInternal( base::StringPiece source, - const TemplateReplacements& replacements) { - std::string formatted; + const ui::TemplateReplacements& replacements, + bool is_javascript, + std::string* formatted) { const size_t kValueLengthGuess = 16; - formatted.reserve(source.length() + replacements.size() * kValueLengthGuess); + formatted->reserve(source.length() + replacements.size() * kValueLengthGuess); // Two position markers are used as cursors through the |source|. // The |current_pos| will follow behind |next_pos|. size_t current_pos = 0; @@ -72,12 +125,12 @@ size_t next_pos = source.find(kLeader, current_pos); if (next_pos == std::string::npos) { - source.substr(current_pos).AppendToString(&formatted); + source.substr(current_pos).AppendToString(formatted); break; } source.substr(current_pos, next_pos - current_pos) - .AppendToString(&formatted); + .AppendToString(formatted); current_pos = next_pos + kLeaderSize; size_t context_end = source.find(kKeyOpen, current_pos); @@ -99,6 +152,17 @@ << "\" not found"; std::string replacement = value->second; + if (is_javascript) { + // Run JS escaping first. + base::Optional<char> last = formatted->empty() + ? base::nullopt + : base::make_optional(formatted->back()); + std::string escaped_replacement; + if (!EscapeForJS(replacement, last, &escaped_replacement)) + return false; + replacement = escaped_replacement; + } + if (context.empty()) { // Make the replacement HTML safe. replacement = net::EscapeForHTML(replacement); @@ -111,11 +175,75 @@ CHECK(false) << "Unknown context " << context; } - formatted.append(replacement); + formatted->append(replacement); current_pos = key_end + sizeof(kKeyClose); } - return formatted; + return true; } +} // namespace + +namespace ui { + +void TemplateReplacementsFromDictionaryValue( + const base::DictionaryValue& dictionary, + TemplateReplacements* replacements) { + for (base::DictionaryValue::Iterator it(dictionary); !it.IsAtEnd(); + it.Advance()) { + std::string str_value; + if (it.value().GetAsString(&str_value)) + (*replacements)[it.key()] = str_value; + } +} + +bool ReplaceTemplateExpressionsInJS(base::StringPiece source, + const TemplateReplacements& replacements, + std::string* formatted) { + // Replacement is only done in JS for the contents of the HTML _template + // string. + TemplatePosition start_result = FindHtmlTemplateStart(source); + if (start_result.type == NONE) { + *formatted = source.as_string(); + return true; + } + + // Only one template allowed per file. + TemplatePosition second_start_result = + FindHtmlTemplateStart(source.substr(start_result.position)); + if (second_start_result.type != NONE) + return false; + + TemplatePosition end_result = + FindHtmlTemplateEnd(source.substr(start_result.position)); + + // Template must be properly terminated. + if (start_result.type != end_result.type) + return false; + + // Retrieve the HTML portion of the source. + base::StringPiece html_template = + source.substr(start_result.position, end_result.position); + + // Perform replacements with JS escaping. + std::string formatted_html; + if (!ReplaceTemplateExpressionsInternal(html_template, replacements, true, + &formatted_html)) { + return false; + } + + // Re-assemble the JS file. + *formatted = + source.substr(0, start_result.position).as_string() + formatted_html + + source.substr(start_result.position + end_result.position).as_string(); + return true; +} + +std::string ReplaceTemplateExpressions( + base::StringPiece source, + const TemplateReplacements& replacements) { + std::string formatted; + ReplaceTemplateExpressionsInternal(source, replacements, false, &formatted); + return formatted; +} } // namespace ui
diff --git a/ui/base/template_expressions.h b/ui/base/template_expressions.h index ae52aa66..a2768258 100644 --- a/ui/base/template_expressions.h +++ b/ui/base/template_expressions.h
@@ -31,12 +31,30 @@ TemplateReplacements* replacements); // Replace $i18n*{foo} in the format string with the value for the foo key in -// |subst|. If the key is not found in the |substitutions| that item will +// |replacements|. If the key is not found in the |replacements| that item will // be unaltered. UI_BASE_EXPORT std::string ReplaceTemplateExpressions( base::StringPiece source, const TemplateReplacements& replacements); +// Replace $i18n*{foo} in the HTML template contained in |source| with the +// value for the foo key in |replacements| and return the result in |output|. +// Only $i18n*{...} expressions in the HTML portion of the JS source will be +// replaced; such expressions in the rest of the JS code will be left unaltered. +// If no template is found, |source| will be returned in |output| unaltered. If +// a key is not found in the |replacements| that item will be unaltered. Returns +// true on success, false on failure. On failure, |output| will not populated. +// Replacement will fail if a single HTML template string cannot be identified +// (e.g. not terminated, multiple _template: html`... in a single file), or if +// executing the replacements would be unsafe (e.g. result in unescaped +// backticks or "${" within the HTML string). +// Note: Currently, this only supports the legacy Polymer syntax, i.e.: +// _template: html` ... `, +UI_BASE_EXPORT bool ReplaceTemplateExpressionsInJS( + base::StringPiece source, + const TemplateReplacements& replacements, + std::string* output); + } // namespace ui #endif // UI_BASE_TEMPLATE_EXPRESSIONS_H_
diff --git a/ui/base/template_expressions_unittest.cc b/ui/base/template_expressions_unittest.cc index 0866d10..4925221 100644 --- a/ui/base/template_expressions_unittest.cc +++ b/ui/base/template_expressions_unittest.cc
@@ -4,6 +4,7 @@ #include "ui/base/template_expressions.h" +#include "base/test/gtest_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace ui { @@ -88,4 +89,264 @@ substitutions)); } +struct TestCase { + const char* js_in; + const char* expected_out; +}; + +TEST(TemplateExpressionsTest, JSNoReplacementOutsideTemplate) { + TemplateReplacements substitutions; + substitutions["test"] = "word"; + substitutions["5"] = "number"; + + const TestCase kTestCases[] = { + // No substitutions should occur in normal JS code. + {"console.log('hello world');", "console.log('hello world');"}, + // Has HTML content but nothing to substitute. + {"Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">Button Name</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">Button Name</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});"}, + // Basic substitution with template on 1 line. + {"Polymer({\n" + " _template: html`<div>$i18n{test}</div>`,\n" + " is: 'foo-element',\n" + "});", + "Polymer({\n" + " _template: html`<div>word</div>`,\n" + " is: 'foo-element',\n" + "});"}, + // Test case in which only the first $i18n{...} should be substituted, + // since the second is not in the HTML template string. + {"Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">$i18n{test}</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log($i18n{5}); },\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">word</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log($i18n{5}); },\n" + "});"}, + // Test case with multiple valid substitutions. + {"Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">$i18n{test}</button>\n" + " <span>$i18n{5}</span>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <button on-click=\"onClick_\">word</button>\n" + " <span>number</span>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});"}, + // Test cases verifying escaped backticks are not detected as the end of + // the template. + {"Polymer({\n" + " _template: html`<div>backtick\\`,$i18n{test}</div>`,\n" + " is: 'foo-element',\n" + "});", + "Polymer({\n" + " _template: html`<div>backtick\\`,word</div>`,\n" + " is: 'foo-element',\n" + "});"}, + {"Polymer({\n" + " _template: html`<div>backtick\\`,$i18n{test}</div>\\\\`,\n" + " is: 'foo-element',\n" + "});", + "Polymer({\n" + " _template: html`<div>backtick\\`,word</div>\\\\`,\n" + " is: 'foo-element',\n" + "});"}}; + + std::string formatted; + for (const TestCase test_case : kTestCases) { + ASSERT_TRUE(ReplaceTemplateExpressionsInJS(test_case.js_in, substitutions, + &formatted)); + EXPECT_EQ(test_case.expected_out, formatted); + formatted.clear(); + } +} + +TEST(TemplateExpressionsTest, JSReplacementsEscape) { + TemplateReplacements substitutions; + substitutions["backtickSample"] = + "`, attached: function() { alert(1); },_template: html`"; + substitutions["dollarSignSample"] = "5$"; + substitutions["punctuationSample"] = "a\"b'c<d>e&f"; + substitutions["htmlSample"] = "<div>hello</div>"; + + const TestCase kTestCases[] = { + // Substitution with a backtick in the replacement. + {"Polymer({\n" + " _template: html`\n" + " <span>\n" + " $i18n{backtickSample}\n" + " </span>\n" + " <button on-click=\"onClick_\">Button</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <span>\n" + " \\`, attached: function() { alert(1); },_template: html\\`\n" + " </span>\n" + " <button on-click=\"onClick_\">Button</button>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});"}, + // Backtick in one replacement, HTML escapes in other replacements + {"Polymer({\n" + " _template: html`\n" + " <span>\n" + " $i18n{backtickSample}\n" + " </span>\n" + " <button on-click=\"onClick_\">\n" + " $i18n{punctuationSample}.\n" + " </button>\n" + " <div>$i18n{htmlSample}</div>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <span>\n" + " \\`, attached: function() { alert(1); },_template: html\\`\n" + " </span>\n" + " <button on-click=\"onClick_\">\n" + " a"b'c<d>e&f.\n" + " </button>\n" + " <div><div>hello</div></div>\n" + " `,\n" + " is: 'foo-element',\n" + " onClick_: function() { console.log('hello'); },\n" + "});"}, + // Replacement contains a '$' that isn't accompanied by a subsequent '{', + // so should be replaced correctly. + {"Polymer({\n" + " _template: html`\n" + " <div>Price is: $i18n{dollarSignSample}</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + "Polymer({\n" + " _template: html`\n" + " <div>Price is: 5$</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});"}}; + std::string formatted; + for (const TestCase test_case : kTestCases) { + ASSERT_TRUE(ReplaceTemplateExpressionsInJS(test_case.js_in, substitutions, + &formatted)); + EXPECT_EQ(test_case.expected_out, formatted); + formatted.clear(); + } +} + +TEST(TemplateExpressionsTest, JSReplacementsError) { + TemplateReplacements substitutions; + substitutions["test"] = "${foo + bar}"; + substitutions["testa"] = "5$"; + substitutions["testb"] = "{a + b}"; + + // All these cases should fail. + const TestCase kTestCases[] = { + // 2 HTML template strings are not allowed. + {"Polymer({\n" + " _template: html`\n" + " <span>Hello</span>\n" + " `,\n" + " _template: html`\n" + " <div>World</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // Nested templates not allowed. + {"Polymer({\n" + " _template: html`\n" + " _template: html`\n" + " <span>Hello</span>\n" + " `,\n" + " <div>World</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // 2 starts, one end. + {"Polymer({\n" + " _template: html`\n" + " _template: html`\n" + " <span>Hello</span>\n" + " <div>World</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // Replacement contains "${". + {"Polymer({\n" + " _template: html`\n" + " <div>$i18n{test}</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // 2 replacements, when combined, create "${". + {"Polymer({\n" + " _template: html`\n" + " <div>$i18n{testa}$i18n{testb}</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // Replacement, when combined with content preceding it, creates "${". + {"Polymer({\n" + " _template: html`\n" + " <div>Price is: $$i18n{testb}</div>\n" + " `,\n" + " is: 'foo-element',\n" + "});", + ""}, + // HTML _template string is not terminated. + {"Polymer({\n" + " _template: html`\n" + " <div>Price is: $i18n{testa}</div>\n" + " <span>Fake ending</span>\\\\\\`,\n" + " is: 'foo-element',\n" + "});", + ""}, + }; + + std::string formatted; + for (const TestCase test_case : kTestCases) { + ASSERT_FALSE(ReplaceTemplateExpressionsInJS(test_case.js_in, substitutions, + &formatted)); + formatted.clear(); + } +} + } // namespace ui
diff --git a/ui/base/test/scoped_fake_nswindow_fullscreen.mm b/ui/base/test/scoped_fake_nswindow_fullscreen.mm index 5ffd6e0..201a3e7 100644 --- a/ui/base/test/scoped_fake_nswindow_fullscreen.mm +++ b/ui/base/test/scoped_fake_nswindow_fullscreen.mm
@@ -13,7 +13,7 @@ #import "base/mac/scoped_objc_class_swizzler.h" #import "base/mac/sdk_forward_declarations.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h"
diff --git a/ui/base/test/ui_controls_mac.mm b/ui/base/test/ui_controls_mac.mm index 8f25b5b..d506b49 100644 --- a/ui/base/test/ui_controls_mac.mm +++ b/ui/base/test/ui_controls_mac.mm
@@ -11,7 +11,7 @@ #include "base/callback.h" #import "base/mac/foundation_util.h" #import "base/mac/scoped_objc_class_swizzler.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/stl_util.h" #include "base/threading/thread_task_runner_handle.h" #include "ui/base/cocoa/cocoa_base_utils.h"
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc index 486a0b1..6e464c5 100644 --- a/ui/compositor/layer_unittest.cc +++ b/ui/compositor/layer_unittest.cc
@@ -64,6 +64,8 @@ #include "ui/gfx/skia_util.h" #if defined(OS_WIN) +#include <windows.h> + #include "base/win/windows_version.h" #endif
diff --git a/ui/events/blink/fling_booster.h b/ui/events/blink/fling_booster.h index 10f1e9c..4adcb68f 100644 --- a/ui/events/blink/fling_booster.h +++ b/ui/events/blink/fling_booster.h
@@ -24,11 +24,11 @@ const blink::WebGestureEvent& gesture_start); void ObserveGestureEvent(const blink::WebGestureEvent& gesture_event); void ObserveProgressFling(const gfx::Vector2dF& current_velocity); + void Reset(); private: bool ShouldBoostFling(const blink::WebGestureEvent& fling_start_event); - void Reset(); // When non-null, the current gesture stream is being considered for // boosting. If a fling hasn't occurred by this time, we won't cause a boost.
diff --git a/ui/events/gesture_detection/gesture_detector.cc b/ui/events/gesture_detection/gesture_detector.cc index b9a807c..3468f41 100644 --- a/ui/events/gesture_detection/gesture_detector.cc +++ b/ui/events/gesture_detection/gesture_detector.cc
@@ -481,6 +481,10 @@ } void GestureDetector::Cancel() { + // Stop waiting for a second tap and send a GESTURE_TAP_CANCEL to keep the + // gesture stream valid. + if (timeout_handler_->HasTimeout(TAP)) + listener_->OnTapCancel(*current_down_event_); CancelTaps(); velocity_tracker_.Clear(); all_pointers_within_slop_regions_ = false;
diff --git a/ui/events/gesture_detection/gesture_listeners.h b/ui/events/gesture_detection/gesture_listeners.h index df2321e..f2fd09b 100644 --- a/ui/events/gesture_detection/gesture_listeners.h +++ b/ui/events/gesture_detection/gesture_listeners.h
@@ -34,6 +34,7 @@ float velocity_x, float velocity_y) = 0; virtual bool OnTwoFingerTap(const MotionEvent& e1, const MotionEvent& e2) = 0; + virtual void OnTapCancel(const MotionEvent& e) = 0; }; // Client through which |GestureDetector| signals double-tap detection. @@ -72,6 +73,7 @@ float velocity_x, float velocity_y) override; bool OnTwoFingerTap(const MotionEvent& e1, const MotionEvent& e2) override; + void OnTapCancel(const MotionEvent& e) override {} // DoubleTapListener implementation. bool OnSingleTapConfirmed(const MotionEvent& e) override;
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc index 6cbe3ff..defe1e24 100644 --- a/ui/events/gesture_detection/gesture_provider.cc +++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -166,11 +166,12 @@ void Send(GestureEventData gesture) { DCHECK(!gesture.time.is_null()); // The only valid events that should be sent without an active touch - // sequence are SHOW_PRESS and TAP, potentially triggered by the double-tap - // delay timing out. + // sequence are SHOW_PRESS, TAP and TAP_CANCEL, potentially triggered by + // the double-tap delay timing out or being cancelled. DCHECK(!current_down_action_event_time_.is_null() || gesture.type() == ET_GESTURE_TAP || gesture.type() == ET_GESTURE_SHOW_PRESS || + gesture.type() == ET_GESTURE_TAP_CANCEL || gesture.type() == ET_GESTURE_BEGIN || gesture.type() == ET_GESTURE_END); @@ -459,6 +460,10 @@ return true; } + void OnTapCancel(const MotionEvent& e) override { + Send(CreateGesture(ET_GESTURE_TAP_CANCEL, e)); + } + void OnShowPress(const MotionEvent& e) override { GestureEventDetails show_press_details(ET_GESTURE_SHOW_PRESS); show_press_details.set_device_type(GestureDeviceType::DEVICE_TOUCHSCREEN);
diff --git a/ui/events/gesture_detection/gesture_provider_unittest.cc b/ui/events/gesture_detection/gesture_provider_unittest.cc index 760ef022..3451986 100644 --- a/ui/events/gesture_detection/gesture_provider_unittest.cc +++ b/ui/events/gesture_detection/gesture_provider_unittest.cc
@@ -682,6 +682,25 @@ EXPECT_FALSE(gesture_provider_->OnTouchEvent(event)); } +TEST_F(GestureProviderTest, TapPendingConfirmationCancelledOnCancelEvent) { + const base::TimeTicks event_time = TimeTicks::Now(); + MockMotionEvent event = + ObtainMotionEvent(event_time, MotionEvent::Action::DOWN); + EXPECT_TRUE(gesture_provider_->OnTouchEvent(event)); + EXPECT_EQ(ET_GESTURE_TAP_DOWN, GetMostRecentGestureEventType()); + + event = + ObtainMotionEvent(event_time + kOneMicrosecond, MotionEvent::Action::UP); + gesture_provider_->OnTouchEvent(event); + EXPECT_EQ(ET_GESTURE_TAP_UNCONFIRMED, GetMostRecentGestureEventType()); + EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points()); + + event = ObtainMotionEvent(event_time + kOneMicrosecond * 2, + MotionEvent::Action::CANCEL); + gesture_provider_->OnTouchEvent(event); + EXPECT_EQ(ET_GESTURE_TAP_CANCEL, GetMostRecentGestureEventType()); +} + TEST_F(GestureProviderTest, NoTapAfterScrollBegins) { base::TimeTicks event_time = base::TimeTicks::Now();
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc index 4aa5cf7..687dfa54 100644 --- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc +++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
@@ -281,6 +281,10 @@ CancelTapIfNecessary(packet); continue; } + if (gesture.type() == ET_GESTURE_TAP_CANCEL) { + CancelTapIfNecessary(packet); + continue; + } if (packet.gesture_source() == GestureEventDataPacket::TOUCH_TIMEOUT) { // Sending a timed gesture could delete |this|, so we need to return // directly after the |SendGesture| call.
diff --git a/ui/file_manager/externs/background/crostini.js b/ui/file_manager/externs/background/crostini.js index 77c8739..36703be6 100644 --- a/ui/file_manager/externs/background/crostini.js +++ b/ui/file_manager/externs/background/crostini.js
@@ -10,10 +10,16 @@ function Crostini() {} /** + * Initialize enabled settings. + * Must be done after loadTimeData is available. + */ +Crostini.prototype.initEnabled = function() {}; + +/** * Initialize Volume Manager. * @param {!VolumeManager} volumeManager */ -Crostini.prototype.init = function(volumeManager) {}; +Crostini.prototype.initVolumeManager = function(volumeManager) {}; /** * Register for any shared path changes.
diff --git a/ui/file_manager/file_manager/background/js/background.js b/ui/file_manager/file_manager/background/js/background.js index 81214b6..4a5530e 100644 --- a/ui/file_manager/file_manager/background/js/background.js +++ b/ui/file_manager/file_manager/background/js/background.js
@@ -108,13 +108,14 @@ this.initializationPromise_.then(strings => { this.stringData = strings; this.initContextMenu_(); + this.crostini.initEnabled(); volumeManagerFactory.getInstance().then(volumeManager => { volumeManager.addEventListener( VolumeManagerCommon.VOLUME_ALREADY_MOUNTED, this.handleViewEvent_.bind(this)); - this.crostini.init(volumeManager); + this.crostini.initVolumeManager(volumeManager); this.crostini.listen(); });
diff --git a/ui/file_manager/file_manager/background/js/crostini.js b/ui/file_manager/file_manager/background/js/crostini.js index a9d9675e..15ac160 100644 --- a/ui/file_manager/file_manager/background/js/crostini.js +++ b/ui/file_manager/file_manager/background/js/crostini.js
@@ -76,11 +76,10 @@ CrostiniImpl.UMA_ROOT_TYPE_OTHER = 'Other'; /** - * Initialize Volume Manager. - * @param {!VolumeManager} volumeManager + * Initialize enabled settings. + * Must be done after loadTimeData is available. */ -CrostiniImpl.prototype.init = function(volumeManager) { - this.volumeManager_ = volumeManager; +CrostiniImpl.prototype.initEnabled = function() { this.enabled_[CrostiniImpl.DEFAULT_VM] = loadTimeData.getBoolean('CROSTINI_ENABLED'); this.enabled_[CrostiniImpl.PLUGIN_VM] = @@ -90,6 +89,14 @@ }; /** + * Initialize Volume Manager. + * @param {!VolumeManager} volumeManager + */ +CrostiniImpl.prototype.initVolumeManager = function(volumeManager) { + this.volumeManager_ = volumeManager; +}; + +/** * Register for any shared path changes. */ CrostiniImpl.prototype.listen = function() {
diff --git a/ui/file_manager/file_manager/background/js/crostini_unittest.js b/ui/file_manager/file_manager/background/js/crostini_unittest.js index f9c3f44..4cc058c3 100644 --- a/ui/file_manager/file_manager/background/js/crostini_unittest.js +++ b/ui/file_manager/file_manager/background/js/crostini_unittest.js
@@ -49,7 +49,7 @@ // Create and initialize Crostini. crostini = createCrostiniForTest(); - crostini.init(volumeManager); + crostini.initVolumeManager(volumeManager); } /** @@ -66,13 +66,13 @@ function testInitCrostiniPluginVmEnabled() { window.loadTimeData.data['CROSTINI_ENABLED'] = true; window.loadTimeData.data['PLUGIN_VM_ENABLED'] = true; - crostini.init(volumeManager); + crostini.initEnabled(); assertTrue(crostini.isEnabled('termina')); assertTrue(crostini.isEnabled('PvmDefault')); window.loadTimeData.data['CROSTINI_ENABLED'] = false; window.loadTimeData.data['PLUGIN_VM_ENABLED'] = false; - crostini.init(volumeManager); + crostini.initEnabled(); assertFalse(crostini.isEnabled('termina')); assertFalse(crostini.isEnabled('PvmDefault')); } @@ -82,11 +82,11 @@ */ function testInitCrostiniRootAccessAllowed() { window.loadTimeData.data['CROSTINI_ROOT_ACCESS_ALLOWED'] = true; - crostini.init(volumeManager); + crostini.initEnabled(); assertTrue(crostini.isRootAccessAllowed('termina')); window.loadTimeData.data['CROSTINI_ROOT_ACCESS_ALLOWED'] = false; - crostini.init(volumeManager); + crostini.initEnabled(); assertFalse(crostini.isRootAccessAllowed('termina')); }
diff --git a/ui/file_manager/file_manager/foreground/elements/xf_button.js b/ui/file_manager/file_manager/foreground/elements/xf_button.js index 8a8363e..a4f6822 100644 --- a/ui/file_manager/file_manager/foreground/elements/xf_button.js +++ b/ui/file_manager/file_manager/foreground/elements/xf_button.js
@@ -30,7 +30,7 @@ */ static html_() { return `<style> - cr-icon-button { + cr-icon-button, cr-button { margin-inline-start: 0px; } @@ -44,8 +44,7 @@ nPg==') no-repeat center; } - :host([data-category='cancel']), - :host([data-category='dismiss']) { + :host([data-category='cancel']) { background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR\ 0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPSczNnB4JyBoZWlnaHQ\ 9JzM2cHgnIHZpZXdCb3g9JzAgMCAzNiAzNic+CiAgICA8ZyBzdHJva2U9JyM\ @@ -90,12 +89,25 @@ :host([data-category='collapse']) { animation: setcollapse 200ms forwards; } + :host { - width: 36px; - position: relative; + position: relative; + } + + :host(:not([data-category='dismiss'])) { + width: 36px; + } + + :host([data-category='dismiss']) #icon { + display: none; + } + + :host(:not([data-category='dismiss'])) #dismiss { + display: none; } </style> - <cr-icon-button></cr-icon-button>`; + <cr-button id='dismiss'>$i18n{DRIVE_WELCOME_DISMISS}</cr-button> + <cr-icon-button id='icon'></cr-icon-button>`; } }
diff --git a/ui/file_manager/file_manager/foreground/js/file_tasks_unittest.js b/ui/file_manager/file_manager/foreground/js/file_tasks_unittest.js index 43cef85..a5e9f12 100644 --- a/ui/file_manager/file_manager/foreground/js/file_tasks_unittest.js +++ b/ui/file_manager/file_manager/foreground/js/file_tasks_unittest.js
@@ -119,7 +119,7 @@ crostini: crostini, }; - fileManager.crostini.init(fileManager.volumeManager); + fileManager.crostini.initVolumeManager(fileManager.volumeManager); return fileManager; } @@ -630,7 +630,7 @@ const shared = new MockFileEntry(mockFsDownloads, '/shared/file'); const crostini = createCrostiniForTest(); - crostini.init(volumeManagerDownloads); + crostini.initVolumeManager(volumeManagerDownloads); crostini.setEnabled('termina', true); crostini.registerSharedPath('termina', sharedDir);
diff --git a/ui/gfx/animation/animation_mac.mm b/ui/gfx/animation/animation_mac.mm index 1053aeb..11db9646 100644 --- a/ui/gfx/animation/animation_mac.mm +++ b/ui/gfx/animation/animation_mac.mm
@@ -7,7 +7,7 @@ #import <Cocoa/Cocoa.h> #include "base/mac/mac_util.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" // Only available since 10.12. @interface NSWorkspace (AvailableSinceSierra)
diff --git a/ui/gfx/font_fallback_win.cc b/ui/gfx/font_fallback_win.cc index 0e266b9..3108d82 100644 --- a/ui/gfx/font_fallback_win.cc +++ b/ui/gfx/font_fallback_win.cc
@@ -15,7 +15,7 @@ #include "base/i18n/rtl.h" #include "base/macros.h" #include "base/memory/singleton.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/metrics/histogram_macros.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h"
diff --git a/ui/gfx/font_fallback_win_unittest.cc b/ui/gfx/font_fallback_win_unittest.cc index 6636096..77a3bda 100644 --- a/ui/gfx/font_fallback_win_unittest.cc +++ b/ui/gfx/font_fallback_win_unittest.cc
@@ -12,6 +12,7 @@ #include "base/strings/stringprintf.h" #include "base/test/scoped_task_environment.h" #include "base/win/windows_version.h" +#include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/icu/source/common/unicode/uchar.h" #include "third_party/icu/source/common/unicode/uscript.h" @@ -19,6 +20,10 @@ #include "third_party/skia/include/core/SkTypeface.h" #include "ui/gfx/test/font_fallback_test_data.h" +#if defined(OS_WIN) +#include <windows.h> +#endif + namespace gfx { namespace {
diff --git a/ui/gfx/win/singleton_hwnd.cc b/ui/gfx/win/singleton_hwnd.cc index 28e567bb..a024453 100644 --- a/ui/gfx/win/singleton_hwnd.cc +++ b/ui/gfx/win/singleton_hwnd.cc
@@ -5,7 +5,7 @@ #include "ui/gfx/win/singleton_hwnd.h" #include "base/memory/singleton.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "ui/gfx/win/singleton_hwnd_observer.h" namespace gfx {
diff --git a/ui/gl/gl_image_dxgi_swap_chain.cc b/ui/gl/gl_image_dxgi_swap_chain.cc index 0ace826..62e4ddd 100644 --- a/ui/gl/gl_image_dxgi_swap_chain.cc +++ b/ui/gl/gl_image_dxgi_swap_chain.cc
@@ -6,6 +6,7 @@ #include "ui/gl/egl_util.h" #include "ui/gl/gl_bindings.h" +#include "ui/gl/gl_surface_egl.h" #ifndef EGL_ANGLE_image_d3d11_texture #define EGL_D3D11_TEXTURE_ANGLE 0x3484 @@ -13,36 +14,44 @@ namespace gl { -namespace { - -bool SwapChainHasAlpha(gfx::BufferFormat format) { - switch (format) { - case gfx::BufferFormat::RGBA_8888: - case gfx::BufferFormat::RGBA_F16: - return true; - case gfx::BufferFormat::RGBX_8888: - return false; - default: - NOTREACHED(); - return false; - }; -} - -} // anonymous namespace - GLImageDXGISwapChain::GLImageDXGISwapChain( const gfx::Size& size, gfx::BufferFormat buffer_format, Microsoft::WRL::ComPtr<ID3D11Texture2D> texture, Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain) - : GLImageEGL(size), + : GLImage(), + size_(size), buffer_format_(buffer_format), - texture_(texture), - swap_chain_(swap_chain) { + texture_(std::move(texture)), + swap_chain_(std::move(swap_chain)) { DCHECK(texture_); DCHECK(swap_chain_); } +GLImageDXGISwapChain::~GLImageDXGISwapChain() { + if (egl_image_ != EGL_NO_IMAGE_KHR) { + if (eglDestroyImageKHR(GLSurfaceEGL::GetHardwareDisplay(), egl_image_) == + EGL_FALSE) { + DLOG(ERROR) << "Error destroying EGLImage: " + << ui::GetLastEGLErrorString(); + } + } +} + +bool GLImageDXGISwapChain::Initialize() { + DCHECK_EQ(egl_image_, EGL_NO_IMAGE_KHR); + const EGLint attribs[] = {EGL_NONE}; + egl_image_ = + eglCreateImageKHR(GLSurfaceEGL::GetHardwareDisplay(), EGL_NO_CONTEXT, + EGL_D3D11_TEXTURE_ANGLE, + static_cast<EGLClientBuffer>(texture_.Get()), attribs); + if (egl_image_ == EGL_NO_IMAGE_KHR) { + LOG(ERROR) << "Error creating EGLImage: " << ui::GetLastEGLErrorString(); + return false; + } + return true; +} + // static GLImageDXGISwapChain* GLImageDXGISwapChain::FromGLImage(GLImage* image) { if (!image || image->GetType() != Type::DXGI_SWAP_CHAIN) @@ -50,37 +59,46 @@ return static_cast<GLImageDXGISwapChain*>(image); } -bool GLImageDXGISwapChain::Initialize() { - DCHECK(texture_); - const EGLint attribs[] = {EGL_NONE}; - return GLImageEGL::Initialize(EGL_NO_CONTEXT, EGL_D3D11_TEXTURE_ANGLE, - static_cast<EGLClientBuffer>(texture_.Get()), - attribs); +GLImage::Type GLImageDXGISwapChain::GetType() const { + return Type::DXGI_SWAP_CHAIN; +} + +GLImage::BindOrCopy GLImageDXGISwapChain::ShouldBindOrCopy() { + return GLImage::BIND; +} + +gfx::Size GLImageDXGISwapChain::GetSize() { + return size_; +} + +unsigned GLImageDXGISwapChain::GetInternalFormat() { + return buffer_format_ == gfx::BufferFormat::RGBA_F16 ? GL_RGBA16F_EXT + : GL_BGRA8_EXT; +} + +bool GLImageDXGISwapChain::BindTexImage(unsigned target) { + DCHECK_NE(egl_image_, EGL_NO_IMAGE_KHR); + glEGLImageTargetTexture2DOES(target, egl_image_); + return glGetError() == static_cast<GLenum>(GL_NO_ERROR); } bool GLImageDXGISwapChain::CopyTexImage(unsigned target) { + NOTREACHED(); return false; } bool GLImageDXGISwapChain::CopyTexSubImage(unsigned target, const gfx::Point& offset, const gfx::Rect& rect) { + NOTREACHED(); return false; } -void GLImageDXGISwapChain::Flush() {} - -unsigned GLImageDXGISwapChain::GetInternalFormat() { - return SwapChainHasAlpha(buffer_format_) ? GL_RGBA : GL_RGB; -} - void GLImageDXGISwapChain::OnMemoryDump( base::trace_event::ProcessMemoryDump* pmd, uint64_t process_tracing_id, - const std::string& dump_name) {} - -GLImage::Type GLImageDXGISwapChain::GetType() const { - return Type::DXGI_SWAP_CHAIN; + const std::string& dump_name) { + NOTIMPLEMENTED_LOG_ONCE(); } bool GLImageDXGISwapChain::ScheduleOverlayPlane( @@ -95,6 +113,4 @@ return false; } -GLImageDXGISwapChain::~GLImageDXGISwapChain() {} - } // namespace gl
diff --git a/ui/gl/gl_image_dxgi_swap_chain.h b/ui/gl/gl_image_dxgi_swap_chain.h index 4a2f67f3..50faf44 100644 --- a/ui/gl/gl_image_dxgi_swap_chain.h +++ b/ui/gl/gl_image_dxgi_swap_chain.h
@@ -12,11 +12,11 @@ #include "ui/gfx/buffer_types.h" #include "ui/gl/gl_export.h" -#include "ui/gl/gl_image_egl.h" +#include "ui/gl/gl_image.h" namespace gl { -class GL_EXPORT GLImageDXGISwapChain : public gl::GLImageEGL { +class GL_EXPORT GLImageDXGISwapChain : public GLImage { public: GLImageDXGISwapChain(const gfx::Size& size, gfx::BufferFormat buffer_format, @@ -29,13 +29,17 @@ bool Initialize(); // GLImage implementation + Type GetType() const override; + BindOrCopy ShouldBindOrCopy() override; + gfx::Size GetSize() override; + unsigned GetInternalFormat() override; + bool BindTexImage(unsigned target) override; + void ReleaseTexImage(unsigned target) override {} bool CopyTexImage(unsigned target) override; bool CopyTexSubImage(unsigned target, const gfx::Point& offset, const gfx::Rect& rect) override; - void Flush() override; - unsigned GetInternalFormat() override; - Type GetType() const override; + void Flush() override {} void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, uint64_t process_tracing_id, const std::string& dump_name) override; @@ -47,19 +51,23 @@ bool enable_blend, std::unique_ptr<gfx::GpuFence> gpu_fence) override; - const Microsoft::WRL::ComPtr<ID3D11Texture2D>& texture() { return texture_; } - const Microsoft::WRL::ComPtr<IDXGISwapChain1>& swap_chain() { + const Microsoft::WRL::ComPtr<ID3D11Texture2D>& texture() const { + return texture_; + } + + const Microsoft::WRL::ComPtr<IDXGISwapChain1>& swap_chain() const { return swap_chain_; } - protected: + private: ~GLImageDXGISwapChain() override; - private: + const gfx::Size size_; const gfx::BufferFormat buffer_format_; + void* egl_image_ = nullptr; /* EGLImageKHR */ Microsoft::WRL::ComPtr<ID3D11Texture2D> texture_; - // Required by Direct composition surface to pass swap chain handle to OS. Microsoft::WRL::ComPtr<IDXGISwapChain1> swap_chain_; + DISALLOW_COPY_AND_ASSIGN(GLImageDXGISwapChain); };
diff --git a/ui/ozone/platform/drm/BUILD.gn b/ui/ozone/platform/drm/BUILD.gn index a098143..5f5bf539 100644 --- a/ui/ozone/platform/drm/BUILD.gn +++ b/ui/ozone/platform/drm/BUILD.gn
@@ -181,6 +181,7 @@ "common/drm_overlay_manager_unittest.cc", "common/drm_util_unittest.cc", "gpu/drm_overlay_validator_unittest.cc", + "gpu/drm_thread_unittest.cc", "gpu/drm_window_unittest.cc", "gpu/hardware_display_controller_unittest.cc", "gpu/hardware_display_plane_manager_unittest.cc",
diff --git a/ui/ozone/platform/drm/gpu/drm_thread.cc b/ui/ozone/platform/drm/gpu/drm_thread.cc index edb9a32..f228334 100644 --- a/ui/ozone/platform/drm/gpu/drm_thread.cc +++ b/ui/ozone/platform/drm/gpu/drm_thread.cc
@@ -19,7 +19,6 @@ #include "ui/gfx/presentation_feedback.h" #include "ui/ozone/common/linux/drm_util_linux.h" #include "ui/ozone/common/linux/gbm_device.h" -#include "ui/ozone/common/linux/gbm_wrapper.h" #include "ui/ozone/platform/drm/common/drm_util.h" #include "ui/ozone/platform/drm/gpu/drm_device_generator.h" #include "ui/ozone/platform/drm/gpu/drm_device_manager.h" @@ -84,43 +83,26 @@ *out_framebuffer = std::move(framebuffer); } -class GbmDeviceGenerator : public DrmDeviceGenerator { - public: - GbmDeviceGenerator() {} - ~GbmDeviceGenerator() override {} - - // DrmDeviceGenerator: - scoped_refptr<DrmDevice> CreateDevice(const base::FilePath& path, - base::File file, - bool is_primary_device) override { - auto gbm = CreateGbmDevice(file.GetPlatformFile()); - if (!gbm) { - PLOG(ERROR) << "Unable to initialize GBM for " << path.value(); - return nullptr; - } - - auto drm = base::MakeRefCounted<DrmDevice>( - path, std::move(file), is_primary_device, std::move(gbm)); - if (!drm->Initialize()) - return nullptr; - return drm; - } - - private: - - DISALLOW_COPY_AND_ASSIGN(GbmDeviceGenerator); -}; - } // namespace +DrmThread::TaskInfo::TaskInfo(base::OnceClosure task, base::WaitableEvent* done) + : task(std::move(task)), done(done) {} + +DrmThread::TaskInfo::TaskInfo(TaskInfo&& other) = default; + +DrmThread::TaskInfo::~TaskInfo() = default; + DrmThread::DrmThread() : base::Thread("DrmThread"), weak_ptr_factory_(this) {} DrmThread::~DrmThread() { Stop(); } -void DrmThread::Start(base::OnceClosure binding_completer) { +void DrmThread::Start(base::OnceClosure binding_completer, + std::unique_ptr<DrmDeviceGenerator> device_generator) { complete_early_binding_requests_ = std::move(binding_completer); + device_generator_ = std::move(device_generator); + base::Thread::Options thread_options; thread_options.message_pump_type = base::MessagePumpType::IO; thread_options.priority = base::ThreadPriority::DISPLAY; @@ -129,11 +111,22 @@ LOG(FATAL) << "Failed to create DRM thread"; } -void DrmThread::Init() { - device_manager_.reset( - new DrmDeviceManager(std::make_unique<GbmDeviceGenerator>())); - screen_manager_.reset(new ScreenManager()); +void DrmThread::RunTaskAfterWindowReady(gfx::AcceleratedWidget window, + base::OnceClosure task, + base::WaitableEvent* done) { + if (!device_manager_->GetDrmDevices().empty() && + window <= last_created_window_) { + std::move(task).Run(); + if (done) + done->Signal(); + return; + } + pending_tasks_[window].emplace_back(std::move(task), done); +} +void DrmThread::Init() { + device_manager_.reset(new DrmDeviceManager(std::move(device_generator_))); + screen_manager_.reset(new ScreenManager()); display_manager_.reset( new DrmGpuDisplayManager(screen_manager_.get(), device_manager_.get())); @@ -262,10 +255,16 @@ } void DrmThread::CreateWindow(gfx::AcceleratedWidget widget) { + DCHECK_GT(widget, last_created_window_); + last_created_window_ = widget; + std::unique_ptr<DrmWindow> window( new DrmWindow(widget, device_manager_.get(), screen_manager_.get())); window->Initialize(); screen_manager_->AddWindow(widget, std::move(window)); + + // There might be tasks that were waiting for |widget| to become available. + ProcessPendingTasks(); } void DrmThread::DestroyWindow(gfx::AcceleratedWidget widget) { @@ -343,6 +342,9 @@ void DrmThread::AddGraphicsDevice(const base::FilePath& path, base::File file) { device_manager_->AddDrmDevice(path, std::move(file)); + + // There might be tasks that were blocked on a DrmDevice becoming available. + ProcessPendingTasks(); } void DrmThread::RemoveGraphicsDevice(const base::FilePath& path) { @@ -381,4 +383,20 @@ drm_bindings_.AddBinding(this, std::move(request)); } +void DrmThread::ProcessPendingTasks() { + DCHECK(!device_manager_->GetDrmDevices().empty()); + + auto it = pending_tasks_.begin(); + for (; it != pending_tasks_.end() && it->first <= last_created_window_; + ++it) { + for (auto& task_info : it->second) { + std::move(task_info.task).Run(); + if (task_info.done) + task_info.done->Signal(); + } + } + + pending_tasks_.erase(pending_tasks_.begin(), it); +} + } // namespace ui
diff --git a/ui/ozone/platform/drm/gpu/drm_thread.h b/ui/ozone/platform/drm/gpu/drm_thread.h index 8988282..331d706 100644 --- a/ui/ozone/platform/drm/gpu/drm_thread.h +++ b/ui/ozone/platform/drm/gpu/drm_thread.h
@@ -19,6 +19,7 @@ #include "ui/gfx/vsync_provider.h" #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" #include "ui/ozone/platform/drm/common/display_types.h" +#include "ui/ozone/platform/drm/gpu/drm_device_generator.h" #include "ui/ozone/public/mojom/device_cursor.mojom.h" #include "ui/ozone/public/mojom/drm_device.mojom.h" #include "ui/ozone/public/swap_completion_callback.h" @@ -61,7 +62,14 @@ DrmThread(); ~DrmThread() override; - void Start(base::OnceClosure binding_completer); + void Start(base::OnceClosure binding_completer, + std::unique_ptr<DrmDeviceGenerator> device_generator); + + // Runs |task| once a DrmDevice is registered and |window| was created via + // CreateWindow(). |done| will be signaled if it's not null. + void RunTaskAfterWindowReady(gfx::AcceleratedWidget window, + base::OnceClosure task, + base::WaitableEvent* done); // Must be called on the DRM thread. All methods for use from the GPU thread. // DrmThreadProxy (on GPU)thread) is the client for these methods. @@ -151,11 +159,24 @@ void Init() override; private: + struct TaskInfo { + base::OnceClosure task; + base::WaitableEvent* done; + + TaskInfo(base::OnceClosure task, base::WaitableEvent* done); + TaskInfo(TaskInfo&& other); + ~TaskInfo(); + }; + void OnPlanesReadyForPageFlip(gfx::AcceleratedWidget widget, SwapCompletionOnceCallback submission_callback, PresentationOnceCallback presentation_callback, std::vector<DrmOverlayPlane> planes); + // Called when a DrmDevice or DrmWindow is created. Runs tasks that are now + // unblocked. + void ProcessPendingTasks(); + std::unique_ptr<DrmDeviceManager> device_manager_; std::unique_ptr<ScreenManager> screen_manager_; std::unique_ptr<DrmGpuDisplayManager> display_manager_; @@ -171,6 +192,17 @@ // TODO(samans): Figure out why. mojo::BindingSet<ozone::mojom::DrmDevice> drm_bindings_; + // The AcceleratedWidget from the last call to CreateWindow. + gfx::AcceleratedWidget last_created_window_ = gfx::kNullAcceleratedWidget; + + // The tasks that are blocked on a DrmDevice and a certain AcceleratedWidget + // becoming available. + base::flat_map<gfx::AcceleratedWidget, std::vector<TaskInfo>> pending_tasks_; + + // Holds the DrmDeviceGenerator that DrmDeviceManager will use. Will be passed + // on to DrmDeviceManager after the thread starts. + std::unique_ptr<DrmDeviceGenerator> device_generator_; + base::WeakPtrFactory<DrmThread> weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(DrmThread);
diff --git a/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc b/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc index a63dadd..801d758 100644 --- a/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc +++ b/ui/ozone/platform/drm/gpu/drm_thread_proxy.cc
@@ -8,6 +8,9 @@ #include <utility> #include "base/bind.h" +#include "ui/ozone/common/linux/gbm_wrapper.h" +#include "ui/ozone/platform/drm/gpu/drm_device.h" +#include "ui/ozone/platform/drm/gpu/drm_device_generator.h" #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" #include "ui/ozone/platform/drm/gpu/gbm_pixmap.h" @@ -27,6 +30,32 @@ std::move(framebuffer))); } +class GbmDeviceGenerator : public DrmDeviceGenerator { + public: + GbmDeviceGenerator() {} + ~GbmDeviceGenerator() override {} + + // DrmDeviceGenerator: + scoped_refptr<DrmDevice> CreateDevice(const base::FilePath& path, + base::File file, + bool is_primary_device) override { + auto gbm = CreateGbmDevice(file.GetPlatformFile()); + if (!gbm) { + PLOG(ERROR) << "Unable to initialize GBM for " << path.value(); + return nullptr; + } + + auto drm = base::MakeRefCounted<DrmDevice>( + path, std::move(file), is_primary_device, std::move(gbm)); + if (!drm->Initialize()) + return nullptr; + return drm; + } + + private: + DISALLOW_COPY_AND_ASSIGN(GbmDeviceGenerator); +}; + } // namespace DrmThreadProxy::DrmThreadProxy() = default; @@ -40,7 +69,8 @@ } void DrmThreadProxy::StartDrmThread(base::OnceClosure binding_drainer) { - drm_thread_.Start(std::move(binding_drainer)); + drm_thread_.Start(std::move(binding_drainer), + std::make_unique<GbmDeviceGenerator>()); } std::unique_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy( @@ -57,10 +87,13 @@ scoped_refptr<DrmFramebuffer>* framebuffer) { DCHECK(drm_thread_.task_runner()) << "no task runner! in DrmThreadProxy::CreateBuffer"; + base::OnceClosure task = + base::BindOnce(&DrmThread::CreateBuffer, base::Unretained(&drm_thread_), + widget, size, format, usage, flags, buffer, framebuffer); PostSyncTask( drm_thread_.task_runner(), - base::BindOnce(&DrmThread::CreateBuffer, base::Unretained(&drm_thread_), - widget, size, format, usage, flags, buffer, framebuffer)); + base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), widget, std::move(task))); } void DrmThreadProxy::CreateBufferAsync(gfx::AcceleratedWidget widget, @@ -71,14 +104,20 @@ CreateBufferAsyncCallback callback) { DCHECK(drm_thread_.task_runner()) << "no task runner! in DrmThreadProxy::CreateBufferAsync"; + base::OnceClosure task = base::BindOnce( + &DrmThread::CreateBufferAsync, base::Unretained(&drm_thread_), widget, + size, format, usage, flags, + base::BindOnce(OnBufferCreatedOnDrmThread, + base::ThreadTaskRunnerHandle::Get(), std::move(callback))); + // Since browser's UI thread blocks until a buffer is returned, we shouldn't + // block on |widget| because a blocked UI thread cannot register |widget| and + // causes a deadlock. We still want to block on a graphics device, though. + // TODO(samans): Remove this hack once OOP-D launches. + gfx::AcceleratedWidget blocking_widget = gfx::kNullAcceleratedWidget; drm_thread_.task_runner()->PostTask( - FROM_HERE, - base::BindOnce(&DrmThread::CreateBufferAsync, - base::Unretained(&drm_thread_), widget, size, format, - usage, flags, - base::BindOnce(OnBufferCreatedOnDrmThread, - base::ThreadTaskRunnerHandle::Get(), - std::move(callback)))); + FROM_HERE, base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), blocking_widget, + std::move(task), nullptr)); } void DrmThreadProxy::CreateBufferFromHandle( @@ -88,10 +127,13 @@ gfx::NativePixmapHandle handle, std::unique_ptr<GbmBuffer>* buffer, scoped_refptr<DrmFramebuffer>* framebuffer) { - PostSyncTask(drm_thread_.task_runner(), - base::BindOnce(&DrmThread::CreateBufferFromHandle, - base::Unretained(&drm_thread_), widget, size, - format, std::move(handle), buffer, framebuffer)); + base::OnceClosure task = base::BindOnce( + &DrmThread::CreateBufferFromHandle, base::Unretained(&drm_thread_), + widget, size, format, std::move(handle), buffer, framebuffer); + PostSyncTask( + drm_thread_.task_runner(), + base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), widget, std::move(task))); } void DrmThreadProxy::SetClearOverlayCacheCallback( @@ -110,12 +152,14 @@ const std::vector<OverlaySurfaceCandidate>& candidates, OverlayCapabilitiesCallback callback) { DCHECK(drm_thread_.task_runner()); + base::OnceClosure task = base::BindOnce( + &DrmThread::CheckOverlayCapabilities, base::Unretained(&drm_thread_), + widget, candidates, CreateSafeOnceCallback(std::move(callback))); drm_thread_.task_runner()->PostTask( - FROM_HERE, - base::BindOnce(&DrmThread::CheckOverlayCapabilities, - base::Unretained(&drm_thread_), widget, candidates, - CreateSafeOnceCallback(std::move(callback)))); + FROM_HERE, base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), widget, + std::move(task), nullptr)); } void DrmThreadProxy::AddBindingDrmDevice(
diff --git a/ui/ozone/platform/drm/gpu/drm_thread_unittest.cc b/ui/ozone/platform/drm/gpu/drm_thread_unittest.cc new file mode 100644 index 0000000..bc08d78 --- /dev/null +++ b/ui/ozone/platform/drm/gpu/drm_thread_unittest.cc
@@ -0,0 +1,165 @@ +// Copyright 2019 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 "ui/ozone/platform/drm/gpu/drm_thread.h" +#include "base/bind_helpers.h" +#include "base/files/scoped_temp_dir.h" +#include "base/test/scoped_task_environment.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "ui/ozone/platform/drm/gpu/drm_device_generator.h" +#include "ui/ozone/platform/drm/gpu/mock_drm_device.h" +#include "ui/ozone/platform/drm/gpu/mock_gbm_device.h" + +namespace ui { + +namespace { + +class FakeDrmDeviceGenerator : public DrmDeviceGenerator { + // DrmDeviceGenerator: + scoped_refptr<DrmDevice> CreateDevice(const base::FilePath& path, + base::File file, + bool is_primary_device) override { + auto gbm_device = std::make_unique<MockGbmDevice>(); + return base::MakeRefCounted<MockDrmDevice>(std::move(gbm_device)); + } +}; + +void StubTask() {} + +void StubTaskWithDoneFeedback(bool* done) { + *done = true; +} + +} // namespace + +class DrmThreadTest : public testing::Test { + protected: + // Overridden from testing::Test + void SetUp() override { + drm_thread_.Start(base::DoNothing(), + std::make_unique<FakeDrmDeviceGenerator>()); + drm_thread_.task_runner()->PostTask( + FROM_HERE, base::BindOnce(&DrmThread::AddBindingDrmDevice, + base::Unretained(&drm_thread_), + mojo::MakeRequest(&drm_device_ptr_))); + drm_thread_.FlushForTesting(); + } + + std::unique_ptr<base::WaitableEvent> PostStubTaskWithWaitableEvent( + gfx::AcceleratedWidget window) { + base::OnceClosure task = base::BindOnce(StubTask); + auto event = std::make_unique<base::WaitableEvent>( + base::WaitableEvent::ResetPolicy::AUTOMATIC, + base::WaitableEvent::InitialState::NOT_SIGNALED); + drm_thread_.task_runner()->PostTask( + FROM_HERE, base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), window, + std::move(task), event.get())); + return event; + } + + void PostStubTask(gfx::AcceleratedWidget window, bool* done) { + *done = false; + base::OnceClosure task = base::BindOnce(StubTaskWithDoneFeedback, done); + drm_thread_.task_runner()->PostTask( + FROM_HERE, base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(&drm_thread_), window, + std::move(task), nullptr)); + } + + void AddGraphicsDevice() { + base::FilePath file_path("/dev/null"); + base::File file(file_path, base::File::FLAG_OPEN | base::File::FLAG_WRITE | + base::File::FLAG_READ); + drm_device_ptr_->AddGraphicsDevice(file_path, std::move(file)); + } + + base::test::ScopedTaskEnvironment env_; + DrmThread drm_thread_; + ozone::mojom::DrmDevicePtr drm_device_ptr_; +}; + +TEST_F(DrmThreadTest, RunTaskAfterWindowReady) { + bool called1 = false, called2 = false; + gfx::AcceleratedWidget widget1 = 1, widget2 = 2; + + // Post a task not blocked on any window. It should still block on a graphics + // device becoming available. + PostStubTask(gfx::kNullAcceleratedWidget, &called1); + drm_thread_.FlushForTesting(); + EXPECT_FALSE(called1); + + // Add the graphics device. The task should run. + AddGraphicsDevice(); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(called1); + + // Now that a graphics device is available, further tasks that don't block on + // any window should execute immediately. + PostStubTask(gfx::kNullAcceleratedWidget, &called1); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(called1); + + // Post a task blocked on |widget1|. It shouldn't run. + PostStubTask(widget1, &called1); + drm_thread_.FlushForTesting(); + ASSERT_FALSE(called1); + + // Post two tasks blocked on |widget2|, one with a WaitableEvent and one + // without. They shouldn't run. + std::unique_ptr<base::WaitableEvent> event = + PostStubTaskWithWaitableEvent(widget2); + PostStubTask(widget2, &called2); + drm_thread_.FlushForTesting(); + ASSERT_FALSE(event->IsSignaled()); + ASSERT_FALSE(called2); + + // Now create |widget1|. The first task should run. + drm_device_ptr_->CreateWindow(widget1); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(called1); + ASSERT_FALSE(event->IsSignaled()); + ASSERT_FALSE(called2); + + // Now that |widget1| is created. any further task depending on it should run + // immediately. + PostStubTask(widget1, &called1); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(called1); + ASSERT_FALSE(event->IsSignaled()); + ASSERT_FALSE(called2); + + // Destroy |widget1| and post a task blocked on it. The task should still run + // immediately even though the window is destroyed. + drm_device_ptr_->DestroyWindow(widget1); + PostStubTask(widget1, &called1); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(called1); + ASSERT_FALSE(event->IsSignaled()); + ASSERT_FALSE(called2); + + // Create |widget2|. The two blocked tasks should run. + drm_device_ptr_->CreateWindow(widget2); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(event->IsSignaled()); + ASSERT_TRUE(called2); + + // Post another task blocked on |widget1| with a WaitableEvent. It should run + // immediately. + event = PostStubTaskWithWaitableEvent(widget1); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(event->IsSignaled()); + + // Post another task blocked on |widget2| with a WaitableEvent. It should run + // immediately. + event = PostStubTaskWithWaitableEvent(widget2); + drm_thread_.FlushForTesting(); + ASSERT_TRUE(event->IsSignaled()); + + // Destroy |widget2| to avoid failures during tear down. + drm_device_ptr_->DestroyWindow(widget2); + drm_thread_.FlushForTesting(); +} + +} // namespace ui
diff --git a/ui/ozone/platform/drm/gpu/drm_window_proxy.cc b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc index 1c4cd15e..a2afe0d 100644 --- a/ui/ozone/platform/drm/gpu/drm_window_proxy.cc +++ b/ui/ozone/platform/drm/gpu/drm_window_proxy.cc
@@ -30,20 +30,25 @@ std::vector<DrmOverlayPlane> planes, SwapCompletionOnceCallback submission_callback, PresentationOnceCallback presentation_callback) { + base::OnceClosure task = base::BindOnce( + &DrmThread::SchedulePageFlip, base::Unretained(drm_thread_), widget_, + std::move(planes), CreateSafeOnceCallback(std::move(submission_callback)), + CreateSafeOnceCallback(std::move(presentation_callback))); drm_thread_->task_runner()->PostTask( - FROM_HERE, - base::BindOnce(&DrmThread::SchedulePageFlip, - base::Unretained(drm_thread_), widget_, std::move(planes), - CreateSafeOnceCallback(std::move(submission_callback)), - CreateSafeOnceCallback(std::move(presentation_callback)))); + FROM_HERE, base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(drm_thread_), widget_, + std::move(task), nullptr)); } bool DrmWindowProxy::SupportsGpuFences() const { bool is_atomic = false; + base::OnceClosure task = + base::BindOnce(&DrmThread::IsDeviceAtomic, base::Unretained(drm_thread_), + widget_, &is_atomic); PostSyncTask( drm_thread_->task_runner(), - base::BindOnce(&DrmThread::IsDeviceAtomic, base::Unretained(drm_thread_), - widget_, &is_atomic)); + base::BindOnce(&DrmThread::RunTaskAfterWindowReady, + base::Unretained(drm_thread_), widget_, std::move(task))); return is_atomic && !base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableExplicitDmaFences); }
diff --git a/ui/ozone/platform/drm/gpu/proxy_helpers.cc b/ui/ozone/platform/drm/gpu/proxy_helpers.cc index 603b3bc..c65c5f6 100644 --- a/ui/ozone/platform/drm/gpu/proxy_helpers.cc +++ b/ui/ozone/platform/drm/gpu/proxy_helpers.cc
@@ -6,28 +6,15 @@ #include <utility> -#include "base/synchronization/waitable_event.h" - namespace ui { -namespace { - -void OnRunPostedTaskAndSignal(base::OnceClosure callback, - base::WaitableEvent* wait) { - std::move(callback).Run(); - wait->Signal(); -} - -} // namespace - void PostSyncTask( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, - base::OnceClosure callback) { + base::OnceCallback<void(base::WaitableEvent*)> callback) { base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::AUTOMATIC, base::WaitableEvent::InitialState::NOT_SIGNALED); bool success = task_runner->PostTask( - FROM_HERE, - base::BindOnce(OnRunPostedTaskAndSignal, std::move(callback), &wait)); + FROM_HERE, base::BindOnce(std::move(callback), &wait)); if (success) wait.Wait(); }
diff --git a/ui/ozone/platform/drm/gpu/proxy_helpers.h b/ui/ozone/platform/drm/gpu/proxy_helpers.h index b037713..d5be9bd 100644 --- a/ui/ozone/platform/drm/gpu/proxy_helpers.h +++ b/ui/ozone/platform/drm/gpu/proxy_helpers.h
@@ -10,6 +10,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/memory/ref_counted.h" +#include "base/synchronization/waitable_event.h" #include "base/threading/thread_task_runner_handle.h" namespace ui { @@ -31,7 +32,7 @@ // executing. void PostSyncTask( const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, - base::OnceClosure callback); + base::OnceCallback<void(base::WaitableEvent*)> callback); // Creates a RepeatingCallback that will run |callback| on the calling thread. // Useful when posting a task on a different thread and expecting a callback
diff --git a/ui/ozone/platform/drm/host/drm_device_connector.cc b/ui/ozone/platform/drm/host/drm_device_connector.cc index 0746728..e212aa2d 100644 --- a/ui/ozone/platform/drm/host/drm_device_connector.cc +++ b/ui/ozone/platform/drm/host/drm_device_connector.cc
@@ -71,10 +71,9 @@ ui::ozone::mojom::DrmDevicePtr drm_device_ptr; BindInterfaceDrmDevice(&drm_device_ptr); - ui_runner->PostTask( - FROM_HERE, - base::BindOnce(&HostDrmDevice::OnGpuServiceLaunched, host_drm_device_, - drm_device_ptr.PassInterface())); + + host_drm_device_->OnGpuServiceLaunchedOnIOThread(std::move(drm_device_ptr), + ui_runner); } void DrmDeviceConnector::OnMessageReceived(const IPC::Message& message) { @@ -90,7 +89,8 @@ void DrmDeviceConnector::ConnectSingleThreaded( ui::ozone::mojom::DrmDevicePtr drm_device_ptr) { - host_drm_device_->OnGpuServiceLaunched(drm_device_ptr.PassInterface()); + host_drm_device_->OnGpuServiceLaunchedOnIOThread( + std::move(drm_device_ptr), base::ThreadTaskRunnerHandle::Get()); } } // namespace ui
diff --git a/ui/ozone/platform/drm/host/drm_display_host_manager.cc b/ui/ozone/platform/drm/host/drm_display_host_manager.cc index 89972f00..8d94518 100644 --- a/ui/ozone/platform/drm/host/drm_display_host_manager.cc +++ b/ui/ozone/platform/drm/host/drm_display_host_manager.cc
@@ -292,7 +292,7 @@ std::unique_ptr<DrmDeviceHandle> handle) { if (handle->IsValid()) { drm_devices_[dev_path] = sys_path; - proxy_->GpuAddGraphicsDevice(sys_path, handle->PassFD()); + proxy_->GpuAddGraphicsDeviceOnUIThread(sys_path, handle->PassFD()); NotifyDisplayDelegate(); } @@ -334,10 +334,8 @@ // Send the primary device first since this is used to initialize graphics // state. - if (!proxy_->GpuAddGraphicsDevice(drm_devices_[primary_graphics_card_path_], - handle->PassFD())) { - LOG(ERROR) << "Failed to add primary graphics device."; - } + proxy_->GpuAddGraphicsDeviceOnIOThread( + drm_devices_[primary_graphics_card_path_], handle->PassFD()); } void DrmDisplayHostManager::OnGpuThreadReady() {
diff --git a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc index 7a3dfbc..fec8675 100644 --- a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc +++ b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.cc
@@ -274,24 +274,19 @@ return Send(new OzoneGpuMsg_RelinquishDisplayControl()); } -bool DrmGpuPlatformSupportHost::GpuAddGraphicsDevice(const base::FilePath& path, - base::ScopedFD fd) { - IPC::Message* message = new OzoneGpuMsg_AddGraphicsDevice( - path, base::FileDescriptor(std::move(fd))); +bool DrmGpuPlatformSupportHost::GpuAddGraphicsDeviceOnUIThread( + const base::FilePath& path, + base::ScopedFD fd) { + return Send(new OzoneGpuMsg_AddGraphicsDevice( + path, base::FileDescriptor(std::move(fd)))); +} - // This function may be called from two places: - // - DrmDisplayHostManager::OnGpuProcessLaunched() invoked synchronously - // by GpuProcessHost::Init() on IO thread, which is the same thread as - // |send_runner_|. In this case we can synchronously send the IPC; - // - DrmDisplayHostManager::OnAddGraphicsDevice() on UI thread. In this - // case we need to post the send task to IO thread. - if (send_runner_ && send_runner_->BelongsToCurrentThread()) { - DCHECK(!send_callback_.is_null()); - send_callback_.Run(message); - return true; - } - - return Send(message); +void DrmGpuPlatformSupportHost::GpuAddGraphicsDeviceOnIOThread( + const base::FilePath& path, + base::ScopedFD fd) { + DCHECK(!send_callback_.is_null()); + send_callback_.Run(new OzoneGpuMsg_AddGraphicsDevice( + path, base::FileDescriptor(std::move(fd)))); } bool DrmGpuPlatformSupportHost::GpuRemoveGraphicsDevice(
diff --git a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h index 160e28c..84f2388e 100644 --- a/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h +++ b/ui/ozone/platform/drm/host/drm_gpu_platform_support_host.h
@@ -67,8 +67,10 @@ bool GpuTakeDisplayControl() override; bool GpuRefreshNativeDisplays() override; bool GpuRelinquishDisplayControl() override; - bool GpuAddGraphicsDevice(const base::FilePath& path, - base::ScopedFD fd) override; + bool GpuAddGraphicsDeviceOnUIThread(const base::FilePath& path, + base::ScopedFD fd) override; + void GpuAddGraphicsDeviceOnIOThread(const base::FilePath& path, + base::ScopedFD fd) override; bool GpuRemoveGraphicsDevice(const base::FilePath& path) override; // Methods needed for DrmOverlayManagerHost.
diff --git a/ui/ozone/platform/drm/host/gpu_thread_adapter.h b/ui/ozone/platform/drm/host/gpu_thread_adapter.h index 9b5db62c..bbd38608 100644 --- a/ui/ozone/platform/drm/host/gpu_thread_adapter.h +++ b/ui/ozone/platform/drm/host/gpu_thread_adapter.h
@@ -37,8 +37,10 @@ virtual bool GpuTakeDisplayControl() = 0; virtual bool GpuRefreshNativeDisplays() = 0; virtual bool GpuRelinquishDisplayControl() = 0; - virtual bool GpuAddGraphicsDevice(const base::FilePath& path, - base::ScopedFD fd) = 0; + virtual bool GpuAddGraphicsDeviceOnUIThread(const base::FilePath& path, + base::ScopedFD fd) = 0; + virtual void GpuAddGraphicsDeviceOnIOThread(const base::FilePath& path, + base::ScopedFD fd) = 0; virtual bool GpuRemoveGraphicsDevice(const base::FilePath& path) = 0; // Methods for DrmOverlayManagerHost.
diff --git a/ui/ozone/platform/drm/host/host_drm_device.cc b/ui/ozone/platform/drm/host/host_drm_device.cc index 8642d87..8c836cf 100644 --- a/ui/ozone/platform/drm/host/host_drm_device.cc +++ b/ui/ozone/platform/drm/host/host_drm_device.cc
@@ -42,30 +42,17 @@ } void HostDrmDevice::OnDrmServiceStarted() { + DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_); + // This can be called multiple times in the course of single-threaded startup. // Ignore invocations after we've started. if (connected_) return; connected_ = true; - RunObservers(); - // TODO(rjkroege): Handle failure of launching a viz process with the - // ServiceManager. -} - -void HostDrmDevice::ProvideManagers(DrmDisplayHostManager* display_manager, - DrmOverlayManagerHost* overlay_manager) { - display_manager_ = display_manager; - overlay_manager_ = overlay_manager; -} - -void HostDrmDevice::RunObservers() { - DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_); - for (GpuThreadObserver& observer : gpu_thread_observers_) { - observer.OnGpuProcessLaunched(); + for (GpuThreadObserver& observer : gpu_thread_observers_) observer.OnGpuThreadReady(); - } DCHECK(cursor_proxy_) << "We should have already created a cursor proxy previously"; @@ -75,13 +62,17 @@ // DRM thread is broken. } +void HostDrmDevice::ProvideManagers(DrmDisplayHostManager* display_manager, + DrmOverlayManagerHost* overlay_manager) { + display_manager_ = display_manager; + overlay_manager_ = overlay_manager; +} + void HostDrmDevice::AddGpuThreadObserver(GpuThreadObserver* observer) { DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_); gpu_thread_observers_.AddObserver(observer); - if (IsConnected()) { - observer->OnGpuProcessLaunched(); + if (IsConnected()) observer->OnGpuThreadReady(); - } } void HostDrmDevice::RemoveGpuThreadObserver(GpuThreadObserver* observer) { @@ -234,8 +225,8 @@ return true; } -bool HostDrmDevice::GpuAddGraphicsDevice(const base::FilePath& path, - base::ScopedFD fd) { +bool HostDrmDevice::GpuAddGraphicsDeviceOnUIThread(const base::FilePath& path, + base::ScopedFD fd) { DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_); if (!IsConnected()) return false; @@ -246,6 +237,14 @@ return true; } +void HostDrmDevice::GpuAddGraphicsDeviceOnIOThread(const base::FilePath& path, + base::ScopedFD fd) { + DCHECK_CALLED_ON_VALID_THREAD(on_io_thread_); + DCHECK(drm_device_ptr_on_io_thread_.is_bound()); + base::File file(fd.release()); + drm_device_ptr_on_io_thread_->AddGraphicsDevice(path, std::move(file)); +} + bool HostDrmDevice::GpuRemoveGraphicsDevice(const base::FilePath& path) { DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_); if (!IsConnected()) @@ -352,8 +351,28 @@ display_manager_->GpuUpdatedHDCPState(display_id, success); } -// Invoked in response to the successful launching of the GPU service. -void HostDrmDevice::OnGpuServiceLaunched( +void HostDrmDevice::OnGpuServiceLaunchedOnIOThread( + ui::ozone::mojom::DrmDevicePtr drm_device_ptr, + scoped_refptr<base::SingleThreadTaskRunner> ui_runner) { + DCHECK_CALLED_ON_VALID_THREAD(on_io_thread_); + // The observers might send IPC messages from the IO thread during the call to + // OnGpuProcessLaunched. + drm_device_ptr_on_io_thread_ = std::move(drm_device_ptr); + for (GpuThreadObserver& observer : gpu_thread_observers_) + observer.OnGpuProcessLaunched(); + // In the single-threaded mode, there won't be separate UI and IO threads. + if (ui_runner->BelongsToCurrentThread()) { + OnGpuServiceLaunchedOnUIThread( + drm_device_ptr_on_io_thread_.PassInterface()); + } else { + ui_runner->PostTask( + FROM_HERE, + base::BindOnce(&HostDrmDevice::OnGpuServiceLaunchedOnUIThread, this, + drm_device_ptr_on_io_thread_.PassInterface())); + } +} + +void HostDrmDevice::OnGpuServiceLaunchedOnUIThread( ui::ozone::mojom::DrmDevicePtrInfo drm_device_ptr_info) { DCHECK_CALLED_ON_VALID_THREAD(on_ui_thread_);
diff --git a/ui/ozone/platform/drm/host/host_drm_device.h b/ui/ozone/platform/drm/host/host_drm_device.h index 94a99f87..5994421 100644 --- a/ui/ozone/platform/drm/host/host_drm_device.h +++ b/ui/ozone/platform/drm/host/host_drm_device.h
@@ -46,8 +46,9 @@ void ProvideManagers(DrmDisplayHostManager* display_manager, DrmOverlayManagerHost* overlay_manager); - void OnGpuServiceLaunched( - ui::ozone::mojom::DrmDevicePtrInfo drm_device_ptr_info); + void OnGpuServiceLaunchedOnIOThread( + ui::ozone::mojom::DrmDevicePtr drm_device_ptr, + scoped_refptr<base::SingleThreadTaskRunner> ui_runner); // Invoked by DrmDeviceConnector on loss of GPU service. void OnGpuServiceLost(); @@ -65,8 +66,10 @@ bool GpuTakeDisplayControl() override; bool GpuRefreshNativeDisplays() override; bool GpuRelinquishDisplayControl() override; - bool GpuAddGraphicsDevice(const base::FilePath& path, - base::ScopedFD fd) override; + bool GpuAddGraphicsDeviceOnUIThread(const base::FilePath& path, + base::ScopedFD fd) override; + void GpuAddGraphicsDeviceOnIOThread(const base::FilePath& path, + base::ScopedFD fd) override; bool GpuRemoveGraphicsDevice(const base::FilePath& path) override; // Services needed for DrmOverlayManagerHost. @@ -116,8 +119,6 @@ // TODO(rjkroege): Get rid of the need for this method in a subsequent CL. void PollForSingleThreadReady(int previous_delay); - void RunObservers(); - void GpuCheckOverlayCapabilitiesCallback( gfx::AcceleratedWidget widget, const OverlaySurfaceCandidateList& overlays, @@ -136,8 +137,12 @@ display::HDCPState state) const; void GpuSetHDCPStateCallback(int64_t display_id, bool success) const; + void OnGpuServiceLaunchedOnUIThread( + ui::ozone::mojom::DrmDevicePtrInfo drm_device_ptr_info); + // Mojo implementation of the DrmDevice. Will be bound on the "main" thread. ui::ozone::mojom::DrmDevicePtr drm_device_ptr_; + ui::ozone::mojom::DrmDevicePtr drm_device_ptr_on_io_thread_; DrmDisplayHostManager* display_manager_; // Not owned. DrmOverlayManagerHost* overlay_manager_; // Not owned.
diff --git a/ui/snapshot/screenshot_grabber.cc b/ui/snapshot/screenshot_grabber.cc index 9423389..476bbe2 100644 --- a/ui/snapshot/screenshot_grabber.cc +++ b/ui/snapshot/screenshot_grabber.cc
@@ -14,7 +14,7 @@ #include "base/location.h" #include "base/logging.h" #include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/single_thread_task_runner.h" #include "base/task/post_task.h" #include "base/task_runner.h"
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc index 4be6f418..0b0c82f 100644 --- a/ui/views/controls/label.cc +++ b/ui/views/controls/label.cc
@@ -252,6 +252,17 @@ OnPropertyChanged(&full_text_ + kLabelObscured, kPropertyEffectsLayout); } +bool Label::IsDisplayTextTruncated() const { + MaybeBuildDisplayText(); + if (!full_text_ || full_text_->text().empty()) + return false; + auto text_bounds = GetTextBounds(); + return (display_text_ && + display_text_->text() != display_text_->GetDisplayText()) || + text_bounds.width() > GetContentsBounds().width() || + text_bounds.height() > GetContentsBounds().height(); +} + bool Label::GetAllowCharacterBreak() const { return full_text_->word_wrap_behavior() == gfx::WRAP_LONG_WORDS ? true : false;
diff --git a/ui/views/controls/label.h b/ui/views/controls/label.h index 80f60e0..65c0c123 100644 --- a/ui/views/controls/label.h +++ b/ui/views/controls/label.h
@@ -153,6 +153,10 @@ bool GetObscured() const; void SetObscured(bool obscured); + // Returns true if some portion of the text is not displayed, either because + // of eliding or clipping. + bool IsDisplayTextTruncated() const; + // Gets/Sets whether multi-line text can wrap mid-word; the default is false. // TODO(mukai): allow specifying WordWrapBehavior. bool GetAllowCharacterBreak() const; @@ -280,6 +284,7 @@ FRIEND_TEST_ALL_PREFIXES(LabelTest, EmptyLabel); FRIEND_TEST_ALL_PREFIXES(LabelTest, FocusBounds); FRIEND_TEST_ALL_PREFIXES(LabelTest, MultiLineSizingWithElide); + FRIEND_TEST_ALL_PREFIXES(LabelTest, IsDisplayTextTruncated); friend class LabelSelectionTest; // ContextMenuController overrides:
diff --git a/ui/views/controls/label_unittest.cc b/ui/views/controls/label_unittest.cc index 3297a71..c5b4663 100644 --- a/ui/views/controls/label_unittest.cc +++ b/ui/views/controls/label_unittest.cc
@@ -944,6 +944,33 @@ rtl.GetTextDirectionForTesting()); } +TEST_F(LabelTest, IsDisplayTextTruncated) { + const base::string16 text = ASCIIToUTF16("A random string"); + label()->SetText(text); + + gfx::Size zero_size; + label()->SetElideBehavior(gfx::ELIDE_TAIL); + label()->SetBoundsRect(gfx::Rect(zero_size)); + EXPECT_TRUE(label()->IsDisplayTextTruncated()); + + label()->SetElideBehavior(gfx::NO_ELIDE); + EXPECT_TRUE(label()->IsDisplayTextTruncated()); + + gfx::Size minimum_size(1, 1); + label()->SetBoundsRect(gfx::Rect(minimum_size)); + EXPECT_TRUE(label()->IsDisplayTextTruncated()); + + gfx::Size enough_size(100, 100); + label()->SetBoundsRect(gfx::Rect(enough_size)); + EXPECT_FALSE(label()->IsDisplayTextTruncated()); + + const base::string16 empty_text; + label()->SetText(empty_text); + EXPECT_FALSE(label()->IsDisplayTextTruncated()); + label()->SetBoundsRect(gfx::Rect(zero_size)); + EXPECT_FALSE(label()->IsDisplayTextTruncated()); +} + TEST_F(LabelSelectionTest, Selectable) { // By default, labels don't support text selection. EXPECT_FALSE(label()->GetSelectable());
diff --git a/ui/views/controls/menu/menu_controller_unittest.cc b/ui/views/controls/menu/menu_controller_unittest.cc index 57c057bd3..622d675 100644 --- a/ui/views/controls/menu/menu_controller_unittest.cc +++ b/ui/views/controls/menu/menu_controller_unittest.cc
@@ -8,7 +8,7 @@ #include "base/callback.h" #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/single_thread_task_runner.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h"
diff --git a/ui/views/controls/textfield/textfield_model.cc b/ui/views/controls/textfield/textfield_model.cc index 4f9cfa40..9a71347 100644 --- a/ui/views/controls/textfield/textfield_model.cc +++ b/ui/views/controls/textfield/textfield_model.cc
@@ -8,7 +8,7 @@ #include "base/logging.h" #include "base/macros.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/no_destructor.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h"
diff --git a/ui/views/features.gni b/ui/views/features.gni index 16b8660..5705f67d 100644 --- a/ui/views/features.gni +++ b/ui/views/features.gni
@@ -7,5 +7,5 @@ declare_args() { # Whether we should draw the minimize, maximize/restore, and close # buttons using the system theme. Only used on Linux. - enable_native_window_nav_buttons = use_aura && !use_ozone && is_desktop_linux + enable_native_window_nav_buttons = use_aura && is_desktop_linux }
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc index cbeea44f..eb1de4a7 100644 --- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc +++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -11,7 +11,7 @@ #include "base/bind.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" +#include "base/message_loop/message_loop_current.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/stl_util.h"
diff --git a/ui/webui/resources/tools/js_modulizer.gni b/ui/webui/resources/tools/js_modulizer.gni index 383ee06..a25c1dbd 100644 --- a/ui/webui/resources/tools/js_modulizer.gni +++ b/ui/webui/resources/tools/js_modulizer.gni
@@ -10,6 +10,7 @@ "cr.removeWebUIListener|removeWebUIListener", "cr.sendWithPromise|sendWithPromise", "cr.ui.FocusOutlineManager|FocusOutlineManager", + "Polymer.dom.flush|flush", "Polymer.RenderStatus.afterNextRender|afterNextRender", "Polymer.RenderStatus.beforeNextRender|beforeNextRender", ]