diff --git a/AUTHORS b/AUTHORS index 114a021..3161e68 100644 --- a/AUTHORS +++ b/AUTHORS
@@ -49,6 +49,7 @@ Aleksei Gurianov <gurianov@gmail.com> Aleksey Khoroshilov <akhoroshilov@brave.com> Alesandro Ortiz <alesandro@alesandroortiz.com> +Alessandro Astone <ales.astone@gmail.com> Alex Chronopoulos <achronop@gmail.com> Alex Gabriel <minilogo@gmail.com> Alex Gartrell <agartrell@cmu.edu>
diff --git a/DEPS b/DEPS index bd96ca37..410e226b 100644 --- a/DEPS +++ b/DEPS
@@ -253,15 +253,15 @@ # 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': '6a7383e3dd9f6110ff04acefd9418fa5a313b87b', + 'skia_revision': 'acab911351971719347e33aff51d48bd2315fc6c', # 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': 'fbc6a09b6f5a0d1951f41de413a4e3f1fce5ca76', + 'v8_revision': 'a9fd46bdf97c91103b4bd956091c78fa797ab0e9', # 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': '8390196a308b611abf9f5364c210478e4ce25f92', + 'angle_revision': '045e25de7db204a493c36d65771b725441843bb0', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -328,7 +328,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': '0fd7444012e1c51dd13ac3f90c467e012c7dc320', + 'devtools_frontend_revision': '2cc15ff279bb24a3dd11f938638ad6aefe5ec0e9', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -368,7 +368,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. - 'dawn_revision': 'faa889d0b0467276ce186533f510e0fb254a3a17', + 'dawn_revision': '492a2b5354c1bf3b17bdca3695f03d53941ab830', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -809,7 +809,7 @@ 'packages': [ { 'package': 'chromium/rts/model/linux-amd64', - 'version': 'YroYWbHOD0mEJC7zMZ2T6a0-6rc1g2tWrXM4Zp8O5o0C', + 'version': 'RS_VIaHeTwm0apWkniEXy9GBJsQNZmBa0Z4U4Sl55S8C', }, ], 'dep_type': 'cipd', @@ -820,7 +820,7 @@ 'packages': [ { 'package': 'chromium/rts/model/mac-amd64', - 'version': '5dwZtckJhPng3Ae41onM6DPbQkH_GcSiM2lLJINeAIcC', + 'version': 'pT0HUwxu83-nQPWO0RDFdGVb2hwbeC2qG0CxX3KVoG8C', }, ], 'dep_type': 'cipd', @@ -831,7 +831,7 @@ 'packages': [ { 'package': 'chromium/rts/model/windows-amd64', - 'version': 'ifBQjUkeY7JX1jridKaMdrKGb_e3W8DdUxyapL46YrYC', + 'version': 'Tc5VQHi2VFArj-7fJfSyiulyee4vhpNNRg7PJosGrY0C', }, ], 'dep_type': 'cipd', @@ -1514,7 +1514,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '5b5f79bbdb2a2d59c88f02394cac1b08298a3da7', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '5bc4f42913ff638c5471e46ffb6cfcfb89bf71aa', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1592,7 +1592,7 @@ 'packages': [ { 'package': 'fuchsia/third_party/android/aemu/release/linux-amd64', - 'version': 'fDOLeThNNR28jhe-URWsoauZhzf8e9KQz5UqxwVHwhAC' + 'version': '6HqN-ZdlZlUr71pHzn220R1kgSu3eVsGtcVvPXPlc3cC' }, ], 'condition': 'host_os == "linux" and checkout_fuchsia', @@ -1735,7 +1735,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '48cf29b0b746a3d74cdbb75ae4124a29be15bd14', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '8e5a64ae7e74ecb0d8eee4690e44acb758a4bbea', + Var('webrtc_git') + '/src.git' + '@' + 'c2b1bad4c87a43d7e1af85e809d5abe04baf3104', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1805,7 +1805,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@6a1317bc1adb7c7f20470b4e0b56100727211520', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@e246213166d51551d04912652c60672fee6ecf73', 'condition': 'checkout_src_internal', }, @@ -1835,7 +1835,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/help_app/app', - 'version': 'Gx1YbWcoFfN_I2nQVxzPObH9lniTwQTbCkMNyC8UU_AC', + 'version': 'MUyRRQFStgwBSStY82oItgOB1MZJr72eYAZ7q9_omZIC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1846,7 +1846,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/media_app/app', - 'version': 'j-UCJjIllGzw7XC5dlqYw8vIMwrY7zQWgutFJNBf0yoC', + 'version': 'Y3aKDqGDNcaCVlbJG8zV2kt0Ar6wVQ3TeQKwrYGwpoQC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal', @@ -1857,7 +1857,7 @@ 'packages': [ { 'package': 'chromeos_internal/apps/projector_app/app', - 'version': 'E4fDrVqxPQU3eACEOcotbl_cPmAhOxPmtj0yvQW3c_AC', + 'version': 'Wvz_2i9Zuk3T15FYaEjLMCpNHEMNXnJZEV5Bz3eqJSIC', }, ], 'condition': 'checkout_chromeos and checkout_src_internal',
diff --git a/ash/strings/ash_strings_az.xtb b/ash/strings/ash_strings_az.xtb index 1b51464..3c7202b 100644 --- a/ash/strings/ash_strings_az.xtb +++ b/ash/strings/ash_strings_az.xtb
@@ -965,6 +965,7 @@ <translation id="7076293881109082629">Hesaba giriş</translation> <translation id="7086931198345821656">Bu güncəlləmə <ph name="DEVICE_TYPE" /> cihazını yenidən formatlamağı tələb edir. Bütün data silinəcək. Ən son <ph name="SYSTEM_APP_NAME" /> güncəlləməsi ilə bağlı ətraflı məlumat əldə edin.</translation> <translation id="7088960765736518739">Açarlı idarəetmə</translation> +<translation id="7098053464892629930">Bütün əlçatan funksiyalara baxmaq üçün Google Play'də <ph name="NAME" /> üçün tətbiqi endirin</translation> <translation id="7098389117866926363">USB-C cihazı (arxadakı sol port)</translation> <translation id="7106330611027933926">Masaüstü paneli göstərin</translation> <translation id="7118268675952955085">skrinşot</translation> @@ -1209,6 +1210,7 @@ <translation id="8660331759611631213">71-in kvadrat kökü</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />, Siqnal Gücü <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">Şəbəkə siyahısını göstərin. <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">Cihazınızı ayarlamaq üçün <ph name="NAME" /> tətbiqini açın</translation> <translation id="8676770494376880701">Enerjiyə qənaət edən şarjer qoşuldu</translation> <translation id="8683506306463609433">Performansın izlənməsi aktivdir</translation> <translation id="8685326675965865247">Cihaz, tətbiqlər, ayarlar və vebdə axtarın. Tətbiqləri axtarmaq üçün ox düymələrindən istifadə edin.</translation>
diff --git a/ash/strings/ash_strings_iw.xtb b/ash/strings/ash_strings_iw.xtb index b9322c2..39d4767 100644 --- a/ash/strings/ash_strings_iw.xtb +++ b/ash/strings/ash_strings_iw.xtb
@@ -18,7 +18,7 @@ <translation id="1059194134494239015"><ph name="DISPLAY_NAME" />: <ph name="RESOLUTION" /></translation> <translation id="1062407476771304334">החלפה</translation> <translation id="1073899992769346247">צריך להחליף את הסוללה או לטעון אותה</translation> -<translation id="1081015718268701546">בשלב זה, אין תמיכה באפליקציות Linux. אפליקציות אחרות יישמרו.</translation> +<translation id="1081015718268701546">בשלב הזה, אין תמיכה באפליקציות Linux. אפליקציות אחרות יישמרו.</translation> <translation id="108486256082349153">סלולרי: <ph name="ADDRESS" /></translation> <translation id="1087110696012418426">אחה"צ טובים <ph name="GIVEN_NAME" />,</translation> <translation id="109942774857561566">משעמם לי</translation> @@ -356,7 +356,7 @@ <translation id="3252573918265662711">הגדרות</translation> <translation id="3255483164551725916">מה אפשר לעשות?</translation> <translation id="3269597722229482060">לחיצה ימנית</translation> -<translation id="3289544412142055976">בשלב זה, אין תמיכה באפליקציות Linux</translation> +<translation id="3289544412142055976">בשלב הזה, אין תמיכה באפליקציות Linux</translation> <translation id="3289674678944039601">מתבצעת טעינה באמצעות מתאם</translation> <translation id="3290356915286466215">לא מאובטחת</translation> <translation id="3294437725009624529">אורח</translation> @@ -851,7 +851,7 @@ <translation id="6431865393913628856">הקלטת המסך</translation> <translation id="6445835306623867477"><ph name="ROUTE_TITLE" /> במכשיר <ph name="RECEIVER_NAME" /></translation> <translation id="6447111710783417522"><ph name="DATE" />, אירוע (<ph name="NUMBER" />)</translation> -<translation id="6449483711453944360">בשלב זה, אין תמיכה באפליקציות Linux ובחלונות פרטיים</translation> +<translation id="6449483711453944360">בשלב הזה, אין תמיכה באפליקציות Linux ובחלונות פרטיים</translation> <translation id="6452181791372256707">דחייה</translation> <translation id="6453179446719226835">שינוי השפה הסתיים</translation> <translation id="6459472438155181876">הרחבת המסך אל <ph name="DISPLAY_NAME" /> מתבצעת</translation> @@ -1026,7 +1026,7 @@ <translation id="7514365320538308">הורדה</translation> <translation id="7526573455193969409">ייתכן שהרשת מנוטרת</translation> <translation id="7536035074519304529">כתובת IP: <ph name="ADDRESS" /></translation> -<translation id="7543399541175347147">בשלב זה, אין תמיכה באפליקציות Linux ובחלונות פרטיים. אפליקציות אחרות יישמרו.</translation> +<translation id="7543399541175347147">בשלב הזה, אין תמיכה באפליקציות Linux ובחלונות פרטיים. אפליקציות אחרות יישמרו.</translation> <translation id="7544300628205093162">התאורה האחורית של המקלדת פועלת</translation> <translation id="7548434653388805669">לילה טוב!</translation> <translation id="7551643184018910560">הצמדה למדף</translation>
diff --git a/ash/strings/ash_strings_ka.xtb b/ash/strings/ash_strings_ka.xtb index d68ab491..34b4ed33 100644 --- a/ash/strings/ash_strings_ka.xtb +++ b/ash/strings/ash_strings_ka.xtb
@@ -965,6 +965,7 @@ <translation id="7076293881109082629">მიმდინარეობს სისტემაში შესვლა</translation> <translation id="7086931198345821656">ამ განახლების ფარგლებში საჭიროა თქვენი <ph name="DEVICE_TYPE" />-ის Powerwash. ყველა მონაცემი წაიშლება. შეიტყვეთ მეტი <ph name="SYSTEM_APP_NAME" />-ის ბოლო განახლების შესახებ.</translation> <translation id="7088960765736518739">გადამრთველით წვდომა</translation> +<translation id="7098053464892629930">ყველა ხელმისაწვდომი ფუნქციის სანახავად ჩამოტვირთეთ აპი <ph name="NAME" />-ისთვის Google Play-დან</translation> <translation id="7098389117866926363">USB-C მოწყობილობა (უკან მდებარე მარცხენა პორტი)</translation> <translation id="7106330611027933926">სამუშაო მაგიდების ზოლის ჩვენება</translation> <translation id="7118268675952955085">ეკრანის ანაბეჭდი</translation> @@ -1209,6 +1210,7 @@ <translation id="8660331759611631213">71-ის კვადრატული ფესვი</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />, სიგნალის სიძლიერე: <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">ქსელების სიის ჩვენება. <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">თქვენი მოწყობილობის დასაყენებლად გახსენით <ph name="NAME" /></translation> <translation id="8676770494376880701">დაბალი სიმძლავრის დამტენი დაკავშირებულია</translation> <translation id="8683506306463609433">ეფექტურობის ტრასირება გააქტიურებულია</translation> <translation id="8685326675965865247">წამოიწყეთ ძიება თქვენს მოწყობილობაში, აპებში, პარამეტრებსა და ვებში. აპებში ნავიგაციისთვის გამოიყენეთ ისრიანი კლავიშები.</translation>
diff --git a/ash/strings/ash_strings_mk.xtb b/ash/strings/ash_strings_mk.xtb index b84756d..07b25602 100644 --- a/ash/strings/ash_strings_mk.xtb +++ b/ash/strings/ash_strings_mk.xtb
@@ -966,6 +966,7 @@ <translation id="7076293881109082629">Пријавување</translation> <translation id="7086931198345821656">Ажурирањево бара фабричко ресетирање на вашиот <ph name="DEVICE_TYPE" />. Сите податоци ќе се избришат. Дознајте повеќе за најновото ажурирање на <ph name="SYSTEM_APP_NAME" />.</translation> <translation id="7088960765736518739">Пристап со прекинувачи</translation> +<translation id="7098053464892629930">Преземете ја апликацијата за <ph name="NAME" /> на Google Play за да ги видите сите достапни функции</translation> <translation id="7098389117866926363">USB-Ц уред (лева порта на задната страна)</translation> <translation id="7106330611027933926">Прикажи ја лентата на работната површина</translation> <translation id="7118268675952955085">слика од екранот</translation> @@ -1210,6 +1211,7 @@ <translation id="8660331759611631213">Квадратен корен од 71</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />, јачина на сигналот: <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">Прикажи го списокот со мрежи. <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">Отворете ја <ph name="NAME" /> за да го поставите уредот</translation> <translation id="8676770494376880701">Поврзан е полнач со ниско напојување</translation> <translation id="8683506306463609433">Следењето на изведбата е активно</translation> <translation id="8685326675965865247">Пребарувајте низ уредот, апликациите, поставките и на интернет. Користете ги копчињата со стрелки за навигација низ апликациите.</translation>
diff --git a/ash/strings/ash_strings_mn.xtb b/ash/strings/ash_strings_mn.xtb index 66b43e1f..0d28edc 100644 --- a/ash/strings/ash_strings_mn.xtb +++ b/ash/strings/ash_strings_mn.xtb
@@ -966,6 +966,7 @@ <translation id="7076293881109082629">Нэвтэрч байна</translation> <translation id="7086931198345821656">Энэ шинэчлэлт таны <ph name="DEVICE_TYPE" />-г powerwash хийхийг шаардаж байна. Бүх өгөгдлийг устгана. <ph name="SYSTEM_APP_NAME" />-н хамгийн сүүлийн шинэчлэлтийн талаар нэмэлт мэдээлэл авна уу.</translation> <translation id="7088960765736518739">Хандалтыг сэлгэх</translation> +<translation id="7098053464892629930">Боломжтой бүх онцлогийг харахын тулд <ph name="NAME" />-н аппыг Google Play-с татна уу</translation> <translation id="7098389117866926363">USB-C төхөөрөмж (ард талын зүүн порт)</translation> <translation id="7106330611027933926">Дэлгэцийн хэсгийг харуулах</translation> <translation id="7118268675952955085">дэлгэцийн агшин</translation> @@ -1211,6 +1212,7 @@ <translation id="8660331759611631213">71-ийн квадрат язгуур</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />, дохионы хүч <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">Сүлжээний жагсаалтыг харуулна уу. <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">Төхөөрөмжөө тохируулахын тулд <ph name="NAME" />-г нээнэ үү</translation> <translation id="8676770494376880701">Цэнэглэгчийг холбосон байна</translation> <translation id="8683506306463609433">Гүйцэтгэлийн хяналт идэвхтэй байна</translation> <translation id="8685326675965865247">Төхөөрөмж, апп, тохиргоо, вебээ хайна уу. Аппуудын хооронд шилжихийн тулд сумтай товчлууруудыг ашиглана уу.</translation>
diff --git a/ash/strings/ash_strings_my.xtb b/ash/strings/ash_strings_my.xtb index 0b0ab8b9..d0642694 100644 --- a/ash/strings/ash_strings_my.xtb +++ b/ash/strings/ash_strings_my.xtb
@@ -965,6 +965,7 @@ <translation id="7076293881109082629">အကောင့်ထံဝင်ရောက်နေသည်</translation> <translation id="7086931198345821656">ဤအပ်ဒိတ်သည် သင့် <ph name="DEVICE_TYPE" /> ကို ပါဝါဝရှ် ပြုလုပ်ရန် သတ်မှတ်ထားသည်။ ဒေတာအားလုံးကို ဖျက်ပါမည်။ နောက်ဆုံးထွက် <ph name="SYSTEM_APP_NAME" /> အပ်ဒိတ်အကြောင်း ပိုမိုလေ့လာပါ။</translation> <translation id="7088960765736518739">ခလုတ်ဖြင့် အသုံးပြုခြင်း</translation> +<translation id="7098053464892629930">ရနိုင်သည့် ဝန်ဆောင်မှုအားလုံးကို ကြည့်ရန် Google Play တွင် <ph name="NAME" /> အက်ပ်ကို ဒေါင်းလုဒ်လုပ်ပါ</translation> <translation id="7098389117866926363">USB-C ကိရိယာ (ကျောဘက် ဘယ် ပို့တ်)</translation> <translation id="7106330611027933926">မျက်နှာပြင်ဘား ပြရန်</translation> <translation id="7118268675952955085">ဖန်သားပြင်ဓာတ်ပုံ</translation> @@ -1209,6 +1210,7 @@ <translation id="8660331759611631213">၇၁ ၏ နှစ်ထပ်ကိန်းရင်း</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />၊ လိုင်းဆွဲအား <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">ကွန်ရက်စာရင်းကို ပြရန်။ <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">သင့်စက်ကို စနစ်ထည့်သွင်းရန် <ph name="NAME" /> ဖွင့်ပါ</translation> <translation id="8676770494376880701">ပါဝါနှိမ့် အားသွင်းကိရိယာ ချိတ်ဆက်ထားသည်</translation> <translation id="8683506306463609433">စွမ်းဆောင်ရည် မှတ်တမ်းတင်ခြင်းကို လက်ရှိဖွင့်ထားသည်</translation> <translation id="8685326675965865247">သင်၏ စက်ပစ္စည်း၊ အက်ပ်၊ ဆက်တင်နှင့် ဝဘ်တို့ကို ရှာပါ။ အက်ပ်များတွင် မြားခလုတ်များကို သုံးပြီး ရွှေ့ပါ။</translation>
diff --git a/ash/strings/ash_strings_th.xtb b/ash/strings/ash_strings_th.xtb index cd4ce0a..361af35 100644 --- a/ash/strings/ash_strings_th.xtb +++ b/ash/strings/ash_strings_th.xtb
@@ -962,6 +962,7 @@ <translation id="7076293881109082629">กำลังลงชื่อเข้าใช้</translation> <translation id="7086931198345821656">การอัปเดตนี้ต้องทำการ Powerwash <ph name="DEVICE_TYPE" /> ระบบจะลบข้อมูลทั้งหมด ดูข้อมูลเพิ่มเติมเกี่ยวกับอัปเดตล่าสุดของ <ph name="SYSTEM_APP_NAME" /></translation> <translation id="7088960765736518739">การเข้าถึงด้วยสวิตช์</translation> +<translation id="7098053464892629930">ดาวน์โหลดแอปของ <ph name="NAME" /> ใน Google Play เพื่อดูฟีเจอร์ที่ใช้ได้ทั้งหมด</translation> <translation id="7098389117866926363">อุปกรณ์ USB-C (พอร์ตด้านหลังซ้าย)</translation> <translation id="7106330611027933926">แสดงเดสก์บาร์</translation> <translation id="7118268675952955085">ภาพหน้าจอ</translation> @@ -1205,6 +1206,7 @@ <translation id="8660331759611631213">รากที่สองของ 71</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />, ความแรงสัญญาณ <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">แสดงรายการเครือข่าย <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">เปิด <ph name="NAME" /> เพื่อตั้งค่าอุปกรณ์</translation> <translation id="8676770494376880701">เชื่อมต่อกับที่ชาร์จพลังงานต่ำ</translation> <translation id="8683506306463609433">ใช้งานการติดตามประสิทธิภาพอยู่</translation> <translation id="8685326675965865247">ค้นหาอุปกรณ์ แอป การตั้งค่า และเว็บ ใช้แป้นลูกศรเพื่อไปยังส่วนต่างๆ ของแอป</translation>
diff --git a/ash/strings/ash_strings_ur.xtb b/ash/strings/ash_strings_ur.xtb index 5f1405a..8a0fea1 100644 --- a/ash/strings/ash_strings_ur.xtb +++ b/ash/strings/ash_strings_ur.xtb
@@ -964,6 +964,7 @@ <translation id="7076293881109082629">سائن ان کیا جا رہا ہے</translation> <translation id="7086931198345821656">اس اپ ڈیٹ کے لیے آپ کے <ph name="DEVICE_TYPE" /> کی پاور واشنگ درکار ہے۔ تمام ڈیٹا حذف کر دیا جائے گا۔ تازہ ترین <ph name="SYSTEM_APP_NAME" /> اپ ڈیٹ کے بارے میں مزید جانیں۔</translation> <translation id="7088960765736518739">سوئچ رسائی</translation> +<translation id="7098053464892629930">تمام دستیاب خصوصیات کو دیکھنے کے لیے Google Play پر <ph name="NAME" /> کے لیے ایپ ڈاؤن لوڈ کریں</translation> <translation id="7098389117866926363">USB-C آلہ (پیچھے موجود بایاں پورٹ)</translation> <translation id="7106330611027933926">ڈیسک بار دکھائیں</translation> <translation id="7118268675952955085">اسکرین شاٹ</translation> @@ -1208,6 +1209,7 @@ <translation id="8660331759611631213">71 کا جَذر المربع</translation> <translation id="8663756353922886599"><ph name="CONNECTION_STATUS" />، سگنل کی مضبوطی <ph name="SIGNAL_STRENGTH" /></translation> <translation id="8664753092453405566">نیٹ ورک کی فہرست دکھائیں۔ <ph name="STATE_TEXT" /></translation> +<translation id="8666856788528804727">اپنا آلہ سیٹ اپ کرنے کے لیے <ph name="NAME" /> کھولیں</translation> <translation id="8676770494376880701">کم پاور چارجر منسلک ہوگیا</translation> <translation id="8683506306463609433">کارکردگی کا پتا لگانا فعال ہے</translation> <translation id="8685326675965865247">اپنا آلہ، ایپس، ترتیبات اور ویب تلاش کریں۔ اپنی ایپس کو نیویگیٹ کرنے کے لیے تیر کے نشان والی کلیدیں استعمال کریں۔</translation>
diff --git a/ash/webui/color_internals/test/color_internals_browsertest.js b/ash/webui/color_internals/test/color_internals_browsertest.js index dd77b62..7b94c85 100644 --- a/ash/webui/color_internals/test/color_internals_browsertest.js +++ b/ash/webui/color_internals/test/color_internals_browsertest.js
@@ -22,11 +22,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get isAsync() { return true; }
diff --git a/ash/webui/demo_mode_app_ui/test/demo_mode_app_ui_browsertest.js b/ash/webui/demo_mode_app_ui/test/demo_mode_app_ui_browsertest.js index b062e57..7e3b34b 100644 --- a/ash/webui/demo_mode_app_ui/test/demo_mode_app_ui_browsertest.js +++ b/ash/webui/demo_mode_app_ui/test/demo_mode_app_ui_browsertest.js
@@ -16,11 +16,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get featureList() { return {enabled: ['ash::features::kDemoModeSWA']}; }
diff --git a/ash/webui/eche_app_ui/test/eche_app_ui_browsertest.js b/ash/webui/eche_app_ui/test/eche_app_ui_browsertest.js index 42970e59..3742aed 100644 --- a/ash/webui/eche_app_ui/test/eche_app_ui_browsertest.js +++ b/ash/webui/eche_app_ui/test/eche_app_ui_browsertest.js
@@ -21,11 +21,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get featureList() { return { enabled: ['ash::features::kEcheSWA', 'ash::features::kPhoneHubRecentApps']
diff --git a/ash/webui/help_app_ui/test/help_app_ui_gtest_browsertest.js b/ash/webui/help_app_ui/test/help_app_ui_gtest_browsertest.js index bec1748..975b0f8 100644 --- a/ash/webui/help_app_ui/test/help_app_ui_gtest_browsertest.js +++ b/ash/webui/help_app_ui/test/help_app_ui_gtest_browsertest.js
@@ -43,11 +43,6 @@ get typedefCppFixture() { return 'HelpAppUiBrowserTest'; } - - /** @override */ - get runAccessibilityChecks() { - return false; - } }; // js2gtest fixtures require var here (https://crbug.com/1033337).
diff --git a/ash/webui/media_app_ui/test/media_app_ui_gtest_browsertest.js b/ash/webui/media_app_ui/test/media_app_ui_gtest_browsertest.js index 648cd7b..04d8b3e 100644 --- a/ash/webui/media_app_ui/test/media_app_ui_gtest_browsertest.js +++ b/ash/webui/media_app_ui/test/media_app_ui_gtest_browsertest.js
@@ -36,11 +36,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get typedefCppFixture() { return 'MediaAppUiBrowserTest'; }
diff --git a/ash/webui/personalization_app/test/personalization_app_browsertest.js b/ash/webui/personalization_app/test/personalization_app_browsertest.js index 390ca92..4f05375 100644 --- a/ash/webui/personalization_app/test/personalization_app_browsertest.js +++ b/ash/webui/personalization_app/test/personalization_app_browsertest.js
@@ -38,11 +38,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get typedefCppFixture() { return 'PersonalizationAppBrowserTestFixture'; }
diff --git a/ash/webui/sample_system_web_app_ui/test/sample_system_web_app_ui_browsertest.js b/ash/webui/sample_system_web_app_ui/test/sample_system_web_app_ui_browsertest.js index d23bd0d..3b8b57d 100644 --- a/ash/webui/sample_system_web_app_ui/test/sample_system_web_app_ui_browsertest.js +++ b/ash/webui/sample_system_web_app_ui/test/sample_system_web_app_ui_browsertest.js
@@ -22,11 +22,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get isAsync() { return true; } @@ -130,4 +125,4 @@ window.childPageReady.then(({childPage}) => { childPage.doSomethingForParent('Hello from chrome://'); }); -}); \ No newline at end of file +});
diff --git a/ash/webui/system_apps/public/js/message_pipe_browsertest.js b/ash/webui/system_apps/public/js/message_pipe_browsertest.js index 1561d58..d63412a 100644 --- a/ash/webui/system_apps/public/js/message_pipe_browsertest.js +++ b/ash/webui/system_apps/public/js/message_pipe_browsertest.js
@@ -51,11 +51,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get typedefCppFixture() { return 'JsLibraryTest'; }
diff --git a/ash/webui/system_extensions_internals_ui/test/system_extensions_internals_ui_browsertest.js b/ash/webui/system_extensions_internals_ui/test/system_extensions_internals_ui_browsertest.js index e9f0658..b7f33440 100644 --- a/ash/webui/system_extensions_internals_ui/test/system_extensions_internals_ui_browsertest.js +++ b/ash/webui/system_extensions_internals_ui/test/system_extensions_internals_ui_browsertest.js
@@ -31,11 +31,6 @@ } /** @override */ - get runAccessibilityChecks() { - return false; - } - - /** @override */ get isAsync() { return true; }
diff --git a/ash/webui/web_applications/js2gtest_support.externs.js b/ash/webui/web_applications/js2gtest_support.externs.js index 06d9eb97..f2b3aabb 100644 --- a/ash/webui/web_applications/js2gtest_support.externs.js +++ b/ash/webui/web_applications/js2gtest_support.externs.js
@@ -30,7 +30,6 @@ get extraLibraries() {} get isAsync() {} get featureList() {} - get runAccessibilityChecks() {} get typedefCppFixture() {} setUp() {} }
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc index fe39e47..7663889 100644 --- a/base/allocator/allocator_shim.cc +++ b/base/allocator/allocator_shim.cc
@@ -29,6 +29,10 @@ #include "base/mac/mach_logging.h" #endif +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +#include "base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h" +#endif + // No calls to malloc / new in this file. They would would cause re-entrancy of // the shim, which is hard to deal with. Keep this code as simple as possible // and don't use any external C++ object here, not even //base ones. Even if @@ -75,6 +79,10 @@ void SetCallNewHandlerOnMallocFailure(bool value) { g_call_new_handler_on_malloc_failure = value; + +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + base::internal::PartitionAllocSetCallNewHandlerOnMallocFailure(value); +#endif } void* UncheckedAlloc(size_t size) {
diff --git a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc index add93ae..b9e35a39 100644 --- a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc +++ b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.cc
@@ -258,19 +258,43 @@ namespace base { namespace internal { +namespace { +#if BUILDFLAG(IS_APPLE) +int g_alloc_flags = 0; +#else +constexpr int g_alloc_flags = 0; +#endif +} // namespace + +void PartitionAllocSetCallNewHandlerOnMallocFailure(bool value) { +#if BUILDFLAG(IS_APPLE) + // We generally prefer to always crash rather than returning nullptr for + // OOM. However, on some macOS releases, we have to locally allow it due to + // weirdness in OS code. See https://crbug.com/654695 for details. + // + // Apple only since it's not needed elsewhere, and there is a performance + // penalty. + + if (value) + g_alloc_flags = 0; + else + g_alloc_flags = PartitionAllocReturnNull; +#endif +} + void* PartitionMalloc(const AllocatorDispatch*, size_t size, void* context) { ScopedDisallowAllocations guard{}; - return Allocator()->AllocFlagsNoHooks(0, MaybeAdjustSize(size), - PartitionPageSize()); + return Allocator()->AllocFlagsNoHooks( + 0 | g_alloc_flags, MaybeAdjustSize(size), PartitionPageSize()); } void* PartitionMallocUnchecked(const AllocatorDispatch*, size_t size, void* context) { ScopedDisallowAllocations guard{}; - return Allocator()->AllocFlagsNoHooks(base::PartitionAllocReturnNull, - MaybeAdjustSize(size), - PartitionPageSize()); + return Allocator()->AllocFlagsNoHooks( + base::PartitionAllocReturnNull | g_alloc_flags, MaybeAdjustSize(size), + PartitionPageSize()); } void* PartitionCalloc(const AllocatorDispatch*, @@ -279,8 +303,8 @@ void* context) { ScopedDisallowAllocations guard{}; const size_t total = base::CheckMul(n, MaybeAdjustSize(size)).ValueOrDie(); - return Allocator()->AllocFlagsNoHooks(base::PartitionAllocZeroFill, total, - PartitionPageSize()); + return Allocator()->AllocFlagsNoHooks( + base::PartitionAllocZeroFill | g_alloc_flags, total, PartitionPageSize()); } void* PartitionMemalign(const AllocatorDispatch*, @@ -352,8 +376,8 @@ } #endif // BUILDFLAG(IS_APPLE) - return Allocator()->ReallocFlags(base::PartitionAllocNoHooks, address, - MaybeAdjustSize(size), ""); + return Allocator()->ReallocFlags(base::PartitionAllocNoHooks | g_alloc_flags, + address, MaybeAdjustSize(size), ""); } #if BUILDFLAG(IS_ANDROID) && BUILDFLAG(IS_CHROMECAST)
diff --git a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h index f460896..93ccc567 100644 --- a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h +++ b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc.h
@@ -12,6 +12,8 @@ namespace base { namespace internal { +void PartitionAllocSetCallNewHandlerOnMallocFailure(bool value); + class BASE_EXPORT PartitionAllocMalloc { public: static ThreadSafePartitionRoot* Allocator();
diff --git a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc index 2a6465a08..04d9070 100644 --- a/base/allocator/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc +++ b/base/allocator/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
@@ -9,6 +9,7 @@ #include "base/allocator/buildflags.h" #include "base/compiler_specific.h" +#include "base/memory/page_size.h" #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h" @@ -181,6 +182,20 @@ alignof(ThreadSafePartitionRoot)); } +// crbug.com/1297945 +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_APPLE) +TEST(PartitionAllocAsMalloc, DisableCrashOnOom) { + PartitionAllocSetCallNewHandlerOnMallocFailure(false); + // Smaller than the max size to avoid overflow checks with padding. + void* ptr = PartitionMalloc( + nullptr, std::numeric_limits<size_t>::max() - 10 * base::GetPageSize(), + nullptr); + // Should not crash. + EXPECT_FALSE(ptr); + PartitionAllocSetCallNewHandlerOnMallocFailure(true); +} +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(IS_APPLE) + } // namespace internal } // namespace base #endif // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) &&
diff --git a/base/memory/raw_ptr.cc b/base/memory/raw_ptr.cc index db852a2..8e097e8 100644 --- a/base/memory/raw_ptr.cc +++ b/base/memory/raw_ptr.cc
@@ -20,24 +20,35 @@ namespace base::internal { -void BackupRefPtrImpl::AcquireInternal(uintptr_t address) { +template <bool AllowDangling> +void BackupRefPtrImpl<AllowDangling>::AcquireInternal(uintptr_t address) { #if DCHECK_IS_ON() || BUILDFLAG(ENABLE_BACKUP_REF_PTR_SLOW_CHECKS) CHECK(IsManagedByPartitionAllocBRPPool(address)); #endif uintptr_t slot_start = PartitionAllocGetSlotStartInBRPPool(address); - PartitionRefCountPointer(slot_start)->Acquire(); + if constexpr (AllowDangling) + PartitionRefCountPointer(slot_start)->AcquireFromUnprotectedPtr(); + else + PartitionRefCountPointer(slot_start)->Acquire(); } -void BackupRefPtrImpl::ReleaseInternal(uintptr_t address) { +template <bool AllowDangling> +void BackupRefPtrImpl<AllowDangling>::ReleaseInternal(uintptr_t address) { #if DCHECK_IS_ON() || BUILDFLAG(ENABLE_BACKUP_REF_PTR_SLOW_CHECKS) CHECK(IsManagedByPartitionAllocBRPPool(address)); #endif uintptr_t slot_start = PartitionAllocGetSlotStartInBRPPool(address); - if (PartitionRefCountPointer(slot_start)->Release()) - PartitionAllocFreeForRefCounting(slot_start); + if constexpr (AllowDangling) { + if (PartitionRefCountPointer(slot_start)->ReleaseFromUnprotectedPtr()) + PartitionAllocFreeForRefCounting(slot_start); + } else { + if (PartitionRefCountPointer(slot_start)->Release()) + PartitionAllocFreeForRefCounting(slot_start); + } } -bool BackupRefPtrImpl::IsPointeeAlive(uintptr_t address) { +template <bool AllowDangling> +bool BackupRefPtrImpl<AllowDangling>::IsPointeeAlive(uintptr_t address) { #if DCHECK_IS_ON() || BUILDFLAG(ENABLE_BACKUP_REF_PTR_SLOW_CHECKS) CHECK(IsManagedByPartitionAllocBRPPool(address)); #endif @@ -45,11 +56,17 @@ return PartitionRefCountPointer(slot_start)->IsAlive(); } -bool BackupRefPtrImpl::IsValidDelta(uintptr_t address, - ptrdiff_t delta_in_bytes) { +template <bool AllowDangling> +bool BackupRefPtrImpl<AllowDangling>::IsValidDelta(uintptr_t address, + ptrdiff_t delta_in_bytes) { return PartitionAllocIsValidPtrDelta(address, delta_in_bytes); } +// Explicitly instantiates the two BackupRefPtr variants in the .cc. This +// ensures the definitions not visible from the .h are available in the binary. +template struct BackupRefPtrImpl</*AllowDangling=*/false>; +template struct BackupRefPtrImpl</*AllowDangling=*/true>; + #if DCHECK_IS_ON() || BUILDFLAG(ENABLE_BACKUP_REF_PTR_SLOW_CHECKS) void CheckThatAddressIsntWithinFirstPartitionPage(uintptr_t address) { if (IsManagedByDirectMap(address)) {
diff --git a/base/memory/raw_ptr.h b/base/memory/raw_ptr.h index 3069c513..0da2923 100644 --- a/base/memory/raw_ptr.h +++ b/base/memory/raw_ptr.h
@@ -135,6 +135,7 @@ uintptr_t address); #endif +template <bool AllowDangling = false> struct BackupRefPtrImpl { // Note that `BackupRefPtrImpl` itself is not thread-safe. If multiple threads // modify the same smart pointer object without synchronization, a data race @@ -495,14 +496,19 @@ // non-default move constructor/assignment. Thus, it's possible to get an error // where the pointer is not actually dangling, and have to work around the // compiler. We have not managed to construct such an example in Chromium yet. -template <typename T, #if BUILDFLAG(USE_BACKUP_REF_PTR) - typename Impl = internal::BackupRefPtrImpl> +using RawPtrMayDangle = internal::BackupRefPtrImpl</*AllowDangling=*/true>; +using RawPtrBanDanglingIfSupported = + internal::BackupRefPtrImpl</*AllowDangling=*/false>; #elif BUILDFLAG(USE_ASAN_BACKUP_REF_PTR) - typename Impl = internal::AsanBackupRefPtrImpl> +using RawPtrMayDangle = internal::AsanBackupRefPtrImpl; +using RawPtrBanDanglingIfSupported = internal::AsanBackupRefPtrImpl; #else - typename Impl = internal::RawPtrNoOpImpl> +using RawPtrMayDangle = internal::RawPtrNoOpImpl; +using RawPtrBanDanglingIfSupported = internal::RawPtrNoOpImpl; #endif + +template <typename T, typename Impl = RawPtrBanDanglingIfSupported> class TRIVIAL_ABI GSL_POINTER raw_ptr { public: static_assert(raw_ptr_traits::IsSupportedType<T>::value, @@ -897,6 +903,17 @@ using base::raw_ptr; +// DisableDanglingPtrDetection option for raw_ptr annotates +// "intentional-and-safe" dangling pointers. It is meant to be used at the +// margin, only if there is no better way to re-architecture the code. +// +// Usage: +// raw_ptr<T, DisableDanglingPtrDetection> dangling_ptr; +// +// When using it, please provide a justification about what guarantees it will +// never be dereferenced after becoming dangling. +using DisableDanglingPtrDetection = base::RawPtrMayDangle; + namespace std { // Override so set/map lookups do not create extra raw_ptr. This also allows
diff --git a/base/memory/raw_ptr_unittest.cc b/base/memory/raw_ptr_unittest.cc index b25b1ce47..4965ae68 100644 --- a/base/memory/raw_ptr_unittest.cc +++ b/base/memory/raw_ptr_unittest.cc
@@ -11,16 +11,21 @@ #include <utility> #include "base/allocator/buildflags.h" +#include "base/allocator/partition_alloc_support.h" +#include "base/allocator/partition_allocator/dangling_raw_ptr_checks.h" #include "base/allocator/partition_allocator/partition_alloc.h" #include "base/logging.h" #include "build/build_config.h" #include "build/buildflag.h" +#include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(ENABLE_BASE_TRACING) #include "third_party/perfetto/include/perfetto/test/traced_value_test_support.h" // no-presubmit-check nogncheck #endif // BUILDFLAG(ENABLE_BASE_TRACING) +using testing::AllOf; +using testing::HasSubstr; using testing::Test; static_assert(sizeof(raw_ptr<void>) == sizeof(void*), @@ -84,7 +89,8 @@ } #if BUILDFLAG(USE_BACKUP_REF_PTR) -using CountingSuperClass = base::internal::BackupRefPtrImpl; +using CountingSuperClass = + base::internal::BackupRefPtrImpl</*AllowDangling=*/false>; #else using CountingSuperClass = base::internal::RawPtrNoOpImpl; #endif @@ -1164,6 +1170,158 @@ } #endif +namespace { + +// Install dangling raw_ptr handlers and restore them when going out of scope. +class ScopedInstallDanglingRawPtrChecks { + public: + ScopedInstallDanglingRawPtrChecks() { + old_detected_fn_ = partition_alloc::GetDanglingRawPtrDetectedFn(); + old_dereferenced_fn_ = partition_alloc::GetDanglingRawPtrReleasedFn(); + allocator::InstallDanglingRawPtrChecks(); + } + ~ScopedInstallDanglingRawPtrChecks() { + partition_alloc::SetDanglingRawPtrDetectedFn(old_detected_fn_); + partition_alloc::SetDanglingRawPtrReleasedFn(old_dereferenced_fn_); + } + + private: + partition_alloc::DanglingRawPtrDetectedFn* old_detected_fn_; + partition_alloc::DanglingRawPtrReleasedFn* old_dereferenced_fn_; +}; + +} // namespace + +TEST(BackupRefPtrImpl, RawPtrMayDangle) { + // TODO(bartekn): Avoid using PartitionAlloc API directly. Switch to + // new/delete once PartitionAlloc Everywhere is fully enabled. + PartitionAllocGlobalInit(HandleOOM); + PartitionAllocator<ThreadSafe> allocator; + allocator.init(kOpts); + ScopedInstallDanglingRawPtrChecks enable_dangling_raw_ptr_checks; + + void* ptr = allocator.root()->Alloc(16, ""); + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr = ptr; + allocator.root()->Free(ptr); // No dangling raw_ptr reported. + dangling_ptr = nullptr; // No dangling raw_ptr reported. +} + +TEST(BackupRefPtrImpl, RawPtrNotDangling) { + // TODO(bartekn): Avoid using PartitionAlloc API directly. Switch to + // new/delete once PartitionAlloc Everywhere is fully enabled. + PartitionAllocGlobalInit(HandleOOM); + PartitionAllocator<ThreadSafe> allocator; + allocator.init(kOpts); + ScopedInstallDanglingRawPtrChecks enable_dangling_raw_ptr_checks; + + void* ptr = allocator.root()->Alloc(16, ""); + raw_ptr<void> dangling_ptr = ptr; +#if BUILDFLAG(ENABLE_DANGLING_RAW_PTR_CHECKS) + EXPECT_DEATH_IF_SUPPORTED( + { + allocator.root()->Free(ptr); // Dangling raw_ptr detected. + dangling_ptr = nullptr; // Dangling raw_ptr released. + }, + AllOf(HasSubstr("Detected dangling raw_ptr"), + HasSubstr("The memory was freed at:"), + HasSubstr("The dangling raw_ptr was released at:"))); +#endif +} + +// Check the comparator operators work, even across raw_ptr with different +// dangling policies. +TEST(BackupRefPtrImpl, DanglingPtrComparison) { + // TODO(bartekn): Avoid using PartitionAlloc API directly. Switch to + // new/delete once PartitionAlloc Everywhere is fully enabled. + PartitionAllocGlobalInit(HandleOOM); + PartitionAllocator<ThreadSafe> allocator; + allocator.init(kOpts); + ScopedInstallDanglingRawPtrChecks enable_dangling_raw_ptr_checks; + + void* ptr_1 = allocator.root()->Alloc(16, ""); + void* ptr_2 = allocator.root()->Alloc(16, ""); + + if (ptr_1 > ptr_2) + std::swap(ptr_1, ptr_2); + + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_1 = ptr_1; + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_2 = ptr_2; + raw_ptr<void> not_dangling_ptr_1 = ptr_1; + raw_ptr<void> not_dangling_ptr_2 = ptr_2; + + EXPECT_EQ(dangling_ptr_1, not_dangling_ptr_1); + EXPECT_EQ(dangling_ptr_2, not_dangling_ptr_2); + EXPECT_NE(dangling_ptr_1, not_dangling_ptr_2); + EXPECT_NE(dangling_ptr_2, not_dangling_ptr_1); + EXPECT_LT(dangling_ptr_1, not_dangling_ptr_2); + EXPECT_GT(dangling_ptr_2, not_dangling_ptr_1); + EXPECT_LT(not_dangling_ptr_1, dangling_ptr_2); + EXPECT_GT(not_dangling_ptr_2, dangling_ptr_1); + + not_dangling_ptr_1 = nullptr; + not_dangling_ptr_2 = nullptr; + + allocator.root()->Free(ptr_1); + allocator.root()->Free(ptr_2); +} + +// Check the assignment operator works, even across raw_ptr with different +// dangling policies. +TEST(BackupRefPtrImpl, DanglingPtrAssignment) { + // TODO(bartekn): Avoid using PartitionAlloc API directly. Switch to + // new/delete once PartitionAlloc Everywhere is fully enabled. + PartitionAllocGlobalInit(HandleOOM); + PartitionAllocator<ThreadSafe> allocator; + allocator.init(kOpts); + ScopedInstallDanglingRawPtrChecks enable_dangling_raw_ptr_checks; + + void* ptr = allocator.root()->Alloc(16, ""); + + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_1; + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_2; + raw_ptr<void> not_dangling_ptr; + + dangling_ptr_1 = ptr; + + not_dangling_ptr = dangling_ptr_1; + dangling_ptr_1 = nullptr; + + dangling_ptr_2 = not_dangling_ptr; + not_dangling_ptr = nullptr; + + allocator.root()->Free(ptr); + + dangling_ptr_1 = dangling_ptr_2; + dangling_ptr_2 = nullptr; + + not_dangling_ptr = dangling_ptr_1; + dangling_ptr_1 = nullptr; +} + +// Check the copy constructor works, even across raw_ptr with different dangling +// policies. +TEST(BackupRefPtrImpl, DanglingPtrCopyContructor) { + // TODO(bartekn): Avoid using PartitionAlloc API directly. Switch to + // new/delete once PartitionAlloc Everywhere is fully enabled. + PartitionAllocGlobalInit(HandleOOM); + PartitionAllocator<ThreadSafe> allocator; + allocator.init(kOpts); + ScopedInstallDanglingRawPtrChecks enable_dangling_raw_ptr_checks; + + void* ptr = allocator.root()->Alloc(16, ""); + + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_1(ptr); + raw_ptr<void> not_dangling_ptr_1(ptr); + + raw_ptr<void, DisableDanglingPtrDetection> dangling_ptr_2(not_dangling_ptr_1); + raw_ptr<void> not_dangling_ptr_2(dangling_ptr_1); + + not_dangling_ptr_1 = nullptr; + not_dangling_ptr_2 = nullptr; + + allocator.root()->Free(ptr); +} + #endif // BUILDFLAG(USE_BACKUP_REF_PTR) && // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
diff --git a/build/fuchsia/linux.sdk.sha1 b/build/fuchsia/linux.sdk.sha1 index 5d3b67e..62b410b 100644 --- a/build/fuchsia/linux.sdk.sha1 +++ b/build/fuchsia/linux.sdk.sha1
@@ -1 +1 @@ -7.20220227.3.1 +7.20220228.1.1
diff --git a/build/fuchsia/linux_internal.sdk.sha1 b/build/fuchsia/linux_internal.sdk.sha1 index 9cf1c5d..62b410b 100644 --- a/build/fuchsia/linux_internal.sdk.sha1 +++ b/build/fuchsia/linux_internal.sdk.sha1
@@ -1 +1 @@ -7.20220228.0.1 +7.20220228.1.1
diff --git a/build/fuchsia/mac.sdk.sha1 b/build/fuchsia/mac.sdk.sha1 index 5d3b67e..62b410b 100644 --- a/build/fuchsia/mac.sdk.sha1 +++ b/build/fuchsia/mac.sdk.sha1
@@ -1 +1 @@ -7.20220227.3.1 +7.20220228.1.1
diff --git a/cc/paint/paint_op_writer.cc b/cc/paint/paint_op_writer.cc index 816e9aee..0f6ddf0 100644 --- a/cc/paint/paint_op_writer.cc +++ b/cc/paint/paint_op_writer.cc
@@ -392,6 +392,9 @@ AlignMemory(4); uint64_t* size_memory = WriteSize(0u); + if (!valid_) + return; + size_t bytes_written = 0; if (slug) { // TODO(penghuang): should we use a unique id to avoid sending the same
diff --git a/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_es.xtb b/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_es.xtb index 04801807..4d5ca81 100644 --- a/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_es.xtb +++ b/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_es.xtb
@@ -7,7 +7,7 @@ <translation id="1302104331113804646">Ajustes de seguimiento de precios</translation> <translation id="1378979118429748177">Recibe notificaciones por bajadas de precio</translation> <translation id="1403228085774130835">Puedes encontrar las pestañas cerradas en la sección Pestañas recientes del menú principal de Chrome</translation> -<translation id="1455506303394048917">Tu actividad en estas pestañas de incógnito se borrará de este dispositivo</translation> +<translation id="1455506303394048917">Se borrará tu actividad en estas pestañas de incógnito de este dispositivo</translation> <translation id="1499635324672558517">¿Cerrar todas las pestañas de incógnito?</translation> <translation id="1657719826150349398">Bajar pestaña</translation> <translation id="1869137256605757565">{TABS_COUNT,plural, =1{<ph name="TABS_COUNT_ONE" /> pestaña}other{<ph name="TABS_COUNT_MANY" /> pestañas}}</translation>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java index 2c1b5678..5b4d0dd 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy/settings/PrivacySettings.java
@@ -24,6 +24,7 @@ import org.chromium.chrome.browser.prefetch.settings.PreloadPagesSettingsFragment; import org.chromium.chrome.browser.privacy.secure_dns.SecureDnsSettings; import org.chromium.chrome.browser.privacy_review.PrivacyReviewDialog; +import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxBridge; import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxReferrer; import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragment; import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxSettingsFragmentV3; @@ -79,13 +80,19 @@ getActivity().setTitle(R.string.prefs_privacy_security); Preference sandboxPreference = findPreference(PREF_PRIVACY_SANDBOX); - sandboxPreference.setSummary(PrivacySandboxSettingsFragment.getStatusString(getContext())); - // Overwrite the click listener to pass a correct referrer to the fragment. - sandboxPreference.setOnPreferenceClickListener(preference -> { - PrivacySandboxSettingsFragmentV3.launchPrivacySandboxSettings(getContext(), - new SettingsLauncherImpl(), PrivacySandboxReferrer.PRIVACY_SETTINGS); - return true; - }); + // Hide the Privacy Sandbox if it is restricted. + if (PrivacySandboxBridge.isPrivacySandboxRestricted()) { + getPreferenceScreen().removePreference(sandboxPreference); + } else { + sandboxPreference.setSummary( + PrivacySandboxSettingsFragment.getStatusString(getContext())); + // Overwrite the click listener to pass a correct referrer to the fragment. + sandboxPreference.setOnPreferenceClickListener(preference -> { + PrivacySandboxSettingsFragmentV3.launchPrivacySandboxSettings(getContext(), + new SettingsLauncherImpl(), PrivacySandboxReferrer.PRIVACY_SETTINGS); + return true; + }); + } Preference privacyReviewPreference = findPreference(PREF_PRIVACY_REVIEW); if (!ChromeFeatureList.isEnabled(ChromeFeatureList.PRIVACY_REVIEW)) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java index fa76f17..a9dba76 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java
@@ -242,8 +242,8 @@ @Override public void maybeDisplayPrivacySandboxSnackbar() { // Only show the snackbar when the Privacy Sandbox APIs are enabled. - if (mPrivacySandboxController != null - && PrivacySandboxBridge.isPrivacySandboxEnabled()) { + if (mPrivacySandboxController != null && PrivacySandboxBridge.isPrivacySandboxEnabled() + && !PrivacySandboxBridge.isPrivacySandboxRestricted()) { mPrivacySandboxController.showSnackbar(); } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java index 4a6fd48..0b830e8 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/privacy/settings/PrivacySettingsFragmentTest.java
@@ -6,6 +6,7 @@ import static androidx.test.espresso.Espresso.onView; import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist; import static androidx.test.espresso.assertion.ViewAssertions.matches; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; import static androidx.test.espresso.matcher.ViewMatchers.withText; @@ -21,6 +22,7 @@ import androidx.test.espresso.contrib.RecyclerViewActions; import androidx.test.filters.LargeTest; +import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; @@ -31,11 +33,14 @@ import org.chromium.base.test.util.CriteriaHelper; import org.chromium.base.test.util.DisableIf; import org.chromium.base.test.util.Feature; +import org.chromium.base.test.util.JniMocker; import org.chromium.chrome.R; import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthManager; import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthSettingUtils; +import org.chromium.chrome.browser.privacy_sandbox.FakePrivacySandboxBridge; +import org.chromium.chrome.browser.privacy_sandbox.PrivacySandboxBridgeJni; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.chrome.test.ChromeTabbedActivityTestRule; @@ -64,6 +69,11 @@ public ChromeRenderTestRule mRenderTestRule = ChromeRenderTestRule.Builder.withPublicCorpus().build(); + @Rule + public JniMocker mocker = new JniMocker(); + + private FakePrivacySandboxBridge mFakePrivacySandboxBridge; + private void waitForOptionsMenu() { CriteriaHelper.pollUiThread(() -> { return mSettingsActivityTestRule.getActivity().findViewById(R.id.menu_id_targeted_help) @@ -87,6 +97,12 @@ return null; } + @Before + public void setUp() { + mFakePrivacySandboxBridge = new FakePrivacySandboxBridge(); + mocker.mock(PrivacySandboxBridgeJni.TEST_HOOKS, mFakePrivacySandboxBridge); + } + @Test @LargeTest @Feature({"RenderTest"}) @@ -150,6 +166,21 @@ @Test @LargeTest + @Features.EnableFeatures(ChromeFeatureList.PRIVACY_SANDBOX_SETTINGS_3) + public void testPrivacySandboxViewV3Restricted() throws IOException { + mFakePrivacySandboxBridge.setPrivacySandboxRestricted(true); + mSettingsActivityTestRule.startSettingsActivity(); + PrivacySettings fragment = mSettingsActivityTestRule.getFragment(); + // Scroll down and verify that the Privacy Sandbox is not there. + TestThreadUtils.runOnUiThreadBlocking(() -> { + RecyclerView recyclerView = fragment.getView().findViewById(R.id.recycler_view); + recyclerView.scrollToPosition(recyclerView.getAdapter().getItemCount() - 1); + }); + onView(withText(R.string.prefs_privacy_sandbox)).check(doesNotExist()); + } + + @Test + @LargeTest @Feature({"RenderTest"}) @DisableIf.Build(sdk_is_less_than = Build.VERSION_CODES.M, message = "Invokes IncognitoReauthSettingUtils#isDeviceScreenLockEnabled internally"
diff --git a/chrome/app/resources/generated_resources_ar.xtb b/chrome/app/resources/generated_resources_ar.xtb index cf260a3..1f9c9bf 100644 --- a/chrome/app/resources/generated_resources_ar.xtb +++ b/chrome/app/resources/generated_resources_ar.xtb
@@ -1242,6 +1242,7 @@ <translation id="2203088913459920044">يمكن أن يحتوي الاسم على أحرف وأرقام ورموز خاصة.</translation> <translation id="220321590587754225">تعذّر الربط. يُرجى إعادة المحاولة.</translation> <translation id="2204034823255629767">قراءة وتغيير أي شيء تكتبه</translation> +<translation id="2207115382329026341">عليك تفعيل إعدادات بث التطبيقات على هاتفك.</translation> <translation id="220858061631308971">يُرجى إدخال رمز رقم التعريف الشخصي هذا على "<ph name="DEVICE_NAME" />":</translation> <translation id="2210462644007531147">تعذّر إكمال التثبيت</translation> <translation id="2212565012507486665">السماح بملفات تعريف الارتباط</translation> @@ -1432,6 +1433,7 @@ <translation id="2367972762794486313">إظهار التطبيقات</translation> <translation id="236939127352773362">عندما تشارك الأجهزة المجاورة محتوى</translation> <translation id="2371076942591664043">فتح الملفّ عند &انتهاء التحميل</translation> +<translation id="237307274687369010">تعذُّر تشغيل <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">ملاءمة حجم الورقة</translation> <translation id="2375406435414127095">الاتصال بهاتفك</translation> <translation id="2377588536920405462">يمكنك إيقاف "الموقع الجغرافي" من خلال إيقاف إعداد الموقع الجغرافي الرئيسي على جهازك. ويمكنك أيضًا إيقاف استخدام شبكة Wi-Fi وشبكات الجوّال وأجهزة الاستشعار للموقع الجغرافي في إعدادات الموقع الجغرافي.</translation>
diff --git a/chrome/app/resources/generated_resources_az.xtb b/chrome/app/resources/generated_resources_az.xtb index 6dd3e84..501976b 100644 --- a/chrome/app/resources/generated_resources_az.xtb +++ b/chrome/app/resources/generated_resources_az.xtb
@@ -904,6 +904,7 @@ <translation id="1869433484041798909">Əlfəcin düyməsi</translation> <translation id="1871098866036088250">Chrome brauzerində açın</translation> <translation id="187145082678092583">Daha az tətbiq</translation> +<translation id="1871463148436682760">Hazırdır!</translation> <translation id="1871534214638631766">Məzmuna sağ düymə ilə toxunduqda və ya basıb saxladıqda əlaqəli məlumat göstərilsin</translation> <translation id="1871569928317311284">Qaranlıq temanı deaktiv edin</translation> <translation id="1871615898038944731"><ph name="DEVICE_TYPE" /> cihazı güncəldir</translation> @@ -2333,6 +2334,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" /> endirim</translation> <translation id="3305389145870741612">Formatlama prosesi bir neçə saniyə çəkə bilər. Lütfən, gözləyin.</translation> <translation id="3305661444342691068">PDF'i önizləmədə açın</translation> +<translation id="3306992216458434072">Qrupunuza ad verin və rəng seçin</translation> <translation id="3307176291962384345"><ph name="MERCHANT_NAME" /> üçün endirim əldə edin</translation> <translation id="3308116878371095290">Bu səhifədə kuki ayarının qarşısı alınıb.</translation> <translation id="3308134619352333507">Düyməni Gizlədin</translation> @@ -3744,6 +3746,7 @@ <translation id="4708794300267213770">Oyanarkən ekran kilidi göstərilsin</translation> <translation id="4708849949179781599"><ph name="PRODUCT_NAME" /> məhsulundan çıxın</translation> <translation id="4711638718396952945">Ayarları bərpa edin</translation> +<translation id="47158868804223727">Qrupun adına toxunaraq onu genişləndirə və ya yığcamlaşdıra bilərsiniz</translation> <translation id="4716483597559580346">Əlavə təhlükəsizlik üçün fabrika sıfırlaması</translation> <translation id="471880041731876836">Bu sayta daxil olmaq üçün icazəniz yoxdur</translation> <translation id="4722735765955348426"><ph name="USERNAME" /> üçün parol</translation> @@ -3807,6 +3810,7 @@ <translation id="4794810983896241342">Güncəlləmələr <ph name="BEGIN_LINK" />administrator<ph name="END_LINK" /> tərəfindən idarə edilir.</translation> <translation id="479536056609751218">Veb səhifə, yalnız HTML</translation> <translation id="4796142525425001238">Həmişə bərpa edilsin</translation> +<translation id="4797314204379834752">Tapşırıqları təşkil etmək, onlayn alış-veriş etmək və s. üçün tab qruplarından istifadə etməyə çalışın</translation> <translation id="4798236378408895261"><ph name="BEGIN_LINK" />Bluetooth Girişləri<ph name="END_LINK" /> əlavə edin (Google daxili)</translation> <translation id="479863874072008121">Cihazları idarə edin</translation> <translation id="4800839971935185386">Ad və işarə güncəlləmələrini nəzərdən keçirin</translation> @@ -4047,6 +4051,7 @@ <translation id="5039696241953571917">Google Hesabınızda yadda saxlanılmış parollara baxın və onları idarə edin</translation> <translation id="5039804452771397117">İcazə verin</translation> <translation id="5040823038948176460">Əlavə məzmun ayarları</translation> +<translation id="5041509233170835229">Chrome Tətbiqi</translation> <translation id="5043440033854483429">Adda hərflər, rəqəmlər və tire (-) istifadə edilə bilər və 1-15 simvol arasında olmalıdır.</translation> <translation id="5043913660911154449">Və ya printer PPD faylını təyin edin <ph name="LINK_BEGIN" />Ətraflı məlumat<ph name="LINK_END" /></translation> <translation id="5045550434625856497">Yanlış parol</translation> @@ -5371,6 +5376,7 @@ <translation id="6393156038355142111">Güclü parol təklif edin</translation> <translation id="6393550101331051049">Mühafizə edilməyən məzmunun göstərilməsinə icazə verilib</translation> <translation id="6395423953133416962"><ph name="BEGIN_LINK1" />Sistem məlumatı<ph name="END_LINK1" /> və <ph name="BEGIN_LINK2" />metrikləri<ph name="END_LINK2" /> göndərin</translation> +<translation id="6396175271241405634">Sistem Tətbiqi</translation> <translation id="6396988158856674517">Saytların hərəkət sensorlarından istifadə etməsinə icazə verməyin</translation> <translation id="6398715114293939307">Google Play Mağazanı Silin</translation> <translation id="6398765197997659313">Tam ekrandan çıxın</translation> @@ -5440,6 +5446,7 @@ <translation id="6460566145397380451">MIDI cihazlarına qoşulmaq icazəsi verilib</translation> <translation id="6460601847208524483">Növbətini Tapın</translation> <translation id="6461170143930046705">Şəbəkə axtarılır...</translation> +<translation id="6462204616987156669">Tab üzərinə sağ düymə ilə toxunun və "Yeni Qrupa Tab Əlavə et" seçin.</translation> <translation id="6463795194797719782">Düzəliş edin</translation> <translation id="6464825623202322042">Bu cihaz</translation> <translation id="6465841119675156448">İnternet olmadan</translation> @@ -5857,6 +5864,7 @@ <translation id="6885771755599377173">Sistem Məlumatı Önizləməsi</translation> <translation id="6886871292305414135">Linki yeni paneldə açın</translation> <translation id="6889957081990109136">Hələ keçirici təyin edilməyib</translation> +<translation id="689007770043972343">Qrupunuza digər açıq tabları sürüşdürüb əlavə edin</translation> <translation id="6892812721183419409">Linki <ph name="USER" /> kimi açın</translation> <translation id="6895032998810961280">Zərərli proqram, sistem ayarları, təmizlik zamanı kompüterdə aşkarlanan əməliyyatlar barədə məlumatları Google'a göndərin</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" /> <ph name="MANAGER" /> tərəfindən idarə edilir və admininiz ikinci hesab kimi daxil olmağı bloklayıb</translation> @@ -6434,6 +6442,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{1 kuki}other{{NUM_COOKIES} kuki}}</translation> <translation id="7493386493263658176"><ph name="EXTENSION_NAME" /> artırması parol və kredit kart nömrələri kimi şəxsi data daxil olmaqla yazdığınız bütün mətni toplaya bilər. Bu artırmanı istifadə etmək istəyirsiniz?</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Android Tətbiqi</translation> <translation id="7495778526395737099">Köhnə parolunuzu unutdunuz?</translation> <translation id="7497981768003291373">Son vaxtlar WebRTC mətn girişləri çəkməmisiniz.</translation> <translation id="7501957181231305652">və ya</translation>
diff --git a/chrome/app/resources/generated_resources_bg.xtb b/chrome/app/resources/generated_resources_bg.xtb index e2b1045b..03caf8e 100644 --- a/chrome/app/resources/generated_resources_bg.xtb +++ b/chrome/app/resources/generated_resources_bg.xtb
@@ -1248,6 +1248,7 @@ <translation id="2203088913459920044">За името могат да се използват букви, цифри и специални знаци</translation> <translation id="220321590587754225">Установяването на връзка не бе успешно. Опитайте отново.</translation> <translation id="2204034823255629767">Четене и промяна на всичко, което въвеждате</translation> +<translation id="2207115382329026341">Активирайте настройките за поточно предаване на приложения от телефона си.</translation> <translation id="220858061631308971">Моля, въведете този ПИН код на „<ph name="DEVICE_NAME" />“:</translation> <translation id="2210462644007531147">Инсталацията не завърши</translation> <translation id="2212565012507486665">Разрешаване на „бисквитките“</translation> @@ -1441,6 +1442,7 @@ <translation id="2367972762794486313">Показване на приложенията</translation> <translation id="236939127352773362">Когато устройствата споделят в близост</translation> <translation id="2371076942591664043">Отваряне &след изтегляне</translation> +<translation id="237307274687369010"><ph name="APP_NAME" /> не се стартира</translation> <translation id="2373666622366160481">Уеднаквяване с размера на хартията</translation> <translation id="2375406435414127095">Свързване с телефона ви</translation> <translation id="2377588536920405462">Можете да изключите местоположението, като деактивирате главната настройка за него на устройството си. Също така от настройките за местоположението сте в състояние да изключите определянето му чрез Wi-Fi, мобилни мрежи и сензори.</translation> @@ -6618,7 +6620,7 @@ <translation id="7658239707568436148">Отказ</translation> <translation id="7659154729610375585">Да се излезе ли от режим „инкогнито“ въпреки това?</translation> <translation id="7659297516559011665">Пароли само на това устройство</translation> -<translation id="7659336857671800422">Преглед на ръководството за поверителността</translation> +<translation id="7659336857671800422">Преглед на ръководството за поверителност</translation> <translation id="7659584679870740384">Не сте упълномощени да използвате това устройство. За разрешение за вход се свържете с администратора.</translation> <translation id="7661259717474717992">Разрешаване на сайтовете да запазват и четат данни в „бисквитки“</translation> <translation id="7661451191293163002">Не можа да бъде получен регистрационен сертификат.</translation>
diff --git a/chrome/app/resources/generated_resources_en-GB.xtb b/chrome/app/resources/generated_resources_en-GB.xtb index 3f32598..dc0e048 100644 --- a/chrome/app/resources/generated_resources_en-GB.xtb +++ b/chrome/app/resources/generated_resources_en-GB.xtb
@@ -6544,6 +6544,7 @@ <translation id="7573172247376861652">Battery Charge</translation> <translation id="7573594921350120855">Sites usually use your video camera for communication features like video chatting</translation> <translation id="7574650250151586813">To type text, update the Daydream Keyboard app</translation> +<translation id="7574676002608048667">Send password</translation> <translation id="7576690715254076113">Collate</translation> <translation id="7576976045740938453">A problem with demo mode account occurred.</translation> <translation id="7578137152457315135">Fingerprint settings</translation>
diff --git a/chrome/app/resources/generated_resources_es.xtb b/chrome/app/resources/generated_resources_es.xtb index 113e056a..21688f5 100644 --- a/chrome/app/resources/generated_resources_es.xtb +++ b/chrome/app/resources/generated_resources_es.xtb
@@ -455,7 +455,7 @@ <translation id="1448264954024227422">Puedes usar esta cuenta con aplicaciones Android. Si quieres añadir una cuenta para otra persona, <ph name="LINK_BEGIN" />añade una persona<ph name="LINK_END" /> a tu <ph name="DEVICE_TYPE" />. Los permisos que hayas dado a aplicaciones se pueden aplicar a esta cuenta. Puedes controlar los permisos de aplicaciones Android en <ph name="APPS_LINK_BEGIN" />Configuración de aplicaciones<ph name="APPS_LINK_END" />.</translation> -<translation id="1448779317883494811">Herramienta de pinceles</translation> +<translation id="1448779317883494811">Herramienta de pincel</translation> <translation id="1449191289887455076">Pulsa <ph name="CURRENTKEY" /> otra vez para confirmar la asignación y <ph name="RESPONSE" />.</translation> <translation id="1451375123200651445">Página web (un único archivo)</translation> <translation id="1453561711872398978">Enviar <ph name="BEGIN_LINK" />registros de depuración<ph name="END_LINK" /> (recomendado)</translation> @@ -1038,7 +1038,7 @@ <translation id="2005967212456643969">Personaliza los permisos para cada extensión</translation> <translation id="2006638907958895361">Abrir enlace en <ph name="APP" /></translation> <translation id="2007404777272201486">Notificar un problema...</translation> -<translation id="2009590708342941694">Herramienta de emojis</translation> +<translation id="2009590708342941694">Herramienta de emoji</translation> <translation id="2010501376126504057">Dispositivos compatibles</translation> <translation id="2011968031299471357">Recibe y responde mensajes</translation> <translation id="2015232545623037616">PC y Chromecast en la misma red Wi‑Fi</translation> @@ -1654,7 +1654,7 @@ <translation id="2610157865375787051">Suspensión</translation> <translation id="2610260699262139870">Tamaño &real</translation> <translation id="2610780100389066815">Firma de listas de confianza de Microsoft</translation> -<translation id="2611776654555141051">Herramienta de rectángulos</translation> +<translation id="2611776654555141051">Herramienta de rectángulo</translation> <translation id="2612676031748830579">Número de la tarjeta</translation> <translation id="2613535083491958306"><ph name="ORIGIN" /> podrá editar <ph name="FILENAME" /></translation> <translation id="2616366145935564096">Leer y modificar tus datos en <ph name="WEBSITE_1" /></translation> @@ -2081,7 +2081,7 @@ <translation id="3016381065346027039">No hay ninguna entrada de registro</translation> <translation id="3016641847947582299">Componente actualizado</translation> <translation id="3017079585324758401">Fondo</translation> -<translation id="3019023222666709803">Herramienta de flechas</translation> +<translation id="3019023222666709803">Herramienta de flecha</translation> <translation id="3019285239893817657">Botón de página secundaria</translation> <translation id="3019595674945299805">Servicio VPN</translation> <translation id="3020183492814296499">Accesos directos</translation> @@ -2672,7 +2672,7 @@ <translation id="3640214691812501263">¿Añadir <ph name="EXTENSION_NAME" /> para <ph name="USER_NAME" />?</translation> <translation id="3640613767643722554">Enseña al Asistente a reconocer tu voz</translation> <translation id="3641456520301071208">Los sitios pueden solicitar permiso para acceder a tu ubicación</translation> -<translation id="3642699533549879077">Cuando otra persona mire tu pantalla, recibirás una alerta y el contenido de las notificaciones se ocultará.</translation> +<translation id="3642699533549879077">Cuando otra persona mire tu pantalla, recibirás una alerta y se ocultará el contenido de las notificaciones.</translation> <translation id="3645372836428131288">Mueve el dedo ligeramente para capturar otra parte de la huella digital.</translation> <translation id="3647998456578545569">{COUNT,plural, =1{<ph name="ATTACHMENTS" /> recibidos de <ph name="DEVICE_NAME" />}other{<ph name="ATTACHMENTS" /> recibidos de <ph name="DEVICE_NAME" />}}</translation> <translation id="3648348069317717750">Se ha detectado <ph name="USB_DEVICE_NAME" /></translation> @@ -5165,7 +5165,7 @@ <translation id="6176043333338857209">El Bluetooth se activará temporalmente para establecer comunicación con la llave de seguridad</translation> <translation id="6178664161104547336">Seleccionar un certificado</translation> <translation id="6178682841350631965">Se han actualizado tus datos de inicio de sesión</translation> -<translation id="6180510783007738939">Herramienta de líneas</translation> +<translation id="6180510783007738939">Herramienta de línea</translation> <translation id="6181431612547969857">Descarga bloqueada</translation> <translation id="6184099524311454384">Buscar pestañas</translation> <translation id="6185132558746749656">Ubicación del dispositivo</translation> @@ -5534,7 +5534,7 @@ <translation id="6550675742724504774">Opciones</translation> <translation id="65513682072153627">Se mostrará este icono de elemento gestionado cuando un ajuste o una función estén gestionados por tu administrador.</translation> <translation id="6551508934388063976">El comando no está disponible. Pulsa Ctrl+N para abrir una ventana nueva.</translation> -<translation id="6551606359270386381">Herramienta de elipses</translation> +<translation id="6551606359270386381">Herramienta de elipse</translation> <translation id="6551612971599078809">El sitio web está usando un dispositivo USB</translation> <translation id="6551739526055143276">Gestionado por Family Link</translation> <translation id="655384502888039633"><ph name="USER_COUNT" /> usuarios</translation> @@ -6649,7 +6649,7 @@ <translation id="7691698019618282776">Actualización de Crostini</translation> <translation id="769375405463525957">Si te alejas de tu dispositivo, la pantalla se bloqueará automáticamente. Mientras estés enfrente del dispositivo, la pantalla se mantendrá activa.</translation> <translation id="7694052127939518600">La aplicación Archivos permite acceder rápidamente a los archivos que has guardado en Google Drive, en un almacenamiento externo o en tu dispositivo CloudReady 2.0.</translation> -<translation id="7694246789328885917">Herramienta de rotuladores</translation> +<translation id="7694246789328885917">Herramienta de rotulador</translation> <translation id="7696063401938172191">En tu "<ph name="PHONE_NAME" />":</translation> <translation id="7697166915480294040">Los detalles se ocultan mientras compartes tu pantalla</translation> <translation id="769824636077131955">Este documento es demasiado grande para una comprobación de seguridad. Puedes imprimir documentos de hasta 50 MB.</translation>
diff --git a/chrome/app/resources/generated_resources_fr.xtb b/chrome/app/resources/generated_resources_fr.xtb index 28ed01ff..74bf6983 100644 --- a/chrome/app/resources/generated_resources_fr.xtb +++ b/chrome/app/resources/generated_resources_fr.xtb
@@ -2304,6 +2304,7 @@ <translation id="3277691515294482687">Sauvegarder mes applications et mes fichiers dans le dossier "Mes fichiers" avant de mettre à niveau Linux.</translation> <translation id="3278001907972365362">Vos comptes Google nécessitent votre attention</translation> <translation id="3278800075417428224">Gérer les langues dans les paramètres CloudReady 2.0</translation> +<translation id="3278928434075969895">Ce profil utilise les paramètres proxy Chrome OS.</translation> <translation id="3279092821516760512">Certains contacts peuvent partager du contenu avec vous lorsqu'ils sont à proximité. Les transferts ne démarreront pas tant que vous ne les aurez pas acceptés.</translation> <translation id="3279230909244266691">Cette opération peut prendre quelques minutes. Démarrage de la machine virtuelle…</translation> <translation id="3280237271814976245">Enregistrer &sous...</translation> @@ -4876,6 +4877,7 @@ <translation id="5909379458939060601">Supprimer ce profil et les données de connexion ?</translation> <translation id="5910363049092958439">En&registrer l'image sous...</translation> <translation id="5910726859585389579"><ph name="DEVICE_TYPE" /> est hors connexion</translation> +<translation id="5911505723657992440">Utiliser les paramètres proxy Chrome OS pour ce profil.</translation> <translation id="5911533659001334206">Visionneuse de raccourcis</translation> <translation id="5914724413750400082">Module (<ph name="MODULUS_NUM_BITS" /> bits) : <ph name="MODULUS_HEX_DUMP" />
diff --git a/chrome/app/resources/generated_resources_id.xtb b/chrome/app/resources/generated_resources_id.xtb index 982bdb2b..0fcefd20 100644 --- a/chrome/app/resources/generated_resources_id.xtb +++ b/chrome/app/resources/generated_resources_id.xtb
@@ -1252,6 +1252,7 @@ <translation id="2203088913459920044">Nama dapat menggunakan huruf, angka, dan karakter khusus</translation> <translation id="220321590587754225">Tidak dapat terhubung. Coba lagi.</translation> <translation id="2204034823255629767">Membaca dan mengubah apa saja yang Anda ketik</translation> +<translation id="2207115382329026341">Aktifkan setelan streaming aplikasi dari ponsel Anda.</translation> <translation id="220858061631308971">Masukkan kode PIN ini ke "<ph name="DEVICE_NAME" />":</translation> <translation id="2210462644007531147">Tidak dapat menyelesaikan penginstalan</translation> <translation id="2212565012507486665">Izinkan cookie</translation> @@ -1445,6 +1446,7 @@ <translation id="2367972762794486313">Tampilkan aplikasi</translation> <translation id="236939127352773362">Saat perangkat berbagi di sekitar</translation> <translation id="2371076942591664043">Buka setelah &selesai</translation> +<translation id="237307274687369010">Tidak dapat meluncurkan <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">Paskan dengan kertas</translation> <translation id="2375406435414127095">Hubungkan ke ponsel Anda</translation> <translation id="2377588536920405462">Anda dapat menonaktifkan Lokasi dengan menonaktifkan setelan Lokasi utama pada perangkat Anda. Anda juga dapat menonaktifkan penggunaan Wi-Fi, jaringan seluler, dan sensor untuk lokasi di setelan lokasi.</translation>
diff --git a/chrome/app/resources/generated_resources_iw.xtb b/chrome/app/resources/generated_resources_iw.xtb index 4851d9a0..303c65d 100644 --- a/chrome/app/resources/generated_resources_iw.xtb +++ b/chrome/app/resources/generated_resources_iw.xtb
@@ -1251,6 +1251,7 @@ <translation id="2203088913459920044">שם יכול לכלול אותיות, ספרות ותווים מיוחדים</translation> <translation id="220321590587754225">לא ניתן היה להתחבר. אפשר לנסות שוב.</translation> <translation id="2204034823255629767">לקרוא ולשנות את כל מה שהקלדת</translation> +<translation id="2207115382329026341">צריך להפעיל את הגדרות הסטרימינג של האפליקציות מהטלפון.</translation> <translation id="220858061631308971">יש להזין את קוד האימות הזה ב-"<ph name="DEVICE_NAME" />":</translation> <translation id="2210462644007531147">אי אפשר להשלים את ההתקנה</translation> <translation id="2212565012507486665">אישור קובצי cookie</translation> @@ -1444,6 +1445,7 @@ <translation id="2367972762794486313">הצגת אפליקציות</translation> <translation id="236939127352773362">בזמן שיתוף ממכשירים בקרבת מקום</translation> <translation id="2371076942591664043">פתיחה &בסיום</translation> +<translation id="237307274687369010">לא ניתן היה להפעיל את <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">התאמה לגודל הנייר</translation> <translation id="2375406435414127095">התחברות לטלפון</translation> <translation id="2377588536920405462">כדי לכבות את המיקום, עליך להשבית את ההגדרה הראשית של המיקום במכשיר שלך. בהגדרות המיקום אפשר גם להשבית את האפשרות להסתמך על Wi-Fi, רשתות סלולריות וחיישנים כדי לקבוע את המיקום.</translation> @@ -8194,7 +8196,7 @@ <translation id="93766956588638423">תיקון התוסף</translation> <translation id="938568644810664664">אפשר לנסות לומר "Hey Google, what song is this?" או "Hey Google, what's on my screen?"</translation> <translation id="939252827960237676">שמירת צילום המסך נכשלה</translation> -<translation id="939401694733344652">בחשבונות האלה לא נעשה שימוש באפליקציות ל-Android בשלב זה. אם נבחר חשבון לשימוש עם האפליקציה הזאת ל-Android, ניתן להשתמש בחשבון גם עם אפליקציות אחרות ל-Android. ניתן לשנות את אפשרות הגישה לאפליקציה ל-Android ב<ph name="LINK_BEGIN" />הגדרות > חשבונות<ph name="LINK_END" />.</translation> +<translation id="939401694733344652">בחשבונות האלה לא נעשה שימוש באפליקציות ל-Android בשלב הזה. אם נבחר חשבון לשימוש עם האפליקציה הזאת ל-Android, ניתן להשתמש בחשבון גם עם אפליקציות אחרות ל-Android. ניתן לשנות את אפשרות הגישה לאפליקציה ל-Android ב<ph name="LINK_BEGIN" />הגדרות > חשבונות<ph name="LINK_END" />.</translation> <translation id="939598580284253335">הזנת ביטוי סיסמה</translation> <translation id="939736085109172342">תיקייה חדשה</translation> <translation id="942532530371314860"><ph name="APP_NAME" /> משתף כרטיסייה ואודיו של Chrome.</translation>
diff --git a/chrome/app/resources/generated_resources_ka.xtb b/chrome/app/resources/generated_resources_ka.xtb index 352c9eb..e1b436f1 100644 --- a/chrome/app/resources/generated_resources_ka.xtb +++ b/chrome/app/resources/generated_resources_ka.xtb
@@ -908,6 +908,7 @@ <translation id="1869433484041798909">სანიშნეს ღილაკი</translation> <translation id="1871098866036088250">Chrome-ის ბრაუზერში გახსნა</translation> <translation id="187145082678092583">ნაკლები აპი</translation> +<translation id="1871463148436682760">ყოჩაღ!</translation> <translation id="1871534214638631766">კონტენტზე მარჯვენა დაწკაპუნებისას ან ხანგრძლივად დაჭერისას დაკავშირებული ინფორმაციის ჩვენება</translation> <translation id="1871569928317311284">მუქი თემის გამორთვა</translation> <translation id="1871615898038944731">თქვენი <ph name="DEVICE_TYPE" /> განახლებულია</translation> @@ -2303,6 +2304,7 @@ <translation id="3277691515294482687">Linux-ის ახალ ვერსიაზე გადასვლამდე ჩემი აპებისა და ფაილების სარეზერვო ასლების შექმნა „ჩემი ფაილების“ საქაღალდეში.</translation> <translation id="3278001907972365362">თქვენი Google ანგარიშ(ებ)ი საჭიროებს ყურადღებას</translation> <translation id="3278800075417428224">ენების მართვა CloudReady 2.0-ის პარამეტრებიდან</translation> +<translation id="3278928434075969895">ეს პროფილი იყენებს Chrome OS პროქსი-სერვერის პარამეტრებს.</translation> <translation id="3279092821516760512">არჩეულ კონტაქტებს შეეძლებათ კონტენტის თქვენთვის გაზიარება, როცა ახლომახლო იქნებიან. მონაცემთა გადაცემა არ დაიწყება, სანამ არ დაეთანხმებით.</translation> <translation id="3279230909244266691">მიმდინარეობს ვირტუალური მოწყობილობის გაშვება, რასაც შეიძლება რამდენიმე წუთი დასჭირდეს.</translation> <translation id="3280237271814976245">&შეინახე როგორც…</translation> @@ -2332,6 +2334,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" />-იანი ფასდაკლება</translation> <translation id="3305389145870741612">ფორმატირების პროცესს, შესაძლოა, რამდენიმე წამი დასჭირდეს. დაელოდეთ.</translation> <translation id="3305661444342691068">PDF-ის გახსნა წინასწარ ხედში</translation> +<translation id="3306992216458434072">დაასათაურეთ თქვენი ჯგუფი და აირჩიეთ ფერი</translation> <translation id="3307176291962384345">მიიღეთ ფასდაკლებები <ph name="MERCHANT_NAME" />-ისთვის</translation> <translation id="3308116878371095290">ამ გვერდზე აიკრძალა ქუქი-ფაილების დაყენება.</translation> <translation id="3308134619352333507">დამალვის ღილაკი</translation> @@ -3745,6 +3748,7 @@ <translation id="4708794300267213770">ძილიდან გამოღვიძებისას ჩაკეტილი ეკრანის ჩვენება</translation> <translation id="4708849949179781599">გასვლა <ph name="PRODUCT_NAME" /></translation> <translation id="4711638718396952945">პარამეტრების აღდგენა</translation> +<translation id="47158868804223727">დააწკაპუნეთ ჯგუფის სახელზე მის გასაფართოებლად ან ჩასაკეცად</translation> <translation id="4716483597559580346">Powerwash-ის განხორციელება დამატებითი უსაფრთხოებისთვის</translation> <translation id="471880041731876836">თქვენ არ გაქვთ ამ საიტის მონახულების ნებართვა</translation> <translation id="4722735765955348426"><ph name="USERNAME" />-ის პაროლი</translation> @@ -3808,6 +3812,7 @@ <translation id="4794810983896241342">განახლებებს მართავს <ph name="BEGIN_LINK" />თქვენი ადმინისტრატორი<ph name="END_LINK" /></translation> <translation id="479536056609751218">ვებგვერდი, მხოლოდ HTML</translation> <translation id="4796142525425001238">ყოველთვის აღდგეს</translation> +<translation id="4797314204379834752">ცადეთ ჩანართების ჯგუფების გამოყენება ამოცანების ორგანიზებისთვის, ონლაინმაღაზიებისთვის და სხვა</translation> <translation id="4798236378408895261"><ph name="BEGIN_LINK" />Bluetooth ჟურნალების<ph name="END_LINK" /> დართვა (Google-ის შიდა გამოყენებისთვის)</translation> <translation id="479863874072008121">მოწყობილობების მართვა</translation> <translation id="4800839971935185386">სახელისა და ხატულის განახლებების გადახედვა</translation> @@ -4048,6 +4053,7 @@ <translation id="5039696241953571917">ნახეთ და მართეთ შენახული პაროლები თქვენს Google ანგარიშში</translation> <translation id="5039804452771397117">დაშვება</translation> <translation id="5040823038948176460">კონტენტის დამატებითი პარამეტრები</translation> +<translation id="5041509233170835229">Chrome აპი</translation> <translation id="5043440033854483429">სახელი შეიძლება შეიცავდეს ასოებს, ციფრებსა და დეფისებს (-), ხოლო მისი სიგრძე უნდა იყოს 1-დან 15 სიმბოლოს ჩათვლით.</translation> <translation id="5043913660911154449">ან მიუთითეთ პრინტერის PPD. <ph name="LINK_BEGIN" />შეიტყვეთ მეტი<ph name="LINK_END" /></translation> <translation id="5045550434625856497">არასწორი პაროლი</translation> @@ -4874,6 +4880,7 @@ <translation id="5909379458939060601">გსურთ, წაშალოთ ეს პროფილი და დათვალიერების მონაცემები?</translation> <translation id="5910363049092958439">გამოსახულების შენ&ახვა, როგორც…</translation> <translation id="5910726859585389579"><ph name="DEVICE_TYPE" /> ხაზგარეშეა</translation> +<translation id="5911505723657992440">Chrome OS პროქსი-სერვერის პარამეტრების გამოყენება ამ პროფილისთვის.</translation> <translation id="5911533659001334206">მალსახმობების მნახველი</translation> <translation id="5914724413750400082">მოდული (<ph name="MODULUS_NUM_BITS" /> ბიტი): <ph name="MODULUS_HEX_DUMP" /> @@ -5373,6 +5380,7 @@ <translation id="6393156038355142111">ძლიერი პაროლის შემოთავაზება</translation> <translation id="6393550101331051049">დაუცველი კონტენტის ჩვენება დაშვებულია</translation> <translation id="6395423953133416962"><ph name="BEGIN_LINK1" />სისტემის ინფორმაციის<ph name="END_LINK1" /> და <ph name="BEGIN_LINK2" />მეტრიკის<ph name="END_LINK2" /> გაგზავნა</translation> +<translation id="6396175271241405634">სისტემური აპი</translation> <translation id="6396988158856674517">საიტებისთვის მოძრაობის სენსორების გამოყენების აკრძალვა</translation> <translation id="6398715114293939307">Google Play Store-ის ამოშლა</translation> <translation id="6398765197997659313">სრულეკრანიანი რეჟიმიდან გამოსვლა</translation> @@ -5442,6 +5450,7 @@ <translation id="6460566145397380451">MIDI-მოწყობილობებთან დაკავშირება დაშვებულია</translation> <translation id="6460601847208524483">შემდეგის ძებნა</translation> <translation id="6461170143930046705">მიმდინარეობს ქსელების ძიება…</translation> +<translation id="6462204616987156669">მარჯვენა ღილაკით დააწკაპუნეთ ჩანართზე და აირჩიეთ „ჩანართის დამატება ახალ ჯგუფში“</translation> <translation id="6463795194797719782">&რედაქტირება</translation> <translation id="6464825623202322042">ეს მოწყობილობა</translation> <translation id="6465841119675156448">ინტერნეტის გარეშე</translation> @@ -5859,6 +5868,7 @@ <translation id="6885771755599377173">სისტემის ინფორმაციის გადახედვა</translation> <translation id="6886871292305414135">ბმულის გახსნა ახალ &ჩანართში</translation> <translation id="6889957081990109136">გადამრთველი ჯერ არ არის მიკუთვნებული</translation> +<translation id="689007770043972343">ცადეთ, თქვენს ჯგუფში ჩავლებით გადმოიტანოთ სხვა გახსნილი ჩანართები</translation> <translation id="6892812721183419409">ბმულის გახსნა, როგორც <ph name="USER" /></translation> <translation id="6895032998810961280">საზიანო პროგრამული უზრუნველყოფის, სისტემის პარამეტრების და თქვენი კომპიუტერის გასუფთავებისას აღმოჩენილი მიმდინარე პროცესების შესახებ დეტალური ინფორმაციის შეტყობინება Google-ისთვის</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" /> იმართება <ph name="MANAGER" />-ის მიერ და თქვენმა ადმინისტრატორმა დაბლოკა სისტემაში შესვლა არაძირითადი ანგარიშიდან</translation> @@ -6436,6 +6446,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{1 ქუქი-ჩანაწერი}other{{NUM_COOKIES} ქუქი-ჩანაწერი}}</translation> <translation id="7493386493263658176">გაფართოება „<ph name="EXTENSION_NAME" />“ თქვენ მიერ აკრეფილი ნებისმიერი ტექსტის შეგროვებას შეძლებს, მათ შორის, ისეთი პირადი ინფორმაციის, როგორიც არის პაროლები და საკრედიტო ბარათების ნომრები. გსურთ ამ გაფართოების გამოყენება?</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Android აპი</translation> <translation id="7495778526395737099">დაგავიწყდათ ძველი პაროლი?</translation> <translation id="7497981768003291373">ახლახან აღბეჭდილი WebRTC-ის ტექსტური ჟურნალები არ არის.</translation> <translation id="7501957181231305652">ან</translation>
diff --git a/chrome/app/resources/generated_resources_km.xtb b/chrome/app/resources/generated_resources_km.xtb index 6057e41..fad2256 100644 --- a/chrome/app/resources/generated_resources_km.xtb +++ b/chrome/app/resources/generated_resources_km.xtb
@@ -1252,6 +1252,7 @@ <translation id="2203088913459920044">ឈ្មោះអាចប្រើអក្សរ លេខ និងតួអក្សរពិសេស</translation> <translation id="220321590587754225">មិនអាចភ្ជាប់បានទេ។ សូមព្យាយាមម្ដងទៀត។</translation> <translation id="2204034823255629767">អាន និងប្តូរអ្វីដែលអ្នកវាយបញ្ចូល</translation> +<translation id="2207115382329026341">បើកការកំណត់ការផ្សាយកម្មវិធីពីទូរសព្ទរបស់អ្នក។</translation> <translation id="220858061631308971">សូមបញ្ចូលលេខកូដសម្គាល់នេះនៅលើ "<ph name="DEVICE_NAME" />"៖</translation> <translation id="2210462644007531147">មិនអាចបញ្ចប់ការដំឡើងបានទេ</translation> <translation id="2212565012507486665">អនុញ្ញាតខូគី</translation> @@ -1445,6 +1446,7 @@ <translation id="2367972762794486313">បង្ហាញកម្មវិធី</translation> <translation id="236939127352773362">នៅពេលឧបករណ៍កំពុងចែករំលែកនៅជិត</translation> <translation id="2371076942591664043">បើកនៅពេលបញ្ចប់</translation> +<translation id="237307274687369010">មិនអាចចាប់ផ្ដើម <ph name="APP_NAME" /> បានទេ</translation> <translation id="2373666622366160481">ប៉ុនក្រដាស</translation> <translation id="2375406435414127095">ភ្ជាប់ទូរសព្ទរបស់អ្នក</translation> <translation id="2377588536920405462">អ្នកអាចបិទ "ទីតាំង" ដោយបិទការកំណត់ "ទីតាំង" ចម្បងនៅលើឧបករណ៍របស់អ្នក។ អ្នកក៏អាចបិទការប្រើប្រាស់ Wi-Fi, បណ្តាញទូរសព្ទចល័ត និងឧបករណ៍ចាប់សញ្ញាផ្សេងៗសម្រាប់ទីតាំងនៅក្នុងការកំណត់ទីតាំងបានផងដែរ។</translation>
diff --git a/chrome/app/resources/generated_resources_ko.xtb b/chrome/app/resources/generated_resources_ko.xtb index 881e4f7..34242c0 100644 --- a/chrome/app/resources/generated_resources_ko.xtb +++ b/chrome/app/resources/generated_resources_ko.xtb
@@ -1252,6 +1252,7 @@ <translation id="2203088913459920044">이름에는 문자, 숫자, 특수문자를 사용할 수 있습니다</translation> <translation id="220321590587754225">연결할 수 없습니다. 다시 시도하세요.</translation> <translation id="2204034823255629767">입력한 항목 조회 및 변경</translation> +<translation id="2207115382329026341">휴대전화를 이용한 앱 스트리밍 설정을 켭니다.</translation> <translation id="220858061631308971">'<ph name="DEVICE_NAME" />'의 PIN 코드를 입력하세요:</translation> <translation id="2210462644007531147">설치를 완료할 수 없음</translation> <translation id="2212565012507486665">쿠키 허용</translation> @@ -1445,6 +1446,7 @@ <translation id="2367972762794486313">앱 표시</translation> <translation id="236939127352773362">근처에 공유 중인 기기가 있을 때</translation> <translation id="2371076942591664043">완료되면 열기(&D)</translation> +<translation id="237307274687369010"><ph name="APP_NAME" /> 앱을 실행할 수 없음</translation> <translation id="2373666622366160481">용지에 맞춤</translation> <translation id="2375406435414127095">휴대전화에 연결</translation> <translation id="2377588536920405462">기기에서 기본 위치 설정을 사용 중지하여 위치를 사용 중지할 수 있습니다. 또한 위치 설정에서 위치 파악에 Wi‑Fi, 모바일 네트워크, 센서의 사용을 중지할 수도 있습니다.</translation>
diff --git a/chrome/app/resources/generated_resources_lt.xtb b/chrome/app/resources/generated_resources_lt.xtb index 208cf13c..d6a7f4c9 100644 --- a/chrome/app/resources/generated_resources_lt.xtb +++ b/chrome/app/resources/generated_resources_lt.xtb
@@ -1255,6 +1255,7 @@ <translation id="2203088913459920044">Pavadinimą gali sudaryti raidės, skaitmenys ir specialieji ženklai</translation> <translation id="220321590587754225">Nepavyko prijungti. Bandykite dar kartą.</translation> <translation id="2204034823255629767">Skaityti ir keisti viską, ką įvedate</translation> +<translation id="2207115382329026341">Įgalinkite programų srautinio perdavimo nustatymus iš telefono.</translation> <translation id="220858061631308971">Įveskite šį PIN kodą „<ph name="DEVICE_NAME" />“:</translation> <translation id="2210462644007531147">Nepavyko baigti diegimo</translation> <translation id="2212565012507486665">Leisti slapukus</translation> @@ -1448,6 +1449,7 @@ <translation id="2367972762794486313">Rodyti programas</translation> <translation id="236939127352773362">Kada įrenginiai bendrina netoliese</translation> <translation id="2371076942591664043">Baigus &atidaryti</translation> +<translation id="237307274687369010">Nepavyko paleisti „<ph name="APP_NAME" />“</translation> <translation id="2373666622366160481">Pritaikyti pagal lapo dydį</translation> <translation id="2375406435414127095">Susieti su telefonu</translation> <translation id="2377588536920405462">Galite išjungti vietovės nustatymą išjungdami pagrindinį vietovės nustatymą savo įrenginyje. Vietovės nustatymuose taip pat galite išjungti „Wi‑Fi“, mobiliojo ryšio tinklų ir jutiklių naudojimą vietovei nustatyti.</translation> @@ -6537,6 +6539,7 @@ <translation id="7573172247376861652">Akumuliatoriaus įkrovimas</translation> <translation id="7573594921350120855">Paprastai svetainėse naudojama vaizdo kamera bendravimo funkcijoms, pvz., vaizdo pokalbiams, vykdyti</translation> <translation id="7574650250151586813">Jei norite vesti tekstą, atnaujinkite „Daydream“ klaviatūros programą</translation> +<translation id="7574676002608048667">Siųsti slaptažodį</translation> <translation id="7576690715254076113">Gretinti</translation> <translation id="7576976045740938453">Iškilo su demonstracinio režimo paskyra susijusi problema.</translation> <translation id="7578137152457315135">Kontrolinio kodo nustatymai</translation>
diff --git a/chrome/app/resources/generated_resources_mk.xtb b/chrome/app/resources/generated_resources_mk.xtb index dd91229..a2682a0 100644 --- a/chrome/app/resources/generated_resources_mk.xtb +++ b/chrome/app/resources/generated_resources_mk.xtb
@@ -921,6 +921,7 @@ <translation id="1869433484041798909">Копче за обележувач</translation> <translation id="1871098866036088250">Отворај во прелистувачот Chrome</translation> <translation id="187145082678092583">Помалку апликации</translation> +<translation id="1871463148436682760">Одлично!</translation> <translation id="1871534214638631766">Прикажувај поврзани информации кога ќе кликнам со десно копче или кога долго ќе притиснам на содржини</translation> <translation id="1871569928317311284">Исклучи темна тема</translation> <translation id="1871615898038944731">Вашиот <ph name="DEVICE_TYPE" /> е ажуриран</translation> @@ -1253,6 +1254,7 @@ <translation id="2203088913459920044">Името може да содржи букви, бројки и специјални знаци</translation> <translation id="220321590587754225">Не можеше да се поврзе. Обидете се повторно.</translation> <translation id="2204034823255629767">Прочитајте го и променете го напишаниот текст</translation> +<translation id="2207115382329026341">Овозможете поставки за стриминг на апликации од телефонот.</translation> <translation id="220858061631308971">Внесете го PIN-кодот на „<ph name="DEVICE_NAME" />“:</translation> <translation id="2210462644007531147">Инсталацијата не можеше да се заврши</translation> <translation id="2212565012507486665">Дозволи колачиња</translation> @@ -1446,6 +1448,7 @@ <translation id="2367972762794486313">Покажи апликации</translation> <translation id="236939127352773362">Кога уреди споделуваат во близина</translation> <translation id="2371076942591664043">Отвори кога е &готово</translation> +<translation id="237307274687369010">Не можеше да се стартува <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">Приспособи според листот хартија</translation> <translation id="2375406435414127095">Поврзете се со телефонот</translation> <translation id="2377588536920405462">Може да ја исклучите локацијата со исклучување на главната поставка за „Локација“ на уредот. Може да го исклучите и користењето Wi-Fi, мобилни мрежи и сензори за локација во поставките за „Локација“.</translation> @@ -2348,6 +2351,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" /> попуст</translation> <translation id="3305389145870741612">Процесот на форматирање може да потрае неколку секунди. Почекајте.</translation> <translation id="3305661444342691068">Отвори PDF во Преглед</translation> +<translation id="3306992216458434072">Именувајте ја групата и изберете боја</translation> <translation id="3307176291962384345">Добијте попусти за <ph name="MERCHANT_NAME" /></translation> <translation id="3308116878371095290">Ја спречивме страницата да поставува колачиња.</translation> <translation id="3308134619352333507">Сокриј копче</translation> @@ -3762,6 +3766,7 @@ <translation id="4708794300267213770">Прикажи заклучен екран при будење од режим на мирување</translation> <translation id="4708849949179781599">Излези од <ph name="PRODUCT_NAME" /></translation> <translation id="4711638718396952945">Обнови поставки</translation> +<translation id="47158868804223727">Кликнете на името на групата за да го проширите или соберете</translation> <translation id="4716483597559580346">Фабричко ресетирање за дополнителна безбедност</translation> <translation id="471880041731876836">Немате дозвола за посета на сајтов</translation> <translation id="4722735765955348426">Лозинка за <ph name="USERNAME" /></translation> @@ -3825,6 +3830,7 @@ <translation id="4794810983896241342"><ph name="BEGIN_LINK" />Вашиот администратор<ph name="END_LINK" /> управува со ажурирањата</translation> <translation id="479536056609751218">Веб-страница, само HTML</translation> <translation id="4796142525425001238">Секогаш враќај</translation> +<translation id="4797314204379834752">Пробајте да користите групи картички за да ги организирате задачите, за купување онлајн и друго</translation> <translation id="4798236378408895261">Прикачи <ph name="BEGIN_LINK" />евиденција за Bluetooth<ph name="END_LINK" /> (интерно во Google)</translation> <translation id="479863874072008121">Управувајте со уредите</translation> <translation id="4800839971935185386">Прегледајте ги ажурирањата на имињата и иконите</translation> @@ -4065,6 +4071,7 @@ <translation id="5039696241953571917">Прегледувајте ги и управувајте со зачуваните лозинки во вашата сметка на Google</translation> <translation id="5039804452771397117">Дозволи</translation> <translation id="5040823038948176460">Дополнителни поставки за содржини</translation> +<translation id="5041509233170835229">Апликација на Chrome</translation> <translation id="5043440033854483429">Името може да содржи букви, бројки и цртички (-) и да има од 1 до 15 знаци.</translation> <translation id="5043913660911154449">Или одредете го PPD на вашиот печатач <ph name="LINK_BEGIN" />Дознајте повеќе<ph name="LINK_END" /></translation> <translation id="5045550434625856497">Погрешна лозинка</translation> @@ -5390,6 +5397,7 @@ <translation id="6393156038355142111">Предложи силна лозинка</translation> <translation id="6393550101331051049">Дозволено им е да прикажуваат небезбедни содржини</translation> <translation id="6395423953133416962">Испрати <ph name="BEGIN_LINK1" />информации за системот<ph name="END_LINK1" /> и <ph name="BEGIN_LINK2" />метриката<ph name="END_LINK2" /></translation> +<translation id="6396175271241405634">Системска апликација</translation> <translation id="6396988158856674517">Блокирајте го користењето на сензорите за движење за сајтовите</translation> <translation id="6398715114293939307">Отстранете ја Google Play Store</translation> <translation id="6398765197997659313">Излези од цел екран</translation> @@ -5459,6 +5467,7 @@ <translation id="6460566145397380451">Дозволено им е да се поврзуваат со MIDI-уредите</translation> <translation id="6460601847208524483">Пронајди следно</translation> <translation id="6461170143930046705">Се пребаруваат мрежи…</translation> +<translation id="6462204616987156669">Кликнете со десно копче на картичка и изберете „Додај картичка на нова група“</translation> <translation id="6463795194797719782">&Уреди</translation> <translation id="6464825623202322042">Овој уред</translation> <translation id="6465841119675156448">Без интернет</translation> @@ -5876,6 +5885,7 @@ <translation id="6885771755599377173">Преглед на информациите за системот</translation> <translation id="6886871292305414135">Отвори ја врската во нова &картичка</translation> <translation id="6889957081990109136">Сѐ уште не е доделен прекинувач</translation> +<translation id="689007770043972343">Пробајте да повлечете други картички во групата</translation> <translation id="6892812721183419409">Отвори ја врската како <ph name="USER" /></translation> <translation id="6895032998810961280">Пријавете детали во Google за штетен софтвер, поставки на системот и процеси што се најдени на вашиот компјутер при ова чистење</translation> <translation id="6895902329218596456">Со <ph name="USER_EMAIL" /> управува <ph name="MANAGER" />, а вашиот администратор блокирал најавување со секундарна сметка</translation> @@ -6453,6 +6463,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{1 колаче}one{{NUM_COOKIES} колаче}other{{NUM_COOKIES} колачиња}}</translation> <translation id="7493386493263658176">Екстензијата <ph name="EXTENSION_NAME" /> ќе може да го собира текстот што го пишувате, вклучувајќи ги личните податоци, како лозинки и броеви на кредитни картички. Дали сакате да ја користите?</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Апликација на Android</translation> <translation id="7495778526395737099">Ја заборавивте вашата стара лозинка?</translation> <translation id="7497981768003291373">Немате неодамна снимена текстуална евиденција на WebRTC.</translation> <translation id="7501957181231305652">или</translation>
diff --git a/chrome/app/resources/generated_resources_mn.xtb b/chrome/app/resources/generated_resources_mn.xtb index 86eb19df..cf3af8c 100644 --- a/chrome/app/resources/generated_resources_mn.xtb +++ b/chrome/app/resources/generated_resources_mn.xtb
@@ -916,6 +916,7 @@ <translation id="1869433484041798909">Хавчуурганы товчлуур</translation> <translation id="1871098866036088250">Chrome хөтөч дээр нээх</translation> <translation id="187145082678092583">Арай цөөн апп</translation> +<translation id="1871463148436682760">Амжилттай дууссан!</translation> <translation id="1871534214638631766">Таныг контент дээр хулганынхаа баруун талыг товших эсвэл дээр нь удаан дарах үед холбоотой мэдээллийг харуулна</translation> <translation id="1871569928317311284">Бараан загварыг унтраах</translation> <translation id="1871615898038944731">Таны <ph name="DEVICE_TYPE" />-г шинэчилсэн байна</translation> @@ -2346,6 +2347,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" /> хямдралтай</translation> <translation id="3305389145870741612">Форматлах үйл ажиллагаанд тодорхой хугацаа шаардлагатай тул түр хүлээнэ үү.</translation> <translation id="3305661444342691068">PDF-ийг урьдчилан харах байдлаар нээх</translation> +<translation id="3306992216458434072">Бүлгээ нэрлэж, өнгө сонгоно уу</translation> <translation id="3307176291962384345"><ph name="MERCHANT_NAME" />-н хөнгөлөлтүүдийг авах</translation> <translation id="3308116878371095290">Энэхүү хуудсыг cookies байршуулах тохиргооноос хамгаалсан байна.</translation> <translation id="3308134619352333507">Товчлуурыг нуух</translation> @@ -3759,6 +3761,7 @@ <translation id="4708794300267213770">Унтаад сэрэх үед дэлгэцийн түгжээг харуулах</translation> <translation id="4708849949179781599"><ph name="PRODUCT_NAME" />-аас гарах</translation> <translation id="4711638718396952945">Тохиргоог дахин сэргээх</translation> +<translation id="47158868804223727">Бүлгийг дэлгэх эсвэл хураахын тулд нэрийг нь товшино уу</translation> <translation id="4716483597559580346">Хамгаалалтыг сайжруулахын тулд powerwash хийх</translation> <translation id="471880041731876836">Танд энэ сайтад зочлох зөвшөөрөл алга</translation> <translation id="4722735765955348426"><ph name="USERNAME" />-н нууц үг</translation> @@ -3822,6 +3825,7 @@ <translation id="4794810983896241342"><ph name="BEGIN_LINK" />Таны администратор<ph name="END_LINK" /> шинэчлэлтүүдийг удирддаг</translation> <translation id="479536056609751218">Цахим хуудас, зөвхөн HTML</translation> <translation id="4796142525425001238">Үргэлж сэргээ</translation> +<translation id="4797314204379834752">Ажлуудыг цэгцлэх, онлайн худалдаа хийх болон бусад зүйлд табын бүлгүүдийг ашиглаж үзнэ үү</translation> <translation id="4798236378408895261"><ph name="BEGIN_LINK" />Bluetooth Логыг<ph name="END_LINK" /> хавсаргана уу (Google дотоод)</translation> <translation id="479863874072008121">Төхөөрөмжүүдийг удирдах</translation> <translation id="4800839971935185386">Нэр болон дүрс тэмдгийн шинэчлэлтүүдийг шалгах</translation> @@ -4062,6 +4066,7 @@ <translation id="5039696241953571917">Google Бүртгэлдээ хадгалсан нууц үгнүүдийг харах болон удирдах</translation> <translation id="5039804452771397117">Зөвшөөрөх</translation> <translation id="5040823038948176460">Контентын нэмэлт тохиргоо</translation> +<translation id="5041509233170835229">Chrome Апп</translation> <translation id="5043440033854483429">Нэр нь үсэг, тоо, дундуур зураас (-) ашиглах боломжтой бөгөөд 1-ээс 15 тэмдэгттэй ёстой.</translation> <translation id="5043913660911154449">Эсвэл хэвлэгчийнхээ PPD-г заах <ph name="LINK_BEGIN" />Нэмэлт мэдээлэл авах<ph name="LINK_END" /></translation> <translation id="5045550434625856497">Буруу нууц үг</translation> @@ -5388,6 +5393,7 @@ <translation id="6393156038355142111">Сайн нууц үг санал болгох</translation> <translation id="6393550101331051049">Аюултай контент харуулахыг зөвшөөрсөн</translation> <translation id="6395423953133416962"><ph name="BEGIN_LINK1" /> системийн мэдээллийг илгээх <ph name="END_LINK1" /> ба<ph name="BEGIN_LINK2" /> хэмжигдэхүүн <ph name="END_LINK2" /></translation> +<translation id="6396175271241405634">Системийн апп</translation> <translation id="6396988158856674517">Сайтуудыг хөдөлгөөн мэдрэгч ашиглахыг хориглох</translation> <translation id="6398715114293939307">Google Play дэлгүүрийг устгах</translation> <translation id="6398765197997659313">Дэлгэц дүүрэн харах горимоос гарах</translation> @@ -5457,6 +5463,7 @@ <translation id="6460566145397380451">MIDI төхөөрөмжүүдэд холбогдохыг зөвшөөрсөн</translation> <translation id="6460601847208524483">Дараагийнхыг хайж ол</translation> <translation id="6461170143930046705">Сүлжээ хайж байна...</translation> +<translation id="6462204616987156669">Таб дээр баруун талыг товшоод, "Табыг шинэ бүлэгт нэмэх"-ийг сонгоно уу</translation> <translation id="6463795194797719782">&Засварлах</translation> <translation id="6464825623202322042">Энэ төхөөрөмж</translation> <translation id="6465841119675156448">Интернэтгүйгээр</translation> @@ -5874,6 +5881,7 @@ <translation id="6885771755599377173">Системийн мэдээллийг урьдчилан үзэх</translation> <translation id="6886871292305414135">Шинэ цонхонд холбоосыг нээ</translation> <translation id="6889957081990109136">Одоогоор сэлгүүр оноогоогүй байна</translation> +<translation id="689007770043972343">Бусад нээлттэй табыг бүлэг рүүгээ чирч үзнэ үү</translation> <translation id="6892812721183419409">Холбоосыг <ph name="USER" />-р нээх</translation> <translation id="6895032998810961280">Энэ цэвэрлэгээний үеэр компьютероосоо олдсон хортой программ хангамж, системийн тохиргоо болон боловсруулалтын талаар дэлгэрэнгүй мэдээллийг Google-д мэдээлнэ үү</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" />-г <ph name="MANAGER" /> удирддаг бөгөөд танай админ хоёрдогч бүртгэлээр нэвтрэхийг блоклосон</translation> @@ -6451,6 +6459,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{1 күүки}other{{NUM_COOKIES} күүки}}</translation> <translation id="7493386493263658176"><ph name="EXTENSION_NAME" /> өргөтгөл таны шивсэн бүх текстийг цуглуулах бөгөөд үүнд таны нууц үг, кредит картын дугаар зэрэг хувийн өгөгдөл багтана. Та энэ өргөтгөлийг ашиглах уу?</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Android Апп</translation> <translation id="7495778526395737099">Хуучин нууц үгээ мартсан уу?</translation> <translation id="7497981768003291373">Танд саяхан авсан WebRTC текст лог алга.</translation> <translation id="7501957181231305652">эсвэл</translation> @@ -6530,6 +6539,7 @@ <translation id="7573172247376861652">Батерейны цэнэг</translation> <translation id="7573594921350120855">Сайтууд ихэвчлэн видео чат зэрэг харилцаа холбооны онцлогуудад зориулж таны видео камерыг ашигладаг</translation> <translation id="7574650250151586813">Текст бичихийн тулд Daydream гарын аппыг шинэчилнэ үү</translation> +<translation id="7574676002608048667">Нууц үг илгээх</translation> <translation id="7576690715254076113">Шалгах</translation> <translation id="7576976045740938453">Демо горимын бүртгэлд алдаа гарлаа.</translation> <translation id="7578137152457315135">Хурууны хээний тохиргоо</translation>
diff --git a/chrome/app/resources/generated_resources_ms.xtb b/chrome/app/resources/generated_resources_ms.xtb index e40e49e04..e2394f61 100644 --- a/chrome/app/resources/generated_resources_ms.xtb +++ b/chrome/app/resources/generated_resources_ms.xtb
@@ -1252,6 +1252,7 @@ <translation id="2203088913459920044">Nama boleh menggunakan huruf, nombor dan aksara khas</translation> <translation id="220321590587754225">Tidak boleh menyambung. Cuba lagi.</translation> <translation id="2204034823255629767">Baca dan ubah apa sahaja yang anda taip</translation> +<translation id="2207115382329026341">Dayakan tetapan penstriman apl daripada telefon anda.</translation> <translation id="220858061631308971">Sila masukkan kod PIN ini pada "<ph name="DEVICE_NAME" />":</translation> <translation id="2210462644007531147">Tidak dapat menyelesaikan pemasangan</translation> <translation id="2212565012507486665">Benarkan kuki</translation> @@ -1445,6 +1446,7 @@ <translation id="2367972762794486313">Paparkan apl</translation> <translation id="236939127352773362">Apabila peranti sedang dikongsi berdekatan</translation> <translation id="2371076942591664043">Buka apabila &selesai</translation> +<translation id="237307274687369010">Tidak dapat melancarkan <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">Muatkan mengikut kertas</translation> <translation id="2375406435414127095">Sambung ke telefon anda</translation> <translation id="2377588536920405462">Anda boleh mematikan Lokasi dengan mematikan tetapan Lokasi utama pada peranti anda. Anda juga boleh mematikan penggunaan Wi-Fi, rangkaian mudah alih dan penderia untuk lokasi dalam tetapan lokasi.</translation>
diff --git a/chrome/app/resources/generated_resources_my.xtb b/chrome/app/resources/generated_resources_my.xtb index c96cd34..5420e05 100644 --- a/chrome/app/resources/generated_resources_my.xtb +++ b/chrome/app/resources/generated_resources_my.xtb
@@ -918,6 +918,7 @@ <translation id="1869433484041798909">လိပ်စာမှတ်ရန် ခလုတ်</translation> <translation id="1871098866036088250">Chrome ဘရောင်ဇာတွင် ဖွင့်ရန်</translation> <translation id="187145082678092583">အက်ပ်များ လျှော့ပြရန်</translation> +<translation id="1871463148436682760">လုပ်ဆောင်ပြီးပါပြီ။</translation> <translation id="1871534214638631766">အကြောင်းအရာကို ဖိထားလျှင် သို့မဟုတ် ညာဘက်ခလုတ်ကို နှိပ်လိုက်လျှင် ရှိုးနှင့်ပတ်သက်သည့် အချက်အလက်များပြပါမည်</translation> <translation id="1871569928317311284">မှောင်သည့် အပြင်အဆင် ပိတ်ရန်</translation> <translation id="1871615898038944731"><ph name="DEVICE_TYPE" /> ကို အပ်ဒိတ်လုပ်ပြီးသားဖြစ်သည်</translation> @@ -1250,6 +1251,7 @@ <translation id="2203088913459920044">အမည်တွင် အက္ခရာများ၊ ဂဏန်းများနှင့် အထူးစာလုံးများ သုံးနိုင်သည်</translation> <translation id="220321590587754225">ချိတ်ဆက်၍မရပါ။ ထပ်စမ်းကြည့်ပါ။</translation> <translation id="2204034823255629767">သင် တိုက်ရိုက်သမျှကို ဖတ်ရန် နှင့် ပြောင်းလဲရန်</translation> +<translation id="2207115382329026341">သင့်ဖုန်းမှ အက်ပ်တိုက်ရိုက်လွှင့်ခြင်း ဆက်တင်များကို ဖွင့်ပါ။</translation> <translation id="220858061631308971">"<ph name="DEVICE_NAME" />" ပေါ်တွင် ပင်နံပါတ်ကုဒ် ကျေးဇူးပြု၍ ရိုက်ထည့်ပါ:</translation> <translation id="2210462644007531147">အပြီးသတ်ထည့်သွင်း၍ မရပါ</translation> <translation id="2212565012507486665">ကွတ်ကီးများ ခွင့်ပြုရန်</translation> @@ -1284,7 +1286,7 @@ <translation id="2232876851878324699">ဖိုင်ထဲမှာ လက်မှတ် တစ်ခု ပါခဲ့သည်၊ ၎င်းကို မတင်သွင်းခဲ့ပါ:</translation> <translation id="2233502537820838181">&နောက်ထပ် အချက်လက်များ</translation> <translation id="223356358902285214">ဝဘ်နှင့်အက်ပ်လုပ်ဆောင်ချက်</translation> -<translation id="2234827758954819389">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန်</translation> +<translation id="2234827758954819389">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန်</translation> <translation id="2234876718134438132">စင့်ခ်နှင့် Google ဝန်ဆောင်မှု</translation> <translation id="2235344399760031203">ပြင်ပအဖွဲ့အစည်း၏ ကွတ်ကီးများကို ပိတ်ထားသည်</translation> <translation id="2238379619048995541">ကြိမ်ရေ အခြေအနေ ဒေတာ</translation> @@ -1443,6 +1445,7 @@ <translation id="2367972762794486313">အက်ပ်များကို ပြပေးရန်</translation> <translation id="236939127352773362">စက်များကို အနီးတွင် မျှဝေထားချိန်</translation> <translation id="2371076942591664043">လုပ်ပြီးသည့် အခါမှာ &ဖွင့်ရန်</translation> +<translation id="237307274687369010"><ph name="APP_NAME" /> ကို ဖွင့်၍မရပါ</translation> <translation id="2373666622366160481">စာရွက်နှင့် ကွက်တိ လုပ်ပေးရန်</translation> <translation id="2375406435414127095">သင့်ဖုန်းသို့ ချိတ်ဆက်ခြင်း</translation> <translation id="2377588536920405462">'တည်နေရာ' ကို ပိတ်ရန် သင့်စက်ပစ္စည်းရှိ ပင်မ 'တည်နေရာ' ဆက်တင်ကို ပိတ်ပါ။ တည်နေရာဆက်တင်များတွင် တည်နေရာအတွက် Wi-Fi၊ မိုဘိုင်းကွန်ရက်များနှင့် အာရုံခံကိရိယာများအသုံးပြုမှုကိုလည်း ပိတ်နိုင်သည်။</translation> @@ -2316,6 +2319,7 @@ <translation id="3277691515294482687">Linux ကို အဆင့်မြှင့်ခြင်း မပြုလုပ်မီ ကျွန်ုပ်၏ အက်ပ်နှင့် ဖိုင်များကို 'ကျွန်ုပ်၏ဖိုင်တွဲ'သို့ အရန်သိမ်းပါ။</translation> <translation id="3278001907972365362">သင့် Google အကောင့်(များ)တွင် ပြင်ဆင်စရာ ရှိနေပါသည်</translation> <translation id="3278800075417428224">CloudReady 2.0 ဆက်တင်များတွင် ဘာသာစကား စီမံရန်</translation> +<translation id="3278928434075969895">ဤပရိုဖိုင်သည် Chrome OS ပရောက်စီ ဆက်တင်များ သုံးသည်။</translation> <translation id="3279092821516760512">ရွေးချယ်ထားသော အဆက်အသွယ်များသည် အနီးတွင်ရှိသောအခါ သင်နှင့်မျှဝေနိုင်သည်။ သင်လက်မခံမချင်း လွှဲပြောင်းမှုကို စတင်မည်မဟုတ်ပါ။</translation> <translation id="3279230909244266691">ဤလုပ်ဆောင်ချက်သည် မိနစ်အနည်းငယ်ကြာနိုင်ပါသည်။ ပကတိအသွင်စက်ကို စတင်နေသည်။</translation> <translation id="3280237271814976245">&အဖြစ် သိမ်းရန်...</translation> @@ -2345,6 +2349,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" /> လျှော့ဈေး</translation> <translation id="3305389145870741612">ဖိုင်ပြန်လည်စီရန် စက္ကန့်အနည်းငယ် ကြာမည်။ ခဏ စောင့်ပါ။</translation> <translation id="3305661444342691068">PDF ကို အစမ်းကြည့်ထဲ ဖွင့်ရန်</translation> +<translation id="3306992216458434072">အုပ်စုအမည်ပေးပြီး အရောင်ရွေးနိုင်သည်</translation> <translation id="3307176291962384345"><ph name="MERCHANT_NAME" /> အတွက် လျှော့ဈေး ရယူမလား</translation> <translation id="3308116878371095290">ကူကီးသတ်မှတ်ခြင်းကို ဤစာမျက်နှာတွင် ခွင့်မပြုပါ။</translation> <translation id="3308134619352333507">ခလုတ်ကို ဝှက်ထားရန်</translation> @@ -3758,6 +3763,7 @@ <translation id="4708794300267213770">မျက်နှာပြင်ကို ပိတ်ထားရာမှ ဖွင့်လိုက်သည့်အခါ လော့ခ်မျက်နှာပြင်ကို ပြပါ</translation> <translation id="4708849949179781599"><ph name="PRODUCT_NAME" />ကို ရပ်ပစ်ရန်</translation> <translation id="4711638718396952945">ဆက်တင်များအား ပြန်လည်သိုလှောင်ရန်</translation> +<translation id="47158868804223727">ချဲ့ရန် (သို့) လျှော့ပြရန် အုပ်စုအမည်ကို ကလစ်နှိပ်နိုင်သည်</translation> <translation id="4716483597559580346">လုံခြုံရေး ပိုမိုကောင်းမွန်စေမည့် Powerwash</translation> <translation id="471880041731876836">ဤဝဘ်ဆိုက်သို့ ဝင်ကြည့်ရန် သင့်တွင် ခွင့်ပြုချက်မရှိပါ</translation> <translation id="4722735765955348426"><ph name="USERNAME" /> အတွက် စကားဝှက်</translation> @@ -3821,6 +3827,7 @@ <translation id="4794810983896241342">အပ်ဒိတ်များကို <ph name="BEGIN_LINK" />သင့် ကြီးကြပ်သူ<ph name="END_LINK" /> က စီမံပါသည်</translation> <translation id="479536056609751218">ဝဘ်စာမျက်နှာ HTML သာလျှင်</translation> <translation id="4796142525425001238">အမြဲ ပြန်ယူရန်</translation> +<translation id="4797314204379834752">အွန်လိုင်းဈေးဝယ်ခြင်းနှင့် အခြားအရာများအတွက် လုပ်ဆောင်စရာများကို စီစဉ်ရန် တဘ်အုပ်စုများ စမ်းသုံးကြည့်နိုင်သည်</translation> <translation id="4798236378408895261"><ph name="BEGIN_LINK" />ဘလူးတုသ် မှတ်တမ်းများ<ph name="END_LINK" />ကို ပူးတွဲပါ (Google ကုမ္ပဏီတွင်း)</translation> <translation id="479863874072008121">စက်များကို စီမံခန့်ခွဲရန်</translation> <translation id="4800839971935185386">အမည်နှင့် သင်္ကေတအပ်ဒိတ်များ ပြန်စစ်ဆေးပါ</translation> @@ -4061,6 +4068,7 @@ <translation id="5039696241953571917">သင်၏ Google Account တွင် သိမ်းထားသော စကားဝှက်များကို ကြည့်ပြီးစီမံနိုင်သည်</translation> <translation id="5039804452771397117">ခွင့်ပြုရန်</translation> <translation id="5040823038948176460">နောက်ထပ် အကြောင်းအရာ ဆက်တင်များ</translation> +<translation id="5041509233170835229">Chrome အက်ပ်</translation> <translation id="5043440033854483429">အမည်တွင် အက္ခရာ၊ ဂဏန်းနှင့် တုံးတိုများ (-) သုံးနိုင်ပြီး စာလုံးရေ ၁ လုံးမှ ၁၅ လုံးအတွင်း ရှိရမည်။</translation> <translation id="5043913660911154449">သို့မဟုတ် သင့်ပရင်တာ PPD ကို သတ်မှတ်ပါ <ph name="LINK_BEGIN" />ပိုမိုလေ့လာရန်<ph name="LINK_END" /></translation> <translation id="5045550434625856497">စကားဝှက် မမှန်ပါ</translation> @@ -4888,6 +4896,7 @@ <translation id="5909379458939060601">ဤပရိုဖိုင်နှင့် ဖွင့်ကြည့်ထားသည့်မှတ်တမ်းဒေတာကို ဖျက်မလား။</translation> <translation id="5910363049092958439">ပုံ&ကို အဖြစ် သိမ်းရန်...</translation> <translation id="5910726859585389579"><ph name="DEVICE_TYPE" /> က အော့ဖ်လိုင်းဖြစ်နေသည်</translation> +<translation id="5911505723657992440">ဤပရိုဖိုင်အတွက် Chrome OS ပရောက်စီ ဆက်တင်များ သုံးမည်။</translation> <translation id="5911533659001334206">ဖြတ်လမ်းလင့်ခ် ကြည့်ရှုကိရိယာ</translation> <translation id="5914724413750400082">မော်ဂျူး (<ph name="MODULUS_NUM_BITS" /> ဘစ်များ): <ph name="MODULUS_HEX_DUMP" /> @@ -5386,6 +5395,7 @@ <translation id="6393156038355142111">လုံခြုံမှုမြင့်သည့် စကားဝှက် အကြံပြုရန်</translation> <translation id="6393550101331051049">ဘေးကင်းမှုမရှိသော အကြောင်းအရာများပြရန် ခွင့်ပြုထားသည်</translation> <translation id="6395423953133416962"><ph name="BEGIN_LINK1" />စနစ်ဆိုင်ရာ အချက်အလက်များ <ph name="END_LINK1" /> နှင့် <ph name="BEGIN_LINK2" />တိုင်းထွာချက်များ<ph name="END_LINK2" /> ပို့ရန်</translation> +<translation id="6396175271241405634">စနစ်အက်ပ်</translation> <translation id="6396988158856674517">ဝဘ်ဆိုက်များအား လှုပ်ရှားမှု အာရုံခံစနစ်များ အသုံးပြုခြင်းကို တားမြစ်ရန်</translation> <translation id="6398715114293939307">Google Play Store ကို ဖယ်ရှားရန်</translation> <translation id="6398765197997659313">မျက်နှာပြင် အပြည့်မှ ထွက်ရန်</translation> @@ -5455,6 +5465,7 @@ <translation id="6460566145397380451">MIDI ကိရိယာများသို့ ချိတ်ဆက်ရန် ခွင့်ပြုထားသည်</translation> <translation id="6460601847208524483">နောက်တစ်ခုရှာ</translation> <translation id="6461170143930046705">ကွန်ရက်များကို ရှာဖွေနေသည်...</translation> +<translation id="6462204616987156669">‘တဘ်’ တစ်ခုတွင် ‘ညာဘက်ခလုတ်’ ကို နှိပ်ပြီး "အုပ်စုအသစ်တွင် တဘ်ထည့်ရန်" ကို ရွေးပါ</translation> <translation id="6463795194797719782">&တည်းဖြတ်ရန်</translation> <translation id="6464825623202322042">ဒီကိရိယာ</translation> <translation id="6465841119675156448">အင်တာနက် မသုံးဘဲ</translation> @@ -5870,6 +5881,7 @@ <translation id="6885771755599377173">စနစ်အချက်အလက် အစမ်းကြည့်ခြင်း</translation> <translation id="6886871292305414135">လင့်ကို တဘ် &အသစ်ထဲမှာ ဖွင့်ရန်</translation> <translation id="6889957081990109136">အသွင်တူခလုတ် မသတ်မှတ်ရသေးပါ</translation> +<translation id="689007770043972343">အခြားဖွင့်ထားသည့် တဘ်များကို အုပ်စုသို့ ဖိဆွဲ၍ ထည့်နိုင်သည်</translation> <translation id="6892812721183419409">လင့်ကို <ph name="USER" /> အဖြစ် ဖွင့်ပါ</translation> <translation id="6895032998810961280">ရှင်းထုတ်ချိန်အတွင်း သင့်ကွန်ပျူတာတွင် တွေ့သော အန္တရာယ်ဖြစ်စေနိုင်သည့် ဆော့ဖ်ဝဲ၊ စနစ် ဆက်တင်များနှင့် လုပ်ဆောင်ချက်များအကြောင်း အသေးစိတ်များကို Google သို့ အစီရင်ခံပါ</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" /> ကို <ph name="MANAGER" /> က စီမံပြီး သင့်စီမံခန့်ခွဲသူက အရန်အကောင့်ဖြင့် လက်မှတ်ထိုးဝင်မှုကို ပိတ်ထားသည်</translation> @@ -6447,6 +6459,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{ကွတ်ကီး ၁ ခု}other{ကွတ်ကီး {NUM_COOKIES} ခု}}</translation> <translation id="7493386493263658176"><ph name="EXTENSION_NAME" /> နောက်ဆက်တွဲသည် စကားဝှက်နှင့် အကြွေးဝယ်ကဒ်နံပါတ်ကဲ့သို့ ကိုယ်ရေးကိုယ်တာ ဒေတာများအပါအဝင် သင်ရိုက်လိုက်သည့် စာများအားလုံးကို သိမ်းဆည်းထားနိုင်ပါသည်။ ဤနောက်ဆက်တွဲကို အသုံးပြုလိုပါသလား။</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Android အက်ပ်</translation> <translation id="7495778526395737099">သင့်စကားဝှက်အဟောင်းကို မေ့ပြီလား?</translation> <translation id="7497981768003291373">သင့်ထံတွင် မကြာသေးခင်က မှတ်သားထားသည့် WebRTC စာသားမှတ်တမ်းများ မရှိပါ။</translation> <translation id="7501957181231305652">သို့မဟုတ်</translation> @@ -6614,7 +6627,7 @@ <translation id="7658239707568436148">မလုပ်တော့</translation> <translation id="7659154729610375585">မည်သို့ပင်ဖြစ်စေ ရုပ်ဖျက်မုဒ်မှ ထွက်လိုပါသလား။</translation> <translation id="7659297516559011665">ဤစက်ပေါ်ရှိ စကားဝှက်များသာ</translation> -<translation id="7659336857671800422">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန် ရယူရန်</translation> +<translation id="7659336857671800422">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန် ရယူရန်</translation> <translation id="7659584679870740384">သင်သည် ဒီကိရိယာကို သုံးပိုင်ခွင့် မရှိပါ။ လက်မှတ်ထိုး ဝင်ရန် ခွင့်ပြုချက် အတွက် ကြီးကြပ်သူအား ဆက်သွယ်ပါ။</translation> <translation id="7661259717474717992">ကွတ်ကီးဒေတာများကို သိမ်းဆည်းရန်နှင့် ဖတ်ရန် ဆိုက်များကို ခွင့်ပြုပါ</translation> <translation id="7661451191293163002">မှတ်ပုံတင်ခြင်း အသိအမှတ်ပြုလက်မှတ်ကို ရယူ၍ မရပါ။</translation>
diff --git a/chrome/app/resources/generated_resources_ne.xtb b/chrome/app/resources/generated_resources_ne.xtb index 316670217..3de2693 100644 --- a/chrome/app/resources/generated_resources_ne.xtb +++ b/chrome/app/resources/generated_resources_ne.xtb
@@ -1237,6 +1237,7 @@ <translation id="2203088913459920044">नाममा अक्षर, सङ्ख्या तथा विशेष वर्णहरू प्रयोग गर्न मिल्छ</translation> <translation id="220321590587754225">कनेक्ट गर्न सकिएन। फेरि प्रयास गर्नुहोस्।</translation> <translation id="2204034823255629767">तपाईंले टाइप गर्नुहुने कुनैपनि कुरालाई पढ्नुहोस् र परिवर्तन गर्नुहोस्</translation> +<translation id="2207115382329026341">आफ्नो फोनमार्फत एप स्ट्रिमिङसम्बन्धी सेटिङ अन गर्नुहोस्।</translation> <translation id="220858061631308971">कृपया "<ph name="DEVICE_NAME" />" मा यो पिन कोड प्रविष्टि गर्नुहोस्:</translation> <translation id="2210462644007531147">इन्स्टल गर्ने प्रक्रिया पूरा गर्न सकिएन</translation> <translation id="2212565012507486665">कुकीहरूलाई अनुमति दिनुहोस्</translation> @@ -1427,6 +1428,7 @@ <translation id="2367972762794486313">एप्स देखाउनुहोस्</translation> <translation id="236939127352773362">नजिकै रहेका डिभाइससँग सेयर गरिराखिएका बेला</translation> <translation id="2371076942591664043">&भएपछि खोल्नुहोस्</translation> +<translation id="237307274687369010"><ph name="APP_NAME" /> लन्च गर्न सकिएन</translation> <translation id="2373666622366160481">कागजमा ठ्याक्कै अट्ने बनाउनुहोस्</translation> <translation id="2375406435414127095">आफ्नो फोनसँग जोड्नुहोस्</translation> <translation id="2377588536920405462">तपाईं आफ्नो यन्त्रमा स्थानसम्बन्धी मुख्य सेटिङ निष्क्रिय पारी लोकेसन सर्भिस निष्क्रिय पार्न सक्नुहुन्छ। तपाईं स्थानसम्बन्धी सेटिङमा गई स्थान पत्ता लगाउने प्रयोजनका लागि Wi-Fi, मोबाइल नेटवर्क र सेन्सरहरूको प्रयोग गर्न नदिन पनि सक्नुहुन्छ।</translation>
diff --git a/chrome/app/resources/generated_resources_ro.xtb b/chrome/app/resources/generated_resources_ro.xtb index 4872ef8..8fd78d9 100644 --- a/chrome/app/resources/generated_resources_ro.xtb +++ b/chrome/app/resources/generated_resources_ro.xtb
@@ -1241,6 +1241,7 @@ <translation id="2203088913459920044">Numele poate să conțină litere, cifre și caractere speciale</translation> <translation id="220321590587754225">Nu s-a putut conecta. Încearcă din nou.</translation> <translation id="2204034823255629767">Citește și modifică orice date introduse</translation> +<translation id="2207115382329026341">Activează streamingul de aplicație din setări de pe telefon.</translation> <translation id="220858061631308971">Introduceți acest cod PIN pe „<ph name="DEVICE_NAME" />”:</translation> <translation id="2210462644007531147">Instalarea nu a putut fi finalizată</translation> <translation id="2212565012507486665">Permite cookie-urile</translation> @@ -1431,6 +1432,7 @@ <translation id="2367972762794486313">Afișați aplicații</translation> <translation id="236939127352773362">Când există dispozitive în apropiere care trimit fișiere</translation> <translation id="2371076942591664043">Deschide când s-a &descărcat</translation> +<translation id="237307274687369010">Nu s-a putut lansa <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">Potrivește în funcție de dimensiunile hârtiei</translation> <translation id="2375406435414127095">Conectează-te la telefon</translation> <translation id="2377588536920405462">Poți dezactiva locația oprind setarea principală privind locația de pe dispozitivul tău. Poți dezactiva și folosirea conexiunii Wi-Fi, a rețelelor mobile și a senzorilor pentru locație din setările privind locația.</translation>
diff --git a/chrome/app/resources/generated_resources_sk.xtb b/chrome/app/resources/generated_resources_sk.xtb index 2c21e85..aec1e8e 100644 --- a/chrome/app/resources/generated_resources_sk.xtb +++ b/chrome/app/resources/generated_resources_sk.xtb
@@ -1242,6 +1242,7 @@ <translation id="2203088913459920044">Názov môže obsahovať písmená, čísla a špeciálne znaky</translation> <translation id="220321590587754225">Nepodarilo sa pripojiť. Skúste to znova.</translation> <translation id="2204034823255629767">Čítať a meniť všetko, čo napíšete</translation> +<translation id="2207115382329026341">Zapnite v telefóne nastavenia streamovania aplikácií.</translation> <translation id="220858061631308971">Zadajte tento kód PIN v zariadení „<ph name="DEVICE_NAME" />“:</translation> <translation id="2210462644007531147">Inštaláciu sa nepodarilo dokončiť</translation> <translation id="2212565012507486665">Povoliť súbory cookie</translation> @@ -1432,6 +1433,7 @@ <translation id="2367972762794486313">Zobraziť aplikácie</translation> <translation id="236939127352773362">Pri zdieľaní zariadeniami nablízku</translation> <translation id="2371076942591664043">Po stiahnutí otvoriť</translation> +<translation id="237307274687369010">Aplikáciu <ph name="APP_NAME" /> sa nepodarilo spustiť</translation> <translation id="2373666622366160481">Prispôsobiť papieru</translation> <translation id="2375406435414127095">Pripojenie k telefónu</translation> <translation id="2377588536920405462">Nastavenie Poloha môžete deaktivovať vypnutím hlavného nastavenia Poloha v zariadení. V nastaveniach polohy môžete tiež vypnúť určovanie polohy pomocou siete Wi‑Fi, mobilnej siete a senzorov.</translation>
diff --git a/chrome/app/resources/generated_resources_sl.xtb b/chrome/app/resources/generated_resources_sl.xtb index 0ea51129..316215cd 100644 --- a/chrome/app/resources/generated_resources_sl.xtb +++ b/chrome/app/resources/generated_resources_sl.xtb
@@ -2321,6 +2321,7 @@ <translation id="3277691515294482687">Pred nadgradnjo Linuxa varnostno kopiraj moje aplikacije in datoteke v mapo Moje datoteke.</translation> <translation id="3278001907972365362">V računih Google je potrebno ukrepanje</translation> <translation id="3278800075417428224">Upravljanje jezikov v nastavitvah sistema CloudReady 2.0</translation> +<translation id="3278928434075969895">Ta profil uporablja nastavitve strežnika proxy za Chrome OS.</translation> <translation id="3279092821516760512">Izbrani stiki lahko delijo z vami, ko so v bližini. Prenosi se ne začnejo, dokler ne sprejmete.</translation> <translation id="3279230909244266691">To lahko traja nekaj minut. Zagon navideznega računalnika.</translation> <translation id="3280237271814976245">Shrani &kot ...</translation> @@ -4895,6 +4896,7 @@ <translation id="5909379458939060601">Želite izbrisati ta profil in podatke o brskanju?</translation> <translation id="5910363049092958439">Sh&rani sliko kot ...</translation> <translation id="5910726859585389579"><ph name="DEVICE_TYPE" /> nima vzpostavljene povezave</translation> +<translation id="5911505723657992440">Uporaba nastavitev strežnika proxy za Chrome OS za ta profil.</translation> <translation id="5911533659001334206">Pregledovalnik bližnjic</translation> <translation id="5914724413750400082">Modul (št. bitov: <ph name="MODULUS_NUM_BITS" />): <ph name="MODULUS_HEX_DUMP" />
diff --git a/chrome/app/resources/generated_resources_sw.xtb b/chrome/app/resources/generated_resources_sw.xtb index c582ab76..d62df6b 100644 --- a/chrome/app/resources/generated_resources_sw.xtb +++ b/chrome/app/resources/generated_resources_sw.xtb
@@ -5082,7 +5082,7 @@ <translation id="6078769373519310690">"<ph name="CHROME_EXTENSION_NAME" />" inataka kuunganisha kwenye kifaa cha HID</translation> <translation id="608029822688206592">Hakuna mtandao uliopatikana. Tafadhali weka SIM yako kisha ujaribu tena.</translation> <translation id="6080689532560039067">Angalia saa ya mfumo wako</translation> -<translation id="6082877069782862752">Kuambatisha Funguo</translation> +<translation id="6082877069782862752">Kukabidhi funguo jukumu</translation> <translation id="608496399798299674">CloudReady 2.0</translation> <translation id="608531959444400877"><ph name="WINDOW_TITLE" /> - Sehemu ya kikundi ambacho hakina jina</translation> <translation id="6085886413119427067">Hubainisha jinsi ya kuunganisha kwenye tovuti kupitia muunganisho salama</translation>
diff --git a/chrome/app/resources/generated_resources_th.xtb b/chrome/app/resources/generated_resources_th.xtb index 42dbdba3..4f814df 100644 --- a/chrome/app/resources/generated_resources_th.xtb +++ b/chrome/app/resources/generated_resources_th.xtb
@@ -908,6 +908,7 @@ <translation id="1869433484041798909">ปุ่มบุ๊กมาร์ก</translation> <translation id="1871098866036088250">เปิดในเบราว์เซอร์ Chrome</translation> <translation id="187145082678092583">แสดงแอปน้อยลง</translation> +<translation id="1871463148436682760">เยี่ยมมาก</translation> <translation id="1871534214638631766">แสดงข้อมูลที่เกี่ยวข้องเมื่อคลิกขวาที่เนื้อหาหรือกดเนื้อหาค้างไว้</translation> <translation id="1871569928317311284">ปิดธีมมืด</translation> <translation id="1871615898038944731"><ph name="DEVICE_TYPE" /> ของคุณเป็นเวอร์ชันล่าสุดแล้ว</translation> @@ -2332,6 +2333,7 @@ <translation id="3304212451103136496">ลด <ph name="DISCOUNT_AMOUNT" /></translation> <translation id="3305389145870741612">กระบวนการฟอร์แมตอาจใช้เวลาสองสามวินาที โปรดรอสักครู่</translation> <translation id="3305661444342691068">เปิด PDF ในหน้าตัวอย่าง</translation> +<translation id="3306992216458434072">ตั้งชื่อกลุ่มและเลือกสีกลุ่ม</translation> <translation id="3307176291962384345">รับส่วนลดสำหรับ <ph name="MERCHANT_NAME" /></translation> <translation id="3308116878371095290">หน้าเว็บนี้ไม่อนุญาตให้มีการตั้งค่าคุกกี้</translation> <translation id="3308134619352333507">ซ่อนปุ่ม</translation> @@ -3744,6 +3746,7 @@ <translation id="4708794300267213770">แสดงหน้าจอล็อกเมื่อปลุกให้ทำงานจากโหมดสลีป</translation> <translation id="4708849949179781599">ออกจาก <ph name="PRODUCT_NAME" /></translation> <translation id="4711638718396952945">กู้คืนการตั้งค่า</translation> +<translation id="47158868804223727">คลิกชื่อกลุ่มเพื่อขยายหรือยุบ</translation> <translation id="4716483597559580346">Powerwash เพื่อเพิ่มความปลอดภัย</translation> <translation id="471880041731876836">คุณไม่มีสิทธิ์เข้าชมเว็บไซต์นี้</translation> <translation id="4722735765955348426">รหัสผ่านของ <ph name="USERNAME" /></translation> @@ -3807,6 +3810,7 @@ <translation id="4794810983896241342"><ph name="BEGIN_LINK" />ผู้ดูแลระบบของคุณ<ph name="END_LINK" />เป็นผู้จัดการการอัปเดตต่างๆ</translation> <translation id="479536056609751218">หน้าเว็บ HTML เท่านั้น</translation> <translation id="4796142525425001238">คืนค่าเสมอ</translation> +<translation id="4797314204379834752">ลองใช้กลุ่มแท็บเพื่อจัดระเบียบงานต่างๆ เลือกซื้อออนไลน์ และอีกมากมาย</translation> <translation id="4798236378408895261">แนบ<ph name="BEGIN_LINK" />บันทึกบลูทูธ<ph name="END_LINK" /> (ใช้ภายใน Google)</translation> <translation id="479863874072008121">จัดการอุปกรณ์</translation> <translation id="4800839971935185386">ตรวจสอบการอัปเดตชื่อและไอคอน</translation> @@ -4047,6 +4051,7 @@ <translation id="5039696241953571917">ดูและจัดการรหัสผ่านที่บันทึกไว้ในบัญชี Google</translation> <translation id="5039804452771397117">อนุญาต</translation> <translation id="5040823038948176460">การตั้งค่าเนื้อหาเพิ่มเติม</translation> +<translation id="5041509233170835229">แอป Chrome</translation> <translation id="5043440033854483429">ชื่อสามารถมีตัวอักษร ตัวเลข และขีดกลาง (-) รวมถึงต้องมีอักขระรวมตั้งแต่ 1 ถึง 15 ตัว</translation> <translation id="5043913660911154449">หรือระบุ PPD ของเครื่องพิมพ์ <ph name="LINK_BEGIN" />ดูข้อมูลเพิ่มเติม<ph name="LINK_END" /></translation> <translation id="5045550434625856497">รหัสผ่านไม่ถูกต้อง</translation> @@ -5373,6 +5378,7 @@ <translation id="6393156038355142111">แนะนำรหัสผ่านที่รัดกุม</translation> <translation id="6393550101331051049">ได้รับอนุญาตให้แสดงเนื้อหาที่ไม่ปลอดภัย</translation> <translation id="6395423953133416962">ส่ง<ph name="BEGIN_LINK1" />ข้อมูลระบบ<ph name="END_LINK1" />และ<ph name="BEGIN_LINK2" />เมตริก<ph name="END_LINK2" /></translation> +<translation id="6396175271241405634">แอประบบ</translation> <translation id="6396988158856674517">บล็อกเว็บไซต์ไม่ให้เข้าถึงเซ็นเซอร์ตรวจจับความเคลื่อนไหว</translation> <translation id="6398715114293939307">นำ Google Play Store ออก</translation> <translation id="6398765197997659313">ออกจากการแสดงแบบเต็มหน้าจอ</translation> @@ -5442,6 +5448,7 @@ <translation id="6460566145397380451">ได้รับอนุญาตให้เชื่อมต่ออุปกรณ์ MIDI</translation> <translation id="6460601847208524483">ค้นหาถัดไป</translation> <translation id="6461170143930046705">กำลังค้นหาเครือข่าย...</translation> +<translation id="6462204616987156669">คลิกขวาที่แท็บแล้วเลือก "เพิ่มแท็บไปยังกลุ่มใหม่"</translation> <translation id="6463795194797719782">แ&ก้ไข</translation> <translation id="6464825623202322042">อุปกรณ์นี้</translation> <translation id="6465841119675156448">ไม่ใช้อินเทอร์เน็ต</translation> @@ -5859,6 +5866,7 @@ <translation id="6885771755599377173">ดูตัวอย่างข้อมูลระบบ</translation> <translation id="6886871292305414135">เปิดลิงก์ในแ&ท็บใหม่</translation> <translation id="6889957081990109136">ยังไม่ได้กำหนดสวิตช์</translation> +<translation id="689007770043972343">ลองลากแท็บอื่นที่เปิดอยู่ไปยังกลุ่ม</translation> <translation id="6892812721183419409">เปิดลิงก์ในฐานะ <ph name="USER" /></translation> <translation id="6895032998810961280">รายงานรายละเอียดเกี่ยวกับซอฟต์แวร์ที่เป็นอันตราย การตั้งค่าระบบ และการประมวลผลที่พบในคอมพิวเตอร์ระหว่างการทำความสะอาดไปยัง Google</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" /> จัดการโดย <ph name="MANAGER" /> และผู้ดูแลระบบได้บล็อกการลงชื่อเข้าใช้เป็นบัญชีรอง</translation> @@ -6436,6 +6444,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{คุกกี้ 1 รายการ}other{คุกกี้ {NUM_COOKIES} รายการ}}</translation> <translation id="7493386493263658176">ส่วนขยาย <ph name="EXTENSION_NAME" /> อาจรวบรวมข้อความทั้งหมดที่คุณพิมพ์ ซึ่งรวมถึงข้อมูลส่วนตัว เช่น รหัสผ่านและหมายเลขบัตรเครดิต คุณต้องการใช้ส่วนขยายนี้ไหม</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">แอป Android</translation> <translation id="7495778526395737099">หากลืมรหัสผ่านเก่า</translation> <translation id="7497981768003291373">คุณไม่มีบันทึกข้อความ WebRTC ที่จับภาพเมื่อเร็วๆ นี้</translation> <translation id="7501957181231305652">หรือ</translation>
diff --git a/chrome/app/resources/generated_resources_tr.xtb b/chrome/app/resources/generated_resources_tr.xtb index 9b7927e..f996c722 100644 --- a/chrome/app/resources/generated_resources_tr.xtb +++ b/chrome/app/resources/generated_resources_tr.xtb
@@ -1273,7 +1273,7 @@ <translation id="2232876851878324699">Dosya bir sertifika içeriyordu ve bu sertifika içe aktarılmadı:</translation> <translation id="2233502537820838181">&Daha fazla bilgi</translation> <translation id="223356358902285214">Web ve Uygulama Etkinliği</translation> -<translation id="2234827758954819389">Gizlilik Rehberi</translation> +<translation id="2234827758954819389">Gizlilik Kılavuzu</translation> <translation id="2234876718134438132">Senkronizasyon ve Google hizmetleri</translation> <translation id="2235344399760031203">Üçüncü taraf çerezler engellendi</translation> <translation id="2238379619048995541">Frekans Durumu Verileri</translation> @@ -6602,7 +6602,7 @@ <translation id="7658239707568436148">İptal</translation> <translation id="7659154729610375585">Yine de Gizli moddan çıkılsın mı?</translation> <translation id="7659297516559011665">Yalnızca bu cihazdaki şifreler</translation> -<translation id="7659336857671800422">Gizlilik kılavuzuna göz at</translation> +<translation id="7659336857671800422">Gizlilik Kılavuzu'na göz at</translation> <translation id="7659584679870740384">Bu cihazı kullanma yetkiniz yok. Oturum açma izni almak için lütfen yöneticiyle iletişim kurun.</translation> <translation id="7661259717474717992">Sitelere, çerez verilerini kaydetme ve okuma izni ver</translation> <translation id="7661451191293163002">Kayıt sertifikası alınamadı.</translation>
diff --git a/chrome/app/resources/generated_resources_ur.xtb b/chrome/app/resources/generated_resources_ur.xtb index 1b92c2fd..50e616df 100644 --- a/chrome/app/resources/generated_resources_ur.xtb +++ b/chrome/app/resources/generated_resources_ur.xtb
@@ -908,6 +908,7 @@ <translation id="1869433484041798909">بُک مارک بٹن</translation> <translation id="1871098866036088250">Chrome براؤزر میں کھولیں</translation> <translation id="187145082678092583">کم ایپس</translation> +<translation id="1871463148436682760">اچھی طرح سے ہو گیا!</translation> <translation id="1871534214638631766">جب آپ مواد پر دایاں کلک یا لانگ پریس کریں تو متعلقہ معلومات دکھائیں</translation> <translation id="1871569928317311284">گہری تھیم آف کریں</translation> <translation id="1871615898038944731">آپ کا <ph name="DEVICE_TYPE" /> اپ ٹو ڈیٹ ہے</translation> @@ -2334,6 +2335,7 @@ <translation id="3304212451103136496"><ph name="DISCOUNT_AMOUNT" /> کی رعایت</translation> <translation id="3305389145870741612">فارمیٹنگ کی کارروائی میں کچھ سیکنڈ لگ سکتے ہیں۔ براہ کرم انتظار کریں۔</translation> <translation id="3305661444342691068">PDF کو پیش منظر میں کھولیں</translation> +<translation id="3306992216458434072">اپنے گروپ کو نام دیں اور رنگ منتخب کریں</translation> <translation id="3307176291962384345"><ph name="MERCHANT_NAME" /> کیلئے رعایتیں حاصل کریں</translation> <translation id="3308116878371095290">اس صفحہ کو کوکیز سیٹ کرنے سے روک دیا گیا تھا۔</translation> <translation id="3308134619352333507">چھپائیں بٹن</translation> @@ -3748,6 +3750,7 @@ <translation id="4708794300267213770">سلیپ وضع سے بیدار کرنے کے وقت لاک اسکرین دکھائیں</translation> <translation id="4708849949179781599"><ph name="PRODUCT_NAME" /> کو چھوڑیں</translation> <translation id="4711638718396952945">ترتیبات بحال کریں</translation> +<translation id="47158868804223727">گروپ کے نام کو پھیلانے یا سکیڑنے کے لیے اس پر کلک کریں</translation> <translation id="4716483597559580346">Powerwash برائے اضافی سیکیورٹی</translation> <translation id="471880041731876836">یہ سائٹ ملاحظہ کرنے کیلئے آپ کو اجازت نہیں ہے</translation> <translation id="4722735765955348426"><ph name="USERNAME" /> کے لیے پاس ورڈ</translation> @@ -3811,6 +3814,7 @@ <translation id="4794810983896241342">اپ ڈیٹس <ph name="BEGIN_LINK" />آپ کے منتظم<ph name="END_LINK" /> کے زیر انتظام ہیں۔</translation> <translation id="479536056609751218">ویب صفحہ، صرف HTML</translation> <translation id="4796142525425001238">ہمیشہ بحال کریں</translation> +<translation id="4797314204379834752">آن لائن خریداری وغیرہ کیلئے ٹاسکس کا نظم کرنے کی خاطر ٹیب گروپس کا استعمال کرنے کی کوشش کریں</translation> <translation id="4798236378408895261"><ph name="BEGIN_LINK" />بلوٹوتھ لاگز<ph name="END_LINK" /> منسلک کریں (Google داخلی)</translation> <translation id="479863874072008121">آلات کا نظم کریں</translation> <translation id="4800839971935185386">نام اور آئیکن کے اپ ڈیٹس کا جائزہ لیں</translation> @@ -4051,6 +4055,7 @@ <translation id="5039696241953571917">اپنے Google اکاؤنٹ میں محفوظ کردہ پاس ورڈز دیکھیں اور ان کا نظم کریں</translation> <translation id="5039804452771397117">اجازت دیں</translation> <translation id="5040823038948176460">اضافی مواد کی ترتیبات</translation> +<translation id="5041509233170835229">Chrome App</translation> <translation id="5043440033854483429">نام حروف، اعداد اور ہائفنز (-) کا استعمال کر سکتا ہے اور اس میں ضروری طور پر 1 اور 15 حروف کی شمولیت ہونی چاہیے۔</translation> <translation id="5043913660911154449">یا اپنے پرنٹر PPD کی وضاحت کریں <ph name="LINK_BEGIN" />مزید جانیں<ph name="LINK_END" /></translation> <translation id="5045550434625856497">غلط پاس ورڈ</translation> @@ -5377,6 +5382,7 @@ <translation id="6393156038355142111">مضبوط پاس ورڈ تجویز کریں</translation> <translation id="6393550101331051049">غیر محفوظ مواد دکھانے کی اجازت ہے</translation> <translation id="6395423953133416962"><ph name="BEGIN_LINK1" />سسٹم کی معلومات<ph name="END_LINK1" /> اور <ph name="BEGIN_LINK2" />میٹرکس<ph name="END_LINK2" /> بھیجیں۔</translation> +<translation id="6396175271241405634">سسٹم ایپ</translation> <translation id="6396988158856674517">سائٹس کو موشن سینسرز استعمال کرنے سے مسدود کریں</translation> <translation id="6398715114293939307">Google Play اسٹور ہٹائیں</translation> <translation id="6398765197997659313">پوری سکرین سے خارج ہوں</translation> @@ -5446,6 +5452,7 @@ <translation id="6460566145397380451">MIDI آلات سے منسلک ہونے کی اجازت ہے</translation> <translation id="6460601847208524483">اگلا تلاش کریں</translation> <translation id="6461170143930046705">نیٹ ورکس تلاش کیے جا رہے ہیں...</translation> +<translation id="6462204616987156669">کسی ٹیب پر دائیں طرف کلک کریں اور "نئے گروپ میں ٹیب شامل کریں" منتخب کریں</translation> <translation id="6463795194797719782">&ترمیم کریں</translation> <translation id="6464825623202322042">یہ آلہ</translation> <translation id="6465841119675156448">انٹرنیٹ کے بغیر</translation> @@ -5863,6 +5870,7 @@ <translation id="6885771755599377173">سسٹم کی معلومات کا پیش منظر</translation> <translation id="6886871292305414135">لنک کو نئے &ٹیب میں کھولیں</translation> <translation id="6889957081990109136">سوئچ ابھی تک تفویض نہیں کیا گیا ہے</translation> +<translation id="689007770043972343">دیگر کھلے ٹیبز کو اپنے گروپ میں گھسیٹنے کی کوشش کریں</translation> <translation id="6892812721183419409">لنک کو <ph name="USER" /> کے بطور کھولیں</translation> <translation id="6895032998810961280">اس صفائی کے دوران اپنے کمپیوٹر پر ملنے والے نقصان دہ سافٹ ویئر، سسٹم کی ترتیبات اور کارروائیوں کی تفصیلات کے بارے میں Google کو مطلع کریں</translation> <translation id="6895902329218596456"><ph name="USER_EMAIL" /> <ph name="MANAGER" /> کے زیر انتظام ہے اور آپ کے منتظم نے ثانوی اکاؤنٹ کے بطور سائن ان کو مسدود کر دیا ہے</translation> @@ -6440,6 +6448,7 @@ <translation id="7491963308094506985">{NUM_COOKIES,plural, =1{1 کوکی}other{{NUM_COOKIES} کوکیز}}</translation> <translation id="7493386493263658176"><ph name="EXTENSION_NAME" /> ایکسٹینشن آپ کے ٹائپ کردہ سبھی متن، بشمول ذاتی ڈیٹا مثلاً پاس ورڈز اور کریڈٹ کارڈ نمبرز کو اکٹھا کر سکتا ہے۔ کیا آپ اس ایکسٹینشن کو استعمال کرنا چاہتے ہیں؟</translation> <translation id="7494694779888133066"><ph name="WIDTH" /> x <ph name="HEIGHT" /></translation> +<translation id="7495149565104413027">Android ایپ</translation> <translation id="7495778526395737099">اپنا پرانا پاس ورڈ بھول گئے؟</translation> <translation id="7497981768003291373">آپ کے پاس حالیہ کیپچر کردہ کوئی WebRTC ٹیکسٹ لاگ نہیں ہے۔</translation> <translation id="7501957181231305652">یا</translation>
diff --git a/chrome/app/resources/generated_resources_zh-HK.xtb b/chrome/app/resources/generated_resources_zh-HK.xtb index 98a7b18..3d0e23ab 100644 --- a/chrome/app/resources/generated_resources_zh-HK.xtb +++ b/chrome/app/resources/generated_resources_zh-HK.xtb
@@ -1251,6 +1251,7 @@ <translation id="2203088913459920044">名稱可以使用字母、數字和特殊字元</translation> <translation id="220321590587754225">無法連接。請再試一次。</translation> <translation id="2204034823255629767">讀取及變更您輸入的任何設定</translation> +<translation id="2207115382329026341">透過手機啟用應用程式串流設定。</translation> <translation id="220858061631308971">請在「<ph name="DEVICE_NAME" />」上輸入以下 PIN:</translation> <translation id="2210462644007531147">無法完成安裝</translation> <translation id="2212565012507486665">允許 Cookie</translation> @@ -1444,6 +1445,7 @@ <translation id="2367972762794486313">顯示應用程式</translation> <translation id="236939127352773362">當附近的裝置正在分享內容時</translation> <translation id="2371076942591664043">完成後開啟(&D)</translation> +<translation id="237307274687369010">無法啟動 <ph name="APP_NAME" /></translation> <translation id="2373666622366160481">依紙張大小自動調整</translation> <translation id="2375406435414127095">連線至您的手機</translation> <translation id="2377588536920405462">關閉裝置的主要位置資訊設定,即可關閉定位服務。您也可以在位置資訊設定中關閉使用 Wi‑Fi、流動網絡和感應器確定位置的功能。</translation>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 0347d90..fe279c3 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -7259,6 +7259,10 @@ flag_descriptions::kDefaultChromeAppsMigrationName, flag_descriptions::kDefaultChromeAppsMigrationDescription, kOsCrOS, FEATURE_VALUE_TYPE(policy::features::kDefaultChromeAppsMigration)}, + + {"messages-preinstall", flag_descriptions::kMessagesPreinstallName, + flag_descriptions::kMessagesPreinstallDescription, kOsCrOS, + FEATURE_VALUE_TYPE(web_app::kMessagesPreinstall)}, #endif // BUILDFLAG(IS_CHROMEOS) #if defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm index 0c203356..12d96f40 100644 --- a/chrome/browser/app_controller_mac.mm +++ b/chrome/browser/app_controller_mac.mm
@@ -42,7 +42,6 @@ #include "chrome/browser/download/download_core_service.h" #include "chrome/browser/download/download_core_service_factory.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/first_run/first_run.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/lifetime/browser_shutdown.h" #include "chrome/browser/mac/auth_session_request.h" @@ -85,7 +84,6 @@ #include "chrome/browser/ui/extensions/application_launch.h" #include "chrome/browser/ui/profile_picker.h" #include "chrome/browser/ui/startup/startup_browser_creator.h" -#include "chrome/browser/ui/startup/startup_browser_creator_impl.h" #include "chrome/browser/ui/startup/startup_tab.h" #include "chrome/browser/ui/startup/startup_types.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" @@ -159,10 +157,6 @@ return g_pending_requests; } -// Open the urls in the last used browser from a regular profile. -void OpenUrlsInBrowserWithProfile(const std::vector<GURL>& urls, - Profile* profile); - // Starts a web authentication session request. void BeginHandlingWebAuthenticationSessionRequestWithProfile( ASWebAuthenticationSessionRequest* request, @@ -347,13 +341,6 @@ return profile_path_info.path; } -// Open the urls in the last used browser. Loads the profile asynchronously if -// needed. -void OpenUrlsInBrowser(const std::vector<GURL>& urls) { - RunInSafeProfileHelper::Run( - base::BindOnce(&OpenUrlsInBrowserWithProfile, urls)); -} - } // namespace // Returns the last profile. This is extracted as a standalone function in order @@ -897,9 +884,6 @@ _startupUrls.insert(_startupUrls.end(), urls.begin(), urls.end()); return; } - - StartupBrowserCreator::MaybeHandleProfileAgnosticUrls( - urls, base::BindOnce(&OpenUrlsInBrowser, urls)); } // This is called after profiles have been loaded and preferences registered. @@ -2076,46 +2060,6 @@ } } -void OpenUrlsInBrowserWithProfile(const std::vector<GURL>& urls, - Profile* profile) { - if (!profile) - return; // No suitable profile to open the URLs, do nothing. - Browser* browser = chrome::FindLastActiveWithProfile(profile); - int startupIndex = TabStripModel::kNoTab; - content::WebContents* startupContent = nullptr; - if (browser && browser->tab_strip_model()->count() == 1) { - // If there's only 1 tab and the tab is NTP, close this NTP tab and open all - // startup urls in new tabs, because the omnibox will stay focused if we - // load url in NTP tab. - startupIndex = browser->tab_strip_model()->active_index(); - startupContent = browser->tab_strip_model()->GetActiveWebContents(); - } else if (!browser) { - // if no browser window exists then create one with no tabs to be filled in. - browser = Browser::Create(Browser::CreateParams(profile, true)); - browser->window()->Show(); - } - - // Various methods to open URLs that we get in a native fashion. We use - // StartupBrowserCreator here because on the other platforms, URLs to open - // come through the ProcessSingleton, and it calls StartupBrowserCreator. It's - // best to bottleneck the openings through that for uniform handling. - base::CommandLine dummy(base::CommandLine::NO_PROGRAM); - chrome::startup::IsFirstRun first_run = - first_run::IsChromeFirstRun() ? chrome::startup::IsFirstRun::kYes - : chrome::startup::IsFirstRun::kNo; - StartupBrowserCreatorImpl launch(base::FilePath(), dummy, first_run); - launch.OpenURLsInBrowser(browser, chrome::startup::IsProcessStartup::kNo, - urls); - - // This NTP check should be replaced once https://crbug.com/624410 is fixed. - if (startupIndex != TabStripModel::kNoTab && - (startupContent->GetVisibleURL() == chrome::kChromeUINewTabURL || - startupContent->GetVisibleURL() == chrome::kChromeUINewTabPageURL)) { - browser->tab_strip_model()->CloseWebContentsAt(startupIndex, - TabStripModel::CLOSE_NONE); - } -} - } // namespace namespace app_controller_mac {
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm index 35fc483..88fdabb 100644 --- a/chrome/browser/app_controller_mac_browsertest.mm +++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -51,14 +51,9 @@ #include "chrome/browser/ui/cocoa/test/run_loop_testing.h" #include "chrome/browser/ui/profile_picker.h" #include "chrome/browser/ui/search/ntp_test_utils.h" -#include "chrome/browser/ui/startup/web_app_url_handling_startup_test_utils.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/browser/ui/ui_features.h" -#include "chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h" -#include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/browser/ui/webui/welcome/helpers.h" -#include "chrome/browser/web_applications/os_integration/url_handler_manager_impl.h" -#include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_features.h" #include "chrome/common/chrome_switches.h" @@ -70,13 +65,11 @@ #include "components/bookmarks/browser/bookmark_model.h" #include "components/bookmarks/test/bookmark_test_helpers.h" #include "components/prefs/pref_service.h" -#include "components/services/app_service/public/cpp/url_handler_info.h" #include "content/public/browser/navigation_controller.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 "content/public/test/test_utils.h" #include "extensions/browser/app_window/app_window_registry.h" #include "extensions/browser/extension_dialog_auto_confirm.h" #include "extensions/common/extension.h" @@ -89,7 +82,6 @@ #include "ui/views/widget/widget.h" using base::SysUTF16ToNSString; -using web_app::StartupBrowserWebAppUrlHandlingTest; @interface AppController (ForTesting) - (void)getUrl:(NSAppleEventDescriptor*)event @@ -189,20 +181,6 @@ base::RunLoop run_loop_; }; -// Check that there are two browsers. Find the one that is not |browser|. -Browser* FindOneOtherBrowser(Browser* browser) { - // There should only be one other browser. - EXPECT_EQ(2u, chrome::GetBrowserCount(browser->profile())); - - // Find the new browser. - Browser* other_browser = nullptr; - for (auto* b : *BrowserList::GetInstance()) { - if (b != browser) - other_browser = b; - } - return other_browser; -} - } // namespace @interface TestOpenShortcutOnStartup : NSObject @@ -1068,335 +1046,6 @@ EXPECT_EQ(profile, new_browser->profile()->GetOriginalProfile()); } -// URL Handling tests. -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogCancelled_NoLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Start URL is in app scope. - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - - // The waiter will get the dialog when it shows up and close it. - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - - // When dialog is closed, nothing will happen. - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_BrowserLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the first choice, which is the browser. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 0); - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - TabStripModel* tab_strip = browser()->tab_strip_model(); - ASSERT_EQ(2, tab_strip->count()); - // Check the link of the new tab that was opened. - content::WebContents* web_contents = tab_strip->GetWebContentsAt(1); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_RememberBrowserLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - base::HistogramTester histogram_tester; - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Get matches before dialog launch. - auto url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(GURL(start_url)); - - // Select and remember the first choice, which is the browser. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_REMEMBER_OPTION, 0); - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kBrowserAcceptedAndRememberChoice, - 1); - - // When dialog is closed, URL will be launched in a browser tab. - // Check for new tab. - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - TabStripModel* tab_strip = browser()->tab_strip_model(); - ASSERT_EQ(2, tab_strip->count()); - // Check the link of the new tab that was opened. - content::WebContents* web_contents = tab_strip->GetWebContentsAt(1); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); - - // Get matches after dialog is closed. - auto new_url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(GURL(start_url)); - ASSERT_NE(url_handler_matches, new_url_handler_matches); - // Verify opening in browser is saved as the default choice (i.e. no matches - // found). - ASSERT_TRUE(new_url_handler_matches.empty()); - - // Start with the same URL again. A new tab should be opened directly. - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - // Verify a new tab is launched. - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - tab_strip = browser()->tab_strip_model(); - ASSERT_EQ(3, tab_strip->count()); - // Check the link of the new tab that was opened. - web_contents = tab_strip->GetWebContentsAt(2); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); - - // Dialog wasn't shown, the total count of dialog state stays the same. - histogram_tester.ExpectTotalCount("WebApp.UrlHandling.DialogState", 1); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_RememberWebAppLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - base::HistogramTester histogram_tester; - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Get matches before dialog launch. - auto url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(GURL(start_url)); - - // Select and remember the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_REMEMBER_OPTION, 1); - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kAppAcceptedAndRememberChoice, - 1); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); - - // Get matches after dialog is closed. - auto new_url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(GURL(start_url)); - ASSERT_NE(url_handler_matches, new_url_handler_matches); - - // Close the app window and start with the same URL again. App should be - // launched directly. - CloseBrowserSynchronously(app_browser); - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - ui_test_utils::WaitForBrowserToOpen(); - // Verify app window is launched. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - // Dialog wasn't shown, the total count of dialog state stays the same. - histogram_tester.ExpectTotalCount("WebApp.UrlHandling.DialogState", 1); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_WebAppLaunch_InScopeUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 1); - // start_url is in app scope. - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_WebAppLaunch_DifferentOriginUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL("https://example.com")); - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 1); - - // URL is not in app scope but matches url_handlers of installed app. - GURL target_url = GURL("https://example.com/abc/def"); - ASSERT_TRUE(target_url.is_valid()); - SendAppleEventToOpenUrlToAppController(target_url); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - // Out-of-scope URL launch should open new app window and navigate to the - // out-of-scope URL. - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(target_url, web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F( - StartupBrowserWebAppUrlHandlingTest, - MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - // Create profiles and install URL Handling apps. - ProfileManager* profile_manager = g_browser_process->profile_manager(); - base::FilePath dest_path = profile_manager->user_data_dir(); - Profile* profile1 = nullptr; - Profile* profile2 = nullptr; - { - base::ScopedAllowBlockingForTesting allow_blocking; - profile1 = profile_manager->GetProfile( - dest_path.Append(FILE_PATH_LITERAL("New Profile 1"))); - ASSERT_TRUE(profile1); - - profile2 = profile_manager->GetProfile( - dest_path.Append(FILE_PATH_LITERAL("New Profile 2"))); - ASSERT_TRUE(profile2); - } - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id_1 = web_app::test::InstallWebAppWithUrlHandlers( - profile1, GURL(start_url), app_name, {url_handler}); - web_app::AppId app_id_2 = web_app::test::InstallWebAppWithUrlHandlers( - profile2, GURL(start_url), app_name, {url_handler}); - - // Test that we should be able to select the 3rd option. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 2); - // start_url is in app scope for both apps. - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // There should be one app window. No deterministic ordering of apps, so find - // which profile app is launched. - ASSERT_EQ(1u, chrome::GetBrowserCount(profile1) + - chrome::GetBrowserCount(profile2)); - Profile* app_profile = - (chrome::GetBrowserCount(profile1) == 1) ? profile1 : profile2; - Browser* app_browser = chrome::FindBrowserWithProfile(app_profile); - ASSERT_TRUE(app_browser); - ASSERT_TRUE( - web_app::AppBrowserController::IsForWebApp(app_browser, app_id_1) || - web_app::AppBrowserController::IsForWebApp(app_browser, app_id_2)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - CheckHistogramsFired) { - base::HistogramTester histogram_tester; - - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - SendAppleEventToOpenUrlToAppController(GURL(start_url)); - - // The waiter will get the dialog when it shows up and close it. - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - - histogram_tester.ExpectTotalCount( - "WebApp.UrlHandling.GetValidProfilesAtStartUp", 1); - histogram_tester.ExpectTotalCount( - "WebApp.UrlHandling.LoadWebAppRegistrarsAtStartUp", 1); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState::kClosed, 1); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, UrlNotCaptured) { - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL("https://example.com")); - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // This URL is not in scope of installed app and does not match url_handlers. - SendAppleEventToOpenUrlToAppController( - GURL("https://en.example.com/abc/def")); - - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - TabStripModel* tab_strip = browser()->tab_strip_model(); - ASSERT_EQ(2, tab_strip->count()); - // Check the link of the new tab that was opened. - content::WebContents* web_contents = tab_strip->GetWebContentsAt(1); - EXPECT_EQ(GURL("https://en.example.com/abc/def"), - web_contents->GetVisibleURL()); -} - class AppControllerIncognitoSwitchTest : public InProcessBrowserTest { public: void SetUpCommandLine(base::CommandLine* command_line) override {
diff --git a/chrome/browser/apps/app_service/app_service_proxy_lacros.cc b/chrome/browser/apps/app_service/app_service_proxy_lacros.cc index 1e2f02d..795132a 100644 --- a/chrome/browser/apps/app_service/app_service_proxy_lacros.cc +++ b/chrome/browser/apps/app_service/app_service_proxy_lacros.cc
@@ -85,10 +85,8 @@ std::move(callback).Run(std::make_unique<IconValue>()); } else { service->GetRemote<crosapi::mojom::AppServiceProxy>()->LoadIcon( - app_id, - std::make_unique<IconKey>(icon_key.timeline, icon_key.resource_id, - icon_key.icon_effects), - icon_type, size_hint_in_dip, std::move(callback)); + app_id, icon_key.Clone(), icon_type, size_hint_in_dip, + std::move(callback)); } return nullptr; }
diff --git a/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc b/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc index 195510f..812c15cd 100644 --- a/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc +++ b/chrome/browser/apps/app_service/browser_app_instance_tracker_browsertest.cc
@@ -20,6 +20,7 @@ #include "chrome/browser/web_applications/test/web_app_install_test_utils.h" #include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/browser/web_applications/web_app_id.h" +#include "chrome/browser/web_applications/web_app_id_constants.h" #include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/chrome_switches.h" @@ -721,8 +722,6 @@ web_app::WebAppProvider::GetForSystemWebApps(profile) ->system_web_app_manager() .InstallSystemAppsForTesting(); - std::string app_id = web_app::GenerateAppId( - absl::nullopt, GURL(chrome::kChromeUIUntrustedCroshURL)); Browser* browser = nullptr; aura::Window* window = nullptr; @@ -732,7 +731,7 @@ Recorder recorder(*tracker_); // Open an app window (crosh) and insert a tab. - browser = CreateAppBrowser(app_id); + browser = CreateAppBrowser(web_app::kCroshAppId); chrome::NewTab(browser); content::WebContents* tab = browser->tab_strip_model()->GetWebContentsAt(0); NavigateActiveTab(browser, chrome::kChromeUIUntrustedCroshURL); @@ -745,8 +744,10 @@ EXPECT_EQ(GetId(tab), 1u); window = browser->window()->GetNativeWindow(); recorder.Verify({ - {"added", 1, kAppWindow, app_id, window, "", kActive, kActive}, - {"updated", 1, kAppWindow, app_id, window, "crosh1", kActive, kActive}, + {"added", 1, kAppWindow, web_app::kCroshAppId, window, "", kActive, + kActive}, + {"updated", 1, kAppWindow, web_app::kCroshAppId, window, "crosh1", + kActive, kActive}, }); } @@ -764,8 +765,10 @@ // Only title of the existing app instance should be updated. EXPECT_EQ(GetId(tab), 1u); recorder.Verify({ - {"updated", 1, kAppWindow, app_id, window, "", kActive, kActive}, - {"updated", 1, kAppWindow, app_id, window, "crosh2", kActive, kActive}, + {"updated", 1, kAppWindow, web_app::kCroshAppId, window, "", kActive, + kActive}, + {"updated", 1, kAppWindow, web_app::kCroshAppId, window, "crosh2", + kActive, kActive}, }); } @@ -777,7 +780,8 @@ // The app instance disappars with the window. recorder.Verify({ - {"removed", 1, kAppWindow, app_id, window, "crosh2", kActive, kActive}, + {"removed", 1, kAppWindow, web_app::kCroshAppId, window, "crosh2", + kActive, kActive}, }); } }
diff --git a/chrome/browser/apps/app_service/publishers/standalone_browser_extension_apps.cc b/chrome/browser/apps/app_service/publishers/standalone_browser_extension_apps.cc index dd40280..573e0e2a 100644 --- a/chrome/browser/apps/app_service/publishers/standalone_browser_extension_apps.cc +++ b/chrome/browser/apps/app_service/publishers/standalone_browser_extension_apps.cc
@@ -72,8 +72,7 @@ } IconType crosapi_icon_type = icon_type; - IconKeyPtr crosapi_icon_key = std::make_unique<IconKey>( - icon_key.timeline, icon_key.resource_id, icon_key.icon_effects); + IconKeyPtr crosapi_icon_key = icon_key.Clone(); if (crosapi_icon_type == apps::IconType::kCompressed) { // If the request is for a compressed icon, modify request so that // uncompressed icon is sent over crosapi.
diff --git a/chrome/browser/apps/app_service/publishers/web_apps_crosapi.cc b/chrome/browser/apps/app_service/publishers/web_apps_crosapi.cc index 5fc4f75..36228e7d 100644 --- a/chrome/browser/apps/app_service/publishers/web_apps_crosapi.cc +++ b/chrome/browser/apps/app_service/publishers/web_apps_crosapi.cc
@@ -75,8 +75,7 @@ const uint32_t icon_effects = icon_key.icon_effects; IconType crosapi_icon_type = icon_type; - IconKeyPtr crosapi_icon_key = std::make_unique<IconKey>( - icon_key.timeline, icon_key.resource_id, icon_key.icon_effects); + IconKeyPtr crosapi_icon_key = icon_key.Clone(); if (crosapi_icon_type == apps::IconType::kCompressed) { // The effects are applied here in Ash. crosapi_icon_type = apps::IconType::kUncompressed; @@ -214,8 +213,7 @@ &display_mode](const apps::AppUpdate& update) { is_system_web_app = update.InstallReason() == apps::mojom::InstallReason::kSystem; - can_use_uninstall = - update.AllowUninstall() == apps::mojom::OptionalBool::kTrue; + can_use_uninstall = update.AllowUninstall().value_or(false); display_mode = update.WindowMode(); });
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.cc b/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.cc index 82f82fc..7dc78d1 100644 --- a/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.cc +++ b/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.cc
@@ -24,12 +24,6 @@ : RebootNotificationsScheduler(base::DefaultClock::GetInstance(), base::DefaultTickClock::GetInstance()) {} -RebootNotificationsScheduler::RebootNotificationsScheduler( - const base::Clock* clock, - const base::TickClock* tick_clock) - : notification_timer_(clock, tick_clock), - dialog_timer_(clock, tick_clock) {} - RebootNotificationsScheduler::~RebootNotificationsScheduler() = default; void RebootNotificationsScheduler::ScheduleNotifications( @@ -82,6 +76,17 @@ return ((delay + GetSystemUptime()) <= kGraceTime); } +RebootNotificationsScheduler::RebootNotificationsScheduler( + const base::Clock* clock, + const base::TickClock* tick_clock) + : notification_timer_(clock, tick_clock), + dialog_timer_(clock, tick_clock) {} + +void RebootNotificationsScheduler::OnRebootButtonClicked() { + DCHECK(reboot_callback_); + std::move(reboot_callback_).Run(); +} + void RebootNotificationsScheduler::MaybeShowNotification() { notification_controller_.MaybeShowPendingRebootNotification( reboot_time_, @@ -96,11 +101,6 @@ base::Unretained(this))); } -void RebootNotificationsScheduler::OnRebootButtonClicked() { - DCHECK(reboot_callback_); - std::move(reboot_callback_).Run(); -} - const base::Time RebootNotificationsScheduler::GetCurrentTime() const { return base::Time::Now(); }
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h b/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h index f9d90f1..a514fc92 100644 --- a/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h +++ b/chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h
@@ -23,7 +23,7 @@ RebootNotificationsScheduler(const RebootNotificationsScheduler&) = delete; RebootNotificationsScheduler& operator=(const RebootNotificationsScheduler&) = delete; - ~RebootNotificationsScheduler(); + virtual ~RebootNotificationsScheduler(); // Schedules timers for showing notification and dialog or shows them right // away if the scheduled reboot time is soon. Notifications are not shown when @@ -44,14 +44,14 @@ RebootNotificationsScheduler(const base::Clock* clock, const base::TickClock* tick_clock); - private: - virtual void MaybeShowNotification(); - virtual void MaybeShowDialog(); - // Runs |reboot_callback_| when user clicks on "Reboot now" button of the // dialog or notification. void OnRebootButtonClicked(); + private: + virtual void MaybeShowNotification(); + virtual void MaybeShowDialog(); + // Returns current time. virtual const base::Time GetCurrentTime() const;
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.cc b/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.cc new file mode 100644 index 0000000..1deb53c --- /dev/null +++ b/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.cc
@@ -0,0 +1,60 @@ +// Copyright 2022 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/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h" + +#include <memory> + +#include "base/time/clock.h" +#include "base/time/time.h" +#include "third_party/icu/source/i18n/unicode/timezone.h" + +namespace policy { + +FakeRebootNotificationsScheduler::FakeRebootNotificationsScheduler( + const base::Clock* clock, + const base::TickClock* tick_clock, + std::unique_ptr<icu::TimeZone> time_zone) + : RebootNotificationsScheduler(clock, tick_clock), + clock_(clock), + time_zone_(std::move(time_zone)), + uptime_(base::Hours(10)) {} + +FakeRebootNotificationsScheduler::~FakeRebootNotificationsScheduler() = default; + +int FakeRebootNotificationsScheduler::GetShowDialogCalls() const { + return show_dialog_calls_; +} +int FakeRebootNotificationsScheduler::GetShowNotificationCalls() const { + return show_notification_calls_; +} +void FakeRebootNotificationsScheduler::SetUptime(base::TimeDelta uptime) { + uptime_ = uptime; +} + +void FakeRebootNotificationsScheduler::SimulateRebootButtonClick() { + OnRebootButtonClicked(); +} + +void FakeRebootNotificationsScheduler::MaybeShowNotification() { + ++show_notification_calls_; +} + +void FakeRebootNotificationsScheduler::MaybeShowDialog() { + ++show_dialog_calls_; +} + +const base::Time FakeRebootNotificationsScheduler::GetCurrentTime() const { + return clock_->Now(); +} + +const icu::TimeZone& FakeRebootNotificationsScheduler::GetTimeZone() const { + return *time_zone_; +} + +const base::TimeDelta FakeRebootNotificationsScheduler::GetSystemUptime() + const { + return uptime_; +} +} // namespace policy
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h b/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h new file mode 100644 index 0000000..3b34c1a --- /dev/null +++ b/chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h
@@ -0,0 +1,54 @@ +// Copyright 2022 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_ASH_POLICY_SCHEDULED_TASK_HANDLER_TEST_FAKE_REBOOT_NOTIFICATIONS_SCHEDULER_H_ +#define CHROME_BROWSER_ASH_POLICY_SCHEDULED_TASK_HANDLER_TEST_FAKE_REBOOT_NOTIFICATIONS_SCHEDULER_H_ + +#include "chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h" + +#include <memory> + +#include "base/time/clock.h" +#include "base/time/time.h" +#include "third_party/icu/source/i18n/unicode/timezone.h" + +namespace policy { + +class FakeRebootNotificationsScheduler : public RebootNotificationsScheduler { + public: + FakeRebootNotificationsScheduler(const base::Clock* clock, + const base::TickClock* tick_clock, + std::unique_ptr<icu::TimeZone> time_zone); + FakeRebootNotificationsScheduler(const FakeRebootNotificationsScheduler&) = + delete; + FakeRebootNotificationsScheduler& operator=( + const FakeRebootNotificationsScheduler&) = delete; + ~FakeRebootNotificationsScheduler() override; + + int GetShowDialogCalls() const; + int GetShowNotificationCalls() const; + void SetUptime(base::TimeDelta uptime); + void SimulateRebootButtonClick(); + + private: + void MaybeShowNotification() override; + + void MaybeShowDialog() override; + + const base::Time GetCurrentTime() const override; + + const icu::TimeZone& GetTimeZone() const override; + + const base::TimeDelta GetSystemUptime() const override; + + int show_dialog_calls_ = 0, show_notification_calls_ = 0; + const base::Clock* clock_; + std::unique_ptr<icu::TimeZone> time_zone_; + // Default uptime for test is 10h. + base::TimeDelta uptime_; +}; + +} // namespace policy + +#endif // CHROME_BROWSER_ASH_POLICY_SCHEDULED_TASK_HANDLER_TEST_FAKE_REBOOT_NOTIFICATIONS_SCHEDULER_H_
diff --git a/chrome/browser/ash/policy/scheduled_task_handler/test/reboot_notifications_scheduler_unittest.cc b/chrome/browser/ash/policy/scheduled_task_handler/test/reboot_notifications_scheduler_unittest.cc index ec25b9a..a9d8b6f0 100644 --- a/chrome/browser/ash/policy/scheduled_task_handler/test/reboot_notifications_scheduler_unittest.cc +++ b/chrome/browser/ash/policy/scheduled_task_handler/test/reboot_notifications_scheduler_unittest.cc
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/ash/policy/scheduled_task_handler/reboot_notifications_scheduler.h" - #include <memory> #include <string> @@ -12,63 +10,25 @@ #include "base/time/clock.h" #include "base/time/time.h" #include "base/values.h" +#include "chrome/browser/ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/icu/source/i18n/unicode/timezone.h" namespace policy { - namespace { // Time zone that will be used in tests. constexpr char kUTCTimezone[] = "UTC"; } // namespace -class RebootNotificationsSchedulerForTest - : public RebootNotificationsScheduler { - public: - RebootNotificationsSchedulerForTest(const base::Clock* clock, - const base::TickClock* tick_clock) - : RebootNotificationsScheduler(clock, tick_clock), - clock_(clock), - uptime_(base::Hours(10)) { - time_zone_ = base::WrapUnique(icu::TimeZone::createTimeZone( - icu::UnicodeString::fromUTF8(kUTCTimezone))); - } - - RebootNotificationsSchedulerForTest( - const RebootNotificationsSchedulerForTest&) = delete; - RebootNotificationsSchedulerForTest& operator=( - const RebootNotificationsSchedulerForTest&) = delete; - - ~RebootNotificationsSchedulerForTest() = default; - - int GetShowDialogCalls() const { return show_dialog_calls_; } - int GetShowNotificationCalls() const { return show_notification_calls_; } - void SetUptime(base::TimeDelta uptime) { uptime_ = uptime; } - - private: - void MaybeShowNotification() override { ++show_notification_calls_; } - - void MaybeShowDialog() override { ++show_dialog_calls_; } - - const base::Time GetCurrentTime() const override { return clock_->Now(); } - - const icu::TimeZone& GetTimeZone() const override { return *time_zone_; } - - const base::TimeDelta GetSystemUptime() const override { return uptime_; } - - int show_dialog_calls_ = 0, show_notification_calls_ = 0; - const base::Clock* clock_; - std::unique_ptr<icu::TimeZone> time_zone_; - // Default uptime for test is 10h. - base::TimeDelta uptime_; -}; - class RebootNotificationsSchedulerTest : public testing::Test { public: RebootNotificationsSchedulerTest() : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME), - notifications_scheduler_(task_environment_.GetMockClock(), - task_environment_.GetMockTickClock()) {} + notifications_scheduler_( + task_environment_.GetMockClock(), + task_environment_.GetMockTickClock(), + base::WrapUnique(icu::TimeZone::createTimeZone( + icu::UnicodeString::fromUTF8(kUTCTimezone)))) {} ~RebootNotificationsSchedulerTest() override = default; @@ -86,7 +46,7 @@ protected: base::test::TaskEnvironment task_environment_; - RebootNotificationsSchedulerForTest notifications_scheduler_; + FakeRebootNotificationsScheduler notifications_scheduler_; }; TEST_F(RebootNotificationsSchedulerTest, ApplyingGraceTime) {
diff --git a/chrome/browser/ash/web_applications/file_manager_web_app_info.cc b/chrome/browser/ash/web_applications/file_manager_web_app_info.cc index 9e21d16c..655c1ae 100644 --- a/chrome/browser/ash/web_applications/file_manager_web_app_info.cc +++ b/chrome/browser/ash/web_applications/file_manager_web_app_info.cc
@@ -70,9 +70,9 @@ auto* color_provider = ash::AshColorProvider::Get(); info->theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/false); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/false); info->dark_mode_theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/true); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/true); info->background_color = info->theme_color; info->dark_mode_background_color = info->dark_mode_theme_color; info->display_mode = blink::mojom::DisplayMode::kStandalone;
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc index 8e4290b..bb68979e 100644 --- a/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc +++ b/chrome/browser/ash/web_applications/help_app/help_app_web_app_info.cc
@@ -44,9 +44,9 @@ if (chromeos::features::IsDarkLightModeEnabled()) { auto* color_provider = ash::AshColorProvider::Get(); info->theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/false); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/false); info->dark_mode_theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/true); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/true); info->background_color = info->theme_color; info->dark_mode_background_color = info->dark_mode_theme_color; } else {
diff --git a/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc b/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc index 3fbf7ff1..256160f6 100644 --- a/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc +++ b/chrome/browser/ash/web_applications/media_app/media_web_app_info.cc
@@ -141,9 +141,9 @@ if (chromeos::features::IsDarkLightModeEnabled()) { auto* color_provider = ash::AshColorProvider::Get(); info->theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/false); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/false); info->dark_mode_theme_color = - color_provider->GetBackgroundColorInMode(/*use_dark_mode=*/true); + color_provider->GetBackgroundColorInMode(/*use_dark_color=*/true); info->background_color = info->theme_color; info->dark_mode_background_color = info->dark_mode_theme_color; } else {
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 0e5e2f8..4b3d16095 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -4552,6 +4552,8 @@ "../ash/policy/rsu/lookup_key_uploader_unittest.cc", "../ash/policy/scheduled_task_handler/test/device_scheduled_reboot_handler_unittest.cc", "../ash/policy/scheduled_task_handler/test/device_scheduled_update_checker_unittest.cc", + "../ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.cc", + "../ash/policy/scheduled_task_handler/test/fake_reboot_notifications_scheduler.h", "../ash/policy/scheduled_task_handler/test/fake_scheduled_task_executor.cc", "../ash/policy/scheduled_task_handler/test/fake_scheduled_task_executor.h", "../ash/policy/scheduled_task_handler/test/reboot_notifications_scheduler_unittest.cc",
diff --git a/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc b/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc index 0b04e42..e379a37 100644 --- a/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc +++ b/chrome/browser/devtools/protocol/devtools_protocol_browsertest.cc
@@ -554,6 +554,25 @@ EXPECT_EQ(static_cast<int>(manager->infobar_count()), 0); } +IN_PROC_BROWSER_TEST_F(DevToolsProtocolTest, + AutomationOverrideAddsOneInfoBarOnly) { + Attach(); + auto* manager = infobars::ContentInfoBarManager::FromWebContents( + browser()->tab_strip_model()->GetActiveWebContents()); + { + base::Value params(base::Value::Type::DICTIONARY); + params.SetBoolKey("enabled", true); + SendCommandSync("Emulation.setAutomationOverride", std::move(params)); + } + EXPECT_EQ(static_cast<int>(manager->infobar_count()), 1); + { + base::Value params(base::Value::Type::DICTIONARY); + params.SetBoolKey("enabled", true); + SendCommandSync("Emulation.setAutomationOverride", std::move(params)); + } + EXPECT_EQ(static_cast<int>(manager->infobar_count()), 1); +} + class NetworkResponseProtocolTest : public DevToolsProtocolTest { protected: base::Value FetchAndWaitForResponse(const GURL& url) {
diff --git a/chrome/browser/devtools/protocol/emulation_handler.cc b/chrome/browser/devtools/protocol/emulation_handler.cc index 7ad2201..ab466b05 100644 --- a/chrome/browser/devtools/protocol/emulation_handler.cc +++ b/chrome/browser/devtools/protocol/emulation_handler.cc
@@ -20,6 +20,10 @@ } protocol::Response EmulationHandler::SetAutomationOverride(bool enabled) { + // Fallthrough requests when the override is already enabled. + if (enabled && automation_info_bar_) + return protocol::Response::FallThrough(); + infobars::ContentInfoBarManager* info_bar_manager = nullptr; content::WebContents* web_contents = agent_host_->GetWebContents(); if (web_contents) {
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 98afbd66..a2ad13b 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -4102,6 +4102,11 @@ "expiry_milestone": 105 }, { + "name": "messages-preinstall", + "owners": [ "jonmann", "jshikaram" ], + "expiry_milestone": 106 + }, + { "name": "metal", "owners": [ "ccameron", "jvanverth" ], "expiry_milestone": 83
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index c544d1b2a..225e9a4 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -5505,6 +5505,10 @@ const char kLinkCapturingUiUpdateDescription[] = "Enables updated UI for link capturing flows from the browser to apps, " "including the intent picker and an in-app link capturing prompt."; + +const char kMessagesPreinstallName[] = "Preinstall Messages PWA"; +const char kMessagesPreinstallDescription[] = + "Enables preinstallation of the Messages for Web PWA for unmanaged users."; #endif // BUILDFLAG(IS_CHROMEOS) #if defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 95860a0..126e81fb 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -3175,6 +3175,9 @@ extern const char kLinkCapturingUiUpdateName[]; extern const char kLinkCapturingUiUpdateDescription[]; + +extern const char kMessagesPreinstallName[]; +extern const char kMessagesPreinstallDescription[]; #endif // BUILDFLAG(IS_CHROMEOS) #if defined(ARCH_CPU_X86_FAMILY) && BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/policy/policy_prefs_browsertest.cc b/chrome/browser/policy/policy_prefs_browsertest.cc index d25464d6..e8900b7 100644 --- a/chrome/browser/policy/policy_prefs_browsertest.cc +++ b/chrome/browser/policy/policy_prefs_browsertest.cc
@@ -114,13 +114,11 @@ // Verifies that policies make their corresponding preferences become managed, // and that the user can't override that setting. -// TODO(crbug.com/1294825) Flaky on ChromeOS. -#if BUILDFLAG(IS_CHROMEOS) -#define MAYBE_PolicyToPrefsMapping DISABLED_PolicyToPrefsMapping -#else -#define MAYBE_PolicyToPrefsMapping PolicyToPrefsMapping -#endif -IN_PROC_BROWSER_TEST_F(PolicyPrefsTest, MAYBE_PolicyToPrefsMapping) { +// README SHERIFFs: This test encapsulates a whole suite of individual browser +// tests for performance reasons and therefore has an increased chance of +// failure/flakiness. Please add hendrich@chromium.org on any related bugs when +// disabling this test. +IN_PROC_BROWSER_TEST_F(PolicyPrefsTest, PolicyToPrefsMapping) { #if !BUILDFLAG(IS_CHROMEOS_ASH) policy::FakeBrowserDMTokenStorage storage; policy::BrowserDMTokenStorage::SetForTesting(&storage);
diff --git a/chrome/browser/policy/test/system_features_policy_browsertest.cc b/chrome/browser/policy/test/system_features_policy_browsertest.cc index 639327c..a7b2468 100644 --- a/chrome/browser/policy/test/system_features_policy_browsertest.cc +++ b/chrome/browser/policy/test/system_features_policy_browsertest.cc
@@ -54,7 +54,8 @@ public: SystemFeaturesPolicyTest() { scoped_feature_list_.InitWithFeatures( - /*enabled_features=*/{chromeos::features::kEcheSWA}, + /*enabled_features=*/{chromeos::features::kEcheSWA, + chromeos::features::kCroshSWA}, /*disabled_features=*/{}); } @@ -336,52 +337,59 @@ system_features.Append(kScanningFeature); system_features.Append(kWebStoreFeature); system_features.Append(kCanvasFeature); + system_features.Append(kCroshFeature); UpdateSystemFeaturesDisableList(system_features.Clone(), kHiddenDisableMode); - VisibilityFlags camera_expected_visibility = - GetVisibilityFlags(true /* is_hidden */); - VisibilityFlags scanning_expected_visibility = - GetVisibilityFlags(true /* is_hidden */); - VisibilityFlags web_store_expected_visibility = - GetVisibilityFlags(true /* is_hidden */); - VisibilityFlags canvas_expected_visibility = + + VisibilityFlags expected_visibility = GetVisibilityFlags(true /* is_hidden */); VerifyAppState(web_app::kCameraAppId, apps::Readiness::kDisabledByPolicy, - true, camera_expected_visibility); + true, expected_visibility); VerifyAppState(web_app::kScanningAppId, apps::Readiness::kDisabledByPolicy, - true, scanning_expected_visibility); + true, expected_visibility); VerifyExtensionAppState(extensions::kWebStoreAppId, apps::Readiness::kDisabledByPolicy, true, - web_store_expected_visibility); + expected_visibility); VerifyAppState(web_app::kCanvasAppId, apps::Readiness::kDisabledByPolicy, - true, canvas_expected_visibility); + true, expected_visibility); + VerifyAppState(web_app::kCroshAppId, apps::Readiness::kDisabledByPolicy, true, + expected_visibility); + // Disable and block apps. - camera_expected_visibility = GetVisibilityFlags(false /* is_hidden */); - scanning_expected_visibility = GetVisibilityFlags(false /* is_hidden */); + expected_visibility = GetVisibilityFlags(false /* is_hidden */); // We never show scanning in the launcher. + VisibilityFlags scanning_expected_visibility = + GetVisibilityFlags(false /* is_hidden */); scanning_expected_visibility.show_in_launcher = apps::mojom::OptionalBool::kFalse; - web_store_expected_visibility = GetVisibilityFlags(false /* is_hidden */); - canvas_expected_visibility = GetVisibilityFlags(false /* is_hidden */); + // Crosh is never shown. + VisibilityFlags crosh_expected_visibility = + GetVisibilityFlags(true /* is_hidden */); UpdateSystemFeaturesDisableList(system_features.Clone(), kBlockedDisableMode); + VerifyAppState(web_app::kCameraAppId, apps::Readiness::kDisabledByPolicy, - true, camera_expected_visibility); + true, expected_visibility); VerifyAppState(web_app::kScanningAppId, apps::Readiness::kDisabledByPolicy, true, scanning_expected_visibility); VerifyExtensionAppState(extensions::kWebStoreAppId, apps::Readiness::kDisabledByPolicy, true, - web_store_expected_visibility); + expected_visibility); VerifyAppState(web_app::kCanvasAppId, apps::Readiness::kDisabledByPolicy, - true, canvas_expected_visibility); + true, expected_visibility); + VerifyAppState(web_app::kCroshAppId, apps::Readiness::kDisabledByPolicy, true, + crosh_expected_visibility); + // Enable apps. UpdateSystemFeaturesDisableList(base::Value(), nullptr); VerifyAppState(web_app::kCameraAppId, apps::Readiness::kReady, false, - camera_expected_visibility); + expected_visibility); VerifyAppState(web_app::kScanningAppId, apps::Readiness::kReady, false, scanning_expected_visibility); VerifyExtensionAppState(extensions::kWebStoreAppId, apps::Readiness::kReady, - false, web_store_expected_visibility); + false, expected_visibility); VerifyAppState(web_app::kCanvasAppId, apps::Readiness::kReady, false, - canvas_expected_visibility); + expected_visibility); + VerifyAppState(web_app::kCroshAppId, apps::Readiness::kReady, false, + crosh_expected_visibility); } IN_PROC_BROWSER_TEST_F(SystemFeaturesPolicyTest, @@ -391,6 +399,7 @@ system_features.Append(kScanningFeature); system_features.Append(kWebStoreFeature); system_features.Append(kCanvasFeature); + system_features.Append(kCroshFeature); UpdateSystemFeaturesDisableList(system_features.Clone(), kHiddenDisableMode); InstallSWAs(); @@ -409,6 +418,8 @@ expected_visibility); VerifyAppState(web_app::kCanvasAppId, apps::Readiness::kDisabledByPolicy, true, expected_visibility); + VerifyAppState(web_app::kCroshAppId, apps::Readiness::kDisabledByPolicy, true, + expected_visibility); } IN_PROC_BROWSER_TEST_F(SystemFeaturesPolicyTest, RedirectChromeSettingsURL) {
diff --git a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java index ed04944..4b094d24 100644 --- a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java +++ b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxBridge.java
@@ -21,6 +21,10 @@ return PrivacySandboxBridgeJni.get().isPrivacySandboxManaged(); } + public static boolean isPrivacySandboxRestricted() { + return PrivacySandboxBridgeJni.get().isPrivacySandboxRestricted(); + } + public static void setPrivacySandboxEnabled(boolean enabled) { PrivacySandboxBridgeJni.get().setPrivacySandboxEnabled(enabled); } @@ -93,9 +97,10 @@ } @NativeMethods - interface Natives { + public interface Natives { boolean isPrivacySandboxEnabled(); boolean isPrivacySandboxManaged(); + boolean isPrivacySandboxRestricted(); void setPrivacySandboxEnabled(boolean enabled); boolean isFlocEnabled(); void setFlocEnabled(boolean enabled);
diff --git a/chrome/browser/privacy_sandbox/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/FakePrivacySandboxBridge.java b/chrome/browser/privacy_sandbox/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/FakePrivacySandboxBridge.java index 4c9352c..ebedba8a 100644 --- a/chrome/browser/privacy_sandbox/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/FakePrivacySandboxBridge.java +++ b/chrome/browser/privacy_sandbox/android/javatests/src/org/chromium/chrome/browser/privacy_sandbox/FakePrivacySandboxBridge.java
@@ -11,8 +11,9 @@ /** * Java implementation of PrivacySandboxBridge for testing. */ -class FakePrivacySandboxBridge implements PrivacySandboxBridge.Natives { +public class FakePrivacySandboxBridge implements PrivacySandboxBridge.Natives { private boolean mIsPrivacySandboxEnabled = true; + private boolean mIsPrivacySandboxRestricted /* = false*/; private final HashMap<String, Topic> mTopics = new HashMap<>(); private final Set<Topic> mCurrentTopTopics = new HashSet<>(); @@ -20,7 +21,7 @@ private @DialogType int mDialogType = DialogType.NONE; private Integer mLastDialogAction; - FakePrivacySandboxBridge() { + public FakePrivacySandboxBridge() { setCurrentTopTopics("Foo", "Bar"); setBlockedTopics("BlockedFoo", "BlockedBar"); } @@ -59,10 +60,19 @@ } @Override + public boolean isPrivacySandboxRestricted() { + return mIsPrivacySandboxRestricted; + } + + @Override public void setPrivacySandboxEnabled(boolean enabled) { mIsPrivacySandboxEnabled = enabled; } + public void setPrivacySandboxRestricted(boolean restricted) { + mIsPrivacySandboxRestricted = restricted; + } + @Override public boolean isFlocEnabled() { return true;
diff --git a/chrome/browser/privacy_sandbox/android/privacy_sandbox_bridge.cc b/chrome/browser/privacy_sandbox/android/privacy_sandbox_bridge.cc index 58ac5f1..a549ca7 100644 --- a/chrome/browser/privacy_sandbox/android/privacy_sandbox_bridge.cc +++ b/chrome/browser/privacy_sandbox/android/privacy_sandbox_bridge.cc
@@ -50,6 +50,11 @@ return GetPrivacySandboxService()->IsPrivacySandboxManaged(); } +static jboolean JNI_PrivacySandboxBridge_IsPrivacySandboxRestricted( + JNIEnv* env) { + return GetPrivacySandboxService()->IsPrivacySandboxRestricted(); +} + static void JNI_PrivacySandboxBridge_SetPrivacySandboxEnabled( JNIEnv* env, jboolean enabled) {
diff --git a/chrome/browser/resources/new_tab_page_third_party/.eslintrc.js b/chrome/browser/resources/.eslintrc.js similarity index 79% rename from chrome/browser/resources/new_tab_page_third_party/.eslintrc.js rename to chrome/browser/resources/.eslintrc.js index 52e5ab6..65578df 100644 --- a/chrome/browser/resources/new_tab_page_third_party/.eslintrc.js +++ b/chrome/browser/resources/.eslintrc.js
@@ -1,4 +1,4 @@ -// Copyright 2021 The Chromium Authors. All rights reserved. +// Copyright 2022 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.
diff --git a/chrome/browser/resources/bookmarks/.eslintrc.js b/chrome/browser/resources/bookmarks/.eslintrc.js deleted file mode 100644 index 9c84e103..0000000 --- a/chrome/browser/resources/bookmarks/.eslintrc.js +++ /dev/null
@@ -1,11 +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. - -module.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/chromeos/.eslintrc.js b/chrome/browser/resources/chromeos/.eslintrc.js index 97dba29d..e03a36a1 100644 --- a/chrome/browser/resources/chromeos/.eslintrc.js +++ b/chrome/browser/resources/chromeos/.eslintrc.js
@@ -7,6 +7,7 @@ // TODO(dbeam): convert curly style to match doc (https://crbug.com/916782). 'brace-style': 'off', 'curly': 'off', + 'eqeqeq': 'off', 'no-var': 'off', 'prefer-const': 'off', },
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/testing/chromevox_webui_test_base.js b/chrome/browser/resources/chromeos/accessibility/chromevox/testing/chromevox_webui_test_base.js index e7ea065..19053962 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/testing/chromevox_webui_test_base.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/testing/chromevox_webui_test_base.js
@@ -119,12 +119,5 @@ /** @override */ ChromeVoxWebUITestBase.prototype.isAsync = false; -/** - * @override - * It doesn't make sense to run the accessibility audit on these tests, - * since many of them are deliberately testing inaccessible html. - */ -ChromeVoxWebUITestBase.prototype.runAccessibilityChecks = false; - /** @override */ ChromeVoxWebUITestBase.prototype.browsePreload = DUMMY_URL;
diff --git a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js index f15e334..6fe84d2 100644 --- a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js +++ b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js
@@ -325,8 +325,3 @@ /** @override */ E2ETestBase.prototype.isAsync = true; -/** - * @override - * No UI in the background context. - */ -E2ETestBase.prototype.runAccessibilityChecks = false;
diff --git a/chrome/browser/resources/commander/.eslintrc.js b/chrome/browser/resources/commander/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/commander/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/discards/.eslintrc.js b/chrome/browser/resources/discards/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/discards/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/downloads/.eslintrc.js b/chrome/browser/resources/downloads/.eslintrc.js deleted file mode 100644 index 9c84e103..0000000 --- a/chrome/browser/resources/downloads/.eslintrc.js +++ /dev/null
@@ -1,11 +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. - -module.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/extensions/.eslintrc.js b/chrome/browser/resources/extensions/.eslintrc.js deleted file mode 100644 index 0b691a4..0000000 --- a/chrome/browser/resources/extensions/.eslintrc.js +++ /dev/null
@@ -1,11 +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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/gaia_auth_host/password_change_authenticator_test.unitjs b/chrome/browser/resources/gaia_auth_host/password_change_authenticator_test.unitjs index 9663944..94baddc5 100644 --- a/chrome/browser/resources/gaia_auth_host/password_change_authenticator_test.unitjs +++ b/chrome/browser/resources/gaia_auth_host/password_change_authenticator_test.unitjs
@@ -26,11 +26,6 @@ return DUMMY_URL; } - // No need to run these checks - see comment in SamlPasswordAttributesTest. - get runAccessibilityChecks() { - return false; - } - get extraLibraries() { return [ '//ui/webui/resources/js/cr/event_target.js', @@ -101,4 +96,4 @@ this.assertSuccess(endpointUrl + '?returnurl=https://desktop.pingone.com', 'https://desktop.pingone.com/Selection?cmd=selection'); -}); \ No newline at end of file +});
diff --git a/chrome/browser/resources/gaia_auth_host/saml_password_attributes_test.unitjs b/chrome/browser/resources/gaia_auth_host/saml_password_attributes_test.unitjs index aedec05..7c8222e8 100644 --- a/chrome/browser/resources/gaia_auth_host/saml_password_attributes_test.unitjs +++ b/chrome/browser/resources/gaia_auth_host/saml_password_attributes_test.unitjs
@@ -13,12 +13,6 @@ SamlPasswordAttributesUnitTest.prototype = { __proto__: testing.Test.prototype, - // WebUI tests run accessibility checks by default, but unit tests don't. - // Ideally this would be a unit test, but unit tests can't use the DOMParser. - // WebUI tests can, so this is a WebUI test. But, this test has no UI to run - // accessibility checks on, so we turn this off manually. - runAccessibilityChecks: false, - /** @override */ testGenCppIncludes() { GEN(`#include "base/files/file_util.h"`);
diff --git a/chrome/browser/resources/gaia_auth_host/saml_timestamps_test.unitjs b/chrome/browser/resources/gaia_auth_host/saml_timestamps_test.unitjs index 22443c7..c4345644 100644 --- a/chrome/browser/resources/gaia_auth_host/saml_timestamps_test.unitjs +++ b/chrome/browser/resources/gaia_auth_host/saml_timestamps_test.unitjs
@@ -14,9 +14,6 @@ browsePreload: DUMMY_URL, - // No need to run these checks - see comment in SamlPasswordAttributesTest. - runAccessibilityChecks: false, - /** @override */ testGenCppIncludes() { GEN(`#include "content/public/test/browser_test.h"`);
diff --git a/chrome/browser/resources/history/.eslintrc.js b/chrome/browser/resources/history/.eslintrc.js deleted file mode 100644 index 0b691a4..0000000 --- a/chrome/browser/resources/history/.eslintrc.js +++ /dev/null
@@ -1,11 +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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/nearby_internals/.eslintrc.js b/chrome/browser/resources/nearby_internals/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/nearby_internals/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/new_tab_page/.eslintrc.js b/chrome/browser/resources/new_tab_page/.eslintrc.js deleted file mode 100644 index 9c84e103..0000000 --- a/chrome/browser/resources/new_tab_page/.eslintrc.js +++ /dev/null
@@ -1,11 +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. - -module.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/omnibox/.eslintrc.js b/chrome/browser/resources/omnibox/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/omnibox/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/pdf/.eslintrc.js b/chrome/browser/resources/pdf/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/pdf/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/print_preview/.eslintrc.js b/chrome/browser/resources/print_preview/.eslintrc.js deleted file mode 100644 index 9c84e103..0000000 --- a/chrome/browser/resources/print_preview/.eslintrc.js +++ /dev/null
@@ -1,11 +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. - -module.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/settings/.eslintrc.js b/chrome/browser/resources/settings/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/settings/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/tab_strip/.eslintrc.js b/chrome/browser/resources/tab_strip/.eslintrc.js deleted file mode 100644 index 18f6e95..0000000 --- a/chrome/browser/resources/tab_strip/.eslintrc.js +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2020 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.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/resources/tools/.style.yapf b/chrome/browser/resources/tools/.style.yapf new file mode 100644 index 0000000..de0c6a70 --- /dev/null +++ b/chrome/browser/resources/tools/.style.yapf
@@ -0,0 +1,2 @@ +[style] +based_on_style = chromium
diff --git a/chrome/browser/resources/tools/optimize_webui.py b/chrome/browser/resources/tools/optimize_webui.py index 35fa2bb..5a62723 100755 --- a/chrome/browser/resources/tools/optimize_webui.py +++ b/chrome/browser/resources/tools/optimize_webui.py
@@ -14,7 +14,6 @@ import sys import tempfile - _HERE_PATH = os.path.dirname(__file__) _SRC_PATH = os.path.normpath(os.path.join(_HERE_PATH, '..', '..', '..', '..')) _CWD = os.getcwd() # NOTE(dbeam): this is typically out/<gn_name>/. @@ -23,26 +22,25 @@ import node import node_modules - # These files are already combined and minified. _BASE_EXCLUDES = [] for excluded_file in [ - 'resources/polymer/v1_0/web-animations-js/web-animations-next-lite.min.js', - 'resources/css/roboto.css', - 'resources/css/text_defaults.css', - 'resources/css/text_defaults_md.css', - 'resources/mojo/mojo/public/js/mojo_bindings_lite.html', - 'resources/mojo/mojo/public/mojom/base/time.mojom.html', - 'resources/mojo/mojo/public/mojom/base/time.mojom-lite.js', - 'resources/mojo/chromeos/services/network_config/public/mojom/network_types.mojom.html', - 'resources/mojo/services/network/public/mojom/ip_address.mojom.html', - 'resources/polymer/v3_0/polymer/polymer_bundled.min.js', - 'resources/js/load_time_data.m.js', + 'resources/polymer/v1_0/web-animations-js/web-animations-next-lite.min.js', + 'resources/css/roboto.css', + 'resources/css/text_defaults.css', + 'resources/css/text_defaults_md.css', + 'resources/mojo/mojo/public/js/mojo_bindings_lite.html', + 'resources/mojo/mojo/public/mojom/base/time.mojom.html', + 'resources/mojo/mojo/public/mojom/base/time.mojom-lite.js', + 'resources/mojo/chromeos/services/network_config/public/mojom/network_types.mojom.html', + 'resources/mojo/services/network/public/mojom/ip_address.mojom.html', + 'resources/polymer/v3_0/polymer/polymer_bundled.min.js', + 'resources/js/load_time_data.m.js', ]: - # Exclude both the chrome://resources form and the scheme-relative form for - # files used in Polymer 3. - _BASE_EXCLUDES.append("chrome://" + excluded_file) - _BASE_EXCLUDES.append("//" + excluded_file) + # Exclude both the chrome://resources form and the scheme-relative form for + # files used in Polymer 3. + _BASE_EXCLUDES.append("chrome://" + excluded_file) + _BASE_EXCLUDES.append("//" + excluded_file) def _request_list_path(out_path, target_name): @@ -51,6 +49,7 @@ # same BUILD.gn file exist. return os.path.join(out_path, target_name + '_requestlist.txt') + def _get_dep_path(dep, host_url, in_path): if dep.startswith(host_url): return dep.replace(host_url, os.path.relpath(in_path, _CWD)) @@ -58,6 +57,7 @@ return os.path.relpath(in_path, _CWD) + '/' + dep return dep + # Get a list of all files that were bundled with rollup and update the # depfile accordingly such that Ninja knows when to re-trigger. def _update_dep_file(in_folder, args, manifest): @@ -81,6 +81,7 @@ deps_file_header = os.path.join(args.out_folder, out_file_name) f.write(deps_file_header + ': ' + ' '.join(deps)) + # Autogenerate a rollup config file so that we can import the plugin and # pass it information about the location of the directories and files to exclude # from the bundle. @@ -94,14 +95,16 @@ plugin('{in_path}', '{host_url}', {exclude_list}, {external_path_list}, /* allowEmptyExtension= */ false) ] }}); - '''.format(plugin_path=path_to_plugin.replace('\\', '/'), - in_path=in_path.replace('\\', '/'), - host_url=host_url, - exclude_list=json.dumps(excludes), - external_path_list=json.dumps(external_paths)) + '''.format( + plugin_path=path_to_plugin.replace('\\', '/'), + in_path=in_path.replace('\\', '/'), + host_url=host_url, + exclude_list=json.dumps(excludes), + external_path_list=json.dumps(external_paths)) with open(rollup_config_file, 'w') as f: - f.write(config_content); - return rollup_config_file; + f.write(config_content) + return rollup_config_file + # Create the manifest file from the sourcemap generated by rollup and return the # list of bundles. @@ -128,12 +131,12 @@ return output_filenames + def _bundle_v3(tmp_out_dir, in_path, out_path, manifest_out_path, args, excludes, external_paths): if not os.path.exists(tmp_out_dir): os.makedirs(tmp_out_dir) - path_to_plugin = os.path.join( - os.path.abspath(_HERE_PATH), 'rollup_plugin.js') + path_to_plugin = os.path.join(os.path.abspath(_HERE_PATH), 'rollup_plugin.js') rollup_config_file = _generate_rollup_config(tmp_out_dir, path_to_plugin, in_path, args.host_url, excludes, external_paths) @@ -160,18 +163,22 @@ assert len(args.js_module_in_files) == 2, \ 'Expect 2 module entry points for generating 3 outputs' shared_file_name = args.js_out_files[2] - rollup_args += [ '--chunkFileNames', shared_file_name ] + rollup_args += ['--chunkFileNames', shared_file_name] bundled_paths.append(os.path.join(tmp_out_dir, shared_file_name)) - node.RunNode( - [node_modules.PathToRollup()] + rollup_args + [ - '--format', 'esm', - '--dir', tmp_out_dir, - '--entryFileNames', '[name].rollup.js', - '--sourcemap', '--sourcemapExcludeSources', - '--config', rollup_config_file, - '--silent', - ]) + node.RunNode([node_modules.PathToRollup()] + rollup_args + [ + '--format', + 'esm', + '--dir', + tmp_out_dir, + '--entryFileNames', + '[name].rollup.js', + '--sourcemap', + '--sourcemapExcludeSources', + '--config', + rollup_config_file, + '--silent', + ]) # Create the manifest file from the sourcemaps generated by rollup. generated_paths = _generate_manifest_file(tmp_out_dir, in_path, @@ -189,6 +196,7 @@ return bundled_paths + def _optimize(in_folder, args): in_path = os.path.normpath(os.path.join(_CWD, in_folder)).replace('\\', '/') out_path = os.path.join(_CWD, args.out_folder).replace('\\', '/') @@ -196,9 +204,9 @@ tmp_out_dir = tempfile.mkdtemp(dir=out_path).replace('\\', '/') excludes = _BASE_EXCLUDES + [ - # This file is dynamically created by C++. Should always be imported with a - # relative path. - 'strings.m.js', + # This file is dynamically created by C++. Should always be imported with a + # relative path. + 'strings.m.js', ] excludes.extend(args.exclude or []) external_paths = args.external_paths or [] @@ -211,21 +219,23 @@ # Run polymer-css-build. node.RunNode([node_modules.PathToPolymerCssBuild()] + - ['--polymer-version', '2'] + - ['--no-inline-includes', '-f'] + + ['--polymer-version', '2'] + ['--no-inline-includes', '-f'] + bundled_paths + ['-o'] + pcb_out_paths) # Pass the JS files through Terser and write the output to its final # destination. for index, js_out_file in enumerate(args.js_out_files): - node.RunNode([node_modules.PathToTerser(), - os.path.join(tmp_out_dir, js_out_file), - '--comments', '/Copyright|license|LICENSE|\<\/?if/', - '--output', os.path.join(out_path, js_out_file)]) + node.RunNode([ + node_modules.PathToTerser(), + os.path.join(tmp_out_dir, js_out_file), '--comments', + '/Copyright|license|LICENSE|\<\/?if/', '--output', + os.path.join(out_path, js_out_file) + ]) finally: shutil.rmtree(tmp_out_dir) return manifest_out_path + def main(argv): parser = argparse.ArgumentParser() parser.add_argument('--depfile', required=True) @@ -263,8 +273,8 @@ # later. if args.out_manifest: manifest_data = { - 'base_dir': args.out_folder, - 'files': list(manifest.keys()), + 'base_dir': args.out_folder, + 'files': list(manifest.keys()), } with open(os.path.normpath(os.path.join(_CWD, args.out_manifest)), 'w') \ as manifest_file:
diff --git a/chrome/browser/resources/tools/optimize_webui_test.py b/chrome/browser/resources/tools/optimize_webui_test.py index 65d9315..bdf3751 100755 --- a/chrome/browser/resources/tools/optimize_webui_test.py +++ b/chrome/browser/resources/tools/optimize_webui_test.py
@@ -10,12 +10,12 @@ import tempfile import unittest - _CWD = os.getcwd() _HERE_DIR = os.path.dirname(__file__) class OptimizeWebUiTest(unittest.TestCase): + def setUp(self): self._tmp_dirs = [] self._tmp_src_dir = None @@ -35,8 +35,8 @@ def _write_file_to_src_dir(self, file_path, file_contents): if not self._tmp_src_dir: self._tmp_src_dir = self._create_tmp_dir() - file_path_normalized = os.path.normpath(os.path.join(self._tmp_src_dir, - file_path)) + file_path_normalized = os.path.normpath( + os.path.join(self._tmp_src_dir, file_path)) self._write_file_to_dir(file_path_normalized, file_contents) def _create_tmp_dir(self): @@ -53,10 +53,14 @@ def _run_optimize(self, input_args): # TODO(dbeam): make it possible to _run_optimize twice? Is that useful? args = input_args + [ - '--depfile', os.path.join(self._out_folder, 'depfile.d'), - '--target_name', 'dummy_target_name', - '--input', self._tmp_src_dir, - '--out_folder', self._out_folder, + '--depfile', + os.path.join(self._out_folder, 'depfile.d'), + '--target_name', + 'dummy_target_name', + '--input', + self._tmp_src_dir, + '--out_folder', + self._out_folder, ] optimize_webui.main(args) @@ -64,31 +68,36 @@ self._write_file_to_src_dir('element.js', "alert('yay');") self._write_file_to_src_dir('element_in_dir/element_in_dir.js', "alert('hello from element_in_dir');") - self._write_file_to_src_dir('ui.js', ''' + self._write_file_to_src_dir( + 'ui.js', ''' import './element.js'; import './element_in_dir/element_in_dir.js'; ''') - self._write_file_to_src_dir('ui.html', ''' + self._write_file_to_src_dir( + 'ui.html', ''' <script type="module" src="ui.js"></script> ''') def _write_v3_files_with_custom_path_to_src_dir(self, custom_path): - self._write_file_to_dir(os.path.join( - custom_path, 'external_dir', 'external_element.js'), ''' + self._write_file_to_dir( + os.path.join(custom_path, 'external_dir', 'external_element.js'), ''' import './sub_dir/external_element_dep.js'; alert('hello from external_element'); ''') - self._write_file_to_dir(os.path.join( - custom_path, 'external_dir', 'sub_dir', 'external_element_dep.js'), + self._write_file_to_dir( + os.path.join(custom_path, 'external_dir', 'sub_dir', + 'external_element_dep.js'), "alert('hello from external_element_dep');") self._write_file_to_src_dir('element.js', "alert('yay');") - self._write_file_to_src_dir('ui.js', ''' + self._write_file_to_src_dir( + 'ui.js', ''' import './element.js'; import 'some-fake-scheme://foo/external_dir/external_element.js'; ''') - self._write_file_to_src_dir('ui.html', ''' + self._write_file_to_src_dir( + 'ui.html', ''' <script type="module" src="ui.js"></script> ''') @@ -97,33 +106,40 @@ _HERE_DIR.replace('\\', '/'), 'gen', 'ui', 'webui', 'resources', 'preprocessed', 'js') fake_resource_path = os.path.join(resources_path, 'fake_resource.js') - scheme_relative_resource_path = os.path.join(resources_path, 'scheme_relative_resource.js') + scheme_relative_resource_path = os.path.join(resources_path, + 'scheme_relative_resource.js') os.makedirs(os.path.dirname(resources_path)) self._tmp_dirs.append('gen') - self._write_file_to_dir(fake_resource_path, ''' + self._write_file_to_dir( + fake_resource_path, ''' export const foo = 5; -alert('hello from shared resource');'''); - self._write_file_to_dir(scheme_relative_resource_path, ''' +alert('hello from shared resource');''') + self._write_file_to_dir( + scheme_relative_resource_path, ''' export const bar = 6; -alert('hello from another shared resource');'''); +alert('hello from another shared resource');''') - self._write_file_to_src_dir('element.js', ''' + self._write_file_to_src_dir( + 'element.js', ''' import '%s//resources/js/fake_resource.js'; import {bar} from '//resources/js/scheme_relative_resource.js'; alert('yay ' + bar); ''' % resources_scheme) - self._write_file_to_src_dir('element_in_dir/element_in_dir.js', ''' + self._write_file_to_src_dir( + 'element_in_dir/element_in_dir.js', ''' import {foo} from '%s//resources/js/fake_resource.js'; import '../strings.m.js'; alert('hello from element_in_dir ' + foo); ''' % resources_scheme) - self._write_file_to_src_dir('ui.js', ''' + self._write_file_to_src_dir( + 'ui.js', ''' import './strings.m.js'; import './element.js'; import './element_in_dir/element_in_dir.js'; ''') - self._write_file_to_src_dir('ui.html', ''' + self._write_file_to_src_dir( + 'ui.html', ''' <script type="module" src="ui.js"></script> ''') @@ -142,19 +158,22 @@ def _check_output_depfile(self, has_html): depfile_d = self._read_out_file('depfile.d') self.assertIn('element.js', depfile_d) - self.assertIn(os.path.normpath('element_in_dir/element_in_dir.js'), - depfile_d) + self.assertIn( + os.path.normpath('element_in_dir/element_in_dir.js'), depfile_d) if (has_html): self.assertIn('element.html', depfile_d) - self.assertIn(os.path.normpath('element_in_dir/element_in_dir.html'), - depfile_d) + self.assertIn( + os.path.normpath('element_in_dir/element_in_dir.html'), depfile_d) def testV3SimpleOptimize(self): self._write_v3_files_to_src_dir() args = [ - '--host', 'fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', + '--host', + 'fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', ] self._run_optimize(args) @@ -163,13 +182,17 @@ def testV3OptimizeWithResources(self): self._write_v3_files_with_resources_to_src_dir('chrome:') - resources_path = os.path.join( - 'gen', 'ui', 'webui', 'resources', 'preprocessed') + resources_path = os.path.join('gen', 'ui', 'webui', 'resources', + 'preprocessed') args = [ - '--host', 'fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--external_paths', 'chrome://resources|%s' % resources_path, + '--host', + 'fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--external_paths', + 'chrome://resources|%s' % resources_path, ] self._run_optimize(args) @@ -180,12 +203,12 @@ depfile_d = self._read_out_file('depfile.d') self.assertIn('element.js', depfile_d) - self.assertIn(os.path.normpath('element_in_dir/element_in_dir.js'), - depfile_d) + self.assertIn( + os.path.normpath('element_in_dir/element_in_dir.js'), depfile_d) self.assertIn( os.path.normpath( - '../gen/ui/webui/resources/preprocessed/js/scheme_relative_resource.js'), - depfile_d) + '../gen/ui/webui/resources/preprocessed/js/scheme_relative_resource.js' + ), depfile_d) self.assertIn( os.path.normpath( '../gen/ui/webui/resources/preprocessed/js/fake_resource.js'), @@ -195,16 +218,24 @@ self._write_v3_files_to_src_dir() self._write_file_to_src_dir('lazy_element.js', "alert('hello from lazy_element');") - self._write_file_to_src_dir('lazy.js', ''' + self._write_file_to_src_dir( + 'lazy.js', ''' import './lazy_element.js'; import './element_in_dir/element_in_dir.js'; ''') args = [ - '--host', 'fake-host', - '--js_module_in_files', 'ui.js', 'lazy.js', - '--js_out_files', 'ui.rollup.js', 'lazy.rollup.js', 'shared.rollup.js', - '--out-manifest', os.path.join(self._out_folder, 'out_manifest.json'), + '--host', + 'fake-host', + '--js_module_in_files', + 'ui.js', + 'lazy.js', + '--js_out_files', + 'ui.rollup.js', + 'lazy.rollup.js', + 'shared.rollup.js', + '--out-manifest', + os.path.join(self._out_folder, 'out_manifest.json'), ] self._run_optimize(args) @@ -243,15 +274,18 @@ def testV3OptimizeWithCustomPaths(self): custom_dir = os.path.join(self._create_tmp_dir(), 'foo_root') self._write_v3_files_with_custom_path_to_src_dir(custom_dir) - resources_path = os.path.join( - 'gen', 'ui', 'webui', 'resources', 'preprocessed') + resources_path = os.path.join('gen', 'ui', 'webui', 'resources', + 'preprocessed') args = [ - '--host', 'fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--external_paths', - 'chrome://resources|%s' % resources_path, - 'some-fake-scheme://foo|%s' % os.path.abspath(custom_dir), + '--host', + 'fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--external_paths', + 'chrome://resources|%s' % resources_path, + 'some-fake-scheme://foo|%s' % os.path.abspath(custom_dir), ] self._run_optimize(args) @@ -264,21 +298,26 @@ self.assertIn('element.js', depfile_d) # Relative path from the src of the root module to the external root dir relpath = os.path.relpath(custom_dir, self._tmp_src_dir) - self.assertIn(os.path.normpath( - os.path.join(relpath, 'external_dir', 'external_element.js')), + self.assertIn( + os.path.normpath( + os.path.join(relpath, 'external_dir', 'external_element.js')), depfile_d) - self.assertIn(os.path.normpath( - os.path.join(relpath, 'external_dir', 'sub_dir', - 'external_element_dep.js')), - depfile_d) + self.assertIn( + os.path.normpath( + os.path.join(relpath, 'external_dir', 'sub_dir', + 'external_element_dep.js')), depfile_d) def testV3SimpleOptimizeExcludes(self): self._write_v3_files_to_src_dir() args = [ - '--host', 'chrome-extension://myextensionid/', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--exclude', 'element_in_dir/element_in_dir.js', + '--host', + 'chrome-extension://myextensionid/', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--exclude', + 'element_in_dir/element_in_dir.js', ] self._run_optimize(args) @@ -294,17 +333,21 @@ # relative paths. def testV3SimpleOptimizeExcludesResources(self): self._write_v3_files_with_resources_to_src_dir('chrome-untrusted:') - resources_path = os.path.join( - 'gen', 'ui', 'webui', 'resources', 'preprocessed') + resources_path = os.path.join('gen', 'ui', 'webui', 'resources', + 'preprocessed') args = [ - '--host', 'chrome-untrusted://fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--external_paths', - '//resources|%s' % resources_path, - 'chrome-untrusted://resources|%s' % resources_path, - '--exclude', '//resources/js/scheme_relative_resource.js', - 'chrome-untrusted://resources/js/fake_resource.js', + '--host', + 'chrome-untrusted://fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--external_paths', + '//resources|%s' % resources_path, + 'chrome-untrusted://resources|%s' % resources_path, + '--exclude', + '//resources/js/scheme_relative_resource.js', + 'chrome-untrusted://resources/js/fake_resource.js', ] self._run_optimize(args) @@ -322,15 +365,18 @@ # resources from both chrome-untrusted://resources and //resources. def testV3SimpleOptimizeUntrustedResources(self): self._write_v3_files_with_resources_to_src_dir('chrome-untrusted:') - resources_path = os.path.join( - 'gen', 'ui', 'webui', 'resources', 'preprocessed') + resources_path = os.path.join('gen', 'ui', 'webui', 'resources', + 'preprocessed') args = [ - '--host', 'chrome-untrusted://fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--external_paths', - '//resources|%s' % resources_path, - 'chrome-untrusted://resources|%s' % resources_path, + '--host', + 'chrome-untrusted://fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--external_paths', + '//resources|%s' % resources_path, + 'chrome-untrusted://resources|%s' % resources_path, ] self._run_optimize(args) @@ -342,7 +388,6 @@ self.assertIn('fake_resource', depfile_d) self.assertIn('scheme_relative_resource', depfile_d) - def testV3OptimizeWithCustomLayeredPaths(self): tmp_dir = self._create_tmp_dir() custom_dir_foo = os.path.join(tmp_dir, 'foo_root') @@ -352,26 +397,30 @@ # Overwrite one of the foo files to import something from # some-fake-scheme://bar. - self._write_file_to_dir(os.path.join( - custom_dir_foo, 'external_dir', 'sub_dir', - 'external_element_dep.js'), ''' + self._write_file_to_dir( + os.path.join(custom_dir_foo, 'external_dir', 'sub_dir', + 'external_element_dep.js'), ''' import 'some-fake-scheme://bar/another_element.js'; alert('hello from external_element_dep');''') # Write that file to the bar_root directory. - self._write_file_to_dir(os.path.join(custom_dir_bar, 'another_element.js'), - "alert('hello from another external dep');") + self._write_file_to_dir( + os.path.join(custom_dir_bar, 'another_element.js'), + "alert('hello from another external dep');") - resources_path = os.path.join( - 'gen', 'ui', 'webui', 'resources', 'preprocessed') + resources_path = os.path.join('gen', 'ui', 'webui', 'resources', + 'preprocessed') args = [ - '--host', 'fake-host', - '--js_module_in_files', 'ui.js', - '--js_out_files', 'ui.rollup.js', - '--external_paths', - '//resources|%s' % resources_path, - 'some-fake-scheme://foo|%s' % os.path.abspath(custom_dir_foo), - 'some-fake-scheme://bar|%s' % os.path.abspath(custom_dir_bar), + '--host', + 'fake-host', + '--js_module_in_files', + 'ui.js', + '--js_out_files', + 'ui.rollup.js', + '--external_paths', + '//resources|%s' % resources_path, + 'some-fake-scheme://foo|%s' % os.path.abspath(custom_dir_foo), + 'some-fake-scheme://bar|%s' % os.path.abspath(custom_dir_bar), ] self._run_optimize(args) @@ -385,18 +434,21 @@ self.assertIn('element.js', depfile_d) # Relative path from the src of the root module to the external root dir relpath = os.path.relpath(custom_dir_foo, self._tmp_src_dir) - self.assertIn(os.path.normpath( - os.path.join(relpath, 'external_dir', 'external_element.js')), + self.assertIn( + os.path.normpath( + os.path.join(relpath, 'external_dir', 'external_element.js')), depfile_d) - self.assertIn(os.path.normpath( - os.path.join(relpath, 'external_dir', 'sub_dir', - 'external_element_dep.js')), - depfile_d) + self.assertIn( + os.path.normpath( + os.path.join(relpath, 'external_dir', 'sub_dir', + 'external_element_dep.js')), depfile_d) # Relative path from the src of the root module to the secondary dependency # root dir. relpath_bar = os.path.relpath(custom_dir_bar, self._tmp_src_dir) - self.assertIn(os.path.normpath( - os.path.join(relpath_bar, 'another_element.js')), depfile_d) + self.assertIn( + os.path.normpath(os.path.join(relpath_bar, 'another_element.js')), + depfile_d) + if __name__ == '__main__': unittest.main()
diff --git a/chrome/browser/resources/welcome/.eslintrc.js b/chrome/browser/resources/welcome/.eslintrc.js deleted file mode 100644 index 9c84e103..0000000 --- a/chrome/browser/resources/welcome/.eslintrc.js +++ /dev/null
@@ -1,11 +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. - -module.exports = { - 'env': { - 'browser': true, - 'es6': true, - }, - 'rules': {'eqeqeq': ['error', 'always', {'null': 'ignore'}]}, -};
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 2267662..e2862bbb 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -3879,8 +3879,6 @@ sources += [ "startup/web_app_info_recorder_utils.cc", "startup/web_app_info_recorder_utils.h", - "startup/web_app_url_handling_startup_utils.cc", - "startup/web_app_url_handling_startup_utils.h", ] } @@ -5000,15 +4998,6 @@ ] } - if (is_win || is_mac || (is_linux && !is_chromeos_lacros)) { - sources += [ - "views/web_apps/web_app_url_handler_hover_button.cc", - "views/web_apps/web_app_url_handler_hover_button.h", - "views/web_apps/web_app_url_handler_intent_picker_dialog_view.cc", - "views/web_apps/web_app_url_handler_intent_picker_dialog_view.h", - ] - } - if (use_aura) { # These files can do Gtk+-based theming for builds with gtk enabled. if (is_linux || is_chromeos_lacros) {
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb index 511c9aad..cb3ca2c 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">أنت تعرض معاينة لهذه الصفحة.</translation> <translation id="3690369331356918524">التحذير إذا تم الكشف عن كلمات المرور في عملية اختراق بيانات</translation> <translation id="3692944402865947621">تعذّر تنزيل <ph name="FILE_NAME" /> نظرًا لعدم إمكانية الوصول إلى موقع مساحة التخزين.</translation> +<translation id="3699022356773522638">هل تريد تنزيل الملف؟</translation> <translation id="371230970611282515">توقّع الأحداث الخطيرة قبل حدوثها والتحذير منها</translation> <translation id="3714981814255182093">فتح شريط البحث</translation> <translation id="3716182511346448902">تستهلك هذه الصفحة مساحة كبيرة من الذاكرة، لذلك أوقفها Chrome مؤقتًا.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_bg.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_bg.xtb index 14c8261e..59f74f3 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_bg.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_bg.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Гледате визуализация на тази страница</translation> <translation id="3690369331356918524">Предупреждава ви за разкрити пароли при нарушение на сигурността на данните</translation> <translation id="3692944402865947621">Изтеглянето на <ph name="FILE_NAME" /> не бе успешно, тъй като няма достъп до местоположението за съхранение.</translation> +<translation id="3699022356773522638">Да се изтегли ли файлът?</translation> <translation id="371230970611282515">Предвижда и ви предупреждава за опасни събития, преди да се случат.</translation> <translation id="3714981814255182093">Отваряне на лентата за търсене</translation> <translation id="3716182511346448902">Тази страница използва твърде много памет, така че Chrome я постави на пауза.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_id.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_id.xtb index a585bf01..e7326288 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_id.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_id.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Anda sedang melihat pratinjau halaman ini</translation> <translation id="3690369331356918524">Memberikan peringatan jika sandi terekspos saat terjadi pelanggaran data</translation> <translation id="3692944402865947621">Download <ph name="FILE_NAME" /> gagal karena lokasi penyimpanan tidak dapat dijangkau.</translation> +<translation id="3699022356773522638">Download file?</translation> <translation id="371230970611282515">Memperkirakan dan memberikan peringatan terkait peristiwa berbahaya sebelum terjadi.</translation> <translation id="3714981814255182093">Membuka Bilah Cari</translation> <translation id="3716182511346448902">Halaman ini menggunakan terlalu banyak memori, sehingga Chrome menjedanya.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb index 2a167e6b..a72866a 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">מוצגת לך תצוגה מקדימה של הדף הזה</translation> <translation id="3690369331356918524">במצב הזה המערכת מזהירה אותך אם סיסמאות נחשפות כתוצאה מפרצה באבטחת המידע</translation> <translation id="3692944402865947621">ההורדה של <ph name="FILE_NAME" /> נכשלה כי מיקום האחסון לא נגיש.</translation> +<translation id="3699022356773522638">להוריד את הקובץ?</translation> <translation id="371230970611282515">המערכת חוזה אירועים מסוכנים ומזהירה אותך לגביהם לפני שהם מתרחשים.</translation> <translation id="3714981814255182093">פתיחת סרגל החיפוש</translation> <translation id="3716182511346448902">הדף הזה מנצל יותר מדי זיכרון, כך שהוא הושהה על-ידי Chrome.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_km.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_km.xtb index 4871089..f3df397 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_km.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_km.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">អ្នកកំពុងមើលទំព័រនេះសាកល្បង</translation> <translation id="3690369331356918524">ព្រមានអ្នក ប្រសិនបើពាក្យសម្ងាត់បានលេចចេញនៅក្នុងការបែកធ្លាយទិន្នន័យ</translation> <translation id="3692944402865947621">មិនអាចទាញយក <ph name="FILE_NAME" /> បានទេពីព្រោះរកមិនឃើញទីតាំងទំហំផ្ទុកទេ។</translation> +<translation id="3699022356773522638">ទាញយកឯកសារឬ?</translation> <translation id="371230970611282515">ព្យាករ និងព្រមានអ្នកអំពីព្រឹត្តិការណ៍គ្រោះថ្នាក់ មុនពេលព្រឹត្តិការណ៍ទាំងនោះកើតឡើង។</translation> <translation id="3714981814255182093">បើករបារស្វែងរក</translation> <translation id="3716182511346448902">ទំព័រនេះប្រើអង្គចងចាំច្រើនពេក ដូច្នេះ Chrome បានផ្អាកវា។</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ko.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ko.xtb index 4d31673..bae54cb1 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ko.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ko.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">페이지의 미리보기를 보는 중입니다.</translation> <translation id="3690369331356918524">데이터 유출로 인해 비밀번호가 노출된 경우 알립니다.</translation> <translation id="3692944402865947621">저장 위치에 연결할 수 없어 <ph name="FILE_NAME" />을(를) 다운로드할 수 없습니다.</translation> +<translation id="3699022356773522638">파일을 다운로드하시겠습니까?</translation> <translation id="371230970611282515">위험한 이벤트가 발생하기 전에 이를 예측하여 알립니다.</translation> <translation id="3714981814255182093">찾기 창 열기</translation> <translation id="3716182511346448902">페이지에서 너무 많은 메모리를 사용하므로 Chrome에서 페이지를 일시중지했습니다.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_lt.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_lt.xtb index fccee63..b0650c5f1 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_lt.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_lt.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Žiūrite šio puslapio peržiūrą</translation> <translation id="3690369331356918524">Įspėjama, jei slaptažodžiai buvo atskleisti įvykus duomenų saugos pažeidimui</translation> <translation id="3692944402865947621">Nepavyko atsisiųsti „<ph name="FILE_NAME" />“, nes saugyklos vieta nepasiekiama.</translation> +<translation id="3699022356773522638">Atsisiųsti failą?</translation> <translation id="371230970611282515">Numato ir įspėja jus apie pavojingus įvykius, prieš jiems nutinkant.</translation> <translation id="3714981814255182093">Atidaryti radimo juostą</translation> <translation id="3716182511346448902">Šis puslapis naudoja per daug atminties, todėl „Chrome“ jį pristabdė.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_mk.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_mk.xtb index f01b6844..9ebcd34e 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_mk.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_mk.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Гледате преглед на страницава</translation> <translation id="3690369331356918524">Ве предупредува ако лозинките се откриени при упад во податоците</translation> <translation id="3692944402865947621">Преземањето на <ph name="FILE_NAME" /> не успеа бидејќи локацијата за складирање не е достапна.</translation> +<translation id="3699022356773522638">Да се преземе датотеката?</translation> <translation id="371230970611282515">Предвидува опасни настани и ве предупредува пред да се случат.</translation> <translation id="3714981814255182093">Отворете ја Лентата за пребарување</translation> <translation id="3716182511346448902">Страницава користи премногу меморија, па Chrome ја паузираше.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb index 1e528e2..6aed840 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Anda sedang melihat pratonton halaman ini</translation> <translation id="3690369331356918524">Memberikan amaran kepada anda jika kata laluan terdedah dalam pelanggaran data</translation> <translation id="3692944402865947621">Muat turun <ph name="FILE_NAME" /> gagal kerana lokasi storan tidak dapat dicapai.</translation> +<translation id="3699022356773522638">Muat turun fail?</translation> <translation id="371230970611282515">Meramalkan dan memberi anda amaran tentang acara berbahaya sebelum acara itu berlaku.</translation> <translation id="3714981814255182093">Buka Bar Cari</translation> <translation id="3716182511346448902">Halaman ini menggunakan terlalu banyak memori, jadi Chrome menjeda halaman ini.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb index 04e2546..0ccb8e0 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb
@@ -281,7 +281,7 @@ <translation id="2645657967708199252">သင်၏ <ph name="CONNECTION_TYPE" /> ချိတ်ဆက်မှုက ဒေါင်းလုဒ်ကို နှေးကွေးစေနိုင်သည်</translation> <translation id="2647434099613338025">ဘာသာစကား ထည့်ရန်</translation> <translation id="2649068648233607930">သင်၏ဘရောင်ဇာကို <ph name="DOMAIN" /> က စီမံခန့်ခွဲသည်</translation> -<translation id="2650348088770008516">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက် ပိတ်ထားသည်</translation> +<translation id="2650348088770008516">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက် ပိတ်ပြီးပြီ</translation> <translation id="2650751991977523696">ဖိုင်ကို ထပ်မံဒေါင်းလုဒ်လုပ်လိုပါသလား။</translation> <translation id="2651091186440431324">{FILE_COUNT,plural, =1{အသံဖိုင် # ဖိုင်}other{အသံဖိုင် # ဖိုင်}}</translation> <translation id="265156376773362237">ပုံမှန် ကြိုဖွင့်မှု</translation> @@ -310,7 +310,7 @@ <translation id="2818669890320396765">သင်၏ဝဘ်လိပ်စာများကို စက်အားလုံးတွင် ရယူနိုင်ရန် လက်မှတ်ထိုးဝင်ပြီး စင့်ခ်လုပ်ခြင်းကို ဖွင့်ပါ</translation> <translation id="2827278682606527653">Feed card menu half height</translation> <translation id="2830783625999891985">ကလစ်ဘုတ်အကြောင်းအရာများကို ဖျောက်ထားသည်</translation> -<translation id="2838367486340230368">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်ကို မြင်ကွင်းတစ်ဝက်ဖွင့်ထားသည်</translation> +<translation id="2838367486340230368">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်ကို မြင်ကွင်းတစ်ဝက်ဖွင့်ပြီးပြီ</translation> <translation id="2839327205551510876"><ph name="SITE_NAME" /> ကို လိုက်မကြည့်တော့ပါ</translation> <translation id="2840810876587895427">{TAB_COUNT,plural, =1{ရုပ်ဖျက်တဘ် <ph name="TAB_COUNT_ONE" /> ခုကို ပိတ်ပါမည်}other{ရုပ်ဖျက်တဘ် <ph name="TAB_COUNT_MANY" /> ခုကို ပိတ်ပါမည်}}</translation> <translation id="2841216154655874070">{NUM_DAYS,plural, =1{လွန်ခဲ့သော ၁ ရက်က စစ်ဆေးခဲ့သည်}other{လွန်ခဲ့သော # ရက်က စစ်ဆေးခဲ့သည်}}</translation> @@ -462,6 +462,7 @@ <translation id="3687645719033307815">သင်သည် ဤစာမျက်နှာ၏ အစမ်းပြသမှုကို ကြည့်ရှုနေခြင်း ဖြစ်သည်</translation> <translation id="3690369331356918524">ဒေတာပေါက်ကြားမှုတွင် စကားဝှက်များ ဖော်ထုတ်ခံရသည့်အခါ သင့်ကို သတိပေးခြင်း</translation> <translation id="3692944402865947621">သိုလှောင်ခန်းနေရာသို့ ချိတ်ဆက်၍မရသောကြောင့် <ph name="FILE_NAME" /> ကို ဒေါင်းလုဒ်လုပ်၍မရပါ။</translation> +<translation id="3699022356773522638">ဖိုင်ဒေါင်းလုဒ်လုပ်မလား။</translation> <translation id="371230970611282515">အန္တရာယ်ရှိသည့် ဖြစ်ရပ်များ မဖြစ်ပွားမီ ခန့်မှန်းပြီး သင့်အား သတိပေးသည်။</translation> <translation id="3714981814255182093">ရှာဖွေမှုဘားတန်းကို ဖွင့်ရန်</translation> <translation id="3716182511346448902">ဤစာမျက်နှာက မှတ်ဉာဏ်အများအပြား အသုံးပြုနေသောကြောင့် Chrome က ၎င်းကို ခေတ္တရပ်ထားပါသည်။</translation> @@ -1067,7 +1068,7 @@ <translation id="7187993566681480880">Chrome တွင် ဘေးကင်းစေပြီး အခြား Google အက်ပ်များတွင် သင်လက်မှတ်ထိုးဝင်ထားသည့်အခါ လုံခြုံရေး ပိုကောင်းမွန်စေရန်လည်း သုံးနိုင်သည်။</translation> <translation id="718926126787620637">လိပ်စာဖိုင်တွဲများစာရင်းကို မြင်ကွင်းအပြည့်ဖွင့်ထားသည်</translation> <translation id="7191430249889272776">တဲဘ်ကို နောက်ခံမှာ ဖွင့်ထား။</translation> -<translation id="7196215469483532480">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်ကို မြင်ကွင်းအပြည့်ဖွင့်ထားသည်</translation> +<translation id="7196215469483532480">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်ကို မြင်ကွင်းအပြည့်ဖွင့်ပြီးပြီ</translation> <translation id="7227218174981371415">{FILE_COUNT,plural, =1{ဒေါင်းလုဒ် ၁ ခုကို စောင့်နေသည်}other{ဒေါင်းလုဒ် # ခုကို စောင့်နေသည်}}</translation> <translation id="7237045078887540010">Chrome အသုံးပြုခြင်းဖြင့် သင်သည် <ph name="BEGIN_TOS_LINK" />Google ဝန်ဆောင်မှုစည်းမျဉ်းများ<ph name="END_TOS_LINK" /> နှင့် <ph name="BEGIN_ATOS_LINK" />Google Chrome နှင့် Chrome OS ထပ်တိုး ဝန်ဆောင်မှုစည်းမျဉ်းများ<ph name="END_ATOS_LINK" /> ကို သဘောတူရာရောက်သည်။ <ph name="BEGIN_PRIVACY_LINK" />ကိုယ်ရေးအချက်အလက်လုံခြုံမှုဆိုင်ရာ မူဝါဒ<ph name="END_PRIVACY_LINK" /> အတွက်လည်း အကျုံးဝင်သည်။</translation> <translation id="7242755609445462077">မြင်သာအောင်လုပ်ခြင်းတွင် ဟန်ပန်ပုံစံထည့်လိုက်သည် <ph name="CURRENT_DATE" /></translation> @@ -1308,7 +1309,7 @@ <translation id="8485434340281759656"><ph name="FILE_SIZE" /> <ph name="SEPARATOR" /> <ph name="DESCRIPTION" /></translation> <translation id="8489271220582375723">မှတ်တမ်းစာမျက်နှာကို ဖွင့်ရန်</translation> <translation id="8493948351860045254">နေရာလွတ်အောင် ပြုလုပ်ပါ</translation> -<translation id="8497480609928300907">ကိုယ်ရေးလုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်</translation> +<translation id="8497480609928300907">ကိုယ်ရေးအချက်အလက်လုံခြုံမှုလမ်းညွှန် ရှင်းလင်းချက်</translation> <translation id="8497726226069778601">ဒီမှာ ကြည့်စရာ ဘာမှ... မရှိသေးပါ</translation> <translation id="8503559462189395349">Chrome စကားဝှက်များ</translation> <translation id="8503813439785031346">အသုံးပြုသူအမည်</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ne.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ne.xtb index 2fd4ada..57013fd7 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ne.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ne.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">तपाईं यो पेजको प्रिभ्यू हेर्दै हुनुहुन्छ</translation> <translation id="3690369331356918524">डेटा चोरीका घटनामा पासवर्डहरू खुलासा हुँदा तपाईंलाई चेतावनी दिन्छ</translation> <translation id="3692944402865947621">भण्डारण स्थान पहुँचयोग्य नहुनाले <ph name="FILE_NAME" /> डाउनलोड गर्न सकिएन।</translation> +<translation id="3699022356773522638">फाइल डाउनलोड गर्ने हो?</translation> <translation id="371230970611282515">खतरनाक घटनाहरू घट्नुअघि नै तिनको पूर्वानुमान गर्छ र तपाईंलाई सोबारे चेतावनी दिन्छ।</translation> <translation id="3714981814255182093">खोजको पट्टी खोल्नुहोस्</translation> <translation id="3716182511346448902">यस पृष्ठले अत्यधिक मेमोरी प्रयोग गर्ने भएकाले Chromium ले यसलाई पज गर्यो।</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ro.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ro.xtb index a77cfa4..86fbb943 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ro.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ro.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Este afișată o previzualizare a acestei pagini</translation> <translation id="3690369331356918524">Te avertizează dacă parolele au fost expuse în urma încălcării securității datelor</translation> <translation id="3692944402865947621">Descărcarea fișierului <ph name="FILE_NAME" /> nu a reușit, deoarece nu se poate contacta locația de stocare.</translation> +<translation id="3699022356773522638">Descarci fișierul?</translation> <translation id="371230970611282515">Anticipează și te avertizează cu privire la evenimente periculoase înainte să aibă loc.</translation> <translation id="3714981814255182093">Deschide Bara de căutare</translation> <translation id="3716182511346448902">Această pagină folosește prea multă memorie, prin urmare Chrome a întrerupt-o.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_sk.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_sk.xtb index 92649fc..ca00262c 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_sk.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_sk.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">Zobrazujete si ukážku tejto stránky</translation> <translation id="3690369331356918524">Upozorňuje pri prezradení hesiel v rámci porušenia ochrany údajov</translation> <translation id="3692944402865947621">Súbor <ph name="FILE_NAME" /> sa nepodarilo stiahnuť, pretože umiestnenie úložiska nie je k dispozícii.</translation> +<translation id="3699022356773522638">Chcete súbor stiahnuť?</translation> <translation id="371230970611282515">Predpovedá nebezpečné udalosti a upozorní vás, než k nim dôjde.</translation> <translation id="3714981814255182093">Otvorenie Panela vyhľadávania</translation> <translation id="3716182511346448902">Táto stránka využíva príliš veľa pamäte, a preto ju Chrome pozastavil.</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-HK.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-HK.xtb index 78272ea..6af6afe2b 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-HK.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_zh-HK.xtb
@@ -462,6 +462,7 @@ <translation id="3687645719033307815">您正在預覽此網頁的預覽畫面</translation> <translation id="3690369331356918524">密碼因資料外洩而被洩露時接收警告</translation> <translation id="3692944402865947621">無法存取儲存位置,因此無法下載 <ph name="FILE_NAME" />。</translation> +<translation id="3699022356773522638">要下載檔案嗎?</translation> <translation id="371230970611282515">在危險事件發生前進行預測並發出警告。</translation> <translation id="3714981814255182093">開啟搜尋列</translation> <translation id="3716182511346448902">這個網頁使用過多記憶體,因此 Chrome 已暫停顯示這個網頁。</translation>
diff --git a/chrome/browser/ui/app_list/app_service/app_service_app_item.cc b/chrome/browser/ui/app_list/app_service/app_service_app_item.cc index 0aff6b4..fa043c2 100644 --- a/chrome/browser/ui/app_list/app_service/app_service_app_item.cc +++ b/chrome/browser/ui/app_list/app_service/app_service_app_item.cc
@@ -140,8 +140,7 @@ } if (in_constructor || app_update.IsPlatformAppChanged()) { - is_platform_app_ = - app_update.IsPlatformApp() == apps::mojom::OptionalBool::kTrue; + is_platform_app_ = app_update.IsPlatformApp().value_or(false); } if (in_constructor || app_update.ReadinessChanged() || @@ -178,7 +177,7 @@ update.AppType() == apps::mojom::AppType::kWeb || update.AppType() == apps::mojom::AppType::kSystemWeb || (update.AppType() == apps::mojom::AppType::kChromeApp && - update.IsPlatformApp() == apps::mojom::OptionalBool::kFalse)) { + update.IsPlatformApp().value_or(true))) { is_active_app = true; } });
diff --git a/chrome/browser/ui/app_list/search/app_search_provider.cc b/chrome/browser/ui/app_list/search/app_search_provider.cc index 1fd7a46..3b48cf5a 100644 --- a/chrome/browser/ui/app_list/search/app_search_provider.cc +++ b/chrome/browser/ui/app_list/search/app_search_provider.cc
@@ -324,7 +324,7 @@ const apps::AppUpdate& update) { if (!apps_util::IsInstalled(update.Readiness()) || (update.ShowInSearch() != apps::mojom::OptionalBool::kTrue && - !(update.Recommendable() == apps::mojom::OptionalBool::kTrue && + !(update.Recommendable().value_or(false) && update.AppType() == apps::mojom::AppType::kBuiltIn))) { return; } @@ -346,11 +346,10 @@ update.InstallTime(), update.InstalledInternally() == apps::mojom::OptionalBool::kTrue)); apps_vector->back()->set_recommendable( - update.Recommendable() == apps::mojom::OptionalBool::kTrue && + update.Recommendable().value_or(false) && update.Paused() != apps::mojom::OptionalBool::kTrue && update.Readiness() != apps::Readiness::kDisabledByPolicy); - apps_vector->back()->set_searchable(update.Searchable() == - apps::mojom::OptionalBool::kTrue); + apps_vector->back()->set_searchable(update.Searchable().value_or(false)); // Until it's been installed, the Crostini Terminal is hidden and // requires a few characters before being shown in search results.
diff --git a/chrome/browser/ui/app_list/search/app_service_app_result.cc b/chrome/browser/ui/app_list/search/app_service_app_result.cc index c760b99..dd3af17d 100644 --- a/chrome/browser/ui/app_list/search/app_service_app_result.cc +++ b/chrome/browser/ui/app_list/search/app_service_app_result.cc
@@ -53,8 +53,7 @@ ->AppRegistryCache() .ForOneApp(app_id, [this](const apps::AppUpdate& update) { app_type_ = update.AppType(); - is_platform_app_ = - update.IsPlatformApp() == apps::mojom::OptionalBool::kTrue; + is_platform_app_ = update.IsPlatformApp().value_or(false); show_in_launcher_ = update.ShowInLauncher() == apps::mojom::OptionalBool::kTrue; @@ -189,7 +188,7 @@ update.AppType() == apps::mojom::AppType::kWeb || update.AppType() == apps::mojom::AppType::kSystemWeb || (update.AppType() == apps::mojom::AppType::kChromeApp && - update.IsPlatformApp() == apps::mojom::OptionalBool::kFalse)) { + update.IsPlatformApp().value_or(true))) { is_active_app = true; } });
diff --git a/chrome/browser/ui/ash/shelf/chrome_shelf_prefs.cc b/chrome/browser/ui/ash/shelf/chrome_shelf_prefs.cc index 623baeb9..020896fa 100644 --- a/chrome/browser/ui/ash/shelf/chrome_shelf_prefs.cc +++ b/chrome/browser/ui/ash/shelf/chrome_shelf_prefs.cc
@@ -673,8 +673,7 @@ apps::AppServiceProxyFactory::GetForProfile(profile_); proxy->AppRegistryCache().ForOneApp( app_id, [&should_run_in_lacros](const apps::AppUpdate& update) { - should_run_in_lacros = - update.IsPlatformApp() == apps::mojom::OptionalBool::kTrue; + should_run_in_lacros = update.IsPlatformApp().value_or(false); }); return should_run_in_lacros; }
diff --git a/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc b/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc index 7b41e0c..af5577d6 100644 --- a/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc +++ b/chrome/browser/ui/ash/shelf/standalone_browser_extension_app_context_menu.cc
@@ -133,8 +133,7 @@ [&allow_app_info, &allow_uninstall](const apps::AppUpdate& update) { allow_app_info = update.ShowInManagement() == apps::mojom::OptionalBool::kTrue; - allow_uninstall = - update.AllowUninstall() == apps::mojom::OptionalBool::kTrue; + allow_uninstall = update.AllowUninstall().value_or(false); }); std::string sync_id =
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h index b2cd8650..f711548 100644 --- a/chrome/browser/ui/browser_dialogs.h +++ b/chrome/browser/ui/browser_dialogs.h
@@ -80,13 +80,6 @@ struct SelectedFileInfo; } // namespace ui -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -namespace web_app { -struct UrlHandlerLaunchParams; -} -#endif - namespace chrome { // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. @@ -207,27 +200,6 @@ WebAppLaunchAcceptanceCallback close_callback); #endif // !BUILDFLAG(IS_ANDROID) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -// Callback that runs when the Web App URL Handler Intent Picker dialog is -// closed. `accepted` is true when the dialog is accepted, false otherwise. -// `launch_params` contains information of the app that is selected to open by -// the user. It is null when the user selects to open the browser. -using WebAppUrlHandlerAcceptanceCallback = base::OnceCallback<void( - bool accepted, - absl::optional<web_app::UrlHandlerLaunchParams> launch_params)>; - -// Shows the Web App URL Handler Intent Picker dialog and runs -// `dialog_close_callback` on closure with the dialog acceptance status and -// information of the user-selected app. `launch_params_list` contains -// information of all the apps to show. `url` is the URL to launch if the -// dialog is accepted by the user. -void ShowWebAppUrlHandlerIntentPickerDialog( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - WebAppUrlHandlerAcceptanceCallback dialog_close_callback); -#endif - // Sets whether |ShowWebAppDialog| should accept immediately without any // user interaction. |auto_open_in_window| sets whether the open in window // checkbox is checked.
diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc index 411f874..1562109 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.cc +++ b/chrome/browser/ui/startup/startup_browser_creator.cc
@@ -126,11 +126,6 @@ #endif // BUILDFLAG(ENABLE_PRINT_PREVIEW) #endif // BUILDFLAG(IS_WIN) -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -#include "chrome/browser/ui/startup/web_app_url_handling_startup_utils.h" -#endif - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #include "chrome/browser/ui/startup/web_app_info_recorder_utils.h" #endif @@ -517,37 +512,6 @@ return false; } -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -bool MaybeLaunchUrlHandlerWebAppFromCmd( - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - chrome::startup::IsProcessStartup process_startup, - chrome::startup::IsFirstRun is_first_run, - StartupProfileInfo profile_info, - const std::vector<Profile*>& last_opened_profiles) { - auto on_urls_unhandled_cb = base::BindOnce( - [](const base::CommandLine& command_line, const base::FilePath& cur_dir, - chrome::startup::IsProcessStartup process_startup, - chrome::startup::IsFirstRun is_first_run, - StartupProfileInfo profile_info, - const std::vector<Profile*>& last_opened_profiles) { - // TODO(crbug.com/1208199): Refactor StartupBrowserCreator and use the - // state struct here. - StartupBrowserCreator startup_browser_creator; - startup_browser_creator.LaunchBrowserForLastProfiles( - command_line, cur_dir, process_startup, is_first_run, profile_info, - last_opened_profiles); - }, - command_line, cur_dir, process_startup, is_first_run, profile_info, - last_opened_profiles); - - return web_app::startup::MaybeLaunchUrlHandlerWebAppFromCmd( - command_line, cur_dir, std::move(on_urls_unhandled_cb), - base::BindOnce(&web_app::startup::FinalizeWebAppLaunch, absl::nullopt, - command_line, is_first_run)); -} -#endif - // These values are persisted to logs. Entries should not be renumbered and // numeric values should never be reused. Updates need to be reflected in // enum IncognitoForcedStart in tools/metrics/histograms/enums.xml. @@ -834,24 +798,6 @@ #endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING) } -#if BUILDFLAG(IS_MAC) -// static -void StartupBrowserCreator::MaybeHandleProfileAgnosticUrls( - const std::vector<GURL>& urls, - base::OnceCallback<void()> on_urls_unhandled_cb) { - chrome::startup::IsFirstRun is_first_run = - first_run::IsChromeFirstRun() ? chrome::startup::IsFirstRun::kYes - : chrome::startup::IsFirstRun::kNo; - - // Web app URL handling. - web_app::startup::MaybeLaunchUrlHandlerWebAppFromUrls( - urls, std::move(on_urls_unhandled_cb), - base::BindOnce(&web_app::startup::FinalizeWebAppLaunch, absl::nullopt, - base::CommandLine(base::CommandLine::NO_PROGRAM), - is_first_run)); -} -#endif // BUILDFLAG(IS_MAC) - // static bool StartupBrowserCreator::ShouldLoadProfileWithoutWindow( const base::CommandLine& command_line) { @@ -1214,22 +1160,9 @@ return true; } - bool handled_as_app = - // Try a web app launch (--app-id is present). - web_app::startup::MaybeHandleWebAppLaunch( - command_line, cur_dir, privacy_safe_profile, is_first_run); - -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) - handled_as_app = handled_as_app || - // Give web apps a chance to handle a URL. - MaybeLaunchUrlHandlerWebAppFromCmd( - command_line, cur_dir, process_startup, is_first_run, - profile_info, last_opened_profiles); -#endif - - // If the app launch succeeded, we don't need to continue with a browser - // launch. - if (handled_as_app) + // Try a web app launch (--app-id is present). + if (web_app::startup::MaybeHandleWebAppLaunch( + command_line, cur_dir, privacy_safe_profile, is_first_run)) return true; LaunchBrowserForLastProfiles(command_line, cur_dir, process_startup,
diff --git a/chrome/browser/ui/startup/startup_browser_creator.h b/chrome/browser/ui/startup/startup_browser_creator.h index 1b77f3a7..a6f6b16d 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.h +++ b/chrome/browser/ui/startup/startup_browser_creator.h
@@ -164,15 +164,6 @@ static void RegisterLocalStatePrefs(PrefRegistrySimple* registry); static void RegisterProfilePrefs(PrefRegistrySimple* registry); -#if BUILDFLAG(IS_MAC) - // Searches for web apps to handle `urls` and prompts the user to pick one. - // Runs `on_urls_unhandled_cb` (either synchronously or asynchronously) if no - // web app is found or selected to open `urls`. - static void MaybeHandleProfileAgnosticUrls( - const std::vector<GURL>& urls, - base::OnceClosure on_urls_unhandled_cb); -#endif - // Returns true if Chrome is intended to load a profile and launch without any // window. static bool ShouldLoadProfileWithoutWindow(
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc index 0ce9d2c..46f22d9c 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -154,14 +154,7 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -#include "chrome/browser/ui/startup/web_app_url_handling_startup_test_utils.h" -#include "chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" -#include "chrome/browser/web_applications/os_integration/url_handler_manager_impl.h" -#include "components/services/app_service/public/cpp/url_handler_info.h" -#include "extensions/browser/extension_dialog_auto_confirm.h" - -using web_app::StartupBrowserWebAppUrlHandlingTest; #endif using testing::Return; @@ -2469,342 +2462,6 @@ #endif // !BUILDFLAG(IS_CHROMEOS_LACROS) #endif // !BUILDFLAG(IS_CHROMEOS_ASH) -// URL Handling tests. -#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogCancelled_NoLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - SetUpCommandlineAndStart(start_url); - - // The waiter will get the dialog when it shows up and close it. - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - - // When dialog is closed, nothing will happen. - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_BrowserLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the first choice, which is the browser. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 0); - SetUpCommandlineAndStart(start_url); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // When dialog is closed, URL will be launched in a browser window. - // Check for new browser window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - Browser* other_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(other_browser); - ASSERT_FALSE( - web_app::AppBrowserController::IsForWebApp(other_browser, app_id)); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_RememberBrowserLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - base::HistogramTester histogram_tester; - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - auto command_line = SetUpCommandLineWithUrl(start_url); - // Get matches before dialog launch. - auto url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(command_line); - - // Select and remember the first choice, which is the browser. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_REMEMBER_OPTION, 0); - Start(command_line); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kBrowserAcceptedAndRememberChoice, - 1); - - // When dialog is closed, URL will be launched in a browser window. - // Check for new browser window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - Browser* other_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(other_browser); - ASSERT_FALSE( - web_app::AppBrowserController::IsForWebApp(other_browser, app_id)); - - // Get matches after dialog is closed. - auto new_url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(command_line); - ASSERT_NE(url_handler_matches, new_url_handler_matches); - // Verify opening in browser is saved as the default choice (i.e. no matches - // found). - ASSERT_TRUE(new_url_handler_matches.empty()); - - // Close the browser window and start with the same command line again. - // Browser should be launched directly. - CloseBrowserSynchronously(other_browser); - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - Start(command_line); - // Verify browser window is launched. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - other_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(other_browser); - ASSERT_FALSE( - web_app::AppBrowserController::IsForWebApp(other_browser, app_id)); - - // Dialog wasn't shown, the total count of dialog state stays the same. - histogram_tester.ExpectTotalCount("WebApp.UrlHandling.DialogState", 1); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_RememberWebAppLaunch) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - base::HistogramTester histogram_tester; - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - auto command_line = SetUpCommandLineWithUrl(start_url); - // Get matches before dialog launch. - auto url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(command_line); - - // Select and remember the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_REMEMBER_OPTION, 1); - Start(command_line); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kAppAcceptedAndRememberChoice, - 1); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(start_url), web_contents->GetVisibleURL()); - - // Get matches after dialog is closed. - auto new_url_handler_matches = - web_app::UrlHandlerManagerImpl::GetUrlHandlerMatches(command_line); - ASSERT_NE(url_handler_matches, new_url_handler_matches); - - // Close the app window and start with the same command line again. App - // should be launched directly. - CloseBrowserSynchronously(app_browser); - ASSERT_EQ(1u, chrome::GetBrowserCount(browser()->profile())); - Start(command_line); - ui_test_utils::WaitForBrowserToOpen(); - // Verify app window is launched. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_WebAppLaunch_InScopeUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 1); - // start_url is in app scope. - SetUpCommandlineAndStart(start_url); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(kStartUrl), web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - DialogAccepted_WebAppLaunch_DifferentOriginUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL("https://example.com")); - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // Select the second choice, which is the app. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 1); - // URL is not in app scope but matches url_handlers of installed app. - constexpr char kTargetUrl[] = "https://example.com/abc/def"; - SetUpCommandlineAndStart(kTargetUrl); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // Check for new app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser; - app_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(app_browser); - ASSERT_TRUE(web_app::AppBrowserController::IsForWebApp(app_browser, app_id)); - - // Out-of-scope URL launch should open new app window and navigate to the - // out-of-scope URL. - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(kTargetUrl), web_contents->GetVisibleURL()); -} - -// TODO(crbug.com/1226532): This test is flaky on Windows. Fix and reenable it. -#if BUILDFLAG(IS_WIN) -#define MAYBE_MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl \ - DISABLED_MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl -#else -#define MAYBE_MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl \ - MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl -#endif - -IN_PROC_BROWSER_TEST_F( - StartupBrowserWebAppUrlHandlingTest, - MAYBE_MultipleProfiles_DialogAccepted_WebAppLaunch_InScopeUrl) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - // Create profiles and install URL Handling apps. - ProfileManager* profile_manager = g_browser_process->profile_manager(); - base::FilePath dest_path = profile_manager->user_data_dir(); - Profile* profile1 = nullptr; - Profile* profile2 = nullptr; - { - base::ScopedAllowBlockingForTesting allow_blocking; - profile1 = profile_manager->GetProfile( - dest_path.Append(FILE_PATH_LITERAL("New Profile 1"))); - ASSERT_TRUE(profile1); - - profile2 = profile_manager->GetProfile( - dest_path.Append(FILE_PATH_LITERAL("New Profile 2"))); - ASSERT_TRUE(profile2); - } - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id_1 = web_app::test::InstallWebAppWithUrlHandlers( - profile1, GURL(start_url), app_name, {url_handler}); - web_app::AppId app_id_2 = web_app::test::InstallWebAppWithUrlHandlers( - profile2, GURL(start_url), app_name, {url_handler}); - - // Test that we should be able to select the 3rd option. - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 2); - // start_url is in app scope for both apps. - SetUpCommandlineAndStart(start_url); - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - - // There should be one app window. No deterministic ordering of apps, so find - // which profile app is launched. - ASSERT_EQ(1u, chrome::GetBrowserCount(profile1) + - chrome::GetBrowserCount(profile2)); - Profile* app_profile = - (chrome::GetBrowserCount(profile1) == 1) ? profile1 : profile2; - Browser* app_browser = chrome::FindBrowserWithProfile(app_profile); - ASSERT_TRUE(app_browser); - ASSERT_TRUE( - web_app::AppBrowserController::IsForWebApp(app_browser, app_id_1) || - web_app::AppBrowserController::IsForWebApp(app_browser, app_id_2)); - - TabStripModel* tab_strip = app_browser->tab_strip_model(); - ASSERT_EQ(1, tab_strip->count()); - content::WebContents* web_contents = tab_strip->GetWebContentsAt(0); - EXPECT_EQ(GURL(kStartUrl), web_contents->GetVisibleURL()); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, - CheckHistogramsFired) { - base::HistogramTester histogram_tester; - - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - "WebAppUrlHandlerIntentPickerView"); - - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL(start_url)); - - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - SetUpCommandlineAndStart(start_url); - - // The waiter will get the dialog when it shows up and close it. - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - - histogram_tester.ExpectTotalCount( - "WebApp.UrlHandling.GetValidProfilesAtStartUp", 1); - histogram_tester.ExpectTotalCount( - "WebApp.UrlHandling.LoadWebAppRegistrarsAtStartUp", 1); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState::kClosed, 1); -} - -IN_PROC_BROWSER_TEST_F(StartupBrowserWebAppUrlHandlingTest, UrlNotCaptured) { - apps::UrlHandlerInfo url_handler; - url_handler.origin = url::Origin::Create(GURL("https://example.com")); - web_app::AppId app_id = InstallWebAppWithUrlHandlers({url_handler}); - - // This URL is not in scope of installed app and does not match url_handlers. - SetUpCommandlineAndStart("https://en.example.com/abc/def"); - - // Check that new window is not app window. - ASSERT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); - ASSERT_FALSE(web_app::AppBrowserController::IsForWebApp(browser(), app_id)); - Browser* other_browser = FindOneOtherBrowser(browser()); - ASSERT_TRUE(other_browser); - ASSERT_FALSE( - web_app::AppBrowserController::IsForWebApp(other_browser, app_id)); -} -#endif - #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) class StartupBrowserWebAppProtocolHandlingTest : public InProcessBrowserTest {
diff --git a/chrome/browser/ui/startup/web_app_url_handling_startup_test_utils.h b/chrome/browser/ui/startup/web_app_url_handling_startup_test_utils.h deleted file mode 100644 index 9db66c9..0000000 --- a/chrome/browser/ui/startup/web_app_url_handling_startup_test_utils.h +++ /dev/null
@@ -1,60 +0,0 @@ -// Copyright 2021 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_STARTUP_WEB_APP_URL_HANDLING_STARTUP_TEST_UTILS_H_ -#define CHROME_BROWSER_UI_STARTUP_WEB_APP_URL_HANDLING_STARTUP_TEST_UTILS_H_ - -#include <memory> -#include <string> -#include <vector> - -#include "base/test/scoped_feature_list.h" -#include "chrome/browser/web_applications/test/fake_web_app_provider.h" -#include "chrome/browser/web_applications/web_app_id.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "components/services/app_service/public/cpp/url_handler_info.h" - -namespace base { -class CommandLine; -} - -namespace views { -class Widget; -} - -class KeyedService; -class Profile; - -namespace web_app { - -class StartupBrowserWebAppUrlHandlingTest : public InProcessBrowserTest { - protected: - StartupBrowserWebAppUrlHandlingTest(); - ~StartupBrowserWebAppUrlHandlingTest() override; - - AppId InstallWebAppWithUrlHandlers( - const std::vector<apps::UrlHandlerInfo>& url_handlers); - - base::CommandLine SetUpCommandLineWithUrl(const std::string& url); - - void Start(const base::CommandLine& command_line); - - void SetUpCommandlineAndStart(const std::string& url); - - void AutoCloseDialog(views::Widget* widget); - - std::string start_url; - std::u16string app_name; - - private: - static std::unique_ptr<KeyedService> CreateFakeWebAppProvider( - Profile* profile); - - FakeWebAppProviderCreator fake_web_app_provider_creator_; - base::test::ScopedFeatureList scoped_feature_list_; -}; - -} // namespace web_app - -#endif // CHROME_BROWSER_UI_STARTUP_WEB_APP_URL_HANDLING_STARTUP_TEST_UTILS_H_
diff --git a/chrome/browser/ui/startup/web_app_url_handling_startup_utils.cc b/chrome/browser/ui/startup/web_app_url_handling_startup_utils.cc deleted file mode 100644 index 5da700b..0000000 --- a/chrome/browser/ui/startup/web_app_url_handling_startup_utils.cc +++ /dev/null
@@ -1,159 +0,0 @@ -// Copyright 2021 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/startup/web_app_url_handling_startup_utils.h" - -#include <utility> -#include <vector> - -#include "base/command_line.h" -#include "base/files/file_path.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/apps/app_service/browser_app_launcher.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/first_run/first_run.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_dialogs.h" -#include "chrome/browser/ui/browser_finder.h" -#include "chrome/browser/ui/browser_window.h" -#include "chrome/browser/ui/startup/startup_browser_creator.h" -#include "chrome/browser/ui/startup/startup_browser_creator_impl.h" -#include "chrome/browser/web_applications/os_integration/url_handler_manager_impl.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "chrome/common/chrome_switches.h" -#include "third_party/abseil-cpp/absl/types/optional.h" -#include "url/gurl.h" - -namespace web_app { - -namespace { - -void LaunchApp(const base::FilePath& profile_path, - const AppId& app_id, - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - const GURL& url, - startup::FinalizeWebAppLaunchCallback callback) { - apps::AppServiceProxyFactory::GetForProfile( - g_browser_process->profile_manager()->GetProfile(profile_path)) - ->BrowserAppLauncher() - ->LaunchAppWithCallback(app_id, command_line, cur_dir, url, - /*protocol_handler_launch_url=*/absl::nullopt, - /*launch_files=*/{}, std::move(callback)); -} - -void OnUrlHandlerIntentPickerDialogCompleted( - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - base::OnceClosure on_urls_unhandled_cb, - startup::FinalizeWebAppLaunchCallback app_launched_callback, - bool accepted, - absl::optional<UrlHandlerLaunchParams> selected_match) { - // Dialog is not accepted. Quit the process and do nothing. - if (!accepted) - return; - - if (selected_match.has_value()) { - // The user has selected an app to handle the URL. - LaunchApp(selected_match->profile_path, selected_match->app_id, - command_line, cur_dir, selected_match->url, - std::move(app_launched_callback)); - } else { - // The user has selected the browser. Open the link in the browser. - std::move(on_urls_unhandled_cb).Run(); - } -} - -bool ShouldLaunchSavedChoice( - const std::vector<UrlHandlerLaunchParams>& url_handler_matches) { - return url_handler_matches.size() == 1 && - url_handler_matches.front().saved_choice == - UrlHandlerSavedChoice::kInApp; -} - -void LaunchSavedChoice( - const std::vector<UrlHandlerLaunchParams>& url_handler_matches, - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - startup::FinalizeWebAppLaunchCallback app_launched_callback) { - // Default choice found. The first match returned is the saved choice, - // which should be launched directly. Do not show the dialog. - const UrlHandlerLaunchParams& saved_choice = url_handler_matches.front(); - LaunchApp(saved_choice.profile_path, saved_choice.app_id, command_line, - cur_dir, saved_choice.url, std::move(app_launched_callback)); -} - -// Returns true if `url` is handled, either by launching an app or showing a -// dialog with all matching URL Handling apps. Returns false otherwise. -// If `should_process_unhandled_url` is true, `on_urls_unhandled_cb` will be -// run to handle `url`. -bool MaybeHandleUrl( - const GURL& url, - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - bool should_process_unhandled_url, - base::OnceClosure on_urls_unhandled_cb, - startup::FinalizeWebAppLaunchCallback app_launched_callback) { - auto matches = UrlHandlerManagerImpl::GetUrlHandlerMatches(url); - if (matches.empty()) { - if (should_process_unhandled_url) - std::move(on_urls_unhandled_cb).Run(); - return false; - } - - if (ShouldLaunchSavedChoice(matches)) { - // TODO(crbug.com/1217419): Verify if site permission is enabled. - LaunchSavedChoice(matches, command_line, cur_dir, - std::move(app_launched_callback)); - return true; - } - - chrome::ShowWebAppUrlHandlerIntentPickerDialog( - url, std::move(matches), - base::BindOnce(&OnUrlHandlerIntentPickerDialogCompleted, command_line, - cur_dir, std::move(on_urls_unhandled_cb), - std::move(app_launched_callback))); - return true; -} - -} // namespace - -namespace startup { - -bool MaybeLaunchUrlHandlerWebAppFromCmd( - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - base::OnceClosure on_urls_unhandled_cb, - FinalizeWebAppLaunchCallback app_launched_callback) { - absl::optional<GURL> url = - UrlHandlerManagerImpl::GetUrlFromCommandLine(command_line); - if (!url) - return false; - - return MaybeHandleUrl(url.value(), command_line, cur_dir, - /*should_process_unhandled_url=*/false, - std::move(on_urls_unhandled_cb), - std::move(app_launched_callback)); -} - -void MaybeLaunchUrlHandlerWebAppFromUrls( - const std::vector<GURL>& urls, - base::OnceClosure on_urls_unhandled_cb, - FinalizeWebAppLaunchCallback app_launched_callback) { - if (urls.size() != 1) { - std::move(on_urls_unhandled_cb).Run(); - return; - } - - MaybeHandleUrl(urls.front(), base::CommandLine(base::CommandLine::NO_PROGRAM), - base::FilePath(), /*should_process_unhandled_url=*/true, - std::move(on_urls_unhandled_cb), - std::move(app_launched_callback)); -} - -} // namespace startup -} // namespace web_app
diff --git a/chrome/browser/ui/startup/web_app_url_handling_startup_utils.h b/chrome/browser/ui/startup/web_app_url_handling_startup_utils.h deleted file mode 100644 index c1b72ec..0000000 --- a/chrome/browser/ui/startup/web_app_url_handling_startup_utils.h +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2021 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_STARTUP_WEB_APP_URL_HANDLING_STARTUP_UTILS_H_ -#define CHROME_BROWSER_UI_STARTUP_WEB_APP_URL_HANDLING_STARTUP_UTILS_H_ - -#include <vector> - -#include "base/callback.h" -#include "components/services/app_service/public/mojom/types.mojom.h" - -namespace base { -class CommandLine; -class FilePath; -} // namespace base - -class Browser; -class GURL; - -namespace web_app { -namespace startup { - -using FinalizeWebAppLaunchCallback = - base::OnceCallback<void(Browser* browser, - apps::mojom::LaunchContainer container)>; - -// If `command_line` contains a single URL argument and that URL matches URL -// handling registration from installed web apps, show app options to user and -// launch one if accepted. -// Returns true if matching web apps are found, false otherwise. -bool MaybeLaunchUrlHandlerWebAppFromCmd( - const base::CommandLine& command_line, - const base::FilePath& cur_dir, - base::OnceClosure on_urls_unhandled_cb, - FinalizeWebAppLaunchCallback app_launched_callback); - -// Checks if `urls` contains a single URL that can be handled by installed web -// app URL handlers, show app options to user and launch one if accepted. -// Otherwise, run `on_urls_unhandled_cb` to open `urls` in the browser. -void MaybeLaunchUrlHandlerWebAppFromUrls( - const std::vector<GURL>& urls, - base::OnceClosure on_urls_unhandled_cb, - FinalizeWebAppLaunchCallback app_launched_callback); - -} // namespace startup -} // namespace web_app - -#endif // CHROME_BROWSER_UI_STARTUP_WEB_APP_URL_HANDLING_STARTUP_UTILS_H_
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.cc b/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.cc deleted file mode 100644 index d6d086b..0000000 --- a/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.cc +++ /dev/null
@@ -1,75 +0,0 @@ -// Copyright 2021 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/web_apps/web_app_url_handler_hover_button.h" - -#include <string> -#include <utility> - -#include "chrome/browser/ui/views/web_apps/web_app_hover_button.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "chrome/browser/web_applications/web_app_id.h" -#include "chrome/browser/web_applications/web_app_provider.h" -#include "chrome/grit/chromium_strings.h" -#include "chrome/grit/generated_resources.h" -#include "chrome/grit/theme_resources.h" -#include "ui/accessibility/ax_enums.mojom.h" -#include "ui/accessibility/ax_node_data.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/base/resource/resource_bundle.h" -#include "ui/views/controls/button/button.h" -#include "url/gurl.h" - -WebAppUrlHandlerHoverButton::WebAppUrlHandlerHoverButton( - views::Button::PressedCallback callback, - const web_app::UrlHandlerLaunchParams& url_handler_launch_params, - web_app::WebAppProvider* provider, - const std::u16string& display_name, - const GURL& app_start_url) - : WebAppHoverButton(std::move(callback), - url_handler_launch_params.app_id, - provider, - display_name, - app_start_url), - url_handler_launch_params_(url_handler_launch_params), - is_app_(true) {} - -WebAppUrlHandlerHoverButton::WebAppUrlHandlerHoverButton( - views::Button::PressedCallback callback) - : WebAppHoverButton( - std::move(callback), - *(ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( - IDR_PRODUCT_LOGO_32)), - l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)), - is_app_(false) {} - -WebAppUrlHandlerHoverButton::~WebAppUrlHandlerHoverButton() = default; - -void WebAppUrlHandlerHoverButton::GetAccessibleNodeData( - ui::AXNodeData* node_data) { - WebAppHoverButton::GetAccessibleNodeData(node_data); - node_data->role = ax::mojom::Role::kRadioButton; - const ax::mojom::CheckedState checked_state = - selected() ? ax::mojom::CheckedState::kTrue - : ax::mojom::CheckedState::kFalse; - node_data->SetCheckedState(checked_state); -} - -void WebAppUrlHandlerHoverButton::MarkAsSelected(const ui::Event* event) { - WebAppHoverButton::MarkAsSelected(event); - selected_ = true; - NotifyAccessibilityEvent(ax::mojom::Event::kStateChanged, - /*send_native_event=*/true); -} - -void WebAppUrlHandlerHoverButton::MarkAsUnselected(const ui::Event* event) { - WebAppHoverButton::MarkAsUnselected(event); - selected_ = false; - NotifyAccessibilityEvent(ax::mojom::Event::kStateChanged, - /*send_native_event=*/true); -} - -BEGIN_METADATA(WebAppUrlHandlerHoverButton, WebAppHoverButton) -END_METADATA
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.h b/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.h deleted file mode 100644 index 08feee6..0000000 --- a/chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.h +++ /dev/null
@@ -1,83 +0,0 @@ -// Copyright 2021 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_WEB_APPS_WEB_APP_URL_HANDLER_HOVER_BUTTON_H_ -#define CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_URL_HANDLER_HOVER_BUTTON_H_ - -#include <string> - -#include "base/memory/weak_ptr.h" -#include "chrome/browser/ui/views/web_apps/web_app_hover_button.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "ui/base/metadata/metadata_header_macros.h" -#include "ui/views/controls/button/button.h" -#include "ui/views/metadata/view_factory.h" - -class GURL; - -namespace web_app { -class WebAppProvider; -} - -// WebAppUrlHandlerHoverButton is a hoverable button with a primary left-hand -// icon, a title and a subtitle. -class WebAppUrlHandlerHoverButton : public WebAppHoverButton { - public: - METADATA_HEADER(WebAppUrlHandlerHoverButton); - // Creates a hoverable button with the given elements for an app, like so: - // - // +-------------------------------------------------------------------+ - // | | title | - // | icon | | - // | | subtitle | - // +-------------------------------------------------------------------+ - // - WebAppUrlHandlerHoverButton( - views::Button::PressedCallback callback, - const web_app::UrlHandlerLaunchParams& url_handler_launch_params, - web_app::WebAppProvider* provider, - const std::u16string& display_name, - const GURL& app_start_url); - - // Creates a hoverable button for the browser option, like so: - // - // +-------------------------------------------------------------------+ - // | | | - // | icon | title | - // | | | - // +-------------------------------------------------------------------+ - // - explicit WebAppUrlHandlerHoverButton(views::Button::PressedCallback callback); - WebAppUrlHandlerHoverButton(const WebAppUrlHandlerHoverButton&) = delete; - WebAppUrlHandlerHoverButton& operator=(const WebAppUrlHandlerHoverButton&) = - delete; - ~WebAppUrlHandlerHoverButton() override; - - void MarkAsSelected(const ui::Event* event) override; - void MarkAsUnselected(const ui::Event* event) override; - - const web_app::UrlHandlerLaunchParams& url_handler_launch_params() const { - return url_handler_launch_params_; - } - - bool is_app() const { return is_app_; } - bool selected() { return selected_; } - - // views::View: - void GetAccessibleNodeData(ui::AXNodeData* node_data) override; - - private: - const web_app::UrlHandlerLaunchParams url_handler_launch_params_; - // True if the current WebAppUrlHandlerHoverButton is for an app, false if - // it's for the browser. - const bool is_app_; - bool selected_ = false; -}; - -BEGIN_VIEW_BUILDER(, WebAppUrlHandlerHoverButton, WebAppHoverButton) -END_VIEW_BUILDER - -DEFINE_VIEW_BUILDER(, WebAppUrlHandlerHoverButton) - -#endif // CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_URL_HANDLER_HOVER_BUTTON_H_
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc b/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc deleted file mode 100644 index 805fee5f..0000000 --- a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc +++ /dev/null
@@ -1,302 +0,0 @@ -// Copyright 2021 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 <utility> -#include <vector> - -#include "base/callback_helpers.h" -#include "base/containers/flat_set.h" -#include "base/files/file_path.h" -#include "base/test/bind.h" -#include "base/test/metrics/histogram_tester.h" -#include "base/test/mock_callback.h" -#include "base/time/time.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/browser_dialogs.h" -#include "chrome/browser/ui/test/test_browser_dialog.h" -#include "chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h" -#include "chrome/browser/web_applications/os_integration/os_integration_manager.h" -#include "chrome/browser/web_applications/os_integration/url_handler_manager.h" -#include "chrome/browser/web_applications/test/web_app_install_test_utils.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "chrome/browser/web_applications/web_app_id.h" -#include "chrome/browser/web_applications/web_app_install_info.h" -#include "chrome/browser/web_applications/web_app_provider.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "components/keep_alive_registry/keep_alive_types.h" -#include "components/keep_alive_registry/scoped_keep_alive.h" -#include "content/public/test/browser_test.h" -#include "extensions/browser/extension_dialog_auto_confirm.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "third_party/abseil-cpp/absl/types/optional.h" -#include "ui/gfx/geometry/size.h" -#include "ui/views/controls/button/label_button.h" -#include "ui/views/test/dialog_test.h" -#include "ui/views/widget/any_widget_observer.h" -#include "ui/views/widget/widget.h" -#include "ui/views/widget/widget_delegate.h" -#include "ui/views/window/dialog_delegate.h" -#include "url/gurl.h" - -namespace { - -const char16_t kAppName[] = u"Test App"; -const char kStartUrl[] = "https://test.com"; -const char kViewClassName[] = "WebAppUrlHandlerIntentPickerView"; - -std::vector<web_app::UrlHandlerLaunchParams> CreateUrlHandlerLaunchParams( - const base::FilePath& profile_path, - const web_app::AppId& app_id) { - std::vector<web_app::UrlHandlerLaunchParams> url_handler_matches; - url_handler_matches.emplace_back(profile_path, app_id, GURL(kStartUrl), - web_app::UrlHandlerSavedChoice::kNone, - base::Time::Now()); - return url_handler_matches; -} - -web_app::AppId InstallTestWebApp(Profile* profile) { - auto app_info = std::make_unique<WebAppInstallInfo>(); - app_info->start_url = GURL(kStartUrl); - app_info->title = kAppName; - app_info->user_display_mode = blink::mojom::DisplayMode::kStandalone; - return web_app::test::InstallWebApp(profile, std::move(app_info)); -} - -views::DialogDelegate* DialogDelegateFor(views::Widget* widget) { - auto* delegate = widget->widget_delegate()->AsDialogDelegate(); - return delegate; -} - -void AutoCloseDialog(views::Widget* widget) { - // Call CancelDialog to close the dialog, but the actual behavior will be - // determined by the ScopedTestDialogAutoConfirm configs. - views::test::CancelDialog(widget); -} - -} // namespace - -class WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest - : public InProcessBrowserTest {}; - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest, - ShowWebAppUrlHandlerIntentPickerDialog) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - kViewClassName); - base::HistogramTester histogram_tester; - web_app::AppId test_app_id = InstallTestWebApp(browser()->profile()); - - base::MockCallback<chrome::WebAppUrlHandlerAcceptanceCallback> - show_dialog_callback; - absl::optional<web_app::UrlHandlerLaunchParams> result_launch_params; - bool dialog_accepted; - ON_CALL(show_dialog_callback, Run) - .WillByDefault([&](bool accepted, - absl::optional<web_app::UrlHandlerLaunchParams> data) { - dialog_accepted = accepted; - result_launch_params = data; - }); - EXPECT_CALL(show_dialog_callback, Run); - - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, KeepAliveRestartOption::DISABLED); - WebAppUrlHandlerIntentPickerView::Show( - GURL(kStartUrl), - CreateUrlHandlerLaunchParams(browser()->profile()->GetPath(), - test_app_id), - std::move(keep_alive), show_dialog_callback.Get()); - - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - EXPECT_FALSE(dialog_accepted); - EXPECT_FALSE(result_launch_params.has_value()); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState::kClosed, 1); -} - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest, - OpenIsDisabledByDefault) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - kViewClassName); - base::HistogramTester histogram_tester; - web_app::AppId test_app_id = InstallTestWebApp(browser()->profile()); - - base::MockCallback<chrome::WebAppUrlHandlerAcceptanceCallback> - show_dialog_callback; - absl::optional<web_app::UrlHandlerLaunchParams> result_launch_params; - bool dialog_accepted; - ON_CALL(show_dialog_callback, Run) - .WillByDefault([&](bool accepted, - absl::optional<web_app::UrlHandlerLaunchParams> data) { - dialog_accepted = accepted; - result_launch_params = data; - }); - EXPECT_CALL(show_dialog_callback, Run); - - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::CANCEL); - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, KeepAliveRestartOption::DISABLED); - WebAppUrlHandlerIntentPickerView::Show( - GURL(kStartUrl), - CreateUrlHandlerLaunchParams(browser()->profile()->GetPath(), - test_app_id), - std::move(keep_alive), show_dialog_callback.Get()); - - auto* widget = waiter.WaitIfNeededAndGet(); - auto* dialog_delegate = DialogDelegateFor(widget); - // Verify "Open" button is disabled by default. - EXPECT_FALSE(dialog_delegate->GetOkButton()->GetEnabled()); - AutoCloseDialog(widget); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState::kClosed, 1); -} - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest, - SelectBrowser) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - kViewClassName); - base::HistogramTester histogram_tester; - web_app::AppId test_app_id = InstallTestWebApp(browser()->profile()); - - base::MockCallback<chrome::WebAppUrlHandlerAcceptanceCallback> - show_dialog_callback; - absl::optional<web_app::UrlHandlerLaunchParams> result_launch_params; - bool dialog_accepted; - ON_CALL(show_dialog_callback, Run) - .WillByDefault([&](bool accepted, - absl::optional<web_app::UrlHandlerLaunchParams> data) { - dialog_accepted = accepted; - result_launch_params = data; - }); - EXPECT_CALL(show_dialog_callback, Run); - - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 0); - auto launch_params_list = CreateUrlHandlerLaunchParams( - browser()->profile()->GetPath(), test_app_id); - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, KeepAliveRestartOption::DISABLED); - WebAppUrlHandlerIntentPickerView::Show(GURL(kStartUrl), launch_params_list, - std::move(keep_alive), - show_dialog_callback.Get()); - - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - EXPECT_TRUE(dialog_accepted); - EXPECT_FALSE(result_launch_params.has_value()); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kBrowserAcceptedNoRememberChoice, - 1); -} - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest, - SelectApp) { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - kViewClassName); - base::HistogramTester histogram_tester; - web_app::AppId test_app_id = InstallTestWebApp(browser()->profile()); - - base::MockCallback<chrome::WebAppUrlHandlerAcceptanceCallback> - show_dialog_callback; - absl::optional<web_app::UrlHandlerLaunchParams> result_launch_params; - bool dialog_accepted; - ON_CALL(show_dialog_callback, Run) - .WillByDefault([&](bool accepted, - absl::optional<web_app::UrlHandlerLaunchParams> data) { - dialog_accepted = accepted; - result_launch_params = data; - }); - EXPECT_CALL(show_dialog_callback, Run); - - extensions::ScopedTestDialogAutoConfirm auto_confirm( - extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION, 1); - auto launch_params_list = CreateUrlHandlerLaunchParams( - browser()->profile()->GetPath(), test_app_id); - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, KeepAliveRestartOption::DISABLED); - WebAppUrlHandlerIntentPickerView::Show(GURL(kStartUrl), launch_params_list, - std::move(keep_alive), - show_dialog_callback.Get()); - - AutoCloseDialog(waiter.WaitIfNeededAndGet()); - // Select the second choice - the app. - EXPECT_TRUE(dialog_accepted); - EXPECT_EQ(result_launch_params, launch_params_list[0]); - histogram_tester.ExpectUniqueSample( - "WebApp.UrlHandling.DialogState", - WebAppUrlHandlerIntentPickerView::DialogState:: - kAppAcceptedNoRememberChoice, - 1); -} - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInProcessBrowserTest, - FilterOutInvalidProfiles) { - // Test valid profile path is kept. - base::FilePath current_profile_path = browser()->profile()->GetPath(); - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list = - CreateUrlHandlerLaunchParams(current_profile_path, "app id 1"); - auto valid_profiles = - WebAppUrlHandlerIntentPickerView::GetUrlHandlingValidProfiles( - launch_params_list); - EXPECT_EQ(1u, valid_profiles.size()); - EXPECT_EQ(1u, launch_params_list.size()); - EXPECT_EQ(launch_params_list.front().profile_path, current_profile_path); - - // Add an invalid profile path. - launch_params_list.emplace_back( - current_profile_path.Append(FILE_PATH_LITERAL("Nonexistent")), "app id 2", - GURL(kStartUrl), web_app::UrlHandlerSavedChoice::kNone, - base::Time::Now()); - // Verify the invalid profile is not returned. - auto new_valid_profiles = - WebAppUrlHandlerIntentPickerView::GetUrlHandlingValidProfiles( - launch_params_list); - EXPECT_EQ(1u, launch_params_list.size()); - EXPECT_EQ(1u, new_valid_profiles.size()); - EXPECT_EQ(valid_profiles, new_valid_profiles); -} - -class WebAppUrlHandlerIntentPickerDialogInteractiveBrowserTest - : public DialogBrowserTest { - public: - // DialogBrowserTest: - void ShowUi(const std::string& name) override { - views::NamedWidgetShownWaiter waiter(views::test::AnyWidgetTestPasskey{}, - kViewClassName); - - web_app::AppId test_app_id = InstallTestWebApp(browser()->profile()); - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, - KeepAliveRestartOption::DISABLED); - WebAppUrlHandlerIntentPickerView::Show( - GURL(kStartUrl), - CreateUrlHandlerLaunchParams(browser()->profile()->GetPath(), - test_app_id), - std::move(keep_alive), base::DoNothing()); - if (should_close_) { - waiter.WaitIfNeededAndGet()->CloseWithReason( - views::Widget::ClosedReason::kEscKeyPressed); - } - } - - protected: - bool should_close_ = true; -}; - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInteractiveBrowserTest, - InvokeUi_CloseDialog) { - ShowAndVerifyUi(); -} - -IN_PROC_BROWSER_TEST_F(WebAppUrlHandlerIntentPickerDialogInteractiveBrowserTest, - InvokeUi_default) { - should_close_ = false; - ShowAndVerifyUi(); -}
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.cc b/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.cc deleted file mode 100644 index e148538..0000000 --- a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.cc +++ /dev/null
@@ -1,463 +0,0 @@ -// Copyright 2021 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/web_apps/web_app_url_handler_intent_picker_dialog_view.h" - -#include <functional> -#include <memory> -#include <string> -#include <utility> -#include <vector> - -#include "base/barrier_closure.h" -#include "base/bind.h" -#include "base/callback.h" -#include "base/check.h" -#include "base/compiler_specific.h" -#include "base/containers/flat_set.h" -#include "base/feature_list.h" -#include "base/location.h" -#include "base/metrics/histogram_functions.h" -#include "base/stl_util.h" -#include "base/strings/string_piece.h" -#include "base/strings/utf_string_conversions.h" -#include "base/timer/elapsed_timer.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/profiles/profile.h" -#include "chrome/browser/profiles/profile_attributes_storage.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/profiles/profiles_state.h" -#include "chrome/browser/ui/browser_dialogs.h" -#include "chrome/browser/ui/views/chrome_layout_provider.h" -#include "chrome/browser/ui/views/web_apps/web_app_url_handler_hover_button.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "chrome/browser/web_applications/url_handler_prefs.h" -#include "chrome/browser/web_applications/web_app_provider.h" -#include "chrome/browser/web_applications/web_app_registrar.h" -#include "chrome/grit/generated_resources.h" -#include "components/keep_alive_registry/keep_alive_types.h" -#include "components/keep_alive_registry/scoped_keep_alive.h" -#include "extensions/browser/extension_dialog_auto_confirm.h" -#include "third_party/abseil-cpp/absl/types/optional.h" -#include "third_party/blink/public/common/features.h" -#include "third_party/skia/include/core/SkColor.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/base/ui_base_types.h" -#include "ui/color/color_id.h" -#include "ui/events/event.h" -#include "ui/gfx/geometry/insets.h" -#include "ui/gfx/geometry/size.h" -#include "ui/views/accessibility/view_accessibility.h" -#include "ui/views/border.h" -#include "ui/views/controls/button/checkbox.h" -#include "ui/views/controls/scroll_view.h" -#include "ui/views/controls/separator.h" -#include "ui/views/layout/box_layout.h" -#include "ui/views/layout/box_layout_view.h" -#include "ui/views/view.h" -#include "ui/views/view_class_properties.h" -#include "ui/views/widget/widget.h" -#include "ui/views/window/dialog_delegate.h" -#include "url/gurl.h" - -namespace { - -// Maximum numbers of web apps we want to show at a time in the dialog. -// The height of the scroll in the dialog depends on how many app -// candidates we got and how many we want to show. If there is more than -// |KMaxAppResults| app candidates, we will show 3.5 apps to let the user -// know there are more than |kMaxAppResults| apps accessible by scrolling -// the list. -constexpr size_t kMaxAppResults = 3; -// This dialog follows the design that -// chrome/browser/ui/views/intent_picker_bubble_view.cc created and the -// main component sizes were also mostly copied over to share the -// same layout. -// Main components sizes -constexpr int kMaxIntentPickerWidth = 320; -constexpr int kRowHeight = 32; -constexpr int kTitlePadding = 16; -constexpr gfx::Insets kSeparatorPadding(0, 0, 16, 0); - -void RecordDialogState( - WebAppUrlHandlerIntentPickerView::DialogState dialog_state) { - base::UmaHistogramEnumeration("WebApp.UrlHandling.DialogState", dialog_state); -} - -} // namespace - -// static -base::flat_set<Profile*> -WebAppUrlHandlerIntentPickerView::GetUrlHandlingValidProfiles( - std::vector<web_app::UrlHandlerLaunchParams>& launch_params_list) { - ProfileManager* const profile_manager = g_browser_process->profile_manager(); - if (!profile_manager) - return {}; - - std::vector<Profile*> profiles; - // A predicate function for base::EraseIf that returns true if `params` - // references an invalid Profile. Otherwise, adds the corresponding profile to - // `profiles` and returns false. - // TODO(crbug.com/1217419): Verify if site permission is enabled. - auto remove_pred = [profile_manager, &profiles]( - const web_app::UrlHandlerLaunchParams& params) { - if (!profile_manager->GetProfileAttributesStorage() - .GetProfileAttributesWithPath(params.profile_path)) { - return true; // Profile deleted or path otherwise invalid. - } - - Profile* const profile = profile_manager->GetProfile(params.profile_path); - if (!profile) - return true; // Failed to load profile. - - profiles.push_back(profile); - return false; - }; - - profiles.reserve(launch_params_list.size()); - base::ElapsedTimer timer; - base::EraseIf(launch_params_list, std::move(remove_pred)); - base::UmaHistogramMicrosecondsTimes( - "WebApp.UrlHandling.GetValidProfilesAtStartUp", timer.Elapsed()); - return std::move(profiles); -} - -void WebAppUrlHandlerIntentPickerView::Show( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - std::unique_ptr<ScopedKeepAlive> keep_alive, - chrome::WebAppUrlHandlerAcceptanceCallback dialog_close_callback) { - auto view = std::make_unique<WebAppUrlHandlerIntentPickerView>( - url, std::move(launch_params_list), std::move(keep_alive), - std::move(dialog_close_callback)); - - views::DialogDelegate::CreateDialogWidget(std::move(view), - /*context=*/nullptr, - /*parent=*/nullptr) - ->Show(); -} - -WebAppUrlHandlerIntentPickerView::WebAppUrlHandlerIntentPickerView( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - std::unique_ptr<ScopedKeepAlive> keep_alive, - chrome::WebAppUrlHandlerAcceptanceCallback dialog_close_callback) - : url_(url), - launch_params_list_(std::move(launch_params_list)), - close_callback_(std::move(dialog_close_callback)), - // Pass the ScopedKeepAlive into here ensures the process is alive until - // the dialog is closed, and initiates the shutdown at closure if there - // is nothing else keeping the browser alive. - keep_alive_(std::move(keep_alive)) { - SetDefaultButton(ui::DIALOG_BUTTON_OK); - // Disable the open button by default and enable it when the user has - // selected an option. - SetButtonEnabled(ui::DIALOG_BUTTON_OK, false); - SetModalType(ui::MODAL_TYPE_NONE); - std::u16string title = - l10n_util::GetStringUTF16(IDS_URL_HANDLER_INTENT_PICKER_TITLE); - SetTitle(title); - SetShowCloseButton(true); - - SetButtonLabel( - ui::DIALOG_BUTTON_OK, - l10n_util::GetStringUTF16(IDS_URL_HANDLER_INTENT_PICKER_OK_BUTTON_TEXT)); - - SetAcceptCallback(base::BindOnce( - &WebAppUrlHandlerIntentPickerView::OnAccepted, base::Unretained(this))); - - SetCancelCallback(base::BindOnce( - &WebAppUrlHandlerIntentPickerView::OnCanceled, base::Unretained(this))); - - SetCloseCallback(base::BindOnce(&WebAppUrlHandlerIntentPickerView::OnClosed, - base::Unretained(this))); - Initialize(); -} - -WebAppUrlHandlerIntentPickerView::~WebAppUrlHandlerIntentPickerView() = default; - -gfx::Size WebAppUrlHandlerIntentPickerView::CalculatePreferredSize() const { - return gfx::Size(kMaxIntentPickerWidth, - GetHeightForWidth(kMaxIntentPickerWidth)); -} - -absl::optional<web_app::UrlHandlerLaunchParams> -WebAppUrlHandlerIntentPickerView::GetSelectedLaunchParams() const { - // User didn't make a choice, no launch params. - if (!HasUserSelectedApp()) - return absl::nullopt; - - DCHECK(IsSelectedAppValid()); - - if (hover_buttons_[selected_app_tag_.value()]->is_app()) { - return hover_buttons_[selected_app_tag_.value()] - ->url_handler_launch_params(); - } - - // User has selected the browser, no launch params. - return absl::nullopt; -} - -void WebAppUrlHandlerIntentPickerView::SetSelectedAppIndex( - size_t index, - const ui::Event& event) { - DCHECK_GE(index, 0u); - DCHECK_LT(index, hover_buttons_.size()); - if (!HasUserSelectedApp()) { - // User made a choice for the first time, enable the open button. - SetButtonEnabled(ui::DIALOG_BUTTON_OK, true); - } else { - // Unselect the previous user choice. - hover_buttons_[selected_app_tag_.value()]->MarkAsUnselected(nullptr); - } - selected_app_tag_ = index; - hover_buttons_[selected_app_tag_.value()]->MarkAsSelected(&event); - views::View::RequestFocus(); -} - -void WebAppUrlHandlerIntentPickerView::OnAccepted() { - RunCloseCallback(/*accepted=*/true); -} - -void WebAppUrlHandlerIntentPickerView::OnCanceled() { - RunCloseCallback(/*accepted=*/false); -} - -void WebAppUrlHandlerIntentPickerView::OnClosed() { - OnCanceled(); -} - -void WebAppUrlHandlerIntentPickerView::Initialize() { - auto builder = - views::Builder<WebAppUrlHandlerIntentPickerView>(this).SetLayoutManager( - std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kVertical)); - - // size+1 for the browser entry. - size_t total_buttons = launch_params_list_.size() + 1; - hover_buttons_.reserve(total_buttons); - - // Creates a view to hold the views for each app. - auto scrollable_view_builder = - views::Builder<views::BoxLayoutView>() - .SetOrientation(views::BoxLayout::Orientation::kVertical) - .AddChildAt( - views::Builder<WebAppUrlHandlerHoverButton>( - std::make_unique< - WebAppUrlHandlerHoverButton>(base::BindRepeating( - &WebAppUrlHandlerIntentPickerView::SetSelectedAppIndex, - base::Unretained(this), 0))) - .SetTag(0) - .CustomConfigure(base::BindOnce( - [](HoverButtons& hover_buttons, int total_buttons, - WebAppUrlHandlerHoverButton* view) { - view->GetViewAccessibility().OverridePosInSet( - 1, total_buttons); - hover_buttons.push_back(view); - }, - std::ref(hover_buttons_), total_buttons)), - 0); - size_t next_button_index = 1; - - for (const auto& launch_params : launch_params_list_) { - Profile* profile = g_browser_process->profile_manager()->GetProfileByPath( - launch_params.profile_path); - web_app::WebAppProvider* const provider = - web_app::WebAppProvider::GetForWebApps(profile); - DCHECK(provider); - web_app::WebAppRegistrar& registrar = provider->registrar(); - - const std::u16string& profile_name = - profiles::GetAvatarNameForProfile(launch_params.profile_path); - const std::u16string& app_name = base::UTF8ToUTF16( - base::StringPiece(registrar.GetAppShortName(launch_params.app_id))); - const std::u16string& app_title = - (profile_name == - l10n_util::GetStringUTF16(IDS_SINGLE_PROFILE_DISPLAY_NAME)) - ? app_name - : l10n_util::GetStringFUTF16( - IDS_URL_HANDLER_INTENT_PICKER_APP_TITLE, app_name, - profile_name); - - const size_t this_button_index = next_button_index++; - // TODO(crbug.com/1072058): Make sure the UI is reasonable when - // |app_title| is long. - scrollable_view_builder.AddChildAt( - views::Builder<WebAppUrlHandlerHoverButton>( - std::make_unique<WebAppUrlHandlerHoverButton>( - base::BindRepeating( - &WebAppUrlHandlerIntentPickerView::SetSelectedAppIndex, - base::Unretained(this), this_button_index), - launch_params, provider, app_title, - registrar.GetAppStartUrl(launch_params.app_id))) - .SetTag(this_button_index) - .CustomConfigure(base::BindOnce( - [](HoverButtons& hover_buttons, size_t this_button_index, - size_t total_buttons, WebAppUrlHandlerHoverButton* view) { - view->GetViewAccessibility().OverridePosInSet( - this_button_index + 1, total_buttons); - hover_buttons.push_back(view); - }, - std::ref(hover_buttons_), this_button_index, total_buttons)), - this_button_index); - } - - builder.AddChildren( - views::Builder<views::ScrollView>() - .CopyAddressTo(&scroll_view_) - .SetBackgroundThemeColorId(ui::kColorBubbleBackground) - // This part gives the scroll a fixed width and height. The height - // depends on how many app candidates we got and how many we actually - // want to show. The added 0.5 on the else block allow us to let the - // user know there are more than |kMaxAppResults| apps accessible by - // scrolling the list. - .ClipHeightTo(kRowHeight, (kMaxAppResults + 0.5) * kRowHeight) - .CustomConfigure(base::BindOnce([](views::ScrollView* view) { - view->GetViewAccessibility().OverrideRole( - ax::mojom::Role::kRadioGroup); - })) - .SetContents(std::move(scrollable_view_builder)) - .SetProperty(views::kMarginsKey, gfx::Insets(kTitlePadding, 0, 0, 0)), - views::Builder<views::Separator>().SetBorder( - views::CreateEmptyBorder(kSeparatorPadding))); - - enable_remember_checkbox_ = - base::FeatureList::IsEnabled(blink::features::kWebAppEnableUrlHandlers); - - if (enable_remember_checkbox_) { - // The checkbox allows the user to opt-in to relaxed security (i.e. skipping - // future prompts) for this url. - builder.AddChild( - views::Builder<views::Checkbox>() - .CopyAddressTo(&remember_selection_checkbox_) - .SetText(l10n_util::GetStringUTF16( - IDS_URL_HANDLER_INTENT_PICKER_REMEMBER_SELECTION)) - // Here we use the margins key to align the position of the checkbox - // with the items in the scroll view and provide a padding space - // below. - .SetProperty(views::kMarginsKey, - gfx::Insets(0, kTitlePadding, kRowHeight, 0))); - } - std::move(builder).BuildChildren(); -} - -void WebAppUrlHandlerIntentPickerView::RunCloseCallback(bool accepted) { - if (!close_callback_) - return; - - absl::optional<web_app::UrlHandlerLaunchParams> launch_params; - bool accepted_override = false; - switch (extensions::ScopedTestDialogAutoConfirm::GetAutoConfirmValue()) { - case extensions::ScopedTestDialogAutoConfirm::NONE: - accepted_override = accepted; - launch_params = GetSelectedLaunchParams(); - break; - case extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_REMEMBER_OPTION: - remember_selection_checkbox_->SetChecked(/*checked=*/true); - [[fallthrough]]; - case extensions::ScopedTestDialogAutoConfirm::ACCEPT_AND_OPTION: - accepted_override = true; - selected_app_tag_ = - extensions::ScopedTestDialogAutoConfirm::GetOptionSelected(); - launch_params = GetSelectedLaunchParams(); - break; - case extensions::ScopedTestDialogAutoConfirm::ACCEPT: - accepted_override = true; - launch_params = GetSelectedLaunchParams(); - break; - case extensions::ScopedTestDialogAutoConfirm::CANCEL: - accepted_override = false; - launch_params = absl::nullopt; - break; - } - - auto state = DialogState::kClosed; - if (accepted_override) { - const bool remember_choice_checked = - enable_remember_checkbox_ && remember_selection_checkbox_->GetChecked(); - - if (remember_choice_checked) { - if (launch_params) { - // An app is selected as the default choice. - web_app::url_handler_prefs::SaveOpenInApp( - g_browser_process->local_state(), launch_params->app_id, - launch_params->profile_path, launch_params->url); - state = DialogState::kAppAcceptedAndRememberChoice; - } else { - // The browser is the selected default choice. - web_app::url_handler_prefs::SaveOpenInBrowser( - g_browser_process->local_state(), url_); - state = DialogState::kBrowserAcceptedAndRememberChoice; - } - } else { - state = launch_params ? DialogState::kAppAcceptedNoRememberChoice - : DialogState::kBrowserAcceptedNoRememberChoice; - } - } - RecordDialogState(state); - - std::move(close_callback_).Run(accepted_override, std::move(launch_params)); -} - -bool WebAppUrlHandlerIntentPickerView::IsSelectedAppValid() const { - return selected_app_tag_.has_value() && selected_app_tag_.value() >= 0 && - selected_app_tag_.value() < static_cast<int>(hover_buttons_.size()); -} - -bool WebAppUrlHandlerIntentPickerView::HasUserSelectedApp() const { - return selected_app_tag_.has_value(); -} - -BEGIN_METADATA(WebAppUrlHandlerIntentPickerView, views::DialogDelegateView) -END_METADATA - -namespace chrome { - -// static -void ShowWebAppUrlHandlerIntentPickerDialog( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - WebAppUrlHandlerAcceptanceCallback dialog_close_callback) { - DCHECK(dialog_close_callback); - auto keep_alive = std::make_unique<ScopedKeepAlive>( - KeepAliveOrigin::WEB_APP_INTENT_PICKER, KeepAliveRestartOption::DISABLED); - - base::flat_set<Profile*> profiles = - WebAppUrlHandlerIntentPickerView::GetUrlHandlingValidProfiles( - launch_params_list); - - auto show_dialog_callback = base::BindOnce( - [](const GURL& url, std::unique_ptr<ScopedKeepAlive> keep_alive, - base::ElapsedTimer timer, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - WebAppUrlHandlerAcceptanceCallback dialog_close_callback) { - // Record registrar loading time before showing the dialog. - base::UmaHistogramMicrosecondsTimes( - "WebApp.UrlHandling.LoadWebAppRegistrarsAtStartUp", - timer.Elapsed()); - - // TODO(crbug.com/1217419): Check if site permission is enabled once - // all profiles and registrars are loaded. - - WebAppUrlHandlerIntentPickerView::Show( - url, std::move(launch_params_list), std::move(keep_alive), - std::move(dialog_close_callback)); - }, - url, std::move(keep_alive), base::ElapsedTimer(), - std::move(launch_params_list), std::move(dialog_close_callback)); - - auto on_registrar_ready_callback = - base::BarrierClosure(profiles.size(), std::move(show_dialog_callback)); - - for (Profile* profile : profiles) { - web_app::WebAppProvider* const provider = - web_app::WebAppProvider::GetForWebApps(profile); - DCHECK(provider); - - provider->on_registry_ready().Post(FROM_HERE, on_registrar_ready_callback); - } -} - -} // namespace chrome
diff --git a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h b/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h deleted file mode 100644 index 836791db..0000000 --- a/chrome/browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_view.h +++ /dev/null
@@ -1,133 +0,0 @@ -// Copyright 2021 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_WEB_APPS_WEB_APP_URL_HANDLER_INTENT_PICKER_DIALOG_VIEW_H_ -#define CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_URL_HANDLER_INTENT_PICKER_DIALOG_VIEW_H_ - -#include <memory> -#include <vector> - -#include "base/containers/flat_set.h" -#include "chrome/browser/ui/browser_dialogs.h" -#include "chrome/browser/web_applications/url_handler_launch_params.h" -#include "components/keep_alive_registry/scoped_keep_alive.h" -#include "third_party/abseil-cpp/absl/types/optional.h" -#include "ui/base/metadata/metadata_header_macros.h" -#include "ui/views/metadata/view_factory.h" -#include "ui/views/window/dialog_delegate.h" -#include "url/gurl.h" - -class Profile; -class ScopedKeepAlive; -class WebAppUrlHandlerHoverButton; - -namespace gfx { -class Size; -} - -namespace ui { -class Event; -} - -namespace views { -class Checkbox; -class ScrollView; -} // namespace views - -// The dialog's view, owned by the views framework. -// TODO(crbug.com/1209222): Dialog should be accessible. -class WebAppUrlHandlerIntentPickerView : public views::DialogDelegateView { - public: - METADATA_HEADER(WebAppUrlHandlerIntentPickerView); - - // These values are persisted to logs. Entries should not be renumbered and - // numeric values should never be reused. - enum class DialogState { - kClosed = 0, - kBrowserAcceptedAndRememberChoice = 1, - kBrowserAcceptedNoRememberChoice = 2, - kAppAcceptedAndRememberChoice = 3, - kAppAcceptedNoRememberChoice = 4, - kMaxValue = kAppAcceptedNoRememberChoice, - }; - - WebAppUrlHandlerIntentPickerView( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - std::unique_ptr<ScopedKeepAlive> keep_alive, - chrome::WebAppUrlHandlerAcceptanceCallback dialog_close_callback); - WebAppUrlHandlerIntentPickerView(const WebAppUrlHandlerIntentPickerView&) = - delete; - WebAppUrlHandlerIntentPickerView& operator=( - const WebAppUrlHandlerIntentPickerView&) = delete; - ~WebAppUrlHandlerIntentPickerView() override; - - // Returns the set of profiles referenced by `launch_params_list` (loading - // them if necessary) and removes any items in `launch_params_list` that - // reference invalid or unloadable profiles. - static base::flat_set<Profile*> GetUrlHandlingValidProfiles( - std::vector<web_app::UrlHandlerLaunchParams>& launch_params_list); - - static void Show( - const GURL& url, - std::vector<web_app::UrlHandlerLaunchParams> launch_params_list, - std::unique_ptr<ScopedKeepAlive> keep_alive, - chrome::WebAppUrlHandlerAcceptanceCallback dialog_close_callback); - - private: - using HoverButtons = std::vector<WebAppUrlHandlerHoverButton*>; - - void Initialize(); - // views::DialogDelegateView: - gfx::Size CalculatePreferredSize() const override; - - // Return the UrlHandlerLaunchParams for the selected option. Null when the - // browser is selected. - absl::optional<web_app::UrlHandlerLaunchParams> GetSelectedLaunchParams() - const; - - void OnAccepted(); - void OnCanceled(); - // Close callback called by DialogDeletegate. See - // DialogDelegate::SetCloseCallback for when it's called. - void OnClosed(); - - // Unselects the current focused app item on the list and - // refocus on the selected app item based on the index provided. - void SetSelectedAppIndex(size_t index, const ui::Event& event); - - // Runs the close_callback_ provided during Show() if it exists. - void RunCloseCallback(bool accepted); - - // Return if the |selected_app_tag_| is valid. - bool IsSelectedAppValid() const; - // Return if the user has selected an app in the dialog. - bool HasUserSelectedApp() const; - - // The URL to launch if the dialog is accepted. - const GURL url_; - const std::vector<web_app::UrlHandlerLaunchParams> launch_params_list_; - chrome::WebAppUrlHandlerAcceptanceCallback close_callback_; - std::unique_ptr<ScopedKeepAlive> keep_alive_; - - HoverButtons hover_buttons_; - // Allow the checkbox to be enabled or disabled. Enabled if the URL Handling - // feature flag is enabled, disabled otherwise. - // TODO(crbug.com/1072058): Remove when settings are implemented. - bool enable_remember_checkbox_ = false; - views::Checkbox* remember_selection_checkbox_ = nullptr; - views::ScrollView* scroll_view_ = nullptr; - - // No default selection. Not null if selected by user. - absl::optional<int> selected_app_tag_ = absl::nullopt; -}; - -BEGIN_VIEW_BUILDER(, - WebAppUrlHandlerIntentPickerView, - views::DialogDelegateView) -END_VIEW_BUILDER - -DEFINE_VIEW_BUILDER(, WebAppUrlHandlerIntentPickerView) - -#endif // CHROME_BROWSER_UI_VIEWS_WEB_APPS_WEB_APP_URL_HANDLER_INTENT_PICKER_DIALOG_VIEW_H_
diff --git a/chrome/browser/ui/web_applications/terminal_system_app_menu_model_chromeos.cc b/chrome/browser/ui/web_applications/terminal_system_app_menu_model_chromeos.cc index 0ab9c0c..e97c888 100644 --- a/chrome/browser/ui/web_applications/terminal_system_app_menu_model_chromeos.cc +++ b/chrome/browser/ui/web_applications/terminal_system_app_menu_model_chromeos.cc
@@ -49,12 +49,12 @@ if (command_id == IDC_TERMINAL_LINUX) { chrome::AddTabAt(browser(), crostini::GenerateTerminalURL(browser()->profile()), - /*idx=*/-1, + /*index=*/-1, /*foreground=*/true); } else if (command_id == IDC_TERMINAL_SSH) { chrome::AddTabAt(browser(), GURL("chrome-untrusted://terminal/html/terminal_ssh.html"), - /*idx=*/-1, + /*index=*/-1, /*foreground=*/true); } else if (command_id == IDC_OPTIONS) { crostini::LaunchTerminalSettings(browser()->profile());
diff --git a/chrome/browser/ui/webui/sync_internals/sync_internals_browsertest.js b/chrome/browser/ui/webui/sync_internals/sync_internals_browsertest.js index 2553540..ce68d99 100644 --- a/chrome/browser/ui/webui/sync_internals/sync_internals_browsertest.js +++ b/chrome/browser/ui/webui/sync_internals/sync_internals_browsertest.js
@@ -23,12 +23,6 @@ browsePreload: 'chrome://sync-internals', /** - * Disable accessibility testing for this page. - * @override - */ - runAccessibilityChecks: false, - - /** * Checks aboutInfo's details section for the specified field. * @param {boolean} isValid Whether the field is valid. * @param {string} key The name of the key to search for in details.
diff --git a/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc b/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc index aed266e..4180d1b56 100644 --- a/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc +++ b/chrome/browser/web_applications/app_service/web_app_publisher_helper.cc
@@ -1658,6 +1658,7 @@ DCHECK(system_app); app.show_in_launcher = system_app->ShouldShowInLauncher(); app.show_in_search = system_app->ShouldShowInSearch(); + app.show_in_shelf = app.show_in_search; } #endif } @@ -1686,6 +1687,7 @@ app->show_in_search = system_app->ShouldShowInSearch() ? apps::mojom::OptionalBool::kTrue : apps::mojom::OptionalBool::kFalse; + app->show_in_shelf = app->show_in_search; } #endif }
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager.cc b/chrome/browser/web_applications/policy/web_app_policy_manager.cc index e0bb25ca..8ffbc7c 100644 --- a/chrome/browser/web_applications/policy/web_app_policy_manager.cc +++ b/chrome/browser/web_applications/policy/web_app_policy_manager.cc
@@ -610,6 +610,9 @@ case policy::SystemFeature::kCanvas: disabled_web_apps_.insert(web_app::kCanvasAppId); break; + case policy::SystemFeature::kCrosh: + disabled_system_apps_.insert(SystemAppType::CROSH); + break; } }
diff --git a/chrome/browser/web_applications/preinstalled_app_install_features.cc b/chrome/browser/web_applications/preinstalled_app_install_features.cc index 199fb59..65da2fdc 100644 --- a/chrome/browser/web_applications/preinstalled_app_install_features.cc +++ b/chrome/browser/web_applications/preinstalled_app_install_features.cc
@@ -20,6 +20,7 @@ &kDefaultCalculatorWebApp, #if BUILDFLAG(IS_CHROMEOS) &kCursiveStylusPreinstall, + &kMessagesPreinstall, #endif }; @@ -83,6 +84,10 @@ const base::Feature kCursiveStylusPreinstall{"CursiveStylusPreinstall", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enables installing the Messages app on unmanaged devices. +const base::Feature kMessagesPreinstall{"MessagesPreinstall", + base::FEATURE_DISABLED_BY_DEFAULT}; + #endif // BUILDFLAG(IS_CHROMEOS) bool IsPreinstalledAppInstallFeatureEnabled(base::StringPiece feature_name,
diff --git a/chrome/browser/web_applications/preinstalled_app_install_features.h b/chrome/browser/web_applications/preinstalled_app_install_features.h index 83820ef8..0e56a7d 100644 --- a/chrome/browser/web_applications/preinstalled_app_install_features.h +++ b/chrome/browser/web_applications/preinstalled_app_install_features.h
@@ -24,6 +24,8 @@ extern const base::Feature kAllowDefaultWebAppMigrationForChromeOsManagedUsers; extern const base::Feature kCursiveStylusPreinstall; + +extern const base::Feature kMessagesPreinstall; #endif // BUILDFLAG(IS_CHROMEOS) // Returns the base::Feature in |kPreinstalledAppInstallFeatures| that
diff --git a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc index 415956a..b5ec8e8 100644 --- a/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc +++ b/chrome/browser/web_applications/preinstalled_web_app_manager_browsertest.cc
@@ -121,7 +121,7 @@ // Manifest Resources: This is chrome/test/data/web_apps/basic-192.png EXPECT_EQ(IconManagerReadAppIconPixel(icon_manager, web_app->app_id(), - /*size=*/192), + /*size_px=*/192), SK_ColorBLACK); // User preferences: @@ -716,8 +716,9 @@ // theme_color must be installed opaque. EXPECT_EQ(registrar().GetAppThemeColor(app_id), SkColorSetARGB(0xFF, 0xBB, 0xCC, 0xDD)); - EXPECT_EQ(IconManagerReadAppIconPixel(icon_manager(), app_id, /*size=*/192), - SK_ColorBLUE); + EXPECT_EQ( + IconManagerReadAppIconPixel(icon_manager(), app_id, /*size_px=*/192), + SK_ColorBLUE); } // Check that offline fallback installs attempt fetching the install_url. @@ -813,8 +814,9 @@ // theme_color must be installed opaque. EXPECT_EQ(registrar().GetAppThemeColor(app_id), SkColorSetARGB(0xFF, 0xBB, 0xCC, 0xDD)); - EXPECT_EQ(IconManagerReadAppIconPixel(icon_manager(), app_id, /*size=*/192), - SK_ColorBLUE); + EXPECT_EQ( + IconManagerReadAppIconPixel(icon_manager(), app_id, /*size_px=*/192), + SK_ColorBLUE); } // Check that offline only installs don't fetch from the install_url. @@ -864,8 +866,9 @@ // theme_color must be installed opaque. EXPECT_EQ(registrar().GetAppThemeColor(app_id), SkColorSetARGB(0xFF, 0xBB, 0xCC, 0xDD)); - EXPECT_EQ(IconManagerReadAppIconPixel(icon_manager(), app_id, /*size=*/192), - SK_ColorBLUE); + EXPECT_EQ( + IconManagerReadAppIconPixel(icon_manager(), app_id, /*size_px=*/192), + SK_ColorBLUE); } const char kOnlyForNewUsersInstallUrl[] = "https://example.org/";
diff --git a/chrome/browser/web_applications/test/web_app_install_test_utils.cc b/chrome/browser/web_applications/test/web_app_install_test_utils.cc index 0c4a4442..2641900 100644 --- a/chrome/browser/web_applications/test/web_app_install_test_utils.cc +++ b/chrome/browser/web_applications/test/web_app_install_test_utils.cc
@@ -22,13 +22,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -#include "chrome/browser/web_applications/os_integration/os_integration_manager.h" -#include "chrome/browser/web_applications/os_integration/url_handler_manager.h" -#include "components/services/app_service/public/cpp/url_handler_info.h" -#endif - namespace web_app { namespace test { @@ -114,39 +107,6 @@ return app_id; } -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -AppId InstallWebAppWithUrlHandlers( - Profile* profile, - const GURL& start_url, - const std::u16string& app_name, - const std::vector<apps::UrlHandlerInfo>& url_handlers) { - std::unique_ptr<WebAppInstallInfo> info = - std::make_unique<WebAppInstallInfo>(); - info->start_url = start_url; - info->title = app_name; - info->user_display_mode = DisplayMode::kStandalone; - info->url_handlers = url_handlers; - web_app::AppId app_id = - web_app::test::InstallWebApp(profile, std::move(info)); - - auto& url_handler_manager = WebAppProvider::GetForTest(profile) - ->os_integration_manager() - .url_handler_manager_for_testing(); - - base::RunLoop run_loop; - url_handler_manager.RegisterUrlHandlers( - app_id, base::BindLambdaForTesting([&](Result result) { - EXPECT_EQ(Result::kOk, result); - run_loop.Quit(); - })); - run_loop.Run(); - // Allow updates to be published to App Service listeners. - base::RunLoop().RunUntilIdle(); - return app_id; -} -#endif - void UninstallWebApp(Profile* profile, const AppId& app_id) { WebAppProvider* const provider = WebAppProvider::GetForTest(profile); base::RunLoop run_loop;
diff --git a/chrome/browser/web_applications/test/web_app_install_test_utils.h b/chrome/browser/web_applications/test/web_app_install_test_utils.h index b27bf82..1e26d9d 100644 --- a/chrome/browser/web_applications/test/web_app_install_test_utils.h +++ b/chrome/browser/web_applications/test/web_app_install_test_utils.h
@@ -50,18 +50,6 @@ webapps::WebappInstallSource install_source = webapps::WebappInstallSource::OMNIBOX_INSTALL_ICON); -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \ - (BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS_LACROS)) -// Install a web app with url_handlers then register it with the -// UrlHandlerManager. This is sufficient for testing URL matching and launch -// at startup. -AppId InstallWebAppWithUrlHandlers( - Profile* profile, - const GURL& start_url, - const std::u16string& app_name, - const std::vector<apps::UrlHandlerInfo>& url_handlers); -#endif - // Synchronously uninstall a web app. May be used in unit tests and browser // tests. void UninstallWebApp(Profile* profile, const AppId& app_id);
diff --git a/chrome/browser/web_applications/web_app_id_constants.cc b/chrome/browser/web_applications/web_app_id_constants.cc index 508dd49..eaa9126 100644 --- a/chrome/browser/web_applications/web_app_id_constants.cc +++ b/chrome/browser/web_applications/web_app_id_constants.cc
@@ -25,6 +25,10 @@ const char kCanvasAppId[] = "ieailfmhaghpphfffooibmlghaeopach"; // Generated as: web_app::GenerateAppId(/*manifest_id=*/absl::nullopt, GURL( +// "chrome-untrusted://crosh/")) +const char kCroshAppId[] = "cgfnfgkafmcdkdgilmojlnaadileaach"; + +// Generated as: web_app::GenerateAppId(/*manifest_id=*/absl::nullopt, GURL( // "https://cursive.apps.chrome/")) const char kCursiveAppId[] = "apignacaigpffemhdbhmnajajaccbckh";
diff --git a/chrome/browser/web_applications/web_app_id_constants.h b/chrome/browser/web_applications/web_app_id_constants.h index 043e69b..80af375c 100644 --- a/chrome/browser/web_applications/web_app_id_constants.h +++ b/chrome/browser/web_applications/web_app_id_constants.h
@@ -12,6 +12,7 @@ extern const char kCalculatorAppId[]; extern const char kCameraAppId[]; extern const char kCanvasAppId[]; +extern const char kCroshAppId[]; extern const char kCursiveAppId[]; extern const char kDiagnosticsAppId[]; extern const char kFirmwareUpdateAppId[];
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index cd8f431d..0612a8b 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1646005090-b3f3c014f639618707bde1d2f0879a06019333d8.profdata +chrome-linux-main-1646049163-006a1a1e29a68df7a610d43a74b9d7add710b245.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 22c9b63f..54bc0291 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1646005090-1793164e7ee12890a0f6fb2d7f0cf3b80c030319.profdata +chrome-mac-arm-main-1646049163-27f71a2104d98304b020f1f4dca7e0ecf0fec4a1.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index 5d438ee..db801f8 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1646005090-3c545353b7485623a654c535eec5056b666c76e1.profdata +chrome-mac-main-1646049163-d03be15b4e6e4339c40093baad18f541996a8a74.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 4812eed..0d29c4d 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1646016704-4b872e0f90ae6d4c78897fbbb48c17b162b5f705.profdata +chrome-win32-main-1646049163-4cc3dfb70055bbb6bba16cee56ff96405c6cef04.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 31debf3..06973bd6 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1646005090-862243bff30065e6437632d514e3d2805c4c01cf.profdata +chrome-win64-main-1646049163-98eaeb3d81abe977a661a5567397134356b41be9.profdata
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 2c8c4480..57120b57 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -1307,7 +1307,6 @@ "//components/security_interstitials/content:security_interstitial_page", "//components/security_interstitials/core:unsafe_resource", "//components/security_state/content", - "//components/services/app_service/public/cpp:app_url_handling", "//components/services/app_service/public/cpp:protocol_handling", "//components/services/app_service/public/mojom", "//components/services/language_detection/public/cpp", @@ -1470,29 +1469,85 @@ "data/", "//ash/components/arc/test/data/icons", "//chrome/browser/page_load_metrics/integration_tests/data/", + "//chrome/test/data/cart/", + "//components/test/data/ad_tagging/", + "//components/test/data/ads_observer/", "//components/test/data/autofill/", "//components/test/data/optimization_guide/", "//components/test/data/payments/", - "//components/test/data/ad_tagging/", - "//components/test/data/ads_observer/", "//components/test/data/subresource_filter/", "//components/test/data/translate/", "//components/test/data/update_client/", "//content/test/data/", "//google_apis/test/", - "//chrome/test/data/cart/", - "//media/test/data/", + + # Media data deps are included individually to prevent runaway isolate + # size growth. + "//media/test/data/90rotation.mp4", + "//media/test/data/bear-320x240-audio-only.webm", + "//media/test/data/bear-320x240-av_enc-a.webm", + "//media/test/data/bear-320x240-av_enc-av.webm", + "//media/test/data/bear-320x240-av_enc-v.webm", + "//media/test/data/bear-320x240-multitrack.webm", + "//media/test/data/bear-320x240-opus-av_enc-av.webm", + "//media/test/data/bear-320x240-opus-av_enc-v.webm", + "//media/test/data/bear-320x240-v-vp9_fullsample_enc-v.webm", + "//media/test/data/bear-320x240-v-vp9_profile2_subsample_cenc-v.mp4", + "//media/test/data/bear-320x240-v-vp9_profile2_subsample_cenc-v.webm", + "//media/test/data/bear-320x240-v-vp9_subsample_enc-v.webm", + "//media/test/data/bear-320x240-v_enc-v.webm", + "//media/test/data/bear-320x240-v_frag-vp9-cenc.mp4", + "//media/test/data/bear-320x240-video-only.webm", + "//media/test/data/bear-320x240.webm", + "//media/test/data/bear-640x360-a_frag-cbcs.mp4", + "//media/test/data/bear-640x360-a_frag-cenc.mp4", + "//media/test/data/bear-640x360-av_enc-av.webm", + "//media/test/data/bear-640x360-v_frag-cbc1.mp4", + "//media/test/data/bear-640x360-v_frag-cbcs.mp4", + "//media/test/data/bear-640x360-v_frag-cenc-mdat.mp4", + "//media/test/data/bear-640x360-v_frag-cenc.mp4", + "//media/test/data/bear-640x360-v_frag-cens.mp4", + "//media/test/data/bear-640x360.webm", + "//media/test/data/bear-a_enc-a.webm", + "//media/test/data/bear-av1-320x180-10bit-cenc.mp4", + "//media/test/data/bear-av1-320x180-10bit-cenc.webm", + "//media/test/data/bear-av1-cenc.mp4", + "//media/test/data/bear-av1-cenc.webm", + "//media/test/data/bear-flac-cenc.mp4", + "//media/test/data/bear-opus-cenc.mp4", + "//media/test/data/eme_and_get_display_media.html", + "//media/test/data/eme_load_session_after_close_test.html", + "//media/test/data/eme_player.html", + "//media/test/data/eme_player_js/", + "//media/test/data/eme_remove_session_test.html", + "//media/test/data/encrypted_frame_size_change.html", + "//media/test/data/frame_size_change-av_enc-v.webm", + "//media/test/data/id3_png_test.mp3", + "//media/test/data/mse_config_change.html", + "//media/test/data/mse_different_containers.html", + "//media/test/data/multiple_cdm_types.html", + "//media/test/data/no_streams.webm", + "//media/test/data/sfx.ogg", + "//media/test/data/test_key_system_instantiation.html", + "//media/test/data/webaudio_oscillator.html", + "//net/tools/testserver/", - "//ppapi/tests/test_case.html", - "//ppapi/tests/test_case.html.mock-http-headers", - "//ppapi/tests/test_page.css", - "//ppapi/tests/test_page.css.mock-http-headers", "//third_party/mocha/mocha.js", "//third_party/polymer/v1_0/components-chromium/iron-test-helpers/mock-interactions.js", "//third_party/pywebsocket3/src/mod_pywebsocket/", "//third_party/simplejson/", "//ui/webui/resources/", ] + + if (enable_plugins) { + data += [ + "//ppapi/tests/test_case.html", + "//ppapi/tests/test_case.html.mock-http-headers", + "//ppapi/tests/test_page.css", + "//ppapi/tests/test_page.css.mock-http-headers", + ] + } + data += js2gtest_js_libraries data += metric_integration_jsdeps @@ -2377,13 +2432,6 @@ data_deps += [ "//chrome:packed_resources" ] } - if (is_win || is_mac || (is_linux && !is_chromeos_lacros)) { - sources += [ - "../browser/ui/startup/web_app_url_handling_startup_test_utils.cc", - "../browser/ui/startup/web_app_url_handling_startup_test_utils.h", - ] - } - if (enable_soda) { sources += [ "../browser/speech/speech_recognition_service_browsertest.cc" ] @@ -2932,6 +2980,11 @@ "//chrome/browser/error_reporting:test_support", "//chromeos/dbus/dlp:dlp", ] + + data += [ + "//media/test/data/90rotation.mp4", + "//media/test/data/id3_png_test.mp3", + ] } deps += [ @@ -4132,7 +4185,6 @@ sources += [ "../browser/ui/views/profiles/profile_picker_view_browsertest.cc", "../browser/ui/views/web_apps/web_app_integration_browsertest_mac_win_linux.cc", - "../browser/ui/views/web_apps/web_app_url_handler_intent_picker_dialog_browsertest.cc", ] }
diff --git a/chrome/test/data/chromeos/oobe_webui_browsertest.js b/chrome/test/data/chromeos/oobe_webui_browsertest.js index 81c1664..baa82ae 100644 --- a/chrome/test/data/chromeos/oobe_webui_browsertest.js +++ b/chrome/test/data/chromeos/oobe_webui_browsertest.js
@@ -26,12 +26,6 @@ browsePreload: 'chrome://oobe/oobe', /** @override */ - runAccessibilityChecks: true, - - /** @override */ - accessibilityIssuesAreErrors: true, - - /** @override */ testGenPreamble: function() { // OobeWebUI should run in fullscreen. GEN('FullscreenNotificationObserver fullscreen_observer(browser());');
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 904a121d..5e3f229 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -10790,7 +10790,7 @@ "authfactors.restrictions.webauthn": { "value": [] }, - "quick_unlock_mode_whitelist": { + "quick_unlock_mode_allowlist": { "value": [] } }
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index 75ee8d5..3b3be5c 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -498,7 +498,6 @@ group("closure_compile") { deps = [ ":closure_compile_local", - "cr_components:closure_compile", "inline_login:closure_compile", "js/cr/ui:closure_compile", "media_router:closure_compile",
diff --git a/chrome/test/data/webui/app_settings/.eslintrc.js b/chrome/test/data/webui/app_settings/.eslintrc.js index 8d9de37..6dbf6e6 100644 --- a/chrome/test/data/webui/app_settings/.eslintrc.js +++ b/chrome/test/data/webui/app_settings/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/bookmarks/.eslintrc.js b/chrome/test/data/webui/bookmarks/.eslintrc.js index 49b3be2..6e50809 100644 --- a/chrome/test/data/webui/bookmarks/.eslintrc.js +++ b/chrome/test/data/webui/bookmarks/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/cr_components/BUILD.gn b/chrome/test/data/webui/cr_components/BUILD.gn index e7ac768e3..e2e44c4 100644 --- a/chrome/test/data/webui/cr_components/BUILD.gn +++ b/chrome/test/data/webui/cr_components/BUILD.gn
@@ -3,36 +3,15 @@ # found in the LICENSE file. import("//crypto/features.gni") -import("//third_party/closure_compiler/compile_js.gni") import("//tools/grit/preprocess_if_expr.gni") import("//tools/typescript/ts_library.gni") import("//ui/webui/resources/tools/generate_grd.gni") -js_type_check("closure_compile") { - is_polymer3 = true - closure_flags = default_closure_args + mojom_js_args + [ - "browser_resolver_prefix_replacements=\"chrome://settings/=../../chrome/browser/resources/settings/\"", - "browser_resolver_prefix_replacements=\"chrome://new-tab-page/=../../chrome/browser/resources/new_tab_page//\"", - "js_module_root=./gen/ui/webui/resources/preprocessed/", - "js_module_root=../../chrome/test/data/webui/", - "js_module_root=./gen/chrome/test/data/webui/", - ] - - deps = [ ":managed_dialog_test" ] -} - -js_library("managed_dialog_test") { - deps = [ - "..:chai_assert", - "//ui/webui/resources/cr_components/managed_dialog", - "//ui/webui/resources/js:load_time_data.m", - ] - externs_list = [ "$externs_path/mocha-2.5.js" ] -} +preprocessed_files = [ "managed_footnote_test.ts" ] if (use_nss_certs) { # Test files that contain // <if expr> and therefore require preprocessing. - preprocessed_files = [ "certificate_manager_test.ts" ] + preprocessed_files += [ "certificate_manager_test.ts" ] if (is_chromeos_ash) { preprocessed_files += [ "certificate_manager_provisioning_test.ts" ] } @@ -41,6 +20,8 @@ # Test files that do not require preprocessing. If adding // <if expr> to any # file below, move it to the list above. non_preprocessed_files = [ + "customize_themes_test.ts", + "managed_dialog_test.ts", "most_visited_focus_test.ts", "most_visited_test.ts", "most_visited_test_support.ts", @@ -48,12 +29,10 @@ preprocessed_folder = "$target_gen_dir/preprocessed" -if (use_nss_certs) { - preprocess_if_expr("preprocess") { - in_folder = "." - out_folder = preprocessed_folder - in_files = preprocessed_files - } +preprocess_if_expr("preprocess") { + in_folder = "." + out_folder = preprocessed_folder + in_files = preprocessed_files } copy("copy") { @@ -77,18 +56,20 @@ path_mappings = [ "chrome://webui-test/*|" + rebase_path("$root_gen_dir/chrome/test/data/webui/tsc/*", target_gen_dir) ] - in_files = non_preprocessed_files - deps = [ "//ui/webui/resources/cr_components/most_visited:build_ts" ] - - extra_deps = [ - ":copy", - "..:generate_definitions", + in_files = non_preprocessed_files + preprocessed_files + deps = [ + "//ui/webui/resources/cr_components/customize_themes:build_ts", + "//ui/webui/resources/cr_components/most_visited:build_ts", ] if (use_nss_certs) { - in_files += preprocessed_files deps += [ "//ui/webui/resources/cr_components/certificate_manager:build_ts" ] - extra_deps += [ ":preprocess" ] } + + extra_deps = [ + ":copy", + ":preprocess", + "..:generate_definitions", + ] }
diff --git a/chrome/test/data/webui/cr_components/cr_components_browsertest.js b/chrome/test/data/webui/cr_components/cr_components_browsertest.js index 0ff9e07..e11ab32 100644 --- a/chrome/test/data/webui/cr_components/cr_components_browsertest.js +++ b/chrome/test/data/webui/cr_components/cr_components_browsertest.js
@@ -43,7 +43,7 @@ var CrComponentsManagedFootnoteTest = class extends CrComponentsBrowserTest { /** @override */ get browsePreload() { - return 'chrome://test/test_loader.html?module=cr_components/managed_footnote_test.js'; + return 'chrome://test/test_loader.html?module=cr_components/managed_footnote_test.js&host=webui-test'; } }; @@ -95,7 +95,7 @@ var CrComponentsManagedDialogTest = class extends CrComponentsBrowserTest { /** @override */ get browsePreload() { - return 'chrome://test/test_loader.html?module=cr_components/managed_dialog_test.js'; + return 'chrome://test/test_loader.html?module=cr_components/managed_dialog_test.js&host=webui-test'; } };
diff --git a/chrome/test/data/webui/cr_components/cr_components_mojo_browsertest.js b/chrome/test/data/webui/cr_components/cr_components_mojo_browsertest.js index 2850fae..1722832 100644 --- a/chrome/test/data/webui/cr_components/cr_components_mojo_browsertest.js +++ b/chrome/test/data/webui/cr_components/cr_components_mojo_browsertest.js
@@ -24,7 +24,7 @@ class extends CrComponentsMojoBrowserTest { /** @override */ get browsePreload() { - return 'chrome://new-tab-page/test_loader.html?module=cr_components/customize_themes_test.js'; + return 'chrome://new-tab-page/test_loader.html?module=cr_components/customize_themes_test.js&host=webui-test'; } };
diff --git a/chrome/test/data/webui/cr_components/customize_themes_test.js b/chrome/test/data/webui/cr_components/customize_themes_test.ts similarity index 63% rename from chrome/test/data/webui/cr_components/customize_themes_test.js rename to chrome/test/data/webui/cr_components/customize_themes_test.ts index d5b1c828..04e78bb6 100644 --- a/chrome/test/data/webui/cr_components/customize_themes_test.js +++ b/chrome/test/data/webui/cr_components/customize_themes_test.ts
@@ -3,31 +3,36 @@ // found in the LICENSE file. import 'chrome://new-tab-page/strings.m.js'; -import '../mojo_webui_test_support.js'; +import 'chrome://webui-test/mojo_webui_test_support.js'; +import 'chrome://resources/cr_components/customize_themes/theme_icon.js'; +import 'chrome://resources/cr_components/customize_themes/customize_themes.js'; -import {CustomizeThemesBrowserProxyImpl} from 'chrome://resources/cr_components/customize_themes/browser_proxy.js'; +import {CustomizeThemesBrowserProxy, CustomizeThemesBrowserProxyImpl} from 'chrome://resources/cr_components/customize_themes/browser_proxy.js'; import {CustomizeThemesElement} from 'chrome://resources/cr_components/customize_themes/customize_themes.js'; import {ChromeTheme, CustomizeThemesClientCallbackRouter, CustomizeThemesHandlerInterface, ThemeType} from 'chrome://resources/cr_components/customize_themes/customize_themes.mojom-webui.js'; import {ThemeIconElement} from 'chrome://resources/cr_components/customize_themes/theme_icon.js'; -import {assertDeepEquals, assertEquals, assertFalse, assertTrue} from '../chai_assert.js'; -import {TestBrowserProxy} from '../test_browser_proxy.js'; -import {flushTasks} from '../test_util.js'; +import {SkColor} from 'chrome://resources/mojo/skia/public/mojom/skcolor.mojom-webui.js'; + +import {assertDeepEquals, assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; +import {TestBrowserProxy} from 'chrome://webui-test/test_browser_proxy.js'; +import {flushTasks} from 'chrome://webui-test/test_util.js'; /** * Asserts the computed style value for an element. - * @param {Element} element The element. - * @param {string} name The name of the style to assert. - * @param {string} expected The expected style value. + * @param name The name of the style to assert. + * @param expected The expected style value. */ -function assertStyle(element, name, expected) { +function assertStyle(element: Element, name: string, expected: string) { assertTrue(!!element); const actual = window.getComputedStyle(element).getPropertyValue(name).trim(); assertEquals(expected, actual); } -/** @implements {CustomizeThemesHandlerInterface} */ -class TestCustomizeThemesHandler extends TestBrowserProxy { +class TestCustomizeThemesHandler extends TestBrowserProxy implements + CustomizeThemesHandlerInterface { + private chromeThemes_: ChromeTheme[] = []; + constructor() { super([ 'applyAutogeneratedTheme', @@ -38,125 +43,108 @@ 'confirmThemeChanges', 'revertThemeChanges', ]); - - /** @private {!Array<ChromeTheme>} */ - this.chromeThemes_ = []; } - /** @param {!Array<ChromeTheme>} chromeThemes */ - setChromeThemes(chromeThemes) { + setChromeThemes(chromeThemes: ChromeTheme[]) { this.chromeThemes_ = chromeThemes; } - /** @override */ - applyAutogeneratedTheme(frameColor) { + applyAutogeneratedTheme(frameColor: SkColor) { this.methodCalled('applyAutogeneratedTheme', frameColor); } - /** @override */ - applyChromeTheme(id) { + applyChromeTheme(id: number) { this.methodCalled('applyChromeTheme', id); } - /** @override */ applyDefaultTheme() { this.methodCalled('applyDefaultTheme'); } - /** @override */ initializeTheme() { this.methodCalled('initializeTheme'); } - /** @override */ getChromeThemes() { this.methodCalled('getChromeThemes'); return Promise.resolve({chromeThemes: this.chromeThemes_}); } - /** @override */ confirmThemeChanges() { this.methodCalled('confirmThemeChanges'); } - /** @override */ revertThemeChanges() { this.methodCalled('revertThemeChanges'); } } -/** @implements {CustomizeThemesBrowserProxy} */ -class TestCustomizeThemesBrowserProxy extends TestBrowserProxy { +class TestCustomizeThemesBrowserProxy extends TestBrowserProxy implements + CustomizeThemesBrowserProxy { + testHandler = new TestCustomizeThemesHandler(); + private callbackRouter_: CustomizeThemesClientCallbackRouter; + constructor() { super(['open']); - /** @type {TestCustomizeThemesHandler} */ this.testHandler = new TestCustomizeThemesHandler(); - - /** @private {CustomizeThemesClientCallbackRouter} */ this.callbackRouter_ = new CustomizeThemesClientCallbackRouter(); } - /** @override */ handler() { return this.testHandler; } - /** @override */ callbackRouter() { return this.callbackRouter_; } - /** @override */ - open(url) { + open(url: string) { this.methodCalled('open', url); } } suite('CrComponentsCustomizeThemesTest', () => { - /** @type {TestCustomizeThemesBrowserProxy} */ - let testProxy; + let testProxy: TestCustomizeThemesBrowserProxy; - /** @return {!CustomizeThemesElement} */ - function createCustomizeThemesElement() { + function createCustomizeThemesElement(): CustomizeThemesElement { const customizeThemesElement = document.createElement('cr-customize-themes'); document.body.append(customizeThemesElement); - return /** @type {!CustomizeThemesElement} */ (customizeThemesElement); + return customizeThemesElement; } - /** - * @param {!Array<ChromeTheme>} themes} - * @return {!CustomizeThemesElement} - */ - function createCustomizeThemesElementWithThemes(themes) { + function createCustomizeThemesElementWithThemes(themes: ChromeTheme[]): + CustomizeThemesElement { testProxy.testHandler.setChromeThemes(themes); return createCustomizeThemesElement(); } setup(() => { - document.innerHTML = ''; + document.body.innerHTML = ''; testProxy = new TestCustomizeThemesBrowserProxy(); CustomizeThemesBrowserProxyImpl.setInstance(testProxy); }); test('creating element shows theme tiles', async () => { // Arrange. - const themes = [ + const themes: ChromeTheme[] = [ { id: 0, label: 'theme_0', colors: { - frame: {value: 0xff000000}, // white. - activeTab: {value: 0xff0000ff}, // blue. + frame: {value: 0xff000000}, // white. + activeTab: {value: 0xff0000ff}, // blue. + activeTabText: {value: 0xff000000}, // white. }, }, { id: 1, label: 'theme_1', colors: { - frame: {value: 0xffff0000}, // red. - activeTab: {value: 0xff00ff00}, // green. + frame: {value: 0xffff0000}, // red. + activeTab: {value: 0xff00ff00}, // green. + activeTabText: {value: 0xff000000}, // white. }, }, ]; @@ -169,22 +157,22 @@ await flushTasks(); // Assert. - const tilesWrapper = customizeThemesElement.shadowRoot.querySelectorAll( + const tilesWrapper = customizeThemesElement.shadowRoot!.querySelectorAll( 'div.chrome-theme-wrapper'); assertEquals(tilesWrapper.length, themes.length); tilesWrapper.forEach(function(tileWrapper, i) { - assertEquals(tileWrapper.getAttribute('aria-label'), themes[i].label); + assertEquals(tileWrapper.getAttribute('aria-label'), themes[i]!.label); }); const tiles = - customizeThemesElement.shadowRoot.querySelectorAll('cr-theme-icon'); + customizeThemesElement.shadowRoot!.querySelectorAll('cr-theme-icon'); assertEquals(tiles.length, 4); - assertStyle(tiles[2], '--cr-theme-icon-frame-color', 'rgba(0, 0, 0, 1)'); + assertStyle(tiles[2]!, '--cr-theme-icon-frame-color', 'rgba(0, 0, 0, 1)'); assertStyle( - tiles[2], '--cr-theme-icon-active-tab-color', 'rgba(0, 0, 255, 1)'); - assertStyle(tiles[3], '--cr-theme-icon-frame-color', 'rgba(255, 0, 0, 1)'); + tiles[2]!, '--cr-theme-icon-active-tab-color', 'rgba(0, 0, 255, 1)'); + assertStyle(tiles[3]!, '--cr-theme-icon-frame-color', 'rgba(255, 0, 0, 1)'); assertStyle( - tiles[3], '--cr-theme-icon-active-tab-color', 'rgba(0, 255, 0, 1)'); + tiles[3]!, '--cr-theme-icon-active-tab-color', 'rgba(0, 255, 0, 1)'); }); [true, false].forEach(autoConfirm => { @@ -198,8 +186,7 @@ await flushTasks(); // Act. - customizeThemesElement.shadowRoot.querySelector('#defaultTheme') - .click(); + customizeThemesElement.$.defaultTheme.click(); // Assert. assertEquals( @@ -220,10 +207,9 @@ testProxy.testHandler.whenCalled('applyAutogeneratedTheme'); // Act. - customizeThemesElement.shadowRoot.querySelector('#colorPicker') - .value = '#ff0000'; - customizeThemesElement.shadowRoot.querySelector('#colorPicker') - .dispatchEvent(new Event('change')); + customizeThemesElement.$.colorPicker.value = '#ff0000'; + customizeThemesElement.$.colorPicker.dispatchEvent( + new Event('change')); // Assert. const {value} = await applyAutogeneratedThemeCalled; @@ -234,17 +220,18 @@ }); }); - function assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement) { + function assertSingleThemeIconIsFocusableWithTabKey( + customizeThemesElement: CustomizeThemesElement) { const numberOfthemeIcons = - customizeThemesElement.shadowRoot.querySelectorAll('div cr-theme-icon') + customizeThemesElement.shadowRoot!.querySelectorAll('div cr-theme-icon') .length; const numberOfNoneFocusableThemeIcons = - customizeThemesElement.shadowRoot + customizeThemesElement.shadowRoot! .querySelectorAll('div[tabindex="-1"] cr-theme-icon') .length; assertEquals(numberOfNoneFocusableThemeIcons, numberOfthemeIcons - 1); assertEquals( - customizeThemesElement.shadowRoot + customizeThemesElement.shadowRoot! .querySelectorAll('div[tabindex="0"] cr-theme-icon') .length, 1); @@ -253,12 +240,12 @@ test('No theme selected', () => { const customizeThemesElement = createCustomizeThemesElement(); // First item of the grid has tabindex 0. - const focusableIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const focusableIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon'); assertEquals(focusableIcons.length, 1); assertEquals( focusableIcons[0], - customizeThemesElement.shadowRoot.querySelector( + customizeThemesElement.shadowRoot!.querySelector( 'div[id="autogeneratedThemeContainer"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); }); @@ -276,30 +263,33 @@ activeTab: {value: 0xff0000ff}, activeTabText: {value: 0xff00ff00}, }, + chromeThemeId: undefined, + thirdPartyThemeInfo: undefined, }, isForced: false, }; await flushTasks(); // Assert. - const selectedIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const selectedIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'cr-theme-icon[selected]'); assertEquals(selectedIcons.length, 1); assertEquals( selectedIcons[0], - customizeThemesElement.shadowRoot.querySelector('#autogeneratedTheme')); + customizeThemesElement.shadowRoot!.querySelector( + '#autogeneratedTheme')); assertStyle( - selectedIcons[0], '--cr-theme-icon-frame-color', 'rgba(255, 0, 0, 1)'); + selectedIcons[0]!, '--cr-theme-icon-frame-color', 'rgba(255, 0, 0, 1)'); assertStyle( - selectedIcons[0], '--cr-theme-icon-active-tab-color', + selectedIcons[0]!, '--cr-theme-icon-active-tab-color', 'rgba(0, 0, 255, 1)'); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[aria-checked="true"] cr-theme-icon')); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); }); @@ -311,25 +301,27 @@ // Act. customizeThemesElement.selectedTheme = { type: ThemeType.kDefault, - info: {chromeThemeId: 0}, + info: { + chromeThemeId: 0, + autogeneratedThemeColors: undefined, + thirdPartyThemeInfo: undefined, + }, isForced: false, }; await flushTasks(); // Assert. - const selectedIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const selectedIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'cr-theme-icon[selected]'); assertEquals(selectedIcons.length, 1); - assertEquals( - selectedIcons[0], - customizeThemesElement.shadowRoot.querySelector('#defaultTheme')); + assertEquals(selectedIcons[0], customizeThemesElement.$.defaultTheme); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[aria-checked="true"] cr-theme-icon')); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); }); @@ -353,26 +345,32 @@ // Act. customizeThemesElement.selectedTheme = { type: ThemeType.kChrome, - info: {chromeThemeId: 0}, + info: { + chromeThemeId: 0, + autogeneratedThemeColors: undefined, + thirdPartyThemeInfo: undefined, + }, isForced: false, }; await flushTasks(); // Assert. - const selectedIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const selectedIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'cr-theme-icon[selected]'); assertEquals(selectedIcons.length, 1); - const selectedIconWrapper = customizeThemesElement.shadowRoot.querySelector( - 'div.chrome-theme-wrapper'); + const selectedIconWrapper = + customizeThemesElement.shadowRoot!.querySelector( + 'div.chrome-theme-wrapper'); + assertTrue(!!selectedIconWrapper); assertTrue(!!selectedIconWrapper.querySelector('cr-theme-icon[selected]')); assertEquals(selectedIconWrapper.getAttribute('aria-label'), 'foo'); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[aria-checked="true"] cr-theme-icon')); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); }); @@ -390,6 +388,8 @@ activeTab: {value: 0xff00ff00}, activeTabText: {value: 0xffff0000}, }, + chromeThemeId: undefined, + thirdPartyThemeInfo: undefined, }, isForced: true, }; @@ -397,39 +397,38 @@ // Assert. // Theme icon is selected and updated, and color picker icon is hidden. - const selectedIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const selectedIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'cr-theme-icon[selected]'); assertEquals(selectedIcons.length, 1); assertEquals( selectedIcons[0], - customizeThemesElement.shadowRoot.querySelector('#autogeneratedTheme')); + customizeThemesElement.shadowRoot!.querySelector( + '#autogeneratedTheme')); assertStyle( - selectedIcons[0], '--cr-theme-icon-frame-color', 'rgba(0, 0, 255, 1)'); + selectedIcons[0]!, '--cr-theme-icon-frame-color', 'rgba(0, 0, 255, 1)'); assertStyle( - selectedIcons[0], '--cr-theme-icon-active-tab-color', + selectedIcons[0]!, '--cr-theme-icon-active-tab-color', 'rgba(0, 255, 0, 1)'); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[aria-checked="true"] cr-theme-icon')); assertDeepEquals( selectedIcons, - customizeThemesElement.shadowRoot.querySelectorAll( + customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); - assertTrue( - customizeThemesElement.shadowRoot.querySelector('#colorPickerIcon') - .hidden); + assertTrue(customizeThemesElement.$.colorPickerIcon.hidden); // Managed dialog appears on theme click when policy theme is applied. assertEquals( null, - customizeThemesElement.shadowRoot.querySelector('managed-dialog')); - customizeThemesElement.shadowRoot.querySelector('#defaultTheme').click(); + customizeThemesElement.shadowRoot!.querySelector('managed-dialog')); + customizeThemesElement.$.defaultTheme.click(); await flushTasks(); // Allow managed-dialog to be added to DOM. assertFalse( - customizeThemesElement.shadowRoot.querySelector('managed-dialog') - .hidden); + customizeThemesElement.shadowRoot!.querySelector( + 'managed-dialog')!.hidden); }); test('setting third-party theme shows uninstall UI', async () => { @@ -444,27 +443,29 @@ id: 'foo', name: 'bar', }, + chromeThemeId: undefined, + autogeneratedThemeColors: undefined, }, isForced: false, }; // Assert. assertStyle( - customizeThemesElement.shadowRoot.querySelector( - '#thirdPartyThemeContainer'), + customizeThemesElement.shadowRoot!.querySelector( + '#thirdPartyThemeContainer')!, 'display', 'block'); assertEquals( - customizeThemesElement.shadowRoot.querySelector('#thirdPartyThemeName') - .textContent.trim(), + customizeThemesElement.shadowRoot! + .querySelector('#thirdPartyThemeName')!.textContent!.trim(), 'bar'); // First item of the grid has tabindex 0. - const focusableIcons = customizeThemesElement.shadowRoot.querySelectorAll( + const focusableIcons = customizeThemesElement.shadowRoot!.querySelectorAll( 'div[tabindex="0"] cr-theme-icon'); assertEquals(focusableIcons.length, 1); assertEquals( focusableIcons[0], - customizeThemesElement.shadowRoot.querySelector( + customizeThemesElement.shadowRoot!.querySelector( 'div[id="autogeneratedThemeContainer"] cr-theme-icon')); assertSingleThemeIconIsFocusableWithTabKey(customizeThemesElement); }); @@ -479,12 +480,15 @@ id: 'foo', name: 'bar', }, + chromeThemeId: undefined, + autogeneratedThemeColors: undefined, }, isForced: false, }; // Act. - customizeThemesElement.shadowRoot.querySelector('#thirdPartyLink').click(); + customizeThemesElement.shadowRoot! + .querySelector<HTMLElement>('#thirdPartyLink')!.click(); // Assert. const link = await testProxy.whenCalled('open'); @@ -498,14 +502,18 @@ // Act. customizeThemesElement.selectedTheme = { type: ThemeType.kDefault, - info: {chromeThemeId: 0}, + info: { + chromeThemeId: 0, + thirdPartyThemeInfo: undefined, + autogeneratedThemeColors: undefined, + }, isForced: false, }; // Assert. assertStyle( - customizeThemesElement.shadowRoot.querySelector( - '#thirdPartyThemeContainer'), + customizeThemesElement.shadowRoot!.querySelector( + '#thirdPartyThemeContainer')!, 'display', 'none'); }); @@ -519,13 +527,14 @@ id: 'foo', name: 'bar', }, + chromeThemeId: undefined, + autogeneratedThemeColors: undefined, }, isForced: false, }; // Act. - customizeThemesElement.shadowRoot - .querySelector('#uninstallThirdPartyButton') - .click(); + customizeThemesElement.shadowRoot! + .querySelector<HTMLElement>('#uninstallThirdPartyButton')!.click(); // Assert. assertEquals(1, testProxy.testHandler.getCallCount('applyDefaultTheme')); @@ -534,24 +543,20 @@ }); suite('ThemeIconTest', () => { - /** @type {!ThemeIconElement} */ - let themeIcon; + let themeIcon: ThemeIconElement; - /** @return {!NodeList<!Element>} */ - function queryAll(selector) { - return themeIcon.shadowRoot.querySelectorAll(selector); + function queryAll(selector: string) { + return themeIcon.shadowRoot!.querySelectorAll(selector); } - /** @return {Element} */ - function query(selector) { - return themeIcon.shadowRoot.querySelector(selector); + function query(selector: string) { + return themeIcon.shadowRoot!.querySelector(selector); } setup(() => { - document.innerHTML = ''; + document.body.innerHTML = ''; - themeIcon = /** @type {!ThemeIconElement} */ ( - document.createElement('cr-theme-icon')); + themeIcon = document.createElement('cr-theme-icon'); document.body.appendChild(themeIcon); }); @@ -560,9 +565,9 @@ themeIcon.style.setProperty('--cr-theme-icon-frame-color', 'red'); // Assert. - assertStyle(query('#circle'), 'stroke', 'rgb(255, 0, 0)'); + assertStyle(query('#circle')!, 'stroke', 'rgb(255, 0, 0)'); assertStyle( - queryAll('#gradient > stop')[1], 'stop-color', 'rgb(255, 0, 0)'); + queryAll('#gradient > stop')[1]!, 'stop-color', 'rgb(255, 0, 0)'); }); test('setting active tab color sets gradient', async () => { @@ -571,7 +576,7 @@ // Assert. assertStyle( - queryAll('#gradient > stop')[0], 'stop-color', 'rgb(255, 0, 0)'); + queryAll('#gradient > stop')[0]!, 'stop-color', 'rgb(255, 0, 0)'); }); test('setting explicit stroke color sets different stroke', async () => { @@ -580,17 +585,17 @@ themeIcon.style.setProperty('--cr-theme-icon-stroke-color', 'blue'); // Assert. - assertStyle(query('#circle'), 'stroke', 'rgb(0, 0, 255)'); + assertStyle(query('#circle')!, 'stroke', 'rgb(0, 0, 255)'); assertStyle( - queryAll('#gradient > stop')[1], 'stop-color', 'rgb(255, 0, 0)'); + queryAll('#gradient > stop')[1]!, 'stop-color', 'rgb(255, 0, 0)'); }); test('selecting icon shows ring and check mark', async () => { // Act. - themeIcon.setAttribute('selected', true); + themeIcon.toggleAttribute('selected', true); // Assert. - assertStyle(query('#ring'), 'visibility', 'visible'); - assertStyle(query('#checkMark'), 'visibility', 'visible'); + assertStyle(query('#ring')!, 'visibility', 'visible'); + assertStyle(query('#checkMark')!, 'visibility', 'visible'); }); });
diff --git a/chrome/test/data/webui/cr_components/managed_dialog_test.js b/chrome/test/data/webui/cr_components/managed_dialog_test.ts similarity index 66% rename from chrome/test/data/webui/cr_components/managed_dialog_test.js rename to chrome/test/data/webui/cr_components/managed_dialog_test.ts index 49df96a..93dd6096 100644 --- a/chrome/test/data/webui/cr_components/managed_dialog_test.js +++ b/chrome/test/data/webui/cr_components/managed_dialog_test.ts
@@ -6,8 +6,9 @@ import 'chrome://resources/cr_components/managed_dialog/managed_dialog.js'; +import {ManagedDialogElement} from 'chrome://resources/cr_components/managed_dialog/managed_dialog.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; -import {assertFalse, assertNotEquals, assertTrue} from '../chai_assert.js'; +import {assertFalse, assertNotEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; suite('ManagedDialogTest', function() { suiteSetup(function() { @@ -21,11 +22,11 @@ /** * Sets loadTimeData to the parameters, inserts a <managed-dialog> element in * the DOM, and returns it. - * @param {string} title Managed dialog title text - * @param {string} body Managed dialog body text - * @return {Element} + * @param title Managed dialog title text + * @param body Managed dialog body text */ - function createManagedDialog(title, body) { + function createManagedDialog( + title: string, body: string): ManagedDialogElement { loadTimeData.overrideValues({ title, body, @@ -46,14 +47,14 @@ const body = 'Your org is managing this for you!'; const dialog = createManagedDialog(title, body); assertNotEquals('none', getComputedStyle(dialog).display); - assertTrue(dialog.$$('cr-dialog').open); - assertTrue(dialog.shadowRoot.textContent.includes(title)); - assertTrue(dialog.shadowRoot.textContent.includes(body)); + assertTrue(dialog.$.dialog.open); + assertTrue(dialog.shadowRoot!.textContent!.includes(title)); + assertTrue(dialog.shadowRoot!.textContent!.includes(body)); // Click OK button to dismiss dialog - dialog.$$('.action-button').click(); + dialog.shadowRoot!.querySelector<HTMLElement>('.action-button')!.click(); // Dialog is no longer displayed - assertFalse(dialog.$$('cr-dialog').open); + assertFalse(dialog.$.dialog.open); }); });
diff --git a/chrome/test/data/webui/cr_components/managed_footnote_test.js b/chrome/test/data/webui/cr_components/managed_footnote_test.js deleted file mode 100644 index 6d06dad..0000000 --- a/chrome/test/data/webui/cr_components/managed_footnote_test.js +++ /dev/null
@@ -1,95 +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. - -/** @fileoverview Suite of tests for managed-footnote. */ - -// clang-format off -import 'chrome://resources/cr_components/managed_footnote/managed_footnote.js'; - -import {isChromeOS} from 'chrome://resources/js/cr.m.js'; -import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; -import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -// clang-format on - - /** @enum {string} */ - const TestNames = { - Hidden: 'Hidden When isManaged Is False', - LoadTimeDataBrowser: 'Reads Attributes From loadTimeData browser message', - Events: 'Responds to is-managed-changed events', - LoadTimeDataDevice: 'Reads Attributes From loadTimeData device message', - }; - - const suiteName = 'ManagedFootnoteTest'; - - suite(suiteName, function() { - suiteSetup(function() { - loadTimeData.data = {}; - }); - - setup(function() { - PolymerTest.clearBody(); - }); - - /** - * Resets loadTimeData to the parameters, inserts a <managed-footnote> - * element in the DOM, and returns it. - * @param {boolean} isManaged Whether the footnote should be visible. - * @param {string} browserMessage String to display inside the element, - * before href substitution. - * @param {string} deviceMessage String to display inside the element, - * before href substitution. - * @return {HTMLElement} - */ - function setupTestElement( - isManaged, browserMessage, deviceMessage, managementPageUrl) { - loadTimeData.overrideValues({ - chromeManagementUrl: managementPageUrl, - isManaged: isManaged, - browserManagedByOrg: browserMessage, - deviceManagedByOrg: deviceMessage, - }); - const footnote = document.createElement('managed-footnote'); - document.body.appendChild(footnote); - flush(); - return footnote; - } - - test('Hidden When isManaged Is False', function() { - const footnote = setupTestElement(false, '', '', ''); - assertEquals('none', getComputedStyle(footnote).display); - }); - - test('Reads Attributes From loadTimeData browser message', function() { - const browserMessage = 'the quick brown fox jumps over the lazy dog'; - const deviceMessage = 'the lazy dog jumps over the quick brown fox'; - const footnote = setupTestElement(true, browserMessage, '', ''); - - assertNotEquals('none', getComputedStyle(footnote).display); - assertTrue(footnote.shadowRoot.textContent.includes(browserMessage)); - }); - - test('Responds to is-managed-changed events', function() { - const footnote = setupTestElement(false, '', '', ''); - assertEquals('none', getComputedStyle(footnote).display); - - cr.webUIListenerCallback('is-managed-changed', [true]); - assertNotEquals('none', getComputedStyle(footnote).display); - }); - - if (isChromeOS) { - test('Reads Attributes From loadTimeData device message', function() { - const browserMessage = 'the quick brown fox jumps over the lazy dog'; - const deviceMessage = 'the lazy dog jumps over the quick brown fox'; - const footnote = - setupTestElement(true, browserMessage, deviceMessage, ''); - - assertNotEquals('none', getComputedStyle(footnote).display); - assertTrue(footnote.shadowRoot.textContent.includes(browserMessage)); - - footnote.showDeviceInfo = true; - assertTrue(footnote.shadowRoot.textContent.includes(deviceMessage)); - }); - } - }); -
diff --git a/chrome/test/data/webui/cr_components/managed_footnote_test.ts b/chrome/test/data/webui/cr_components/managed_footnote_test.ts new file mode 100644 index 0000000..f70bb21 --- /dev/null +++ b/chrome/test/data/webui/cr_components/managed_footnote_test.ts
@@ -0,0 +1,85 @@ +// 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. + +/** @fileoverview Suite of tests for managed-footnote. */ + +// clang-format off +import 'chrome://resources/cr_components/managed_footnote/managed_footnote.js'; + +import {ManagedFootnoteElement} from 'chrome://resources/cr_components/managed_footnote/managed_footnote.js'; +import {webUIListenerCallback} from 'chrome://resources/js/cr.m.js'; +import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; +import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import { assertEquals,assertNotEquals, assertTrue} from 'chrome://webui-test/chai_assert.js'; + +// clang-format on + +suite('ManagedFootnoteTest', function() { + suiteSetup(function() { + loadTimeData.data = {}; + }); + + setup(function() { + document.body.innerHTML = ''; + }); + + /** + * Resets loadTimeData to the parameters, inserts a <managed-footnote> + * element in the DOM, and returns it. + * @param isManaged Whether the footnote should be visible. + * @param browserMessage String to display inside the element, before href + * substitution. + * @param deviceMessage String to display inside the element, before href + * substitution. + */ + function setupTestElement( + isManaged: boolean, browserMessage: string, deviceMessage: string, + managementPageUrl: string): ManagedFootnoteElement { + loadTimeData.overrideValues({ + chromeManagementUrl: managementPageUrl, + isManaged: isManaged, + browserManagedByOrg: browserMessage, + deviceManagedByOrg: deviceMessage, + }); + const footnote = document.createElement('managed-footnote'); + document.body.appendChild(footnote); + flush(); + return footnote; + } + + test('Hidden When isManaged Is False', function() { + const footnote = setupTestElement(false, '', '', ''); + assertEquals('none', getComputedStyle(footnote).display); + }); + + test('Reads Attributes From loadTimeData browser message', function() { + const browserMessage = 'the quick brown fox jumps over the lazy dog'; + const footnote = setupTestElement(true, browserMessage, '', ''); + + assertNotEquals('none', getComputedStyle(footnote).display); + assertTrue(footnote.shadowRoot!.textContent!.includes(browserMessage)); + }); + + test('Responds to is-managed-changed events', function() { + const footnote = setupTestElement(false, '', '', ''); + assertEquals('none', getComputedStyle(footnote).display); + + webUIListenerCallback('is-managed-changed', [true]); + assertNotEquals('none', getComputedStyle(footnote).display); + }); + + // <if expr="chromeos_ash"> + test('Reads Attributes From loadTimeData device message', function() { + const browserMessage = 'the quick brown fox jumps over the lazy dog'; + const deviceMessage = 'the lazy dog jumps over the quick brown fox'; + const footnote = setupTestElement(true, browserMessage, deviceMessage, ''); + + assertNotEquals('none', getComputedStyle(footnote).display); + assertTrue(footnote.shadowRoot!.textContent!.includes(browserMessage)); + + footnote.showDeviceInfo = true; + assertTrue(footnote.shadowRoot!.textContent!.includes(deviceMessage)); + }); + // </if> +});
diff --git a/chrome/test/data/webui/cr_elements/.eslintrc.js b/chrome/test/data/webui/cr_elements/.eslintrc.js index e231cdc..985df1b 100644 --- a/chrome/test/data/webui/cr_elements/.eslintrc.js +++ b/chrome/test/data/webui/cr_elements/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/downloads/.eslintrc.js b/chrome/test/data/webui/downloads/.eslintrc.js index f52369d..ee593a0 100644 --- a/chrome/test/data/webui/downloads/.eslintrc.js +++ b/chrome/test/data/webui/downloads/.eslintrc.js
@@ -10,6 +10,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/extensions/.eslintrc.js b/chrome/test/data/webui/extensions/.eslintrc.js index e3d7025..994fc37 100644 --- a/chrome/test/data/webui/extensions/.eslintrc.js +++ b/chrome/test/data/webui/extensions/.eslintrc.js
@@ -5,6 +5,5 @@ module.exports = { 'rules': { 'no-var': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/history/.eslintrc.js b/chrome/test/data/webui/history/.eslintrc.js index 49b3be2..6e50809 100644 --- a/chrome/test/data/webui/history/.eslintrc.js +++ b/chrome/test/data/webui/history/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/print_preview/.eslintrc.js b/chrome/test/data/webui/print_preview/.eslintrc.js index e231cdc..985df1b 100644 --- a/chrome/test/data/webui/print_preview/.eslintrc.js +++ b/chrome/test/data/webui/print_preview/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/settings/.eslintrc.js b/chrome/test/data/webui/settings/.eslintrc.js index e231cdc..985df1b 100644 --- a/chrome/test/data/webui/settings/.eslintrc.js +++ b/chrome/test/data/webui/settings/.eslintrc.js
@@ -6,6 +6,5 @@ 'rules': { 'no-var': 'error', 'prefer-const': 'error', - 'eqeqeq': ['error', 'always', {'null': 'ignore'}], }, };
diff --git a/chrome/test/data/webui/settings/cr_settings_browsertest.js b/chrome/test/data/webui/settings/cr_settings_browsertest.js index c384845d..93db8cc 100644 --- a/chrome/test/data/webui/settings/cr_settings_browsertest.js +++ b/chrome/test/data/webui/settings/cr_settings_browsertest.js
@@ -642,7 +642,8 @@ ].forEach(test => registerTest(...test)); // Timeout on Linux dbg bots: https://crbug.com/1133412 -GEN('#if !(BUILDFLAG(IS_LINUX) && !defined(NDEBUG))'); +// Fails on Mac bots: https://crbug.com/1222886 +GEN('#if !((BUILDFLAG(IS_LINUX) && !defined(NDEBUG)) || BUILDFLAG(IS_MAC))'); [['SecurityPage', 'security_page_test.js'], ].forEach(test => registerTest(...test)); GEN('#endif');
diff --git a/chromeos/CHROMEOS_LKGM b/chromeos/CHROMEOS_LKGM index 0f916ba..5d636506 100644 --- a/chromeos/CHROMEOS_LKGM +++ b/chromeos/CHROMEOS_LKGM
@@ -1 +1 @@ -14537.0.0 \ No newline at end of file +14538.0.0 \ No newline at end of file
diff --git a/chromeos/strings/chromeos_strings_az.xtb b/chromeos/strings/chromeos_strings_az.xtb index c2a8ec2..de4c827 100644 --- a/chromeos/strings/chromeos_strings_az.xtb +++ b/chromeos/strings/chromeos_strings_az.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">Yaxşı (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">Doğrulama növü</translation> <translation id="1782199038061388045">tərcümə</translation> <translation id="1792647875738159689">Skanlama ləğv edilir</translation> <translation id="1807246157184219062">Yüngül</translation>
diff --git a/chromeos/strings/chromeos_strings_ka.xtb b/chromeos/strings/chromeos_strings_ka.xtb index 0f89f4a..bbcc75e 100644 --- a/chromeos/strings/chromeos_strings_ka.xtb +++ b/chromeos/strings/chromeos_strings_ka.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">კარგი (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">ავტორიზაციის ტიპი</translation> <translation id="1782199038061388045">თარგმანი</translation> <translation id="1792647875738159689">მიმდინარეობს სკანირების გაუქმება</translation> <translation id="1807246157184219062">ნათელი</translation>
diff --git a/chromeos/strings/chromeos_strings_mk.xtb b/chromeos/strings/chromeos_strings_mk.xtb index 6d6dd26..93c9fcb 100644 --- a/chromeos/strings/chromeos_strings_mk.xtb +++ b/chromeos/strings/chromeos_strings_mk.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">Добар (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">Тип автентикација</translation> <translation id="1782199038061388045">превод</translation> <translation id="1792647875738159689">Се откажува скенирањето</translation> <translation id="1807246157184219062">Светла</translation>
diff --git a/chromeos/strings/chromeos_strings_mn.xtb b/chromeos/strings/chromeos_strings_mn.xtb index c4ea5df..95e9eda 100644 --- a/chromeos/strings/chromeos_strings_mn.xtb +++ b/chromeos/strings/chromeos_strings_mn.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">Сайн (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Хромэ</translation> +<translation id="1768959921651994223">Баталгаажуулалтын төрөл</translation> <translation id="1782199038061388045">орчуулга</translation> <translation id="1792647875738159689">Скан хийхийг цуцалж байна</translation> <translation id="1807246157184219062">Гэрэлтүүлэг</translation>
diff --git a/chromeos/strings/chromeos_strings_my.xtb b/chromeos/strings/chromeos_strings_my.xtb index db9660ac..16e42d0c 100644 --- a/chromeos/strings/chromeos_strings_my.xtb +++ b/chromeos/strings/chromeos_strings_my.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">ကောင်း (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">အထောက်အထားစိစစ်မှု အမျိုးအစား</translation> <translation id="1782199038061388045">ဘာသာပြန်ခြင်း</translation> <translation id="1792647875738159689">စကင်ဖတ်ခြင်းကို ပယ်ဖျက်နေသည်</translation> <translation id="1807246157184219062">အလင်း</translation>
diff --git a/chromeos/strings/chromeos_strings_th.xtb b/chromeos/strings/chromeos_strings_th.xtb index 6460d67..b333819 100644 --- a/chromeos/strings/chromeos_strings_th.xtb +++ b/chromeos/strings/chromeos_strings_th.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">ดี (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">ประเภทการตรวจสอบสิทธิ์</translation> <translation id="1782199038061388045">การแปล</translation> <translation id="1792647875738159689">กำลังยกเลิกการสแกน</translation> <translation id="1807246157184219062">สว่าง</translation>
diff --git a/chromeos/strings/chromeos_strings_ur.xtb b/chromeos/strings/chromeos_strings_ur.xtb index e6e7d24..809e27d6 100644 --- a/chromeos/strings/chromeos_strings_ur.xtb +++ b/chromeos/strings/chromeos_strings_ur.xtb
@@ -76,6 +76,7 @@ <translation id="175763766237925754">اچھا (<ph name="SIGNAL_STRENGTH" />)</translation> <translation id="1758018619400202187">EAP-TLS</translation> <translation id="1759842336958782510">Chrome</translation> +<translation id="1768959921651994223">تصدیق کی قسم</translation> <translation id="1782199038061388045">ترجمہ</translation> <translation id="1792647875738159689">اسکین کا عمل منسوخ کیا جا رہا ہے</translation> <translation id="1807246157184219062">روشنی</translation>
diff --git a/chromeos/third_party/android_bionic_libc/NOTICE b/chromeos/third_party/android_bionic_libc/NOTICE deleted file mode 100644 index 81e9943..0000000 --- a/chromeos/third_party/android_bionic_libc/NOTICE +++ /dev/null
@@ -1,5074 +0,0 @@ - Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - - strchr - find a character in a string - - Copyright (c) 2014, ARM Limited - All rights Reserved. - Copyright (c) 2014, Linaro Ltd. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the company nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - - Copyright (c) 1993 John Brezak - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. The name of the author may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -==================================================== -Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. - -Developed at SunPro, a Sun Microsystems, Inc. business. -Permission to use, copy, modify, and distribute this -software is freely granted, provided that this notice -is preserved. - -------------------------------------------------------------------- - -Based on the UCB version with the ID appearing below. -This is ANSIish only when "multibyte character == plain character". - -Copyright (c) 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") -Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") -Copyright (C) 1997-2001 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (C) 2006 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2006 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2008 The Android Open Source Project -All rights reserved. -Copyright (c) 2013-2014, NVIDIA Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2009 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2010 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2010 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2010 The Android Open Source Project -Copyright (c) 2008 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Android adaptation and tweak by Jim Huang <jserv@0xlab.org>. - -------------------------------------------------------------------- - -Copyright (C) 2011 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2012 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2012 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2013 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2013 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2013 The Android Open Source Project -All rights reserved. -Copyright (c) 2013-2014 NVIDIA Corporation. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2013 The Android Open Source Project -Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2014 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2014 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (C) 2015 The Android Open Source Project - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -------------------------------------------------------------------- - -Copyright (C) 2015 The Android Open Source Project -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1980, 1983, 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1982, 1986, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1982, 1986, 1993 - The Regents of the University of California. All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1987, 1989 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1989 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1990, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1983, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1985 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1985 Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1985, 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1985, 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1985, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1985, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1987 Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1987, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1987, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1988 Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1988 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1988, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software written by Ken Arnold and -published in UNIX Review, Vol. 6, No. 8. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms are permitted -provided that the above copyright notice and this paragraph are -duplicated in all such forms and that any documentation, -advertising materials, and other materials related to such -distribution and use acknowledge that the software was developed -by the University of California, Berkeley. The name of the -University may not be used to endorse or promote products derived -from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - -------------------------------------------------------------------- - -Copyright (c) 1989 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989 The Regents of the University of California. -All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Roger L. Snyder. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989, 1993 - The Regents of the University of California. All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1989, 1993, 1994 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990 The Regents of the University of California. -All rights reserved. - -This code is derived from locore.s. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990 The Regents of the University of California. -All rights reserved. - -This code is derived from software contributed to Berkeley by -Chris Torek. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990 The Regents of the University of California. -All rights reserved. - -This code is derived from software contributed to Berkeley by -William Jolitz. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Chris Torek. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Donn Seeley at UUNET Technologies, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Donn Seeley at UUNET Technologies, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993 - The Regents of the University of California. All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993, 1994 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1990, 1993, 1994 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Chris Torek. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1991 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1991, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1991, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Berkeley Software Design, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1991, 1993 - The Regents of the University of California. All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -This code is derived from software contributed to Berkeley by -Hugh Smith at The University of Guelph. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1991, 1993, 1995, - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Havard Eidnes. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992 Henry Spencer. -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Henry Spencer of the University of Toronto. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992 The Regents of the University of California. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Ralph Campbell. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Ralph Campbell. This file is derived from the MIPS RISC -Architecture book by Gerry Kane. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. - -This software was developed by the Computer Systems Engineering group -at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and -contributed to Berkeley. - -All advertising materials mentioning features or use of this software -must display the following acknowledgement: - This product includes software developed by the University of - California, Lawrence Berkeley Laboratory. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993 - The Regents of the University of California. All rights reserved. -(c) UNIX System Laboratories, Inc. -All or some portions of this file are derived from material licensed -to the University of California by American Telephone and Telegraph -Co. or Unix System Laboratories, Inc. and are reproduced herein with -the permission of UNIX System Laboratories, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993, 1994 - The Regents of the University of California. All rights reserved. - -This code is derived from software contributed to Berkeley by -Henry Spencer. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1992, 1993, 1994 Henry Spencer. - -This code is derived from software contributed to Berkeley by -Henry Spencer. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1993 Martin Birgmeier -All rights reserved. - -You may redistribute unmodified or modified versions of this source -code provided that the above copyright notice and this and the -following conditions are retained. - -This software is provided ``as is'', and comes with no warranties -of any kind. I shall in no event be liable for anything that happens -to anyone/anything when using this software. - -------------------------------------------------------------------- - -Copyright (c) 1994 SigmaSoft, Th. Lockert <tholo@sigmasoft.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1996 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE -CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1996, David Mazieres <dm@uun.org> -Copyright (c) 2008, Damien Miller <djm@openbsd.org> -Copyright (c) 2013, Markus Friedl <markus@openbsd.org> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1996-1998, 2008 Theo de Raadt -Copyright (c) 1997, 2008-2009 Todd C. Miller - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1997 Mark Brinicombe -Copyright (c) 2010 Android Open Source Project. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by Mark Brinicombe -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997 Niklas Hallqvist. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. -All rights reserved. - -This code was contributed to The NetBSD Foundation by Klaus Klein. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Luke Mewburn. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997, 1998, 1999, 2004 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Luke Mewburn; and by Jason R. Thorpe. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1998 Softweyr LLC. All rights reserved. - -strtok_r, from Berkeley strtok -Oct 13, 1998 by Wes Peters <wes@softweyr.com> - -Copyright (c) 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notices, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notices, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY SOFTWEYR LLC, THE REGENTS AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTWEYR LLC, THE -REGENTS, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1998 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Klaus Klein. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the author may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL -THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR -OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 1999 - David E. O'Brien -Copyright (c) 1988, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2000 Ben Harris. -Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the project nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2000 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Atsushi Onoe. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2000 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Dieter Baron and Thomas Klausner. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2001 Wasabi Systems, Inc. -All rights reserved. - -Written by Frank van der Linden for Wasabi Systems, Inc. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed for the NetBSD Project by - Wasabi Systems, Inc. -4. The name of Wasabi Systems, Inc. may not be used to endorse - or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of Opsycon AB nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 Daniel Hartmeier -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 Marc Espie. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE OPENBSD PROJECT AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBSD -PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 Tim J. Robbins -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 Tim J. Robbins. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - -------------------------------------------------------------------- - -Copyright (c) 2002, 2003 Tim J. Robbins. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002-2004 Tim J. Robbins -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2002-2004 Tim J. Robbins. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 Constantin S. Svintsoff <kostik@iclub.nsu.ru> - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The names of the authors may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 David Schultz <das@FreeBSD.ORG> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 Networks Associates Technology, Inc. -All rights reserved. - -Portions of this software were developed for the FreeBSD Project by -Jacques A. Vidrine, Safeport Network Services, and Network -Associates Laboratories, the Security Research Division of Network -Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 -("CBOSS"), as part of the DARPA CHATS research program. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Sponsored in part by the Defense Advanced Research Projects -Agency (DARPA) and Air Force Research Laboratory, Air Force -Materiel Command, USAF, under agreement number F39502-99-1-0512. - -------------------------------------------------------------------- - -Copyright (c) 2004 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the NetBSD - Foundation, Inc. and its contributors. -4. Neither the name of The NetBSD Foundation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995,1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996,1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1996-1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1997,1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (c) 1996-1999 by Internet Software Consortium. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2004, 2005 David Schultz <das@FreeBSD.ORG> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 Tim J. Robbins. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2005 by Internet Systems Consortium, Inc. ("ISC") -Copyright (c) 1995-1999 by Internet Software Consortium - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2007 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. - -The MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2007-2008 Michael G Schwern - -This software originally derived from Paul Sheer's pivotal_gmtime_r.c. - -The MIT License: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Origin: http://code.google.com/p/y2038 -Modified for Bionic by the Android Open Source Project - -------------------------------------------------------------------- - -Copyright (c) 2008 Android Open Source Project (query id randomization) -Copyright (c) 1985, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2008 Otto Moerbeek <otto@drijf.net> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2008 Todd C. Miller <millert@openbsd.org> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2008, Damien Miller <djm@openbsd.org> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2009 David Schultz <das@FreeBSD.org> -All rights reserved. - -Copyright (c) 2011 The FreeBSD Foundation -All rights reserved. -Portions of this software were developed by David Chisnall -under sponsorship from the FreeBSD Foundation. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2009 David Schultz <das@FreeBSD.org> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2009 The NetBSD Foundation, Inc. - -This code is derived from software contributed to The NetBSD Foundation -by Roy Marples. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2010 MIPS Technologies, Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with - the distribution. - * Neither the name of MIPS Technologies Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2010, 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2010, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 David Chisnall -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Ed Schouten <ed@FreeBSD.org> - David Chisnall <theraven@FreeBSD.org> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2011 Martin Pieuchot <mpi@openbsd.org> -Copyright (c) 2009 Ted Unangst - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2011 The Android Open Source Project -Copyright (c) 2008 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, 2012, 2013 Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2011, VMware, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the VMware, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012, Linaro Limited - All rights reserved. - Copyright (c) 2014, NVIDIA Corporation. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2012-2015 - MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2013 - MIPS Technologies, Inc., California. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE MIPS TECHNOLOGIES, INC. ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE MIPS TECHNOLOGIES, INC. BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2013 ARM Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. The name of the company may not be used to endorse or promote - products derived from this software without specific prior written - permission. - -THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2013 Antoine Jacoutot <ajacoutot@openbsd.org> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Copyright (c) 2013 The NetBSD Foundation, Inc. -All rights reserved. - -This code is derived from software contributed to The NetBSD Foundation -by Christos Zoulas. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2014 - Imagination Technologies Limited. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. Neither the name of the MIPS Technologies, Inc., nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY IMAGINATION TECHNOLOGIES LIMITED ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL IMAGINATION TECHNOLOGIES LIMITED BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2014 Theo de Raadt <deraadt@openbsd.org> -Copyright (c) 2014 Bob Beck <beck@obtuse.com> - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Emulation of getentropy(2) as documented at: -http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2 - -------------------------------------------------------------------- - -Copyright (c) 2014, Intel Corporation -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - - * Neither the name of Intel Corporation nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c) 2014, Linaro Limited - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the Linaro nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c)1999 Citrus Project, -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c)1999, 2000, 2001 Citrus Project, -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c)2001 Citrus Project, -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright (c)2003 Citrus Project, -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> -Copyright 2008 Damien Miller <djm@openbsd.org> -All rights reserved. - -Theo de Raadt <deraadt@openbsd.org> came up with the idea of using -such a mathematical system to generate more random (yet non-repeating) -ids to solve the resolver/named problem. But Niels designed the -actual system based on the constraints. - -Later modified by Damien Miller to wrap the LCG output in a 15-bit -permutation generator based on a Luby-Rackoff block cipher. This -ensures the output is non-repeating and preserves the MSB twiddle -trick, but makes it more resistant to LCG prediction. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- - -Copyright 2008 Android Open Source Project (source port randomization) -Copyright (c) 1985, 1989, 1993 - The Regents of the University of California. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software - must display the following acknowledgement: - This product includes software developed by the University of - California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") -Portions Copyright (C) 1996-2003 Internet Software Consortium. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1993 by Digital Equipment Corporation. - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies, and that -the name of Digital Equipment Corporation not be used in advertising or -publicity pertaining to distribution of the document or software without -specific, written prior permission. - -THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL -WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT -CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -------------------------------------------------------------------- - -Portions Copyright (c) 1995 by International Business Machines, Inc. - -International Business Machines, Inc. (hereinafter called IBM) grants -permission under its copyrights to use, copy, modify, and distribute this -Software with or without fee, provided that the above copyright notice and -all paragraphs of this notice appear in all copies, and that the name of IBM -not be used in connection with the marketing of any product incorporating -the Software or modifications thereof, without specific, written prior -permission. - -To the extent it has a right to do so, IBM grants an immunity from suit -under its patents, if any, for the use, sale or manufacture of products to -the extent that such products are used for performing Domain Name System -dynamic updates in TCP/IP networks by means of the Software. No immunity is -granted for any product per se or for any other function of any product. - -THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, -DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN -IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. - -------------------------------------------------------------------- - -Portions Copyright(C) 1995, Jason Downs. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 1998 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 1998, 1999 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 1998, 2000 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 1998-2000 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 1998-2001 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -The author of this software is David M. Gay. - -Copyright (C) 2000 by Lucent Technologies -All Rights Reserved - -Permission to use, copy, modify, and distribute this software and -its documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appear in all -copies and that both that the copyright notice and this -permission notice and warranty disclaimer appear in supporting -documentation, and that the name of Lucent or any of its entities -not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -LUCENT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL LUCENT OR ANY OF ITS ENTITIES BE LIABLE FOR ANY -SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. - -------------------------------------------------------------------- - -memchr - find a character in a memory zone - -Copyright (c) 2014, ARM Limited -All rights Reserved. -Copyright (c) 2014, Linaro Ltd. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the company nor the names of its contributors - may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------- -
diff --git a/chromeos/third_party/android_bionic_libc/README.chromium b/chromeos/third_party/android_bionic_libc/README.chromium deleted file mode 100644 index a1883bde..0000000 --- a/chromeos/third_party/android_bionic_libc/README.chromium +++ /dev/null
@@ -1,14 +0,0 @@ -Name: Android bionic libc -Short Name: libc_bionic -URL: https://android.googlesource.com/platform/bionic/+/master/libc/ -Version: 0 -Revision: 299798fe02cd43c21e62352f11d7be30d85e0f96 -License: BSD -License File: NOTICE -Security Critical: yes - -Description: -Contains binder.h header file which is needed to let the chrome on Chrome OS talk with binder services. - -Local Modifications: -NOTICE and kernel/uapi/linux/binder.h were copied from the repository to this directory without any modifications. \ No newline at end of file
diff --git a/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h b/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h deleted file mode 100644 index af3cea9..0000000 --- a/chromeos/third_party/android_bionic_libc/kernel/uapi/linux/binder.h +++ /dev/null
@@ -1,190 +0,0 @@ -/**************************************************************************** - **************************************************************************** - *** - *** This header was automatically generated from a Linux kernel header - *** of the same name, to make information necessary for userspace to - *** call into the kernel available to libc. It contains only constants, - *** structures, and macros generated from the original header, and thus, - *** contains no copyrightable information. - *** - *** To edit the content of this header, modify the corresponding - *** source file (e.g. under external/kernel-headers/original/) then - *** run bionic/libc/kernel/tools/update_all.py - *** - *** Any manual change here will be lost the next time this script will - *** be run. You've been warned! - *** - **************************************************************************** - ****************************************************************************/ -#ifndef _UAPI_LINUX_BINDER_H -#define _UAPI_LINUX_BINDER_H -#include <linux/ioctl.h> -#define B_PACK_CHARS(c1,c2,c3,c4) ((((c1) << 24)) | (((c2) << 16)) | (((c3) << 8)) | (c4)) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define B_TYPE_LARGE 0x85 -enum { - BINDER_TYPE_BINDER = B_PACK_CHARS('s', 'b', '*', B_TYPE_LARGE), - BINDER_TYPE_WEAK_BINDER = B_PACK_CHARS('w', 'b', '*', B_TYPE_LARGE), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BINDER_TYPE_HANDLE = B_PACK_CHARS('s', 'h', '*', B_TYPE_LARGE), - BINDER_TYPE_WEAK_HANDLE = B_PACK_CHARS('w', 'h', '*', B_TYPE_LARGE), - BINDER_TYPE_FD = B_PACK_CHARS('f', 'd', '*', B_TYPE_LARGE), -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -enum { - FLAT_BINDER_FLAG_PRIORITY_MASK = 0xff, - FLAT_BINDER_FLAG_ACCEPTS_FDS = 0x100, -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#ifdef BINDER_IPC_32BIT -typedef __u32 binder_size_t; -typedef __u32 binder_uintptr_t; -#else -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -typedef __u64 binder_size_t; -typedef __u64 binder_uintptr_t; -#endif -struct flat_binder_object { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 type; - __u32 flags; - union { - binder_uintptr_t binder; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 handle; - }; - binder_uintptr_t cookie; -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct binder_write_read { - binder_size_t write_size; - binder_size_t write_consumed; - binder_uintptr_t write_buffer; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - binder_size_t read_size; - binder_size_t read_consumed; - binder_uintptr_t read_buffer; -}; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -struct binder_version { - __s32 protocol_version; -}; -#ifdef BINDER_IPC_32BIT -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define BINDER_CURRENT_PROTOCOL_VERSION 7 -#else -#define BINDER_CURRENT_PROTOCOL_VERSION 8 -#endif -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define BINDER_WRITE_READ _IOWR('b', 1, struct binder_write_read) -#define BINDER_SET_IDLE_TIMEOUT _IOW('b', 3, __s64) -#define BINDER_SET_MAX_THREADS _IOW('b', 5, __u32) -#define BINDER_SET_IDLE_PRIORITY _IOW('b', 6, __s32) -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -#define BINDER_SET_CONTEXT_MGR _IOW('b', 7, __s32) -#define BINDER_THREAD_EXIT _IOW('b', 8, __s32) -#define BINDER_VERSION _IOWR('b', 9, struct binder_version) -enum transaction_flags { -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - TF_ONE_WAY = 0x01, - TF_ROOT_OBJECT = 0x04, - TF_STATUS_CODE = 0x08, - TF_ACCEPT_FDS = 0x10, -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -struct binder_transaction_data { - union { - __u32 handle; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - binder_uintptr_t ptr; - } target; - binder_uintptr_t cookie; - __u32 code; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - __u32 flags; - pid_t sender_pid; - uid_t sender_euid; - binder_size_t data_size; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - binder_size_t offsets_size; - union { - struct { - binder_uintptr_t buffer; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - binder_uintptr_t offsets; - } ptr; - __u8 buf[8]; - } data; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -struct binder_ptr_cookie { - binder_uintptr_t ptr; - binder_uintptr_t cookie; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -struct binder_handle_cookie { - __u32 handle; - binder_uintptr_t cookie; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -} __packed; -struct binder_pri_desc { - __s32 priority; - __u32 desc; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -struct binder_pri_ptr_cookie { - __s32 priority; - binder_uintptr_t ptr; -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - binder_uintptr_t cookie; -}; -enum binder_driver_return_protocol { - BR_ERROR = _IOR('r', 0, __s32), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BR_OK = _IO('r', 1), - BR_TRANSACTION = _IOR('r', 2, struct binder_transaction_data), - BR_REPLY = _IOR('r', 3, struct binder_transaction_data), - BR_ACQUIRE_RESULT = _IOR('r', 4, __s32), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BR_DEAD_REPLY = _IO('r', 5), - BR_TRANSACTION_COMPLETE = _IO('r', 6), - BR_INCREFS = _IOR('r', 7, struct binder_ptr_cookie), - BR_ACQUIRE = _IOR('r', 8, struct binder_ptr_cookie), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BR_RELEASE = _IOR('r', 9, struct binder_ptr_cookie), - BR_DECREFS = _IOR('r', 10, struct binder_ptr_cookie), - BR_ATTEMPT_ACQUIRE = _IOR('r', 11, struct binder_pri_ptr_cookie), - BR_NOOP = _IO('r', 12), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BR_SPAWN_LOOPER = _IO('r', 13), - BR_FINISHED = _IO('r', 14), - BR_DEAD_BINDER = _IOR('r', 15, binder_uintptr_t), - BR_CLEAR_DEATH_NOTIFICATION_DONE = _IOR('r', 16, binder_uintptr_t), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BR_FAILED_REPLY = _IO('r', 17), -}; -enum binder_driver_command_protocol { - BC_TRANSACTION = _IOW('c', 0, struct binder_transaction_data), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BC_REPLY = _IOW('c', 1, struct binder_transaction_data), - BC_ACQUIRE_RESULT = _IOW('c', 2, __s32), - BC_FREE_BUFFER = _IOW('c', 3, binder_uintptr_t), - BC_INCREFS = _IOW('c', 4, __u32), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BC_ACQUIRE = _IOW('c', 5, __u32), - BC_RELEASE = _IOW('c', 6, __u32), - BC_DECREFS = _IOW('c', 7, __u32), - BC_INCREFS_DONE = _IOW('c', 8, struct binder_ptr_cookie), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BC_ACQUIRE_DONE = _IOW('c', 9, struct binder_ptr_cookie), - BC_ATTEMPT_ACQUIRE = _IOW('c', 10, struct binder_pri_desc), - BC_REGISTER_LOOPER = _IO('c', 11), - BC_ENTER_LOOPER = _IO('c', 12), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ - BC_EXIT_LOOPER = _IO('c', 13), - BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie), - BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie), - BC_DEAD_BINDER_DONE = _IOW('c', 16, binder_uintptr_t), -/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ -}; -#endif
diff --git a/components/BUILD.gn b/components/BUILD.gn index 9e745b1..812e92da 100644 --- a/components/BUILD.gn +++ b/components/BUILD.gn
@@ -825,6 +825,8 @@ "autofill_assistant/browser/js_flow_executor_impl_browsertest.cc", "autofill_assistant/browser/mock_script_executor_delegate.cc", "autofill_assistant/browser/mock_script_executor_delegate.h", + "autofill_assistant/browser/service/mock_service.cc", + "autofill_assistant/browser/service/mock_service.h", "autofill_assistant/browser/web/batch_element_checker_browsertest.cc", "autofill_assistant/browser/web/web_controller_browsertest.cc", "browser_ui/client_certificate/android/ssl_client_certificate_request_browsertest.cc",
diff --git a/components/autofill_assistant/browser/BUILD.gn b/components/autofill_assistant/browser/BUILD.gn index b95f8502..ff896f94 100644 --- a/components/autofill_assistant/browser/BUILD.gn +++ b/components/autofill_assistant/browser/BUILD.gn
@@ -279,6 +279,8 @@ "wait_for_document_operation.cc", "wait_for_document_operation.h", "wait_for_dom_observer.h", + "wait_for_dom_operation.cc", + "wait_for_dom_operation.h", "web/check_on_top_worker.cc", "web/check_on_top_worker.h", "web/click_or_tap_worker.cc",
diff --git a/components/autofill_assistant/browser/actions/action.cc b/components/autofill_assistant/browser/actions/action.cc index 322caac..42362e5 100644 --- a/components/autofill_assistant/browser/actions/action.cc +++ b/components/autofill_assistant/browser/actions/action.cc
@@ -8,6 +8,8 @@ #include "components/autofill_assistant/browser/actions/action.h" #include "components/autofill_assistant/browser/actions/action_delegate.h" #include "components/autofill_assistant/browser/client_status.h" +#include "components/autofill_assistant/browser/wait_for_document_operation.h" +#include "components/autofill_assistant/browser/wait_for_dom_operation.h" namespace autofill_assistant { @@ -20,6 +22,13 @@ return false; } +Action::ActionData::ActionData() = default; +Action::ActionData::~ActionData() = default; + +Action::ActionData& Action::GetActionData() { + return action_data_; +} + void Action::ProcessAction(ProcessActionCallback callback) { action_stopwatch_.StartActiveTime(); delegate_->GetLogInfo().Clear();
diff --git a/components/autofill_assistant/browser/actions/action.h b/components/autofill_assistant/browser/actions/action.h index 81debc9..d557e05 100644 --- a/components/autofill_assistant/browser/actions/action.h +++ b/components/autofill_assistant/browser/actions/action.h
@@ -10,7 +10,7 @@ #include <string> #include <vector> -#include "base/callback_forward.h" +#include "base/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "components/autofill_assistant/browser/actions/stopwatch.h" @@ -21,12 +21,30 @@ class ActionDelegate; class ClientStatus; +class WaitForDomOperation; +class WaitForDocumentOperation; // An action that performs a single step of a script on the website. class Action { public: virtual ~Action(); + // Data only relevant to the currently running action. + struct ActionData { + ActionData(); + ~ActionData(); + + // Navigation information relevant to this action. + NavigationInfoProto navigation_info; + + std::unique_ptr<WaitForDomOperation> wait_for_dom; + std::unique_ptr<WaitForDocumentOperation> wait_for_document; + + // This callback is set when a navigation event should terminate an ongoing + // prompt action. Only a prompt action will set a valid callback here. + base::OnceCallback<void()> end_prompt_on_navigation_callback; + }; + // Callback runs after this action is executed, pass the result of this action // through a ProcessedActionProto object. // Delegate should outlive this object. @@ -41,6 +59,9 @@ // that they do not overwrite the paused state. virtual bool ShouldInterruptOnPause() const; + // Returns the current action's ActionData. + ActionData& GetActionData(); + protected: // |delegate| must remain valid for the lifetime of this instance. explicit Action(ActionDelegate* delegate, const ActionProto& proto); @@ -72,6 +93,7 @@ friend std::ostream& operator<<(std::ostream& out, const Action& action); const ActionProto proto_; + ActionData action_data_; // Accumulate any result of this action during ProcessAction. Is only valid // during a run of ProcessAction.
diff --git a/components/autofill_assistant/browser/script_executor.cc b/components/autofill_assistant/browser/script_executor.cc index 504b58a..58162e5d 100644 --- a/components/autofill_assistant/browser/script_executor.cc +++ b/components/autofill_assistant/browser/script_executor.cc
@@ -26,6 +26,7 @@ #include "components/autofill_assistant/browser/service/service.h" #include "components/autofill_assistant/browser/trigger_context.h" #include "components/autofill_assistant/browser/wait_for_document_operation.h" +#include "components/autofill_assistant/browser/wait_for_dom_operation.h" #include "components/autofill_assistant/browser/web/element_action_util.h" #include "components/autofill_assistant/browser/web/element_finder.h" #include "components/autofill_assistant/browser/web/element_store.h" @@ -140,17 +141,20 @@ } void ScriptExecutor::OnNavigationStateChanged() { - NavigationInfoProto& navigation_info = current_action_data_.navigation_info; - if (delegate_->IsNavigatingToNewDocument()) { - navigation_info.set_started(true); - navigation_info.set_unexpected(expected_navigation_step_ != - ExpectedNavigationStep::EXPECTED); - } else { - navigation_info.set_ended(true); - } + Action::ActionData* current_action_data = GetCurrentActionData(); + if (current_action_data) { + NavigationInfoProto& navigation_info = current_action_data->navigation_info; + if (delegate_->IsNavigatingToNewDocument()) { + navigation_info.set_started(true); + navigation_info.set_unexpected(expected_navigation_step_ != + ExpectedNavigationStep::EXPECTED); + } else { + navigation_info.set_ended(true); + } - if (delegate_->HasNavigationError()) { - navigation_info.set_has_error(true); + if (delegate_->HasNavigationError()) { + navigation_info.set_has_error(true); + } } switch (expected_navigation_step_) { @@ -170,8 +174,7 @@ std::move(on_expected_navigation_done_) .Run(!delegate_->HasNavigationError()); } - // Early return since current_action_data_ is no longer valid at this - // point. + // Early return since the current action may have ended by now. return; case ExpectedNavigationStep::DONE: @@ -180,9 +183,11 @@ } // Potentially terminate an ongoing prompt action. - if (navigation_info.ended() && - current_action_data_.end_prompt_on_navigation_callback) { - std::move(current_action_data_.end_prompt_on_navigation_callback).Run(); + if (current_action_data) { + if (current_action_data->navigation_info.ended() && + current_action_data->end_prompt_on_navigation_callback) { + std::move(current_action_data->end_prompt_on_navigation_callback).Run(); + } } } @@ -193,7 +198,6 @@ if (actions_[*current_action_index_]->ShouldInterruptOnPause()) { actions_[*current_action_index_] = ProtocolUtils::CreateAction( this, actions_[*current_action_index_]->proto()); - current_action_data_ = CurrentActionData(); current_action_index_.reset(); } } @@ -241,7 +245,12 @@ void ScriptExecutor::ShortWaitForElement( const Selector& selector, base::OnceCallback<void(const ClientStatus&, base::TimeDelta)> callback) { - current_action_data_.wait_for_dom = std::make_unique<WaitForDomOperation>( + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + current_action_data->wait_for_dom = std::make_unique<WaitForDomOperation>( this, delegate_, ui_delegate_, delegate_->GetSettings().short_wait_for_element_deadline, /* allow_observer_mode */ true, @@ -250,13 +259,18 @@ weak_ptr_factory_.GetWeakPtr(), selector), base::BindOnce(&ScriptExecutor::OnShortWaitForElement, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); - current_action_data_.wait_for_dom->Run(); + current_action_data->wait_for_dom->Run(); } void ScriptExecutor::ShortWaitForElementWithSlowWarning( const Selector& selector, base::OnceCallback<void(const ClientStatus&, base::TimeDelta)> callback) { - current_action_data_.wait_for_dom = std::make_unique<WaitForDomOperation>( + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + current_action_data->wait_for_dom = std::make_unique<WaitForDomOperation>( this, delegate_, ui_delegate_, delegate_->GetSettings().short_wait_for_element_deadline, /* allow_observer_mode */ true, @@ -265,10 +279,10 @@ weak_ptr_factory_.GetWeakPtr(), selector), base::BindOnce(&ScriptExecutor::OnShortWaitForElement, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); - current_action_data_.wait_for_dom->SetTimeoutWarningCallback( + current_action_data->wait_for_dom->SetTimeoutWarningCallback( base::BindOnce(&ScriptExecutor::MaybeShowSlowWebsiteWarning, weak_ptr_factory_.GetWeakPtr())); - current_action_data_.wait_for_dom->Run(); + current_action_data->wait_for_dom->Run(); } void ScriptExecutor::WaitForDom( @@ -280,12 +294,17 @@ base::OnceCallback<void(const ClientStatus&)>)> check_elements, base::OnceCallback<void(const ClientStatus&, base::TimeDelta)> callback) { - current_action_data_.wait_for_dom = std::make_unique<WaitForDomOperation>( + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + current_action_data->wait_for_dom = std::make_unique<WaitForDomOperation>( this, delegate_, ui_delegate_, max_wait_time, allow_observer_mode, allow_interrupt, observer, check_elements, base::BindOnce(&ScriptExecutor::OnWaitForElementVisibleWithInterrupts, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); - current_action_data_.wait_for_dom->Run(); + current_action_data->wait_for_dom->Run(); } void ScriptExecutor::WaitForDomWithSlowWarning( @@ -296,16 +315,21 @@ base::OnceCallback<void(const ClientStatus&)>)> check_elements, base::OnceCallback<void(const ClientStatus&, base::TimeDelta)> callback) { - current_action_data_.wait_for_dom = std::make_unique<WaitForDomOperation>( + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + current_action_data->wait_for_dom = std::make_unique<WaitForDomOperation>( this, delegate_, ui_delegate_, max_wait_time, /* allow_observer_mode= */ true, allow_interrupt, observer, check_elements, base::BindOnce(&ScriptExecutor::OnWaitForElementVisibleWithInterrupts, weak_ptr_factory_.GetWeakPtr(), std::move(callback))); - current_action_data_.wait_for_dom->SetTimeoutWarningCallback( + current_action_data->wait_for_dom->SetTimeoutWarningCallback( base::BindOnce(&ScriptExecutor::MaybeShowSlowWebsiteWarning, weak_ptr_factory_.GetWeakPtr())); - current_action_data_.wait_for_dom->Run(); + current_action_data->wait_for_dom->Run(); } void ScriptExecutor::SetStatusMessage(const std::string& message) { @@ -443,6 +467,12 @@ base::OnceCallback<void()> end_on_navigation_callback, bool browse_mode, bool browse_mode_invisible) { + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + // First communicate to the delegate that prompt actions should or should not // expand the sheet intitially. ui_delegate_->SetExpandSheetForPromptAction(!disable_force_expand_sheet); @@ -462,7 +492,7 @@ } if (end_on_navigation_callback) { - current_action_data_.end_prompt_on_navigation_callback = + current_action_data->end_prompt_on_navigation_callback = std::move(end_on_navigation_callback); } } @@ -569,11 +599,16 @@ base::OnceCallback<void(const ClientStatus&, DocumentReadyState, base::TimeDelta)> callback) { - current_action_data_.wait_for_document = + Action::ActionData* current_action_data = GetCurrentActionData(); + if (!current_action_data) { + NOTREACHED() << "must not be called outside of actions"; + return; + } + current_action_data->wait_for_document = std::make_unique<WaitForDocumentOperation>( delegate_, max_wait_time, min_ready_state, optional_frame_element, std::move(callback)); - current_action_data_.wait_for_document->Run(); + current_action_data->wait_for_document->Run(); } void ScriptExecutor::WaitUntilDocumentIsInReadyState( @@ -816,6 +851,17 @@ return true; } +Action::ActionData* ScriptExecutor::GetCurrentActionData() { + if (!current_action_index_) { + return nullptr; + } + if (current_action_index_ >= actions_.size()) { + NOTREACHED() << "Invalid current_action_index"; + return nullptr; + } + return &actions_.at(*current_action_index_)->GetActionData(); +} + base::WeakPtr<ActionDelegate> ScriptExecutor::GetWeakPtr() const { return weak_ptr_factory_.GetWeakPtr(); } @@ -954,10 +1000,10 @@ } void ScriptExecutor::ProcessAction(Action* action) { + DCHECK(GetCurrentActionData()); VLOG(2) << "Begin action: " << *action; - current_action_data_ = CurrentActionData(); - current_action_data_.navigation_info.set_has_error( + GetCurrentActionData()->navigation_info.set_has_error( delegate_->HasNavigationError()); action->ProcessAction(base::BindOnce(&ScriptExecutor::OnProcessedAction, @@ -985,6 +1031,7 @@ void ScriptExecutor::OnProcessedAction( base::TimeTicks start_time, std::unique_ptr<ProcessedActionProto> processed_action_proto) { + DCHECK(GetCurrentActionData()); base::TimeDelta run_time = base::TimeTicks::Now() - start_time; previous_action_type_ = processed_action_proto->action().action_info_case(); processed_actions_.emplace_back(*processed_action_proto); @@ -1004,7 +1051,7 @@ auto& processed_action = processed_actions_.back(); processed_action.set_run_time_ms(run_time.InMilliseconds()); *processed_action.mutable_navigation_info() = - current_action_data_.navigation_info; + GetCurrentActionData()->navigation_info; if (processed_action.status() != ProcessedActionStatusProto::ACTION_APPLIED) { VLOG(1) << "Action failed: " << processed_action.status(); @@ -1068,339 +1115,6 @@ std::move(callback).Run(element_status, wait_time); } -ScriptExecutor::WaitForDomOperation::WaitForDomOperation( - ScriptExecutor* main_script, - ScriptExecutorDelegate* delegate, - ScriptExecutorUiDelegate* ui_delegate, - base::TimeDelta max_wait_time, - bool allow_observers, - bool allow_interrupt, - WaitForDomObserver* observer, - base::RepeatingCallback<void(BatchElementChecker*, - base::OnceCallback<void(const ClientStatus&)>)> - check_elements, - WaitForDomOperation::Callback callback) - : main_script_(main_script), - delegate_(delegate), - ui_delegate_(ui_delegate), - max_wait_time_(max_wait_time), - allow_interrupt_(allow_interrupt), - use_observers_(allow_observers && delegate->GetTriggerContext() - ->GetScriptParameters() - .GetEnableObserverWaitForDom() - .value_or(false)), - observer_(observer), - check_elements_(std::move(check_elements)), - callback_(std::move(callback)), - timeout_warning_delay_( - main_script->delegate_->GetSettings().warning_delay), - retry_timer_(main_script->delegate_->GetSettings() - .periodic_element_check_interval) {} - -ScriptExecutor::WaitForDomOperation::~WaitForDomOperation() { - delegate_->RemoveNavigationListener(this); -} - -void ScriptExecutor::WaitForDomOperation::Run() { - delegate_->AddNavigationListener(this); - wait_time_stopwatch_.Start(); - Start(); -} - -void ScriptExecutor::WaitForDomOperation::SetTimeoutWarningCallback( - WarningCallback warning_callback) { - warning_callback_ = std::move(warning_callback); -} - -void ScriptExecutor::WaitForDomOperation::Start() { - retry_timer_.Start( - max_wait_time_, - base::BindRepeating(&ScriptExecutor::WaitForDomOperation::RunChecks, - // safe since this instance owns retry_timer_ - base::Unretained(this)), - base::BindOnce(&ScriptExecutor::WaitForDomOperation::RunCallback, - base::Unretained(this))); -} - -void ScriptExecutor::WaitForDomOperation::Pause() { - if (interrupt_executor_) { - // If an interrupt is running, it'll be the one to be paused, if necessary. - return; - } - - retry_timer_.Cancel(); -} - -void ScriptExecutor::WaitForDomOperation::Continue() { - if (retry_timer_.running() || !callback_) - return; - - Start(); -} - -void ScriptExecutor::WaitForDomOperation::OnNavigationStateChanged() { - if (delegate_->IsNavigatingToNewDocument()) { - Pause(); - } else { - Continue(); - } -} - -void ScriptExecutor::WaitForDomOperation::OnServerPayloadChanged( - const std::string& global_payload, - const std::string& script_payload) { - // Interrupts and main scripts share global payloads, but not script payloads. - main_script_->last_global_payload_ = global_payload; - main_script_->ReportPayloadsToListener(); -} - -void ScriptExecutor::WaitForDomOperation::OnScriptListChanged( - std::vector<std::unique_ptr<Script>> scripts) { - main_script_->ReportScriptsUpdateToListener(std::move(scripts)); -} - -void ScriptExecutor::WaitForDomOperation::TimeoutWarning() { - if (warning_callback_) { - std::move(warning_callback_) - .Run(base::BindOnce( - &ScriptExecutor::WaitForDomOperation::SetSlowWarningStatus, - weak_ptr_factory_.GetWeakPtr())); - } -} - -void ScriptExecutor::WaitForDomOperation::SetSlowWarningStatus(bool was_shown) { - if (was_shown) { - warning_status_ = WARNING_SHOWN; - } else { - warning_status_ = WARNING_TRIGGERED; - } -} - -void ScriptExecutor::WaitForDomOperation::RunChecks( - base::OnceCallback<void(const ClientStatus&)> report_attempt_result) { - warning_timer_ = std::make_unique<base::OneShotTimer>(); - warning_timer_->Start( - FROM_HERE, timeout_warning_delay_, - base::BindOnce(&ScriptExecutor::WaitForDomOperation::TimeoutWarning, - weak_ptr_factory_.GetWeakPtr())); - - if (use_observers_) { - // Observers should stop soon after the elements are in the page. - wait_time_total_ = wait_time_stopwatch_.TotalElapsed(); - } else if (wait_time_stopwatch_.TotalElapsed() < retry_timer_.period()) { - // It's the first run of the checks, set the total time waited to 0. - wait_time_total_ = base::Seconds(0); - } else { - // If this is not the first run of the checks, in order to estimate - // the real cost of periodic checks, half the duration of the retry - // timer period is removed from the total wait time. This is to - // account for the fact that the conditions could have been satisfied - // at any point between the two consecutive checks. - wait_time_total_ = - wait_time_stopwatch_.TotalElapsed() - retry_timer_.period() / 2; - } - // Reset state possibly left over from previous runs. - element_check_result_ = ClientStatus(); - runnable_interrupts_.clear(); - batch_element_checker_ = std::make_unique<BatchElementChecker>(); - check_elements_.Run(batch_element_checker_.get(), - base::BindOnce(&WaitForDomOperation::OnElementCheckDone, - base::Unretained(this))); - if (allow_interrupt_) { - for (const std::unique_ptr<Script>& interrupt : - *main_script_->ordered_interrupts_) { - if (ran_interrupts_.find(interrupt->handle.path) != - ran_interrupts_.end()) { - continue; - } - - interrupt->precondition->Check( - delegate_->GetCurrentURL(), batch_element_checker_.get(), - *delegate_->GetTriggerContext(), - base::BindOnce(&WaitForDomOperation::OnPreconditionCheckDone, - weak_ptr_factory_.GetWeakPtr(), - interrupt->handle.path)); - } - } - - batch_element_checker_->AddAllDoneCallback( - base::BindOnce(&WaitForDomOperation::OnAllChecksDone, - base::Unretained(this), std::move(report_attempt_result))); - if (use_observers_) { - batch_element_checker_->EnableObserver( - /* max_wait_time= */ max_wait_time_ - - wait_time_stopwatch_.TotalElapsed(), - /* periodic_check_interval= */ - main_script_->delegate_->GetSettings().periodic_element_check_interval, - /* extra_timeout= */ - main_script_->delegate_->GetSettings().selector_observer_extra_timeout); - } - batch_element_checker_->Run(delegate_->GetWebController()); -} - -void ScriptExecutor::WaitForDomOperation::OnPreconditionCheckDone( - const std::string& interrupt_path, - bool precondition_match) { - if (precondition_match) - runnable_interrupts_.insert(interrupt_path); -} - -void ScriptExecutor::WaitForDomOperation::OnElementCheckDone( - const ClientStatus& element_status) { - element_check_result_ = element_status; - - // Wait for all checks to run before reporting that the element was found to - // the caller, so interrupts have a chance to run. -} - -void ScriptExecutor::WaitForDomOperation::OnAllChecksDone( - base::OnceCallback<void(const ClientStatus&)> report_attempt_result) { - warning_timer_->Stop(); - if (runnable_interrupts_.empty()) { - // Since no interrupts fired, allow previously-run interrupts to be run - // again in the next round. This is meant to give elements one round to - // disappear and avoid the simplest form of loops. A round with interrupts - // firing doesn't count as one round here, because an interrupt can run - // quickly and return immediately, without waiting for - // periodic_element_check_interval. - ran_interrupts_.clear(); - } else { - // We must go through runnable_interrupts_ to make sure priority order is - // respected in case more than one interrupt is ready to run. - for (const std::unique_ptr<Script>& interrupt : - *main_script_->ordered_interrupts_) { - const std::string& path = interrupt->handle.path; - if (runnable_interrupts_.find(path) != runnable_interrupts_.end()) { - RunInterrupt(path); - return; - } - } - } - std::move(report_attempt_result).Run(element_check_result_); -} - -void ScriptExecutor::WaitForDomOperation::RunInterrupt( - const std::string& path) { - batch_element_checker_.reset(); - if (observer_) - observer_->OnInterruptStarted(); - - SavePreInterruptState(); - ran_interrupts_.insert(path); - interrupt_executor_ = std::make_unique<ScriptExecutor>( - path, - std::make_unique<TriggerContext>(std::vector<const TriggerContext*>{ - main_script_->additional_context_.get()}), - main_script_->last_global_payload_, main_script_->initial_script_payload_, - /* listener= */ this, &no_interrupts_, delegate_, ui_delegate_); - delegate_->EnterState(AutofillAssistantState::RUNNING); - ui_delegate_->SetUserActions(nullptr); - // Note that we don't clear the touchable area in the delegate here. - // TODO(b/209732258): check whether this is a bug. - interrupt_executor_->Run( - main_script_->user_data_, - base::BindOnce(&ScriptExecutor::WaitForDomOperation::OnInterruptDone, - base::Unretained(this))); - // base::Unretained(this) is safe because interrupt_executor_ belongs to this -} - -void ScriptExecutor::WaitForDomOperation::OnInterruptDone( - const ScriptExecutor::Result& result) { - interrupt_executor_.reset(); - if (!result.success || result.at_end != ScriptExecutor::CONTINUE) { - RunCallbackWithResult(ClientStatus(INTERRUPT_FAILED), &result); - return; - } - if (observer_) - observer_->OnInterruptFinished(); - - RestorePreInterruptState(); - RestorePreInterruptScroll(); - - // Restart. We use the original wait time since the interruption could have - // triggered any kind of actions, including actions that wait on the user. We - // don't trust a previous element_found_ result, since it could have changed. - Start(); -} - -void ScriptExecutor::WaitForDomOperation::RunCallback( - const ClientStatus& element_status) { - RunCallbackWithResult(element_status, nullptr); -} - -void ScriptExecutor::WaitForDomOperation::RunCallbackWithResult( - const ClientStatus& element_status, - const ScriptExecutor::Result* result) { - // stop element checking if one is still in progress - batch_element_checker_.reset(); - retry_timer_.Cancel(); - warning_timer_->Stop(); - - if (!callback_) - return; - - ClientStatus status(element_status); - status.set_slow_warning_status(warning_status_); - - std::move(callback_).Run(status, result, wait_time_total_); -} - -void ScriptExecutor::WaitForDomOperation::SavePreInterruptState() { - if (saved_pre_interrupt_state_) - return; - - ExecutorState pre_interrupt_state; - pre_interrupt_state.status_message = ui_delegate_->GetStatusMessage(); - pre_interrupt_state.controller_state = delegate_->GetState(); - saved_pre_interrupt_state_ = pre_interrupt_state; -} - -void ScriptExecutor::WaitForDomOperation::RestorePreInterruptState() { - if (!saved_pre_interrupt_state_) - return; - - ui_delegate_->SetStatusMessage(saved_pre_interrupt_state_->status_message); - delegate_->EnterState(saved_pre_interrupt_state_->controller_state); - if (main_script_->touchable_element_area_) { - delegate_->SetTouchableElementArea(*main_script_->touchable_element_area_); - } -} - -void ScriptExecutor::WaitForDomOperation::RestorePreInterruptScroll() { - if (!saved_pre_interrupt_state_) - return; - if (!main_script_->last_focused_element_.has_value()) - return; - - auto element = std::make_unique<ElementFinder::Result>(); - if (!main_script_->GetElementStore() - ->RestoreElement(*main_script_->last_focused_element_, element.get()) - .ok()) { - return; - } - - auto actions = std::make_unique<element_action_util::ElementActionVector>(); - action_delegate_util::AddStepIgnoreTiming( - base::BindOnce(&ActionDelegate::WaitUntilDocumentIsInReadyState, - main_script_->GetWeakPtr(), - delegate_->GetSettings().document_ready_check_timeout, - DOCUMENT_INTERACTIVE), - actions.get()); - actions->emplace_back( - base::BindOnce(&WebController::ScrollIntoViewIfNeeded, - main_script_->GetWebController()->GetWeakPtr(), - /* center= */ true)); - element_action_util::TakeElementAndPerform( - base::BindOnce(&element_action_util::PerformAll, std::move(actions)), - /* done= */ base::DoNothing(), /* element_status= */ OkClientStatus(), - std::move(element)); -} - -ScriptExecutor::CurrentActionData::CurrentActionData() = default; -ScriptExecutor::CurrentActionData::~CurrentActionData() = default; -ScriptExecutor::CurrentActionData& ScriptExecutor::CurrentActionData::operator=( - ScriptExecutor::CurrentActionData&& other) = default; - std::ostream& operator<<(std::ostream& out, const ScriptExecutor::Result& result) { result.success ? out << "succeeded. " : out << "failed. ";
diff --git a/components/autofill_assistant/browser/script_executor.h b/components/autofill_assistant/browser/script_executor.h index e1b45cd..63cdc3e 100644 --- a/components/autofill_assistant/browser/script_executor.h +++ b/components/autofill_assistant/browser/script_executor.h
@@ -38,7 +38,7 @@ namespace autofill_assistant { class ElementStore; class UserModel; -class WaitForDocumentOperation; +class WaitForDomOperation; class WebController; // Class to execute an assistant script. @@ -269,139 +269,8 @@ override; private: - // Helper for WaitForElementVisible that keeps track of the state required to - // run interrupts while waiting for a specific element. - class WaitForDomOperation : public ScriptExecutor::Listener, - ScriptExecutorDelegate::NavigationListener { - public: - // Let the caller know about either the result of looking for the element or - // of an abnormal result from an interrupt. - // - // If the given result is non-null, it should be forwarded as the result of - // the main script. - using Callback = base::OnceCallback<void(const ClientStatus&, - const ScriptExecutor::Result*, - base::TimeDelta)>; - - using WarningCallback = - base::OnceCallback<void(base::OnceCallback<void(bool)>)>; - - // |main_script_| must not be null and outlive this instance. - WaitForDomOperation( - ScriptExecutor* main_script, - ScriptExecutorDelegate* delegate, - ScriptExecutorUiDelegate* ui_delegate, - base::TimeDelta max_wait_time, - bool allow_observer_mode, - bool allow_interrupt, - WaitForDomObserver* observer, - base::RepeatingCallback< - void(BatchElementChecker*, - base::OnceCallback<void(const ClientStatus&)>)> check_elements, - WaitForDomOperation::Callback callback); - - WaitForDomOperation(const WaitForDomOperation&) = delete; - WaitForDomOperation& operator=(const WaitForDomOperation&) = delete; - - ~WaitForDomOperation() override; - - void Run(); - void Terminate(); - void SetTimeoutWarningCallback(WarningCallback timeout_warning); - - private: - struct ExecutorState { - // The status message that was displayed when the interrupt started. - std::string status_message; - // The state the controller was in when the interrupt triggered. - AutofillAssistantState controller_state; - }; - - void Start(); - void Pause(); - void Continue(); - - // Implements ScriptExecutorDelegate::NavigationListener - void OnNavigationStateChanged() override; - - // Implements ScriptExecutor::Listener - void OnServerPayloadChanged(const std::string& global_payload, - const std::string& script_payload) override; - void OnScriptListChanged( - std::vector<std::unique_ptr<Script>> scripts) override; - - void RunChecks( - base::OnceCallback<void(const ClientStatus&)> report_attempt_result); - void OnPreconditionCheckDone(const std::string& interrupt_path, - bool precondition_match); - void OnElementCheckDone(const ClientStatus&); - void OnAllChecksDone( - base::OnceCallback<void(const ClientStatus&)> report_attempt_result); - void RunInterrupt(const std::string& path); - void OnInterruptDone(const ScriptExecutor::Result& result); - void RunCallback(const ClientStatus& element_status); - void RunCallbackWithResult(const ClientStatus& element_status, - const ScriptExecutor::Result* result); - void SetSlowWarningStatus(bool was_shown); - - // Saves the current state and sets save_pre_interrupt_state_. - void SavePreInterruptState(); - - // Restores the state as found by SavePreInterruptState. - void RestorePreInterruptState(); - - // if save_pre_interrupt_state_ is set, attempt to scroll the page back to - // the original area. - void RestorePreInterruptScroll(); - - void TimeoutWarning(); - - raw_ptr<ScriptExecutor> main_script_; - raw_ptr<ScriptExecutorDelegate> delegate_; - raw_ptr<ScriptExecutorUiDelegate> ui_delegate_; - const base::TimeDelta max_wait_time_; - const bool allow_interrupt_; - const bool use_observers_; - raw_ptr<WaitForDomObserver> observer_; - base::RepeatingCallback<void(BatchElementChecker*, - base::OnceCallback<void(const ClientStatus&)>)> - check_elements_; - WaitForDomOperation::Callback callback_; - base::OnceCallback<void(base::OnceCallback<void(bool)>)> warning_callback_; - std::unique_ptr<base::OneShotTimer> warning_timer_; - base::TimeDelta timeout_warning_delay_; - - SlowWarningStatus warning_status_ = NO_WARNING; - - std::unique_ptr<BatchElementChecker> batch_element_checker_; - - // Path of interrupts from |ordered_interrupts_| that have been found - // runnable. - std::set<std::string> runnable_interrupts_; - ClientStatus element_check_result_; - - // An empty vector of interrupts that can be passed to interrupt_executor_ - // and outlives it. Interrupts must not run interrupts. - const std::vector<std::unique_ptr<Script>> no_interrupts_; - Stopwatch wait_time_stopwatch_; - Stopwatch period_stopwatch_; - base::TimeDelta wait_time_total_; - - // The interrupt that's currently running. - std::unique_ptr<ScriptExecutor> interrupt_executor_; - - // The state of the ScriptExecutor, as registered before the first interrupt - // is run. - absl::optional<ExecutorState> saved_pre_interrupt_state_; - - // Paths of the interrupts that were just run. These interrupts are - // prevented from firing for one round. - std::set<std::string> ran_interrupts_; - - RetryTimer retry_timer_; - - base::WeakPtrFactory<WaitForDomOperation> weak_ptr_factory_{this}; - }; + // TODO(b/220079189): remove this friend declaration. + friend class WaitForDomOperation; void OnGetActions(base::TimeTicks start_time, int http_status, @@ -471,6 +340,9 @@ // state and client settings. bool MaybeShowSlowWarning(const std::string& message, bool enabled); + // Returns the current ActionData, or nullptr if there is no current action. + Action::ActionData* GetCurrentActionData(); + const std::string script_path_; std::unique_ptr<TriggerContext> additional_context_; std::string last_global_payload_; @@ -515,24 +387,7 @@ // Callback called the next time |expected_navigation_step_| becomes DONE. base::OnceCallback<void(bool)> on_expected_navigation_done_; - // Data only relevant to the currently running action. It is cleared before an - // action is run. - struct CurrentActionData { - CurrentActionData(); - ~CurrentActionData(); - CurrentActionData& operator=(CurrentActionData&& other); - - // Navigation information relevant to the current action. - NavigationInfoProto navigation_info; - - std::unique_ptr<WaitForDomOperation> wait_for_dom; - std::unique_ptr<WaitForDocumentOperation> wait_for_document; - - // This callback is set when a navigation event should terminate an ongoing - // prompt action. Only a prompt action will set a valid callback here. - base::OnceCallback<void()> end_prompt_on_navigation_callback; - }; - CurrentActionData current_action_data_; + // Only set while an action is being executed. absl::optional<size_t> current_action_index_; raw_ptr<const UserData> user_data_ = nullptr;
diff --git a/components/autofill_assistant/browser/wait_for_dom_operation.cc b/components/autofill_assistant/browser/wait_for_dom_operation.cc new file mode 100644 index 0000000..4ddfb334 --- /dev/null +++ b/components/autofill_assistant/browser/wait_for_dom_operation.cc
@@ -0,0 +1,333 @@ +// Copyright 2022 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/autofill_assistant/browser/wait_for_dom_operation.h" +#include "components/autofill_assistant/browser/actions/action_delegate_util.h" +#include "components/autofill_assistant/browser/wait_for_dom_observer.h" +#include "components/autofill_assistant/browser/web/element_action_util.h" + +namespace autofill_assistant { + +WaitForDomOperation::WaitForDomOperation( + ScriptExecutor* main_script, + ScriptExecutorDelegate* delegate, + ScriptExecutorUiDelegate* ui_delegate, + base::TimeDelta max_wait_time, + bool allow_observers, + bool allow_interrupt, + WaitForDomObserver* observer, + base::RepeatingCallback<void(BatchElementChecker*, + base::OnceCallback<void(const ClientStatus&)>)> + check_elements, + WaitForDomOperation::Callback callback) + : main_script_(main_script), + delegate_(delegate), + ui_delegate_(ui_delegate), + max_wait_time_(max_wait_time), + allow_interrupt_(allow_interrupt), + use_observers_(allow_observers && delegate->GetTriggerContext() + ->GetScriptParameters() + .GetEnableObserverWaitForDom() + .value_or(false)), + observer_(observer), + check_elements_(std::move(check_elements)), + callback_(std::move(callback)), + timeout_warning_delay_(delegate_->GetSettings().warning_delay), + retry_timer_(delegate_->GetSettings().periodic_element_check_interval) {} + +WaitForDomOperation::~WaitForDomOperation() { + delegate_->RemoveNavigationListener(this); +} + +void WaitForDomOperation::Run() { + delegate_->AddNavigationListener(this); + wait_time_stopwatch_.Start(); + Start(); +} + +void WaitForDomOperation::SetTimeoutWarningCallback( + WarningCallback warning_callback) { + warning_callback_ = std::move(warning_callback); +} + +void WaitForDomOperation::Start() { + retry_timer_.Start( + max_wait_time_, + base::BindRepeating(&WaitForDomOperation::RunChecks, + // safe since this instance owns retry_timer_ + base::Unretained(this)), + base::BindOnce(&WaitForDomOperation::RunCallback, + base::Unretained(this))); +} + +void WaitForDomOperation::Pause() { + if (interrupt_executor_) { + // If an interrupt is running, it'll be the one to be paused, if necessary. + return; + } + + retry_timer_.Cancel(); +} + +void WaitForDomOperation::Continue() { + if (retry_timer_.running() || !callback_) + return; + + Start(); +} + +void WaitForDomOperation::OnNavigationStateChanged() { + if (delegate_->IsNavigatingToNewDocument()) { + Pause(); + } else { + Continue(); + } +} + +void WaitForDomOperation::OnServerPayloadChanged( + const std::string& global_payload, + const std::string& script_payload) { + // Interrupts and main scripts share global payloads, but not script payloads. + main_script_->last_global_payload_ = global_payload; + main_script_->ReportPayloadsToListener(); +} + +void WaitForDomOperation::OnScriptListChanged( + std::vector<std::unique_ptr<Script>> scripts) { + main_script_->ReportScriptsUpdateToListener(std::move(scripts)); +} + +void WaitForDomOperation::TimeoutWarning() { + if (warning_callback_) { + std::move(warning_callback_) + .Run(base::BindOnce(&WaitForDomOperation::SetSlowWarningStatus, + weak_ptr_factory_.GetWeakPtr())); + } +} + +void WaitForDomOperation::SetSlowWarningStatus(bool was_shown) { + if (was_shown) { + warning_status_ = WARNING_SHOWN; + } else { + warning_status_ = WARNING_TRIGGERED; + } +} + +void WaitForDomOperation::RunChecks( + base::OnceCallback<void(const ClientStatus&)> report_attempt_result) { + warning_timer_ = std::make_unique<base::OneShotTimer>(); + warning_timer_->Start(FROM_HERE, timeout_warning_delay_, + base::BindOnce(&WaitForDomOperation::TimeoutWarning, + weak_ptr_factory_.GetWeakPtr())); + + if (use_observers_) { + // Observers should stop soon after the elements are in the page. + wait_time_total_ = wait_time_stopwatch_.TotalElapsed(); + } else if (wait_time_stopwatch_.TotalElapsed() < retry_timer_.period()) { + // It's the first run of the checks, set the total time waited to 0. + wait_time_total_ = base::Seconds(0); + } else { + // If this is not the first run of the checks, in order to estimate + // the real cost of periodic checks, half the duration of the retry + // timer period is removed from the total wait time. This is to + // account for the fact that the conditions could have been satisfied + // at any point between the two consecutive checks. + wait_time_total_ = + wait_time_stopwatch_.TotalElapsed() - retry_timer_.period() / 2; + } + // Reset state possibly left over from previous runs. + element_check_result_ = ClientStatus(); + runnable_interrupts_.clear(); + batch_element_checker_ = std::make_unique<BatchElementChecker>(); + check_elements_.Run(batch_element_checker_.get(), + base::BindOnce(&WaitForDomOperation::OnElementCheckDone, + base::Unretained(this))); + if (allow_interrupt_) { + for (const std::unique_ptr<Script>& interrupt : + *main_script_->ordered_interrupts_) { + if (ran_interrupts_.find(interrupt->handle.path) != + ran_interrupts_.end()) { + continue; + } + + interrupt->precondition->Check( + delegate_->GetCurrentURL(), batch_element_checker_.get(), + *delegate_->GetTriggerContext(), + base::BindOnce(&WaitForDomOperation::OnPreconditionCheckDone, + weak_ptr_factory_.GetWeakPtr(), + interrupt->handle.path)); + } + } + + batch_element_checker_->AddAllDoneCallback( + base::BindOnce(&WaitForDomOperation::OnAllChecksDone, + base::Unretained(this), std::move(report_attempt_result))); + if (use_observers_) { + batch_element_checker_->EnableObserver( + /* max_wait_time= */ max_wait_time_ - + wait_time_stopwatch_.TotalElapsed(), + /* periodic_check_interval= */ + delegate_->GetSettings().periodic_element_check_interval, + /* extra_timeout= */ + delegate_->GetSettings().selector_observer_extra_timeout); + } + batch_element_checker_->Run(delegate_->GetWebController()); +} + +void WaitForDomOperation::OnPreconditionCheckDone( + const std::string& interrupt_path, + bool precondition_match) { + if (precondition_match) + runnable_interrupts_.insert(interrupt_path); +} + +void WaitForDomOperation::OnElementCheckDone( + const ClientStatus& element_status) { + element_check_result_ = element_status; + + // Wait for all checks to run before reporting that the element was found to + // the caller, so interrupts have a chance to run. +} + +void WaitForDomOperation::OnAllChecksDone( + base::OnceCallback<void(const ClientStatus&)> report_attempt_result) { + warning_timer_->Stop(); + if (runnable_interrupts_.empty()) { + // Since no interrupts fired, allow previously-run interrupts to be run + // again in the next round. This is meant to give elements one round to + // disappear and avoid the simplest form of loops. A round with interrupts + // firing doesn't count as one round here, because an interrupt can run + // quickly and return immediately, without waiting for + // periodic_element_check_interval. + ran_interrupts_.clear(); + } else { + // We must go through runnable_interrupts_ to make sure priority order is + // respected in case more than one interrupt is ready to run. + for (const std::unique_ptr<Script>& interrupt : + *main_script_->ordered_interrupts_) { + const std::string& path = interrupt->handle.path; + if (runnable_interrupts_.find(path) != runnable_interrupts_.end()) { + RunInterrupt(path); + return; + } + } + } + std::move(report_attempt_result).Run(element_check_result_); +} + +void WaitForDomOperation::RunInterrupt(const std::string& path) { + batch_element_checker_.reset(); + if (observer_) + observer_->OnInterruptStarted(); + + SavePreInterruptState(); + ran_interrupts_.insert(path); + interrupt_executor_ = std::make_unique<ScriptExecutor>( + path, + std::make_unique<TriggerContext>(std::vector<const TriggerContext*>{ + main_script_->additional_context_.get()}), + main_script_->last_global_payload_, main_script_->initial_script_payload_, + /* listener= */ this, &no_interrupts_, delegate_, ui_delegate_); + delegate_->EnterState(AutofillAssistantState::RUNNING); + ui_delegate_->SetUserActions(nullptr); + // Note that we don't clear the touchable area in the delegate here. + // TODO(b/209732258): check whether this is a bug. + interrupt_executor_->Run(main_script_->user_data_, + base::BindOnce(&WaitForDomOperation::OnInterruptDone, + base::Unretained(this))); + // base::Unretained(this) is safe because interrupt_executor_ belongs to this +} + +void WaitForDomOperation::OnInterruptDone( + const ScriptExecutor::Result& result) { + interrupt_executor_.reset(); + if (!result.success || result.at_end != ScriptExecutor::CONTINUE) { + RunCallbackWithResult(ClientStatus(INTERRUPT_FAILED), &result); + return; + } + if (observer_) + observer_->OnInterruptFinished(); + + RestorePreInterruptState(); + RestorePreInterruptScroll(); + + // Restart. We use the original wait time since the interruption could have + // triggered any kind of actions, including actions that wait on the user. We + // don't trust a previous element_found_ result, since it could have changed. + Start(); +} + +void WaitForDomOperation::RunCallback(const ClientStatus& element_status) { + RunCallbackWithResult(element_status, nullptr); +} + +void WaitForDomOperation::RunCallbackWithResult( + const ClientStatus& element_status, + const ScriptExecutor::Result* result) { + // stop element checking if one is still in progress + batch_element_checker_.reset(); + retry_timer_.Cancel(); + warning_timer_->Stop(); + + if (!callback_) + return; + + ClientStatus status(element_status); + status.set_slow_warning_status(warning_status_); + + std::move(callback_).Run(status, result, wait_time_total_); +} + +void WaitForDomOperation::SavePreInterruptState() { + if (saved_pre_interrupt_state_) + return; + + ExecutorState pre_interrupt_state; + pre_interrupt_state.status_message = ui_delegate_->GetStatusMessage(); + pre_interrupt_state.controller_state = delegate_->GetState(); + saved_pre_interrupt_state_ = pre_interrupt_state; +} + +void WaitForDomOperation::RestorePreInterruptState() { + if (!saved_pre_interrupt_state_) + return; + + ui_delegate_->SetStatusMessage(saved_pre_interrupt_state_->status_message); + delegate_->EnterState(saved_pre_interrupt_state_->controller_state); + if (main_script_->touchable_element_area_) { + delegate_->SetTouchableElementArea(*main_script_->touchable_element_area_); + } +} + +void WaitForDomOperation::RestorePreInterruptScroll() { + if (!saved_pre_interrupt_state_) + return; + if (!main_script_->last_focused_element_.has_value()) + return; + + auto element = std::make_unique<ElementFinder::Result>(); + if (!main_script_->GetElementStore() + ->RestoreElement(*main_script_->last_focused_element_, element.get()) + .ok()) { + return; + } + + auto actions = std::make_unique<element_action_util::ElementActionVector>(); + action_delegate_util::AddStepIgnoreTiming( + base::BindOnce(&ActionDelegate::WaitUntilDocumentIsInReadyState, + main_script_->GetWeakPtr(), + delegate_->GetSettings().document_ready_check_timeout, + DOCUMENT_INTERACTIVE), + actions.get()); + actions->emplace_back( + base::BindOnce(&WebController::ScrollIntoViewIfNeeded, + main_script_->GetWebController()->GetWeakPtr(), + /* center= */ true)); + element_action_util::TakeElementAndPerform( + base::BindOnce(&element_action_util::PerformAll, std::move(actions)), + /* done= */ base::DoNothing(), /* element_status= */ OkClientStatus(), + std::move(element)); +} + +} // namespace autofill_assistant
diff --git a/components/autofill_assistant/browser/wait_for_dom_operation.h b/components/autofill_assistant/browser/wait_for_dom_operation.h new file mode 100644 index 0000000..f3fbee6 --- /dev/null +++ b/components/autofill_assistant/browser/wait_for_dom_operation.h
@@ -0,0 +1,167 @@ +// Copyright 2022 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_AUTOFILL_ASSISTANT_BROWSER_WAIT_FOR_DOM_OPERATION_H_ +#define COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_WAIT_FOR_DOM_OPERATION_H_ + +#include <memory> +#include <set> +#include <string> +#include <vector> + +#include "base/callback_forward.h" +#include "base/memory/raw_ptr.h" +#include "base/memory/weak_ptr.h" +#include "base/time/time.h" +#include "base/timer/timer.h" +#include "components/autofill_assistant/browser/actions/stopwatch.h" +#include "components/autofill_assistant/browser/batch_element_checker.h" +#include "components/autofill_assistant/browser/client_status.h" +#include "components/autofill_assistant/browser/script.h" +#include "components/autofill_assistant/browser/script_executor.h" +#include "components/autofill_assistant/browser/script_executor_delegate.h" +#include "components/autofill_assistant/browser/service.pb.h" +#include "components/autofill_assistant/browser/state.h" + +namespace autofill_assistant { + +class WaitForDomObserver; + +// Helper for WaitForElementVisible that keeps track of the state required to +// run interrupts while waiting for a specific element. +class WaitForDomOperation : public ScriptExecutor::Listener, + ScriptExecutorDelegate::NavigationListener { + public: + // Let the caller know about either the result of looking for the element or + // of an abnormal result from an interrupt. + // + // If the given result is non-null, it should be forwarded as the result of + // the main script. + using Callback = base::OnceCallback<void(const ClientStatus&, + const ScriptExecutor::Result*, + base::TimeDelta)>; + + using WarningCallback = + base::OnceCallback<void(base::OnceCallback<void(bool)>)>; + + // |main_script_| must not be null and outlive this instance. + WaitForDomOperation( + ScriptExecutor* main_script, + ScriptExecutorDelegate* delegate, + ScriptExecutorUiDelegate* ui_delegate, + base::TimeDelta max_wait_time, + bool allow_observer_mode, + bool allow_interrupt, + WaitForDomObserver* observer, + base::RepeatingCallback< + void(BatchElementChecker*, + base::OnceCallback<void(const ClientStatus&)>)> check_elements, + WaitForDomOperation::Callback callback); + + WaitForDomOperation(const WaitForDomOperation&) = delete; + WaitForDomOperation& operator=(const WaitForDomOperation&) = delete; + + ~WaitForDomOperation() override; + + void Run(); + void Terminate(); + void SetTimeoutWarningCallback(WarningCallback timeout_warning); + + private: + struct ExecutorState { + // The status message that was displayed when the interrupt started. + std::string status_message; + // The state the controller was in when the interrupt triggered. + AutofillAssistantState controller_state; + }; + + void Start(); + void Pause(); + void Continue(); + + // Implements ScriptExecutorDelegate::NavigationListener + void OnNavigationStateChanged() override; + + // Implements ScriptExecutor::Listener + void OnServerPayloadChanged(const std::string& global_payload, + const std::string& script_payload) override; + void OnScriptListChanged( + std::vector<std::unique_ptr<Script>> scripts) override; + + void RunChecks( + base::OnceCallback<void(const ClientStatus&)> report_attempt_result); + void OnPreconditionCheckDone(const std::string& interrupt_path, + bool precondition_match); + void OnElementCheckDone(const ClientStatus&); + void OnAllChecksDone( + base::OnceCallback<void(const ClientStatus&)> report_attempt_result); + void RunInterrupt(const std::string& path); + void OnInterruptDone(const ScriptExecutor::Result& result); + void RunCallback(const ClientStatus& element_status); + void RunCallbackWithResult(const ClientStatus& element_status, + const ScriptExecutor::Result* result); + void SetSlowWarningStatus(bool was_shown); + + // Saves the current state and sets save_pre_interrupt_state_. + void SavePreInterruptState(); + + // Restores the state as found by SavePreInterruptState. + void RestorePreInterruptState(); + + // if save_pre_interrupt_state_ is set, attempt to scroll the page back to + // the original area. + void RestorePreInterruptScroll(); + + void TimeoutWarning(); + + raw_ptr<ScriptExecutor> main_script_; + raw_ptr<ScriptExecutorDelegate> delegate_; + raw_ptr<ScriptExecutorUiDelegate> ui_delegate_; + const base::TimeDelta max_wait_time_; + const bool allow_interrupt_; + const bool use_observers_; + raw_ptr<WaitForDomObserver> observer_; + base::RepeatingCallback<void(BatchElementChecker*, + base::OnceCallback<void(const ClientStatus&)>)> + check_elements_; + WaitForDomOperation::Callback callback_; + base::OnceCallback<void(base::OnceCallback<void(bool)>)> warning_callback_; + std::unique_ptr<base::OneShotTimer> warning_timer_; + base::TimeDelta timeout_warning_delay_; + + SlowWarningStatus warning_status_ = NO_WARNING; + + std::unique_ptr<BatchElementChecker> batch_element_checker_; + + // Path of interrupts from |ordered_interrupts_| that have been found + // runnable. + std::set<std::string> runnable_interrupts_; + ClientStatus element_check_result_; + + // An empty vector of interrupts that can be passed to interrupt_executor_ + // and outlives it. Interrupts must not run interrupts. + const std::vector<std::unique_ptr<Script>> no_interrupts_; + Stopwatch wait_time_stopwatch_; + Stopwatch period_stopwatch_; + base::TimeDelta wait_time_total_; + + // The interrupt that's currently running. + std::unique_ptr<ScriptExecutor> interrupt_executor_; + + // The state of the ScriptExecutor, as registered before the first interrupt + // is run. + absl::optional<ExecutorState> saved_pre_interrupt_state_; + + // Paths of the interrupts that were just run. These interrupts are + // prevented from firing for one round. + std::set<std::string> ran_interrupts_; + + RetryTimer retry_timer_; + + base::WeakPtrFactory<WaitForDomOperation> weak_ptr_factory_{this}; +}; + +} // namespace autofill_assistant + +#endif // COMPONENTS_AUTOFILL_ASSISTANT_BROWSER_WAIT_FOR_DOM_OPERATION_H_
diff --git a/components/autofill_assistant/browser/web/web_controller_browsertest.cc b/components/autofill_assistant/browser/web/web_controller_browsertest.cc index 074fe2c..a832d0b 100644 --- a/components/autofill_assistant/browser/web/web_controller_browsertest.cc +++ b/components/autofill_assistant/browser/web/web_controller_browsertest.cc
@@ -49,6 +49,7 @@ #include "components/autofill_assistant/browser/script_executor.h" #include "components/autofill_assistant/browser/selector.h" #include "components/autofill_assistant/browser/service.pb.h" +#include "components/autofill_assistant/browser/service/mock_service.h" #include "components/autofill_assistant/browser/string_conversions_util.h" #include "components/autofill_assistant/browser/top_padding.h" #include "components/autofill_assistant/browser/trigger_context.h" @@ -85,6 +86,8 @@ using ::testing::AnyOf; using ::testing::IsEmpty; using ::testing::Return; +using ::testing::SaveArg; +using ::testing::WithArgs; class MockAutofillAssistantAgent : public mojom::AutofillAssistantAgent { public: @@ -250,11 +253,8 @@ std::move(done_callback).Run(); } - void OnProcessedAction( - base::OnceClosure done_callback, - ClientStatus* status_output, - std::unique_ptr<ProcessedActionProto> processed_action) { - *status_output = ClientStatus(processed_action->status()); + void OnScriptFinished(base::OnceClosure done_callback, + const ScriptExecutor::Result& result) { std::move(done_callback).Run(); } @@ -931,26 +931,53 @@ base::flat_map<std::string, std::string>{ {"ENABLE_OBSERVER_WAIT_FOR_DOM", "true"}})); } + + MockService mock_service; + ActionsResponseProto actions_response; + *actions_response.add_actions() = wait_for_dom_action; + std::string serialized_actions_response; + actions_response.SerializeToString(&serialized_actions_response); + EXPECT_CALL(mock_service, OnGetActions) + .WillOnce(RunOnceCallback<5>(200, serialized_actions_response)); + + std::vector<ProcessedActionProto> captured_processed_actions; + EXPECT_CALL(mock_service, OnGetNextActions) + .WillOnce(WithArgs<3, 5>( + [&captured_processed_actions]( + const std::vector<ProcessedActionProto>& processed_actions, + Service::ResponseCallback& callback) { + captured_processed_actions = processed_actions; + + // Send empty response to stop the script executor. + std::move(callback).Run(200, std::string()); + })); ON_CALL(mock_script_executor_delegate, GetTriggerContext()) .WillByDefault(Return(&trigger_context)); + ON_CALL(mock_script_executor_delegate, GetService()) + .WillByDefault(Return(&mock_service)); + GURL test_script_url("https://example.com"); + ON_CALL(mock_script_executor_delegate, GetScriptURL()) + .WillByDefault(testing::ReturnRef(test_script_url)); std::vector<std::unique_ptr<Script>> ordered_interrupts; FakeScriptExecutorUiDelegate fake_script_executor_ui_delegate; + UserData fake_user_data; ScriptExecutor script_executor( - /* script_path= */ std::string(), /* additional_context= */ nullptr, + /* script_path= */ std::string(), + /* additional_context= */ std::make_unique<TriggerContext>(), /* global_payload= */ std::string(), /* script_payload= */ std::string(), /* listener= */ nullptr, &ordered_interrupts, &mock_script_executor_delegate, &fake_script_executor_ui_delegate); - - WaitForDomAction action(&script_executor, wait_for_dom_action); base::RunLoop run_loop; - ClientStatus status; - action.ProcessAction(base::BindOnce( - &WebControllerBrowserTest::OnProcessedAction, base::Unretained(this), - run_loop.QuitClosure(), &status)); + script_executor.Run( + &fake_user_data, + base::BindOnce(&WebControllerBrowserTest::OnScriptFinished, + base::Unretained(this), run_loop.QuitClosure())); run_loop.Run(); std::move(run_expectations).Run(&script_executor); - return status; + + CHECK(captured_processed_actions.size() == 1); + return ClientStatus(captured_processed_actions[0].status()); } protected:
diff --git a/components/browsing_data/content/cookie_helper_unittest.cc b/components/browsing_data/content/cookie_helper_unittest.cc index 25a8cb5f..58d8a73 100644 --- a/components/browsing_data/content/cookie_helper_unittest.cc +++ b/components/browsing_data/content/cookie_helper_unittest.cc
@@ -10,7 +10,6 @@ #include "base/run_loop.h" #include "base/test/bind.h" #include "base/time/time.h" -#include "build/build_config.h" #include "content/public/browser/cookie_access_details.h" #include "content/public/browser/storage_partition.h" #include "content/public/test/browser_task_environment.h" @@ -592,13 +591,7 @@ base::Unretained(this))); } -#if BUILDFLAG(IS_LINUX) && defined(THREAD_SANITIZER) -#define MAYBE_CannedGetCookieCount DISABLED_CannedGetCookieCount -#else -#define MAYBE_CannedGetCookieCount CannedGetCookieCount -#endif -// Flaky on Linux TSan: https://crbug.com/1285414. -TEST_F(CookieHelperTest, MAYBE_CannedGetCookieCount) { +TEST_F(CookieHelperTest, CannedGetCookieCount) { // The URL in the omnibox is a frame URL. This is not necessarily the request // URL, since websites usually include other resources. GURL frame1_url("http://www.google.com");
diff --git a/components/browsing_data/content/service_worker_helper_unittest.cc b/components/browsing_data/content/service_worker_helper_unittest.cc index e056b82..c325b5b 100644 --- a/components/browsing_data/content/service_worker_helper_unittest.cc +++ b/components/browsing_data/content/service_worker_helper_unittest.cc
@@ -9,7 +9,6 @@ #include "base/memory/scoped_refptr.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" -#include "build/build_config.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/storage_partition.h" #include "content/public/test/browser_task_environment.h" @@ -31,13 +30,7 @@ content::TestBrowserContext browser_context_; }; -#if BUILDFLAG(IS_LINUX) && defined(THREAD_SANITIZER) -#define MAYBE_Empty DISABLED_Empty -#else -#define MAYBE_Empty Empty -#endif -// Flaky on Linux TSan: https://crbug.com/1285414 -TEST_F(CannedServiceWorkerHelperTest, MAYBE_Empty) { +TEST_F(CannedServiceWorkerHelperTest, Empty) { const GURL origin("https://host1:1/"); std::vector<GURL> scopes; scopes.push_back(GURL("https://host1:1/*"));
diff --git a/components/policy/resources/policy_templates_ko.xtb b/components/policy/resources/policy_templates_ko.xtb index d4b0625..18bc243 100644 --- a/components/policy/resources/policy_templates_ko.xtb +++ b/components/policy/resources/policy_templates_ko.xtb
@@ -2973,6 +2973,11 @@ 이 정책은 새로운 제한의 영향을 받은 내부 웹사이트를 업데이트하는 데 시간이 더 필요한 관리자가 사용할 수 있습니다. 이 기업 정책은 일시적이며 <ph name="PRODUCT_NAME" /> 버전 104 이후 삭제됩니다. </translation> <translation id="4268586991084547853">Microsoft IE/Edge 엔터프라이즈 모드 사이트 목록과 더 잘 호환됩니다.</translation> +<translation id="4269798992490176617">정책을 사용 설정한 경우 <ph name="CHROME_REMOTE_DESKTOP_PRODUCT_NAME" />은(는) 원격 호스트의 탐색 세션에서 시작된 WebAuthn API 요청을 실행할 수 있습니다. + + 정책을 사용 안함으로 설정하거나 아예 설정하지 않으면 기본 동작이 적용됩니다. + + 이 기능은 Google의 내부 네트워크 환경에서만 지원됩니다.</translation> <translation id="4269859918103560644">사용자가 결정하도록 허용</translation> <translation id="4274691295133617461">이 정책을 3으로 설정하면 웹사이트에서 File System API를 통해 호스트 운영체제의 파일 시스템 내 파일 및 디렉터리에 대한 읽기 액세스 권한을 요청할 수 있습니다. 정책을 2로 설정하면 액세스가 거부됩니다. @@ -5378,6 +5383,7 @@ <translation id="7063895219334505671">이러한 사이트에서 팝업 허용</translation> <translation id="7066292150801784098">원격 지원 세션에서 원격 사용자가 관리자 창과 상호작용하지 못하도록 차단</translation> <translation id="706669471845501145">사이트에서 데스크톱 알림을 표시하도록 허용</translation> +<translation id="70681795425744184">CRD가 원격 호스트에서 프록시된 WebAuthn API 요청을 실행하도록 허용하지 않습니다.</translation> <translation id="7070525176564511548">매주(168시간) 비밀번호를 입력해야 합니다.</translation> <translation id="7072208053150563108">기기 비밀번호 변경 속도</translation> <translation id="7072567600438630966">휴대전화 허브를 켤 수 있게 합니다.</translation> @@ -5668,6 +5674,7 @@ <translation id="7407441173422042771">이 정책은 <ph name="PRODUCT_NAME" />의 네트워크 예측을 제어합니다. 또한 DNS 미리 가져오기, TCP 및 SSL 사전 연결, 웹페이지 사전 렌더링을 제어합니다. 정책을 설정하면 사용자가 변경할 수 없습니다. 설정하지 않으면 네트워크 예측이 사용 설정되지만 사용자가 이를 변경할 수 있습니다.</translation> +<translation id="7410074797376205571"><ph name="CHROME_REMOTE_DESKTOP_PRODUCT_NAME" />이(가) 원격 호스트에서 프록시된 WebAuthn API 요청을 실행하도록 허용합니다.</translation> <translation id="7412456346709338637">Thunderbolt/USB4 주변기기 데이터 액세스 사용 설정</translation> <translation id="7417438464912687020">이 시스템으로 원격 액세스 연결을 허용</translation> <translation id="7417972229667085380">프레젠테이션 모드에서 유휴 지연 시간이 조정되는 비율(지원 중단됨)</translation> @@ -6602,6 +6609,7 @@ 사용 중지로 설정하면 다른 출처 서브프레임에서 실행된 자바스크립트 대화상자가 차단되지 않습니다. 이 정책은 <ph name="PRODUCT_NAME" /> 버전 95에서 삭제됩니다.</translation> +<translation id="8427466947904008809">CRD가 원격 호스트에서 프록시된 WebAuthn API 요청을 실행하도록 허용합니다.</translation> <translation id="8433186206711564395">네트워크 설정</translation> <translation id="8433769814000220721">추천 콘텐츠 사용 설정</translation> <translation id="843609873781525167">정책을 True로 설정하면 <ph name="PRODUCT_NAME" />에서 시작 시 항상 기본 브라우저인지 확인하며 가능한 경우 자동으로 기본 브라우저로 등록합니다. 정책을 False로 설정하면 <ph name="PRODUCT_NAME" />에서 기본 브라우저인지 확인하지 않으며 사용자가 이 옵션을 사용 중지할 수 없습니다.
diff --git a/components/services/app_service/public/cpp/app_update.cc b/components/services/app_service/public/cpp/app_update.cc index baeeeca..5db9e4c 100644 --- a/components/services/app_service/public/cpp/app_update.cc +++ b/components/services/app_service/public/cpp/app_update.cc
@@ -35,11 +35,6 @@ } } -absl::optional<apps::IconKey> CloneIconKey(const apps::IconKey& icon_key) { - return apps::IconKey(icon_key.timeline, icon_key.resource_id, - icon_key.icon_effects); -} - absl::optional<apps::RunOnOsLogin> CloneRunOnOsLogin( const apps::RunOnOsLogin& login_data) { return apps::RunOnOsLogin(login_data.login_mode, login_data.is_managed); @@ -197,7 +192,7 @@ } if (delta->icon_key.has_value()) { - state->icon_key = CloneIconKey(delta->icon_key.value()); + state->icon_key = std::move(*delta->icon_key->Clone()); } SET_OPTIONAL_VALUE(last_launch_time); @@ -472,10 +467,10 @@ absl::optional<apps::IconKey> AppUpdate::GetIconKey() const { if (delta_ && delta_->icon_key.has_value()) { - return CloneIconKey(delta_->icon_key.value()); + return absl::optional<apps::IconKey>(std::move(*delta_->icon_key->Clone())); } if (state_ && state_->icon_key.has_value()) { - return CloneIconKey(state_->icon_key.value()); + return absl::optional<apps::IconKey>(std::move(*state_->icon_key->Clone())); } return absl::nullopt; } @@ -622,6 +617,10 @@ } const std::string& AppUpdate::PolicyId() const { + if (ShouldUseNonMojom()) { + GET_VALUE_WITH_FALLBACK(policy_id, base::EmptyString()) + } + if (mojom_delta_ && mojom_delta_->policy_id.has_value()) { return mojom_delta_->policy_id.value(); } @@ -631,10 +630,6 @@ return base::EmptyString(); } -const std::string& AppUpdate::GetPolicyId() const { - GET_VALUE_WITH_FALLBACK(policy_id, base::EmptyString()) -} - bool AppUpdate::PolicyIdChanged() const { MAYBE_RETURN_OPTIONAL_VALUE_CHANGED(policy_id) @@ -657,19 +652,12 @@ } } -apps::mojom::OptionalBool AppUpdate::IsPlatformApp() const { - if (mojom_delta_ && - (mojom_delta_->is_platform_app != apps::mojom::OptionalBool::kUnknown)) { - return mojom_delta_->is_platform_app; +absl::optional<bool> AppUpdate::IsPlatformApp() const { + if (ShouldUseNonMojom()) { + GET_VALUE_WITH_FALLBACK(is_platform_app, absl::nullopt) } - if (mojom_state_) { - return mojom_state_->is_platform_app; - } - return apps::mojom::OptionalBool::kUnknown; -} -absl::optional<bool> AppUpdate::GetIsPlatformApp() const { - GET_VALUE_WITH_FALLBACK(is_platform_app, absl::nullopt) + CONVERT_MOJOM_OPTIONALBOOL_TO_OPTIONAL_VALUE(is_platform_app) } bool AppUpdate::IsPlatformAppChanged() const { @@ -682,19 +670,12 @@ (mojom_delta_->is_platform_app != mojom_state_->is_platform_app)); } -apps::mojom::OptionalBool AppUpdate::Recommendable() const { - if (mojom_delta_ && - (mojom_delta_->recommendable != apps::mojom::OptionalBool::kUnknown)) { - return mojom_delta_->recommendable; +absl::optional<bool> AppUpdate::Recommendable() const { + if (ShouldUseNonMojom()) { + GET_VALUE_WITH_FALLBACK(recommendable, absl::nullopt) } - if (mojom_state_) { - return mojom_state_->recommendable; - } - return apps::mojom::OptionalBool::kUnknown; -} -absl::optional<bool> AppUpdate::GetRecommendable() const { - GET_VALUE_WITH_FALLBACK(recommendable, absl::nullopt) + CONVERT_MOJOM_OPTIONALBOOL_TO_OPTIONAL_VALUE(recommendable) } bool AppUpdate::RecommendableChanged() const { @@ -706,19 +687,12 @@ (mojom_delta_->recommendable != mojom_state_->recommendable)); } -apps::mojom::OptionalBool AppUpdate::Searchable() const { - if (mojom_delta_ && - (mojom_delta_->searchable != apps::mojom::OptionalBool::kUnknown)) { - return mojom_delta_->searchable; +absl::optional<bool> AppUpdate::Searchable() const { + if (ShouldUseNonMojom()) { + GET_VALUE_WITH_FALLBACK(searchable, absl::nullopt) } - if (mojom_state_) { - return mojom_state_->searchable; - } - return apps::mojom::OptionalBool::kUnknown; -} -absl::optional<bool> AppUpdate::GetSearchable() const { - GET_VALUE_WITH_FALLBACK(searchable, absl::nullopt) + CONVERT_MOJOM_OPTIONALBOOL_TO_OPTIONAL_VALUE(searchable) } bool AppUpdate::SearchableChanged() const { @@ -854,19 +828,12 @@ (mojom_delta_->handles_intents != mojom_state_->handles_intents)); } -apps::mojom::OptionalBool AppUpdate::AllowUninstall() const { - if (mojom_delta_ && - (mojom_delta_->allow_uninstall != apps::mojom::OptionalBool::kUnknown)) { - return mojom_delta_->allow_uninstall; +absl::optional<bool> AppUpdate::AllowUninstall() const { + if (ShouldUseNonMojom()) { + GET_VALUE_WITH_FALLBACK(allow_uninstall, absl::nullopt) } - if (mojom_state_) { - return mojom_state_->allow_uninstall; - } - return apps::mojom::OptionalBool::kUnknown; -} -absl::optional<bool> AppUpdate::GetAllowUninstall() const { - GET_VALUE_WITH_FALLBACK(allow_uninstall, absl::nullopt) + CONVERT_MOJOM_OPTIONALBOOL_TO_OPTIONAL_VALUE(allow_uninstall) } bool AppUpdate::AllowUninstallChanged() const { @@ -1084,15 +1051,16 @@ out << "InstallReason: " << app.InstallReason() << std::endl; out << "PolicyId: " << app.PolicyId() << std::endl; out << "InstalledInternally: " << app.InstalledInternally() << std::endl; - out << "IsPlatformApp: " << app.IsPlatformApp() << std::endl; - out << "Recommendable: " << app.Recommendable() << std::endl; - out << "Searchable: " << app.Searchable() << std::endl; + out << "IsPlatformApp: " << PRINT_OPTIONAL_VALUE(IsPlatformApp) << std::endl; + out << "Recommendable: " << PRINT_OPTIONAL_VALUE(Recommendable) << std::endl; + out << "Searchable: " << PRINT_OPTIONAL_VALUE(Searchable) << std::endl; out << "ShowInLauncher: " << app.ShowInLauncher() << std::endl; out << "ShowInShelf: " << app.ShowInShelf() << std::endl; out << "ShowInSearch: " << app.ShowInSearch() << std::endl; out << "ShowInManagement: " << app.ShowInManagement() << std::endl; out << "HandlesIntents: " << app.HandlesIntents() << std::endl; - out << "AllowUninstall: " << app.AllowUninstall() << std::endl; + out << "AllowUninstall: " << PRINT_OPTIONAL_VALUE(AllowUninstall) + << std::endl; out << "HasBadge: " << app.HasBadge() << std::endl; out << "Paused: " << app.Paused() << std::endl; out << "IntentFilters: " << std::endl;
diff --git a/components/services/app_service/public/cpp/app_update.h b/components/services/app_service/public/cpp/app_update.h index 0b27444..5fa52e6e 100644 --- a/components/services/app_service/public/cpp/app_update.h +++ b/components/services/app_service/public/cpp/app_update.h
@@ -132,21 +132,17 @@ // An optional ID used for policy to identify the app. // For web apps, it contains the install URL. const std::string& PolicyId() const; - const std::string& GetPolicyId() const; bool PolicyIdChanged() const; apps::mojom::OptionalBool InstalledInternally() const; - apps::mojom::OptionalBool IsPlatformApp() const; - absl::optional<bool> GetIsPlatformApp() const; + absl::optional<bool> IsPlatformApp() const; bool IsPlatformAppChanged() const; - apps::mojom::OptionalBool Recommendable() const; - absl::optional<bool> GetRecommendable() const; + absl::optional<bool> Recommendable() const; bool RecommendableChanged() const; - apps::mojom::OptionalBool Searchable() const; - absl::optional<bool> GetSearchable() const; + absl::optional<bool> Searchable() const; bool SearchableChanged() const; apps::mojom::OptionalBool ShowInLauncher() const; @@ -169,8 +165,7 @@ absl::optional<bool> GetHandlesIntents() const; bool HandlesIntentsChanged() const; - apps::mojom::OptionalBool AllowUninstall() const; - absl::optional<bool> GetAllowUninstall() const; + absl::optional<bool> AllowUninstall() const; bool AllowUninstallChanged() const; apps::mojom::OptionalBool HasBadge() const;
diff --git a/components/services/app_service/public/cpp/app_update_mojom_unittest.cc b/components/services/app_service/public/cpp/app_update_mojom_unittest.cc index 68d3432..984f24de 100644 --- a/components/services/app_service/public/cpp/app_update_mojom_unittest.cc +++ b/components/services/app_service/public/cpp/app_update_mojom_unittest.cc
@@ -69,13 +69,13 @@ std::string expect_policy_id_; bool expect_policy_id_changed_; - apps::mojom::OptionalBool expect_is_platform_app_; + absl::optional<bool> expect_is_platform_app_; bool expect_is_platform_app_changed_; - apps::mojom::OptionalBool expect_recommendable_; + absl::optional<bool> expect_recommendable_; bool expect_recommendable_changed_; - apps::mojom::OptionalBool expect_searchable_; + absl::optional<bool> expect_searchable_; bool expect_searchable_changed_; apps::mojom::OptionalBool expect_show_in_launcher_; @@ -93,7 +93,7 @@ apps::mojom::OptionalBool expect_handles_intents_; bool expect_handles_intents_changed_; - apps::mojom::OptionalBool expect_allow_uninstall_; + absl::optional<bool> expect_allow_uninstall_; bool expect_allow_uninstall_changed_; apps::mojom::OptionalBool expect_has_badge_; @@ -273,15 +273,15 @@ expect_install_reason_ = apps::mojom::InstallReason::kUnknown; expect_install_source_ = apps::mojom::InstallSource::kUnknown; expect_policy_id_ = ""; - expect_is_platform_app_ = apps::mojom::OptionalBool::kUnknown; - expect_recommendable_ = apps::mojom::OptionalBool::kUnknown; - expect_searchable_ = apps::mojom::OptionalBool::kUnknown; + expect_is_platform_app_ = absl::nullopt; + expect_recommendable_ = absl::nullopt; + expect_searchable_ = absl::nullopt; expect_show_in_launcher_ = apps::mojom::OptionalBool::kUnknown; expect_show_in_shelf_ = apps::mojom::OptionalBool::kUnknown; expect_show_in_search_ = apps::mojom::OptionalBool::kUnknown; expect_show_in_management_ = apps::mojom::OptionalBool::kUnknown; expect_handles_intents_ = apps::mojom::OptionalBool::kUnknown; - expect_allow_uninstall_ = apps::mojom::OptionalBool::kUnknown; + expect_allow_uninstall_ = absl::nullopt; expect_has_badge_ = apps::mojom::OptionalBool::kUnknown; expect_paused_ = apps::mojom::OptionalBool::kUnknown; expect_intent_filters_.clear(); @@ -581,14 +581,14 @@ if (state) { state->is_platform_app = apps::mojom::OptionalBool::kFalse; - expect_is_platform_app_ = apps::mojom::OptionalBool::kFalse; + expect_is_platform_app_ = false; expect_is_platform_app_changed_ = false; CheckExpects(u); } if (delta) { delta->is_platform_app = apps::mojom::OptionalBool::kTrue; - expect_is_platform_app_ = apps::mojom::OptionalBool::kTrue; + expect_is_platform_app_ = true; expect_is_platform_app_changed_ = true; CheckExpects(u); } @@ -603,14 +603,14 @@ if (state) { state->recommendable = apps::mojom::OptionalBool::kFalse; - expect_recommendable_ = apps::mojom::OptionalBool::kFalse; + expect_recommendable_ = false; expect_recommendable_changed_ = false; CheckExpects(u); } if (delta) { delta->recommendable = apps::mojom::OptionalBool::kTrue; - expect_recommendable_ = apps::mojom::OptionalBool::kTrue; + expect_recommendable_ = true; expect_recommendable_changed_ = true; CheckExpects(u); } @@ -625,14 +625,14 @@ if (state) { state->searchable = apps::mojom::OptionalBool::kFalse; - expect_searchable_ = apps::mojom::OptionalBool::kFalse; + expect_searchable_ = false; expect_searchable_changed_ = false; CheckExpects(u); } if (delta) { delta->searchable = apps::mojom::OptionalBool::kTrue; - expect_searchable_ = apps::mojom::OptionalBool::kTrue; + expect_searchable_ = true; expect_searchable_changed_ = true; CheckExpects(u); } @@ -757,14 +757,14 @@ if (state) { state->allow_uninstall = apps::mojom::OptionalBool::kFalse; - expect_allow_uninstall_ = apps::mojom::OptionalBool::kFalse; + expect_allow_uninstall_ = false; expect_allow_uninstall_changed_ = false; CheckExpects(u); } if (delta) { delta->allow_uninstall = apps::mojom::OptionalBool::kTrue; - expect_allow_uninstall_ = apps::mojom::OptionalBool::kTrue; + expect_allow_uninstall_ = true; expect_allow_uninstall_changed_ = true; CheckExpects(u); }
diff --git a/components/services/app_service/public/cpp/app_update_unittest.cc b/components/services/app_service/public/cpp/app_update_unittest.cc index 93c6e98..dccd1236 100644 --- a/components/services/app_service/public/cpp/app_update_unittest.cc +++ b/components/services/app_service/public/cpp/app_update_unittest.cc
@@ -214,16 +214,16 @@ EXPECT_EQ(expect_install_source_, u.GetInstallSource()); EXPECT_EQ(expect_install_source_changed_, u.InstallSourceChanged()); - EXPECT_EQ(expect_policy_id_, u.GetPolicyId()); + EXPECT_EQ(expect_policy_id_, u.PolicyId()); EXPECT_EQ(expect_policy_id_changed_, u.PolicyIdChanged()); - EXPECT_EQ(expect_is_platform_app_, u.GetIsPlatformApp()); + EXPECT_EQ(expect_is_platform_app_, u.IsPlatformApp()); EXPECT_EQ(expect_is_platform_app_changed_, u.IsPlatformAppChanged()); - EXPECT_EQ(expect_recommendable_, u.GetRecommendable()); + EXPECT_EQ(expect_recommendable_, u.Recommendable()); EXPECT_EQ(expect_recommendable_changed_, u.RecommendableChanged()); - EXPECT_EQ(expect_searchable_, u.GetSearchable()); + EXPECT_EQ(expect_searchable_, u.Searchable()); EXPECT_EQ(expect_searchable_changed_, u.SearchableChanged()); EXPECT_EQ(expect_show_in_launcher_, u.GetShowInLauncher()); @@ -241,7 +241,7 @@ EXPECT_EQ(expect_handles_intents_, u.GetHandlesIntents()); EXPECT_EQ(expect_handles_intents_changed_, u.HandlesIntentsChanged()); - EXPECT_EQ(expect_allow_uninstall_, u.GetAllowUninstall()); + EXPECT_EQ(expect_allow_uninstall_, u.AllowUninstall()); EXPECT_EQ(expect_allow_uninstall_changed_, u.AllowUninstallChanged()); EXPECT_EQ(expect_has_badge_, u.GetHasBadge());
diff --git a/components/services/app_service/public/cpp/icon_types.cc b/components/services/app_service/public/cpp/icon_types.cc index 7afe22c..6d0bf3e 100644 --- a/components/services/app_service/public/cpp/icon_types.cc +++ b/components/services/app_service/public/cpp/icon_types.cc
@@ -24,6 +24,10 @@ return !(*this == other); } +IconKeyPtr IconKey::Clone() const { + return std::make_unique<IconKey>(timeline, resource_id, icon_effects); +} + constexpr uint64_t IconKey::kDoesNotChangeOverTime = 0; const int32_t IconKey::kInvalidResourceId = 0;
diff --git a/components/services/app_service/public/cpp/icon_types.h b/components/services/app_service/public/cpp/icon_types.h index 96169ab..136028b 100644 --- a/components/services/app_service/public/cpp/icon_types.h +++ b/components/services/app_service/public/cpp/icon_types.h
@@ -22,10 +22,12 @@ IconKey(IconKey&&) = default; IconKey& operator=(IconKey&&) = default; + ~IconKey(); + bool operator==(const IconKey& other) const; bool operator!=(const IconKey& other) const; - ~IconKey(); + std::unique_ptr<IconKey> Clone() const; // A timeline value for icons that do not change. static const uint64_t kDoesNotChangeOverTime;
diff --git a/components/services/app_service/public/cpp/macros.h b/components/services/app_service/public/cpp/macros.h index ba6aba5..5c714507 100644 --- a/components/services/app_service/public/cpp/macros.h +++ b/components/services/app_service/public/cpp/macros.h
@@ -71,6 +71,23 @@ (!state_ || (delta_->VALUE != state_->VALUE)); \ } +#define PRINT_OPTIONAL_VALUE(VALUE) \ + (app.VALUE().has_value() ? (app.VALUE().value() ? "true" : "false") : "null") + +// TODO(crbug.com/1253250): Remove these functions after migrating to non-mojo +// AppService. +#define CONVERT_MOJOM_OPTIONALBOOL_TO_OPTIONAL_VALUE(VALUE) \ + if (mojom_delta_ && \ + (mojom_delta_->VALUE != apps::mojom::OptionalBool::kUnknown)) { \ + return mojom_delta_->VALUE == apps::mojom::OptionalBool::kTrue; \ + } \ + if (mojom_state_) { \ + if (mojom_state_->VALUE == apps::mojom::OptionalBool::kUnknown) \ + return absl::nullopt; \ + return mojom_state_->VALUE == apps::mojom::OptionalBool::kTrue; \ + } \ + return absl::nullopt; + } // namespace apps #endif // COMPONENTS_SERVICES_APP_SERVICE_PUBLIC_CPP_MACROS_H_
diff --git a/components/services/storage/service_worker/service_worker_disk_cache.h b/components/services/storage/service_worker/service_worker_disk_cache.h index 2cfac97..3de660ef 100644 --- a/components/services/storage/service_worker/service_worker_disk_cache.h +++ b/components/services/storage/service_worker/service_worker_disk_cache.h
@@ -21,10 +21,6 @@ namespace storage { -// TODO(crbug.com/586174): Use disk_cache::EntryResult for better lifetime -// management of disk cache entries. Using EntryResult will eliminate allocating -// raw pointers and static methods in service worker resource readers/writers. - class ServiceWorkerDiskCache; // Thin wrapper around disk_cache::Entry.
diff --git a/components/strings/components_strings_es.xtb b/components/strings/components_strings_es.xtb index 2631810d..0222fda 100644 --- a/components/strings/components_strings_es.xtb +++ b/components/strings/components_strings_es.xtb
@@ -1948,7 +1948,7 @@ <translation id="7175401108899573750">{SHIPPING_OPTIONS,plural, =0{<ph name="SHIPPING_OPTION_PREVIEW" />}=1{<ph name="SHIPPING_OPTION_PREVIEW" /> y <ph name="NUMBER_OF_ADDITIONAL_SHIPPING_OPTIONS" /> más}other{<ph name="SHIPPING_OPTION_PREVIEW" /> y <ph name="NUMBER_OF_ADDITIONAL_SHIPPING_OPTIONS" /> más}}</translation> <translation id="7179323680825933600">Guardar y autocompletar métodos de pago</translation> <translation id="7180611975245234373">Actualizar</translation> -<translation id="7181261019481237103">Abrir una ventana de incógnito</translation> +<translation id="7181261019481237103">Abrir ventana de incógnito</translation> <translation id="7182878459783632708">No hay políticas establecidas.</translation> <translation id="7186367841673660872">Esta página se ha traducido del<ph name="ORIGINAL_LANGUAGE" />al<ph name="LANGUAGE_LANGUAGE" />.</translation> <translation id="7192203810768312527">Libera <ph name="SIZE" />. Algunos sitios pueden tardar más en cargarse la próxima vez que accedas a ellos.</translation>
diff --git a/content/browser/accessibility/ax_tree_formatter_mac_browsertest.mm b/content/browser/accessibility/ax_tree_formatter_mac_browsertest.mm index 5b0adacf..cbc421ec 100644 --- a/content/browser/accessibility/ax_tree_formatter_mac_browsertest.mm +++ b/content/browser/accessibility/ax_tree_formatter_mac_browsertest.mm
@@ -427,8 +427,9 @@ } IN_PROC_BROWSER_TEST_F(AXTreeFormatterMacBrowserTest, ScriptNullValue) { - TestScript(R"~~(<input id="input">)~~", {"input.AXTitleUIElement"}, - R"~~(input.AXTitleUIElement=NULL + TestScript(R"~~(<div role="grid" id="grid"></div>)~~", + {"grid.AXRowHeaderUIElements"}, + R"~~(grid.AXRowHeaderUIElements=NULL )~~"); } @@ -549,8 +550,8 @@ } IN_PROC_BROWSER_TEST_F(AXTreeFormatterMacBrowserTest, ScriptVariablesNull) { - TestScript(R"~~(<p id="p">Paragraph</p>)~~", - {"var:= p.AXTitleUIElement", "var"}, + TestScript(R"~~(<div id="grid" role="grid"></div>)~~", + {"var:= grid.AXRowHeaderUIElements", "var"}, R"~~(var=NULL var=NULL )~~");
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc index 45366913..3a1fbe5 100644 --- a/content/browser/accessibility/browser_accessibility.cc +++ b/content/browser/accessibility/browser_accessibility.cc
@@ -328,6 +328,10 @@ return manager()->GetFromAXNode(deepest_child); } +void BrowserAccessibility::SetNode(ui::AXNode& node) { + node_ = &node; +} + uint32_t BrowserAccessibility::InternalChildCount() const { return node_->GetUnignoredChildCount(); }
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h index d4c7c37..fea30d5 100644 --- a/content/browser/accessibility/browser_accessibility.h +++ b/content/browser/accessibility/browser_accessibility.h
@@ -316,11 +316,12 @@ const gfx::Point& blink_screen_point); // - // Accessors + // Accessors and simple setters. // BrowserAccessibilityManager* manager() const { return manager_; } ui::AXNode* node() const { return node_; } + void SetNode(ui::AXNode& node); // Strictly not a trivial setter. // These access the internal unignored accessibility tree, which doesn't // necessarily reflect the accessibility tree that should be exposed on each @@ -603,8 +604,10 @@ // The manager of this tree of accessibility objects. Weak, owns us. const raw_ptr<BrowserAccessibilityManager> manager_; - // The underlying node. Weak, `AXTree` owns this. - const raw_ptr<ui::AXNode> node_; + // The underlying node. This could change during the lifetime of this object + // if this object has been reparented, i.e. moved to another part of the tree. + // Weak, `AXTree` owns this. + raw_ptr<ui::AXNode> node_; // Protected so that it can't be called directly on a BrowserAccessibility // where it could be confused with an id that comes from the node data,
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h index 29b9976a..c2c23bd 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.h +++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -165,7 +165,6 @@ // The tabs owned by a tablist. @property(nonatomic, readonly) NSArray* tabs; @property(nonatomic, readonly) NSString* title; -@property(nonatomic, readonly) id titleUIElement; @property(nonatomic, readonly) NSString* value; @property(nonatomic, readonly) NSString* valueDescription; @property(nonatomic, readonly) NSValue* visibleCharacterRange;
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm index 7b07b12..656ba9b 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -651,7 +651,6 @@ {NSAccessibilitySubroleAttribute, @"subrole"}, {NSAccessibilityTabsAttribute, @"tabs"}, {NSAccessibilityTitleAttribute, @"title"}, - {NSAccessibilityTitleUIElementAttribute, @"titleUIElement"}, {NSAccessibilityTopLevelUIElementAttribute, @"window"}, {NSAccessibilityValueAttribute, @"value"}, {NSAccessibilityValueAutofillAvailableAttribute, @@ -796,7 +795,7 @@ // If we're exposing the title in TitleUIElement, don't also redundantly // expose it in AXDescription. - if ([self shouldExposeTitleUIElement]) + if ([self titleUIElement]) return @""; ax::mojom::NameFrom nameFrom = static_cast<ax::mojom::NameFrom>( @@ -850,7 +849,7 @@ // Given an image where there's no other title, return the base part // of the filename as the description. if ([[self role] isEqualToString:NSAccessibilityImageRole]) { - if ([self titleUIElement]) + if ([self accessibilityTitleUIElement]) return @""; std::string url; @@ -1254,35 +1253,6 @@ } } -// Returns true if this object should expose its accessible name using -// AXTitleUIElement rather than AXTitle or AXDescription. We only do -// this if it's a control, if there's a single label, and the label has -// nonempty text. -// internal -- (BOOL)shouldExposeTitleUIElement { - // VoiceOver ignores TitleUIElement if the element isn't a control. - if (!ui::IsControl(_owner->GetRole())) - return false; - - ax::mojom::NameFrom nameFrom = static_cast<ax::mojom::NameFrom>( - _owner->GetIntAttribute(ax::mojom::IntAttribute::kNameFrom)); - if (nameFrom != ax::mojom::NameFrom::kCaption && - nameFrom != ax::mojom::NameFrom::kRelatedElement) - return false; - - std::vector<int32_t> labelledby_ids = - _owner->GetIntListAttribute(ax::mojom::IntListAttribute::kLabelledbyIds); - if (labelledby_ids.size() != 1) - return false; - - BrowserAccessibility* label = _owner->manager()->GetFromID(labelledby_ids[0]); - if (!label) - return false; - - std::string labelName = label->GetName(); - return !labelName.empty(); -} - - (content::BrowserAccessibility*)owner { return _owner; } @@ -1703,7 +1673,7 @@ // If we're exposing the title in TitleUIElement, don't also redundantly // expose it in AXDescription. - if ([self shouldExposeTitleUIElement]) + if ([self titleUIElement]) return @""; ax::mojom::NameFrom nameFrom = static_cast<ax::mojom::NameFrom>( @@ -1729,28 +1699,6 @@ return @""; } -- (id)titleUIElement { - if (![self instanceActive]) - return nil; - if (![self shouldExposeTitleUIElement]) - return nil; - - std::vector<int32_t> labelledby_ids = - _owner->GetIntListAttribute(ax::mojom::IntListAttribute::kLabelledbyIds); - ax::mojom::NameFrom nameFrom = static_cast<ax::mojom::NameFrom>( - _owner->GetIntAttribute(ax::mojom::IntAttribute::kNameFrom)); - if ((nameFrom == ax::mojom::NameFrom::kCaption || - nameFrom == ax::mojom::NameFrom::kRelatedElement) && - labelledby_ids.size() == 1) { - BrowserAccessibility* titleElement = - _owner->manager()->GetFromID(labelledby_ids[0]); - if (titleElement) - return titleElement->GetNativeViewAccessible(); - } - - return nil; -} - - (id)AXValue { return [self value]; } @@ -2690,7 +2638,6 @@ NSAccessibilityStartTextMarkerAttribute, NSAccessibilitySubroleAttribute, NSAccessibilityTitleAttribute, - NSAccessibilityTitleUIElementAttribute, NSAccessibilityTopLevelUIElementAttribute, NSAccessibilityValueAttribute, NSAccessibilityWindowAttribute, nil]; @@ -2802,17 +2749,6 @@ if (_owner->node() && !_owner->node()->GetLanguage().empty()) [ret addObject:NSAccessibilityLanguageAttribute]; - // Title UI Element. - if (_owner->HasIntListAttribute( - ax::mojom::IntListAttribute::kLabelledbyIds) && - _owner->GetIntListAttribute(ax::mojom::IntListAttribute::kLabelledbyIds) - .size() > 0) { - [ret addObject:NSAccessibilityTitleUIElementAttribute]; - } - - if ([self shouldExposeTitleUIElement]) - [ret addObject:NSAccessibilityTitleUIElementAttribute]; - // TODO(aboxhall): expose NSAccessibilityServesAsTitleForUIElementsAttribute // for elements which are referred to by labelledby or are labels
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc index 4b85ddee..7ae902c6 100644 --- a/content/browser/accessibility/browser_accessibility_manager.cc +++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -1488,7 +1488,17 @@ void BrowserAccessibilityManager::OnNodeReparented(ui::AXTree* tree, ui::AXNode* node) { DCHECK(node); - id_wrapper_map_[node->id()] = BrowserAccessibility::Create(this, node); + auto iter = id_wrapper_map_.find(node->id()); + if (iter == id_wrapper_map_.end()) { + NOTREACHED() << "A reparent operation should reuse an existing native " + "wrapper, and so should not need to create a new one."; + auto [iter, success] = id_wrapper_map_.insert( + {node->id(), BrowserAccessibility::Create(this, node)}); + ; + DCHECK(success); + } + BrowserAccessibility* wrapper = iter->second.get(); + wrapper->SetNode(*node); } void BrowserAccessibilityManager::OnRoleChanged(ui::AXTree* tree,
diff --git a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc index 84e8c2a..32d520a 100644 --- a/content/browser/accessibility/cross_platform_accessibility_browsertest.cc +++ b/content/browser/accessibility/cross_platform_accessibility_browsertest.cc
@@ -356,6 +356,50 @@ ElementsAre(Pair("type", "checkbox"))); } +// Android's text representation is different, so disable the test there. +#if !BUILDFLAG(IS_ANDROID) +IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, + ReparentingANodeShouldReuseSameNativeWrapper) { + LoadInitialAccessibilityTreeFromHtml(R"HTML( + <!DOCTYPE html> + <html> + <body> + <div id="source"> + <div id="destination"> + <p id="paragraph">Testing</p> + </div> + </div> + </body> + </html>)HTML"); + + WaitForAccessibilityTreeToContainNodeWithName(shell()->web_contents(), + "Testing"); + const BrowserAccessibility* wrapper1 = FindNode("Testing"); + ASSERT_NE(nullptr, wrapper1); + wrapper1 = wrapper1->PlatformGetParent(); + ASSERT_EQ(ax::mojom::Role::kParagraph, wrapper1->GetRole()); + ASSERT_EQ(ax::mojom::Role::kGenericContainer, + wrapper1->PlatformGetParent()->GetRole()); + + // Reparent the paragraph from "source" to "destination". + ExecuteScript( + "let destination = document.getElementById('destination');" + "let paragraph = document.getElementById('paragraph');" + "destination.setAttribute('role', 'group');" + "paragraph.textContent = 'Testing changed';"); + + WaitForAccessibilityTreeToContainNodeWithName(shell()->web_contents(), + "Testing changed"); + const BrowserAccessibility* wrapper2 = FindNode("Testing changed"); + ASSERT_NE(nullptr, wrapper2); + wrapper2 = wrapper2->PlatformGetParent(); + ASSERT_EQ(ax::mojom::Role::kParagraph, wrapper2->GetRole()); + ASSERT_EQ(ax::mojom::Role::kGroup, wrapper2->PlatformGetParent()->GetRole()); + + EXPECT_EQ(wrapper1, wrapper2); +} +#endif // !BUILDFLAG(IS_ANDROID) + IN_PROC_BROWSER_TEST_F(CrossPlatformAccessibilityBrowserTest, UnselectedEditableTextAccessibility) { LoadInitialAccessibilityTreeFromHtml(R"HTML(
diff --git a/content/browser/accessibility/dump_accessibility_scripts_browsertest.cc b/content/browser/accessibility/dump_accessibility_scripts_browsertest.cc index f8d0efd..6795cf56 100644 --- a/content/browser/accessibility/dump_accessibility_scripts_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_scripts_browsertest.cc
@@ -322,6 +322,14 @@ RunTypedTest<kMacAttributes>("ax-required.html"); } +IN_PROC_BROWSER_TEST_P(DumpAccessibilityScriptTest, AXTitleUIElement) { + RunTypedTest<kMacAttributes>("ax-title-ui-element.html"); +} + +IN_PROC_BROWSER_TEST_P(DumpAccessibilityScriptTest, AXTitle) { + RunTypedTest<kMacAttributes>("ax-title.html"); +} + IN_PROC_BROWSER_TEST_P(DumpAccessibilityScriptTest, AXURL) { RunTypedTest<kMacAttributes>("ax-url.html"); } @@ -392,6 +400,11 @@ RunTypedTest<kMacMethods>("accessibility-role-description.html"); } +IN_PROC_BROWSER_TEST_P(DumpAccessibilityScriptTest, + AccessibilityTitleUIElement) { + RunTypedTest<kMacMethods>("accessibility-title-ui-element.html"); +} + IN_PROC_BROWSER_TEST_P(DumpAccessibilityScriptTest, AccessibilityTitle) { RunTypedTest<kMacMethods>("accessibility-title.html"); }
diff --git a/content/browser/back_forward_cache_features_browsertest.cc b/content/browser/back_forward_cache_features_browsertest.cc index e944aa3..acaa8d3 100644 --- a/content/browser/back_forward_cache_features_browsertest.cc +++ b/content/browser/back_forward_cache_features_browsertest.cc
@@ -229,9 +229,17 @@ ExpectRestored(FROM_HERE); } +// TODO(https://crbug.com/1299018): Flaky on Linux. +#if BUILDFLAG(IS_LINUX) +#define MAYBE_DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel \ + DISABLED_DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel +#else +#define MAYBE_DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel \ + DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel +#endif IN_PROC_BROWSER_TEST_P( BackForwardCacheWithDedicatedWorkerBrowserTest, - DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel) { + MAYBE_DoNotCacheWithDedicatedWorkerWithWebTransportAndDocumentWithBroadcastChannel) { CreateHttpsServer(); ASSERT_TRUE(https_server()->Start());
diff --git a/content/browser/code_cache/generated_code_cache_context.cc b/content/browser/code_cache/generated_code_cache_context.cc index 077b44cc..96d9439c 100644 --- a/content/browser/code_cache/generated_code_cache_context.cc +++ b/content/browser/code_cache/generated_code_cache_context.cc
@@ -112,6 +112,13 @@ void GeneratedCodeCacheContext::Shutdown() { DCHECK_CURRENTLY_ON(BrowserThread::UI); + RunOrPostTask( + this, FROM_HERE, + base::BindOnce(&GeneratedCodeCacheContext::ShutdownOnThread, this)); +} + +void GeneratedCodeCacheContext::ShutdownOnThread() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); generated_js_code_cache_.reset(); generated_wasm_code_cache_.reset(); generated_webui_js_code_cache_.reset();
diff --git a/content/browser/code_cache/generated_code_cache_context.h b/content/browser/code_cache/generated_code_cache_context.h index 4ab73c2..e4bc9f2 100644 --- a/content/browser/code_cache/generated_code_cache_context.h +++ b/content/browser/code_cache/generated_code_cache_context.h
@@ -7,6 +7,7 @@ #include "base/files/file_path.h" #include "base/memory/ref_counted.h" +#include "base/thread_annotations.h" #include "content/common/content_export.h" #include "content/public/browser/browser_thread.h" @@ -56,15 +57,18 @@ ~GeneratedCodeCacheContext(); void InitializeOnThread(const base::FilePath& path, int max_bytes); + void ShutdownOnThread(); // Created, used and deleted on the code cache thread. std::unique_ptr<GeneratedCodeCache, base::OnTaskRunnerDeleter> - generated_js_code_cache_{nullptr, base::OnTaskRunnerDeleter(nullptr)}; + generated_js_code_cache_ GUARDED_BY_CONTEXT(sequence_checker_) = { + nullptr, base::OnTaskRunnerDeleter(nullptr)}; std::unique_ptr<GeneratedCodeCache, base::OnTaskRunnerDeleter> - generated_wasm_code_cache_{nullptr, base::OnTaskRunnerDeleter(nullptr)}; + generated_wasm_code_cache_ GUARDED_BY_CONTEXT(sequence_checker_) = { + nullptr, base::OnTaskRunnerDeleter(nullptr)}; std::unique_ptr<GeneratedCodeCache, base::OnTaskRunnerDeleter> - generated_webui_js_code_cache_{nullptr, - base::OnTaskRunnerDeleter(nullptr)}; + generated_webui_js_code_cache_ GUARDED_BY_CONTEXT(sequence_checker_) = { + nullptr, base::OnTaskRunnerDeleter(nullptr)}; scoped_refptr<base::SequencedTaskRunner> task_runner_; SEQUENCE_CHECKER(sequence_checker_);
diff --git a/content/browser/gpu/gpu_data_manager_testing_autogen.cc b/content/browser/gpu/gpu_data_manager_testing_autogen.cc index 8b276b00..a740b4b6 100644 --- a/content/browser/gpu/gpu_data_manager_testing_autogen.cc +++ b/content/browser/gpu/gpu_data_manager_testing_autogen.cc
@@ -10,6 +10,8 @@ #include "content/browser/gpu/gpu_data_manager_testing_autogen.h" +#include <iterator> + #include "content/browser/gpu/gpu_data_manager_testing_arrays_and_structs_autogen.h" #include "content/browser/gpu/gpu_data_manager_testing_exceptions_autogen.h"
diff --git a/content/browser/interest_group/auction_runner.cc b/content/browser/interest_group/auction_runner.cc index 63339ba..3cc3e8c 100644 --- a/content/browser/interest_group/auction_runner.cc +++ b/content/browser/interest_group/auction_runner.cc
@@ -114,20 +114,20 @@ AuctionRunner::Auction::Auction( blink::mojom::AuctionAdConfig* config, - bool is_component_auction, + const Auction* parent, AuctionWorkletManager* auction_worklet_manager, InterestGroupManagerImpl* interest_group_manager, base::Time auction_start_time) : auction_worklet_manager_(auction_worklet_manager), interest_group_manager_(interest_group_manager), config_(config), - is_component_auction_(is_component_auction), + parent_(parent), auction_start_time_(auction_start_time) { for (const auto& component_auction_config : config->component_auctions) { // Nested component auctions are not supported. - DCHECK(!is_component_auction); + DCHECK(!parent_); component_auctions_.emplace_back(std::make_unique<Auction>( - component_auction_config.get(), /*is_component_auction=*/true, + component_auction_config.get(), /*parent=*/this, auction_worklet_manager, interest_group_manager, auction_start_time)); } } @@ -137,7 +137,7 @@ final_auction_result_ = AuctionResult::kAborted; // TODO(mmenke): Record histograms for component auctions. - if (!is_component_auction_) { + if (!parent_) { UMA_HISTOGRAM_ENUMERATION("Ads.InterestGroup.Auction.Result", *final_auction_result_); @@ -284,7 +284,7 @@ // Component auctions unload their seller worklets on completion, so need to // reload the seller worklet in the case of a component auction. if (!seller_worklet_handle_) { - DCHECK(is_component_auction_); + DCHECK(parent_); if (!auction_worklet_manager_->RequestSellerWorklet( config_->decision_logic_url, config_->trusted_scoring_signals_url, base::BindOnce(&Auction::ReportSellerResult, @@ -465,7 +465,7 @@ // Record histograms about the interest groups participating in the auction. // TODO(mmenke): Record histograms for component auctions. - if (!is_component_auction_) { + if (!parent_) { // Only record histograms if there were interest groups that could // theoretically participate in the auction. if (num_owners_loaded_ > 0) { @@ -591,6 +591,7 @@ interest_group.ad_components), config_->auction_ad_config_non_shared_params->auction_signals, PerBuyerSignals(bid_state), PerBuyerTimeout(bid_state), config_->seller, + parent_ ? parent_->config_->seller : absl::optional<url::Origin>(), bid_state->bidder.bidding_browser_signals.Clone(), auction_start_time_, base::BindOnce(&Auction::OnGenerateBidComplete, weak_ptr_factory_.GetWeakPtr(), bid_state)); @@ -736,7 +737,8 @@ seller_worklet_handle_->GetSellerWorklet()->ScoreAd( bid_raw->ad_metadata, bid_raw->bid, config_->auction_ad_config_non_shared_params.Clone(), - bid_raw->interest_group->owner, bid_raw->render_url, + GetOtherSellerParam(*bid_raw), bid_raw->interest_group->owner, + bid_raw->render_url, bid_raw->ad_components ? *bid_raw->ad_components : std::vector<GURL>(), bid_raw->bid_duration.InMilliseconds(), SellerTimeout(), base::BindOnce(&Auction::OnBidScored, weak_ptr_factory_.GetWeakPtr(), @@ -896,7 +898,7 @@ // If this is a component auction, have to unload the seller worklet handle to // avoid deadlock. Otherwise, loading the top-level seller worklet may be // blocked by component seller worklets taking up all the quota. - if (is_component_auction_) + if (parent_) seller_worklet_handle_.reset(); // If the seller loaded callback hasn't been invoked yet, call it now. This is @@ -1022,6 +1024,7 @@ config_->auction_ad_config_non_shared_params->auction_signals, PerBuyerSignals(top_bid_->bid->bid_state), signals_for_winner_arg, top_bid_->bid->render_url, top_bid_->bid->bid, config_->seller, + parent_ ? parent_->config_->seller : absl::optional<url::Origin>(), top_bid_->bid->bidding_signals_data_version.value_or(0), top_bid_->bid->bidding_signals_data_version.has_value(), base::BindOnce(&Auction::OnReportBidWinComplete, @@ -1115,6 +1118,26 @@ .Run(auction_result == AuctionResult::kSuccess); } +auction_worklet::mojom::ComponentAuctionOtherSellerPtr +AuctionRunner::Auction::GetOtherSellerParam(const Bid& bid) const { + auction_worklet::mojom::ComponentAuctionOtherSellerPtr + browser_signals_other_seller; + if (parent_) { + // This is a component seller scoring a bid from its own auction. + // Need to provide the top-level seller origin. + browser_signals_other_seller = + auction_worklet::mojom::ComponentAuctionOtherSeller::NewTopLevelSeller( + parent_->config_->seller); + } else if (bid.auction != this) { + // This is a top-level seller scoring a bid from a component auction. + // Need to provide the component seller origin. + browser_signals_other_seller = + auction_worklet::mojom::ComponentAuctionOtherSeller::NewComponentSeller( + bid.auction->config_->seller); + } + return browser_signals_other_seller; +} + bool AuctionRunner::Auction::RequestBidderWorklet( BidState& bid_state, base::OnceClosure worklet_available_callback, @@ -1171,7 +1194,7 @@ owned_auction_config_(std::move(auction_config)), callback_(std::move(callback)), auction_(owned_auction_config_.get(), - /*is_component_auction=*/false, + /*parent=*/nullptr, auction_worklet_manager, interest_group_manager, /*auction_start_time=*/base::Time::Now()) {}
diff --git a/content/browser/interest_group/auction_runner.h b/content/browser/interest_group/auction_runner.h index ce924873..0982e76 100644 --- a/content/browser/interest_group/auction_runner.h +++ b/content/browser/interest_group/auction_runner.h
@@ -21,6 +21,7 @@ #include "content/common/content_export.h" #include "content/public/browser/content_browser_client.h" #include "content/services/auction_worklet/public/mojom/bidder_worklet.mojom.h" +#include "content/services/auction_worklet/public/mojom/seller_worklet.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/blink/public/common/interest_group/interest_group.h" #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h" @@ -288,10 +289,10 @@ // All passed in raw pointers must remain valid until the Auction is // destroyed. `config` is typically owned by the AuctionRunner's - // `owned_auction_config_` field. `is_component_auction` should be true - // if the Auction is a component of another auction. + // `owned_auction_config_` field. `parent` should be the parent Auction if + // this is a component auction, and null, otherwise. Auction(blink::mojom::AuctionAdConfig* config, - bool is_component_auction, + const Auction* parent, AuctionWorkletManager* auction_worklet_manager, InterestGroupManagerImpl* interest_group_manager, base::Time auction_start_time); @@ -560,6 +561,14 @@ // Methods not associated with a phase // ----------------------------------- + // Creates a ComponentAuctionOtherSeller to pass to SellerWorklets when + // dealing with `bid`. If `this` is a component auction, returns an object + // with a `top_level_seller`. If this is a top-level auction and `bid` comes + // from a component auction, returns an object with a `component_seller` to + // `bid's` seller. + auction_worklet::mojom::ComponentAuctionOtherSellerPtr GetOtherSellerParam( + const Bid& bid) const; + // Requests a WorkletHandle for the interest group identified by // `bid_state`, using the provided callbacks. Returns true if a worklet was // received synchronously. @@ -573,7 +582,8 @@ // Configuration of this auction. raw_ptr<const blink::mojom::AuctionAdConfig> config_; - const bool is_component_auction_; + // If this is a component auction, the parent Auction. Null, otherwise. + const raw_ptr<const Auction> parent_; // Component auctions that are part of this auction. This auction manages // their state transition, and their bids may participate in this auction as
diff --git a/content/browser/interest_group/auction_runner_unittest.cc b/content/browser/interest_group/auction_runner_unittest.cc index 95af3f8..abaf1d2 100644 --- a/content/browser/interest_group/auction_runner_unittest.cc +++ b/content/browser/interest_group/auction_runner_unittest.cc
@@ -89,12 +89,14 @@ const hasSignals = %s; const debugLossReportUrl = "%s"; const debugWinReportUrl = "%s"; + const topLevelSeller = "https://adstuff.publisher1.com"; function generateBid(interestGroup, auctionSignals, perBuyerSignals, trustedBiddingSignals, browserSignals) { var result = {ad: {"bidKey": "data for " + bid, "groupName": interestGroupName, - "renderUrl": "data for " + renderUrl}, + "renderUrl": "data for " + renderUrl, + "seller": seller}, bid: bid, render: renderUrl}; if (interestGroup.adComponents) { result.adComponents = [interestGroup.adComponents[0].renderUrl]; @@ -145,8 +147,15 @@ } if (browserSignals.topWindowHostname !== 'publisher1.com') throw new Error("wrong topWindowHostname"); - if (browserSignals.seller != seller) + if (browserSignals.seller !== seller) throw new Error("wrong seller"); + if (browserSignals.seller === topLevelSeller) { + if ("topLevelSeller" in browserSignals) + throw new Error("expected no browserSignals.topLevelSeller"); + } else { + if (browserSignals.topLevelSeller !== topLevelSeller) + throw new Error("wrong browserSignals.topLevelSeller"); + } if (browserSignals.joinCount !== 3) throw new Error("joinCount") if (browserSignals.bidCount !== 5) @@ -199,6 +208,15 @@ if (browserSignals.topWindowHostname !== 'publisher1.com') throw new Error("wrong browserSignals.topWindowHostname"); + if (browserSignals.seller !== seller) + throw new Error("wrong seller"); + if (browserSignals.seller === topLevelSeller) { + if ("topLevelSeller" in browserSignals) + throw new Error("expected no browserSignals.topLevelSeller"); + } else { + if (browserSignals.topLevelSeller !== topLevelSeller) + throw new Error("wrong browserSignals.topLevelSeller"); + } if ("desirability" in browserSignals) throw new Error("why is desirability here?"); if (browserSignals.interestGroupName !== interestGroupName) @@ -252,6 +270,7 @@ const sendReportUrl = "%s"; const debugLossReportUrl = "%s"; const debugWinReportUrl = "%s"; + const topLevelSeller = "https://adstuff.publisher1.com"; function scoreAd(adMetadata, bid, auctionConfig, trustedScoringSignals, browserSignals) { if (adMetadata.bidKey !== ("data for " + bid)) { @@ -297,6 +316,31 @@ throw new Error("auctionConfig.sellerTimeout is not a number. huh"); if (browserSignals.topWindowHostname !== 'publisher1.com') throw new Error("wrong topWindowHostname"); + + if (decisionLogicUrl.startsWith(topLevelSeller)) { + // Top-level sellers should receive component sellers, but only for + // bids received from component auctions. + if ("topLevelSeller" in browserSignals) + throw new Error("Expected no topLevelSeller in browserSignals."); + if (adMetadata.seller == topLevelSeller) { + // If the bidder sent its bid directly to this top-level seller, + // there should be no `componentSeller`. + if ("componentSeller" in browserSignals) + throw new Error("Expected no componentSeller in browserSignals."); + } else { + // If the bidder sent its bid to a some other seller seller, that + // was the component seller, so `componentSeller` should be populated. + if (!browserSignals.componentSeller.includes("component")) + throw new Error("Incorrect componentSeller in browserSignals."); + } + } else { + // Component sellers should receive only the top-level seller. + if (browserSignals.topLevelSeller !== topLevelSeller) + throw new Error("Incorrect topLevelSeller in browserSignals."); + if ("componentSeller" in browserSignals) + throw new Error("Expected no componentSeller in browserSignals."); + } + if ("joinCount" in browserSignals) throw new Error("wrong kind of browser signals"); if (typeof browserSignals.biddingDurationMsec !== "number") @@ -454,7 +498,8 @@ const absl::optional<std::string>& auction_signals_json, const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, - const url::Origin& seller_origin, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, auction_worklet::mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, GenerateBidCallback generate_bid_callback) override { @@ -494,16 +539,18 @@ send_pending_signals_requests_called_ = true; } - void ReportWin(const std::string& interest_group_name, - const absl::optional<std::string>& auction_signals_json, - const absl::optional<std::string>& per_buyer_signals_json, - const std::string& seller_signals_json, - const GURL& browser_signal_render_url, - double browser_signal_bid, - const url::Origin& browser_signal_seller_origin, - uint32_t bidding_signals_data_version, - bool has_bidding_signals_data_version, - ReportWinCallback report_win_callback) override { + void ReportWin( + const std::string& interest_group_name, + const absl::optional<std::string>& auction_signals_json, + const absl::optional<std::string>& per_buyer_signals_json, + const std::string& seller_signals_json, + const GURL& browser_signal_render_url, + double browser_signal_bid, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, + uint32_t bidding_signals_data_version, + bool has_bidding_signals_data_version, + ReportWinCallback report_win_callback) override { // While the real BidderWorklet implementation supports multiple pending // callbacks, this class does not. DCHECK(!report_win_callback_); @@ -637,6 +684,8 @@ double bid, blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params, + auction_worklet::mojom::ComponentAuctionOtherSellerPtr + browser_signals_other_seller, const url::Origin& browser_signal_interest_group_owner, const GURL& browser_signal_render_url, const std::vector<GURL>& browser_signal_ad_components, @@ -1913,7 +1962,7 @@ "id":3, "method":"Debugger.setBreakpointByUrl", "params": { - "lineNumber": 5, + "lineNumber": 6, "url": "%s", "columnNumber": 0, "condition": "" @@ -1940,7 +1989,7 @@ hit_breakpoints->GetListDeprecated(); ASSERT_EQ(1u, hit_breakpoints_list.size()); ASSERT_TRUE(hit_breakpoints_list[0].is_string()); - EXPECT_EQ(base::StringPrintf("1:5:0:%s", debug_url.spec().c_str()), + EXPECT_EQ(base::StringPrintf("1:6:0:%s", debug_url.spec().c_str()), hit_breakpoints_list[0].GetString()); // Just resume execution.
diff --git a/content/browser/interest_group/auction_worklet_manager_unittest.cc b/content/browser/interest_group/auction_worklet_manager_unittest.cc index 0830903d..0deed936 100644 --- a/content/browser/interest_group/auction_worklet_manager_unittest.cc +++ b/content/browser/interest_group/auction_worklet_manager_unittest.cc
@@ -127,7 +127,8 @@ const absl::optional<std::string>& auction_signals_json, const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, - const url::Origin& seller_origin, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, auction_worklet::mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, GenerateBidCallback generate_bid_callback) override { @@ -142,16 +143,18 @@ } } - void ReportWin(const std::string& interest_group_name, - const absl::optional<std::string>& auction_signals_json, - const absl::optional<std::string>& per_buyer_signals_json, - const std::string& seller_signals_json, - const GURL& browser_signal_render_url, - double browser_signal_bid, - const url::Origin& browser_signal_seller_origin, - uint32_t browser_signal_data_version, - bool browser_signal_has_data_version, - ReportWinCallback report_win_callback) override { + void ReportWin( + const std::string& interest_group_name, + const absl::optional<std::string>& auction_signals_json, + const absl::optional<std::string>& per_buyer_signals_json, + const std::string& seller_signals_json, + const GURL& browser_signal_render_url, + double browser_signal_bid, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, + uint32_t browser_signal_data_version, + bool browser_signal_has_data_version, + ReportWinCallback report_win_callback) override { NOTREACHED(); } @@ -258,6 +261,8 @@ double bid, blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params, + auction_worklet::mojom::ComponentAuctionOtherSellerPtr + browser_signals_other_seller, const url::Origin& browser_signal_interest_group_owner, const GURL& browser_signal_render_url, const std::vector<GURL>& browser_signal_ad_components,
diff --git a/content/browser/renderer_host/back_forward_cache_can_store_document_result.cc b/content/browser/renderer_host/back_forward_cache_can_store_document_result.cc index ab9089f..a95b2d1 100644 --- a/content/browser/renderer_host/back_forward_cache_can_store_document_result.cc +++ b/content/browser/renderer_host/back_forward_cache_can_store_document_result.cc
@@ -471,9 +471,8 @@ BackForwardCacheCanStoreDocumentResult:: BackForwardCacheCanStoreDocumentResult() = default; BackForwardCacheCanStoreDocumentResult::BackForwardCacheCanStoreDocumentResult( - BackForwardCacheCanStoreDocumentResult&&) = default; -BackForwardCacheCanStoreDocumentResult& -BackForwardCacheCanStoreDocumentResult::operator=( + BackForwardCacheCanStoreDocumentResult&) = default; +BackForwardCacheCanStoreDocumentResult::BackForwardCacheCanStoreDocumentResult( BackForwardCacheCanStoreDocumentResult&&) = default; BackForwardCacheCanStoreDocumentResult:: ~BackForwardCacheCanStoreDocumentResult() = default;
diff --git a/content/browser/renderer_host/back_forward_cache_can_store_document_result.h b/content/browser/renderer_host/back_forward_cache_can_store_document_result.h index fc4dcf9..b773f56a 100644 --- a/content/browser/renderer_host/back_forward_cache_can_store_document_result.h +++ b/content/browser/renderer_host/back_forward_cache_can_store_document_result.h
@@ -38,8 +38,8 @@ BackForwardCacheCanStoreDocumentResult(); BackForwardCacheCanStoreDocumentResult( - BackForwardCacheCanStoreDocumentResult&&); - BackForwardCacheCanStoreDocumentResult& operator=( + BackForwardCacheCanStoreDocumentResult&); + BackForwardCacheCanStoreDocumentResult( BackForwardCacheCanStoreDocumentResult&&); ~BackForwardCacheCanStoreDocumentResult();
diff --git a/content/browser/resources/.eslintrc.js b/content/browser/resources/.eslintrc.js new file mode 100644 index 0000000..77e52ec --- /dev/null +++ b/content/browser/resources/.eslintrc.js
@@ -0,0 +1,13 @@ +// Copyright 2022 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.exports = { + 'env': { + 'browser': true, + 'es6': true, + }, + 'rules': { + 'eqeqeq': ['error', 'always', {'null': 'ignore'}], + }, +};
diff --git a/content/browser/resources/attribution_reporting/attribution_internals.js b/content/browser/resources/attribution_reporting/attribution_internals.js index a9bf7b41..ba51d78 100644 --- a/content/browser/resources/attribution_reporting/attribution_internals.js +++ b/content/browser/resources/attribution_reporting/attribution_internals.js
@@ -642,14 +642,14 @@ * @return {string} */ function OriginToText(origin) { - if (origin.host.length == 0) { + if (origin.host.length === 0) { return 'Null'; } let result = origin.scheme + '://' + origin.host; - if ((origin.scheme == 'https' && origin.port != '443') || - (origin.scheme == 'http' && origin.port != '80')) { + if ((origin.scheme === 'https' && origin.port !== 443) || + (origin.scheme === 'http' && origin.port !== 80)) { result += ':' + origin.port; } return result;
diff --git a/content/browser/resources/gpu/info_view.js b/content/browser/resources/gpu/info_view.js index 8fce7f8..c24cf5a 100644 --- a/content/browser/resources/gpu/info_view.js +++ b/content/browser/resources/gpu/info_view.js
@@ -582,7 +582,7 @@ infoEl.classList.add('feature-green'); infoEl.textContent = infoString; - if (infoString == '[Supported Features]') { + if (infoString === '[Supported Features]') { inProcessingToggles = false; } else { inProcessingToggles = true;
diff --git a/content/browser/resources/gpu/vulkan_info.js b/content/browser/resources/gpu/vulkan_info.js index 149436a..64cf855 100644 --- a/content/browser/resources/gpu/vulkan_info.js +++ b/content/browser/resources/gpu/vulkan_info.js
@@ -60,7 +60,7 @@ let result = ''; for (let i = 0; i < 16; ++i) { const value = uuid[i]; - if (i == 4 || i == 6 || i == 8 || i == 10) { + if (i === 4 || i === 6 || i === 8 || i === 10) { result += '-'; } if (value < 0x10) {
diff --git a/content/browser/resources/process/process_internals.js b/content/browser/resources/process/process_internals.js index fc4bba5..c813726 100644 --- a/content/browser/resources/process/process_internals.js +++ b/content/browser/resources/process/process_internals.js
@@ -92,9 +92,9 @@ // Compose the string which will appear in the entry for this frame. let itemLabel = `Frame[${frame.processId}:${frame.routingId}:${ frame.agentSchedulingGroupId}]:`; - if (frame.type == FrameInfo_Type.kBackForwardCache) { + if (frame.type === FrameInfo_Type.kBackForwardCache) { itemLabel += ` bfcached`; - } else if (frame.type == FrameInfo_Type.kPrerender) { + } else if (frame.type === FrameInfo_Type.kPrerender) { itemLabel += ` prerender`; } @@ -178,7 +178,7 @@ // buildCountString(1, 'frame') => "1 frame" // buildCountString(2, 'frame') => "2 frames" const buildCountString = ((count, name) => { - return `${count} ${name}` + (count != 1 ? 's' : ''); + return `${count} ${name}` + (count !== 1 ? 's' : ''); }); itemLabel += buildCountString(activeCount, 'active frame');
diff --git a/content/browser/service_worker/OWNERS b/content/browser/service_worker/OWNERS index c352f9ae..79ad79da 100644 --- a/content/browser/service_worker/OWNERS +++ b/content/browser/service_worker/OWNERS
@@ -2,6 +2,7 @@ # # This file also covers ownership of the following: # //chrome/browser/chrome_service_worker_browsertest.cc +# //components/services/storage/service_worker/ # //content/browser/resources/service_worker/ # //content/renderer/service_worker/ # //third_party/blink/common/service_worker/
diff --git a/content/services/auction_worklet/auction_v8_helper_unittest.cc b/content/services/auction_worklet/auction_v8_helper_unittest.cc index 5edb4b6..0de70fe 100644 --- a/content/services/auction_worklet/auction_v8_helper_unittest.cc +++ b/content/services/auction_worklet/auction_v8_helper_unittest.cc
@@ -69,23 +69,26 @@ const absl::optional<std::string>& auction_signals_json, const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, - const url::Origin& seller_origin, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, auction_worklet::mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, GenerateBidCallback generate_bid_callback) override { ADD_FAILURE() << "GenerateBid shouldn't be called on DebugConnector"; } - void ReportWin(const std::string& interest_group_name, - const absl::optional<std::string>& auction_signals_json, - const absl::optional<std::string>& per_buyer_signals_json, - const std::string& seller_signals_json, - const GURL& browser_signal_render_url, - double browser_signal_bid, - const url::Origin& browser_signal_seller_origin, - uint32_t bidding_data_version, - bool has_biding_data_version, - ReportWinCallback report_win_callback) override { + void ReportWin( + const std::string& interest_group_name, + const absl::optional<std::string>& auction_signals_json, + const absl::optional<std::string>& per_buyer_signals_json, + const std::string& seller_signals_json, + const GURL& browser_signal_render_url, + double browser_signal_bid, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, + uint32_t bidding_data_version, + bool has_biding_data_version, + ReportWinCallback report_win_callback) override { ADD_FAILURE() << "ReportWin shouldn't be called on DebugConnector"; }
diff --git a/content/services/auction_worklet/bidder_worklet.cc b/content/services/auction_worklet/bidder_worklet.cc index 40fc8749..4569692 100644 --- a/content/services/auction_worklet/bidder_worklet.cc +++ b/content/services/auction_worklet/bidder_worklet.cc
@@ -200,7 +200,8 @@ const absl::optional<std::string>& auction_signals_json, const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, - const url::Origin& seller_origin, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, GenerateBidCallback generate_bid_callback) { @@ -213,7 +214,10 @@ generate_bid_task->auction_signals_json = auction_signals_json; generate_bid_task->per_buyer_signals_json = per_buyer_signals_json; generate_bid_task->per_buyer_timeout = per_buyer_timeout; - generate_bid_task->seller_origin = seller_origin; + generate_bid_task->browser_signal_seller_origin = + browser_signal_seller_origin; + generate_bid_task->browser_signal_top_level_seller_origin = + browser_signal_top_level_seller_origin; generate_bid_task->bidding_browser_signals = std::move(bidding_browser_signals); generate_bid_task->auction_start_time = auction_start_time; @@ -249,6 +253,7 @@ const GURL& browser_signal_render_url, double browser_signal_bid, const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, uint32_t bidding_signals_data_version, bool has_bidding_signals_data_version, ReportWinCallback report_win_callback) { @@ -263,6 +268,8 @@ report_win_task->browser_signal_render_url = browser_signal_render_url; report_win_task->browser_signal_bid = browser_signal_bid; report_win_task->browser_signal_seller_origin = browser_signal_seller_origin; + report_win_task->browser_signal_top_level_seller_origin = + browser_signal_top_level_seller_origin; if (has_bidding_signals_data_version) report_win_task->bidding_signals_data_version = bidding_signals_data_version; @@ -327,6 +334,7 @@ const GURL& browser_signal_render_url, double browser_signal_bid, const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, const absl::optional<uint32_t>& bidding_signals_data_version, ReportWinCallbackInternal callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(v8_sequence_checker_); @@ -368,6 +376,10 @@ !browser_signals_dict.Set("bid", browser_signal_bid) || !browser_signals_dict.Set("seller", browser_signal_seller_origin.Serialize()) || + (browser_signal_top_level_seller_origin && + !browser_signals_dict.Set( + "topLevelSeller", + browser_signal_top_level_seller_origin->Serialize())) || (bidding_signals_data_version.has_value() && !browser_signals_dict.Set("dataVersion", bidding_signals_data_version.value()))) { @@ -406,6 +418,7 @@ const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, scoped_refptr<TrustedSignals::Result> trusted_bidding_signals_result, @@ -496,6 +509,10 @@ top_window_origin_.host()) || !browser_signals_dict.Set("seller", browser_signal_seller_origin.Serialize()) || + (browser_signal_top_level_seller_origin && + !browser_signals_dict.Set( + "topLevelSeller", + browser_signal_top_level_seller_origin->Serialize())) || !browser_signals_dict.Set("joinCount", bidding_browser_signals->join_count) || !browser_signals_dict.Set("bidCount", @@ -842,7 +859,9 @@ std::move(task->bidder_worklet_non_shared_params), std::move(task->auction_signals_json), std::move(task->per_buyer_signals_json), - std::move(task->per_buyer_timeout), std::move(task->seller_origin), + std::move(task->per_buyer_timeout), + std::move(task->browser_signal_seller_origin), + std::move(task->browser_signal_top_level_seller_origin), std::move(task->bidding_browser_signals), task->auction_start_time, std::move(task->trusted_bidding_signals_result), base::BindOnce(&BidderWorklet::DeliverBidCallbackOnUserThread, @@ -865,6 +884,7 @@ std::move(task->browser_signal_render_url), std::move(task->browser_signal_bid), std::move(task->browser_signal_seller_origin), + std::move(task->browser_signal_top_level_seller_origin), std::move(task->bidding_signals_data_version), base::BindOnce(&BidderWorklet::DeliverReportWinOnUserThread, weak_ptr_factory_.GetWeakPtr(), task)));
diff --git a/content/services/auction_worklet/bidder_worklet.h b/content/services/auction_worklet/bidder_worklet.h index e171fb5..c301e64f 100644 --- a/content/services/auction_worklet/bidder_worklet.h +++ b/content/services/auction_worklet/bidder_worklet.h
@@ -96,21 +96,24 @@ const absl::optional<std::string>& auction_signals_json, const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, - const url::Origin& seller_origin, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, GenerateBidCallback generate_bid_callback) override; void SendPendingSignalsRequests() override; - void ReportWin(const std::string& interest_group_name, - const absl::optional<std::string>& auction_signals_json, - const absl::optional<std::string>& per_buyer_signals_json, - const std::string& seller_signals_json, - const GURL& browser_signal_render_url, - double browser_signal_bid, - const url::Origin& browser_signal_seller_origin, - uint32_t bidding_signals_data_version, - bool has_bidding_signals_data_version, - ReportWinCallback report_win_callback) override; + void ReportWin( + const std::string& interest_group_name, + const absl::optional<std::string>& auction_signals_json, + const absl::optional<std::string>& per_buyer_signals_json, + const std::string& seller_signals_json, + const GURL& browser_signal_render_url, + double browser_signal_bid, + const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& browser_signal_top_level_seller_origin, + uint32_t bidding_signals_data_version, + bool has_bidding_signals_data_version, + ReportWinCallback report_win_callback) override; void ConnectDevToolsAgent( mojo::PendingAssociatedReceiver<blink::mojom::DevToolsAgent> agent) override; @@ -124,7 +127,8 @@ absl::optional<std::string> auction_signals_json; absl::optional<std::string> per_buyer_signals_json; absl::optional<base::TimeDelta> per_buyer_timeout; - url::Origin seller_origin; + url::Origin browser_signal_seller_origin; + absl::optional<url::Origin> browser_signal_top_level_seller_origin; mojom::BiddingBrowserSignalsPtr bidding_browser_signals; base::Time auction_start_time; @@ -154,6 +158,7 @@ GURL browser_signal_render_url; double browser_signal_bid; url::Origin browser_signal_seller_origin; + absl::optional<url::Origin> browser_signal_top_level_seller_origin; absl::optional<uint32_t> bidding_signals_data_version; ReportWinCallback callback; @@ -194,6 +199,8 @@ const GURL& browser_signal_render_url, double browser_signal_bid, const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& + browser_signal_top_level_seller_origin, const absl::optional<uint32_t>& bidding_signals_data_version, ReportWinCallbackInternal callback); @@ -203,6 +210,8 @@ const absl::optional<std::string>& per_buyer_signals_json, const absl::optional<base::TimeDelta> per_buyer_timeout, const url::Origin& browser_signal_seller_origin, + const absl::optional<url::Origin>& + browser_signal_top_level_seller_origin, mojom::BiddingBrowserSignalsPtr bidding_browser_signals, base::Time auction_start_time, scoped_refptr<TrustedSignals::Result> trusted_bidding_signals_result,
diff --git a/content/services/auction_worklet/bidder_worklet_unittest.cc b/content/services/auction_worklet/bidder_worklet_unittest.cc index 60f0e19..cc29c244 100644 --- a/content/services/auction_worklet/bidder_worklet_unittest.cc +++ b/content/services/auction_worklet/bidder_worklet_unittest.cc
@@ -159,6 +159,7 @@ top_window_origin_ = url::Origin::Create(GURL("https://top.window.test/")); browser_signal_seller_origin_ = url::Origin::Create(GURL("https://browser.signal.seller.test/")); + browser_signal_top_level_seller_origin_.reset(); seller_signals_ = "[\"seller_signals\"]"; browser_signal_render_url_ = GURL("https://render_url.test/"); browser_signal_bid_ = 1; @@ -266,8 +267,8 @@ bidder_worklet->ReportWin( interest_group_name_, auction_signals_, per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), - data_version_.has_value(), + browser_signal_seller_origin_, browser_signal_top_level_seller_origin_, + data_version_.value_or(0), data_version_.has_value(), base::BindOnce( [](const absl::optional<GURL>& expected_report_url, const std::vector<std::string>& expected_errors, @@ -350,7 +351,8 @@ bidder_worklet->GenerateBid( CreateBidderWorkletNonSharedParams(), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindOnce(&BidderWorkletTest::GenerateBidCallback, base::Unretained(this))); bidder_worklet->SendPendingSignalsRequests(); @@ -362,7 +364,8 @@ bidder_worklet->GenerateBid( CreateBidderWorkletNonSharedParams(), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindOnce([](mojom::BidderWorkletBidPtr bid, uint32_t data_version, bool has_data_version, const absl::optional<GURL>& debug_loss_report_url, @@ -468,6 +471,8 @@ absl::optional<base::TimeDelta> per_buyer_timeout_; url::Origin top_window_origin_; url::Origin browser_signal_seller_origin_; + absl::optional<url::Origin> browser_signal_top_level_seller_origin_; + std::string seller_signals_; absl::optional<uint32_t> data_version_; GURL browser_signal_render_url_; @@ -1040,6 +1045,7 @@ CreateBidderWorkletNonSharedParams(), /*auction_signals_json=*/base::NumberToString(bid_value), per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), auction_start_time_, base::BindLambdaForTesting( [&run_loop, &num_generate_bid_calls, bid_value]( @@ -1130,7 +1136,8 @@ bidder_worklet->GenerateBid( std::move(interest_group_fields), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindLambdaForTesting( [&run_loop, &num_generate_bid_calls, i]( mojom::BidderWorkletBidPtr bid, uint32_t data_version, @@ -1226,7 +1233,8 @@ bidder_worklet->GenerateBid( std::move(interest_group_fields), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindLambdaForTesting( [&run_loop, &num_generate_bid_calls, i]( mojom::BidderWorkletBidPtr bid, uint32_t data_version, @@ -1328,7 +1336,8 @@ bidder_worklet->GenerateBid( std::move(interest_group_fields), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindLambdaForTesting( [&run_loop, &num_generate_bid_calls, i]( mojom::BidderWorkletBidPtr bid, uint32_t data_version, @@ -1409,7 +1418,8 @@ bidder_worklet->GenerateBid( std::move(interest_group_fields), auction_signals_, per_buyer_signals_, per_buyer_timeout_, browser_signal_seller_origin_, - CreateBiddingBrowserSignals(), auction_start_time_, + browser_signal_top_level_seller_origin_, CreateBiddingBrowserSignals(), + auction_start_time_, base::BindLambdaForTesting( [&run_loop, &num_generate_bid_calls, i]( mojom::BidderWorkletBidPtr bid, uint32_t data_version, @@ -1585,6 +1595,25 @@ /*ad_components=*/absl::nullopt, base::TimeDelta())); } +TEST_F(BidderWorkletTest, GenerateBidBrowserSignalTopLevelSellerOrigin) { + browser_signal_top_level_seller_origin_ = absl::nullopt; + RunGenerateBidWithReturnValueExpectingResult( + R"({ad: "topLevelSeller" in browserSignals, + bid:1, + render:"https://response.test/"})", + mojom::BidderWorkletBid::New("false", 1, GURL("https://response.test/"), + /*ad_components=*/absl::nullopt, + base::TimeDelta())); + + browser_signal_top_level_seller_origin_ = + url::Origin::Create(GURL("https://foo.test")); + RunGenerateBidWithReturnValueExpectingResult( + R"({ad: browserSignals.topLevelSeller, bid:1, render:"https://response.test/"})", + mojom::BidderWorkletBid::New( + R"("https://foo.test")", 1, GURL("https://response.test/"), + /*ad_components=*/absl::nullopt, base::TimeDelta())); +} + TEST_F(BidderWorkletTest, GenerateBidBrowserSignalTopWindowOrigin) { top_window_origin_ = url::Origin::Create(GURL("https://top.window.test/")); RunGenerateBidWithReturnValueExpectingResult( @@ -1777,8 +1806,8 @@ bidder_worklet->ReportWin( interest_group_name_, /*auction_signals_json=*/"0", per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), - data_version_.has_value(), + browser_signal_seller_origin_, browser_signal_top_level_seller_origin_, + data_version_.value_or(0), data_version_.has_value(), base::BindLambdaForTesting( [&run_loop](const absl::optional<GURL>& report_url, const std::vector<std::string>& errors) { @@ -2137,8 +2166,8 @@ bidder_worklet->ReportWin( interest_group_name_, auction_signals_, per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), - data_version_.has_value(), + browser_signal_seller_origin_, browser_signal_top_level_seller_origin_, + data_version_.value_or(0), data_version_.has_value(), base::BindOnce([](const absl::optional<GURL>& report_url, const std::vector<std::string>& errors) { ADD_FAILURE() << "Callback should not be invoked since worklet deleted"; @@ -2175,7 +2204,8 @@ interest_group_name_, /*auction_signals_json=*/base::NumberToString(i), per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), + browser_signal_seller_origin_, + browser_signal_top_level_seller_origin_, data_version_.value_or(0), data_version_.has_value(), base::BindLambdaForTesting( [&run_loop, &num_report_win_calls, i]( @@ -2214,8 +2244,8 @@ interest_group_name_, /*auction_signals_json=*/base::NumberToString(i), per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), - data_version_.has_value(), + browser_signal_seller_origin_, browser_signal_top_level_seller_origin_, + data_version_.value_or(0), data_version_.has_value(), base::BindOnce([](const absl::optional<GURL>& report_url, const std::vector<std::string>& errors) { ADD_FAILURE() << "Callback should not be invoked."; @@ -2351,6 +2381,21 @@ /*expected_report_url=*/seller_raw_url); } +TEST_F(BidderWorkletTest, ReportWinBrowserSignalTopLevelSeller) { + browser_signal_top_level_seller_origin_ = absl::nullopt; + RunReportWinWithFunctionBodyExpectingResult( + R"(if (!("topLevelSeller" in browserSignals)) + sendReportTo('https://pass.test');)", + /*expected_report_url=*/GURL("https://pass.test")); + + GURL top_level_seller_raw_url = GURL("https://top.level.seller.origin.test"); + browser_signal_top_level_seller_origin_ = + url::Origin::Create(top_level_seller_raw_url); + RunReportWinWithFunctionBodyExpectingResult( + "sendReportTo(browserSignals.topLevelSeller)", + /*expected_report_url=*/top_level_seller_raw_url); +} + // Subsequent runs of the same script should not affect each other. Same is true // for different scripts, but it follows from the single script case. // @@ -2395,8 +2440,8 @@ bidder_worklet->ReportWin( interest_group_name_, auction_signals_, per_buyer_signals_, seller_signals_, browser_signal_render_url_, browser_signal_bid_, - browser_signal_seller_origin_, data_version_.value_or(0), - data_version_.has_value(), + browser_signal_seller_origin_, browser_signal_top_level_seller_origin_, + data_version_.value_or(0), data_version_.has_value(), base::BindLambdaForTesting( [&run_loop](const absl::optional<GURL>& report_url, const std::vector<std::string>& errors) {
diff --git a/content/services/auction_worklet/public/mojom/bidder_worklet.mojom b/content/services/auction_worklet/public/mojom/bidder_worklet.mojom index bb547e5..d29cdf3 100644 --- a/content/services/auction_worklet/public/mojom/bidder_worklet.mojom +++ b/content/services/auction_worklet/public/mojom/bidder_worklet.mojom
@@ -119,6 +119,10 @@ // `browser_signal_seller_origin` The origin of the seller script running // the auction. Typically a valid, non-opaque HTTPS origin. // + // `browser_signal_top_level_seller_origin` The top-level seller origin, + // if this worklet is running as part of a component (nested) Auction. + // Null, otherwise. + // // `bidding_browser_signals` See BiddingBrowserSignals. // // `auction_start_time` The time the auction started, used to ensure the @@ -128,12 +132,6 @@ // `bid` If the worklet is successfully loaded and chooses to bid in the // auction, contains information about the bid. Null otherwise. // - // `debug_loss_report_url` The URL to request if the auction runs to - // completion and this bid does not win. All bidders are allowed to send loss - // report, including those who does not bid. This field has the debug prefix - // because it's part of an interim reporting API that will be replaced with - // standardized reporting APIs once available. It must be a valid HTTPS URL. - // // `bidding_signals_data_version` The value of the Data-Version header served // with the trusted bidding signals. // @@ -141,10 +139,16 @@ // was present in the HTTP response for the trusted bidding signals. // TODO(https://crbug.com/657632): Update when optional integers supported. // + // `debug_loss_report_url` The URL to request if the auction runs to + // completion and this bid does not win. All bidders are allowed to send loss + // report, including those who does not bid. This field has the debug prefix + // because it's part of an interim reporting API that will be replaced with + // standardized reporting APIs once available. It must be a valid HTTPS URL. + // // `debug_win_report_url` The URL to request if the auction runs to completion - // and this bid wins. This field has the debug prefix because it's part of an - // interim reporting API that will be replaced with standardized reporting - // APIs once available. It must be a valid HTTPS URL. + // and this bid wins. This field has the debug prefix because it's part of an + // interim reporting API that will be replaced with standardized reporting + // APIs once available. It must be a valid HTTPS URL. // // `errors` The various error messages to be used for debugging. These are too // sensitive for the renderer to see. There may be errors even when a bid @@ -156,6 +160,7 @@ string? per_buyer_signals_json, mojo_base.mojom.TimeDelta? per_buyer_timeout, url.mojom.Origin browser_signal_seller_origin, + url.mojom.Origin? browser_signal_top_level_seller_origin, BiddingBrowserSignals bidding_browser_signals, mojo_base.mojom.Time auction_start_time) => ( BidderWorkletBid? bid, @@ -202,6 +207,10 @@ // `browser_signal_seller_origin` The origin of the seller script running // the auction. Typically a valid, non-opaque HTTPS origin. // + // `browser_signals_top_level_seller_origin` The top-level seller origin, + // if this worklet is running as part of a component (nested) Auction. + // Null, otherwise. + // // `bidding_signals_data_version` The value of the Data-Version header served // with the trusted bidding signals. // @@ -226,6 +235,7 @@ url.mojom.Url browser_signal_render_url, double browser_signal_bid, url.mojom.Origin browser_signal_seller_origin, + url.mojom.Origin? browser_signal_top_level_seller_origin, uint32 bidding_signals_data_version, bool has_bidding_signals_data_version) => ( url.mojom.Url? report_url,
diff --git a/content/services/auction_worklet/public/mojom/seller_worklet.mojom b/content/services/auction_worklet/public/mojom/seller_worklet.mojom index 04f8246c..aea47e1 100644 --- a/content/services/auction_worklet/public/mojom/seller_worklet.mojom +++ b/content/services/auction_worklet/public/mojom/seller_worklet.mojom
@@ -11,6 +11,15 @@ import "url/mojom/origin.mojom"; import "url/mojom/url.mojom"; +// The other seller associated with a bid. For component (nested) +// SellerWorklets, `top_level_seller` is the seller for the parent auction. +// For top-level SellerWorklets, `component_seller` is the seller in the +// nested component auction where the bid was originally made. +union ComponentAuctionOtherSeller { + url.mojom.Origin top_level_seller; + url.mojom.Origin component_seller; +}; + // Manages the auction workflow for one loaded FLEDGE seller worklet. // See https://github.com/WICG/turtledove/blob/main/FLEDGE.md // @@ -37,6 +46,12 @@ // `auction_ad_config_non_shared_params` Values in an AuctionConfig that can // vary between auctions that can share a SellerWorklet. // + // `browser_signals_other_seller` The origin of the other seller associated + // with the bid. If this is a component seller worklet, it's the + // top-level seller. If this is a top-level seller scoring a bid from a + // component auction, it's the seller in the component auction. + // Null if this is the top-level seller scoring its own bids. + // // `browser_signal_interest_group_owner` The owner of the interest group // that offered the bid. // @@ -68,16 +83,16 @@ // TODO(https://crbug.com/657632): Update when optional integers supported. // // `debug_loss_report_url` The URL to request if this bid does not win the - // auction. It's requested if the auction runs to completion and this is not - // the winning bid, including the case that this worklet rejects this bid - // outright, giving it a score <= 0. This field has the debug prefix because - // it's part of an interim reporting API that will be replaced with - // standardized reporting APIs once available. It must be a valid HTTPS URL. + // auction. It's requested if the auction runs to completion and this is not + // the winning bid, including the case that this worklet rejects this bid + // outright, giving it a score <= 0. This field has the debug prefix because + // it's part of an interim reporting API that will be replaced with + // standardized reporting APIs once available. It must be a valid HTTPS URL. // // `debug_win_report_url` The URL to request if this bid wins the auction. - // This field has the debug prefix because it's part of an interim reporting - // API that will be replaced with standardized reporting APIs once available. - // It must be a valid HTTPS URL. + // This field has the debug prefix because it's part of an interim reporting + // API that will be replaced with standardized reporting APIs once available. + // It must be a valid HTTPS URL. // // `errors` are various error messages to be used for debugging. These are too // sensitive for the renderers to see. `errors` should not be assumed to be @@ -87,6 +102,7 @@ double bid, blink.mojom.AuctionAdConfigNonSharedParams auction_ad_config_non_shared_params, + ComponentAuctionOtherSeller? browser_signals_other_seller, url.mojom.Origin browser_signal_interest_group_owner, url.mojom.Url browser_signal_render_url, array<url.mojom.Url> browser_signal_ad_component_render_urls,
diff --git a/content/services/auction_worklet/seller_worklet.cc b/content/services/auction_worklet/seller_worklet.cc index d414d43..767bf3220 100644 --- a/content/services/auction_worklet/seller_worklet.cc +++ b/content/services/auction_worklet/seller_worklet.cc
@@ -157,6 +157,25 @@ return true; } +// Adds the top-level/component seller origin from +// `browser_signals_other_seller` to `browser_signals_dict`. Does nothing if +// `browser_signals_other_seller` is null. Returns false on error. +bool AddOtherSeller( + mojom::ComponentAuctionOtherSeller* browser_signals_other_seller, + gin::Dictionary& browser_signals_dict) { + if (!browser_signals_other_seller) + return true; + if (browser_signals_other_seller->is_top_level_seller()) { + return browser_signals_dict.Set( + "topLevelSeller", + browser_signals_other_seller->get_top_level_seller().Serialize()); + } + DCHECK(browser_signals_other_seller->is_component_seller()); + return browser_signals_dict.Set( + "componentSeller", + browser_signals_other_seller->get_component_seller().Serialize()); +} + } // namespace SellerWorklet::SellerWorklet( @@ -210,6 +229,7 @@ double bid, blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params, + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller, const url::Origin& browser_signal_interest_group_owner, const GURL& browser_signal_render_url, const std::vector<GURL>& browser_signal_ad_components, @@ -225,6 +245,8 @@ score_ad_task->bid = bid; score_ad_task->auction_ad_config_non_shared_params = std::move(auction_ad_config_non_shared_params); + score_ad_task->browser_signals_other_seller = + std::move(browser_signals_other_seller); score_ad_task->browser_signal_interest_group_owner = browser_signal_interest_group_owner; score_ad_task->browser_signal_render_url = browser_signal_render_url; @@ -335,6 +357,7 @@ blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params, scoped_refptr<TrustedSignals::Result> trusted_scoring_signals, + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller, const url::Origin& browser_signal_interest_group_owner, const GURL& browser_signal_render_url, const std::vector<std::string>& browser_signal_ad_components, @@ -394,6 +417,8 @@ gin::Dictionary browser_signals_dict(isolate, browser_signals); if (!browser_signals_dict.Set("topWindowHostname", top_window_origin_.host()) || + !AddOtherSeller(browser_signals_other_seller.get(), + browser_signals_dict) || !browser_signals_dict.Set( "interestGroupOwner", browser_signal_interest_group_owner.Serialize()) || @@ -689,6 +714,7 @@ task->ad_metadata_json, task->bid, std::move(task->auction_ad_config_non_shared_params), std::move(task->trusted_scoring_signals_result), + std::move(task->browser_signals_other_seller), std::move(task->browser_signal_interest_group_owner), std::move(task->browser_signal_render_url), std::move(task->browser_signal_ad_components),
diff --git a/content/services/auction_worklet/seller_worklet.h b/content/services/auction_worklet/seller_worklet.h index 3cb85be..6adb7ea0 100644 --- a/content/services/auction_worklet/seller_worklet.h +++ b/content/services/auction_worklet/seller_worklet.h
@@ -74,16 +74,18 @@ int context_group_id_for_testing() const; // mojom::SellerWorklet implementation: - void ScoreAd(const std::string& ad_metadata_json, - double bid, - blink::mojom::AuctionAdConfigNonSharedParamsPtr - auction_ad_config_non_shared_params, - const url::Origin& browser_signal_interest_group_owner, - const GURL& browser_signal_render_url, - const std::vector<GURL>& browser_signal_ad_components, - uint32_t browser_signal_bidding_duration_msecs, - const absl::optional<base::TimeDelta> seller_timeout, - ScoreAdCallback callback) override; + void ScoreAd( + const std::string& ad_metadata_json, + double bid, + blink::mojom::AuctionAdConfigNonSharedParamsPtr + auction_ad_config_non_shared_params, + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller, + const url::Origin& browser_signal_interest_group_owner, + const GURL& browser_signal_render_url, + const std::vector<GURL>& browser_signal_ad_components, + uint32_t browser_signal_bidding_duration_msecs, + const absl::optional<base::TimeDelta> seller_timeout, + ScoreAdCallback callback) override; void SendPendingSignalsRequests() override; void ReportResult(blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params, @@ -112,6 +114,7 @@ double bid; blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params; + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller; url::Origin browser_signal_interest_group_owner; GURL browser_signal_render_url; // While these are URLs, it's more concenient to store these as strings @@ -183,17 +186,19 @@ void SetWorkletScript(WorkletLoader::Result worklet_script); - void ScoreAd(const std::string& ad_metadata_json, - double bid, - blink::mojom::AuctionAdConfigNonSharedParamsPtr - auction_ad_config_non_shared_params, - scoped_refptr<TrustedSignals::Result> trusted_scoring_signals, - const url::Origin& browser_signal_interest_group_owner, - const GURL& browser_signal_render_url, - const std::vector<std::string>& browser_signal_ad_components, - uint32_t browser_signal_bidding_duration_msecs, - const absl::optional<base::TimeDelta> seller_timeout, - ScoreAdCallbackInternal callback); + void ScoreAd( + const std::string& ad_metadata_json, + double bid, + blink::mojom::AuctionAdConfigNonSharedParamsPtr + auction_ad_config_non_shared_params, + scoped_refptr<TrustedSignals::Result> trusted_scoring_signals, + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller, + const url::Origin& browser_signal_interest_group_owner, + const GURL& browser_signal_render_url, + const std::vector<std::string>& browser_signal_ad_components, + uint32_t browser_signal_bidding_duration_msecs, + const absl::optional<base::TimeDelta> seller_timeout, + ScoreAdCallbackInternal callback); void ReportResult(blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params,
diff --git a/content/services/auction_worklet/seller_worklet_unittest.cc b/content/services/auction_worklet/seller_worklet_unittest.cc index fe12c87..9b15f7f 100644 --- a/content/services/auction_worklet/seller_worklet_unittest.cc +++ b/content/services/auction_worklet/seller_worklet_unittest.cc
@@ -140,6 +140,7 @@ blink::mojom::AuctionAdConfigNonSharedParams::New(); top_window_origin_ = url::Origin::Create(GURL("https://window.test/")); + browser_signals_other_seller_.reset(); browser_signal_interest_group_owner_ = url::Origin::Create(GURL("https://interest.group.owner.test/")); browser_signal_render_url_ = GURL("https://render.url.test/"); @@ -231,6 +232,7 @@ base::OnceClosure done_closure) { seller_worklet->ScoreAd( ad_metadata_, bid_, auction_ad_config_non_shared_params_.Clone(), + browser_signals_other_seller_.Clone(), browser_signal_interest_group_owner_, browser_signal_render_url_, browser_signal_ad_components_, browser_signal_bidding_duration_msecs_, seller_timeout_, @@ -264,6 +266,7 @@ mojom::SellerWorklet* seller_worklet) { seller_worklet->ScoreAd( ad_metadata_, bid_, auction_ad_config_non_shared_params_.Clone(), + browser_signals_other_seller_.Clone(), browser_signal_interest_group_owner_, browser_signal_render_url_, browser_signal_ad_components_, browser_signal_bidding_duration_msecs_, seller_timeout_, @@ -482,6 +485,7 @@ blink::mojom::AuctionAdConfigNonSharedParamsPtr auction_ad_config_non_shared_params_; url::Origin top_window_origin_; + mojom::ComponentAuctionOtherSellerPtr browser_signals_other_seller_; url::Origin browser_signal_interest_group_owner_; GURL browser_signal_render_url_; std::vector<GURL> browser_signal_ad_components_; @@ -594,6 +598,44 @@ R"(browserSignals.topWindowHostname == "[::1]" ? 3 : 0)", 3); } +TEST_F(SellerWorkletTest, ScoreAdTopLevelSeller) { + browser_signals_other_seller_.reset(); + RunScoreAdWithReturnValueExpectingResult( + R"("topLevelSeller" in browserSignals ? 0 : 1)", 1); + + browser_signals_other_seller_ = + mojom::ComponentAuctionOtherSeller::NewTopLevelSeller( + url::Origin::Create(GURL("https://top.seller.test"))); + RunScoreAdWithReturnValueExpectingResult( + R"(browserSignals.topLevelSeller === "https://top.seller.test" ? 2 : 0)", + 2); + + browser_signals_other_seller_ = + mojom::ComponentAuctionOtherSeller::NewComponentSeller( + url::Origin::Create(GURL("https://component.test"))); + RunScoreAdWithReturnValueExpectingResult( + R"("topLevelSeller" in browserSignals ? 0 : 3)", 3); +} + +TEST_F(SellerWorkletTest, ScoreAdComponentSeller) { + browser_signals_other_seller_.reset(); + RunScoreAdWithReturnValueExpectingResult( + R"("componentSeller" in browserSignals ? 0 : 1)", 1); + + browser_signals_other_seller_ = + mojom::ComponentAuctionOtherSeller::NewTopLevelSeller( + url::Origin::Create(GURL("https://top.seller.test"))); + RunScoreAdWithReturnValueExpectingResult( + R"("componentSeller" in browserSignals ? 0 : 2)", 2); + + browser_signals_other_seller_ = + mojom::ComponentAuctionOtherSeller::NewComponentSeller( + url::Origin::Create(GURL("https://component.test"))); + RunScoreAdWithReturnValueExpectingResult( + R"(browserSignals.componentSeller === "https://component.test" ? 3 : 0)", + 3); +} + TEST_F(SellerWorkletTest, ScoreAdInterestGroupOwner) { browser_signal_interest_group_owner_ = url::Origin::Create(GURL("https://foo.test/")); @@ -1461,6 +1503,7 @@ base::RunLoop run_loop; seller_worklet->ScoreAd( ad_metadata_, bid_, auction_ad_config_non_shared_params_.Clone(), + browser_signals_other_seller_.Clone(), browser_signal_interest_group_owner_, browser_signal_render_url_, browser_signal_ad_components_, browser_signal_bidding_duration_msecs_, seller_timeout_, @@ -1508,6 +1551,7 @@ base::WaitableEvent* event_handle = WedgeV8Thread(v8_helper_.get()); seller_worklet->ScoreAd( ad_metadata_, bid_, auction_ad_config_non_shared_params_.Clone(), + browser_signals_other_seller_.Clone(), browser_signal_interest_group_owner_, browser_signal_render_url_, browser_signal_ad_components_, browser_signal_bidding_duration_msecs_, seller_timeout_, @@ -2283,6 +2327,7 @@ base::RunLoop run_loop; seller_worklet->ScoreAd( ad_metadata_, i + 1, auction_ad_config_non_shared_params_.Clone(), + browser_signals_other_seller_.Clone(), browser_signal_interest_group_owner_, browser_signal_render_url_, browser_signal_ad_components_, browser_signal_bidding_duration_msecs_, seller_timeout_,
diff --git a/content/test/data/accessibility/event/reparent-element-with-active-descendant-expected-auralinux.txt b/content/test/data/accessibility/event/reparent-element-with-active-descendant-expected-auralinux.txt index 4ea971c4..e817081 100644 --- a/content/test/data/accessibility/event/reparent-element-with-active-descendant-expected-auralinux.txt +++ b/content/test/data/accessibility/event/reparent-element-with-active-descendant-expected-auralinux.txt
@@ -11,13 +11,8 @@ PARENT-CHANGED PARENT:(role=ROLE_PANEL name='(null)') role=ROLE_MENU_ITEM name='About' ENABLED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE PARENT-CHANGED PARENT:(role=ROLE_PANEL name='(null)') role=ROLE_MENU_ITEM name='File' ENABLED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE,HAS-POPUP STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT === Start Continuation === +FOCUS-EVENT:FALSE role=ROLE_MENU_ITEM name='Open...' ENABLED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE FOCUS-EVENT:TRUE role=ROLE_MENU_ITEM name='Quit' ENABLED,FOCUSABLE,FOCUSED,SENSITIVE,SHOWING,VISIBLE -STATE-CHANGE:FOCUSED:TRUE role=ROLE_MENU_ITEM name='Quit' ENABLED,FOCUSABLE,FOCUSED,SENSITIVE,SHOWING,VISIBLE +STATE-CHANGE:FOCUSED:FALSE role=ROLE_MENU_ITEM name='Open...' ENABLED,FOCUSABLE,SENSITIVE,SHOWING,VISIBLE +STATE-CHANGE:FOCUSED:TRUE role=ROLE_MENU_ITEM name='Quit' ENABLED,FOCUSABLE,FOCUSED,SENSITIVE,SHOWING,VISIBLE \ No newline at end of file
diff --git a/content/test/data/accessibility/event/subtree-reparented-via-aria-owns-expected-auralinux.txt b/content/test/data/accessibility/event/subtree-reparented-via-aria-owns-expected-auralinux.txt index 09f5508..da14918f 100644 --- a/content/test/data/accessibility/event/subtree-reparented-via-aria-owns-expected-auralinux.txt +++ b/content/test/data/accessibility/event/subtree-reparented-via-aria-owns-expected-auralinux.txt
@@ -1,3 +1 @@ -PARENT-CHANGED PARENT:(role=ROLE_PANEL name='(null)') role=ROLE_LANDMARK name='(null)' ENABLED,SENSITIVE,SHOWING,VISIBLE -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT -STATE-CHANGE:DEFUNCT:TRUE role=ROLE_INVALID name='(null)' DEFUNCT +PARENT-CHANGED PARENT:(role=ROLE_PANEL name='(null)') role=ROLE_LANDMARK name='(null)' ENABLED,SENSITIVE,SHOWING,VISIBLE \ No newline at end of file
diff --git a/content/test/data/accessibility/mac/attributes/ax-title-expected.txt b/content/test/data/accessibility/mac/attributes/ax-title-expected.txt new file mode 100644 index 0000000..8849ed3 --- /dev/null +++ b/content/test/data/accessibility/mac/attributes/ax-title-expected.txt
@@ -0,0 +1,2 @@ +button.accessibilityAttributeNames.has(AXTitle)='yes' +button.accessibilityAttributeValue(AXTitle)='Press Me'
diff --git a/content/test/data/accessibility/mac/attributes/ax-title-ui-element-expected.txt b/content/test/data/accessibility/mac/attributes/ax-title-ui-element-expected.txt new file mode 100644 index 0000000..cd10dc7 --- /dev/null +++ b/content/test/data/accessibility/mac/attributes/ax-title-ui-element-expected.txt
@@ -0,0 +1,2 @@ +control.accessibilityAttributeNames.has(AXTitleUIElement)='yes' +control.accessibilityAttributeValue(AXTitleUIElement)=:4
diff --git a/content/test/data/accessibility/mac/attributes/ax-title-ui-element.html b/content/test/data/accessibility/mac/attributes/ax-title-ui-element.html new file mode 100644 index 0000000..bbae9c4 --- /dev/null +++ b/content/test/data/accessibility/mac/attributes/ax-title-ui-element.html
@@ -0,0 +1,8 @@ +<!-- +@SCRIPT: + control.accessibilityAttributeNames.has(AXTitleUIElement) + control.accessibilityAttributeValue(AXTitleUIElement) +--> +<!DOCTYPE html> +<input id="control" aria-labelledby="button_labelled_by_element"> +<label id="button_labelled_by_element" aria-label="#1"></label>
diff --git a/content/test/data/accessibility/mac/attributes/ax-title.html b/content/test/data/accessibility/mac/attributes/ax-title.html new file mode 100644 index 0000000..f05a43b --- /dev/null +++ b/content/test/data/accessibility/mac/attributes/ax-title.html
@@ -0,0 +1,7 @@ +<!-- +@SCRIPT: + button.accessibilityAttributeNames.has(AXTitle) + button.accessibilityAttributeValue(AXTitle) +--> +<!DOCTYPE html> +<button id="button">Press Me</button>
diff --git a/content/test/data/accessibility/mac/methods/accessibility-title-ui-element-expected.txt b/content/test/data/accessibility/mac/methods/accessibility-title-ui-element-expected.txt new file mode 100644 index 0000000..686d1ee --- /dev/null +++ b/content/test/data/accessibility/mac/methods/accessibility-title-ui-element-expected.txt
@@ -0,0 +1 @@ +control.accessibilityTitleUIElement=:4
diff --git a/content/test/data/accessibility/mac/methods/accessibility-title-ui-element.html b/content/test/data/accessibility/mac/methods/accessibility-title-ui-element.html new file mode 100644 index 0000000..912da6b --- /dev/null +++ b/content/test/data/accessibility/mac/methods/accessibility-title-ui-element.html
@@ -0,0 +1,7 @@ +<!-- +@SCRIPT: + control.accessibilityTitleUIElement +--> +<!DOCTYPE html> +<input id="control" aria-labelledby="button_labelled_by_element"> +<label id="button_labelled_by_element" aria-label="#1"></label>
diff --git a/content/test/data/interest_group/bidding_argument_validator.js b/content/test/data/interest_group/bidding_argument_validator.js index 0a643e03..9f97f51 100644 --- a/content/test/data/interest_group/bidding_argument_validator.js +++ b/content/test/data/interest_group/bidding_argument_validator.js
@@ -82,13 +82,16 @@ } function validateBrowserSignals(browserSignals) { - if (Object.keys(browserSignals).length !== 5) + if (Object.keys(browserSignals).length !== 5) { throw 'Wrong number of browser signals fields ' + JSON.stringify(browserSignals); + } if (browserSignals.topWindowHostname !== 'c.test') throw 'Wrong topWindowHostname ' + browserSignals.topWindowHostname; if (!browserSignals.seller.startsWith('https://b.test')) throw 'Wrong seller ' + browserSignals.seller; + if ('topLevelSeller' in browserSignals) + throw 'Wrong topLevelSeller ' + browserSignals.topLevelSeller; if (browserSignals.joinCount !== 1) throw 'Wrong joinCount ' + browserSignals.joinCount; if (browserSignals.bidCount !== 0)
diff --git a/content/test/data/interest_group/component_auction_bidding_argument_validator.js b/content/test/data/interest_group/component_auction_bidding_argument_validator.js index f7c54c2..b4e9db7 100644 --- a/content/test/data/interest_group/component_auction_bidding_argument_validator.js +++ b/content/test/data/interest_group/component_auction_bidding_argument_validator.js
@@ -97,9 +97,11 @@ throw 'Wrong topWindowHostname ' + browserSignals.topWindowHostname; if (!browserSignals.seller.startsWith('https://d.test')) throw 'Wrong seller ' + browserSignals.seller; + if (!browserSignals.topLevelSeller.startsWith('https://b.test')) + throw 'Wrong topLevelSeller ' + browserSignals.topLevelSeller; if (isGenerateBid) { - if (Object.keys(browserSignals).length !== 5) { + if (Object.keys(browserSignals).length !== 6) { throw 'Wrong number of browser signals fields ' + JSON.stringify(browserSignals); } @@ -110,7 +112,7 @@ if (browserSignals.prevWins.length !== 0) throw 'Wrong prevWins ' + JSON.stringify(browserSignals.prevWins); } else { - if (Object.keys(browserSignals).length !== 6) { + if (Object.keys(browserSignals).length !== 7) { throw 'Wrong number of browser signals fields ' + JSON.stringify(browserSignals); }
diff --git a/content/test/data/interest_group/component_auction_component_decision_argument_validator.js b/content/test/data/interest_group/component_auction_component_decision_argument_validator.js index 7e02168c..4e4c18e 100644 --- a/content/test/data/interest_group/component_auction_component_decision_argument_validator.js +++ b/content/test/data/interest_group/component_auction_component_decision_argument_validator.js
@@ -91,10 +91,14 @@ // Fields that vary by method. if (isScoreAd) { - if (Object.keys(browserSignals).length !== 6) { + if (Object.keys(browserSignals).length !== 7) { throw 'Wrong number of browser signals fields ' + JSON.stringify(browserSignals); } + if (!browserSignals.topLevelSeller.startsWith('https://b.test')) + throw 'Wrong topLevelSeller ' + browserSignals.topLevelSeller; + if ('componentSeller' in browserSignals) + throw 'Wrong componentSeller ' + browserSignals.componentSeller; const adComponentsJson = JSON.stringify(browserSignals.adComponents); if (adComponentsJson !== '["https://example.com/render-component"]') throw 'Wrong adComponents ' + adComponentsJson;
diff --git a/content/test/data/interest_group/component_auction_top_level_decision_argument_validator.js b/content/test/data/interest_group/component_auction_top_level_decision_argument_validator.js index 2bef3bd..3921175 100644 --- a/content/test/data/interest_group/component_auction_top_level_decision_argument_validator.js +++ b/content/test/data/interest_group/component_auction_top_level_decision_argument_validator.js
@@ -95,10 +95,14 @@ // Fields that vary by method. if (isScoreAd) { - if (Object.keys(browserSignals).length !== 6) { + if (Object.keys(browserSignals).length !== 7) { throw 'Wrong number of browser signals fields ' + JSON.stringify(browserSignals); } + if ('topLeverSeller' in browserSignals) + throw 'Wrong topLeverSeller ' + browserSignals.topLeverSeller; + if (!browserSignals.componentSeller.startsWith('https://d.test')) + throw 'Wrong componentSeller ' + browserSignals.componentSeller; const adComponentsJson = JSON.stringify(browserSignals.adComponents); if (adComponentsJson !== '["https://example.com/render-component"]') throw 'Wrong adComponents ' + adComponentsJson;
diff --git a/content/test/data/interest_group/decision_argument_validator.js b/content/test/data/interest_group/decision_argument_validator.js index c1205b25..bf09070 100644 --- a/content/test/data/interest_group/decision_argument_validator.js +++ b/content/test/data/interest_group/decision_argument_validator.js
@@ -79,6 +79,10 @@ function validateBrowserSignals(browserSignals) { if (browserSignals.topWindowHostname !== 'c.test') throw 'Wrong topWindowHostname ' + browserSignals.topWindowHostname; + if ('topLevelSeller' in browserSignals) + throw 'Wrong topLevelSeller ' + browserSignals.topLevelSeller; + if ("componentSeller" in browserSignals) + throw 'Wrong componentSeller ' + browserSignals.componentSeller; if (!browserSignals.interestGroupOwner.startsWith('https://a.test')) throw 'Wrong interestGroupOwner ' + browserSignals.interestGroupOwner; if (browserSignals.renderUrl !== "https://example.com/render")
diff --git a/docs/testing/writing_js_unit_tests.md b/docs/testing/writing_js_unit_tests.md index 68e5346..d0ae2c20 100644 --- a/docs/testing/writing_js_unit_tests.md +++ b/docs/testing/writing_js_unit_tests.md
@@ -162,12 +162,6 @@ get browsePreload() { return DUMMY_URL; } - - // No need to run these checks unless you are testing an actual user interface. - /** @override */ - get runAccessibilityChecks() { - return false; - } } ```
diff --git a/gpu/command_buffer/build_cmd_buffer_lib.py b/gpu/command_buffer/build_cmd_buffer_lib.py index b3f285f..8a727de 100644 --- a/gpu/command_buffer/build_cmd_buffer_lib.py +++ b/gpu/command_buffer/build_cmd_buffer_lib.py
@@ -2245,10 +2245,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = k%(types)sStartId; expected.data[1] = k%(types)sStartId + 1; - gl_->%(name)s(base::size(ids), &ids[0]); + gl_->%(name)s(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(k%(types)sStartId, ids[0]); EXPECT_EQ(k%(types)sStartId + 1, ids[1]); @@ -2394,17 +2394,17 @@ f.write(" cmds::%s& cmd = *GetBufferAs<cmds::%s>();\n" % (func.name, func.name)) f.write(" void* next_cmd = cmd.Set(\n") - f.write(" &cmd, static_cast<GLsizei>(base::size(ids)), ids);\n") + f.write(" &cmd, static_cast<GLsizei>(std::size(ids)), ids);\n") f.write(" EXPECT_EQ(static_cast<uint32_t>(cmds::%s::kCmdId),\n" % func.name) f.write(" cmd.header.command);\n") f.write(" EXPECT_EQ(sizeof(cmd) +\n") f.write(" RoundSizeToMultipleOfEntries(cmd.n * 4u),\n") f.write(" cmd.header.size * 4u);\n") - f.write(" EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n);\n"); + f.write(" EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n);\n"); f.write(" CheckBytesWrittenMatchesExpectedSize(\n") f.write(" next_cmd, sizeof(cmd) +\n") - f.write(" RoundSizeToMultipleOfEntries(base::size(ids) * 4u));\n") + f.write(" RoundSizeToMultipleOfEntries(std::size(ids) * 4u));\n") f.write(" EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd),\n") f.write(" sizeof(ids)));\n") f.write("}\n") @@ -2623,10 +2623,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = k%(types)sStartId; expected.data[1] = k%(types)sStartId + 1; - gl_->%(name)s(base::size(ids), &ids[0]); + gl_->%(name)s(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } """ @@ -2830,17 +2830,17 @@ f.write(" cmds::%s& cmd = *GetBufferAs<cmds::%s>();\n" % (func.name, func.name)) f.write(" void* next_cmd = cmd.Set(\n") - f.write(" &cmd, static_cast<GLsizei>(base::size(ids)), ids);\n") + f.write(" &cmd, static_cast<GLsizei>(std::size(ids)), ids);\n") f.write(" EXPECT_EQ(static_cast<uint32_t>(cmds::%s::kCmdId),\n" % func.name) f.write(" cmd.header.command);\n") f.write(" EXPECT_EQ(sizeof(cmd) +\n") f.write(" RoundSizeToMultipleOfEntries(cmd.n * 4u),\n") f.write(" cmd.header.size * 4u);\n") - f.write(" EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n);\n"); + f.write(" EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n);\n"); f.write(" CheckBytesWrittenMatchesExpectedSize(\n") f.write(" next_cmd, sizeof(cmd) +\n") - f.write(" RoundSizeToMultipleOfEntries(base::size(ids) * 4u));\n") + f.write(" RoundSizeToMultipleOfEntries(std::size(ids) * 4u));\n") f.write(" EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd),\n") f.write(" sizeof(ids)));\n") f.write("}\n") @@ -4139,14 +4139,14 @@ const char kSource0[] = "hello"; const char* kSource[] = { kSource0 }; const char kValidStrEnd = 0; - const GLsizei kCount = static_cast<GLsizei>(base::size(kSource)); + const GLsizei kCount = static_cast<GLsizei>(std::size(kSource)); const GLsizei kTests[] = { kCount + 1, 0, std::numeric_limits<GLsizei>::max(), -1, }; - for (size_t ii = 0; ii < base::size(kTests); ++ii) { + for (size_t ii = 0; ii < std::size(kTests); ++ii) { SetBucketAsCStrings(kBucketId, 1, kSource, kTests[ii], kValidStrEnd); cmds::%(name)s cmd; cmd.Init(%(cmd_args)s); @@ -7270,7 +7270,7 @@ continue if named_type.GetValidValues(): code = """%(pre)s%(name)s( - valid_%(name)s_table, base::size(valid_%(name)s_table))""" + valid_%(name)s_table, std::size(valid_%(name)s_table))""" else: code = "%(pre)s%(name)s()" f.write(code % { @@ -7293,14 +7293,14 @@ continue if named_type.GetDeprecatedValuesES3(): code = """ %(name)s.RemoveValues( - deprecated_%(name)s_table_es3, base::size(deprecated_%(name)s_table_es3)); + deprecated_%(name)s_table_es3, std::size(deprecated_%(name)s_table_es3)); """ f.write(code % { 'name': ToUnderscore(name), }) if named_type.GetValidValuesES3(): code = """ %(name)s.AddValues( - valid_%(name)s_table_es3, base::size(valid_%(name)s_table_es3)); + valid_%(name)s_table_es3, std::size(valid_%(name)s_table_es3)); """ f.write(code % { 'name': ToUnderscore(name), @@ -7386,7 +7386,7 @@ f.write(' { %s, "%s" },\n' % (value, value)) f.write(""" }; return %sUtil::GetQualifiedEnumString( - string_table, base::size(string_table), value); + string_table, std::size(string_table), value); } """ % _prefix)
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc index 12b24451..c5e660a 100644 --- a/gpu/command_buffer/client/gles2_implementation.cc +++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -25,7 +25,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/numerics/ostream_operators.h" #include "base/numerics/safe_math.h" @@ -295,7 +294,7 @@ if (support_client_side_arrays_) { GetIdHandler(SharedIdNamespaces::kBuffers) - ->MakeIds(this, kClientSideArrayId, base::size(reserved_ids_), + ->MakeIds(this, kClientSideArrayId, std::size(reserved_ids_), &reserved_ids_[0]); } @@ -329,7 +328,7 @@ // GLES2Implementation::Initialize() could fail before allocating // reserved_ids_, so we need delete them carefully. if (support_client_side_arrays_ && reserved_ids_[0]) { - DeleteBuffers(base::size(reserved_ids_), &reserved_ids_[0]); + DeleteBuffers(std::size(reserved_ids_), &reserved_ids_[0]); } // Release remaining BufferRange mem; This is when a MapBufferRange() is
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc index 1d598a2..c182abc 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest.cc +++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -10,7 +10,6 @@ #include <GLES2/gl2ext.h> #include <GLES2/gl2extchromium.h> #include <GLES3/gl3.h> - #include <stddef.h> #include <stdint.h> @@ -18,7 +17,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "gpu/command_buffer/client/client_test_helper.h" #include "gpu/command_buffer/client/gles2_cmd_helper.h" @@ -852,9 +850,9 @@ const GLint kFirst = 1; const GLsizei kCount = 2; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = - base::size(verts) * kNumComponents2 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents2 * sizeof(verts[0][0]); const GLsizei kEmuOffset1 = 0; const GLsizei kEmuOffset2 = kSize1; const GLsizei kTotalSize = kSize1 + kSize2; @@ -920,7 +918,7 @@ const GLsizei kCount = 2; const GLuint kDivisor = 1; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = 1 * kNumComponents2 * sizeof(verts[0][0]); const GLsizei kEmuOffset1 = 0; @@ -998,9 +996,9 @@ const GLsizei kClientStride = sizeof(verts[0]); const GLsizei kCount = 2; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = - base::size(verts) * kNumComponents2 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents2 * sizeof(verts[0][0]); const GLsizei kEmuOffset1 = 0; const GLsizei kEmuOffset2 = kSize1; const GLsizei kTotalSize = kSize1 + kSize2; @@ -1082,9 +1080,9 @@ const GLsizei kClientStride = sizeof(verts[0]); const GLsizei kCount = 2; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = - base::size(verts) * kNumComponents2 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents2 * sizeof(verts[0][0]); const GLsizei kEmuOffset1 = 0; const GLsizei kEmuOffset2 = kSize1; const GLsizei kTotalSize = kSize1 + kSize2; @@ -1191,9 +1189,9 @@ const GLsizei kClientStride = sizeof(verts[0]); const GLsizei kCount = 2; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = - base::size(verts) * kNumComponents2 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents2 * sizeof(verts[0][0]); const GLsizei kEmuOffset1 = 0; const GLsizei kEmuOffset2 = kSize1; const GLsizei kTotalSize = kSize1 + kSize2; @@ -1280,7 +1278,7 @@ const GLsizei kClientStride = sizeof(verts[0]); const GLsizei kCount = 2; const GLsizei kSize1 = - base::size(verts) * kNumComponents1 * sizeof(verts[0][0]); + std::size(verts) * kNumComponents1 * sizeof(verts[0][0]); const GLsizei kSize2 = 1 * kNumComponents2 * sizeof(verts[0][0]); const GLuint kDivisor = 1; @@ -2372,7 +2370,7 @@ } for (int sub = 0; sub < 2; ++sub) { - for (size_t a = 0; a < base::size(unpack_alignments); ++a) { + for (size_t a = 0; a < std::size(unpack_alignments); ++a) { const void* commands = GetPut(); GLint alignment = unpack_alignments[a]; @@ -2513,7 +2511,7 @@ } for (int sub = 0; sub < 2; ++sub) { - for (size_t a = 0; a < base::size(unpack_alignments); ++a) { + for (size_t a = 0; a < std::size(unpack_alignments); ++a) { const void* commands = GetPut(); GLint alignment = unpack_alignments[a]; @@ -2675,9 +2673,9 @@ // aux check. const GLenum kCompressedFormat = GL_ETC1_RGB8_OES; gl_->CompressedTexImage2D(kTarget, kLevel, kCompressedFormat, kWidth, kHeight, - kBorder, base::size(pixels), pixels); + kBorder, std::size(pixels), pixels); - // In the above, kCompressedFormat and base::size(pixels) are possibly wrong + // In the above, kCompressedFormat and std::size(pixels) are possibly wrong // values. First ensure that these do not cause failures at the client. If // this check ever fails, it probably means that client checks more than at // the time of writing of this test. In this case, more code needs to be @@ -2689,7 +2687,7 @@ // Changing border to invalid border should make the call fail at the client // checks. gl_->CompressedTexImage2D(kTarget, kLevel, kCompressedFormat, kWidth, kHeight, - kInvalidBorder, base::size(pixels), pixels); + kInvalidBorder, std::size(pixels), pixels); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_INVALID_VALUE, CheckError()); } @@ -3071,7 +3069,7 @@ ExpectedMemoryInfo mem2 = GetExpectedMemory(kUsableSize); Cmds expected; - expected.set_size.Init(GL_ARRAY_BUFFER, base::size(buf), 0, 0, + expected.set_size.Init(GL_ARRAY_BUFFER, std::size(buf), 0, 0, GL_DYNAMIC_DRAW); expected.copy_data1.Init( GL_ARRAY_BUFFER, 0, kUsableSize, mem1.id, mem1.offset); @@ -3079,7 +3077,7 @@ expected.copy_data2.Init( GL_ARRAY_BUFFER, kUsableSize, kUsableSize, mem2.id, mem2.offset); expected.set_token2.Init(GetNextToken()); - gl_->BufferData(GL_ARRAY_BUFFER, base::size(buf), buf, GL_DYNAMIC_DRAW); + gl_->BufferData(GL_ARRAY_BUFFER, std::size(buf), buf, GL_DYNAMIC_DRAW); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -3133,7 +3131,7 @@ }; Cmds expected; - for (size_t ii = 0; ii < base::size(kStates); ++ii) { + for (size_t ii = 0; ii < std::size(kStates); ++ii) { GLenum state = kStates[ii]; expected.enable_cmd.Init(state); GLboolean result = gl_->IsEnabled(state); @@ -3182,11 +3180,11 @@ GLuint data[2]; }; GenCmds expected_gen_cmds; - expected_gen_cmds.gen.Init(base::size(expected_ids), &expected_ids[0]); - GLuint ids[base::size(expected_ids)] = { + expected_gen_cmds.gen.Init(std::size(expected_ids), &expected_ids[0]); + GLuint ids[std::size(expected_ids)] = { 0, }; - gl_->GenQueriesEXT(base::size(expected_ids), &ids[0]); + gl_->GenQueriesEXT(std::size(expected_ids), &ids[0]); EXPECT_EQ(0, memcmp( &expected_gen_cmds, commands_, sizeof(expected_gen_cmds))); GLuint id1 = ids[0]; @@ -3372,11 +3370,11 @@ GLuint data[3]; }; GenCmds expected_gen_cmds; - expected_gen_cmds.gen.Init(base::size(expected_ids), &expected_ids[0]); - GLuint ids[base::size(expected_ids)] = { + expected_gen_cmds.gen.Init(std::size(expected_ids), &expected_ids[0]); + GLuint ids[std::size(expected_ids)] = { 0, }; - gl_->GenQueriesEXT(base::size(expected_ids), &ids[0]); + gl_->GenQueriesEXT(std::size(expected_ids), &ids[0]); EXPECT_EQ(0, memcmp( &expected_gen_cmds, commands_, sizeof(expected_gen_cmds))); GLuint id1 = ids[0]; @@ -3964,7 +3962,7 @@ EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(sync_token)) .WillOnce(Return(true)); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_NO_ERROR, CheckError()); @@ -4021,7 +4019,7 @@ .InSequence(sequence) .WillOnce(Return(true)); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()).InSequence(sequence); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_EQ(GL_NO_ERROR, CheckError()); EXPECT_TRUE(sync_token1.verified_flush()); @@ -4044,7 +4042,7 @@ // Ensure proper sequence of checking and validating. EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(_)).Times(0); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()).Times(0); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_NO_ERROR, CheckError());
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h index c7c3b16a..ea92758bb 100644 --- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -377,10 +377,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kBuffersStartId; expected.data[1] = kBuffersStartId + 1; - gl_->DeleteBuffers(base::size(ids), &ids[0]); + gl_->DeleteBuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -391,10 +391,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kFramebuffersStartId; expected.data[1] = kFramebuffersStartId + 1; - gl_->DeleteFramebuffers(base::size(ids), &ids[0]); + gl_->DeleteFramebuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -416,10 +416,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kRenderbuffersStartId; expected.data[1] = kRenderbuffersStartId + 1; - gl_->DeleteRenderbuffers(base::size(ids), &ids[0]); + gl_->DeleteRenderbuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -430,10 +430,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kSamplersStartId; expected.data[1] = kSamplersStartId + 1; - gl_->DeleteSamplers(base::size(ids), &ids[0]); + gl_->DeleteSamplers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -466,10 +466,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kTexturesStartId; expected.data[1] = kTexturesStartId + 1; - gl_->DeleteTextures(base::size(ids), &ids[0]); + gl_->DeleteTextures(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -480,10 +480,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kTransformFeedbacksStartId; expected.data[1] = kTransformFeedbacksStartId + 1; - gl_->DeleteTransformFeedbacks(base::size(ids), &ids[0]); + gl_->DeleteTransformFeedbacks(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -630,10 +630,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kBuffersStartId; expected.data[1] = kBuffersStartId + 1; - gl_->GenBuffers(base::size(ids), &ids[0]); + gl_->GenBuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kBuffersStartId, ids[0]); EXPECT_EQ(kBuffersStartId + 1, ids[1]); @@ -659,10 +659,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kFramebuffersStartId; expected.data[1] = kFramebuffersStartId + 1; - gl_->GenFramebuffers(base::size(ids), &ids[0]); + gl_->GenFramebuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kFramebuffersStartId, ids[0]); EXPECT_EQ(kFramebuffersStartId + 1, ids[1]); @@ -677,10 +677,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kRenderbuffersStartId; expected.data[1] = kRenderbuffersStartId + 1; - gl_->GenRenderbuffers(base::size(ids), &ids[0]); + gl_->GenRenderbuffers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kRenderbuffersStartId, ids[0]); EXPECT_EQ(kRenderbuffersStartId + 1, ids[1]); @@ -695,10 +695,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kSamplersStartId; expected.data[1] = kSamplersStartId + 1; - gl_->GenSamplers(base::size(ids), &ids[0]); + gl_->GenSamplers(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kSamplersStartId, ids[0]); EXPECT_EQ(kSamplersStartId + 1, ids[1]); @@ -713,10 +713,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kTexturesStartId; expected.data[1] = kTexturesStartId + 1; - gl_->GenTextures(base::size(ids), &ids[0]); + gl_->GenTextures(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kTexturesStartId, ids[0]); EXPECT_EQ(kTexturesStartId + 1, ids[1]); @@ -731,10 +731,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kTransformFeedbacksStartId; expected.data[1] = kTransformFeedbacksStartId + 1; - gl_->GenTransformFeedbacks(base::size(ids), &ids[0]); + gl_->GenTransformFeedbacks(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kTransformFeedbacksStartId, ids[0]); EXPECT_EQ(kTransformFeedbacksStartId + 1, ids[1]); @@ -2602,10 +2602,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kQueriesStartId; expected.data[1] = kQueriesStartId + 1; - gl_->GenQueriesEXT(base::size(ids), &ids[0]); + gl_->GenQueriesEXT(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kQueriesStartId, ids[0]); EXPECT_EQ(kQueriesStartId + 1, ids[1]); @@ -2618,10 +2618,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kQueriesStartId; expected.data[1] = kQueriesStartId + 1; - gl_->DeleteQueriesEXT(base::size(ids), &ids[0]); + gl_->DeleteQueriesEXT(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); } @@ -2667,10 +2667,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kVertexArraysStartId; expected.data[1] = kVertexArraysStartId + 1; - gl_->GenVertexArraysOES(base::size(ids), &ids[0]); + gl_->GenVertexArraysOES(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kVertexArraysStartId, ids[0]); EXPECT_EQ(kVertexArraysStartId + 1, ids[1]); @@ -2683,10 +2683,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kVertexArraysStartId; expected.data[1] = kVertexArraysStartId + 1; - gl_->DeleteVertexArraysOES(base::size(ids), &ids[0]); + gl_->DeleteVertexArraysOES(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); }
diff --git a/gpu/command_buffer/client/program_info_manager_unittest.cc b/gpu/command_buffer/client/program_info_manager_unittest.cc index 812615a..e46ba1e 100644 --- a/gpu/command_buffer/client/program_info_manager_unittest.cc +++ b/gpu/command_buffer/client/program_info_manager_unittest.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "gpu/command_buffer/client/program_info_manager.h" + #include <stddef.h> #include <stdint.h> #include <memory> -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" -#include "gpu/command_buffer/client/program_info_manager.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -102,8 +102,8 @@ data->uniform_loc0[0] = 1; data->uniform_loc1[0] = 2; data->uniform_loc1[1] = 3; - memcpy(data->uniform_name0, kName[0], base::size(data->uniform_name0)); - memcpy(data->uniform_name1, kName[1], base::size(data->uniform_name1)); + memcpy(data->uniform_name0, kName[0], std::size(data->uniform_name0)); + memcpy(data->uniform_name1, kName[1], std::size(data->uniform_name1)); } void SetupUniformBlocksData(UniformBlocksData* data) { @@ -117,23 +117,23 @@ data->entry[0].binding = 0; data->entry[0].data_size = 8; data->entry[0].name_offset = ComputeOffset(data, data->name0); - data->entry[0].name_length = base::size(data->name0); - data->entry[0].active_uniforms = base::size(data->indices0); + data->entry[0].name_length = std::size(data->name0); + data->entry[0].active_uniforms = std::size(data->indices0); data->entry[0].active_uniform_offset = ComputeOffset(data, data->indices0); data->entry[0].referenced_by_vertex_shader = static_cast<uint32_t>(true); data->entry[0].referenced_by_fragment_shader = static_cast<uint32_t>(false); data->entry[1].binding = 1; data->entry[1].data_size = 4; data->entry[1].name_offset = ComputeOffset(data, data->name1); - data->entry[1].name_length = base::size(data->name1); - data->entry[1].active_uniforms = base::size(data->indices1); + data->entry[1].name_length = std::size(data->name1); + data->entry[1].active_uniforms = std::size(data->indices1); data->entry[1].active_uniform_offset = ComputeOffset(data, data->indices1); data->entry[1].referenced_by_vertex_shader = static_cast<uint32_t>(false); data->entry[1].referenced_by_fragment_shader = static_cast<uint32_t>(true); - memcpy(data->name0, kName[0], base::size(data->name0)); + memcpy(data->name0, kName[0], std::size(data->name0)); data->indices0[0] = kIndices[0][0]; data->indices0[1] = kIndices[0][1]; - memcpy(data->name1, kName[1], base::size(data->name1)); + memcpy(data->name1, kName[1], std::size(data->name1)); data->indices1[0] = kIndices[1][0]; } @@ -160,13 +160,13 @@ data->entry[0].size = 1; data->entry[0].type = GL_FLOAT_VEC2; data->entry[0].name_offset = ComputeOffset(data, data->name0); - data->entry[0].name_length = base::size(data->name0); + data->entry[0].name_length = std::size(data->name0); data->entry[1].size = 2; data->entry[1].type = GL_FLOAT; data->entry[1].name_offset = ComputeOffset(data, data->name1); - data->entry[1].name_length = base::size(data->name1); - memcpy(data->name0, kName[0], base::size(data->name0)); - memcpy(data->name1, kName[1], base::size(data->name1)); + data->entry[1].name_length = std::size(data->name1); + memcpy(data->name0, kName[0], std::size(data->name0)); + memcpy(data->name1, kName[1], std::size(data->name1)); } std::unique_ptr<ProgramInfoManager> program_info_manager_;
diff --git a/gpu/command_buffer/client/query_tracker_unittest.cc b/gpu/command_buffer/client/query_tracker_unittest.cc index 2015578e..2606edac 100644 --- a/gpu/command_buffer/client/query_tracker_unittest.cc +++ b/gpu/command_buffer/client/query_tracker_unittest.cc
@@ -13,7 +13,6 @@ #include <memory> #include <vector> -#include "base/cxx17_backports.h" #include "gpu/command_buffer/client/client_test_helper.h" #include "gpu/command_buffer/client/gles2_cmd_helper.h" #include "gpu/command_buffer/client/mapped_memory.h" @@ -60,7 +59,7 @@ QuerySyncManager::QueryInfo infos[4]; memset(&infos, 0xBD, sizeof(infos)); - for (size_t ii = 0; ii < base::size(infos); ++ii) { + for (size_t ii = 0; ii < std::size(infos); ++ii) { EXPECT_TRUE(sync_manager_->Alloc(&infos[ii])); ASSERT_TRUE(infos[ii].sync != nullptr); EXPECT_EQ(0, infos[ii].sync->process_count); @@ -68,7 +67,7 @@ EXPECT_EQ(0, infos[ii].submit_count); } - for (size_t ii = 0; ii < base::size(infos); ++ii) { + for (size_t ii = 0; ii < std::size(infos); ++ii) { sync_manager_->Free(infos[ii]); } } @@ -77,7 +76,7 @@ QuerySyncManager::QueryInfo infos[4]; memset(&infos, 0xBD, sizeof(infos)); - for (size_t ii = 0; ii < base::size(infos); ++ii) { + for (size_t ii = 0; ii < std::size(infos); ++ii) { EXPECT_TRUE(sync_manager_->Alloc(&infos[ii])); } }
diff --git a/gpu/command_buffer/client/raster_implementation_unittest.cc b/gpu/command_buffer/client/raster_implementation_unittest.cc index 14f9ab9c..a3c3386 100644 --- a/gpu/command_buffer/client/raster_implementation_unittest.cc +++ b/gpu/command_buffer/client/raster_implementation_unittest.cc
@@ -8,7 +8,6 @@ #include <GLES2/gl2.h> #include <GLES2/gl2extchromium.h> - #include <stddef.h> #include <stdint.h> @@ -16,7 +15,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "cc/paint/raw_memory_transfer_cache_entry.h" @@ -398,11 +396,11 @@ GLuint data[2]; }; GenCmds expected_gen_cmds; - expected_gen_cmds.gen.Init(base::size(expected_ids), &expected_ids[0]); - GLuint ids[base::size(expected_ids)] = { + expected_gen_cmds.gen.Init(std::size(expected_ids), &expected_ids[0]); + GLuint ids[std::size(expected_ids)] = { 0, }; - gl_->GenQueriesEXT(base::size(expected_ids), &ids[0]); + gl_->GenQueriesEXT(std::size(expected_ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected_gen_cmds, commands_, sizeof(expected_gen_cmds))); GLuint id1 = ids[0]; @@ -574,7 +572,7 @@ EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(sync_token)) .WillOnce(Return(true)); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_NO_ERROR, CheckError()); @@ -631,7 +629,7 @@ .InSequence(sequence) .WillOnce(Return(true)); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()).InSequence(sequence); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_EQ(GL_NO_ERROR, CheckError()); EXPECT_TRUE(sync_token1.verified_flush()); @@ -654,7 +652,7 @@ // Ensure proper sequence of checking and validating. EXPECT_CALL(*gpu_control_, CanWaitUnverifiedSyncToken(_)).Times(0); EXPECT_CALL(*gpu_control_, EnsureWorkVisible()).Times(0); - gl_->VerifySyncTokensCHROMIUM(sync_token_datas, base::size(sync_token_datas)); + gl_->VerifySyncTokensCHROMIUM(sync_token_datas, std::size(sync_token_datas)); EXPECT_TRUE(NoCommandsWritten()); EXPECT_EQ(GL_NO_ERROR, CheckError());
diff --git a/gpu/command_buffer/client/raster_implementation_unittest_autogen.h b/gpu/command_buffer/client/raster_implementation_unittest_autogen.h index bd95a044..c5004a6 100644 --- a/gpu/command_buffer/client/raster_implementation_unittest_autogen.h +++ b/gpu/command_buffer/client/raster_implementation_unittest_autogen.h
@@ -33,10 +33,10 @@ GLuint data[2]; }; Cmds expected; - expected.gen.Init(base::size(ids), &ids[0]); + expected.gen.Init(std::size(ids), &ids[0]); expected.data[0] = kQueriesStartId; expected.data[1] = kQueriesStartId + 1; - gl_->GenQueriesEXT(base::size(ids), &ids[0]); + gl_->GenQueriesEXT(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); EXPECT_EQ(kQueriesStartId, ids[0]); EXPECT_EQ(kQueriesStartId + 1, ids[1]); @@ -49,10 +49,10 @@ GLuint data[2]; }; Cmds expected; - expected.del.Init(base::size(ids), &ids[0]); + expected.del.Init(std::size(ids), &ids[0]); expected.data[0] = kQueriesStartId; expected.data[1] = kQueriesStartId + 1; - gl_->DeleteQueriesEXT(base::size(ids), &ids[0]); + gl_->DeleteQueriesEXT(std::size(ids), &ids[0]); EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); }
diff --git a/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc b/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc index b536128..32c7e68 100644 --- a/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc +++ b/gpu/command_buffer/client/vertex_array_object_manager_unittest.cc
@@ -6,13 +6,11 @@ #include <GLES2/gl2ext.h> #include <GLES3/gl3.h> - #include <stddef.h> #include <stdint.h> #include <memory> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace gpu { @@ -79,9 +77,9 @@ const GLuint kElementArray = 789; bool changed = false; GLuint ids[2] = { 1, 3, }; - manager_->GenVertexArrays(base::size(ids), ids); + manager_->GenVertexArrays(std::size(ids), ids); // Bind buffers to attribs on 2 vaos. - for (size_t ii = 0; ii < base::size(ids); ++ii) { + for (size_t ii = 0; ii < std::size(ids); ++ii) { EXPECT_TRUE(manager_->BindVertexArray(ids[ii], &changed)); EXPECT_TRUE(manager_->SetAttribPointer( kBufferToUnbind, 0, 4, GL_FLOAT, false, 0, 0, GL_FALSE)); @@ -115,7 +113,7 @@ static const GLuint expected_element_array[] = { 0, kElementArray, }; - for (size_t ii = 0; ii < base::size(ids); ++ii) { + for (size_t ii = 0; ii < std::size(ids); ++ii) { EXPECT_TRUE(manager_->BindVertexArray(ids[ii], &changed)); for (size_t jj = 0; jj < 4; ++jj) { uint32_t param = 1; @@ -198,7 +196,7 @@ TEST_F(VertexArrayObjectManagerTest, BindElementArray) { bool changed = false; GLuint ids[2] = { 1, 3, }; - manager_->GenVertexArrays(base::size(ids), ids); + manager_->GenVertexArrays(std::size(ids), ids); // Check the default element array is 0. EXPECT_EQ(0u, manager_->bound_element_array_buffer()); @@ -238,7 +236,7 @@ EXPECT_FALSE(changed); GLuint ids[2] = { 1, 3, }; - manager_->GenVertexArrays(base::size(ids), ids); + manager_->GenVertexArrays(std::size(ids), ids); // Check Genned arrays succeed. EXPECT_TRUE(manager_->BindVertexArray(1, &changed)); EXPECT_TRUE(changed);
diff --git a/gpu/command_buffer/common/gles2_cmd_format.cc b/gpu/command_buffer/common/gles2_cmd_format.cc index b66cf96..cdad2e1 100644 --- a/gpu/command_buffer/common/gles2_cmd_format.cc +++ b/gpu/command_buffer/common/gles2_cmd_format.cc
@@ -8,11 +8,9 @@ // We explicitly do NOT include gles2_cmd_format.h here because client side // and service side have different requirements. -#include "gpu/command_buffer/common/cmd_buffer_common.h" - #include <stddef.h> -#include "base/cxx17_backports.h" +#include "gpu/command_buffer/common/cmd_buffer_common.h" namespace gpu { namespace gles2 { @@ -29,7 +27,7 @@ }; size_t index = static_cast<size_t>(id) - kFirstGLES2Command; - return (index < base::size(names)) ? names[index] : "*unknown-command*"; + return (index < std::size(names)) ? names[index] : "*unknown-command*"; } } // namespace gles2
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h index e32c97f..6f23f44b 100644 --- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -733,15 +733,15 @@ }; cmds::DeleteBuffersImmediate& cmd = *GetBufferAs<cmds::DeleteBuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteBuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -753,15 +753,15 @@ }; cmds::DeleteFramebuffersImmediate& cmd = *GetBufferAs<cmds::DeleteFramebuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteFramebuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -783,15 +783,15 @@ }; cmds::DeleteRenderbuffersImmediate& cmd = *GetBufferAs<cmds::DeleteRenderbuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteRenderbuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -803,15 +803,15 @@ }; cmds::DeleteSamplersImmediate& cmd = *GetBufferAs<cmds::DeleteSamplersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteSamplersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -843,15 +843,15 @@ }; cmds::DeleteTexturesImmediate& cmd = *GetBufferAs<cmds::DeleteTexturesImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteTexturesImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -863,16 +863,16 @@ }; cmds::DeleteTransformFeedbacksImmediate& cmd = *GetBufferAs<cmds::DeleteTransformFeedbacksImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ( static_cast<uint32_t>(cmds::DeleteTransformFeedbacksImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1076,15 +1076,15 @@ 34, }; cmds::GenBuffersImmediate& cmd = *GetBufferAs<cmds::GenBuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenBuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1106,15 +1106,15 @@ }; cmds::GenFramebuffersImmediate& cmd = *GetBufferAs<cmds::GenFramebuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenFramebuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1126,15 +1126,15 @@ }; cmds::GenRenderbuffersImmediate& cmd = *GetBufferAs<cmds::GenRenderbuffersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenRenderbuffersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1145,15 +1145,15 @@ 34, }; cmds::GenSamplersImmediate& cmd = *GetBufferAs<cmds::GenSamplersImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenSamplersImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1164,15 +1164,15 @@ 34, }; cmds::GenTexturesImmediate& cmd = *GetBufferAs<cmds::GenTexturesImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenTexturesImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -1184,15 +1184,15 @@ }; cmds::GenTransformFeedbacksImmediate& cmd = *GetBufferAs<cmds::GenTransformFeedbacksImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenTransformFeedbacksImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -3969,15 +3969,15 @@ }; cmds::GenQueriesEXTImmediate& cmd = *GetBufferAs<cmds::GenQueriesEXTImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenQueriesEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -3989,15 +3989,15 @@ }; cmds::DeleteQueriesEXTImmediate& cmd = *GetBufferAs<cmds::DeleteQueriesEXTImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteQueriesEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -4114,15 +4114,15 @@ }; cmds::GenVertexArraysOESImmediate& cmd = *GetBufferAs<cmds::GenVertexArraysOESImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenVertexArraysOESImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -4134,15 +4134,15 @@ }; cmds::DeleteVertexArraysOESImmediate& cmd = *GetBufferAs<cmds::DeleteVertexArraysOESImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteVertexArraysOESImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); }
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc index 6eb94e3..3791e03 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils.cc +++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -16,7 +16,6 @@ #include <sstream> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/notreached.h" #include "base/numerics/safe_math.h" @@ -1548,7 +1547,7 @@ { GL_NONE, "GL_NONE" }, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBool(uint32_t value) {
diff --git a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h index 292165f..2d98e4f2 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h +++ b/gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h
@@ -6790,6 +6790,10 @@ "GL_FRAMEBUFFER_FETCH_NONCOHERENT_QCOM", }, { + 0x96BA, + "GL_RGBX8_ANGLE", + }, + { 0xC0, "GL_SHARED_EDGE_NV", }, @@ -6884,7 +6888,7 @@ {GL_DEPTH_STENCIL_ATTACHMENT, "GL_DEPTH_STENCIL_ATTACHMENT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringAttachmentQuery(uint32_t value) { @@ -6898,7 +6902,7 @@ {GL_STENCIL_EXT, "GL_STENCIL_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBackbufferAttachment(uint32_t value) { @@ -6908,7 +6912,7 @@ {GL_STENCIL_EXT, "GL_STENCIL_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBlitFilter(uint32_t value) { @@ -6917,7 +6921,7 @@ {GL_LINEAR, "GL_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferMode(uint32_t value) { @@ -6926,7 +6930,7 @@ {GL_SEPARATE_ATTRIBS, "GL_SEPARATE_ATTRIBS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferParameter(uint32_t value) { @@ -6937,7 +6941,7 @@ {GL_BUFFER_MAPPED, "GL_BUFFER_MAPPED"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferParameter64(uint32_t value) { @@ -6947,7 +6951,7 @@ {GL_BUFFER_MAP_OFFSET, "GL_BUFFER_MAP_OFFSET"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferTarget(uint32_t value) { @@ -6962,7 +6966,7 @@ {GL_UNIFORM_BUFFER, "GL_UNIFORM_BUFFER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferUsage(uint32_t value) { @@ -6978,7 +6982,7 @@ {GL_DYNAMIC_COPY, "GL_DYNAMIC_COPY"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferfi(uint32_t value) { @@ -6986,7 +6990,7 @@ {GL_DEPTH_STENCIL, "GL_DEPTH_STENCIL"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferfv(uint32_t value) { @@ -6995,7 +6999,7 @@ {GL_DEPTH, "GL_DEPTH"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferiv(uint32_t value) { @@ -7004,7 +7008,7 @@ {GL_STENCIL, "GL_STENCIL"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringBufferuiv(uint32_t value) { @@ -7012,7 +7016,7 @@ {GL_COLOR, "GL_COLOR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringCapability(uint32_t value) { @@ -7030,7 +7034,7 @@ {GL_PRIMITIVE_RESTART_FIXED_INDEX, "GL_PRIMITIVE_RESTART_FIXED_INDEX"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringClientBufferUsage(uint32_t value) { @@ -7038,7 +7042,7 @@ {GL_SCANOUT_CHROMIUM, "GL_SCANOUT_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringCmpFunction(uint32_t value) { @@ -7049,7 +7053,7 @@ {GL_GEQUAL, "GL_GEQUAL"}, {GL_ALWAYS, "GL_ALWAYS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringCompressedTextureFormat(uint32_t value) { @@ -7064,7 +7068,7 @@ {GL_NONE, "GL_NONE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringDrawMode(uint32_t value) { @@ -7078,7 +7082,7 @@ {GL_TRIANGLES, "GL_TRIANGLES"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringDstBlendFactor(uint32_t value) { @@ -7100,7 +7104,7 @@ {GL_SRC_ALPHA_SATURATE, "GL_SRC_ALPHA_SATURATE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringEquation(uint32_t value) { @@ -7112,7 +7116,7 @@ {GL_MAX, "GL_MAX"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringFaceMode(uint32_t value) { @@ -7121,7 +7125,7 @@ {GL_CCW, "GL_CCW"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringFaceType(uint32_t value) { @@ -7131,7 +7135,7 @@ {GL_FRONT_AND_BACK, "GL_FRONT_AND_BACK"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringFramebufferAttachmentParameter(uint32_t value) { @@ -7164,7 +7168,7 @@ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringFramebufferParameter(uint32_t value) { @@ -7178,7 +7182,7 @@ {GL_READ_FRAMEBUFFER, "GL_READ_FRAMEBUFFER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringGLState(uint32_t value) { @@ -7364,7 +7368,7 @@ {GL_UNPACK_SKIP_ROWS, "GL_UNPACK_SKIP_ROWS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringGetMaxIndexType(uint32_t value) { @@ -7374,7 +7378,7 @@ {GL_UNSIGNED_INT, "GL_UNSIGNED_INT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringGetTexParamTarget(uint32_t value) { @@ -7385,7 +7389,7 @@ {GL_TEXTURE_3D, "GL_TEXTURE_3D"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringHintMode(uint32_t value) { @@ -7395,7 +7399,7 @@ {GL_DONT_CARE, "GL_DONT_CARE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringHintTarget(uint32_t value) { @@ -7407,7 +7411,7 @@ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringImageInternalFormat(uint32_t value) { @@ -7420,7 +7424,7 @@ {GL_RGBA, "GL_RGBA"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringIndexType(uint32_t value) { @@ -7430,7 +7434,7 @@ {GL_UNSIGNED_INT, "GL_UNSIGNED_INT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringIndexedBufferTarget(uint32_t value) { @@ -7439,7 +7443,7 @@ {GL_UNIFORM_BUFFER, "GL_UNIFORM_BUFFER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringIndexedGLState(uint32_t value) { @@ -7461,7 +7465,7 @@ {GL_COLOR_WRITEMASK, "GL_COLOR_WRITEMASK"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringIndexedStringType(uint32_t value) { @@ -7469,7 +7473,7 @@ {GL_EXTENSIONS, "GL_EXTENSIONS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringInternalFormatParameter(uint32_t value) { @@ -7478,7 +7482,7 @@ {GL_SAMPLES, "GL_SAMPLES"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringMapBufferAccess(uint32_t value) { @@ -7491,7 +7495,7 @@ {GL_MAP_UNSYNCHRONIZED_BIT, "GL_MAP_UNSYNCHRONIZED_BIT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringPixelStore(uint32_t value) { @@ -7508,7 +7512,7 @@ {GL_UNPACK_SKIP_IMAGES, "GL_UNPACK_SKIP_IMAGES"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringPixelType(uint32_t value) { @@ -7531,7 +7535,7 @@ {GL_FLOAT_32_UNSIGNED_INT_24_8_REV, "GL_FLOAT_32_UNSIGNED_INT_24_8_REV"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringProgramParameter(uint32_t value) { @@ -7554,7 +7558,7 @@ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringQueryObjectParameter(uint32_t value) { @@ -7565,7 +7569,7 @@ "GL_QUERY_RESULT_AVAILABLE_NO_FLUSH_CHROMIUM_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringQueryParameter(uint32_t value) { @@ -7573,7 +7577,7 @@ {GL_CURRENT_QUERY_EXT, "GL_CURRENT_QUERY_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringQueryTarget(uint32_t value) { @@ -7595,7 +7599,7 @@ "GL_PROGRAM_COMPLETION_QUERY_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringReadBuffer(uint32_t value) { @@ -7620,7 +7624,7 @@ {GL_COLOR_ATTACHMENT15, "GL_COLOR_ATTACHMENT15"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringReadPixelFormat(uint32_t value) { @@ -7636,7 +7640,7 @@ {GL_RGBA_INTEGER, "GL_RGBA_INTEGER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringReadPixelType(uint32_t value) { @@ -7655,7 +7659,7 @@ {GL_UNSIGNED_INT_2_10_10_10_REV, "GL_UNSIGNED_INT_2_10_10_10_REV"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringRenderBufferFormat(uint32_t value) { @@ -7696,7 +7700,7 @@ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringRenderBufferParameter(uint32_t value) { @@ -7713,7 +7717,7 @@ {GL_RENDERBUFFER_SAMPLES, "GL_RENDERBUFFER_SAMPLES"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringRenderBufferTarget(uint32_t value) { @@ -7721,7 +7725,7 @@ {GL_RENDERBUFFER, "GL_RENDERBUFFER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringResetStatus(uint32_t value) { @@ -7731,7 +7735,7 @@ {GL_UNKNOWN_CONTEXT_RESET_ARB, "GL_UNKNOWN_CONTEXT_RESET_ARB"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringSamplerParameter(uint32_t value) { @@ -7747,7 +7751,7 @@ {GL_TEXTURE_COMPARE_FUNC, "GL_TEXTURE_COMPARE_FUNC"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringShaderBinaryFormat(uint32_t value) { @@ -7765,7 +7769,7 @@ "GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringShaderPrecision(uint32_t value) { @@ -7775,7 +7779,7 @@ {GL_MEDIUM_INT, "GL_MEDIUM_INT"}, {GL_HIGH_INT, "GL_HIGH_INT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringShaderType(uint32_t value) { @@ -7784,7 +7788,7 @@ {GL_FRAGMENT_SHADER, "GL_FRAGMENT_SHADER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringSharedImageAccessMode(uint32_t value) { @@ -7797,7 +7801,7 @@ "GL_SHARED_IMAGE_ACCESS_MODE_READ_CHROMIUM"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringSrcBlendFactor(uint32_t value) { @@ -7819,7 +7823,7 @@ {GL_SRC_ALPHA_SATURATE, "GL_SRC_ALPHA_SATURATE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringStencilOp(uint32_t value) { @@ -7830,7 +7834,7 @@ {GL_DECR_WRAP, "GL_DECR_WRAP"}, {GL_INVERT, "GL_INVERT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringStringType(uint32_t value) { @@ -7842,7 +7846,7 @@ {GL_EXTENSIONS, "GL_EXTENSIONS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringSyncCondition(uint32_t value) { @@ -7850,7 +7854,7 @@ {GL_SYNC_GPU_COMMANDS_COMPLETE, "GL_SYNC_GPU_COMMANDS_COMPLETE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringSyncParameter(uint32_t value) { @@ -7861,7 +7865,7 @@ {GL_SYNC_FLAGS, "GL_SYNC_FLAGS"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTexture3DTarget(uint32_t value) { @@ -7870,7 +7874,7 @@ {GL_TEXTURE_2D_ARRAY, "GL_TEXTURE_2D_ARRAY"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureBindTarget(uint32_t value) { @@ -7881,7 +7885,7 @@ {GL_TEXTURE_2D_ARRAY, "GL_TEXTURE_2D_ARRAY"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureCompareFunc(uint32_t value) { @@ -7892,7 +7896,7 @@ {GL_ALWAYS, "GL_ALWAYS"}, {GL_NEVER, "GL_NEVER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureCompareMode(uint32_t value) { @@ -7901,7 +7905,7 @@ {GL_COMPARE_REF_TO_TEXTURE, "GL_COMPARE_REF_TO_TEXTURE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureDepthRenderableInternalFormat( @@ -7914,7 +7918,7 @@ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureFboTarget(uint32_t value) { @@ -7928,7 +7932,7 @@ {GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureFormat(uint32_t value) { @@ -7948,7 +7952,7 @@ {GL_DEPTH_STENCIL, "GL_DEPTH_STENCIL"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureInternalFormat(uint32_t value) { @@ -8014,7 +8018,7 @@ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureInternalFormatStorage(uint32_t value) { @@ -8080,7 +8084,7 @@ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureMagFilterMode(uint32_t value) { @@ -8089,7 +8093,7 @@ {GL_LINEAR, "GL_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureMinFilterMode(uint32_t value) { @@ -8102,7 +8106,7 @@ {GL_LINEAR_MIPMAP_LINEAR, "GL_LINEAR_MIPMAP_LINEAR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureParameter(uint32_t value) { @@ -8122,7 +8126,7 @@ {GL_TEXTURE_WRAP_R, "GL_TEXTURE_WRAP_R"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureSizedColorRenderableInternalFormat( @@ -8158,7 +8162,7 @@ {GL_RGBA32I, "GL_RGBA32I"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureSizedTextureFilterableInternalFormat( @@ -8191,7 +8195,7 @@ {GL_R16_EXT, "GL_R16_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureSrgbDecodeExt(uint32_t value) { @@ -8200,7 +8204,7 @@ {GL_SKIP_DECODE_EXT, "GL_SKIP_DECODE_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureStencilRenderableInternalFormat( @@ -8211,7 +8215,7 @@ {GL_DEPTH32F_STENCIL8, "GL_DEPTH32F_STENCIL8"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureSwizzle(uint32_t value) { @@ -8220,7 +8224,7 @@ {GL_ALPHA, "GL_ALPHA"}, {GL_ZERO, "GL_ZERO"}, {GL_ONE, "GL_ONE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureTarget(uint32_t value) { @@ -8234,7 +8238,7 @@ {GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureUnsizedInternalFormat(uint32_t value) { @@ -8246,7 +8250,7 @@ {GL_RGBA, "GL_RGBA"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureUsage(uint32_t value) { @@ -8255,7 +8259,7 @@ {GL_FRAMEBUFFER_ATTACHMENT_ANGLE, "GL_FRAMEBUFFER_ATTACHMENT_ANGLE"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTextureWrapMode(uint32_t value) { @@ -8265,7 +8269,7 @@ {GL_REPEAT, "GL_REPEAT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTransformFeedbackBindTarget(uint32_t value) { @@ -8273,7 +8277,7 @@ {GL_TRANSFORM_FEEDBACK, "GL_TRANSFORM_FEEDBACK"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringTransformFeedbackPrimitiveMode(uint32_t value) { @@ -8283,7 +8287,7 @@ {GL_TRIANGLES, "GL_TRIANGLES"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringUniformBlockParameter(uint32_t value) { @@ -8300,7 +8304,7 @@ "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringUniformParameter(uint32_t value) { @@ -8315,7 +8319,7 @@ {GL_UNIFORM_IS_ROW_MAJOR, "GL_UNIFORM_IS_ROW_MAJOR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringVertexAttribIType(uint32_t value) { @@ -8325,7 +8329,7 @@ {GL_INT, "GL_INT"}, {GL_UNSIGNED_INT, "GL_UNSIGNED_INT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringVertexAttribType(uint32_t value) { @@ -8342,7 +8346,7 @@ {GL_UNSIGNED_INT_2_10_10_10_REV, "GL_UNSIGNED_INT_2_10_10_10_REV"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringVertexAttribute(uint32_t value) { @@ -8359,7 +8363,7 @@ {GL_VERTEX_ATTRIB_ARRAY_DIVISOR, "GL_VERTEX_ATTRIB_ARRAY_DIVISOR"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringVertexPointer(uint32_t value) { @@ -8367,7 +8371,7 @@ {GL_VERTEX_ATTRIB_ARRAY_POINTER, "GL_VERTEX_ATTRIB_ARRAY_POINTER"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } std::string GLES2Util::GetStringWindowRectanglesMode(uint32_t value) { @@ -8376,7 +8380,7 @@ {GL_EXCLUSIVE_EXT, "GL_EXCLUSIVE_EXT"}, }; return GLES2Util::GetQualifiedEnumString(string_table, - base::size(string_table), value); + std::size(string_table), value); } #endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_UTILS_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/common/mailbox.cc b/gpu/command_buffer/common/mailbox.cc index da8fda3..ac7f9dd5 100644 --- a/gpu/command_buffer/common/mailbox.cc +++ b/gpu/command_buffer/common/mailbox.cc
@@ -9,7 +9,6 @@ #include <string.h> #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/rand_util.h" #include "base/strings/stringprintf.h" @@ -51,7 +50,7 @@ } bool Mailbox::IsZero() const { - for (size_t i = 0; i < base::size(name); ++i) { + for (size_t i = 0; i < std::size(name); ++i) { if (name[i]) return false; }
diff --git a/gpu/command_buffer/common/raster_cmd_format.cc b/gpu/command_buffer/common/raster_cmd_format.cc index dab0c9e..bd9db9d 100644 --- a/gpu/command_buffer/common/raster_cmd_format.cc +++ b/gpu/command_buffer/common/raster_cmd_format.cc
@@ -7,11 +7,9 @@ // We explicitly do NOT include raster_cmd_format.h here because client side // and service side have different requirements. -#include "gpu/command_buffer/common/cmd_buffer_common.h" - #include <stddef.h> -#include "base/cxx17_backports.h" +#include "gpu/command_buffer/common/cmd_buffer_common.h" namespace gpu { namespace raster { @@ -28,7 +26,7 @@ }; size_t index = static_cast<size_t>(id) - kFirstRasterCommand; - return (index < base::size(names)) ? names[index] : "*unknown-command*"; + return (index < std::size(names)) ? names[index] : "*unknown-command*"; } } // namespace raster
diff --git a/gpu/command_buffer/common/raster_cmd_format_test_autogen.h b/gpu/command_buffer/common/raster_cmd_format_test_autogen.h index 7c79ba49..02ee0b3 100644 --- a/gpu/command_buffer/common/raster_cmd_format_test_autogen.h +++ b/gpu/command_buffer/common/raster_cmd_format_test_autogen.h
@@ -49,15 +49,15 @@ }; cmds::GenQueriesEXTImmediate& cmd = *GetBufferAs<cmds::GenQueriesEXTImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::GenQueriesEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -69,15 +69,15 @@ }; cmds::DeleteQueriesEXTImmediate& cmd = *GetBufferAs<cmds::DeleteQueriesEXTImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>(cmds::DeleteQueriesEXTImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -259,16 +259,16 @@ }; cmds::DeletePaintCacheTextBlobsINTERNALImmediate& cmd = *GetBufferAs<cmds::DeletePaintCacheTextBlobsINTERNALImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>( cmds::DeletePaintCacheTextBlobsINTERNALImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); } @@ -280,16 +280,16 @@ }; cmds::DeletePaintCachePathsINTERNALImmediate& cmd = *GetBufferAs<cmds::DeletePaintCachePathsINTERNALImmediate>(); - void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(base::size(ids)), ids); + void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(std::size(ids)), ids); EXPECT_EQ(static_cast<uint32_t>( cmds::DeletePaintCachePathsINTERNALImmediate::kCmdId), cmd.header.command); EXPECT_EQ(sizeof(cmd) + RoundSizeToMultipleOfEntries(cmd.n * 4u), cmd.header.size * 4u); - EXPECT_EQ(static_cast<GLsizei>(base::size(ids)), cmd.n); + EXPECT_EQ(static_cast<GLsizei>(std::size(ids)), cmd.n); CheckBytesWrittenMatchesExpectedSize( next_cmd, - sizeof(cmd) + RoundSizeToMultipleOfEntries(base::size(ids) * 4u)); + sizeof(cmd) + RoundSizeToMultipleOfEntries(std::size(ids) * 4u)); EXPECT_EQ(0, memcmp(ids, ImmediateDataAddress(&cmd), sizeof(ids))); }
diff --git a/gpu/command_buffer/common/webgpu_cmd_format.cc b/gpu/command_buffer/common/webgpu_cmd_format.cc index 468d828..2f05e1c2 100644 --- a/gpu/command_buffer/common/webgpu_cmd_format.cc +++ b/gpu/command_buffer/common/webgpu_cmd_format.cc
@@ -7,7 +7,6 @@ // We explicitly do NOT include webgpu_cmd_format.h here because client side // and service side have different requirements. -#include "base/cxx17_backports.h" #include "gpu/command_buffer/common/cmd_buffer_common.h" namespace gpu { @@ -25,7 +24,7 @@ }; size_t index = static_cast<size_t>(id) - kFirstWebGPUCommand; - return (index < base::size(names)) ? names[index] : "*unknown-command*"; + return (index < std::size(names)) ? names[index] : "*unknown-command*"; } } // namespace webgpu
diff --git a/gpu/command_buffer/service/buffer_manager_unittest.cc b/gpu/command_buffer/service/buffer_manager_unittest.cc index cffb866..e9dc6ea 100644 --- a/gpu/command_buffer/service/buffer_manager_unittest.cc +++ b/gpu/command_buffer/service/buffer_manager_unittest.cc
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "gpu/command_buffer/service/buffer_manager.h" + #include <stddef.h> #include <stdint.h> #include <memory> -#include "base/cxx17_backports.h" -#include "gpu/command_buffer/service/buffer_manager.h" #include "gpu/command_buffer/service/error_state_mock.h" #include "gpu/command_buffer/service/feature_info.h" #include "gpu/command_buffer/service/gpu_service_test.h" @@ -527,7 +527,7 @@ GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER }; - for (size_t ii = 0; ii < base::size(kTargets); ++ii) { + for (size_t ii = 0; ii < std::size(kTargets); ++ii) { client_id++; service_id++; manager_->CreateBuffer(client_id, service_id); @@ -535,7 +535,7 @@ ASSERT_TRUE(buffer != nullptr); EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[ii])); - for (size_t jj = 0; jj < base::size(kTargets); ++jj) { + for (size_t jj = 0; jj < std::size(kTargets); ++jj) { EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj])); } EXPECT_EQ(kTargets[ii], GetInitialTarget(buffer)); @@ -554,7 +554,7 @@ GL_TRANSFORM_FEEDBACK_BUFFER, GL_UNIFORM_BUFFER }; - for (size_t ii = 0; ii < base::size(kTargets); ++ii) { + for (size_t ii = 0; ii < std::size(kTargets); ++ii) { client_id++; service_id++; manager_->CreateBuffer(client_id, service_id); @@ -562,7 +562,7 @@ ASSERT_TRUE(buffer != nullptr); EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[ii])); - for (size_t jj = 0; jj < base::size(kTargets); ++jj) { + for (size_t jj = 0; jj < std::size(kTargets); ++jj) { EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj])); } }
diff --git a/gpu/command_buffer/service/common_decoder.cc b/gpu/command_buffer/service/common_decoder.cc index 82dea1c..1dc657ca 100644 --- a/gpu/command_buffer/service/common_decoder.cc +++ b/gpu/command_buffer/service/common_decoder.cc
@@ -9,7 +9,6 @@ #include <algorithm> -#include "base/cxx17_backports.h" #include "base/numerics/safe_math.h" #include "gpu/command_buffer/service/command_buffer_service.h" #include "gpu/command_buffer/service/decoder_client.h" @@ -217,7 +216,7 @@ error::Error CommonDecoder::DoCommonCommand(unsigned int command, unsigned int arg_count, const volatile void* cmd_data) { - if (command < base::size(command_info)) { + if (command < std::size(command_info)) { const CommandInfo& info = command_info[command]; unsigned int info_arg_count = static_cast<unsigned int>(info.arg_count); if ((info.arg_flags == cmd::kFixed && arg_count == info_arg_count) ||
diff --git a/gpu/command_buffer/service/external_vk_image_backing.cc b/gpu/command_buffer/service/external_vk_image_backing.cc index 272dd2b..91c0971 100644 --- a/gpu/command_buffer/service/external_vk_image_backing.cc +++ b/gpu/command_buffer/service/external_vk_image_backing.cc
@@ -7,7 +7,6 @@ #include <utility> #include <vector> -#include "base/cxx17_backports.h" #include "build/build_config.h" #include "components/viz/common/resources/resource_sizes.h" #include "gpu/command_buffer/service/external_vk_image_gl_representation.h" @@ -80,7 +79,7 @@ {GL_ZERO, GL_ZERO, 0}, // YUV_420_BIPLANAR {GL_ZERO, GL_ZERO, 0}, // P010 }; -static_assert(base::size(kFormatTable) == (viz::RESOURCE_FORMAT_MAX + 1), +static_assert(std::size(kFormatTable) == (viz::RESOURCE_FORMAT_MAX + 1), "kFormatTable does not handle all cases."); class ScopedDedicatedMemoryObject {
diff --git a/gpu/command_buffer/service/feature_info.cc b/gpu/command_buffer/service/feature_info.cc index 2c390f9..e232df3 100644 --- a/gpu/command_buffer/service/feature_info.cc +++ b/gpu/command_buffer/service/feature_info.cc
@@ -12,7 +12,6 @@ #include "base/command_line.h" #include "base/containers/contains.h" -#include "base/cxx17_backports.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" #include "base/strings/string_number_conversions.h" @@ -1920,8 +1919,8 @@ "GPU.RenderableFormat.RG32F.FLOAT", "GPU.RenderableFormat.R11F_G11F_B10F.FLOAT", }; - DCHECK_EQ(base::size(kInternalFormats), base::size(kFormats)); - for (size_t i = 0; i < base::size(kFormats); ++i) { + DCHECK_EQ(std::size(kInternalFormats), std::size(kFormats)); + for (size_t i = 0; i < std::size(kFormats); ++i) { glTexImage2D(GL_TEXTURE_2D, 0, kInternalFormats[i], width, width, 0, kFormats[i], GL_FLOAT, nullptr); bool supported = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER) ==
diff --git a/gpu/command_buffer/service/framebuffer_manager_unittest.cc b/gpu/command_buffer/service/framebuffer_manager_unittest.cc index 0798850..569c022 100644 --- a/gpu/command_buffer/service/framebuffer_manager_unittest.cc +++ b/gpu/command_buffer/service/framebuffer_manager_unittest.cc
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "gpu/command_buffer/service/framebuffer_manager.h" + #include <stddef.h> #include <stdint.h> #include <memory> -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "gpu/command_buffer/client/client_test_helper.h" #include "gpu/command_buffer/service/error_state_mock.h" #include "gpu/command_buffer/service/feature_info.h" -#include "gpu/command_buffer/service/framebuffer_manager.h" #include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h" #include "gpu/command_buffer/service/gpu_service_test.h" #include "gpu/command_buffer/service/gpu_tracer.h" @@ -1087,7 +1087,7 @@ framebuffer_->GetDrawBuffer(i)); } - for (size_t ii = 0; ii < base::size(kTextureClientId); ++ii) { + for (size_t ii = 0; ii < std::size(kTextureClientId); ++ii) { texture_manager_->CreateTexture( kTextureClientId[ii], kTextureServiceId[ii]); scoped_refptr<TextureRef> texture( @@ -1190,7 +1190,7 @@ GL_FLOAT, GL_UNSIGNED_INT}; - for (size_t ii = 0; ii < base::size(kTextureClientId); ++ii) { + for (size_t ii = 0; ii < std::size(kTextureClientId); ++ii) { texture_manager_->CreateTexture( kTextureClientId[ii], kTextureServiceId[ii]); scoped_refptr<TextureRef> texture(
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc index 52817d5..4847ff34 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -5998,7 +5998,7 @@ const unsigned int arg_count = size - 1; unsigned int command_index = command - kFirstGLES2Command; - if (command_index < base::size(command_info)) { + if (command_index < std::size(command_info)) { const CommandInfo& info = command_info[command_index]; unsigned int info_arg_count = static_cast<unsigned int>(info.arg_count); if ((info.arg_flags == cmd::kFixed && arg_count == info_arg_count) || @@ -14760,7 +14760,7 @@ }; const CompressedFormatInfo* GetCompressedFormatInfo(GLenum format) { - for (size_t i = 0; i < base::size(kCompressedFormatInfoArray); i++) { + for (size_t i = 0; i < std::size(kCompressedFormatInfoArray); i++) { if (kCompressedFormatInfoArray[i].format == format) { return &kCompressedFormatInfoArray[i]; }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc index bcb90de..f190697 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
@@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_split.h" #include "build/build_config.h" @@ -847,7 +846,7 @@ const unsigned int arg_count = size - 1; unsigned int command_index = command - kFirstGLES2Command; - if (command_index < base::size(command_info)) { + if (command_index < std::size(command_info)) { const CommandInfo& info = command_info[command_index]; unsigned int info_arg_count = static_cast<unsigned int>(info.arg_count); if ((info.arg_flags == cmd::kFixed && arg_count == info_arg_count) || @@ -994,7 +993,7 @@ }; RequestExtensions(api(), requestable_extensions, kRequiredFunctionalityExtensions, - base::size(kRequiredFunctionalityExtensions)); + std::size(kRequiredFunctionalityExtensions)); if (request_optional_extensions_) { static constexpr const char* kOptionalFunctionalityExtensions[] = { @@ -1039,7 +1038,7 @@ }; RequestExtensions(api(), requestable_extensions, kOptionalFunctionalityExtensions, - base::size(kOptionalFunctionalityExtensions)); + std::size(kOptionalFunctionalityExtensions)); } context->ReinitializeDynamicBindings();
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc index baa0e9c..0973e010 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" @@ -934,7 +933,7 @@ } TEST_P(GLES2DecoderManualInitTest, BeginEndQueryEXTBadMemoryIdFails) { - for (size_t i = 0; i < base::size(kQueryTypes); ++i) { + for (size_t i = 0; i < std::size(kQueryTypes); ++i) { CheckBeginEndQueryBadMemoryFails(this, kNewClientId, kQueryTypes[i], kInvalidSharedMemoryId, kSharedMemoryOffset); @@ -942,7 +941,7 @@ } TEST_P(GLES2DecoderManualInitTest, BeginEndQueryEXTBadMemoryOffsetFails) { - for (size_t i = 0; i < base::size(kQueryTypes); ++i) { + for (size_t i = 0; i < std::size(kQueryTypes); ++i) { // Out-of-bounds. CheckBeginEndQueryBadMemoryFails(this, kNewClientId, kQueryTypes[i], shared_memory_id_, @@ -954,7 +953,7 @@ } TEST_P(GLES2DecoderManualInitTest, QueryReuseTest) { - for (size_t i = 0; i < base::size(kQueryTypes); ++i) { + for (size_t i = 0; i < std::size(kQueryTypes); ++i) { const QueryType& query_type = kQueryTypes[i]; GLES2DecoderTestBase::InitState init; @@ -1289,7 +1288,7 @@ static const GLenum kStates[] = { GL_DEPTH_TEST, GL_STENCIL_TEST, }; - for (size_t ii = 0; ii < base::size(kStates); ++ii) { + for (size_t ii = 0; ii < std::size(kStates); ++ii) { cmds::Enable enable_cmd; GLenum state = kStates[ii]; enable_cmd.Init(state);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h index fa45593..aca6653 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h
@@ -919,14 +919,14 @@ const char kSource0[] = "hello"; const char* kSource[] = {kSource0}; const char kValidStrEnd = 0; - const GLsizei kCount = static_cast<GLsizei>(base::size(kSource)); + const GLsizei kCount = static_cast<GLsizei>(std::size(kSource)); const GLsizei kTests[] = { kCount + 1, 0, std::numeric_limits<GLsizei>::max(), -1, }; - for (size_t ii = 0; ii < base::size(kTests); ++ii) { + for (size_t ii = 0; ii < std::size(kTests); ++ii) { SetBucketAsCStrings(kBucketId, 1, kSource, kTests[ii], kValidStrEnd); cmds::ShaderSourceBucket cmd; cmd.Init(client_shader_id_, kBucketId); @@ -1221,14 +1221,14 @@ const char kSource0[] = "hello"; const char* kSource[] = {kSource0}; const char kValidStrEnd = 0; - const GLsizei kCount = static_cast<GLsizei>(base::size(kSource)); + const GLsizei kCount = static_cast<GLsizei>(std::size(kSource)); const GLsizei kTests[] = { kCount + 1, 0, std::numeric_limits<GLsizei>::max(), -1, }; - for (size_t ii = 0; ii < base::size(kTests); ++ii) { + for (size_t ii = 0; ii < std::size(kTests); ++ii) { SetBucketAsCStrings(kBucketId, 1, kSource, kTests[ii], kValidStrEnd); cmds::TransformFeedbackVaryingsBucket cmd; cmd.Init(client_program_id_, kBucketId, GL_INTERLEAVED_ATTRIBS);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc index 2c9b7702..ca36199 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc
@@ -2,18 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/command_buffer/service/gles2_cmd_decoder.h" - #include <stddef.h> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/service/context_group.h" #include "gpu/command_buffer/service/context_state.h" #include "gpu/command_buffer/service/gl_surface_mock.h" +#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" #include "gpu/command_buffer/service/gpu_switches.h" #include "gpu/command_buffer/service/image_manager.h" @@ -205,15 +203,15 @@ static const GLsizei stride_offset[] = { 0, 0, 1, 0, 1, 0, 0, }; - for (size_t tt = 0; tt < base::size(types); ++tt) { + for (size_t tt = 0; tt < std::size(types); ++tt) { GLenum type = types[tt]; GLsizei num_bytes = sizes[tt]; - for (size_t ii = 0; ii < base::size(indices); ++ii) { + for (size_t ii = 0; ii < std::size(indices); ++ii) { GLuint index = indices[ii]; for (GLint size = 0; size < 5; ++size) { - for (size_t oo = 0; oo < base::size(offset_mult); ++oo) { + for (size_t oo = 0; oo < std::size(offset_mult); ++oo) { GLuint offset = num_bytes * offset_mult[oo] + offset_offset[oo]; - for (size_t ss = 0; ss < base::size(stride_mult); ++ss) { + for (size_t ss = 0; ss < std::size(stride_mult); ++ss) { GLsizei stride = num_bytes * stride_mult[ss] + stride_offset[ss]; for (int normalize = 0; normalize < 2; ++normalize) { bool index_good = index < static_cast<GLuint>(kNumVertexAttribs);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc index 4f5e1007..b0a2ddd 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc
@@ -13,7 +13,6 @@ #include <vector> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "build/build_config.h" @@ -61,7 +60,7 @@ "GL_APPLE_vertex_array_object" }; bool contains_vao_extension = false; - for (size_t ii = 0; ii < base::size(kVAOExtensions); ++ii) { + for (size_t ii = 0; ii < std::size(kVAOExtensions); ++ii) { if (init->extensions.find(kVAOExtensions[ii]) != std::string::npos) { contains_vao_extension = true; break; @@ -291,9 +290,9 @@ static GLuint fixed_attrib_buffer_id[] = { kServiceFixedAttribBufferId, }; - EXPECT_CALL(*gl_, GenBuffersARB(base::size(attrib_0_id), _)) + EXPECT_CALL(*gl_, GenBuffersARB(std::size(attrib_0_id), _)) .WillOnce(SetArrayArgument<1>(attrib_0_id, - attrib_0_id + base::size(attrib_0_id))) + attrib_0_id + std::size(attrib_0_id))) .RetiresOnSaturation(); EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER, kServiceAttrib0BufferId)) .Times(1) @@ -304,10 +303,10 @@ EXPECT_CALL(*gl_, BindBuffer(GL_ARRAY_BUFFER, 0)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*gl_, GenBuffersARB(base::size(fixed_attrib_buffer_id), _)) + EXPECT_CALL(*gl_, GenBuffersARB(std::size(fixed_attrib_buffer_id), _)) .WillOnce(SetArrayArgument<1>( fixed_attrib_buffer_id, - fixed_attrib_buffer_id + base::size(fixed_attrib_buffer_id))) + fixed_attrib_buffer_id + std::size(fixed_attrib_buffer_id))) .RetiresOnSaturation(); for (GLint tt = 0; tt < TestHelper::kNumTextureUnits; ++tt) { @@ -421,13 +420,13 @@ }; EXPECT_CALL(*gl_, GetIntegerv(GL_MAX_VIEWPORT_DIMS, _)) .WillOnce(SetArrayArgument<1>( - max_viewport_dims, max_viewport_dims + base::size(max_viewport_dims))) + max_viewport_dims, max_viewport_dims + std::size(max_viewport_dims))) .RetiresOnSaturation(); static GLfloat line_width_range[] = { 1.0f, 2.0f }; EXPECT_CALL(*gl_, GetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, _)) .WillOnce(SetArrayArgument<1>( - line_width_range, line_width_range + base::size(line_width_range))) + line_width_range, line_width_range + std::size(line_width_range))) .RetiresOnSaturation(); if (group_->feature_info()->feature_flags().ext_window_rectangles) { @@ -1056,7 +1055,7 @@ const GLuint kTestServiceVertexShaderId = 6001; const GLuint kTestClientFragmentShaderId = 5002; const GLuint kTestServiceFragmentShaderId = 6002; - SetupShader(attribs, base::size(attribs), uniforms, base::size(uniforms), + SetupShader(attribs, std::size(attribs), uniforms, std::size(uniforms), client_program_id_, kServiceProgramId, kTestClientVertexShaderId, kTestServiceVertexShaderId, kTestClientFragmentShaderId, kTestServiceFragmentShaderId); @@ -1972,7 +1971,7 @@ kUniform8FakeLocation, kUniform8RealLocation, kUniform8DesiredLocation }, }; - SetupShader(attribs, base::size(attribs), uniforms, base::size(uniforms), + SetupShader(attribs, std::size(attribs), uniforms, std::size(uniforms), client_program_id_, kServiceProgramId, client_vertex_shader_id_, kServiceVertexShaderId, client_fragment_shader_id_, kServiceFragmentShaderId); @@ -2018,7 +2017,7 @@ kUniform7FakeLocation, kUniform7RealLocation, kUniform7DesiredLocation }, }; - SetupShader(attribs, base::size(attribs), uniforms, base::size(uniforms), + SetupShader(attribs, std::size(attribs), uniforms, std::size(uniforms), client_program_id_, kServiceProgramId, client_vertex_shader_id_, kServiceVertexShaderId, client_fragment_shader_id_, kServiceFragmentShaderId); @@ -2064,7 +2063,7 @@ kUniform7FakeLocation, kUniform7RealLocation, kUniform7DesiredLocation }, }; - SetupShader(attribs, base::size(attribs), uniforms, base::size(uniforms), + SetupShader(attribs, std::size(attribs), uniforms, std::size(uniforms), client_program_id_, kServiceProgramId, client_vertex_shader_id_, kServiceVertexShaderId, client_fragment_shader_id_, kServiceFragmentShaderId); @@ -2285,7 +2284,7 @@ client_element_buffer_id_, kServiceElementBufferId); static const GLshort indices[] = {100, 1, 2, 3, 4, 5, 6, 7, 100, 9}; - static_assert(base::size(indices) == kNumIndices, + static_assert(std::size(indices) == kNumIndices, "indices should have kNumIndices elements"); DoBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices)); DoBufferSubData(GL_ELEMENT_ARRAY_BUFFER, 0, 2, indices);
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc index b2c6a07..9a26a89 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc
@@ -1140,7 +1140,7 @@ }, // completely off right }; - for (size_t tt = 0; tt < base::size(tests); ++tt) { + for (size_t tt = 0; tt < std::size(tests); ++tt) { CheckReadPixelsOutOfRange( tests[tt][0], tests[tt][1], tests[tt][2], tests[tt][3], tt == 0); } @@ -3246,7 +3246,7 @@ auto& cmd = *GetImmediateAs<cmds::DrawBuffersEXTImmediate>(); { const GLenum bufs[] = {GL_BACK}; - const GLsizei count = base::size(bufs); + const GLsizei count = std::size(bufs); cmd.Init(count, bufs); EXPECT_CALL(*gl_, DrawBuffersARB(count, Pointee(GL_BACK))) @@ -3267,7 +3267,7 @@ } { const GLenum bufs[] = {GL_BACK, GL_NONE}; - const GLsizei count = base::size(bufs); + const GLsizei count = std::size(bufs); cmd.Init(count, bufs); EXPECT_CALL(*gl_, DrawBuffersARB(_, _)).Times(0).RetiresOnSaturation();
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc index f0e6375..1ef7c47 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_programs.cc
@@ -2,19 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/command_buffer/service/gles2_cmd_decoder.h" - #include <stddef.h> #include <stdint.h> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" #include "gpu/command_buffer/common/gles2_cmd_utils.h" #include "gpu/command_buffer/service/context_group.h" #include "gpu/command_buffer/service/context_state.h" #include "gpu/command_buffer/service/gl_surface_mock.h" +#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" #include "gpu/command_buffer/service/image_manager.h" #include "gpu/command_buffer/service/mailbox_manager.h" @@ -828,7 +826,7 @@ GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER, GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER, }; - for (size_t ii = 0; ii < base::size(kPname); ++ii) { + for (size_t ii = 0; ii < std::size(kPname); ++ii) { result->SetNumResults(0); cmd.Init(client_program_id_, 0, @@ -1069,7 +1067,7 @@ const char kName0[] = "Cow"; const char kName1[] = "Chicken"; const char* kNames[] = { kName0, kName1 }; - const size_t kCount = base::size(kNames); + const size_t kCount = std::size(kNames); const char kValidStrEnd = 0; const GLuint kIndices[] = { 1, 2 }; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); @@ -1102,7 +1100,7 @@ const char kName0[] = "Cow"; const char kName1[] = "Chicken"; const char* kNames[] = { kName0, kName1 }; - const size_t kCount = base::size(kNames); + const size_t kCount = std::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); auto* result = @@ -1131,7 +1129,7 @@ const char kName0[] = "Cow"; const char kName1[] = "Chicken"; const char* kNames[] = { kName0, kName1 }; - const size_t kCount = base::size(kNames); + const size_t kCount = std::size(kNames); const char kValidStrEnd = 0; const GLuint kIndices[] = { 1, 2 }; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); @@ -1161,7 +1159,7 @@ const char kName0[] = "Cow"; const char kName1[] = "Chicken"; const char* kNames[] = { kName0, kName1 }; - const size_t kCount = base::size(kNames); + const size_t kCount = std::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); auto* result = @@ -1177,7 +1175,7 @@ const char kName0[] = "Cow"; const char kName1[] = "Chicken"; const char* kNames[] = { kName0, kName1 }; - const size_t kCount = base::size(kNames); + const size_t kCount = std::size(kNames); const char kValidStrEnd = 0; SetBucketAsCStrings(kBucketId, kCount, kNames, kCount, kValidStrEnd); auto* result = @@ -1199,7 +1197,7 @@ const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 2 }; const GLint kResults[] = { 1976, 321 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -1226,7 +1224,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadProgramFails) { const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 2 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -1253,7 +1251,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadParamsFails) { const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 100 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -1269,7 +1267,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadPnameFails) { const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 2 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -1293,7 +1291,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivResultNotInitFails) { const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 2 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -1307,7 +1305,7 @@ TEST_P(GLES3DecoderWithShaderTest, GetActiveUniformsivBadSharedMemoryFails) { const uint32_t kBucketId = 123; const GLuint kIndices[] = { 1, 2 }; - const size_t kCount = base::size(kIndices); + const size_t kCount = std::size(kIndices); SetBucketData(kBucketId, kIndices, sizeof(GLuint) * kCount); auto* result = static_cast<cmds::GetActiveUniformsiv::Result*>(shared_memory_address_); @@ -2074,12 +2072,12 @@ {kUniform3Name, kUniform3Size, kUniform3Type, kUniform3FakeLocation, kUniform3RealLocation, kUniform3DesiredLocation}, }; - SetupShader(attribs, base::size(attribs), uniforms, base::size(uniforms), + SetupShader(attribs, std::size(attribs), uniforms, std::size(uniforms), client_program_id_, kServiceProgramId, client_vertex_shader_id_, kServiceVertexShaderId, client_fragment_shader_id_, kServiceFragmentShaderId); TestHelper::SetupExpectationsForClearingUniforms(gl_.get(), uniforms, - base::size(uniforms)); + std::size(uniforms)); } {
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc index cd70a37..564478c 100644 --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -2,13 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "gpu/command_buffer/service/gles2_cmd_decoder.h" - #include <stddef.h> #include <stdint.h> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "components/viz/common/resources/resource_format_utils.h" #include "gpu/command_buffer/common/gles2_cmd_format.h" @@ -17,6 +14,7 @@ #include "gpu/command_buffer/service/context_group.h" #include "gpu/command_buffer/service/context_state.h" #include "gpu/command_buffer/service/gl_surface_mock.h" +#include "gpu/command_buffer/service/gles2_cmd_decoder.h" #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest.h" #include "gpu/command_buffer/service/image_manager.h" #include "gpu/command_buffer/service/mailbox_manager.h" @@ -668,7 +666,7 @@ EXPECT_CALL(*gl_, GetError()).WillRepeatedly(Return(GL_NO_ERROR)); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_)) .WillRepeatedly(Return(GL_FRAMEBUFFER_COMPLETE)); - for (size_t i = 0; i < base::size(kUnsizedInternalFormats); ++i) { + for (size_t i = 0; i < std::size(kUnsizedInternalFormats); ++i) { // Copy from main framebuffer to texture, using the unsized internal format. DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0); GLenum internal_format = kUnsizedInternalFormats[i]; @@ -749,7 +747,7 @@ EXPECT_CALL(*gl_, GetError()).WillRepeatedly(Return(GL_NO_ERROR)); EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_)) .WillRepeatedly(Return(GL_FRAMEBUFFER_COMPLETE)); - for (size_t i = 0; i < base::size(kUnsizedInternalFormats); ++i) { + for (size_t i = 0; i < std::size(kUnsizedInternalFormats); ++i) { // Copy from main framebuffer to texture, using the unsized internal format. DoBindFramebuffer(GL_FRAMEBUFFER, 0, 0); GLenum internal_format = kUnsizedInternalFormats[i].unsized; @@ -1691,7 +1689,7 @@ }, }; - for (size_t ii = 0; ii < base::size(test_data); ++ii) { + for (size_t ii = 0; ii < std::size(test_data); ++ii) { const S3TCTestData& test = test_data[ii]; cmds::CompressedTexImage2DBucket cmd; // test small width. @@ -1848,7 +1846,7 @@ }, }; - for (size_t ii = 0; ii < base::size(test_data); ++ii) { + for (size_t ii = 0; ii < std::size(test_data); ++ii) { const S3TCTestData& test = test_data[ii]; cmds::CompressedTexImage2DBucket cmd; // test small width.
diff --git a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h index 2c64847..22af6b8 100644 --- a/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/gles2_cmd_validation_implementation_autogen.h
@@ -1303,168 +1303,167 @@ } Validators::Validators() - : attachment(valid_attachment_table, base::size(valid_attachment_table)), + : attachment(valid_attachment_table, std::size(valid_attachment_table)), attachment_query(valid_attachment_query_table, - base::size(valid_attachment_query_table)), - bufferfi(valid_bufferfi_table, base::size(valid_bufferfi_table)), - bufferuiv(valid_bufferuiv_table, base::size(valid_bufferuiv_table)), - capability(valid_capability_table, base::size(valid_capability_table)), + std::size(valid_attachment_query_table)), + bufferfi(valid_bufferfi_table, std::size(valid_bufferfi_table)), + bufferuiv(valid_bufferuiv_table, std::size(valid_bufferuiv_table)), + capability(valid_capability_table, std::size(valid_capability_table)), compressed_texture_format(), coverage_modulation_components( valid_coverage_modulation_components_table, - base::size(valid_coverage_modulation_components_table)), + std::size(valid_coverage_modulation_components_table)), dst_blend_factor(valid_dst_blend_factor_table, - base::size(valid_dst_blend_factor_table)), - equation(valid_equation_table, base::size(valid_equation_table)), + std::size(valid_dst_blend_factor_table)), + equation(valid_equation_table, std::size(valid_equation_table)), framebuffer_attachment_parameter( valid_framebuffer_attachment_parameter_table, - base::size(valid_framebuffer_attachment_parameter_table)), + std::size(valid_framebuffer_attachment_parameter_table)), framebuffer_parameter(), framebuffer_target(valid_framebuffer_target_table, - base::size(valid_framebuffer_target_table)), - g_l_state(valid_g_l_state_table, base::size(valid_g_l_state_table)), + std::size(valid_framebuffer_target_table)), + g_l_state(valid_g_l_state_table, std::size(valid_g_l_state_table)), get_tex_param_target(valid_get_tex_param_target_table, - base::size(valid_get_tex_param_target_table)), - hint_target(valid_hint_target_table, base::size(valid_hint_target_table)), + std::size(valid_get_tex_param_target_table)), + hint_target(valid_hint_target_table, std::size(valid_hint_target_table)), image_internal_format(valid_image_internal_format_table, - base::size(valid_image_internal_format_table)), - index_type(valid_index_type_table, base::size(valid_index_type_table)), + std::size(valid_image_internal_format_table)), + index_type(valid_index_type_table, std::size(valid_index_type_table)), indexed_g_l_state(valid_indexed_g_l_state_table, - base::size(valid_indexed_g_l_state_table)), - pixel_store(valid_pixel_store_table, base::size(valid_pixel_store_table)), - pixel_type(valid_pixel_type_table, base::size(valid_pixel_type_table)), + std::size(valid_indexed_g_l_state_table)), + pixel_store(valid_pixel_store_table, std::size(valid_pixel_store_table)), + pixel_type(valid_pixel_type_table, std::size(valid_pixel_type_table)), program_parameter(valid_program_parameter_table, - base::size(valid_program_parameter_table)), - read_buffer(valid_read_buffer_table, base::size(valid_read_buffer_table)), + std::size(valid_program_parameter_table)), + read_buffer(valid_read_buffer_table, std::size(valid_read_buffer_table)), read_pixel_format(valid_read_pixel_format_table, - base::size(valid_read_pixel_format_table)), + std::size(valid_read_pixel_format_table)), read_pixel_type(valid_read_pixel_type_table, - base::size(valid_read_pixel_type_table)), + std::size(valid_read_pixel_type_table)), render_buffer_format(valid_render_buffer_format_table, - base::size(valid_render_buffer_format_table)), + std::size(valid_render_buffer_format_table)), render_buffer_parameter(valid_render_buffer_parameter_table, - base::size(valid_render_buffer_parameter_table)), + std::size(valid_render_buffer_parameter_table)), render_buffer_target(valid_render_buffer_target_table, - base::size(valid_render_buffer_target_table)), + std::size(valid_render_buffer_target_table)), sampler_parameter(valid_sampler_parameter_table, - base::size(valid_sampler_parameter_table)), + std::size(valid_sampler_parameter_table)), shader_binary_format(), shader_parameter(valid_shader_parameter_table, - base::size(valid_shader_parameter_table)), + std::size(valid_shader_parameter_table)), src_blend_factor(valid_src_blend_factor_table, - base::size(valid_src_blend_factor_table)), + std::size(valid_src_blend_factor_table)), sync_flush_flags(valid_sync_flush_flags_table, - base::size(valid_sync_flush_flags_table)), + std::size(valid_sync_flush_flags_table)), texture_bind_target(valid_texture_bind_target_table, - base::size(valid_texture_bind_target_table)), + std::size(valid_texture_bind_target_table)), texture_compare_mode(valid_texture_compare_mode_table, - base::size(valid_texture_compare_mode_table)), + std::size(valid_texture_compare_mode_table)), texture_depth_renderable_internal_format(), texture_fbo_target(valid_texture_fbo_target_table, - base::size(valid_texture_fbo_target_table)), + std::size(valid_texture_fbo_target_table)), texture_format(valid_texture_format_table, - base::size(valid_texture_format_table)), + std::size(valid_texture_format_table)), texture_internal_format(valid_texture_internal_format_table, - base::size(valid_texture_internal_format_table)), + std::size(valid_texture_internal_format_table)), texture_internal_format_storage( valid_texture_internal_format_storage_table, - base::size(valid_texture_internal_format_storage_table)), + std::size(valid_texture_internal_format_storage_table)), texture_parameter(valid_texture_parameter_table, - base::size(valid_texture_parameter_table)), + std::size(valid_texture_parameter_table)), texture_sized_color_renderable_internal_format( valid_texture_sized_color_renderable_internal_format_table, - base::size( + std::size( valid_texture_sized_color_renderable_internal_format_table)), texture_sized_texture_filterable_internal_format( valid_texture_sized_texture_filterable_internal_format_table, - base::size( + std::size( valid_texture_sized_texture_filterable_internal_format_table)), texture_stencil_renderable_internal_format(), texture_target(valid_texture_target_table, - base::size(valid_texture_target_table)), + std::size(valid_texture_target_table)), texture_unsized_internal_format( valid_texture_unsized_internal_format_table, - base::size(valid_texture_unsized_internal_format_table)), + std::size(valid_texture_unsized_internal_format_table)), transform_feedback_bind_target( valid_transform_feedback_bind_target_table, - base::size(valid_transform_feedback_bind_target_table)), + std::size(valid_transform_feedback_bind_target_table)), vertex_attrib_type(valid_vertex_attrib_type_table, - base::size(valid_vertex_attrib_type_table)), + std::size(valid_vertex_attrib_type_table)), vertex_attribute(valid_vertex_attribute_table, - base::size(valid_vertex_attribute_table)), + std::size(valid_vertex_attribute_table)), vertex_pointer(valid_vertex_pointer_table, - base::size(valid_vertex_pointer_table)) {} + std::size(valid_vertex_pointer_table)) {} void Validators::UpdateValuesES3() { attachment.AddValues(valid_attachment_table_es3, - base::size(valid_attachment_table_es3)); + std::size(valid_attachment_table_es3)); attachment_query.AddValues(valid_attachment_query_table_es3, - base::size(valid_attachment_query_table_es3)); + std::size(valid_attachment_query_table_es3)); buffer_parameter.SetIsES3(true); buffer_target.SetIsES3(true); buffer_usage.SetIsES3(true); capability.AddValues(valid_capability_table_es3, - base::size(valid_capability_table_es3)); + std::size(valid_capability_table_es3)); dst_blend_factor.AddValues(valid_dst_blend_factor_table_es3, - base::size(valid_dst_blend_factor_table_es3)); + std::size(valid_dst_blend_factor_table_es3)); equation.AddValues(valid_equation_table_es3, - base::size(valid_equation_table_es3)); + std::size(valid_equation_table_es3)); framebuffer_attachment_parameter.AddValues( valid_framebuffer_attachment_parameter_table_es3, - base::size(valid_framebuffer_attachment_parameter_table_es3)); + std::size(valid_framebuffer_attachment_parameter_table_es3)); framebuffer_target.AddValues(valid_framebuffer_target_table_es3, - base::size(valid_framebuffer_target_table_es3)); + std::size(valid_framebuffer_target_table_es3)); g_l_state.AddValues(valid_g_l_state_table_es3, - base::size(valid_g_l_state_table_es3)); + std::size(valid_g_l_state_table_es3)); get_tex_param_target.AddValues( valid_get_tex_param_target_table_es3, - base::size(valid_get_tex_param_target_table_es3)); + std::size(valid_get_tex_param_target_table_es3)); hint_target.AddValues(valid_hint_target_table_es3, - base::size(valid_hint_target_table_es3)); + std::size(valid_hint_target_table_es3)); index_type.AddValues(valid_index_type_table_es3, - base::size(valid_index_type_table_es3)); + std::size(valid_index_type_table_es3)); pixel_store.AddValues(valid_pixel_store_table_es3, - base::size(valid_pixel_store_table_es3)); + std::size(valid_pixel_store_table_es3)); pixel_type.AddValues(valid_pixel_type_table_es3, - base::size(valid_pixel_type_table_es3)); + std::size(valid_pixel_type_table_es3)); program_parameter.AddValues(valid_program_parameter_table_es3, - base::size(valid_program_parameter_table_es3)); + std::size(valid_program_parameter_table_es3)); read_pixel_format.AddValues(valid_read_pixel_format_table_es3, - base::size(valid_read_pixel_format_table_es3)); + std::size(valid_read_pixel_format_table_es3)); read_pixel_type.AddValues(valid_read_pixel_type_table_es3, - base::size(valid_read_pixel_type_table_es3)); + std::size(valid_read_pixel_type_table_es3)); render_buffer_format.AddValues( valid_render_buffer_format_table_es3, - base::size(valid_render_buffer_format_table_es3)); + std::size(valid_render_buffer_format_table_es3)); render_buffer_parameter.AddValues( valid_render_buffer_parameter_table_es3, - base::size(valid_render_buffer_parameter_table_es3)); - texture_bind_target.AddValues( - valid_texture_bind_target_table_es3, - base::size(valid_texture_bind_target_table_es3)); + std::size(valid_render_buffer_parameter_table_es3)); + texture_bind_target.AddValues(valid_texture_bind_target_table_es3, + std::size(valid_texture_bind_target_table_es3)); texture_depth_renderable_internal_format.AddValues( valid_texture_depth_renderable_internal_format_table_es3, - base::size(valid_texture_depth_renderable_internal_format_table_es3)); + std::size(valid_texture_depth_renderable_internal_format_table_es3)); texture_format.AddValues(valid_texture_format_table_es3, - base::size(valid_texture_format_table_es3)); + std::size(valid_texture_format_table_es3)); texture_internal_format.AddValues( valid_texture_internal_format_table_es3, - base::size(valid_texture_internal_format_table_es3)); + std::size(valid_texture_internal_format_table_es3)); texture_internal_format_storage.RemoveValues( deprecated_texture_internal_format_storage_table_es3, - base::size(deprecated_texture_internal_format_storage_table_es3)); + std::size(deprecated_texture_internal_format_storage_table_es3)); texture_internal_format_storage.AddValues( valid_texture_internal_format_storage_table_es3, - base::size(valid_texture_internal_format_storage_table_es3)); + std::size(valid_texture_internal_format_storage_table_es3)); texture_parameter.AddValues(valid_texture_parameter_table_es3, - base::size(valid_texture_parameter_table_es3)); + std::size(valid_texture_parameter_table_es3)); texture_stencil_renderable_internal_format.AddValues( valid_texture_stencil_renderable_internal_format_table_es3, - base::size(valid_texture_stencil_renderable_internal_format_table_es3)); + std::size(valid_texture_stencil_renderable_internal_format_table_es3)); vertex_attrib_type.AddValues(valid_vertex_attrib_type_table_es3, - base::size(valid_vertex_attrib_type_table_es3)); + std::size(valid_vertex_attrib_type_table_es3)); vertex_attribute.AddValues(valid_vertex_attribute_table_es3, - base::size(valid_vertex_attribute_table_es3)); + std::size(valid_vertex_attribute_table_es3)); } void Validators::UpdateETCCompressedTextureFormats() {
diff --git a/gpu/command_buffer/service/gpu_tracer.cc b/gpu/command_buffer/service/gpu_tracer.cc index 62befc7..df067f4 100644 --- a/gpu/command_buffer/service/gpu_tracer.cc +++ b/gpu/command_buffer/service/gpu_tracer.cc
@@ -8,7 +8,6 @@ #include <stdint.h> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -32,7 +31,7 @@ "TraceCmd", // kTraceDecoder, "Disjoint", // kTraceDisjoint, // Used internally. }; -static_assert(NUM_TRACER_SOURCES == base::size(kGpuTraceSourceNames), +static_assert(NUM_TRACER_SOURCES == std::size(kGpuTraceSourceNames), "Trace source names must match enumeration."); TraceMarker::TraceMarker(const std::string& category, const std::string& name)
diff --git a/gpu/command_buffer/service/program_manager.cc b/gpu/command_buffer/service/program_manager.cc index 1b128f0..39fbae2 100644 --- a/gpu/command_buffer/service/program_manager.cc +++ b/gpu/command_buffer/service/program_manager.cc
@@ -15,7 +15,6 @@ #include <vector> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/safe_math.h" @@ -97,7 +96,7 @@ "gl_FrontFacing", "gl_PointCoord" }; - for (size_t ii = 0; ii < base::size(kBuiltInVaryings); ++ii) { + for (size_t ii = 0; ii < std::size(kBuiltInVaryings); ++ii) { if (name == kBuiltInVaryings[ii]) return true; } @@ -2385,7 +2384,7 @@ GL_UNIFORM_IS_ROW_MAJOR, }; const GLint kDefaultValue[] = { -1, -1, -1, -1, 0 }; - const size_t kNumPnames = base::size(kPname); + const size_t kNumPnames = std::size(kPname); std::vector<GLuint> indices(count); for (GLsizei ii = 0; ii < count; ++ii) { indices[ii] = ii;
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc index cf0768d..d7251ed 100644 --- a/gpu/command_buffer/service/program_manager_unittest.cc +++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -11,7 +11,6 @@ #include <memory> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" @@ -526,7 +525,7 @@ #endif const size_t ProgramManagerWithShaderTest::kNumAttribs = - base::size(ProgramManagerWithShaderTest::kAttribs); + std::size(ProgramManagerWithShaderTest::kAttribs); ProgramManagerWithShaderTest::UniformInfo ProgramManagerWithShaderTest::kUniforms[] = { @@ -557,7 +556,7 @@ }; const size_t ProgramManagerWithShaderTest::kNumUniforms = - base::size(ProgramManagerWithShaderTest::kUniforms); + std::size(ProgramManagerWithShaderTest::kUniforms); const char* ProgramManagerWithShaderTest::kAttrib1Name = "attrib1"; const char* ProgramManagerWithShaderTest::kAttrib2Name = "attrib2"; @@ -820,7 +819,7 @@ kUniform3NameWithArrayIndex, }, }; - const size_t kNumUniforms = base::size(kUniforms); + const size_t kNumUniforms = std::size(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); Shader* vshader = shader_manager_.CreateShader( @@ -884,7 +883,7 @@ kUniform3Name, }, }; - const size_t kNumUniforms = base::size(kUniforms); + const size_t kNumUniforms = std::size(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); Shader* vshader = shader_manager_.CreateShader( @@ -985,8 +984,8 @@ kUniform3NameWithArrayIndex, }, }; - const size_t kNumAttribs = base::size(kAttribs); - const size_t kNumUniforms = base::size(kUniforms); + const size_t kNumAttribs = std::size(kAttribs); + const size_t kNumUniforms = std::size(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); Program* program = @@ -1136,8 +1135,8 @@ bucket.GetDataAs<ProgramInfoHeader*>(0, sizeof(ProgramInfoHeader)); ASSERT_TRUE(header != nullptr); EXPECT_EQ(1u, header->link_status); - EXPECT_EQ(base::size(kAttribs), header->num_attribs); - EXPECT_EQ(base::size(kUniforms), header->num_uniforms); + EXPECT_EQ(std::size(kAttribs), header->num_attribs); + EXPECT_EQ(std::size(kUniforms), header->num_uniforms); const ProgramInput* inputs = bucket.GetDataAs<const ProgramInput*>( sizeof(*header), sizeof(ProgramInput) * (header->num_attribs + header->num_uniforms)); @@ -1238,23 +1237,23 @@ data.entry[0].binding = 0; data.entry[0].data_size = 8; data.entry[0].name_offset = ComputeOffset(&data, data.name0); - data.entry[0].name_length = base::size(data.name0); - data.entry[0].active_uniforms = base::size(data.indices0); + data.entry[0].name_length = std::size(data.name0); + data.entry[0].active_uniforms = std::size(data.indices0); data.entry[0].active_uniform_offset = ComputeOffset(&data, data.indices0); data.entry[0].referenced_by_vertex_shader = static_cast<uint32_t>(true); data.entry[0].referenced_by_fragment_shader = static_cast<uint32_t>(false); data.entry[1].binding = 1; data.entry[1].data_size = 4; data.entry[1].name_offset = ComputeOffset(&data, data.name1); - data.entry[1].name_length = base::size(data.name1); - data.entry[1].active_uniforms = base::size(data.indices1); + data.entry[1].name_length = std::size(data.name1); + data.entry[1].active_uniforms = std::size(data.indices1); data.entry[1].active_uniform_offset = ComputeOffset(&data, data.indices1); data.entry[1].referenced_by_vertex_shader = static_cast<uint32_t>(false); data.entry[1].referenced_by_fragment_shader = static_cast<uint32_t>(true); - memcpy(data.name0, kName[0], base::size(data.name0)); + memcpy(data.name0, kName[0], std::size(data.name0)); data.indices0[0] = kIndices[0][0]; data.indices0[1] = kIndices[0][1]; - memcpy(data.name1, kName[1], base::size(data.name1)); + memcpy(data.name1, kName[1], std::size(data.name1)); data.indices1[0] = kIndices[1][0]; EXPECT_CALL(*(gl_.get()), @@ -1401,13 +1400,13 @@ data.entry[0].size = 1; data.entry[0].type = GL_FLOAT_VEC2; data.entry[0].name_offset = ComputeOffset(&data, data.name0); - data.entry[0].name_length = base::size(data.name0); + data.entry[0].name_length = std::size(data.name0); data.entry[1].size = 2; data.entry[1].type = GL_FLOAT; data.entry[1].name_offset = ComputeOffset(&data, data.name1); - data.entry[1].name_length = base::size(data.name1); - memcpy(data.name0, kName[0], base::size(data.name0)); - memcpy(data.name1, kName[1], base::size(data.name1)); + data.entry[1].name_length = std::size(data.name1); + memcpy(data.name0, kName[0], std::size(data.name0)); + memcpy(data.name1, kName[1], std::size(data.name1)); EXPECT_CALL(*(gl_.get()), GetProgramiv(kServiceProgramId, @@ -1528,7 +1527,7 @@ kMatrixStride, kIsRowMajor, }; - const size_t kNumIterations = base::size(kPname); + const size_t kNumIterations = std::size(kPname); for (size_t ii = 0; ii < kNumIterations; ++ii) { EXPECT_CALL(*(gl_.get()), GetActiveUniformsiv( @@ -1554,7 +1553,7 @@ ASSERT_TRUE(program != nullptr); // Emulate the situation that only the first element has a valid location. // TODO(zmo): Don't assume these are in order. - for (size_t ii = 0; ii < base::size(kUniforms); ++ii) { + for (size_t ii = 0; ii < std::size(kUniforms); ++ii) { Program::UniformInfo* uniform = const_cast<Program::UniformInfo*>( program->GetUniformInfo(ii)); ASSERT_TRUE(uniform != nullptr); @@ -1568,8 +1567,8 @@ bucket.GetDataAs<ProgramInfoHeader*>(0, sizeof(ProgramInfoHeader)); ASSERT_TRUE(header != nullptr); EXPECT_EQ(1u, header->link_status); - EXPECT_EQ(base::size(kAttribs), header->num_attribs); - EXPECT_EQ(base::size(kUniforms), header->num_uniforms); + EXPECT_EQ(std::size(kAttribs), header->num_attribs); + EXPECT_EQ(std::size(kUniforms), header->num_uniforms); const ProgramInput* inputs = bucket.GetDataAs<const ProgramInput*>( sizeof(*header), sizeof(ProgramInput) * (header->num_attribs + header->num_uniforms)); @@ -2011,7 +2010,7 @@ GL_SAMPLER_3D_OES, GL_SAMPLER_2D_RECT_ARB, }; - const size_t kNumSamplerTypes = base::size(kSamplerTypes); + const size_t kNumSamplerTypes = std::size(kSamplerTypes); for (size_t ii = 0; ii < kNumSamplerTypes; ++ii) { static ProgramManagerWithShaderTest::AttribInfo kAttribs[] = { { kAttrib1Name, kAttrib1Size, kAttrib1Type, kAttrib1Location, }, @@ -2044,8 +2043,8 @@ kUniform3NameWithArrayIndex, }, }; - const size_t kNumAttribs = base::size(kAttribs); - const size_t kNumUniforms = base::size(kUniforms); + const size_t kNumAttribs = std::size(kAttribs); + const size_t kNumUniforms = std::size(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); @@ -2109,8 +2108,8 @@ }, }; - const size_t kNumAttribs = base::size(kAttribs); - const size_t kNumUniforms = base::size(kUniforms); + const size_t kNumAttribs = std::size(kAttribs); + const size_t kNumUniforms = std::size(kUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kUniforms, kNumUniforms, kServiceProgramId); program->Link(nullptr, Program::kCountOnlyStaticallyUsed, this); @@ -2131,7 +2130,7 @@ kUniform1DesiredLocation, kUniform1Name, }, }; - const size_t kNumInvalidUniforms = base::size(kInvalidUniforms); + const size_t kNumInvalidUniforms = std::size(kInvalidUniforms); SetupShaderExpectations(kAttribs, kNumAttribs, kInvalidUniforms, kNumInvalidUniforms, kServiceProgramId); @@ -2446,7 +2445,7 @@ int shader_version = 100; Program* program = SetupProgramForVariables(nullptr, 0, kFragmentVaryings, - base::size(kFragmentVaryings), &shader_version); + std::size(kFragmentVaryings), &shader_version); const gl::GLVersionInfo& gl_version = feature_info_->gl_version_info(); if (!gl_version.is_es) { @@ -2473,7 +2472,7 @@ int shader_version = 100; Program* program = SetupProgramForVariables(nullptr, 0, kFragmentVaryings, - base::size(kFragmentVaryings), &shader_version); + std::size(kFragmentVaryings), &shader_version); const gl::GLVersionInfo& gl_version = feature_info_->gl_version_info(); if (!gl_version.is_es) {
diff --git a/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h index 4c34cae7..d2517c0c 100644 --- a/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/raster_cmd_validation_implementation_autogen.h
@@ -96,18 +96,18 @@ }; Validators::Validators() - : g_l_state(valid_g_l_state_table, base::size(valid_g_l_state_table)), + : g_l_state(valid_g_l_state_table, std::size(valid_g_l_state_table)), texture_mag_filter_mode(valid_texture_mag_filter_mode_table, - base::size(valid_texture_mag_filter_mode_table)), + std::size(valid_texture_mag_filter_mode_table)), texture_min_filter_mode(valid_texture_min_filter_mode_table, - base::size(valid_texture_min_filter_mode_table)), + std::size(valid_texture_min_filter_mode_table)), texture_parameter(valid_texture_parameter_table, - base::size(valid_texture_parameter_table)), + std::size(valid_texture_parameter_table)), texture_wrap_mode(valid_texture_wrap_mode_table, - base::size(valid_texture_wrap_mode_table)), + std::size(valid_texture_wrap_mode_table)), gfx_buffer_usage(valid_gfx_buffer_usage_table, - base::size(valid_gfx_buffer_usage_table)), + std::size(valid_gfx_buffer_usage_table)), viz_resource_format(valid_viz_resource_format_table, - base::size(valid_viz_resource_format_table)) {} + std::size(valid_viz_resource_format_table)) {} #endif // GPU_COMMAND_BUFFER_SERVICE_RASTER_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/raster_decoder.cc b/gpu/command_buffer/service/raster_decoder.cc index f0e4439c..37f4c50 100644 --- a/gpu/command_buffer/service/raster_decoder.cc +++ b/gpu/command_buffer/service/raster_decoder.cc
@@ -15,7 +15,6 @@ #include "base/atomic_sequence_num.h" #include "base/bind.h" #include "base/containers/flat_map.h" -#include "base/cxx17_backports.h" #include "base/debug/crash_logging.h" #include "base/logging.h" #include "base/memory/raw_ptr.h" @@ -1574,7 +1573,7 @@ const unsigned int arg_count = size - 1; unsigned int command_index = command - kFirstRasterCommand; - if (command_index < base::size(command_info)) { + if (command_index < std::size(command_info)) { const CommandInfo& info = command_info[command_index]; if (sk_surface_) { if (!AllowedBetweenBeginEndRaster(command)) {
diff --git a/gpu/command_buffer/service/sync_point_manager.cc b/gpu/command_buffer/service/sync_point_manager.cc index f022b7e..1f8c8fe 100644 --- a/gpu/command_buffer/service/sync_point_manager.cc +++ b/gpu/command_buffer/service/sync_point_manager.cc
@@ -9,7 +9,6 @@ #include <stdint.h> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/ref_counted.h" @@ -370,8 +369,7 @@ { base::AutoLock auto_lock(lock_); DCHECK_GE(namespace_id, 0); - DCHECK_LT(static_cast<size_t>(namespace_id), - base::size(client_state_maps_)); + DCHECK_LT(static_cast<size_t>(namespace_id), std::size(client_state_maps_)); DCHECK(!client_state_maps_[namespace_id].count(command_buffer_id)); client_state_maps_[namespace_id].insert( std::make_pair(command_buffer_id, client_state)); @@ -385,7 +383,7 @@ CommandBufferId command_buffer_id) { base::AutoLock auto_lock(lock_); DCHECK_GE(namespace_id, 0); - DCHECK_LT(static_cast<size_t>(namespace_id), base::size(client_state_maps_)); + DCHECK_LT(static_cast<size_t>(namespace_id), std::size(client_state_maps_)); DCHECK(client_state_maps_[namespace_id].count(command_buffer_id)); client_state_maps_[namespace_id].erase(command_buffer_id); } @@ -475,8 +473,7 @@ CommandBufferNamespace namespace_id, CommandBufferId command_buffer_id) { if (namespace_id >= 0) { - DCHECK_LT(static_cast<size_t>(namespace_id), - base::size(client_state_maps_)); + DCHECK_LT(static_cast<size_t>(namespace_id), std::size(client_state_maps_)); base::AutoLock auto_lock(lock_); ClientStateMap& client_state_map = client_state_maps_[namespace_id]; auto it = client_state_map.find(command_buffer_id);
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc index 1f86e16..b7566dc 100644 --- a/gpu/command_buffer/service/test_helper.cc +++ b/gpu/command_buffer/service/test_helper.cc
@@ -10,7 +10,6 @@ #include <algorithm> #include <string> -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "build/build_config.h" #include "gpu/command_buffer/service/buffer_manager.h" @@ -176,7 +175,7 @@ GL_TEXTURE_CUBE_MAP_POSITIVE_Z, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z, }; - for (size_t face = 0; face < base::size(faces); ++face) { + for (size_t face = 0; face < std::size(faces); ++face) { EXPECT_CALL(*gl, TexImage2D(faces[face], 0, GL_RGBA, 1, 1, 0, GL_RGBA, GL_UNSIGNED_BYTE, _)) .Times(1)
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc index 8985b7c7..b20b875 100644 --- a/gpu/command_buffer/service/texture_manager.cc +++ b/gpu/command_buffer/service/texture_manager.cc
@@ -13,7 +13,6 @@ #include <utility> #include "base/bits.h" -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/lazy_instance.h" #include "base/memory/raw_ptr.h" @@ -262,11 +261,11 @@ {GL_RG, GL_RG, GL_HALF_FLOAT_OES}, }; - for (size_t ii = 0; ii < base::size(kSupportedFormatTypes); ++ii) { + for (size_t ii = 0; ii < std::size(kSupportedFormatTypes); ++ii) { supported_combinations_.insert(kSupportedFormatTypes[ii]); } - for (size_t ii = 0; ii < base::size(kSupportedFormatTypesES2Only); ++ii) { + for (size_t ii = 0; ii < std::size(kSupportedFormatTypesES2Only); ++ii) { supported_combinations_es2_only_.insert(kSupportedFormatTypesES2Only[ii]); } } @@ -316,7 +315,7 @@ const Texture::CompatibilitySwizzle* GetCompatibilitySwizzleInternal( GLenum format) { - size_t count = base::size(kSwizzledFormats); + size_t count = std::size(kSwizzledFormats); for (size_t i = 0; i < count; ++i) { if (kSwizzledFormats[i].format == format) return &kSwizzledFormats[i]; @@ -500,7 +499,7 @@ } if (have_context_) { - glDeleteTextures(base::size(black_texture_ids_), black_texture_ids_); + glDeleteTextures(std::size(black_texture_ids_), black_texture_ids_); } DCHECK_EQ(0u, memory_type_tracker_->GetMemRepresented());
diff --git a/gpu/command_buffer/service/webgpu_cmd_validation_implementation_autogen.h b/gpu/command_buffer/service/webgpu_cmd_validation_implementation_autogen.h index 756d10e..3f4a738 100644 --- a/gpu/command_buffer/service/webgpu_cmd_validation_implementation_autogen.h +++ b/gpu/command_buffer/service/webgpu_cmd_validation_implementation_autogen.h
@@ -24,8 +24,8 @@ Validators::Validators() : mailbox_flags(valid_mailbox_flags_table, - base::size(valid_mailbox_flags_table)), + std::size(valid_mailbox_flags_table)), power_preference(valid_power_preference_table, - base::size(valid_power_preference_table)) {} + std::size(valid_power_preference_table)) {} #endif // GPU_COMMAND_BUFFER_SERVICE_WEBGPU_CMD_VALIDATION_IMPLEMENTATION_AUTOGEN_H_
diff --git a/gpu/command_buffer/service/webgpu_decoder_impl.cc b/gpu/command_buffer/service/webgpu_decoder_impl.cc index 28295df..67126e2d 100644 --- a/gpu/command_buffer/service/webgpu_decoder_impl.cc +++ b/gpu/command_buffer/service/webgpu_decoder_impl.cc
@@ -1368,7 +1368,7 @@ const unsigned int arg_count = size - 1; unsigned int command_index = command - kFirstWebGPUCommand; - if (command_index < base::size(command_info)) { + if (command_index < std::size(command_info)) { // Prevent all further WebGPU commands from being processed if the server // is destroyed. if (destroyed_) {
diff --git a/gpu/command_buffer/tests/fuzzer_main.cc b/gpu/command_buffer/tests/fuzzer_main.cc index b3d77d0..bab0876e 100644 --- a/gpu/command_buffer/tests/fuzzer_main.cc +++ b/gpu/command_buffer/tests/fuzzer_main.cc
@@ -12,7 +12,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/i18n/icu_util.h" #include "base/logging.h" #include "base/memory/ref_counted.h" @@ -187,7 +186,7 @@ "GL_OES_texture_half_float_linear", "GL_OES_texture_npot", "GL_OES_vertex_array_object"}; -constexpr size_t kExtensionCount = base::size(kExtensions); +constexpr size_t kExtensionCount = std::size(kExtensions); #if defined(GPU_FUZZER_USE_STUB) constexpr const char* kDriverVersions[] = {"OpenGL ES 2.0", "OpenGL ES 3.1",
diff --git a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc index 0f6fd94..6333588 100644 --- a/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc +++ b/gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
@@ -13,7 +13,6 @@ #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "build/build_config.h" #include "gpu/command_buffer/tests/gl_manager.h" @@ -1016,7 +1015,7 @@ // Check unsupported format reports error. GLint unsupported_dest_formats[] = {GL_RED, GL_RG}; - for (size_t dest_index = 0; dest_index < base::size(unsupported_dest_formats); + for (size_t dest_index = 0; dest_index < std::size(unsupported_dest_formats); dest_index++) { if (copy_type == TexImage) { glCopyTextureCHROMIUM(textures_[0], 0, GL_TEXTURE_2D, textures_[1], 0, @@ -1056,7 +1055,7 @@ {GL_RGB, GL_UNSIGNED_SHORT_5_5_5_1}, {GL_RGBA, GL_UNSIGNED_SHORT_5_6_5}, }; - for (size_t dest_index = 0; dest_index < base::size(unsupported_format_types); + for (size_t dest_index = 0; dest_index < std::size(unsupported_format_types); dest_index++) { glCopyTextureCHROMIUM(textures_[0], 0, GL_TEXTURE_2D, textures_[1], 0, unsupported_format_types[dest_index].format, @@ -1804,9 +1803,9 @@ uint8_t white[1 * 4] = {255u, 255u, 255u, 255u}; uint8_t grey[1 * 4] = {199u, 199u, 199u, 255u}; - for (size_t src_index = 0; src_index < base::size(src_targets); src_index++) { + for (size_t src_index = 0; src_index < std::size(src_targets); src_index++) { GLenum src_target = src_targets[src_index]; - for (size_t dest_index = 0; dest_index < base::size(dest_targets); + for (size_t dest_index = 0; dest_index < std::size(dest_targets); dest_index++) { GLenum dest_target = dest_targets[dest_index];
diff --git a/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc b/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc index 4c092dc..d68c70f 100644 --- a/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc +++ b/gpu/command_buffer/tests/gl_cube_map_texture_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "gpu/command_buffer/tests/gl_manager.h" #include "gpu/command_buffer/tests/gl_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -92,7 +91,7 @@ EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError()); // Make a cube texture complete - for (unsigned i = 0; i < base::size(kCubeMapTextureTargets); i++) { + for (unsigned i = 0; i < std::size(kCubeMapTextureTargets); i++) { glTexImage2D(kCubeMapTextureTargets[i], 0, GL_RGBA, width_, width_, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels_); EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), glGetError());
diff --git a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc index df76a540..5f42ccf 100644 --- a/gpu/command_buffer/tests/gl_depth_texture_unittest.cc +++ b/gpu/command_buffer/tests/gl_depth_texture_unittest.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" #include "gpu/command_buffer/tests/gl_manager.h" #include "gpu/command_buffer/tests/gl_test_utils.h" #include "testing/gmock/include/gmock/gmock.h" @@ -134,7 +133,7 @@ { GL_DEPTH_COMPONENT, GL_UNSIGNED_INT }, { GL_DEPTH_STENCIL_OES, GL_UNSIGNED_INT_24_8_OES }, }; - for (size_t ii = 0; ii < base::size(format_types); ++ii) { + for (size_t ii = 0; ii < std::size(format_types); ++ii) { const FormatType& format_type = format_types[ii]; GLenum format = format_type.format; GLenum type = format_type.type;
diff --git a/gpu/command_buffer/tests/gl_helper_benchmark.cc b/gpu/command_buffer/tests/gl_helper_benchmark.cc index ea38c3f..a19cbb1 100644 --- a/gpu/command_buffer/tests/gl_helper_benchmark.cc +++ b/gpu/command_buffer/tests/gl_helper_benchmark.cc
@@ -21,7 +21,6 @@ #include "base/at_exit.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" @@ -138,9 +137,9 @@ int input_sizes[] = {3200, 2040, 2560, 1476, // Pixel tab size 1920, 1080, 1280, 720, 800, 480, 256, 144}; - for (size_t q = 0; q < base::size(kQualities); q++) { - for (size_t outsize = 0; outsize < base::size(output_sizes); outsize += 2) { - for (size_t insize = 0; insize < base::size(input_sizes); insize += 2) { + for (size_t q = 0; q < std::size(kQualities); q++) { + for (size_t outsize = 0; outsize < std::size(output_sizes); outsize += 2) { + for (size_t insize = 0; insize < std::size(input_sizes); insize += 2) { uint32_t src_texture; gl_->GenTextures(1, &src_texture); uint32_t dst_texture;
diff --git a/gpu/command_buffer/tests/gl_helper_unittest.cc b/gpu/command_buffer/tests/gl_helper_unittest.cc index 937dec3..5d47af6 100644 --- a/gpu/command_buffer/tests/gl_helper_unittest.cc +++ b/gpu/command_buffer/tests/gl_helper_unittest.cc
@@ -1352,20 +1352,20 @@ All, GLHelperPixelReadbackTest, ::testing::Combine( - ::testing::Range<unsigned int>(0, base::size(kQualities)), - ::testing::Range<unsigned int>(0, base::size(kRGBReadBackSizes)), - ::testing::Range<unsigned int>(0, base::size(kRGBReadBackSizes)), - ::testing::Range<unsigned int>(0, base::size(kRGBReadBackSizes)), - ::testing::Range<unsigned int>(0, base::size(kRGBReadBackSizes)))); + ::testing::Range<unsigned int>(0, std::size(kQualities)), + ::testing::Range<unsigned int>(0, std::size(kRGBReadBackSizes)), + ::testing::Range<unsigned int>(0, std::size(kRGBReadBackSizes)), + ::testing::Range<unsigned int>(0, std::size(kRGBReadBackSizes)), + ::testing::Range<unsigned int>(0, std::size(kRGBReadBackSizes)))); // Validate that all scaling generates valid pipelines. TEST_F(GLHelperTest, ValidateScalerPipelines) { int sizes[] = {7, 99, 128, 256, 512, 719, 720, 721, 1920, 2011, 3217, 4096}; - for (size_t q = 0; q < base::size(kQualities); q++) { - for (size_t x = 0; x < base::size(sizes); x++) { - for (size_t y = 0; y < base::size(sizes); y++) { - for (size_t dst_x = 0; dst_x < base::size(sizes); dst_x++) { - for (size_t dst_y = 0; dst_y < base::size(sizes); dst_y++) { + for (size_t q = 0; q < std::size(kQualities); q++) { + for (size_t x = 0; x < std::size(sizes); x++) { + for (size_t y = 0; y < std::size(sizes); y++) { + for (size_t dst_x = 0; dst_x < std::size(sizes); dst_x++) { + for (size_t dst_y = 0; dst_y < std::size(sizes); dst_y++) { TestScalerPipeline(q, sizes[x], sizes[y], sizes[dst_x], sizes[dst_y]); if (HasFailure()) {
diff --git a/gpu/config/gpu_control_list_entry_unittest.cc b/gpu/config/gpu_control_list_entry_unittest.cc index ff94f779..cdd3006 100644 --- a/gpu/config/gpu_control_list_entry_unittest.cc +++ b/gpu/config/gpu_control_list_entry_unittest.cc
@@ -4,7 +4,6 @@ #include <stddef.h> -#include "base/cxx17_backports.h" #include "build/build_config.h" #include "gpu/config/gpu_control_list.h" #include "gpu/config/gpu_control_list_testing_data.h" @@ -109,7 +108,7 @@ EXPECT_EQ(kOsLinux, entry.conditions.os_type); const GpuControlList::OsType os_type[] = {kOsMacosx, kOsWin, kOsLinux, kOsChromeOS, kOsAndroid}; - for (size_t i = 0; i < base::size(os_type); ++i) + for (size_t i = 0; i < std::size(os_type); ++i) EXPECT_FALSE(entry.Contains(os_type[i], "10.6", gpu_info())); }
diff --git a/gpu/config/gpu_control_list_testing_arrays_and_structs_autogen.h b/gpu/config/gpu_control_list_testing_arrays_and_structs_autogen.h index c28b3e00..0e3e70e8 100644 --- a/gpu/config/gpu_control_list_testing_arrays_and_structs_autogen.h +++ b/gpu/config/gpu_control_list_testing_arrays_and_structs_autogen.h
@@ -753,8 +753,8 @@ }; const GpuControlList::MachineModelInfo kMachineModelInfoForEntry26 = { - base::size(kMachineModelNameForEntry26), // machine model name size - kMachineModelNameForEntry26, // machine model names + std::size(kMachineModelNameForEntry26), // machine model name size + kMachineModelNameForEntry26, // machine model names {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // machine model version @@ -807,7 +807,7 @@ }; const GpuControlList::MachineModelInfo kMachineModelInfoForEntry27Exception0 = { - base::size( + std::size( kMachineModelNameForEntry27Exception0), // machine model name size kMachineModelNameForEntry27Exception0, // machine model names {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, @@ -843,8 +843,8 @@ }; const GpuControlList::MachineModelInfo kMachineModelInfoForEntry28 = { - base::size(kMachineModelNameForEntry28), // machine model name size - kMachineModelNameForEntry28, // machine model names + std::size(kMachineModelNameForEntry28), // machine model name size + kMachineModelNameForEntry28, // machine model names {GpuControlList::kEQ, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, "7.1", nullptr}, // machine model version @@ -878,8 +878,8 @@ }; const GpuControlList::MachineModelInfo kMachineModelInfoForEntry29 = { - base::size(kMachineModelNameForEntry29), // machine model name size - kMachineModelNameForEntry29, // machine model names + std::size(kMachineModelNameForEntry29), // machine model name size + kMachineModelNameForEntry29, // machine model names {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // machine model version
diff --git a/gpu/config/gpu_control_list_testing_autogen.cc b/gpu/config/gpu_control_list_testing_autogen.cc index 5355724f..a803497 100644 --- a/gpu/config/gpu_control_list_testing_autogen.cc +++ b/gpu/config/gpu_control_list_testing_autogen.cc
@@ -10,6 +10,8 @@ #include "gpu/config/gpu_control_list_testing_autogen.h" +#include <iterator> + #include "gpu/config/gpu_control_list_testing_arrays_and_structs_autogen.h" #include "gpu/config/gpu_control_list_testing_exceptions_autogen.h" @@ -19,22 +21,22 @@ { 1, // id "GpuControlListEntryTest.DetailedEntry", - base::size(kFeatureListForGpuControlTestingEntry1), // features size - kFeatureListForGpuControlTestingEntry1, // features - base::size(kDisabledExtensionsForEntry1), // DisabledExtensions size - kDisabledExtensionsForEntry1, // DisabledExtensions + std::size(kFeatureListForGpuControlTestingEntry1), // features size + kFeatureListForGpuControlTestingEntry1, // features + std::size(kDisabledExtensionsForEntry1), // DisabledExtensions size + kDisabledExtensionsForEntry1, // DisabledExtensions 0, // DisabledWebGLExtensions size nullptr, // DisabledWebGLExtensions - base::size(kCrBugsForGpuControlTestingEntry1), // CrBugs size - kCrBugsForGpuControlTestingEntry1, // CrBugs + std::size(kCrBugsForGpuControlTestingEntry1), // CrBugs size + kCrBugsForGpuControlTestingEntry1, // CrBugs { GpuControlList::kOsMacosx, // os_type {GpuControlList::kEQ, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, "10.6.4", - nullptr}, // os_version - 0x10de, // vendor_id - base::size(kDevicesForGpuControlTestingEntry1), // Devices size - kDevicesForGpuControlTestingEntry1, // Devices + nullptr}, // os_version + 0x10de, // vendor_id + std::size(kDevicesForGpuControlTestingEntry1), // Devices size + kDevicesForGpuControlTestingEntry1, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style &kDriverInfoForGpuControlTestingEntry1, // driver info @@ -53,8 +55,8 @@ { 2, // id "GpuControlListEntryTest.VendorOnAllOsEntry", - base::size(kFeatureListForGpuControlTestingEntry2), // features size - kFeatureListForGpuControlTestingEntry2, // features + std::size(kFeatureListForGpuControlTestingEntry2), // features size + kFeatureListForGpuControlTestingEntry2, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -87,8 +89,8 @@ { 3, // id "GpuControlListEntryTest.VendorOnLinuxEntry", - base::size(kFeatureListForGpuControlTestingEntry3), // features size - kFeatureListForGpuControlTestingEntry3, // features + std::size(kFeatureListForGpuControlTestingEntry3), // features size + kFeatureListForGpuControlTestingEntry3, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -121,8 +123,8 @@ { 4, // id "GpuControlListEntryTest.AllExceptNVidiaOnLinuxEntry", - base::size(kFeatureListForGpuControlTestingEntry4), // features size - kFeatureListForGpuControlTestingEntry4, // features + std::size(kFeatureListForGpuControlTestingEntry4), // features size + kFeatureListForGpuControlTestingEntry4, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -149,14 +151,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry4_1440601243, // more data }, - base::size(kExceptionsForEntry4), // exceptions count - kExceptionsForEntry4, // exceptions + std::size(kExceptionsForEntry4), // exceptions count + kExceptionsForEntry4, // exceptions }, { 5, // id "GpuControlListEntryTest.AllExceptIntelOnLinuxEntry", - base::size(kFeatureListForGpuControlTestingEntry5), // features size - kFeatureListForGpuControlTestingEntry5, // features + std::size(kFeatureListForGpuControlTestingEntry5), // features size + kFeatureListForGpuControlTestingEntry5, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -183,14 +185,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry5_1440601243, // more data }, - base::size(kExceptionsForEntry5), // exceptions count - kExceptionsForEntry5, // exceptions + std::size(kExceptionsForEntry5), // exceptions count + kExceptionsForEntry5, // exceptions }, { 6, // id "GpuControlListEntryTest.MultipleDevicesEntry", - base::size(kFeatureListForGpuControlTestingEntry6), // features size - kFeatureListForGpuControlTestingEntry6, // features + std::size(kFeatureListForGpuControlTestingEntry6), // features size + kFeatureListForGpuControlTestingEntry6, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -201,10 +203,10 @@ GpuControlList::kOsAny, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x10de, // vendor_id - base::size(kDevicesForGpuControlTestingEntry6), // Devices size - kDevicesForGpuControlTestingEntry6, // Devices + nullptr}, // os_version + 0x10de, // vendor_id + std::size(kDevicesForGpuControlTestingEntry6), // Devices size + kDevicesForGpuControlTestingEntry6, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -223,8 +225,8 @@ { 7, // id "GpuControlListEntryTest.ChromeOSEntry", - base::size(kFeatureListForGpuControlTestingEntry7), // features size - kFeatureListForGpuControlTestingEntry7, // features + std::size(kFeatureListForGpuControlTestingEntry7), // features size + kFeatureListForGpuControlTestingEntry7, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -257,8 +259,8 @@ { 8, // id "GpuControlListEntryTest.GlVersionGLESEntry", - base::size(kFeatureListForGpuControlTestingEntry8), // features size - kFeatureListForGpuControlTestingEntry8, // features + std::size(kFeatureListForGpuControlTestingEntry8), // features size + kFeatureListForGpuControlTestingEntry8, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -291,8 +293,8 @@ { 9, // id "GpuControlListEntryTest.GlVersionANGLEEntry", - base::size(kFeatureListForGpuControlTestingEntry9), // features size - kFeatureListForGpuControlTestingEntry9, // features + std::size(kFeatureListForGpuControlTestingEntry9), // features size + kFeatureListForGpuControlTestingEntry9, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -325,8 +327,8 @@ { 10, // id "GpuControlListEntryTest.GlVersionGLEntry", - base::size(kFeatureListForGpuControlTestingEntry10), // features size - kFeatureListForGpuControlTestingEntry10, // features + std::size(kFeatureListForGpuControlTestingEntry10), // features size + kFeatureListForGpuControlTestingEntry10, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -359,8 +361,8 @@ { 11, // id "GpuControlListEntryTest.GlVendorEqual", - base::size(kFeatureListForGpuControlTestingEntry11), // features size - kFeatureListForGpuControlTestingEntry11, // features + std::size(kFeatureListForGpuControlTestingEntry11), // features size + kFeatureListForGpuControlTestingEntry11, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -393,8 +395,8 @@ { 12, // id "GpuControlListEntryTest.GlVendorWithDot", - base::size(kFeatureListForGpuControlTestingEntry12), // features size - kFeatureListForGpuControlTestingEntry12, // features + std::size(kFeatureListForGpuControlTestingEntry12), // features size + kFeatureListForGpuControlTestingEntry12, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -427,8 +429,8 @@ { 13, // id "GpuControlListEntryTest.GlRendererContains", - base::size(kFeatureListForGpuControlTestingEntry13), // features size - kFeatureListForGpuControlTestingEntry13, // features + std::size(kFeatureListForGpuControlTestingEntry13), // features size + kFeatureListForGpuControlTestingEntry13, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -461,8 +463,8 @@ { 14, // id "GpuControlListEntryTest.GlRendererCaseInsensitive", - base::size(kFeatureListForGpuControlTestingEntry14), // features size - kFeatureListForGpuControlTestingEntry14, // features + std::size(kFeatureListForGpuControlTestingEntry14), // features size + kFeatureListForGpuControlTestingEntry14, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -495,8 +497,8 @@ { 15, // id "GpuControlListEntryTest.GlExtensionsEndWith", - base::size(kFeatureListForGpuControlTestingEntry15), // features size - kFeatureListForGpuControlTestingEntry15, // features + std::size(kFeatureListForGpuControlTestingEntry15), // features size + kFeatureListForGpuControlTestingEntry15, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -529,8 +531,8 @@ { 16, // id "GpuControlListEntryTest.OptimusEntry", - base::size(kFeatureListForGpuControlTestingEntry16), // features size - kFeatureListForGpuControlTestingEntry16, // features + std::size(kFeatureListForGpuControlTestingEntry16), // features size + kFeatureListForGpuControlTestingEntry16, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -563,8 +565,8 @@ { 17, // id "GpuControlListEntryTest.AMDSwitchableEntry", - base::size(kFeatureListForGpuControlTestingEntry17), // features size - kFeatureListForGpuControlTestingEntry17, // features + std::size(kFeatureListForGpuControlTestingEntry17), // features size + kFeatureListForGpuControlTestingEntry17, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -597,8 +599,8 @@ { 18, // id "GpuControlListEntryTest.DriverVendorBeginWith", - base::size(kFeatureListForGpuControlTestingEntry18), // features size - kFeatureListForGpuControlTestingEntry18, // features + std::size(kFeatureListForGpuControlTestingEntry18), // features size + kFeatureListForGpuControlTestingEntry18, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -631,8 +633,8 @@ { 19, // id "GpuControlListEntryTest.LexicalDriverVersionEntry", - base::size(kFeatureListForGpuControlTestingEntry19), // features size - kFeatureListForGpuControlTestingEntry19, // features + std::size(kFeatureListForGpuControlTestingEntry19), // features size + kFeatureListForGpuControlTestingEntry19, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -665,8 +667,8 @@ { 20, // id "GpuControlListEntryTest.NeedsMoreInfoEntry", - base::size(kFeatureListForGpuControlTestingEntry20), // features size - kFeatureListForGpuControlTestingEntry20, // features + std::size(kFeatureListForGpuControlTestingEntry20), // features size + kFeatureListForGpuControlTestingEntry20, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -699,8 +701,8 @@ { 21, // id "GpuControlListEntryTest.NeedsMoreInfoForExceptionsEntry", - base::size(kFeatureListForGpuControlTestingEntry21), // features size - kFeatureListForGpuControlTestingEntry21, // features + std::size(kFeatureListForGpuControlTestingEntry21), // features size + kFeatureListForGpuControlTestingEntry21, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -727,14 +729,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry21_1440601243, // more data }, - base::size(kExceptionsForEntry21), // exceptions count - kExceptionsForEntry21, // exceptions + std::size(kExceptionsForEntry21), // exceptions count + kExceptionsForEntry21, // exceptions }, { 22, // id "GpuControlListEntryTest.NeedsMoreInfoForGlVersionEntry", - base::size(kFeatureListForGpuControlTestingEntry22), // features size - kFeatureListForGpuControlTestingEntry22, // features + std::size(kFeatureListForGpuControlTestingEntry22), // features size + kFeatureListForGpuControlTestingEntry22, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -767,8 +769,8 @@ { 23, // id "GpuControlListEntryTest.FeatureTypeAllEntry", - base::size(kFeatureListForGpuControlTestingEntry23), // features size - kFeatureListForGpuControlTestingEntry23, // features + std::size(kFeatureListForGpuControlTestingEntry23), // features size + kFeatureListForGpuControlTestingEntry23, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -801,8 +803,8 @@ { 24, // id "GpuControlListEntryTest.FeatureTypeAllEntryWithExceptions", - base::size(kFeatureListForGpuControlTestingEntry24), // features size - kFeatureListForGpuControlTestingEntry24, // features + std::size(kFeatureListForGpuControlTestingEntry24), // features size + kFeatureListForGpuControlTestingEntry24, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -835,8 +837,8 @@ { 25, // id "GpuControlListEntryTest.SingleActiveGPU", - base::size(kFeatureListForGpuControlTestingEntry25), // features size - kFeatureListForGpuControlTestingEntry25, // features + std::size(kFeatureListForGpuControlTestingEntry25), // features size + kFeatureListForGpuControlTestingEntry25, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -847,10 +849,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x10de, // vendor_id - base::size(kDevicesForGpuControlTestingEntry25), // Devices size - kDevicesForGpuControlTestingEntry25, // Devices + nullptr}, // os_version + 0x10de, // vendor_id + std::size(kDevicesForGpuControlTestingEntry25), // Devices size + kDevicesForGpuControlTestingEntry25, // Devices GpuControlList::kMultiGpuCategoryActive, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -869,8 +871,8 @@ { 26, // id "GpuControlListEntryTest.MachineModelName", - base::size(kFeatureListForGpuControlTestingEntry26), // features size - kFeatureListForGpuControlTestingEntry26, // features + std::size(kFeatureListForGpuControlTestingEntry26), // features size + kFeatureListForGpuControlTestingEntry26, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -903,8 +905,8 @@ { 27, // id "GpuControlListEntryTest.MachineModelNameException", - base::size(kFeatureListForGpuControlTestingEntry27), // features size - kFeatureListForGpuControlTestingEntry27, // features + std::size(kFeatureListForGpuControlTestingEntry27), // features size + kFeatureListForGpuControlTestingEntry27, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -931,14 +933,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry27_1440601243, // more data }, - base::size(kExceptionsForEntry27), // exceptions count - kExceptionsForEntry27, // exceptions + std::size(kExceptionsForEntry27), // exceptions count + kExceptionsForEntry27, // exceptions }, { 28, // id "GpuControlListEntryTest.MachineModelVersion", - base::size(kFeatureListForGpuControlTestingEntry28), // features size - kFeatureListForGpuControlTestingEntry28, // features + std::size(kFeatureListForGpuControlTestingEntry28), // features size + kFeatureListForGpuControlTestingEntry28, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -971,8 +973,8 @@ { 29, // id "GpuControlListEntryTest.MachineModelVersionException", - base::size(kFeatureListForGpuControlTestingEntry29), // features size - kFeatureListForGpuControlTestingEntry29, // features + std::size(kFeatureListForGpuControlTestingEntry29), // features size + kFeatureListForGpuControlTestingEntry29, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -999,14 +1001,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry29_1440601243, // more data }, - base::size(kExceptionsForEntry29), // exceptions count - kExceptionsForEntry29, // exceptions + std::size(kExceptionsForEntry29), // exceptions count + kExceptionsForEntry29, // exceptions }, { 30, // id "GpuControlListEntryDualGPUTest.CategoryAny.Intel", - base::size(kFeatureListForGpuControlTestingEntry30), // features size - kFeatureListForGpuControlTestingEntry30, // features + std::size(kFeatureListForGpuControlTestingEntry30), // features size + kFeatureListForGpuControlTestingEntry30, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1017,10 +1019,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x8086, // vendor_id - base::size(kDevicesForGpuControlTestingEntry30), // Devices size - kDevicesForGpuControlTestingEntry30, // Devices + nullptr}, // os_version + 0x8086, // vendor_id + std::size(kDevicesForGpuControlTestingEntry30), // Devices size + kDevicesForGpuControlTestingEntry30, // Devices GpuControlList::kMultiGpuCategoryAny, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1039,8 +1041,8 @@ { 31, // id "GpuControlListEntryDualGPUTest.CategoryAny.NVidia", - base::size(kFeatureListForGpuControlTestingEntry31), // features size - kFeatureListForGpuControlTestingEntry31, // features + std::size(kFeatureListForGpuControlTestingEntry31), // features size + kFeatureListForGpuControlTestingEntry31, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1051,10 +1053,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x10de, // vendor_id - base::size(kDevicesForGpuControlTestingEntry31), // Devices size - kDevicesForGpuControlTestingEntry31, // Devices + nullptr}, // os_version + 0x10de, // vendor_id + std::size(kDevicesForGpuControlTestingEntry31), // Devices size + kDevicesForGpuControlTestingEntry31, // Devices GpuControlList::kMultiGpuCategoryAny, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1073,8 +1075,8 @@ { 32, // id "GpuControlListEntryDualGPUTest.CategorySecondary", - base::size(kFeatureListForGpuControlTestingEntry32), // features size - kFeatureListForGpuControlTestingEntry32, // features + std::size(kFeatureListForGpuControlTestingEntry32), // features size + kFeatureListForGpuControlTestingEntry32, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1085,10 +1087,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x8086, // vendor_id - base::size(kDevicesForGpuControlTestingEntry32), // Devices size - kDevicesForGpuControlTestingEntry32, // Devices + nullptr}, // os_version + 0x8086, // vendor_id + std::size(kDevicesForGpuControlTestingEntry32), // Devices size + kDevicesForGpuControlTestingEntry32, // Devices GpuControlList::kMultiGpuCategorySecondary, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1107,8 +1109,8 @@ { 33, // id "GpuControlListEntryDualGPUTest.CategoryPrimary", - base::size(kFeatureListForGpuControlTestingEntry33), // features size - kFeatureListForGpuControlTestingEntry33, // features + std::size(kFeatureListForGpuControlTestingEntry33), // features size + kFeatureListForGpuControlTestingEntry33, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1119,10 +1121,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x8086, // vendor_id - base::size(kDevicesForGpuControlTestingEntry33), // Devices size - kDevicesForGpuControlTestingEntry33, // Devices + nullptr}, // os_version + 0x8086, // vendor_id + std::size(kDevicesForGpuControlTestingEntry33), // Devices size + kDevicesForGpuControlTestingEntry33, // Devices GpuControlList::kMultiGpuCategoryPrimary, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1141,8 +1143,8 @@ { 34, // id "GpuControlListEntryDualGPUTest.CategoryDefault", - base::size(kFeatureListForGpuControlTestingEntry34), // features size - kFeatureListForGpuControlTestingEntry34, // features + std::size(kFeatureListForGpuControlTestingEntry34), // features size + kFeatureListForGpuControlTestingEntry34, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1153,10 +1155,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x8086, // vendor_id - base::size(kDevicesForGpuControlTestingEntry34), // Devices size - kDevicesForGpuControlTestingEntry34, // Devices + nullptr}, // os_version + 0x8086, // vendor_id + std::size(kDevicesForGpuControlTestingEntry34), // Devices size + kDevicesForGpuControlTestingEntry34, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1175,8 +1177,8 @@ { 35, // id "GpuControlListEntryDualGPUTest.ActiveSecondaryGPU", - base::size(kFeatureListForGpuControlTestingEntry35), // features size - kFeatureListForGpuControlTestingEntry35, // features + std::size(kFeatureListForGpuControlTestingEntry35), // features size + kFeatureListForGpuControlTestingEntry35, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1187,10 +1189,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x8086, // vendor_id - base::size(kDevicesForGpuControlTestingEntry35), // Devices size - kDevicesForGpuControlTestingEntry35, // Devices + nullptr}, // os_version + 0x8086, // vendor_id + std::size(kDevicesForGpuControlTestingEntry35), // Devices size + kDevicesForGpuControlTestingEntry35, // Devices GpuControlList::kMultiGpuCategoryActive, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1209,8 +1211,8 @@ { 36, // id "GpuControlListEntryDualGPUTest.VendorOnlyActiveSecondaryGPU", - base::size(kFeatureListForGpuControlTestingEntry36), // features size - kFeatureListForGpuControlTestingEntry36, // features + std::size(kFeatureListForGpuControlTestingEntry36), // features size + kFeatureListForGpuControlTestingEntry36, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1243,8 +1245,8 @@ { 37, // id "GpuControlListEntryDualGPUTest.ActivePrimaryGPU", - base::size(kFeatureListForGpuControlTestingEntry37), // features size - kFeatureListForGpuControlTestingEntry37, // features + std::size(kFeatureListForGpuControlTestingEntry37), // features size + kFeatureListForGpuControlTestingEntry37, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1255,10 +1257,10 @@ GpuControlList::kOsMacosx, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x10de, // vendor_id - base::size(kDevicesForGpuControlTestingEntry37), // Devices size - kDevicesForGpuControlTestingEntry37, // Devices + nullptr}, // os_version + 0x10de, // vendor_id + std::size(kDevicesForGpuControlTestingEntry37), // Devices size + kDevicesForGpuControlTestingEntry37, // Devices GpuControlList::kMultiGpuCategoryActive, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info @@ -1277,8 +1279,8 @@ { 38, // id "GpuControlListEntryDualGPUTest.VendorOnlyActivePrimaryGPU", - base::size(kFeatureListForGpuControlTestingEntry38), // features size - kFeatureListForGpuControlTestingEntry38, // features + std::size(kFeatureListForGpuControlTestingEntry38), // features size + kFeatureListForGpuControlTestingEntry38, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1311,8 +1313,8 @@ { 39, // id "GpuControlListEntryTest.PixelShaderVersion", - base::size(kFeatureListForGpuControlTestingEntry39), // features size - kFeatureListForGpuControlTestingEntry39, // features + std::size(kFeatureListForGpuControlTestingEntry39), // features size + kFeatureListForGpuControlTestingEntry39, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1345,8 +1347,8 @@ { 40, // id "GpuControlListEntryTest.OsVersionZeroLT", - base::size(kFeatureListForGpuControlTestingEntry40), // features size - kFeatureListForGpuControlTestingEntry40, // features + std::size(kFeatureListForGpuControlTestingEntry40), // features size + kFeatureListForGpuControlTestingEntry40, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1379,8 +1381,8 @@ { 41, // id "GpuControlListEntryTest.OsVersionZeroAny", - base::size(kFeatureListForGpuControlTestingEntry41), // features size - kFeatureListForGpuControlTestingEntry41, // features + std::size(kFeatureListForGpuControlTestingEntry41), // features size + kFeatureListForGpuControlTestingEntry41, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1413,8 +1415,8 @@ { 42, // id "GpuControlListEntryTest.OsComparisonAny", - base::size(kFeatureListForGpuControlTestingEntry42), // features size - kFeatureListForGpuControlTestingEntry42, // features + std::size(kFeatureListForGpuControlTestingEntry42), // features size + kFeatureListForGpuControlTestingEntry42, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1447,8 +1449,8 @@ { 43, // id "GpuControlListEntryTest.OsComparisonGE", - base::size(kFeatureListForGpuControlTestingEntry43), // features size - kFeatureListForGpuControlTestingEntry43, // features + std::size(kFeatureListForGpuControlTestingEntry43), // features size + kFeatureListForGpuControlTestingEntry43, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1480,8 +1482,8 @@ { 44, // id "GpuControlListEntryTest.ExceptionWithoutVendorId", - base::size(kFeatureListForGpuControlTestingEntry44), // features size - kFeatureListForGpuControlTestingEntry44, // features + std::size(kFeatureListForGpuControlTestingEntry44), // features size + kFeatureListForGpuControlTestingEntry44, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1508,14 +1510,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry44_1440601243, // more data }, - base::size(kExceptionsForEntry44), // exceptions count - kExceptionsForEntry44, // exceptions + std::size(kExceptionsForEntry44), // exceptions count + kExceptionsForEntry44, // exceptions }, { 45, // id "GpuControlListEntryTest.MultiGpuStyleAMDSwitchableDiscrete", - base::size(kFeatureListForGpuControlTestingEntry45), // features size - kFeatureListForGpuControlTestingEntry45, // features + std::size(kFeatureListForGpuControlTestingEntry45), // features size + kFeatureListForGpuControlTestingEntry45, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1549,8 +1551,8 @@ { 46, // id "GpuControlListEntryTest.MultiGpuStyleAMDSwitchableIntegrated", - base::size(kFeatureListForGpuControlTestingEntry46), // features size - kFeatureListForGpuControlTestingEntry46, // features + std::size(kFeatureListForGpuControlTestingEntry46), // features size + kFeatureListForGpuControlTestingEntry46, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1584,8 +1586,8 @@ { 47, // id "GpuControlListEntryTest.InProcessGPU", - base::size(kFeatureListForGpuControlTestingEntry47), // features size - kFeatureListForGpuControlTestingEntry47, // features + std::size(kFeatureListForGpuControlTestingEntry47), // features size + kFeatureListForGpuControlTestingEntry47, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1618,8 +1620,8 @@ { 48, // id "GpuControlListEntryTest.SameGPUTwiceTest", - base::size(kFeatureListForGpuControlTestingEntry48), // features size - kFeatureListForGpuControlTestingEntry48, // features + std::size(kFeatureListForGpuControlTestingEntry48), // features size + kFeatureListForGpuControlTestingEntry48, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1652,8 +1654,8 @@ { 49, // id "GpuControlListEntryTest.NVidiaNumberingScheme", - base::size(kFeatureListForGpuControlTestingEntry49), // features size - kFeatureListForGpuControlTestingEntry49, // features + std::size(kFeatureListForGpuControlTestingEntry49), // features size + kFeatureListForGpuControlTestingEntry49, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1686,8 +1688,8 @@ { 50, // id "GpuControlListTest.NeedsMoreInfo", - base::size(kFeatureListForGpuControlTestingEntry50), // features size - kFeatureListForGpuControlTestingEntry50, // features + std::size(kFeatureListForGpuControlTestingEntry50), // features size + kFeatureListForGpuControlTestingEntry50, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1720,8 +1722,8 @@ { 51, // id "GpuControlListTest.NeedsMoreInfoForExceptions", - base::size(kFeatureListForGpuControlTestingEntry51), // features size - kFeatureListForGpuControlTestingEntry51, // features + std::size(kFeatureListForGpuControlTestingEntry51), // features size + kFeatureListForGpuControlTestingEntry51, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1748,14 +1750,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry51_1440601243, // more data }, - base::size(kExceptionsForEntry51), // exceptions count - kExceptionsForEntry51, // exceptions + std::size(kExceptionsForEntry51), // exceptions count + kExceptionsForEntry51, // exceptions }, { 52, // id "GpuControlListTest.IgnorableEntries.0", - base::size(kFeatureListForGpuControlTestingEntry52), // features size - kFeatureListForGpuControlTestingEntry52, // features + std::size(kFeatureListForGpuControlTestingEntry52), // features size + kFeatureListForGpuControlTestingEntry52, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1788,8 +1790,8 @@ { 53, // id "GpuControlListTest.IgnorableEntries.1", - base::size(kFeatureListForGpuControlTestingEntry53), // features size - kFeatureListForGpuControlTestingEntry53, // features + std::size(kFeatureListForGpuControlTestingEntry53), // features size + kFeatureListForGpuControlTestingEntry53, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1822,10 +1824,10 @@ { 54, // id "GpuControlListTest.DisabledExtensionTest.0", - 0, // feature size - nullptr, // features - base::size(kDisabledExtensionsForEntry54), // DisabledExtensions size - kDisabledExtensionsForEntry54, // DisabledExtensions + 0, // feature size + nullptr, // features + std::size(kDisabledExtensionsForEntry54), // DisabledExtensions size + kDisabledExtensionsForEntry54, // DisabledExtensions 0, // DisabledWebGLExtensions size nullptr, // DisabledWebGLExtensions 0, // CrBugs size @@ -1856,10 +1858,10 @@ { 55, // id "GpuControlListTest.DisabledExtensionTest.1", - 0, // feature size - nullptr, // features - base::size(kDisabledExtensionsForEntry55), // DisabledExtensions size - kDisabledExtensionsForEntry55, // DisabledExtensions + 0, // feature size + nullptr, // features + std::size(kDisabledExtensionsForEntry55), // DisabledExtensions size + kDisabledExtensionsForEntry55, // DisabledExtensions 0, // DisabledWebGLExtensions size nullptr, // DisabledWebGLExtensions 0, // CrBugs size @@ -1890,8 +1892,8 @@ { 56, // id "GpuControlListEntryTest.DirectRendering", - base::size(kFeatureListForGpuControlTestingEntry56), // features size - kFeatureListForGpuControlTestingEntry56, // features + std::size(kFeatureListForGpuControlTestingEntry56), // features size + kFeatureListForGpuControlTestingEntry56, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1924,8 +1926,8 @@ { 57, // id "GpuControlListTest.LinuxKernelVersion", - base::size(kFeatureListForGpuControlTestingEntry57), // features size - kFeatureListForGpuControlTestingEntry57, // features + std::size(kFeatureListForGpuControlTestingEntry57), // features size + kFeatureListForGpuControlTestingEntry57, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1958,8 +1960,8 @@ { 58, // id "GpuControlListTest.TestGroup.0", - base::size(kFeatureListForGpuControlTestingEntry58), // features size - kFeatureListForGpuControlTestingEntry58, // features + std::size(kFeatureListForGpuControlTestingEntry58), // features size + kFeatureListForGpuControlTestingEntry58, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -1992,8 +1994,8 @@ { 59, // id "GpuControlListTest.TestGroup.1", - base::size(kFeatureListForGpuControlTestingEntry59), // features size - kFeatureListForGpuControlTestingEntry59, // features + std::size(kFeatureListForGpuControlTestingEntry59), // features size + kFeatureListForGpuControlTestingEntry59, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2026,8 +2028,8 @@ { 60, // id "GpuControlListEntryTest.GpuSeries", - base::size(kFeatureListForGpuControlTestingEntry60), // features size - kFeatureListForGpuControlTestingEntry60, // features + std::size(kFeatureListForGpuControlTestingEntry60), // features size + kFeatureListForGpuControlTestingEntry60, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2047,7 +2049,7 @@ nullptr, // driver info nullptr, // GL strings nullptr, // machine model info - base::size(kIntelGpuSeriesForEntry60), // intel_gpu_series size + std::size(kIntelGpuSeriesForEntry60), // intel_gpu_series size kIntelGpuSeriesForEntry60, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, @@ -2060,8 +2062,8 @@ { 61, // id "GpuControlListEntryTest.GpuSeriesActive", - base::size(kFeatureListForGpuControlTestingEntry61), // features size - kFeatureListForGpuControlTestingEntry61, // features + std::size(kFeatureListForGpuControlTestingEntry61), // features size + kFeatureListForGpuControlTestingEntry61, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2081,7 +2083,7 @@ nullptr, // driver info nullptr, // GL strings nullptr, // machine model info - base::size(kIntelGpuSeriesForEntry61), // intel_gpu_series size + std::size(kIntelGpuSeriesForEntry61), // intel_gpu_series size kIntelGpuSeriesForEntry61, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, @@ -2094,8 +2096,8 @@ { 62, // id "GpuControlListEntryTest.GpuSeriesAny", - base::size(kFeatureListForGpuControlTestingEntry62), // features size - kFeatureListForGpuControlTestingEntry62, // features + std::size(kFeatureListForGpuControlTestingEntry62), // features size + kFeatureListForGpuControlTestingEntry62, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2106,17 +2108,17 @@ GpuControlList::kOsAny, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x00, // vendor_id - 0, // Devices size - nullptr, // Devices - GpuControlList::kMultiGpuCategoryAny, // multi_gpu_category - GpuControlList::kMultiGpuStyleNone, // multi_gpu_style - nullptr, // driver info - nullptr, // GL strings - nullptr, // machine model info - base::size(kIntelGpuSeriesForEntry62), // intel_gpu_series size - kIntelGpuSeriesForEntry62, // intel_gpu_series + nullptr}, // os_version + 0x00, // vendor_id + 0, // Devices size + nullptr, // Devices + GpuControlList::kMultiGpuCategoryAny, // multi_gpu_category + GpuControlList::kMultiGpuStyleNone, // multi_gpu_style + nullptr, // driver info + nullptr, // GL strings + nullptr, // machine model info + std::size(kIntelGpuSeriesForEntry62), // intel_gpu_series size + kIntelGpuSeriesForEntry62, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // intel_gpu_generation @@ -2128,8 +2130,8 @@ { 63, // id "GpuControlListEntryTest.GpuSeriesPrimary", - base::size(kFeatureListForGpuControlTestingEntry63), // features size - kFeatureListForGpuControlTestingEntry63, // features + std::size(kFeatureListForGpuControlTestingEntry63), // features size + kFeatureListForGpuControlTestingEntry63, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2149,7 +2151,7 @@ nullptr, // driver info nullptr, // GL strings nullptr, // machine model info - base::size(kIntelGpuSeriesForEntry63), // intel_gpu_series size + std::size(kIntelGpuSeriesForEntry63), // intel_gpu_series size kIntelGpuSeriesForEntry63, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, @@ -2162,8 +2164,8 @@ { 64, // id "GpuControlListEntryTest.GpuSeriesSecondary", - base::size(kFeatureListForGpuControlTestingEntry64), // features size - kFeatureListForGpuControlTestingEntry64, // features + std::size(kFeatureListForGpuControlTestingEntry64), // features size + kFeatureListForGpuControlTestingEntry64, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2183,8 +2185,8 @@ nullptr, // driver info nullptr, // GL strings nullptr, // machine model info - base::size(kIntelGpuSeriesForEntry64), // intel_gpu_series size - kIntelGpuSeriesForEntry64, // intel_gpu_series + std::size(kIntelGpuSeriesForEntry64), // intel_gpu_series size + kIntelGpuSeriesForEntry64, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // intel_gpu_generation @@ -2196,8 +2198,8 @@ { 65, // id "GpuControlListEntryTest.GpuSeriesInException", - base::size(kFeatureListForGpuControlTestingEntry65), // features size - kFeatureListForGpuControlTestingEntry65, // features + std::size(kFeatureListForGpuControlTestingEntry65), // features size + kFeatureListForGpuControlTestingEntry65, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2224,14 +2226,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry65_1440601243, // more data }, - base::size(kExceptionsForEntry65), // exceptions count - kExceptionsForEntry65, // exceptions + std::size(kExceptionsForEntry65), // exceptions count + kExceptionsForEntry65, // exceptions }, { 66, // id "GpuControlListEntryTest.MultipleDrivers", - base::size(kFeatureListForGpuControlTestingEntry66), // features size - kFeatureListForGpuControlTestingEntry66, // features + std::size(kFeatureListForGpuControlTestingEntry66), // features size + kFeatureListForGpuControlTestingEntry66, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2264,8 +2266,8 @@ { 67, // id "GpuControlListEntryTest.HardwareOverlay", - base::size(kFeatureListForGpuControlTestingEntry67), // features size - kFeatureListForGpuControlTestingEntry67, // features + std::size(kFeatureListForGpuControlTestingEntry67), // features size + kFeatureListForGpuControlTestingEntry67, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2298,8 +2300,8 @@ { 68, // id "GpuControlListEntryTest.GpuGeneration", - base::size(kFeatureListForGpuControlTestingEntry68), // features size - kFeatureListForGpuControlTestingEntry68, // features + std::size(kFeatureListForGpuControlTestingEntry68), // features size + kFeatureListForGpuControlTestingEntry68, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2332,8 +2334,8 @@ { 69, // id "GpuControlListEntryTest.GpuGenerationActive", - base::size(kFeatureListForGpuControlTestingEntry69), // features size - kFeatureListForGpuControlTestingEntry69, // features + std::size(kFeatureListForGpuControlTestingEntry69), // features size + kFeatureListForGpuControlTestingEntry69, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2366,8 +2368,8 @@ { 70, // id "GpuControlListEntryTest.GpuGenerationAny", - base::size(kFeatureListForGpuControlTestingEntry70), // features size - kFeatureListForGpuControlTestingEntry70, // features + std::size(kFeatureListForGpuControlTestingEntry70), // features size + kFeatureListForGpuControlTestingEntry70, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2400,8 +2402,8 @@ { 71, // id "GpuControlListEntryTest.GpuGenerationPrimary", - base::size(kFeatureListForGpuControlTestingEntry71), // features size - kFeatureListForGpuControlTestingEntry71, // features + std::size(kFeatureListForGpuControlTestingEntry71), // features size + kFeatureListForGpuControlTestingEntry71, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2434,8 +2436,8 @@ { 72, // id "GpuControlListEntryTest.GpuGenerationSecondary", - base::size(kFeatureListForGpuControlTestingEntry72), // features size - kFeatureListForGpuControlTestingEntry72, // features + std::size(kFeatureListForGpuControlTestingEntry72), // features size + kFeatureListForGpuControlTestingEntry72, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2468,8 +2470,8 @@ { 73, // id "GpuControlListEntryTest.SubpixelFontRendering", - base::size(kFeatureListForGpuControlTestingEntry73), // features size - kFeatureListForGpuControlTestingEntry73, // features + std::size(kFeatureListForGpuControlTestingEntry73), // features size + kFeatureListForGpuControlTestingEntry73, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2496,14 +2498,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry73_1440601243, // more data }, - base::size(kExceptionsForEntry73), // exceptions count - kExceptionsForEntry73, // exceptions + std::size(kExceptionsForEntry73), // exceptions count + kExceptionsForEntry73, // exceptions }, { 74, // id "GpuControlListEntryTest.SubpixelFontRenderingDontCare", - base::size(kFeatureListForGpuControlTestingEntry74), // features size - kFeatureListForGpuControlTestingEntry74, // features + std::size(kFeatureListForGpuControlTestingEntry74), // features size + kFeatureListForGpuControlTestingEntry74, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2536,8 +2538,8 @@ { 75, // id "GpuControlListEntryTest.IntelDriverVendorEntry", - base::size(kFeatureListForGpuControlTestingEntry75), // features size - kFeatureListForGpuControlTestingEntry75, // features + std::size(kFeatureListForGpuControlTestingEntry75), // features size + kFeatureListForGpuControlTestingEntry75, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2570,8 +2572,8 @@ { 76, // id "GpuControlListEntryTest.IntelDriverVersionEntry", - base::size(kFeatureListForGpuControlTestingEntry76), // features size - kFeatureListForGpuControlTestingEntry76, // features + std::size(kFeatureListForGpuControlTestingEntry76), // features size + kFeatureListForGpuControlTestingEntry76, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2604,8 +2606,8 @@ { 77, // id "GpuControlListEntryTest.DeviceRevisionEntry", - base::size(kFeatureListForGpuControlTestingEntry77), // features size - kFeatureListForGpuControlTestingEntry77, // features + std::size(kFeatureListForGpuControlTestingEntry77), // features size + kFeatureListForGpuControlTestingEntry77, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2632,14 +2634,14 @@ nullptr}, // intel_gpu_generation &kMoreForEntry77_1440601243, // more data }, - base::size(kExceptionsForEntry77), // exceptions count - kExceptionsForEntry77, // exceptions + std::size(kExceptionsForEntry77), // exceptions count + kExceptionsForEntry77, // exceptions }, { 78, // id "GpuControlListEntryTest.DeviceRevisionUnspecifiedEntry", - base::size(kFeatureListForGpuControlTestingEntry78), // features size - kFeatureListForGpuControlTestingEntry78, // features + std::size(kFeatureListForGpuControlTestingEntry78), // features size + kFeatureListForGpuControlTestingEntry78, // features 0, // DisabledExtensions size nullptr, // DisabledExtensions 0, // DisabledWebGLExtensions size @@ -2650,10 +2652,10 @@ GpuControlList::kOsWin, // os_type {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, - nullptr}, // os_version - 0x1002, // vendor_id - base::size(kDevicesForGpuControlTestingEntry78), // Devices size - kDevicesForGpuControlTestingEntry78, // Devices + nullptr}, // os_version + 0x1002, // vendor_id + std::size(kDevicesForGpuControlTestingEntry78), // Devices size + kDevicesForGpuControlTestingEntry78, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category GpuControlList::kMultiGpuStyleNone, // multi_gpu_style nullptr, // driver info
diff --git a/gpu/config/gpu_control_list_testing_exceptions_autogen.h b/gpu/config/gpu_control_list_testing_exceptions_autogen.h index d49de69..8c24fd9 100644 --- a/gpu/config/gpu_control_list_testing_exceptions_autogen.h +++ b/gpu/config/gpu_control_list_testing_exceptions_autogen.h
@@ -128,7 +128,7 @@ {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // os_version 0x8086, // vendor_id - base::size( + std::size( kDevicesForGpuControlTestingEntry44Exception0), // Devices size kDevicesForGpuControlTestingEntry44Exception0, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category @@ -148,7 +148,7 @@ {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // os_version 0x8086, // vendor_id - base::size( + std::size( kDevicesForGpuControlTestingEntry44Exception1), // Devices size kDevicesForGpuControlTestingEntry44Exception1, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category @@ -200,7 +200,7 @@ nullptr, // driver info nullptr, // GL strings nullptr, // machine model info - base::size( + std::size( kIntelGpuSeriesForEntry65Exception0), // intel_gpu_series size kIntelGpuSeriesForEntry65Exception0, // intel_gpu_series {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, @@ -276,7 +276,7 @@ {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // os_version 0x1002, // vendor_id - base::size( + std::size( kDevicesForGpuControlTestingEntry77Exception0), // Devices size kDevicesForGpuControlTestingEntry77Exception0, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category @@ -296,7 +296,7 @@ {GpuControlList::kUnknown, GpuControlList::kVersionStyleNumerical, GpuControlList::kVersionSchemaCommon, nullptr, nullptr}, // os_version 0x1002, // vendor_id - base::size( + std::size( kDevicesForGpuControlTestingEntry77Exception1), // Devices size kDevicesForGpuControlTestingEntry77Exception1, // Devices GpuControlList::kMultiGpuCategoryNone, // multi_gpu_category
diff --git a/gpu/config/gpu_driver_bug_list.cc b/gpu/config/gpu_driver_bug_list.cc index f2c2333..e16195b 100644 --- a/gpu/config/gpu_driver_bug_list.cc +++ b/gpu/config/gpu_driver_bug_list.cc
@@ -5,7 +5,6 @@ #include "gpu/config/gpu_driver_bug_list.h" #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "gpu/config/gpu_driver_bug_list_autogen.h" #include "gpu/config/gpu_driver_bug_workaround_type.h" #include "gpu/config/gpu_switches.h" @@ -45,7 +44,7 @@ const GpuControlListData& data) { std::unique_ptr<GpuDriverBugList> list(new GpuDriverBugList(data)); - DCHECK_EQ(static_cast<int>(base::size(kFeatureList)), + DCHECK_EQ(static_cast<int>(std::size(kFeatureList)), NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES); for (int i = 0; i < NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES; ++i) { list->AddSupportedFeature(kFeatureList[i].name,
diff --git a/gpu/config/gpu_dx_diagnostics_win.cc b/gpu/config/gpu_dx_diagnostics_win.cc index becf06e7..64ae167f 100644 --- a/gpu/config/gpu_dx_diagnostics_win.cc +++ b/gpu/config/gpu_dx_diagnostics_win.cc
@@ -9,7 +9,6 @@ #include <dxdiag.h> #include <windows.h> -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/win/com_init_util.h" @@ -35,7 +34,7 @@ if (SUCCEEDED(hr)) { for (DWORD i = 0; i < prop_count; i++) { WCHAR prop_name16[256]; - hr = container->EnumPropNames(i, prop_name16, base::size(prop_name16)); + hr = container->EnumPropNames(i, prop_name16, std::size(prop_name16)); if (SUCCEEDED(hr)) { std::string prop_name8 = base::WideToUTF8(prop_name16); @@ -72,7 +71,7 @@ for (DWORD i = 0; i < child_count; i++) { WCHAR child_name16[256]; hr = container->EnumChildContainerNames(i, child_name16, - base::size(child_name16)); + std::size(child_name16)); if (SUCCEEDED(hr)) { std::string child_name8 = base::WideToUTF8(child_name16); DxDiagNode* output_child = &output->children[child_name8];
diff --git a/gpu/config/gpu_info_collector.cc b/gpu/config/gpu_info_collector.cc index f2100d10..f4a58fd 100644 --- a/gpu/config/gpu_info_collector.cc +++ b/gpu/config/gpu_info_collector.cc
@@ -13,7 +13,6 @@ #include "base/base_paths.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" @@ -473,7 +472,7 @@ if (!gpu_info->gl_vendor.empty()) { std::string gl_vendor_lower = base::ToLowerASCII(gpu_info->gl_vendor); int index = StringContainsName(gl_vendor_lower, kVendorNames, - base::size(kVendorNames)); + std::size(kVendorNames)); if (index >= 0) { active_vendor_id = kVendorIDs[index]; } @@ -481,7 +480,7 @@ if (active_vendor_id == 0 && !gpu_info->gl_renderer.empty()) { std::string gl_renderer_lower = base::ToLowerASCII(gpu_info->gl_renderer); int index = StringContainsName(gl_renderer_lower, kVendorNames, - base::size(kVendorNames)); + std::size(kVendorNames)); if (index >= 0) { active_vendor_id = kVendorIDs[index]; }
diff --git a/gpu/gles2_conform_support/egl/display.cc b/gpu/gles2_conform_support/egl/display.cc index 422dc38..6ff47fc 100644 --- a/gpu/gles2_conform_support/egl/display.cc +++ b/gpu/gles2_conform_support/egl/display.cc
@@ -6,7 +6,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "build/build_config.h" #include "gpu/gles2_conform_support/egl/config.h" #include "gpu/gles2_conform_support/egl/context.h" @@ -90,7 +89,7 @@ if (!configs) config_size = 0; *num_config = 0; - for (size_t i = 0; i < base::size(configs_); ++i) { + for (size_t i = 0; i < std::size(configs_); ++i) { if (configs_[i]->Matches(attrib_list)) { if (*num_config < config_size) { configs[*num_config] = configs_[i].get(); @@ -113,9 +112,9 @@ InitializeConfigsIfNeeded(); if (!configs) config_size = 0; - *num_config = base::size(configs_); + *num_config = std::size(configs_); size_t count = - std::min(base::size(configs_), static_cast<size_t>(config_size)); + std::min(std::size(configs_), static_cast<size_t>(config_size)); for (size_t i = 0; i < count; ++i) configs[i] = configs_[i].get(); return ts->ReturnSuccess(EGL_TRUE);
diff --git a/gpu/ipc/client/image_decode_accelerator_proxy_unittest.cc b/gpu/ipc/client/image_decode_accelerator_proxy_unittest.cc index 3c9da22..050e3b0b 100644 --- a/gpu/ipc/client/image_decode_accelerator_proxy_unittest.cc +++ b/gpu/ipc/client/image_decode_accelerator_proxy_unittest.cc
@@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "gpu/ipc/client/image_decode_accelerator_proxy.h" + #include <memory> #include <utility> #include <vector> -#include "base/cxx17_backports.h" #include "base/test/task_environment.h" #include "cc/paint/paint_image.h" #include "gpu/ipc/client/gpu_channel_host.h" -#include "gpu/ipc/client/image_decode_accelerator_proxy.h" #include "gpu/ipc/common/command_buffer_id.h" #include "gpu/ipc/common/mock_gpu_channel.h" #include "testing/gmock/include/gmock/gmock.h" @@ -76,7 +76,7 @@ TEST_F(ImageDecodeAcceleratorProxyTest, ScheduleImageDecodeSendsMessage) { const uint8_t image[4] = {1, 2, 3, 4}; base::span<const uint8_t> encoded_data = - base::span<const uint8_t>(image, base::size(image)); + base::span<const uint8_t>(image, std::size(image)); const gfx::ColorSpace color_space = gfx::ColorSpace::CreateSRGB();
diff --git a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc index 01ccb3a..41f4907 100644 --- a/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc +++ b/gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc
@@ -66,7 +66,7 @@ hr = D3D11CreateDevice(dxgi_adapter.Get(), driver_type, /*Software=*/nullptr, flags, feature_levels, - base::size(feature_levels), D3D11_SDK_VERSION, + std::size(feature_levels), D3D11_SDK_VERSION, &d3d11_device_, /*pFeatureLevel=*/nullptr, /*ppImmediateContext=*/nullptr); if (FAILED(hr)) {
diff --git a/gpu/vulkan/vulkan_device_queue.cc b/gpu/vulkan/vulkan_device_queue.cc index d46eb425..45049c7 100644 --- a/gpu/vulkan/vulkan_device_queue.cc +++ b/gpu/vulkan/vulkan_device_queue.cc
@@ -220,7 +220,7 @@ "other", "integrated", "discrete", "virtual", "cpu", }; uint32_t gpu_type = vk_physical_device_properties_.deviceType; - if (gpu_type >= base::size(kDeviceTypeNames)) + if (gpu_type >= std::size(kDeviceTypeNames)) gpu_type = 0; crash_keys::vulkan_device_type.Set(kDeviceTypeNames[gpu_type]); crash_keys::vulkan_device_name.Set(vk_physical_device_properties_.deviceName);
diff --git a/gpu/vulkan/vulkan_surface.cc b/gpu/vulkan/vulkan_surface.cc index 2194268..2713563a 100644 --- a/gpu/vulkan/vulkan_surface.cc +++ b/gpu/vulkan/vulkan_surface.cc
@@ -8,7 +8,6 @@ #include <algorithm> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/threading/scoped_blocking_call.h" #include "build/build_config.h" @@ -147,8 +146,8 @@ ? kPreferredVkFormats32 : kPreferredVkFormats16; unsigned int size = (format == FORMAT_RGBA_32) - ? base::size(kPreferredVkFormats32) - : base::size(kPreferredVkFormats16); + ? std::size(kPreferredVkFormats32) + : std::size(kPreferredVkFormats16); if (formats.size() == 1 && VK_FORMAT_UNDEFINED == formats[0].format) { surface_format_.format = preferred_formats[0];
diff --git a/infra/config/generated/builders/ci/android-10-arm64-rel/properties.json b/infra/config/generated/builders/ci/android-10-arm64-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-10-arm64-rel/properties.json +++ b/infra/config/generated/builders/ci/android-10-arm64-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-11-x86-rel/properties.json b/infra/config/generated/builders/ci/android-11-x86-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-11-x86-rel/properties.json +++ b/infra/config/generated/builders/ci/android-11-x86-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-arm64-proguard-rel/properties.json b/infra/config/generated/builders/ci/android-arm64-proguard-rel/properties.json index 1ae27d9..8252801 100644 --- a/infra/config/generated/builders/ci/android-arm64-proguard-rel/properties.json +++ b/infra/config/generated/builders/ci/android-arm64-proguard-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, + "$build/reclient": { + "instance": "rbe-chromium-trusted", "jobs": 500, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-bfcache-rel/properties.json b/infra/config/generated/builders/ci/android-bfcache-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-bfcache-rel/properties.json +++ b/infra/config/generated/builders/ci/android-bfcache-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-marshmallow-x86-rel-non-cq/properties.json b/infra/config/generated/builders/ci/android-marshmallow-x86-rel-non-cq/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-marshmallow-x86-rel-non-cq/properties.json +++ b/infra/config/generated/builders/ci/android-marshmallow-x86-rel-non-cq/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-marshmallow-x86-rel/properties.json b/infra/config/generated/builders/ci/android-marshmallow-x86-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-marshmallow-x86-rel/properties.json +++ b/infra/config/generated/builders/ci/android-marshmallow-x86-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-pie-arm64-coverage-experimental-rel/properties.json b/infra/config/generated/builders/ci/android-pie-arm64-coverage-experimental-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-pie-arm64-coverage-experimental-rel/properties.json +++ b/infra/config/generated/builders/ci/android-pie-arm64-coverage-experimental-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-pie-arm64-rel/properties.json b/infra/config/generated/builders/ci/android-pie-arm64-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-pie-arm64-rel/properties.json +++ b/infra/config/generated/builders/ci/android-pie-arm64-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/generated/builders/ci/android-pie-x86-rel/properties.json b/infra/config/generated/builders/ci/android-pie-x86-rel/properties.json index 432cf6b..8252801 100644 --- a/infra/config/generated/builders/ci/android-pie-x86-rel/properties.json +++ b/infra/config/generated/builders/ci/android-pie-x86-rel/properties.json
@@ -1,10 +1,8 @@ { - "$build/goma": { - "enable_ats": true, - "jobs": 150, - "rpc_extra_params": "?prod", - "server_host": "goma.chromium.org", - "use_luci_auth": true + "$build/reclient": { + "instance": "rbe-chromium-trusted", + "jobs": 500, + "metrics_project": "chromium-reclient-metrics" }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [],
diff --git a/infra/config/subprojects/chromium/ci/chromium.android.star b/infra/config/subprojects/chromium/ci/chromium.android.star index ac1d82b..95706ded 100644 --- a/infra/config/subprojects/chromium/ci/chromium.android.star +++ b/infra/config/subprojects/chromium/ci/chromium.android.star
@@ -246,6 +246,9 @@ category = "builder_tester|arm64", short_name = "10", ), + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -254,8 +257,10 @@ category = "builder_tester|arm64", short_name = "M proguard", ), - goma_jobs = goma.jobs.MANY_JOBS_FOR_CI, execution_timeout = 6 * time.hour, + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -264,6 +269,9 @@ category = "bfcache", short_name = "bfc", ), + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -487,6 +495,9 @@ ), cq_mirrors_console_view = "mirrors", tree_closing = True, + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -495,6 +506,9 @@ category = "builder_tester|x86", short_name = "M_non-cq", ), + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -519,6 +533,9 @@ category = "builder_tester|arm64", short_name = "p-cov", ), + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -531,6 +548,9 @@ cq_mirrors_console_view = "mirrors", execution_timeout = 4 * time.hour, tree_closing = True, + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder( @@ -539,6 +559,9 @@ category = "builder_tester|x86", short_name = "P", ), + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) # TODO(crbug.com/1137474): Update the console view config once on CQ @@ -549,6 +572,9 @@ short_name = "11", ), tree_closing = True, + goma_backend = None, + reclient_instance = rbe_instance.DEFAULT, + reclient_jobs = rbe_jobs.HIGH_JOBS_FOR_CI, ) ci.builder(
diff --git a/infra/inclusive_language_presubmit_exempt_dirs.txt b/infra/inclusive_language_presubmit_exempt_dirs.txt index 30cda0c..10fce94 100644 --- a/infra/inclusive_language_presubmit_exempt_dirs.txt +++ b/infra/inclusive_language_presubmit_exempt_dirs.txt
@@ -81,7 +81,6 @@ chrome/install_static 1 1 chromeos/network/docs 1 1 chromeos/process_proxy 6 5 -chromeos/third_party/android_bionic_libc 1 1 chrome/test/chromedriver 1 1 chrome/test/chromedriver/chrome 1 1 chrome/test/chromedriver/docs 1 1
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_ar.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_ar.xtb index a2a48c16..a29dd37 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_ar.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_ar.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">تعذّر على متصفِّح Chromium التحقُّق من كلمات المرور. يُرجى التحقُّق من اتصال الإنترنت.</translation> <translation id="3472200483164753384">غير متاح على Chromium Canary</translation> <translation id="3639997914391704523">يجب تسجيل الدخول إلى حسابك على Google ليتمكّن Chromium من التحقُّق من كلمات المرور.</translation> +<translation id="3650632991272923014">كان <ph name="USER_EMAIL1" /> يستخدم Chromium وتركَ إشارات مرجعية وكلمات مرور وغيرها من الإعدادات مُسجَّلة على هذا الجهاز.</translation> <translation id="3805899903892079518">لا تتوفر لدى Chromium إمكانية الدخول إلى الصور أو الفيديوهات. تستطيع تفعيل الدخول في إعدادات نظام التشغيل iOS > الخصوصية > الصور.</translation> <translation id="4043291146360695975">يتم حفظ كلمات المرور في "مدير كلمات المرور" على هذا الجهاز فقط.</translation> <translation id="4099085513035183040">غير متاح على الإصدار التجريبي من Chromium</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_bg.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_bg.xtb index b552d70..2ef0800 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_bg.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_bg.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium не успя да провери паролите ви. Проверете връзката си с интернет.</translation> <translation id="3472200483164753384">Не се поддържа от Chromium Canary</translation> <translation id="3639997914391704523">Chromium може да проверява паролите ви, когато влизате с профила си в Google.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> използва Chromium и запази на това устройство отметки, пароли и други настройки.</translation> <translation id="3805899903892079518">Chromium няма достъп до снимките или видеоклиповете ви. Активирайте го от „Settings“ > „Privacy“ > „Photos“ в iOS.</translation> <translation id="4043291146360695975">Паролите се запазват в мениджъра на паролите само на това устройство.</translation> <translation id="4099085513035183040">Не се поддържа от Chromium бета</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_en-GB.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_en-GB.xtb index 85a0d048..1e8e426 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_en-GB.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_en-GB.xtb
@@ -66,6 +66,7 @@ <translation id="5777187867430702742">Chromium page</translation> <translation id="5862307444128926510">Welcome to Chromium</translation> <translation id="5945387852661427312">You are signing in with an account managed by <ph name="DOMAIN" /> and giving its administrator control over your Chromium data. Your data will become permanently tied to this account. Signing out of Chromium will delete your data from this device, but it will remain stored in your Google Account.</translation> +<translation id="5983312940147103417">Make Chromium better</translation> <translation id="602807004951640891">By using Chromium, you agree to the <ph name="BEGIN_LINK_TOS" />Terms of Service<ph name="END_LINK_TOS" />.</translation> <translation id="6119647025869519954">To make Chromium your default: 1. Open settings @@ -104,6 +105,13 @@ <translation id="7931842119211730154">Lock incognito tabs when you close Chromium</translation> <translation id="7980860476903281594">Chromium shares your location with sites that you allow.</translation> <translation id="8013573822802650211">To see your tabs from wherever you use Chromium, sign in on all your devices</translation> +<translation id="80599830191519229">When on: +<ph name="BEGIN_INDENT" /> • Help make Chromium better for people who use it the way that you do<ph name="END_INDENT" /> + +Things to consider: +<ph name="BEGIN_INDENT" /> • Info is sent to Google about your Chromium usage, but it isn't tied to you + • If Chromium crashes, details about the crash may include some personal info + • If you turn on sync, metrics may also include info about URLs that you visit<ph name="END_INDENT" /></translation> <translation id="8073677936375100957">Clear your Chromium data from this device?</translation> <translation id="8175055321229419309">Tip: <ph name="BEGIN_LINK" />Move Chromium to your dock<ph name="END_LINK" /></translation> <translation id="8240981428553046115">Chromium couldn't check for updates. Try again later.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_id.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_id.xtb index dd17963d..1c096c6 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_id.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_id.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium tidak dapat memeriksa sandi Anda. Coba periksa koneksi internet Anda.</translation> <translation id="3472200483164753384">Tidak didukung di Chromium Canary</translation> <translation id="3639997914391704523">Chromium dapat memeriksa sandi saat Anda login dengan Akun Google.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> menggunakan Chromium dan meninggalkan bookmark, sandi, serta setelan lainnya di perangkat ini.</translation> <translation id="3805899903892079518">Chromium tidak memiliki akses ke foto atau video Anda. Izinkan akses di iOS Settings > Privacy > Photos.</translation> <translation id="4043291146360695975">Sandi hanya disimpan ke Pengelola Sandi di perangkat ini.</translation> <translation id="4099085513035183040">Tidak didukung di Chromium Beta</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb index 47c39d74..48d1ca1 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium לא הצליח לבדוק את הסיסמאות שלך. יש לבדוק את החיבור לאינטרנט.</translation> <translation id="3472200483164753384">אין תמיכה ב-Chromium Canary</translation> <translation id="3639997914391704523">Chromium יכול לבדוק את הסיסמאות כשנכנסים באמצעות חשבון Google.</translation> +<translation id="3650632991272923014">במכשיר הזה נעשה שימוש ב‑Chromium על ידי <ph name="USER_EMAIL1" /> ונשארו סימניות, סיסמאות והגדרות נוספות.</translation> <translation id="3805899903892079518">ל-Chromium אין גישה לתמונות או לסרטונים שלך. יש להפעיל את הגישה ב'הגדרות iOS' > 'פרטיות' > 'תמונות'.</translation> <translation id="4043291146360695975">סיסמאות נשמרות במנהל הסיסמאות במכשיר הזה בלבד.</translation> <translation id="4099085513035183040">אין תמיכה ב-Chromium בטא</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_km.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_km.xtb index cb0aa63..689a27a3 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_km.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_km.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium មិនអាចពិនិត្យពាក្យសម្ងាត់របស់អ្នកបានទេ។ សូមសាកល្បងពិនិត្យការតភ្ជាប់អ៊ីនធឺណិតរបស់អ្នក។</translation> <translation id="3472200483164753384">មិនអាចប្រើនៅលើ Chromium Canary បានទេ</translation> <translation id="3639997914391704523">Chromium អាចពិនិត្យពាក្យសម្ងាត់របស់អ្នក នៅពេលអ្នកចូលដោយប្រើគណនី Google របស់អ្នក។</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> កំពុងប្រើ Chromium និងទុកចំណាំ ពាក្យសម្ងាត់ និងការកំណត់ផ្សេងទៀតនៅលើឧបករណ៍នេះ។</translation> <translation id="3805899903892079518">Chromium មិនមានលទ្ធភាពចូលប្រើរូបថត និងវីដេអូរបស់អ្នកទេ។ សូមបើកដំណើរការចូលប្រើនៅក្នុងការកំណត់ iOS > ភាពឯកជន > រូបថត។</translation> <translation id="4043291146360695975">ពាក្យសម្ងាត់ត្រូវបានរក្សាទុកទៅក្នុងកម្មវិធីគ្រប់គ្រងពាក្យសម្ងាត់នៅលើឧបករណ៍នេះតែប៉ុណ្ណោះ។</translation> <translation id="4099085513035183040">មិនអាចប្រើនៅលើ Chromium បេតាបានទេ</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_ko.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_ko.xtb index e7779ee..768150ef 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_ko.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_ko.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium에서 비밀번호를 확인할 수 없습니다. 인터넷 연결 상태를 확인하세요.</translation> <translation id="3472200483164753384">Chromium Canary에서 지원되지 않습니다.</translation> <translation id="3639997914391704523">Google 계정으로 로그인하면 Chromium에서 비밀번호를 확인할 수 있습니다.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> 계정이 Chromium을 사용했으며 이 기기에 북마크, 비밀번호, 기타 설정을 남겼습니다</translation> <translation id="3805899903892079518">Chromium에서 사진 또는 동영상에 액세스할 수 없습니다. 'iOS 설정 > 개인정보 보호 > 사진'에서 액세스를 허용하세요.</translation> <translation id="4043291146360695975">비밀번호가 이 기기의 비밀번호 관리자에만 저장됩니다</translation> <translation id="4099085513035183040">Chromium 베타에서는 지원되지 않습니다.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_lt.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_lt.xtb index 08c49e72..7499c08 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_lt.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_lt.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">„Chromium“ nepavyko patikrinti jūsų slaptažodžių. Pabandykite patikrinti interneto ryšį.</translation> <translation id="3472200483164753384">Nepalaikoma versijoje „Chromium Canary“</translation> <translation id="3639997914391704523">„Chromium“ gali tikrinti jūsų slaptažodžius, kai prisijungiate naudodami „Google“ paskyrą.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> naudojo „Chromium“ ir paliko žymes, slaptažodžius bei kitus nustatymus šiame įrenginyje.</translation> <translation id="3805899903892079518">„Chromium“ nepasiekia nuotraukų ar vaizdo įr. Įgalinkite prieigą apsil. „iOS“ nustatymai“ > „Privatumas“ > „Nuotraukos“.</translation> <translation id="4043291146360695975">Slaptažodžiai saugomi Slaptažodžių tvarkytuvėje tik šiame įrenginyje.</translation> <translation id="4099085513035183040">Nepalaikoma „Chromium“ beta versijoje</translation> @@ -65,6 +66,7 @@ <translation id="5777187867430702742">„Chromium“ puslapis</translation> <translation id="5862307444128926510">Sveiki, tai „Chromium“</translation> <translation id="5945387852661427312">Prisijungiate naudodami <ph name="DOMAIN" /> valdomą paskyrą ir suteikiate jos administratoriui galimybę valdyti jūsų „Chromium“ duomenis. Duomenys bus visam laikui susieti su šia paskyra. Atsijungę nuo „Chromium“ ištrinsite duomenis iš šio įrenginio, bet jie ir toliau bus saugomi „Google“ paskyroje.</translation> +<translation id="5983312940147103417">„Chromium“ tobulinimas</translation> <translation id="602807004951640891">Naudodami „Chromium“ sutinkate su <ph name="BEGIN_LINK_TOS" />paslaugų teikimo sąlygomis<ph name="END_LINK_TOS" />.</translation> <translation id="6119647025869519954">Jei norite nustatyti „Chromium“ kaip numatytąją naršyklę, atlikite toliau nurodytus veiksmus. 1. Atidarykite skiltį „Nustatymai“. @@ -103,6 +105,13 @@ <translation id="7931842119211730154">Užrakinti inkognito skirtukus uždarius „Chromium“</translation> <translation id="7980860476903281594">„Chromium“ bendrina jūsų vietovę su svetainėmis, kurioms leidžiate gauti tokius duomenis.</translation> <translation id="8013573822802650211">Kad matytumėte skirtukus iš visų įrenginių, kuriuose naudojate „Chromium“, prisijunkite visuose įrenginiuose</translation> +<translation id="80599830191519229">Kai įjungta +<ph name="BEGIN_INDENT" /> • Padėkite tobulinti „Chromium“ žmonėms, naudojantiems jį kaip jūs<ph name="END_INDENT" /> + +Į ką reikėtų atsižvelgti +<ph name="BEGIN_INDENT" /> • Sistemai „Google“ siunčiama informacija apie „Chromium“ naudojimą, tačiau ji su jumis nesusiejama. + • Jei „Chromium“ užstringa, į ataskaitą gali būti įtraukta tam tikros asmens informacijos. + • Jei įjungsite sinchronizavimą, į metriką gali būti įtraukta informacijos apie URL, kuriuose lankėtės.<ph name="END_INDENT" /></translation> <translation id="8073677936375100957">Išvalyti jūsų „Chromium“ duomenis iš šio įrenginio?</translation> <translation id="8175055321229419309">Patarimas: <ph name="BEGIN_LINK" />perkelkite „Chromium“ į doką<ph name="END_LINK" /></translation> <translation id="8240981428553046115">„Chromium“ nepavyko patikrinti, ar yra naujinių. Bandykite dar kartą vėliau.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_mk.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_mk.xtb index 6afe87dc..6dc688f 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_mk.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_mk.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium не може да ги провери вашите лозинки. Проверете ја интернет-врската.</translation> <translation id="3472200483164753384">Не е поддржана на Chromium Canary</translation> <translation id="3639997914391704523">Chromium може да ги проверува вашите лозинки кога ќе се најавите со вашата сметка на Google.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> користеше Chromium и остави обележувачи, лозинки и други поставки на уредов.</translation> <translation id="3805899903892079518">Chromium нема пристап до фотографиите или видеата. Овозможете пристап во Поставки на iOS > Приватност > Фотографии.</translation> <translation id="4043291146360695975">Лозинките се зачувани во „Управникот со лозинки“ само на уредов.</translation> <translation id="4099085513035183040">Не е поддржана на Chromium Beta</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_mn.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_mn.xtb index 8ea7323e..8f5643d 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_mn.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_mn.xtb
@@ -66,6 +66,7 @@ <translation id="5777187867430702742">Chromium-н хуудас</translation> <translation id="5862307444128926510">Chromium-д тавтай морил</translation> <translation id="5945387852661427312">Та <ph name="DOMAIN" />-с удирддаг бүртгэлээр нэвтэрч байгаа бөгөөд үүнд таны Chromium-н өгөгдлийг удирдах админ эрхийг олгож байна. Таны өгөгдөл энэ бүртгэлтэй бүрмөсөн холбоотой болно. Chromium-с гарснаар таны бүх өгөгдлийг энэ төхөөрөмжөөс устгах бөгөөд тэдгээр өгөгдөл таны Google бүртгэлд хэвээр үлдэнэ.</translation> +<translation id="5983312940147103417">Chromium-г сайжруулаарай</translation> <translation id="602807004951640891">Chromium-г суулгаснаар та <ph name="BEGIN_LINK_TOS" />Үйлчилгээний нөхцөлийг<ph name="END_LINK_TOS" /> зөвшөөрч байна.</translation> <translation id="6119647025869519954">Chromium-г өгөгдмөлөө болгохын тулд: 1. Тохиргоог нээнэ үү @@ -104,6 +105,13 @@ <translation id="7931842119211730154">Таныг Chromium-г хаах үед Нууцлалтай табыг түгжинэ</translation> <translation id="7980860476903281594">Chromium таны байршлыг таны зөвшөөрсөн сайтуудтай хуваалцана.</translation> <translation id="8013573822802650211">Та Chromium-г хаанаас ч ашигласан бай табуудаа харахын тулд бүх төхөөрөмж дээрээ нэвтэрнэ үү</translation> +<translation id="80599830191519229">Асаалттай үед: +<ph name="BEGIN_INDENT" /> • Chromium-г тантай адил аргаар ашигладаг хүмүүст зориулан сайжруулахад нь туслаарай<ph name="END_INDENT" /> + +Анхаарч үзэх зүйлс: +<ph name="BEGIN_INDENT" /> • Таны Chromium-н ашиглалтын талаарх мэдээллийг Google-д илгээх хэдий ч энэ нь тантай хамааралгүй байна + • Chromium гэмтсэн тохиолдолд гэмтлийн талаарх мэдээлэлд зарим хувийн мэдээлэл багтаж болно + • Та синк хийхийг асаасан тохиолдолд хэмжигдэхүүнд мөн таны зочилсон URL-уудын талаарх мэдээлэл багтаж болно<ph name="END_INDENT" /></translation> <translation id="8073677936375100957">Энэ төхөөрөмжөөс Chromium-н өгөгдлөө устгах уу?</translation> <translation id="8175055321229419309">Зөвлөгөө: <ph name="BEGIN_LINK" />Chromium-г апп-н мөр рүү зөөнө үү<ph name="END_LINK" /></translation> <translation id="8240981428553046115">Chromium-н шинэчлэлтийг шалгаж чадсангүй. Дараа дахин оролдоно уу.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_ms.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_ms.xtb index 256e6b0e..0aa60c6 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_ms.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_ms.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium tidak dapat menyemak kata laluan anda. Cuba periksa sambungan Internet anda.</translation> <translation id="3472200483164753384">Tidak disokong pada Chromium Canary</translation> <translation id="3639997914391704523">Chromium boleh menyemak kata laluan anda apabila anda log masuk menggunakan Akaun Google anda.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> telah menggunakan Chromium dan membiarkan penanda halaman, kata laluan dan tetapan lain pada peranti ini.</translation> <translation id="3805899903892079518">Chromium tidak mempunyai akses kepada foto atau video anda. Dayakan akses dalam Tetapan iOS > Privasi > Foto.</translation> <translation id="4043291146360695975">Kata laluan disimpan pada Pengurus Kata Laluan pada peranti ini sahaja.</translation> <translation id="4099085513035183040">Tidak disokong pada Chromium Beta</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_my.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_my.xtb index 2e7fc23..a533274 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_my.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_my.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium က သင့်စကားဝှက်များကို စစ်ဆေး၍မရပါ။ သင့်အင်တာနက် ချိတ်ဆက်မှုကို စစ်ဆေးပါ။</translation> <translation id="3472200483164753384">Chromium Canary တွင် ပံ့ပိုးမထားပါ</translation> <translation id="3639997914391704523">သင်၏ Google Account နှင့် လက်မှတ်ထိုးဝင်သည့်အခါ Chromium က သင့်စကားဝှက်များကို စစ်ဆေးနိုင်သည်။</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> က Chromium အသုံးပြုလျက်ရှိပြီး ဤစက်တွင် လိပ်စာ၊ စကားဝှက်နှင့် အခြားဆက်တင်များ ချန်ထားသည်။</translation> <translation id="3805899903892079518">Chromium သည်သင့်ဓာတ်ပုံများနှင့် ဗီဒီယိုများကို အသုံးပြုခွင့်မရှိပါ။ အသုံးပြုခွင့်ကို iOS ဆက်တင်များ > ကိုယ်ရေးအချက်အလက်လုံခြုံမှု > ဓာတ်ပုံများ တွင်သွားရောက်ဖွင့်နိုင်ပါသည်။</translation> <translation id="4043291146360695975">စကားဝှက်များကို ဤစက်တွင်သာရှိသော စကားဝှက်မန်နေဂျာသို့ သိမ်းထားသည်။</translation> <translation id="4099085513035183040">Chromium စမ်းသပ်ဆော့ဖ်ဝဲတွင် ပံ့ပိုးမထားပါ</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_ne.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_ne.xtb index e4a3e4d..f9a115ed 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_ne.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_ne.xtb
@@ -43,6 +43,7 @@ <translation id="3344973607274501920">Chromium ले तपाईंका पासवर्डहरू जाँच्न सकेन। आफ्नो इन्टरनेट जाँच गरी हेर्नुहोस्।</translation> <translation id="3472200483164753384">Chromium क्यानेरीमा प्रयोग गर्न मिल्दैन</translation> <translation id="3639997914391704523">तपाईंले आफ्नो Google खातामा साइन इन गरेपछि मात्र Chromium ले तपाईंका पासवर्डहरू जाँच्न सक्छ।</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> ले Chromium प्रयोग गर्नुभएको थियो तर यो डिभाइसबाट सेभ गरिएका बुकमार्क, पासवर्ड र अन्य सेटिङ मेटाउनुभएको थिएन।</translation> <translation id="3805899903892079518">Chromiumसँग तपाईंको तस्बिर वा भिडियोहरूमा पहुँच छैन। iOS सेटिङहरू > गोपनीयता > तस्बिरहरूमा पहुँच सक्रिय गर्नुहोस्।</translation> <translation id="4043291146360695975">पासवर्डहरू यो डिभाइसको पासवर्ड म्यानेजरमा मात्र सेभ गरिन्छन्।</translation> <translation id="4099085513035183040">Chromium को बिटा संस्करणमा प्रयोग गर्न मिल्दैन</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_ro.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_ro.xtb index 643d13cb..8b5c5d72 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_ro.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_ro.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium nu a putut verifica parolele. Verifică-ți conexiunea la internet.</translation> <translation id="3472200483164753384">Nu se acceptă în Chromium Canary</translation> <translation id="3639997914391704523">Chromium poate să îți verifice parolele atunci când te conectezi folosind Contul Google.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> folosea Chromium și marcajele, parolele și alte setări ale sale au rămas pe acest dispozitiv.</translation> <translation id="3805899903892079518">Chromium nu are acces la fotografii și videoclipuri. Activează accesul din Setări iOS > Confidențialitate > Fotografii.</translation> <translation id="4043291146360695975">Parolele sunt salvate în Managerul de parole numai pe acest dispozitiv.</translation> <translation id="4099085513035183040">Nu se acceptă în Chromium Beta</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_sk.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_sk.xtb index f01c6db..70a902e 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_sk.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_sk.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Prehliadaču Chromium sa nepodarilo skontrolovať heslá. Skontrolujte internetové pripojenie.</translation> <translation id="3472200483164753384">Nepodporované vo verzii Chromium Canary</translation> <translation id="3639997914391704523">Keď sa prihlásite účtom Google, Chromium môže skontrolovať vaše heslá.</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> používal(a) Chromium a zanechal(a) záložky, heslá a ďalšie nastavenia v tomto zariadení.</translation> <translation id="3805899903892079518">Chromium nemá prístup k vašim fotkám ani videám. Prístup povoľte v časti Nastavenia systému iOS > Súkromie > Fotky.</translation> <translation id="4043291146360695975">Heslá sa ukladajú do správcu hesiel iba v tomto zariadení.</translation> <translation id="4099085513035183040">Nepodporované vo verzii Chromium Beta</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_zh-HK.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_zh-HK.xtb index 53272e0..a0014579 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_zh-HK.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_zh-HK.xtb
@@ -44,6 +44,7 @@ <translation id="3344973607274501920">Chromium 無法檢查密碼,請檢查互聯網連線。</translation> <translation id="3472200483164753384">Chromium Canary 上不支援此功能</translation> <translation id="3639997914391704523">Chromium 可在您使用 Google 帳戶登入時檢查密碼。</translation> +<translation id="3650632991272923014"><ph name="USER_EMAIL1" /> 之前曾在此裝置上使用 Chromium,並儲存書籤、密碼和其他設定。</translation> <translation id="3805899903892079518">Chromium 沒有存取相片或影片的權限。請前往「iOS 設定」>「私隱」>「相片」開放權限。</translation> <translation id="4043291146360695975">密碼只會儲存至此裝置上的「密碼管理工具」。</translation> <translation id="4099085513035183040">Chromium Beta 版本上不支援此功能</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ar.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ar.xtb index a2064e2..c4ce5d8 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ar.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ar.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">يمكنك المساعدة في تحسين Chrome عن طريق إرسال إحصاءات الاستخدام وتقارير الأعطال إلى Google.</translation> <translation id="417201473131094001">غير متاح على Chrome Canary</translation> <translation id="4214277427269650960">سجِّل الدخول إلى هذا الموقع الإلكتروني وإلى Chrome. يمكنك تفعيل المزامنة لاحقًا.</translation> +<translation id="4233521129555661685">كان <ph name="USER_EMAIL1" /> يستخدم Chrome وتركَ إشارات مرجعية وكلمات مرور وغيرها من الإعدادات مُسجَّلة على هذا الجهاز.</translation> <translation id="424864128008805179">هل تريد تسجيل الخروج من Chrome؟</translation> <translation id="4249068189593983585">نصيحة لاستخدام Chrome: لمزيد من خيارات علامات التبويب، يمكنك النقر مع الاستمرار على الزر "إظهار علامات التبويب" في شريط الأدوات الموجود أسفل الشاشة أو أعلاها.</translation> <translation id="4523886039239821078">تتسبب بعض الإضافات في تعطل Chrome. يُرجى إزالتها:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_bg.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_bg.xtb index f66b3eb0..1a6ae98 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_bg.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_bg.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Помогнете за подобряването на Chrome, като изпращате до Google статистически данни за употребата и сигнали за сривове.</translation> <translation id="417201473131094001">Не се поддържа от Chrome Canary</translation> <translation id="4214277427269650960">Влезте в профила си в този сайт и в Chrome. Можете да включите синхронизирането по-късно.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> използва Chrome и запази на това устройство отметки, пароли и други настройки.</translation> <translation id="424864128008805179">Искате ли да излезете от Chrome?</translation> <translation id="4249068189593983585">Съвет за Chrome. За да видите още опции за разделите, докоснете и задръжте бутона „Показване на разделите“ в лентата с инструменти в долната или горната част на екрана.</translation> <translation id="4523886039239821078">Някои добавки водят до срив на Chrome. Моля, деинсталирайте:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_en-GB.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_en-GB.xtb index ed22449..bf79879 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_en-GB.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_en-GB.xtb
@@ -21,6 +21,13 @@ <translation id="2347208864470321755">When this feature is turned on, Chrome will offer to translate pages written in other languages using Google Translate. <ph name="BEGIN_LINK" />Learn more<ph name="END_LINK" /></translation> <translation id="2427791862912929107">Chrome has features that help you manage your Internet data and how quickly you're able to load web pages. <ph name="BEGIN_LINK" />Learn more<ph name="END_LINK" /></translation> +<translation id="245827422401250729">When on: +<ph name="BEGIN_INDENT" /> • Help make Chrome better for people who use it the way that you do<ph name="END_INDENT" /> + +Things to consider: +<ph name="BEGIN_INDENT" /> • Info is sent to Google about your Chrome usage, but it isn't tied to you + • If Chrome crashes, details about the crash may include some personal info + • If you turn on sync, metrics may also include info about URLs that you visit<ph name="END_INDENT" /></translation> <translation id="2561231791489583059">Use Chrome as your default browser to stay protected from dangerous sites and keep your passwords safe</translation> <translation id="2574249610672786438">To see your tabs from wherever you use Chrome, sign in on all of your devices</translation> <translation id="2576431527583832481">Chrome just got better! A new version is available.</translation> @@ -58,6 +65,7 @@ <translation id="4698415050768537821">Chrome couldn't check all passwords. Try again tomorrow or <ph name="BEGIN_LINK" />check passwords in your Google Account.<ph name="END_LINK" /></translation> <translation id="484033449593719797">Not supported on Chrome beta</translation> <translation id="5030102366287574140">Chrome can help keep you safe from data breaches, unsafe websites and more.</translation> +<translation id="5108659628347594808">Make Chrome better</translation> <translation id="5119391094379141756">Select Chrome</translation> <translation id="5162467219239570114">Chrome is out of date. If no update is available in the <ph name="BEGIN_LINK" />app store<ph name="END_LINK" />, it's possible that your device doesn't support new versions of Chrome anymore.</translation> <translation id="5389212809648216794">Google Chrome can't use your camera because it's in use by another application</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_id.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_id.xtb index 9f31858..5225d67 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_id.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_id.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Bantu penyempurnaan Chrome dengan mengirimkan statistik penggunaan dan laporan error ke Google.</translation> <translation id="417201473131094001">Tidak didukung di Chrome Canary</translation> <translation id="4214277427269650960">Login ke situs ini dan Chrome. Anda dapat mengaktifkan sinkronisasi nanti.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> menggunakan Chrome dan meninggalkan bookmark, sandi, serta setelan lainnya di perangkat ini.</translation> <translation id="424864128008805179">Logout dari Chrome?</translation> <translation id="4249068189593983585">Tips Chrome. Untuk opsi tab lainnya, sentuh lama tombol Tampilkan Tab di toolbar, yang terdapat di bagian bawah atau atas layar.</translation> <translation id="4523886039239821078">Beberapa pengaya (pengaya) menyebabkan Chrome mogok. Uninstal:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb index 14e78ac54..f457b93 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">אם שולחים אלינו נתוני שימוש ודוחות קריסה, עוזרים לשפר את Chrome.</translation> <translation id="417201473131094001">אין תמיכה ב-Chrome Canary</translation> <translation id="4214277427269650960">עליך להיכנס לאתר הזה ול-Chrome. ניתן להפעיל את הסנכרון מאוחר יותר.</translation> +<translation id="4233521129555661685">במכשיר הזה נעשה שימוש ב‑Chrome על ידי <ph name="USER_EMAIL1" /> ונשארו סימניות, סיסמאות והגדרות נוספות.</translation> <translation id="424864128008805179">האם לצאת מ-Chrome?</translation> <translation id="4249068189593983585">טיפ למשתמשי Chrome: כדי לקבל אפשרויות נוספות של כרטיסיות, יש ללחוץ לחיצה ארוכה על הלחצן 'הצגת כרטיסיות' בסרגל הכלים, שנמצא בחלק התחתון או העליון של המסך.</translation> <translation id="4523886039239821078">תוספים מסוימים גורמים ל-Chrome לקרוס. יש להסיר את ההתקנה שלהם:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_km.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_km.xtb index 72342aa0..efb5d4b 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_km.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_km.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">ជួយធ្វើឲ្យ Chrome ប្រសើរជាងមុនដោយផ្ញើស្ថិតិប្រើប្រាស់ និងរបាយការណ៍ការគាំងទៅ Google។</translation> <translation id="417201473131094001">មិនអាចប្រើនៅលើ Chrome Canary បានទេ</translation> <translation id="4214277427269650960">ចូលគេហទំព័រនេះ និង Chrome។ អ្នកអាចបើកសមកាលកម្មនៅពេលក្រោយ។</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> កំពុងប្រើ Chrome និងទុកចំណាំ ពាក្យសម្ងាត់ និងការកំណត់ផ្សេងទៀតនៅលើឧបករណ៍នេះ។</translation> <translation id="424864128008805179">ចង់ចេញពី Chrome មែនទេ?</translation> <translation id="4249068189593983585">គន្លឹះប្រើប្រាស់ Chrome ។ ដើម្បីទទួលបានជម្រើសផ្ទាំងច្រើនទៀត សូមចុចប៊ូតុង "បង្ហាញផ្ទាំង" ឱ្យជាប់នៅក្នុងរបារឧបករណ៍ ដែលស្ថិតនៅផ្នែកខាងក្រោម ឬខាងលើអេក្រង់របស់អ្នក។</translation> <translation id="4523886039239821078">កម្មវិធីបន្ថែមមួយចំនួនអាចធ្វើឲ្យ Chrome គាំង។ សូមលុបការដំឡើង៖</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ko.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ko.xtb index cb9c424..6dc6a48 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ko.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ko.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">사용 통계와 비정상 종료 보고서를 Google로 전송하여 Chrome을 개선하는 데 동참하세요.</translation> <translation id="417201473131094001">Chrome Canary에서 지원되지 않습니다.</translation> <translation id="4214277427269650960">이 사이트 및 Chrome에 로그인하세요. 나중에 동기화를 사용 설정할 수 있습니다.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> 계정이 Chrome을 사용했으며 이 기기에 북마크, 비밀번호, 기타 설정을 남겼습니다</translation> <translation id="424864128008805179">Chrome에서 로그아웃하시겠습니까?</translation> <translation id="4249068189593983585">Chrome 도움말. 더 많은 탭 옵션을 보려면 화면 하단이나 상단에 있는 툴바에서 탭 표시 버튼을 길게 터치하세요.</translation> <translation id="4523886039239821078">일부 부가기능이 Chrome을 비정상 종료시킵니다. 다음 항목을 제거하세요.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_lt.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_lt.xtb index caf7f34..cf190f01 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_lt.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_lt.xtb
@@ -21,6 +21,13 @@ <translation id="2347208864470321755">Kai ši funkcija įjungta, „Chrome“ siūlo versti kitomis kalbomis parašytus puslapius naudojant „Google“ vertėją. <ph name="BEGIN_LINK" />Sužinokite daugiau<ph name="END_LINK" /></translation> <translation id="2427791862912929107">„Chrome“ yra funkcijų, kurias naudojant lengva tvarkyti internetinius duomenis ir tinklalapių įkėlimo spartą. <ph name="BEGIN_LINK" />Sužinokite daugiau<ph name="END_LINK" /></translation> +<translation id="245827422401250729">Kai įjungta +<ph name="BEGIN_INDENT" /> • Padėkite tobulinti „Chrome“ žmonėms, naudojantiems ją kaip jūs<ph name="END_INDENT" /> + +Į ką reikėtų atsižvelgti +<ph name="BEGIN_INDENT" /> • Sistemai „Google“ siunčiama informacija apie „Chrome“ naudojimą, tačiau ji su jumis nesusiejama. + • Jei „Chrome“ užstringa, į ataskaitą gali būti įtraukta tam tikros asmens informacijos. + • Jei įjungsite sinchronizavimą, į metriką gali būti įtraukta informacijos apie URL, kuriuose lankėtės.<ph name="END_INDENT" /></translation> <translation id="2561231791489583059">Naudokite „Chrome“ kaip numatytąją naršyklę, kad apsisaugotumėte nuo pavojingų svetainių ir užtikrintumėte slaptažodžių apsaugą</translation> <translation id="2574249610672786438">Kad matytumėte skirtukus iš visų įrenginių, kuriuose naudojate „Chrome“, prisijunkite visuose įrenginiuose</translation> <translation id="2576431527583832481">„Chrome“ patobulėjo! Galima nauja versija.</translation> @@ -50,6 +57,7 @@ <translation id="4099578267706723511">Padėkite tobulinti „Chrome“ siųsdami „Google“ naudojimo statistiką ir strigčių ataskaitas.</translation> <translation id="417201473131094001">Nepalaikoma versijoje „Chrome Canary“</translation> <translation id="4214277427269650960">Prisijunkite prie šios svetainės ir „Chrome“. Sinchronizavimą galėsite įjungti vėliau.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> naudojo „Chromium“ ir paliko žymes, slaptažodžius bei kitus nustatymus šiame įrenginyje.</translation> <translation id="424864128008805179">Atsijungti nuo „Chrome“?</translation> <translation id="4249068189593983585">„Chrome“ patarimas. Jei reikia daugiau skirtukų parinkčių, palieskite ir palaikykite mygtuką „Rodyti skirtukus“ įrankių juostoje, kuri yra ekrano apačioje arba viršuje.</translation> <translation id="4523886039239821078">Dėl tam tikrų priedų „Chrome“ užstringa . Pašalinkite:</translation> @@ -57,6 +65,7 @@ <translation id="4698415050768537821">„Chrome“ nepavyko patikrinti visų slaptažodžių. Bandykite dar kartą rytoj arba <ph name="BEGIN_LINK" />patikrinkite slaptažodžius „Google“ paskyroje<ph name="END_LINK" />.</translation> <translation id="484033449593719797">Nepalaikoma „Chrome“ beta versijoje</translation> <translation id="5030102366287574140">„Chrome“ gali padėti apsisaugoti nuo duomenų saugos pažeidimų, nesaugių svetainių ir pan.</translation> +<translation id="5108659628347594808">„Chrome“ tobulinimas</translation> <translation id="5119391094379141756">Pasirinkite „Chrome“</translation> <translation id="5162467219239570114">„Chrome“ versija yra pasenusi. Jei <ph name="BEGIN_LINK" />programų parduotuvėje<ph name="END_LINK" /> nėra jokio naujinio, gali būti, kad įrenginys nebepalaiko naujų versijų „Chrome“.</translation> <translation id="5389212809648216794">„Google Chrome“ negali naudoti fotoaparato, nes jį naudoja kita programa</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_mk.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_mk.xtb index 074c1bc..e3f2e40 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_mk.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_mk.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Помогнете да го подобриме Google Chrome со автоматско испраќање статистика за користење и извештаи за падови до Google.</translation> <translation id="417201473131094001">Не е поддржана на Chrome Canary</translation> <translation id="4214277427269650960">Најавете се на сајтов и на Chrome. Синхронизацијата може да ја вклучите подоцна.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> користеше Chrome и остави обележувачи, лозинки и други поставки на уредов.</translation> <translation id="424864128008805179">Ќе се одјавите од Chrome?</translation> <translation id="4249068189593983585">Совет за Chrome: за повеќе опции за картичките, допрете го и задржете го копчето „Прикажи ги картичките“ во алатникот, што се наоѓа најгоре или најдолу на екранот.</translation> <translation id="4523886039239821078">Некои додатоци предизвикуваат пад на Chrome. Деинсталирајте:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_mn.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_mn.xtb index 1a5f6b8..33d052e6 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_mn.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_mn.xtb
@@ -21,6 +21,13 @@ <translation id="2347208864470321755">Энэ горим асаалттай байгаа үед Google нь Chrome Translate-ыг ашиглан бусад хэл дээр бичигдсэн хуудсуудыг орчуулахыг санал болгоно. <ph name="BEGIN_LINK" />Илүү ихийг мэдэж аваарай<ph name="END_LINK" /></translation> <translation id="2427791862912929107">Chrome-д танд интернэтийн өгөгдлөө удирдах болон веб хуудсыг хэр шуурхай ачаалж болохыг удирдахад туслах онцлогууд бий. <ph name="BEGIN_LINK" />Нэмэлт мэдээлэл авах<ph name="END_LINK" /></translation> +<translation id="245827422401250729">Асаалттай үед: +<ph name="BEGIN_INDENT" /> • Chrome-г тантай адил аргаар ашигладаг хүмүүст зориулан сайжруулахад нь туслаарай<ph name="END_INDENT" /> + +Анхаарч үзэх зүйлс: +<ph name="BEGIN_INDENT" /> • Таны Chrome-н ашиглалтын талаарх мэдээллийг Google-д илгээх хэдий ч энэ нь тантай хамааралгүй байна + • Chrome гэмтсэн тохиолдолд гэмтлийн талаарх мэдээлэлд зарим хувийн мэдээлэл багтаж болно + • Та синк хийхийг асаасан тохиолдолд хэмжигдэхүүнд мөн таны зочилсон URL-уудын талаарх мэдээлэл багтаж болно<ph name="END_INDENT" /></translation> <translation id="2561231791489583059">Аюултай сайтуудаас хамгаалалттай байх болон нууц үгнүүдээ аюулгүй байлгахын тулд Chrome-г өгөгдмөл хөтчөөрөө ашиглана уу</translation> <translation id="2574249610672786438">Chrome-г хаанаас ч ашигласан бай табуудаа харахын тулд бүх төхөөрөмж дээрээ нэвтэрнэ үү</translation> <translation id="2576431527583832481">Chrome-ийн шинэ хувилбар саяхан гарлаа.</translation> @@ -58,6 +65,7 @@ <translation id="4698415050768537821">Chrome бүх нууц үгийг шалгаж чадсангүй. Маргааш дахин оролдох буюу эсхүл <ph name="BEGIN_LINK" />Google Бүртгэлдээ байгаа нууц үгнүүдийг шалгана уу.<ph name="END_LINK" /></translation> <translation id="484033449593719797">Chrome Бета дээр дэмжихгүй</translation> <translation id="5030102366287574140">Chrome нь таныг өгөгдлийн зөрчил, аюултай вебсайт болон бусад зүйлээс хамгаалахад туслах боломжтой.</translation> +<translation id="5108659628347594808">Chrome-г сайжруулаарай</translation> <translation id="5119391094379141756">Chrome-г сонгоно уу</translation> <translation id="5162467219239570114">Chrome хуучирсан байна. <ph name="BEGIN_LINK" />Апп дэлгүүр<ph name="END_LINK" />-т шинэчлэлт байхгүй бол төхөөрөмж тань Chrome-н шинэ хувилбарыг цаашид дэмжихгүй байж болзошгүй.</translation> <translation id="5389212809648216794">Таны камерыг өөр апп ашиглаж байгаа тул үүнийг Google Chrome ашиглах боломжгүй</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ms.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ms.xtb index 15eab2d..818f062 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ms.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ms.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Bantu jadikan Chrome lebih baik dengan menghantar laporan perangkaan penggunaan dan ranap sistem kepada Google.</translation> <translation id="417201473131094001">Tidak disokong pada Chrome Canary</translation> <translation id="4214277427269650960">Log masuk ke laman ini dan Chrome. Anda boleh menghidupkan penyegerakan kemudian.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> menggunakan Chrome dan membiarkan penanda halaman, kata laluan dan tetapan lain pada peranti ini.</translation> <translation id="424864128008805179">Log keluar daripada Chrome?</translation> <translation id="4249068189593983585">Petua Chrome. Untuk melihat lebih banyak pilihan tab, sentuh & tahan butang Tunjukkan Tab dalam bar alat, yang terletak di bahagian bawah atau atas skrin anda.</translation> <translation id="4523886039239821078">Beberapa tambahan menyebabkan Chrome ranap. Sila nyahpasang:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_my.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_my.xtb index 426419a..b75b456 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_my.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_my.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">အသုံးပြုမှု စာရင်းအင်းများ နှင့် ပျက်စီးမှု အစီရင်ခံစာများကို Google သို့ အလိုအလျောက် ပို့ပေးခြင်းဖြင့် Chrome ကို ပိုကောင်းမွန်အောင် ကူညီပေးပါ။</translation> <translation id="417201473131094001">Chrome Canary တွင် ပံ့ပိုးမထားပါ</translation> <translation id="4214277427269650960">ဤဝဘ်ဆိုက်နှင့် Chrome သို့ လက်မှတ်ထိုးဝင်ပါ။ စင့်ခ်လုပ်ခြင်းကို နောင်တွင် ဖွင့်နိုင်သည်။</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> က Chrome အသုံးပြုလျက်ရှိပြီး ဤစက်တွင် လိပ်စာ၊ စကားဝှက်နှင့် အခြားဆက်တင်များ ချန်ထားသည်။</translation> <translation id="424864128008805179">Chrome မှထွက်မလား။</translation> <translation id="4249068189593983585">Chrome အကြံပြုချက်။ နောက်ထပ် တဘ်ရွေးချယ်စရာများအတွက် ဖန်သားပြင်၏ အောက်ခြေ သို့မဟုတ် ထိပ်ဘက်ရှိ ကိရိယာဘားအတွင်း 'တဘ်ကို ပြရန်' ခလုတ်ကို တို့၍ဖိထားပါ။</translation> <translation id="4523886039239821078">အချို့သော ပေါင်းထည့်မှုများသည့် Chrome ကို ပျက်စီးစေပါသည်။ ကျေးဇူးပြု၍ ပြန်လည်ဖြုတ်ပါ။</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ne.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ne.xtb index 7ac520a..31dcb31 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ne.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ne.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Google मा प्रयोग तथ्याङ्क र क्रयास रिपोर्टहरू पठाएर Chrome लाई राम्रो बनाउन सहयोग गर्नुहोस्!</translation> <translation id="417201473131094001">Chrome क्यानेरीमा प्रयोग गर्न मिल्दैन</translation> <translation id="4214277427269650960">यो साइट र Chrome मा साइन इन गर्नुहोस्। तपाईं सिंक गर्ने सुविधा पछि अन गर्न सक्नुहुन्छ।</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> ले Chrome प्रयोग गर्नुभएको थियो तर यो डिभाइसबाट सेभ गरिएका बुकमार्क, पासवर्ड र अन्य सेटिङ मेटाउनुभएको थिएन।</translation> <translation id="424864128008805179">Chrome बाट साइन आउट गर्ने हो?</translation> <translation id="4249068189593983585">Chrome सम्बन्धी सुझाव। ट्यापसम्बन्धी थप विकल्पहरू हेर्न, तपाईंको स्क्रिनको सिरान वा पुछारमा रहेको उपकरणपट्टीमा ट्याबहरू देखाउनुहोस् नामक बटनमा टच एण्ड होल्ड गर्नुहोस्।</translation> <translation id="4523886039239821078">केही एड्-अनहरूले गर्दा Chrome लाई क्र्याश गराउँछ। कृपया विस्थापन गर्नुहोस्:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ro.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ro.xtb index 28b9d1c..a001885 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_ro.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_ro.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Contribuie la îmbunătățirea Chrome trimițând statistici de utilizare și rapoarte de blocare la Google.</translation> <translation id="417201473131094001">Nu se acceptă pe Chrome Canary</translation> <translation id="4214277427269650960">Conectează-te la acest site și la Chrome. Poți activa sincronizarea mai târziu.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> folosea Chrome și marcajele, parolele și alte setări ale sale au rămas pe acest dispozitiv.</translation> <translation id="424864128008805179">Te deconectezi de la Chrome?</translation> <translation id="4249068189593983585">Sfat pentru Chrome: pentru mai multe opțiuni de file, atinge lung butonul Afișează filele din bara de instrumente, care se află în partea de sus sau de jos a ecranului.</translation> <translation id="4523886039239821078">Unele suplimente determină blocarea browserului Chrome. Dezinstalează:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_sk.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_sk.xtb index 7146b62..fef392c 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_sk.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_sk.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">Odosielať štatistiky používania a prehľady chýb Googlu a pomáhať tak zlepšovať Chrome</translation> <translation id="417201473131094001">Nepodporované vo verzii Chrome Canary</translation> <translation id="4214277427269650960">Prihláste sa na tomto webe a v Chrome. Neskôr môžete zapnúť synchronizáciu.</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> používal(a) Chrome a zanechal(a) záložky, heslá a ďalšie nastavenia v tomto zariadení.</translation> <translation id="424864128008805179">Odhlásiť sa z Chromu?</translation> <translation id="4249068189593983585">Tip pre Chrome: ďalšie možnosti karty získate pridržaním tlačidla „Zobraziť karty“ na paneli s nástrojmi, ktorý sa nachádza v dolnej alebo hornej časti obrazovky.</translation> <translation id="4523886039239821078">Niektoré doplnky spôsobujú zlyhanie prehliadača Chrome. Odinštalujte ich.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_zh-HK.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_zh-HK.xtb index 14de8f9..add4de5 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_zh-HK.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_zh-HK.xtb
@@ -50,6 +50,7 @@ <translation id="4099578267706723511">將使用統計資料及當機報告傳送給 Google,助我們一臂之力,讓 Chrome 更臻完美。</translation> <translation id="417201473131094001">Chrome Canary 上不支援此功能</translation> <translation id="4214277427269650960">登入此網站和 Chrome。您可稍後再開啟同步功能。</translation> +<translation id="4233521129555661685"><ph name="USER_EMAIL1" /> 之前曾在此裝置上使用 Chrome,並儲存書籤、密碼和其他設定。</translation> <translation id="424864128008805179">要登出 Chrome 嗎?</translation> <translation id="4249068189593983585">Chrome 提示。如果要多啲標籤選項,請㩒住螢幕底部或者頂部工具列入面中嘅 [顯示分頁] 掣。</translation> <translation id="4523886039239821078">部分外掛程式造成 Chrome 當機,請解除安裝這些外掛程式:</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ar.xtb b/ios/chrome/app/strings/resources/ios_strings_ar.xtb index 111165e2..ef210b6 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ar.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ar.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">تعرَّف على الطريقة</translation> <translation id="1272079795634619415">إيقاف</translation> <translation id="1275718070701477396">محدد</translation> +<translation id="1281818060020671000">إدارة البيانات</translation> <translation id="1282311502488501110">عدم تسجيل الدخول</translation> <translation id="1283524564873030414">آخر 24 ساعة</translation> <translation id="1285320974508926690">عدم ترجمة هذا الموقع مطلقًا</translation> @@ -407,6 +408,7 @@ <translation id="4689564913179979534">جارٍ إدارة طُرق الدفع...</translation> <translation id="470966556546083668">عدم تفعيل المزامنة</translation> <translation id="4731472194328757163">الوصول إلى الكاميرا والميكروفون مسموح به.</translation> +<translation id="4737560986434232178">البحث في علامات التبويب الأخيرة</translation> <translation id="473775607612524610">تحديث</translation> <translation id="4747097190499141774">لا يتضمّن التشفير باستخدام عبارة المرور طرق الدفع والعناوين من Google Pay. ولن يتمكّن أي شخص من الاطّلاع على بياناتك المشفرة إلا من يعرف عبارة مرورك. لا تُرسَل عبارة المرور إلى شركة Google ولا تُخزّن لديها. في حال نسيان عبارة المرور أو الرغبة في تغيير هذا الإعداد، ستحتاج إلى إعادة ضبط المزامنة. <ph name="BEGIN_LINK" />مزيد من المعلومات<ph name="END_LINK" /></translation> <translation id="4751645464639803239">علامة تبويب جديدة في وضع التصفّح المتخفي</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_az.xtb b/ios/chrome/app/strings/resources/ios_strings_az.xtb index e2b368e3..654f98eb 100644 --- a/ios/chrome/app/strings/resources/ios_strings_az.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_az.xtb
@@ -489,6 +489,7 @@ <translation id="5490005495580364134">Bütün kukiləri bloklayın (Tövsiyə edilmir)</translation> <translation id="5513681519188741830"><ph name="TIME" /> s əvvəl</translation> <translation id="5525269841082836315">Parol söz yaradın</translation> +<translation id="5542540507657872337"><ph name="COUNT" /> tapıldı</translation> <translation id="5548760955356983418">Handoff bu cihazda asanlıqla veb sayt açıb Mac cihazınızda davam etməyə imkan verir. Cari açıq veb sayt Mac cihazınızda görünəcək. Handoff Ayarların Ümumi bölməsindən də aktiv edilə bilər və cihazlarınız eyni iCloud hesabı istifadə etməlidir.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_bg.xtb b/ios/chrome/app/strings/resources/ios_strings_bg.xtb index be91612e..c991607 100644 --- a/ios/chrome/app/strings/resources/ios_strings_bg.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_bg.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Научете как</translation> <translation id="1272079795634619415">Стоп</translation> <translation id="1275718070701477396">Избрано</translation> +<translation id="1281818060020671000">Управление на данните</translation> <translation id="1282311502488501110">Без влизане в профила</translation> <translation id="1283524564873030414">Последните 24 часа</translation> <translation id="1285320974508926690">Този сайт да не се превежда никога</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Управление на начините на плащане...</translation> <translation id="470966556546083668">Без включване на синхронизирането</translation> <translation id="4731472194328757163">Достъпът до камерата и микрофона е разрешен</translation> +<translation id="4737560986434232178">Търсене в скорошните раздели</translation> <translation id="473775607612524610">Актуализиране</translation> <translation id="4747097190499141774">Шифроването с пропуск не включва начините на плащане и адресите от Google Pay. Само някой с пропуска ви може да прочете шифрованите ви данни – той не се изпраща до Google, нито се съхранява от нас. Ако го забравите или искате да промените тази настройка, ще се наложи да нулирате синхронизирането. <ph name="BEGIN_LINK" />Научете повече<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Нов раздел в режим „инкогнито“</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_es.xtb b/ios/chrome/app/strings/resources/ios_strings_es.xtb index d0bb353e..4175813 100644 --- a/ios/chrome/app/strings/resources/ios_strings_es.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_es.xtb
@@ -821,7 +821,7 @@ <translation id="8319076807703933069">Nueva búsqueda</translation> <translation id="8323906514956095947">Mantén pulsado el botón para ver más opciones de pestañas</translation> <translation id="8328777765163860529">Cerrar todo</translation> -<translation id="8364085047956854021">Los permisos de "<ph name="SITE_NAME" />" se volverán a desactivar cuando salgas de este sitio.</translation> +<translation id="8364085047956854021">Se volverán a desactivar los permisos de "<ph name="SITE_NAME" />" cuando salgas de este sitio.</translation> <translation id="8378714024927312812">Gestionado por tu organización</translation> <translation id="8386068868580335421">Restablecer</translation> <translation id="8407669440184693619">No se han encontrado contraseñas para este sitio web</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_id.xtb b/ios/chrome/app/strings/resources/ios_strings_id.xtb index 46dafb69..5f263f1e 100644 --- a/ios/chrome/app/strings/resources/ios_strings_id.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_id.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Pelajari Caranya</translation> <translation id="1272079795634619415">Berhenti</translation> <translation id="1275718070701477396">Dipilih</translation> +<translation id="1281818060020671000">Kelola Data</translation> <translation id="1282311502488501110">Jangan Login</translation> <translation id="1283524564873030414">24 Jam Terakhir</translation> <translation id="1285320974508926690">Jangan pernah terjemahkan situs ini</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Kelola Metode Pembayaran...</translation> <translation id="470966556546083668">Jangan Aktifkan Sinkronisasi</translation> <translation id="4731472194328757163">Akses Kamera dan Mikrofon diizinkan</translation> +<translation id="4737560986434232178">Telusuri Tab Terbaru</translation> <translation id="473775607612524610">Perbarui</translation> <translation id="4747097190499141774">Enkripsi frasa sandi tidak mencakup alamat dan metode pembayaran dari Google Pay. Hanya pengguna yang memiliki frasa sandi Anda yang dapat membaca data yang telah Anda enkripsi. Frasa sandi tidak dikirim atau disimpan oleh Google. Jika lupa frasa sandi Anda atau ingin mengubah setelan ini, Anda harus menyetel ulang sinkronisasi. <ph name="BEGIN_LINK" />Pelajari lebih lanjut<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Tab Samaran Baru</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_strings_iw.xtb index 0512a71..748dff07 100644 --- a/ios/chrome/app/strings/resources/ios_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_iw.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">איך עושים זאת?</translation> <translation id="1272079795634619415">הפסקה</translation> <translation id="1275718070701477396">נבחר</translation> +<translation id="1281818060020671000">ניהול נתונים</translation> <translation id="1282311502488501110">אני לא רוצה להיכנס</translation> <translation id="1283524564873030414">מ-24 השעות האחרונות</translation> <translation id="1285320974508926690">איני רוצה לקבל תרגום של אתר זה</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">ניהול אמצעי תשלום...</translation> <translation id="470966556546083668">אין להפעיל את הסנכרון</translation> <translation id="4731472194328757163">יש הרשאות גישה למצלמה ולמיקרופון</translation> +<translation id="4737560986434232178">חיפוש בכרטיסיות האחרונות</translation> <translation id="473775607612524610">עדכון</translation> <translation id="4747097190499141774">הצפנה באמצעות ביטוי סיסמה לא כוללת אמצעי תשלום וכתובות מ-Google Pay. רק מי שיודע את ביטוי הסיסמה שלך יכול לקרוא את הנתונים המוצפנים. ביטוי הסיסמה לא נשלח אל Google והיא אינה מאחסנת אותו. אם שוכחים את ביטוי הסיסמה או רוצים לשנות את ההגדרה הזו, צריך לאפס את הסנכרון. <ph name="BEGIN_LINK" />מידע נוסף<ph name="END_LINK" /></translation> <translation id="4751645464639803239">כרטיסיית מצב אנונימי חדשה</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ka.xtb b/ios/chrome/app/strings/resources/ios_strings_ka.xtb index 815d5fe..4c08188 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ka.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ka.xtb
@@ -487,6 +487,7 @@ <translation id="5490005495580364134">ყველა ქუქი-ჩანაწერის დაბლოკვა (არარეკომენდებული)</translation> <translation id="5513681519188741830"><ph name="TIME" /> საათის წინ</translation> <translation id="5525269841082836315">საიდუმლო ფრაზის შექმნა</translation> +<translation id="5542540507657872337">მოიძებნა <ph name="COUNT" /></translation> <translation id="5548760955356983418">Handoff საშუალებით შეგიძლიათ დაიწყოთ ვებსაიტის დათვალიერება ამ მოწყობილობაში და ადვილად გააგრძელოთ Mac მოწყობილობაში. მიმდინარე გახსნილი ვებსაიტი გამოჩნდება Mac მოწყობილობის Dock-ში. Handoff ასევე უნდა იყოს ჩართული პარამეტრების სექციაში „ძირითადი“ და მოწყობილობებში უნდა გამოიყენებოდეს ერთი და იგივე iCloud ანგარიში.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_km.xtb b/ios/chrome/app/strings/resources/ios_strings_km.xtb index c3f429f..1b266dca 100644 --- a/ios/chrome/app/strings/resources/ios_strings_km.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_km.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">ស្វែងយល់អំពីរបៀប</translation> <translation id="1272079795634619415">ឈប់</translation> <translation id="1275718070701477396">បានជ្រើសរើស</translation> +<translation id="1281818060020671000">គ្រប់គ្រងទិន្នន័យ</translation> <translation id="1282311502488501110">កុំចូលគណនី</translation> <translation id="1283524564873030414">24 ម៉ោងមុន</translation> <translation id="1285320974508926690">មិនបកប្រែគេហទំព័រនេះទៀតឡើយ</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">គ្រប់គ្រងវិធីបង់ប្រាក់...</translation> <translation id="470966556546083668">កុំបើកសមកាលកម្ម</translation> <translation id="4731472194328757163">បានអនុញ្ញាតសិទ្ធិចូលប្រើកាមេរ៉ា និងមីក្រូហ្វូន</translation> +<translation id="4737560986434232178">ស្វែងរកផ្ទាំងថ្មីៗ</translation> <translation id="473775607612524610">ធ្វើបច្ចុប្បន្នភាព</translation> <translation id="4747097190499141774">ការអ៊ីនគ្រីបឃ្លាសម្ងាត់មិនរួមបញ្ចូលអាសយដ្ឋាន និងវិធីបង់ប្រាក់ពី Google Pay ទេ។ មានតែអ្នកដែលមានឃ្លាសម្ងាត់របស់អ្នកប៉ុណ្ណោះ ទើបអាចអានទិន្នន័យដែលបានអ៊ីនគ្រីបរបស់អ្នក។ ឃ្លាសម្ងាត់នេះមិនត្រូវបានផ្ញើ ឬផ្ទុកដោយ Google ទេ។ ប្រសិនបើអ្នកភ្លេចឃ្លាសម្ងាត់របស់អ្នក ឬចង់ផ្លាស់ប្ដូរការកំណត់នេះ អ្នកនឹងត្រូវកំណត់សមកាលកម្មឡើងវិញ។ <ph name="BEGIN_LINK" />ស្វែងយល់បន្ថែម<ph name="END_LINK" /></translation> <translation id="4751645464639803239">ផ្ទាំងឯកជនថ្មី</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ko.xtb b/ios/chrome/app/strings/resources/ios_strings_ko.xtb index eb27fd6b..3a500da 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ko.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ko.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">자세히 알아보기</translation> <translation id="1272079795634619415">중지</translation> <translation id="1275718070701477396">선택됨</translation> +<translation id="1281818060020671000">데이터 관리</translation> <translation id="1282311502488501110">로그인 안함</translation> <translation id="1283524564873030414">지난 24시간</translation> <translation id="1285320974508926690">이 사이트 번역 안함</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">결제 수단 관리...</translation> <translation id="470966556546083668">동기화를 켜지 않음</translation> <translation id="4731472194328757163">카메라 및 마이크 액세스가 허용됨</translation> +<translation id="4737560986434232178">최근 탭 검색</translation> <translation id="473775607612524610">업데이트</translation> <translation id="4747097190499141774">Google Pay 결제 수단 및 주소는 암호로 암호화되지 않습니다. 암호를 아는 사람만 암호화된 데이터를 읽을 수 있습니다. 암호는 Google로 전송되거나 Google에 저장되지 않습니다. 암호가 기억나지 않거나 이 설정을 변경하려면 동기화를 재설정해야 합니다. <ph name="BEGIN_LINK" />자세히 알아보기<ph name="END_LINK" /></translation> <translation id="4751645464639803239">새 시크릿 탭</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_lt.xtb b/ios/chrome/app/strings/resources/ios_strings_lt.xtb index ddb6543..5ecb2ab 100644 --- a/ios/chrome/app/strings/resources/ios_strings_lt.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_lt.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Sužinoti, kaip tai padaryti</translation> <translation id="1272079795634619415">Sustabdyti</translation> <translation id="1275718070701477396">Pasirinkta</translation> +<translation id="1281818060020671000">Duomenų tvarkymas</translation> <translation id="1282311502488501110">Neprisijungti</translation> <translation id="1283524564873030414">Pastarosios 24 valandos</translation> <translation id="1285320974508926690">Niekada neversti šios svetainės</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Tvarkyti mokėjimo metodus...</translation> <translation id="470966556546083668">Neįjungti sinchronizavimo</translation> <translation id="4731472194328757163">Leidžiama pasiekti kamerą ir mikrofoną</translation> +<translation id="4737560986434232178">Ieškoti naujausiuose skirtukuose</translation> <translation id="473775607612524610">Atnaujinti</translation> <translation id="4747097190499141774">Slaptafrazės šifruotė neapima mokėjimo metodų ir adresų iš „Google Pay“. Tik jūsų slaptafrazę žinantis asmuo gali skaityti šifruotus duomenis. Slaptafrazė nesiunčiama į sistemą „Google“ ir joje nesaugoma. Pamiršę slaptafrazę arba norėdami pakeisti šį nustatymą turėsite iš naujo nustatyti sinchronizavimą. <ph name="BEGIN_LINK" />Sužinokite daugiau<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Naujas inkognito skirtukas</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_mk.xtb b/ios/chrome/app/strings/resources/ios_strings_mk.xtb index 85a5e429..0a89305 100644 --- a/ios/chrome/app/strings/resources/ios_strings_mk.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_mk.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Дознајте како</translation> <translation id="1272079795634619415">Запри</translation> <translation id="1275718070701477396">Избран</translation> +<translation id="1281818060020671000">Управувајте со податоците</translation> <translation id="1282311502488501110">Не се најавувај</translation> <translation id="1283524564873030414">Изминатите 24 часа</translation> <translation id="1285320974508926690">Никогаш не преведувај ја оваа локација</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Управувајте со начините на плаќање…</translation> <translation id="470966556546083668">Не вклучувај синхронизација</translation> <translation id="4731472194328757163">Дозволен е пристап до „Камерата“ и „Микрофонот“</translation> +<translation id="4737560986434232178">Пребарајте ги „Неодамнешните картички“</translation> <translation id="473775607612524610">Ажурирај</translation> <translation id="4747097190499141774">Шифрирањето на лозинката не ги вклучува начините на плаќање и адресите од Google Pay. Само некој што ја има вашата лозинка може да ги чита вашите шифрирани податоци. Лозинката не се испраќа, ниту зачувува во Google. Доколку ја заборавите лозинката или сакате да ја промените поставкава, ќе треба да ја ресетирате синхронизацијата. <ph name="BEGIN_LINK" />Дознајте повеќе<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Нова инкогнито картичка</translation> @@ -487,6 +489,7 @@ <translation id="5490005495580364134">Блокирај ги сите колачиња (не се препорачува)</translation> <translation id="5513681519188741830">пред <ph name="TIME" /> ч.</translation> <translation id="5525269841082836315">Создај пристапна фраза</translation> +<translation id="5542540507657872337">Најдено: <ph name="COUNT" /></translation> <translation id="5548760955356983418">Handoff ви овозможува да започнете со прелистување на веб-локација на уредот и потоа лесно да продолжите на Mac. Моментално отворената веб-локација ќе се појави во Dock на Mac. Handoff мора да биде овозможен и во Општиот дел на Поставки, а на уредите мора да ја користите истата сметка на iCloud.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_mn.xtb b/ios/chrome/app/strings/resources/ios_strings_mn.xtb index 3dadf59..f83e2e4b 100644 --- a/ios/chrome/app/strings/resources/ios_strings_mn.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_mn.xtb
@@ -488,6 +488,7 @@ <translation id="5490005495580364134">Бүх күүкиг блоклох (Зөвлөдөггүй)</translation> <translation id="5513681519188741830"><ph name="TIME" /> цагийн өмнө</translation> <translation id="5525269841082836315">Нэвтрэх үгийг үүсгэх</translation> +<translation id="5542540507657872337"><ph name="COUNT" /> олдсон</translation> <translation id="5548760955356983418">Handoff нь танд энэ төхөөрөмж дээр веб хуудсыг ачаалж, дараа нь Mac дээр хялбархан үргэжлүүлэн ажиллах боломжийг олгодог. Одоо нээлттэй байгаа вебсайт таны Mac-ийн Dock дотор гарч ирнэ. Handoff-ыг Тохиргооны ерөнхий хэсэгт идэвхижүүлсэн байх ёстой бөгөөд таны төхөөрөмжүүд ижилхэн iCloud акаунт ашиглах ёстой.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ms.xtb b/ios/chrome/app/strings/resources/ios_strings_ms.xtb index 2373a6ce..dc4d12dc 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ms.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ms.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Ketahui Caranya</translation> <translation id="1272079795634619415">Berhenti</translation> <translation id="1275718070701477396">Dipilih</translation> +<translation id="1281818060020671000">Urus Data</translation> <translation id="1282311502488501110">Jangan Log Masuk</translation> <translation id="1283524564873030414">24 Jam Yang Lalu</translation> <translation id="1285320974508926690">Jangan sekali-kali menterjemahkan tapak ini</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Urus Kaedah Pembayaran...</translation> <translation id="470966556546083668">Jangan Hidupkan Penyegerakan</translation> <translation id="4731472194328757163">Akses Kamera dan Mikrofon dibenarkan</translation> +<translation id="4737560986434232178">Cari Tab Terkini</translation> <translation id="473775607612524610">Kemas kini</translation> <translation id="4747097190499141774">Penyulitan ungkapan laluan tidak termasuk kaedah pembayaran dan alamat daripada Google Pay. Hanya orang yang mempunyai ungkapan laluan anda boleh membaca data anda yang disulitkan. Ungkapan laluan tidak dihantar atau disimpan oleh Google. Jika anda terlupa ungkapan laluan atau ingin menukar tetapan ini, anda perlu menetapkan semula penyegerakan. <ph name="BEGIN_LINK" />Ketahui lebih lanjut<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Tab Inkognito Baharu</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_my.xtb b/ios/chrome/app/strings/resources/ios_strings_my.xtb index 651755c..632d013 100644 --- a/ios/chrome/app/strings/resources/ios_strings_my.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_my.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">လုပ်ပုံကို လေ့လာပါ</translation> <translation id="1272079795634619415">ရပ်ရန်</translation> <translation id="1275718070701477396">ရွေးထား</translation> +<translation id="1281818060020671000">ဒေတာ စီမံခြင်း</translation> <translation id="1282311502488501110">လက်မှတ်ထိုး မဝင်ပါနှင့်</translation> <translation id="1283524564873030414">ပြီးခဲ့သည့် ၂၄ နာရီ</translation> <translation id="1285320974508926690">ဒီဆိုက်ကို ဘယ်တော့မှ ဘာသာမပြန်ပါနှင့်</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">ငွေပေးချေနည်းလမ်းများ စီမံရန်...</translation> <translation id="470966556546083668">စင့်ခ်လုပ်ခြင်း မဖွင့်ပါနှင့်</translation> <translation id="4731472194328757163">ကင်မရာနှင့် မိုက်ခရိုဖုန်း သုံးခွင့်ပြုထားသည်</translation> +<translation id="4737560986434232178">မကြာသေးမီက တဘ်များတွင် ရှာဖွေခြင်း</translation> <translation id="473775607612524610">အပ်ဒိတ်လုပ်ရန်</translation> <translation id="4747097190499141774">စကားဝှက်စာ အသွင်ဝှက်ခြင်းတွင် ငွေပေးချေနည်းလမ်းများနှင့် Google Pay မှ လိပ်စာများ မပါဝင်ပါ။ သင့်စကားဝှက်ရှိသူသာ သင်အသွင်ဝှက်ထားသည့် ဒေတာများကို ဖတ်နိုင်မည် ဖြစ်သည်။ စကားဝှက်ကို Google သို့ပို့ခြင်း သို့မဟုတ် သိမ်းဆည်းထားခြင်း မရှိပါ။ သင့်စကားဝှက်ကို မေ့သွားလျှင် သို့မဟုတ် ဤဆက်တင်ကို ပြောင်းလဲလိုလျှင် စင့်ခ်လုပ်ခြင်းကို ပြင်ဆင်သတ်မှတ်ရန် လိုအပ်ပါသည်။ <ph name="BEGIN_LINK" />ပိုမို လေ့လာရန်<ph name="END_LINK" /></translation> <translation id="4751645464639803239">ရုပ်ဖျက်တဘ်အသစ်</translation> @@ -487,6 +489,7 @@ <translation id="5490005495580364134">ကွတ်ကီးအားလုံး ပိတ်ရန် (အကြံမပြုပါ)</translation> <translation id="5513681519188741830">ပြီးခဲ့သော <ph name="TIME" /> h</translation> <translation id="5525269841082836315">စကားစုဝှက် ဖန်တီးမည်</translation> +<translation id="5542540507657872337"><ph name="COUNT" /> ခု တွေ့သည်</translation> <translation id="5548760955356983418">Handoff သည် သင့်အားဤကိရိယာပေါ်တွင် ဝက်ဆိုက်ရွေးချယ်ခြင်းကို စတင်ခွင့်ပြုမည်ဖြစ်ပြီး သင့် Mac ပေါ်တွင်လွယ်ကူစွာ ဆက်လက်လုပ်ဆောင်နိုင်ပါသည်။ လက်ရှိဖွင့်ထားသော ဝက်ဆိုက်သည် သင့်Mac၏ အထိုင်ပေါ်တွင် ပေါ်လာပါလိမ့်မည်။ Handoff ကို ဆက်တင်များ၏ ယေဘူယျအပိုင်းတွင် ဖွင့်ထားရမည်ဖြစ်ပြီး၊ သင့်ကိရိယာများသည်လည်း တူညီသော iCloud အကောင့်ကို အသုံးပြုရမည်ဖြစ်သည်။</translation> <translation id="5551897871312988470">ဘာသာပြန်ရန် ကမ်းလှမ်းချက်</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ne.xtb b/ios/chrome/app/strings/resources/ios_strings_ne.xtb index ad7896f..83233da7 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ne.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ne.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">कसरी गर्ने भनी सिक्नुहोस्</translation> <translation id="1272079795634619415">रोक्नुहोस्</translation> <translation id="1275718070701477396">चयन गरिएको</translation> +<translation id="1281818060020671000">डेटा व्यवस्थापन गर्नुहोस्</translation> <translation id="1282311502488501110">साइन इन नगर्नुहोस्</translation> <translation id="1283524564873030414">पछिल्ला २४ घन्टा</translation> <translation id="1285320974508926690">यो साइट कहिले पनि अनुवाद नगर्नुहोस्</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">भुक्तानी विधिहरूको व्यवस्थापन गर्नुहोस्...</translation> <translation id="470966556546083668">सिंक गर्ने सुविधा अन नगरियोस्</translation> <translation id="4731472194328757163">क्यामेरा र माइक्रोफोन प्रयोग गर्ने अनुमति दिइएको छ</translation> +<translation id="4737560986434232178">हालसालै खोलिएका ट्याबहरू खोज्नुहोस्</translation> <translation id="473775607612524610">अपडेट गर्नुहोस्</translation> <translation id="4747097190499141774">पासफ्रेजमार्फत इन्क्रिप्सन गर्ने कार्यअन्तर्गत Google Pay का भुक्तानी विधि र ठेगानाहरू समावेश हुँदैनन्। तपाईंको पासफ्रेज थाहा हुने व्यक्तिले मात्र तपाईंको इन्क्रिप्ट गरिएको डेटा पढ्न सक्छ। उक्त पासफ्रेज Google मा पठाइँदैन वा त्यहाँ भण्डारण गरिँदैन। तपाईंले आफ्नो पासफ्रेज बिर्सनुभयो वा तपाईं यो सेटिङ परिवर्तन गर्न चाहनुहुन्छ भने तपाईंले सिंक रिसेट गर्नु पर्ने हुन्छ। <ph name="BEGIN_LINK" />थप जान्नुहोस्<ph name="END_LINK" /></translation> <translation id="4751645464639803239">नयाँ इन्कोग्निटो ट्याब</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ro.xtb b/ios/chrome/app/strings/resources/ios_strings_ro.xtb index 53c77af..700d50fd 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ro.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ro.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Află cum</translation> <translation id="1272079795634619415">Oprește</translation> <translation id="1275718070701477396">Selectat</translation> +<translation id="1281818060020671000">Gestionează datele</translation> <translation id="1282311502488501110">Nu mă conectez</translation> <translation id="1283524564873030414">Ultimele 24 de ore</translation> <translation id="1285320974508926690">Nu traduce niciodată acest site</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Gestionează metodele de plată…</translation> <translation id="470966556546083668">Nu activa sincronizarea</translation> <translation id="4731472194328757163">Se oferă acces la Camera foto și Microfon</translation> +<translation id="4737560986434232178">Caută în filele recente</translation> <translation id="473775607612524610">Actualizează</translation> <translation id="4747097190499141774">Criptarea expresiei de acces nu include metodele de plată și adresele din Google Pay. Numai un utilizator care are expresia de acces poate citi datele tale criptate. Google nu primește și nu stochează expresia ta de acces. Dacă uiți expresia de acces sau vrei să modifici această setare, va trebui să resetezi sincronizarea. <ph name="BEGIN_LINK" />Află mai multe<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Filă incognito nouă</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_sk.xtb b/ios/chrome/app/strings/resources/ios_strings_sk.xtb index 5277394..3aa16a0 100644 --- a/ios/chrome/app/strings/resources/ios_strings_sk.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_sk.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">Ako na to</translation> <translation id="1272079795634619415">Zastaviť</translation> <translation id="1275718070701477396">Vybraté</translation> +<translation id="1281818060020671000">Správa údajov</translation> <translation id="1282311502488501110">Neprihlasovať sa</translation> <translation id="1283524564873030414">Posledných 24 hodín</translation> <translation id="1285320974508926690">Nikdy neprekladať tieto webové stránky</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">Spravovať spôsoby platby…</translation> <translation id="470966556546083668">Nezapínať synchronizáciu</translation> <translation id="4731472194328757163">Prístup ku kamere a mikrofónu je povolený</translation> +<translation id="4737560986434232178">Hľadať v nedávnych kartách</translation> <translation id="473775607612524610">Aktualizovať</translation> <translation id="4747097190499141774">Šifrovanie prístupovej frázy nezahŕňa spôsoby platby a adresy zo služby Google Pay. Šifrované údaje si môže prečítať iba používateľ s prístupovou frázou. Prístupová fráza sa neodosiela do Googlu ani sa v ňom neuchováva. Ak ju zabudnete, budete musieť resetovať synchronizáciu. <ph name="BEGIN_LINK" />Ďalšie informácie<ph name="END_LINK" /></translation> <translation id="4751645464639803239">Nová karta inkognito</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_th.xtb b/ios/chrome/app/strings/resources/ios_strings_th.xtb index 4ba7ebd..ebe6f06 100644 --- a/ios/chrome/app/strings/resources/ios_strings_th.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_th.xtb
@@ -487,6 +487,7 @@ <translation id="5490005495580364134">บล็อกคุกกี้ทั้งหมด (ไม่แนะนำ)</translation> <translation id="5513681519188741830"><ph name="TIME" /> ชม. ที่ผ่านมา</translation> <translation id="5525269841082836315">สร้างข้อความรหัสผ่าน</translation> +<translation id="5542540507657872337">พบ <ph name="COUNT" /> แท็บ</translation> <translation id="5548760955356983418">Handoff ช่วยให้คุณสามารถเริ่มการท่องเว็บไซต์บนอุปกรณ์นี้และใช้งานต่อบน Mac ได้อย่างง่ายดาย เว็บไซต์ที่เปิดอยู่ในปัจจุบันจะปรากฏในแท่นชาร์จของ Mac โดยต้องเปิดใช้ Handoff ในส่วน "ทั่วไป" ของการตั้งค่าและอุปกรณ์ของคุณต้องใช้บัญชี iCloud เดียวกัน</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ur.xtb b/ios/chrome/app/strings/resources/ios_strings_ur.xtb index c23fc828..cbfc5a0 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ur.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ur.xtb
@@ -489,6 +489,7 @@ <translation id="5490005495580364134">سبھی کوکیز مسدود کریں (تجویز نہیں کی جاتی)</translation> <translation id="5513681519188741830"><ph name="TIME" /> گھنٹہ پہلے</translation> <translation id="5525269841082836315">پاس فریز بنائیں</translation> +<translation id="5542540507657872337"><ph name="COUNT" /> ملے</translation> <translation id="5548760955356983418">Handoff آپ کو اس آلہ پر کسی ویب سائٹ کی براؤزنگ شروع کرنے اور پھر آسانی سےآپ کے Mac پر جاری رکھنے دیتا ہے۔ موجودہ کھلی ویب سائٹ آپ کے Mac کے ڈاک میں ظاہر ہوگی۔ Handoff ترتیبات کے عام سیکشن میں بھی فعال ہونی ضروری ہے اور آپ کے آلات کو وہی iCloud اکاؤنٹ استعمال کرنا چاہیے۔</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_zh-HK.xtb b/ios/chrome/app/strings/resources/ios_strings_zh-HK.xtb index 23d4c9ad..96bd9cd 100644 --- a/ios/chrome/app/strings/resources/ios_strings_zh-HK.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_zh-HK.xtb
@@ -42,6 +42,7 @@ <translation id="1265739287306757398">操作說明</translation> <translation id="1272079795634619415">停止</translation> <translation id="1275718070701477396">已選取</translation> +<translation id="1281818060020671000">管理資料</translation> <translation id="1282311502488501110">不登入</translation> <translation id="1283524564873030414">過去 24 小時</translation> <translation id="1285320974508926690">永不翻譯此網站</translation> @@ -406,6 +407,7 @@ <translation id="4689564913179979534">管理付款方法…</translation> <translation id="470966556546083668">不要開啟同步功能</translation> <translation id="4731472194328757163">已允許存取攝錄機和麥克風</translation> +<translation id="4737560986434232178">搜尋最近開啟的分頁</translation> <translation id="473775607612524610">更新</translation> <translation id="4747097190499141774">密碼短語加密的資料不包括 Google Pay 的付款方法和地址。只有知道您密碼短語的使用者,才能讀取已加密的資料。系統不會將密碼短語傳送給 Google,Google 也不會儲存您的密碼短語。如果您忘記自己的密碼短語,或希望變更這項設定,則必須重設同步功能。<ph name="BEGIN_LINK" />瞭解詳情<ph name="END_LINK" /></translation> <translation id="4751645464639803239">新無痕式分頁</translation>
diff --git a/ios/chrome/browser/autofill/autofill_java_script_feature_unittest.mm b/ios/chrome/browser/autofill/autofill_java_script_feature_unittest.mm index 023c65a..1de79f8 100644 --- a/ios/chrome/browser/autofill/autofill_java_script_feature_unittest.mm +++ b/ios/chrome/browser/autofill/autofill_java_script_feature_unittest.mm
@@ -12,13 +12,17 @@ #include "components/autofill/core/common/autofill_constants.h" #include "components/autofill/core/common/autofill_features.h" #import "components/autofill/ios/form_util/form_util_java_script_feature.h" +#include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" #import "ios/chrome/browser/web/chrome_web_client.h" -#import "ios/chrome/browser/web/chrome_web_test.h" #import "ios/web/public/js_messaging/web_frames_manager.h" #import "ios/web/public/test/fakes/fake_web_client.h" #import "ios/web/public/test/js_test_util.h" +#import "ios/web/public/test/scoped_testing_web_client.h" +#import "ios/web/public/test/web_state_test_util.h" +#import "ios/web/public/test/web_task_environment.h" #import "ios/web/public/web_state.h" #import "testing/gtest_mac.h" +#include "testing/platform_test.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -72,14 +76,23 @@ using base::test::ios::kWaitForJSCompletionTimeout; // Text fixture to test AutofillJavaScriptFeature. -class AutofillJavaScriptFeatureTest : public ChromeWebTest { +class AutofillJavaScriptFeatureTest : public PlatformTest { protected: AutofillJavaScriptFeatureTest() - : ChromeWebTest(std::make_unique<ChromeWebClient>()) {} + : web_client_(std::make_unique<ChromeWebClient>()) { + PlatformTest::SetUp(); + + browser_state_ = TestChromeBrowserState::Builder().Build(); + + web::WebState::CreateParams params(browser_state_.get()); + web_state_ = web::WebState::Create(params); + web_state_->GetView(); + web_state_->SetKeepRenderProcessAlive(true); + } // Loads the given HTML and initializes the Autofill JS scripts. void LoadHtml(NSString* html) { - ChromeWebTest::LoadHtml(html); + web::test::LoadHtml(html, web_state()); __block web::WebFrame* main_frame = nullptr; ASSERT_TRUE(WaitUntilConditionOrTimeout(kWaitForJSCompletionTimeout, ^bool { @@ -94,8 +107,9 @@ // Wait for |SetUpForUniqueIDsWithInitialState| to complete. ASSERT_TRUE(WaitUntilConditionOrTimeout(kWaitForJSCompletionTimeout, ^bool { - return [ExecuteJavaScript(@"document[__gCrWeb.fill.ID_SYMBOL]") - intValue] == static_cast<int>(next_available_id); + return [web::test::ExecuteJavaScript(@"document[__gCrWeb.fill.ID_SYMBOL]", + web_state()) intValue] == + static_cast<int>(next_available_id); })); } @@ -124,12 +138,20 @@ autofill::AutofillJavaScriptFeature* feature() { return autofill::AutofillJavaScriptFeature::GetInstance(); } + + web::WebState* web_state() { return web_state_.get(); } + + web::ScopedTestingWebClient web_client_; + web::WebTaskEnvironment task_environment_; + std::unique_ptr<TestChromeBrowserState> browser_state_; + std::unique_ptr<web::WebState> web_state_; }; // Tests that |hasBeenInjected| returns YES after |inject| call. TEST_F(AutofillJavaScriptFeatureTest, InitAndInject) { LoadHtml(@"<html></html>"); - EXPECT_NSEQ(@"object", ExecuteJavaScript(@"typeof __gCrWeb.autofill")); + EXPECT_NSEQ(@"object", web::test::ExecuteJavaScript( + @"typeof __gCrWeb.autofill", web_state())); } // Tests forms extraction method @@ -358,7 +380,7 @@ NSString* get_element_javascript = @"document.getElementsByName('email')[0]"; NSString* focus_element_javascript = [NSString stringWithFormat:@"%@.focus()", get_element_javascript]; - ExecuteJavaScript(focus_element_javascript); + web::test::ExecuteJavaScript(focus_element_javascript, web_state()); auto data = std::make_unique<base::DictionaryValue>(); data->SetString("name", "email"); data->SetString("identifier", "email"); @@ -375,7 +397,8 @@ })); NSString* element_value_javascript = [NSString stringWithFormat:@"%@.value", get_element_javascript]; - EXPECT_NSEQ(@"newemail@com", ExecuteJavaScript(element_value_javascript)); + EXPECT_NSEQ(@"newemail@com", web::test::ExecuteJavaScript( + element_value_javascript, web_state())); } // Tests the generation of the name of the fields. @@ -493,9 +516,11 @@ RunFormsSearch(); // Simulate interacting with the field that should be force filled. - ExecuteJavaScript(@"var field = document.getElementById('firstname');" - "field.focus();" - "field.value = 'to_be_erased';"); + web::test::ExecuteJavaScript( + @"var field = document.getElementById('firstname');" + "field.focus();" + "field.value = 'to_be_erased';", + web_state()); auto autofillData = std::make_unique<base::DictionaryValue>(); autofillData->SetKey("formName", base::Value("testform")); @@ -548,7 +573,7 @@ field_data.first]; NSString* focusScript = [NSString stringWithFormat:@"%@.focus()", getFieldScript]; - ExecuteJavaScript(focusScript); + web::test::ExecuteJavaScript(focusScript, web_state()); auto data = std::make_unique<base::DictionaryValue>(); data->SetInteger("unique_renderer_id", field_data.second); data->SetString("value", "testvalue");
diff --git a/ios/chrome/browser/download/browser_download_service_unittest.mm b/ios/chrome/browser/download/browser_download_service_unittest.mm index ee6c191..74e431f0 100644 --- a/ios/chrome/browser/download/browser_download_service_unittest.mm +++ b/ios/chrome/browser/download/browser_download_service_unittest.mm
@@ -35,14 +35,12 @@ template <class TabHelper> class StubTabHelper : public TabHelper { public: + // Overrides the method from web::WebStateUserData<TabHelper>. static void CreateForWebState(web::WebState* web_state) { web_state->SetUserData(TabHelper::UserDataKey(), base::WrapUnique(new StubTabHelper(web_state))); } - StubTabHelper(const StubTabHelper&) = delete; - StubTabHelper& operator=(const StubTabHelper&) = delete; - // Adds the given task to tasks() lists. void Download(std::unique_ptr<web::DownloadTask> task) override { tasks_.push_back(std::move(task)); @@ -52,38 +50,9 @@ using DownloadTasks = std::vector<std::unique_ptr<web::DownloadTask>>; const DownloadTasks& tasks() const { return tasks_; } - private: - StubTabHelper(web::WebState* web_state) - : TabHelper(web_state, /*delegate=*/nil) {} - - DownloadTasks tasks_; -}; - -// Substitutes ARQuickLookTabHelper for testing. -class TestARQuickLookTabHelper : public ARQuickLookTabHelper { - public: - static void CreateForWebState(web::WebState* web_state) { - web_state->SetUserData( - ARQuickLookTabHelper::UserDataKey(), - base::WrapUnique(new TestARQuickLookTabHelper(web_state))); - } - - TestARQuickLookTabHelper(const TestARQuickLookTabHelper&) = delete; - TestARQuickLookTabHelper& operator=(const TestARQuickLookTabHelper&) = delete; - - // Adds the given task to tasks() lists. - void Download(std::unique_ptr<web::DownloadTask> task) override { - tasks_.push_back(std::move(task)); - } - - // Tasks added via Download() call. - using DownloadTasks = std::vector<std::unique_ptr<web::DownloadTask>>; - const DownloadTasks& tasks() const { return tasks_; } + StubTabHelper(web::WebState* web_state) : TabHelper(web_state) {} private: - TestARQuickLookTabHelper(web::WebState* web_state) - : ARQuickLookTabHelper(web_state) {} - DownloadTasks tasks_; }; @@ -95,7 +64,7 @@ BrowserDownloadServiceTest() : browser_state_(TestChromeBrowserState::Builder().Build()) { StubTabHelper<PassKitTabHelper>::CreateForWebState(&web_state_); - TestARQuickLookTabHelper::CreateForWebState(&web_state_); + StubTabHelper<ARQuickLookTabHelper>::CreateForWebState(&web_state_); StubTabHelper<DownloadManagerTabHelper>::CreateForWebState(&web_state_); web_state_.SetBrowserState(browser_state_.get()); } @@ -109,8 +78,8 @@ PassKitTabHelper::FromWebState(&web_state_)); } - TestARQuickLookTabHelper* ar_quick_look_tab_helper() { - return static_cast<TestARQuickLookTabHelper*>( + StubTabHelper<ARQuickLookTabHelper>* ar_quick_look_tab_helper() { + return static_cast<StubTabHelper<ARQuickLookTabHelper>*>( ARQuickLookTabHelper::FromWebState(&web_state_)); }
diff --git a/ios/chrome/browser/download/download_manager_tab_helper.h b/ios/chrome/browser/download/download_manager_tab_helper.h index 901a0ab..b234639 100644 --- a/ios/chrome/browser/download/download_manager_tab_helper.h +++ b/ios/chrome/browser/download/download_manager_tab_helper.h
@@ -30,11 +30,6 @@ ~DownloadManagerTabHelper() override; - // Creates TabHelper. |delegate| is not retained by TabHelper. |web_state| - // must not be null. - static void CreateForWebState(web::WebState* web_state, - id<DownloadManagerTabHelperDelegate> delegate); - // Asynchronously downloads a file using the given |task|. virtual void Download(std::unique_ptr<web::DownloadTask> task); @@ -42,10 +37,12 @@ // cancelled. bool has_download_task() const { return task_.get(); } + // Set the delegate. The tab helper will no-op if the delegate is nil. + void SetDelegate(id<DownloadManagerTabHelperDelegate> delegate); + protected: // Allow subclassing from DownloadManagerTabHelper for testing purposes. - DownloadManagerTabHelper(web::WebState* web_state, - id<DownloadManagerTabHelperDelegate> delegate); + DownloadManagerTabHelper(web::WebState* web_state); private: friend class web::WebStateUserData<DownloadManagerTabHelper>;
diff --git a/ios/chrome/browser/download/download_manager_tab_helper.mm b/ios/chrome/browser/download/download_manager_tab_helper.mm index 880f5c28..35b249fc 100644 --- a/ios/chrome/browser/download/download_manager_tab_helper.mm +++ b/ios/chrome/browser/download/download_manager_tab_helper.mm
@@ -14,39 +14,34 @@ #error "This file requires ARC support." #endif -DownloadManagerTabHelper::DownloadManagerTabHelper( - web::WebState* web_state, - id<DownloadManagerTabHelperDelegate> delegate) - : web_state_(web_state), delegate_(delegate) { +DownloadManagerTabHelper::DownloadManagerTabHelper(web::WebState* web_state) + : web_state_(web_state) { DCHECK(web_state_); web_state_->AddObserver(this); } DownloadManagerTabHelper::~DownloadManagerTabHelper() { - DCHECK(!task_); -} + if (web_state_) { + web_state_->RemoveObserver(this); + web_state_ = nullptr; + } -void DownloadManagerTabHelper::CreateForWebState( - web::WebState* web_state, - id<DownloadManagerTabHelperDelegate> delegate) { - DCHECK(web_state); - if (!FromWebState(web_state)) { - web_state->SetUserData( - UserDataKey(), - base::WrapUnique(new DownloadManagerTabHelper(web_state, delegate))); + if (task_) { + task_->RemoveObserver(this); + task_ = nullptr; } } void DownloadManagerTabHelper::Download( std::unique_ptr<web::DownloadTask> task) { - __block std::unique_ptr<web::DownloadTask> block_task = std::move(task); // If downloads are persistent, they cannot be lost once completed. if (!task_ || task_->GetState() == web::DownloadTask::State::kComplete) { // The task is the first download for this web state. - DidCreateDownload(std::move(block_task)); + DidCreateDownload(std::move(task)); return; } + __block std::unique_ptr<web::DownloadTask> block_task = std::move(task); [delegate_ downloadManagerTabHelper:this decidePolicyForDownload:block_task.get() completionHandler:^(NewDownloadPolicy policy) { @@ -56,6 +51,11 @@ }]; } +void DownloadManagerTabHelper::SetDelegate( + id<DownloadManagerTabHelperDelegate> delegate) { + delegate_ = delegate; +} + void DownloadManagerTabHelper::WasShown(web::WebState* web_state) { if (task_) { [delegate_ downloadManagerTabHelper:this didShowDownload:task_.get()]; @@ -69,7 +69,9 @@ } void DownloadManagerTabHelper::WebStateDestroyed(web::WebState* web_state) { - web_state->RemoveObserver(this); + DCHECK_EQ(web_state_, web_state); + web_state_->RemoveObserver(this); + web_state_ = nullptr; if (task_) { task_->RemoveObserver(this); task_ = nullptr; @@ -98,6 +100,7 @@ std::unique_ptr<web::DownloadTask> task) { if (task_) { task_->RemoveObserver(this); + task_ = nullptr; } task_ = std::move(task); task_->AddObserver(this);
diff --git a/ios/chrome/browser/download/download_manager_tab_helper_unittest.mm b/ios/chrome/browser/download/download_manager_tab_helper_unittest.mm index 12c7ff4e..f3cbdac8 100644 --- a/ios/chrome/browser/download/download_manager_tab_helper_unittest.mm +++ b/ios/chrome/browser/download/download_manager_tab_helper_unittest.mm
@@ -28,7 +28,9 @@ DownloadManagerTabHelperTest() : web_state_(std::make_unique<web::FakeWebState>()), delegate_([[FakeDownloadManagerTabHelperDelegate alloc] init]) { - DownloadManagerTabHelper::CreateForWebState(web_state_.get(), delegate_); + DownloadManagerTabHelper::CreateForWebState(web_state_.get()); + DownloadManagerTabHelper::FromWebState(web_state_.get()) + ->SetDelegate(delegate_); } DownloadManagerTabHelper* tab_helper() {
diff --git a/ios/chrome/browser/download/pass_kit_tab_helper.h b/ios/chrome/browser/download/pass_kit_tab_helper.h index 5279460..cd6deb8 100644 --- a/ios/chrome/browser/download/pass_kit_tab_helper.h +++ b/ios/chrome/browser/download/pass_kit_tab_helper.h
@@ -48,19 +48,16 @@ ~PassKitTabHelper() override; - // Creates TabHelper. |delegate| is not retained by TabHelper. |web_state| - // must not be null. - static void CreateForWebState(web::WebState* web_state, - id<PassKitTabHelperDelegate> delegate); - // Asynchronously downloads pkpass file using the given |task|. Asks delegate // to present "Add pkpass" dialog when the download is complete. virtual void Download(std::unique_ptr<web::DownloadTask> task); + // Set the delegate. The tab helper will no-op if used when delegate is nil. + void SetDelegate(id<PassKitTabHelperDelegate> delegate); + protected: // Allow subclassing from PassKitTabHelper for testing purposes. - PassKitTabHelper(web::WebState* web_state, - id<PassKitTabHelperDelegate> delegate); + PassKitTabHelper(web::WebState* web_state); private: friend class web::WebStateUserData<PassKitTabHelper>;
diff --git a/ios/chrome/browser/download/pass_kit_tab_helper.mm b/ios/chrome/browser/download/pass_kit_tab_helper.mm index 555bd79..848f251e 100644 --- a/ios/chrome/browser/download/pass_kit_tab_helper.mm +++ b/ios/chrome/browser/download/pass_kit_tab_helper.mm
@@ -40,9 +40,8 @@ } // namespace -PassKitTabHelper::PassKitTabHelper(web::WebState* web_state, - id<PassKitTabHelperDelegate> delegate) - : web_state_(web_state), delegate_(delegate) { +PassKitTabHelper::PassKitTabHelper(web::WebState* web_state) + : web_state_(web_state) { DCHECK(web_state_); } @@ -52,16 +51,6 @@ } } -void PassKitTabHelper::CreateForWebState( - web::WebState* web_state, - id<PassKitTabHelperDelegate> delegate) { - DCHECK(web_state); - if (!FromWebState(web_state)) { - web_state->SetUserData(UserDataKey(), base::WrapUnique(new PassKitTabHelper( - web_state, delegate))); - } -} - void PassKitTabHelper::Download(std::unique_ptr<web::DownloadTask> task) { DCHECK_EQ(task->GetMimeType(), kPkPassMimeType); web::DownloadTask* task_ptr = task.get(); @@ -72,6 +61,10 @@ task_ptr->Start(base::FilePath(), web::DownloadTask::Destination::kToMemory); } +void PassKitTabHelper::SetDelegate(id<PassKitTabHelperDelegate> delegate) { + delegate_ = delegate; +} + void PassKitTabHelper::OnDownloadUpdated(web::DownloadTask* updated_task) { auto it = tasks_.find(updated_task); DCHECK(it != tasks_.end());
diff --git a/ios/chrome/browser/download/pass_kit_tab_helper_unittest.mm b/ios/chrome/browser/download/pass_kit_tab_helper_unittest.mm index 9ccebd2a..b703e47e 100644 --- a/ios/chrome/browser/download/pass_kit_tab_helper_unittest.mm +++ b/ios/chrome/browser/download/pass_kit_tab_helper_unittest.mm
@@ -38,7 +38,8 @@ PassKitTabHelperTest() : delegate_([[FakePassKitTabHelperDelegate alloc] initWithWebState:&web_state_]) { - PassKitTabHelper::CreateForWebState(&web_state_, delegate_); + PassKitTabHelper::CreateForWebState(&web_state_); + PassKitTabHelper::FromWebState(&web_state_)->SetDelegate(delegate_); } PassKitTabHelper* tab_helper() {
diff --git a/ios/chrome/browser/search_engines/search_engine_tab_helper_unittest.mm b/ios/chrome/browser/search_engines/search_engine_tab_helper_unittest.mm index 13a492b3..f7848ac 100644 --- a/ios/chrome/browser/search_engines/search_engine_tab_helper_unittest.mm +++ b/ios/chrome/browser/search_engines/search_engine_tab_helper_unittest.mm
@@ -15,12 +15,16 @@ #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" #include "ios/chrome/browser/favicon/favicon_service_factory.h" #include "ios/chrome/browser/search_engines/template_url_service_factory.h" -#include "ios/chrome/browser/web/chrome_web_test.h" +#include "ios/chrome/browser/web/chrome_web_client.h" +#import "ios/web/public/test/scoped_testing_web_client.h" +#import "ios/web/public/test/web_state_test_util.h" +#import "ios/web/public/test/web_task_environment.h" #import "ios/web/public/test/web_view_interaction_test_util.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/http_request.h" #include "net/test/embedded_test_server/http_response.h" #include "testing/gtest/include/gtest/gtest.h" +#include "testing/platform_test.h" #if !defined(__has_feature) || !__has_feature(objc_arc) #error "This file requires ARC support." @@ -47,7 +51,7 @@ } // Test fixture for SearchEngineTabHelper class. -class SearchEngineTabHelperTest : public ChromeWebTest { +class SearchEngineTabHelperTest : public PlatformTest { public: SearchEngineTabHelperTest(const SearchEngineTabHelperTest&) = delete; SearchEngineTabHelperTest& operator=(const SearchEngineTabHelperTest&) = @@ -55,21 +59,40 @@ protected: SearchEngineTabHelperTest() - : ChromeWebTest(web::WebTaskEnvironment::Options::IO_MAINLOOP) {} + : web_client_(std::make_unique<ChromeWebClient>()), + task_environment_(web::WebTaskEnvironment::Options::IO_MAINLOOP) {} void SetUp() override { - ChromeWebTest::SetUp(); + PlatformTest::SetUp(); + + TestChromeBrowserState::Builder builder; + builder.AddTestingFactory( + ios::TemplateURLServiceFactory::GetInstance(), + base::BindRepeating( + [](web::BrowserState*) -> std::unique_ptr<KeyedService> { + auto model = std::make_unique<TemplateURLService>( + /*initializers=*/nullptr, /*count=*/0); + + return model; + })); + + browser_state_ = builder.Build(); + web::WebState::CreateParams params(browser_state_.get()); + web_state_ = web::WebState::Create(params); + web_state_->GetView(); + web_state_->SetKeepRenderProcessAlive(true); + favicon::WebFaviconDriver::CreateForWebState( web_state(), ios::FaviconServiceFactory::GetForBrowserState( - GetBrowserState(), ServiceAccessType::IMPLICIT_ACCESS)); + browser_state_.get(), ServiceAccessType::IMPLICIT_ACCESS)); SearchEngineTabHelper::CreateForWebState(web_state()); server_.ServeFilesFromSourceDirectory("."); ASSERT_TRUE(server_.Start()); template_url_service()->Load(); } - TestChromeBrowserState::TestingFactories GetTestingFactories() override { + TestChromeBrowserState::TestingFactories GetTestingFactories() { return {{ios::TemplateURLServiceFactory::GetInstance(), base::BindRepeating(&CreateTestingTemplateURLService)}}; } @@ -77,10 +100,17 @@ // Returns the testing TemplateURLService. TemplateURLService* template_url_service() { ChromeBrowserState* browser_state = - ChromeBrowserState::FromBrowserState(GetBrowserState()); + ChromeBrowserState::FromBrowserState(browser_state_.get()); return ios::TemplateURLServiceFactory::GetForBrowserState(browser_state); } + web::WebState* web_state() { return web_state_.get(); } + + web::ScopedTestingWebClient web_client_; + web::WebTaskEnvironment task_environment_; + std::unique_ptr<TestChromeBrowserState> browser_state_; + std::unique_ptr<web::WebState> web_state_; + net::EmbeddedTestServer server_; }; @@ -95,7 +125,7 @@ template_url_service()->GetTemplateURLs(); // Load an empty page, and send a message of openSearchUrl from Js. - LoadHtml(@"<html></html>", page_url); + web::test::LoadHtml(@"<html></html>", page_url, web_state()); SearchEngineTabHelper::FromWebState(web_state()) ->AddTemplateURLByOSDD(page_url, osdd_url); @@ -144,7 +174,7 @@ template_url_service()->GetTemplateURLs(); // Load an empty page, and send a message of openSearchUrl from Js. - LoadHtml(html, page_url); + web::test::LoadHtml(html, page_url, web_state()); SearchEngineTabHelper::FromWebState(web_state()) ->SetSearchableUrl(searchable_url); SubmitWebViewFormWithId(web_state(), "f"); @@ -189,7 +219,7 @@ SearchEngineTabHelperTest::SetUp(); ChromeBrowserState* incognito_browser_state = - GetBrowserState()->GetOffTheRecordChromeBrowserState(); + browser_state_->GetOffTheRecordChromeBrowserState(); // TemplateURLServiceFactory redirects to the original profile, so it // doesn't really matter which browser state is used in tests to interact @@ -208,7 +238,7 @@ favicon::WebFaviconDriver::CreateForWebState( incognito_web_state(), ios::FaviconServiceFactory::GetForBrowserState( - GetBrowserState(), ServiceAccessType::IMPLICIT_ACCESS)); + browser_state_.get(), ServiceAccessType::IMPLICIT_ACCESS)); SearchEngineTabHelper::CreateForWebState(incognito_web_state()); } @@ -231,7 +261,7 @@ template_url_service()->GetTemplateURLs(); // Load an empty page, and send a message of openSearchUrl from Js. - LoadHtmlInWebState(@"<html></html>", page_url, incognito_web_state()); + web::test::LoadHtml(@"<html></html>", page_url, incognito_web_state()); SearchEngineTabHelper::FromWebState(incognito_web_state()) ->AddTemplateURLByOSDD(page_url, osdd_url); @@ -263,7 +293,7 @@ template_url_service()->GetTemplateURLs(); // Load an empty page, and send a message of openSearchUrl from Js. - LoadHtmlInWebState(html, page_url, incognito_web_state()); + web::test::LoadHtml(html, page_url, incognito_web_state()); SearchEngineTabHelper::FromWebState(incognito_web_state()) ->SetSearchableUrl(searchable_url); SubmitWebViewFormWithId(incognito_web_state(), "f");
diff --git a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge_unittests.mm b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge_unittests.mm index 0260fe1..c515a7f2 100644 --- a/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge_unittests.mm +++ b/ios/chrome/browser/signin/gaia_auth_fetcher_ios_ns_url_session_bridge_unittests.mm
@@ -14,9 +14,10 @@ #import "base/test/ios/wait_util.h" #include "ios/chrome/browser/browser_state/test_chrome_browser_state.h" #include "ios/chrome/browser/signin/gaia_auth_fetcher_ios_bridge.h" -#import "ios/chrome/browser/web/chrome_web_test.h" #include "ios/net/cookies/system_cookie_util.h" #include "ios/web/common/features.h" +#import "ios/web/public/test/scoped_testing_web_client.h" +#import "ios/web/public/test/web_state_test_util.h" #include "ios/web/public/test/web_task_environment.h" #include "net/base/mac/url_conversions.h" #include "net/base/net_errors.h" @@ -123,9 +124,8 @@ } // namespace -class GaiaAuthFetcherIOSNSURLSessionBridgeTest : public ChromeWebTest { +class GaiaAuthFetcherIOSNSURLSessionBridgeTest : public PlatformTest { protected: - // ChromeWebTest. void SetUp() override; void TearDown() override; @@ -159,6 +159,11 @@ friend TestGaiaAuthFetcherIOSNSURLSessionBridge; + web::WebState* web_state() { return web_state_.get(); } + + web::WebTaskEnvironment task_environment_; + std::unique_ptr<TestChromeBrowserState> browser_state_; + std::unique_ptr<web::WebState> web_state_; // Instance used for the tests. std::unique_ptr<TestGaiaAuthFetcherIOSNSURLSessionBridge> ns_url_session_bridge_; @@ -194,11 +199,18 @@ #pragma mark - GaiaAuthFetcherIOSNSURLSessionBridgeTest void GaiaAuthFetcherIOSNSURLSessionBridgeTest::SetUp() { - ChromeWebTest::SetUp(); + PlatformTest::SetUp(); + + browser_state_ = TestChromeBrowserState::Builder().Build(); + + web::WebState::CreateParams params(browser_state_.get()); + web_state_ = web::WebState::Create(params); + web_state_->GetView(); + web_state_->SetKeepRenderProcessAlive(true); delegate_.reset(new FakeGaiaAuthFetcherIOSBridgeDelegate()); ns_url_session_bridge_.reset(new TestGaiaAuthFetcherIOSNSURLSessionBridge( - delegate_.get(), GetBrowserState(), this)); + delegate_.get(), browser_state_.get(), this)); url_session_configuration_ = NSURLSessionConfiguration.ephemeralSessionConfiguration; url_session_configuration_.HTTPShouldSetCookies = YES; @@ -219,7 +231,7 @@ void GaiaAuthFetcherIOSNSURLSessionBridgeTest::TearDown() { ASSERT_OCMOCK_VERIFY((id)url_session_mock_); - ChromeWebTest::TearDown(); + web_state_.reset(); } NSURLSession* GaiaAuthFetcherIOSNSURLSessionBridgeTest::CreateNSURLSession( @@ -242,7 +254,7 @@ std::vector<net::CanonicalCookie> cookies_out; base::RunLoop run_loop; network::mojom::CookieManager* cookie_manager = - GetBrowserState()->GetCookieManager(); + browser_state_->GetCookieManager(); cookie_manager->GetAllCookies(base::BindOnce(base::BindLambdaForTesting( [&run_loop, &cookies_out](const std::vector<net::CanonicalCookie>& cookies) { @@ -301,7 +313,7 @@ bool GaiaAuthFetcherIOSNSURLSessionBridgeTest::SetCookiesInCookieManager( NSArray<NSHTTPCookie*>* cookies) { network::mojom::CookieManager* cookie_manager = - GetBrowserState()->GetCookieManager(); + browser_state_->GetCookieManager(); for (NSHTTPCookie* cookie in cookies) { std::unique_ptr<net::CanonicalCookie> canonical_cookie = net::CanonicalCookieFromSystemCookie(cookie, base::Time::Now());
diff --git a/ios/chrome/browser/tabs/BUILD.gn b/ios/chrome/browser/tabs/BUILD.gn index eb2e95b..10dab59 100644 --- a/ios/chrome/browser/tabs/BUILD.gn +++ b/ios/chrome/browser/tabs/BUILD.gn
@@ -106,6 +106,7 @@ "//ios/chrome/browser/web/web_performance_metrics", "//ios/chrome/browser/web_state_list", "//ios/chrome/browser/web_state_list/web_usage_enabler", + "//ios/chrome/browser/webui", "//ios/components/security_interstitials", "//ios/components/security_interstitials/lookalikes", "//ios/public/provider/chrome/browser",
diff --git a/ios/chrome/browser/tabs/tab_helper_util.mm b/ios/chrome/browser/tabs/tab_helper_util.mm index 4e88de3..761b528 100644 --- a/ios/chrome/browser/tabs/tab_helper_util.mm +++ b/ios/chrome/browser/tabs/tab_helper_util.mm
@@ -29,7 +29,9 @@ #import "ios/chrome/browser/complex_tasks/ios_task_tab_helper.h" #import "ios/chrome/browser/crash_report/breadcrumbs/breadcrumb_manager_tab_helper.h" #import "ios/chrome/browser/download/ar_quick_look_tab_helper.h" +#import "ios/chrome/browser/download/download_manager_tab_helper.h" #import "ios/chrome/browser/download/mobileconfig_tab_helper.h" +#import "ios/chrome/browser/download/pass_kit_tab_helper.h" #import "ios/chrome/browser/download/vcard_tab_helper.h" #include "ios/chrome/browser/favicon/favicon_service_factory.h" #import "ios/chrome/browser/find_in_page/find_tab_helper.h" @@ -79,9 +81,11 @@ #import "ios/chrome/browser/web/load_timing_tab_helper.h" #import "ios/chrome/browser/web/page_placeholder_tab_helper.h" #import "ios/chrome/browser/web/print/print_tab_helper.h" +#import "ios/chrome/browser/web/repost_form_tab_helper.h" #import "ios/chrome/browser/web/sad_tab_tab_helper.h" #import "ios/chrome/browser/web/session_state/web_session_state_tab_helper.h" #import "ios/chrome/browser/web/web_performance_metrics/web_performance_metrics_tab_helper.h" +#import "ios/chrome/browser/webui/net_export_tab_helper.h" #import "ios/components/security_interstitials/ios_blocking_page_tab_helper.h" #import "ios/components/security_interstitials/lookalikes/lookalike_url_container.h" #import "ios/components/security_interstitials/lookalikes/lookalike_url_tab_allow_list.h" @@ -126,8 +130,6 @@ InfobarOverlayTabHelper::CreateForWebState(web_state); TranslateOverlayTabHelper::CreateForWebState(web_state); - MobileConfigTabHelper::CreateForWebState(web_state); - if (ios::provider::IsTextZoomEnabled()) { FontSizeTabHelper::CreateForWebState(web_state); } @@ -136,10 +138,6 @@ BreadcrumbManagerTabHelper::CreateForWebState(web_state); } - if (base::FeatureList::IsEnabled(kDownloadVcard)) { - VcardTabHelper::CreateForWebState(web_state); - } - SafeBrowsingQueryManager::CreateForWebState(web_state); SafeBrowsingTabHelper::CreateForWebState(web_state); SafeBrowsingUrlAllowList::CreateForWebState(web_state); @@ -183,7 +181,14 @@ ukm::InitializeSourceUrlRecorderForWebState(web_state); + // Download tab helpers. ARQuickLookTabHelper::CreateForWebState(web_state); + DownloadManagerTabHelper::CreateForWebState(web_state); + MobileConfigTabHelper::CreateForWebState(web_state); + PassKitTabHelper::CreateForWebState(web_state); + if (base::FeatureList::IsEnabled(kDownloadVcard)) { + VcardTabHelper::CreateForWebState(web_state); + } PageloadForegroundDurationTabHelper::CreateForWebState(web_state); @@ -220,4 +225,7 @@ web_state, UrlLanguageHistogramFactory::GetForBrowserState(browser_state)); ChromeIOSTranslateClient::CreateForWebState(web_state); + + RepostFormTabHelper::CreateForWebState(web_state); + NetExportTabHelper::CreateForWebState(web_state); }
diff --git a/ios/chrome/browser/tabs/tab_title_util_unittest.mm b/ios/chrome/browser/tabs/tab_title_util_unittest.mm index e314c51..e4e6a34 100644 --- a/ios/chrome/browser/tabs/tab_title_util_unittest.mm +++ b/ios/chrome/browser/tabs/tab_title_util_unittest.mm
@@ -33,6 +33,7 @@ auto navigation_manager = std::make_unique<web::FakeNavigationManager>(); navigation_manager_ = navigation_manager.get(); web_state_.SetNavigationManager(std::move(navigation_manager)); + DownloadManagerTabHelper::CreateForWebState(&web_state_); } web::FakeWebState web_state_; @@ -41,8 +42,6 @@ // Tests GetTabTitle when there is a download task in the download manager. TEST_F(TabTitleUtilTest, GetTabTitleWithDownloadTest) { - DownloadManagerTabHelper::CreateForWebState(&web_state_, - /*delegate=*/nullptr); DownloadManagerTabHelper* tab_helper = DownloadManagerTabHelper::FromWebState(&web_state_); auto task = std::make_unique<web::FakeDownloadTask>( @@ -63,8 +62,6 @@ // Tests GetTabTitle when there is no download task in the download manager. TEST_F(TabTitleUtilTest, GetTabTitleWithNoDownloadTest) { - DownloadManagerTabHelper::CreateForWebState(&web_state_, - /*delegate=*/nullptr); // No title set on the web state. std::u16string default_title = l10n_util::GetStringUTF16(IDS_DEFAULT_TAB_TITLE);
diff --git a/ios/chrome/browser/ui/activity_services/data/share_to_data_builder_unittest.mm b/ios/chrome/browser/ui/activity_services/data/share_to_data_builder_unittest.mm index da06fd8..e8ff49f 100644 --- a/ios/chrome/browser/ui/activity_services/data/share_to_data_builder_unittest.mm +++ b/ios/chrome/browser/ui/activity_services/data/share_to_data_builder_unittest.mm
@@ -58,8 +58,7 @@ delegate_ = [[FakeSnapshotGeneratorDelegate alloc] init]; SnapshotTabHelper::FromWebState(web_state_.get())->SetDelegate(delegate_); // Needed by the ShareToDataForWebState to get the tab title. - DownloadManagerTabHelper::CreateForWebState(web_state_.get(), - /*delegate=*/nullptr); + DownloadManagerTabHelper::CreateForWebState(web_state_.get()); web_state_->SetTitle(kExpectedTitle); // Add a fake view to the FakeWebState. This will be used to capture the
diff --git a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm index a69de65c..31df501 100644 --- a/ios/chrome/browser/ui/browser_view/browser_coordinator.mm +++ b/ios/chrome/browser/ui/browser_view/browser_coordinator.mm
@@ -1198,13 +1198,14 @@ self.viewController); } - PassKitTabHelper::CreateForWebState(webState, self.passKitCoordinator); + PassKitTabHelper::FromWebState(webState)->SetDelegate( + self.passKitCoordinator); if (PrintTabHelper::FromWebState(webState)) { PrintTabHelper::FromWebState(webState)->set_printer(self.printController); } - RepostFormTabHelper::CreateForWebState(webState, self); + RepostFormTabHelper::FromWebState(webState)->SetDelegate(self); if (StoreKitTabHelper::FromWebState(webState)) { StoreKitTabHelper::FromWebState(webState)->SetLauncher( @@ -1214,10 +1215,18 @@ // Uninstalls delegates for |webState|. - (void)uninstallDelegatesForWebState:(web::WebState*)webState { + if (AutofillTabHelper::FromWebState(webState)) { + AutofillTabHelper::FromWebState(webState)->SetBaseViewController(nil); + } + + PassKitTabHelper::FromWebState(webState)->SetDelegate(nil); + if (PrintTabHelper::FromWebState(webState)) { PrintTabHelper::FromWebState(webState)->set_printer(nil); } + RepostFormTabHelper::FromWebState(webState)->SetDelegate(nil); + if (StoreKitTabHelper::FromWebState(webState)) { StoreKitTabHelper::FromWebState(webState)->SetLauncher(nil); }
diff --git a/ios/chrome/browser/ui/browser_view/tab_lifecycle_mediator.mm b/ios/chrome/browser/ui/browser_view/tab_lifecycle_mediator.mm index d268dee..4eb00f4 100644 --- a/ios/chrome/browser/ui/browser_view/tab_lifecycle_mediator.mm +++ b/ios/chrome/browser/ui/browser_view/tab_lifecycle_mediator.mm
@@ -96,10 +96,10 @@ // DownloadManagerTabHelper cannot function without its delegate. DCHECK(_downloadManagerCoordinator); - DownloadManagerTabHelper::CreateForWebState(webState, - _downloadManagerCoordinator); + DownloadManagerTabHelper::FromWebState(webState)->SetDelegate( + _downloadManagerCoordinator); - NetExportTabHelper::CreateForWebState(webState, _tabHelperDelegate); + NetExportTabHelper::FromWebState(webState)->SetDelegate(_tabHelperDelegate); } - (void)uninstallDependencyForWebState:(web::WebState*)webState { @@ -122,6 +122,10 @@ } web_deprecated::SetSwipeRecognizerProvider(webState, nil); + + DownloadManagerTabHelper::FromWebState(webState)->SetDelegate(nil); + + NetExportTabHelper::FromWebState(webState)->SetDelegate(nil); } @end
diff --git a/ios/chrome/browser/ui/download/download_manager_coordinator_unittest.mm b/ios/chrome/browser/ui/download/download_manager_coordinator_unittest.mm index b18e847..44375179 100644 --- a/ios/chrome/browser/ui/download/download_manager_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/download/download_manager_coordinator_unittest.mm
@@ -69,16 +69,6 @@ return task; } -// Substitutes real TabHelper for testing. -class StubTabHelper : public DownloadManagerTabHelper { - public: - StubTabHelper(web::WebState* web_state) - : DownloadManagerTabHelper(web_state, /*delegate=*/nullptr) {} - - StubTabHelper(const StubTabHelper&) = delete; - StubTabHelper& operator=(const StubTabHelper&) = delete; -}; - } // namespace // Test fixture for testing DownloadManagerCoordinator class. @@ -91,7 +81,7 @@ base_view_controller_ = [[UIViewController alloc] init]; activity_view_controller_class_ = OCMClassMock([UIActivityViewController class]); - tab_helper_ = std::make_unique<StubTabHelper>(&web_state_); + DownloadManagerTabHelper::CreateForWebState(&web_state_); coordinator_ = [[DownloadManagerCoordinator alloc] initWithBaseViewController:base_view_controller_ browser:browser_.get()]; @@ -112,6 +102,10 @@ [[InstallationNotifier sharedInstance] stopPolling]; } + DownloadManagerTabHelper* tab_helper() { + return DownloadManagerTabHelper::FromWebState(&web_state_); + } + web::WebTaskEnvironment task_environment_; std::unique_ptr<TestChromeBrowserState> browser_state_; std::unique_ptr<TestBrowser> browser_; @@ -119,7 +113,6 @@ UIViewController* base_view_controller_; ScopedKeyWindow scoped_key_window_; id activity_view_controller_class_; - std::unique_ptr<StubTabHelper> tab_helper_; web::FakeWebState web_state_; // Application can be lazily created by tests, but it has to be OCMock. // Destructor will call -stopMocking on this object to make sure that @@ -219,7 +212,7 @@ auto task = CreateTestTask(); histogram_tester_.ExpectTotalCount("Download.IOSDownloadFileUI", 0); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didCreateDownload:task.get() webStateIsVisible:YES]; @@ -257,7 +250,7 @@ task->Start(path, web::DownloadTask::Destination::kToMemory); task->SetDone(true); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didCreateDownload:task.get() webStateIsVisible:YES]; @@ -276,7 +269,7 @@ // Replace download task with a new one. auto new_task = CreateTestTask(); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didCreateDownload:new_task.get() webStateIsVisible:YES]; @@ -294,7 +287,7 @@ TEST_F(DownloadManagerCoordinatorTest, DelegateCreatedDownloadForHiddenWebState) { auto task = CreateTestTask(); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didCreateDownload:task.get() webStateIsVisible:NO]; @@ -307,7 +300,7 @@ // is reset to null (to prevent a stale raw pointer). TEST_F(DownloadManagerCoordinatorTest, DelegateHideDownload) { auto task = CreateTestTask(); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didCreateDownload:task.get() webStateIsVisible:YES]; @autoreleasepool { @@ -315,7 +308,7 @@ // autorelease coordinator_. task_environment_ has to outlive the // coordinator, so wrapping -downloadManagerTabHelper:didHideDownload: // call in @autorelease will ensure that coordinator_ is deallocated. - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didHideDownload:task.get()]; } @@ -329,7 +322,7 @@ // showing web state presents download manager UI for that web state. TEST_F(DownloadManagerCoordinatorTest, DelegateShowDownload) { auto task = CreateTestTask(); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() didShowDownload:task.get()]; // Only first presentation is animated. Switching between tab should create @@ -675,7 +668,7 @@ OverlayRequestQueue* queue = OverlayRequestQueue::FromWebState( &web_state_, OverlayModality::kWebContentArea); ASSERT_EQ(0U, queue->size()); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() decidePolicyForDownload:&task completionHandler:^(NewDownloadPolicy){ }]; @@ -719,7 +712,7 @@ OverlayRequestQueue* queue = OverlayRequestQueue::FromWebState( &web_state_, OverlayModality::kWebContentArea); ASSERT_EQ(0U, queue->size()); - [coordinator_ downloadManagerTabHelper:tab_helper_.get() + [coordinator_ downloadManagerTabHelper:tab_helper() decidePolicyForDownload:&task completionHandler:^(NewDownloadPolicy){ }];
diff --git a/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm b/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm index c5bc9e1..a667a7f6 100644 --- a/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/download/pass_kit_coordinator_unittest.mm
@@ -51,7 +51,8 @@ initWithWebState:web_state_.get()]; test_navigation_manager_ = std::make_unique<web::FakeNavigationManager>(); - PassKitTabHelper::CreateForWebState(web_state_.get(), delegate_); + PassKitTabHelper::CreateForWebState(web_state_.get()); + PassKitTabHelper::FromWebState(web_state_.get())->SetDelegate(delegate_); InfoBarManagerImpl::CreateForWebState(web_state_.get()); web_state_->SetNavigationManager(std::move(test_navigation_manager_)); [scoped_key_window_.Get() setRootViewController:base_view_controller_];
diff --git a/ios/chrome/browser/web/repost_form_tab_helper.h b/ios/chrome/browser/web/repost_form_tab_helper.h index 4800004..3787428 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper.h +++ b/ios/chrome/browser/web/repost_form_tab_helper.h
@@ -8,6 +8,7 @@ #include <CoreGraphics/CoreGraphics.h> #include "base/callback.h" +#include "base/memory/weak_ptr.h" #include "ios/web/public/web_state_observer.h" #import "ios/web/public/web_state_user_data.h" @@ -23,24 +24,25 @@ ~RepostFormTabHelper() override; - // Creates TabHelper. |delegate| is not retained by TabHelper and must not be - // null. - static void CreateForWebState(web::WebState* web_state, - id<RepostFormTabHelperDelegate> delegate); - // Presents a repost form dialog at the given |location|. |callback| is called // with true if the repost was confirmed and with false if it was cancelled. void PresentDialog(CGPoint location, base::OnceCallback<void(bool)> callback); + // Set the delegate. + void SetDelegate(id<RepostFormTabHelperDelegate> delegate); + private: friend class web::WebStateUserData<RepostFormTabHelper>; - RepostFormTabHelper(web::WebState* web_state, - id<RepostFormTabHelperDelegate> delegate); + RepostFormTabHelper(web::WebState* web_state); // Called to dismiss the repost form dialog. void DismissReportFormDialog(); + // Called by the callback passed to the delegate when the dialog has + // been presented. + void OnDialogPresented(); + // web::WebStateObserver overrides: void DidStartNavigation(web::WebState* web_state, web::NavigationContext* navigation_context) override; @@ -55,6 +57,8 @@ // true if form repost dialog is currently being presented. bool is_presenting_dialog_ = false; + base::WeakPtrFactory<RepostFormTabHelper> weak_factory_{this}; + WEB_STATE_USER_DATA_KEY_DECL(); };
diff --git a/ios/chrome/browser/web/repost_form_tab_helper.mm b/ios/chrome/browser/web/repost_form_tab_helper.mm index ca4b442..2455084 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper.mm +++ b/ios/chrome/browser/web/repost_form_tab_helper.mm
@@ -11,10 +11,8 @@ #error "This file requires ARC support." #endif -RepostFormTabHelper::RepostFormTabHelper( - web::WebState* web_state, - id<RepostFormTabHelperDelegate> delegate) - : web_state_(web_state), delegate_(delegate) { +RepostFormTabHelper::RepostFormTabHelper(web::WebState* web_state) + : web_state_(web_state) { web_state_->AddObserver(this); } @@ -22,39 +20,54 @@ DCHECK(!web_state_); } -void RepostFormTabHelper::CreateForWebState( - web::WebState* web_state, - id<RepostFormTabHelperDelegate> delegate) { - DCHECK(web_state); - DCHECK(delegate); - if (!FromWebState(web_state)) { - web_state->SetUserData( - UserDataKey(), - base::WrapUnique(new RepostFormTabHelper(web_state, delegate))); - } -} - void RepostFormTabHelper::DismissReportFormDialog() { + weak_factory_.InvalidateWeakPtrs(); if (is_presenting_dialog_) [delegate_ repostFormTabHelperDismissRepostFormDialog:this]; is_presenting_dialog_ = false; } +void RepostFormTabHelper::OnDialogPresented() { + DCHECK(is_presenting_dialog_); + is_presenting_dialog_ = false; +} + void RepostFormTabHelper::PresentDialog( CGPoint location, base::OnceCallback<void(bool)> callback) { DCHECK(!is_presenting_dialog_); + if (!delegate_) { + // If there is is no delegate, then assume that we should not continue. + std::move(callback).Run(/*should_continue*/ false); + return; + } + + base::OnceClosure on_dialog_presented = base::BindOnce( + &RepostFormTabHelper::OnDialogPresented, weak_factory_.GetWeakPtr()); + + __block base::OnceCallback<void(bool)> block_callback = base::BindOnce( + [](base::OnceClosure on_dialog_presented, + base::OnceCallback<void(bool)> callback, bool should_continue) { + if (!on_dialog_presented.IsCancelled()) + std::move(on_dialog_presented).Run(); + std::move(callback).Run(should_continue); + }, + std::move(on_dialog_presented), std::move(callback)); + is_presenting_dialog_ = true; - __block base::OnceCallback<void(bool)> block_callback = std::move(callback); [delegate_ repostFormTabHelper:this presentRepostFormDialogForWebState:web_state_ dialogAtPoint:location completionHandler:^(BOOL should_continue) { - is_presenting_dialog_ = false; std::move(block_callback).Run(should_continue); }]; } +void RepostFormTabHelper::SetDelegate( + id<RepostFormTabHelperDelegate> delegate) { + delegate_ = delegate; +} + void RepostFormTabHelper::DidStartNavigation(web::WebState* web_state, web::NavigationContext*) { DCHECK_EQ(web_state_, web_state);
diff --git a/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm b/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm index 14d2475..5489f12 100644 --- a/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm +++ b/ios/chrome/browser/web/repost_form_tab_helper_unittest.mm
@@ -85,7 +85,8 @@ : web_state_(std::make_unique<web::FakeWebState>()), delegate_([[RepostFormTabHelperTestDelegate alloc] init]), location_(CGPointMake(kDialogHLocation, kDialogVLocation)) { - RepostFormTabHelper::CreateForWebState(web_state_.get(), delegate_); + RepostFormTabHelper::CreateForWebState(web_state_.get()); + RepostFormTabHelper::FromWebState(web_state_.get())->SetDelegate(delegate_); delegate_.tabHelper = tab_helper(); }
diff --git a/ios/chrome/browser/webui/net_export_tab_helper.h b/ios/chrome/browser/webui/net_export_tab_helper.h index 963cad0..555db0ea5 100644 --- a/ios/chrome/browser/webui/net_export_tab_helper.h +++ b/ios/chrome/browser/webui/net_export_tab_helper.h
@@ -18,19 +18,17 @@ ~NetExportTabHelper() override; - // Creates a NetExportTabHelper and attaches it to |web_state|. The |delegate| - // is not retained by the NetExportTabHelper and must not be nil. - static void CreateForWebState(web::WebState* web_state, - id<NetExportTabHelperDelegate> delegate); - // Shows a Mail Composer which allows the sending of an email. |context| // contains information for populating the email. void ShowMailComposer(ShowMailComposerContext* context); + // Set the delegate. + void SetDelegate(id<NetExportTabHelperDelegate> delegate); + private: friend class web::WebStateUserData<NetExportTabHelper>; - explicit NetExportTabHelper(id<NetExportTabHelperDelegate> delegate); + explicit NetExportTabHelper(web::WebState* web_state); __weak id<NetExportTabHelperDelegate> delegate_; WEB_STATE_USER_DATA_KEY_DECL();
diff --git a/ios/chrome/browser/webui/net_export_tab_helper.mm b/ios/chrome/browser/webui/net_export_tab_helper.mm index 14e9333..7a0d64b 100644 --- a/ios/chrome/browser/webui/net_export_tab_helper.mm +++ b/ios/chrome/browser/webui/net_export_tab_helper.mm
@@ -12,21 +12,7 @@ #error "This file requires ARC support." #endif -// static -void NetExportTabHelper::CreateForWebState( - web::WebState* web_state, - id<NetExportTabHelperDelegate> delegate) { - DCHECK(web_state); - if (!FromWebState(web_state)) { - web_state->SetUserData(UserDataKey(), - base::WrapUnique(new NetExportTabHelper(delegate))); - } -} - -NetExportTabHelper::NetExportTabHelper(id<NetExportTabHelperDelegate> delegate) - : delegate_(delegate) { - DCHECK(delegate); -} +NetExportTabHelper::NetExportTabHelper(web::WebState*) {} NetExportTabHelper::~NetExportTabHelper() = default; @@ -34,4 +20,8 @@ [delegate_ netExportTabHelper:this showMailComposerWithContext:context]; } +void NetExportTabHelper::SetDelegate(id<NetExportTabHelperDelegate> delegate) { + delegate_ = delegate; +} + WEB_STATE_USER_DATA_KEY_IMPL(NetExportTabHelper)
diff --git a/ios/chrome/browser/webui/net_export_tab_helper_unittest.mm b/ios/chrome/browser/webui/net_export_tab_helper_unittest.mm index b694103..756016c7 100644 --- a/ios/chrome/browser/webui/net_export_tab_helper_unittest.mm +++ b/ios/chrome/browser/webui/net_export_tab_helper_unittest.mm
@@ -49,7 +49,8 @@ protected: void SetUp() override { ChromeWebTest::SetUp(); - NetExportTabHelper::CreateForWebState(web_state(), delegate_); + NetExportTabHelper::CreateForWebState(web_state()); + NetExportTabHelper::FromWebState(web_state())->SetDelegate(delegate_); } // A delegate that is given to the NetExportTabHelper for testing.
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 index 80c0182..77804d6c 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -6584f682c3b1ddce2c92c05f0b744be336cfdba2 \ No newline at end of file +f50764c926287c2c7d7801a6351cec74b3c65f83 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 index 33de995..98a4fbd7 100644 --- a/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -fe8b7f4ea6d28b4f592bf65383169f74e25dd335 \ No newline at end of file +53cd48964e7ce32c4838ce1b4694dd46a4c6087b \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 index e811e36..74da9cf 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -15f7d4100eee3aac03db9ff1c215f66a0c7cec31 \ No newline at end of file +681c5a5cca559b41c5aab1af5c259ac786d6bc58 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 index f3e0d78..2c4d281 100644 --- a/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/chrome_sso_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -75f2605b4ac334b017dd710b5eb4004cf3fdf0c5 \ No newline at end of file +364300270450101e87e89e5e0389880e805531c4 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.ios.zip.sha1 index 47ec025..3d43d64 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -6651c20f484e051a97672da56f799c0ff0b44300 \ No newline at end of file +830952455f0629ecb7259a55abe0a73ede46b428 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.iossimulator.zip.sha1 index f7b2c843c..579ed1c 100644 --- a/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_dogfood_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -33ebf48fe3f3767717dfdbe577687a41b5de5188 \ No newline at end of file +7440796e0e068c8f84aed8a6692058c54231ff0d \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 index bf03029..586e7dd 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -6d9804b9b213a044fc1b90ea2c1108472261780e \ No newline at end of file +0ae385de80477c860a46ac7f55d983c73297ab6a \ No newline at end of file
diff --git a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 index fc696e0..8efcc8522 100644 --- a/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/remoting_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -71e62477e09fa905f82935ffe415a225654cb14c \ No newline at end of file +c765c54d770581dba68f873272381deedaebe8f0 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 index d4d907b..6bf50059b 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.ios.zip.sha1
@@ -1 +1 @@ -270effde81f11967443203ef6846204a77b3e444 \ No newline at end of file +91a154a8616249e77a3feb399accb62173ee3539 \ No newline at end of file
diff --git a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 index 201bb60..6bdd0a023 100644 --- a/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1 +++ b/ios/google_internal/frameworks/web_view_shell_internal_dynamic_framework.iossimulator.zip.sha1
@@ -1 +1 @@ -d4bb231f54902c15ba2b3933fde5f17fab7a430c \ No newline at end of file +02086f5b989753ace9b8eac52796723aadccd752 \ No newline at end of file
diff --git a/media/audio/alsa/alsa_input.cc b/media/audio/alsa/alsa_input.cc index fbaaa48..513c4122 100644 --- a/media/audio/alsa/alsa_input.cc +++ b/media/audio/alsa/alsa_input.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/logging.h" #include "base/task/single_thread_task_runner.h" @@ -64,7 +63,7 @@ if (device_name_ == kAutoSelectDevice) { const char* device_names[] = { kDefaultDevice1, kDefaultDevice2 }; - for (size_t i = 0; i < base::size(device_names); ++i) { + for (size_t i = 0; i < std::size(device_names); ++i) { device_handle_ = alsa_util::OpenCaptureDevice( wrapper_, device_names[i], params_.channels(), params_.sample_rate(), kAlsaSampleFormat, buffer_us, packet_us);
diff --git a/media/audio/alsa/audio_manager_alsa.cc b/media/audio/alsa/audio_manager_alsa.cc index ff90dde..19d69a01 100644 --- a/media/audio/alsa/audio_manager_alsa.cc +++ b/media/audio/alsa/audio_manager_alsa.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/memory/free_deleter.h" #include "base/metrics/histogram.h" @@ -171,7 +170,7 @@ // it or not. if (type == kStreamCapture) { // Check if the device is in the list of invalid devices. - for (size_t i = 0; i < base::size(kInvalidAudioInputDevices); ++i) { + for (size_t i = 0; i < std::size(kInvalidAudioInputDevices); ++i) { if (strncmp(kInvalidAudioInputDevices[i], device_name, strlen(kInvalidAudioInputDevices[i])) == 0) return false; @@ -186,7 +185,7 @@ // TODO(joi): Should we prefer "hw" instead? static const char kDeviceTypeDesired[] = "plughw"; return strncmp(kDeviceTypeDesired, device_name, - base::size(kDeviceTypeDesired) - 1) == 0; + std::size(kDeviceTypeDesired) - 1) == 0; } // static
diff --git a/media/audio/android/opensles_input.cc b/media/audio/android/opensles_input.cc index ca104730..800ac87 100644 --- a/media/audio/android/opensles_input.cc +++ b/media/audio/android/opensles_input.cc
@@ -4,7 +4,6 @@ #include "media/audio/android/opensles_input.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/trace_event/trace_event.h" #include "media/audio/android/audio_manager_android.h" @@ -238,7 +237,7 @@ LOG_ON_FAILURE_AND_RETURN( (*engine)->CreateAudioRecorder( engine, recorder_object_.Receive(), &audio_source, &audio_sink, - base::size(interface_id), interface_id, interface_required), + std::size(interface_id), interface_id, interface_required), false); SLAndroidConfigurationItf recorder_config;
diff --git a/media/audio/android/opensles_output.cc b/media/audio/android/opensles_output.cc index 8c3b1be..1218e4b 100644 --- a/media/audio/android/opensles_output.cc +++ b/media/audio/android/opensles_output.cc
@@ -5,7 +5,6 @@ #include "media/audio/android/opensles_output.h" #include "base/android/build_info.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/logging.h" #include "base/strings/string_util.h" @@ -280,7 +279,7 @@ LOG_ON_FAILURE_AND_RETURN( (*engine)->CreateAudioPlayer( engine, player_object_.Receive(), &audio_source, &audio_sink, - base::size(interface_id), interface_id, interface_required), + std::size(interface_id), interface_id, interface_required), false); // Create AudioPlayer and specify SL_IID_ANDROIDCONFIGURATION.
diff --git a/media/audio/cras/audio_manager_chromeos.cc b/media/audio/cras/audio_manager_chromeos.cc index 49249db1..f5a3a98b 100644 --- a/media/audio/cras/audio_manager_chromeos.cc +++ b/media/audio/cras/audio_manager_chromeos.cc
@@ -15,7 +15,6 @@ #include "base/bind.h" #include "base/check_op.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/environment.h" #include "base/metrics/field_trial_params.h" #include "base/nix/xdg_util.h" @@ -579,7 +578,7 @@ void AudioManagerChromeOS::WaitEventOrShutdown(base::WaitableEvent* event) { base::WaitableEvent* waitables[] = {event, &on_shutdown_}; - base::WaitableEvent::WaitMany(waitables, base::size(waitables)); + base::WaitableEvent::WaitMany(waitables, std::size(waitables)); } enum CRAS_CLIENT_TYPE AudioManagerChromeOS::GetClientType() {
diff --git a/media/audio/cras/cras_input.cc b/media/audio/cras/cras_input.cc index 98e0c2d..3a0d25c 100644 --- a/media/audio/cras/cras_input.cc +++ b/media/audio/cras/cras_input.cc
@@ -5,9 +5,9 @@ #include "media/audio/cras/cras_input.h" #include <math.h> + #include <algorithm> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" @@ -165,7 +165,7 @@ CRAS_CH_SL, CRAS_CH_SR }; - static_assert(base::size(kChannelMap) == CHANNELS_MAX + 1, + static_assert(std::size(kChannelMap) == CHANNELS_MAX + 1, "kChannelMap array size should match"); // If already playing, stop before re-starting. @@ -209,12 +209,12 @@ // Initialize channel layout to all -1 to indicate that none of // the channels is set in the layout. int8_t layout[CRAS_CH_MAX]; - for (size_t i = 0; i < base::size(layout); ++i) + for (size_t i = 0; i < std::size(layout); ++i) layout[i] = -1; // Converts to CRAS defined channels. ChannelOrder will return -1 // for channels that are not present in params_.channel_layout(). - for (size_t i = 0; i < base::size(kChannelMap); ++i) { + for (size_t i = 0; i < std::size(kChannelMap); ++i) { layout[kChannelMap[i]] = ChannelOrder(params_.channel_layout(), static_cast<Channels>(i)); }
diff --git a/media/audio/cras/cras_unified.cc b/media/audio/cras/cras_unified.cc index d4a5069..fc175744 100644 --- a/media/audio/cras/cras_unified.cc +++ b/media/audio/cras/cras_unified.cc
@@ -6,7 +6,6 @@ #include <algorithm> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "media/audio/cras/audio_manager_cras_base.h" @@ -186,7 +185,7 @@ // Converts to CRAS defined channels. ChannelOrder will return -1 // for channels that does not present in params_.channel_layout(). - for (size_t i = 0; i < base::size(kChannelMap); ++i) + for (size_t i = 0; i < std::size(kChannelMap); ++i) layout[kChannelMap[i]] = ChannelOrder(params_.channel_layout(), static_cast<Channels>(i));
diff --git a/media/audio/fuchsia/audio_input_stream_fuchsia.cc b/media/audio/fuchsia/audio_input_stream_fuchsia.cc index 0bb367e..f72dce8 100644 --- a/media/audio/fuchsia/audio_input_stream_fuchsia.cc +++ b/media/audio/fuchsia/audio_input_stream_fuchsia.cc
@@ -77,7 +77,7 @@ ZX_CHECK(status == ZX_OK, status) << "zx_vmo_create"; constexpr char kName[] = "cr-audio-capturer"; - status = buffer_vmo.set_property(ZX_PROP_NAME, kName, base::size(kName) - 1); + status = buffer_vmo.set_property(ZX_PROP_NAME, kName, std::size(kName) - 1); ZX_DCHECK(status == ZX_OK, status); bool mapped =
diff --git a/media/audio/test_data.h b/media/audio/test_data.h index a3438039..c17a1267 100644 --- a/media/audio/test_data.h +++ b/media/audio/test_data.h
@@ -11,14 +11,14 @@ "RIFF\x28\x00\x00\x00WAVEfmt \x10\x00\x00\x00" "\x01\x00\x02\x00\x80\xbb\x00\x00\x00\x77\x01\x00\x02\x00\x10\x00" "data\x04\x00\x00\x00\x01\x00\x01\x00"; -const size_t kTestAudioDataSize = base::size(kTestAudioData) - 1; +const size_t kTestAudioDataSize = std::size(kTestAudioData) - 1; // Extensible format with 48kHz rate stereo 32 bit float samples const char kTestFloatAudioData[] = "RIFF\x26\x00\x00\x00WAVEfmt \x10\x00\x00\x00" "\x03\x00\x02\x00\x80\xbb\x00\x00\x00\xdc\x05\x00\x08\x00\x20\x00" "data\x08\x00\x00\x00\x00\x01\x00\x00\x01\x00\x00\x00"; -const size_t kTestFloatAudioDataSize = base::size(kTestFloatAudioData) - 1; +const size_t kTestFloatAudioDataSize = std::size(kTestFloatAudioData) - 1; // Extensible format with 48kHz rate stereo 32 bit PCM samples const char kTestExtensibleAudioData[] = @@ -28,7 +28,7 @@ "\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" "data\x08\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00"; const size_t kTestExtensibleAudioDataSize = - base::size(kTestExtensibleAudioData) - 1; + std::size(kTestExtensibleAudioData) - 1; } // namespace media
diff --git a/media/audio/wav_audio_handler_unittest.cc b/media/audio/wav_audio_handler_unittest.cc index 5bd2702..b9e1893 100644 --- a/media/audio/wav_audio_handler_unittest.cc +++ b/media/audio/wav_audio_handler_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> #include <string> -#include "base/cxx17_backports.h" #include "base/strings/string_piece.h" #include "media/audio/test_data.h" #include "media/base/audio_bus.h" @@ -47,7 +46,7 @@ ASSERT_EQ(4U, handler->data().size()); const char kData[] = "\x01\x00\x01\x00"; - ASSERT_EQ(base::StringPiece(kData, base::size(kData) - 1), handler->data()); + ASSERT_EQ(base::StringPiece(kData, std::size(kData) - 1), handler->data()); std::unique_ptr<AudioBus> bus = AudioBus::Create(handler->num_channels(), @@ -70,7 +69,7 @@ ASSERT_EQ(8U, handler->data().size()); const char kData[] = "\x00\x01\x00\x00\x01\x00\x00\x00"; - ASSERT_EQ(base::StringPiece(kData, base::size(kData) - 1), handler->data()); + ASSERT_EQ(base::StringPiece(kData, std::size(kData) - 1), handler->data()); std::unique_ptr<AudioBus> bus = AudioBus::Create(handler->num_channels(), @@ -93,7 +92,7 @@ ASSERT_EQ(8U, handler->data().size()); const char kData[] = "\x01\x00\x00\x00\x01\x00\x00\x00"; - ASSERT_EQ(base::StringPiece(kData, base::size(kData) - 1), handler->data()); + ASSERT_EQ(base::StringPiece(kData, std::size(kData) - 1), handler->data()); std::unique_ptr<AudioBus> bus = AudioBus::Create(handler->num_channels(), @@ -152,7 +151,7 @@ ASSERT_EQ(4U, handler->data().size()); const char kData[] = "\x01\x00\x01\x00"; - ASSERT_EQ(base::StringPiece(kData, base::size(kData) - 1), handler->data()); + ASSERT_EQ(base::StringPiece(kData, std::size(kData) - 1), handler->data()); } TEST(WavAudioHandlerTest, TestTooBigDataChunkSizeIsOkay) { @@ -174,7 +173,7 @@ ASSERT_EQ(4U, handler->data().size()); const char kData[] = "\x01\x00\x01\x00"; - ASSERT_EQ(base::StringPiece(kData, base::size(kData) - 1), handler->data()); + ASSERT_EQ(base::StringPiece(kData, std::size(kData) - 1), handler->data()); } TEST(WavAudioHandlerTest, TestTooSmallFormatSizeIsNotValid) {
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc index f9015c1..408a7c4 100644 --- a/media/audio/win/audio_low_latency_input_win.cc +++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -14,7 +14,6 @@ #include <memory> #include <utility> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" @@ -1189,7 +1188,7 @@ ABI::Windows::Media::AudioProcessing audio_processing_mode[] = { ABI::Windows::Media::AudioProcessing::AudioProcessing_Default, ABI::Windows::Media::AudioProcessing::AudioProcessing_Raw}; - for (size_t i = 0; i < base::size(audio_processing_mode); ++i) { + for (size_t i = 0; i < std::size(audio_processing_mode); ++i) { // Create an AudioCaptureEffectsManager manager which can be used to // discover the audio processing chain on a device for a specific media // category and audio processing mode. The media category is fixed and set
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc index 68a9652..98a4908 100644 --- a/media/audio/win/audio_low_latency_output_win.cc +++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -14,7 +14,6 @@ #include "base/callback.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/metrics/histogram.h" #include "base/metrics/histogram_functions.h" @@ -527,7 +526,7 @@ // is signaled. An error event can also break the main thread loop. while (playing && !error) { // Wait for a close-down event, stream-switch event or a new render event. - DWORD wait_result = WaitForMultipleObjects(base::size(wait_array), + DWORD wait_result = WaitForMultipleObjects(std::size(wait_array), wait_array, FALSE, INFINITE); switch (wait_result) {
diff --git a/media/audio/win/avrt_wrapper_win.cc b/media/audio/win/avrt_wrapper_win.cc index 8e65fce..bde2f46 100644 --- a/media/audio/win/avrt_wrapper_win.cc +++ b/media/audio/win/avrt_wrapper_win.cc
@@ -4,8 +4,9 @@ #include "media/audio/win/avrt_wrapper_win.h" +#include <iterator> + #include "base/check.h" -#include "base/cxx17_backports.h" namespace avrt { @@ -24,7 +25,7 @@ // The avrt.dll is available on Windows Vista and later. wchar_t path[MAX_PATH] = {0}; ExpandEnvironmentStrings(L"%SystemRoot%\\system32\\avrt.dll", path, - base::size(path)); + std::size(path)); g_avrt = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); if (!g_avrt) return false;
diff --git a/media/audio/win/core_audio_util_win_unittest.cc b/media/audio/win/core_audio_util_win_unittest.cc index 6db3ec2..61f74af 100644 --- a/media/audio/win/core_audio_util_win_unittest.cc +++ b/media/audio/win/core_audio_util_win_unittest.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/waitable_event.h" #include "base/test/metrics/histogram_tester.h" @@ -159,7 +158,7 @@ // Create default devices for all flow/role combinations above. ComPtr<IMMDevice> audio_device; - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { audio_device = CoreAudioUtil::CreateDevice( AudioDeviceDescription::kDefaultDeviceId, data[i].flow, data[i].role); EXPECT_TRUE(audio_device.Get()); @@ -212,7 +211,7 @@ // Get name and ID of default devices for all flow/role combinations above. ComPtr<IMMDevice> audio_device; AudioDeviceName device_name; - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { audio_device = CoreAudioUtil::CreateDevice( AudioDeviceDescription::kDefaultDeviceId, data[i].flow, data[i].role); EXPECT_TRUE(SUCCEEDED( @@ -232,7 +231,7 @@ // Enumerate all active input and output devices and fetch the ID of // the associated device. EDataFlow flows[] = { eRender , eCapture }; - for (size_t i = 0; i < base::size(flows); ++i) { + for (size_t i = 0; i < std::size(flows); ++i) { ComPtr<IMMDeviceCollection> collection; ASSERT_TRUE(SUCCEEDED(enumerator->EnumAudioEndpoints( flows[i], DEVICE_STATE_ACTIVE, &collection))); @@ -279,7 +278,7 @@ EDataFlow data[] = {eRender, eCapture}; - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { ComPtr<IAudioClient> client = CoreAudioUtil::CreateClient( AudioDeviceDescription::kDefaultDeviceId, data[i], eConsole); EXPECT_TRUE(client.Get()); @@ -292,7 +291,7 @@ EDataFlow data[] = {eRender, eCapture}; - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { ComPtr<IAudioClient3> client3 = CoreAudioUtil::CreateClient3( AudioDeviceDescription::kDefaultDeviceId, data[i], eConsole); EXPECT_TRUE(client3.Get()); @@ -301,7 +300,7 @@ // Use ComPtr notation to achieve the same thing as above. ComPtr::As wraps // QueryInterface calls on existing COM objects. In this case we use an // existing IAudioClient to obtain the IAudioClient3 interface. - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { ComPtr<IAudioClient> client = CoreAudioUtil::CreateClient( AudioDeviceDescription::kDefaultDeviceId, data[i], eConsole); EXPECT_TRUE(client.Get()); @@ -368,7 +367,7 @@ // Verify that the device periods are valid for the default render and // capture devices. - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { ComPtr<IAudioClient> client; REFERENCE_TIME shared_time_period = 0; REFERENCE_TIME exclusive_time_period = 0; @@ -392,7 +391,7 @@ // Verify that the preferred audio parameters are OK for the default render // and capture devices. - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { AudioParameters params; const bool is_output_device = (data[i] == eRender); EXPECT_TRUE(SUCCEEDED(CoreAudioUtil::GetPreferredAudioParameters( @@ -508,7 +507,7 @@ WAVEFORMATEXTENSIBLE format; uint32_t endpoint_buffer_size = 0; - for (size_t i = 0; i < base::size(data); ++i) { + for (size_t i = 0; i < std::size(data); ++i) { ComPtr<IAudioClient> client; ComPtr<IAudioRenderClient> render_client; ComPtr<IAudioCaptureClient> capture_client;
diff --git a/media/base/android/media_drm_bridge.cc b/media/base/android/media_drm_bridge.cc index 6bc445c..0c38fc7 100644 --- a/media/base/android/media_drm_bridge.cc +++ b/media/base/android/media_drm_bridge.cc
@@ -6,6 +6,7 @@ #include <stddef.h> #include <sys/system_properties.h> + #include <algorithm> #include <memory> #include <utility> @@ -15,7 +16,6 @@ #include "base/android/jni_string.h" #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/location.h" #include "base/logging.h" @@ -181,7 +181,7 @@ KeySystemManager::KeySystemManager() { // Widevine is always supported in Android. key_system_uuid_map_[kWidevineKeySystem] = - UUID(kWidevineUuid, kWidevineUuid + base::size(kWidevineUuid)); + UUID(kWidevineUuid, kWidevineUuid + std::size(kWidevineUuid)); MediaDrmBridgeClient* client = GetMediaDrmBridgeClient(); if (client) client->AddKeySystemUUIDMappings(&key_system_uuid_map_);
diff --git a/media/base/audio_bus_unittest.cc b/media/base/audio_bus_unittest.cc index 7b2f328..753b407 100644 --- a/media/base/audio_bus_unittest.cc +++ b/media/base/audio_bus_unittest.cc
@@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/audio_bus.h" + #include <stddef.h> #include <stdint.h> #include <limits> #include <memory> -#include "base/cxx17_backports.h" #include "base/memory/aligned_memory.h" #include "base/strings/stringprintf.h" #include "base/test/bind.h" #include "base/time/time.h" #include "build/build_config.h" -#include "media/base/audio_bus.h" #include "media/base/audio_parameters.h" #include "media/base/audio_sample_types.h" #include "media/base/channel_layout.h" @@ -333,7 +333,7 @@ static const float kTestVectorResult[][kTestVectorFrameCount] = { {-1.0f, 1.0f, 0.5f, 0.0f, 0.0f}, {0.0f, -1.0f, -0.5f, 1.0f, 0.0f}}; -static const int kTestVectorChannelCount = base::size(kTestVectorResult); +static const int kTestVectorChannelCount = std::size(kTestVectorResult); // Verify FromInterleaved() deinterleaves audio in supported formats correctly. TEST_F(AudioBusTest, FromInterleaved) { @@ -424,26 +424,26 @@ { SCOPED_TRACE("UnsignedInt8SampleTypeTraits"); - uint8_t test_array[base::size(kTestVectorUint8)]; + uint8_t test_array[std::size(kTestVectorUint8)]; bus->ToInterleaved<UnsignedInt8SampleTypeTraits>(bus->frames(), test_array); ASSERT_EQ(0, memcmp(test_array, kTestVectorUint8, sizeof(kTestVectorUint8))); } { SCOPED_TRACE("SignedInt16SampleTypeTraits"); - int16_t test_array[base::size(kTestVectorInt16)]; + int16_t test_array[std::size(kTestVectorInt16)]; bus->ToInterleaved<SignedInt16SampleTypeTraits>(bus->frames(), test_array); ASSERT_EQ(0, memcmp(test_array, kTestVectorInt16, sizeof(kTestVectorInt16))); } { SCOPED_TRACE("SignedInt32SampleTypeTraits"); - int32_t test_array[base::size(kTestVectorInt32)]; + int32_t test_array[std::size(kTestVectorInt32)]; bus->ToInterleaved<SignedInt32SampleTypeTraits>(bus->frames(), test_array); // Some compilers get better precision than others on the half-max test, so // let the test pass with an off by one check on the half-max. - int32_t alternative_acceptable_result[base::size(kTestVectorInt32)]; + int32_t alternative_acceptable_result[std::size(kTestVectorInt32)]; memcpy(alternative_acceptable_result, kTestVectorInt32, sizeof(kTestVectorInt32)); ASSERT_EQ(alternative_acceptable_result[4], @@ -457,7 +457,7 @@ } { SCOPED_TRACE("Float32SampleTypeTraits"); - float test_array[base::size(kTestVectorFloat32)]; + float test_array[std::size(kTestVectorFloat32)]; bus->ToInterleaved<Float32SampleTypeTraits>(bus->frames(), test_array); ASSERT_EQ( 0, memcmp(test_array, kTestVectorFloat32, sizeof(kTestVectorFloat32))); @@ -471,9 +471,9 @@ bus->frames()); // Verify FromInterleaved applied no sanity. ASSERT_EQ(bus->channel(0)[0], kTestVectorFloat32Invalid[0]); - float test_array[base::size(kTestVectorFloat32Sanitized)]; + float test_array[std::size(kTestVectorFloat32Sanitized)]; bus->ToInterleaved<Float32SampleTypeTraits>(bus->frames(), test_array); - for (size_t i = 0; i < base::size(kTestVectorFloat32Sanitized); ++i) + for (size_t i = 0; i < std::size(kTestVectorFloat32Sanitized); ++i) ASSERT_EQ(kTestVectorFloat32Sanitized[i], test_array[i]); // Verify that Float32SampleTypeTraitsNoClip applied no sanity. Note: We don't @@ -531,7 +531,7 @@ { SCOPED_TRACE("Float32SampleTypeTraits"); - float test_array[base::size(kTestVectorFloat32)]; + float test_array[std::size(kTestVectorFloat32)]; expected->ToInterleavedPartial<Float32SampleTypeTraits>( kPartialStart, kPartialFrames, test_array); ASSERT_EQ(0, memcmp(test_array, kTestVectorFloat32 +
diff --git a/media/base/audio_hash.cc b/media/base/audio_hash.cc index bf2c7baf..236d92d 100644 --- a/media/base/audio_hash.cc +++ b/media/base/audio_hash.cc
@@ -2,12 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/audio_hash.h" + #include <cmath> #include <sstream> -#include "media/base/audio_hash.h" - -#include "base/cxx17_backports.h" #include "base/numerics/math_constants.h" #include "base/strings/stringprintf.h" #include "media/base/audio_bus.h" @@ -29,7 +28,7 @@ for (uint32_t i = 0; i < static_cast<uint32_t>(frames); ++i) { const uint32_t kSampleIndex = sample_count_ + i; const uint32_t kHashIndex = - (kSampleIndex * (ch + 1)) % base::size(audio_hash_); + (kSampleIndex * (ch + 1)) % std::size(audio_hash_); // Mix in a sine wave with the result so we ensure that sequences of empty // buffers don't result in an empty hash. @@ -48,7 +47,7 @@ std::string AudioHash::ToString() const { std::string result; - for (size_t i = 0; i < base::size(audio_hash_); ++i) + for (size_t i = 0; i < std::size(audio_hash_); ++i) result += base::StringPrintf("%.2f,", audio_hash_[i]); return result; } @@ -58,7 +57,7 @@ char comma; std::stringstream is(other); - for (size_t i = 0; i < base::size(audio_hash_); ++i) { + for (size_t i = 0; i < std::size(audio_hash_); ++i) { is >> other_hash >> comma; if (std::fabs(audio_hash_[i] - other_hash) > tolerance) return false;
diff --git a/media/base/audio_parameters_unittest.cc b/media/base/audio_parameters_unittest.cc index 28bac4e..021f044 100644 --- a/media/base/audio_parameters_unittest.cc +++ b/media/base/audio_parameters_unittest.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/audio_parameters.h" + #include <stddef.h> -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" -#include "media/base/audio_parameters.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -107,8 +107,8 @@ CHANNEL_LAYOUT_STEREO, 2000, 200), }; - for (size_t i = 0; i < base::size(values); ++i) { - for (size_t j = 0; j < base::size(values); ++j) { + for (size_t i = 0; i < std::size(values); ++i) { + for (size_t j = 0; j < std::size(values); ++j) { SCOPED_TRACE("i=" + base::NumberToString(i) + " j=" + base::NumberToString(j)); EXPECT_EQ(i < j, values[i] < values[j]);
diff --git a/media/base/audio_renderer_mixer_unittest.cc b/media/base/audio_renderer_mixer_unittest.cc index 3151b31..ebbeb8c 100644 --- a/media/base/audio_renderer_mixer_unittest.cc +++ b/media/base/audio_renderer_mixer_unittest.cc
@@ -14,7 +14,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/synchronization/waitable_event.h" #include "base/test/task_environment.h" @@ -536,19 +535,19 @@ // Downsampling, multuple input sample rates. std::make_tuple(static_cast<const int* const>(kTestInput3Rates), - base::size(kTestInput3Rates), + std::size(kTestInput3Rates), kTestInput3Rates[0], 0.01), // Upsampling, multiple sinput sample rates. std::make_tuple(static_cast<const int* const>(kTestInput3Rates), - base::size(kTestInput3Rates), + std::size(kTestInput3Rates), kTestInput3Rates[2], 0.01), // Both downsampling and upsampling, multiple input sample rates std::make_tuple(static_cast<const int* const>(kTestInput3Rates), - base::size(kTestInput3Rates), + std::size(kTestInput3Rates), kTestInput3Rates[1], 0.01)));
diff --git a/media/base/audio_timestamp_helper_unittest.cc b/media/base/audio_timestamp_helper_unittest.cc index af4144c..2beb9414 100644 --- a/media/base/audio_timestamp_helper_unittest.cc +++ b/media/base/audio_timestamp_helper_unittest.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/audio_timestamp_helper.h" + #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" -#include "media/base/audio_timestamp_helper.h" #include "media/base/timestamp_constants.h" #include "testing/gtest/include/gtest/gtest.h" @@ -132,7 +132,7 @@ int frame_count = 5; int64_t expected_durations[] = {113, 113, 114, 113, 113, 114}; - for (size_t i = 0; i < base::size(expected_durations); ++i) { + for (size_t i = 0; i < std::size(expected_durations); ++i) { base::TimeDelta duration = helper_.GetFrameDuration(frame_count); EXPECT_EQ(expected_durations[i], duration.InMicroseconds());
diff --git a/media/base/bit_reader_unittest.cc b/media/base/bit_reader_unittest.cc index ee04e360..e8ba51c 100644 --- a/media/base/bit_reader_unittest.cc +++ b/media/base/bit_reader_unittest.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -97,7 +96,7 @@ // Set bits to one only for the first and last bit of each read // in the pattern. size_t pos = 0; - for (size_t k = 0; k < base::size(pattern_read_skip); ++k) { + for (size_t k = 0; k < std::size(pattern_read_skip); ++k) { const size_t read_bit_count = pattern_read_skip[k][0]; if (read_bit_count > 0) { SetBit(buffer, sizeof(buffer), pos); @@ -110,7 +109,7 @@ // Run the test. BitReader bit_reader(buffer, sizeof(buffer)); EXPECT_EQ(bit_reader.bits_available(), static_cast<int>(sizeof(buffer) * 8)); - for (size_t k = 0; k < base::size(pattern_read_skip); ++k) { + for (size_t k = 0; k < std::size(pattern_read_skip); ++k) { const size_t read_bit_count = pattern_read_skip[k][0]; if (read_bit_count > 0) { int value;
diff --git a/media/base/channel_layout.cc b/media/base/channel_layout.cc index 07546f3..2b1e8b9 100644 --- a/media/base/channel_layout.cc +++ b/media/base/channel_layout.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/notreached.h" @@ -165,7 +164,7 @@ }; int ChannelLayoutToChannelCount(ChannelLayout layout) { - DCHECK_LT(static_cast<size_t>(layout), base::size(kLayoutToChannels)); + DCHECK_LT(static_cast<size_t>(layout), std::size(kLayoutToChannels)); DCHECK_LE(kLayoutToChannels[layout], kMaxConcurrentChannels); return kLayoutToChannels[layout]; } @@ -196,8 +195,8 @@ } int ChannelOrder(ChannelLayout layout, Channels channel) { - DCHECK_LT(static_cast<size_t>(layout), base::size(kChannelOrderings)); - DCHECK_LT(static_cast<size_t>(channel), base::size(kChannelOrderings[0])); + DCHECK_LT(static_cast<size_t>(layout), std::size(kChannelOrderings)); + DCHECK_LT(static_cast<size_t>(channel), std::size(kChannelOrderings[0])); return kChannelOrderings[layout][channel]; }
diff --git a/media/base/channel_mixer_unittest.cc b/media/base/channel_mixer_unittest.cc index f89cc795..56facff 100644 --- a/media/base/channel_mixer_unittest.cc +++ b/media/base/channel_mixer_unittest.cc
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/channel_mixer.h" + #include <memory> -#include "base/cxx17_backports.h" #include "base/strings/stringprintf.h" #include "media/base/audio_bus.h" #include "media/base/audio_parameters.h" -#include "media/base/channel_mixer.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -166,35 +166,35 @@ testing::Values(ChannelMixerTestData(CHANNEL_LAYOUT_STEREO, CHANNEL_LAYOUT_MONO, kStereoToMonoValues, - base::size(kStereoToMonoValues), + std::size(kStereoToMonoValues), 0.5f), ChannelMixerTestData(CHANNEL_LAYOUT_MONO, CHANNEL_LAYOUT_STEREO, kMonoToStereoValues, - base::size(kMonoToStereoValues), + std::size(kMonoToStereoValues), 1.0f), ChannelMixerTestData(CHANNEL_LAYOUT_5_1, CHANNEL_LAYOUT_MONO, kFiveOneToMonoValues, - base::size(kFiveOneToMonoValues), + std::size(kFiveOneToMonoValues), ChannelMixer::kHalfPower), ChannelMixerTestData(CHANNEL_LAYOUT_DISCRETE, 2, CHANNEL_LAYOUT_DISCRETE, 2, kStereoToMonoValues, - base::size(kStereoToMonoValues)), + std::size(kStereoToMonoValues)), ChannelMixerTestData(CHANNEL_LAYOUT_DISCRETE, 2, CHANNEL_LAYOUT_DISCRETE, 5, kStereoToMonoValues, - base::size(kStereoToMonoValues)), + std::size(kStereoToMonoValues)), ChannelMixerTestData(CHANNEL_LAYOUT_DISCRETE, 5, CHANNEL_LAYOUT_DISCRETE, 2, kFiveDiscreteValues, - base::size(kFiveDiscreteValues)))); + std::size(kFiveDiscreteValues)))); } // namespace media
diff --git a/media/base/channel_mixing_matrix_unittest.cc b/media/base/channel_mixing_matrix_unittest.cc index 7da150e2..3bee282 100644 --- a/media/base/channel_mixing_matrix_unittest.cc +++ b/media/base/channel_mixing_matrix_unittest.cc
@@ -6,7 +6,6 @@ #include <stddef.h> -#include "base/cxx17_backports.h" #include "base/strings/stringprintf.h" #include "media/base/channel_mixer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -161,7 +160,7 @@ {2, 2}, {2, 5}, {5, 2}, }; - for (size_t n = 0; n < base::size(test_case); n++) { + for (size_t n = 0; n < std::size(test_case); n++) { int input_channels = test_case[n].input_channels; int output_channels = test_case[n].output_channels; ChannelMixingMatrix matrix_builder(CHANNEL_LAYOUT_DISCRETE,
diff --git a/media/base/container_names.cc b/media/base/container_names.cc index 75816aa..08315dcd 100644 --- a/media/base/container_names.cc +++ b/media/base/container_names.cc
@@ -11,7 +11,6 @@ #include <limits> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/numerics/safe_conversions.h" #include "media/base/bit_reader.h" @@ -312,7 +311,7 @@ // Verify core audio sampling frequency is an allowed value. size_t sampling_freq_index = ReadBits(&reader, 4); - RCHECK(sampling_freq_index < base::size(kSamplingFrequencyValid)); + RCHECK(sampling_freq_index < std::size(kSamplingFrequencyValid)); RCHECK(kSamplingFrequencyValid[sampling_freq_index]); // Verify transmission bit rate is valid. @@ -326,7 +325,7 @@ // Verify extension audio descriptor flag is an allowed value. size_t audio_id_index = ReadBits(&reader, 3); - RCHECK(audio_id_index < base::size(kExtAudioIdValid)); + RCHECK(audio_id_index < std::size(kExtAudioIdValid)); RCHECK(kExtAudioIdValid[audio_id_index]); // Skip extended coding flag and audio sync word insertion flag. @@ -386,7 +385,7 @@ reader.SkipBits(3); RCHECK(ReadBits(&reader, 24) == 0xffffff); current_sequence_number = sequence_number; - for (size_t i = 0; i < base::size(last_block_number); ++i) + for (size_t i = 0; i < std::size(last_block_number); ++i) last_block_number[i] = -1; } else { // Sequence number must match (this will also fail if no header seen).
diff --git a/media/base/data_buffer_unittest.cc b/media/base/data_buffer_unittest.cc index e4f5304..0647bfe 100644 --- a/media/base/data_buffer_unittest.cc +++ b/media/base/data_buffer_unittest.cc
@@ -5,10 +5,10 @@ #include "media/base/data_buffer.h" #include <stdint.h> + #include <memory> #include <utility> -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -49,7 +49,7 @@ TEST(DataBufferTest, CopyFrom) { const uint8_t kTestData[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77}; - const int kTestDataSize = base::size(kTestData); + const int kTestDataSize = std::size(kTestData); scoped_refptr<DataBuffer> buffer = DataBuffer::CopyFrom(kTestData, kTestDataSize); @@ -99,9 +99,9 @@ TEST(DataBufferTest, ReadingWriting) { const char kData[] = "hello"; - const int kDataSize = base::size(kData); + const int kDataSize = std::size(kData); const char kNewData[] = "chromium"; - const int kNewDataSize = base::size(kNewData); + const int kNewDataSize = std::size(kNewData); // Create a DataBuffer. scoped_refptr<DataBuffer> buffer(new DataBuffer(kDataSize));
diff --git a/media/base/decoder_buffer_unittest.cc b/media/base/decoder_buffer_unittest.cc index 2d6c257b..2f80d5e9 100644 --- a/media/base/decoder_buffer_unittest.cc +++ b/media/base/decoder_buffer_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/memory/read_only_shared_memory_region.h" #include "base/memory/unsafe_shared_memory_region.h" #include "base/strings/string_util.h" @@ -38,7 +37,7 @@ TEST(DecoderBufferTest, CopyFrom) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> buffer2(DecoderBuffer::CopyFrom( reinterpret_cast<const uint8_t*>(&kData), kDataSize)); @@ -65,7 +64,7 @@ TEST(DecoderBufferTest, FromArray) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); std::unique_ptr<uint8_t[]> ptr(new uint8_t[kDataSize]); memcpy(ptr.get(), kData, kDataSize); @@ -80,7 +79,7 @@ TEST(DecoderBufferTest, FromPlatformSharedMemoryRegion) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); auto region = base::UnsafeSharedMemoryRegion::Create(kDataSize); auto mapping = region.Map(); @@ -100,7 +99,7 @@ TEST(DecoderBufferTest, FromPlatformSharedMemoryRegion_Unaligned) { const uint8_t kData[] = "XXXhello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); const off_t kDataOffset = 3; auto region = base::UnsafeSharedMemoryRegion::Create(kDataSize); @@ -122,7 +121,7 @@ TEST(DecoderBufferTest, FromPlatformSharedMemoryRegion_ZeroSize) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); auto region = base::UnsafeSharedMemoryRegion::Create(kDataSize); auto mapping = region.Map(); @@ -138,7 +137,7 @@ TEST(DecoderBufferTest, FromSharedMemoryRegion) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); auto mapping_region = base::ReadOnlySharedMemoryRegion::Create(kDataSize); ASSERT_TRUE(mapping_region.IsValid()); @@ -155,7 +154,7 @@ TEST(DecoderBufferTest, FromSharedMemoryRegion_Unaligned) { const uint8_t kData[] = "XXXhello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); const off_t kDataOffset = 3; auto mapping_region = base::ReadOnlySharedMemoryRegion::Create(kDataSize); @@ -175,7 +174,7 @@ TEST(DecoderBufferTest, FromSharedMemoryRegion_ZeroSize) { const uint8_t kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); auto mapping_region = base::ReadOnlySharedMemoryRegion::Create(kDataSize); memcpy(mapping_region.mapping.GetMemoryAs<uint8_t>(), kData, kDataSize); @@ -188,7 +187,7 @@ TEST(DecoderBufferTest, ReadingWriting) { const char kData[] = "hello"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> buffer(new DecoderBuffer(kDataSize)); ASSERT_TRUE(buffer.get());
diff --git a/media/base/fake_demuxer_stream.cc b/media/base/fake_demuxer_stream.cc index 771795de..d6020cad 100644 --- a/media/base/fake_demuxer_stream.cc +++ b/media/base/fake_demuxer_stream.cc
@@ -5,14 +5,13 @@ #include "media/base/fake_demuxer_stream.h" #include <stdint.h> -#include <memory> +#include <memory> #include <vector> #include "base/bind.h" #include "base/callback_helpers.h" #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/notreached.h" #include "base/task/single_thread_task_runner.h" @@ -206,9 +205,8 @@ // TODO(xhwang): Output out-of-order buffers if needed. if (is_encrypted_) { buffer->set_decrypt_config(DecryptConfig::CreateCencConfig( - std::string(kKeyId, kKeyId + base::size(kKeyId)), - std::string(kIv, kIv + base::size(kIv)), - std::vector<SubsampleEntry>())); + std::string(kKeyId, kKeyId + std::size(kKeyId)), + std::string(kIv, kIv + std::size(kIv)), std::vector<SubsampleEntry>())); } buffer->set_timestamp(current_timestamp_); buffer->set_duration(duration_);
diff --git a/media/base/mime_util_unittest.cc b/media/base/mime_util_unittest.cc index 7ebc357..8137fbc 100644 --- a/media/base/mime_util_unittest.cc +++ b/media/base/mime_util_unittest.cc
@@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/base/mime_util.h" + #include <stddef.h> -#include "base/cxx17_backports.h" #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" #include "base/test/scoped_command_line.h" @@ -12,7 +13,6 @@ #include "media/base/audio_codecs.h" #include "media/base/media.h" #include "media/base/media_switches.h" -#include "media/base/mime_util.h" #include "media/base/mime_util_internal.h" #include "media/base/video_codecs.h" #include "media/base/video_color_space.h" @@ -53,8 +53,7 @@ bool single_value) { const bool kTestStates[] = {true, false}; if (test_all_values) - return std::vector<bool>(kTestStates, - kTestStates + base::size(kTestStates)); + return std::vector<bool>(kTestStates, kTestStates + std::size(kTestStates)); return std::vector<bool>(1, single_value); } @@ -212,7 +211,7 @@ {",", 2, {"", ""}, {"", ""}}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::vector<std::string> codecs_out; SplitCodecs(tests[i].original, &codecs_out);
diff --git a/media/base/seekable_buffer_unittest.cc b/media/base/seekable_buffer_unittest.cc index d1df6a3..df18af5 100644 --- a/media/base/seekable_buffer_unittest.cc +++ b/media/base/seekable_buffer_unittest.cc
@@ -9,7 +9,6 @@ #include <cstdlib> -#include "base/cxx17_backports.h" #include "base/time/time.h" #include "media/base/data_buffer.h" #include "media/base/timestamp_constants.h" @@ -337,7 +336,7 @@ scoped_refptr<DataBuffer> buffer = DataBuffer::CopyFrom(data_, kWriteSize); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { buffer->set_timestamp(base::Microseconds(tests[i].first_time_useconds)); buffer->set_duration(base::Microseconds(tests[i].duration_useconds)); buffer_.Append(buffer.get());
diff --git a/media/base/test_data_util.cc b/media/base/test_data_util.cc index 4940d4c..0858b67 100644 --- a/media/base/test_data_util.cc +++ b/media/base/test_data_util.cc
@@ -8,7 +8,6 @@ #include "base/check_op.h" #include "base/containers/flat_map.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/no_destructor.h" #include "base/numerics/safe_conversions.h" @@ -227,13 +226,13 @@ bool LookupTestKeyVector(const std::vector<uint8_t>& key_id, bool allow_rotation, std::vector<uint8_t>* key) { - std::vector<uint8_t> starting_key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> starting_key_id(kKeyId, kKeyId + std::size(kKeyId)); size_t rotate_limit = allow_rotation ? starting_key_id.size() : 1; for (size_t pos = 0; pos < rotate_limit; ++pos) { std::rotate(starting_key_id.begin(), starting_key_id.begin() + pos, starting_key_id.end()); if (key_id == starting_key_id) { - key->assign(kSecretKey, kSecretKey + base::size(kSecretKey)); + key->assign(kSecretKey, kSecretKey + std::size(kSecretKey)); std::rotate(key->begin(), key->begin() + pos, key->end()); return true; }
diff --git a/media/base/unaligned_shared_memory_unittest.cc b/media/base/unaligned_shared_memory_unittest.cc index 1e79bb2..9d553cb 100644 --- a/media/base/unaligned_shared_memory_unittest.cc +++ b/media/base/unaligned_shared_memory_unittest.cc
@@ -9,7 +9,6 @@ #include <limits> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -17,11 +16,11 @@ namespace { const uint8_t kUnalignedData[] = "XXXhello"; -const size_t kUnalignedDataSize = base::size(kUnalignedData); +const size_t kUnalignedDataSize = std::size(kUnalignedData); const off_t kUnalignedOffset = 3; const uint8_t kData[] = "hello"; -const size_t kDataSize = base::size(kData); +const size_t kDataSize = std::size(kData); base::UnsafeSharedMemoryRegion CreateRegion(const uint8_t* data, size_t size) { auto region = base::UnsafeSharedMemoryRegion::Create(size);
diff --git a/media/base/video_frame.cc b/media/base/video_frame.cc index 9a4dab2a..153518d 100644 --- a/media/base/video_frame.cc +++ b/media/base/video_frame.cc
@@ -12,7 +12,6 @@ #include "base/atomic_sequence_num.h" #include "base/bind.h" #include "base/bits.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/process/memory.h" #include "base/strings/string_piece.h" @@ -1064,12 +1063,12 @@ case PIXEL_FORMAT_NV12: case PIXEL_FORMAT_NV21: { static const int bytes_per_element[] = {1, 2}; - DCHECK_LT(plane, base::size(bytes_per_element)); + DCHECK_LT(plane, std::size(bytes_per_element)); return bytes_per_element[plane]; } case PIXEL_FORMAT_P016LE: { static const int bytes_per_element[] = {1, 2}; - DCHECK_LT(plane, base::size(bytes_per_element)); + DCHECK_LT(plane, std::size(bytes_per_element)); return bytes_per_element[plane] * 2; } case PIXEL_FORMAT_YV12:
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc index bf5ba94..f4b7851 100644 --- a/media/base/video_frame_unittest.cc +++ b/media/base/video_frame_unittest.cc
@@ -6,11 +6,11 @@ #include <stddef.h> #include <stdint.h> + #include <memory> #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/memory/aligned_memory.h" #include "base/memory/unsafe_shared_memory_region.h" @@ -340,15 +340,15 @@ // Test frames themselves. uint8_t* y_plane = frame->data(VideoFrame::kYPlane); for (int y = 0; y < frame->coded_size().height(); ++y) { - EXPECT_EQ(0, memcmp(kExpectedYRow, y_plane, base::size(kExpectedYRow))); + EXPECT_EQ(0, memcmp(kExpectedYRow, y_plane, std::size(kExpectedYRow))); y_plane += frame->stride(VideoFrame::kYPlane); } uint8_t* u_plane = frame->data(VideoFrame::kUPlane); uint8_t* v_plane = frame->data(VideoFrame::kVPlane); for (int y = 0; y < frame->coded_size().height() / 2; ++y) { - EXPECT_EQ(0, memcmp(kExpectedUVRow, u_plane, base::size(kExpectedUVRow))); - EXPECT_EQ(0, memcmp(kExpectedUVRow, v_plane, base::size(kExpectedUVRow))); + EXPECT_EQ(0, memcmp(kExpectedUVRow, u_plane, std::size(kExpectedUVRow))); + EXPECT_EQ(0, memcmp(kExpectedUVRow, v_plane, std::size(kExpectedUVRow))); u_plane += frame->stride(VideoFrame::kUPlane); v_plane += frame->stride(VideoFrame::kVPlane); }
diff --git a/media/capture/content/capture_resolution_chooser_unittest.cc b/media/capture/content/capture_resolution_chooser_unittest.cc index 55ae447..3d249068 100644 --- a/media/capture/content/capture_resolution_chooser_unittest.cc +++ b/media/capture/content/capture_resolution_chooser_unittest.cc
@@ -6,7 +6,6 @@ #include <stddef.h> -#include "base/cxx17_backports.h" #include "base/location.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/size.h" @@ -88,7 +87,7 @@ // Test the "find Nth lower size" logic. for (size_t skips = 1; skips < 4; ++skips) { - for (size_t i = skips; i < base::size(kSizes); ++i) { + for (size_t i = skips; i < std::size(kSizes); ++i) { EXPECT_EQ( gfx::Size(kSizes[i][0], kSizes[i][1]), chooser->FindSmallerFrameSize( @@ -99,7 +98,7 @@ // Test the "find Nth higher size" logic. for (size_t skips = 1; skips < 4; ++skips) { - for (size_t i = skips; i < base::size(kSizes); ++i) { + for (size_t i = skips; i < std::size(kSizes); ++i) { EXPECT_EQ(gfx::Size(kSizes[i - skips][0], kSizes[i - skips][1]), chooser->FindLargerFrameSize( gfx::Size(kSizes[i][0], kSizes[i][1]).GetArea(), skips)); @@ -107,7 +106,7 @@ } // Test the "find nearest size" logic. - for (size_t i = 1; i < base::size(kSizes) - 1; ++i) { + for (size_t i = 1; i < std::size(kSizes) - 1; ++i) { const gfx::Size size(kSizes[i][0], kSizes[i][1]); const int a_somewhat_smaller_area = gfx::Size((kSizes[i - 1][0] + 3 * kSizes[i][0]) / 4,
diff --git a/media/capture/content/smooth_event_sampler_unittest.cc b/media/capture/content/smooth_event_sampler_unittest.cc index fcc94b6..ee233e85 100644 --- a/media/capture/content/smooth_event_sampler_unittest.cc +++ b/media/capture/content/smooth_event_sampler_unittest.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include <stdint.h> -#include "base/cxx17_backports.h" #include "base/strings/stringprintf.h" #include "testing/gtest/include/gtest/gtest.h" @@ -368,8 +367,7 @@ {false, 0}}; SmoothEventSampler sampler(base::Seconds(1) / 30); - ReplayCheckingSamplerDecisions(data_points, base::size(data_points), - &sampler); + ReplayCheckingSamplerDecisions(data_points, std::size(data_points), &sampler); } TEST(SmoothEventSamplerTest, DrawingAt30FpsWith60HzVsyncSampledAt30Hertz) { @@ -478,8 +476,7 @@ {true, 33.44}}; SmoothEventSampler sampler(base::Seconds(1) / 30); - ReplayCheckingSamplerDecisions(data_points, base::size(data_points), - &sampler); + ReplayCheckingSamplerDecisions(data_points, std::size(data_points), &sampler); } TEST(SmoothEventSamplerTest, DrawingAt60FpsWith60HzVsyncSampledAt30Hertz) { @@ -612,8 +609,7 @@ {true, 50.16}}; SmoothEventSampler sampler(base::Seconds(1) / 30); - ReplayCheckingSamplerDecisions(data_points, base::size(data_points), - &sampler); + ReplayCheckingSamplerDecisions(data_points, std::size(data_points), &sampler); } } // namespace media
diff --git a/media/capture/video/chromeos/camera_hal_dispatcher_impl.cc b/media/capture/video/chromeos/camera_hal_dispatcher_impl.cc index 3a3ca47..16ab609 100644 --- a/media/capture/video/chromeos/camera_hal_dispatcher_impl.cc +++ b/media/capture/video/chromeos/camera_hal_dispatcher_impl.cc
@@ -14,7 +14,6 @@ #include "base/bind.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -74,7 +73,7 @@ {raw_cancel_fd, POLLIN, 0}, }; - if (HANDLE_EINTR(poll(fds, base::size(fds), -1)) <= 0) { + if (HANDLE_EINTR(poll(fds, std::size(fds), -1)) <= 0) { PLOG(ERROR) << "poll()"; return false; }
diff --git a/media/capture/video/linux/v4l2_capture_delegate.cc b/media/capture/video/linux/v4l2_capture_delegate.cc index 3a0ef10..7b1575de 100644 --- a/media/capture/video/linux/v4l2_capture_delegate.cc +++ b/media/capture/video/linux/v4l2_capture_delegate.cc
@@ -219,7 +219,7 @@ std::vector<uint32_t> V4L2CaptureDelegate::GetListOfUsableFourCcs( bool prefer_mjpeg) { std::vector<uint32_t> supported_formats; - supported_formats.reserve(base::size(kSupportedFormatsAndPlanarity)); + supported_formats.reserve(std::size(kSupportedFormatsAndPlanarity)); // Duplicate MJPEG on top of the list depending on |prefer_mjpeg|. if (prefer_mjpeg)
diff --git a/media/capture/video/mac/video_capture_device_factory_mac.mm b/media/capture/video/mac/video_capture_device_factory_mac.mm index b475552..b3501b8 100644 --- a/media/capture/video/mac/video_capture_device_factory_mac.mm +++ b/media/capture/video/mac/video_capture_device_factory_mac.mm
@@ -11,7 +11,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/strings/string_util.h" #include "base/strings/sys_string_conversions.h" @@ -84,7 +83,7 @@ static bool IsDeviceBlocked(const VideoCaptureDeviceDescriptor& descriptor) { bool is_device_blocked = false; for (size_t i = 0; - !is_device_blocked && i < base::size(kBlockedCamerasIdSignature); ++i) { + !is_device_blocked && i < std::size(kBlockedCamerasIdSignature); ++i) { is_device_blocked = base::EndsWith(descriptor.device_id, kBlockedCamerasIdSignature[i], base::CompareCase::INSENSITIVE_ASCII);
diff --git a/media/capture/video/video_capture_device.cc b/media/capture/video/video_capture_device.cc index 6c380aa..3539a747 100644 --- a/media/capture/video/video_capture_device.cc +++ b/media/capture/video/video_capture_device.cc
@@ -6,7 +6,6 @@ #include "base/callback.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/i18n/timezone.h" #include "base/strings/string_util.h" #include "base/token.h" @@ -90,7 +89,7 @@ "KN", "KR", "KY", "MS", "MX", "NI", "PA", "PE", "PF", "PH", "PR", "PW", "SA", "SR", "SV", "TT", "TW", "UM", "US", "VG", "VI", "VE"}; const char** countries_using_60Hz_end = - countries_using_60Hz + base::size(countries_using_60Hz); + countries_using_60Hz + std::size(countries_using_60Hz); if (std::find(countries_using_60Hz, countries_using_60Hz_end, current_country) == countries_using_60Hz_end) { return PowerLineFrequency::FREQUENCY_50HZ;
diff --git a/media/capture/video/win/video_capture_device_factory_win.cc b/media/capture/video/win/video_capture_device_factory_win.cc index 2075bd6..62f3247 100644 --- a/media/capture/video/win/video_capture_device_factory_win.cc +++ b/media/capture/video/win/video_capture_device_factory_win.cc
@@ -18,7 +18,6 @@ #include "base/bind.h" #include "base/command_line.h" #include "base/containers/contains.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/metrics/histogram_macros.h" #include "base/no_destructor.h" @@ -98,7 +97,7 @@ "CyberLink Webcam Splitter", "EpocCam", }; -static_assert(base::size(kBlockedCameraNames) == BLOCKED_CAMERA_MAX + 1, +static_assert(std::size(kBlockedCameraNames) == BLOCKED_CAMERA_MAX + 1, "kBlockedCameraNames should be same size as " "BlockedCameraNames enum"); @@ -190,7 +189,7 @@ for (const wchar_t* kMfDLL : kMfDLLs) { wchar_t path[MAX_PATH] = {0}; - ExpandEnvironmentStringsW(kMfDLL, path, base::size(path)); + ExpandEnvironmentStringsW(kMfDLL, path, std::size(path)); if (!LoadLibraryExW(path, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH)) return false; } @@ -222,8 +221,8 @@ bool IsDeviceBlocked(const std::string& name) { DCHECK_EQ(BLOCKED_CAMERA_MAX + 1, - static_cast<int>(base::size(kBlockedCameraNames))); - for (size_t i = 0; i < base::size(kBlockedCameraNames); ++i) { + static_cast<int>(std::size(kBlockedCameraNames))); + for (size_t i = 0; i < std::size(kBlockedCameraNames); ++i) { if (base::StartsWith(name, kBlockedCameraNames[i], base::CompareCase::INSENSITIVE_ASCII)) { DVLOG(1) << "Enumerated blocked device: " << name;
diff --git a/media/capture/video/win/video_capture_device_mf_win.cc b/media/capture/video/win/video_capture_device_mf_win.cc index 45e7a285..8021373 100644 --- a/media/capture/video/win/video_capture_device_mf_win.cc +++ b/media/capture/video/win/video_capture_device_mf_win.cc
@@ -1853,7 +1853,7 @@ } DWORD wait_result = - ::WaitForMultipleObjects(base::size(events), events, FALSE, INFINITE); + ::WaitForMultipleObjects(std::size(events), events, FALSE, INFINITE); switch (wait_result) { case WAIT_OBJECT_0: break;
diff --git a/media/capture/video_capture_types.cc b/media/capture/video_capture_types.cc index da8e8a046..40a8db0 100644 --- a/media/capture/video_capture_types.cc +++ b/media/capture/video_capture_types.cc
@@ -5,7 +5,6 @@ #include "media/capture/video_capture_types.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/strings/stringprintf.h" #include "media/base/limits.h" @@ -54,11 +53,11 @@ const VideoPixelFormat& rhs) { auto* format_lhs = std::find( kSupportedCapturePixelFormats, - kSupportedCapturePixelFormats + base::size(kSupportedCapturePixelFormats), + kSupportedCapturePixelFormats + std::size(kSupportedCapturePixelFormats), lhs); auto* format_rhs = std::find( kSupportedCapturePixelFormats, - kSupportedCapturePixelFormats + base::size(kSupportedCapturePixelFormats), + kSupportedCapturePixelFormats + std::size(kSupportedCapturePixelFormats), rhs); return format_lhs < format_rhs; }
diff --git a/media/cast/net/cast_transport_config.h b/media/cast/net/cast_transport_config.h index 5e7ab64..7cf158b7c 100644 --- a/media/cast/net/cast_transport_config.h +++ b/media/cast/net/cast_transport_config.h
@@ -68,10 +68,10 @@ // Convenience accessors to data as an array of uint8_t elements. const uint8_t* bytes() const { - return reinterpret_cast<const uint8_t*>(base::data(data)); + return reinterpret_cast<const uint8_t*>(std::data(data)); } uint8_t* mutable_bytes() { - return reinterpret_cast<uint8_t*>(base::data(data)); + return reinterpret_cast<uint8_t*>(std::data(data)); } // Copies all data members except |data| to |dest|.
diff --git a/media/cast/sender/audio_encoder.cc b/media/cast/sender/audio_encoder.cc index 4f808fcfb..8f3d4da 100644 --- a/media/cast/sender/audio_encoder.cc +++ b/media/cast/sender/audio_encoder.cc
@@ -293,7 +293,7 @@ out->resize(kOpusMaxPayloadSize); const opus_int32 result = opus_encode_float( opus_encoder_, buffer_.get(), samples_per_frame_, - reinterpret_cast<uint8_t*>(base::data(*out)), kOpusMaxPayloadSize); + reinterpret_cast<uint8_t*>(std::data(*out)), kOpusMaxPayloadSize); if (result > 1) { out->resize(result); return true;
diff --git a/media/cast/sender/audio_encoder_unittest.cc b/media/cast/sender/audio_encoder_unittest.cc index 5071f33..1622735 100644 --- a/media/cast/sender/audio_encoder_unittest.cc +++ b/media/cast/sender/audio_encoder_unittest.cc
@@ -13,7 +13,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "build/build_config.h" #include "media/base/audio_bus.h" @@ -231,26 +230,26 @@ AudioEncoderTestScenarios, AudioEncoderTest, ::testing::Values( - TestScenario(kOneCall_3Millis, base::size(kOneCall_3Millis)), - TestScenario(kOneCall_10Millis, base::size(kOneCall_10Millis)), - TestScenario(kOneCall_13Millis, base::size(kOneCall_13Millis)), - TestScenario(kOneCall_20Millis, base::size(kOneCall_20Millis)), - TestScenario(kTwoCalls_3Millis, base::size(kTwoCalls_3Millis)), - TestScenario(kTwoCalls_10Millis, base::size(kTwoCalls_10Millis)), - TestScenario(kTwoCalls_Mixed1, base::size(kTwoCalls_Mixed1)), - TestScenario(kTwoCalls_Mixed2, base::size(kTwoCalls_Mixed2)), - TestScenario(kTwoCalls_Mixed3, base::size(kTwoCalls_Mixed3)), - TestScenario(kTwoCalls_Mixed4, base::size(kTwoCalls_Mixed4)), - TestScenario(kManyCalls_3Millis, base::size(kManyCalls_3Millis)), - TestScenario(kManyCalls_10Millis, base::size(kManyCalls_10Millis)), - TestScenario(kManyCalls_Mixed1, base::size(kManyCalls_Mixed1)), - TestScenario(kManyCalls_Mixed2, base::size(kManyCalls_Mixed2)), - TestScenario(kManyCalls_Mixed3, base::size(kManyCalls_Mixed3)), - TestScenario(kManyCalls_Mixed4, base::size(kManyCalls_Mixed4)), - TestScenario(kManyCalls_Mixed5, base::size(kManyCalls_Mixed5)), - TestScenario(kOneBigUnderrun, base::size(kOneBigUnderrun)), - TestScenario(kTwoBigUnderruns, base::size(kTwoBigUnderruns)), - TestScenario(kMixedUnderruns, base::size(kMixedUnderruns)))); + TestScenario(kOneCall_3Millis, std::size(kOneCall_3Millis)), + TestScenario(kOneCall_10Millis, std::size(kOneCall_10Millis)), + TestScenario(kOneCall_13Millis, std::size(kOneCall_13Millis)), + TestScenario(kOneCall_20Millis, std::size(kOneCall_20Millis)), + TestScenario(kTwoCalls_3Millis, std::size(kTwoCalls_3Millis)), + TestScenario(kTwoCalls_10Millis, std::size(kTwoCalls_10Millis)), + TestScenario(kTwoCalls_Mixed1, std::size(kTwoCalls_Mixed1)), + TestScenario(kTwoCalls_Mixed2, std::size(kTwoCalls_Mixed2)), + TestScenario(kTwoCalls_Mixed3, std::size(kTwoCalls_Mixed3)), + TestScenario(kTwoCalls_Mixed4, std::size(kTwoCalls_Mixed4)), + TestScenario(kManyCalls_3Millis, std::size(kManyCalls_3Millis)), + TestScenario(kManyCalls_10Millis, std::size(kManyCalls_10Millis)), + TestScenario(kManyCalls_Mixed1, std::size(kManyCalls_Mixed1)), + TestScenario(kManyCalls_Mixed2, std::size(kManyCalls_Mixed2)), + TestScenario(kManyCalls_Mixed3, std::size(kManyCalls_Mixed3)), + TestScenario(kManyCalls_Mixed4, std::size(kManyCalls_Mixed4)), + TestScenario(kManyCalls_Mixed5, std::size(kManyCalls_Mixed5)), + TestScenario(kOneBigUnderrun, std::size(kOneBigUnderrun)), + TestScenario(kTwoBigUnderruns, std::size(kTwoBigUnderruns)), + TestScenario(kMixedUnderruns, std::size(kMixedUnderruns)))); } // namespace cast } // namespace media
diff --git a/media/cast/sender/h264_vt_encoder.cc b/media/cast/sender/h264_vt_encoder.cc index 8f61fa4..ce2ed68c 100644 --- a/media/cast/sender/h264_vt_encoder.cc +++ b/media/cast/sender/h264_vt_encoder.cc
@@ -13,7 +13,6 @@ #include "base/big_endian.h" #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/logging.h" #include "base/power_monitor/power_monitor.h" @@ -234,14 +233,14 @@ CFTypeRef buffer_attributes_keys[] = {kCVPixelBufferPixelFormatTypeKey, kCVBufferPropagatedAttachmentsKey}; CFTypeRef buffer_attributes_values[] = { - video_toolbox::ArrayWithIntegers(format, base::size(format)).release(), + video_toolbox::ArrayWithIntegers(format, std::size(format)).release(), video_toolbox::DictionaryWithKeysAndValues( - attachments_keys, attachments_values, base::size(attachments_keys)) + attachments_keys, attachments_values, std::size(attachments_keys)) .release()}; const base::ScopedCFTypeRef<CFDictionaryRef> buffer_attributes = video_toolbox::DictionaryWithKeysAndValues( buffer_attributes_keys, buffer_attributes_values, - base::size(buffer_attributes_keys)); + std::size(buffer_attributes_keys)); for (auto* v : buffer_attributes_values) CFRelease(v);
diff --git a/media/cast/test/receiver/audio_decoder_unittest.cc b/media/cast/test/receiver/audio_decoder_unittest.cc index 987fbbcc..11c8705 100644 --- a/media/cast/test/receiver/audio_decoder_unittest.cc +++ b/media/cast/test/receiver/audio_decoder_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/cast/test/receiver/audio_decoder.h" + #include <stddef.h> #include <stdint.h> @@ -9,14 +11,12 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/synchronization/condition_variable.h" #include "base/synchronization/lock.h" #include "base/sys_byteorder.h" #include "base/time/time.h" #include "build/build_config.h" #include "media/cast/cast_config.h" -#include "media/cast/test/receiver/audio_decoder.h" #include "media/cast/test/utility/audio_utility.h" #include "media/cast/test/utility/standalone_cast_environment.h" #include "testing/gtest/include/gtest/gtest.h" @@ -205,7 +205,7 @@ const int kFrameDurationMs[] = {5, 10, 20, 40, 60}; const int kNumFrames = 10; - for (size_t i = 0; i < base::size(kFrameDurationMs); ++i) + for (size_t i = 0; i < std::size(kFrameDurationMs); ++i) for (int j = 0; j < kNumFrames; ++j) FeedMoreAudio(base::Milliseconds(kFrameDurationMs[i]), 0); WaitForAllAudioToBeDecoded();
diff --git a/media/cdm/aes_cbc_crypto_unittest.cc b/media/cdm/aes_cbc_crypto_unittest.cc index ff316ef..ea3ea46 100644 --- a/media/cdm/aes_cbc_crypto_unittest.cc +++ b/media/cdm/aes_cbc_crypto_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "crypto/encryptor.h" #include "crypto/symmetric_key.h" #include "media/base/decoder_buffer.h" @@ -29,19 +28,19 @@ // Keys and IV have to be 128 bits. const uint8_t kKey1[] = {0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13}; -static_assert(base::size(kKey1) == 128 / 8, "kKey1 must be 128 bits"); +static_assert(std::size(kKey1) == 128 / 8, "kKey1 must be 128 bits"); const uint8_t kKey2[] = {0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b}; -static_assert(base::size(kKey2) == 128 / 8, "kKey2 must be 128 bits"); +static_assert(std::size(kKey2) == 128 / 8, "kKey2 must be 128 bits"); const uint8_t kIv[] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -static_assert(base::size(kIv) == 128 / 8, "kIv must be 128 bits"); +static_assert(std::size(kIv) == 128 / 8, "kIv must be 128 bits"); const uint8_t kOneBlock[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'}; -static_assert(base::size(kOneBlock) == kBlockSize, "kOneBlock not block sized"); +static_assert(std::size(kOneBlock) == kBlockSize, "kOneBlock not block sized"); std::string MakeString(const std::vector<uint8_t>& chars) { return std::string(chars.begin(), chars.end());
diff --git a/media/cdm/aes_decryptor_unittest.cc b/media/cdm/aes_decryptor_unittest.cc index 7527a3ca..9c7ed0c 100644 --- a/media/cdm/aes_decryptor_unittest.cc +++ b/media/cdm/aes_decryptor_unittest.cc
@@ -5,13 +5,13 @@ #include "media/cdm/aes_decryptor.h" #include <stdint.h> + #include <memory> #include <set> #include <string> #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/debug/leak_annotations.h" #include "base/json/json_reader.h" #include "base/memory/raw_ptr.h" @@ -237,15 +237,15 @@ AesDecryptorTest() : original_data_(kOriginalData, kOriginalData + kOriginalDataSize), encrypted_data_(kEncryptedData, - kEncryptedData + base::size(kEncryptedData)), + kEncryptedData + std::size(kEncryptedData)), subsample_encrypted_data_( kSubsampleEncryptedData, - kSubsampleEncryptedData + base::size(kSubsampleEncryptedData)), - key_id_(kKeyId, kKeyId + base::size(kKeyId)), - iv_(kIv, kIv + base::size(kIv)), + kSubsampleEncryptedData + std::size(kSubsampleEncryptedData)), + key_id_(kKeyId, kKeyId + std::size(kKeyId)), + iv_(kIv, kIv + std::size(kIv)), normal_subsample_entries_( kSubsampleEntriesNormal, - kSubsampleEntriesNormal + base::size(kSubsampleEntriesNormal)) {} + kSubsampleEntriesNormal + std::size(kSubsampleEntriesNormal)) {} MOCK_METHOD2(BufferDecrypted, void(Decryptor::Status, scoped_refptr<DecoderBuffer>)); @@ -592,7 +592,7 @@ EXPECT_CALL(cdm_client_, OnSessionMessage(NotEmpty(), _, IsJSONDictionary())); cdm_->CreateSessionAndGenerateRequest( CdmSessionType::kTemporary, EmeInitDataType::CENC, - std::vector<uint8_t>(init_data, init_data + base::size(init_data)), + std::vector<uint8_t>(init_data, init_data + std::size(init_data)), CreateSessionPromise(RESOLVED)); } @@ -603,7 +603,7 @@ EXPECT_CALL(cdm_client_, OnSessionMessage(NotEmpty(), _, IsJSONDictionary())); cdm_->CreateSessionAndGenerateRequest( CdmSessionType::kTemporary, EmeInitDataType::KEYIDS, - std::vector<uint8_t>(init_data, init_data + base::size(init_data) - 1), + std::vector<uint8_t>(init_data, init_data + std::size(init_data) - 1), CreateSessionPromise(RESOLVED)); } @@ -675,14 +675,14 @@ // The second key is also available. encrypted_buffer = CreateEncryptedBuffer( std::vector<uint8_t>(kEncryptedData2, - kEncryptedData2 + base::size(kEncryptedData2)), - std::vector<uint8_t>(kKeyId2, kKeyId2 + base::size(kKeyId2)), - std::vector<uint8_t>(kIv2, kIv2 + base::size(kIv2)), + kEncryptedData2 + std::size(kEncryptedData2)), + std::vector<uint8_t>(kKeyId2, kKeyId2 + std::size(kKeyId2)), + std::vector<uint8_t>(kIv2, kIv2 + std::size(kIv2)), no_subsample_entries_); ASSERT_NO_FATAL_FAILURE(DecryptAndExpect( encrypted_buffer, std::vector<uint8_t>(kOriginalData2, - kOriginalData2 + base::size(kOriginalData2) - 1), + kOriginalData2 + std::size(kOriginalData2) - 1), SUCCESS)); } @@ -744,7 +744,7 @@ std::vector<SubsampleEntry> subsample_entries_wrong_size( kSubsampleEntriesWrongSize, - kSubsampleEntriesWrongSize + base::size(kSubsampleEntriesWrongSize)); + kSubsampleEntriesWrongSize + std::size(kSubsampleEntriesWrongSize)); scoped_refptr<DecoderBuffer> encrypted_buffer = CreateEncryptedBuffer( subsample_encrypted_data_, key_id_, iv_, subsample_entries_wrong_size); @@ -758,7 +758,7 @@ std::vector<SubsampleEntry> subsample_entries_invalid_total_size( kSubsampleEntriesInvalidTotalSize, kSubsampleEntriesInvalidTotalSize + - base::size(kSubsampleEntriesInvalidTotalSize)); + std::size(kSubsampleEntriesInvalidTotalSize)); scoped_refptr<DecoderBuffer> encrypted_buffer = CreateEncryptedBuffer(subsample_encrypted_data_, key_id_, iv_, @@ -773,7 +773,7 @@ std::vector<SubsampleEntry> clear_only_subsample_entries( kSubsampleEntriesClearOnly, - kSubsampleEntriesClearOnly + base::size(kSubsampleEntriesClearOnly)); + kSubsampleEntriesClearOnly + std::size(kSubsampleEntriesClearOnly)); scoped_refptr<DecoderBuffer> encrypted_buffer = CreateEncryptedBuffer( original_data_, key_id_, iv_, clear_only_subsample_entries); @@ -787,7 +787,7 @@ std::vector<SubsampleEntry> cypher_only_subsample_entries( kSubsampleEntriesCypherOnly, - kSubsampleEntriesCypherOnly + base::size(kSubsampleEntriesCypherOnly)); + kSubsampleEntriesCypherOnly + std::size(kSubsampleEntriesCypherOnly)); scoped_refptr<DecoderBuffer> encrypted_buffer = CreateEncryptedBuffer( encrypted_data_, key_id_, iv_, cypher_only_subsample_entries); @@ -1034,8 +1034,8 @@ } TEST_P(AesDecryptorTest, GetKeyIds) { - std::vector<uint8_t> key_id1(kKeyId, kKeyId + base::size(kKeyId)); - std::vector<uint8_t> key_id2(kKeyId2, kKeyId2 + base::size(kKeyId2)); + std::vector<uint8_t> key_id1(kKeyId, kKeyId + std::size(kKeyId)); + std::vector<uint8_t> key_id2(kKeyId2, kKeyId2 + std::size(kKeyId2)); std::string session_id = CreateSession(key_id_); EXPECT_FALSE(KeysInfoContains(key_id1)); @@ -1053,7 +1053,7 @@ } TEST_P(AesDecryptorTest, NoKeysChangeForSameKey) { - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); std::string session_id = CreateSession(key_id_); EXPECT_FALSE(KeysInfoContains(key_id)); @@ -1072,7 +1072,7 @@ } TEST_P(AesDecryptorTest, RandomSessionIDs) { - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); const size_t kNumIterations = 25; std::set<std::string> seen_sessions;
diff --git a/media/cdm/cbcs_decryptor_unittest.cc b/media/cdm/cbcs_decryptor_unittest.cc index b37fb3f6..97d7757 100644 --- a/media/cdm/cbcs_decryptor_unittest.cc +++ b/media/cdm/cbcs_decryptor_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/time/time.h" #include "crypto/encryptor.h" #include "crypto/symmetric_key.h" @@ -39,7 +38,7 @@ 'm', 'n', 'o', 'p'}; const std::array<uint8_t, 6> kPartialBlock = {'a', 'b', 'c', 'd', 'e', 'f'}; -static_assert(base::size(kPartialBlock) != kBlockSize, "kPartialBlock wrong"); +static_assert(std::size(kPartialBlock) != kBlockSize, "kPartialBlock wrong"); std::string MakeString(const std::vector<uint8_t>& chars) { return std::string(chars.begin(), chars.end()); @@ -274,7 +273,7 @@ // Use a different key for decryption. Call should succeed, but return // something other than the original data. std::unique_ptr<crypto::SymmetricKey> bad_key = crypto::SymmetricKey::Import( - crypto::SymmetricKey::AES, std::string(base::size(kKey), 'b')); + crypto::SymmetricKey::AES, std::string(std::size(kKey), 'b')); auto encrypted_buffer = CreateEncryptedBuffer( encrypted_block, iv_, subsamples, EncryptionPattern(1, 0)); EXPECT_NE(one_block_, DecryptWithKey(encrypted_buffer, *bad_key));
diff --git a/media/cdm/cdm_adapter_unittest.cc b/media/cdm/cdm_adapter_unittest.cc index dfcf9c3..f73d981 100644 --- a/media/cdm/cdm_adapter_unittest.cc +++ b/media/cdm/cdm_adapter_unittest.cc
@@ -5,12 +5,12 @@ #include "media/cdm/cdm_adapter.h" #include <stdint.h> + #include <memory> #include "base/bind.h" #include "base/check.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" @@ -391,7 +391,7 @@ TEST_P(CdmAdapterTestWithClearKeyCdm, CreateWebmSession) { InitializeAndExpect(SUCCESS); - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); CreateSessionAndExpect(EmeInitDataType::WEBM, key_id, SUCCESS); } @@ -400,7 +400,7 @@ // Don't include the trailing /0 from the string in the data passed in. std::vector<uint8_t> key_id(kKeyIdAsJWK, - kKeyIdAsJWK + base::size(kKeyIdAsJWK) - 1); + kKeyIdAsJWK + std::size(kKeyIdAsJWK) - 1); CreateSessionAndExpect(EmeInitDataType::KEYIDS, key_id, SUCCESS); } @@ -408,7 +408,7 @@ InitializeAndExpect(SUCCESS); std::vector<uint8_t> key_id(kKeyIdAsPssh, - kKeyIdAsPssh + base::size(kKeyIdAsPssh)); + kKeyIdAsPssh + std::size(kKeyIdAsPssh)); CreateSessionAndExpect(EmeInitDataType::CENC, key_id, SUCCESS); } @@ -416,7 +416,7 @@ InitializeAndExpect(SUCCESS); // Use |kKeyId| but specify KEYIDS format. - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); CreateSessionAndExpect(EmeInitDataType::KEYIDS, key_id, FAILURE); } @@ -424,14 +424,14 @@ InitializeAndExpect(SUCCESS); // LoadSession() is not supported by AesDecryptor. - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); CreateSessionAndExpect(EmeInitDataType::KEYIDS, key_id, FAILURE); } TEST_P(CdmAdapterTestWithClearKeyCdm, UpdateSession) { InitializeAndExpect(SUCCESS); - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); CreateSessionAndExpect(EmeInitDataType::WEBM, key_id, SUCCESS); UpdateSessionAndExpect(SessionId(), kKeyAsJWK, SUCCESS, true); @@ -440,7 +440,7 @@ TEST_P(CdmAdapterTestWithClearKeyCdm, UpdateSessionWithBadData) { InitializeAndExpect(SUCCESS); - std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); CreateSessionAndExpect(EmeInitDataType::WEBM, key_id, SUCCESS); UpdateSessionAndExpect(SessionId(), "random data", FAILURE, true);
diff --git a/media/cdm/cenc_decryptor_unittest.cc b/media/cdm/cenc_decryptor_unittest.cc index 8e484f6d..3fdfc94 100644 --- a/media/cdm/cenc_decryptor_unittest.cc +++ b/media/cdm/cenc_decryptor_unittest.cc
@@ -11,7 +11,6 @@ #include <vector> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/time/time.h" #include "crypto/encryptor.h" #include "crypto/symmetric_key.h" @@ -26,11 +25,11 @@ // Keys and IVs have to be 128 bits. const uint8_t kKey[] = {0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13}; -static_assert(base::size(kKey) * 8 == 128, "kKey must be 128 bits"); +static_assert(std::size(kKey) * 8 == 128, "kKey must be 128 bits"); const uint8_t kIv[] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -static_assert(base::size(kIv) * 8 == 128, "kIv must be 128 bits"); +static_assert(std::size(kIv) * 8 == 128, "kIv must be 128 bits"); const uint8_t kOneBlock[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p'}; @@ -66,11 +65,11 @@ CencDecryptorTest() : key_(crypto::SymmetricKey::Import( crypto::SymmetricKey::AES, - std::string(kKey, kKey + base::size(kKey)))), - iv_(kIv, kIv + base::size(kIv)), - one_block_(kOneBlock, kOneBlock + base::size(kOneBlock)), + std::string(kKey, kKey + std::size(kKey)))), + iv_(kIv, kIv + std::size(kIv)), + one_block_(kOneBlock, kOneBlock + std::size(kOneBlock)), partial_block_(kPartialBlock, - kPartialBlock + base::size(kPartialBlock)) {} + kPartialBlock + std::size(kPartialBlock)) {} // Excrypt |original| using AES-CTR encryption with |key| and |iv|. std::vector<uint8_t> Encrypt(const std::vector<uint8_t>& original, @@ -208,7 +207,7 @@ TEST_F(CencDecryptorTest, InvalidKey) { std::unique_ptr<crypto::SymmetricKey> bad_key = crypto::SymmetricKey::Import( - crypto::SymmetricKey::AES, std::string(base::size(kKey), 'b')); + crypto::SymmetricKey::AES, std::string(std::size(kKey), 'b')); auto encrypted_block = Encrypt(one_block_, *key_, iv_); std::vector<SubsampleEntry> subsamples = {
diff --git a/media/cdm/cenc_utils.cc b/media/cdm/cenc_utils.cc index 126ce1f..d71fd11 100644 --- a/media/cdm/cenc_utils.cc +++ b/media/cdm/cenc_utils.cc
@@ -6,7 +6,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "media/base/media_util.h" #include "media/formats/mp4/box_definitions.h" #include "media/formats/mp4/box_reader.h" @@ -95,7 +94,7 @@ KeyIdList result; std::vector<uint8_t> common_system_id( kCencCommonSystemId, - kCencCommonSystemId + base::size(kCencCommonSystemId)); + kCencCommonSystemId + std::size(kCencCommonSystemId)); for (const auto& child : children) { if (child.system_id == common_system_id) { key_ids->assign(child.key_ids.begin(), child.key_ids.end());
diff --git a/media/cdm/cenc_utils_unittest.cc b/media/cdm/cenc_utils_unittest.cc index 07e24182..5874365 100644 --- a/media/cdm/cenc_utils_unittest.cc +++ b/media/cdm/cenc_utils_unittest.cc
@@ -10,7 +10,6 @@ #include <limits> #include "base/check.h" -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -39,13 +38,13 @@ class CencUtilsTest : public testing::Test { public: CencUtilsTest() - : key1_(kKey1Data, kKey1Data + base::size(kKey1Data)), - key2_(kKey2Data, kKey2Data + base::size(kKey2Data)), - key3_(kKey3Data, kKey3Data + base::size(kKey3Data)), - key4_(kKey4Data, kKey4Data + base::size(kKey4Data)), + : key1_(kKey1Data, kKey1Data + std::size(kKey1Data)), + key2_(kKey2Data, kKey2Data + std::size(kKey2Data)), + key3_(kKey3Data, kKey3Data + std::size(kKey3Data)), + key4_(kKey4Data, kKey4Data + std::size(kKey4Data)), common_system_system_id_( kCommonSystemSystemId, - kCommonSystemSystemId + base::size(kCommonSystemSystemId)) {} + kCommonSystemSystemId + std::size(kCommonSystemSystemId)) {} protected: // Initialize the start of the 'pssh' box (up to key_count) @@ -337,9 +336,9 @@ KeyIdList key_ids; EXPECT_TRUE( - ValidatePsshInput(std::vector<uint8_t>(data, data + base::size(data)))); + ValidatePsshInput(std::vector<uint8_t>(data, data + std::size(data)))); EXPECT_TRUE(GetKeyIdsForCommonSystemId( - std::vector<uint8_t>(data, data + base::size(data)), &key_ids)); + std::vector<uint8_t>(data, data + std::size(data)), &key_ids)); EXPECT_EQ(2u, key_ids.size()); } @@ -361,9 +360,9 @@ KeyIdList key_ids; EXPECT_TRUE( - ValidatePsshInput(std::vector<uint8_t>(data, data + base::size(data)))); + ValidatePsshInput(std::vector<uint8_t>(data, data + std::size(data)))); EXPECT_TRUE(GetKeyIdsForCommonSystemId( - std::vector<uint8_t>(data, data + base::size(data)), &key_ids)); + std::vector<uint8_t>(data, data + std::size(data)), &key_ids)); EXPECT_EQ(2u, key_ids.size()); } @@ -388,9 +387,9 @@ // These calls fail as the box size is huge (0xffffffffffffffff) and there // is not enough bytes in |data|. EXPECT_FALSE( - ValidatePsshInput(std::vector<uint8_t>(data, data + base::size(data)))); + ValidatePsshInput(std::vector<uint8_t>(data, data + std::size(data)))); EXPECT_FALSE(GetKeyIdsForCommonSystemId( - std::vector<uint8_t>(data, data + base::size(data)), &key_ids)); + std::vector<uint8_t>(data, data + std::size(data)), &key_ids)); } TEST_F(CencUtilsTest, GetPsshData_Version0) { @@ -401,7 +400,7 @@ EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(0u, pssh_data.size()); - std::vector<uint8_t> data(data_bytes, data_bytes + base::size(data_bytes)); + std::vector<uint8_t> data(data_bytes, data_bytes + std::size(data_bytes)); AppendData(box, data); EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(data, pssh_data); @@ -415,7 +414,7 @@ EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(0u, pssh_data.size()); - std::vector<uint8_t> data(data_bytes, data_bytes + base::size(data_bytes)); + std::vector<uint8_t> data(data_bytes, data_bytes + std::size(data_bytes)); AppendData(box, data); EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(data, pssh_data); @@ -429,7 +428,7 @@ EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(0u, pssh_data.size()); - std::vector<uint8_t> data(data_bytes, data_bytes + base::size(data_bytes)); + std::vector<uint8_t> data(data_bytes, data_bytes + std::size(data_bytes)); AppendData(box, data); EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); EXPECT_EQ(data, pssh_data); @@ -488,7 +487,7 @@ TEST_F(CencUtilsTest, GetPsshData_DifferentSystemID) { std::vector<uint8_t> unknown_system_id(kKey1Data, - kKey1Data + base::size(kKey1Data)); + kKey1Data + std::size(kKey1Data)); std::vector<uint8_t> pssh_data; std::vector<uint8_t> box = MakePSSHBox(1, Key1()); @@ -501,7 +500,7 @@ std::vector<uint8_t> pssh_data; std::vector<uint8_t> box = MakePSSHBox(1, Key1()); - std::vector<uint8_t> data(data_bytes, data_bytes + base::size(data_bytes)); + std::vector<uint8_t> data(data_bytes, data_bytes + std::size(data_bytes)); AppendData(box, data); EXPECT_TRUE(GetPsshData(box, CommonSystemSystemId(), &pssh_data)); @@ -517,13 +516,11 @@ std::vector<uint8_t> pssh_data; std::vector<uint8_t> box1 = MakePSSHBox(1, Key1()); - std::vector<uint8_t> data1(data1_bytes, - data1_bytes + base::size(data1_bytes)); + std::vector<uint8_t> data1(data1_bytes, data1_bytes + std::size(data1_bytes)); AppendData(box1, data1); std::vector<uint8_t> box2 = MakePSSHBox(0); - std::vector<uint8_t> data2(data2_bytes, - data2_bytes + base::size(data2_bytes)); + std::vector<uint8_t> data2(data2_bytes, data2_bytes + std::size(data2_bytes)); AppendData(box2, data2); box1.insert(box1.end(), box2.begin(), box2.end()); @@ -538,7 +535,7 @@ 0x00, 0x00, 0x00, 0x08, // size = 8 'p', 's', 's', 'g' }; - std::vector<uint8_t> non_pssh_box(data, data + base::size(data)); + std::vector<uint8_t> non_pssh_box(data, data + std::size(data)); EXPECT_FALSE(ValidatePsshInput(non_pssh_box)); // Make a valid 'pssh' box.
diff --git a/media/cdm/json_web_key_unittest.cc b/media/cdm/json_web_key_unittest.cc index ede6c89..ec386dda 100644 --- a/media/cdm/json_web_key_unittest.cc +++ b/media/cdm/json_web_key_unittest.cc
@@ -9,7 +9,6 @@ #include "base/base64.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "media/base/content_decryption_module.h" #include "testing/gtest/include/gtest/gtest.h" @@ -93,28 +92,28 @@ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}; EXPECT_EQ("{\"keys\":[{\"k\":\"AQI\",\"kid\":\"AQI\",\"kty\":\"oct\"}]}", - GenerateJWKSet(data1, base::size(data1), data1, base::size(data1))); + GenerateJWKSet(data1, std::size(data1), data1, std::size(data1))); EXPECT_EQ( "{\"keys\":[{\"k\":\"AQIDBA\",\"kid\":\"AQIDBA\",\"kty\":\"oct\"}]}", - GenerateJWKSet(data2, base::size(data2), data2, base::size(data2))); + GenerateJWKSet(data2, std::size(data2), data2, std::size(data2))); EXPECT_EQ("{\"keys\":[{\"k\":\"AQI\",\"kid\":\"AQIDBA\",\"kty\":\"oct\"}]}", - GenerateJWKSet(data1, base::size(data1), data2, base::size(data2))); + GenerateJWKSet(data1, std::size(data1), data2, std::size(data2))); EXPECT_EQ("{\"keys\":[{\"k\":\"AQIDBA\",\"kid\":\"AQI\",\"kty\":\"oct\"}]}", - GenerateJWKSet(data2, base::size(data2), data1, base::size(data1))); + GenerateJWKSet(data2, std::size(data2), data1, std::size(data1))); EXPECT_EQ( "{\"keys\":[{\"k\":\"AQIDBAUGBwgJCgsMDQ4PEA\",\"kid\":" "\"AQIDBAUGBwgJCgsMDQ4PEA\",\"kty\":\"oct\"}]}", - GenerateJWKSet(data3, base::size(data3), data3, base::size(data3))); + GenerateJWKSet(data3, std::size(data3), data3, std::size(data3))); KeyIdAndKeyPairs keys; keys.push_back( - MakeKeyIdAndKeyPair(data1, base::size(data1), data1, base::size(data1))); + MakeKeyIdAndKeyPair(data1, std::size(data1), data1, std::size(data1))); EXPECT_EQ( "{\"keys\":[{\"k\":\"AQI\",\"kid\":\"AQI\",\"kty\":\"oct\"}],\"type\":" "\"temporary\"}", GenerateJWKSet(keys, CdmSessionType::kTemporary)); keys.push_back( - MakeKeyIdAndKeyPair(data2, base::size(data2), data2, base::size(data2))); + MakeKeyIdAndKeyPair(data2, std::size(data2), data2, std::size(data2))); EXPECT_EQ( "{\"keys\":[{\"k\":\"AQI\",\"kid\":\"AQI\",\"kty\":\"oct\"},{\"k\":" "\"AQIDBA\",\"kid\":\"AQIDBA\",\"kty\":\"oct\"}],\"type\":\"persistent-" @@ -414,14 +413,14 @@ const uint8_t data3[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}; - CreateLicenseAndExpect(data1, base::size(data1), CdmSessionType::kTemporary, + CreateLicenseAndExpect(data1, std::size(data1), CdmSessionType::kTemporary, "{\"kids\":[\"AQI\"],\"type\":\"temporary\"}"); CreateLicenseAndExpect( - data1, base::size(data1), CdmSessionType::kPersistentLicense, + data1, std::size(data1), CdmSessionType::kPersistentLicense, "{\"kids\":[\"AQI\"],\"type\":\"persistent-license\"}"); - CreateLicenseAndExpect(data2, base::size(data2), CdmSessionType::kTemporary, + CreateLicenseAndExpect(data2, std::size(data2), CdmSessionType::kTemporary, "{\"kids\":[\"AQIDBA\"],\"type\":\"temporary\"}"); - CreateLicenseAndExpect(data3, base::size(data3), + CreateLicenseAndExpect(data3, std::size(data3), CdmSessionType::kPersistentLicense, "{\"kids\":[\"AQIDBAUGBwgJCgsMDQ4PEA\"],\"type\":" "\"persistent-license\"}"); @@ -434,13 +433,13 @@ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10}; ExtractKeyFromLicenseAndExpect("{\"kids\":[\"AQI\"],\"type\":\"temporary\"}", - true, data1, base::size(data1)); + true, data1, std::size(data1)); ExtractKeyFromLicenseAndExpect( "{\"kids\":[\"AQIDBA\"],\"type\":\"temporary\"}", true, data2, - base::size(data2)); + std::size(data2)); ExtractKeyFromLicenseAndExpect( "{\"kids\":[\"AQIDBAUGBwgJCgsMDQ4PEA\"],\"type\":\"persistent\"}", true, - data3, base::size(data3)); + data3, std::size(data3)); // Try some incorrect JSON. ExtractKeyFromLicenseAndExpect("", false, NULL, 0); @@ -470,7 +469,7 @@ // and is padded with = when converted to base64. std::string encoded_text; base::Base64Encode( - std::string(reinterpret_cast<const char*>(&data1[0]), base::size(data1)), + std::string(reinterpret_cast<const char*>(&data1[0]), std::size(data1)), &encoded_text); EXPECT_EQ(encoded_text, "+/37/fv9+w=="); EXPECT_NE(encoded_text.find('+'), std::string::npos); @@ -481,12 +480,12 @@ EXPECT_EQ(encoded_text.find('-'), std::string::npos); EXPECT_EQ(encoded_text.find('_'), std::string::npos); - CreateLicenseAndExpect(data1, base::size(data1), CdmSessionType::kTemporary, + CreateLicenseAndExpect(data1, std::size(data1), CdmSessionType::kTemporary, "{\"kids\":[\"-_37_fv9-w\"],\"type\":\"temporary\"}"); ExtractKeyFromLicenseAndExpect( "{\"kids\":[\"-_37_fv9-w\"],\"type\":\"temporary\"}", true, data1, - base::size(data1)); + std::size(data1)); } TEST_F(JSONWebKeyTest, MultipleKeys) { @@ -497,9 +496,9 @@ std::vector<uint8_t> result; KeyIdList key_ids; - key_ids.push_back(std::vector<uint8_t>(data1, data1 + base::size(data1))); - key_ids.push_back(std::vector<uint8_t>(data2, data2 + base::size(data2))); - key_ids.push_back(std::vector<uint8_t>(data3, data3 + base::size(data3))); + key_ids.push_back(std::vector<uint8_t>(data1, data1 + std::size(data1))); + key_ids.push_back(std::vector<uint8_t>(data2, data2 + std::size(data2))); + key_ids.push_back(std::vector<uint8_t>(data3, data3 + std::size(data3))); CreateLicenseRequest(key_ids, CdmSessionType::kTemporary, &result); std::string s(result.begin(), result.end()); EXPECT_EQ( @@ -521,16 +520,16 @@ &error_message)); EXPECT_EQ(1u, key_ids.size()); EXPECT_EQ(0u, error_message.length()); - VerifyKeyId(key_ids[0], data1, base::size(data1)); + VerifyKeyId(key_ids[0], data1, std::size(data1)); EXPECT_TRUE(ExtractKeyIdsFromKeyIdsInitData( "{\"kids\":[\"AQI\",\"AQIDBA\",\"AQIDBAUGBwgJCgsMDQ4PEA\"]}", &key_ids, &error_message)); EXPECT_EQ(3u, key_ids.size()); EXPECT_EQ(0u, error_message.length()); - VerifyKeyId(key_ids[0], data1, base::size(data1)); - VerifyKeyId(key_ids[1], data2, base::size(data2)); - VerifyKeyId(key_ids[2], data3, base::size(data3)); + VerifyKeyId(key_ids[0], data1, std::size(data1)); + VerifyKeyId(key_ids[1], data2, std::size(data2)); + VerifyKeyId(key_ids[2], data3, std::size(data3)); // Expect failure when non-ascii. EXPECT_FALSE(ExtractKeyIdsFromKeyIdsInitData( @@ -595,19 +594,19 @@ KeyIdList key_ids; std::string error_message; - key_ids.push_back(std::vector<uint8_t>(data1, data1 + base::size(data1))); + key_ids.push_back(std::vector<uint8_t>(data1, data1 + std::size(data1))); std::vector<uint8_t> init_data1; CreateKeyIdsInitData(key_ids, &init_data1); std::string result1(init_data1.begin(), init_data1.end()); EXPECT_EQ(result1, "{\"kids\":[\"AQI\"]}"); - key_ids.push_back(std::vector<uint8_t>(data2, data2 + base::size(data2))); + key_ids.push_back(std::vector<uint8_t>(data2, data2 + std::size(data2))); std::vector<uint8_t> init_data2; CreateKeyIdsInitData(key_ids, &init_data2); std::string result2(init_data2.begin(), init_data2.end()); EXPECT_EQ(result2, "{\"kids\":[\"AQI\",\"AQIDBA\"]}"); - key_ids.push_back(std::vector<uint8_t>(data3, data3 + base::size(data3))); + key_ids.push_back(std::vector<uint8_t>(data3, data3 + std::size(data3))); std::vector<uint8_t> init_data3; CreateKeyIdsInitData(key_ids, &init_data3); std::string result3(init_data3.begin(), init_data3.end());
diff --git a/media/cdm/library_cdm/clear_key_cdm/cdm_file_io_test.cc b/media/cdm/library_cdm/clear_key_cdm/cdm_file_io_test.cc index e8e510c..aaacfb1f 100644 --- a/media/cdm/library_cdm/clear_key_cdm/cdm_file_io_test.cc +++ b/media/cdm/library_cdm/clear_key_cdm/cdm_file_io_test.cc
@@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" @@ -18,13 +17,13 @@ const uint8_t kData[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}; -const uint32_t kDataSize = base::size(kData); +const uint32_t kDataSize = std::size(kData); const uint8_t kBigData[] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00}; -const uint32_t kBigDataSize = base::size(kBigData); +const uint32_t kBigDataSize = std::size(kBigData); // Must be > kReadSize in cdm_file_io_impl.cc. const uint32_t kLargeDataSize = 20 * 1024 + 7;
diff --git a/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc b/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc index b0fa39a..5461f983 100644 --- a/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc +++ b/media/cdm/library_cdm/clear_key_cdm/clear_key_cdm.cc
@@ -11,7 +11,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/logging.h" #include "base/memory/ptr_util.h" @@ -846,7 +845,7 @@ } const uint8_t kDummyKeyId[] = {'d', 'u', 'm', 'm', 'y'}; std::vector<cdm::KeyInformation> keys_vector = { - {kDummyKeyId, base::size(kDummyKeyId), key_status, 0}}; + {kDummyKeyId, std::size(kDummyKeyId), key_status, 0}}; cdm_host_proxy_->OnSessionKeysChange(last_session_id_.data(), last_session_id_.length(), false, keys_vector.data(), keys_vector.size());
diff --git a/media/device_monitors/system_message_window_win.cc b/media/device_monitors/system_message_window_win.cc index abaa604..df421bde 100644 --- a/media/device_monitors/system_message_window_win.cc +++ b/media/device_monitors/system_message_window_win.cc
@@ -9,7 +9,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/no_destructor.h" #include "base/system/system_monitor.h" @@ -43,7 +42,7 @@ DeviceNotifications() = delete; explicit DeviceNotifications(HWND hwnd) - : notifications_(base::size(GetDeviceCategoryToType())) { + : notifications_(std::size(GetDeviceCategoryToType())) { Register(hwnd); }
diff --git a/media/ffmpeg/ffmpeg_common_unittest.cc b/media/ffmpeg/ffmpeg_common_unittest.cc index 99ac712..e391f55 100644 --- a/media/ffmpeg/ffmpeg_common_unittest.cc +++ b/media/ffmpeg/ffmpeg_common_unittest.cc
@@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/ffmpeg/ffmpeg_common.h" + #include <stddef.h> #include <stdint.h> #include <cstring> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/files/memory_mapped_file.h" #include "base/logging.h" #include "media/base/audio_decoder_config.h" @@ -16,7 +17,6 @@ #include "media/base/media_util.h" #include "media/base/test_data_util.h" #include "media/base/video_decoder_config.h" -#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_glue.h" #include "media/filters/in_memory_url_protocol.h" #include "testing/gtest/include/gtest/gtest.h" @@ -53,7 +53,7 @@ // Valid combination: extra_data = non-nullptr && size > 0. codec_parameters->extradata = &kExtraData[0]; - codec_parameters->extradata_size = base::size(kExtraData); + codec_parameters->extradata_size = std::size(kExtraData); EXPECT_TRUE(converter_fn.Run(stream, decoder_config)); EXPECT_EQ(static_cast<size_t>(codec_parameters->extradata_size), decoder_config->extra_data().size()); @@ -198,7 +198,7 @@ {1, 2, 1, 500000, 1}, {1, 3, 1, 333333, 1}, {1, 3, 2, 666667, 2}, }; - for (size_t i = 0; i < base::size(test_data); ++i) { + for (size_t i = 0; i < std::size(test_data); ++i) { SCOPED_TRACE(i); AVRational time_base;
diff --git a/media/filters/audio_renderer_algorithm_unittest.cc b/media/filters/audio_renderer_algorithm_unittest.cc index 3b3b38b..d7f7e57 100644 --- a/media/filters/audio_renderer_algorithm_unittest.cc +++ b/media/filters/audio_renderer_algorithm_unittest.cc
@@ -20,7 +20,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "media/base/audio_buffer.h" #include "media/base/audio_bus.h" #include "media/base/audio_timestamp_helper.h" @@ -828,7 +827,7 @@ // filled appropriately at normal, above normal, and below normal. const int kHalfSize = kFrameSize / 2; const float kAudibleRates[] = {1.0f, 2.0f, 0.5f, 5.0f, 0.25f}; - for (size_t i = 0; i < base::size(kAudibleRates); ++i) { + for (size_t i = 0; i < std::size(kAudibleRates); ++i) { SCOPED_TRACE(kAudibleRates[i]); bus->Zero();
diff --git a/media/filters/audio_timestamp_validator_unittest.cc b/media/filters/audio_timestamp_validator_unittest.cc index 17ca4a7..2d86430 100644 --- a/media/filters/audio_timestamp_validator_unittest.cc +++ b/media/filters/audio_timestamp_validator_unittest.cc
@@ -6,7 +6,6 @@ #include <tuple> -#include "base/cxx17_backports.h" #include "base/time/time.h" #include "media/base/audio_decoder_config.h" #include "media/base/media_util.h" @@ -87,7 +86,7 @@ // Ping-pong between two random offsets to prevent validator from // stabilizing timestamp pattern. base::TimeDelta randomOffset = - kRandomOffsets[i % base::size(kRandomOffsets)]; + kRandomOffsets[i % std::size(kRandomOffsets)]; encoded_buffer->set_timestamp(i * kBufferDuration + randomOffset); if (i == 0) {
diff --git a/media/filters/blocking_url_protocol.cc b/media/filters/blocking_url_protocol.cc index faa877c4..377a228 100644 --- a/media/filters/blocking_url_protocol.cc +++ b/media/filters/blocking_url_protocol.cc
@@ -7,7 +7,6 @@ #include <stddef.h> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/threading/thread_restrictions.h" #include "media/base/data_source.h" #include "media/ffmpeg/ffmpeg_common.h" @@ -69,7 +68,7 @@ size_t index; { base::ScopedAllowBaseSyncPrimitives allow_base_sync_primitives; - index = base::WaitableEvent::WaitMany(events, base::size(events)); + index = base::WaitableEvent::WaitMany(events, std::size(events)); } if (events[index] == &aborted_)
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc index 75d6916..8175079 100644 --- a/media/filters/chunk_demuxer_unittest.cc +++ b/media/filters/chunk_demuxer_unittest.cc
@@ -15,7 +15,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" @@ -717,7 +716,7 @@ std::vector<uint8_t>( kEncryptedMediaInitData, kEncryptedMediaInitData + - base::size(kEncryptedMediaInitData)))) + std::size(kEncryptedMediaInitData)))) .Times(Exactly(need_key_count)); } @@ -2865,7 +2864,7 @@ base::BindOnce(&ChunkDemuxerTest::DemuxerInitialized, base::Unretained(this))); - for (size_t i = 0; i < base::size(codec_ids); ++i) { + for (size_t i = 0; i < std::size(codec_ids); ++i) { #if BUILDFLAG(USE_PROPRIETARY_CODECS) expected = ChunkDemuxer::kOk; #else @@ -3367,9 +3366,9 @@ true, true, true, true, false, }; - static_assert(base::size(kBuffer) == base::size(kExpectedReturnValues), + static_assert(std::size(kBuffer) == std::size(kExpectedReturnValues), "test arrays out of sync"); - static_assert(base::size(kBuffer) == sizeof(kBuffer), + static_assert(std::size(kBuffer) == sizeof(kBuffer), "there should be one byte per index"); ASSERT_TRUE(InitDemuxer(HAS_AUDIO));
diff --git a/media/filters/decrypting_audio_decoder_unittest.cc b/media/filters/decrypting_audio_decoder_unittest.cc index 0774de1..704299b 100644 --- a/media/filters/decrypting_audio_decoder_unittest.cc +++ b/media/filters/decrypting_audio_decoder_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/filters/decrypting_audio_decoder.h" + #include <stdint.h> #include <string> @@ -9,7 +11,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/test/gmock_callback_support.h" #include "base/test/gmock_move_support.h" @@ -21,7 +22,6 @@ #include "media/base/mock_filters.h" #include "media/base/test_helpers.h" #include "media/base/timestamp_constants.h" -#include "media/filters/decrypting_audio_decoder.h" #include "testing/gmock/include/gmock/gmock.h" using ::base::test::RunOnceCallback; @@ -47,8 +47,8 @@ scoped_refptr<DecoderBuffer> buffer(new DecoderBuffer(buffer_size)); buffer->set_decrypt_config(DecryptConfig::CreateCencConfig( std::string(reinterpret_cast<const char*>(kFakeKeyId), - base::size(kFakeKeyId)), - std::string(reinterpret_cast<const char*>(kFakeIv), base::size(kFakeIv)), + std::size(kFakeKeyId)), + std::string(reinterpret_cast<const char*>(kFakeIv), std::size(kFakeIv)), std::vector<SubsampleEntry>())); return buffer; }
diff --git a/media/filters/decrypting_demuxer_stream_unittest.cc b/media/filters/decrypting_demuxer_stream_unittest.cc index 973e018..02eec6a 100644 --- a/media/filters/decrypting_demuxer_stream_unittest.cc +++ b/media/filters/decrypting_demuxer_stream_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/filters/decrypting_demuxer_stream.h" + #include <stdint.h> #include <string> @@ -9,7 +11,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/test/gmock_callback_support.h" #include "base/test/gmock_move_support.h" @@ -20,7 +21,6 @@ #include "media/base/mock_filters.h" #include "media/base/mock_media_log.h" #include "media/base/test_helpers.h" -#include "media/filters/decrypting_demuxer_stream.h" #include "testing/gmock/include/gmock/gmock.h" using ::base::test::RunCallback; @@ -50,11 +50,11 @@ std::string iv = is_clear ? std::string() : std::string(reinterpret_cast<const char*>(kFakeIv), - base::size(kFakeIv)); + std::size(kFakeIv)); if (!is_clear) { buffer->set_decrypt_config(DecryptConfig::CreateCencConfig( std::string(reinterpret_cast<const char*>(kFakeKeyId), - base::size(kFakeKeyId)), + std::size(kFakeKeyId)), iv, {})); } return buffer;
diff --git a/media/filters/decrypting_video_decoder_unittest.cc b/media/filters/decrypting_video_decoder_unittest.cc index 74c11b4..5eb6f13 100644 --- a/media/filters/decrypting_video_decoder_unittest.cc +++ b/media/filters/decrypting_video_decoder_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/filters/decrypting_video_decoder.h" + #include <stdint.h> #include <string> @@ -9,7 +11,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/test/gmock_callback_support.h" #include "base/test/gmock_move_support.h" @@ -20,7 +21,6 @@ #include "media/base/mock_filters.h" #include "media/base/test_helpers.h" #include "media/base/video_frame.h" -#include "media/filters/decrypting_video_decoder.h" #include "testing/gmock/include/gmock/gmock.h" using ::base::test::RunOnceCallback; @@ -42,8 +42,8 @@ scoped_refptr<DecoderBuffer> buffer(new DecoderBuffer(buffer_size)); buffer->set_decrypt_config(DecryptConfig::CreateCencConfig( std::string(reinterpret_cast<const char*>(kFakeKeyId), - base::size(kFakeKeyId)), - std::string(reinterpret_cast<const char*>(kFakeIv), base::size(kFakeIv)), + std::size(kFakeKeyId)), + std::string(reinterpret_cast<const char*>(kFakeIv), std::size(kFakeIv)), {})); return buffer; }
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc index d891a9c8..59ba864e 100644 --- a/media/filters/ffmpeg_demuxer_unittest.cc +++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/filters/ffmpeg_demuxer.h" + #include <stddef.h> #include <stdint.h> @@ -11,7 +13,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/location.h" #include "base/logging.h" @@ -35,7 +36,6 @@ #include "media/base/test_helpers.h" #include "media/base/timestamp_constants.h" #include "media/ffmpeg/ffmpeg_common.h" -#include "media/filters/ffmpeg_demuxer.h" #include "media/filters/file_data_source.h" #include "media/formats/mp4/avc.h" #include "media/formats/mp4/bitstream_converter.h" @@ -473,12 +473,12 @@ #endif TEST_F(FFmpegDemuxerTest, Initialize_Encrypted) { - EXPECT_CALL( - *this, OnEncryptedMediaInitData( - EmeInitDataType::WEBM, - std::vector<uint8_t>(kEncryptedMediaInitData, - kEncryptedMediaInitData + - base::size(kEncryptedMediaInitData)))) + EXPECT_CALL(*this, + OnEncryptedMediaInitData( + EmeInitDataType::WEBM, + std::vector<uint8_t>(kEncryptedMediaInitData, + kEncryptedMediaInitData + + std::size(kEncryptedMediaInitData)))) .Times(Exactly(2)); CreateDemuxer("bear-320x240-av_enc-av.webm"); @@ -754,7 +754,7 @@ // Run the test twice with a seek in between. for (int i = 0; i < 2; ++i) { - for (size_t j = 0; j < base::size(kTestExpectations); ++j) { + for (size_t j = 0; j < std::size(kTestExpectations); ++j) { Read(audio, FROM_HERE, kTestExpectations[j][0], kTestExpectations[j][1], true); } @@ -816,7 +816,7 @@ Read(audio, FROM_HERE, 408, 0, true, DemuxerStream::Status::kOk, base::Microseconds(6500)); - for (size_t j = 0; j < base::size(kTestExpectations); ++j) { + for (size_t j = 0; j < std::size(kTestExpectations); ++j) { Read(audio, FROM_HERE, kTestExpectations[j][0], kTestExpectations[j][1], true); } @@ -1210,7 +1210,7 @@ const char* files[] = {"bear-1280x720-av_frag.mp4", "bear-1280x720-av_with-aud-nalus_frag.mp4"}; - for (size_t i = 0; i < base::size(files); ++i) { + for (size_t i = 0; i < std::size(files); ++i) { DVLOG(1) << "Testing " << files[i]; CreateDemuxer(files[i]); InitializeDemuxer(); @@ -1553,7 +1553,7 @@ "2012-11-1012:34:56", }; - for (size_t i = 0; i < base::size(invalid_date_strings); ++i) { + for (size_t i = 0; i < std::size(invalid_date_strings); ++i) { const char* date_string = invalid_date_strings[i]; base::Time result; EXPECT_FALSE(base::Time::FromUTCString(date_string, &result))
diff --git a/media/filters/fuchsia/fuchsia_video_decoder_unittest.cc b/media/filters/fuchsia/fuchsia_video_decoder_unittest.cc index fac2f78d..fc20438 100644 --- a/media/filters/fuchsia/fuchsia_video_decoder_unittest.cc +++ b/media/filters/fuchsia/fuchsia_video_decoder_unittest.cc
@@ -404,7 +404,7 @@ ReadTestDataFile("h264-320x180-frame-1"), ReadTestDataFile("h264-320x180-frame-2"), ReadTestDataFile("h264-320x180-frame-3")}; - CHECK_LT(frame_num, base::size(frames)); + CHECK_LT(frame_num, std::size(frames)); return frames[frame_num]; }
diff --git a/media/filters/video_renderer_algorithm_unittest.cc b/media/filters/video_renderer_algorithm_unittest.cc index 37dbe60..a113df9 100644 --- a/media/filters/video_renderer_algorithm_unittest.cc +++ b/media/filters/video_renderer_algorithm_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/filters/video_renderer_algorithm.h" + #include <stddef.h> #include <stdint.h> @@ -10,7 +12,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/strings/stringprintf.h" #include "base/test/simple_test_tick_clock.h" @@ -19,7 +20,6 @@ #include "media/base/timestamp_constants.h" #include "media/base/video_frame_pool.h" #include "media/base/wall_clock_time_source.h" -#include "media/filters/video_renderer_algorithm.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -1415,10 +1415,10 @@ TickGenerator display_tg(tick_clock_->NowTicks(), 60); const double kPlaybackRates[] = {1.0, 2, 0.215, 0.5, 1.0, 3.15}; - const bool kTestRateHasCadence[base::size(kPlaybackRates)] = { + const bool kTestRateHasCadence[std::size(kPlaybackRates)] = { true, true, true, true, true, false}; - for (size_t i = 0; i < base::size(kPlaybackRates); ++i) { + for (size_t i = 0; i < std::size(kPlaybackRates); ++i) { const double playback_rate = kPlaybackRates[i]; SCOPED_TRACE(base::StringPrintf("Playback Rate: %.03f", playback_rate)); time_source_.SetPlaybackRate(playback_rate); @@ -1449,11 +1449,11 @@ // Run throught ~1.6 seconds worth of frames. bool cadence_detected = false; base::TimeDelta timestamp; - for (size_t i = 0; i < base::size(kBadTimestampsMs) * 2; ++i) { + for (size_t i = 0; i < std::size(kBadTimestampsMs) * 2; ++i) { while (EffectiveFramesQueued() < 3) { algorithm_.EnqueueFrame(CreateFrame(timestamp)); - timestamp += base::Milliseconds( - kBadTimestampsMs[i % base::size(kBadTimestampsMs)]); + timestamp += + base::Milliseconds(kBadTimestampsMs[i % std::size(kBadTimestampsMs)]); } size_t frames_dropped = 0; @@ -1484,11 +1484,11 @@ bool cadence_detected = false; bool cadence_turned_off = false; base::TimeDelta timestamp; - for (size_t i = 0; i < base::size(kBadTimestampsMs);) { + for (size_t i = 0; i < std::size(kBadTimestampsMs);) { while (EffectiveFramesQueued() < 3) { algorithm_.EnqueueFrame(CreateFrame(timestamp)); - timestamp += base::Milliseconds( - kBadTimestampsMs[i % base::size(kBadTimestampsMs)]); + timestamp += + base::Milliseconds(kBadTimestampsMs[i % std::size(kBadTimestampsMs)]); ++i; }
diff --git a/media/filters/vp9_bool_decoder.cc b/media/filters/vp9_bool_decoder.cc index 26ead87..e5e76f4 100644 --- a/media/filters/vp9_bool_decoder.cc +++ b/media/filters/vp9_bool_decoder.cc
@@ -7,7 +7,6 @@ #include <algorithm> #include <memory> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "media/base/bit_reader.h" @@ -113,7 +112,7 @@ // Need to fill |count| bits next time in order to make |bool_range_| >= // 128. - DCHECK_LT(bool_range_, base::size(kCountToShiftTo128)); + DCHECK_LT(bool_range_, std::size(kCountToShiftTo128)); DCHECK_GT(bool_range_, 0u); int count = kCountToShiftTo128[bool_range_]; bool_range_ <<= count;
diff --git a/media/filters/vp9_compressed_header_parser.cc b/media/filters/vp9_compressed_header_parser.cc index 89fc7f4f..d0ec4771 100644 --- a/media/filters/vp9_compressed_header_parser.cc +++ b/media/filters/vp9_compressed_header_parser.cc
@@ -4,7 +4,6 @@ #include "media/filters/vp9_compressed_header_parser.h" -#include "base/cxx17_backports.h" #include "base/logging.h" namespace media { @@ -48,7 +47,7 @@ uint8_t v = delta_prob; DCHECK_GE(m, 1); DCHECK_LE(m, kVp9MaxProb); - DCHECK_LT(v, base::size(inv_map_table)); + DCHECK_LT(v, std::size(inv_map_table)); v = inv_map_table[v]; m--; if ((m << 1) <= kVp9MaxProb) {
diff --git a/media/filters/vp9_parser.cc b/media/filters/vp9_parser.cc index 4a56a04..f260078 100644 --- a/media/filters/vp9_parser.cc +++ b/media/filters/vp9_parser.cc
@@ -138,7 +138,7 @@ }; // clang-format on -static_assert(base::size(kDcQLookup[0]) == base::size(kAcQLookup[0]), +static_assert(std::size(kDcQLookup[0]) == std::size(kAcQLookup[0]), "quantizer lookup arrays of incorrect size"); size_t ClampQ(int64_t q) { @@ -518,27 +518,27 @@ } void Vp9Parser::Context::MarkFrameContextForUpdate(size_t frame_context_idx) { - DCHECK_LT(frame_context_idx, base::size(frame_context_managers_)); + DCHECK_LT(frame_context_idx, std::size(frame_context_managers_)); frame_context_managers_[frame_context_idx].SetNeedsClientUpdate(); } void Vp9Parser::Context::UpdateFrameContext( size_t frame_context_idx, const Vp9FrameContext& frame_context) { - DCHECK_LT(frame_context_idx, base::size(frame_context_managers_)); + DCHECK_LT(frame_context_idx, std::size(frame_context_managers_)); frame_context_managers_[frame_context_idx].Update(frame_context); } const Vp9Parser::ReferenceSlot& Vp9Parser::Context::GetRefSlot( size_t ref_type) const { - DCHECK_LT(ref_type, base::size(ref_slots_)); + DCHECK_LT(ref_type, std::size(ref_slots_)); return ref_slots_[ref_type]; } void Vp9Parser::Context::UpdateRefSlot( size_t ref_type, const Vp9Parser::ReferenceSlot& ref_slot) { - DCHECK_LT(ref_type, base::size(ref_slots_)); + DCHECK_LT(ref_type, std::size(ref_slots_)); ref_slots_[ref_type] = ref_slot; } @@ -748,7 +748,7 @@ Vp9Parser::ContextRefreshCallback Vp9Parser::GetContextRefreshCb( size_t frame_context_idx) { - DCHECK_LT(frame_context_idx, base::size(context_.frame_context_managers_)); + DCHECK_LT(frame_context_idx, std::size(context_.frame_context_managers_)); auto& frame_context_manager = context_.frame_context_managers_[frame_context_idx];
diff --git a/media/formats/ac3/ac3_util.cc b/media/formats/ac3/ac3_util.cc index 05ae98eb..83e9c1cf 100644 --- a/media/formats/ac3/ac3_util.cc +++ b/media/formats/ac3/ac3_util.cc
@@ -4,7 +4,6 @@ #include "media/formats/ac3/ac3_util.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "media/base/bit_reader.h" @@ -121,9 +120,9 @@ // Returns the size in bytes of the given AC3 synchronization frame. int ParseAc3SyncFrameSize(Ac3Header& header) { - if (header.sample_rate_code() >= base::size(kSampleRate) || + if (header.sample_rate_code() >= std::size(kSampleRate) || header.ac3_frame_size_code() >= - base::size(kSyncFrameSizeInWordsFor44kHz)) { + std::size(kSyncFrameSizeInWordsFor44kHz)) { DVLOG(2) << __func__ << " Invalid frame header." << " fscod:" << header.sample_rate_code() << " frmsizecod:" << header.ac3_frame_size_code();
diff --git a/media/formats/mp2t/es_adapter_video_unittest.cc b/media/formats/mp2t/es_adapter_video_unittest.cc index 644b9914..0665abb2 100644 --- a/media/formats/mp2t/es_adapter_video_unittest.cc +++ b/media/formats/mp2t/es_adapter_video_unittest.cc
@@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/formats/mp2t/es_adapter_video.h" + #include <stddef.h> #include <stdint.h> @@ -10,14 +12,12 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/time/time.h" #include "media/base/media_util.h" #include "media/base/stream_parser_buffer.h" #include "media/base/timestamp_constants.h" #include "media/base/video_decoder_config.h" -#include "media/formats/mp2t/es_adapter_video.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -46,7 +46,7 @@ BufferQueue buffers(frame_count); for (size_t k = 0; k < frame_count; k++) { buffers[k] = - StreamParserBuffer::CopyFrom(dummy_buffer, base::size(dummy_buffer), + StreamParserBuffer::CopyFrom(dummy_buffer, std::size(dummy_buffer), is_key_frame[k], DemuxerStream::VIDEO, 0); if (frame_pts_ms[k] < 0) { buffers[k]->set_timestamp(kNoTimestamp); @@ -119,7 +119,7 @@ true, false, false, false, false, false, false, false }; BufferQueue buffer_queue = - GenerateFakeBuffers(pts_ms, is_key_frame, base::size(pts_ms)); + GenerateFakeBuffers(pts_ms, is_key_frame, std::size(pts_ms)); EXPECT_EQ("(1,Y) (2,N) (3,N) (4,N) (5,N) (6,N) (7,N) (7,N)", RunAdapterTest(buffer_queue)); @@ -132,7 +132,7 @@ true, false, false, false, false, false, false, false, false, false }; BufferQueue buffer_queue = - GenerateFakeBuffers(pts_ms, is_key_frame, base::size(pts_ms)); + GenerateFakeBuffers(pts_ms, is_key_frame, std::size(pts_ms)); EXPECT_EQ("(30,Y) (30,N) (30,N) (30,N) (30,N) " "(30,N) (30,N) (30,N) (30,N) (30,N)", @@ -143,7 +143,7 @@ int pts_ms[] = {30, 40, 50, 120, 150, 180}; bool is_key_frame[] = {false, false, false, true, false, false}; BufferQueue buffer_queue = - GenerateFakeBuffers(pts_ms, is_key_frame, base::size(pts_ms)); + GenerateFakeBuffers(pts_ms, is_key_frame, std::size(pts_ms)); EXPECT_EQ("(30,Y) (30,Y) (30,Y) (30,Y) (30,N) (30,N)", RunAdapterTest(buffer_queue)); @@ -153,7 +153,7 @@ int pts_ms[] = {-1, 40, 50, 120, 150, 180}; bool is_key_frame[] = {true, false, false, true, false, false}; BufferQueue buffer_queue = - GenerateFakeBuffers(pts_ms, is_key_frame, base::size(pts_ms)); + GenerateFakeBuffers(pts_ms, is_key_frame, std::size(pts_ms)); EXPECT_EQ("(40,Y) (40,Y) (30,Y) (30,N) (30,N)", RunAdapterTest(buffer_queue)); @@ -163,7 +163,7 @@ int pts_ms[] = {-1, -1, 50, 120, 150, 180}; bool is_key_frame[] = {false, false, false, true, false, false}; BufferQueue buffer_queue = - GenerateFakeBuffers(pts_ms, is_key_frame, base::size(pts_ms)); + GenerateFakeBuffers(pts_ms, is_key_frame, std::size(pts_ms)); EXPECT_EQ("(70,Y) (30,Y) (30,N) (30,N)", RunAdapterTest(buffer_queue));
diff --git a/media/formats/mp2t/timestamp_unroller_unittest.cc b/media/formats/mp2t/timestamp_unroller_unittest.cc index f6a23bb3..61d6da73 100644 --- a/media/formats/mp2t/timestamp_unroller_unittest.cc +++ b/media/formats/mp2t/timestamp_unroller_unittest.cc
@@ -2,13 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/formats/mp2t/timestamp_unroller.h" + #include <stddef.h> #include <stdint.h> + #include <vector> -#include "base/cxx17_backports.h" #include "base/test/perf_test_suite.h" -#include "media/formats/mp2t/timestamp_unroller.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -51,7 +52,7 @@ }; std::vector<int64_t> timestamps_vector(timestamps, - timestamps + base::size(timestamps)); + timestamps + std::size(timestamps)); RunUnrollTest(timestamps_vector); }
diff --git a/media/formats/mp4/avc_unittest.cc b/media/formats/mp4/avc_unittest.cc index 2a63b62..e929f3f 100644 --- a/media/formats/mp4/avc_unittest.cc +++ b/media/formats/mp4/avc_unittest.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/formats/mp4/avc.h" + #include <stddef.h> #include <stdint.h> #include <string.h> #include <ostream> -#include "base/cxx17_backports.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "media/base/decrypt_config.h" #include "media/base/stream_parser_buffer.h" -#include "media/formats/mp4/avc.h" #include "media/formats/mp4/bitstream_converter.h" #include "media/formats/mp4/box_definitions.h" #include "media/formats/mp4/nalu_test_helper.h" @@ -321,7 +321,7 @@ {"SDC I", false}, }; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { std::vector<uint8_t> buf; std::vector<SubsampleEntry> subsamples; AvcStringToAnnexB(test_cases[i].case_string, &buf, NULL); @@ -369,7 +369,7 @@ BitstreamConverter::AnalysisResult expected; expected.is_conformant = false; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { std::vector<uint8_t> buf; std::vector<SubsampleEntry> subsamples; AvcStringToAnnexB(test_cases[i].case_string, &buf, NULL); @@ -417,7 +417,7 @@ expected.is_conformant = true; expected.is_keyframe = true; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { std::vector<uint8_t> buf; std::vector<SubsampleEntry> subsamples;
diff --git a/media/formats/mp4/hevc_unittest.cc b/media/formats/mp4/hevc_unittest.cc index 0cb5ad70..0dbdcbf 100644 --- a/media/formats/mp4/hevc_unittest.cc +++ b/media/formats/mp4/hevc_unittest.cc
@@ -3,7 +3,7 @@ // found in the LICENSE file. #include "media/formats/mp4/hevc.h" -#include "base/cxx17_backports.h" + #include "media/formats/mp4/nalu_test_helper.h" #include "testing/gtest/include/gtest/gtest.h" @@ -21,7 +21,7 @@ {"AUD SPS P", false}, {"AUD,I", true}, {"AUD,SPS,I", true}, }; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { std::vector<uint8_t> buf; std::vector<SubsampleEntry> subsamples; HevcStringToAnnexB(test_cases[i].case_string, &buf, nullptr); @@ -65,7 +65,7 @@ BitstreamConverter::AnalysisResult expected; expected.is_conformant = false; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { std::vector<uint8_t> buf; std::vector<SubsampleEntry> subsamples; HevcStringToAnnexB(test_cases[i].case_string, &buf, nullptr);
diff --git a/media/formats/mp4/sample_to_group_iterator_unittest.cc b/media/formats/mp4/sample_to_group_iterator_unittest.cc index 350d541..c6aeef8 100644 --- a/media/formats/mp4/sample_to_group_iterator_unittest.cc +++ b/media/formats/mp4/sample_to_group_iterator_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace media { @@ -24,7 +23,7 @@ public: SampleToGroupIteratorTest() { // Build sample group description index table from kSampleToGroupTable. - for (size_t i = 0; i < base::size(kCompactSampleToGroupTable); ++i) { + for (size_t i = 0; i < std::size(kCompactSampleToGroupTable); ++i) { for (uint32_t j = 0; j < kCompactSampleToGroupTable[i].sample_count; ++j) { sample_to_group_table_.push_back( @@ -34,7 +33,7 @@ sample_to_group_.entries.assign( kCompactSampleToGroupTable, - kCompactSampleToGroupTable + base::size(kCompactSampleToGroupTable)); + kCompactSampleToGroupTable + std::size(kCompactSampleToGroupTable)); sample_to_group_iterator_.reset( new SampleToGroupIterator(sample_to_group_)); }
diff --git a/media/formats/mp4/track_run_iterator.cc b/media/formats/mp4/track_run_iterator.cc index 3888b7d..30329b4f 100644 --- a/media/formats/mp4/track_run_iterator.cc +++ b/media/formats/mp4/track_run_iterator.cc
@@ -9,7 +9,6 @@ #include <limits> #include <memory> -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/metrics/histogram_macros.h" #include "base/numerics/checked_math.h" @@ -751,7 +750,7 @@ if (ApplyConstantIv(sample_idx, &sample_encryption_entry)) { std::string iv(reinterpret_cast<const char*>( sample_encryption_entry.initialization_vector), - base::size(sample_encryption_entry.initialization_vector)); + std::size(sample_encryption_entry.initialization_vector)); switch (run_itr_->encryption_scheme) { case EncryptionScheme::kUnencrypted: return nullptr; @@ -773,7 +772,7 @@ run_itr_->sample_encryption_entries[sample_idx]; std::string iv(reinterpret_cast<const char*>( sample_encryption_entry.initialization_vector), - base::size(sample_encryption_entry.initialization_vector)); + std::size(sample_encryption_entry.initialization_vector)); size_t total_size = 0; if (!sample_encryption_entry.subsamples.empty() &&
diff --git a/media/formats/mp4/track_run_iterator_unittest.cc b/media/formats/mp4/track_run_iterator_unittest.cc index a2e8080..7c2033a 100644 --- a/media/formats/mp4/track_run_iterator_unittest.cc +++ b/media/formats/mp4/track_run_iterator_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/strings/string_split.h" #include "media/base/mock_media_log.h" @@ -342,7 +341,7 @@ sinf->info.track_encryption.is_encrypted = true; sinf->info.track_encryption.default_iv_size = 8; sinf->info.track_encryption.default_kid.assign(kKeyId, - kKeyId + base::size(kKeyId)); + kKeyId + std::size(kKeyId)); } // Add SampleGroupDescription Box to track level sample table and to @@ -359,7 +358,7 @@ track_cenc_group.entries[0].iv_size = 8; track_cenc_group.entries[0].key_id.assign( kTrackCencSampleGroupKeyId, - kTrackCencSampleGroupKeyId + base::size(kTrackCencSampleGroupKeyId)); + kTrackCencSampleGroupKeyId + std::size(kTrackCencSampleGroupKeyId)); frag->sample_group_description.grouping_type = FOURCC_SEIG; frag->sample_group_description.entries.resize(3); @@ -370,11 +369,11 @@ frag->sample_group_description.entries[1].key_id.assign( kFragmentCencSampleGroupKeyId, kFragmentCencSampleGroupKeyId + - base::size(kFragmentCencSampleGroupKeyId)); + std::size(kFragmentCencSampleGroupKeyId)); frag->sample_group_description.entries[2].is_encrypted = true; frag->sample_group_description.entries[2].iv_size = 16; frag->sample_group_description.entries[2].key_id.assign( - kKeyId, kKeyId + base::size(kKeyId)); + kKeyId, kKeyId + std::size(kKeyId)); frag->sample_to_group.grouping_type = FOURCC_SEIG; frag->sample_to_group.entries.assign(sample_to_group_entries, @@ -398,12 +397,12 @@ frag->sample_encryption.sample_encryption_data.assign( kSampleEncryptionDataWithSubsamples, kSampleEncryptionDataWithSubsamples + - base::size(kSampleEncryptionDataWithSubsamples)); + std::size(kSampleEncryptionDataWithSubsamples)); } else { frag->sample_encryption.sample_encryption_data.assign( kSampleEncryptionDataWithoutSubsamples, kSampleEncryptionDataWithoutSubsamples + - base::size(kSampleEncryptionDataWithoutSubsamples)); + std::size(kSampleEncryptionDataWithoutSubsamples)); } // Update sample sizes and aux info header. @@ -435,7 +434,7 @@ sinf->info.track_encryption.default_constant_iv_size = 16; memcpy(sinf->info.track_encryption.default_constant_iv, kIv3, 16); sinf->info.track_encryption.default_kid.assign(kKeyId, - kKeyId + base::size(kKeyId)); + kKeyId + std::size(kKeyId)); } void AddConstantIvsToCencSampleGroup(Track* track, TrackFragment* frag) { @@ -464,7 +463,7 @@ frag->sample_encryption.sample_encryption_data.assign( kSampleEncryptionDataWithSubsamplesAndConstantIv, kSampleEncryptionDataWithSubsamplesAndConstantIv + - base::size(kSampleEncryptionDataWithSubsamplesAndConstantIv)); + std::size(kSampleEncryptionDataWithSubsamplesAndConstantIv)); // Update sample sizes and aux info header. frag->runs.resize(1); @@ -711,14 +710,14 @@ EXPECT_EQ(iter_->GetMaxClearOffset(), moof.tracks[1].runs[0].data_offset); std::unique_ptr<DecryptConfig> config = iter_->GetDecryptConfig(); EXPECT_EQ( - std::string(reinterpret_cast<const char*>(kKeyId), base::size(kKeyId)), + std::string(reinterpret_cast<const char*>(kKeyId), std::size(kKeyId)), config->key_id()); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), base::size(kIv1)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), std::size(kIv1)), config->iv()); EXPECT_EQ(config->subsamples().size(), 0u); iter_->AdvanceSample(); config = iter_->GetDecryptConfig(); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv2), base::size(kIv2)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv2), std::size(kIv2)), config->iv()); EXPECT_EQ(config->subsamples().size(), 0u); } @@ -739,7 +738,7 @@ // With Iv size 16 bytes. {1, SampleToGroupEntry::kFragmentGroupDescriptionIndexBase + 3}}; AddCencSampleGroup(&moov_.tracks[1], &moof.tracks[1], kSampleToGroupTable, - base::size(kSampleToGroupTable)); + std::size(kSampleToGroupTable)); ASSERT_TRUE(iter_->Init(moof)); // The run for track 2 will be the second, which is parsed according to @@ -754,14 +753,14 @@ EXPECT_EQ(iter_->sample_offset(), 200); EXPECT_EQ(iter_->GetMaxClearOffset(), moof.tracks[1].runs[0].data_offset); std::unique_ptr<DecryptConfig> config = iter_->GetDecryptConfig(); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), base::size(kIv1)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), std::size(kIv1)), config->iv()); EXPECT_EQ(config->subsamples().size(), 1u); EXPECT_EQ(config->subsamples()[0].clear_bytes, 1u); EXPECT_EQ(config->subsamples()[0].cypher_bytes, 2u); iter_->AdvanceSample(); config = iter_->GetDecryptConfig(); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), base::size(kIv3)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), std::size(kIv3)), config->iv()); EXPECT_EQ(config->subsamples().size(), 2u); EXPECT_EQ(config->subsamples()[0].clear_bytes, 1u); @@ -784,22 +783,21 @@ EXPECT_EQ(iter_->track_id(), 2u); EXPECT_TRUE(iter_->is_encrypted()); ASSERT_TRUE(iter_->AuxInfoNeedsToBeCached()); - EXPECT_EQ(static_cast<uint32_t>(iter_->aux_info_size()), - base::size(kAuxInfo)); + EXPECT_EQ(static_cast<uint32_t>(iter_->aux_info_size()), std::size(kAuxInfo)); EXPECT_EQ(iter_->aux_info_offset(), 50); EXPECT_EQ(iter_->GetMaxClearOffset(), 50); EXPECT_FALSE(iter_->CacheAuxInfo(NULL, 0)); EXPECT_FALSE(iter_->CacheAuxInfo(kAuxInfo, 3)); EXPECT_TRUE(iter_->AuxInfoNeedsToBeCached()); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); EXPECT_FALSE(iter_->AuxInfoNeedsToBeCached()); EXPECT_EQ(iter_->sample_offset(), 200); EXPECT_EQ(iter_->GetMaxClearOffset(), moof.tracks[0].runs[0].data_offset); std::unique_ptr<DecryptConfig> config = iter_->GetDecryptConfig(); EXPECT_EQ( - std::string(reinterpret_cast<const char*>(kKeyId), base::size(kKeyId)), + std::string(reinterpret_cast<const char*>(kKeyId), std::size(kKeyId)), config->key_id()); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), base::size(kIv1)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv1), std::size(kIv1)), config->iv()); EXPECT_TRUE(config->subsamples().empty()); iter_->AdvanceSample(); @@ -818,15 +816,14 @@ // Associated with the first entry in SampleGroupDescription Box. {1, SampleToGroupEntry::kFragmentGroupDescriptionIndexBase + 1}}; AddCencSampleGroup(&moov_.tracks[0], &moof.tracks[0], kSampleToGroupTable, - base::size(kSampleToGroupTable)); + std::size(kSampleToGroupTable)); iter_.reset(new TrackRunIterator(&moov_, &media_log_)); ASSERT_TRUE(InitMoofWithArbitraryAuxInfo(&moof)); std::string cenc_sample_group_key_id( kFragmentCencSampleGroupKeyId, - kFragmentCencSampleGroupKeyId + - base::size(kFragmentCencSampleGroupKeyId)); + kFragmentCencSampleGroupKeyId + std::size(kFragmentCencSampleGroupKeyId)); // The first sample is encrypted and the second sample is unencrypted. EXPECT_TRUE(iter_->is_encrypted()); EXPECT_EQ(cenc_sample_group_key_id, iter_->GetDecryptConfig()->key_id()); @@ -850,19 +847,18 @@ // Associated with the 1st entry in track SampleGroupDescription Box. {2, 1}}; AddCencSampleGroup(&moov_.tracks[0], &moof.tracks[0], kSampleToGroupTable, - base::size(kSampleToGroupTable)); + std::size(kSampleToGroupTable)); iter_.reset(new TrackRunIterator(&moov_, &media_log_)); ASSERT_TRUE(InitMoofWithArbitraryAuxInfo(&moof)); - std::string track_encryption_key_id(kKeyId, kKeyId + base::size(kKeyId)); + std::string track_encryption_key_id(kKeyId, kKeyId + std::size(kKeyId)); std::string track_cenc_sample_group_key_id( kTrackCencSampleGroupKeyId, - kTrackCencSampleGroupKeyId + base::size(kTrackCencSampleGroupKeyId)); + kTrackCencSampleGroupKeyId + std::size(kTrackCencSampleGroupKeyId)); std::string fragment_cenc_sample_group_key_id( kFragmentCencSampleGroupKeyId, - kFragmentCencSampleGroupKeyId + - base::size(kFragmentCencSampleGroupKeyId)); + kFragmentCencSampleGroupKeyId + std::size(kFragmentCencSampleGroupKeyId)); for (size_t i = 0; i < kSampleToGroupTable[0].sample_count; ++i) { EXPECT_TRUE(iter_->is_encrypted()); @@ -910,18 +906,18 @@ ASSERT_TRUE(iter_->Init(moof)); EXPECT_EQ(iter_->track_id(), 1u); EXPECT_EQ(iter_->aux_info_offset(), 50); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); std::unique_ptr<DecryptConfig> config = iter_->GetDecryptConfig(); - ASSERT_EQ(base::size(kIv1), config->iv().size()); + ASSERT_EQ(std::size(kIv1), config->iv().size()); EXPECT_TRUE(!memcmp(kIv1, config->iv().data(), config->iv().size())); iter_->AdvanceSample(); EXPECT_EQ(iter_->GetMaxClearOffset(), 50); iter_->AdvanceRun(); EXPECT_EQ(iter_->GetMaxClearOffset(), 50); EXPECT_EQ(iter_->aux_info_offset(), 50); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); EXPECT_EQ(iter_->GetMaxClearOffset(), 200); - ASSERT_EQ(base::size(kIv1), config->iv().size()); + ASSERT_EQ(std::size(kIv1), config->iv().size()); EXPECT_TRUE(!memcmp(kIv1, config->iv().data(), config->iv().size())); iter_->AdvanceSample(); EXPECT_EQ(iter_->GetMaxClearOffset(), 201); @@ -956,13 +952,13 @@ EXPECT_EQ(iter_->track_id(), 2u); EXPECT_EQ(iter_->aux_info_offset(), 50); EXPECT_EQ(iter_->sample_offset(), 200); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); EXPECT_EQ(iter_->GetMaxClearOffset(), 100); iter_->AdvanceRun(); EXPECT_EQ(iter_->track_id(), 1u); EXPECT_EQ(iter_->aux_info_offset(), 20000); EXPECT_EQ(iter_->sample_offset(), 100); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); EXPECT_EQ(iter_->GetMaxClearOffset(), 100); iter_->AdvanceSample(); EXPECT_EQ(iter_->GetMaxClearOffset(), 101); @@ -971,7 +967,7 @@ EXPECT_EQ(iter_->aux_info_offset(), 201); EXPECT_EQ(iter_->sample_offset(), 10000); EXPECT_EQ(iter_->GetMaxClearOffset(), 201); - EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, base::size(kAuxInfo))); + EXPECT_TRUE(iter_->CacheAuxInfo(kAuxInfo, std::size(kAuxInfo))); EXPECT_EQ(iter_->GetMaxClearOffset(), 10000); } @@ -1029,17 +1025,17 @@ EXPECT_EQ(iter_->sample_offset(), 200); std::unique_ptr<DecryptConfig> config = iter_->GetDecryptConfig(); EXPECT_EQ( - std::string(reinterpret_cast<const char*>(kKeyId), base::size(kKeyId)), + std::string(reinterpret_cast<const char*>(kKeyId), std::size(kKeyId)), config->key_id()); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), base::size(kIv3)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), std::size(kIv3)), config->iv()); EXPECT_TRUE(config->subsamples().empty()); iter_->AdvanceSample(); config = iter_->GetDecryptConfig(); EXPECT_EQ( - std::string(reinterpret_cast<const char*>(kKeyId), base::size(kKeyId)), + std::string(reinterpret_cast<const char*>(kKeyId), std::size(kKeyId)), config->key_id()); - EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), base::size(kIv3)), + EXPECT_EQ(std::string(reinterpret_cast<const char*>(kIv3), std::size(kIv3)), config->iv()); EXPECT_TRUE(config->subsamples().empty()); } @@ -1061,7 +1057,7 @@ // Associated with the 1st entry in track SampleGroupDescription Box. {1, 1}}; AddCencSampleGroup(&moov_.tracks[1], &moof.tracks[1], kSampleToGroupTable, - base::size(kSampleToGroupTable)); + std::size(kSampleToGroupTable)); AddConstantIvsToCencSampleGroup(&moov_.tracks[1], &moof.tracks[1]); iter_.reset(new TrackRunIterator(&moov_, &media_log_)); ASSERT_TRUE(iter_->Init(moof)); @@ -1069,9 +1065,9 @@ // The run for track 2 will be the second. iter_->AdvanceRun(); - std::string track_encryption_iv(kIv3, kIv3 + base::size(kIv3)); - std::string track_cenc_sample_group_iv(kIv4, kIv4 + base::size(kIv4)); - std::string fragment_cenc_sample_group_iv(kIv5, kIv5 + base::size(kIv5)); + std::string track_encryption_iv(kIv3, kIv3 + std::size(kIv3)); + std::string track_cenc_sample_group_iv(kIv4, kIv4 + std::size(kIv4)); + std::string fragment_cenc_sample_group_iv(kIv5, kIv5 + std::size(kIv5)); for (size_t i = 0; i < kSampleToGroupTable[0].sample_count; ++i) { EXPECT_TRUE(iter_->is_encrypted());
diff --git a/media/formats/mpeg/adts_constants.cc b/media/formats/mpeg/adts_constants.cc index cfb159ab..db82ac81 100644 --- a/media/formats/mpeg/adts_constants.cc +++ b/media/formats/mpeg/adts_constants.cc
@@ -4,7 +4,7 @@ #include "media/formats/mpeg/adts_constants.h" -#include "base/cxx17_backports.h" +#include <iterator> namespace media { @@ -13,7 +13,7 @@ const int kADTSFrequencyTable[] = {96000, 88200, 64000, 48000, 44100, 32000, 24000, 22050, 16000, 12000, 11025, 8000, 7350}; -const size_t kADTSFrequencyTableSize = base::size(kADTSFrequencyTable); +const size_t kADTSFrequencyTableSize = std::size(kADTSFrequencyTable); // The following conversion table is extracted from ISO 14496 Part 3 - // Table 1.17 - Channel Configuration. @@ -22,6 +22,6 @@ media::CHANNEL_LAYOUT_STEREO, media::CHANNEL_LAYOUT_SURROUND, media::CHANNEL_LAYOUT_4_0, media::CHANNEL_LAYOUT_5_0_BACK, media::CHANNEL_LAYOUT_5_1_BACK, media::CHANNEL_LAYOUT_7_1}; -const size_t kADTSChannelLayoutTableSize = base::size(kADTSChannelLayoutTable); +const size_t kADTSChannelLayoutTableSize = std::size(kADTSChannelLayoutTable); } // namespace media
diff --git a/media/formats/webm/webm_cluster_parser.cc b/media/formats/webm/webm_cluster_parser.cc index b76dc69..b8457fc5 100644 --- a/media/formats/webm/webm_cluster_parser.cc +++ b/media/formats/webm/webm_cluster_parser.cc
@@ -8,7 +8,6 @@ #include <utility> #include <vector> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/numerics/checked_math.h" #include "base/sys_byteorder.h" @@ -243,7 +242,7 @@ int opusConfig = (data[0] & kTocConfigMask) >> 3; CHECK_GE(opusConfig, 0); - CHECK_LT(opusConfig, static_cast<int>(base::size(kOpusFrameDurationsMu))); + CHECK_LT(opusConfig, static_cast<int>(std::size(kOpusFrameDurationsMu))); DCHECK_GT(frame_count, 0); base::TimeDelta duration =
diff --git a/media/formats/webm/webm_cluster_parser_unittest.cc b/media/formats/webm/webm_cluster_parser_unittest.cc index f761171b..13b24dbf 100644 --- a/media/formats/webm/webm_cluster_parser_unittest.cc +++ b/media/formats/webm/webm_cluster_parser_unittest.cc
@@ -14,7 +14,6 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "media/base/audio_decoder_config.h" @@ -414,9 +413,8 @@ 9, // Cluster end emits all buffers and 3rd video's duration is estimated }; - ASSERT_EQ(base::size(kBlockInfo), - base::size(kExpectedBuffersOnPartialCluster)); - int block_count = base::size(kBlockInfo); + ASSERT_EQ(std::size(kBlockInfo), std::size(kExpectedBuffersOnPartialCluster)); + int block_count = std::size(kBlockInfo); // Iteratively create a cluster containing the first N+1 blocks and parse all // but the last byte of the cluster (except when N==|block_count|, just parse @@ -462,7 +460,7 @@ TEST_F(WebMClusterParserTest, Reset) { InSequence s; - int block_count = base::size(kDefaultBlockInfo); + int block_count = std::size(kDefaultBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kDefaultBlockInfo, block_count)); @@ -482,7 +480,7 @@ } TEST_F(WebMClusterParserTest, ParseClusterWithSingleCall) { - int block_count = base::size(kDefaultBlockInfo); + int block_count = std::size(kDefaultBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kDefaultBlockInfo, block_count)); @@ -492,7 +490,7 @@ } TEST_F(WebMClusterParserTest, ParseClusterWithMultipleCalls) { - int block_count = base::size(kDefaultBlockInfo); + int block_count = std::size(kDefaultBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kDefaultBlockInfo, block_count)); @@ -538,7 +536,7 @@ {kAudioTrackNum, 0, 23, false, NULL, 0, true}, {kVideoTrackNum, 33, 34, false, NULL, 0, true}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); const uint8_t kClusterData[] = { 0x1F, 0x43, 0xB6, 0x75, 0x9B, // Cluster(size=27) @@ -567,7 +565,7 @@ {kAudioTrackNum, 46, 23, false, NULL, 0, false}, {kVideoTrackNum, 67, 33, false, NULL, 0, false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); int result = parser_->Parse(cluster->data(), cluster->size()); @@ -589,7 +587,7 @@ {kAudioTrackNum, 46, 23, true, NULL, 0, false}, {kVideoTrackNum, 67, 34, true, NULL, 0, false}, }; - int input_block_count = base::size(kInputBlockInfo); + int input_block_count = std::size(kInputBlockInfo); const BlockInfo kOutputBlockInfo[] = { {kAudioTrackNum, 0, 23, true, NULL, 0, false}, @@ -598,7 +596,7 @@ {kAudioTrackNum, 46, 23, true, NULL, 0, false}, {kVideoTrackNum, 67, 34, true, NULL, 0, false}, }; - int output_block_count = base::size(kOutputBlockInfo); + int output_block_count = std::size(kOutputBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kInputBlockInfo, input_block_count)); @@ -629,7 +627,7 @@ {kTextTrackNum, 55, 44, false, NULL, 0, true}, {kVideoTrackNum, 67, 34, true, NULL, 0, false}, }; - int input_block_count = base::size(kInputBlockInfo); + int input_block_count = std::size(kInputBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kInputBlockInfo, input_block_count)); @@ -654,7 +652,7 @@ const BlockInfo kInputBlockInfo[] = { { kTextTrackNum, 33, 42, true }, }; - int input_block_count = base::size(kInputBlockInfo); + int input_block_count = std::size(kInputBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kInputBlockInfo, input_block_count)); @@ -690,7 +688,7 @@ {kVideoTrackNum, 67, 34, true, NULL, 0, false}, {kSubtitleTextTrackNum, 67, 33, false, NULL, 0, false}, }; - int input_block_count = base::size(kInputBlockInfo); + int input_block_count = std::size(kInputBlockInfo); std::unique_ptr<Cluster> cluster( CreateCluster(0, kInputBlockInfo, input_block_count)); @@ -774,7 +772,7 @@ const BlockInfo kBlockInfo[] = { {kTextTrackNum, 33, -42, false, NULL, 0, false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); int result = parser_->Parse(cluster->data(), cluster->size()); EXPECT_LT(result, 0); @@ -804,7 +802,7 @@ false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); // Send slightly less than the full cluster so all but the last block is @@ -844,7 +842,7 @@ {kVideoTrackNum, 100, kExpectedVideoEstimationInMs, true, NULL, 0, false}, }; - int block_count1 = base::size(kBlockInfo1); + int block_count1 = std::size(kBlockInfo1); std::unique_ptr<Cluster> cluster1( CreateCluster(0, kBlockInfo1, block_count1)); @@ -882,7 +880,7 @@ {kVideoTrackNum, 201, kExpectedVideoEstimationInMs, true, NULL, 0, false}, }; - int block_count2 = base::size(kBlockInfo2); + int block_count2 = std::size(kBlockInfo2); std::unique_ptr<Cluster> cluster2( CreateCluster(0, kBlockInfo2, block_count2)); EXPECT_MEDIA_LOG( @@ -916,7 +914,7 @@ false}, }; - int block_count1 = base::size(kBlockInfo1); + int block_count1 = std::size(kBlockInfo1); std::unique_ptr<Cluster> cluster1( CreateCluster(0, kBlockInfo1, block_count1)); @@ -954,7 +952,7 @@ false}, }; - int block_count2 = base::size(kBlockInfo2); + int block_count2 = std::size(kBlockInfo2); std::unique_ptr<Cluster> cluster2( CreateCluster(0, kBlockInfo2, block_count2)); EXPECT_MEDIA_LOG( @@ -992,7 +990,7 @@ false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); // Send slightly less than the full cluster so all but the last block is @@ -1027,7 +1025,7 @@ {kAudioTrackNum, -23, 5, false, NULL, 0, false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); // Using 0 for cluster timecode will make each of the blocks, above, use a // negative relative timecode to achieve the desired negative block // timestamps. @@ -1070,7 +1068,7 @@ {kAudioTrackNum, -25, 23, true, NULL, 0, false}, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); // Using 0 for cluster timecode will make each of the blocks, above, use a // negative relative timecode to achieve the desired negative block // timestamps. @@ -1115,7 +1113,7 @@ }, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); EXPECT_MEDIA_LOG(WebMSimpleBlockDurationEstimated( WebMClusterParser::kDefaultAudioBufferDurationInMs)); @@ -1135,7 +1133,7 @@ { kVideoTrackNum, 0, kTestVideoFrameDefaultDurationInMs, true }, }; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); int result = parser_->Parse(cluster->data(), cluster->size()); EXPECT_EQ(cluster->size(), result); @@ -1158,7 +1156,7 @@ packet_ptr->data(), packet_ptr->size()}}; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); int duration_ms = packet_ptr->duration_ms(); // Casts from double. if (duration_ms > 120) { @@ -1204,7 +1202,7 @@ packet_ptr->data(), packet_ptr->size()}}; - int block_count = base::size(block_infos); + int block_count = std::size(block_infos); std::unique_ptr<Cluster> cluster( CreateCluster(0, block_infos, block_count)); int result = parser_->Parse(cluster->data(), cluster->size()); @@ -1242,9 +1240,9 @@ kTestAudioFrameDefaultDurationInMs, false, // Not a SimpleBlock kEncryptedFrame, // Encrypted frame data - base::size(kEncryptedFrame)}}; + std::size(kEncryptedFrame)}}; - int block_count = base::size(kBlockInfo); + int block_count = std::size(kBlockInfo); std::unique_ptr<Cluster> cluster(CreateCluster(0, kBlockInfo, block_count)); int result = parser_->Parse(cluster->data(), cluster->size()); EXPECT_EQ(cluster->size(), result);
diff --git a/media/formats/webm/webm_parser.cc b/media/formats/webm/webm_parser.cc index d9c4e679..80c713d0 100644 --- a/media/formats/webm/webm_parser.cc +++ b/media/formats/webm/webm_parser.cc
@@ -382,7 +382,7 @@ }; #define LIST_ELEMENT_INFO(id, level, id_info) \ - { (id), (level), (id_info), base::size(id_info) } + { (id), (level), (id_info), std::size(id_info) } static const ListElementInfo kListElementInfo[] = { LIST_ELEMENT_INFO(kWebMIdCluster, 1, kClusterIds), @@ -557,7 +557,7 @@ // Finds ListElementInfo for a specific ID. static const ListElementInfo* FindListInfo(int id) { - for (size_t i = 0; i < base::size(kListElementInfo); ++i) { + for (size_t i = 0; i < std::size(kListElementInfo); ++i) { if (id == kListElementInfo[i].id_) return &kListElementInfo[i]; } @@ -982,7 +982,7 @@ bool WebMListParser::IsSiblingOrAncestor(int id_a, int id_b) const { if (id_a == kWebMIdCluster) { // kWebMIdCluster siblings. - for (size_t i = 0; i < base::size(kSegmentIds); i++) { + for (size_t i = 0; i < std::size(kSegmentIds); i++) { if (kSegmentIds[i].id_ == id_b) return true; }
diff --git a/media/formats/webm/webm_parser_unittest.cc b/media/formats/webm/webm_parser_unittest.cc index d1f74db7..173d27492 100644 --- a/media/formats/webm/webm_parser_unittest.cc +++ b/media/formats/webm/webm_parser_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "media/formats/webm/cluster_builder.h" #include "media/formats/webm/webm_constants.h" #include "testing/gmock/include/gmock/gmock.h" @@ -346,7 +345,7 @@ const uint8_t* kBuffers[] = {k1ByteReservedId, k2ByteReservedId, k3ByteReservedId, k4ByteReservedId}; - for (size_t i = 0; i < base::size(kBuffers); i++) { + for (size_t i = 0; i < std::size(kBuffers); i++) { int id; int64_t element_size; int buffer_size = 2 + i; @@ -374,7 +373,7 @@ k5ByteReservedSize, k6ByteReservedSize, k7ByteReservedSize, k8ByteReservedSize}; - for (size_t i = 0; i < base::size(kBuffers); i++) { + for (size_t i = 0; i < std::size(kBuffers); i++) { int id; int64_t element_size; int buffer_size = 2 + i;
diff --git a/media/formats/webm/webm_tracks_parser_unittest.cc b/media/formats/webm/webm_tracks_parser_unittest.cc index ed6c2fc..985b3b9 100644 --- a/media/formats/webm/webm_tracks_parser_unittest.cc +++ b/media/formats/webm/webm_tracks_parser_unittest.cc
@@ -283,7 +283,7 @@ std::unique_ptr<WebMTracksParser> parser( new WebMTracksParser(&media_log_, false)); - for (size_t i = 0; i < base::size(kCappingCases); ++i) { + for (size_t i = 0; i < std::size(kCappingCases); ++i) { InSequence s; int64_t scale_ns = kCappingCases[i].scale_ns; int64_t duration_ns = kCappingCases[i].duration_ns;
diff --git a/media/gpu/av1_decoder_unittest.cc b/media/gpu/av1_decoder_unittest.cc index 4831d06..8626690 100644 --- a/media/gpu/av1_decoder_unittest.cc +++ b/media/gpu/av1_decoder_unittest.cc
@@ -512,7 +512,7 @@ constexpr gfx::Size kRenderSizes[] = {{320, 240}, {480, 360}}; std::vector<DecodeResult> expected; std::vector<DecodeResult> results; - for (size_t i = 0; i < base::size(kSimpleStreams); ++i) { + for (size_t i = 0; i < std::size(kSimpleStreams); ++i) { std::vector<scoped_refptr<DecoderBuffer>> buffers = ReadWebm(kSimpleStreams[i]); ASSERT_FALSE(buffers.empty()); @@ -611,7 +611,7 @@ std::vector<DecodeResult> expected; std::vector<DecodeResult> results; - for (size_t i = 0; i < base::size(kSimpleStreams); ++i) { + for (size_t i = 0; i < std::size(kSimpleStreams); ++i) { std::vector<scoped_refptr<DecoderBuffer>> buffers = ReadWebm(kSimpleStreams[i]); ASSERT_FALSE(buffers.empty());
diff --git a/media/gpu/chromeos/video_decoder_pipeline_unittest.cc b/media/gpu/chromeos/video_decoder_pipeline_unittest.cc index 3ff15042..ce48063 100644 --- a/media/gpu/chromeos/video_decoder_pipeline_unittest.cc +++ b/media/gpu/chromeos/video_decoder_pipeline_unittest.cc
@@ -243,9 +243,9 @@ EXPECT_CALL(cdm_context_, GetDecryptor()) .WillRepeatedly(Return(&decryptor_)); encrypted_buffer_ = - DecoderBuffer::CopyFrom(kEncryptedData, base::size(kEncryptedData)); + DecoderBuffer::CopyFrom(kEncryptedData, std::size(kEncryptedData)); transcrypted_buffer_ = DecoderBuffer::CopyFrom( - kTranscryptedData, base::size(kTranscryptedData)); + kTranscryptedData, std::size(kTranscryptedData)); } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -468,7 +468,7 @@ TEST_F(VideoDecoderPipelineTest, TranscryptReset) { InitializeForTranscrypt(); scoped_refptr<DecoderBuffer> encrypted_buffer2 = DecoderBuffer::CopyFrom( - &kEncryptedData[1], base::size(kEncryptedData) - 1); + &kEncryptedData[1], std::size(kEncryptedData) - 1); // Send in a buffer, but don't invoke the Decrypt callback so it stays as // pending. Then send in 2 more buffers so they are in the queue. EXPECT_CALL(decryptor_, Decrypt(Decryptor::kVideo, encrypted_buffer_, _))
diff --git a/media/gpu/gpu_video_encode_accelerator_helpers.cc b/media/gpu/gpu_video_encode_accelerator_helpers.cc index 4e1ba46f..a33186d2 100644 --- a/media/gpu/gpu_video_encode_accelerator_helpers.cc +++ b/media/gpu/gpu_video_encode_accelerator_helpers.cc
@@ -73,8 +73,8 @@ }; CHECK_GT(num_temporal_layers, 0u); - CHECK_LE(num_temporal_layers, base::size(kTemporalLayersBitrateScaleFactors)); - DCHECK_EQ(base::size(kTemporalLayersBitrateScaleFactors), kMaxTemporalLayers); + CHECK_LE(num_temporal_layers, std::size(kTemporalLayersBitrateScaleFactors)); + DCHECK_EQ(std::size(kTemporalLayersBitrateScaleFactors), kMaxTemporalLayers); VideoBitrateAllocation bitrate_allocation; for (size_t spatial_id = 0; spatial_id < sl_bitrates.size(); ++spatial_id) { @@ -187,8 +187,8 @@ }; CHECK_GT(num_spatial_layers, 0u); - CHECK_LE(num_spatial_layers, base::size(kSpatialLayersBitrateScaleFactors)); - DCHECK_EQ(base::size(kSpatialLayersBitrateScaleFactors), kMaxSpatialLayers); + CHECK_LE(num_spatial_layers, std::size(kSpatialLayersBitrateScaleFactors)); + DCHECK_EQ(std::size(kSpatialLayersBitrateScaleFactors), kMaxSpatialLayers); std::vector<uint32_t> bitrates(num_spatial_layers); for (size_t sid = 0; sid < num_spatial_layers; ++sid) {
diff --git a/media/gpu/h264_decoder.cc b/media/gpu/h264_decoder.cc index 1090496..942dcde 100644 --- a/media/gpu/h264_decoder.cc +++ b/media/gpu/h264_decoder.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/gpu/h264_decoder.h" + #include <algorithm> #include <limits> #include <memory> #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "media/base/media_switches.h" -#include "media/gpu/h264_decoder.h" #include "media/video/h264_level_limits.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -817,7 +817,7 @@ bool H264Decoder::HandleMemoryManagementOps(scoped_refptr<H264Picture> pic) { // 8.2.5.4 - for (size_t i = 0; i < base::size(pic->ref_pic_marking); ++i) { + for (size_t i = 0; i < std::size(pic->ref_pic_marking); ++i) { // Code below does not support interlaced stream (per-field pictures). H264DecRefPicMarking* ref_pic_marking = &pic->ref_pic_marking[i]; scoped_refptr<H264Picture> to_mark;
diff --git a/media/gpu/ipc/service/vda_video_decoder_unittest.cc b/media/gpu/ipc/service/vda_video_decoder_unittest.cc index 111ea51..4755884 100644 --- a/media/gpu/ipc/service/vda_video_decoder_unittest.cc +++ b/media/gpu/ipc/service/vda_video_decoder_unittest.cc
@@ -7,7 +7,6 @@ #include <stdint.h> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" @@ -48,7 +47,7 @@ namespace { constexpr uint8_t kData[] = "foo"; -constexpr size_t kDataSize = base::size(kData); +constexpr size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> CreateDecoderBuffer(base::TimeDelta timestamp) { scoped_refptr<DecoderBuffer> buffer =
diff --git a/media/gpu/test/video_player/frame_renderer_thumbnail.cc b/media/gpu/test/video_player/frame_renderer_thumbnail.cc index 8088742d..973f5a85 100644 --- a/media/gpu/test/video_player/frame_renderer_thumbnail.cc +++ b/media/gpu/test/video_player/frame_renderer_thumbnail.cc
@@ -122,7 +122,7 @@ glGetShaderiv(shader, GL_COMPILE_STATUS, &result); if (!result) { char log[4096]; - glGetShaderInfoLog(shader, base::size(log), nullptr, log); + glGetShaderInfoLog(shader, std::size(log), nullptr, log); LOG(FATAL) << log; } glAttachShader(program, shader); @@ -388,9 +388,9 @@ program_ = glCreateProgram(); CreateShader(program_, GL_VERTEX_SHADER, kVertexShader, - base::size(kVertexShader)); + std::size(kVertexShader)); CreateShader(program_, GL_FRAGMENT_SHADER, kFragmentShader, - base::size(kFragmentShader)); + std::size(kFragmentShader)); glLinkProgram(program_); GLint result = GL_FALSE; glGetProgramiv(program_, GL_LINK_STATUS, &result);
diff --git a/media/gpu/v4l2/generic_v4l2_device.cc b/media/gpu/v4l2/generic_v4l2_device.cc index b64c9bd..a6fe9d9 100644 --- a/media/gpu/v4l2/generic_v4l2_device.cc +++ b/media/gpu/v4l2/generic_v4l2_device.cc
@@ -18,7 +18,6 @@ #include <algorithm> #include <memory> -#include "base/cxx17_backports.h" #include "base/files/scoped_file.h" #include "base/posix/eintr_wrapper.h" #include "base/strings/stringprintf.h" @@ -233,9 +232,9 @@ return std::find( kEGLImageDrmFmtsSupported, - kEGLImageDrmFmtsSupported + base::size(kEGLImageDrmFmtsSupported), + kEGLImageDrmFmtsSupported + std::size(kEGLImageDrmFmtsSupported), V4L2PixFmtToDrmFormat(fourcc.ToV4L2PixFmt())) != - kEGLImageDrmFmtsSupported + base::size(kEGLImageDrmFmtsSupported); + kEGLImageDrmFmtsSupported + std::size(kEGLImageDrmFmtsSupported); } EGLImageKHR GenericV4L2Device::CreateEGLImage(
diff --git a/media/gpu/v4l2/test/vp9_decoder.cc b/media/gpu/v4l2/test/vp9_decoder.cc index 1ef78a5..7e98583 100644 --- a/media/gpu/v4l2/test/vp9_decoder.cc +++ b/media/gpu/v4l2/test/vp9_decoder.cc
@@ -513,7 +513,7 @@ constexpr uint64_t kInvalidSurface = std::numeric_limits<uint32_t>::max(); - for (size_t i = 0; i < base::size(frame_hdr.ref_frame_idx); ++i) { + for (size_t i = 0; i < std::size(frame_hdr.ref_frame_idx); ++i) { const auto idx = frame_hdr.ref_frame_idx[i]; LOG_ASSERT(idx < kVp9NumRefFrames) << "Invalid reference frame index.\n";
diff --git a/media/gpu/v4l2/v4l2_device.cc b/media/gpu/v4l2/v4l2_device.cc index 647d36e0..de2800fd 100644 --- a/media/gpu/v4l2/v4l2_device.cc +++ b/media/gpu/v4l2/v4l2_device.cc
@@ -208,7 +208,7 @@ size_t buffer_id) : device_(device), format_(format) { DCHECK(V4L2_TYPE_IS_MULTIPLANAR(type)); - DCHECK_LE(format.fmt.pix_mp.num_planes, base::size(v4l2_planes_)); + DCHECK_LE(format.fmt.pix_mp.num_planes, std::size(v4l2_planes_)); memset(&v4l2_buffer_, 0, sizeof(v4l2_buffer_)); memset(v4l2_planes_, 0, sizeof(v4l2_planes_)); @@ -216,7 +216,7 @@ // Just in case we got more planes than we want. v4l2_buffer_.length = std::min(static_cast<size_t>(format.fmt.pix_mp.num_planes), - base::size(v4l2_planes_)); + std::size(v4l2_planes_)); v4l2_buffer_.index = buffer_id; v4l2_buffer_.type = type; v4l2_buffer_.memory = memory; @@ -452,7 +452,7 @@ : queue_(std::move(queue)), return_to_(queue_->free_buffers_) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(V4L2_TYPE_IS_MULTIPLANAR(v4l2_buffer.type)); - DCHECK_LE(v4l2_buffer.length, base::size(v4l2_planes_)); + DCHECK_LE(v4l2_buffer.length, std::size(v4l2_planes_)); DCHECK(return_to_); memcpy(&v4l2_buffer_, &v4l2_buffer, sizeof(v4l2_buffer_));
diff --git a/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc b/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc index 70c6599..fd67d728 100644 --- a/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_jpeg_encode_accelerator.cc
@@ -493,7 +493,7 @@ buffer.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; buffer.memory = V4L2_MEMORY_MMAP; buffer.m.planes = planes; - buffer.length = base::size(planes); + buffer.length = std::size(planes); IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYBUF, &buffer); if (input_buffer_num_planes_ != buffer.length) { @@ -544,7 +544,7 @@ buffer.index = i; buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; buffer.m.planes = planes; - buffer.length = base::size(planes); + buffer.length = std::size(planes); buffer.memory = V4L2_MEMORY_MMAP; IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYBUF, &buffer); if (buffer.length != kMaxJpegPlane) { @@ -727,7 +727,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; qbuf.memory = V4L2_MEMORY_MMAP; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); for (size_t i = 0; i < input_buffer_num_planes_; i++) { // sets this to 0 means the size of the plane. planes[i].bytesused = 0; @@ -757,7 +757,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; qbuf.memory = V4L2_MEMORY_MMAP; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); qbuf.m.planes = planes; IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QBUF, &qbuf); output_record.at_device = true; @@ -851,7 +851,7 @@ memset(planes, 0, sizeof(planes)); dqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; dqbuf.memory = V4L2_MEMORY_MMAP; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) { @@ -886,7 +886,7 @@ memset(planes, 0, sizeof(planes)); dqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; dqbuf.memory = V4L2_MEMORY_MMAP; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) { @@ -1517,7 +1517,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; qbuf.memory = V4L2_MEMORY_DMABUF; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); qbuf.m.planes = planes; const auto& frame = job_record->input_frame; @@ -1560,7 +1560,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; qbuf.memory = V4L2_MEMORY_DMABUF; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); qbuf.m.planes = planes; auto& job_record = running_job_queue_.back(); @@ -1737,7 +1737,7 @@ memset(planes, 0, sizeof(planes)); dqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; dqbuf.memory = V4L2_MEMORY_DMABUF; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) { @@ -1769,7 +1769,7 @@ memset(planes, 0, sizeof(planes)); dqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; dqbuf.memory = V4L2_MEMORY_DMABUF; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) {
diff --git a/media/gpu/v4l2/v4l2_mjpeg_decode_accelerator.cc b/media/gpu/v4l2/v4l2_mjpeg_decode_accelerator.cc index a16ce3f..7f9fe1b8 100644 --- a/media/gpu/v4l2/v4l2_mjpeg_decode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_mjpeg_decode_accelerator.cc
@@ -16,7 +16,6 @@ #include "base/big_endian.h" #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/files/scoped_file.h" #include "base/memory/page_size.h" #include "base/numerics/safe_conversions.h" @@ -589,7 +588,7 @@ buffer.index = i; buffer.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; buffer.m.planes = planes; - buffer.length = base::size(planes); + buffer.length = std::size(planes); buffer.memory = V4L2_MEMORY_MMAP; IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYBUF, &buffer); if (buffer.length != kMaxInputPlanes) { @@ -667,7 +666,7 @@ buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; buffer.memory = V4L2_MEMORY_MMAP; buffer.m.planes = planes; - buffer.length = base::size(planes); + buffer.length = std::size(planes); IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QUERYBUF, &buffer); if (output_buffer_num_planes_ != buffer.length) { @@ -1034,7 +1033,7 @@ memset(planes, 0, sizeof(planes)); dqbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; dqbuf.memory = V4L2_MEMORY_MMAP; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) { @@ -1071,7 +1070,7 @@ // USERPTR. Also, client doesn't need to consider the buffer alignment and // MjpegDecodeAccelerator API will be simpler. dqbuf.memory = V4L2_MEMORY_MMAP; - dqbuf.length = base::size(planes); + dqbuf.length = std::size(planes); dqbuf.m.planes = planes; if (device_->Ioctl(VIDIOC_DQBUF, &dqbuf) != 0) { if (errno == EAGAIN) { @@ -1223,7 +1222,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; qbuf.memory = V4L2_MEMORY_MMAP; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); // There is only one plane for V4L2_PIX_FMT_JPEG. planes[0].bytesused = input_record.length[0]; qbuf.m.planes = planes; @@ -1251,7 +1250,7 @@ qbuf.index = index; qbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; qbuf.memory = V4L2_MEMORY_MMAP; - qbuf.length = base::size(planes); + qbuf.length = std::size(planes); qbuf.m.planes = planes; IOCTL_OR_ERROR_RETURN_FALSE(VIDIOC_QBUF, &qbuf); output_record.at_device = true;
diff --git a/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc index c1f9c6c..55b1173 100644 --- a/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_slice_video_decode_accelerator.cc
@@ -20,7 +20,6 @@ #include "base/callback.h" #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/numerics/safe_conversions.h" #include "base/posix/eintr_wrapper.h" @@ -2201,8 +2200,8 @@ if (!device) return SupportedProfiles(); - return device->GetSupportedDecodeProfiles( - base::size(supported_input_fourccs_), supported_input_fourccs_); + return device->GetSupportedDecodeProfiles(std::size(supported_input_fourccs_), + supported_input_fourccs_); } bool V4L2SliceVideoDecodeAccelerator::IsSupportedProfile( @@ -2412,10 +2411,10 @@ memset(&v4l2_buffer, 0, sizeof(v4l2_buffer)); struct v4l2_plane v4l2_planes[VIDEO_MAX_PLANES]; memset(v4l2_planes, 0, sizeof(v4l2_planes)); - DCHECK_LT(output_planes_count_, base::size(v4l2_planes)); + DCHECK_LT(output_planes_count_, std::size(v4l2_planes)); v4l2_buffer.m.planes = v4l2_planes; v4l2_buffer.length = - std::min(output_planes_count_, base::size(v4l2_planes)); + std::min(output_planes_count_, std::size(v4l2_planes)); v4l2_buffer.index = index; v4l2_buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; v4l2_buffer.memory = V4L2_MEMORY_MMAP;
diff --git a/media/gpu/v4l2/v4l2_stateful_workaround.cc b/media/gpu/v4l2/v4l2_stateful_workaround.cc index 4a1e156..cb52bc3 100644 --- a/media/gpu/v4l2/v4l2_stateful_workaround.cc +++ b/media/gpu/v4l2/v4l2_stateful_workaround.cc
@@ -175,7 +175,7 @@ // we are about to query the supported decode profiles. device = V4L2Device::Create(); auto supported_profiles = device->GetSupportedDecodeProfiles( - base::size(supported_input_fourccs), supported_input_fourccs); + std::size(supported_input_fourccs), supported_input_fourccs); SupportedProfileMap supported_profile_map; for (const auto& entry : supported_profiles) supported_profile_map[entry.profile] = entry;
diff --git a/media/gpu/v4l2/v4l2_stateful_workaround_unittest.cc b/media/gpu/v4l2/v4l2_stateful_workaround_unittest.cc index 303a00f..9a4dc99 100644 --- a/media/gpu/v4l2/v4l2_stateful_workaround_unittest.cc +++ b/media/gpu/v4l2/v4l2_stateful_workaround_unittest.cc
@@ -37,7 +37,7 @@ 0x01020304 // 4 byte }; - constexpr size_t kNumFrames = base::size(kFrameSizes); + constexpr size_t kNumFrames = std::size(kFrameSizes); for (size_t mask = 1; mask < (1 << kNumFrames) - 1; mask++) { size_t buffer_size = 0; size_t expected_bytes_per_framesize = 0;
diff --git a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc index 218ba100..0cc3496 100644 --- a/media/gpu/v4l2/v4l2_video_decode_accelerator.cc +++ b/media/gpu/v4l2/v4l2_video_decode_accelerator.cc
@@ -17,7 +17,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/numerics/safe_conversions.h" #include "base/posix/eintr_wrapper.h" #include "base/strings/stringprintf.h" @@ -854,8 +853,8 @@ if (!device) return SupportedProfiles(); - return device->GetSupportedDecodeProfiles( - base::size(supported_input_fourccs_), supported_input_fourccs_); + return device->GetSupportedDecodeProfiles(std::size(supported_input_fourccs_), + supported_input_fourccs_); } void V4L2VideoDecodeAccelerator::DecodeTask(scoped_refptr<DecoderBuffer> buffer,
diff --git a/media/gpu/v4l2/v4l2_video_decoder.cc b/media/gpu/v4l2/v4l2_video_decoder.cc index 2c7649d..057b286 100644 --- a/media/gpu/v4l2/v4l2_video_decoder.cc +++ b/media/gpu/v4l2/v4l2_video_decoder.cc
@@ -87,7 +87,7 @@ return absl::nullopt; auto configs = device->GetSupportedDecodeProfiles( - base::size(kSupportedInputFourccs), kSupportedInputFourccs); + std::size(kSupportedInputFourccs), kSupportedInputFourccs); if (configs.empty()) return absl::nullopt;
diff --git a/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc b/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc index 7b238d9..87d4f15 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_backend_stateful.cc
@@ -736,7 +736,7 @@ }; scoped_refptr<V4L2Device> device = V4L2Device::Create(); VideoDecodeAccelerator::SupportedProfiles profiles = - device->GetSupportedDecodeProfiles(base::size(kSupportedInputFourccs), + device->GetSupportedDecodeProfiles(std::size(kSupportedInputFourccs), kSupportedInputFourccs); for (const auto& entry : profiles) supported_profiles_.push_back(entry.profile);
diff --git a/media/gpu/v4l2/v4l2_video_decoder_backend_stateless.cc b/media/gpu/v4l2/v4l2_video_decoder_backend_stateless.cc index 9fbdfeb..5c2ff7b 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_backend_stateless.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_backend_stateless.cc
@@ -671,7 +671,7 @@ }; scoped_refptr<V4L2Device> device = V4L2Device::Create(); VideoDecodeAccelerator::SupportedProfiles profiles = - device->GetSupportedDecodeProfiles(base::size(kSupportedInputFourccs), + device->GetSupportedDecodeProfiles(std::size(kSupportedInputFourccs), kSupportedInputFourccs); for (const auto& entry : profiles) supported_profiles_.push_back(entry.profile);
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_h264.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_h264.cc index eca47a8..2edd3f76 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_h264.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_h264.cc
@@ -72,7 +72,7 @@ memset(priv_->v4l2_decode_param.dpb, 0, sizeof(priv_->v4l2_decode_param.dpb)); size_t i = 0; for (const auto& pic : dpb) { - if (i >= base::size(priv_->v4l2_decode_param.dpb)) { + if (i >= std::size(priv_->v4l2_decode_param.dpb)) { VLOGF(1) << "Invalid DPB size"; break; } @@ -142,7 +142,7 @@ static_assert(std::extent<decltype(v4l2_sps.offset_for_ref_frame)>() == std::extent<decltype(sps->offset_for_ref_frame)>(), "offset_for_ref_frame arrays must be same size"); - for (size_t i = 0; i < base::size(v4l2_sps.offset_for_ref_frame); ++i) { + for (size_t i = 0; i < std::size(v4l2_sps.offset_for_ref_frame); ++i) { v4l2_sps.offset_for_ref_frame[i] = sps->offset_for_ref_frame[i]; } SPS_TO_V4L2SPS(max_num_ref_frames); @@ -243,16 +243,14 @@ scaling_list8x8 = &pps->scaling_list8x8[0]; } - for (size_t i = 0; i < base::size(v4l2_scaling_matrix.scaling_list_4x4); - ++i) { - for (size_t j = 0; j < base::size(v4l2_scaling_matrix.scaling_list_4x4[i]); + for (size_t i = 0; i < std::size(v4l2_scaling_matrix.scaling_list_4x4); ++i) { + for (size_t j = 0; j < std::size(v4l2_scaling_matrix.scaling_list_4x4[i]); ++j) { v4l2_scaling_matrix.scaling_list_4x4[i][j] = scaling_list4x4[i][j]; } } - for (size_t i = 0; i < base::size(v4l2_scaling_matrix.scaling_list_8x8); - ++i) { - for (size_t j = 0; j < base::size(v4l2_scaling_matrix.scaling_list_8x8[i]); + for (size_t i = 0; i < std::size(v4l2_scaling_matrix.scaling_list_8x8); ++i) { + for (size_t j = 0; j < std::size(v4l2_scaling_matrix.scaling_list_8x8[i]); ++j) { v4l2_scaling_matrix.scaling_list_8x8[i][j] = scaling_list8x8[i][j]; }
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_h264_legacy.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_h264_legacy.cc index 28b0c10..2957bee 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_h264_legacy.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_h264_legacy.cc
@@ -6,9 +6,9 @@ #include <linux/media/h264-ctrls-legacy.h> #include <linux/videodev2.h> + #include <type_traits> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "media/gpu/macros.h" #include "media/gpu/v4l2/v4l2_decode_surface.h" @@ -86,7 +86,7 @@ memset(priv_->v4l2_decode_param.dpb, 0, sizeof(priv_->v4l2_decode_param.dpb)); size_t i = 0; for (const auto& pic : dpb) { - if (i >= base::size(priv_->v4l2_decode_param.dpb)) { + if (i >= std::size(priv_->v4l2_decode_param.dpb)) { VLOGF(1) << "Invalid DPB size"; break; } @@ -153,7 +153,7 @@ static_assert(std::extent<decltype(v4l2_sps.offset_for_ref_frame)>() == std::extent<decltype(sps->offset_for_ref_frame)>(), "offset_for_ref_frame arrays must be same size"); - for (size_t i = 0; i < base::size(v4l2_sps.offset_for_ref_frame); ++i) + for (size_t i = 0; i < std::size(v4l2_sps.offset_for_ref_frame); ++i) v4l2_sps.offset_for_ref_frame[i] = sps->offset_for_ref_frame[i]; SPS_TO_V4L2SPS(max_num_ref_frames); SPS_TO_V4L2SPS(pic_width_in_mbs_minus1); @@ -253,16 +253,14 @@ scaling_list8x8 = &pps->scaling_list8x8[0]; } - for (size_t i = 0; i < base::size(v4l2_scaling_matrix.scaling_list_4x4); - ++i) { - for (size_t j = 0; j < base::size(v4l2_scaling_matrix.scaling_list_4x4[i]); + for (size_t i = 0; i < std::size(v4l2_scaling_matrix.scaling_list_4x4); ++i) { + for (size_t j = 0; j < std::size(v4l2_scaling_matrix.scaling_list_4x4[i]); ++j) { v4l2_scaling_matrix.scaling_list_4x4[i][j] = scaling_list4x4[i][j]; } } - for (size_t i = 0; i < base::size(v4l2_scaling_matrix.scaling_list_8x8); - ++i) { - for (size_t j = 0; j < base::size(v4l2_scaling_matrix.scaling_list_8x8[i]); + for (size_t i = 0; i < std::size(v4l2_scaling_matrix.scaling_list_8x8); ++i) { + for (size_t j = 0; j < std::size(v4l2_scaling_matrix.scaling_list_8x8[i]); ++j) { v4l2_scaling_matrix.scaling_list_8x8[i][j] = scaling_list8x8[i][j]; }
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8.cc index a435a80..085440f 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8.cc
@@ -179,7 +179,7 @@ std::extent<decltype(frame_hdr->dct_partition_sizes)>(), "DCT partition size arrays must have equal number of elements"); for (size_t i = 0; i < frame_hdr->num_of_dct_partitions && - i < base::size(v4l2_frame_hdr.dct_part_sizes); + i < std::size(v4l2_frame_hdr.dct_part_sizes); ++i) v4l2_frame_hdr.dct_part_sizes[i] = frame_hdr->dct_partition_sizes[i];
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8_legacy.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8_legacy.cc index 734b8d6..674e31c5 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8_legacy.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp8_legacy.cc
@@ -2,14 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "v4l2_video_decoder_delegate_vp8_legacy.h" - -#include <type_traits> - #include <linux/media/vp8-ctrls-legacy.h> #include <linux/videodev2.h> -#include "base/cxx17_backports.h" +#include <type_traits> + #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "media/gpu/macros.h" @@ -18,6 +15,7 @@ #include "media/gpu/v4l2/v4l2_device.h" #include "media/gpu/vp8_picture.h" #include "media/parsers/vp8_parser.h" +#include "v4l2_video_decoder_delegate_vp8_legacy.h" namespace media { namespace { @@ -176,7 +174,7 @@ std::extent<decltype(frame_hdr->dct_partition_sizes)>(), "DCT partition size arrays must have equal number of elements"); for (size_t i = 0; i < frame_hdr->num_of_dct_partitions && - i < base::size(v4l2_frame_hdr.dct_part_sizes); + i < std::size(v4l2_frame_hdr.dct_part_sizes); ++i) v4l2_frame_hdr.dct_part_sizes[i] = frame_hdr->dct_partition_sizes[i];
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_chromium.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_chromium.cc index eb513cc..488a614 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_chromium.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_chromium.cc
@@ -266,7 +266,7 @@ v4l2_frame_params.render_height_minus_1 = frame_hdr->render_height - 1; // Reference frames - for (size_t i = 0; i < base::size(frame_hdr->ref_frame_idx); i++) { + for (size_t i = 0; i < std::size(frame_hdr->ref_frame_idx); i++) { uint8_t idx = frame_hdr->ref_frame_idx[i]; if (idx >= kVp9NumRefFrames) { VLOGF(1) << "Invalid reference frame index!";
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_legacy.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_legacy.cc index 580614b..c944e83 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_legacy.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_legacy.cc
@@ -4,14 +4,14 @@ #include "media/gpu/v4l2/v4l2_video_decoder_delegate_vp9_legacy.h" -#include <type_traits> - +// Must come before linux/media/vp9-ctrls-legacy.h. #include <linux/videodev2.h> -#include <string.h> #include <linux/media/vp9-ctrls-legacy.h> +#include <string.h> -#include "base/cxx17_backports.h" +#include <type_traits> + #include "base/logging.h" #include "media/gpu/macros.h" #include "media/gpu/v4l2/v4l2_decode_surface.h" @@ -82,8 +82,8 @@ std::extent<decltype(v4l2_segm_params->feature_enabled[0])>() == std::extent<decltype(vp9_segm_params.feature_enabled[0])>(), "feature_enabled arrays must be of same size"); - for (size_t i = 0; i < base::size(v4l2_segm_params->feature_enabled); ++i) { - for (size_t j = 0; j < base::size(v4l2_segm_params->feature_enabled[i]); + for (size_t i = 0; i < std::size(v4l2_segm_params->feature_enabled); ++i) { + for (size_t j = 0; j < std::size(v4l2_segm_params->feature_enabled[i]); ++j) { v4l2_segm_params->feature_enabled[i][j] = vp9_segm_params.feature_enabled[i][j]; @@ -278,7 +278,7 @@ struct v4l2_ctrl_vp9_decode_param v4l2_decode_param; memset(&v4l2_decode_param, 0, sizeof(v4l2_decode_param)); - DCHECK_EQ(kVp9NumRefFrames, base::size(v4l2_decode_param.ref_frames)); + DCHECK_EQ(kVp9NumRefFrames, std::size(v4l2_decode_param.ref_frames)); std::vector<scoped_refptr<V4L2DecodeSurface>> ref_surfaces; for (size_t i = 0; i < kVp9NumRefFrames; ++i) { @@ -298,7 +298,7 @@ std::extent<decltype(frame_hdr->ref_frame_idx)>(), "active reference frame array sizes mismatch"); - for (size_t i = 0; i < base::size(frame_hdr->ref_frame_idx); ++i) { + for (size_t i = 0; i < std::size(frame_hdr->ref_frame_idx); ++i) { uint8_t idx = frame_hdr->ref_frame_idx[i]; if (idx >= kVp9NumRefFrames) return DecodeStatus::kFail;
diff --git a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc index 464fd67..d1cca9d 100644 --- a/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc +++ b/media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzertest.cc
@@ -10,7 +10,6 @@ #include <algorithm> #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "media/gpu/vaapi/fuzzers/jpeg_decoder/jpeg_decoder_fuzzer_input.pb.h" @@ -47,10 +46,10 @@ media::JpegHuffmanTable huffman_table{}; huffman_table.valid = proto_huffman_table.valid(); memcpy(huffman_table.code_length, proto_huffman_table.code_length().data(), - std::min(base::size(huffman_table.code_length), + std::min(std::size(huffman_table.code_length), proto_huffman_table.code_length().size())); memcpy(huffman_table.code_value, proto_huffman_table.code_value().data(), - std::min(base::size(huffman_table.code_value), + std::min(std::size(huffman_table.code_value), proto_huffman_table.code_value().size())); return huffman_table; } @@ -75,7 +74,7 @@ proto_parse_result.frame_header().coded_height() & 0xFFFF; const size_t frame_header_num_components = - std::min(base::size(parse_result.frame_header.components), + std::min(std::size(parse_result.frame_header.components), base::checked_cast<size_t>( proto_parse_result.frame_header().components_size())); for (size_t i = 0; i < frame_header_num_components; i++) { @@ -95,14 +94,14 @@ // Convert the DC/AC Huffman tables. const size_t num_dc_tables = - std::min(base::size(parse_result.dc_table), + std::min(std::size(parse_result.dc_table), base::checked_cast<size_t>(proto_parse_result.dc_table_size())); for (size_t i = 0; i < num_dc_tables; i++) { parse_result.dc_table[i] = ConvertToJpegHuffmanTable(proto_parse_result.dc_table()[i]); } const size_t num_ac_tables = - std::min(base::size(parse_result.ac_table), + std::min(std::size(parse_result.ac_table), base::checked_cast<size_t>(proto_parse_result.ac_table_size())); for (size_t i = 0; i < num_ac_tables; i++) { parse_result.ac_table[i] = @@ -111,20 +110,20 @@ // Convert the quantization tables. const size_t num_q_tables = - std::min(base::size(parse_result.q_table), + std::min(std::size(parse_result.q_table), base::checked_cast<size_t>(proto_parse_result.q_table_size())); for (size_t i = 0; i < num_q_tables; i++) { const media::fuzzing::JpegQuantizationTable& input_q_table = proto_parse_result.q_table()[i]; parse_result.q_table[i].valid = input_q_table.valid(); memcpy(parse_result.q_table[i].value, input_q_table.value().data(), - std::min(base::size(parse_result.q_table[i].value), + std::min(std::size(parse_result.q_table[i].value), input_q_table.value().size())); } // Convert the scan header. const size_t scan_num_components = std::min( - base::size(parse_result.scan.components), + std::size(parse_result.scan.components), base::checked_cast<size_t>(proto_parse_result.scan().components_size())); for (size_t i = 0; i < scan_num_components; i++) { const media::fuzzing::JpegScanHeader::Component& input_component =
diff --git a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc index 196eab3..d7a1f65 100644 --- a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc +++ b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
@@ -6,7 +6,6 @@ #include <va/va.h> -#include "base/cxx17_backports.h" #include "base/memory/aligned_memory.h" #include "base/trace_event/trace_event.h" #include "media/base/cdm_context.h" @@ -177,7 +176,7 @@ // And fill it with picture info from DPB. FillVARefFramesFromDPB(dpb, pic_param.ReferenceFrames, - base::size(pic_param.ReferenceFrames)); + std::size(pic_param.ReferenceFrames)); pic_param.num_ref_frames = sps->max_num_ref_frames; @@ -520,23 +519,23 @@ } } - static_assert(base::size(slice_param.RefPicList0) == - base::size(slice_param.RefPicList1), - "Invalid RefPicList sizes"); + static_assert( + std::size(slice_param.RefPicList0) == std::size(slice_param.RefPicList1), + "Invalid RefPicList sizes"); - for (size_t i = 0; i < base::size(slice_param.RefPicList0); ++i) { + for (size_t i = 0; i < std::size(slice_param.RefPicList0); ++i) { InitVAPicture(&slice_param.RefPicList0[i]); InitVAPicture(&slice_param.RefPicList1[i]); } for (size_t i = 0; - i < ref_pic_list0.size() && i < base::size(slice_param.RefPicList0); + i < ref_pic_list0.size() && i < std::size(slice_param.RefPicList0); ++i) { if (ref_pic_list0[i]) FillVAPicture(&slice_param.RefPicList0[i], ref_pic_list0[i]); } for (size_t i = 0; - i < ref_pic_list1.size() && i < base::size(slice_param.RefPicList1); + i < ref_pic_list1.size() && i < std::size(slice_param.RefPicList1); ++i) { if (ref_pic_list1[i]) FillVAPicture(&slice_param.RefPicList1[i], ref_pic_list1[i]);
diff --git a/media/gpu/vaapi/h264_vaapi_video_encoder_delegate.cc b/media/gpu/vaapi/h264_vaapi_video_encoder_delegate.cc index 08b3d11..51deb95 100644 --- a/media/gpu/vaapi/h264_vaapi_video_encoder_delegate.cc +++ b/media/gpu/vaapi/h264_vaapi_video_encoder_delegate.cc
@@ -10,7 +10,6 @@ #include <utility> #include "base/bits.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted_memory.h" #include "build/build_config.h" #include "media/base/media_switches.h" @@ -682,7 +681,7 @@ packed_sps_->AppendBits(4, current_sps_.bit_rate_scale); packed_sps_->AppendBits(4, current_sps_.cpb_size_scale); CHECK_LT(base::checked_cast<size_t>(current_sps_.cpb_cnt_minus1), - base::size(current_sps_.bit_rate_value_minus1)); + std::size(current_sps_.bit_rate_value_minus1)); for (int i = 0; i <= current_sps_.cpb_cnt_minus1; ++i) { packed_sps_->AppendUE(current_sps_.bit_rate_value_minus1[i]); packed_sps_->AppendUE(current_sps_.cpb_size_value_minus1[i]);
diff --git a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.cc index 556ea8a..f249315 100644 --- a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.cc +++ b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.cc
@@ -4,7 +4,6 @@ #include "media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h" -#include "base/cxx17_backports.h" #include "build/chromeos_buildflags.h" #include "media/base/cdm_context.h" #include "media/gpu/decode_surface_handler.h" @@ -198,7 +197,7 @@ FillVAPicture(&pic_param.CurrPic, std::move(pic)); // Init reference pictures' array. - for (size_t i = 0; i < base::size(pic_param.ReferenceFrames); ++i) + for (size_t i = 0; i < std::size(pic_param.ReferenceFrames); ++i) InitVAPicture(&pic_param.ReferenceFrames[i]); // And fill it with picture info from DPB. @@ -224,26 +223,26 @@ // We need another one of these since we can't use |scaling_list| above in // the static_assert checks below. H265ScalingListData checker; - static_assert((base::size(checker.scaling_list_4x4) == - base::size(iq_matrix_buf.ScalingList4x4)) && - (base::size(checker.scaling_list_4x4[0]) == - base::size(iq_matrix_buf.ScalingList4x4[0])) && - (base::size(checker.scaling_list_8x8) == - base::size(iq_matrix_buf.ScalingList8x8)) && - (base::size(checker.scaling_list_8x8[0]) == - base::size(iq_matrix_buf.ScalingList8x8[0])) && - (base::size(checker.scaling_list_16x16) == - base::size(iq_matrix_buf.ScalingList16x16)) && - (base::size(checker.scaling_list_16x16[0]) == - base::size(iq_matrix_buf.ScalingList16x16[0])) && - (base::size(checker.scaling_list_32x32) / 3 == - base::size(iq_matrix_buf.ScalingList32x32)) && - (base::size(checker.scaling_list_32x32[0]) == - base::size(iq_matrix_buf.ScalingList32x32[0])) && - (base::size(checker.scaling_list_dc_coef_16x16) == - base::size(iq_matrix_buf.ScalingListDC16x16)) && - (base::size(checker.scaling_list_dc_coef_32x32) / 3 == - base::size(iq_matrix_buf.ScalingListDC32x32)), + static_assert((std::size(checker.scaling_list_4x4) == + std::size(iq_matrix_buf.ScalingList4x4)) && + (std::size(checker.scaling_list_4x4[0]) == + std::size(iq_matrix_buf.ScalingList4x4[0])) && + (std::size(checker.scaling_list_8x8) == + std::size(iq_matrix_buf.ScalingList8x8)) && + (std::size(checker.scaling_list_8x8[0]) == + std::size(iq_matrix_buf.ScalingList8x8[0])) && + (std::size(checker.scaling_list_16x16) == + std::size(iq_matrix_buf.ScalingList16x16)) && + (std::size(checker.scaling_list_16x16[0]) == + std::size(iq_matrix_buf.ScalingList16x16[0])) && + (std::size(checker.scaling_list_32x32) / 3 == + std::size(iq_matrix_buf.ScalingList32x32)) && + (std::size(checker.scaling_list_32x32[0]) == + std::size(iq_matrix_buf.ScalingList32x32[0])) && + (std::size(checker.scaling_list_dc_coef_16x16) == + std::size(iq_matrix_buf.ScalingListDC16x16)) && + (std::size(checker.scaling_list_dc_coef_32x32) / 3 == + std::size(iq_matrix_buf.ScalingListDC32x32)), "Mismatched HEVC scaling list matrix sizes"); for (int i = 0; i < H265ScalingListData::kNumScalingListMatrices; ++i) { @@ -327,17 +326,17 @@ const auto ref_pic_list0_size = ref_pic_list0.size(); const auto ref_pic_list1_size = ref_pic_list1.size(); // Fill in ref pic lists. - if (ref_pic_list0_size > base::size(slice_param_.RefPicList[0]) || - ref_pic_list1_size > base::size(slice_param_.RefPicList[1])) { + if (ref_pic_list0_size > std::size(slice_param_.RefPicList[0]) || + ref_pic_list1_size > std::size(slice_param_.RefPicList[1])) { DLOG(ERROR) << "Error, slice reference picture list is larger than 15"; return DecodeStatus::kFail; } constexpr int kVaInvalidRefPicIndex = 0xFF; - std::fill_n(slice_param_.RefPicList[0], - base::size(slice_param_.RefPicList[0]), kVaInvalidRefPicIndex); - std::fill_n(slice_param_.RefPicList[1], - base::size(slice_param_.RefPicList[1]), kVaInvalidRefPicIndex); + std::fill_n(slice_param_.RefPicList[0], std::size(slice_param_.RefPicList[0]), + kVaInvalidRefPicIndex); + std::fill_n(slice_param_.RefPicList[1], std::size(slice_param_.RefPicList[1]), + kVaInvalidRefPicIndex); // There may be null entries in |ref_pic_list0| or |ref_pic_list1| for missing // reference pictures, just leave those marked as 0xFF and the accelerator // will do the right thing to deal with missing reference pictures.
diff --git a/media/gpu/vaapi/test/vp8_decoder.cc b/media/gpu/vaapi/test/vp8_decoder.cc index edf2625..39cbfe2 100644 --- a/media/gpu/vaapi/test/vp8_decoder.cc +++ b/media/gpu/vaapi/test/vp8_decoder.cc
@@ -75,12 +75,11 @@ VASliceParameterBufferVP8& slice_param) { const Vp8SegmentationHeader& sgmnt_hdr = frame_hdr.segmentation_hdr; const Vp8QuantizationHeader& quant_hdr = frame_hdr.quantization_hdr; - static_assert(base::size(decltype(iq_matrix_buf.quantization_index){}) == - kMaxMBSegments, - "incorrect quantization matrix segment size"); static_assert( - base::size(decltype(iq_matrix_buf.quantization_index){}[0]) == 6, - "incorrect quantization matrix Q index size"); + std::size(decltype(iq_matrix_buf.quantization_index){}) == kMaxMBSegments, + "incorrect quantization matrix segment size"); + static_assert(std::size(decltype(iq_matrix_buf.quantization_index){}[0]) == 6, + "incorrect quantization matrix Q index size"); for (size_t i = 0; i < kMaxMBSegments; ++i) { int q = quant_hdr.y_ac_qi; @@ -142,7 +141,7 @@ static_assert(std::extent<decltype(sgmnt_hdr.lf_update_value)>() == std::extent<decltype(pic_param.loop_filter_level)>(), "loop filter level arrays mismatch"); - for (size_t i = 0; i < base::size(sgmnt_hdr.lf_update_value); ++i) { + for (size_t i = 0; i < std::size(sgmnt_hdr.lf_update_value); ++i) { int lf_level = lf_hdr.level; if (sgmnt_hdr.segmentation_enabled) { if (sgmnt_hdr.segment_feature_mode == @@ -166,7 +165,7 @@ static_assert(std::extent<decltype(lf_hdr.ref_frame_delta)>() == std::extent<decltype(lf_hdr.mb_mode_delta)>(), "loop filter deltas arrays size mismatch"); - for (size_t i = 0; i < base::size(lf_hdr.ref_frame_delta); ++i) { + for (size_t i = 0; i < std::size(lf_hdr.ref_frame_delta); ++i) { pic_param.loop_filter_deltas_ref_frame[i] = lf_hdr.ref_frame_delta[i]; pic_param.loop_filter_deltas_mode[i] = lf_hdr.mb_mode_delta[i]; }
diff --git a/media/gpu/vaapi/test/vp9_decoder.cc b/media/gpu/vaapi/test/vp9_decoder.cc index 7f93201..f15395c 100644 --- a/media/gpu/vaapi/test/vp9_decoder.cc +++ b/media/gpu/vaapi/test/vp9_decoder.cc
@@ -164,9 +164,9 @@ pic_param.frame_width = base::checked_cast<uint16_t>(frame_hdr.frame_width); pic_param.frame_height = base::checked_cast<uint16_t>(frame_hdr.frame_height); - CHECK_EQ(kVp9NumRefFrames, base::size(pic_param.reference_frames)); + CHECK_EQ(kVp9NumRefFrames, std::size(pic_param.reference_frames)); CHECK_EQ(kVp9NumRefFrames, ref_frames_.size()); - for (size_t i = 0; i < base::size(pic_param.reference_frames); ++i) { + for (size_t i = 0; i < std::size(pic_param.reference_frames); ++i) { pic_param.reference_frames[i] = ref_frames_[i] ? ref_frames_[i]->id() : VA_INVALID_SURFACE; } @@ -230,7 +230,7 @@ slice_param.slice_data_offset = 0; slice_param.slice_data_flag = VA_SLICE_DATA_FLAG_ALL; - for (size_t i = 0; i < base::size(slice_param.seg_param); ++i) { + for (size_t i = 0; i < std::size(slice_param.seg_param); ++i) { VASegmentParameterVP9& seg_param = slice_param.seg_param[i]; #define SEG_TO_SP_SF(a, b) seg_param.segment_flags.fields.a = b SEG_TO_SP_SF(
diff --git a/media/gpu/vaapi/test_utils.h b/media/gpu/vaapi/test_utils.h index 1b9cf227..c05be31 100644 --- a/media/gpu/vaapi/test_utils.h +++ b/media/gpu/vaapi/test_utils.h
@@ -11,11 +11,7 @@ #include <string> -// This has to be included first. -// See http://code.google.com/p/googletest/issues/detail?id=371 #include "testing/gtest/include/gtest/gtest.h" - -#include "base/cxx17_backports.h" #include "ui/gfx/geometry/size.h" namespace media { @@ -32,10 +28,10 @@ std::string TestParamToString( const testing::TestParamInfo<TestParam>& param_info); -constexpr size_t kMaxNumberPlanes = base::size(VAImage().pitches); +constexpr size_t kMaxNumberPlanes = std::size(VAImage().pitches); static_assert(kMaxNumberPlanes <= 3u, "The number of planes should be <= 3"); static_assert( - base::size(VAImage().pitches) == base::size(VAImage().offsets), + std::size(VAImage().pitches) == std::size(VAImage().offsets), "The number of VAImage pitches is not equal to the number of offsets"); // A structure to hold generic image decodes in planar format.
diff --git a/media/gpu/vaapi/vaapi_jpeg_decoder.cc b/media/gpu/vaapi/vaapi_jpeg_decoder.cc index f696b0ce..4ea2b6c 100644 --- a/media/gpu/vaapi/vaapi_jpeg_decoder.cc +++ b/media/gpu/vaapi/vaapi_jpeg_decoder.cc
@@ -10,7 +10,6 @@ #include <iostream> #include <type_traits> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "media/base/video_types.h" @@ -54,7 +53,7 @@ if (!q_table[i].valid) continue; iq_matrix->load_quantiser_table[i] = 1; - for (size_t j = 0; j < base::size(q_table[i].value); j++) + for (size_t j = 0; j < std::size(q_table[i].value); j++) iq_matrix->quantiser_table[i][j] = q_table[i].value[j]; } }
diff --git a/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc b/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc index 25b2baa..d1cfbde 100644 --- a/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc +++ b/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc
@@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/memory/writable_shared_memory_region.h" #include "base/metrics/histogram_functions.h" @@ -319,12 +318,12 @@ constexpr uint8_t kJpegSoiAndApp0Header[] = { 0xFF, JPEG_SOI, 0xFF, JPEG_APP0, 0x00, 0x10, }; - if (encoded_size < base::size(kJpegSoiAndApp0Header)) { + if (encoded_size < std::size(kJpegSoiAndApp0Header)) { VLOGF(1) << "Unexpected JPEG data size received from encoder"; notify_error_cb_.Run(task_id, PLATFORM_FAILURE); return; } - for (size_t i = 0; i < base::size(kJpegSoiAndApp0Header); ++i) { + for (size_t i = 0; i < std::size(kJpegSoiAndApp0Header); ++i) { if (frame_content[i] != kJpegSoiAndApp0Header[i]) { VLOGF(1) << "Unexpected JPEG header received from encoder"; notify_error_cb_.Run(task_id, PLATFORM_FAILURE); @@ -340,15 +339,15 @@ static_cast<uint8_t>((exif_buffer_size + 2) / 256), static_cast<uint8_t>((exif_buffer_size + 2) % 256), }; - CHECK_GE(output_size, base::size(jpeg_soi_and_app1_header)); - if (exif_buffer_size > output_size - base::size(jpeg_soi_and_app1_header)) { + CHECK_GE(output_size, std::size(jpeg_soi_and_app1_header)); + if (exif_buffer_size > output_size - std::size(jpeg_soi_and_app1_header)) { VLOGF(1) << "Insufficient buffer size reserved for JPEG APP1 data"; notify_error_cb_.Run(task_id, PLATFORM_FAILURE); return; } memcpy(output_memory, jpeg_soi_and_app1_header, - base::size(jpeg_soi_and_app1_header)); - memcpy(output_memory + base::size(jpeg_soi_and_app1_header), exif_buffer, + std::size(jpeg_soi_and_app1_header)); + memcpy(output_memory + std::size(jpeg_soi_and_app1_header), exif_buffer, exif_buffer_size); encoded_size += output_offset; }
diff --git a/media/gpu/vaapi/vaapi_jpeg_encoder.cc b/media/gpu/vaapi/vaapi_jpeg_encoder.cc index b743d12..90619a0 100644 --- a/media/gpu/vaapi/vaapi_jpeg_encoder.cc +++ b/media/gpu/vaapi/vaapi_jpeg_encoder.cc
@@ -55,10 +55,10 @@ static_assert(std::extent<decltype(luminance.value)>() == std::extent<decltype(q_matrix->lum_quantiser_matrix)>(), "Luminance quantization table size mismatch."); - static_assert(base::size(kZigZag8x8) == base::size(luminance.value), + static_assert(std::size(kZigZag8x8) == std::size(luminance.value), "Luminance quantization table size mismatch."); q_matrix->load_lum_quantiser_matrix = 1; - for (size_t i = 0; i < base::size(kZigZag8x8); i++) { + for (size_t i = 0; i < std::size(kZigZag8x8); i++) { q_matrix->lum_quantiser_matrix[i] = luminance.value[kZigZag8x8[i]]; } @@ -66,23 +66,23 @@ static_assert(std::extent<decltype(chrominance.value)>() == std::extent<decltype(q_matrix->chroma_quantiser_matrix)>(), "Chrominance quantization table size mismatch."); - static_assert(base::size(kZigZag8x8) == base::size(chrominance.value), + static_assert(std::size(kZigZag8x8) == std::size(chrominance.value), "Chrominance quantization table size mismatch."); q_matrix->load_chroma_quantiser_matrix = 1; - for (size_t i = 0; i < base::size(kZigZag8x8); i++) { + for (size_t i = 0; i < std::size(kZigZag8x8); i++) { q_matrix->chroma_quantiser_matrix[i] = chrominance.value[kZigZag8x8[i]]; } } void FillHuffmanTableParameters( VAHuffmanTableBufferJPEGBaseline* huff_table_param) { - static_assert(base::size(kDefaultDcTable) == base::size(kDefaultAcTable), + static_assert(std::size(kDefaultDcTable) == std::size(kDefaultAcTable), "DC table and AC table size mismatch."); - static_assert(base::size(kDefaultDcTable) == + static_assert(std::size(kDefaultDcTable) == std::extent<decltype(huff_table_param->huffman_table)>(), "DC table and destination table size mismatch."); - for (size_t i = 0; i < base::size(kDefaultDcTable); ++i) { + for (size_t i = 0; i < std::size(kDefaultDcTable); ++i) { const JpegHuffmanTable& dcTable = kDefaultDcTable[i]; const JpegHuffmanTable& acTable = kDefaultAcTable[i]; huff_table_param->load_huffman_table[i] = true;
diff --git a/media/gpu/vaapi/vaapi_utils.cc b/media/gpu/vaapi/vaapi_utils.cc index 843d399..74cb79f 100644 --- a/media/gpu/vaapi/vaapi_utils.cc +++ b/media/gpu/vaapi/vaapi_utils.cc
@@ -200,11 +200,11 @@ VASliceParameterBufferVP8* slice_param) { const Vp8SegmentationHeader& sgmnt_hdr = frame_header.segmentation_hdr; const Vp8QuantizationHeader& quant_hdr = frame_header.quantization_hdr; - static_assert(base::size(decltype(iq_matrix_buf->quantization_index){}) == + static_assert(std::size(decltype(iq_matrix_buf->quantization_index){}) == kMaxMBSegments, "incorrect quantization matrix segment size"); static_assert( - base::size(decltype(iq_matrix_buf->quantization_index){}[0]) == 6, + std::size(decltype(iq_matrix_buf->quantization_index){}[0]) == 6, "incorrect quantization matrix Q index size"); for (size_t i = 0; i < kMaxMBSegments; ++i) { int q = quant_hdr.y_ac_qi; @@ -289,7 +289,7 @@ static_assert(std::extent<decltype(sgmnt_hdr.lf_update_value)>() == std::extent<decltype(pic_param->loop_filter_level)>(), "loop filter level arrays mismatch"); - for (size_t i = 0; i < base::size(sgmnt_hdr.lf_update_value); ++i) { + for (size_t i = 0; i < std::size(sgmnt_hdr.lf_update_value); ++i) { int lf_level = lf_hdr.level; if (sgmnt_hdr.segmentation_enabled) { if (sgmnt_hdr.segment_feature_mode == @@ -313,7 +313,7 @@ static_assert(std::extent<decltype(lf_hdr.ref_frame_delta)>() == std::extent<decltype(lf_hdr.mb_mode_delta)>(), "loop filter deltas arrays size mismatch"); - for (size_t i = 0; i < base::size(lf_hdr.ref_frame_delta); ++i) { + for (size_t i = 0; i < std::size(lf_hdr.ref_frame_delta); ++i) { pic_param->loop_filter_deltas_ref_frame[i] = lf_hdr.ref_frame_delta[i]; pic_param->loop_filter_deltas_mode[i] = lf_hdr.mb_mode_delta[i]; }
diff --git a/media/gpu/vaapi/vaapi_utils_unittest.cc b/media/gpu/vaapi/vaapi_utils_unittest.cc index 11c1591..e50ea2ae 100644 --- a/media/gpu/vaapi/vaapi_utils_unittest.cc +++ b/media/gpu/vaapi/vaapi_utils_unittest.cc
@@ -2,24 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/gpu/vaapi/vaapi_utils.h" + #include <va/va.h> #include <memory> #include <vector> -// This has to be included first. -// See http://code.google.com/p/googletest/issues/detail?id=371 -#include "testing/gtest/include/gtest/gtest.h" - #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/memory/scoped_refptr.h" #include "base/numerics/safe_conversions.h" #include "base/synchronization/lock.h" #include "base/test/gtest_util.h" -#include "media/gpu/vaapi/vaapi_utils.h" #include "media/gpu/vaapi/vaapi_wrapper.h" +#include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/geometry/size.h" namespace media { @@ -65,7 +62,7 @@ }; constexpr gfx::Size kCodedSize(64, 64); ASSERT_TRUE(vaapi_wrapper_->CreateContext(kCodedSize)); - for (size_t i = 0; i < base::size(kBufferParameters); i++) { + for (size_t i = 0; i < std::size(kBufferParameters); i++) { const VABufferType buffer_type = kBufferParameters[i].first; const size_t buffer_size = kBufferParameters[i].second; auto scoped_va_buffer =
diff --git a/media/gpu/vaapi/vaapi_video_encode_accelerator_unittest.cc b/media/gpu/vaapi/vaapi_video_encode_accelerator_unittest.cc index 78a0083..f19ff73 100644 --- a/media/gpu/vaapi/vaapi_video_encode_accelerator_unittest.cc +++ b/media/gpu/vaapi/vaapi_video_encode_accelerator_unittest.cc
@@ -477,8 +477,8 @@ void EncodeSequenceForVP9MultipleSpatialLayers(size_t num_spatial_layers) { constexpr int32_t kBitstreamIds[] = {12, 13, 14}; constexpr uint64_t kEncodedChunkSizes[] = {1234, 1235, 1236}; - ASSERT_LE(num_spatial_layers, base::size(kBitstreamIds)); - ASSERT_LE(num_spatial_layers, base::size(kEncodedChunkSizes)); + ASSERT_LE(num_spatial_layers, std::size(kBitstreamIds)); + ASSERT_LE(num_spatial_layers, std::size(kEncodedChunkSizes)); base::RunLoop run_loop; // BitstreamBufferReady() is called in |child_task_runner_|, which is the // different thread of executing other mock calls. Therefore, guaranteeing
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc index 0f287fab..0e607cc 100644 --- a/media/gpu/vaapi/vaapi_wrapper.cc +++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -26,7 +26,6 @@ #include "base/containers/cxx20_erase.h" #include "base/containers/fixed_flat_set.h" #include "base/cpu.h" -#include "base/cxx17_backports.h" #include "base/environment.h" #include "base/files/scoped_file.h" #include "base/logging.h" @@ -42,16 +41,13 @@ #include "base/trace_event/trace_event.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" - #include "media/base/media_switches.h" #include "media/base/video_frame.h" #include "media/base/video_types.h" #include "media/gpu/macros.h" -#include "media/media_buildflags.h" - // Auto-generated for dlopen libva libraries #include "media/gpu/vaapi/va_stubs.h" - +#include "media/media_buildflags.h" #include "third_party/libva_protected_content/va_protected_content.h" #include "third_party/libyuv/include/libyuv.h" #include "ui/gfx/buffer_format_util.h" @@ -814,7 +810,7 @@ VAEntrypointEncSliceLP}, // kEncodeConstantQuantizationParameter. {VAEntrypointVideoProc} // kVideoProcess. }; - static_assert(base::size(kAllowedEntryPoints) == VaapiWrapper::kCodecModeMax, + static_assert(std::size(kAllowedEntryPoints) == VaapiWrapper::kCodecModeMax, ""); std::vector<VAEntrypoint> entrypoints; @@ -1049,7 +1045,7 @@ VaapiWrapper::kEncodeConstantQuantizationParameter, VaapiWrapper::kVideoProcess }; - static_assert(base::size(kWrapperModes) == VaapiWrapper::kCodecModeMax, ""); + static_assert(std::size(kWrapperModes) == VaapiWrapper::kCodecModeMax, ""); for (VaapiWrapper::CodecMode mode : kWrapperModes) { std::vector<ProfileInfo> supported_profile_infos;
diff --git a/media/gpu/vaapi/vp8_vaapi_video_encoder_delegate.cc b/media/gpu/vaapi/vp8_vaapi_video_encoder_delegate.cc index ffa207d..930904c4 100644 --- a/media/gpu/vaapi/vp8_vaapi_video_encoder_delegate.cc +++ b/media/gpu/vaapi/vp8_vaapi_video_encoder_delegate.cc
@@ -50,11 +50,11 @@ 82, 85, 88, 91, 94, 97, 100, 103, 106, 109, 112, 115, 118, 121, 124, 127, }; - for (size_t q = 0; q < base::size(kQuantizerToQindex); ++q) { + for (size_t q = 0; q < std::size(kQuantizerToQindex); ++q) { if (kQuantizerToQindex[q] >= q_index) return q; } - return base::size(kQuantizerToQindex) - 1; + return std::size(kQuantizerToQindex) - 1; } // The return value is expressed as a percentage of the average. For example, @@ -599,7 +599,7 @@ frame_header->loopfilter_hdr.mb_mode_delta)>(), "Invalid loop filter array sizes"); - for (size_t i = 0; i < base::size(pic_param.loop_filter_level); ++i) { + for (size_t i = 0; i < std::size(pic_param.loop_filter_level); ++i) { pic_param.loop_filter_level[i] = frame_header->loopfilter_hdr.level; pic_param.ref_lf_delta[i] = frame_header->loopfilter_hdr.ref_frame_delta[i]; pic_param.mode_lf_delta[i] = frame_header->loopfilter_hdr.mb_mode_delta[i];
diff --git a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc index d3e81ea..9e120b3 100644 --- a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc +++ b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc
@@ -6,7 +6,6 @@ #include <type_traits> -#include "base/cxx17_backports.h" #include "base/numerics/checked_math.h" #include "base/trace_event/trace_event.h" #include "build/chromeos_buildflags.h" @@ -113,8 +112,8 @@ pic_param.frame_width = base::checked_cast<uint16_t>(frame_hdr->frame_width); pic_param.frame_height = base::checked_cast<uint16_t>(frame_hdr->frame_height); - CHECK_EQ(kVp9NumRefFrames, base::size(pic_param.reference_frames)); - for (size_t i = 0; i < base::size(pic_param.reference_frames); ++i) { + CHECK_EQ(kVp9NumRefFrames, std::size(pic_param.reference_frames)); + for (size_t i = 0; i < std::size(pic_param.reference_frames); ++i) { auto ref_pic = ref_frames.GetFrame(i); if (ref_pic) { pic_param.reference_frames[i] = @@ -177,7 +176,7 @@ std::extent<decltype(Vp9SegmentationParams::feature_enabled)>() == std::extent<decltype(slice_param.seg_param)>(), "seg_param array of incorrect size"); - for (size_t i = 0; i < base::size(slice_param.seg_param); ++i) { + for (size_t i = 0; i < std::size(slice_param.seg_param); ++i) { VASegmentParameterVP9& seg_param = slice_param.seg_param[i]; #define SEG_TO_SP_SF(a, b) seg_param.segment_flags.fields.a = b SEG_TO_SP_SF(
diff --git a/media/gpu/vaapi/vp9_vaapi_video_encoder_delegate.cc b/media/gpu/vaapi/vp9_vaapi_video_encoder_delegate.cc index 484c93d..31bdfbc 100644 --- a/media/gpu/vaapi/vp9_vaapi_video_encoder_delegate.cc +++ b/media/gpu/vaapi/vp9_vaapi_video_encoder_delegate.cc
@@ -60,11 +60,11 @@ 208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 249, 255, }; - for (size_t q = 0; q < base::size(kQuantizerToQindex); ++q) { + for (size_t q = 0; q < std::size(kQuantizerToQindex); ++q) { if (kQuantizerToQindex[q] >= q_index) return q; } - return base::size(kQuantizerToQindex) - 1; + return std::size(kQuantizerToQindex) - 1; } // TODO(crbug.com/752720): remove this in favor of std::gcd if c++17 is enabled
diff --git a/media/gpu/windows/d3d11_av1_accelerator.cc b/media/gpu/windows/d3d11_av1_accelerator.cc index 4c9a787..83e66ce 100644 --- a/media/gpu/windows/d3d11_av1_accelerator.cc +++ b/media/gpu/windows/d3d11_av1_accelerator.cc
@@ -812,10 +812,10 @@ pp->film_grain.scaling_points_cr[i][0] = fg.point_v_value[i]; pp->film_grain.scaling_points_cr[i][1] = fg.point_v_scaling[i]; } - for (size_t i = 0; i < base::size(fg.auto_regression_coeff_y); ++i) { + for (size_t i = 0; i < std::size(fg.auto_regression_coeff_y); ++i) { pp->film_grain.ar_coeffs_y[i] = fg.auto_regression_coeff_y[i] + 128; } - for (size_t i = 0; i < base::size(fg.auto_regression_coeff_u); ++i) { + for (size_t i = 0; i < std::size(fg.auto_regression_coeff_u); ++i) { pp->film_grain.ar_coeffs_cb[i] = fg.auto_regression_coeff_u[i] + 128; pp->film_grain.ar_coeffs_cr[i] = fg.auto_regression_coeff_v[i] + 128; }
diff --git a/media/gpu/windows/d3d11_h264_accelerator.cc b/media/gpu/windows/d3d11_h264_accelerator.cc index 102a4499..48e827be 100644 --- a/media/gpu/windows/d3d11_h264_accelerator.cc +++ b/media/gpu/windows/d3d11_h264_accelerator.cc
@@ -565,7 +565,7 @@ } hr = video_context_->SubmitDecoderBuffers(video_decoder_.Get(), - base::size(buffers), buffers); + std::size(buffers), buffers); current_offset_ = 0; slice_info_.clear(); bitstream_buffer_bytes_ = nullptr;
diff --git a/media/gpu/windows/d3d11_h265_accelerator.cc b/media/gpu/windows/d3d11_h265_accelerator.cc index d1a2f1fe..260c3535 100644 --- a/media/gpu/windows/d3d11_h265_accelerator.cc +++ b/media/gpu/windows/d3d11_h265_accelerator.cc
@@ -736,7 +736,7 @@ hr = video_context_->SubmitDecoderBuffers( video_decoder_.Get(), - use_scaling_lists_ ? base::size(buffers) : base::size(buffers) - 1, + use_scaling_lists_ ? std::size(buffers) : std::size(buffers) - 1, buffers); current_offset_ = 0; slice_info_.clear();
diff --git a/media/gpu/windows/d3d11_vp9_accelerator.cc b/media/gpu/windows/d3d11_vp9_accelerator.cc index 6cf637f3..2c542f6 100644 --- a/media/gpu/windows/d3d11_vp9_accelerator.cc +++ b/media/gpu/windows/d3d11_vp9_accelerator.cc
@@ -166,7 +166,7 @@ D3D11_TEXTURE2D_DESC texture_descriptor; pic.picture_buffer()->Texture()->GetDesc(&texture_descriptor); - for (size_t i = 0; i < base::size(pic_params->ref_frame_map); i++) { + for (size_t i = 0; i < std::size(pic_params->ref_frame_map); i++) { auto ref_pic = ref_frames.GetFrame(i); if (ref_pic) { scoped_refptr<D3D11VP9Picture> our_ref_pic( @@ -184,12 +184,12 @@ void D3D11VP9Accelerator::CopyFrameRefs(DXVA_PicParams_VP9* pic_params, const D3D11VP9Picture& pic) { - for (size_t i = 0; i < base::size(pic_params->frame_refs); i++) { + for (size_t i = 0; i < std::size(pic_params->frame_refs); i++) { pic_params->frame_refs[i] = pic_params->ref_frame_map[pic.frame_hdr->ref_frame_idx[i]]; } - for (size_t i = 0; i < base::size(pic_params->ref_frame_sign_bias); i++) { + for (size_t i = 0; i < std::size(pic_params->ref_frame_sign_bias); i++) { pic_params->ref_frame_sign_bias[i] = pic.frame_hdr->ref_frame_sign_bias[i]; } } @@ -204,17 +204,17 @@ SET_PARAM(mode_ref_delta_update, delta_update); #undef SET_PARAM - // base::size(...) doesn't work well in an array initializer. - DCHECK_EQ(4lu, base::size(pic_params->ref_deltas)); - for (size_t i = 0; i < base::size(pic_params->ref_deltas); i++) { + // std::size(...) doesn't work well in an array initializer. + DCHECK_EQ(4lu, std::size(pic_params->ref_deltas)); + for (size_t i = 0; i < std::size(pic_params->ref_deltas); i++) { // The update_ref_deltas[i] is _only_ for parsing! it allows omission of the // 6 bytes that would otherwise be needed for a new value to overwrite the // global one. It has nothing to do with setting the ref_deltas here. pic_params->ref_deltas[i] = loop_filter_params.ref_deltas[i]; } - DCHECK_EQ(2lu, base::size(pic_params->mode_deltas)); - for (size_t i = 0; i < base::size(pic_params->mode_deltas); i++) { + DCHECK_EQ(2lu, std::size(pic_params->mode_deltas)); + for (size_t i = 0; i < std::size(pic_params->mode_deltas); i++) { pic_params->mode_deltas[i] = loop_filter_params.mode_deltas[i]; } } @@ -239,11 +239,11 @@ COPY_PARAM(temporal_update); SET_PARAM(abs_delta, abs_or_delta_update); - for (size_t i = 0; i < base::size(segmentation_params.tree_probs); i++) { + for (size_t i = 0; i < std::size(segmentation_params.tree_probs); i++) { COPY_PARAM(tree_probs[i]); } - for (size_t i = 0; i < base::size(segmentation_params.pred_probs); i++) { + for (size_t i = 0; i < std::size(segmentation_params.pred_probs); i++) { COPY_PARAM(pred_probs[i]); }
diff --git a/media/gpu/windows/dxva_video_decode_accelerator_win.cc b/media/gpu/windows/dxva_video_decode_accelerator_win.cc index 0c643cd..4a53317 100644 --- a/media/gpu/windows/dxva_video_decode_accelerator_win.cc +++ b/media/gpu/windows/dxva_video_decode_accelerator_win.cc
@@ -4,9 +4,6 @@ #include "media/gpu/windows/dxva_video_decode_accelerator_win.h" -#include <algorithm> -#include <memory> - #include <codecapi.h> #include <dxgi1_2.h> #include <ks.h> @@ -18,13 +15,15 @@ #include <string.h> #include <wmcodecdsp.h> +#include <algorithm> +#include <memory> + #include "base/atomicops.h" #include "base/base_paths_win.h" #include "base/bind.h" #include "base/callback.h" #include "base/command_line.h" #include "base/containers/contains.h" -#include "base/cxx17_backports.h" #include "base/file_version_info.h" #include "base/files/file_path.h" #include "base/location.h" @@ -1031,7 +1030,7 @@ flags |= D3D11_CREATE_DEVICE_DEBUG; hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, - feature_levels, base::size(feature_levels), + feature_levels, std::size(feature_levels), D3D11_SDK_VERSION, &d3d11_device_, &feature_level_out, &d3d11_device_context_); if (hr == DXGI_ERROR_SDK_COMPONENT_MISSING) { @@ -1045,7 +1044,7 @@ using_debug_device_ = !!d3d11_device_context_; if (!d3d11_device_context_) { hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, - feature_levels, base::size(feature_levels), + feature_levels, std::size(feature_levels), D3D11_SDK_VERSION, &d3d11_device_, &feature_level_out, &d3d11_device_context_); RETURN_ON_HR_FAILURE(hr, "Failed to create DX11 device", false);
diff --git a/media/gpu/windows/supported_profile_helpers_unittest.cc b/media/gpu/windows/supported_profile_helpers_unittest.cc index ca2da47..a8e9655 100644 --- a/media/gpu/windows/supported_profile_helpers_unittest.cc +++ b/media/gpu/windows/supported_profile_helpers_unittest.cc
@@ -146,7 +146,7 @@ const auto supported_resolutions = GetSupportedD3D11VideoDecoderResolutions( mock_d3d11_device_, gpu_workarounds_); AssertDefaultSupport(supported_resolutions, - base::size(kSupportedH264Profiles) + 1); + std::size(kSupportedH264Profiles) + 1); auto it = supported_resolutions.find(profile); ASSERT_NE(it, supported_resolutions.end()); @@ -294,7 +294,7 @@ const auto supported_resolutions = GetSupportedD3D11VideoDecoderResolutions( mock_d3d11_device_, gpu_workarounds_); - ASSERT_EQ(base::size(kSupportedH264Profiles) + 1, + ASSERT_EQ(std::size(kSupportedH264Profiles) + 1, supported_resolutions.size()); for (const auto profile : kSupportedH264Profiles) { auto it = supported_resolutions.find(profile);
diff --git a/media/midi/message_util_unittest.cc b/media/midi/message_util_unittest.cc index 74539f3..2580641 100644 --- a/media/midi/message_util_unittest.cc +++ b/media/midi/message_util_unittest.cc
@@ -6,7 +6,6 @@ #include <stdint.h> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace midi { @@ -51,11 +50,10 @@ TEST(MidiMessageUtilTest, GetMessageLength) { // Check basic functionarity - EXPECT_EQ(base::size(kNoteOn), GetMessageLength(kNoteOn[0])); - EXPECT_EQ(base::size(kChannelPressure), - GetMessageLength(kChannelPressure[0])); - EXPECT_EQ(base::size(kTimingClock), GetMessageLength(kTimingClock[0])); - EXPECT_EQ(base::size(kSystemCommonMessageTuneRequest), + EXPECT_EQ(std::size(kNoteOn), GetMessageLength(kNoteOn[0])); + EXPECT_EQ(std::size(kChannelPressure), GetMessageLength(kChannelPressure[0])); + EXPECT_EQ(std::size(kTimingClock), GetMessageLength(kTimingClock[0])); + EXPECT_EQ(std::size(kSystemCommonMessageTuneRequest), GetMessageLength(kSystemCommonMessageTuneRequest[0])); // SysEx message should be mapped to 0-length
diff --git a/media/midi/midi_manager_alsa.cc b/media/midi/midi_manager_alsa.cc index 2a8f924..7685e67 100644 --- a/media/midi/midi_manager_alsa.cc +++ b/media/midi/midi_manager_alsa.cc
@@ -14,7 +14,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/json/json_string_value_serializer.h" #include "base/logging.h" #include "base/posix/eintr_wrapper.h" @@ -848,7 +847,7 @@ pfd[1].fd = device::udev_monitor_get_fd(udev_monitor_.get()); pfd[1].events = POLLIN; - int err = HANDLE_EINTR(poll(pfd, base::size(pfd), -1)); + int err = HANDLE_EINTR(poll(pfd, std::size(pfd), -1)); if (err < 0) { VLOG(1) << "poll fails: " << base::safe_strerror(errno); loop_again = false;
diff --git a/media/midi/midi_manager_usb_unittest.cc b/media/midi/midi_manager_usb_unittest.cc index a83ab31..3bb5417 100644 --- a/media/midi/midi_manager_usb_unittest.cc +++ b/media/midi/midi_manager_usb_unittest.cc
@@ -6,11 +6,11 @@ #include <stddef.h> #include <stdint.h> + #include <memory> #include <string> #include <utility> -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" @@ -564,7 +564,7 @@ RunCallbackUntilCallbackInvoked(true, &devices); EXPECT_EQ(Result::OK, GetInitializationResult()); - manager()->ReceiveUsbMidiData(device_raw, 2, data, base::size(data), + manager()->ReceiveUsbMidiData(device_raw, 2, data, std::size(data), base::TimeTicks()); Finalize();
diff --git a/media/midi/midi_manager_win.cc b/media/midi/midi_manager_win.cc index cf26991..e2f0d2d 100644 --- a/media/midi/midi_manager_win.cc +++ b/media/midi/midi_manager_win.cc
@@ -22,7 +22,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/memory/raw_ptr.h" #include "base/strings/stringprintf.h" @@ -656,7 +655,7 @@ static_cast<uint8_t>((param1 >> 16) & 0xff); const uint8_t kData[] = {status_byte, first_data_byte, second_data_byte}; const size_t len = GetMessageLength(status_byte); - DCHECK_LE(len, base::size(kData)); + DCHECK_LE(len, std::size(kData)); std::vector<uint8_t> data; data.assign(kData, kData + len); manager->PostReplyTask(base::BindOnce(
diff --git a/media/midi/usb_midi_descriptor_parser_unittest.cc b/media/midi/usb_midi_descriptor_parser_unittest.cc index 7dcc9d75..2e2f4db 100644 --- a/media/midi/usb_midi_descriptor_parser_unittest.cc +++ b/media/midi/usb_midi_descriptor_parser_unittest.cc
@@ -6,7 +6,6 @@ #include <stdint.h> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace midi { @@ -24,7 +23,7 @@ UsbMidiDescriptorParser parser; std::vector<UsbMidiJack> jacks; uint8_t data[] = {0x04}; - EXPECT_FALSE(parser.Parse(nullptr, data, base::size(data), &jacks)); + EXPECT_FALSE(parser.Parse(nullptr, data, std::size(data), &jacks)); EXPECT_TRUE(jacks.empty()); } @@ -37,7 +36,7 @@ 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, 0x07, 0x24, 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, 0x01, }; - EXPECT_FALSE(parser.Parse(nullptr, data, base::size(data), &jacks)); + EXPECT_FALSE(parser.Parse(nullptr, data, std::size(data), &jacks)); EXPECT_TRUE(jacks.empty()); } @@ -51,7 +50,7 @@ 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x02, 0x00, 0x00, 0x07, 0x24, 0x01, 0x00, 0x01, 0x07, 0x00, 0x05, 0x25, 0x01, 0x01, 0x01, }; - EXPECT_TRUE(parser.Parse(nullptr, data, base::size(data), &jacks)); + EXPECT_TRUE(parser.Parse(nullptr, data, std::size(data), &jacks)); EXPECT_TRUE(jacks.empty()); } @@ -73,7 +72,7 @@ 0x03, 0x09, 0x05, 0x82, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x25, 0x01, 0x01, 0x07, }; - EXPECT_TRUE(parser.Parse(nullptr, data, base::size(data), &jacks)); + EXPECT_TRUE(parser.Parse(nullptr, data, std::size(data), &jacks)); ASSERT_EQ(3u, jacks.size()); EXPECT_EQ(2u, jacks[0].jack_id); @@ -108,7 +107,7 @@ 0x12, 0x01, 0x10, 0x01, 0x00, 0x00, 0x00, 0x08, 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x00, 0x0a, }; - EXPECT_TRUE(parser.ParseDeviceInfo(data, base::size(data), &info)); + EXPECT_TRUE(parser.ParseDeviceInfo(data, std::size(data), &info)); EXPECT_EQ(0x2301, info.vendor_id); EXPECT_EQ(0x6745, info.product_id);
diff --git a/media/midi/usb_midi_input_stream_unittest.cc b/media/midi/usb_midi_input_stream_unittest.cc index 6ace263..b43c409 100644 --- a/media/midi/usb_midi_input_stream_unittest.cc +++ b/media/midi/usb_midi_input_stream_unittest.cc
@@ -11,7 +11,6 @@ #include <string> #include <vector> -#include "base/cxx17_backports.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" #include "media/midi/usb_midi_device.h" @@ -101,7 +100,7 @@ 0x40, 0xff, 0xff, 0xff, 0x41, 0xff, 0xff, 0xff, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("", delegate_.received_data()); } @@ -110,7 +109,7 @@ 0x45, 0xf8, 0x00, 0x00, 0x42, 0xf3, 0x22, 0x00, 0x43, 0xf2, 0x33, 0x44, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0xf8 \n" "0xf3 0x22 \n" "0xf2 0x33 0x44 \n", delegate_.received_data()); @@ -122,7 +121,7 @@ 0x46, 0xf0, 0xf7, 0x00, 0x47, 0xf0, 0x33, 0xf7, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0xf0 0x11 0x22 \n" "0xf7 \n" "0xf0 0xf7 \n" @@ -136,7 +135,7 @@ 0x4d, 0xd0, 0xaa, 0x00, 0x4e, 0xe0, 0xbb, 0xcc, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0x80 0x11 0x22 \n" "0x90 0x33 0x44 \n" "0xa0 0x55 0x66 \n" @@ -151,7 +150,7 @@ 0x4f, 0xf8, 0x00, 0x00, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0xf8 \n", delegate_.received_data()); } @@ -160,14 +159,14 @@ 0x4f, 0xf8, 0x00, 0x00, 0x5f, 0xfa, 0x00, 0x00, 0x6f, 0xfb, 0x00, 0x00, }; - stream_->OnReceivedData(&device1_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device1_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0xf8 \n0xfa \n", delegate_.received_data()); } TEST_F(UsbMidiInputStreamTest, DispatchForDevice2) { uint8_t data[] = {0x4f, 0xf8, 0x00, 0x00}; - stream_->OnReceivedData(&device2_, 7, data, base::size(data), TimeTicks()); + stream_->OnReceivedData(&device2_, 7, data, std::size(data), TimeTicks()); EXPECT_EQ("0xf8 \n", delegate_.received_data()); }
diff --git a/media/midi/usb_midi_output_stream.cc b/media/midi/usb_midi_output_stream.cc index 2b4494a..21657d11 100644 --- a/media/midi/usb_midi_output_stream.cc +++ b/media/midi/usb_midi_output_stream.cc
@@ -4,7 +4,6 @@ #include "media/midi/usb_midi_output_stream.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "media/midi/message_util.h" #include "media/midi/usb_midi_device.h" @@ -82,7 +81,7 @@ *current = index; data_to_send->push_back((jack_.cable_number << 4) | 0x4); data_to_send->insert(data_to_send->end(), message, - message + base::size(message)); + message + std::size(message)); is_sending_sysex_ = true; return true; } @@ -100,7 +99,7 @@ DCHECK(code_index == 0x5 || code_index == 0x6 || code_index == 0x7); data_to_send->push_back((jack_.cable_number << 4) | code_index); data_to_send->insert(data_to_send->end(), message, - message + base::size(message)); + message + std::size(message)); *current = index + 1; is_sending_sysex_ = false; return true;
diff --git a/media/mojo/clients/mojo_cdm_unittest.cc b/media/mojo/clients/mojo_cdm_unittest.cc index 0432cbd..7a83e215 100644 --- a/media/mojo/clients/mojo_cdm_unittest.cc +++ b/media/mojo/clients/mojo_cdm_unittest.cc
@@ -9,7 +9,6 @@ #include <memory> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "base/test/test_message_loop.h" @@ -160,7 +159,7 @@ // order to verify that the data is passed properly. const CdmSessionType session_type = CdmSessionType::kTemporary; const EmeInitDataType data_type = EmeInitDataType::WEBM; - const std::vector<uint8_t> key_id(kKeyId, kKeyId + base::size(kKeyId)); + const std::vector<uint8_t> key_id(kKeyId, kKeyId + std::size(kKeyId)); std::string created_session_id; if (expected_result == CONNECTION_ERROR_BEFORE) {
diff --git a/media/mojo/common/media_type_converters_unittest.cc b/media/mojo/common/media_type_converters_unittest.cc index bf8c04a..89cfb35 100644 --- a/media/mojo/common/media_type_converters_unittest.cc +++ b/media/mojo/common/media_type_converters_unittest.cc
@@ -7,9 +7,9 @@ #include <stddef.h> #include <stdint.h> #include <string.h> + #include <memory> -#include "base/cxx17_backports.h" #include "media/base/audio_buffer.h" #include "media/base/audio_decoder_config.h" #include "media/base/decoder_buffer.h" @@ -61,8 +61,8 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_Normal) { const uint8_t kData[] = "hello, world"; const uint8_t kSideData[] = "sideshow bob"; - const size_t kDataSize = base::size(kData); - const size_t kSideDataSize = base::size(kSideData); + const size_t kDataSize = std::size(kData); + const size_t kSideDataSize = std::size(kSideData); // Original. scoped_refptr<DecoderBuffer> buffer(DecoderBuffer::CopyFrom( @@ -107,7 +107,7 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_KeyFrame) { const uint8_t kData[] = "hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); // Original. scoped_refptr<DecoderBuffer> buffer(DecoderBuffer::CopyFrom( @@ -128,7 +128,7 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_CencEncryptedBuffer) { const uint8_t kData[] = "hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); const char kKeyId[] = "00112233445566778899aabbccddeeff"; const char kIv[] = "0123456789abcdef"; @@ -164,7 +164,7 @@ TEST(MediaTypeConvertersTest, ConvertDecoderBuffer_CbcsEncryptedBuffer) { const uint8_t kData[] = "hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); const char kKeyId[] = "00112233445566778899aabbccddeeff"; const char kIv[] = "0123456789abcdef";
diff --git a/media/mojo/common/mojo_decoder_buffer_converter_unittest.cc b/media/mojo/common/mojo_decoder_buffer_converter_unittest.cc index f454665..7259821 100644 --- a/media/mojo/common/mojo_decoder_buffer_converter_unittest.cc +++ b/media/mojo/common/mojo_decoder_buffer_converter_unittest.cc
@@ -8,7 +8,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/test/mock_callback.h" #include "base/test/task_environment.h" @@ -64,8 +63,8 @@ base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "hello, world"; const uint8_t kSideData[] = "sideshow bob"; - const size_t kDataSize = base::size(kData); - const size_t kSideDataSize = base::size(kSideData); + const size_t kDataSize = std::size(kData); + const size_t kSideDataSize = std::size(kSideData); scoped_refptr<DecoderBuffer> buffer(DecoderBuffer::CopyFrom( reinterpret_cast<const uint8_t*>(&kData), kDataSize, @@ -100,7 +99,7 @@ TEST(MojoDecoderBufferConverterTest, ConvertDecoderBuffer_KeyFrame) { base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> buffer(DecoderBuffer::CopyFrom( reinterpret_cast<const uint8_t*>(&kData), kDataSize)); @@ -114,7 +113,7 @@ TEST(MojoDecoderBufferConverterTest, ConvertDecoderBuffer_EncryptedBuffer) { base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); const char kKeyId[] = "00112233445566778899aabbccddeeff"; const char kIv[] = "0123456789abcdef"; @@ -153,7 +152,7 @@ TEST(MojoDecoderBufferConverterTest, Chunked) { base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -166,7 +165,7 @@ TEST(MojoDecoderBufferConverterTest, WriterSidePipeError) { base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -201,7 +200,7 @@ // Three buffers: normal, EOS, normal. const uint8_t kData[] = "Hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer1 = DecoderBuffer::CopyFrom(kData, kDataSize); scoped_refptr<DecoderBuffer> media_buffer2(DecoderBuffer::CreateEOSBuffer()); @@ -255,7 +254,7 @@ base::RunLoop run_loop; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -276,7 +275,7 @@ base::RunLoop run_loop; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -304,7 +303,7 @@ base::RunLoop run_loop; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -333,7 +332,7 @@ base::RunLoop run_loop; const uint8_t kData[] = "Lorem ipsum dolor sit amet, consectetur cras amet"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); scoped_refptr<DecoderBuffer> media_buffer = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -369,7 +368,7 @@ // Three buffers: normal, EOS, normal. const uint8_t kData[] = "Hello, world"; - const size_t kDataSize = base::size(kData); + const size_t kDataSize = std::size(kData); auto media_buffer1 = DecoderBuffer::CopyFrom(kData, kDataSize); auto media_buffer2 = DecoderBuffer::CreateEOSBuffer(); auto media_buffer3 = DecoderBuffer::CopyFrom(kData, kDataSize); @@ -405,7 +404,7 @@ TEST(MojoDecoderBufferConverterTest, WriterWithInvalidHandle) { base::test::SingleThreadTaskEnvironment task_environment; const uint8_t kData[] = "Hello, world"; - auto media_buffer = DecoderBuffer::CopyFrom(kData, base::size(kData)); + auto media_buffer = DecoderBuffer::CopyFrom(kData, std::size(kData)); auto writer = std::make_unique<MojoDecoderBufferWriter>( mojo::ScopedDataPipeProducerHandle()); @@ -418,7 +417,7 @@ // Write a real buffer for testing. const uint8_t kData[] = "Hello, world"; - auto media_buffer = DecoderBuffer::CopyFrom(kData, base::size(kData)); + auto media_buffer = DecoderBuffer::CopyFrom(kData, std::size(kData)); MojoDecoderBufferConverter converter; auto mojo_buffer = converter.writer->WriteDecoderBuffer(media_buffer); DCHECK(mojo_buffer);
diff --git a/media/mojo/mojom/audio_decoder_config_mojom_traits_unittest.cc b/media/mojo/mojom/audio_decoder_config_mojom_traits_unittest.cc index 8fb19da..aa510d63 100644 --- a/media/mojo/mojom/audio_decoder_config_mojom_traits_unittest.cc +++ b/media/mojo/mojom/audio_decoder_config_mojom_traits_unittest.cc
@@ -6,7 +6,6 @@ #include <utility> -#include "base/cxx17_backports.h" #include "media/base/audio_decoder_config.h" #include "media/base/media_util.h" #include "mojo/public/cpp/base/time_mojom_traits.h" @@ -17,7 +16,7 @@ TEST(AudioDecoderConfigStructTraitsTest, Normal) { const uint8_t kExtraData[] = "input extra data"; const std::vector<uint8_t> kExtraDataVector( - &kExtraData[0], &kExtraData[0] + base::size(kExtraData)); + &kExtraData[0], &kExtraData[0] + std::size(kExtraData)); AudioDecoderConfig input; input.Initialize(AudioCodec::kAAC, kSampleFormatU8, CHANNEL_LAYOUT_SURROUND, @@ -92,7 +91,7 @@ TEST(AudioDecoderConfigStructTraitsTest, AacExtraData) { const uint8_t kAacExtraData[] = "aac extra data"; const std::vector<uint8_t> kAacExtraDataVector( - kAacExtraData, kAacExtraData + base::size(kAacExtraData)); + kAacExtraData, kAacExtraData + std::size(kAacExtraData)); AudioDecoderConfig input; input.Initialize(AudioCodec::kAAC, kSampleFormatU8, CHANNEL_LAYOUT_SURROUND,
diff --git a/media/mojo/mojom/video_decoder_config_mojom_traits_unittest.cc b/media/mojo/mojom/video_decoder_config_mojom_traits_unittest.cc index 666d790..878b4880 100644 --- a/media/mojo/mojom/video_decoder_config_mojom_traits_unittest.cc +++ b/media/mojo/mojom/video_decoder_config_mojom_traits_unittest.cc
@@ -6,7 +6,6 @@ #include <utility> -#include "base/cxx17_backports.h" #include "media/base/media_util.h" #include "media/base/video_decoder_config.h" #include "testing/gtest/include/gtest/gtest.h" @@ -24,7 +23,7 @@ TEST(VideoDecoderConfigStructTraitsTest, ConvertVideoDecoderConfig_Normal) { const uint8_t kExtraData[] = "config extra data"; const std::vector<uint8_t> kExtraDataVector( - &kExtraData[0], &kExtraData[0] + base::size(kExtraData)); + &kExtraData[0], &kExtraData[0] + std::size(kExtraData)); VideoDecoderConfig input(VideoCodec::kVP8, VP8PROFILE_ANY, VideoDecoderConfig::AlphaMode::kIsOpaque, VideoColorSpace(), kNoTransformation, kCodedSize,
diff --git a/media/mojo/test/mojo_video_decoder_integration_test.cc b/media/mojo/test/mojo_video_decoder_integration_test.cc index a6b6c45..0f728f2 100644 --- a/media/mojo/test/mojo_video_decoder_integration_test.cc +++ b/media/mojo/test/mojo_video_decoder_integration_test.cc
@@ -2,14 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <stdint.h> + #include <memory> #include <vector> -#include <stdint.h> - #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/raw_ptr.h" @@ -320,9 +319,8 @@ const uint8_t kFakeIv[DecryptConfig::kDecryptionKeySize] = {0}; buffer->set_decrypt_config(DecryptConfig::CreateCencConfig( std::string(reinterpret_cast<const char*>(kFakeKeyId), - base::size(kFakeKeyId)), - std::string(reinterpret_cast<const char*>(kFakeIv), - base::size(kFakeIv)), + std::size(kFakeKeyId)), + std::string(reinterpret_cast<const char*>(kFakeIv), std::size(kFakeIv)), {})); return buffer;
diff --git a/media/muxers/webm_muxer_fuzzertest.cc b/media/muxers/webm_muxer_fuzzertest.cc index e1ee0c8..bc20205 100644 --- a/media/muxers/webm_muxer_fuzzertest.cc +++ b/media/muxers/webm_muxer_fuzzertest.cc
@@ -9,7 +9,6 @@ #include <random> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/run_loop.h" #include "base/strings/string_piece.h" @@ -56,9 +55,9 @@ for (const auto& input_type : kVideoAudioInputTypes) { const auto video_codec = - kSupportedVideoCodecs[rng() % base::size(kSupportedVideoCodecs)]; + kSupportedVideoCodecs[rng() % std::size(kSupportedVideoCodecs)]; const auto audio_codec = - kSupportedAudioCodecs[rng() % base::size(kSupportedAudioCodecs)]; + kSupportedAudioCodecs[rng() % std::size(kSupportedAudioCodecs)]; media::WebmMuxer muxer(audio_codec, input_type.has_video, input_type.has_audio, std::make_unique<media::LiveWebmMuxerDelegate>( @@ -87,7 +86,7 @@ ? media::CHANNEL_LAYOUT_STEREO : media::CHANNEL_LAYOUT_MONO; const int sample_rate = - kSampleRatesInKHz[rng() % base::size(kSampleRatesInKHz)]; + kSampleRatesInKHz[rng() % std::size(kSampleRatesInKHz)]; const media::AudioParameters params( media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout, sample_rate,
diff --git a/media/parsers/jpeg_parser.cc b/media/parsers/jpeg_parser.cc index 77189d6..9f41d04 100644 --- a/media/parsers/jpeg_parser.cc +++ b/media/parsers/jpeg_parser.cc
@@ -7,7 +7,6 @@ #include <cstring> #include "base/big_endian.h" -#include "base/cxx17_backports.h" #include "base/logging.h" using base::BigEndianReader; @@ -151,7 +150,7 @@ return false; } if (!InRange(frame_header->num_components, 1, - base::size(frame_header->components))) { + std::size(frame_header->components))) { DLOG(ERROR) << "num_components=" << static_cast<int>(frame_header->num_components) << " is not supported"; @@ -270,7 +269,7 @@ size_t count = 0; if (!reader.ReadBytes(&table->code_length, sizeof(table->code_length))) return false; - for (size_t i = 0; i < base::size(table->code_length); i++) + for (size_t i = 0; i < std::size(table->code_length); i++) count += table->code_length[i]; if (!InRange(count, 0, sizeof(table->code_value))) {
diff --git a/media/renderers/win/media_foundation_renderer.cc b/media/renderers/win/media_foundation_renderer.cc index b88f8c13..b2f075ce 100644 --- a/media/renderers/win/media_foundation_renderer.cc +++ b/media/renderers/win/media_foundation_renderer.cc
@@ -327,7 +327,7 @@ D3D_FEATURE_LEVEL_9_1}; RETURN_IF_FAILED( D3D11CreateDevice(nullptr, D3D_DRIVER_TYPE_HARDWARE, 0, creation_flags, - feature_levels, base::size(feature_levels), + feature_levels, std::size(feature_levels), D3D11_SDK_VERSION, &d3d11_device, nullptr, nullptr)); RETURN_IF_FAILED(media::SetDebugName(d3d11_device.Get(), "Media_MFRenderer"));
diff --git a/media/video/h264_parser.cc b/media/video/h264_parser.cc index ed7c822..04f0b85 100644 --- a/media/video/h264_parser.cc +++ b/media/video/h264_parser.cc
@@ -8,7 +8,6 @@ #include <limits> #include <memory> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/notreached.h" #include "base/numerics/safe_math.h" @@ -297,7 +296,7 @@ 80, 18, 15, 64, 160, 4, 3, 2}; static const int kTableSarHeight[] = {0, 1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1}; -static_assert(base::size(kTableSarWidth) == base::size(kTableSarHeight), +static_assert(std::size(kTableSarWidth) == std::size(kTableSarHeight), "sar tables must have the same size"); H264Parser::H264Parser() { @@ -811,7 +810,7 @@ READ_BOOL_OR_RETURN(&seq_scaling_list_present_flag); if (seq_scaling_list_present_flag) { - res = ParseScalingList(base::size(sps->scaling_list4x4[i]), + res = ParseScalingList(std::size(sps->scaling_list4x4[i]), sps->scaling_list4x4[i], &use_default); if (res != kOk) return res; @@ -830,7 +829,7 @@ READ_BOOL_OR_RETURN(&seq_scaling_list_present_flag); if (seq_scaling_list_present_flag) { - res = ParseScalingList(base::size(sps->scaling_list8x8[i]), + res = ParseScalingList(std::size(sps->scaling_list8x8[i]), sps->scaling_list8x8[i], &use_default); if (res != kOk) return res; @@ -858,7 +857,7 @@ READ_BOOL_OR_RETURN(&pic_scaling_list_present_flag); if (pic_scaling_list_present_flag) { - res = ParseScalingList(base::size(pps->scaling_list4x4[i]), + res = ParseScalingList(std::size(pps->scaling_list4x4[i]), pps->scaling_list4x4[i], &use_default); if (res != kOk) return res; @@ -884,7 +883,7 @@ READ_BOOL_OR_RETURN(&pic_scaling_list_present_flag); if (pic_scaling_list_present_flag) { - res = ParseScalingList(base::size(pps->scaling_list8x8[i]), + res = ParseScalingList(std::size(pps->scaling_list8x8[i]), pps->scaling_list8x8[i], &use_default); if (res != kOk) return res; @@ -941,7 +940,7 @@ READ_BITS_OR_RETURN(16, &sps->sar_width); READ_BITS_OR_RETURN(16, &sps->sar_height); } else { - const int max_aspect_ratio_idc = base::size(kTableSarWidth) - 1; + const int max_aspect_ratio_idc = std::size(kTableSarWidth) - 1; IN_RANGE_OR_RETURN(aspect_ratio_idc, 0, max_aspect_ratio_idc); sps->sar_width = kTableSarWidth[aspect_ratio_idc]; sps->sar_height = kTableSarHeight[aspect_ratio_idc]; @@ -1398,7 +1397,7 @@ H264DecRefPicMarking* marking; if (shdr->adaptive_ref_pic_marking_mode_flag) { size_t i; - for (i = 0; i < base::size(shdr->ref_pic_marking); ++i) { + for (i = 0; i < std::size(shdr->ref_pic_marking); ++i) { marking = &shdr->ref_pic_marking[i]; READ_UE_OR_RETURN(&marking->memory_mgmnt_control_operation); @@ -1423,7 +1422,7 @@ return kInvalidStream; } - if (i == base::size(shdr->ref_pic_marking)) { + if (i == std::size(shdr->ref_pic_marking)) { DVLOG(1) << "Ran out of dec ref pic marking fields"; return kUnsupportedStream; }
diff --git a/media/video/h264_parser_unittest.cc b/media/video/h264_parser_unittest.cc index ef707c35..9e6779b 100644 --- a/media/video/h264_parser_unittest.cc +++ b/media/video/h264_parser_unittest.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/video/h264_parser.h" + #include <limits> #include <memory> #include <vector> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/memory_mapped_file.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" #include "media/base/subsample_entry.h" #include "media/base/test_data_util.h" -#include "media/video/h264_parser.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/geometry/rect.h" @@ -199,7 +199,7 @@ subsamples.emplace_back(5u, 20u); subsamples.emplace_back(10u, 0u); H264Parser parser; - parser.SetEncryptedStream(kStream, base::size(kStream), subsamples); + parser.SetEncryptedStream(kStream, std::size(kStream), subsamples); H264NALU nalu; ASSERT_EQ(H264Parser::kOk, parser.AdvanceToNextNALU(&nalu)); @@ -247,7 +247,7 @@ subsamples.emplace_back(4u, 24u); subsamples.emplace_back(18, 0); H264Parser parser; - parser.SetEncryptedStream(kStream, base::size(kStream), subsamples); + parser.SetEncryptedStream(kStream, std::size(kStream), subsamples); H264NALU nalu; ASSERT_EQ(H264Parser::kOk, parser.AdvanceToNextNALU(&nalu));
diff --git a/media/video/h264_poc.cc b/media/video/h264_poc.cc index 35680ccb..5327e435 100644 --- a/media/video/h264_poc.cc +++ b/media/video/h264_poc.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "media/video/h264_poc.h" + #include <stddef.h> #include <algorithm> -#include "base/cxx17_backports.h" #include "base/logging.h" #include "media/video/h264_parser.h" -#include "media/video/h264_poc.h" namespace media { @@ -25,7 +25,7 @@ return false; } - for (size_t i = 0; i < base::size(slice_hdr.ref_pic_marking); i++) { + for (size_t i = 0; i < std::size(slice_hdr.ref_pic_marking); i++) { int32_t op = slice_hdr.ref_pic_marking[i].memory_mgmnt_control_operation; if (op == 5) return true;
diff --git a/media/video/h264_poc.h b/media/video/h264_poc.h index 0e8946b..a3d99e3 100644 --- a/media/video/h264_poc.h +++ b/media/video/h264_poc.h
@@ -7,6 +7,7 @@ #include <stdint.h> +#include "media/base/media_export.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace media {
diff --git a/media/video/h265_nalu_parser_unittest.cc b/media/video/h265_nalu_parser_unittest.cc index a650f36..086875f5 100644 --- a/media/video/h265_nalu_parser_unittest.cc +++ b/media/video/h265_nalu_parser_unittest.cc
@@ -113,7 +113,7 @@ subsamples.emplace_back(5u, 20u); subsamples.emplace_back(11u, 0u); H265NaluParser parser; - parser.SetEncryptedStream(kStream, base::size(kStream), subsamples); + parser.SetEncryptedStream(kStream, std::size(kStream), subsamples); H265NALU nalu; EXPECT_EQ(H265NaluParser::kOk, parser.AdvanceToNextNALU(&nalu)); @@ -164,7 +164,7 @@ subsamples.emplace_back(5u, 24u); subsamples.emplace_back(19u, 0u); H265NaluParser parser; - parser.SetEncryptedStream(kStream, base::size(kStream), subsamples); + parser.SetEncryptedStream(kStream, std::size(kStream), subsamples); H265NALU nalu; EXPECT_EQ(H265NaluParser::kOk, parser.AdvanceToNextNALU(&nalu));
diff --git a/media/video/h265_parser.cc b/media/video/h265_parser.cc index 36465f76..618060b 100644 --- a/media/video/h265_parser.cc +++ b/media/video/h265_parser.cc
@@ -11,7 +11,6 @@ #include <cstring> #include "base/bits.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "media/base/decrypt_config.h" @@ -42,7 +41,7 @@ 80, 18, 15, 64, 160, 4, 3, 2}; constexpr int kTableSarHeight[] = {0, 1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1}; -static_assert(base::size(kTableSarWidth) == base::size(kTableSarHeight), +static_assert(std::size(kTableSarWidth) == std::size(kTableSarHeight), "sar tables must have the same size"); void FillInDefaultScalingListData(H265ScalingListData* scaling_list_data, @@ -1465,7 +1464,7 @@ READ_BITS_OR_RETURN(16, &vui->sar_width); READ_BITS_OR_RETURN(16, &vui->sar_height); } else { - const int max_aspect_ratio_idc = base::size(kTableSarWidth) - 1; + const int max_aspect_ratio_idc = std::size(kTableSarWidth) - 1; IN_RANGE_OR_RETURN(aspect_ratio_idc, 0, max_aspect_ratio_idc); vui->sar_width = kTableSarWidth[aspect_ratio_idc]; vui->sar_height = kTableSarHeight[aspect_ratio_idc];
diff --git a/media/webrtc/audio_processor.cc b/media/webrtc/audio_processor.cc index 53c6f33..cb70ccd5 100644 --- a/media/webrtc/audio_processor.cc +++ b/media/webrtc/audio_processor.cc
@@ -23,6 +23,7 @@ #include "build/chromeos_buildflags.h" #include "media/base/audio_fifo.h" #include "media/base/audio_parameters.h" +#include "media/base/audio_timestamp_helper.h" #include "media/base/channel_layout.h" #include "media/base/limits.h" #include "media/webrtc/constants.h" @@ -222,7 +223,12 @@ output_format_(output_format), deliver_processed_audio_callback_( std::move(deliver_processed_audio_callback)), - audio_delay_stats_reporter_(kBuffersPerSecond) { + audio_delay_stats_reporter_(kBuffersPerSecond), + playout_fifo_( + // Unretained is safe, since the callback is always called + // synchronously within the AudioProcessor. + base::BindRepeating(&AudioProcessor::AnalyzePlayoutData, + base::Unretained(this))) { DCHECK(deliver_processed_audio_callback_); DCHECK(log_callback_); @@ -242,9 +248,9 @@ const int fifo_output_frames_per_buffer = webrtc_audio_processing_ ? input_format_.sample_rate() / 100 : output_format_.frames_per_buffer(); - SendLogMessage( - base::StringPrintf("%s => (FIFO: fifo_output_frames_per_buffer=%d)", - __func__, fifo_output_frames_per_buffer)); + SendLogMessage(base::StringPrintf( + "%s => (capture FIFO: fifo_output_frames_per_buffer=%d)", __func__, + fifo_output_frames_per_buffer)); capture_fifo_ = std::make_unique<AudioProcessorCaptureFifo>( input_format.channels(), input_format_.channels(), input_format.frames_per_buffer(), fifo_output_frames_per_buffer, @@ -350,40 +356,59 @@ worker_queue_.reset(nullptr); } -void AudioProcessor::OnPlayoutData(const media::AudioBus& audio_bus, +void AudioProcessor::OnPlayoutData(const AudioBus& audio_bus, int sample_rate, base::TimeDelta audio_delay) { - DCHECK_GE(audio_bus.channels(), 1); - DCHECK_LE(audio_bus.channels(), media::limits::kMaxChannels); - int frames_per_10_ms = sample_rate / 100; - if (audio_bus.frames() != frames_per_10_ms) { - if (unsupported_buffer_size_log_count_ < 10) { - LOG(ERROR) << "MSAP::OnPlayoutData: Unsupported audio buffer size " - << audio_bus.frames() << ", expected " << frames_per_10_ms; - ++unsupported_buffer_size_log_count_; - } + TRACE_EVENT1("audio", "AudioProcessor::OnPlayoutData", "delay (ms)", + audio_delay.InMillisecondsF()); + + if (!webrtc_audio_processing_) { return; } - TRACE_EVENT1("audio", "AudioProcessor::OnPlayoutData", "delay (ms)", - audio_delay.InMillisecondsF()); - playout_delay_ = audio_delay; + unbuffered_playout_delay_ = audio_delay; - webrtc::StreamConfig input_stream_config(sample_rate, audio_bus.channels()); + if (!playout_sample_rate_hz_ || sample_rate != *playout_sample_rate_hz_) { + // We reset the buffer on sample rate changes because the current buffer + // content is rendered obsolete (the audio processing module will reset + // internally) and the FIFO does not resample previous content to the new + // rate. + // Channel count changes are already handled within the AudioPushFifo. + playout_sample_rate_hz_ = sample_rate; + const int num_frames_per_10_ms = sample_rate / 100; + playout_fifo_.Reset(num_frames_per_10_ms); + } + + playout_fifo_.Push(audio_bus); +} + +void AudioProcessor::AnalyzePlayoutData(const AudioBus& audio_bus, + int frame_delay) { + DCHECK(webrtc_audio_processing_); + DCHECK(playout_sample_rate_hz_.has_value()); + + const base::TimeDelta playout_delay = + unbuffered_playout_delay_ + + AudioTimestampHelper::FramesToTime(frame_delay, *playout_sample_rate_hz_); + playout_delay_ = playout_delay; + TRACE_EVENT1("audio", "AudioProcessor::AnalyzePlayoutData", "delay (ms)", + playout_delay.InMillisecondsF()); + + webrtc::StreamConfig input_stream_config(*playout_sample_rate_hz_, + audio_bus.channels()); // If the input audio appears to contain upmixed mono audio, then APM is only // given the left channel. This reduces computational complexity and improves // convergence of audio processing algorithms. - // TODO(crbug.com/1023337): Ensure correct channel count in input audio bus. assume_upmixed_mono_playout_ = assume_upmixed_mono_playout_ && LeftAndRightChannelsAreSymmetric(audio_bus); if (assume_upmixed_mono_playout_) { input_stream_config.set_num_channels(1); } + std::array<const float*, media::limits::kMaxChannels> input_ptrs; for (int i = 0; i < static_cast<int>(input_stream_config.num_channels()); ++i) input_ptrs[i] = audio_bus.channel(i); - // TODO(ajm): Should AnalyzeReverseStream() account for the |audio_delay|? const int apm_error = webrtc_audio_processing_->AnalyzeReverseStream( input_ptrs.data(), input_stream_config); if (apm_error != webrtc::AudioProcessing::kNoError &&
diff --git a/media/webrtc/audio_processor.h b/media/webrtc/audio_processor.h index 1349be27..35763b1 100644 --- a/media/webrtc/audio_processor.h +++ b/media/webrtc/audio_processor.h
@@ -16,6 +16,7 @@ #include "base/time/time.h" #include "media/base/audio_parameters.h" #include "media/base/audio_processing.h" +#include "media/base/audio_push_fifo.h" #include "media/webrtc/audio_delay_stats_reporter.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/webrtc/modules/audio_processing/include/audio_processing.h" @@ -105,8 +106,7 @@ double volume, bool key_pressed); - // Processes playout audio. |audio_bus| must contain |sample_rate/100| samples - // per channel. + // Analyzes playout audio for e.g. echo cancellation. // Must be called on the playout thread. void OnPlayoutData(const media::AudioBus& audio_bus, int sample_rate, @@ -179,6 +179,10 @@ int num_preferred_channels, float* const* output_ptrs); + // Used as callback from |playout_fifo_| in OnPlayoutData(). + // Called on the playout thread. + void AnalyzePlayoutData(const AudioBus& audio_bus, int frame_delay); + void SendLogMessage(const std::string& message) VALID_CONTEXT_REQUIRED(owning_sequence_); @@ -203,8 +207,8 @@ std::unique_ptr<rtc::TaskQueue> worker_queue_ GUARDED_BY_CONTEXT(owning_sequence_); - // Cached value for the playout delay latency. Accessed on both capture and - // playout threads. + // Cached value for the playout delay latency. Updated on the playout thread + // and read on the capture thread. std::atomic<base::TimeDelta> playout_delay_{base::TimeDelta()}; // Members configured on the owning sequence in the constructor and @@ -238,12 +242,21 @@ // Members accessed only on the playout thread: + // FIFO to provide playout audio in 10 ms chunks. + AudioPushFifo playout_fifo_; + + // Cached value of the playout delay before adjusting for delay introduced by + // |playout_fifo_|. + base::TimeDelta unbuffered_playout_delay_ = base::TimeDelta(); + + // The sample rate of incoming playout audio. + absl::optional<int> playout_sample_rate_hz_ = absl::nullopt; + // Indicates whether the audio processor playout signal has ever had // asymmetric left and right channel content. bool assume_upmixed_mono_playout_ = true; // Counters to avoid excessively logging errors on a real-time thread. - size_t unsupported_buffer_size_log_count_ = 0; size_t apm_playout_error_code_log_count_ = 0; size_t large_delay_log_count_ = 0; };
diff --git a/media/webrtc/audio_processor_test.cc b/media/webrtc/audio_processor_test.cc index 9fb0a916..bb0f2bc50 100644 --- a/media/webrtc/audio_processor_test.cc +++ b/media/webrtc/audio_processor_test.cc
@@ -488,21 +488,81 @@ } } -TEST_F(AudioProcessorTest, ForwardsPlayoutReferenceToWebrtcApm) { - auto mock_webrtc_audio_processing = - rtc::make_ref_counted<webrtc::test::MockAudioProcessing>(); - AudioProcessor audio_processor(mock_capture_callback_.Get(), - LogCallbackForTesting(), params_, params_, - mock_webrtc_audio_processing, false); +class AudioProcessorPlayoutTest : public AudioProcessorTest { + protected: + AudioProcessorPlayoutTest() + : mock_webrtc_apm_( + rtc::make_ref_counted<webrtc::test::MockAudioProcessing>()), + audio_processor_(mock_capture_callback_.Get(), + LogCallbackForTesting(), + params_, + params_, + mock_webrtc_apm_, + false) {} + rtc::scoped_refptr<webrtc::test::MockAudioProcessing> mock_webrtc_apm_; + AudioProcessor audio_processor_; +}; + +TEST_F(AudioProcessorPlayoutTest, OnPlayoutData_ForwardsDataToWebrtcApm) { std::unique_ptr<media::AudioBus> data_bus = media::AudioBus::Create(/*channels=*/2, /*frames=*/480); data_bus->Zero(); - EXPECT_CALL(*mock_webrtc_audio_processing, AnalyzeReverseStream(_, _)) - .Times(1); + EXPECT_CALL(*mock_webrtc_apm_, AnalyzeReverseStream(_, _)).Times(1); - audio_processor.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); +} + +TEST_F(AudioProcessorPlayoutTest, OnPlayoutData_BuffersPlayout) { + std::unique_ptr<media::AudioBus> data_bus = + media::AudioBus::Create(/*channels=*/2, /*frames=*/48000 * 4 / 1000); + data_bus->Zero(); + + // 5 buffers of 4 ms yields two 10 ms calls to APM. + EXPECT_CALL(*mock_webrtc_apm_, AnalyzeReverseStream(_, _)).Times(2); + + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*data_bus, 48000, base::Milliseconds(10)); +} + +TEST_F(AudioProcessorPlayoutTest, OnPlayoutData_HandlesVariableInputSize) { + std::unique_ptr<media::AudioBus> long_data_bus = + media::AudioBus::Create(/*channels=*/2, /*frames=*/48000 * 25 / 1000); + long_data_bus->Zero(); + std::unique_ptr<media::AudioBus> short_data_bus = + media::AudioBus::Create(/*channels=*/2, /*frames=*/48000 * 5 / 1000); + short_data_bus->Zero(); + + // 25 ms + 5 ms yields three 10 ms calls to APM. + EXPECT_CALL(*mock_webrtc_apm_, AnalyzeReverseStream(_, _)).Times(3); + + audio_processor_.OnPlayoutData(*long_data_bus, 48000, base::Milliseconds(10)); + audio_processor_.OnPlayoutData(*short_data_bus, 48000, + base::Milliseconds(10)); +} + +TEST_F(AudioProcessorPlayoutTest, OnPlayoutData_HandlesSampleRateChange) { + std::unique_ptr<media::AudioBus> high_rate_data_bus = + media::AudioBus::Create(/*channels=*/2, /*frames=*/48000 * 12 / 1000); + high_rate_data_bus->Zero(); + std::unique_ptr<media::AudioBus> low_rate_data_bus = + media::AudioBus::Create(/*channels=*/2, /*frames=*/32000 * 18 / 1000); + low_rate_data_bus->Zero(); + + // 12 ms yields one 10 ms call to APM and leaves 2 ms in the buffer. + EXPECT_CALL(*mock_webrtc_apm_, AnalyzeReverseStream(_, _)).Times(1); + audio_processor_.OnPlayoutData(*high_rate_data_bus, 48000, + base::Milliseconds(10)); + + // 18 ms yields one 10 ms call to APM. Any previous buffer content should have + // been discarded, otherwise there would be more than one call to APM. + EXPECT_CALL(*mock_webrtc_apm_, AnalyzeReverseStream(_, _)).Times(1); + audio_processor_.OnPlayoutData(*low_rate_data_bus, 32000, + base::Milliseconds(10)); } // When audio processing is performed, processed audio should be delivered as
diff --git a/net/android/dummy_spnego_authenticator.cc b/net/android/dummy_spnego_authenticator.cc index ad7c954..f69edc5 100644 --- a/net/android/dummy_spnego_authenticator.cc +++ b/net/android/dummy_spnego_authenticator.cc
@@ -5,7 +5,6 @@ #include "base/android/jni_string.h" #include "base/base64.h" -#include "base/cxx17_backports.h" #include "net/net_test_jni_headers/DummySpnegoAuthenticator_jni.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,7 +16,7 @@ // From RFC 4178, which uses SNEGO not SPNEGO. static const unsigned char kSpnegoOid[] = {0x2b, 0x06, 0x01, 0x05, 0x05, 0x02}; gss_OID_desc CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL = { - base::size(kSpnegoOid), const_cast<unsigned char*>(kSpnegoOid)}; + std::size(kSpnegoOid), const_cast<unsigned char*>(kSpnegoOid)}; gss_OID CHROME_GSS_SPNEGO_MECH_OID_DESC = &CHROME_GSS_SPNEGO_MECH_OID_DESC_VAL;
diff --git a/net/base/address_list_unittest.cc b/net/base/address_list_unittest.cc index e656a8c..d6f2934 100644 --- a/net/base/address_list_unittest.cc +++ b/net/base/address_list_unittest.cc
@@ -6,7 +6,6 @@ #include <algorithm> -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/sys_byteorder.h" #include "net/base/ip_address.h" @@ -144,7 +143,7 @@ AddressList::CreateFromIPAddressList(ip_list, std::move(aliases)); std::string canonical_name; EXPECT_THAT(test_list.dns_aliases(), UnorderedElementsAre(kCanonicalName)); - EXPECT_EQ(base::size(tests), test_list.size()); + EXPECT_EQ(std::size(tests), test_list.size()); } TEST(AddressListTest, GetCanonicalNameWhenUnset) {
diff --git a/net/base/chunked_upload_data_stream_unittest.cc b/net/base/chunked_upload_data_stream_unittest.cc index 63ff7130..85a5352 100644 --- a/net/base/chunked_upload_data_stream_unittest.cc +++ b/net/base/chunked_upload_data_stream_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> #include <string> -#include "base/cxx17_backports.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" #include "net/base/test_completion_callback.h" @@ -25,7 +24,7 @@ namespace { constexpr char kTestData[] = "0123456789"; -constexpr size_t kTestDataSize = base::size(kTestData) - 1; +constexpr size_t kTestDataSize = std::size(kTestData) - 1; constexpr size_t kTestBufferSize = 1 << 14; // 16KB. } // namespace
diff --git a/net/base/elements_upload_data_stream_unittest.cc b/net/base/elements_upload_data_stream_unittest.cc index 64c43c1..af44f0a 100644 --- a/net/base/elements_upload_data_stream_unittest.cc +++ b/net/base/elements_upload_data_stream_unittest.cc
@@ -11,7 +11,6 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" @@ -48,7 +47,7 @@ namespace { const char kTestData[] = "0123456789"; -const size_t kTestDataSize = base::size(kTestData) - 1; +const size_t kTestDataSize = std::size(kTestData) - 1; const size_t kTestBufferSize = 1 << 14; // 16KB. // Reads data from the upload data stream, and returns the data as string.
diff --git a/net/base/escape.cc b/net/base/escape.cc index c5c4745..790399c 100644 --- a/net/base/escape.cc +++ b/net/base/escape.cc
@@ -7,7 +7,6 @@ #include <ostream> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversion_utils.h" #include "base/strings/utf_string_conversions.h" @@ -232,7 +231,7 @@ {"<", '<'}, {">", '>'}, {"&", '&'}, {""", '"'}, {"'", '\''}, }; - constexpr size_t kEscapeToCharsCount = base::size(kEscapeToChars); + constexpr size_t kEscapeToCharsCount = std::size(kEscapeToChars); if (input.find(u"&") == std::string::npos) return std::u16string(input); @@ -244,7 +243,7 @@ if (*iter == '&') { // Potential ampersand encode char. size_t index = iter - text.begin(); - for (size_t i = 0; i < base::size(kEscapeToChars); i++) { + for (size_t i = 0; i < std::size(kEscapeToChars); i++) { if (ampersand_chars[i].empty()) { ampersand_chars[i] = base::ASCIIToUTF16(kEscapeToChars[i].ampersand_code);
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc index 5a10f4e..a05b8e5 100644 --- a/net/base/file_stream_unittest.cc +++ b/net/base/file_stream_unittest.cc
@@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_util.h" #include "base/memory/raw_ptr.h" @@ -45,7 +44,7 @@ namespace { constexpr char kTestData[] = "0123456789"; -constexpr int kTestDataSize = base::size(kTestData) - 1; +constexpr int kTestDataSize = std::size(kTestData) - 1; // Creates an IOBufferWithSize that contains the kTestDataSize. scoped_refptr<IOBufferWithSize> CreateTestDataBuffer() {
diff --git a/net/base/ip_address.cc b/net/base/ip_address.cc index 635d260b7..8788375 100644 --- a/net/base/ip_address.cc +++ b/net/base/ip_address.cc
@@ -9,7 +9,6 @@ #include "base/check_op.h" #include "base/containers/stack_container.h" -#include "base/cxx17_backports.h" #include "base/notreached.h" #include "base/strings/strcat.h" #include "base/strings/string_piece.h" @@ -407,7 +406,7 @@ base::StackVector<uint8_t, 16> bytes; bytes->insert(bytes->end(), - address.bytes().begin() + base::size(kIPv4MappedPrefix), + address.bytes().begin() + std::size(kIPv4MappedPrefix), address.bytes().end()); return IPAddress(bytes->data(), bytes->size()); }
diff --git a/net/base/ip_address_unittest.cc b/net/base/ip_address_unittest.cc index 2483a030..768f589c 100644 --- a/net/base/ip_address_unittest.cc +++ b/net/base/ip_address_unittest.cc
@@ -6,7 +6,6 @@ #include <vector> -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -34,29 +33,29 @@ TEST(IPAddressBytesTest, ConstructIPv4) { uint8_t data[] = {192, 168, 1, 1}; - IPAddressBytes bytes(data, base::size(data)); - ASSERT_EQ(base::size(data), bytes.size()); + IPAddressBytes bytes(data, std::size(data)); + ASSERT_EQ(std::size(data), bytes.size()); size_t i = 0; for (uint8_t byte : bytes) EXPECT_EQ(data[i++], byte); - ASSERT_EQ(base::size(data), i); + ASSERT_EQ(std::size(data), i); } TEST(IPAddressBytesTest, ConstructIPv6) { uint8_t data[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; - IPAddressBytes bytes(data, base::size(data)); - ASSERT_EQ(base::size(data), bytes.size()); + IPAddressBytes bytes(data, std::size(data)); + ASSERT_EQ(std::size(data), bytes.size()); size_t i = 0; for (uint8_t byte : bytes) EXPECT_EQ(data[i++], byte); - ASSERT_EQ(base::size(data), i); + ASSERT_EQ(std::size(data), i); } TEST(IPAddressBytesTest, Assign) { uint8_t data[] = {192, 168, 1, 1}; IPAddressBytes copy; - copy.Assign(data, base::size(data)); - EXPECT_EQ(IPAddressBytes(data, base::size(data)), copy); + copy.Assign(data, std::size(data)); + EXPECT_EQ(IPAddressBytes(data, std::size(data)), copy); } TEST(IPAddressTest, ConstructIPv4) {
diff --git a/net/base/network_change_notifier.cc b/net/base/network_change_notifier.cc index 3f7981b3..2542acfa 100644 --- a/net/base/network_change_notifier.cc +++ b/net/base/network_change_notifier.cc
@@ -9,7 +9,6 @@ #include <unordered_set> #include <utility> -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" @@ -502,7 +501,7 @@ "CONNECTION_2G", "CONNECTION_3G", "CONNECTION_4G", "CONNECTION_NONE", "CONNECTION_BLUETOOTH", "CONNECTION_5G", }; - static_assert(base::size(kConnectionTypeNames) == + static_assert(std::size(kConnectionTypeNames) == NetworkChangeNotifier::CONNECTION_LAST + 1, "ConnectionType name count should match"); if (type < CONNECTION_UNKNOWN || type > CONNECTION_LAST) {
diff --git a/net/base/network_interfaces_linux_unittest.cc b/net/base/network_interfaces_linux_unittest.cc index ae026c2c..7f4d7391 100644 --- a/net/base/network_interfaces_linux_unittest.cc +++ b/net/base/network_interfaces_linux_unittest.cc
@@ -11,7 +11,6 @@ #include <string> #include <unordered_set> -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "net/base/address_tracker_linux.h" @@ -32,15 +31,15 @@ 0xfe, 0xe5, 0x00, 0xc3}; char* GetInterfaceName(int interface_index, char* ifname) { - static_assert(base::size(kIfnameEm1) < IF_NAMESIZE, "Invalid interface name"); - memcpy(ifname, kIfnameEm1, base::size(kIfnameEm1)); + static_assert(std::size(kIfnameEm1) < IF_NAMESIZE, "Invalid interface name"); + memcpy(ifname, kIfnameEm1, std::size(kIfnameEm1)); return ifname; } char* GetInterfaceNameVM(int interface_index, char* ifname) { - static_assert(base::size(kIfnameVmnet) < IF_NAMESIZE, + static_assert(std::size(kIfnameVmnet) < IF_NAMESIZE, "Invalid interface name"); - memcpy(ifname, kIfnameVmnet, base::size(kIfnameVmnet)); + memcpy(ifname, kIfnameVmnet, std::size(kIfnameVmnet)); return ifname; }
diff --git a/net/base/network_isolation_key_unittest.cc b/net/base/network_isolation_key_unittest.cc index 014af4f..d53a0e0 100644 --- a/net/base/network_isolation_key_unittest.cc +++ b/net/base/network_isolation_key_unittest.cc
@@ -4,7 +4,6 @@ #include "net/base/network_isolation_key.h" -#include "base/cxx17_backports.h" #include "base/unguessable_token.h" #include "base/values.h" #include "net/base/schemeful_site.h" @@ -105,7 +104,7 @@ SchemefulSite(GURL("https://a.test/")), &nonce2), }; - for (size_t first = 0; first < base::size(kKeys); ++first) { + for (size_t first = 0; first < std::size(kKeys); ++first) { NetworkIsolationKey key1 = kKeys[first]; SCOPED_TRACE(key1.ToDebugString()); @@ -119,7 +118,7 @@ EXPECT_FALSE(key1 < key1_copy); EXPECT_FALSE(key1_copy < key1); - for (size_t second = first + 1; second < base::size(kKeys); ++second) { + for (size_t second = first + 1; second < std::size(kKeys); ++second) { NetworkIsolationKey key2 = kKeys[second]; SCOPED_TRACE(key2.ToDebugString());
diff --git a/net/base/port_util_unittest.cc b/net/base/port_util_unittest.cc index ddf2b5a..0fa1872 100644 --- a/net/base/port_util_unittest.cc +++ b/net/base/port_util_unittest.cc
@@ -6,7 +6,6 @@ #include <string> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -15,7 +14,7 @@ const std::vector<uint16_t> valid[] = { {}, {1}, {1, 2}, {1, 2, 3}, {10, 11, 12, 13}}; - for (size_t i = 0; i < base::size(valid); ++i) { + for (size_t i = 0; i < std::size(valid); ++i) { SetExplicitlyAllowedPorts(valid[i]); EXPECT_EQ(i, GetCountOfExplicitlyAllowedPorts()); }
diff --git a/net/base/proxy_server_unittest.cc b/net/base/proxy_server_unittest.cc index 8e291201..441fc0a 100644 --- a/net/base/proxy_server_unittest.cc +++ b/net/base/proxy_server_unittest.cc
@@ -4,7 +4,6 @@ #include "net/base/proxy_server.h" -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "net/base/proxy_string_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -71,7 +70,7 @@ {ProxyServer::SCHEME_SOCKS5, "foopy", absl::nullopt, "", "foopy", 1080}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::NumberToString(i) + ": " + tests[i].input_host + ":" + base::NumberToString(tests[i].input_port.value_or(-1))); auto proxy = ProxyServer::FromSchemeHostAndPort( @@ -103,7 +102,7 @@ "foo.80", }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::NumberToString(i) + ": " + tests[i]); auto proxy = ProxyServer::FromSchemeHostAndPort(ProxyServer::SCHEME_HTTP, tests[i], 80); @@ -119,7 +118,7 @@ "0x35", }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::NumberToString(i) + ": " + tests[i]); auto proxy = ProxyServer::FromSchemeHostAndPort(ProxyServer::SCHEME_HTTP, "foopy", tests[i]);
diff --git a/net/base/schemeful_site_unittest.cc b/net/base/schemeful_site_unittest.cc index 10a00bb..53197d1 100644 --- a/net/base/schemeful_site_unittest.cc +++ b/net/base/schemeful_site_unittest.cc
@@ -46,7 +46,7 @@ // Compare each origin to every other origin and ensure the operators work as // expected. - for (size_t first = 0; first < base::size(kTestOrigins); ++first) { + for (size_t first = 0; first < std::size(kTestOrigins); ++first) { SchemefulSite site1 = SchemefulSite(kTestOrigins[first]); SCOPED_TRACE(site1.GetDebugString()); @@ -58,7 +58,7 @@ EXPECT_EQ(site1, site1_copy); EXPECT_FALSE(site1 < site1_copy); - for (size_t second = first + 1; second < base::size(kTestOrigins); + for (size_t second = first + 1; second < std::size(kTestOrigins); ++second) { SchemefulSite site2 = SchemefulSite(kTestOrigins[second]); SCOPED_TRACE(site2.GetDebugString());
diff --git a/net/cert/cert_verify_proc_win.cc b/net/cert/cert_verify_proc_win.cc index f3ec5d6c..3ab050f 100644 --- a/net/cert/cert_verify_proc_win.cc +++ b/net/cert/cert_verify_proc_win.cc
@@ -9,7 +9,6 @@ #include <string> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/free_deleter.h" #include "base/metrics/histogram_macros.h" #include "base/no_destructor.h" @@ -640,7 +639,7 @@ }; BOOL ok = CryptInstallOIDFunctionAddress( nullptr, X509_ASN_ENCODING, CRYPT_OID_VERIFY_REVOCATION_FUNC, - base::size(kInterceptFunction), kInterceptFunction, + std::size(kInterceptFunction), kInterceptFunction, CRYPT_INSTALL_OID_FUNC_BEFORE_FLAG); DCHECK(ok); } @@ -1100,7 +1099,7 @@ szOID_SGC_NETSCAPE }; chain_para.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR; - chain_para.RequestedUsage.Usage.cUsageIdentifier = base::size(usage); + chain_para.RequestedUsage.Usage.cUsageIdentifier = std::size(usage); chain_para.RequestedUsage.Usage.rgpszUsageIdentifier = const_cast<LPSTR*>(usage);
diff --git a/net/cert/ct_log_verifier_unittest.cc b/net/cert/ct_log_verifier_unittest.cc index ab7e560..f54e071d 100644 --- a/net/cert/ct_log_verifier_unittest.cc +++ b/net/cert/ct_log_verifier_unittest.cc
@@ -10,7 +10,6 @@ #include <string> #include <vector> -#include "base/cxx17_backports.h" #include "base/strings/string_number_conversions.h" #include "base/time/time.h" #include "crypto/secure_hash.h" @@ -542,7 +541,7 @@ INSTANTIATE_TEST_SUITE_P(KnownGoodProofs, CTLogVerifierConsistencyProofTest, ::testing::Range(size_t(0), - base::size(kConsistencyProofs))); + std::size(kConsistencyProofs))); class CTLogVerifierAuditProofTest : public CTLogVerifierTest, @@ -561,7 +560,7 @@ INSTANTIATE_TEST_SUITE_P(KnownGoodProofs, CTLogVerifierAuditProofTest, - ::testing::Range(size_t(0), base::size(kAuditProofs))); + ::testing::Range(size_t(0), std::size(kAuditProofs))); TEST_F(CTLogVerifierTest, VerifiesAuditProofEdgeCases_InvalidLeafIndex) { std::vector<std::string> proof;
diff --git a/net/cert/symantec_certs.cc b/net/cert/symantec_certs.cc index 4a540f5dd..ae4a3c9 100644 --- a/net/cert/symantec_certs.cc +++ b/net/cert/symantec_certs.cc
@@ -4,8 +4,6 @@ #include "net/cert/symantec_certs.h" -#include "base/cxx17_backports.h" - namespace net { // See net/data/ssl/symantec/README.md @@ -186,7 +184,7 @@ 0x1a, 0x15, 0x83, 0xef, 0x54, 0x94, 0x78, 0xd2, 0x64, 0x76}}, }; -const size_t kSymantecRootsLength = base::size(kSymantecRoots); +const size_t kSymantecRootsLength = std::size(kSymantecRoots); const SHA256HashValue kSymantecExceptions[] = { {{0x56, 0xe9, 0x8d, 0xea, 0xc0, 0x06, 0xa7, 0x29, 0xaf, 0xa2, 0xed, @@ -218,7 +216,7 @@ 0x01, 0xc1, 0x84, 0x42, 0xe4, 0x40, 0x3d, 0x11, 0x18, 0x49}}, }; -const size_t kSymantecExceptionsLength = base::size(kSymantecExceptions); +const size_t kSymantecExceptionsLength = std::size(kSymantecExceptions); const SHA256HashValue kSymantecManagedCAs[] = { {{0x7c, 0xac, 0x9a, 0x0f, 0xf3, 0x15, 0x38, 0x77, 0x50, 0xba, 0x8b, @@ -229,7 +227,7 @@ 0x08, 0x86, 0x7c, 0x04, 0xa5, 0x73, 0xfd, 0x5c, 0xf9, 0xee}}, }; -const size_t kSymantecManagedCAsLength = base::size(kSymantecManagedCAs); +const size_t kSymantecManagedCAsLength = std::size(kSymantecManagedCAs); bool IsLegacySymantecCert(const HashValueVector& public_key_hashes) { return IsAnySHA256HashInSortedArray(public_key_hashes, kSymantecRoots) &&
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc index 238761e..90a724c 100644 --- a/net/cert/x509_certificate.cc +++ b/net/cert/x509_certificate.cc
@@ -14,7 +14,6 @@ #include "base/base64.h" #include "base/containers/contains.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "base/pickle.h" @@ -262,7 +261,7 @@ // data is one of the accepted formats. if (format & ~FORMAT_PEM_CERT_SEQUENCE) { for (size_t i = 0; - certificates.empty() && i < base::size(kFormatDecodePriority); ++i) { + certificates.empty() && i < std::size(kFormatDecodePriority); ++i) { if (format & kFormatDecodePriority[i]) { certificates = CreateCertBuffersFromBytes( base::as_bytes(base::make_span(decoded)), @@ -282,7 +281,7 @@ // contains the binary representation of a Format, if it failed to parse // as a PEM certificate/chain. for (size_t i = 0; - certificates.empty() && i < base::size(kFormatDecodePriority); ++i) { + certificates.empty() && i < std::size(kFormatDecodePriority); ++i) { if (format & kFormatDecodePriority[i]) certificates = CreateCertBuffersFromBytes(data, kFormatDecodePriority[i]); }
diff --git a/net/cert/x509_certificate_unittest.cc b/net/cert/x509_certificate_unittest.cc index cfc7e55..ef2b133 100644 --- a/net/cert/x509_certificate_unittest.cc +++ b/net/cert/x509_certificate_unittest.cc
@@ -8,7 +8,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/hash/sha1.h" @@ -535,17 +534,17 @@ static const uint8_t kIPv4Address[] = { 0x7F, 0x00, 0x00, 0x02 }; - ASSERT_EQ(base::size(kIPv4Address), ip_addresses[0].size()); - EXPECT_EQ(0, memcmp(ip_addresses[0].data(), kIPv4Address, - base::size(kIPv4Address))); + ASSERT_EQ(std::size(kIPv4Address), ip_addresses[0].size()); + EXPECT_EQ( + 0, memcmp(ip_addresses[0].data(), kIPv4Address, std::size(kIPv4Address))); static const uint8_t kIPv6Address[] = { 0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; - ASSERT_EQ(base::size(kIPv6Address), ip_addresses[1].size()); - EXPECT_EQ(0, memcmp(ip_addresses[1].data(), kIPv6Address, - base::size(kIPv6Address))); + ASSERT_EQ(std::size(kIPv6Address), ip_addresses[1].size()); + EXPECT_EQ( + 0, memcmp(ip_addresses[1].data(), kIPv6Address, std::size(kIPv6Address))); // Ensure the subjectAltName dirName has not influenced the handling of // the subject commonName. @@ -1105,11 +1104,11 @@ CertificateList certs = CreateCertificateListFromFile( certs_dir, test_data_.file_name, test_data_.format); ASSERT_FALSE(certs.empty()); - ASSERT_LE(certs.size(), base::size(test_data_.chain_fingerprints)); + ASSERT_LE(certs.size(), std::size(test_data_.chain_fingerprints)); CheckGoogleCert(certs.front(), google_parse_fingerprint, kGoogleParseValidFrom, kGoogleParseValidTo); - for (size_t i = 0; i < base::size(test_data_.chain_fingerprints); ++i) { + for (size_t i = 0; i < std::size(test_data_.chain_fingerprints); ++i) { if (!test_data_.chain_fingerprints[i]) { // No more test certificates expected - make sure no more were // returned before marking this test a success.
diff --git a/net/cert/x509_util_nss_unittest.cc b/net/cert/x509_util_nss_unittest.cc index f837575..6bba21e 100644 --- a/net/cert/x509_util_nss_unittest.cc +++ b/net/cert/x509_util_nss_unittest.cc
@@ -4,7 +4,6 @@ #include "net/cert/x509_util_nss.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "net/cert/scoped_nss_types.h" @@ -31,17 +30,17 @@ TEST(X509UtilNSSTest, IsSameCertificate) { ScopedCERTCertificate google_nss_cert( x509_util::CreateCERTCertificateFromBytes(google_der, - base::size(google_der))); + std::size(google_der))); ASSERT_TRUE(google_nss_cert); ScopedCERTCertificate google_nss_cert2( x509_util::CreateCERTCertificateFromBytes(google_der, - base::size(google_der))); + std::size(google_der))); ASSERT_TRUE(google_nss_cert2); ScopedCERTCertificate webkit_nss_cert( x509_util::CreateCERTCertificateFromBytes(webkit_der, - base::size(webkit_der))); + std::size(webkit_der))); ASSERT_TRUE(webkit_nss_cert); scoped_refptr<X509Certificate> google_x509_cert( @@ -78,7 +77,7 @@ TEST(X509UtilNSSTest, CreateCERTCertificateFromBytes) { ScopedCERTCertificate google_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(google_cert); EXPECT_STREQ( "CN=www.google.com,O=Google Inc,L=Mountain View,ST=California,C=US", @@ -90,7 +89,7 @@ EXPECT_EQ(nullptr, x509_util::CreateCERTCertificateFromBytes(garbage_data, 0)); EXPECT_EQ(nullptr, x509_util::CreateCERTCertificateFromBytes( - garbage_data, base::size(garbage_data))); + garbage_data, std::size(garbage_data))); } TEST(X509UtilNSSTest, CreateCERTCertificateFromX509Certificate) { @@ -193,7 +192,7 @@ TEST(X509UtilNSSTest, DupCERTCertificate) { ScopedCERTCertificate cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(cert); ScopedCERTCertificate cert2 = x509_util::DupCERTCertificate(cert.get()); @@ -210,10 +209,10 @@ TEST(X509UtilNSSTest, DupCERTCertificateList) { ScopedCERTCertificate cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(cert); ScopedCERTCertificate cert2(x509_util::CreateCERTCertificateFromBytes( - webkit_der, base::size(webkit_der))); + webkit_der, std::size(webkit_der))); ASSERT_TRUE(cert2); ScopedCERTCertificateList certs; certs.push_back(std::move(cert)); @@ -243,7 +242,7 @@ TEST(X509UtilNSSTest, CreateX509CertificateFromCERTCertificate_NoChain) { ScopedCERTCertificate nss_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(nss_cert); scoped_refptr<X509Certificate> x509_cert = x509_util::CreateX509CertificateFromCERTCertificate(nss_cert.get()); @@ -254,7 +253,7 @@ TEST(X509UtilNSSTest, CreateX509CertificateFromCERTCertificate_EmptyChain) { ScopedCERTCertificate nss_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(nss_cert); scoped_refptr<X509Certificate> x509_cert = x509_util::CreateX509CertificateFromCERTCertificate( @@ -266,10 +265,10 @@ TEST(X509UtilNSSTest, CreateX509CertificateFromCERTCertificate_WithChain) { ScopedCERTCertificate nss_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(nss_cert); ScopedCERTCertificate nss_cert2(x509_util::CreateCERTCertificateFromBytes( - webkit_der, base::size(webkit_der))); + webkit_der, std::size(webkit_der))); ASSERT_TRUE(nss_cert2); std::vector<CERTCertificate*> chain; @@ -288,10 +287,10 @@ TEST(X509UtilNSSTest, CreateX509CertificateListFromCERTCertificates) { ScopedCERTCertificate nss_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(nss_cert); ScopedCERTCertificate nss_cert2(x509_util::CreateCERTCertificateFromBytes( - webkit_der, base::size(webkit_der))); + webkit_der, std::size(webkit_der))); ASSERT_TRUE(nss_cert2); ScopedCERTCertificateList nss_certs; nss_certs.push_back(std::move(nss_cert)); @@ -316,12 +315,12 @@ TEST(X509UtilNSSTest, GetDEREncoded) { ScopedCERTCertificate google_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(google_cert); std::string der_encoded; ASSERT_TRUE(x509_util::GetDEREncoded(google_cert.get(), &der_encoded)); EXPECT_EQ(std::string(reinterpret_cast<const char*>(google_der), - base::size(google_der)), + std::size(google_der)), der_encoded); } @@ -399,7 +398,7 @@ TEST(X509UtilNSSTest, GetValidityTimes) { ScopedCERTCertificate google_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(google_cert); base::Time not_before, not_after; @@ -415,7 +414,7 @@ TEST(X509UtilNSSTest, GetValidityTimesOptionalArgs) { ScopedCERTCertificate google_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(google_cert); base::Time not_before; @@ -439,7 +438,7 @@ 0x7f, 0x77, 0x49, 0x38, 0x42, 0x81, 0x26, 0x7f, 0xed, 0x38}}; ScopedCERTCertificate google_cert(x509_util::CreateCERTCertificateFromBytes( - google_der, base::size(google_der))); + google_der, std::size(google_der))); ASSERT_TRUE(google_cert); EXPECT_EQ(google_fingerprint,
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc index 3638d99..a35de2c 100644 --- a/net/cookies/cookie_monster.cc +++ b/net/cookies/cookie_monster.cc
@@ -52,7 +52,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/containers/flat_map.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/location.h" #include "base/logging.h" @@ -560,7 +559,7 @@ const char* const CookieMonster::kDefaultCookieableSchemes[] = {"http", "https", "ws", "wss"}; const int CookieMonster::kDefaultCookieableSchemesCount = - base::size(kDefaultCookieableSchemes); + std::size(kDefaultCookieableSchemes); CookieChangeDispatcher& CookieMonster::GetChangeDispatcher() { return change_dispatcher_; @@ -1696,7 +1695,7 @@ // Ideally, this would be asserted up where we define kChangeCauseMapping, // but DeletionCause's visibility (or lack thereof) forces us to make // this check here. - static_assert(base::size(kChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1, + static_assert(std::size(kChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1, "kChangeCauseMapping size should match DeletionCause size"); CanonicalCookie* cc = it->second.get(); @@ -1748,7 +1747,7 @@ // Ideally, this would be asserted up where we define kChangeCauseMapping, // but DeletionCause's visibility (or lack thereof) forces us to make // this check here. - static_assert(base::size(kChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1, + static_assert(std::size(kChangeCauseMapping) == DELETE_COOKIE_LAST_ENTRY + 1, "kChangeCauseMapping size should match DeletionCause size"); CanonicalCookie* cc = cookie_it->second.get();
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc index 1a74deb..35d6da87 100644 --- a/net/cookies/cookie_monster_unittest.cc +++ b/net/cookies/cookie_monster_unittest.cc
@@ -4430,12 +4430,12 @@ // This gets tested a few times with different deletion target, to make sure // that the implementation doesn't just happen to pick the right one because // of implementation details. - for (size_t run = 0; run < base::size(kNames); ++run) { + for (size_t run = 0; run < std::size(kNames); ++run) { CookieMonster cm(nullptr, nullptr, kFirstPartySetsDefault); Time now = Time::Now(); GURL url("http://www.example.com"); - for (size_t i = 0; i < base::size(kNames); ++i) { + for (size_t i = 0; i < std::size(kNames); ++i) { std::string cookie_string = base::StrCat({kNames[i], "=", base::NumberToString(i)}); EXPECT_TRUE(SetCookieWithCreationTime(&cm, url, cookie_string, now)); @@ -4444,8 +4444,8 @@ // Delete the run'th cookie. CookieList all_cookies = GetAllCookiesForURLWithOptions( &cm, url, CookieOptions::MakeAllInclusive()); - ASSERT_EQ(all_cookies.size(), base::size(kNames)); - for (size_t i = 0; i < base::size(kNames); ++i) { + ASSERT_EQ(all_cookies.size(), std::size(kNames)); + for (size_t i = 0; i < std::size(kNames); ++i) { const CanonicalCookie& cookie = all_cookies[i]; if (cookie.Name() == kNames[run]) { EXPECT_TRUE(DeleteCanonicalCookie(&cm, cookie)); @@ -4455,8 +4455,8 @@ // Check that the right cookie got removed. all_cookies = GetAllCookiesForURLWithOptions( &cm, url, CookieOptions::MakeAllInclusive()); - ASSERT_EQ(all_cookies.size(), base::size(kNames) - 1); - for (size_t i = 0; i < base::size(kNames) - 1; ++i) { + ASSERT_EQ(all_cookies.size(), std::size(kNames) - 1); + for (size_t i = 0; i < std::size(kNames) - 1; ++i) { const CanonicalCookie& cookie = all_cookies[i]; EXPECT_NE(cookie.Name(), kNames[run]); }
diff --git a/net/cookies/cookie_util.cc b/net/cookies/cookie_util.cc index c906c09..d90f82e 100644 --- a/net/cookies/cookie_util.cc +++ b/net/cookies/cookie_util.cc
@@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" @@ -410,7 +409,7 @@ // String field if (!numerical) { if (!found_month) { - for (size_t i = 0; i < base::size(kMonths); ++i) { + for (size_t i = 0; i < std::size(kMonths); ++i) { // Match prefix, so we could match January, etc if (base::StartsWith(token, base::StringPiece(kMonths[i], 3), base::CompareCase::INSENSITIVE_ASCII)) {
diff --git a/net/der/input_unittest.cc b/net/der/input_unittest.cc index 84c80cae..715bc73 100644 --- a/net/der/input_unittest.cc +++ b/net/der/input_unittest.cc
@@ -4,7 +4,6 @@ #include "net/der/input.h" -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -19,12 +18,12 @@ Input test2(kInput); EXPECT_EQ(test, test2); - uint8_t input_copy[base::size(kInput)] = {0}; - memcpy(input_copy, kInput, base::size(kInput)); + uint8_t input_copy[std::size(kInput)] = {0}; + memcpy(input_copy, kInput, std::size(kInput)); Input test_copy(input_copy); EXPECT_EQ(test, test_copy); - Input test_truncated(kInput, base::size(kInput) - 1); + Input test_truncated(kInput, std::size(kInput) - 1); EXPECT_NE(test, test_truncated); EXPECT_NE(test_truncated, test); } @@ -37,7 +36,7 @@ EXPECT_FALSE(test < test2); EXPECT_TRUE(test2 < test); - Input test_truncated(kInput, base::size(kInput) - 1); + Input test_truncated(kInput, std::size(kInput) - 1); EXPECT_FALSE(test < test_truncated); EXPECT_TRUE(test_truncated < test); } @@ -45,13 +44,13 @@ TEST(InputTest, AsString) { Input input(kInput); std::string expected_string(reinterpret_cast<const char*>(kInput), - base::size(kInput)); + std::size(kInput)); EXPECT_EQ(expected_string, input.AsString()); } TEST(InputTest, StaticArray) { Input input(kInput); - EXPECT_EQ(base::size(kInput), input.Length()); + EXPECT_EQ(std::size(kInput), input.Length()); Input input2(kInput); EXPECT_EQ(input, input2); @@ -106,7 +105,7 @@ ByteReader reader((Input(kInput))); ASSERT_TRUE(reader.HasMore()); - ASSERT_TRUE(reader.ReadBytes(base::size(kInput), &out)); + ASSERT_TRUE(reader.ReadBytes(std::size(kInput), &out)); ASSERT_FALSE(reader.HasMore()); }
diff --git a/net/der/parse_values_unittest.cc b/net/der/parse_values_unittest.cc index 2a1a0a18..fa19ae9 100644 --- a/net/der/parse_values_unittest.cc +++ b/net/der/parse_values_unittest.cc
@@ -6,7 +6,6 @@ #include <stdint.h> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -228,7 +227,7 @@ }; TEST(ParseValuesTest, ParseUint64) { - for (size_t i = 0; i < base::size(kUint64TestData); i++) { + for (size_t i = 0; i < std::size(kUint64TestData); i++) { const Uint64TestData& test_case = kUint64TestData[i]; SCOPED_TRACE(i); @@ -264,7 +263,7 @@ }; TEST(ParseValuesTest, ParseUint8) { - for (size_t i = 0; i < base::size(kUint8TestData); i++) { + for (size_t i = 0; i < std::size(kUint8TestData); i++) { const Uint8TestData& test_case = kUint8TestData[i]; SCOPED_TRACE(i); @@ -309,7 +308,7 @@ }; TEST(ParseValuesTest, IsValidInteger) { - for (size_t i = 0; i < base::size(kIsValidIntegerTestData); i++) { + for (size_t i = 0; i < std::size(kIsValidIntegerTestData); i++) { const auto& test_case = kIsValidIntegerTestData[i]; SCOPED_TRACE(i);
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc index 15789f0..e20a2529 100644 --- a/net/disk_cache/backend_unittest.cc +++ b/net/disk_cache/backend_unittest.cc
@@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_util.h" #include "base/memory/memory_pressure_listener.h" @@ -515,17 +514,17 @@ entry2->Close(); char buffer[30]; - base::strlcpy(buffer, kName1, base::size(buffer)); + base::strlcpy(buffer, kName1, std::size(buffer)); ASSERT_THAT(OpenEntry(buffer, &entry2), IsOk()); EXPECT_TRUE(entry1 == entry2); entry2->Close(); - base::strlcpy(buffer + 1, kName1, base::size(buffer) - 1); + base::strlcpy(buffer + 1, kName1, std::size(buffer) - 1); ASSERT_THAT(OpenEntry(buffer + 1, &entry2), IsOk()); EXPECT_TRUE(entry1 == entry2); entry2->Close(); - base::strlcpy(buffer + 3, kName1, base::size(buffer) - 3); + base::strlcpy(buffer + 3, kName1, std::size(buffer) - 3); ASSERT_THAT(OpenEntry(buffer + 3, &entry2), IsOk()); EXPECT_TRUE(entry1 == entry2); entry2->Close();
diff --git a/net/disk_cache/blockfile/backend_impl.cc b/net/disk_cache/blockfile/backend_impl.cc index bdac93e7f..0c463ad9 100644 --- a/net/disk_cache/blockfile/backend_impl.cc +++ b/net/disk_cache/blockfile/backend_impl.cc
@@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -2100,7 +2099,7 @@ bool ok = block_files_.IsValid(cache_entry->entry()->address()); ok = ok && block_files_.IsValid(cache_entry->rankings()->address()); EntryStore* data = cache_entry->entry()->Data(); - for (size_t i = 0; i < base::size(data->data_addr); i++) { + for (size_t i = 0; i < std::size(data->data_addr); i++) { if (data->data_addr[i]) { Addr address(data->data_addr[i]); if (address.is_block_file())
diff --git a/net/disk_cache/blockfile/mapped_file_unittest.cc b/net/disk_cache/blockfile/mapped_file_unittest.cc index 721f684f..b9147fd 100644 --- a/net/disk_cache/blockfile/mapped_file_unittest.cc +++ b/net/disk_cache/blockfile/mapped_file_unittest.cc
@@ -3,7 +3,7 @@ // found in the LICENSE file. #include "net/disk_cache/blockfile/mapped_file.h" -#include "base/cxx17_backports.h" + #include "base/files/file_path.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_util.h" @@ -51,7 +51,7 @@ char buffer1[20]; char buffer2[20]; CacheTestFillBuffer(buffer1, sizeof(buffer1), false); - base::strlcpy(buffer1, "the data", base::size(buffer1)); + base::strlcpy(buffer1, "the data", std::size(buffer1)); EXPECT_TRUE(file->Write(buffer1, sizeof(buffer1), 8192)); EXPECT_TRUE(file->Read(buffer2, sizeof(buffer2), 8192)); EXPECT_STREQ(buffer1, buffer2); @@ -70,7 +70,7 @@ char buffer1[20]; char buffer2[20]; CacheTestFillBuffer(buffer1, sizeof(buffer1), false); - base::strlcpy(buffer1, "the data", base::size(buffer1)); + base::strlcpy(buffer1, "the data", std::size(buffer1)); bool completed; EXPECT_TRUE(file->Write(buffer1, sizeof(buffer1), 1024 * 1024, &callback, &completed));
diff --git a/net/disk_cache/blockfile/stats.cc b/net/disk_cache/blockfile/stats.cc index 4d6244f..fc867fd 100644 --- a/net/disk_cache/blockfile/stats.cc +++ b/net/disk_cache/blockfile/stats.cc
@@ -5,7 +5,6 @@ #include "net/disk_cache/blockfile/stats.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/metrics/bucket_ranges.h" #include "base/metrics/histogram.h" @@ -69,7 +68,7 @@ "Doom recent entries", "unused" }; -static_assert(base::size(kCounterNames) == disk_cache::Stats::MAX_COUNTER, +static_assert(std::size(kCounterNames) == disk_cache::Stats::MAX_COUNTER, "update the names"); } // namespace
diff --git a/net/disk_cache/simple/simple_index_file_unittest.cc b/net/disk_cache/simple/simple_index_file_unittest.cc index 8a13126..b2130d69 100644 --- a/net/disk_cache/simple/simple_index_file_unittest.cc +++ b/net/disk_cache/simple/simple_index_file_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" @@ -195,7 +194,7 @@ TEST_F(SimpleIndexFileTest, Serialize) { SimpleIndex::EntrySet entries; static const uint64_t kHashes[] = {11, 22, 33}; - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); EntryMetadata metadata_entries[kNumHashes]; SimpleIndexFile::IndexMetadata index_metadata( @@ -235,7 +234,7 @@ TEST_F(SimpleIndexFileTest, SerializeAppCache) { SimpleIndex::EntrySet entries; static const uint64_t kHashes[] = {11, 22, 33}; - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); static const int32_t kTrailerPrefetches[] = {123, -1, 987}; EntryMetadata metadata_entries[kNumHashes]; @@ -276,9 +275,9 @@ TEST_F(SimpleIndexFileTest, ReadV7Format) { static const uint64_t kHashes[] = {11, 22, 33}; static const uint32_t kSizes[] = {394, 594, 495940}; - static_assert(base::size(kHashes) == base::size(kSizes), + static_assert(std::size(kHashes) == std::size(kSizes), "Need same number of hashes and sizes"); - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); V7IndexMetadataForTest v7_metadata(kNumHashes, 100 * 1024 * 1024); @@ -319,9 +318,9 @@ TEST_F(SimpleIndexFileTest, ReadV8Format) { static const uint64_t kHashes[] = {11, 22, 33}; static const uint32_t kSizes[] = {394, 594, 495940}; - static_assert(base::size(kHashes) == base::size(kSizes), + static_assert(std::size(kHashes) == std::size(kSizes), "Need same number of hashes and sizes"); - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); // V8 to V9 should not make any modifications for non-APP_CACHE modes. // Verify that the data is preserved through the migration. @@ -360,9 +359,9 @@ TEST_F(SimpleIndexFileTest, ReadV8FormatAppCache) { static const uint64_t kHashes[] = {11, 22, 33}; static const uint32_t kSizes[] = {394, 594, 495940}; - static_assert(base::size(kHashes) == base::size(kSizes), + static_assert(std::size(kHashes) == std::size(kSizes), "Need same number of hashes and sizes"); - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); // To simulate an upgrade from v8 to v9 write out the v8 schema // using DISK_CACHE mode. The read it back in in APP_CACHE mode. @@ -448,7 +447,7 @@ SimpleIndex::EntrySet entries; static const uint64_t kHashes[] = {11, 22, 33}; - static const size_t kNumHashes = base::size(kHashes); + static const size_t kNumHashes = std::size(kHashes); EntryMetadata metadata_entries[kNumHashes]; for (size_t i = 0; i < kNumHashes; ++i) { uint64_t hash = kHashes[i];
diff --git a/net/dns/address_sorter_posix.cc b/net/dns/address_sorter_posix.cc index ba748bc..f17b480 100644 --- a/net/dns/address_sorter_posix.cc +++ b/net/dns/address_sorter_posix.cc
@@ -257,11 +257,11 @@ AddressSorterPosix::AddressSorterPosix(ClientSocketFactory* socket_factory) : socket_factory_(socket_factory), precedence_table_(LoadPolicy(kDefaultPrecedenceTable, - base::size(kDefaultPrecedenceTable))), + std::size(kDefaultPrecedenceTable))), label_table_( - LoadPolicy(kDefaultLabelTable, base::size(kDefaultLabelTable))), + LoadPolicy(kDefaultLabelTable, std::size(kDefaultLabelTable))), ipv4_scope_table_(LoadPolicy(kDefaultIPv4ScopeTable, - base::size(kDefaultIPv4ScopeTable))) { + std::size(kDefaultIPv4ScopeTable))) { NetworkChangeNotifier::AddIPAddressObserver(this); OnIPAddressChanged(); }
diff --git a/net/dns/dns_config_service_linux_unittest.cc b/net/dns/dns_config_service_linux_unittest.cc index 1daebed8..0f6096d 100644 --- a/net/dns/dns_config_service_linux_unittest.cc +++ b/net/dns/dns_config_service_linux_unittest.cc
@@ -14,7 +14,6 @@ #include "base/bind.h" #include "base/cancelable_callback.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/memory/scoped_refptr.h" #include "base/run_loop.h" @@ -82,7 +81,7 @@ res->dnsrch[0] = res->defdname; res->dnsrch[1] = res->defdname + sizeof("chromium.org"); - for (unsigned i = 0; i < base::size(kNameserversIPv4) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv4) && i < MAXNS; ++i) { struct sockaddr_in sa; sa.sin_family = AF_INET; sa.sin_port = base::HostToNet16(NS_DEFAULTPORT + i); @@ -93,7 +92,7 @@ // Install IPv6 addresses, replacing the corresponding IPv4 addresses. unsigned nscount6 = 0; - for (unsigned i = 0; i < base::size(kNameserversIPv6) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv6) && i < MAXNS; ++i) { if (!kNameserversIPv6[i]) continue; // Must use malloc to mimic res_ninit. Expect to be freed in @@ -121,13 +120,13 @@ config->search.push_back("example.com"); config->nameservers.clear(); - for (unsigned i = 0; i < base::size(kNameserversIPv4) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv4) && i < MAXNS; ++i) { IPAddress ip; EXPECT_TRUE(ip.AssignFromIPLiteral(kNameserversIPv4[i])); config->nameservers.emplace_back(ip, NS_DEFAULTPORT + i); } - for (unsigned i = 0; i < base::size(kNameserversIPv6) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv6) && i < MAXNS; ++i) { if (!kNameserversIPv6[i]) continue; IPAddress ip;
diff --git a/net/dns/dns_config_service_posix_unittest.cc b/net/dns/dns_config_service_posix_unittest.cc index 83150f77..02a314a 100644 --- a/net/dns/dns_config_service_posix_unittest.cc +++ b/net/dns/dns_config_service_posix_unittest.cc
@@ -2,30 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/dns/dns_config_service_posix.h" + #include <resolv.h> #include <memory> +#include "base/bind.h" #include "base/cancelable_callback.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/run_loop.h" #include "base/sys_byteorder.h" #include "base/task/post_task.h" #include "base/task/sequenced_task_runner.h" #include "base/task/task_traits.h" +#include "base/task/thread_pool.h" #include "base/test/task_environment.h" #include "base/test/test_timeouts.h" #include "build/build_config.h" #include "net/base/ip_address.h" #include "net/dns/dns_config.h" -#include "net/dns/dns_config_service_posix.h" #include "net/dns/public/dns_protocol.h" -#include "third_party/abseil-cpp/absl/types/optional.h" - -#include "base/bind.h" -#include "base/task/thread_pool.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #if BUILDFLAG(IS_ANDROID) #include "base/android/path_utils.h" @@ -77,7 +76,7 @@ res->dnsrch[0] = res->defdname; res->dnsrch[1] = res->defdname + sizeof("chromium.org"); - for (unsigned i = 0; i < base::size(kNameserversIPv4) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv4) && i < MAXNS; ++i) { struct sockaddr_in sa; sa.sin_family = AF_INET; sa.sin_port = base::HostToNet16(NS_DEFAULTPORT + i); @@ -89,7 +88,7 @@ #if BUILDFLAG(IS_CHROMEOS) // Install IPv6 addresses, replacing the corresponding IPv4 addresses. unsigned nscount6 = 0; - for (unsigned i = 0; i < base::size(kNameserversIPv6) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv6) && i < MAXNS; ++i) { if (!kNameserversIPv6[i]) continue; // Must use malloc to mimick res_ninit. @@ -126,14 +125,14 @@ config->search.push_back("example.com"); config->nameservers.clear(); - for (unsigned i = 0; i < base::size(kNameserversIPv4) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv4) && i < MAXNS; ++i) { IPAddress ip; EXPECT_TRUE(ip.AssignFromIPLiteral(kNameserversIPv4[i])); config->nameservers.push_back(IPEndPoint(ip, NS_DEFAULTPORT + i)); } #if BUILDFLAG(IS_CHROMEOS) - for (unsigned i = 0; i < base::size(kNameserversIPv6) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv6) && i < MAXNS; ++i) { if (!kNameserversIPv6[i]) continue; IPAddress ip;
diff --git a/net/dns/dns_hosts_unittest.cc b/net/dns/dns_hosts_unittest.cc index 8fbd619..b3f683a 100644 --- a/net/dns/dns_hosts_unittest.cc +++ b/net/dns/dns_hosts_unittest.cc
@@ -4,7 +4,6 @@ #include "net/dns/dns_hosts.h" -#include "base/cxx17_backports.h" #include "build/build_config.h" #include "net/base/ip_address.h" #include "testing/gtest/include/gtest/gtest.h" @@ -72,7 +71,7 @@ }; DnsHosts expected_hosts, actual_hosts; - PopulateExpectedHosts(kEntries, base::size(kEntries), &expected_hosts); + PopulateExpectedHosts(kEntries, std::size(kEntries), &expected_hosts); ParseHosts(kContents, &actual_hosts); ASSERT_EQ(expected_hosts, actual_hosts); } @@ -85,7 +84,7 @@ }; DnsHosts expected_hosts, actual_hosts; - PopulateExpectedHosts(kEntries, base::size(kEntries), &expected_hosts); + PopulateExpectedHosts(kEntries, std::size(kEntries), &expected_hosts); ParseHostsWithCommaModeForTesting( kContents, &actual_hosts, PARSE_HOSTS_COMMA_IS_TOKEN); ASSERT_EQ(0UL, actual_hosts.size()); @@ -100,7 +99,7 @@ }; DnsHosts expected_hosts, actual_hosts; - PopulateExpectedHosts(kEntries, base::size(kEntries), &expected_hosts); + PopulateExpectedHosts(kEntries, std::size(kEntries), &expected_hosts); ParseHostsWithCommaModeForTesting( kContents, &actual_hosts, PARSE_HOSTS_COMMA_IS_WHITESPACE); ASSERT_EQ(expected_hosts, actual_hosts); @@ -118,7 +117,7 @@ { "comma2", ADDRESS_FAMILY_IPV4, "127.0.0.1" }, }; DnsHosts expected_hosts; - PopulateExpectedHosts(kEntries, base::size(kEntries), &expected_hosts); + PopulateExpectedHosts(kEntries, std::size(kEntries), &expected_hosts); ASSERT_EQ(expected_hosts, actual_hosts); #else ASSERT_EQ(0UL, actual_hosts.size());
diff --git a/net/dns/dns_query_unittest.cc b/net/dns/dns_query_unittest.cc index a0f0e1f..1f6bf11 100644 --- a/net/dns/dns_query_unittest.cc +++ b/net/dns/dns_query_unittest.cc
@@ -8,7 +8,6 @@ #include <string> #include <tuple> -#include "base/cxx17_backports.h" #include "base/memory/scoped_refptr.h" #include "net/base/io_buffer.h" #include "net/dns/dns_util.h" @@ -279,10 +278,10 @@ const uint8_t* data; size_t size; } testcases[] = { - {kQueryTruncatedQuestion, base::size(kQueryTruncatedQuestion)}, - {kQueryTwoQuestions, base::size(kQueryTwoQuestions)}, - {kQueryInvalidDNSDomainName1, base::size(kQueryInvalidDNSDomainName1)}, - {kQueryInvalidDNSDomainName2, base::size(kQueryInvalidDNSDomainName2)}}; + {kQueryTruncatedQuestion, std::size(kQueryTruncatedQuestion)}, + {kQueryTwoQuestions, std::size(kQueryTwoQuestions)}, + {kQueryInvalidDNSDomainName1, std::size(kQueryInvalidDNSDomainName1)}, + {kQueryInvalidDNSDomainName2, std::size(kQueryInvalidDNSDomainName2)}}; std::unique_ptr<DnsQuery> query; for (const auto& testcase : testcases) { EXPECT_FALSE(ParseAndCreateDnsQueryFromRawPacket(testcase.data,
diff --git a/net/dns/dns_test_util.h b/net/dns/dns_test_util.h index da12c26..1ef156e 100644 --- a/net/dns/dns_test_util.h +++ b/net/dns/dns_test_util.h
@@ -14,7 +14,6 @@ #include <utility> #include <vector> -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" @@ -66,7 +65,7 @@ static const char kT0CanonName[] = "www.l.google.com"; static const base::TimeDelta kT0Ttl = base::Seconds(0x000000e4); // +1 for the CNAME record. -static const unsigned kT0RecordCount = base::size(kT0IpAddresses) + 1; +static const unsigned kT0RecordCount = std::size(kT0IpAddresses) + 1; //----------------------------------------------------------------------------- // Query/response set for codereview.chromium.org, ID is fixed to 1. @@ -96,7 +95,7 @@ static const char kT1CanonName[] = "ghs.l.google.com"; static const base::TimeDelta kT1Ttl = base::Seconds(0x0000010b); // +1 for the CNAME record. -static const unsigned kT1RecordCount = base::size(kT1IpAddresses) + 1; +static const unsigned kT1RecordCount = std::size(kT1IpAddresses) + 1; //----------------------------------------------------------------------------- // Query/response set for www.ccs.neu.edu, ID is fixed to 2. @@ -125,7 +124,7 @@ static const char kT2CanonName[] = "vulcan.ccs.neu.edu"; static const base::TimeDelta kT2Ttl = base::Seconds(0x0000012c); // +1 for the CNAME record. -static const unsigned kT2RecordCount = base::size(kT2IpAddresses) + 1; +static const unsigned kT2RecordCount = std::size(kT2IpAddresses) + 1; //----------------------------------------------------------------------------- // Query/response set for www.google.az, ID is fixed to 3. @@ -167,7 +166,7 @@ static const char kT3CanonName[] = "www.l.google.com"; static const base::TimeDelta kT3Ttl = base::Seconds(0x00000015); // +2 for the CNAME records, +1 for TXT record. -static const unsigned kT3RecordCount = base::size(kT3IpAddresses) + 3; +static const unsigned kT3RecordCount = std::size(kT3IpAddresses) + 3; //----------------------------------------------------------------------------- // Query/response set for www.gstatic.com, ID is fixed to 0. @@ -187,7 +186,7 @@ static const char* const kT4IpAddresses[] = {"172.217.6.195"}; static const base::TimeDelta kT4Ttl = base::Seconds(0x0000012b); -static const unsigned kT4RecordCount = base::size(kT0IpAddresses); +static const unsigned kT4RecordCount = std::size(kT0IpAddresses); class AddressSorter; class DnsClient;
diff --git a/net/dns/dns_transaction_unittest.cc b/net/dns/dns_transaction_unittest.cc index ac7bb53..e10e5b0 100644 --- a/net/dns/dns_transaction_unittest.cc +++ b/net/dns/dns_transaction_unittest.cc
@@ -14,7 +14,6 @@ #include "base/base64url.h" #include "base/bind.h" #include "base/containers/circular_deque.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/numerics/safe_math.h" #include "base/rand_util.h" @@ -985,8 +984,7 @@ TEST_F(DnsTransactionTest, Lookup) { AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1002,7 +1000,7 @@ expected_opt_rdata.AddOpt(ednsOpt); AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, base::size(kT0ResponseDatagram), + kT0ResponseDatagram, std::size(kT0ResponseDatagram), &expected_opt_rdata); TransactionHelper helper0(kT0RecordCount); @@ -1026,7 +1024,7 @@ } AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, base::size(kT0ResponseDatagram), + kT0ResponseDatagram, std::size(kT0ResponseDatagram), &expected_opt_rdata); TransactionHelper helper0(kT0RecordCount); @@ -1039,11 +1037,9 @@ // consumes a socket from ClientSocketFactory. TEST_F(DnsTransactionTest, ConcurrentLookup) { AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); AddAsyncQueryAndResponse(1 /* id */, kT1HostName, kT1Qtype, - kT1ResponseDatagram, - base::size(kT1ResponseDatagram)); + kT1ResponseDatagram, std::size(kT1ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1060,11 +1056,9 @@ TEST_F(DnsTransactionTest, CancelLookup) { AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); AddAsyncQueryAndResponse(1 /* id */, kT1HostName, kT1Qtype, - kT1ResponseDatagram, - base::size(kT1ResponseDatagram)); + kT1ResponseDatagram, std::size(kT1ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1083,8 +1077,7 @@ TEST_F(DnsTransactionTest, DestroyFactory) { AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1098,8 +1091,7 @@ TEST_F(DnsTransactionTest, CancelFromCallback) { AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.set_cancel_in_callback(); @@ -1116,14 +1108,14 @@ // First attempt receives mismatched response synchronously. std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); - data->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), SYNCHRONOUS); AddSocketData(std::move(data)); // Second attempt receives valid response synchronously. std::unique_ptr<DnsSocketData> data1(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); - data1->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data1->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), SYNCHRONOUS); AddSocketData(std::move(data1)); @@ -1140,14 +1132,14 @@ // First attempt receives mismatched response asynchronously. std::unique_ptr<DnsSocketData> data0(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, ASYNC, Transport::UDP)); - data0->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data0->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), ASYNC); AddSocketData(std::move(data0)); // Second attempt receives valid response asynchronously. std::unique_ptr<DnsSocketData> data1(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, ASYNC, Transport::UDP)); - data1->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data1->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); AddSocketData(std::move(data1)); @@ -1167,8 +1159,7 @@ // Attempt receives mismatched response and fails because only one attempt is // allowed. AddAsyncQueryAndResponse(1 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(ERR_DNS_MALFORMED_RESPONSE); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1185,7 +1176,7 @@ // Second attempt receives valid NXDOMAIN response. std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); - data->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), SYNCHRONOUS); data->AddRcode(dns_protocol::kRcodeNXDOMAIN, ASYNC); AddSocketData(std::move(data)); @@ -1296,7 +1287,7 @@ 2, 1, }; - CheckServerOrder(kOrder, base::size(kOrder)); + CheckServerOrder(kOrder, std::size(kOrder)); } TEST_F(DnsTransactionTest, SuffixSearchAboveNdots) { @@ -1326,7 +1317,7 @@ // Also check if suffix search causes server rotation. size_t kOrder0[] = {0, 1, 0, 1}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); } TEST_F(DnsTransactionTest, SuffixSearchBelowNdots) { @@ -1460,7 +1451,7 @@ AddAsyncQueryAndRcode("x.y.z.a", dns_protocol::kTypeA, dns_protocol::kRcodeNXDOMAIN); AddAsyncQueryAndResponse(0 /* id */, "x.y.z.b", dns_protocol::kTypeA, - kResponseNoData, base::size(kResponseNoData)); + kResponseNoData, std::size(kResponseNoData)); TransactionHelper helper0(0 /* answers */); @@ -1476,7 +1467,7 @@ ConfigureFactory(); AddSyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1493,8 +1484,7 @@ dns_protocol::kRcodeNXDOMAIN); // "www.ccs.neu.edu" AddAsyncQueryAndResponse(2 /* id */, kT2HostName, kT2Qtype, - kT2ResponseDatagram, - base::size(kT2ResponseDatagram)); + kT2ResponseDatagram, std::size(kT2ResponseDatagram)); TransactionHelper helper0(kT2RecordCount); helper0.StartTransaction(transaction_factory_.get(), "www", kT2Qtype, @@ -1510,7 +1500,7 @@ AddAsyncQueryAndRcode("www.lab.ccs.neu.edu", dns_protocol::kTypeA, dns_protocol::kRcodeNXDOMAIN); AddSyncQueryAndResponse(2 /* id */, kT2HostName, kT2Qtype, - kT2ResponseDatagram, base::size(kT2ResponseDatagram)); + kT2ResponseDatagram, std::size(kT2ResponseDatagram)); TransactionHelper helper0(kT2RecordCount); helper0.StartTransaction(transaction_factory_.get(), "www", kT2Qtype, @@ -1567,8 +1557,7 @@ socket_factory_->fail_next_socket_ = true; // Second DNS query succeeds. AddAsyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, - base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, false /* secure */, resolve_context_.get()); @@ -1578,7 +1567,7 @@ TEST_F(DnsTransactionTest, HttpsGetLookup) { ConfigureDohServers(false /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1607,7 +1596,7 @@ ConfigureDohServers(false /* use_post */); // Use T1 response, which is malformed for a T0 request. AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT1ResponseDatagram, - base::size(kT1ResponseDatagram), SYNCHRONOUS, + std::size(kT1ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1620,7 +1609,7 @@ TEST_F(DnsTransactionTest, HttpsPostLookup) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1649,7 +1638,7 @@ ConfigureDohServers(true /* use_post */); // Use T1 response, which is malformed for a T0 request. AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT1ResponseDatagram, - base::size(kT1ResponseDatagram), SYNCHRONOUS, + std::size(kT1ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1663,7 +1652,7 @@ TEST_F(DnsTransactionTest, HttpsPostLookupAsync) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1684,7 +1673,7 @@ TEST_F(DnsTransactionTest, HttpsPostLookupFailDohServerLookup) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1706,7 +1695,7 @@ TEST_F(DnsTransactionTest, HttpsPostLookupFailStart) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1750,7 +1739,7 @@ TEST_F(DnsTransactionTest, HttpsPostLookupFailAsync) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1768,7 +1757,7 @@ nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); data->AddResponseData(kT0ResponseDatagram, 20, SYNCHRONOUS); data->AddResponseData(kT0ResponseDatagram + 20, - base::size(kT0ResponseDatagram) - 20, SYNCHRONOUS); + std::size(kT0ResponseDatagram) - 20, SYNCHRONOUS); AddSocketData(std::move(data), false /* enqueue_transaction_id */); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1783,7 +1772,7 @@ nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); data->AddResponseData(kT0ResponseDatagram, 20, ASYNC); data->AddResponseData(kT0ResponseDatagram + 20, - base::size(kT0ResponseDatagram) - 20, ASYNC); + std::size(kT0ResponseDatagram) - 20, ASYNC); AddSocketData(std::move(data), false /* enqueue_transaction_id */); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1796,7 +1785,7 @@ std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); data->AddResponseData(kT0ResponseDatagram, 0, ASYNC); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -1811,7 +1800,7 @@ std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), SYNCHRONOUS); data->AddResponseData(kT0ResponseDatagram, 0, ASYNC); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -1828,7 +1817,7 @@ nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); data->AddResponseData(kT0ResponseDatagram, 20, ASYNC); data->AddResponseData(kT0ResponseDatagram + 20, - base::size(kT0ResponseDatagram) - 20, SYNCHRONOUS); + std::size(kT0ResponseDatagram) - 20, SYNCHRONOUS); AddSocketData(std::move(data), false /* enqueue_transaction_id */); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -1918,7 +1907,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1933,7 +1922,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT0ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -1966,7 +1955,7 @@ EXPECT_EQ(doh_itr->GetNextAttemptIndex(), 1u); } size_t kOrder0[] = {1, 2, 3}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); helper1.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, true /* secure */, resolve_context_.get()); @@ -1997,7 +1986,7 @@ 1, 2, 3, /* transaction0 */ 3, 1, 2 /* transaction1 */ }; - CheckServerOrder(kOrder1, base::size(kOrder1)); + CheckServerOrder(kOrder1, std::size(kOrder1)); } TEST_F(DnsTransactionTest, HttpsPostFailThenHTTPFallback) { @@ -2007,7 +1996,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, 0 /* id */, false /* enqueue_transaction_id */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2016,19 +2005,19 @@ true /* secure */, resolve_context_.get()); helper0.RunUntilComplete(); size_t kOrder0[] = {1, 2}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); } TEST_F(DnsTransactionTest, HttpsPostFailTwice) { config_.attempts = 3; ConfigureDohServers(true /* use_post */, 2); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2038,7 +2027,7 @@ true /* secure */, resolve_context_.get()); helper0.RunUntilComplete(); size_t kOrder0[] = {1, 2}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); } TEST_F(DnsTransactionTest, HttpsNotAvailableThenHttpFallback) { @@ -2059,7 +2048,7 @@ EXPECT_FALSE(doh_itr->AttemptAvailable()); } AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2068,7 +2057,7 @@ true /* secure */, resolve_context_.get()); helper0.RunUntilComplete(); size_t kOrder0[] = {2}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); { std::unique_ptr<DnsServerIterator> doh_itr = resolve_context_->GetDohIterator( @@ -2113,7 +2102,7 @@ // Expect fallback not attempted because other servers not available in // AUTOMATIC mode until they have recorded a success. size_t kOrder0[] = {1}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); { std::unique_ptr<DnsServerIterator> doh_itr = @@ -2173,7 +2162,7 @@ // Expect fallback to attempt all servers because SECURE mode does not require // server availability. size_t kOrder0[] = {1, 2, 3}; - CheckServerOrder(kOrder0, base::size(kOrder0)); + CheckServerOrder(kOrder0, std::size(kOrder0)); // Expect server 0 to be preferred due to least recent failure. { @@ -2219,7 +2208,7 @@ // A success should reset the failure counter for DoH. AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2327,7 +2316,7 @@ 0, kT0HostName, kT0Qtype, ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128)); data->AddReadError(ERR_IO_PENDING, ASYNC); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); SequencedSocketData* sequenced_socket_data = data->GetProvider(); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -2403,12 +2392,12 @@ TEST_F(DnsTransactionTest, HttpsPostTestNoCookies) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2452,7 +2441,7 @@ TEST_F(DnsTransactionTest, HttpsPostNoContentLength) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2471,7 +2460,7 @@ TEST_F(DnsTransactionTest, HttpsPostWithBadRequestResponse) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2491,7 +2480,7 @@ TEST_F(DnsTransactionTest, HttpsPostWithWrongType) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2513,12 +2502,12 @@ TEST_F(DnsTransactionTest, HttpsGetRedirect) { ConfigureDohServers(false /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2536,7 +2525,7 @@ TEST_F(DnsTransactionTest, HttpsPostWithNoType) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2597,7 +2586,7 @@ TEST_F(DnsTransactionTest, MAYBE_HttpsPostLookupWithLog) { ConfigureDohServers(true /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -2630,7 +2619,7 @@ 0 /* id */, kT0HostName, kT0Qtype, ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128); data->AddReadError(ERR_IO_PENDING, ASYNC); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); SequencedSocketData* sequenced_socket_data = data->GetProvider(); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -2693,7 +2682,7 @@ 0 /* id */, kT0HostName, kT0Qtype, ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128); data->AddReadError(ERR_IO_PENDING, ASYNC); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); SequencedSocketData* sequenced_socket_data = data->GetProvider(); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -2873,7 +2862,7 @@ 0 /* id */, kT0HostName, kT0Qtype, ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128); data->AddReadError(ERR_IO_PENDING, ASYNC); - data->AddResponseData(kT0ResponseDatagram, base::size(kT0ResponseDatagram), + data->AddResponseData(kT0ResponseDatagram, std::size(kT0ResponseDatagram), ASYNC); SequencedSocketData* sequenced_socket_data = data->GetProvider(); AddSocketData(std::move(data), false /* enqueue_transaction_id */); @@ -3053,7 +3042,7 @@ AddAsyncQueryAndRcode(kT0HostName, kT0Qtype, dns_protocol::kRcodeNOERROR | dns_protocol::kFlagTC); AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::TCP); + std::size(kT0ResponseDatagram), ASYNC, Transport::TCP); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -3066,11 +3055,11 @@ for (int i = 0; i <= DnsUdpTracker::kPortReuseThreshold; ++i) { AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::UDP); + std::size(kT0ResponseDatagram), ASYNC, Transport::UDP); } AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::TCP); + std::size(kT0ResponseDatagram), ASYNC, Transport::TCP); for (int i = 0; i <= DnsUdpTracker::kPortReuseThreshold; ++i) { TransactionHelper udp_helper(kT0RecordCount); @@ -3115,7 +3104,7 @@ data->AddResponseWithLength( std::make_unique<DnsResponse>( reinterpret_cast<const char*>(kT0ResponseDatagram), - base::size(kT0ResponseDatagram), 0), + std::size(kT0ResponseDatagram), 0), ASYNC, static_cast<uint16_t>(kT0QuerySize - 1)); AddSocketData(std::move(data)); @@ -3147,7 +3136,7 @@ for (int i = 0; i <= DnsUdpTracker::kPortReuseThreshold; ++i) { AddQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), ASYNC, Transport::UDP); + std::size(kT0ResponseDatagram), ASYNC, Transport::UDP); } AddSocketData(std::make_unique<DnsSocketData>( @@ -3181,8 +3170,8 @@ data->AddResponseWithLength( std::make_unique<DnsResponse>( reinterpret_cast<const char*>(kT0ResponseDatagram), - base::size(kT0ResponseDatagram) - 1, 0), - ASYNC, static_cast<uint16_t>(base::size(kT0ResponseDatagram))); + std::size(kT0ResponseDatagram) - 1, 0), + ASYNC, static_cast<uint16_t>(std::size(kT0ResponseDatagram))); // Then return a 0-length read. data->AddReadError(0, ASYNC); AddSocketData(std::move(data)); @@ -3202,8 +3191,8 @@ data->AddResponseWithLength( std::make_unique<DnsResponse>( reinterpret_cast<const char*>(kT0ResponseDatagram), - base::size(kT0ResponseDatagram) - 1, 0), - SYNCHRONOUS, static_cast<uint16_t>(base::size(kT0ResponseDatagram))); + std::size(kT0ResponseDatagram) - 1, 0), + SYNCHRONOUS, static_cast<uint16_t>(std::size(kT0ResponseDatagram))); // Then return a 0-length read. data->AddReadError(0, SYNCHRONOUS); AddSocketData(std::move(data)); @@ -3248,7 +3237,7 @@ std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); // First attempt gets a mismatched response. - data->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), SYNCHRONOUS); // Second read from first attempt gets TCP required. data->AddRcode(dns_protocol::kFlagTC, ASYNC); @@ -3268,7 +3257,7 @@ std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); // First attempt gets a mismatched response. - data->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), SYNCHRONOUS); // Second read from first attempt gets TCP required. data->AddRcode(dns_protocol::kFlagTC, ASYNC); @@ -3276,7 +3265,7 @@ // Second attempt gets a valid response, which happens before the TCP // required. AddSyncQueryAndResponse(0 /* id */, kT0HostName, kT0Qtype, - kT0ResponseDatagram, base::size(kT0ResponseDatagram)); + kT0ResponseDatagram, std::size(kT0ResponseDatagram)); TransactionHelper helper0(kT0RecordCount); helper0.StartTransaction(transaction_factory_.get(), kT0HostName, kT0Qtype, @@ -3312,7 +3301,7 @@ // Attempt 1. std::unique_ptr<DnsSocketData> data(new DnsSocketData( 0 /* id */, kT0HostName, kT0Qtype, SYNCHRONOUS, Transport::UDP)); - data->AddResponseData(kT1ResponseDatagram, base::size(kT1ResponseDatagram), + data->AddResponseData(kT1ResponseDatagram, std::size(kT1ResponseDatagram), SYNCHRONOUS); data->AddRcode(dns_protocol::kFlagTC, ASYNC); AddSocketData(std::move(data)); @@ -3346,7 +3335,7 @@ TEST_F(DnsTransactionTest, CheckAsync) { ConfigureDohServers(false /* use_post */); AddQueryAndResponse(0, kT0HostName, kT0Qtype, kT0ResponseDatagram, - base::size(kT0ResponseDatagram), SYNCHRONOUS, + std::size(kT0ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3387,7 +3376,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3427,14 +3416,14 @@ nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128); data->AddReadError(ERR_IO_PENDING, ASYNC); data->AddReadError(ERR_CONNECTION_REFUSED, ASYNC); - data->AddResponseData(kT4ResponseDatagram, base::size(kT4ResponseDatagram), + data->AddResponseData(kT4ResponseDatagram, std::size(kT4ResponseDatagram), ASYNC); SequencedSocketData* sequenced_socket_data = data->GetProvider(); AddSocketData(std::move(data), false /* enqueue_transaction_id */); // Add success for second probe. AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3469,7 +3458,7 @@ ConfigureDohServers(true /* use_post */, 2 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3479,7 +3468,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3520,12 +3509,12 @@ ConfigureDohServers(true /* use_post */, 1 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3565,7 +3554,7 @@ ConfigureDohServers(true /* use_post */, 1 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3575,7 +3564,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3722,7 +3711,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3800,7 +3789,7 @@ ConfigureDohServers(true /* use_post */, 1 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), SYNCHRONOUS, + std::size(kT4ResponseDatagram), SYNCHRONOUS, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3873,7 +3862,7 @@ DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3903,12 +3892,12 @@ ConfigureDohServers(true /* use_post */, 1 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); @@ -3953,12 +3942,12 @@ ConfigureDohServers(true /* use_post */, 1 /* num_doh_servers */, false /* make_available */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */); AddQueryAndResponse(0 /* id */, kT4HostName, kT4Qtype, kT4ResponseDatagram, - base::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, + std::size(kT4ResponseDatagram), ASYNC, Transport::HTTPS, nullptr /* opt_rdata */, DnsQuery::PaddingStrategy::BLOCK_LENGTH_128, false /* enqueue_transaction_id */);
diff --git a/net/dns/dns_util_unittest.cc b/net/dns/dns_util_unittest.cc index 3d20ddea..4bd6a14 100644 --- a/net/dns/dns_util_unittest.cc +++ b/net/dns/dns_util_unittest.cc
@@ -10,7 +10,6 @@ #include <string> #include "base/big_endian.h" -#include "base/cxx17_backports.h" #include "base/numerics/safe_conversions.h" #include "net/dns/dns_test_util.h" #include "net/dns/public/dns_over_https_config.h" @@ -405,7 +404,7 @@ "noodles.blorg`", "www.-noodles.blorg", }; - for (size_t i = 0; i < base::size(bad_hostnames); ++i) { + for (size_t i = 0; i < std::size(bad_hostnames); ++i) { EXPECT_FALSE(IsValidDNSDomain(bad_hostnames[i])); } @@ -415,7 +414,7 @@ "www_.noodles.blorg", "www.noodles.blorg.", "_privet._tcp.local", }; - for (size_t i = 0; i < base::size(good_hostnames); ++i) { + for (size_t i = 0; i < std::size(good_hostnames); ++i) { EXPECT_TRUE(IsValidDNSDomain(good_hostnames[i])); } } @@ -429,7 +428,7 @@ "www.nood(les).blorg", "noo dl(es)._tcp.local", }; - for (size_t i = 0; i < base::size(good_hostnames); ++i) { + for (size_t i = 0; i < std::size(good_hostnames); ++i) { EXPECT_TRUE(IsValidUnrestrictedDNSDomain(good_hostnames[i])); } }
diff --git a/net/dns/host_cache_unittest.cc b/net/dns/host_cache_unittest.cc index 22bb616a..654dab0 100644 --- a/net/dns/host_cache_unittest.cc +++ b/net/dns/host_cache_unittest.cc
@@ -12,7 +12,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/json/json_writer.h" #include "base/strings/strcat.h" @@ -1199,7 +1198,7 @@ secure_key.secure = true; tests.emplace_back(insecure_key, secure_key, -1); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]", i)); const HostCache::Key& key1 = tests[i].key1;
diff --git a/net/dns/public/dns_query_type.h b/net/dns/public/dns_query_type.h index f529c0b..43ee993 100644 --- a/net/dns/public/dns_query_type.h +++ b/net/dns/public/dns_query_type.h
@@ -7,7 +7,6 @@ #include "base/containers/enum_set.h" #include "base/containers/fixed_flat_map.h" -#include "base/cxx17_backports.h" #include "base/strings/string_piece.h" #include "net/base/net_export.h" @@ -44,7 +43,7 @@ {DnsQueryType::HTTPS, "HTTPS"}, {DnsQueryType::HTTPS_EXPERIMENTAL, "HTTPS_EXPERIMENTAL"}}); -static_assert(base::size(kDnsQueryTypes) == +static_assert(std::size(kDnsQueryTypes) == static_cast<unsigned>(DnsQueryType::MAX) + 1, "All DnsQueryType values should be in kDnsQueryTypes.");
diff --git a/net/dns/public/host_resolver_source.h b/net/dns/public/host_resolver_source.h index d9b3ed3..724cc7b 100644 --- a/net/dns/public/host_resolver_source.h +++ b/net/dns/public/host_resolver_source.h
@@ -5,8 +5,6 @@ #ifndef NET_DNS_PUBLIC_HOST_RESOLVER_SOURCE_H_ #define NET_DNS_PUBLIC_HOST_RESOLVER_SOURCE_H_ -#include "base/cxx17_backports.h" - namespace net { // Enumeration to specify the allowed results source for HostResolver @@ -41,7 +39,7 @@ HostResolverSource::LOCAL_ONLY}; static_assert( - base::size(kHostResolverSources) == + std::size(kHostResolverSources) == static_cast<unsigned>(HostResolverSource::MAX) + 1, "All HostResolverSource values should be in kHostResolverSources.");
diff --git a/net/dns/public/resolv_reader_unittest.cc b/net/dns/public/resolv_reader_unittest.cc index 3449db2..40c68bd 100644 --- a/net/dns/public/resolv_reader_unittest.cc +++ b/net/dns/public/resolv_reader_unittest.cc
@@ -14,7 +14,6 @@ #include "base/bind.h" #include "base/cancelable_callback.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/sys_byteorder.h" #include "base/task/post_task.h" @@ -53,7 +52,7 @@ memset(res, 0, sizeof(*res)); res->options = RES_INIT; - for (unsigned i = 0; i < base::size(kNameserversIPv4) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv4) && i < MAXNS; ++i) { struct sockaddr_in sa; sa.sin_family = AF_INET; sa.sin_port = base::HostToNet16(NS_DEFAULTPORT + i); @@ -65,7 +64,7 @@ #if BUILDFLAG(IS_LINUX) // Install IPv6 addresses, replacing the corresponding IPv4 addresses. unsigned nscount6 = 0; - for (unsigned i = 0; i < base::size(kNameserversIPv6) && i < MAXNS; ++i) { + for (unsigned i = 0; i < std::size(kNameserversIPv6) && i < MAXNS; ++i) { if (!kNameserversIPv6[i]) continue; // Must use malloc to mimic res_ninit. Expect to be freed in
diff --git a/net/http/bidirectional_stream_unittest.cc b/net/http/bidirectional_stream_unittest.cc index 6fc29ca4..60c45dd4 100644 --- a/net/http/bidirectional_stream_unittest.cc +++ b/net/http/bidirectional_stream_unittest.cc
@@ -10,7 +10,6 @@ #include <vector> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" @@ -55,7 +54,7 @@ namespace { const char kBodyData[] = "Body data"; -const size_t kBodyDataSize = base::size(kBodyData); +const size_t kBodyDataSize = std::size(kBodyData); const std::string kBodyDataString(kBodyData, kBodyDataSize); // Size of the buffer to be allocated for each read. const size_t kReadBufferSize = 4096; @@ -1351,7 +1350,7 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); EXPECT_EQ(CountReadBytes(reads), delegate->GetTotalReceivedBytes()); } @@ -1411,11 +1410,11 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); // Response body frame isn't read becase stream is deleted once read returns // ERR_IO_PENDING. - EXPECT_EQ(CountReadBytes(base::make_span(reads).first(base::size(reads) - 2)), + EXPECT_EQ(CountReadBytes(base::make_span(reads).first(std::size(reads) - 2)), delegate->GetTotalReceivedBytes()); } @@ -1530,7 +1529,7 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); EXPECT_EQ(CountReadBytes(reads), delegate->GetTotalReceivedBytes()); } @@ -1585,7 +1584,7 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); EXPECT_EQ(CountReadBytes(reads), delegate->GetTotalReceivedBytes()); } @@ -1645,7 +1644,7 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); EXPECT_EQ(CountReadBytes(reads), delegate->GetTotalReceivedBytes()); } @@ -1696,7 +1695,7 @@ EXPECT_EQ(kProtoHTTP2, delegate->GetProtocol()); // Bytes sent excludes the RST frame. EXPECT_EQ( - CountWriteBytes(base::make_span(writes).first(base::size(writes) - 1)), + CountWriteBytes(base::make_span(writes).first(std::size(writes) - 1)), delegate->GetTotalSentBytes()); EXPECT_EQ(0, delegate->GetTotalReceivedBytes()); }
diff --git a/net/http/http_auth.cc b/net/http/http_auth.cc index be1cda1..bd9cbc1e 100644 --- a/net/http/http_auth.cc +++ b/net/http/http_auth.cc
@@ -6,7 +6,6 @@ #include <algorithm> -#include "base/cxx17_backports.h" #include "base/strings/string_tokenizer.h" #include "base/strings/string_util.h" #include "base/values.h" @@ -145,7 +144,7 @@ // static const char* HttpAuth::SchemeToString(Scheme scheme) { - static_assert(base::size(kSchemeNames) == AUTH_SCHEME_MAX, + static_assert(std::size(kSchemeNames) == AUTH_SCHEME_MAX, "http auth scheme names incorrect size"); if (scheme < AUTH_SCHEME_BASIC || scheme >= AUTH_SCHEME_MAX) { NOTREACHED(); @@ -156,7 +155,7 @@ // static HttpAuth::Scheme HttpAuth::StringToScheme(const std::string& str) { - for (uint8_t i = 0; i < base::size(kSchemeNames); i++) { + for (uint8_t i = 0; i < std::size(kSchemeNames); i++) { if (str == kSchemeNames[i]) return static_cast<Scheme>(i); }
diff --git a/net/http/http_auth_filter_unittest.cc b/net/http/http_auth_filter_unittest.cc index 625ac69..5ac3163 100644 --- a/net/http/http_auth_filter_unittest.cc +++ b/net/http/http_auth_filter_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> #include <ostream> -#include "base/cxx17_backports.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" #include "url/scheme_host_port.h" @@ -68,7 +67,7 @@ TEST(HttpAuthFilterTest, NonEmptyFilter) { // Create an non-empty filter std::string server_allowlist_filter_string; - for (size_t i = 0; i < base::size(server_allowlist_array); ++i) { + for (size_t i = 0; i < std::size(server_allowlist_array); ++i) { if (!server_allowlist_filter_string.empty()) server_allowlist_filter_string += ","; server_allowlist_filter_string += "*";
diff --git a/net/http/http_auth_gssapi_posix.cc b/net/http/http_auth_gssapi_posix.cc index 3d649e5..e4c25d2 100644 --- a/net/http/http_auth_gssapi_posix.cc +++ b/net/http/http_auth_gssapi_posix.cc
@@ -9,7 +9,6 @@ #include "base/base64.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/format_macros.h" #include "base/logging.h" @@ -380,7 +379,7 @@ #endif }; library_names = kDefaultLibraryNames; - num_lib_names = base::size(kDefaultLibraryNames); + num_lib_names = std::size(kDefaultLibraryNames); } net_log.BeginEvent(NetLogEventType::AUTH_LIBRARY_LOAD);
diff --git a/net/http/http_auth_gssapi_posix_unittest.cc b/net/http/http_auth_gssapi_posix_unittest.cc index 4820b7e3..92a9cd7 100644 --- a/net/http/http_auth_gssapi_posix_unittest.cc +++ b/net/http/http_auth_gssapi_posix_unittest.cc
@@ -9,7 +9,6 @@ #include "base/base_paths.h" #include "base/bind.h" #include "base/check.h" -#include "base/cxx17_backports.h" #include "base/json/json_reader.h" #include "base/native_library.h" #include "base/path_service.h" @@ -69,7 +68,7 @@ 1, // Locally initiated 0); // Open gss_buffer_desc in_buffer = {0, nullptr}; - gss_buffer_desc out_buffer = {base::size(kInitialAuthResponse), + gss_buffer_desc out_buffer = {std::size(kInitialAuthResponse), const_cast<char*>(kInitialAuthResponse)}; library->ExpectSecurityContext( "Negotiate", @@ -221,7 +220,7 @@ kAuthResponse) // Output token }; - for (size_t i = 0; i < base::size(queries); ++i) { + for (size_t i = 0; i < std::size(queries); ++i) { mock_library->ExpectSecurityContext(queries[i].expected_package, queries[i].response_code, queries[i].minor_response_code, @@ -244,7 +243,7 @@ gss_buffer_desc output_token = {0, nullptr}; OM_uint32 ret_flags = 0; OM_uint32 time_rec = 0; - for (size_t i = 0; i < base::size(queries); ++i) { + for (size_t i = 0; i < std::size(queries); ++i) { major_status = mock_library->init_sec_context(&minor_status, initiator_cred_handle, &context_handle,
diff --git a/net/http/http_auth_handler_basic_unittest.cc b/net/http/http_auth_handler_basic_unittest.cc index ce3064a..e87b89b 100644 --- a/net/http/http_auth_handler_basic_unittest.cc +++ b/net/http/http_auth_handler_basic_unittest.cc
@@ -7,7 +7,6 @@ #include <memory> #include <string> -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "net/base/net_errors.h" @@ -45,7 +44,7 @@ }; url::SchemeHostPort scheme_host_port(GURL("http://www.example.com")); HttpAuthHandlerBasic::Factory factory; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string challenge = "Basic realm=\"Atlantis\""; SSLInfo null_ssl_info; auto host_resolver = std::make_unique<MockHostResolver>(); @@ -111,7 +110,7 @@ NetworkIsolationKey(), scheme_host_port, NetLogWithSource(), host_resolver.get(), &basic)); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string challenge(tests[i].challenge); HttpAuthChallengeTokenizer tok(challenge.begin(), challenge.end()); @@ -204,7 +203,7 @@ }; HttpAuthHandlerBasic::Factory factory; url::SchemeHostPort scheme_host_port(GURL("http://www.example.com")); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string challenge = tests[i].challenge; SSLInfo null_ssl_info; auto host_resolver = std::make_unique<MockHostResolver>();
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc index 1fd6c27..de6b127 100644 --- a/net/http/http_auth_handler_digest_unittest.cc +++ b/net/http/http_auth_handler_digest_unittest.cc
@@ -2,9 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/http/http_auth_handler_digest.h" + #include <string> -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "net/base/net_errors.h" @@ -12,7 +13,6 @@ #include "net/base/test_completion_callback.h" #include "net/dns/mock_host_resolver.h" #include "net/http/http_auth_challenge_tokenizer.h" -#include "net/http/http_auth_handler_digest.h" #include "net/http/http_request_info.h" #include "net/log/net_log_with_source.h" #include "net/ssl/ssl_info.h" @@ -364,7 +364,7 @@ url::SchemeHostPort scheme_host_port(GURL("http://www.example.com")); std::unique_ptr<HttpAuthHandlerDigest::Factory> factory( new HttpAuthHandlerDigest::Factory()); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SSLInfo null_ssl_info; auto host_resolver = std::make_unique<MockHostResolver>(); std::unique_ptr<HttpAuthHandler> handler; @@ -530,7 +530,7 @@ url::SchemeHostPort scheme_host_port(GURL("http://www.example.com")); std::unique_ptr<HttpAuthHandlerDigest::Factory> factory( new HttpAuthHandlerDigest::Factory()); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SSLInfo null_ssl_info; auto host_resolver = std::make_unique<MockHostResolver>(); std::unique_ptr<HttpAuthHandler> handler;
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc index 5178a11..80b0387 100644 --- a/net/http/http_auth_handler_negotiate_unittest.cc +++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -8,7 +8,6 @@ #include <string> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/strings/string_util.h" @@ -179,7 +178,7 @@ kAuthResponse) // Output token }; - for (size_t i = 0; i < base::size(queries); ++i) { + for (size_t i = 0; i < std::size(queries); ++i) { mock_library->ExpectSecurityContext(queries[i].expected_package, queries[i].response_code, queries[i].minor_response_code,
diff --git a/net/http/http_auth_handler_ntlm_portable_unittest.cc b/net/http/http_auth_handler_ntlm_portable_unittest.cc index f34a02a..19175390 100644 --- a/net/http/http_auth_handler_ntlm_portable_unittest.cc +++ b/net/http/http_auth_handler_ntlm_portable_unittest.cc
@@ -7,7 +7,6 @@ #include "base/base64.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/strings/strcat.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -235,7 +234,7 @@ // Validate the authenticate message std::string decoded; ASSERT_TRUE(DecodeChallenge(token, &decoded)); - ASSERT_EQ(base::size(ntlm::test::kExpectedAuthenticateMsgSpecResponseV1), + ASSERT_EQ(std::size(ntlm::test::kExpectedAuthenticateMsgSpecResponseV1), decoded.size()); ASSERT_EQ(0, memcmp(decoded.data(), ntlm::test::kExpectedAuthenticateMsgSpecResponseV1,
diff --git a/net/http/http_auth_unittest.cc b/net/http/http_auth_unittest.cc index c8e37c1..5bdc7fb 100644 --- a/net/http/http_auth_unittest.cc +++ b/net/http/http_auth_unittest.cc
@@ -8,7 +8,6 @@ #include <set> #include <string> -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/strings/string_util.h" #include "build/build_config.h" @@ -139,7 +138,7 @@ http_auth_handler_factory->SetHttpAuthPreferences(kNegotiateAuthScheme, &http_auth_preferences); - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { // Make a HttpResponseHeaders object. std::string headers_with_status_line("HTTP/1.1 401 Unauthorized\n"); headers_with_status_line += tests[i].headers;
diff --git a/net/http/http_basic_state.cc b/net/http/http_basic_state.cc index b3212b3..fe5233b 100644 --- a/net/http/http_basic_state.cc +++ b/net/http/http_basic_state.cc
@@ -8,7 +8,6 @@ #include <utility> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/no_destructor.h" #include "net/base/io_buffer.h" #include "net/http/http_request_info.h" @@ -55,7 +54,7 @@ std::string HttpBasicState::GenerateRequestLine() const { static const char kSuffix[] = " HTTP/1.1\r\n"; - const size_t kSuffixLen = base::size(kSuffix) - 1; + const size_t kSuffixLen = std::size(kSuffix) - 1; const std::string path = using_proxy_ ? HttpUtil::SpecForRequest(url_) : url_.PathForRequest(); // Don't use StringPrintf for concatenation because it is very inefficient.
diff --git a/net/http/http_byte_range_unittest.cc b/net/http/http_byte_range_unittest.cc index 10fc28d..4e17e45 100644 --- a/net/http/http_byte_range_unittest.cc +++ b/net/http/http_byte_range_unittest.cc
@@ -3,7 +3,7 @@ // found in the LICENSE file. #include "net/http/http_byte_range.h" -#include "base/cxx17_backports.h" + #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -28,7 +28,7 @@ { -1, -1, 100000, true }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { HttpByteRange range; range.set_first_byte_position(tests[i].first_byte_position); range.set_last_byte_position(tests[i].last_byte_position); @@ -60,7 +60,7 @@ { 10, 10000, -1, 1000000, true, 10, 10000 }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { HttpByteRange range; range.set_first_byte_position(tests[i].first_byte_position); range.set_last_byte_position(tests[i].last_byte_position); @@ -93,7 +93,7 @@ {HttpByteRange::RightUnbounded(100), "bytes=100-"}, {HttpByteRange::Suffix(100), "bytes=-100"}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { EXPECT_EQ(tests[i].expected, tests[i].range.GetHeaderValue()); } }
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc index b272905..384582e 100644 --- a/net/http/http_cache_transaction.cc +++ b/net/http/http_cache_transaction.cc
@@ -195,7 +195,7 @@ TRACE_EVENT1("io", "HttpCacheTransaction::Transaction", "priority", RequestPriorityToString(priority)); static_assert(HttpCache::Transaction::kNumValidationHeaders == - base::size(kValidationHeaders), + std::size(kValidationHeaders), "invalid number of validation headers"); io_callback_ = base::BindRepeating(&Transaction::OnIOComplete, @@ -2339,7 +2339,7 @@ if (request_->extra_headers.HasHeader(HttpRequestHeaders::kRange)) range_found = true; - for (size_t i = 0; i < base::size(kSpecialHeaders); ++i) { + for (size_t i = 0; i < std::size(kSpecialHeaders); ++i) { if (HeaderMatches(request_->extra_headers, kSpecialHeaders[i].search)) { effective_load_flags_ |= kSpecialHeaders[i].load_flag; special_headers = true; @@ -2349,7 +2349,7 @@ // Check for conditionalization headers which may correspond with a // cache validation request. - for (size_t i = 0; i < base::size(kValidationHeaders); ++i) { + for (size_t i = 0; i < std::size(kValidationHeaders); ++i) { const ValidationHeaderInfo& info = kValidationHeaders[i]; std::string validation_value; if (request_->extra_headers.GetHeader( @@ -2616,7 +2616,7 @@ ExternallyConditionalizedValidationHeadersMatchEntry() const { DCHECK(external_validation_.initialized); - for (size_t i = 0; i < base::size(kValidationHeaders); i++) { + for (size_t i = 0; i < std::size(kValidationHeaders); i++) { if (external_validation_.values[i].empty()) continue;
diff --git a/net/http/http_chunked_decoder_unittest.cc b/net/http/http_chunked_decoder_unittest.cc index 533e11b..4dbefb34 100644 --- a/net/http/http_chunked_decoder_unittest.cc +++ b/net/http/http_chunked_decoder_unittest.cc
@@ -8,7 +8,6 @@ #include <string> #include <vector> -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/strings/stringprintf.h" #include "net/base/net_errors.h" @@ -71,14 +70,14 @@ const char* const inputs[] = { "B\r\nhello hello\r\n0\r\n\r\n" }; - RunTest(inputs, base::size(inputs), "hello hello", true, 0); + RunTest(inputs, std::size(inputs), "hello hello", true, 0); } TEST(HttpChunkedDecoderTest, OneChunk) { const char* const inputs[] = { "5\r\nhello\r\n" }; - RunTest(inputs, base::size(inputs), "hello", false, 0); + RunTest(inputs, std::size(inputs), "hello", false, 0); } TEST(HttpChunkedDecoderTest, Typical) { @@ -88,7 +87,7 @@ "5\r\nworld\r\n", "0\r\n\r\n" }; - RunTest(inputs, base::size(inputs), "hello world", true, 0); + RunTest(inputs, std::size(inputs), "hello world", true, 0); } TEST(HttpChunkedDecoderTest, Incremental) { @@ -105,7 +104,7 @@ "\r", "\n" }; - RunTest(inputs, base::size(inputs), "hello", true, 0); + RunTest(inputs, std::size(inputs), "hello", true, 0); } // Same as above, but group carriage returns with previous input. @@ -119,7 +118,7 @@ "\n\r", "\n" }; - RunTest(inputs, base::size(inputs), "hello", true, 0); + RunTest(inputs, std::size(inputs), "hello", true, 0); } TEST(HttpChunkedDecoderTest, LF_InsteadOf_CRLF) { @@ -132,7 +131,7 @@ "5\nworld\n", "0\n\n" }; - RunTest(inputs, base::size(inputs), "hello world", true, 0); + RunTest(inputs, std::size(inputs), "hello world", true, 0); } TEST(HttpChunkedDecoderTest, Extensions) { @@ -140,7 +139,7 @@ "5;x=0\r\nhello\r\n", "0;y=\"2 \"\r\n\r\n" }; - RunTest(inputs, base::size(inputs), "hello", true, 0); + RunTest(inputs, std::size(inputs), "hello", true, 0); } TEST(HttpChunkedDecoderTest, Trailers) { @@ -151,7 +150,7 @@ "Bar: 2\r\n", "\r\n" }; - RunTest(inputs, base::size(inputs), "hello", true, 0); + RunTest(inputs, std::size(inputs), "hello", true, 0); } TEST(HttpChunkedDecoderTest, TrailersUnfinished) { @@ -160,7 +159,7 @@ "0\r\n", "Foo: 1\r\n" }; - RunTest(inputs, base::size(inputs), "hello", false, 0); + RunTest(inputs, std::size(inputs), "hello", false, 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_TooBig) { @@ -171,7 +170,7 @@ "48469410265455838241\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_0X) { @@ -182,7 +181,7 @@ "0x5\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, ChunkSize_TrailingSpace) { @@ -194,7 +193,7 @@ "5 \r\nhello\r\n", "0\r\n\r\n" }; - RunTest(inputs, base::size(inputs), "hello", true, 0); + RunTest(inputs, std::size(inputs), "hello", true, 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingTab) { @@ -204,7 +203,7 @@ "5\t\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingFormFeed) { @@ -215,7 +214,7 @@ "5\f\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingVerticalTab) { @@ -226,7 +225,7 @@ "5\v\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_TrailingNonHexDigit) { @@ -237,7 +236,7 @@ "5H\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_LeadingSpace) { @@ -248,7 +247,7 @@ " 5\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidLeadingSeparator) { @@ -256,7 +255,7 @@ "\r\n5\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_NoSeparator) { @@ -265,7 +264,7 @@ "1\r\n \r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 1); + RunTestUntilFailure(inputs, std::size(inputs), 1); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_Negative) { @@ -273,7 +272,7 @@ "8\r\n12345678\r\n-5\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidChunkSize_Plus) { @@ -284,7 +283,7 @@ "+5\r\nhello\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, InvalidConsecutiveCRLFs) { @@ -293,7 +292,7 @@ "\r\n\r\n\r\n\r\n", "0\r\n\r\n" }; - RunTestUntilFailure(inputs, base::size(inputs), 1); + RunTestUntilFailure(inputs, std::size(inputs), 1); } TEST(HttpChunkedDecoderTest, ReallyBigChunks) { @@ -340,7 +339,7 @@ // Chunk terminator and the final chunk. char final_chunk[] = "\r\n0\r\n\r\n"; - EXPECT_EQ(OK, decoder.FilterBuf(final_chunk, base::size(final_chunk))); + EXPECT_EQ(OK, decoder.FilterBuf(final_chunk, std::size(final_chunk))); EXPECT_TRUE(decoder.reached_eof()); // Since |data| never included any chunk headers, it should not have been @@ -354,20 +353,20 @@ TEST(HttpChunkedDecoderTest, ExcessiveChunkLen) { // Smallest number that can't be represented as a signed int64. const char* const inputs[] = {"8000000000000000\r\nhello\r\n"}; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, ExcessiveChunkLen2) { // Smallest number that can't be represented as an unsigned int64. const char* const inputs[] = {"10000000000000000\r\nhello\r\n"}; - RunTestUntilFailure(inputs, base::size(inputs), 0); + RunTestUntilFailure(inputs, std::size(inputs), 0); } TEST(HttpChunkedDecoderTest, BasicExtraData) { const char* const inputs[] = { "5\r\nhello\r\n0\r\n\r\nextra bytes" }; - RunTest(inputs, base::size(inputs), "hello", true, 11); + RunTest(inputs, std::size(inputs), "hello", true, 11); } TEST(HttpChunkedDecoderTest, IncrementalExtraData) { @@ -384,7 +383,7 @@ "\r", "\nextra bytes" }; - RunTest(inputs, base::size(inputs), "hello", true, 11); + RunTest(inputs, std::size(inputs), "hello", true, 11); } TEST(HttpChunkedDecoderTest, MultipleExtraDataBlocks) { @@ -392,7 +391,7 @@ "5\r\nhello\r\n0\r\n\r\nextra", " bytes" }; - RunTest(inputs, base::size(inputs), "hello", true, 11); + RunTest(inputs, std::size(inputs), "hello", true, 11); } // Test when the line with the chunk length is too long. @@ -405,7 +404,7 @@ big_chunk.get(), "5" }; - RunTestUntilFailure(inputs, base::size(inputs), 1); + RunTestUntilFailure(inputs, std::size(inputs), 1); } // Test when the extension portion of the line with the chunk length is too @@ -419,7 +418,7 @@ "5;", big_chunk.get() }; - RunTestUntilFailure(inputs, base::size(inputs), 1); + RunTestUntilFailure(inputs, std::size(inputs), 1); } } // namespace
diff --git a/net/http/http_content_disposition_unittest.cc b/net/http/http_content_disposition_unittest.cc index 104cbba..2e3dfb2 100644 --- a/net/http/http_content_disposition_unittest.cc +++ b/net/http/http_content_disposition_unittest.cc
@@ -4,7 +4,6 @@ #include "net/http/http_content_disposition.h" -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -202,7 +201,7 @@ {"attachment; foobar=x; filename=\"foo.html\"", "", L"foo.html"}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { HttpContentDisposition header(tests[i].header, tests[i].referrer_charset); EXPECT_EQ(tests[i].expected, base::UTF8ToWide(header.filename())) @@ -415,7 +414,7 @@ // TODO(abarth): http://greenbytes.de/tech/tc2231/#attrfc2047token // TODO(abarth): http://greenbytes.de/tech/tc2231/#attrfc2047quoted }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { HttpContentDisposition header(tests[i].header, std::string()); EXPECT_EQ(tests[i].expected_type, header.type()) << "Failed on input: " << tests[i].header; @@ -488,7 +487,7 @@ HttpContentDisposition::INVALID}, }; - for (size_t i = 0; i < base::size(kTestCases); ++i) { + for (size_t i = 0; i < std::size(kTestCases); ++i) { const ParseResultTestCase& test_case = kTestCases[i]; HttpContentDisposition content_disposition(test_case.header, "utf-8"); int result = content_disposition.parse_result_flags();
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc index 3c2eae1..e33d1422 100644 --- a/net/http/http_network_transaction_unittest.cc +++ b/net/http/http_network_transaction_unittest.cc
@@ -17,7 +17,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/json/json_writer.h" @@ -1983,7 +1982,7 @@ ChunkedUploadDataStream upload_data_stream(0); if (chunked_upload) { request.method = "POST"; - upload_data_stream.AppendData(upload_data, base::size(upload_data) - 1, + upload_data_stream.AppendData(upload_data, std::size(upload_data) - 1, true); request.upload_data_stream = &upload_data_stream; } @@ -2524,7 +2523,7 @@ data.set_busy_before_sync_reads(true); session_deps_.socket_factory->AddSocketDataProvider(&data); - const int kNumUnreadBodies = base::size(data_writes) - 1; + const int kNumUnreadBodies = std::size(data_writes) - 1; std::string response_lines[kNumUnreadBodies]; uint32_t first_socket_log_id = NetLogSource::kInvalidId; @@ -2571,7 +2570,7 @@ "HTTP/1.1 200 Hunky-Dory", }; - static_assert(kNumUnreadBodies == base::size(kStatusLines), + static_assert(kNumUnreadBodies == std::size(kStatusLines), "forgot to update kStatusLines"); for (int i = 0; i < kNumUnreadBodies; ++i) @@ -5999,7 +5998,7 @@ }; MockWrite socks5_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), - MockWrite(ASYNC, kSOCKS5Request, base::size(kSOCKS5Request)), + MockWrite(ASYNC, kSOCKS5Request, std::size(kSOCKS5Request)), MockWrite(SYNCHRONOUS, "GET /socks5 HTTP/1.1\r\n" "Host: test\r\n" @@ -6687,7 +6686,7 @@ "proxy-authorization", "Basic Zm9vOmJhcg==" }; spdy::SpdySerializedFrame req_get_authorization(spdy_util_.ConstructSpdyGet( - kExtraAuthorizationHeaders, base::size(kExtraAuthorizationHeaders) / 2, 3, + kExtraAuthorizationHeaders, std::size(kExtraAuthorizationHeaders) / 2, 3, LOWEST)); MockWrite spdy_writes[] = { CreateMockWrite(req_get, 0), CreateMockWrite(req_get_authorization, 3), @@ -6702,7 +6701,7 @@ spdy::SpdySerializedFrame resp_authentication( spdy_util_.ConstructSpdyReplyError( "407", kExtraAuthenticationHeaders, - base::size(kExtraAuthenticationHeaders) / 2, 1)); + std::size(kExtraAuthenticationHeaders) / 2, 1)); spdy::SpdySerializedFrame body_authentication( spdy_util_.ConstructSpdyDataFrame(1, true)); spdy::SpdySerializedFrame resp_data( @@ -8647,18 +8646,18 @@ base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kExpectedNegotiateMsg), - base::size(ntlm::test::kExpectedNegotiateMsg)), + std::size(ntlm::test::kExpectedNegotiateMsg)), &negotiate_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kChallengeMsgFromSpecV2), - base::size(ntlm::test::kChallengeMsgFromSpecV2)), + std::size(ntlm::test::kChallengeMsgFromSpecV2)), &challenge_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2), - base::size( + std::size( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2)), &authenticate_msg); @@ -8799,18 +8798,18 @@ base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kExpectedNegotiateMsg), - base::size(ntlm::test::kExpectedNegotiateMsg)), + std::size(ntlm::test::kExpectedNegotiateMsg)), &negotiate_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kChallengeMsgFromSpecV2), - base::size(ntlm::test::kChallengeMsgFromSpecV2)), + std::size(ntlm::test::kChallengeMsgFromSpecV2)), &challenge_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2), - base::size( + std::size( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2)), &authenticate_msg); @@ -9045,18 +9044,18 @@ base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kExpectedNegotiateMsg), - base::size(ntlm::test::kExpectedNegotiateMsg)), + std::size(ntlm::test::kExpectedNegotiateMsg)), &negotiate_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kChallengeMsgFromSpecV2), - base::size(ntlm::test::kChallengeMsgFromSpecV2)), + std::size(ntlm::test::kChallengeMsgFromSpecV2)), &challenge_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2), - base::size( + std::size( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2)), &authenticate_msg); @@ -9236,18 +9235,18 @@ base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kExpectedNegotiateMsg), - base::size(ntlm::test::kExpectedNegotiateMsg)), + std::size(ntlm::test::kExpectedNegotiateMsg)), &negotiate_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kChallengeMsgFromSpecV2), - base::size(ntlm::test::kChallengeMsgFromSpecV2)), + std::size(ntlm::test::kChallengeMsgFromSpecV2)), &challenge_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2), - base::size( + std::size( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2)), &authenticate_msg); @@ -9426,18 +9425,18 @@ base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kExpectedNegotiateMsg), - base::size(ntlm::test::kExpectedNegotiateMsg)), + std::size(ntlm::test::kExpectedNegotiateMsg)), &negotiate_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>(ntlm::test::kChallengeMsgFromSpecV2), - base::size(ntlm::test::kChallengeMsgFromSpecV2)), + std::size(ntlm::test::kChallengeMsgFromSpecV2)), &challenge_msg); base::Base64Encode( base::StringPiece( reinterpret_cast<const char*>( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2), - base::size( + std::size( ntlm::test::kExpectedAuthenticateMsgEmptyChannelBindingsV2)), &authenticate_msg); @@ -11535,7 +11534,7 @@ "http://login.example.com/", }; spdy::SpdySerializedFrame resp(spdy_util_.ConstructSpdyReplyError( - "302", kExtraHeaders, base::size(kExtraHeaders) / 2, 1)); + "302", kExtraHeaders, std::size(kExtraHeaders) / 2, 1)); MockRead data_reads[] = { // Pause on first read. MockRead(ASYNC, ERR_IO_PENDING, 1), CreateMockRead(resp, 2), @@ -11645,7 +11644,7 @@ "http://login.example.com/", }; spdy::SpdySerializedFrame resp(spdy_util_.ConstructSpdyReplyError( - "404", kExtraHeaders, base::size(kExtraHeaders) / 2, 1)); + "404", kExtraHeaders, std::size(kExtraHeaders) / 2, 1)); spdy::SpdySerializedFrame body( spdy_util_.ConstructSpdyDataFrame(1, "The host does not exist", true)); MockRead data_reads[] = { @@ -11707,7 +11706,7 @@ "proxy-authorization", "Basic Zm9vOmJhcg==", }; spdy::SpdySerializedFrame connect2(spdy_util_.ConstructSpdyConnect( - kAuthCredentials, base::size(kAuthCredentials) / 2, 3, + kAuthCredentials, std::size(kAuthCredentials) / 2, 3, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair("www.example.org", 443))); // fetch https://www.example.org/ via HTTP @@ -11730,7 +11729,7 @@ "proxy-authenticate", "Basic realm=\"MyRealm1\"", }; spdy::SpdySerializedFrame conn_auth_resp(spdy_util_.ConstructSpdyReplyError( - kAuthStatus, kAuthChallenge, base::size(kAuthChallenge) / 2, 1)); + kAuthStatus, kAuthChallenge, std::size(kAuthChallenge) / 2, 1)); spdy::SpdySerializedFrame conn_resp( spdy_util_.ConstructSpdyGetReply(nullptr, 0, 3)); @@ -12339,13 +12338,13 @@ char read_buffer[] = { 0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0 }; MockWrite data_writes[] = { - MockWrite(ASYNC, write_buffer, base::size(write_buffer)), + MockWrite(ASYNC, write_buffer, std::size(write_buffer)), MockWrite("GET / HTTP/1.1\r\n" "Host: www.example.org\r\n" "Connection: keep-alive\r\n\r\n")}; MockRead data_reads[] = { - MockRead(ASYNC, read_buffer, base::size(read_buffer)), + MockRead(ASYNC, read_buffer, std::size(read_buffer)), MockRead("HTTP/1.0 200 OK\r\n"), MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"), MockRead("Payload"), MockRead(SYNCHRONOUS, OK)}; @@ -12396,14 +12395,14 @@ MockWrite data_writes[] = { MockWrite(ASYNC, reinterpret_cast<char*>(write_buffer), - base::size(write_buffer)), + std::size(write_buffer)), MockWrite("GET / HTTP/1.1\r\n" "Host: www.example.org\r\n" "Connection: keep-alive\r\n\r\n")}; MockRead data_reads[] = { MockRead(ASYNC, reinterpret_cast<char*>(read_buffer), - base::size(read_buffer)), + std::size(read_buffer)), MockRead("HTTP/1.0 200 OK\r\n"), MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"), MockRead("Payload"), MockRead(SYNCHRONOUS, OK)}; @@ -12456,13 +12455,13 @@ char read_buffer[] = { 0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0 }; MockWrite data_writes[] = { - MockWrite(ASYNC, write_buffer, base::size(write_buffer)), + MockWrite(ASYNC, write_buffer, std::size(write_buffer)), MockWrite("GET / HTTP/1.1\r\n" "Host: www.example.org\r\n" "Connection: keep-alive\r\n\r\n")}; MockRead data_reads[] = { - MockRead(ASYNC, read_buffer, base::size(read_buffer)), + MockRead(ASYNC, read_buffer, std::size(read_buffer)), MockRead("HTTP/1.0 200 OK\r\n"), MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"), MockRead("Payload"), MockRead(SYNCHRONOUS, OK)}; @@ -12521,7 +12520,7 @@ MockWrite data_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), MockWrite(ASYNC, kSOCKS5ExampleOkRequest, - base::size(kSOCKS5ExampleOkRequest)), + std::size(kSOCKS5ExampleOkRequest)), MockWrite("GET / HTTP/1.1\r\n" "Host: www.example.org\r\n" "Connection: keep-alive\r\n\r\n")}; @@ -12592,14 +12591,14 @@ MockWrite data_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), MockWrite(ASYNC, reinterpret_cast<const char*>(kSOCKS5ExampleOkRequest), - base::size(kSOCKS5ExampleOkRequest)), + std::size(kSOCKS5ExampleOkRequest)), MockWrite("GET / HTTP/1.1\r\n" "Host: www.example.org\r\n" "Connection: keep-alive\r\n\r\n")}; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS5GreetResponse, kSOCKS5GreetResponseLength), - MockRead(ASYNC, kSOCKS5SslOkResponse, base::size(kSOCKS5SslOkResponse)), + MockRead(ASYNC, kSOCKS5SslOkResponse, std::size(kSOCKS5SslOkResponse)), MockRead("HTTP/1.0 200 OK\r\n"), MockRead("Content-Type: text/html; charset=iso-8859-1\r\n\r\n"), MockRead("Payload"), @@ -12731,7 +12730,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixed( tests[i].proxy_server, TRAFFIC_ANNOTATION_FOR_TESTS); @@ -12789,7 +12788,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixed( tests[i].proxy_server, TRAFFIC_ANNOTATION_FOR_TESTS); @@ -12867,7 +12866,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { session_deps_.proxy_resolution_service = ConfiguredProxyResolutionService::CreateFixed( tests[i].proxy_server, TRAFFIC_ANNOTATION_FOR_TESTS); @@ -16712,7 +16711,7 @@ ERR_CERT_AUTHORITY_INVALID, ERR_CERT_DATE_INVALID, }; - for (size_t i = 0; i < base::size(kErrors); i++) { + for (size_t i = 0; i < std::size(kErrors); i++) { CheckErrorIsPassedBack(kErrors[i], ASYNC); CheckErrorIsPassedBack(kErrors[i], SYNCHRONOUS); }
diff --git a/net/http/http_proxy_connect_job_unittest.cc b/net/http/http_proxy_connect_job_unittest.cc index d10e833..a9d57374 100644 --- a/net/http/http_proxy_connect_job_unittest.cc +++ b/net/http/http_proxy_connect_job_unittest.cc
@@ -9,7 +9,6 @@ #include <string> #include <utility> -#include "base/cxx17_backports.h" #include "base/metrics/field_trial.h" #include "base/metrics/field_trial_param_associator.h" #include "base/metrics/field_trial_params.h" @@ -512,12 +511,12 @@ kResponseHeaderValue, }; spdy::SpdySerializedFrame req(spdy_util_.ConstructSpdyConnect( - kExtraRequestHeaders, base::size(kExtraRequestHeaders) / 2, 1, + kExtraRequestHeaders, std::size(kExtraRequestHeaders) / 2, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); MockWrite spdy_writes[] = {CreateMockWrite(req, 0)}; spdy::SpdySerializedFrame resp(spdy_util_.ConstructSpdyGetReply( - kExtraResponseHeaders, base::size(kExtraResponseHeaders) / 2, 1)); + kExtraResponseHeaders, std::size(kExtraResponseHeaders) / 2, 1)); MockRead spdy_reads[] = { CreateMockRead(resp, 1, ASYNC), MockRead(SYNCHRONOUS, ERR_IO_PENDING, 2), @@ -577,7 +576,7 @@ "Basic Zm9vOmJhcg==", }; spdy::SpdySerializedFrame connect2(spdy_util.ConstructSpdyConnect( - kSpdyAuthCredentials, base::size(kSpdyAuthCredentials) / 2, 3, + kSpdyAuthCredentials, std::size(kSpdyAuthCredentials) / 2, 3, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); @@ -596,7 +595,7 @@ }; spdy::SpdySerializedFrame connect_auth_resp( spdy_util.ConstructSpdyReplyError(kAuthStatus, kAuthChallenge, - base::size(kAuthChallenge) / 2, 1)); + std::size(kAuthChallenge) / 2, 1)); spdy::SpdySerializedFrame connect2_resp( spdy_util.ConstructSpdyGetReply(nullptr, 0, 3)); @@ -694,7 +693,7 @@ "Basic Zm9vOmJhcg==", }; spdy::SpdySerializedFrame connect2(spdy_util.ConstructSpdyConnect( - kSpdyAuthCredentials, base::size(kSpdyAuthCredentials) / 2, 3, + kSpdyAuthCredentials, std::size(kSpdyAuthCredentials) / 2, 3, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); spdy::SpdySerializedFrame rst2( @@ -702,7 +701,7 @@ spdy_util.UpdateWithStreamDestruction(3); spdy::SpdySerializedFrame connect3(spdy_util.ConstructSpdyConnect( - kSpdyAuthCredentials, base::size(kSpdyAuthCredentials) / 2, 5, + kSpdyAuthCredentials, std::size(kSpdyAuthCredentials) / 2, 5, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); MockWrite spdy_writes[] = { @@ -722,10 +721,10 @@ }; spdy::SpdySerializedFrame connect_auth_resp( spdy_util.ConstructSpdyReplyError(kAuthStatus, kAuthChallenge, - base::size(kAuthChallenge) / 2, 1)); + std::size(kAuthChallenge) / 2, 1)); spdy::SpdySerializedFrame connect2_auth_resp( spdy_util.ConstructSpdyReplyError(kAuthStatus, kAuthChallenge, - base::size(kAuthChallenge) / 2, 3)); + std::size(kAuthChallenge) / 2, 3)); spdy::SpdySerializedFrame connect3_resp( spdy_util.ConstructSpdyGetReply(nullptr, 0, 5)); MockRead spdy_reads[] = { @@ -819,7 +818,7 @@ }; SpdyTestUtil spdy_util; spdy::SpdySerializedFrame connect(spdy_util.ConstructSpdyConnect( - kSpdyAuthCredentials, base::size(kSpdyAuthCredentials) / 2, 1, + kSpdyAuthCredentials, std::size(kSpdyAuthCredentials) / 2, 1, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); @@ -1268,7 +1267,7 @@ "set-cookie", "foo=bar", }; - const int responseHeadersSize = base::size(responseHeaders) / 2; + const int responseHeadersSize = std::size(responseHeaders) / 2; spdy::SpdySerializedFrame resp(spdy_util.ConstructSpdyReplyError( "302", responseHeaders, responseHeadersSize, 1)); MockRead spdy_reads[] = { @@ -1358,7 +1357,7 @@ "Basic Zm9vOmJhcg==", }; spdy::SpdySerializedFrame connect2(spdy_util.ConstructSpdyConnect( - kSpdyAuthCredentials, base::size(kSpdyAuthCredentials) / 2, 3, + kSpdyAuthCredentials, std::size(kSpdyAuthCredentials) / 2, 3, HttpProxyConnectJob::kH2QuicTunnelPriority, HostPortPair(kEndpointHost, 443))); // This may be sent in some tests, either when tearing down a successful @@ -1380,7 +1379,7 @@ "Basic realm=\"MyRealm1\"", }; spdy::SpdySerializedFrame connect_auth_resp(spdy_util.ConstructSpdyReplyError( - kAuthStatus, kAuthChallenge, base::size(kAuthChallenge) / 2, 1)); + kAuthStatus, kAuthChallenge, std::size(kAuthChallenge) / 2, 1)); spdy::SpdySerializedFrame connect2_resp( spdy_util.ConstructSpdyGetReply(nullptr, 0, 3)); MockRead spdy_reads[] = {
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 4e4cd17..91536513 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc
@@ -15,7 +15,6 @@ #include <unordered_map> #include <utility> -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/logging.h" #include "base/metrics/histogram_macros.h" @@ -110,11 +109,11 @@ }; bool ShouldUpdateHeader(base::StringPiece name) { - for (size_t i = 0; i < base::size(kNonUpdatedHeaders); ++i) { + for (size_t i = 0; i < std::size(kNonUpdatedHeaders); ++i) { if (base::LowerCaseEqualsASCII(name, kNonUpdatedHeaders[i])) return false; } - for (size_t i = 0; i < base::size(kNonUpdatedHeaderPrefixes); ++i) { + for (size_t i = 0; i < std::size(kNonUpdatedHeaderPrefixes); ++i) { if (base::StartsWith(name, kNonUpdatedHeaderPrefixes[i], base::CompareCase::INSENSITIVE_ASCII)) return false; @@ -887,17 +886,17 @@ } void HttpResponseHeaders::AddHopByHopHeaders(HeaderSet* result) { - for (size_t i = 0; i < base::size(kHopByHopResponseHeaders); ++i) + for (size_t i = 0; i < std::size(kHopByHopResponseHeaders); ++i) result->insert(std::string(kHopByHopResponseHeaders[i])); } void HttpResponseHeaders::AddCookieHeaders(HeaderSet* result) { - for (size_t i = 0; i < base::size(kCookieResponseHeaders); ++i) + for (size_t i = 0; i < std::size(kCookieResponseHeaders); ++i) result->insert(std::string(kCookieResponseHeaders[i])); } void HttpResponseHeaders::AddChallengeHeaders(HeaderSet* result) { - for (size_t i = 0; i < base::size(kChallengeResponseHeaders); ++i) + for (size_t i = 0; i < std::size(kChallengeResponseHeaders); ++i) result->insert(std::string(kChallengeResponseHeaders[i])); } @@ -906,7 +905,7 @@ } void HttpResponseHeaders::AddSecurityStateHeaders(HeaderSet* result) { - for (size_t i = 0; i < base::size(kSecurityStateHeaders); ++i) + for (size_t i = 0; i < std::size(kSecurityStateHeaders); ++i) result->insert(std::string(kSecurityStateHeaders[i])); }
diff --git a/net/http/http_stream_factory_unittest.cc b/net/http/http_stream_factory_unittest.cc index a3d9af1..7bc559a 100644 --- a/net/http/http_stream_factory_unittest.cc +++ b/net/http/http_stream_factory_unittest.cc
@@ -15,7 +15,6 @@ #include "base/compiler_specific.h" #include "base/containers/contains.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/no_destructor.h" #include "base/run_loop.h" @@ -83,6 +82,10 @@ #include "net/third_party/quiche/src/quic/test_tools/mock_random.h" #include "net/third_party/quiche/src/quic/test_tools/quic_test_utils.h" #include "net/traffic_annotation/network_traffic_annotation_test_helper.h" +// This file can be included from net/http even though +// it is in net/websockets because it doesn't +// introduce any link dependency to net/websockets. +#include "net/websockets/websocket_handshake_stream_base.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -90,11 +93,6 @@ #include "url/scheme_host_port.h" #include "url/url_constants.h" -// This file can be included from net/http even though -// it is in net/websockets because it doesn't -// introduce any link dependency to net/websockets. -#include "net/websockets/websocket_handshake_stream_base.h" - using ::testing::Contains; using ::testing::ElementsAre; using ::testing::IsEmpty; @@ -505,7 +503,7 @@ using HttpStreamFactoryTest = TestWithTaskEnvironment; TEST_F(HttpStreamFactoryTest, PreconnectDirect) { - for (size_t i = 0; i < base::size(kTests); ++i) { + for (size_t i = 0; i < std::size(kTests); ++i) { SpdySessionDependencies session_deps( ConfiguredProxyResolutionService::CreateDirect()); std::unique_ptr<HttpNetworkSession> session( @@ -530,7 +528,7 @@ } TEST_F(HttpStreamFactoryTest, PreconnectHttpProxy) { - for (size_t i = 0; i < base::size(kTests); ++i) { + for (size_t i = 0; i < std::size(kTests); ++i) { SpdySessionDependencies session_deps( ConfiguredProxyResolutionService::CreateFixed( "http_proxy", TRAFFIC_ANNOTATION_FOR_TESTS)); @@ -554,7 +552,7 @@ } TEST_F(HttpStreamFactoryTest, PreconnectSocksProxy) { - for (size_t i = 0; i < base::size(kTests); ++i) { + for (size_t i = 0; i < std::size(kTests); ++i) { SpdySessionDependencies session_deps( ConfiguredProxyResolutionService::CreateFixed( "socks4://socks_proxy:1080", TRAFFIC_ANNOTATION_FOR_TESTS)); @@ -578,7 +576,7 @@ } TEST_F(HttpStreamFactoryTest, PreconnectDirectWithExistingSpdySession) { - for (size_t i = 0; i < base::size(kTests); ++i) { + for (size_t i = 0; i < std::size(kTests); ++i) { SpdySessionDependencies session_deps( ConfiguredProxyResolutionService::CreateDirect()); std::unique_ptr<HttpNetworkSession> session(
diff --git a/net/http/http_stream_parser_unittest.cc b/net/http/http_stream_parser_unittest.cc index e25b785..62373540 100644 --- a/net/http/http_stream_parser_unittest.cc +++ b/net/http/http_stream_parser_unittest.cc
@@ -13,7 +13,6 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" @@ -273,7 +272,7 @@ callback1.callback()); EXPECT_EQ(ERR_IO_PENDING, result1); base::RunLoop().RunUntilIdle(); - upload_data_stream.AppendData(kChunk, base::size(kChunk) - 1, true); + upload_data_stream.AppendData(kChunk, std::size(kChunk) - 1, true); // Check progress after read completes. progress = upload_data_stream.GetUploadProgress(); @@ -644,11 +643,11 @@ &response, callback.callback())); base::RunLoop().RunUntilIdle(); - upload_data_stream.AppendData(kChunk, base::size(kChunk) - 1, false); + upload_data_stream.AppendData(kChunk, std::size(kChunk) - 1, false); base::RunLoop().RunUntilIdle(); // This write should fail. - upload_data_stream.AppendData(kChunk, base::size(kChunk) - 1, false); + upload_data_stream.AppendData(kChunk, std::size(kChunk) - 1, false); EXPECT_THAT(callback.WaitForResult(), IsError(ERR_FAILED)); EXPECT_EQ(CountWriteBytes(writes), parser.sent_bytes()); @@ -720,7 +719,7 @@ ASSERT_FALSE(callback.have_result()); // Now append the only chunk and wait for the callback. - upload_stream.AppendData(kChunk, base::size(kChunk) - 1, true); + upload_stream.AppendData(kChunk, std::size(kChunk) - 1, true); ASSERT_THAT(callback.WaitForResult(), IsOk()); // Attempt to read the response status and the response headers. @@ -772,7 +771,7 @@ NetLogWithSource()), IsOk()); // Append the only chunk. - upload_stream.AppendData(kChunk, base::size(kChunk) - 1, true); + upload_stream.AppendData(kChunk, std::size(kChunk) - 1, true); SequencedSocketData data(reads, writes); std::unique_ptr<StreamSocket> stream_socket = CreateConnectedSocket(&data); @@ -853,7 +852,7 @@ }; ChunkedUploadDataStream upload_stream(0); - upload_stream.AppendData(kChunk1, base::size(kChunk1) - 1, false); + upload_stream.AppendData(kChunk1, std::size(kChunk1) - 1, false); ASSERT_THAT(upload_stream.Init(TestCompletionCallback().callback(), NetLogWithSource()), IsOk()); @@ -889,12 +888,12 @@ ASSERT_FALSE(callback.have_result()); // Now append another chunk. - upload_stream.AppendData(kChunk2, base::size(kChunk2) - 1, false); + upload_stream.AppendData(kChunk2, std::size(kChunk2) - 1, false); ASSERT_FALSE(callback.have_result()); // Add the final chunk, while the write for the second is still pending, // which should not confuse the state machine. - upload_stream.AppendData(kChunk3, base::size(kChunk3) - 1, true); + upload_stream.AppendData(kChunk3, std::size(kChunk3) - 1, true); ASSERT_FALSE(callback.have_result()); // Wait for writes to complete. @@ -1123,7 +1122,7 @@ for (size_t protocol = 0; protocol < NUM_PROTOCOLS; protocol++) { SCOPED_TRACE(protocol); - for (size_t i = 0; i < base::size(reads); i++) { + for (size_t i = 0; i < std::size(reads); i++) { SCOPED_TRACE(i); SequencedSocketData data(reads[i], writes); std::unique_ptr<StreamSocket> stream_socket(CreateConnectedSocket(&data)); @@ -1152,7 +1151,7 @@ int rv = parser.ReadResponseHeaders(callback.callback()); EXPECT_EQ(CountWriteBytes(writes), parser.sent_bytes()); - if (i == base::size(reads) - 1) { + if (i == std::size(reads) - 1) { EXPECT_THAT(rv, IsOk()); EXPECT_TRUE(response_info.headers.get()); EXPECT_EQ(CountReadBytes(reads[i]), parser.received_bytes()); @@ -1430,7 +1429,7 @@ // Need to start at 4 because HttpStreamParser will treat the response as // HTTP/0.9 if it doesn't see "HTTP", and need to end at -1 because "\r\n\r" // is currently treated as a valid end of header marker. - for (size_t i = 4; i < base::size(kTestHeaders) - 1; ++i) { + for (size_t i = 4; i < std::size(kTestHeaders) - 1; ++i) { std::string read_data(kTestHeaders); read_data.insert(i, 1, '\0'); read_data.append("body");
diff --git a/net/http/http_transaction_test_util.cc b/net/http/http_transaction_test_util.cc index 5c45e14..2d007e419 100644 --- a/net/http/http_transaction_test_util.cc +++ b/net/http/http_transaction_test_util.cc
@@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" @@ -181,7 +180,7 @@ return it->second; // look for builtins: - for (size_t i = 0; i < base::size(kBuiltinMockTransactions); ++i) { + for (size_t i = 0; i < std::size(kBuiltinMockTransactions); ++i) { if (url == GURL(kBuiltinMockTransactions[i]->url)) return kBuiltinMockTransactions[i]; }
diff --git a/net/http/http_util_unittest.cc b/net/http/http_util_unittest.cc index 7ba495f..396350d 100644 --- a/net/http/http_util_unittest.cc +++ b/net/http/http_util_unittest.cc
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/http/http_util.h" + #include <algorithm> #include <limits> -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" -#include "net/http/http_util.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -44,7 +44,7 @@ "user-agent", "via", }; - for (size_t i = 0; i < base::size(unsafe_headers); ++i) { + for (size_t i = 0; i < std::size(unsafe_headers); ++i) { EXPECT_FALSE(HttpUtil::IsSafeHeader(unsafe_headers[i])) << unsafe_headers[i]; EXPECT_FALSE(HttpUtil::IsSafeHeader(base::ToUpperASCII(unsafe_headers[i]))) @@ -91,7 +91,7 @@ "user_agent", "viaa", }; - for (size_t i = 0; i < base::size(safe_headers); ++i) { + for (size_t i = 0; i < std::size(safe_headers); ++i) { EXPECT_TRUE(HttpUtil::IsSafeHeader(safe_headers[i])) << safe_headers[i]; EXPECT_TRUE(HttpUtil::IsSafeHeader(base::ToUpperASCII(safe_headers[i]))) << safe_headers[i]; @@ -338,7 +338,7 @@ {"foo\nbar\n\r\njunk", 10}, {"foo\nbar\r\n\njunk", 10}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { size_t input_len = strlen(tests[i].input); size_t eoh = HttpUtil::LocateEndOfHeaders(tests[i].input, input_len); EXPECT_EQ(tests[i].expected_result, eoh); @@ -362,7 +362,7 @@ {"foo\nbar\n\r\njunk", 10}, {"foo\nbar\r\n\njunk", 10}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { size_t input_len = strlen(tests[i].input); size_t eoh = HttpUtil::LocateEndOfAdditionalHeaders(tests[i].input, input_len); @@ -685,7 +685,7 @@ }, }; // clang-format on - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string input = tests[i].input; std::replace(input.begin(), input.end(), '|', '\0'); std::string raw = HttpUtil::AssembleRawHeaders(input); @@ -725,7 +725,7 @@ "wss://www.google.com:78/foobar?query=1", } }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(i); GURL url(GURL(tests[i].url)); @@ -989,7 +989,7 @@ // TODO(abarth): Add more interesting test cases. }; // clang-format on - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string mime_type; std::string charset; bool had_charset = false; @@ -1097,7 +1097,7 @@ {"Thu, 1 Jan 2015 12:34:56 GMT", true, later - now}, {"Mon, 1 Jan 1900 12:34:56 GMT", false, base::TimeDelta()}}; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { base::TimeDelta retry_after; bool return_value = HttpUtil::ParseRetryAfterHeader( tests[i].retry_after_string, now, &retry_after); @@ -1593,7 +1593,7 @@ {"foo,\"bar\"", "INVALID"}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string value(tests[i].value); std::string reformatted; std::set<std::string> allowed_encodings; @@ -1623,7 +1623,7 @@ {"foo,\"bar\"", "INVALID"}, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { std::string value(tests[i].value); std::string reformatted; std::set<std::string> used_encodings;
diff --git a/net/http/http_vary_data_unittest.cc b/net/http/http_vary_data_unittest.cc index 491454b..44b2e2e 100644 --- a/net/http/http_vary_data_unittest.cc +++ b/net/http/http_vary_data_unittest.cc
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "net/http/http_vary_data.h" + #include <algorithm> -#include "base/cxx17_backports.h" #include "net/http/http_request_info.h" #include "net/http/http_response_headers.h" -#include "net/http/http_vary_data.h" #include "testing/gtest/include/gtest/gtest.h" namespace net { @@ -44,7 +44,7 @@ const bool kExpectedValid[] = {false, true, true, true}; - for (size_t i = 0; i < base::size(kTestResponses); ++i) { + for (size_t i = 0; i < std::size(kTestResponses); ++i) { TestTransaction t; t.Init(std::string(), kTestResponses[i]);
diff --git a/net/http/structured_headers.cc b/net/http/structured_headers.cc index 21bf1786..799f927b 100644 --- a/net/http/structured_headers.cc +++ b/net/http/structured_headers.cc
@@ -650,7 +650,7 @@ // Maximum is 12 integer digits, one decimal point, three fractional // digits, and a null terminator. char buffer[17]; - base::snprintf(buffer, base::size(buffer), "%#.3f", decimal_value); + base::snprintf(buffer, std::size(buffer), "%#.3f", decimal_value); // Strip any trailing 0s after the decimal point, but leave at least one // digit after it in all cases. (So 1.230 becomes 1.23, but 1.000 becomes
diff --git a/net/http/url_security_manager_unittest.cc b/net/http/url_security_manager_unittest.cc index 834f559..6724250 100644 --- a/net/http/url_security_manager_unittest.cc +++ b/net/http/url_security_manager_unittest.cc
@@ -6,7 +6,6 @@ #include <utility> -#include "base/cxx17_backports.h" #include "net/base/net_errors.h" #include "net/http/http_auth_filter.h" #include "testing/gtest/include/gtest/gtest.h" @@ -56,7 +55,7 @@ url_security_manager->SetDefaultAllowlist(std::move(auth_filter)); ASSERT_TRUE(url_security_manager.get()); - for (size_t i = 0; i < base::size(kTestDataList); ++i) { + for (size_t i = 0; i < std::size(kTestDataList); ++i) { url::SchemeHostPort scheme_host_port( GURL(kTestDataList[i].scheme_host_port)); bool can_use_default = @@ -78,7 +77,7 @@ url_security_manager->SetDelegateAllowlist(std::move(auth_filter)); ASSERT_TRUE(url_security_manager.get()); - for (size_t i = 0; i < base::size(kTestDataList); ++i) { + for (size_t i = 0; i < std::size(kTestDataList); ++i) { url::SchemeHostPort scheme_host_port( GURL(kTestDataList[i].scheme_host_port)); bool can_delegate = url_security_manager->CanDelegate(scheme_host_port); @@ -94,7 +93,7 @@ URLSecurityManager::Create()); ASSERT_TRUE(url_security_manager.get()); - for (size_t i = 0; i < base::size(kTestDataList); ++i) { + for (size_t i = 0; i < std::size(kTestDataList); ++i) { url::SchemeHostPort scheme_host_port( GURL(kTestDataList[i].scheme_host_port)); bool can_delegate = url_security_manager->CanDelegate(scheme_host_port);
diff --git a/net/log/net_log_unittest.cc b/net/log/net_log_unittest.cc index bbe8a74..d01f3b19 100644 --- a/net/log/net_log_unittest.cc +++ b/net/log/net_log_unittest.cc
@@ -4,7 +4,6 @@ #include "net/log/net_log.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/synchronization/waitable_event.h" #include "base/test/task_environment.h" @@ -323,14 +322,14 @@ base::WaitableEvent::ResetPolicy::MANUAL, base::WaitableEvent::InitialState::NOT_SIGNALED); - for (size_t i = 0; i < base::size(threads); ++i) { + for (size_t i = 0; i < std::size(threads); ++i) { threads[i].Init(net_log, &start_event); threads[i].Start(); } start_event.Signal(); - for (size_t i = 0; i < base::size(threads); ++i) + for (size_t i = 0; i < std::size(threads); ++i) threads[i].Join(); } @@ -338,7 +337,7 @@ TEST(NetLogTest, NetLogEventThreads) { // Attach some observers. They'll safely detach themselves on destruction. CountingObserver observers[3]; - for (size_t i = 0; i < base::size(observers); ++i) { + for (size_t i = 0; i < std::size(observers); ++i) { NetLog::Get()->AddObserver(&observers[i], NetLogCaptureMode::kEverything); } @@ -348,7 +347,7 @@ // Check that each observer saw the emitted events. const int kTotalEvents = kThreads * kEvents; - for (size_t i = 0; i < base::size(observers); ++i) + for (size_t i = 0; i < std::size(observers); ++i) EXPECT_EQ(kTotalEvents, observers[i].count()); }
diff --git a/net/log/net_log_values_unittest.cc b/net/log/net_log_values_unittest.cc index 3a7818f..fd5396c 100644 --- a/net/log/net_log_values_unittest.cc +++ b/net/log/net_log_values_unittest.cc
@@ -56,7 +56,7 @@ // Test the encoding for a non-empty sequence (which needs padding). const uint8_t kBytes[] = {0x00, 0xF3, 0xF8, 0xFF}; - auto value2 = NetLogBinaryValue(kBytes, base::size(kBytes)); + auto value2 = NetLogBinaryValue(kBytes, std::size(kBytes)); ASSERT_TRUE(value2.is_string()); EXPECT_EQ("APP4/w==", value2.GetString()); }
diff --git a/net/network_error_logging/network_error_logging_service.cc b/net/network_error_logging/network_error_logging_service.cc index 4fb3be7..52947e7 100644 --- a/net/network_error_logging/network_error_logging_service.cc +++ b/net/network_error_logging/network_error_logging_service.cc
@@ -10,7 +10,6 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/json/json_reader.h" #include "base/logging.h" @@ -129,7 +128,7 @@ void GetPhaseAndTypeFromNetError(Error error, std::string* phase_out, std::string* type_out) { - for (size_t i = 0; i < base::size(kErrorTypes); ++i) { + for (size_t i = 0; i < std::size(kErrorTypes); ++i) { DCHECK(kErrorTypes[i].phase != nullptr); DCHECK(kErrorTypes[i].type != nullptr); if (kErrorTypes[i].error == error) {
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc index 4404cbe..6299ede 100644 --- a/net/nqe/network_quality_estimator.cc +++ b/net/nqe/network_quality_estimator.cc
@@ -13,7 +13,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/metrics/field_trial_params.h" #include "base/metrics/histogram.h" @@ -138,7 +137,7 @@ net::NetLogSourceType::NETWORK_QUALITY_ESTIMATOR)), event_creator_(net_log_) { DCHECK_EQ(nqe::internal::OBSERVATION_CATEGORY_COUNT, - base::size(rtt_ms_observations_)); + std::size(rtt_ms_observations_)); network_quality_store_ = std::make_unique<nqe::internal::NetworkQualityStore>(); @@ -473,7 +472,7 @@ // This can happen if the device switches from one WiFi SSID to another. DCHECK_EQ(nqe::internal::OBSERVATION_CATEGORY_COUNT, - base::size(rtt_ms_observations_)); + std::size(rtt_ms_observations_)); // Write the estimates of the previous network to the cache. network_quality_store_->Add( @@ -988,7 +987,7 @@ size_t* observations_count) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_EQ(nqe::internal::OBSERVATION_CATEGORY_COUNT, - base::size(rtt_ms_observations_)); + std::size(rtt_ms_observations_)); // RTT observations are sorted by duration from shortest to longest, thus // a higher percentile RTT will have a longer RTT than a lower percentile. @@ -1234,7 +1233,7 @@ bool NetworkQualityEstimator::ShouldComputeEffectiveConnectionType() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_EQ(nqe::internal::OBSERVATION_CATEGORY_COUNT, - base::size(rtt_ms_observations_)); + std::size(rtt_ms_observations_)); const base::TimeTicks now = tick_clock_->NowTicks(); // Recompute effective connection type only if
diff --git a/net/ntlm/ntlm_buffer_reader_unittest.cc b/net/ntlm/ntlm_buffer_reader_unittest.cc index bbeeecac..1cb7622c 100644 --- a/net/ntlm/ntlm_buffer_reader_unittest.cc +++ b/net/ntlm/ntlm_buffer_reader_unittest.cc
@@ -4,7 +4,6 @@ #include "net/ntlm/ntlm_buffer_reader.h" -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -15,7 +14,7 @@ const uint8_t buf[1] = {0}; NtlmBufferReader reader(buf); - ASSERT_EQ(base::size(buf), reader.GetLength()); + ASSERT_EQ(std::size(buf), reader.GetLength()); ASSERT_EQ(0u, reader.GetCursor()); ASSERT_FALSE(reader.IsEndOfBuffer()); ASSERT_TRUE(reader.CanRead(1)); @@ -122,7 +121,7 @@ NtlmBufferReader reader(expected); ASSERT_TRUE(reader.ReadBytes(actual)); - ASSERT_EQ(0, memcmp(actual, expected, base::size(actual))); + ASSERT_EQ(0, memcmp(actual, expected, std::size(actual))); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_FALSE(reader.ReadBytes(base::make_span(actual, 1))); } @@ -269,9 +268,9 @@ NtlmBufferReader reader(buf); - ASSERT_TRUE(reader.SkipBytes(base::size(buf))); + ASSERT_TRUE(reader.SkipBytes(std::size(buf))); ASSERT_TRUE(reader.IsEndOfBuffer()); - ASSERT_FALSE(reader.SkipBytes(base::size(buf))); + ASSERT_FALSE(reader.SkipBytes(std::size(buf))); } TEST(NtlmBufferReaderTest, SkipBytesPastEob) { @@ -279,7 +278,7 @@ NtlmBufferReader reader(buf); - ASSERT_FALSE(reader.SkipBytes(base::size(buf) + 1)); + ASSERT_FALSE(reader.SkipBytes(std::size(buf) + 1)); } TEST(NtlmBufferReaderTest, MatchSignatureTooShort) { @@ -346,7 +345,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_TRUE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_TRUE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_TRUE(av_pairs.empty()); } @@ -369,7 +368,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_TRUE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_TRUE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_EQ(1u, av_pairs.size()); @@ -387,7 +386,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_TRUE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_TRUE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_EQ(1u, av_pairs.size()); @@ -404,7 +403,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoInvalidTimestampSize) { @@ -416,7 +415,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoInvalidTimestampPastEob) { @@ -427,7 +426,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoOtherField) { @@ -439,7 +438,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_TRUE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_TRUE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_EQ(1u, av_pairs.size()); @@ -457,7 +456,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoTerminatorAtLocationOtherThanEnd) { @@ -470,7 +469,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoTerminatorNonZeroLength) { @@ -480,7 +479,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoTerminatorNonZeroLength2) { @@ -493,7 +492,7 @@ NtlmBufferReader reader(buf); std::vector<AvPair> av_pairs; - ASSERT_FALSE(reader.ReadTargetInfo(base::size(buf), &av_pairs)); + ASSERT_FALSE(reader.ReadTargetInfo(std::size(buf), &av_pairs)); } TEST(NtlmBufferReaderTest, ReadTargetInfoEmptyPayload) { @@ -642,7 +641,7 @@ NtlmBufferReader reader(buf); - ASSERT_TRUE(reader.MatchZeros(base::size(buf))); + ASSERT_TRUE(reader.MatchZeros(std::size(buf))); ASSERT_TRUE(reader.IsEndOfBuffer()); ASSERT_FALSE(reader.MatchZeros(1)); } @@ -652,7 +651,7 @@ NtlmBufferReader reader(buf); - ASSERT_FALSE(reader.MatchZeros(base::size(buf))); + ASSERT_FALSE(reader.MatchZeros(std::size(buf))); } TEST(NtlmBufferReaderTest, MatchEmptySecurityBuffer) {
diff --git a/net/ntlm/ntlm_buffer_writer_unittest.cc b/net/ntlm/ntlm_buffer_writer_unittest.cc index 8a38568..3d8c834 100644 --- a/net/ntlm/ntlm_buffer_writer_unittest.cc +++ b/net/ntlm/ntlm_buffer_writer_unittest.cc
@@ -4,7 +4,6 @@ #include "net/ntlm/ntlm_buffer_writer.h" -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -81,11 +80,11 @@ ASSERT_TRUE(writer.WriteUInt16(value)); ASSERT_TRUE(writer.IsEndOfBuffer()); - ASSERT_EQ(base::size(expected), writer.GetLength()); + ASSERT_EQ(std::size(expected), writer.GetLength()); ASSERT_FALSE(writer.WriteUInt16(value)); ASSERT_EQ(0, - memcmp(expected, writer.GetBuffer().data(), base::size(expected))); + memcmp(expected, writer.GetBuffer().data(), std::size(expected))); } TEST(NtlmBufferWriterTest, Write16PastEob) { @@ -105,7 +104,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteUInt32(value)); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, Write32PastEob) { @@ -125,7 +124,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteUInt64(value)); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, Write64PastEob) { @@ -138,20 +137,20 @@ TEST(NtlmBufferWriterTest, WriteBytes) { uint8_t expected[8] = {0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11}; - NtlmBufferWriter writer(base::size(expected)); + NtlmBufferWriter writer(std::size(expected)); ASSERT_TRUE(writer.WriteBytes(expected)); - ASSERT_EQ(0, memcmp(GetBufferPtr(writer), expected, base::size(expected))); + ASSERT_EQ(0, memcmp(GetBufferPtr(writer), expected, std::size(expected))); ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteBytes(base::make_span(expected, 1))); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteBytesPastEob) { uint8_t buffer[8]; - NtlmBufferWriter writer(base::size(buffer) - 1); + NtlmBufferWriter writer(std::size(buffer) - 1); ASSERT_FALSE(writer.WriteBytes(buffer)); } @@ -167,7 +166,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteSecurityBuffer(SecurityBuffer(offset, length))); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteSecurityBufferPastEob) { @@ -187,7 +186,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteUtf8String(value)); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteAsciiStringPastEob) { @@ -208,7 +207,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteUtf16String(value)); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteUtf16StringPastEob) { @@ -229,7 +228,7 @@ ASSERT_TRUE(writer.IsEndOfBuffer()); ASSERT_FALSE(writer.WriteUtf8AsUtf16String(input)); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteSignature) { @@ -239,7 +238,7 @@ ASSERT_TRUE(writer.WriteSignature()); ASSERT_TRUE(writer.IsEndOfBuffer()); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteSignaturePastEob) { @@ -268,12 +267,12 @@ TEST(NtlmBufferWriterTest, WriteAvPairHeader) { const uint8_t expected[4] = {0x06, 0x00, 0x11, 0x22}; - NtlmBufferWriter writer(base::size(expected)); + NtlmBufferWriter writer(std::size(expected)); ASSERT_TRUE(writer.WriteAvPairHeader(TargetInfoAvId::kFlags, 0x2211)); ASSERT_TRUE(writer.IsEndOfBuffer()); - ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), base::size(expected))); + ASSERT_EQ(0, memcmp(expected, GetBufferPtr(writer), std::size(expected))); } TEST(NtlmBufferWriterTest, WriteAvPairHeaderPastEob) {
diff --git a/net/ntlm/ntlm_client_unittest.cc b/net/ntlm/ntlm_client_unittest.cc index 33ede58..0099320 100644 --- a/net/ntlm/ntlm_client_unittest.cc +++ b/net/ntlm/ntlm_client_unittest.cc
@@ -7,7 +7,6 @@ #include <string> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "build/build_config.h" #include "net/ntlm/ntlm.h" @@ -303,7 +302,7 @@ std::vector<uint8_t> result = GenerateAuthMsg(client, test::kChallengeMsgV1); ASSERT_FALSE(result.empty()); - ASSERT_EQ(base::size(test::kExpectedAuthenticateMsgSpecResponseV1), + ASSERT_EQ(std::size(test::kExpectedAuthenticateMsgSpecResponseV1), result.size()); ASSERT_EQ(0, memcmp(test::kExpectedAuthenticateMsgSpecResponseV1, result.data(), result.size())); @@ -418,7 +417,7 @@ std::vector<uint8_t> result = client.GetNegotiateMessage(); ASSERT_FALSE(result.empty()); - ASSERT_EQ(base::size(test::kExpectedNegotiateMsg), result.size()); + ASSERT_EQ(std::size(test::kExpectedNegotiateMsg), result.size()); ASSERT_EQ(0, memcmp(test::kExpectedNegotiateMsg, result.data(), result.size())); } @@ -430,7 +429,7 @@ std::vector<uint8_t> result = GenerateAuthMsg(client, test::kChallengeMsgFromSpecV2); ASSERT_FALSE(result.empty()); - ASSERT_EQ(base::size(test::kExpectedAuthenticateMsgSpecResponseV2), + ASSERT_EQ(std::size(test::kExpectedAuthenticateMsgSpecResponseV2), result.size()); ASSERT_EQ(0, memcmp(test::kExpectedAuthenticateMsgSpecResponseV2, result.data(), result.size())); @@ -447,7 +446,7 @@ std::vector<uint8_t> result = GenerateAuthMsg(client, test::kChallengeMsgV1); ASSERT_FALSE(result.empty()); - ASSERT_EQ(base::size(test::kExpectedAuthenticateMsgToOldV1ChallegeV2), + ASSERT_EQ(std::size(test::kExpectedAuthenticateMsgToOldV1ChallegeV2), result.size()); ASSERT_EQ(0, memcmp(test::kExpectedAuthenticateMsgToOldV1ChallegeV2, result.data(), result.size()));
diff --git a/net/ntlm/ntlm_constants.h b/net/ntlm/ntlm_constants.h index d1163bab..8eed997a 100644 --- a/net/ntlm/ntlm_constants.h +++ b/net/ntlm/ntlm_constants.h
@@ -10,7 +10,6 @@ #include <vector> -#include "base/cxx17_backports.h" #include "net/base/net_export.h" namespace net { @@ -149,7 +148,7 @@ }; static constexpr uint8_t kSignature[] = "NTLMSSP"; -static constexpr size_t kSignatureLen = base::size(kSignature); +static constexpr size_t kSignatureLen = std::size(kSignature); static constexpr uint16_t kProofInputVersionV2 = 0x0101; static constexpr size_t kSecurityBufferLen = (2 * sizeof(uint16_t)) + sizeof(uint32_t);
diff --git a/net/ntlm/ntlm_unittest.cc b/net/ntlm/ntlm_unittest.cc index 9342152..eeaec825 100644 --- a/net/ntlm/ntlm_unittest.cc +++ b/net/ntlm/ntlm_unittest.cc
@@ -17,7 +17,6 @@ #include <iterator> #include <string> -#include "base/cxx17_backports.h" #include "base/strings/utf_string_conversions.h" #include "net/ntlm/ntlm_test_data.h" #include "testing/gtest/include/gtest/gtest.h" @@ -315,7 +314,7 @@ // 1) A flags AVPair with the MIC_PRESENT bit set. // 2) A channel bindings AVPair containing the channel bindings hash. // 3) A target name AVPair containing the SPN of the server. - ASSERT_EQ(base::size(test::kExpectedTargetInfoSpecResponseV2), + ASSERT_EQ(std::size(test::kExpectedTargetInfoSpecResponseV2), updated_target_info.size()); ASSERT_EQ(0, memcmp(test::kExpectedTargetInfoSpecResponseV2, updated_target_info.data(), updated_target_info.size())); @@ -335,7 +334,7 @@ std::vector<uint8_t> updated_target_info = GenerateUpdatedTargetInfo( false, false, reinterpret_cast<const char*>(test::kChannelBindings), test::kNtlmSpn, server_av_pairs, &server_timestamp); - ASSERT_EQ(base::size(test::kExpectedTargetInfoFromSpecV2), + ASSERT_EQ(std::size(test::kExpectedTargetInfoFromSpecV2), updated_target_info.size()); ASSERT_EQ(0, memcmp(test::kExpectedTargetInfoFromSpecV2, updated_target_info.data(), updated_target_info.size())); @@ -362,7 +361,7 @@ test::kNtlmSpn, server_av_pairs, &server_timestamp); // Verify that the server timestamp was read from the target info. ASSERT_EQ(test::kServerTimestamp, server_timestamp); - ASSERT_EQ(base::size(test::kExpectedTargetInfoFromSpecPlusServerTimestampV2), + ASSERT_EQ(std::size(test::kExpectedTargetInfoFromSpecPlusServerTimestampV2), updated_target_info.size()); ASSERT_EQ(0, memcmp(test::kExpectedTargetInfoFromSpecPlusServerTimestampV2, updated_target_info.data(), updated_target_info.size())); @@ -388,7 +387,7 @@ // Server pairs) not present. const size_t kMissingServerPairsLength = 32; - ASSERT_EQ(base::size(test::kExpectedTargetInfoSpecResponseV2) - + ASSERT_EQ(std::size(test::kExpectedTargetInfoSpecResponseV2) - kMissingServerPairsLength, updated_target_info.size()); ASSERT_EQ(0, memcmp(test::kExpectedTargetInfoSpecResponseV2 +
diff --git a/net/proxy_resolution/pac_file_fetcher_impl.cc b/net/proxy_resolution/pac_file_fetcher_impl.cc index 673dfd0..33bc9d7 100644 --- a/net/proxy_resolution/pac_file_fetcher_impl.cc +++ b/net/proxy_resolution/pac_file_fetcher_impl.cc
@@ -6,7 +6,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/ptr_util.h" @@ -54,7 +53,7 @@ static const char* const kSupportedPacMimeTypes[] = { "application/x-ns-proxy-autoconfig", "application/x-javascript-config", }; - for (size_t i = 0; i < base::size(kSupportedPacMimeTypes); ++i) { + for (size_t i = 0; i < std::size(kSupportedPacMimeTypes); ++i) { if (base::LowerCaseEqualsASCII(mime_type, kSupportedPacMimeTypes[i])) return true; }
diff --git a/net/proxy_resolution/proxy_bypass_rules_unittest.cc b/net/proxy_resolution/proxy_bypass_rules_unittest.cc index 5a2b253..91e7e8d 100644 --- a/net/proxy_resolution/proxy_bypass_rules_unittest.cc +++ b/net/proxy_resolution/proxy_bypass_rules_unittest.cc
@@ -4,7 +4,6 @@ #include "net/proxy_resolution/proxy_bypass_rules.h" -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "build/build_config.h" #include "net/proxy_resolution/proxy_config_service_common_unittest.h" @@ -68,7 +67,7 @@ #endif }; - ExpectRulesMatch(rules, kHosts, base::size(kHosts), bypasses, inverted_hosts); + ExpectRulesMatch(rules, kHosts, std::size(kHosts), bypasses, inverted_hosts); } // Tests calling |rules.Matches()| for link-local URLs returns |bypasses|. @@ -78,7 +77,7 @@ "[fe91::1]", "[::ffff:169.254.3.2]", }; - ExpectRulesMatch(rules, kHosts, base::size(kHosts), bypasses, {}); + ExpectRulesMatch(rules, kHosts, std::size(kHosts), bypasses, {}); } // Tests calling |rules.Matches()| with miscelaneous URLs that are neither @@ -106,7 +105,7 @@ #endif }; - ExpectRulesMatch(rules, kHosts, base::size(kHosts), bypasses, inverted_hosts); + ExpectRulesMatch(rules, kHosts, std::size(kHosts), bypasses, inverted_hosts); } TEST(ProxyBypassRulesTest, ParseAndMatchBasicHost) {
diff --git a/net/proxy_resolution/proxy_config_service_linux_unittest.cc b/net/proxy_resolution/proxy_config_service_linux_unittest.cc index a7a639f..6ab7a1c 100644 --- a/net/proxy_resolution/proxy_config_service_linux_unittest.cc +++ b/net/proxy_resolution/proxy_config_service_linux_unittest.cc
@@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/check.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/format_macros.h" @@ -752,7 +751,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "] %s", i, tests[i].description.c_str())); std::unique_ptr<MockEnvironment> env(new MockEnvironment); @@ -1081,7 +1080,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "] %s", i, tests[i].description.c_str())); std::unique_ptr<MockEnvironment> env(new MockEnvironment); @@ -1692,7 +1691,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "] %s", i, tests[i].description.c_str())); std::unique_ptr<MockEnvironment> env(new MockEnvironment);
diff --git a/net/proxy_resolution/proxy_config_unittest.cc b/net/proxy_resolution/proxy_config_unittest.cc index a19b17b..d4d43aa 100644 --- a/net/proxy_resolution/proxy_config_unittest.cc +++ b/net/proxy_resolution/proxy_config_unittest.cc
@@ -3,7 +3,7 @@ // found in the LICENSE file. #include "net/proxy_resolution/proxy_config.h" -#include "base/cxx17_backports.h" + #include "base/json/json_writer.h" #include "base/values.h" #include "net/base/proxy_string_util.h" @@ -436,7 +436,7 @@ ProxyConfig config; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { config.proxy_rules().ParseFromString(tests[i].proxy_rules); EXPECT_EQ(tests[i].type, config.proxy_rules().type);
diff --git a/net/proxy_resolution/proxy_list_unittest.cc b/net/proxy_resolution/proxy_list_unittest.cc index deeb732..c198469 100644 --- a/net/proxy_resolution/proxy_list_unittest.cc +++ b/net/proxy_resolution/proxy_list_unittest.cc
@@ -6,7 +6,6 @@ #include <vector> -#include "base/cxx17_backports.h" #include "net/base/net_errors.h" #include "net/base/proxy_server.h" #include "net/base/proxy_string_util.h" @@ -66,7 +65,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { ProxyList list; list.SetFromPacString(tests[i].pac_input); EXPECT_EQ(tests[i].pac_output, list.ToPacString()); @@ -92,7 +91,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { ProxyList list; list.SetFromPacString(tests[i].pac_input); list.RemoveProxiesWithoutScheme(tests[i].filter);
diff --git a/net/proxy_resolution/win/proxy_config_service_win_unittest.cc b/net/proxy_resolution/win/proxy_config_service_win_unittest.cc index b5b7740b..25cd518 100644 --- a/net/proxy_resolution/win/proxy_config_service_win_unittest.cc +++ b/net/proxy_resolution/win/proxy_config_service_win_unittest.cc
@@ -4,7 +4,6 @@ #include "net/proxy_resolution/win/proxy_config_service_win.h" -#include "base/cxx17_backports.h" #include "net/base/net_errors.h" #include "net/proxy_resolution/proxy_config.h" #include "net/proxy_resolution/proxy_config_service_common_unittest.h" @@ -206,7 +205,7 @@ }, }; - for (size_t i = 0; i < base::size(tests); ++i) { + for (size_t i = 0; i < std::size(tests); ++i) { WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ie_config = { tests[i].ie_config.auto_detect, const_cast<wchar_t*>(tests[i].ie_config.auto_config_url),
diff --git a/net/quic/quic_chromium_client_stream_test.cc b/net/quic/quic_chromium_client_stream_test.cc index 0325562..31f0d5e 100644 --- a/net/quic/quic_chromium_client_stream_test.cc +++ b/net/quic/quic_chromium_client_stream_test.cc
@@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" @@ -334,7 +333,7 @@ handle_->OnFinRead(); const char kData1[] = "hello world"; - const size_t kDataLen = base::size(kData1); + const size_t kDataLen = std::size(kData1); // All data written. std::string header = ConstructDataHeader(kDataLen); @@ -750,7 +749,7 @@ TEST_P(QuicChromiumClientStreamTest, WriteStreamData) { testing::InSequence seq; const char kData1[] = "hello world"; - const size_t kDataLen = base::size(kData1); + const size_t kDataLen = std::size(kData1); // All data written. if (version_.HasIetfQuicFrames()) { @@ -770,7 +769,7 @@ TEST_P(QuicChromiumClientStreamTest, WriteStreamDataAsync) { testing::InSequence seq; const char kData1[] = "hello world"; - const size_t kDataLen = base::size(kData1); + const size_t kDataLen = std::size(kData1); // No data written. EXPECT_CALL(session_, @@ -942,7 +941,7 @@ base::RunLoop().RunUntilIdle(); // Now explicitly read the data. - int data_len = base::size(data) - 1; + int data_len = std::size(data) - 1; scoped_refptr<IOBuffer> buffer = base::MakeRefCounted<IOBuffer>(data_len + 1); ASSERT_EQ(data_len, stream2->Read(buffer.get(), data_len + 1)); EXPECT_EQ(absl::string_view(data),
diff --git a/net/quic/quic_stream_factory_test.cc b/net/quic/quic_stream_factory_test.cc index cc567d2..1ebb2a3 100644 --- a/net/quic/quic_stream_factory_test.cc +++ b/net/quic/quic_stream_factory_test.cc
@@ -1560,7 +1560,7 @@ // For each server, set up and tear down a QUIC session cleanly, and check // that stats have been added to HttpServerProperties using the correct // NetworkIsolationKey. - for (size_t i = 0; i < base::size(kNetworkIsolationKeys); ++i) { + for (size_t i = 0; i < std::size(kNetworkIsolationKeys); ++i) { SCOPED_TRACE(i); ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); @@ -1607,7 +1607,7 @@ EXPECT_TRUE(socket_data.AllReadDataConsumed()); EXPECT_TRUE(socket_data.AllWriteDataConsumed()); - for (size_t j = 0; j < base::size(kNetworkIsolationKeys); ++j) { + for (size_t j = 0; j < std::size(kNetworkIsolationKeys); ++j) { // Stats up to kNetworkIsolationKeys[j] should have been populated, all // others should remain empty. if (j <= i) { @@ -1628,7 +1628,7 @@ // For each server, simulate an error during session creation, and check that // stats have been deleted from HttpServerProperties using the correct // NetworkIsolationKey. - for (size_t i = 0; i < base::size(kNetworkIsolationKeys); ++i) { + for (size_t i = 0; i < std::size(kNetworkIsolationKeys); ++i) { SCOPED_TRACE(i); MockQuicData socket_data(version_); @@ -1650,7 +1650,7 @@ EXPECT_FALSE(HasActiveSession(scheme_host_port_, kNetworkIsolationKeys[i])); - for (size_t j = 0; j < base::size(kNetworkIsolationKeys); ++j) { + for (size_t j = 0; j < std::size(kNetworkIsolationKeys); ++j) { // Stats up to kNetworkIsolationKeys[j] should have been deleted, all // others should still be populated. if (j <= i) {
diff --git a/net/quiche/common/platform/impl/quiche_command_line_flags_test.cc b/net/quiche/common/platform/impl/quiche_command_line_flags_test.cc index 056922e1..81d1a7e 100644 --- a/net/quiche/common/platform/impl/quiche_command_line_flags_test.cc +++ b/net/quiche/common/platform/impl/quiche_command_line_flags_test.cc
@@ -2,12 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "net/third_party/quiche/src/common/platform/api/quiche_command_line_flags.h" - #include <string> #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/strings/strcat.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" @@ -66,8 +63,8 @@ TEST_F(QuicheCommandLineFlagTest, NotSpecified) { const char* argv[]{"one", "two", "three"}; - auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + auto parse_result = QuicheParseCommandLineFlagsForTest("usage message", + std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); std::vector<std::string> expected_args{"two", "three"}; EXPECT_EQ(expected_args, parse_result.non_flag_args); @@ -83,7 +80,7 @@ SetQuicheFlag(FLAGS_foo, false); const char* argv[]{"argv0", s}; auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); EXPECT_TRUE(parse_result.non_flag_args.empty()); EXPECT_TRUE(GetQuicheFlag(FLAGS_foo)); @@ -94,7 +91,7 @@ SetQuicheFlag(FLAGS_foo, true); const char* argv[]{"argv0", s}; auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); EXPECT_TRUE(parse_result.non_flag_args.empty()); EXPECT_FALSE(GetQuicheFlag(FLAGS_foo)); @@ -106,7 +103,7 @@ testing::internal::CaptureStderr(); auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); std::string captured_stderr = testing::internal::GetCapturedStderr(); EXPECT_TRUE(parse_result.exit_status.has_value()); @@ -124,7 +121,7 @@ std::string flag_str = base::StringPrintf("--bar=%d", i); const char* argv[]{"argv0", flag_str.c_str()}; auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); EXPECT_TRUE(parse_result.non_flag_args.empty()); EXPECT_EQ(i, GetQuicheFlag(FLAGS_bar)); @@ -136,7 +133,7 @@ testing::internal::CaptureStderr(); auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); std::string captured_stderr = testing::internal::GetCapturedStderr(); EXPECT_TRUE(parse_result.exit_status.has_value()); @@ -153,7 +150,7 @@ SetQuicheFlag(FLAGS_baz, "whee"); const char* argv[]{"argv0", "--baz"}; auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); EXPECT_TRUE(parse_result.non_flag_args.empty()); EXPECT_EQ("", GetQuicheFlag(FLAGS_baz)); @@ -164,7 +161,7 @@ std::string flag_str = base::StrCat({"--baz=", s}); const char* argv[]{"argv0", flag_str.c_str()}; auto parse_result = QuicheParseCommandLineFlagsForTest( - "usage message", base::size(argv), argv); + "usage message", std::size(argv), argv); EXPECT_FALSE(parse_result.exit_status.has_value()); EXPECT_TRUE(parse_result.non_flag_args.empty()); EXPECT_EQ(s, GetQuicheFlag(FLAGS_baz));
diff --git a/net/socket/client_socket_pool_base_unittest.cc b/net/socket/client_socket_pool_base_unittest.cc index 548c1ca84..83d4df8 100644 --- a/net/socket/client_socket_pool_base_unittest.cc +++ b/net/socket/client_socket_pool_base_unittest.cc
@@ -2,10 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/memory/raw_ptr.h" -#include "net/socket/transport_client_socket_pool.h" - #include <stdint.h> + #include <utility> #include <vector> @@ -13,8 +11,8 @@ #include "base/callback.h" #include "base/callback_helpers.h" #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/location.h" +#include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/notreached.h" @@ -57,6 +55,7 @@ #include "net/socket/socket_test_util.h" #include "net/socket/ssl_client_socket.h" #include "net/socket/stream_socket.h" +#include "net/socket/transport_client_socket_pool.h" #include "net/socket/transport_connect_job.h" #include "net/ssl/ssl_cert_request_info.h" #include "net/test/gtest_util.h" @@ -1277,7 +1276,7 @@ pool_.get(), NetLogWithSource())); ClientSocketHandle handles[4]; - for (size_t i = 0; i < base::size(handles); ++i) { + for (size_t i = 0; i < std::size(handles); ++i) { EXPECT_EQ(ERR_IO_PENDING, handles[i].Init( TestGroupId("b"), params_, absl::nullopt, DEFAULT_PRIORITY, @@ -1289,7 +1288,7 @@ // One will be stalled, cancel all the handles now. // This should hit the OnAvailableSocketSlot() code where we previously had // stalled groups, but no longer have any. - for (size_t i = 0; i < base::size(handles); ++i) + for (size_t i = 0; i < std::size(handles); ++i) handles[i].Reset(); }
diff --git a/net/socket/client_socket_pool_manager.cc b/net/socket/client_socket_pool_manager.cc index f9156b7..b41e79e 100644 --- a/net/socket/client_socket_pool_manager.cc +++ b/net/socket/client_socket_pool_manager.cc
@@ -8,7 +8,6 @@ #include <utility> #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/metrics/field_trial_params.h" #include "base/strings/string_piece.h" #include "build/build_config.h" @@ -36,7 +35,7 @@ 256 // WEBSOCKET_SOCKET_POOL }; -static_assert(base::size(g_max_sockets_per_pool) == +static_assert(std::size(g_max_sockets_per_pool) == HttpNetworkSession::NUM_SOCKET_POOL_TYPES, "max sockets per pool length mismatch"); @@ -53,7 +52,7 @@ 255 // WEBSOCKET_SOCKET_POOL }; -static_assert(base::size(g_max_sockets_per_group) == +static_assert(std::size(g_max_sockets_per_group) == HttpNetworkSession::NUM_SOCKET_POOL_TYPES, "max sockets per group length mismatch"); @@ -65,7 +64,7 @@ kDefaultMaxSocketsPerProxyServer // WEBSOCKET_SOCKET_POOL }; -static_assert(base::size(g_max_sockets_per_proxy_server) == +static_assert(std::size(g_max_sockets_per_proxy_server) == HttpNetworkSession::NUM_SOCKET_POOL_TYPES, "max sockets per proxy server length mismatch");
diff --git a/net/socket/sequenced_socket_data_unittest.cc b/net/socket/sequenced_socket_data_unittest.cc index 32fbd495..b8905f3 100644 --- a/net/socket/sequenced_socket_data_unittest.cc +++ b/net/socket/sequenced_socket_data_unittest.cc
@@ -6,7 +6,6 @@ #include <string> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" @@ -33,13 +32,13 @@ namespace { const char kMsg1[] = "\0hello!\xff"; -const int kLen1 = base::size(kMsg1); +const int kLen1 = std::size(kMsg1); const char kMsg2[] = "\0a2345678\0"; -const int kLen2 = base::size(kMsg2); +const int kLen2 = std::size(kMsg2); const char kMsg3[] = "bye!"; -const int kLen3 = base::size(kMsg3); +const int kLen3 = std::size(kMsg3); const char kMsg4[] = "supercalifragilisticexpialidocious"; -const int kLen4 = base::size(kMsg4); +const int kLen4 = std::size(kMsg4); // Helper class for starting the next operation operation reentrantly after the // previous operation completed asynchronously. When OnIOComplete is called, @@ -660,7 +659,7 @@ "Expected: (data.length()) >= (expected_data.length())", "Value of: actual_data == expected_data\n Actual: false\nExpected: true", "Expected equality of these values:\n rv"}; - ASSERT_EQ(base::size(kExpectedFailures), + ASSERT_EQ(std::size(kExpectedFailures), static_cast<size_t>(gtest_failures.size())); for (int i = 0; i < gtest_failures.size(); ++i) {
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index 6d7271b..7590ee9 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc
@@ -17,7 +17,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/location.h" #include "base/logging.h" @@ -304,10 +303,16 @@ // Not using mock writes; succeed synchronously. return MockWriteResult(SYNCHRONOUS, data.length()); } - EXPECT_FALSE(helper_.AllWriteDataConsumed()) - << "No more mock data to match write:\nFormatted write data:\n" - << printer_->PrintWrite(data) << "Raw write data:\n" - << HexDump(data); + if (printer_) { + EXPECT_FALSE(helper_.AllWriteDataConsumed()) + << "No more mock data to match write:\nFormatted write data:\n" + << printer_->PrintWrite(data) << "Raw write data:\n" + << HexDump(data); + } else { + EXPECT_FALSE(helper_.AllWriteDataConsumed()) + << "No more mock data to match write:\nRaw write data:\n" + << HexDump(data); + } if (helper_.AllWriteDataConsumed()) { return MockWriteResult(SYNCHRONOUS, ERR_UNEXPECTED); } @@ -488,10 +493,16 @@ MockWriteResult SequencedSocketData::OnWrite(const std::string& data) { CHECK_EQ(IoState::kIdle, write_state_); - CHECK(!helper_.AllWriteDataConsumed()) - << "\nNo more mock data to match write:\nFormatted write data:\n" - << printer_->PrintWrite(data) << "Raw write data:\n" - << HexDump(data); + if (printer_) { + CHECK(!helper_.AllWriteDataConsumed()) + << "\nNo more mock data to match write:\nFormatted write data:\n" + << printer_->PrintWrite(data) << "Raw write data:\n" + << HexDump(data); + } else { + CHECK(!helper_.AllWriteDataConsumed()) + << "\nNo more mock data to match write:\nRaw write data:\n" + << HexDump(data); + } NET_TRACE(1, " *** ") << "sequence_number: " << sequence_number_; const MockWrite& next_write = helper_.PeekWrite(); @@ -2204,27 +2215,27 @@ const char kSOCKS4OkRequestLocalHostPort80[] = {0x04, 0x01, 0x00, 0x50, 127, 0, 0, 1, 0}; const int kSOCKS4OkRequestLocalHostPort80Length = - base::size(kSOCKS4OkRequestLocalHostPort80); + std::size(kSOCKS4OkRequestLocalHostPort80); const char kSOCKS4OkReply[] = {0x00, 0x5A, 0x00, 0x00, 0, 0, 0, 0}; -const int kSOCKS4OkReplyLength = base::size(kSOCKS4OkReply); +const int kSOCKS4OkReplyLength = std::size(kSOCKS4OkReply); const char kSOCKS5TestHost[] = "host"; const int kSOCKS5TestPort = 80; const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; -const int kSOCKS5GreetRequestLength = base::size(kSOCKS5GreetRequest); +const int kSOCKS5GreetRequestLength = std::size(kSOCKS5GreetRequest); const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; -const int kSOCKS5GreetResponseLength = base::size(kSOCKS5GreetResponse); +const int kSOCKS5GreetResponseLength = std::size(kSOCKS5GreetResponse); const char kSOCKS5OkRequest[] = { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; -const int kSOCKS5OkRequestLength = base::size(kSOCKS5OkRequest); +const int kSOCKS5OkRequestLength = std::size(kSOCKS5OkRequest); const char kSOCKS5OkResponse[] = { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; -const int kSOCKS5OkResponseLength = base::size(kSOCKS5OkResponse); +const int kSOCKS5OkResponseLength = std::size(kSOCKS5OkResponse); int64_t CountReadBytes(base::span<const MockRead> reads) { int64_t total = 0;
diff --git a/net/socket/socks5_client_socket.cc b/net/socket/socks5_client_socket.cc index 0390ad8..eeee9a39 100644 --- a/net/socket/socks5_client_socket.cc +++ b/net/socket/socks5_client_socket.cc
@@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/format_macros.h" #include "base/strings/string_util.h" #include "base/sys_byteorder.h" @@ -280,7 +279,7 @@ if (buffer_.empty()) { buffer_ = - std::string(kSOCKS5GreetWriteData, base::size(kSOCKS5GreetWriteData)); + std::string(kSOCKS5GreetWriteData, std::size(kSOCKS5GreetWriteData)); bytes_sent_ = 0; }
diff --git a/net/socket/socks5_client_socket_unittest.cc b/net/socket/socks5_client_socket_unittest.cc index a24f913..613d267 100644 --- a/net/socket/socks5_client_socket_unittest.cc +++ b/net/socket/socks5_client_socket_unittest.cc
@@ -11,7 +11,6 @@ #include <utility> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/sys_byteorder.h" @@ -126,7 +125,7 @@ MockWrite data_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), - MockWrite(ASYNC, kOkRequest, base::size(kOkRequest)), + MockWrite(ASYNC, kOkRequest, std::size(kOkRequest)), MockWrite(ASYNC, payload_write.data(), payload_write.size())}; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS5GreetResponse, kSOCKS5GreetResponseLength), @@ -189,7 +188,7 @@ 0x03, // ATYPE }; - std::string request(kSOCKS5DomainRequest, base::size(kSOCKS5DomainRequest)); + std::string request(kSOCKS5DomainRequest, std::size(kSOCKS5DomainRequest)); request.push_back(static_cast<char>(hostname.size())); request.append(hostname); request.append(reinterpret_cast<const char*>(&kNwPort), sizeof(kNwPort)); @@ -254,9 +253,9 @@ const char partial1[] = { 0x05, 0x01 }; const char partial2[] = { 0x00 }; MockWrite data_writes[] = { - MockWrite(ASYNC, partial1, base::size(partial1)), - MockWrite(ASYNC, partial2, base::size(partial2)), - MockWrite(ASYNC, kOkRequest, base::size(kOkRequest))}; + MockWrite(ASYNC, partial1, std::size(partial1)), + MockWrite(ASYNC, partial2, std::size(partial2)), + MockWrite(ASYNC, kOkRequest, std::size(kOkRequest))}; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS5GreetResponse, kSOCKS5GreetResponseLength), MockRead(ASYNC, kSOCKS5OkResponse, kSOCKS5OkResponseLength) }; @@ -284,10 +283,10 @@ const char partial2[] = { 0x00 }; MockWrite data_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), - MockWrite(ASYNC, kOkRequest, base::size(kOkRequest))}; + MockWrite(ASYNC, kOkRequest, std::size(kOkRequest))}; MockRead data_reads[] = { - MockRead(ASYNC, partial1, base::size(partial1)), - MockRead(ASYNC, partial2, base::size(partial2)), + MockRead(ASYNC, partial1, std::size(partial1)), + MockRead(ASYNC, partial2, std::size(partial2)), MockRead(ASYNC, kSOCKS5OkResponse, kSOCKS5OkResponseLength)}; user_sock_ = BuildMockSocket(data_reads, data_writes, hostname, 80, NetLog::Get()); @@ -312,7 +311,7 @@ MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), MockWrite(ASYNC, kOkRequest, kSplitPoint), MockWrite(ASYNC, kOkRequest + kSplitPoint, - base::size(kOkRequest) - kSplitPoint)}; + std::size(kOkRequest) - kSplitPoint)}; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS5GreetResponse, kSOCKS5GreetResponseLength), MockRead(ASYNC, kSOCKS5OkResponse, kSOCKS5OkResponseLength) }; @@ -336,7 +335,7 @@ const int kSplitPoint = 6; // Break the handshake read into two parts. MockWrite data_writes[] = { MockWrite(ASYNC, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), - MockWrite(ASYNC, kOkRequest, base::size(kOkRequest))}; + MockWrite(ASYNC, kOkRequest, std::size(kOkRequest))}; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS5GreetResponse, kSOCKS5GreetResponseLength), MockRead(ASYNC, kSOCKS5OkResponse, kSplitPoint),
diff --git a/net/socket/socks_client_socket.cc b/net/socket/socks_client_socket.cc index b5aeef3..16d1ea5b 100644 --- a/net/socket/socks_client_socket.cc +++ b/net/socket/socks_client_socket.cc
@@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/sys_byteorder.h" #include "net/base/io_buffer.h" #include "net/dns/public/dns_query_type.h" @@ -357,7 +356,7 @@ std::string handshake_data(reinterpret_cast<char*>(&request), sizeof(request)); - handshake_data.append(kEmptyUserId, base::size(kEmptyUserId)); + handshake_data.append(kEmptyUserId, std::size(kEmptyUserId)); return handshake_data; }
diff --git a/net/socket/socks_client_socket_unittest.cc b/net/socket/socks_client_socket_unittest.cc index 6d0e517..df7e47a1 100644 --- a/net/socket/socks_client_socket_unittest.cc +++ b/net/socket/socks_client_socket_unittest.cc
@@ -8,7 +8,6 @@ #include <utility> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "build/build_config.h" #include "net/base/address_list.h" @@ -232,7 +231,7 @@ MockWrite(SYNCHRONOUS, kSOCKS4OkRequestLocalHostPort80, kSOCKS4OkRequestLocalHostPort80Length)}; MockRead data_reads[] = { - MockRead(SYNCHRONOUS, test.fail_reply, base::size(test.fail_reply))}; + MockRead(SYNCHRONOUS, test.fail_reply, std::size(test.fail_reply))}; RecordingNetLogObserver log_observer; user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(), @@ -264,8 +263,8 @@ MockWrite data_writes[] = {MockWrite(ASYNC, kSOCKS4OkRequestLocalHostPort80, kSOCKS4OkRequestLocalHostPort80Length)}; MockRead data_reads[] = { - MockRead(ASYNC, kSOCKSPartialReply1, base::size(kSOCKSPartialReply1)), - MockRead(ASYNC, kSOCKSPartialReply2, base::size(kSOCKSPartialReply2))}; + MockRead(ASYNC, kSOCKSPartialReply1, std::size(kSOCKSPartialReply1)), + MockRead(ASYNC, kSOCKSPartialReply2, std::size(kSOCKSPartialReply2))}; RecordingNetLogObserver log_observer; user_sock_ = BuildMockSocket(data_reads, data_writes, host_resolver_.get(), @@ -291,12 +290,11 @@ const char kSOCKSPartialRequest2[] = { 0x00, 0x50, 127, 0, 0, 1, 0 }; MockWrite data_writes[] = { - MockWrite(ASYNC, kSOCKSPartialRequest1, - base::size(kSOCKSPartialRequest1)), + MockWrite(ASYNC, kSOCKSPartialRequest1, std::size(kSOCKSPartialRequest1)), // simulate some empty writes - MockWrite(ASYNC, 0), MockWrite(ASYNC, 0), - MockWrite(ASYNC, kSOCKSPartialRequest2, - base::size(kSOCKSPartialRequest2)), + MockWrite(ASYNC, 0), + MockWrite(ASYNC, 0), + MockWrite(ASYNC, kSOCKSPartialRequest2, std::size(kSOCKSPartialRequest2)), }; MockRead data_reads[] = { MockRead(ASYNC, kSOCKS4OkReply, kSOCKS4OkReplyLength)};
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc index 78e30e2..c1bab0ed 100644 --- a/net/socket/ssl_client_socket_impl.cc +++ b/net/socket/ssl_client_socket_impl.cc
@@ -16,7 +16,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/feature_list.h" #include "base/lazy_instance.h" #include "base/location.h" @@ -783,7 +782,7 @@ IsCECPQ2Host(host_and_port_.host())))) { static const int kCurves[] = {NID_CECPQ2, NID_X25519, NID_X9_62_prime256v1, NID_secp384r1}; - if (!SSL_set1_curves(ssl_.get(), kCurves, base::size(kCurves))) { + if (!SSL_set1_curves(ssl_.get(), kCurves, std::size(kCurves))) { return ERR_UNEXPECTED; } } @@ -881,7 +880,7 @@ SSL_SIGN_RSA_PSS_RSAE_SHA512, SSL_SIGN_RSA_PKCS1_SHA512, }; if (!SSL_set_verify_algorithm_prefs(ssl_.get(), kVerifyPrefs, - base::size(kVerifyPrefs))) { + std::size(kVerifyPrefs))) { return ERR_UNEXPECTED; } }
diff --git a/net/socket/ssl_client_socket_unittest.cc b/net/socket/ssl_client_socket_unittest.cc index 5b51cd4..d99c424 100644 --- a/net/socket/ssl_client_socket_unittest.cc +++ b/net/socket/ssl_client_socket_unittest.cc
@@ -14,7 +14,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/location.h" #include "base/memory/raw_ptr.h" @@ -1188,7 +1187,7 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; static const int kRequestTextSize = - static_cast<int>(base::size(request_text) - 1); + static_cast<int>(std::size(request_text) - 1); scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestTextSize); memcpy(request_buffer->data(), request_text, kRequestTextSize); @@ -1671,13 +1670,13 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; scoped_refptr<IOBuffer> request_buffer = - base::MakeRefCounted<IOBuffer>(base::size(request_text) - 1); - memcpy(request_buffer->data(), request_text, base::size(request_text) - 1); + base::MakeRefCounted<IOBuffer>(std::size(request_text) - 1); + memcpy(request_buffer->data(), request_text, std::size(request_text) - 1); rv = callback.GetResult( - sock->Write(request_buffer.get(), base::size(request_text) - 1, + sock->Write(request_buffer.get(), std::size(request_text) - 1, callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS)); - EXPECT_EQ(static_cast<int>(base::size(request_text) - 1), rv); + EXPECT_EQ(static_cast<int>(std::size(request_text) - 1), rv); scoped_refptr<IOBuffer> buf = base::MakeRefCounted<IOBuffer>(4096); int64_t unencrypted_bytes_read = 0; @@ -1754,7 +1753,7 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; static const int kRequestTextSize = - static_cast<int>(base::size(request_text) - 1); + static_cast<int>(std::size(request_text) - 1); scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestTextSize); memcpy(request_buffer->data(), request_text, kRequestTextSize); @@ -1807,7 +1806,7 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; static const int kRequestTextSize = - static_cast<int>(base::size(request_text) - 1); + static_cast<int>(std::size(request_text) - 1); scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestTextSize); memcpy(request_buffer->data(), request_text, kRequestTextSize); @@ -1875,7 +1874,7 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; static const int kRequestTextSize = - static_cast<int>(base::size(request_text) - 1); + static_cast<int>(std::size(request_text) - 1); scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestTextSize); memcpy(request_buffer->data(), request_text, kRequestTextSize); @@ -2060,7 +2059,7 @@ // Send a request so there is something to read from the socket. const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; static const int kRequestTextSize = - static_cast<int>(base::size(request_text) - 1); + static_cast<int>(std::size(request_text) - 1); scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestTextSize); memcpy(request_buffer->data(), request_text, kRequestTextSize); @@ -2243,14 +2242,14 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; scoped_refptr<IOBuffer> request_buffer = - base::MakeRefCounted<IOBuffer>(base::size(request_text) - 1); - memcpy(request_buffer->data(), request_text, base::size(request_text) - 1); + base::MakeRefCounted<IOBuffer>(std::size(request_text) - 1); + memcpy(request_buffer->data(), request_text, std::size(request_text) - 1); TestCompletionCallback callback; rv = callback.GetResult( - sock_->Write(request_buffer.get(), base::size(request_text) - 1, + sock_->Write(request_buffer.get(), std::size(request_text) - 1, callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS)); - EXPECT_EQ(static_cast<int>(base::size(request_text) - 1), rv); + EXPECT_EQ(static_cast<int>(std::size(request_text) - 1), rv); scoped_refptr<IOBuffer> buf = base::MakeRefCounted<IOBuffer>(1); do { @@ -2284,14 +2283,14 @@ const char request_text[] = "GET /ssl-many-small-records HTTP/1.0\r\n\r\n"; scoped_refptr<IOBuffer> request_buffer = - base::MakeRefCounted<IOBuffer>(base::size(request_text) - 1); - memcpy(request_buffer->data(), request_text, base::size(request_text) - 1); + base::MakeRefCounted<IOBuffer>(std::size(request_text) - 1); + memcpy(request_buffer->data(), request_text, std::size(request_text) - 1); rv = callback.GetResult( - sock->Write(request_buffer.get(), base::size(request_text) - 1, + sock->Write(request_buffer.get(), std::size(request_text) - 1, callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS)); ASSERT_GT(rv, 0); - ASSERT_EQ(static_cast<int>(base::size(request_text) - 1), rv); + ASSERT_EQ(static_cast<int>(std::size(request_text) - 1), rv); // Note: This relies on SSLClientSocketNSS attempting to read up to 17K of // data (the max SSL record size) at a time. Ensure that at least 15K worth @@ -2319,14 +2318,14 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; scoped_refptr<IOBuffer> request_buffer = - base::MakeRefCounted<IOBuffer>(base::size(request_text) - 1); - memcpy(request_buffer->data(), request_text, base::size(request_text) - 1); + base::MakeRefCounted<IOBuffer>(std::size(request_text) - 1); + memcpy(request_buffer->data(), request_text, std::size(request_text) - 1); TestCompletionCallback callback; rv = callback.GetResult( - sock_->Write(request_buffer.get(), base::size(request_text) - 1, + sock_->Write(request_buffer.get(), std::size(request_text) - 1, callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS)); - EXPECT_EQ(static_cast<int>(base::size(request_text) - 1), rv); + EXPECT_EQ(static_cast<int>(std::size(request_text) - 1), rv); // Do a partial read and then exit. This test should not crash! scoped_refptr<IOBuffer> buf = base::MakeRefCounted<IOBuffer>(512); @@ -2354,13 +2353,13 @@ const char request_text[] = "GET / HTTP/1.0\r\n\r\n"; scoped_refptr<IOBuffer> request_buffer = - base::MakeRefCounted<IOBuffer>(base::size(request_text) - 1); - memcpy(request_buffer->data(), request_text, base::size(request_text) - 1); + base::MakeRefCounted<IOBuffer>(std::size(request_text) - 1); + memcpy(request_buffer->data(), request_text, std::size(request_text) - 1); rv = callback.GetResult( - sock->Write(request_buffer.get(), base::size(request_text) - 1, + sock->Write(request_buffer.get(), std::size(request_text) - 1, callback.callback(), TRAFFIC_ANNOTATION_FOR_TESTS)); - EXPECT_EQ(static_cast<int>(base::size(request_text) - 1), rv); + EXPECT_EQ(static_cast<int>(std::size(request_text) - 1), rv); auto entries = log_observer_.GetEntries(); size_t last_index = ExpectLogContainsSomewhereAfter( @@ -2401,7 +2400,7 @@ // All reads and writes complete synchronously (async=false). MockRead data_reads[] = { MockRead(SYNCHRONOUS, reinterpret_cast<const char*>(application_data), - base::size(application_data)), + std::size(application_data)), MockRead(SYNCHRONOUS, OK), }; @@ -2902,7 +2901,7 @@ EXPECT_FALSE(sock_->WasEverUsed()); const char kRequestText[] = "GET / HTTP/1.0\r\n\r\n"; - const size_t kRequestLen = base::size(kRequestText) - 1; + const size_t kRequestLen = std::size(kRequestText) - 1; scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestLen); memcpy(request_buffer->data(), kRequestText, kRequestLen); @@ -2975,7 +2974,7 @@ // Write a partial HTTP request. const char kRequestText[] = "GET / HTTP/1.0"; - const size_t kRequestLen = base::size(kRequestText) - 1; + const size_t kRequestLen = std::size(kRequestText) - 1; scoped_refptr<IOBuffer> request_buffer = base::MakeRefCounted<IOBuffer>(kRequestLen); memcpy(request_buffer->data(), kRequestText, kRequestLen);
diff --git a/net/socket/ssl_connect_job_unittest.cc b/net/socket/ssl_connect_job_unittest.cc index e324d6b0..6b908b3a 100644 --- a/net/socket/ssl_connect_job_unittest.cc +++ b/net/socket/ssl_connect_job_unittest.cc
@@ -9,7 +9,6 @@ #include "base/callback.h" #include "base/compiler_specific.h" -#include "base/cxx17_backports.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/test/metrics/histogram_tester.h" @@ -611,7 +610,7 @@ {SSLLegacyCryptoFallback::kSentSHA1Cert, ERR_SSL_PROTOCOL_ERROR, kModernCipher, SSL_SIGN_RSA_PSS_RSAE_SHA256, ok_with_unused_sha1}, }; - for (size_t i = 0; i < base::size(kHistogramTests); i++) { + for (size_t i = 0; i < std::size(kHistogramTests); i++) { SCOPED_TRACE(i); const auto& test = kHistogramTests[i]; @@ -733,7 +732,7 @@ MockWrite writes[] = { MockWrite(io_mode, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength), MockWrite(io_mode, reinterpret_cast<const char*>(kSOCKS5Request), - base::size(kSOCKS5Request)), + std::size(kSOCKS5Request)), }; MockRead reads[] = { @@ -768,7 +767,7 @@ MockWrite writes[] = { MockWrite(SYNCHRONOUS, kSOCKS5GreetRequest, kSOCKS5GreetRequestLength, 0), MockWrite(SYNCHRONOUS, reinterpret_cast<const char*>(kSOCKS5Request), - base::size(kSOCKS5Request), 3), + std::size(kSOCKS5Request), 3), }; MockRead reads[] = {
diff --git a/net/socket/ssl_server_socket_unittest.cc b/net/socket/ssl_server_socket_unittest.cc index 47571e2..92fb42d 100644 --- a/net/socket/ssl_server_socket_unittest.cc +++ b/net/socket/ssl_server_socket_unittest.cc
@@ -26,7 +26,6 @@ #include "base/check.h" #include "base/compiler_specific.h" #include "base/containers/queue.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/location.h" @@ -1206,7 +1205,7 @@ }; SSLContextConfig config; config.disabled_cipher_suites.assign( - kEcdheCiphers, kEcdheCiphers + base::size(kEcdheCiphers)); + kEcdheCiphers, kEcdheCiphers + std::size(kEcdheCiphers)); // Legacy RSA key exchange ciphers only exist in TLS 1.2 and below. config.version_max = SSL_PROTOCOL_VERSION_TLS1_2; @@ -1286,7 +1285,7 @@ }; SSLContextConfig config; config.disabled_cipher_suites.assign( - kEcdheCiphers, kEcdheCiphers + base::size(kEcdheCiphers)); + kEcdheCiphers, kEcdheCiphers + std::size(kEcdheCiphers)); // TLS 1.3 always works with SSLPrivateKey. config.version_max = SSL_PROTOCOL_VERSION_TLS1_2; ssl_config_service_->UpdateSSLConfigAndNotify(config);
diff --git a/net/socket/transport_client_socket_pool_unittest.cc b/net/socket/transport_client_socket_pool_unittest.cc index aab6ace..9d6af2d 100644 --- a/net/socket/transport_client_socket_pool_unittest.cc +++ b/net/socket/transport_client_socket_pool_unittest.cc
@@ -10,7 +10,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" @@ -1536,7 +1535,7 @@ "NTLM", }; spdy::SpdySerializedFrame connect_auth_resp(spdy_util.ConstructSpdyReplyError( - kAuthStatus, kAuthChallenge, base::size(kAuthChallenge) / 2, 1)); + kAuthStatus, kAuthChallenge, std::size(kAuthChallenge) / 2, 1)); spdy::SpdySerializedFrame reset( spdy_util.ConstructSpdyRstStream(1, spdy::ERROR_CODE_HTTP_1_1_REQUIRED)); MockRead reads[] = {
diff --git a/net/socket/udp_socket_unittest.cc b/net/socket/udp_socket_unittest.cc index 091b58d2..5776be9 100644 --- a/net/socket/udp_socket_unittest.cc +++ b/net/socket/udp_socket_unittest.cc
@@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/containers/circular_deque.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" @@ -505,7 +504,7 @@ {"2001:db8:0::42", "::1", true}, #endif }; - for (size_t i = 0; i < base::size(tests); i++) { + for (size_t i = 0; i < std::size(tests); i++) { SCOPED_TRACE(std::string("Connecting from ") + tests[i].local_address + std::string(" to ") + tests[i].remote_address);
diff --git a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc index d36de69..36bd3af 100644 --- a/net/spdy/bidirectional_stream_spdy_impl_unittest.cc +++ b/net/spdy/bidirectional_stream_spdy_impl_unittest.cc
@@ -7,7 +7,6 @@ #include <string> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" @@ -42,7 +41,7 @@ namespace { const char kBodyData[] = "Body data"; -const size_t kBodyDataSize = base::size(kBodyData); +const size_t kBodyDataSize = std::size(kBodyData); // Size of the buffer to be allocated for each read. const size_t kReadBufferSize = 4096; @@ -528,7 +527,7 @@ EXPECT_EQ(CountWriteBytes(base::make_span(writes, 1)), delegate->GetTotalSentBytes()); // Should not count RST stream. - EXPECT_EQ(CountReadBytes(base::make_span(reads).first(base::size(reads) - 2)), + EXPECT_EQ(CountReadBytes(base::make_span(reads).first(std::size(reads) - 2)), delegate->GetTotalReceivedBytes()); // Now call SendData again should produce an error because end of stream
diff --git a/net/spdy/fuzzing/hpack_fuzz_util_test.cc b/net/spdy/fuzzing/hpack_fuzz_util_test.cc index a58f1aa..90425b9 100644 --- a/net/spdy/fuzzing/hpack_fuzz_util_test.cc +++ b/net/spdy/fuzzing/hpack_fuzz_util_test.cc
@@ -7,7 +7,6 @@ #include <map> #include "base/base_paths.h" -#include "base/cxx17_backports.h" #include "base/files/file.h" #include "base/files/file_util.h" #include "base/path_service.h" @@ -69,7 +68,7 @@ "fin"; HpackFuzzUtil::Input input; - input.input.assign(fixture, base::size(fixture) - 1); + input.input.assign(fixture, std::size(fixture) - 1); absl::string_view block; @@ -142,11 +141,11 @@ TEST(HpackFuzzUtilTest, FlipBitsMutatesBuffer) { char buffer[] = "testbuffer1234567890"; - std::string unmodified(buffer, base::size(buffer) - 1); + std::string unmodified(buffer, std::size(buffer) - 1); EXPECT_EQ(unmodified, buffer); HpackFuzzUtil::FlipBits(reinterpret_cast<uint8_t*>(buffer), - base::size(buffer) - 1, 1); + std::size(buffer) - 1, 1); EXPECT_NE(unmodified, buffer); }
diff --git a/net/spdy/spdy_buffer_unittest.cc b/net/spdy/spdy_buffer_unittest.cc index df6bf3a..37e3fbc8 100644 --- a/net/spdy/spdy_buffer_unittest.cc +++ b/net/spdy/spdy_buffer_unittest.cc
@@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "net/base/io_buffer.h" #include "net/third_party/quiche/src/spdy/core/spdy_protocol.h" @@ -22,7 +21,7 @@ namespace { const char kData[] = "hello!\0hi."; -const size_t kDataSize = base::size(kData); +const size_t kDataSize = std::size(kData); class SpdyBufferTest : public ::testing::Test {};
diff --git a/net/spdy/spdy_http_stream_unittest.cc b/net/spdy/spdy_http_stream_unittest.cc index 8ef2510..87633cb 100644 --- a/net/spdy/spdy_http_stream_unittest.cc +++ b/net/spdy/spdy_http_stream_unittest.cc
@@ -10,7 +10,6 @@ #include <string> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/threading/thread_task_runner_handle.h" @@ -602,7 +601,7 @@ // chunk becomes available while a write is pending. TEST_F(SpdyHttpStreamTest, DelayedSendChunkedPost) { const char kUploadData1[] = "12345678"; - const int kUploadData1Size = base::size(kUploadData1) - 1; + const int kUploadData1Size = std::size(kUploadData1) - 1; spdy::SpdySerializedFrame req( spdy_util_.ConstructChunkedSpdyPost(nullptr, 0)); spdy::SpdySerializedFrame chunk1(spdy_util_.ConstructSpdyDataFrame(1, false));
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc index 59afe0c..130c9fb 100644 --- a/net/spdy/spdy_network_transaction_unittest.cc +++ b/net/spdy/spdy_network_transaction_unittest.cc
@@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/raw_ptr.h" @@ -2243,7 +2242,7 @@ "transfer-encoding", "chunked" }; spdy::SpdySerializedFrame push(spdy_util_.ConstructSpdyPush( - headers, base::size(headers) / 2, 2, 1, "https://www.example.org/1")); + headers, std::size(headers) / 2, 2, 1, "https://www.example.org/1")); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); MockRead reads[] = { CreateMockRead(resp, 1), CreateMockRead(push, 2), CreateMockRead(body, 4), @@ -2358,7 +2357,7 @@ CreateMockRead(resp, 1), MockRead(ASYNC, ERR_IO_PENDING, 2), // Force a pause MockRead(ASYNC, reinterpret_cast<const char*>(kGetBodyFrame2), - base::size(kGetBodyFrame2), 3), + std::size(kGetBodyFrame2), 3), MockRead(ASYNC, ERR_IO_PENDING, 4), // Force a pause MockRead(ASYNC, nullptr, 0, 5), // EOF }; @@ -2467,7 +2466,7 @@ const char* const kExtraHeaders[] = {"location", kRedirectUrl}; spdy::SpdySerializedFrame resp0(spdy_util_.ConstructSpdyReplyError( - "301", kExtraHeaders, base::size(kExtraHeaders) / 2, 1)); + "301", kExtraHeaders, std::size(kExtraHeaders) / 2, 1)); MockRead reads0[] = {CreateMockRead(resp0, 1), MockRead(ASYNC, 0, 3)}; SequencedSocketData data0(reads0, writes0); @@ -2635,7 +2634,7 @@ "https://example2.test", }; spdy::SpdySerializedFrame resp(spdy_util_.ConstructSpdyReplyError( - "301", kExtraResponseHeaders, base::size(kExtraResponseHeaders) / 2, + "301", kExtraResponseHeaders, std::size(kExtraResponseHeaders) / 2, kStreamId)); spdy::SpdySerializedFrame body( spdy_util_.ConstructSpdyDataFrame(kStreamId, /*fin=*/true)); @@ -4619,7 +4618,7 @@ 2, {"hello", "bye", "cookie", "val1; val2"}}}; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { SCOPED_TRACE(i); SpdyTestUtil spdy_test_util; spdy::SpdySerializedFrame req( @@ -4673,7 +4672,7 @@ // Response headers with no headers {0, {nullptr}}}; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { SCOPED_TRACE(i); SpdyTestUtil spdy_test_util; @@ -5597,7 +5596,7 @@ // For each server, set up and tear down a QUIC session cleanly, and check // that stats have been added to HttpServerProperties using the correct // NetworkIsolationKey. - for (size_t i = 0; i < base::size(kNetworkIsolationKeys); ++i) { + for (size_t i = 0; i < std::size(kNetworkIsolationKeys); ++i) { SCOPED_TRACE(i); request_.method = "GET"; @@ -5668,7 +5667,7 @@ ASSERT_THAT(ReadTransaction(&trans, &response_data), IsOk()); EXPECT_EQ("hello", response_data); - for (size_t j = 0; j < base::size(kNetworkIsolationKeys); ++j) { + for (size_t j = 0; j < std::size(kNetworkIsolationKeys); ++j) { // NetworkIsolationKeys up to kNetworkIsolationKeys[j] are known to // require HTTP/1.1, others are not. if (j <= i) { @@ -5805,7 +5804,7 @@ std::move(session_deps)); helper.RunPreTestSetup(); - for (size_t i = 0; i < base::size(kNetworkIsolationKeys); ++i) { + for (size_t i = 0; i < std::size(kNetworkIsolationKeys); ++i) { // First socket: HTTP/2 CONNECT rejected with HTTP_1_1_REQUIRED. SpdyTestUtil spdy_util; @@ -5889,7 +5888,7 @@ ASSERT_THAT(ReadTransaction(&trans, &response_data), IsOk()); EXPECT_EQ("hello", response_data); - for (size_t j = 0; j < base::size(kNetworkIsolationKeys); ++j) { + for (size_t j = 0; j < std::size(kNetworkIsolationKeys); ++j) { // The proxy SchemeHostPort URL should not be marked as requiring HTTP/1.1 // using the current NetworkIsolationKey, and the state of others should // be unchanged since the last loop iteration.. @@ -5931,11 +5930,11 @@ spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); MockWrite writes[] = { - MockWrite(SYNCHRONOUS, kConnect443, base::size(kConnect443) - 1, 0), + MockWrite(SYNCHRONOUS, kConnect443, std::size(kConnect443) - 1, 0), CreateMockWrite(req, 2), }; MockRead reads[] = { - MockRead(SYNCHRONOUS, kHTTP200, base::size(kHTTP200) - 1, 1), + MockRead(SYNCHRONOUS, kHTTP200, std::size(kHTTP200) - 1, 1), CreateMockRead(resp, 3), CreateMockRead(body, 4), MockRead(ASYNC, nullptr, 0, 5), @@ -6046,11 +6045,11 @@ spdy::SpdySerializedFrame body2(spdy_util_2.ConstructSpdyDataFrame(1, true)); MockWrite writes2[] = { - MockWrite(SYNCHRONOUS, kConnect443, base::size(kConnect443) - 1, 0), + MockWrite(SYNCHRONOUS, kConnect443, std::size(kConnect443) - 1, 0), CreateMockWrite(req2, 2), }; MockRead reads2[] = { - MockRead(SYNCHRONOUS, kHTTP200, base::size(kHTTP200) - 1, 1), + MockRead(SYNCHRONOUS, kHTTP200, std::size(kHTTP200) - 1, 1), CreateMockRead(resp2, 3), CreateMockRead(body2, 4), MockRead(ASYNC, 0, 5) // EOF }; @@ -6188,7 +6187,7 @@ "authorization", "Basic Zm9vOmJhcg==" }; spdy::SpdySerializedFrame req_get_authorization(spdy_util_.ConstructSpdyGet( - kExtraAuthorizationHeaders, base::size(kExtraAuthorizationHeaders) / 2, 3, + kExtraAuthorizationHeaders, std::size(kExtraAuthorizationHeaders) / 2, 3, LOWEST)); MockWrite spdy_writes[] = { CreateMockWrite(req_get, 0), CreateMockWrite(req_get_authorization, 3), @@ -6204,7 +6203,7 @@ spdy::SpdySerializedFrame resp_authentication( spdy_util_.ConstructSpdyReplyError( "401", kExtraAuthenticationHeaders, - base::size(kExtraAuthenticationHeaders) / 2, 1)); + std::size(kExtraAuthenticationHeaders) / 2, 1)); spdy::SpdySerializedFrame body_authentication( spdy_util_.ConstructSpdyDataFrame(1, true)); spdy::SpdySerializedFrame resp_data( @@ -8495,10 +8494,10 @@ spdy_util_.ConstructSpdyGetReply(nullptr, 0, 1)); spdy::SpdySerializedFrame body(spdy_util_.ConstructSpdyDataFrame(1, true)); MockRead reads[] = {MockRead(ASYNC, origin_frame_on_stream_zero, - base::size(origin_frame_on_stream_zero), 1), + std::size(origin_frame_on_stream_zero), 1), CreateMockRead(resp, 2), MockRead(ASYNC, origin_frame_on_stream_one, - base::size(origin_frame_on_stream_one), 3), + std::size(origin_frame_on_stream_one), 3), CreateMockRead(body, 4), MockRead(ASYNC, 0, 5)}; SequencedSocketData data(reads, writes); @@ -10592,7 +10591,7 @@ 'f', 'o', 'o' // payload }; spdy::SpdySerializedFrame grease(reinterpret_cast<char*>(kRawFrameData), - base::size(kRawFrameData), + std::size(kRawFrameData), /* owns_buffer = */ false); spdy::SpdySerializedFrame empty_body( spdy_util_.ConstructSpdyDataFrame(1, "", true)); @@ -10651,7 +10650,7 @@ 'f', 'o', 'o' // payload }; spdy::SpdySerializedFrame grease(reinterpret_cast<char*>(kRawFrameData), - base::size(kRawFrameData), + std::size(kRawFrameData), /* owns_buffer = */ false); spdy::SpdySerializedFrame request_body( spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -10711,7 +10710,7 @@ 'f', 'o', 'o' // payload }; spdy::SpdySerializedFrame grease(reinterpret_cast<char*>(kRawFrameData), - base::size(kRawFrameData), + std::size(kRawFrameData), /* owns_buffer = */ false); spdy::SpdySerializedFrame request_body( spdy_util_.ConstructSpdyDataFrame(1, true)); @@ -10857,7 +10856,7 @@ 'f', 'o', 'o' // payload }; spdy::SpdySerializedFrame grease(reinterpret_cast<char*>(kRawFrameData), - base::size(kRawFrameData), + std::size(kRawFrameData), /* owns_buffer = */ false); spdy::SpdySerializedFrame empty_body( spdy_util_.ConstructSpdyDataFrame(1, "", true));
diff --git a/net/spdy/spdy_read_queue_unittest.cc b/net/spdy/spdy_read_queue_unittest.cc index edd5d31f..eeee4c2 100644 --- a/net/spdy/spdy_read_queue_unittest.cc +++ b/net/spdy/spdy_read_queue_unittest.cc
@@ -12,7 +12,6 @@ #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "net/spdy/spdy_buffer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -21,7 +20,7 @@ namespace { const char kData[] = "SPDY read queue test data.\0Some more data."; -const size_t kDataSize = base::size(kData); +const size_t kDataSize = std::size(kData); // Enqueues |data| onto |queue| in chunks of at most |max_buffer_size| // bytes.
diff --git a/net/spdy/spdy_session_pool_unittest.cc b/net/spdy/spdy_session_pool_unittest.cc index 83040163..c4095488 100644 --- a/net/spdy/spdy_session_pool_unittest.cc +++ b/net/spdy/spdy_session_pool_unittest.cc
@@ -9,7 +9,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" @@ -536,7 +535,7 @@ "192.168.0.4,192.168.0.3"}, }; - for (size_t i = 0; i < base::size(test_hosts); i++) { + for (size_t i = 0; i < std::size(test_hosts); i++) { session_deps_.host_resolver->rules()->AddIPLiteralRule( test_hosts[i].name, test_hosts[i].iplist, std::string()); @@ -719,7 +718,7 @@ }; session_deps_.host_resolver->set_synchronous_mode(true); - for (size_t i = 0; i < base::size(test_hosts); i++) { + for (size_t i = 0; i < std::size(test_hosts); i++) { session_deps_.host_resolver->rules()->AddIPLiteralRule( test_hosts[i].name, test_hosts[i].iplist, std::string()); @@ -776,7 +775,7 @@ // Populate the HostResolver cache. session_deps_.host_resolver->set_synchronous_mode(true); - for (size_t i = 0; i < base::size(test_hosts); i++) { + for (size_t i = 0; i < std::size(test_hosts); i++) { session_deps_.host_resolver->rules()->AddIPLiteralRule( test_hosts[i].name, test_hosts[i].iplist, std::string()); @@ -843,7 +842,7 @@ // Populate the HostResolver cache. session_deps_.host_resolver->set_synchronous_mode(true); - for (size_t i = 0; i < base::size(test_hosts); i++) { + for (size_t i = 0; i < std::size(test_hosts); i++) { session_deps_.host_resolver->rules()->AddIPLiteralRule( test_hosts[i].name, test_hosts[i].iplist, std::string()); @@ -1264,7 +1263,7 @@ // Populate the HostResolver cache. session_deps_.host_resolver->set_synchronous_mode(true); - for (size_t i = 0; i < base::size(test_hosts); i++) { + for (size_t i = 0; i < std::size(test_hosts); i++) { session_deps_.host_resolver->rules()->AddIPLiteralRule( test_hosts[i].name, test_hosts[i].iplist, std::string()); @@ -1606,7 +1605,7 @@ }; std::vector<std::unique_ptr<StaticSocketDataProvider>> socket_data; - size_t num_tests = base::size(kSSLServerTests); + size_t num_tests = std::size(kSSLServerTests); for (size_t i = 0; i < num_tests; i++) { socket_data.push_back(std::make_unique<StaticSocketDataProvider>( reads, base::span<MockWrite>()));
diff --git a/net/spdy/spdy_session_unittest.cc b/net/spdy/spdy_session_unittest.cc index d0b5a00..524cb90c1 100644 --- a/net/spdy/spdy_session_unittest.cc +++ b/net/spdy/spdy_session_unittest.cc
@@ -12,7 +12,6 @@ #include "base/base64.h" #include "base/bind.h" #include "base/callback.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" @@ -82,7 +81,7 @@ const char kPushedUrl[] = "https://www.example.org/a.dat"; const char kBodyData[] = "Body data"; -const size_t kBodyDataSize = base::size(kBodyData); +const size_t kBodyDataSize = std::size(kBodyData); const base::StringPiece kBodyDataStringPiece(kBodyData, kBodyDataSize); static base::TimeDelta g_time_delta; @@ -6415,7 +6414,7 @@ 'f', 'o', 'o' // payload }; spdy::SpdySerializedFrame grease(reinterpret_cast<char*>(kRawFrameData), - base::size(kRawFrameData), + std::size(kRawFrameData), /* owns_buffer = */ false); MockWrite writes[] = {CreateMockWrite(combined_frame, 0), @@ -7464,7 +7463,7 @@ {1, {"vary", "fooaccept-encoding"}, 5}, {1, {"vary", "foo, accept-encodingbar"}, 5}}; - for (size_t i = 0; i < base::size(test_cases); ++i) { + for (size_t i = 0; i < std::size(test_cases); ++i) { spdy::Http2HeaderBlock headers; for (size_t j = 0; j < test_cases[i].num_headers; ++j) { headers[test_cases[i].headers[2 * j]] = test_cases[i].headers[2 * j + 1];
diff --git a/net/spdy/spdy_stream_test_util.cc b/net/spdy/spdy_stream_test_util.cc index a293e73..50bd5e7 100644 --- a/net/spdy/spdy_stream_test_util.cc +++ b/net/spdy/spdy_stream_test_util.cc
@@ -115,8 +115,7 @@ size_t len = received_data_queue_.GetTotalSize(); std::string received_data(len, '\0'); if (len > 0) { - EXPECT_EQ(len, - received_data_queue_.Dequeue(base::data(received_data), len)); + EXPECT_EQ(len, received_data_queue_.Dequeue(std::data(received_data), len)); } return received_data; }
diff --git a/net/spdy/spdy_stream_unittest.cc b/net/spdy/spdy_stream_unittest.cc index 8b42986..7f8280b 100644 --- a/net/spdy/spdy_stream_unittest.cc +++ b/net/spdy/spdy_stream_unittest.cc
@@ -15,7 +15,6 @@ #include <vector> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/run_loop.h" #include "base/strings/string_piece.h" @@ -52,7 +51,7 @@ const char kPushUrl[] = "https://www.example.org/push"; const char kPostBody[] = "\0hello!\xff"; -const size_t kPostBodyLength = base::size(kPostBody); +const size_t kPostBodyLength = std::size(kPostBody); const base::StringPiece kPostBodyStringPiece(kPostBody, kPostBodyLength); static base::TimeTicks g_time_now; @@ -646,7 +645,7 @@ const char* const kExtraHeaders[] = {"X-UpperCase", "yes"}; spdy::SpdySerializedFrame reply(spdy_util_.ConstructSpdyGetReply( - kExtraHeaders, base::size(kExtraHeaders) / 2, 1)); + kExtraHeaders, std::size(kExtraHeaders) / 2, 1)); AddRead(reply); spdy::SpdySerializedFrame rst( @@ -700,7 +699,7 @@ const char* const kExtraHeaders[] = {"X-UpperCase", "yes"}; spdy::SpdySerializedFrame push(spdy_util_.ConstructSpdyPush( - kExtraHeaders, base::size(kExtraHeaders) / 2, 2, 1, kPushUrl)); + kExtraHeaders, std::size(kExtraHeaders) / 2, 2, 1, kPushUrl)); AddRead(push); spdy::SpdySerializedFrame priority(
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index c98277d5..515f248 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h
@@ -14,7 +14,6 @@ #include <vector> #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "base/strings/string_piece.h" @@ -65,7 +64,7 @@ // data frames. const char kDefaultUrl[] = "https://www.example.org/"; const char kUploadData[] = "hello!"; -const int kUploadDataSize = base::size(kUploadData) - 1; +const int kUploadDataSize = std::size(kUploadData) - 1; // While HTTP/2 protocol defines default SETTINGS_MAX_HEADER_LIST_SIZE_FOR_TEST // to be unlimited, BufferedSpdyFramer constructor requires a value.
diff --git a/net/spdy/spdy_write_queue_unittest.cc b/net/spdy/spdy_write_queue_unittest.cc index f3a554c..4bbd5a3 100644 --- a/net/spdy/spdy_write_queue_unittest.cc +++ b/net/spdy/spdy_write_queue_unittest.cc
@@ -10,7 +10,6 @@ #include <utility> #include "base/bind.h" -#include "base/cxx17_backports.h" #include "base/memory/ref_counted.h" #include "base/notreached.h" #include "base/strings/string_number_conversions.h" @@ -53,7 +52,7 @@ class RequeingBufferProducer : public SpdyBufferProducer { public: explicit RequeingBufferProducer(SpdyWriteQueue* queue) { - buffer_ = std::make_unique<SpdyBuffer>(kOriginal, base::size(kOriginal)); + buffer_ = std::make_unique<SpdyBuffer>(kOriginal, std::size(kOriginal)); buffer_->AddConsumeCallback( base::BindRepeating(RequeingBufferProducer::ConsumeCallback, queue)); } @@ -65,8 +64,7 @@ static void ConsumeCallback(SpdyWriteQueue* queue, size_t size, SpdyBuffer::ConsumeSource source) { - auto buffer = - std::make_unique<SpdyBuffer>(kRequeued, base::size(kRequeued)); + auto buffer = std::make_unique<SpdyBuffer>(kRequeued, std::size(kRequeued)); auto buffer_producer = std::make_unique<SimpleBufferProducer>(std::move(buffer)); @@ -266,13 +264,13 @@ for (int i = 0; i < 100; ++i) { write_queue.Enqueue(DEFAULT_PRIORITY, spdy::SpdyFrameType::HEADERS, - IntToProducer(i), streams[i % base::size(streams)], + IntToProducer(i), streams[i % std::size(streams)], TRAFFIC_ANNOTATION_FOR_TESTS); } write_queue.RemovePendingWritesForStreamsAfter(stream1->stream_id()); - for (int i = 0; i < 100; i += base::size(streams)) { + for (int i = 0; i < 100; i += std::size(streams)) { spdy::SpdyFrameType frame_type = spdy::SpdyFrameType::DATA; std::unique_ptr<SpdyBufferProducer> frame_producer; base::WeakPtr<SpdyStream> stream;
diff --git a/net/ssl/client_cert_store_mac.cc b/net/ssl/client_cert_store_mac.cc index 7255c0757..c53de3e 100644 --- a/net/ssl/client_cert_store_mac.cc +++ b/net/ssl/client_cert_store_mac.cc
@@ -20,7 +20,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/logging.h" #include "base/mac/mac_logging.h" #include "base/mac/scoped_cftyperef.h" @@ -362,7 +361,7 @@ kSecClassIdentity, kSecMatchLimitAll, kCFBooleanTrue, kCFBooleanTrue, }; ScopedCFTypeRef<CFDictionaryRef> query(CFDictionaryCreate( - kCFAllocatorDefault, kKeys, kValues, base::size(kValues), + kCFAllocatorDefault, kKeys, kValues, std::size(kValues), &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); ScopedCFTypeRef<CFArrayRef> result; {
diff --git a/net/ssl/ssl_cipher_suite_names_unittest.cc b/net/ssl/ssl_cipher_suite_names_unittest.cc index f0964d50..bde9d36 100644 --- a/net/ssl/ssl_cipher_suite_names_unittest.cc +++ b/net/ssl/ssl_cipher_suite_names_unittest.cc
@@ -4,7 +4,6 @@ #include "net/ssl/ssl_cipher_suite_names.h" -#include "base/cxx17_backports.h" #include "net/ssl/ssl_connection_status_flags.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/boringssl/src/include/openssl/ssl.h" @@ -125,7 +124,7 @@ "0xBEEFY", }; - for (size_t i = 0; i < base::size(cipher_strings); ++i) { + for (size_t i = 0; i < std::size(cipher_strings); ++i) { uint16_t cipher_suite = 0; EXPECT_FALSE(ParseSSLCipherString(cipher_strings[i], &cipher_suite)); }
diff --git a/net/test/url_request/url_request_failed_job.cc b/net/test/url_request/url_request_failed_job.cc index 49b63e6..b249abe 100644 --- a/net/test/url_request/url_request_failed_job.cc +++ b/net/test/url_request/url_request_failed_job.cc
@@ -6,7 +6,6 @@ #include "base/bind.h" #include "base/check_op.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/strings/string_number_conversions.h" #include "base/task/single_thread_task_runner.h" @@ -31,7 +30,7 @@ "readasync", // READ_ASYNC }; -static_assert(base::size(kFailurePhase) == +static_assert(std::size(kFailurePhase) == URLRequestFailedJob::FailurePhase::MAX_FAILURE_PHASE, "kFailurePhase must match FailurePhase enum"); @@ -50,7 +49,7 @@ int net_error = OK; URLRequestFailedJob::FailurePhase phase = URLRequestFailedJob::FailurePhase::MAX_FAILURE_PHASE; - for (size_t i = 0; i < base::size(kFailurePhase); i++) { + for (size_t i = 0; i < std::size(kFailurePhase); i++) { std::string phase_error_string; if (GetValueForKeyInQuery(request->url(), kFailurePhase[i], &phase_error_string)) {
diff --git a/net/tools/cachetool/cachetool.cc b/net/tools/cachetool/cachetool.cc index df1a85c..a237981 100644 --- a/net/tools/cachetool/cachetool.cc +++ b/net/tools/cachetool/cachetool.cc
@@ -8,7 +8,6 @@ #include "base/at_exit.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/file_path.h" #include "base/format_macros.h" #include "base/hash/md5.h" @@ -238,7 +237,7 @@ return ""; std::cout.flush(); size_t command_id = static_cast<size_t>(std::cin.get()); - if (command_id >= base::size(kCommandNames)) { + if (command_id >= std::size(kCommandNames)) { ReturnFailure("Unknown command."); return ""; }
diff --git a/net/tools/cert_verify_tool/cert_verify_tool_util.cc b/net/tools/cert_verify_tool/cert_verify_tool_util.cc index 2884d8d..2bc98a3 100644 --- a/net/tools/cert_verify_tool/cert_verify_tool_util.cc +++ b/net/tools/cert_verify_tool/cert_verify_tool_util.cc
@@ -198,7 +198,7 @@ std::string FingerPrintCryptoBuffer(const CRYPTO_BUFFER* cert_handle) { net::SHA256HashValue hash = net::X509Certificate::CalculateFingerprint256(cert_handle); - return base::HexEncode(hash.data, base::size(hash.data)); + return base::HexEncode(hash.data, std::size(hash.data)); } std::string SubjectFromX509Certificate(const net::X509Certificate* cert) {
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc index 1b50083..1fbcbbc 100644 --- a/net/tools/crash_cache/crash_cache.cc +++ b/net/tools/crash_cache/crash_cache.cc
@@ -12,7 +12,6 @@ #include "base/at_exit.h" #include "base/check.h" #include "base/command_line.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/message_loop/message_pump_type.h" #include "base/path_service.h" @@ -117,7 +116,7 @@ "remove_load2", "remove_load3" }; - static_assert(base::size(folders) == disk_cache::MAX_CRASH, "sync folders"); + static_assert(std::size(folders) == disk_cache::MAX_CRASH, "sync folders"); DCHECK(action > disk_cache::NO_CRASH && action < disk_cache::MAX_CRASH); *full_path = path.AppendASCII(folders[action]);
diff --git a/net/tools/quic/quic_simple_server_test.cc b/net/tools/quic/quic_simple_server_test.cc index 599a56c..f1b7abe 100644 --- a/net/tools/quic/quic_simple_server_test.cc +++ b/net/tools/quic/quic_simple_server_test.cc
@@ -6,7 +6,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "net/quic/address_utils.h" #include "net/third_party/quiche/src/quic/core/crypto/quic_random.h" #include "net/third_party/quiche/src/quic/core/quic_crypto_stream.h" @@ -70,7 +69,7 @@ // private flags 0x00}; quic::QuicReceivedPacket encrypted_valid_packet( - reinterpret_cast<char*>(valid_packet), base::size(valid_packet), + reinterpret_cast<char*>(valid_packet), std::size(valid_packet), quic::QuicTime::Zero(), false); EXPECT_CALL(dispatcher_, ProcessPacket(_, _, _)).Times(1);
diff --git a/net/tools/tld_cleanup/tld_cleanup_util.cc b/net/tools/tld_cleanup/tld_cleanup_util.cc index cfbfb47..288a88b 100644 --- a/net/tools/tld_cleanup/tld_cleanup_util.cc +++ b/net/tools/tld_cleanup/tld_cleanup_util.cc
@@ -4,7 +4,6 @@ #include "net/tools/tld_cleanup/tld_cleanup_util.h" -#include "base/cxx17_backports.h" #include "base/files/file_util.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" @@ -141,8 +140,8 @@ size_t line_end = 0; bool is_private = false; RuleMap extra_rules; - int begin_private_length = base::size(kBeginPrivateDomainsComment) - 1; - int end_private_length = base::size(kEndPrivateDomainsComment) - 1; + int begin_private_length = std::size(kBeginPrivateDomainsComment) - 1; + int end_private_length = std::size(kEndPrivateDomainsComment) - 1; while (line_start < data.size()) { if (line_start + begin_private_length < data.size() && !data.compare(line_start, begin_private_length,
diff --git a/net/url_request/url_request_test_job.cc b/net/url_request/url_request_test_job.cc index bd82b2d1..10700cf2 100644 --- a/net/url_request/url_request_test_job.cc +++ b/net/url_request/url_request_test_job.cc
@@ -11,7 +11,6 @@ #include "base/bind.h" #include "base/compiler_specific.h" #include "base/containers/cxx20_erase_list.h" -#include "base/cxx17_backports.h" #include "base/lazy_instance.h" #include "base/location.h" #include "base/strings/string_util.h" @@ -85,7 +84,7 @@ "HTTP/1.1 200 OK\n" "Content-type: text/html\n" "\n"; - return std::string(kHeaders, base::size(kHeaders)); + return std::string(kHeaders, std::size(kHeaders)); } // static getter for redirect response headers @@ -94,7 +93,7 @@ "HTTP/1.1 302 MOVED\n" "Location: somewhere\n" "\n"; - return std::string(kHeaders, base::size(kHeaders)); + return std::string(kHeaders, std::size(kHeaders)); } // static getter for redirect response headers @@ -124,7 +123,7 @@ static const char kHeaders[] = "HTTP/1.1 500 BOO HOO\n" "\n"; - return std::string(kHeaders, base::size(kHeaders)); + return std::string(kHeaders, std::size(kHeaders)); } URLRequestTestJob::URLRequestTestJob(URLRequest* request, bool auto_advance)
diff --git a/net/url_request/url_request_throttler_simulation_unittest.cc b/net/url_request/url_request_throttler_simulation_unittest.cc index 4c22423a..edb0cf7a 100644 --- a/net/url_request/url_request_throttler_simulation_unittest.cc +++ b/net/url_request/url_request_throttler_simulation_unittest.cc
@@ -17,7 +17,6 @@ #include <memory> #include <vector> -#include "base/cxx17_backports.h" #include "base/environment.h" #include "base/memory/raw_ptr.h" #include "base/rand_util.h" @@ -705,7 +704,7 @@ // If things don't converge by the time we've done 100K trials, then // clearly one or more of the expected intervals are wrong. while (global_stats.num_runs < 100000) { - for (size_t i = 0; i < base::size(trials); ++i) { + for (size_t i = 0; i < std::size(trials); ++i) { ++global_stats.num_runs; ++trials[i].stats.num_runs; double ratio_unprotected = SimulateDowntime( @@ -733,7 +732,7 @@ // Print individual trial results for optional manual evaluation. double max_increase_ratio = 0.0; - for (size_t i = 0; i < base::size(trials); ++i) { + for (size_t i = 0; i < std::size(trials); ++i) { double increase_ratio; trials[i].stats.DidConverge(&increase_ratio); max_increase_ratio = std::max(max_increase_ratio, increase_ratio);
diff --git a/net/url_request/url_request_throttler_unittest.cc b/net/url_request/url_request_throttler_unittest.cc index f7133d33..6b34917 100644 --- a/net/url_request/url_request_throttler_unittest.cc +++ b/net/url_request/url_request_throttler_unittest.cc
@@ -4,7 +4,6 @@ #include <memory> -#include "base/cxx17_backports.h" #include "base/metrics/histogram_samples.h" #include "base/pickle.h" #include "base/strings/string_number_conversions.h" @@ -246,7 +245,7 @@ TimeAndBool(now_ - lifetime, true, __LINE__), TimeAndBool(now_ - (lifetime + kFiveMs), true, __LINE__)}; - for (unsigned int i = 0; i < base::size(test_values); ++i) { + for (unsigned int i = 0; i < std::size(test_values); ++i) { entry_->set_exponential_backoff_release_time(test_values[i].time); EXPECT_EQ(entry_->IsEntryOutdated(), test_values[i].result) << "Test case #" << i << " line " << test_values[i].line << " failed"; @@ -353,7 +352,7 @@ std::string("http://www.example.com:1234/"), __LINE__)}; - for (unsigned int i = 0; i < base::size(test_values); ++i) { + for (unsigned int i = 0; i < std::size(test_values); ++i) { std::string temp = manager.DoGetUrlIdFromUrl(test_values[i].url); EXPECT_EQ(temp, test_values[i].result) << "Test case #" << i << " line " << test_values[i].line << " failed";
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc index dc6763c..a9071434 100644 --- a/net/websockets/websocket_basic_handshake_stream.cc +++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -70,7 +70,7 @@ std::string GenerateHandshakeChallenge() { std::string raw_challenge(websockets::kRawChallengeLength, '\0'); - crypto::RandBytes(base::data(raw_challenge), raw_challenge.length()); + crypto::RandBytes(std::data(raw_challenge), raw_challenge.length()); std::string encoded_challenge; base::Base64Encode(raw_challenge, &encoded_challenge); return encoded_challenge;
diff --git a/net/websockets/websocket_basic_stream_test.cc b/net/websockets/websocket_basic_stream_test.cc index 4a5ca33..440da1d 100644 --- a/net/websockets/websocket_basic_stream_test.cc +++ b/net/websockets/websocket_basic_stream_test.cc
@@ -11,11 +11,11 @@ #include <stddef.h> #include <stdint.h> #include <string.h> // for memcpy() and memset(). + #include <utility> #include "base/big_endian.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/time/time.h" #include "net/base/io_buffer.h" #include "net/base/privacy_mode.h" @@ -42,7 +42,7 @@ #define WEBSOCKET_BASIC_STREAM_TEST_DEFINE_CONSTANT(name, value) \ const char k##name[] = value; \ - const size_t k##name##Size = base::size(k##name) - 1 + const size_t k##name##Size = std::size(k##name) - 1 WEBSOCKET_BASIC_STREAM_TEST_DEFINE_CONSTANT(SampleFrame, "\x81\x06Sample"); WEBSOCKET_BASIC_STREAM_TEST_DEFINE_CONSTANT( @@ -876,7 +876,7 @@ // reserved flag(s) set on the first chunk when split. TEST_F(WebSocketBasicStreamSocketChunkedReadTest, ReservedFlagCleared) { static const char kReservedFlagFrame[] = "\x41\x05Hello"; - const size_t kReservedFlagFrameSize = base::size(kReservedFlagFrame) - 1; + const size_t kReservedFlagFrameSize = std::size(kReservedFlagFrame) - 1; const size_t kChunkSize = 5; CreateChunkedRead(ASYNC,
diff --git a/net/websockets/websocket_channel.cc b/net/websockets/websocket_channel.cc index d999997..84d37a7 100644 --- a/net/websockets/websocket_channel.cc +++ b/net/websockets/websocket_channel.cc
@@ -14,7 +14,6 @@ #include "base/big_endian.h" #include "base/bind.h" #include "base/containers/circular_deque.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" @@ -81,7 +80,7 @@ 5000, 65536, // Codes above 5000 are invalid. }; const int* const kInvalidRangesEnd = - kInvalidRanges + base::size(kInvalidRanges); + kInvalidRanges + std::size(kInvalidRanges); DCHECK_GE(code, 0); DCHECK_LT(code, 65536);
diff --git a/net/websockets/websocket_channel_test.cc b/net/websockets/websocket_channel_test.cc index 03a0a51..48051cc 100644 --- a/net/websockets/websocket_channel_test.cc +++ b/net/websockets/websocket_channel_test.cc
@@ -19,7 +19,6 @@ #include "base/bind.h" #include "base/callback.h" #include "base/callback_helpers.h" -#include "base/cxx17_backports.h" #include "base/location.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" @@ -134,7 +133,7 @@ '\b', // backspace '\'', // single-quote, special in PHP }; -const size_t kBinaryBlobSize = base::size(kBinaryBlob); +const size_t kBinaryBlobSize = std::size(kBinaryBlob); const int kVeryBigTimeoutMillis = 60 * 60 * 24 * 1000;
diff --git a/net/websockets/websocket_deflate_parameters_test.cc b/net/websockets/websocket_deflate_parameters_test.cc index 4e6c6b5..404c73d 100644 --- a/net/websockets/websocket_deflate_parameters_test.cc +++ b/net/websockets/websocket_deflate_parameters_test.cc
@@ -7,7 +7,6 @@ #include <string> #include <vector> -#include "base/cxx17_backports.h" #include "net/websockets/websocket_extension_parser.h" #include "testing/gtest/include/gtest/gtest.h" @@ -218,7 +217,7 @@ {"; hogefuga", kUnknownParameter}, }; return std::vector<InitializeTestParameter>( - parameters, parameters + base::size(parameters)); + parameters, parameters + std::size(parameters)); } const CompatibilityTestParameter kCompatibilityTestParameters[] = {
diff --git a/net/websockets/websocket_extension_parser_test.cc b/net/websockets/websocket_extension_parser_test.cc index 77eb589..a3a6debd 100644 --- a/net/websockets/websocket_extension_parser_test.cc +++ b/net/websockets/websocket_extension_parser_test.cc
@@ -6,7 +6,6 @@ #include <string> -#include "base/cxx17_backports.h" #include "net/websockets/websocket_extension.h" #include "testing/gtest/include/gtest/gtest.h" @@ -143,7 +142,7 @@ "foo; bar=\"baz\\" // ends with backslash }; - for (size_t i = 0; i < base::size(patterns); ++i) { + for (size_t i = 0; i < std::size(patterns); ++i) { WebSocketExtensionParser parser; EXPECT_FALSE(parser.Parse(patterns[i])); EXPECT_EQ(0U, parser.extensions().size());
diff --git a/net/websockets/websocket_frame_parser_test.cc b/net/websockets/websocket_frame_parser_test.cc index 22262ad..f9aa351c 100644 --- a/net/websockets/websocket_frame_parser_test.cc +++ b/net/websockets/websocket_frame_parser_test.cc
@@ -5,10 +5,10 @@ #include "net/websockets/websocket_frame_parser.h" #include <stdint.h> + #include <algorithm> #include <vector> -#include "base/cxx17_backports.h" #include "net/base/io_buffer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,13 +17,13 @@ namespace { const char kHello[] = "Hello, world!"; -const uint64_t kHelloLength = base::size(kHello) - 1; +const uint64_t kHelloLength = std::size(kHello) - 1; const char kHelloFrame[] = "\x81\x0DHello, world!"; -const uint64_t kHelloFrameLength = base::size(kHelloFrame) - 1; +const uint64_t kHelloFrameLength = std::size(kHelloFrame) - 1; const char kMaskedHelloFrame[] = "\x81\x8D\xDE\xAD\xBE\xEF" "\x96\xC8\xD2\x83\xB1\x81\x9E\x98\xB1\xDF\xD2\x8B\xFF"; -const uint64_t kMaskedHelloFrameLength = base::size(kMaskedHelloFrame) - 1; +const uint64_t kMaskedHelloFrameLength = std::size(kMaskedHelloFrame) - 1; struct FrameHeaderTestCase { const char* frame_header; @@ -46,7 +46,7 @@ { "\x81\x7F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 10, UINT64_C(0x7FFFFFFFFFFFFFFF), kWebSocketErrorMessageTooBig } }; -const int kNumFrameHeaderTests = base::size(kFrameHeaderTests); +const int kNumFrameHeaderTests = std::size(kFrameHeaderTests); TEST(WebSocketFrameParserTest, DecodeNormalFrame) { WebSocketFrameParser parser; @@ -128,7 +128,7 @@ { "\x81\x05" "Ninth", 7, "Ninth", 5 }, { "\x81\x05" "Tenth", 7, "Tenth", 5 } }; - static const int kNumInputs = base::size(kInputs); + static const int kNumInputs = std::size(kInputs); std::vector<char> input; // Concatenate all frames. @@ -444,7 +444,7 @@ { "\x81\x7F\x00\x00\x00\x00\x00\x00\x00\x00", 10 }, { "\x81\x7E\x00\x00\x00\x00\x00\x00\xFF\xFF", 10 }, }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { const char* frame_header = kTests[i].frame_header; @@ -492,7 +492,7 @@ { "\x8E\x00", 2, 0xE }, { "\x8F\x00", 2, 0xF } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { const char* frame_header = kTests[i].frame_header; @@ -545,7 +545,7 @@ { "\x71\x00", 2, false, true, true, true }, { "\xF1\x00", 2, true, true, true, true } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { const char* frame_header = kTests[i].frame_header;
diff --git a/net/websockets/websocket_frame_perftest.cc b/net/websockets/websocket_frame_perftest.cc index e156a0e..3129380d 100644 --- a/net/websockets/websocket_frame_perftest.cc +++ b/net/websockets/websocket_frame_perftest.cc
@@ -7,7 +7,6 @@ #include <algorithm> #include <vector> -#include "base/cxx17_backports.h" #include "base/timer/elapsed_timer.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_result_reporter.h" @@ -30,7 +29,7 @@ return reporter; } -static_assert(base::size(kMaskingKey) == +static_assert(std::size(kMaskingKey) == WebSocketFrameHeader::kMaskingKeyLength + 1, "incorrect masking key size"); @@ -56,7 +55,7 @@ TEST_F(WebSocketFrameTestMaskBenchmark, BenchmarkMaskShortPayload) { static const char kShortPayload[] = "Short Payload"; - Benchmark("short_payload", kShortPayload, base::size(kShortPayload)); + Benchmark("short_payload", kShortPayload, std::size(kShortPayload)); } TEST_F(WebSocketFrameTestMaskBenchmark, BenchmarkMaskLongPayload) {
diff --git a/net/websockets/websocket_frame_test.cc b/net/websockets/websocket_frame_test.cc index cd0009f..748068a8 100644 --- a/net/websockets/websocket_frame_test.cc +++ b/net/websockets/websocket_frame_test.cc
@@ -5,10 +5,10 @@ #include "net/websockets/websocket_frame.h" #include <stdint.h> + #include <algorithm> #include <vector> -#include "base/cxx17_backports.h" #include "base/memory/aligned_memory.h" #include "net/base/net_errors.h" #include "testing/gtest/include/gtest/gtest.h" @@ -32,7 +32,7 @@ { "\x81\x7F\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF", 10, UINT64_C(0x7FFFFFFFFFFFFFFF) } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { WebSocketFrameHeader header(WebSocketFrameHeader::kOpCodeText); @@ -53,7 +53,7 @@ TEST(WebSocketFrameHeaderTest, FrameLengthsWithMasking) { static const char kMaskingKey[] = "\xDE\xAD\xBE\xEF"; static_assert( - base::size(kMaskingKey) - 1 == WebSocketFrameHeader::kMaskingKeyLength, + std::size(kMaskingKey) - 1 == WebSocketFrameHeader::kMaskingKeyLength, "incorrect masking key size"); struct TestCase { @@ -71,7 +71,7 @@ { "\x81\xFF\x7F\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xDE\xAD\xBE\xEF", 14, UINT64_C(0x7FFFFFFFFFFFFFFF) } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); WebSocketMaskingKey masking_key; std::copy(kMaskingKey, @@ -120,7 +120,7 @@ { "\x8E\x00", 2, 0xE }, { "\x8F\x00", 2, 0xF } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { WebSocketFrameHeader header(kTests[i].opcode); @@ -156,7 +156,7 @@ { "\x71\x00", 2, false, true, true, true }, { "\xF1\x00", 2, true, true, true, true } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { WebSocketFrameHeader header(WebSocketFrameHeader::kOpCodeText); @@ -197,7 +197,7 @@ { UINT64_C(0x10000), true, 14u }, { UINT64_C(0x7FFFFFFFFFFFFFFF), true, 14u } }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { WebSocketFrameHeader header(WebSocketFrameHeader::kOpCodeText); @@ -235,7 +235,7 @@ { "\x00\x00\x00\x00", 0, "FooBar", "FooBar", 6 }, { "\xFF\xFF\xFF\xFF", 0, "FooBar", "\xB9\x90\x90\xBD\x9E\x8D", 6 }, }; - static const int kNumTests = base::size(kTests); + static const int kNumTests = std::size(kTests); for (int i = 0; i < kNumTests; ++i) { WebSocketMaskingKey masking_key; @@ -284,7 +284,7 @@ "\xda\xa8\x4b\x75\xa1\xcb\xa9\x77\x19\x4d\x6e\xdf\xc8\x08\x1c\xb6" "\x6d\xfb\x38\x04\x44\xd5\xba\x57\x9f\x76\xb0\x2e\x07\x91\xe6\xa8" }; - static const size_t kTestInputSize = base::size(kTestInput) - 1; + static const size_t kTestInputSize = std::size(kTestInput) - 1; static const char kTestOutput[] = { "\xef\xcd\x47\xa5\xcb\x36\x12\x1d\xcb\xd7\xad\x72\xeb\x5d\x0d\xb5" "\xbb\x36\x80\xf5\x2e\x16\x76\x6d\x9b\x2c\x34\x34\xa9\xe0\x68\xc8" @@ -293,7 +293,7 @@ "\x08\x12\x11\xcb\x73\x71\xf3\xc9\xcb\xf7\x34\x61\x1a\xb2\x46\x08" "\xbf\x41\x62\xba\x96\x6f\xe0\xe9\x4d\xcc\xea\x90\xd5\x2b\xbc\x16" }; - static_assert(base::size(kTestInput) == base::size(kTestOutput), + static_assert(std::size(kTestInput) == std::size(kTestOutput), "output and input arrays should have the same length"); std::unique_ptr<char, base::AlignedFreeDeleter> scratch(static_cast<char*>( base::AlignedAlloc(kScratchBufferSize, kMaxVectorAlignment)));
diff --git a/net/websockets/websocket_stream_test.cc b/net/websockets/websocket_stream_test.cc index 0235748..52013ff 100644 --- a/net/websockets/websocket_stream_test.cc +++ b/net/websockets/websocket_stream_test.cc
@@ -11,7 +11,6 @@ #include "base/compiler_specific.h" #include "base/containers/span.h" -#include "base/cxx17_backports.h" #include "base/memory/ptr_util.h" #include "base/metrics/histogram.h" #include "base/metrics/histogram_samples.h" @@ -225,7 +224,7 @@ "user-agent", "", "accept-encoding", "gzip, deflate", "accept-language", "en-us,fr"}; frames_.push_back(spdy_util_.ConstructSpdyGet( - kExtraRequestHeaders, base::size(kExtraRequestHeaders) / 2, 1, + kExtraRequestHeaders, std::size(kExtraRequestHeaders) / 2, 1, DEFAULT_PRIORITY)); AddWrite(&frames_.back());
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc index 33112b7c..38ffc1c 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
@@ -260,7 +260,8 @@ const uint64_t kAllowedMask = O_ACCMODE | O_APPEND | O_NONBLOCK | O_SYNC | kOLargeFileFlag | O_CLOEXEC | O_NOATIME; - const uint64_t kAllowedSeals = F_SEAL_SEAL | F_SEAL_GROW | F_SEAL_SHRINK; + const uint64_t kAllowedSeals = + F_SEAL_SEAL | F_SEAL_GROW | F_SEAL_SHRINK | F_SEAL_FUTURE_WRITE; // clang-format off return Switch(cmd) .CASES((F_GETFL,
diff --git a/services/audio/audio_processor_handler.cc b/services/audio/audio_processor_handler.cc index df17ce92..be5a07e0 100644 --- a/services/audio/audio_processor_handler.cc +++ b/services/audio/audio_processor_handler.cc
@@ -49,9 +49,6 @@ base::TimeDelta delay) { TRACE_EVENT2("audio", "AudioProcessorHandler::OnPlayoutData", " this ", static_cast<void*>(this), "delay", delay.InMillisecondsF()); - // TODO(https://crbug.com/1292037): Ensure that the buffer size is supported, - // either through interface guarantees or rebuffering. - CHECK_EQ(audio_bus.frames(), sample_rate / 100); audio_processor_->OnPlayoutData(audio_bus, sample_rate, delay); }
diff --git a/services/audio/audio_processor_handler.h b/services/audio/audio_processor_handler.h index 1dd53ce..e7c5a67f 100644 --- a/services/audio/audio_processor_handler.h +++ b/services/audio/audio_processor_handler.h
@@ -82,8 +82,6 @@ // ReferenceOutput::Listener implementation. // Called on the playout thread. - // TODO(https://crbug.com/1292037): Currently needs 10 ms of audio per call, - // but this is not guaranteed in the interface. void OnPlayoutData(const media::AudioBus& audio_bus, int sample_rate, base::TimeDelta delay) final;
diff --git a/services/audio/mixing_graph_impl.cc b/services/audio/mixing_graph_impl.cc index 931f9ca..3ae4c17 100644 --- a/services/audio/mixing_graph_impl.cc +++ b/services/audio/mixing_graph_impl.cc
@@ -194,8 +194,9 @@ "MixingGraphImpl::OnMoreData", "delay", delay, "delay_timestamp", delay_timestamp); + // The expected playout time is |delay_timestamp| + |delay|. base::TimeDelta total_delay = - base::TimeTicks::Now() - delay_timestamp + delay; + delay_timestamp + delay - base::TimeTicks::Now(); if (total_delay < base::TimeDelta()) total_delay = base::TimeDelta();
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 6fd09b9b1..91fc9b1 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -694,6 +694,22 @@ ] } ], + "AutofillEnableAugmentedPhoneCountryCodeOnWebView": [ + { + "platforms": [ + "android_webview", + "android_weblayer" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "AutofillEnableAugmentedPhoneCountryCode" + ] + } + ] + } + ], "AutofillEnableLabelPrecedenceForTurkishAddresses": [ { "platforms": [
diff --git a/third_party/ashmem/README.chromium b/third_party/ashmem/README.chromium index eb96cff8..57b27a3d 100644 --- a/third_party/ashmem/README.chromium +++ b/third_party/ashmem/README.chromium
@@ -14,3 +14,6 @@ 0003-Pthread-once-for-funcs-init.patch: Fix the data race that was introduced in the previous patch by using pthread_once() for function pointers initialization. + 0004-Fixup-ashmem_get_prot_region-for-memfd.patch: + mmap with MAP_PRIVATE is meant to succeed even on write-protected + memfd's as it will just copy-on-write.
diff --git a/third_party/ashmem/ashmem-dev.c b/third_party/ashmem/ashmem-dev.c index 399ea36..6bb4977 100644 --- a/third_party/ashmem/ashmem-dev.c +++ b/third_party/ashmem/ashmem-dev.c
@@ -235,7 +235,7 @@ int result = PROT_READ; const size_t page_size = (size_t)sysconf(_SC_PAGESIZE); void* m = mmap(NULL, page_size, PROT_READ|PROT_WRITE, - MAP_PRIVATE, fd, 0); + MAP_SHARED, fd, 0); if (m != MAP_FAILED) { munmap(m, page_size); result = PROT_READ|PROT_WRITE;
diff --git a/third_party/ashmem/patches/0004-Fixup-ashmem_get_prot_region-for-memfd.patch b/third_party/ashmem/patches/0004-Fixup-ashmem_get_prot_region-for-memfd.patch new file mode 100644 index 0000000..feae8be --- /dev/null +++ b/third_party/ashmem/patches/0004-Fixup-ashmem_get_prot_region-for-memfd.patch
@@ -0,0 +1,13 @@ +diff --git a/third_party/ashmem/ashmem-dev.c b/third_party/ashmem/ashmem-dev.c +index 399ea36ce3826..6bb4977bab28d 100644 +--- a/third_party/ashmem/ashmem-dev.c ++++ b/third_party/ashmem/ashmem-dev.c +@@ -235,7 +235,7 @@ int ashmem_get_prot_region(int fd) { + int result = PROT_READ; + const size_t page_size = (size_t)sysconf(_SC_PAGESIZE); + void* m = mmap(NULL, page_size, PROT_READ|PROT_WRITE, +- MAP_PRIVATE, fd, 0); ++ MAP_SHARED, fd, 0); + if (m != MAP_FAILED) { + munmap(m, page_size); + result = PROT_READ|PROT_WRITE;
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 03d1c6d..bb7bc90 100644 --- a/third_party/blink/public/mojom/web_feature/web_feature.mojom +++ b/third_party/blink/public/mojom/web_feature/web_feature.mojom
@@ -3491,6 +3491,9 @@ kBlobStoreAccessUnknownTopLevelSite = 4170, kCrossOriginAccessBasedOnDocumentDomain = 4171, kCookieWithTruncatingChar = 4172, + kVideoTrackGenerator = 4173, + kMediaCapabilitiesDecodingInfoWebrtc = 4174, + kMediaCapabilitiesEncodingInfoWebrtc = 4175, // 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/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni index 5c40e40..8ed9469 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni
@@ -2293,6 +2293,8 @@ "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_playback_quality.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_track.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_track.h", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_track_generator.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_video_track_generator.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_virtual_keyboard.cc", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_virtual_keyboard.h", "$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_virtual_keyboard_geometry_change_event.cc",
diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index 69f4e42..78becbe 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni
@@ -72,6 +72,7 @@ "//third_party/blink/renderer/modules/breakout_box/media_stream_track_generator_init.idl", "//third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.idl", "//third_party/blink/renderer/modules/breakout_box/media_stream_track_processor_init.idl", + "//third_party/blink/renderer/modules/breakout_box/video_track_generator.idl", "//third_party/blink/renderer/modules/broadcastchannel/broadcast_channel.idl", "//third_party/blink/renderer/modules/buckets/navigator_storage_buckets.idl", "//third_party/blink/renderer/modules/buckets/storage_bucket.idl",
diff --git a/third_party/blink/renderer/modules/breakout_box/BUILD.gn b/third_party/blink/renderer/modules/breakout_box/BUILD.gn index f622158..f6ae1dcb 100644 --- a/third_party/blink/renderer/modules/breakout_box/BUILD.gn +++ b/third_party/blink/renderer/modules/breakout_box/BUILD.gn
@@ -31,6 +31,8 @@ "pushable_media_stream_video_source.h", "transferred_frame_queue_underlying_source.cc", "transferred_frame_queue_underlying_source.h", + "video_track_generator.cc", + "video_track_generator.h", ] deps = [ "//third_party/blink/renderer/modules/mediastream:mediastream",
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_generator.cc b/third_party/blink/renderer/modules/breakout_box/video_track_generator.cc new file mode 100644 index 0000000..7fff53a --- /dev/null +++ b/third_party/blink/renderer/modules/breakout_box/video_track_generator.cc
@@ -0,0 +1,64 @@ +// Copyright 2022 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/modules/breakout_box/video_track_generator.h" + +#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h" +#include "third_party/blink/public/platform/platform.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_video_track_generator.h" +#include "third_party/blink/renderer/core/execution_context/execution_context.h" +#include "third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h" +#include "third_party/blink/renderer/platform/bindings/exception_state.h" +#include "third_party/blink/renderer/platform/bindings/script_state.h" +#include "third_party/blink/renderer/platform/instrumentation/use_counter.h" +#include "third_party/blink/renderer/platform/mediastream/media_stream_component.h" +#include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread.h" +#include "third_party/blink/renderer/platform/wtf/uuid.h" + +namespace blink { + +VideoTrackGenerator* VideoTrackGenerator::Create( + ScriptState* script_state, + ExceptionState& exception_state) { + if (!script_state->ContextIsValid()) { + exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError, + "Invalid context"); + return nullptr; + } + + return MakeGarbageCollected<VideoTrackGenerator>(script_state, + exception_state); +} + +VideoTrackGenerator::VideoTrackGenerator(ScriptState* script_state, + ExceptionState& exception_state) { + underlying_generator_ = MakeGarbageCollected<MediaStreamTrackGenerator>( + script_state, MediaStreamSource::kTypeVideo, + /*track_id=*/WTF::CreateCanonicalUUIDString()); +} + +WritableStream* VideoTrackGenerator::writable(ScriptState* script_state) { + return underlying_generator_->writable(script_state); +} + +bool VideoTrackGenerator::muted() { + return false; +} + +void VideoTrackGenerator::setMuted(bool muted) { + // Not implemented yet. + // TODO(crbug.com/1300528): Implement. + NOTIMPLEMENTED(); +} + +MediaStreamTrack* VideoTrackGenerator::track() { + return underlying_generator_; +} + +void VideoTrackGenerator::Trace(Visitor* visitor) const { + visitor->Trace(underlying_generator_); + ScriptWrappable::Trace(visitor); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_generator.h b/third_party/blink/renderer/modules/breakout_box/video_track_generator.h new file mode 100644 index 0000000..f681571 --- /dev/null +++ b/third_party/blink/renderer/modules/breakout_box/video_track_generator.h
@@ -0,0 +1,40 @@ +// Copyright 2022 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_MODULES_BREAKOUT_BOX_VIDEO_TRACK_GENERATOR_H_ +#define THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_GENERATOR_H_ + +#include "third_party/blink/renderer/modules/mediastream/media_stream_track.h" +#include "third_party/blink/renderer/modules/modules_export.h" +#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" + +namespace blink { + +class MediaStreamTrackGenerator; +class ScriptState; +class WritableStream; + +class MODULES_EXPORT VideoTrackGenerator : public ScriptWrappable { + DEFINE_WRAPPERTYPEINFO(); + + public: + static VideoTrackGenerator* Create(ScriptState*, ExceptionState&); + VideoTrackGenerator(ScriptState*, ExceptionState&); + VideoTrackGenerator(const VideoTrackGenerator&) = delete; + VideoTrackGenerator& operator=(const VideoTrackGenerator&) = delete; + + WritableStream* writable(ScriptState* script_state); + bool muted(); + void setMuted(bool); + MediaStreamTrack* track(); + + void Trace(Visitor* visitor) const override; + + private: + Member<MediaStreamTrackGenerator> underlying_generator_; +}; + +} // namespace blink + +#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_BREAKOUT_BOX_VIDEO_TRACK_GENERATOR_H_
diff --git a/third_party/blink/renderer/modules/breakout_box/video_track_generator.idl b/third_party/blink/renderer/modules/breakout_box/video_track_generator.idl new file mode 100644 index 0000000..63028771 --- /dev/null +++ b/third_party/blink/renderer/modules/breakout_box/video_track_generator.idl
@@ -0,0 +1,20 @@ +// Copyright 2022 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. + +// See spec in developement at +// https://w3c.github.io/mediacapture-transform/ + +[ + Exposed(Window VideoTrackGeneratorInWindow, Worker VideoTrackGeneratorInWorker), + RuntimeEnabled=VideoTrackGenerator +] +interface VideoTrackGenerator { + [CallWith=ScriptState, RaisesException, + MeasureAs=VideoTrackGenerator + ] + constructor(); + [CallWith=ScriptState] readonly attribute WritableStream writable; + attribute boolean muted; + readonly attribute MediaStreamTrack track; +};
diff --git a/third_party/blink/renderer/modules/media_capabilities/media_capabilities.cc b/third_party/blink/renderer/modules/media_capabilities/media_capabilities.cc index f06b0b1d..98d4570 100644 --- a/third_party/blink/renderer/modules/media_capabilities/media_capabilities.cc +++ b/third_party/blink/renderer/modules/media_capabilities/media_capabilities.cc
@@ -808,6 +808,9 @@ DCHECK(message.IsEmpty()); if (is_webrtc) { + UseCounter::Count(ExecutionContext::From(script_state), + WebFeature::kMediaCapabilitiesDecodingInfoWebrtc); + auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>(script_state); // IMPORTANT: Acquire the promise before potentially synchronously resolving @@ -1003,6 +1006,9 @@ ScriptPromise promise = resolver->Promise(); if (is_webrtc) { + UseCounter::Count(ExecutionContext::From(script_state), + WebFeature::kMediaCapabilitiesEncodingInfoWebrtc); + if (auto* handler = WebrtcEncodingInfoHandler::Instance()) { const int callback_id = CreateCallbackId(); pending_cb_map_.insert(
diff --git a/third_party/blink/renderer/modules/webaudio/base_audio_context.h b/third_party/blink/renderer/modules/webaudio/base_audio_context.h index c4baf9d..efd0f30e 100644 --- a/third_party/blink/renderer/modules/webaudio/base_audio_context.h +++ b/third_party/blink/renderer/modules/webaudio/base_audio_context.h
@@ -267,9 +267,16 @@ bool IsAudioThread() const { return GetDeferredTaskHandler().IsAudioThread(); } - void lock() { GetDeferredTaskHandler().lock(); } + // NO_THREAD_SAFETY_ANALYSIS_FIXME: Stopping here, since the callers (and + // derived classes are not annotated). + void lock() NO_THREAD_SAFETY_ANALYSIS_FIXME { + GetDeferredTaskHandler().lock(); + } bool TryLock() { return GetDeferredTaskHandler().TryLock(); } - void unlock() { GetDeferredTaskHandler().unlock(); } + void unlock() { + GetDeferredTaskHandler().AssertGraphOwner(); + GetDeferredTaskHandler().unlock(); + } // In DCHECK builds, fails if this thread does not own the context's lock. void AssertGraphOwner() const { GetDeferredTaskHandler().AssertGraphOwner(); }
diff --git a/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h b/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h index 1a75ecec..34dd488 100644 --- a/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h +++ b/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h
@@ -149,16 +149,18 @@ return CurrentThread() == audio_thread_.load(std::memory_order_relaxed); } - void lock(); - bool TryLock(); - void unlock(); + void lock() EXCLUSIVE_LOCK_FUNCTION(context_graph_mutex_); + bool TryLock() EXCLUSIVE_TRYLOCK_FUNCTION(true, context_graph_mutex_); + void unlock() UNLOCK_FUNCTION(context_graph_mutex_); // This locks the audio render thread for OfflineAudioContext rendering. // MUST NOT be used in the real-time audio context. - void OfflineLock(); + void OfflineLock() EXCLUSIVE_LOCK_FUNCTION(context_graph_mutex_); // In DCHECK builds, fails if this thread does not own the context's lock. - void AssertGraphOwner() const { context_graph_mutex_.AssertAcquired(); } + void AssertGraphOwner() const ASSERT_EXCLUSIVE_LOCK(context_graph_mutex_) { + context_graph_mutex_.AssertAcquired(); + } class MODULES_EXPORT GraphAutoLocker { STACK_ALLOCATED();
diff --git a/third_party/blink/renderer/modules/webcodecs/codec_logger.cc b/third_party/blink/renderer/modules/webcodecs/codec_logger.cc index ec513f8..03221cd 100644 --- a/third_party/blink/renderer/modules/webcodecs/codec_logger.cc +++ b/third_party/blink/renderer/modules/webcodecs/codec_logger.cc
@@ -3,7 +3,21 @@ // found in the LICENSE file. #include "third_party/blink/renderer/modules/webcodecs/codec_logger.h" + +#include <string> + #include "base/strings/string_util.h" +#include "media/base/media_log.h" +#include "media/base/media_log_events.h" +#include "media/base/media_log_properties.h" +#include "third_party/blink/public/platform/web_string.h" +#include "third_party/blink/public/web/web_document.h" +#include "third_party/blink/renderer/core/execution_context/execution_context.h" +#include "third_party/blink/renderer/core/frame/local_dom_window.h" +#include "third_party/blink/renderer/core/frame/local_frame.h" +#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" +#include "third_party/blink/renderer/core/workers/worker_or_worklet_global_scope.h" +#include "third_party/blink/renderer/platform/weborigin/kurl.h" namespace blink {
diff --git a/third_party/blink/renderer/modules/webcodecs/codec_logger.h b/third_party/blink/renderer/modules/webcodecs/codec_logger.h index 2d389c1..5d3f9fd5 100644 --- a/third_party/blink/renderer/modules/webcodecs/codec_logger.h +++ b/third_party/blink/renderer/modules/webcodecs/codec_logger.h
@@ -6,17 +6,22 @@ #define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBCODECS_CODEC_LOGGER_H_ #include <memory> +#include <string> +#include "base/check.h" +#include "base/memory/scoped_refptr.h" +#include "base/sequence_checker.h" #include "media/base/media_log.h" +#include "base/location.h" #include "media/base/media_util.h" -#include "media/base/status.h" #include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" -#include "third_party/blink/renderer/core/frame/local_dom_window.h" -#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" +#include "third_party/blink/renderer/core/execution_context/execution_context.h" #include "third_party/blink/renderer/core/inspector/inspector_media_context_impl.h" -#include "third_party/blink/renderer/core/workers/worklet_global_scope.h" #include "third_party/blink/renderer/modules/modules_export.h" +#include "third_party/blink/renderer/platform/bindings/exception_code.h" +#include "third_party/blink/renderer/platform/heap/garbage_collected.h" +#include "third_party/blink/renderer/platform/wtf/wtf.h" namespace base { class SingleThreadTaskRunner; @@ -32,8 +37,6 @@ } // namespace internal -class ExecutionContext; - // Simple wrapper around MediaLog instances, to manage the lifetime safety of // said MediaLogs. |parent_media_log_| must be destroyed and created on the // main thread (or the worker thread if we are in a worker context).
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 0ba27fc..d7fca9a7 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2394,6 +2394,18 @@ name: "VideoRotateToFullscreen", }, { + name: "VideoTrackGenerator", + status: "test", + }, + { + name: "VideoTrackGeneratorInWindow", + status: "test", + }, + { + name: "VideoTrackGeneratorInWorker", + status: "test", + }, + { name: "VideoWakeLockOptimisationHiddenMuted", status: "stable", },
diff --git a/third_party/blink/renderer/platform/wtf/BUILD.gn b/third_party/blink/renderer/platform/wtf/BUILD.gn index 5adf5cc..7d771d6 100644 --- a/third_party/blink/renderer/platform/wtf/BUILD.gn +++ b/third_party/blink/renderer/platform/wtf/BUILD.gn
@@ -177,6 +177,7 @@ "thread_specific.h", "threading.cc", "threading.h", + "threading_primitives.cc", "threading_primitives.h", "type_traits.h", "uuid.cc", @@ -231,8 +232,6 @@ } if (is_win) { - sources += [ "threading_win.cc" ] - cflags = [ "/wd4068" ] # Unknown pragma. # Inject Visual Studio debug visualizers for our types into all targets @@ -244,8 +243,6 @@ # in generated build files. "//tools/win/DebugVisualizers/blink.natvis", ] - } else { - sources += [ "threading_pthreads.cc" ] } if (is_android) {
diff --git a/third_party/blink/renderer/platform/wtf/threading_primitives.cc b/third_party/blink/renderer/platform/wtf/threading_primitives.cc new file mode 100644 index 0000000..f2488b8d --- /dev/null +++ b/third_party/blink/renderer/platform/wtf/threading_primitives.cc
@@ -0,0 +1,60 @@ +// Copyright 2022 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/platform/wtf/threading_primitives.h" + +#include "base/check.h" +#include "base/threading/platform_thread.h" + +namespace WTF { + +void RecursiveMutex::lock() { + auto thread_id = base::PlatformThread::CurrentId(); + // Even though the thread checker doesn't complain, we are not guaranteed to + // hold the lock here. However, reading |owner_| is fine because it is only + // ever set to |CurrentId()| when the current thread owns the lock. It is + // reset to another value before releasing the lock. + // + // So the observed values can be: + // 1. Us: we hold the lock + // 2. Stale kInvalidThreadId, or some other ID: not a problem, cannot be the + // current thread ID (as it would be set by the current thread, and thus + // not stale, back to case (1)) + // 3. Partial value: not possible, std::atomic<> protects from load shearing. + if (owner_.load(std::memory_order_relaxed) != thread_id) { + lock_.Acquire(); + DCHECK_EQ(lock_depth_, 0u); + } + lock_.AssertAcquired(); + UpdateStateAfterLockAcquired(thread_id); +} + +void RecursiveMutex::unlock() { + AssertAcquired(); + CHECK_GT(lock_depth_, 0u); // No underflow. + lock_depth_--; + if (lock_depth_ == 0) { + owner_.store(base::kInvalidThreadId, std::memory_order_relaxed); + lock_.Release(); + } +} + +bool RecursiveMutex::TryLock() { + auto thread_id = base::PlatformThread::CurrentId(); + // See comment above about reading |owner_|. + if ((owner_.load(std::memory_order_relaxed) == thread_id) || lock_.Try()) { + UpdateStateAfterLockAcquired(thread_id); + return true; + } + + return false; +} + +void RecursiveMutex::UpdateStateAfterLockAcquired( + base::PlatformThreadId thread_id) { + lock_depth_++; // uint64_t, no overflow. + owner_.store(thread_id, std::memory_order_relaxed); +} + +} // namespace WTF
diff --git a/third_party/blink/renderer/platform/wtf/threading_primitives.h b/third_party/blink/renderer/platform/wtf/threading_primitives.h index 0fcfb09..61ff7dd5 100644 --- a/third_party/blink/renderer/platform/wtf/threading_primitives.h +++ b/third_party/blink/renderer/platform/wtf/threading_primitives.h
@@ -31,82 +31,24 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_THREADING_PRIMITIVES_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_THREADING_PRIMITIVES_H_ +#include <atomic> + #include "base/dcheck_is_on.h" +#include "base/gtest_prod_util.h" #include "base/synchronization/condition_variable.h" #include "base/synchronization/lock.h" #include "base/thread_annotations.h" +#include "base/threading/platform_thread.h" #include "build/build_config.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/blink/renderer/platform/wtf/wtf_export.h" -#if BUILDFLAG(IS_WIN) - -#include "base/win/windows_types.h" - -// Declare Chrome versions of some Windows structures. These are needed for -// when we need a concrete type but don't want to pull in Windows.h. We can't -// declare the Windows types so we declare our types and cast to the Windows -// types in a few places. static_asserts in threading_win.cc are used to verify -// that the sizes are correct. - -struct BLINK_CRITICAL_SECTION { - // The Windows CRITICAL_SECTION struct is 40 bytes on 64-bit and 24 bytes on - // 32-bit. The align member variable uses sizeof(void*) bytes so the buffer - // to fill out the size needs to be 32/20 bytes. This can be expressed as - // sizeof(void*) * 3 + 8. - char buffer[sizeof(void*) * 3 + 8]; - ULONG_PTR align; // Make sure the alignment requirements match. -}; - -#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#include <pthread.h> -#endif - namespace blink { class DeferredTaskHandler; } namespace WTF { -#if BUILDFLAG(IS_WIN) -struct PlatformMutex { - BLINK_CRITICAL_SECTION internal_mutex_; - size_t recursion_count_; -}; -#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -struct PlatformMutex { - pthread_mutex_t internal_mutex_; -#if DCHECK_IS_ON() - size_t recursion_count_; -#endif -}; -#endif - -class WTF_EXPORT MutexBase { - USING_FAST_MALLOC(MutexBase); - - public: - MutexBase(const MutexBase&) = delete; - MutexBase& operator=(const MutexBase&) = delete; - ~MutexBase(); - - void lock(); - void unlock(); - void AssertAcquired() const { -#if DCHECK_IS_ON() - DCHECK(mutex_.recursion_count_); -#endif - } - - public: - PlatformMutex& Impl() { return mutex_; } - - protected: - MutexBase(bool recursive); - - PlatformMutex mutex_; -}; - class ThreadCondition; // Note: Prefer base::Lock to WTF::Mutex. The implementation is the same, this @@ -132,17 +74,38 @@ // RecursiveMutex is deprecated AND WILL BE REMOVED. // https://crbug.com/856641 -class WTF_EXPORT RecursiveMutex : public MutexBase { +class LOCKABLE WTF_EXPORT RecursiveMutex { public: - bool TryLock(); + // Overridden solely for the purpose of annotating them. + // The compiler is expected to optimize the calls away. + void lock() EXCLUSIVE_LOCK_FUNCTION(); + void unlock() UNLOCK_FUNCTION(); + void AssertAcquired() const ASSERT_EXCLUSIVE_LOCK() { + // TS_UNCHECKED_READ: Either we are the owner and then the value can be + // read, or we aren't, and we are guaranteed to not see our own thread ID. + DCHECK_EQ(TS_UNCHECKED_READ(owner_), base::PlatformThread::CurrentId()); + } + bool TryLock() EXCLUSIVE_TRYLOCK_FUNCTION(true); private: // Private constructor to ensure that no new users appear. This class will be // removed. - RecursiveMutex() : MutexBase(true) {} + RecursiveMutex() = default; + void UpdateStateAfterLockAcquired(base::PlatformThreadId thread_id) + EXCLUSIVE_LOCKS_REQUIRED(lock_); + + base::Lock lock_; + // Atomic only used to avoid load shearing. + std::atomic<base::PlatformThreadId> owner_ GUARDED_BY(lock_) = + base::kInvalidThreadId; + uint64_t lock_depth_ GUARDED_BY(lock_) = 0; // DO NOT ADD any new caller. friend class ::blink::DeferredTaskHandler; + + FRIEND_TEST_ALL_PREFIXES(RecursiveMutexTest, LockUnlock); + FRIEND_TEST_ALL_PREFIXES(RecursiveMutexTest, LockUnlockRecursive); + FRIEND_TEST_ALL_PREFIXES(RecursiveMutexTest, LockUnlockThreads); }; class SCOPED_LOCKABLE MutexLocker final { @@ -199,7 +162,6 @@ } // namespace WTF using WTF::Mutex; -using WTF::MutexBase; using WTF::MutexLocker; using WTF::MutexTryLocker; using WTF::RecursiveMutex;
diff --git a/third_party/blink/renderer/platform/wtf/threading_primitives_test.cc b/third_party/blink/renderer/platform/wtf/threading_primitives_test.cc index 2393e0127..9419890 100644 --- a/third_party/blink/renderer/platform/wtf/threading_primitives_test.cc +++ b/third_party/blink/renderer/platform/wtf/threading_primitives_test.cc
@@ -6,6 +6,8 @@ #include "base/bind.h" #include "base/synchronization/waitable_event.h" +#include "base/test/bind.h" +#include "base/threading/platform_thread.h" #include "base/threading/scoped_blocking_call.h" #include "base/threading/scoped_blocking_call_internal.h" #include "base/threading/thread.h" @@ -15,6 +17,15 @@ namespace WTF { namespace { +class LambdaThreadDelegate : public base::PlatformThread::Delegate { + public: + explicit LambdaThreadDelegate(base::RepeatingClosure f) : f_(std::move(f)) {} + void ThreadMain() override { f_.Run(); } + + private: + base::RepeatingClosure f_; +}; + class MockBlockingObserver : public base::internal::BlockingObserver { public: // base::internal::BlockingObserver @@ -62,4 +73,66 @@ } } // namespace + +TEST(RecursiveMutexTest, LockUnlock) { + RecursiveMutex mutex; + mutex.lock(); + mutex.AssertAcquired(); + mutex.unlock(); +} + +// NO_THREAD_SAFTEY_ANALYSIS: The thread checker (rightfully so) doesn't like +// recursive lock acquisition. Disable it in this test. We prefer to keep lock +// checking in the production code, to at least prevent some easy recursive +// locking cases from being added. +TEST(RecursiveMutexTest, LockUnlockRecursive) NO_THREAD_SAFETY_ANALYSIS { + RecursiveMutex mutex; + mutex.lock(); + mutex.lock(); + mutex.AssertAcquired(); + mutex.unlock(); + mutex.AssertAcquired(); + mutex.unlock(); + + EXPECT_EQ(mutex.owner_, base::kInvalidThreadId); +} + +TEST(RecursiveMutexTest, LockUnlockThreads) NO_THREAD_SAFETY_ANALYSIS { + RecursiveMutex mutex; + std::atomic<bool> locked_mutex{false}; + std::atomic<bool> can_proceed{false}; + std::atomic<bool> locked_mutex_recursively{false}; + + LambdaThreadDelegate delegate{ + base::BindLambdaForTesting([&]() NO_THREAD_SAFETY_ANALYSIS { + mutex.lock(); + locked_mutex.store(true); + while (!can_proceed.load()) { + } + can_proceed.store(false); + mutex.lock(); + locked_mutex_recursively.store(true); + while (!can_proceed.load()) { + } + + mutex.unlock(); + mutex.unlock(); + })}; + base::PlatformThreadHandle handle; + base::PlatformThread::Create(0, &delegate, &handle); + + while (!locked_mutex.load()) { + } + EXPECT_FALSE(mutex.TryLock()); + can_proceed.store(true); + while (!locked_mutex_recursively.load()) { + } + EXPECT_FALSE(mutex.TryLock()); + can_proceed.store(true); + + base::PlatformThread::Join(handle); + EXPECT_TRUE(mutex.TryLock()); + mutex.unlock(); +} + } // namespace WTF
diff --git a/third_party/blink/renderer/platform/wtf/threading_pthreads.cc b/third_party/blink/renderer/platform/wtf/threading_pthreads.cc deleted file mode 100644 index fe350f7..0000000 --- a/third_party/blink/renderer/platform/wtf/threading_pthreads.cc +++ /dev/null
@@ -1,121 +0,0 @@ -/* - * Copyright (C) 2007, 2009 Apple Inc. All rights reserved. - * Copyright (C) 2007 Justin Haygood (jhaygood@reaktix.com) - * Copyright (C) 2011 Research In Motion Limited. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "third_party/blink/renderer/platform/wtf/threading.h" - -#include "build/build_config.h" - -#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) - -#include <errno.h> -#include <limits.h> -#include <sched.h> -#include <sys/time.h> -#include "base/threading/scoped_blocking_call.h" -#include "third_party/blink/renderer/platform/wtf/date_math.h" -#include "third_party/blink/renderer/platform/wtf/hash_map.h" -#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h" -#include "third_party/blink/renderer/platform/wtf/thread_specific.h" -#include "third_party/blink/renderer/platform/wtf/threading.h" -#include "third_party/blink/renderer/platform/wtf/threading_primitives.h" - -#if BUILDFLAG(IS_MAC) -#include <objc/objc-auto.h> -#endif - -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -#include <sys/syscall.h> -#endif - -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) -#include <unistd.h> -#endif - -namespace WTF { - -MutexBase::MutexBase(bool recursive) { - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype( - &attr, recursive ? PTHREAD_MUTEX_RECURSIVE : PTHREAD_MUTEX_NORMAL); - - int result = pthread_mutex_init(&mutex_.internal_mutex_, &attr); - DCHECK_EQ(result, 0); -#if DCHECK_IS_ON() - mutex_.recursion_count_ = 0; -#endif - - pthread_mutexattr_destroy(&attr); -} - -MutexBase::~MutexBase() { - int result = pthread_mutex_destroy(&mutex_.internal_mutex_); - DCHECK_EQ(result, 0); -} - -void MutexBase::lock() { - int result = pthread_mutex_lock(&mutex_.internal_mutex_); - DCHECK_EQ(result, 0); -#if DCHECK_IS_ON() - DCHECK(!mutex_.recursion_count_) - << "WTF does not support recursive mutex acquisition!"; - ++mutex_.recursion_count_; -#endif -} - -void MutexBase::unlock() { -#if DCHECK_IS_ON() - DCHECK(mutex_.recursion_count_); - --mutex_.recursion_count_; -#endif - int result = pthread_mutex_unlock(&mutex_.internal_mutex_); - DCHECK_EQ(result, 0); -} - -bool RecursiveMutex::TryLock() { - int result = pthread_mutex_trylock(&mutex_.internal_mutex_); - if (result == 0) { -#if DCHECK_IS_ON() - DCHECK(!mutex_.recursion_count_) - << "WTF does not support recursive mutex acquisition!"; - ++mutex_.recursion_count_; -#endif - return true; - } - if (result == EBUSY) - return false; - - NOTREACHED(); - return false; -} - -} // namespace WTF - -#endif // BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
diff --git a/third_party/blink/renderer/platform/wtf/threading_win.cc b/third_party/blink/renderer/platform/wtf/threading_win.cc deleted file mode 100644 index ab0b224..0000000 --- a/third_party/blink/renderer/platform/wtf/threading_win.cc +++ /dev/null
@@ -1,160 +0,0 @@ -/* - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. - * Copyright (C) 2009 Google Inc. All rights reserved. - * Copyright (C) 2009 Torch Mobile, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * There are numerous academic and practical works on how to implement - * pthread_cond_wait/pthread_cond_signal/pthread_cond_broadcast - * functions on Win32. Here is one example: - * http://www.cs.wustl.edu/~schmidt/win32-cv-1.html which is widely credited as - * a 'starting point' of modern attempts. There are several more or less proven - * implementations, one in Boost C++ library (http://www.boost.org) and another - * in pthreads-win32 (http://sourceware.org/pthreads-win32/). - * - * The number of articles and discussions is the evidence of significant - * difficulties in implementing these primitives correctly. The brief search - * of revisions, ChangeLog entries, discussions in comp.programming.threads and - * other places clearly documents numerous pitfalls and performance problems - * the authors had to overcome to arrive to the suitable implementations. - * Optimally, WebKit would use one of those supported/tested libraries - * directly. To roll out our own implementation is impractical, if even for - * the lack of sufficient testing. However, a faithful reproduction of the code - * from one of the popular supported libraries seems to be a good compromise. - * - * The early Boost implementation - * (http://www.boxbackup.org/trac/browser/box/nick/win/lib/win32/boost_1_32_0/libs/thread/src/condition.cpp?rev=30) - * is identical to pthreads-win32 - * (http://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/pthread_cond_wait.c?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=pthreads-win32). - * Current Boost uses yet another (although seemingly equivalent) algorithm - * which came from their 'thread rewrite' effort. - * - * This file includes timedWait/signal/broadcast implementations translated to - * WebKit coding style from the latest algorithm by Alexander Terekhov and - * Louis Thomas, as captured here: - * http://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/pthread_cond_wait.c?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=pthreads-win32 - * It replaces the implementation of their previous algorithm, also documented - * in the same source above. The naming and comments are left very close to - * original to enable easy cross-check. - * - * The corresponding Pthreads-win32 License is included below, and CONTRIBUTORS - * file which it refers to is added to source directory (as - * CONTRIBUTORS.pthreads-win32). - */ - -/* - * Pthreads-win32 - POSIX Threads Library for Win32 - * Copyright(C) 1998 John E. Bossom - * Copyright(C) 1999,2005 Pthreads-win32 contributors - * - * Contact Email: rpj@callisto.canberra.edu.au - * - * The current list of contributors is contained - * in the file CONTRIBUTORS included with the source - * code distribution. The list can also be seen at the - * following World Wide Web location: - * http://sources.redhat.com/pthreads-win32/contributors.html - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library in the file COPYING.LIB; - * if not, write to the Free Software Foundation, Inc., - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ - -#include "third_party/blink/renderer/platform/wtf/threading.h" - -#include "build/build_config.h" - -#if BUILDFLAG(IS_WIN) - -#include <errno.h> -#include <process.h> -#include <windows.h> -#include "base/threading/scoped_blocking_call.h" -#include "third_party/blink/renderer/platform/wtf/threading_primitives.h" - -namespace WTF { - -namespace { -static_assert(sizeof(BLINK_CRITICAL_SECTION) == sizeof(CRITICAL_SECTION), - "Definition mismatch."); - -CRITICAL_SECTION* GetCriticalSection(PlatformMutex* mutex) { - return reinterpret_cast<CRITICAL_SECTION*>(&mutex->internal_mutex_); -} - -} // namespace - -MutexBase::MutexBase(bool recursive) { - mutex_.recursion_count_ = 0; - InitializeCriticalSection(GetCriticalSection(&mutex_)); -} - -MutexBase::~MutexBase() { - DeleteCriticalSection(GetCriticalSection(&mutex_)); -} - -void MutexBase::lock() { - EnterCriticalSection(GetCriticalSection(&mutex_)); - DCHECK(!mutex_.recursion_count_) - << "WTF does not support recursive mutex acquisition!"; - ++mutex_.recursion_count_; -} - -void MutexBase::unlock() { - DCHECK(mutex_.recursion_count_); - --mutex_.recursion_count_; - LeaveCriticalSection(GetCriticalSection(&mutex_)); -} - -bool RecursiveMutex::TryLock() { - // CRITICAL_SECTION is recursive/reentrant so TryEnterCriticalSection will - // succeed if the current thread is already in the critical section. - DWORD result = TryEnterCriticalSection(GetCriticalSection(&mutex_)); - if (result == 0) { // We didn't get the lock. - return false; - } - DCHECK(!mutex_.recursion_count_) - << "WTF does not support recursive mutex acquisition!"; - ++mutex_.recursion_count_; - return true; -} - -} // namespace WTF - -#endif // BUILDFLAG(IS_WIN)
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 3e10a37..9e085918 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -7426,7 +7426,7 @@ crbug.com/1283865 external/wpt/webmessaging/without-ports/020.html [ Failure Pass ] # Sheriff 2022-01-05 -crbug.com/1284572 [ Linux ] virtual/threaded/http/tests/devtools/isolated-code-cache/same-origin-module-test.js [ Failure Pass ] +crbug.com/1284572 [ Linux ] virtual/threaded/http/tests/devtools/isolated-code-cache/same-origin-module-test.js [ Skip Failure Pass Timeout ] # Incomplete support for mouse wheel in test_driver. crbug.com/1285411 external/wpt/css/css-scroll-snap/input/mouse-wheel.html [ Timeout ] @@ -7613,3 +7613,6 @@ crbug.com/1299946 [ Mac ] external/wpt/css/css-sizing/min-content-negative-margin-crash.html [ Pass Timeout ] crbug.com/1299948 [ Mac ] external/wpt/css/css-tables/crashtests/textarea-intrinsic-size-crash.html [ Pass Timeout ] crbug.com/1299972 [ Linux ] screen_orientation/screenorientation-unsupported-no-crash.html [ Failure Pass Timeout ] + +# Sheriff 2022-02-28 +crbug.com/1301238 [ Mac ] virtual/fenced-frame-mparch/wpt_internal/fenced_frame/navigate-ancestor-top-level-fenced-frame.https.html [ Pass Timeout ]
diff --git a/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/VideoTrackGenerator.https.html b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/VideoTrackGenerator.https.html new file mode 100644 index 0000000..afcc1a0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/mediacapture-insertable-streams/VideoTrackGenerator.https.html
@@ -0,0 +1,286 @@ +<!DOCTYPE html> +<html> +<head> +<title>MediaStream Insertable Streams - VideoTrackGenerator</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="../webrtc/RTCPeerConnection-helper.js"></script> +</head> +<body> + <p class="instructions">If prompted, use the accept button to give permission to use your audio and video devices.</p> + <h1 class="instructions">Description</h1> + <p class="instructions">This test checks that generating video MediaStreamTracks from VideoTrackGenerator works as expected.</p> + <script> + + const pixelColour = [50, 100, 150, 255]; + const height = 240; + const width = 320; + function makeVideoFrame(timestamp) { + const canvas = new OffscreenCanvas(width, height); + + const ctx = canvas.getContext('2d', {alpha: false}); + ctx.fillStyle = `rgba(${pixelColour.join()})`; + ctx.fillRect(0, 0, width, height); + + return new VideoFrame(canvas, {timestamp, alpha: 'discard'}); + } + + async function getVideoFrame() { + const stream = await getNoiseStream({video: true}); + const input_track = stream.getTracks()[0]; + const processor = new MediaStreamTrackProcessor(input_track); + const reader = processor.readable.getReader(); + const result = await reader.read(); + input_track.stop(); + return result.value; + } + + function assertPixel(t, bytes, expected, epsilon = 5) { + for (let i = 0; i < bytes.length; i++) { + t.step(() => { + assert_less_than(Math.abs(bytes[i] - expected[i]), epsilon, "Mismatched pixel"); + }); + } + } + + async function initiateSingleTrackCall(t, track, output) { + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + caller.addTrack(track); + t.add_cleanup(() => track.stop()); + + exchangeIceCandidates(caller, callee); + // Wait for the first track. + const e = await exchangeOfferAndListenToOntrack(t, caller, callee); + output.srcObject = new MediaStream([e.track]); + // Exchange answer. + await exchangeAnswer(caller, callee); + await waitForConnectionStateChange(callee, ['connected']); + } + + promise_test(async t => { + const videoFrame = await getVideoFrame(); + const originalWidth = videoFrame.displayWidth; + const originalHeight = videoFrame.displayHeight; + const originalTimestamp = videoFrame.timestamp; + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + // Use a MediaStreamTrackProcessor as a sink for |generator| to verify + // that |processor| actually forwards the frames written to its writable + // field. + const processor = new MediaStreamTrackProcessor(generator); + const reader = processor.readable.getReader(); + const readerPromise = new Promise(async resolve => { + const result = await reader.read(); + assert_equals(result.value.displayWidth, originalWidth); + assert_equals(result.value.displayHeight, originalHeight); + assert_equals(result.value.timestamp, originalTimestamp); + resolve(); + }); + + generator.writable.getWriter().write(videoFrame); + return readerPromise; + }, 'Tests that VideoTrackGenerator forwards frames to sink'); + + promise_test(async t => { + const videoFrame = makeVideoFrame(1); + const originalWidth = videoFrame.displayWidth; + const originalHeight = videoFrame.displayHeight; + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + const video = document.createElement("video"); + video.autoplay = true; + video.width = 320; + video.height = 240; + video.srcObject = new MediaStream([generator.track]); + video.play(); + + // Wait for the video element to be connected to the generator and + // generate the frame. + video.onloadstart = () => generator.writable.getWriter().write(videoFrame); + + return new Promise((resolve)=> { + video.ontimeupdate = t.step_func(() => { + const canvas = document.createElement("canvas"); + canvas.width = originalWidth; + canvas.height = originalHeight; + const context = canvas.getContext('2d'); + context.drawImage(video, 0, 0); + // Pick a pixel in the centre of the video and check that it has the colour of the frame provided. + const pixel = context.getImageData(videoFrame.displayWidth/2, videoFrame.displayHeight/2, 1, 1); + assertPixel(t, pixel.data, pixelColour); + resolve(); + }); + }); + }, 'Tests that frames are actually rendered correctly in a stream used for a video element.'); + + promise_test(async t => { + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + // Write frames for the duration of the test. + const writer = generator.writable.getWriter(); + let timestamp = 0; + const intervalId = setInterval( + t.step_func(async () => { + if (generator.track.readyState === 'live') { + timestamp++; + await writer.write(makeVideoFrame(timestamp)); + } + }), + 40); + t.add_cleanup(() => clearInterval(intervalId)); + + const video = document.createElement('video'); + video.autoplay = true; + video.width = width; + video.height = height; + video.muted = true; + + await initiateSingleTrackCall(t, generator.track, video); + + return new Promise(resolve => { + video.ontimeupdate = t.step_func(() => { + const canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + const context = canvas.getContext('2d'); + context.drawImage(video, 0, 0); + // Pick a pixel in the centre of the video and check that it has the + // colour of the frame provided. + const pixel = context.getImageData(width / 2, height / 2, 1, 1); + // Encoding/decoding can add noise, so increase the threshhold to 8. + assertPixel(t, pixel.data, pixelColour, 8); + resolve(); + }); + }); + }, 'Tests that frames are actually rendered correctly in a stream sent over a peer connection.'); + + + promise_test(async t => { + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + const inputCanvas = new OffscreenCanvas(width, height); + + const inputContext = inputCanvas.getContext('2d', {alpha: false}); + // draw four quadrants + const colorUL = [255, 0, 0, 255]; + inputContext.fillStyle = `rgba(${colorUL.join()})`; + inputContext.fillRect(0, 0, width / 2, height / 2); + const colorUR = [255, 255, 0, 255]; + inputContext.fillStyle = `rgba(${colorUR.join()})`; + inputContext.fillRect(width / 2, 0, width / 2, height / 2); + const colorLL = [0, 255, 0, 255]; + inputContext.fillStyle = `rgba(${colorLL.join()})`; + inputContext.fillRect(0, height / 2, width / 2, height / 2); + const colorLR = [0, 255, 255, 255]; + inputContext.fillStyle = `rgba(${colorLR.join()})`; + inputContext.fillRect(width / 2, height / 2, width / 2, height / 2); + + // Write frames for the duration of the test. + const writer = generator.writable.getWriter(); + let timestamp = 0; + const intervalId = setInterval( + t.step_func(async () => { + if (generator.track.readyState === 'live') { + timestamp++; + await writer.write(new VideoFrame( + inputCanvas, {timestamp: timestamp, alpha: 'discard'})); + } + }), + 40); + t.add_cleanup(() => clearInterval(intervalId)); + + const caller = new RTCPeerConnection(); + t.add_cleanup(() => caller.close()); + const callee = new RTCPeerConnection(); + t.add_cleanup(() => callee.close()); + const sender = caller.addTrack(generator.track); + + exchangeIceCandidates(caller, callee); + // Wait for the first track. + const e = await exchangeOfferAndListenToOntrack(t, caller, callee); + + // Exchange answer. + await exchangeAnswer(caller, callee); + await waitForConnectionStateChange(callee, ['connected']); + const params = sender.getParameters(); + params.encodings.forEach(e => e.scaleResolutionDownBy = 2); + sender.setParameters(params); + + const processor = new MediaStreamTrackProcessor(e.track); + const reader = processor.readable.getReader(); + + // The first frame may not have had scaleResolutionDownBy applied + const numTries = 5; + for (let i = 1; i <= numTries; i++) { + const {value: outputFrame} = await reader.read(); + if (outputFrame.displayWidth !== width / 2) { + assert_less_than(i, numTries, `First ${numTries} frames were the wrong size.`); + outputFrame.close(); + continue; + } + + assert_equals(outputFrame.displayWidth, width / 2); + assert_equals(outputFrame.displayHeight, height / 2); + + const outputCanvas = new OffscreenCanvas(width / 2, height / 2); + const outputContext = outputCanvas.getContext('2d', {alpha: false}); + outputContext.drawImage(outputFrame, 0, 0); + outputFrame.close(); + // Check the four quadrants + const pixelUL = outputContext.getImageData(width / 8, height / 8, 1, 1); + assertPixel(t, pixelUL.data, colorUL); + const pixelUR = + outputContext.getImageData(width * 3 / 8, height / 8, 1, 1); + assertPixel(t, pixelUR.data, colorUR); + const pixelLL = + outputContext.getImageData(width / 8, height * 3 / 8, 1, 1); + assertPixel(t, pixelLL.data, colorLL); + const pixelLR = + outputContext.getImageData(width * 3 / 8, height * 3 / 8, 1, 1); + assertPixel(t, pixelLR.data, colorLR); + break; + } + }, 'Tests that frames are sent correctly with RTCRtpEncodingParameters.scaleResolutionDownBy.'); + + promise_test(async t => { + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + const writer = generator.writable.getWriter(); + const frame = makeVideoFrame(1); + await writer.write(frame); + + assert_equals(generator.track.kind, "video"); + assert_equals(generator.track.readyState, "live"); + }, "Tests that creating a VideoTrackGenerator works as expected"); + + promise_test(async t => { + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + const writer = generator.writable.getWriter(); + const frame = makeVideoFrame(1); + await writer.write(frame); + + assert_throws_dom("InvalidStateError", () => frame.clone(), "VideoFrame wasn't destroyed on write."); + }, "Tests that VideoFrames are destroyed on write."); + + promise_test(async t => { + const generator = new VideoTrackGenerator(); + t.add_cleanup(() => generator.track.stop()); + + const writer = generator.writable.getWriter(); + const frame = makeVideoFrame(1); + assert_throws_js(TypeError, writer.write(frame)); + }, "Mismatched frame and generator kind throws on write."); + + </script> +</body> +</html>
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 f303be3..f61691b 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
@@ -1615,6 +1615,13 @@ getter hasBeenActive getter isActive method constructor +interface VideoTrackGenerator + attribute @@toStringTag + getter muted + getter track + getter writable + method constructor + setter muted interface WebGL2RenderingContext attribute @@toStringTag attribute ACTIVE_ATTRIBUTES
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt index 9ff0ebef..0adfe95 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-dedicated-worker-expected.txt
@@ -1841,6 +1841,13 @@ [Worker] method close [Worker] method constructor [Worker] method copyTo +[Worker] interface VideoTrackGenerator +[Worker] attribute @@toStringTag +[Worker] getter muted +[Worker] getter track +[Worker] getter writable +[Worker] method constructor +[Worker] setter muted [Worker] interface WakeLock [Worker] attribute @@toStringTag [Worker] method constructor
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 2ee5f699..e67f23cf 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
@@ -9270,6 +9270,13 @@ getter sourceBuffer method constructor setter selected +interface VideoTrackGenerator + attribute @@toStringTag + getter muted + getter track + getter writable + method constructor + setter muted interface VideoTrackList : EventTarget attribute @@toStringTag getter length
diff --git a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt index 69baadc..f9304b5 100644 --- a/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt +++ b/third_party/blink/web_tests/webexposed/global-interface-listing-shared-worker-expected.txt
@@ -1494,6 +1494,13 @@ [Worker] getter hasBeenActive [Worker] getter isActive [Worker] method constructor +[Worker] interface VideoTrackGenerator +[Worker] attribute @@toStringTag +[Worker] getter muted +[Worker] getter track +[Worker] getter writable +[Worker] method constructor +[Worker] setter muted [Worker] interface WebGL2RenderingContext [Worker] attribute @@toStringTag [Worker] attribute ACTIVE_ATTRIBUTES
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 656b3f8..270e0bfb 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -49,9 +49,9 @@ # generate publicly advertised non-Official builds which are not allowed # to have proprietary codecs enabled. 'chromium': { - 'android-archive-rel': 'android_without_codecs_release_bot_minimal_symbols', - 'android-archive-dbg': 'android_without_codecs_debug_bot', - 'android-official': 'android_official_optimize_goma', + 'android-archive-rel': 'android_without_codecs_release_bot_minimal_symbols_reclient', + 'android-archive-dbg': 'android_without_codecs_debug_bot_reclient', + 'android-official': 'android_official_optimize_reclient', 'fuchsia-official': 'fuchsia_official_optimize_goma', 'linux-archive-rel': 'release_bot_reclient', 'linux-archive-dbg': 'debug_bot_reclient', @@ -84,8 +84,8 @@ 'Deterministic Android': 'android_without_codecs_release_bot_minimal_symbols', 'Deterministic Android (dbg)': 'android_debug_bot', - 'android-arm64-proguard-rel': 'android_release_bot_minimal_symbols_arm64_webview_google', - 'android-bfcache-rel': 'android_release_bot_minimal_symbols', + 'android-arm64-proguard-rel': 'android_release_bot_minimal_symbols_arm64_webview_google_reclient', + 'android-bfcache-rel': 'android_release_bot_minimal_symbols_reclient', 'android-binary-size-generator': 'android_binary_size', 'android-cronet-arm-dbg': 'android_cronet_debug_static_bot_arm_no_neon_reclient', 'android-cronet-arm-rel': 'android_cronet_release_bot_minimal_symbols_arm_no_neon_reclient', @@ -101,18 +101,18 @@ # on the chromium.gpu waterfall, which it mirrors via trybots.pyl. 'android-marshmallow-arm64-rel': 'gpu_tests_android_release_bot_minimal_symbols_arm64_fastbuild_reclient', - 'android-marshmallow-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google', - 'android-marshmallow-x86-rel-non-cq': 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google', + 'android-marshmallow-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google_reclient', + 'android-marshmallow-x86-rel-non-cq': 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google_reclient', # TODO(crbug/1182468) Remove android coverage bots after coverage is # running on CQ. - 'android-pie-arm64-coverage-experimental-rel': 'android_release_bot_arm64_webview_monochrome_expectations', - 'android-pie-arm64-rel': 'android_release_bot_minimal_symbols_arm64_webview_monochrome', - 'android-pie-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome', + 'android-pie-arm64-coverage-experimental-rel': 'android_release_bot_arm64_webview_monochrome_expectations_reclient', + 'android-pie-arm64-rel': 'android_release_bot_minimal_symbols_arm64_webview_monochrome_reclient', + 'android-pie-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome_reclient', 'android-weblayer-with-aosp-webview-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_disable_proguard_chrome_google', # Use webview_monochrome as this builder triggers tests on Android O & P 'android-weblayer-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_disable_proguard_webview_monochrome', - 'android-10-arm64-rel': 'android_release_bot_minimal_symbols_arm64_fastbuild_webview_trichrome', - 'android-11-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_trichrome', + 'android-10-arm64-rel': 'android_release_bot_minimal_symbols_arm64_fastbuild_webview_trichrome_reclient', + 'android-11-x86-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_trichrome_reclient', }, 'chromium.android.fyi': { @@ -121,7 +121,7 @@ 'Android WebView P FYI (rel)': 'android_release_bot_minimal_symbols_arm64_webview_monochrome_reclient', 'android-12-x64-fyi-rel': 'android_release_bot_minimal_symbols_x64_fastbuild_webview_trichrome', 'android-annotator-rel': 'android_release_bot_minimal_symbols_arm64_webview_google', - 'android-pie-arm64-wpt-rel-non-cq': 'android_release_bot_minimal_symbols_arm64_webview_monochrome', + 'android-pie-arm64-wpt-rel-non-cq': 'android_release_bot_minimal_symbols_arm64_webview_monochrome_reclient', 'android-chrome-pie-x86-wpt-fyi-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome', 'android-weblayer-pie-x86-wpt-fyi-rel': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome', 'android-weblayer-pie-x86-wpt-smoketest': 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome', @@ -317,8 +317,8 @@ 'Win x64 Builder (reclient)': 'gpu_tests_release_bot_minimal_symbols_reclient', 'Win x64 Builder (reclient compare)': 'gpu_tests_release_bot_minimal_symbols_reclient', 'Win x64 Builder (reclient)(cross)': 'gpu_tests_release_bot_minimal_symbols_reclient_win_cross', - 'android-code-coverage': 'gpu_tests_android_release_bot_minimal_symbols_arm64_fastbuild_java_coverage', - 'android-code-coverage-native': 'gpu_tests_android_release_bot_no_symbols_arm64_fastbuild_native_coverage', + 'android-code-coverage': 'gpu_tests_android_release_bot_minimal_symbols_arm64_fastbuild_java_coverage_reclient', + 'android-code-coverage-native': 'gpu_tests_android_release_bot_no_symbols_arm64_fastbuild_native_coverage_reclient', 'android-backuprefptr-arm-fyi-rel': 'release_trybot_backuprefptr_arm', 'android-backuprefptr-arm64-fyi-rel': 'release_trybot_backuprefptr_arm64', 'chromeos-amd64-generic-rel (reclient)': 'chromeos_amd64-generic_use_fake_dbus_clients_reclient', @@ -556,7 +556,7 @@ 'WebKit Linux ASAN': 'asan_lsan_release_bot_blink_reclient', 'WebKit Linux Leak': 'release_bot_blink_reclient', 'WebKit Linux MSAN': 'msan_release_bot_blink_reclient', - 'android-asan': 'android_clang_asan_release_bot', + 'android-asan': 'android_clang_asan_release_bot_reclient', 'linux-ubsan-vptr': 'ubsan_vptr_release_bot', 'win-asan': 'asan_clang_fuzzer_static_v8_heap_minimal_symbols_release', }, @@ -1276,8 +1276,8 @@ 'android', 'clang', 'asan', 'debug_bot_reclient', 'strip_debug_info', ], - 'android_clang_asan_release_bot': [ - 'android', 'clang', 'asan', 'release_bot', 'strip_debug_info', 'minimal_symbols', + 'android_clang_asan_release_bot_reclient': [ + 'android', 'clang', 'asan', 'release_bot_reclient', 'strip_debug_info', 'minimal_symbols', ], 'android_clang_asan_release_trybot': [ @@ -1455,8 +1455,8 @@ 'android', 'incremental', 'debug_bot_reclient', ], - 'android_official_optimize_goma': [ - 'official_optimize_goma', 'android_without_codecs', + 'android_official_optimize_reclient': [ + 'official_optimize_reclient', 'android_without_codecs', ], 'android_official_optimize_goma_trybot': [ @@ -1467,13 +1467,17 @@ 'android', 'release_bot', 'minimal_symbols', 'strip_debug_info', ], + 'android_release_bot_minimal_symbols_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'strip_debug_info', + ], + 'android_release_bot_minimal_symbols_arm64_reclient': [ 'android', 'release_bot_reclient', 'minimal_symbols', 'arm64', 'strip_debug_info', ], - 'android_release_bot_minimal_symbols_arm64_fastbuild_webview_trichrome': [ - 'android', 'release_bot', 'minimal_symbols', 'arm64', + 'android_release_bot_minimal_symbols_arm64_fastbuild_webview_trichrome_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'arm64', 'strip_debug_info', 'android_fastbuild', 'webview_trichrome', ], @@ -1492,9 +1496,9 @@ 'strip_debug_info', 'webview_google', ], - 'android_release_bot_minimal_symbols_arm64_webview_monochrome': [ - 'android', 'release_bot', 'minimal_symbols', 'arm64', - 'strip_debug_info', 'webview_monochrome', + 'android_release_bot_minimal_symbols_arm64_webview_google_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'arm64', + 'strip_debug_info', 'webview_google', ], 'android_release_bot_minimal_symbols_arm64_webview_monochrome_reclient': [ @@ -1514,8 +1518,8 @@ 'chrome_google' ], - 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google': [ - 'android', 'release_bot', 'minimal_symbols', 'x86', + 'android_release_bot_minimal_symbols_x86_fastbuild_resource_allowlisting_webview_google_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'x86', 'android_fastbuild', 'strip_debug_info', 'webview_google', ], @@ -1524,8 +1528,13 @@ 'strip_debug_info', 'android_fastbuild', 'webview_monochrome', ], - 'android_release_bot_minimal_symbols_x86_fastbuild_webview_trichrome': [ - 'android', 'release_bot', 'minimal_symbols', 'x86', + 'android_release_bot_minimal_symbols_x86_fastbuild_webview_monochrome_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'x86', + 'strip_debug_info', 'android_fastbuild', 'webview_monochrome', + ], + + 'android_release_bot_minimal_symbols_x86_fastbuild_webview_trichrome_reclient': [ + 'android', 'release_bot_reclient', 'minimal_symbols', 'x86', 'strip_debug_info', 'android_fastbuild', 'webview_trichrome', ], @@ -1566,8 +1575,8 @@ # TODO(crbug/1182468) Remove these android coverage expectations after # existing CQ bot is running them. - 'android_release_bot_arm64_webview_monochrome_expectations': [ - 'android', 'release_bot', 'arm64', 'strip_debug_info', + 'android_release_bot_arm64_webview_monochrome_expectations_reclient': [ + 'android', 'release_bot_reclient', 'arm64', 'strip_debug_info', 'webview_monochrome', 'fail_on_android_expectations', ], @@ -1645,10 +1654,18 @@ 'android_without_codecs', 'debug_bot', ], + 'android_without_codecs_debug_bot_reclient': [ + 'android_without_codecs', 'debug_bot_reclient', + ], + 'android_without_codecs_release_bot_minimal_symbols': [ 'android_without_codecs', 'release_bot', 'minimal_symbols', 'strip_debug_info', ], + 'android_without_codecs_release_bot_minimal_symbols_reclient': [ + 'android_without_codecs', 'release_bot_reclient', 'minimal_symbols', 'strip_debug_info', + ], + 'android_without_codecs_release_trybot': [ 'android_without_codecs', 'release_trybot', 'strip_debug_info', ], @@ -2320,16 +2337,16 @@ 'webview_google', ], - 'gpu_tests_android_release_bot_minimal_symbols_arm64_fastbuild_java_coverage': [ - 'gpu_tests', 'android', 'release_bot', 'minimal_symbols', 'arm64', + 'gpu_tests_android_release_bot_minimal_symbols_arm64_fastbuild_java_coverage_reclient': [ + 'gpu_tests', 'android', 'release_bot_reclient', 'minimal_symbols', 'arm64', 'resource_allowlisting', 'static_angle', 'android_fastbuild', 'webview_google', 'android_no_proguard', 'use_java_coverage', ], # No symbols to prevent linker file too large error on # android_webview_unittests target. - 'gpu_tests_android_release_bot_no_symbols_arm64_fastbuild_native_coverage': [ - 'gpu_tests', 'android', 'release_bot', 'arm64', + 'gpu_tests_android_release_bot_no_symbols_arm64_fastbuild_native_coverage_reclient': [ + 'gpu_tests', 'android', 'release_bot_reclient', 'arm64', 'resource_allowlisting', 'static_angle', 'android_fastbuild', 'webview_google', 'android_no_proguard', 'use_clang_coverage', ], @@ -3873,6 +3890,10 @@ 'mixins': ['official_optimize', 'goma'], }, + 'official_optimize_reclient': { + 'mixins': ['official_optimize', 'reclient'], + }, + 'official_optimize_goma_trybot': { 'mixins': ['official_optimize_goma', 'minimal_symbols', 'dcheck_always_on'], },
diff --git a/tools/mb/mb_config_expectations/chromium.android.fyi.json b/tools/mb/mb_config_expectations/chromium.android.fyi.json index 55672ed..9638943 100644 --- a/tools/mb/mb_config_expectations/chromium.android.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.android.fyi.json
@@ -106,7 +106,8 @@ "system_webview_package_name": "com.google.android.apps.chrome", "target_cpu": "arm64", "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-weblayer-pie-x86-wpt-fyi-rel": {
diff --git a/tools/mb/mb_config_expectations/chromium.android.json b/tools/mb/mb_config_expectations/chromium.android.json index c094e41..bb481ef 100644 --- a/tools/mb/mb_config_expectations/chromium.android.json +++ b/tools/mb/mb_config_expectations/chromium.android.json
@@ -117,7 +117,8 @@ "target_cpu": "arm64", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-11-x86-rel": { @@ -134,7 +135,8 @@ "target_cpu": "x86", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-arm64-proguard-rel": { @@ -149,7 +151,8 @@ "system_webview_package_name": "com.google.android.webview", "target_cpu": "arm64", "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-bfcache-rel": { @@ -162,7 +165,8 @@ "strip_debug_info": true, "symbol_level": 1, "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-binary-size-generator": { @@ -457,7 +461,8 @@ "target_cpu": "x86", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-marshmallow-x86-rel-non-cq": { @@ -474,7 +479,8 @@ "target_cpu": "x86", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-pie-arm64-coverage-experimental-rel": { @@ -489,7 +495,8 @@ "system_webview_package_name": "com.google.android.apps.chrome", "target_cpu": "arm64", "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-pie-arm64-rel": { @@ -504,7 +511,8 @@ "system_webview_package_name": "com.google.android.apps.chrome", "target_cpu": "arm64", "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-pie-x86-rel": { @@ -521,7 +529,8 @@ "target_cpu": "x86", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-weblayer-with-aosp-webview-x86-rel": {
diff --git a/tools/mb/mb_config_expectations/chromium.fyi.json b/tools/mb/mb_config_expectations/chromium.fyi.json index 664213e..312e0019 100644 --- a/tools/mb/mb_config_expectations/chromium.fyi.json +++ b/tools/mb/mb_config_expectations/chromium.fyi.json
@@ -438,8 +438,9 @@ "target_cpu": "arm64", "target_os": "android", "use_errorprone_java_compiler": false, - "use_goma": true, "use_jacoco_coverage": true, + "use_rbe": true, + "use_remoteexec": true, "use_static_angle": true } }, @@ -458,7 +459,8 @@ "target_os": "android", "use_clang_coverage": true, "use_errorprone_java_compiler": false, - "use_goma": true, + "use_rbe": true, + "use_remoteexec": true, "use_static_angle": true } },
diff --git a/tools/mb/mb_config_expectations/chromium.json b/tools/mb/mb_config_expectations/chromium.json index 4efef380..0bfacd7a 100644 --- a/tools/mb/mb_config_expectations/chromium.json +++ b/tools/mb/mb_config_expectations/chromium.json
@@ -5,7 +5,8 @@ "is_debug": true, "symbol_level": 1, "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-archive-rel": { @@ -16,14 +17,16 @@ "strip_debug_info": true, "symbol_level": 1, "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "android-official": { "gn_args": { "is_official_build": true, "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "fuchsia-official": {
diff --git a/tools/mb/mb_config_expectations/chromium.memory.json b/tools/mb/mb_config_expectations/chromium.memory.json index 4c291b2..e22f971 100644 --- a/tools/mb/mb_config_expectations/chromium.memory.json +++ b/tools/mb/mb_config_expectations/chromium.memory.json
@@ -130,7 +130,8 @@ "strip_debug_info": true, "symbol_level": 1, "target_os": "android", - "use_goma": true + "use_rbe": true, + "use_remoteexec": true } }, "linux-ubsan-vptr": {
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 56cb50c..215c939 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -37325,6 +37325,9 @@ <int value="4170" label="BlobStoreAccessUnknownTopLevelSite"/> <int value="4171" label="CrossOriginAccessBasedOnDocumentDomain"/> <int value="4172" label="CookieWithTruncatingChar"/> + <int value="4173" label="VideoTrackGenerator"/> + <int value="4174" label="MediaCapabilitiesDecodingInfoWebrtc"/> + <int value="4175" label="MediaCapabilitiesEncodingInfoWebrtc"/> </enum> <enum name="FeaturePolicyAllowlistType"> @@ -53306,6 +53309,7 @@ label="ContextualSearchThinWebViewImplementation:enabled"/> <int value="-822237807" label="UnifiedSidePanel:enabled"/> <int value="-821635312" label="EyeDropper:enabled"/> + <int value="-820676825" label="MessagesPreinstall:enabled"/> <int value="-820041355" label="enable-transition-compositing"/> <int value="-819165158" label="ScrollableTabStripButtons:enabled"/> <int value="-816984237" label="OfflinePagesAsyncDownload:enabled"/> @@ -54083,6 +54087,7 @@ <int value="-262122630" label="ArcEnableDocumentsProviderInFilesApp:enabled"/> <int value="-261398170" label="ChromeLabs:enabled"/> <int value="-258081634" label="AutofillAssistantDirectActions:disabled"/> + <int value="-257600773" label="MessagesPreinstall:disabled"/> <int value="-257478609" label="TextfieldFocusOnTapUp:enabled"/> <int value="-256940675" label="HelpAppSearchServiceIntegration:disabled"/> <int value="-256923848" label="ProfilesUIRevamp:disabled"/>
diff --git a/tools/perf/expectations.config b/tools/perf/expectations.config index 79572f0b..1d4a90e 100644 --- a/tools/perf/expectations.config +++ b/tools/perf/expectations.config
@@ -617,6 +617,7 @@ crbug.com/1211795 [ mac ] v8.browsing_desktop/browse:media:pinterest:2018 [ Skip ] crbug.com/1211795 [ mac ] v8.browsing_desktop/browse:social:twitter_infinite_scroll:2018 [ Skip ] crbug.com/1211795 [ mac ] v8.browsing_desktop/browse:social:facebook_infinite_scroll:2018 [ Skip ] +crbug.com/1301254 [ linux ] v8.browsing_desktop/browse:tools:sheets:2019 [ Skip ] # Benchmark v8.browsing_desktop-future (keep in sync with v8.browsing_desktop above) crbug.com/788796 [ linux ] v8.browsing_desktop-future/browse:media:imgur [ Skip ] @@ -650,6 +651,8 @@ crbug.com/1211795 [ mac ] v8.browsing_desktop-future/browse:media:pinterest:2018 [ Skip ] crbug.com/1211795 [ mac ] v8.browsing_desktop-future/browse:social:twitter_infinite_scroll:2018 [ Skip ] crbug.com/1211795 [ mac ] v8.browsing_desktop-future/browse:social:facebook_infinite_scroll:2018 [ Skip ] +crbug.com/1301253 [ linux ] v8.browsing_desktop-future/browse:media:youtubetv:2019 [ Skip ] +crbug.com/1301254 [ linux ] v8.browsing_desktop-future/browse:tools:sheets:2019 [ Skip ] # Benchmark: v8.browsing_mobile (keep in sync with v8.browsing_mobile-future below) crbug.com/958034 [ android-go android-webview ] v8.browsing_mobile/* [ Skip ]
diff --git a/ui/accessibility/ax_event_generator.cc b/ui/accessibility/ax_event_generator.cc index 7b124e902..3d5dd41 100644 --- a/ui/accessibility/ax_event_generator.cc +++ b/ui/accessibility/ax_event_generator.cc
@@ -270,7 +270,16 @@ if (node->GetRole() == ax::mojom::Role::kInlineTextBox) return; - DCHECK(tree_->event_data()); + // Extra Mac node creation and deletion in `AXTableInfo` directly call AXTree + // observer methods, which skips all unserialization logic found in + // `AXTree::Unserialize`. + // + // It only makes sense to generate events when we are called here within + // `AXTree::Unserialize`. The below condition also guards against any future + // callers of this type, whether Mac or not. + if (!tree_->event_data()) + return; + std::set<EventParams>& node_events = tree_events_[node->id()]; node_events.emplace(event, tree_->event_data()->event_from, tree_->event_data()->event_from_action, @@ -823,16 +832,6 @@ bool root_changed, const std::vector<Change>& changes) { DCHECK_EQ(tree_, tree); - - // Extra Mac nodes directly call AXTreeObserver::OnAtomicUpdateFinished, which - // skips all unserialization logic, including those used in AXEventGenerator. - // - // It only makes sense to generate events when we are called here within - // AXTree::Unserialize. The below condition also guards against any future - // callers of this type, whether Mac or not. - if (!tree_->event_data()) - return; - DCHECK(tree->root()); if (root_changed && ShouldFireLoadEvents(tree->root())) {
diff --git a/ui/accessibility/extensions/chromevoxclassic/testing/chromevox_unittest_base.js b/ui/accessibility/extensions/chromevoxclassic/testing/chromevox_unittest_base.js index 884d376..ba8580cc 100644 --- a/ui/accessibility/extensions/chromevoxclassic/testing/chromevox_unittest_base.js +++ b/ui/accessibility/extensions/chromevoxclassic/testing/chromevox_unittest_base.js
@@ -52,13 +52,6 @@ browsePreload: DUMMY_URL, /** - * @override - * It doesn't make sense to run the accessibility audit on these tests, - * since many of them are deliberately testing inaccessible html. - */ - runAccessibilityChecks: false, - - /** * Loads some inlined html into the body of the current document, replacing * whatever was there previously. * @param {string} html The html to load as a string.
diff --git a/ui/accessibility/platform/ax_platform_node_base.cc b/ui/accessibility/platform/ax_platform_node_base.cc index 4212277..22db5729 100644 --- a/ui/accessibility/platform/ax_platform_node_base.cc +++ b/ui/accessibility/platform/ax_platform_node_base.cc
@@ -764,6 +764,12 @@ return delegate_->GetNameFrom(); } +bool AXPlatformNodeBase::HasNameFromOtherElement() const { + ax::mojom::NameFrom nameFrom = GetNameFrom(); + return nameFrom == ax::mojom::NameFrom::kCaption || + nameFrom == ax::mojom::NameFrom::kRelatedElement; +} + // static AXPlatformNodeBase* AXPlatformNodeBase::FromNativeViewAccessible( gfx::NativeViewAccessible accessible) {
diff --git a/ui/accessibility/platform/ax_platform_node_base.h b/ui/accessibility/platform/ax_platform_node_base.h index 3034c0ca..6052daff 100644 --- a/ui/accessibility/platform/ax_platform_node_base.h +++ b/ui/accessibility/platform/ax_platform_node_base.h
@@ -194,6 +194,8 @@ ax::mojom::NameFrom GetNameFrom() const; + bool HasNameFromOtherElement() const; + // Returns the selection container if inside one. AXPlatformNodeBase* GetSelectionContainer() const;
diff --git a/ui/accessibility/platform/ax_platform_node_cocoa.h b/ui/accessibility/platform/ax_platform_node_cocoa.h index f429446..ed74a6d 100644 --- a/ui/accessibility/platform/ax_platform_node_cocoa.h +++ b/ui/accessibility/platform/ax_platform_node_cocoa.h
@@ -38,6 +38,13 @@ // Returns true if this accessible element should be included into the ax tree. - (BOOL)isIncludedInPlatformTree; +// Returns an accessible element serving as a title UI element, an element +// representing the accessible name of the object and which is exposed via +// accessibilityTitleUIElement (or AXTitleUIElement legacy attribute) not via +// accessibilityTitle (or legacy AXTitle attribute) or accessibilityLabel +// (legacy AXDescription attribute). +- (id)titleUIElement; + // Maps AX roles to native roles. Returns NSAccessibilityUnknownRole if not // found. + (NSString*)nativeRoleFromAXRole:(ax::mojom::Role)role;
diff --git a/ui/accessibility/platform/ax_platform_node_cocoa.mm b/ui/accessibility/platform/ax_platform_node_cocoa.mm index 7c3888b..5e83c6e 100644 --- a/ui/accessibility/platform/ax_platform_node_cocoa.mm +++ b/ui/accessibility/platform/ax_platform_node_cocoa.mm
@@ -452,6 +452,36 @@ !_node->IsInvisibleOrIgnored(); } +- (id)titleUIElement { + // True only if it's a control, if there's a single label, and the label has + // nonempty text. + + // VoiceOver ignores TitleUIElement if the element isn't a control. + if (!ui::IsControl(_node->GetRole())) + return nil; + + if (!_node->HasNameFromOtherElement()) { + return nil; + } + + std::vector<int32_t> labelledby_ids = + _node->GetIntListAttribute(ax::mojom::IntListAttribute::kLabelledbyIds); + if (labelledby_ids.size() != 1) + return nil; + + ui::AXPlatformNode* label = + _node->GetDelegate()->GetFromNodeID(labelledby_ids[0]); + if (!label) + return nil; + + // No title UI element if the label's name is empty. + std::string labelName = label->GetDelegate()->GetName(); + if (labelName.empty()) + return nil; + + return label->GetNativeViewAccessible(); +} + + (NSString*)nativeRoleFromAXRole:(ax::mojom::Role)role { static const base::NoDestructor<RoleMap> role_map(BuildRoleMap()); RoleMap::const_iterator it = role_map->find(role); @@ -887,9 +917,14 @@ ]]; } + // KeyShortcuts if (_node->HasStringAttribute(ax::mojom::StringAttribute::kKeyShortcuts)) [axAttributes addObject:NSAccessibilityKeyShortcutsValueAttribute]; + // TitleUIElement + if ([self titleUIElement]) + [axAttributes addObject:NSAccessibilityTitleUIElementAttribute]; + return axAttributes.autorelease(); } @@ -1405,6 +1440,10 @@ return [self getName]; } +- (id)AXTitleUIElement { + return [self accessibilityTitleUIElement]; +} + - (NSString*)AXDescription { return [self AXTitle]; } @@ -1988,6 +2027,17 @@ return [ret count] ? ret : nil; } +// +// NSAccessibility protocol: configuring linkage elements. +// + +- (id)accessibilityTitleUIElement { + if (![self instanceActive]) + return nil; + + return [self titleUIElement]; +} + // MathML attributes. // TODO(crbug.com/1051115): The MathML aam considers only in-flow children. // TODO(crbug.com/1051115): When/if it is needed to expose this for other a11y
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc index 7a6ba2d0..b942b9520 100644 --- a/ui/accessibility/platform/ax_platform_node_win.cc +++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -6518,9 +6518,6 @@ case ax::mojom::Role::kUnknown: return ROLE_SYSTEM_PANE; } - - NOTREACHED(); - return ROLE_SYSTEM_GROUPING; } AXPlatformNodeWin* AXPlatformNodeWin::GetParentPlatformNodeWin() const {
diff --git a/ui/accessibility/platform/inspect/ax_inspect_utils_mac.mm b/ui/accessibility/platform/inspect/ax_inspect_utils_mac.mm index e51ff3b..630e601a 100644 --- a/ui/accessibility/platform/inspect/ax_inspect_utils_mac.mm +++ b/ui/accessibility/platform/inspect/ax_inspect_utils_mac.mm
@@ -77,6 +77,7 @@ NSAccessibilityPopupValueAttribute, NSAccessibilityRequiredAttributeChrome, NSAccessibilityRoleDescriptionAttribute, + NSAccessibilityTitleUIElementAttribute, NSAccessibilityURLAttribute, NSAccessibilityVisitedAttribute}, NSStringComparator());
diff --git a/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb b/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb index 1167163..0872fbd 100644 --- a/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb +++ b/ui/chromeos/translations/ui_chromeos_strings_en-GB.xtb
@@ -385,6 +385,7 @@ <translation id="4380245540200674032">Network <ph name="NETWORK_INDEX" /> of <ph name="NETWORK_COUNT" />, <ph name="NETWORK_NAME" />, <ph name="NETWORK_PROVIDER_NAME" />, <ph name="CONNECTION_STATUS" />, signal strength <ph name="SIGNAL_STRENGTH" />%, managed by your administrator, details</translation> <translation id="4387004326333427325">Authentication certificate rejected remotely</translation> <translation id="4394214039309501350">External link</translation> +<translation id="4401287888955153199">Extract all</translation> <translation id="4418686080762064601">Create a shortcut for your files</translation> <translation id="4425149324548788773">My Drive</translation> <translation id="4439427728133035643">Network <ph name="NETWORK_INDEX" /> of <ph name="NETWORK_COUNT" />, <ph name="NETWORK_NAME" />, signal strength <ph name="SIGNAL_STRENGTH" />%, connect</translation>
diff --git a/ui/chromeos/translations/ui_chromeos_strings_lt.xtb b/ui/chromeos/translations/ui_chromeos_strings_lt.xtb index 68c7415c..c3983084 100644 --- a/ui/chromeos/translations/ui_chromeos_strings_lt.xtb +++ b/ui/chromeos/translations/ui_chromeos_strings_lt.xtb
@@ -385,6 +385,7 @@ <translation id="4380245540200674032"><ph name="NETWORK_INDEX" /> tinklas iš <ph name="NETWORK_COUNT" />, „<ph name="NETWORK_NAME" />“, „<ph name="NETWORK_PROVIDER_NAME" />“, <ph name="CONNECTION_STATUS" />, signalo stiprumas <ph name="SIGNAL_STRENGTH" /> %, tvarko administratorius, išsami informacija</translation> <translation id="4387004326333427325">Autentifikavimo sertifikatas atmestas nuotoliniu būdu</translation> <translation id="4394214039309501350">Išorinė nuoroda</translation> +<translation id="4401287888955153199">Išskleisti viską</translation> <translation id="4418686080762064601">Failų šaukinio kūrimas</translation> <translation id="4425149324548788773">Mano Diskas</translation> <translation id="4439427728133035643"><ph name="NETWORK_INDEX" /> tinklas iš <ph name="NETWORK_COUNT" />, „<ph name="NETWORK_NAME" />“, signalo stiprumas <ph name="SIGNAL_STRENGTH" /> %, prisijungti</translation>
diff --git a/ui/chromeos/translations/ui_chromeos_strings_mn.xtb b/ui/chromeos/translations/ui_chromeos_strings_mn.xtb index 52051a10..38ce25c 100644 --- a/ui/chromeos/translations/ui_chromeos_strings_mn.xtb +++ b/ui/chromeos/translations/ui_chromeos_strings_mn.xtb
@@ -385,6 +385,7 @@ <translation id="4380245540200674032">Сүлжээ <ph name="NETWORK_COUNT" />-н <ph name="NETWORK_INDEX" />, <ph name="NETWORK_NAME" />, <ph name="NETWORK_PROVIDER_NAME" />, <ph name="CONNECTION_STATUS" />, дохионы хүч <ph name="SIGNAL_STRENGTH" />%, таны администратор удирддаг, дэлгэрэнгүй мэдээлэл</translation> <translation id="4387004326333427325">Баталгаажуулах сертификатыг алсаас цуцалсан байна.</translation> <translation id="4394214039309501350">Гадаад холбоос</translation> +<translation id="4401287888955153199">Бүгдийг задлах</translation> <translation id="4418686080762064601">Файлууддаа товчлол үүсгэх</translation> <translation id="4425149324548788773">Миний Драйв</translation> <translation id="4439427728133035643">Сүлжээ: <ph name="NETWORK_COUNT" />-н <ph name="NETWORK_INDEX" />, <ph name="NETWORK_NAME" />, дохионы хүч <ph name="SIGNAL_STRENGTH" />%, холбогдох</translation>
diff --git a/ui/file_manager/integration_tests/file_manager/breadcrumbs.js b/ui/file_manager/integration_tests/file_manager/breadcrumbs.js index 8653c1d..5dab4ff 100644 --- a/ui/file_manager/integration_tests/file_manager/breadcrumbs.js +++ b/ui/file_manager/integration_tests/file_manager/breadcrumbs.js
@@ -522,16 +522,7 @@ const menu = ['bread-crumb', '#elider-menu', 'dialog[open]']; await remoteCall.waitForElement(appId, menu); - // Send an ArrowDown key to the drop-down menu. - const key = [menu, 'ArrowDown', false, false, false]; - chrome.test.assertTrue( - await remoteCall.callRemoteTestUtil('fakeKeyDown', appId, key)); - - // Check: the drop-down menu item should focus. - const item = ['bread-crumb', '#elider-menu .dropdown-item:focus']; - await remoteCall.waitForElement(appId, item); - - // Dispatch a <shift>-Tab key to the focused drop-down menu item. + // Dispatch a <shift>-Tab key to the drop-down menu. const result = await sendTestMessage( {name: 'dispatchTabKey', /* key modifier */ shift: true}); chrome.test.assertEq( @@ -570,16 +561,7 @@ const menu = ['bread-crumb', '#elider-menu', 'dialog[open]']; await remoteCall.waitForElement(appId, menu); - // Send an ArrowDown key to the drop-down menu. - const key = [menu, 'ArrowDown', false, false, false]; - chrome.test.assertTrue( - await remoteCall.callRemoteTestUtil('fakeKeyDown', appId, key)); - - // Check: the drop-down menu item should focus. - const item = ['bread-crumb', '#elider-menu .dropdown-item:focus']; - await remoteCall.waitForElement(appId, item); - - // Dispatch a Tab key to the focused drop-down menu item. + // Dispatch a Tab key to the drop-down menu. const result = await sendTestMessage( {name: 'dispatchTabKey', /* key modifier */ shift: false}); chrome.test.assertEq(result, 'tabKeyDispatched', 'Tab key dispatch failure');
diff --git a/ui/webui/resources/BUILD.gn b/ui/webui/resources/BUILD.gn index 9ef924cb..e4e5158 100644 --- a/ui/webui/resources/BUILD.gn +++ b/ui/webui/resources/BUILD.gn
@@ -147,7 +147,6 @@ } checked_in_dts_files = [ - "cr_components/managed_dialog/managed_dialog.d.ts", "cr_elements/cr_action_menu/cr_action_menu.d.ts", "cr_elements/cr_button/cr_button.m.d.ts", "cr_elements/cr_checkbox/cr_checkbox.m.d.ts", @@ -263,6 +262,7 @@ in_files = [ "cr_components/iph_bubble/iph_bubble.ts", "cr_components/managed_footnote/managed_footnote.ts", + "cr_components/managed_dialog/managed_dialog.ts", "cr_elements/cr_a11y_announcer/cr_a11y_announcer.ts", "cr_elements/cr_container_shadow_mixin.ts", "cr_elements/cr_nav_menu_item_style.ts",
diff --git a/ui/webui/resources/cr_components/BUILD.gn b/ui/webui/resources/cr_components/BUILD.gn index caacea9..01b6e1e0 100644 --- a/ui/webui/resources/cr_components/BUILD.gn +++ b/ui/webui/resources/cr_components/BUILD.gn
@@ -118,10 +118,7 @@ in_folder = target_gen_dir out_folder = preprocess_folder out_manifest = "$target_gen_dir/$preprocess_gen_manifest" - in_files = [ - "managed_dialog/managed_dialog.js", - "omnibox/cr_autocomplete_match_list.js", - ] + in_files = [ "omnibox/cr_autocomplete_match_list.js" ] if (is_chromeos_ash) { in_files += [ @@ -229,6 +226,7 @@ out_folder = preprocess_folder in_files = [ "iph_bubble/iph_bubble.ts", + "managed_dialog/managed_dialog.ts", "managed_footnote/managed_footnote.ts", ] } @@ -397,7 +395,6 @@ group("closure_compile") { deps = [ "color_change_listener:closure_compile", - "managed_dialog:closure_compile", "omnibox:closure_compile", ]
diff --git a/ui/webui/resources/cr_components/customize_themes/browser_proxy.ts b/ui/webui/resources/cr_components/customize_themes/browser_proxy.ts index a4bd7a8..c1500ef8 100644 --- a/ui/webui/resources/cr_components/customize_themes/browser_proxy.ts +++ b/ui/webui/resources/cr_components/customize_themes/browser_proxy.ts
@@ -7,10 +7,10 @@ * interact with the browser. */ -import {CustomizeThemesClientCallbackRouter, CustomizeThemesHandlerFactory, CustomizeThemesHandlerRemote} from './customize_themes.mojom-webui.js'; +import {CustomizeThemesClientCallbackRouter, CustomizeThemesHandlerFactory, CustomizeThemesHandlerInterface, CustomizeThemesHandlerRemote} from './customize_themes.mojom-webui.js'; export interface CustomizeThemesBrowserProxy { - handler(): CustomizeThemesHandlerRemote; + handler(): CustomizeThemesHandlerInterface; callbackRouter(): CustomizeThemesClientCallbackRouter; open(url: string): void; }
diff --git a/ui/webui/resources/cr_components/customize_themes/customize_themes.ts b/ui/webui/resources/cr_components/customize_themes/customize_themes.ts index 0edc5262..99a41ee 100644 --- a/ui/webui/resources/cr_components/customize_themes/customize_themes.ts +++ b/ui/webui/resources/cr_components/customize_themes/customize_themes.ts
@@ -21,14 +21,15 @@ import {I18nMixin} from '../../js/i18n_mixin.js'; import {CustomizeThemesBrowserProxyImpl} from './browser_proxy.js'; -import {ChromeTheme, CustomizeThemesClientCallbackRouter, CustomizeThemesHandlerRemote, Theme, ThemeType} from './customize_themes.mojom-webui.js'; +import {ChromeTheme, CustomizeThemesClientCallbackRouter, CustomizeThemesHandlerInterface, Theme, ThemeType} from './customize_themes.mojom-webui.js'; import {ThemeIconElement} from './theme_icon.js'; export interface CustomizeThemesElement { $: { autogeneratedTheme: ThemeIconElement, - colorPicker: HTMLElement, + colorPicker: HTMLInputElement, colorPickerIcon: HTMLElement, + defaultTheme: ThemeIconElement, themes: DomRepeat, }; } @@ -79,7 +80,7 @@ private chromeThemes_: Array<ChromeTheme>; private showManagedThemeDialog_: boolean; - private handler_: CustomizeThemesHandlerRemote = + private handler_: CustomizeThemesHandlerInterface = CustomizeThemesBrowserProxyImpl.getInstance().handler(); private callbackRouter_: CustomizeThemesClientCallbackRouter = CustomizeThemesBrowserProxyImpl.getInstance().callbackRouter();
diff --git a/ui/webui/resources/cr_components/customize_themes/theme_icon.ts b/ui/webui/resources/cr_components/customize_themes/theme_icon.ts index dd934076..b77fa963 100644 --- a/ui/webui/resources/cr_components/customize_themes/theme_icon.ts +++ b/ui/webui/resources/cr_components/customize_themes/theme_icon.ts
@@ -22,4 +22,10 @@ } } +declare global { + interface HTMLElementTagNameMap { + 'cr-theme-icon': ThemeIconElement; + } +} + customElements.define(ThemeIconElement.is, ThemeIconElement);
diff --git a/ui/webui/resources/cr_components/managed_dialog/BUILD.gn b/ui/webui/resources/cr_components/managed_dialog/BUILD.gn index e7a9a3b..e836bb5 100644 --- a/ui/webui/resources/cr_components/managed_dialog/BUILD.gn +++ b/ui/webui/resources/cr_components/managed_dialog/BUILD.gn
@@ -2,22 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//third_party/closure_compiler/compile_js.gni") import("//tools/polymer/html_to_js.gni") -js_type_check("closure_compile") { - is_polymer3 = true - deps = [ ":managed_dialog" ] -} - -js_library("managed_dialog") { - deps = [ - "//third_party/polymer/v3_0/components-chromium/polymer:polymer_bundled", - "//ui/webui/resources/cr_elements/cr_dialog:cr_dialog.m", - "//ui/webui/resources/js:i18n_behavior.m", - ] -} - html_to_js("web_components") { - js_files = [ "managed_dialog.js" ] + js_files = [ "managed_dialog.ts" ] }
diff --git a/ui/webui/resources/cr_components/managed_dialog/managed_dialog.d.ts b/ui/webui/resources/cr_components/managed_dialog/managed_dialog.d.ts deleted file mode 100644 index ca72987d..0000000 --- a/ui/webui/resources/cr_components/managed_dialog/managed_dialog.d.ts +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2021 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. - -interface ManagedDialogElement extends HTMLElement { - title: string; - body: string; -} - -export {ManagedDialogElement}; - -declare global { - interface HTMLElementTagNameMap { - 'managed-dialog': ManagedDialogElement; - } -}
diff --git a/ui/webui/resources/cr_components/managed_dialog/managed_dialog.js b/ui/webui/resources/cr_components/managed_dialog/managed_dialog.ts similarity index 62% rename from ui/webui/resources/cr_components/managed_dialog/managed_dialog.js rename to ui/webui/resources/cr_components/managed_dialog/managed_dialog.ts index c1960983..594708e 100644 --- a/ui/webui/resources/cr_components/managed_dialog/managed_dialog.js +++ b/ui/webui/resources/cr_components/managed_dialog/managed_dialog.ts
@@ -12,19 +12,20 @@ import '../../cr_elements/shared_vars_css.m.js'; import 'chrome://resources/polymer/v3_0/iron-icon/iron-icon.js'; -import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {html, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {I18nBehavior, I18nBehaviorInterface} from '../../js/i18n_behavior.m.js'; +import {CrDialogElement} from '../../cr_elements/cr_dialog/cr_dialog.m.js'; +import {I18nMixin} from '../../js/i18n_mixin.js'; -/** - * @constructor - * @extends {PolymerElement} - * @implements {I18nBehaviorInterface} - */ -const ManagedDialogElementBase = mixinBehaviors([I18nBehavior], PolymerElement); +export interface ManagedDialogElement { + $: { + dialog: CrDialogElement, + }; +} -/** @polymer */ -class ManagedDialogElement extends ManagedDialogElementBase { +const ManagedDialogElementBase = I18nMixin(PolymerElement); + +export class ManagedDialogElement extends ManagedDialogElementBase { static get is() { return 'managed-dialog'; } @@ -43,10 +44,18 @@ }; } - /** @private */ - onOkClick_() { + title: string; + body: string; + + private onOkClick_() { this.$.dialog.close(); } } +declare global { + interface HTMLElementTagNameMap { + 'managed-dialog': ManagedDialogElement; + } +} + customElements.define(ManagedDialogElement.is, ManagedDialogElement);
diff --git a/ui/webui/resources/cr_components/managed_footnote/managed_footnote.ts b/ui/webui/resources/cr_components/managed_footnote/managed_footnote.ts index f3bf312..eb1df209 100644 --- a/ui/webui/resources/cr_components/managed_footnote/managed_footnote.ts +++ b/ui/webui/resources/cr_components/managed_footnote/managed_footnote.ts
@@ -25,7 +25,7 @@ const ManagedFootnoteElementBase = I18nMixin(WebUIListenerMixin(PolymerElement)); -class ManagedFootnoteElement extends ManagedFootnoteElementBase { +export class ManagedFootnoteElement extends ManagedFootnoteElementBase { static get is() { return 'managed-footnote'; } @@ -81,6 +81,12 @@ } } +declare global { + interface HTMLElementTagNameMap { + 'managed-footnote': ManagedFootnoteElement; + } +} + customElements.define(ManagedFootnoteElement.is, ManagedFootnoteElement); chrome.send('observeManagedUI');