summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/chrome/browser')
-rw-r--r--chromium/chrome/browser/BUILD.gn7
-rw-r--r--chromium/chrome/browser/browser_resources.grd30
-rw-r--r--chromium/chrome/browser/extensions/BUILD.gn2
-rw-r--r--chromium/chrome/browser/extensions/api/preference/preference_apitest.cc50
-rw-r--r--chromium/chrome/browser/extensions/api/preference/preference_helpers.cc30
-rw-r--r--chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/BUILD.gn12
-rw-r--r--chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/compiled_resources2.gyp19
-rw-r--r--chromium/chrome/browser/resources/chromeos/compiled_resources2.gyp43
-rw-r--r--chromium/chrome/browser/resources/chromeos/internet_config_dialog/BUILD.gn12
-rw-r--r--chromium/chrome/browser/resources/chromeos/internet_config_dialog/compiled_resources2.gyp22
-rw-r--r--chromium/chrome/browser/resources/chromeos/internet_detail_dialog/BUILD.gn12
-rw-r--r--chromium/chrome/browser/resources/chromeos/internet_detail_dialog/compiled_resources2.gyp20
-rw-r--r--chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json3
-rw-r--r--chromium/chrome/browser/resources/feedback/js/feedback.js3
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/destination_match.js9
-rw-r--r--chromium/chrome/browser/resources/print_preview/data/destination_store.js22
-rw-r--r--chromium/chrome/browser/resources/settings/about_page/about_page.js2
-rw-r--r--chromium/chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js24
-rw-r--r--chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html6
-rw-r--r--chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js34
-rw-r--r--chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html2
-rw-r--r--chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js14
-rw-r--r--chromium/chrome/browser/resources/settings/controls/settings_dropdown_menu.html5
-rw-r--r--chromium/chrome/browser/resources/settings/date_time_page/date_time_page.html3
-rw-r--r--chromium/chrome/browser/resources/settings/date_time_page/timezone_selector.html5
-rw-r--r--chromium/chrome/browser/resources/settings/date_time_page/timezone_subpage.html7
-rw-r--r--chromium/chrome/browser/resources/settings/icons.html6
-rw-r--r--chromium/chrome/browser/resources/settings/internet_page/network_proxy_section.js10
-rw-r--r--chromium/chrome/browser/resources/settings/lifetime_browser_proxy.js2
-rw-r--r--chromium/chrome/browser/resources/settings/reset_page/compiled_resources2.gyp8
-rw-r--r--chromium/chrome/browser/resources/settings/reset_page/powerwash_dialog.js5
-rw-r--r--chromium/chrome/browser/resources/settings/settings_menu/settings_menu.html2
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc8
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/internet_config_dialog.cc6
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/internet_detail_dialog.cc7
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc4
-rw-r--r--chromium/chrome/browser/ui/webui/chromeos/network_element_localized_strings_provider.cc2
-rw-r--r--chromium/chrome/browser/ui/webui/settings/browser_lifetime_handler.cc6
-rw-r--r--chromium/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc5
39 files changed, 356 insertions, 113 deletions
diff --git a/chromium/chrome/browser/BUILD.gn b/chromium/chrome/browser/BUILD.gn
index 472d5ea3468..c61e8b60b4c 100644
--- a/chromium/chrome/browser/BUILD.gn
+++ b/chromium/chrome/browser/BUILD.gn
@@ -4521,6 +4521,13 @@ grit("resources") {
"//chrome/browser/resources/md_downloads:build",
"//chrome/browser/resources/md_history:build",
]
+ if (is_chromeos) {
+ deps += [
+ "//chrome/browser/resources/chromeos/bluetooth_pairing_dialog:build",
+ "//chrome/browser/resources/chromeos/internet_config_dialog:build",
+ "//chrome/browser/resources/chromeos/internet_detail_dialog:build",
+ ]
+ }
}
if (safe_browsing_mode > 0) {
diff --git a/chromium/chrome/browser/browser_resources.grd b/chromium/chrome/browser/browser_resources.grd
index 6297d9c291b..c25812b62a3 100644
--- a/chromium/chrome/browser/browser_resources.grd
+++ b/chromium/chrome/browser/browser_resources.grd
@@ -447,8 +447,16 @@
<include name="IDR_CRYPTOTOKEN_MANIFEST" file="resources\cryptotoken\manifest.json" type="BINDATA" />
<include name="IDR_GAIA_AUTH_MANIFEST" file="resources\gaia_auth\manifest.json" type="BINDATA" />
<if expr="chromeos">
- <include name="IDR_BLUETOOTH_PAIRING_DIALOG_HTML" file="resources\chromeos\bluetooth_pairing_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
- <include name="IDR_BLUETOOTH_PAIRING_DIALOG_JS" file="resources\chromeos\bluetooth_pairing_dialog.js" type="chrome_html" />
+ <if expr="optimize_webui">
+ <then>
+ <include name="IDR_BLUETOOTH_PAIRING_DIALOG_VULCANIZED_HTML" file="${root_gen_dir}\chrome\browser\resources\chromeos\bluetooth_pairing_dialog\vulcanized.html" use_base_dir="false" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_BLUETOOTH_PAIRING_DIALOG_CRISPER_JS" file="${root_gen_dir}\chrome\browser\resources\chromeos\bluetooth_pairing_dialog\crisper.js" use_base_dir="false" flattenhtml="true" type="BINDATA" compress="gzip" />
+ </then>
+ <else>
+ <include name="IDR_BLUETOOTH_PAIRING_DIALOG_HTML" file="resources\chromeos\bluetooth_pairing_dialog\bluetooth_pairing_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
+ <include name="IDR_BLUETOOTH_PAIRING_DIALOG_JS" file="resources\chromeos\bluetooth_pairing_dialog\bluetooth_pairing_dialog.js" type="chrome_html" />
+ </else>
+ </if>
<include name="IDR_CROSH_BUILTIN_MANIFEST" file="resources\chromeos\crosh_builtin\manifest.json" type="BINDATA" />
<include name="IDR_CRYPTOHOME_HTML" file="resources\chromeos\cryptohome.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_CRYPTOHOME_JS" file="resources\chromeos\cryptohome.js" type="BINDATA" />
@@ -468,10 +476,20 @@
<include name="IDR_ECHO_MANIFEST" file="resources\chromeos\echo\manifest.json" type="BINDATA" />
<include name="IDR_MERGE_SESSION_LOAD_HTML" file="resources\chromeos\merge_session_load.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_OS_CREDITS_HTML" file="resources\chromeos\about_os_credits.html" flattenhtml="true" type="BINDATA" />
- <include name="IDR_INTERNET_CONFIG_DIALOG_HTML" file="resources\chromeos\internet_config_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
- <include name="IDR_INTERNET_CONFIG_DIALOG_JS" file="resources\chromeos\internet_config_dialog.js" type="chrome_html" />
- <include name="IDR_INTERNET_DETAIL_DIALOG_HTML" file="resources\chromeos\internet_detail_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
- <include name="IDR_INTERNET_DETAIL_DIALOG_JS" file="resources\chromeos\internet_detail_dialog.js" type="chrome_html" />
+ <if expr="optimize_webui">
+ <then>
+ <include name="IDR_INTERNET_CONFIG_DIALOG_VULCANIZED_HTML" file="${root_gen_dir}\chrome\browser\resources\chromeos\internet_config_dialog\vulcanized.html" use_base_dir="false" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_INTERNET_CONFIG_DIALOG_CRISPER_JS" file="${root_gen_dir}\chrome\browser\resources\chromeos\internet_config_dialog\crisper.js" use_base_dir="false" flattenhtml="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_INTERNET_DETAIL_DIALOG_VULCANIZED_HTML" file="${root_gen_dir}\chrome\browser\resources\chromeos\internet_detail_dialog\vulcanized.html" use_base_dir="false" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_INTERNET_DETAIL_DIALOG_CRISPER_JS" file="${root_gen_dir}\chrome\browser\resources\chromeos\internet_detail_dialog\crisper.js" use_base_dir="false" flattenhtml="true" type="BINDATA" compress="gzip" />
+ </then>
+ <else>
+ <include name="IDR_INTERNET_CONFIG_DIALOG_HTML" file="resources\chromeos\internet_config_dialog\internet_config_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
+ <include name="IDR_INTERNET_CONFIG_DIALOG_JS" file="resources\chromeos\internet_config_dialog\internet_config_dialog.js" type="chrome_html" />
+ <include name="IDR_INTERNET_DETAIL_DIALOG_HTML" file="resources\chromeos\internet_detail_dialog\internet_detail_dialog.html" flattenhtml="true" allowexternalscript="true" type="chrome_html" />
+ <include name="IDR_INTERNET_DETAIL_DIALOG_JS" file="resources\chromeos\internet_detail_dialog\internet_detail_dialog.js" type="chrome_html" />
+ </else>
+ </if>
<include name="IDR_CERT_MANAGER_DIALOG_HTML" file="resources\chromeos\certificate_manager_dialog.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_SLOW_HTML" file="resources\chromeos\slow.html" flattenhtml="true" type="BINDATA" />
<include name="IDR_SLOW_JS" file="resources\chromeos\slow.js" type="BINDATA" />
diff --git a/chromium/chrome/browser/extensions/BUILD.gn b/chromium/chrome/browser/extensions/BUILD.gn
index a4e21df711c..6e19b623bae 100644
--- a/chromium/chrome/browser/extensions/BUILD.gn
+++ b/chromium/chrome/browser/extensions/BUILD.gn
@@ -854,6 +854,8 @@ static_library("extensions") {
"//components/proxy_config",
"//components/rappor",
"//components/resources",
+ "//components/safe_browsing:csd_proto",
+ "//components/safe_browsing:features",
"//components/safe_browsing/common:safe_browsing_prefs",
"//components/safe_browsing/db:database_manager",
"//components/search_engines",
diff --git a/chromium/chrome/browser/extensions/api/preference/preference_apitest.cc b/chromium/chrome/browser/extensions/api/preference/preference_apitest.cc
index 96ea43851f3..51d8980a312 100644
--- a/chromium/chrome/browser/extensions/api/preference/preference_apitest.cc
+++ b/chromium/chrome/browser/extensions/api/preference/preference_apitest.cc
@@ -343,7 +343,55 @@ IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, OnChangeSplit) {
listener_incognito10.Reply("ok");
EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
- EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher.message();
+ EXPECT_TRUE(catcher_incognito.GetNextResult()) << catcher_incognito.message();
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest,
+ OnChangeSplitWithNoOTRProfile) {
+ PrefService* prefs = profile_->GetPrefs();
+ prefs->SetBoolean(prefs::kBlockThirdPartyCookies, true);
+
+ extensions::ResultCatcher catcher;
+ ExtensionTestMessageListener loaded_incognito_test_listener(
+ "incognito loaded", false);
+
+ ExtensionTestMessageListener change_pref_listener("change pref value", false);
+
+ ASSERT_TRUE(
+ LoadExtensionIncognito(test_data_dir_.AppendASCII("preference")
+ .AppendASCII("onchange_split_regular_only")));
+
+ ASSERT_TRUE(change_pref_listener.WaitUntilSatisfied());
+ prefs->SetBoolean(prefs::kBlockThirdPartyCookies, false);
+
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ EXPECT_FALSE(loaded_incognito_test_listener.was_satisfied());
+ EXPECT_FALSE(profile_->HasOffTheRecordProfile());
+}
+
+IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest,
+ OnChangeSplitWithoutIncognitoAccess) {
+ PrefService* prefs = profile_->GetPrefs();
+ prefs->SetBoolean(prefs::kBlockThirdPartyCookies, true);
+
+ // Open an incognito window.
+ OpenURLOffTheRecord(profile_, GURL("chrome://newtab/"));
+ EXPECT_TRUE(profile_->HasOffTheRecordProfile());
+
+ extensions::ResultCatcher catcher;
+ ExtensionTestMessageListener loaded_incognito_test_listener(
+ "incognito loaded", false);
+
+ ExtensionTestMessageListener change_pref_listener("change pref value", false);
+
+ ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("preference")
+ .AppendASCII("onchange_split_regular_only")));
+
+ ASSERT_TRUE(change_pref_listener.WaitUntilSatisfied());
+ prefs->SetBoolean(prefs::kBlockThirdPartyCookies, false);
+
+ EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
+ EXPECT_FALSE(loaded_incognito_test_listener.was_satisfied());
}
IN_PROC_BROWSER_TEST_F(ExtensionPreferenceApiTest, DataReductionProxy) {
diff --git a/chromium/chrome/browser/extensions/api/preference/preference_helpers.cc b/chromium/chrome/browser/extensions/api/preference/preference_helpers.cc
index 3414501b336..1be40a499cc 100644
--- a/chromium/chrome/browser/extensions/api/preference/preference_helpers.cc
+++ b/chromium/chrome/browser/extensions/api/preference/preference_helpers.cc
@@ -99,8 +99,7 @@ void DispatchEventToExtensions(Profile* profile,
// TODO(bauerb): Only iterate over registered event listeners.
if (router->ExtensionHasEventListener(extension->id(), event_name) &&
extension->permissions_data()->HasAPIPermission(permission) &&
- (!incognito || IncognitoInfo::IsSplitMode(extension.get()) ||
- util::CanCrossIncognito(extension.get(), profile))) {
+ (!incognito || util::IsIncognitoEnabled(extension->id(), profile))) {
// Inject level of control key-value.
base::DictionaryValue* dict;
bool rv = args->GetDictionary(0, &dict);
@@ -112,17 +111,28 @@ void DispatchEventToExtensions(Profile* profile,
// If the extension is in incognito split mode,
// a) incognito pref changes are visible only to the incognito tabs
// b) regular pref changes are visible only to the incognito tabs if the
- // incognito pref has not alredy been set
+ // incognito pref has not already been set
Profile* restrict_to_profile = nullptr;
- bool from_incognito = false;
if (IncognitoInfo::IsSplitMode(extension.get())) {
- if (incognito && util::IsIncognitoEnabled(extension->id(), profile)) {
+ if (incognito) { // Handle case a).
+ // If off the record profile does not exist, there should be no
+ // extensions running in incognito at this time, and consequentially
+ // no need to dispatch an event restricted to an incognito extension.
+ // Furthermore, avoid calling GetOffTheRecordProfile() in this case -
+ // this method creates off the record profile if one does not exist.
+ // Unnecessarily creating off the record profile is undesirable, and
+ // can lead to a crash if incognito is disallowed for the current
+ // profile (see https://crbug.com/796814).
+ if (!profile->HasOffTheRecordProfile())
+ continue;
restrict_to_profile = profile->GetOffTheRecordProfile();
- } else if (!incognito &&
- PreferenceAPI::Get(profile)->DoesExtensionControlPref(
- extension->id(), browser_pref, &from_incognito) &&
- from_incognito) {
- restrict_to_profile = profile;
+ } else { // Handle case b).
+ bool controlled_from_incognito = false;
+ bool controlled_by_extension =
+ PreferenceAPI::Get(profile)->DoesExtensionControlPref(
+ extension->id(), browser_pref, &controlled_from_incognito);
+ if (controlled_by_extension && controlled_from_incognito)
+ restrict_to_profile = profile;
}
}
diff --git a/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/BUILD.gn b/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/BUILD.gn
new file mode 100644
index 00000000000..15d7eeb92a3
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/BUILD.gn
@@ -0,0 +1,12 @@
+import("../../optimize_webui.gni")
+
+optimize_webui("build") {
+ host = "bluetooth_pairing_dialog"
+ html_in_files = [ "bluetooth_pairing_dialog.html" ]
+ html_out_files = [ "vulcanized.html" ]
+
+ input = rebase_path(".", root_build_dir)
+ js_out_files = [ "crisper.js" ]
+
+ deps = []
+}
diff --git a/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/compiled_resources2.gyp b/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/compiled_resources2.gyp
new file mode 100644
index 00000000000..8abdc2c0cb7
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/bluetooth_pairing_dialog/compiled_resources2.gyp
@@ -0,0 +1,19 @@
+# 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.
+{
+ 'targets': [
+ {
+ 'target_name': 'bluetooth_pairing_dialog',
+ 'dependencies': [
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
+ '<(EXTERNS_GYP):bluetooth',
+ '<(EXTERNS_GYP):bluetooth_private',
+ '<(INTERFACES_GYP):bluetooth_interface',
+ '<(INTERFACES_GYP):bluetooth_private_interface',
+ ],
+ 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
+ },
+ ],
+}
diff --git a/chromium/chrome/browser/resources/chromeos/compiled_resources2.gyp b/chromium/chrome/browser/resources/chromeos/compiled_resources2.gyp
index 2aff6fece17..38d2711fbdc 100644
--- a/chromium/chrome/browser/resources/chromeos/compiled_resources2.gyp
+++ b/chromium/chrome/browser/resources/chromeos/compiled_resources2.gyp
@@ -4,44 +4,13 @@
{
'targets': [
{
- 'target_name': 'bluetooth_pairing_dialog',
+ 'target_name': 'chromeos_resources',
+ 'type': 'none',
'dependencies': [
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr',
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
- '<(EXTERNS_GYP):bluetooth',
- '<(EXTERNS_GYP):bluetooth_private',
- '<(INTERFACES_GYP):bluetooth_interface',
- '<(INTERFACES_GYP):bluetooth_private_interface',
+ 'bluetooth_pairing_dialog/compiled_resources2.gyp:*',
+ 'internet_config_dialog/compiled_resources2.gyp:*',
+ 'internet_detail_dialog/compiled_resources2.gyp:*',
],
- 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'],
},
- {
- 'target_name': 'internet_config_dialog',
- 'dependencies': [
- '<(DEPTH)/ui/webui/resources/cr_components/chromeos/network/compiled_resources2.gyp:network_config',
- '<(DEPTH)/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp:cr_onc_types',
- '<(DEPTH)/ui/webui/resources/cr_elements/cr_dialog/compiled_resources2.gyp:cr_dialog',
- '<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_network_behavior',
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
- '<(EXTERNS_GYP):chrome_send',
- '<(EXTERNS_GYP):networking_private',
- '<(INTERFACES_GYP):networking_private_interface',
- ],
- 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'],
- },
- {
- 'target_name': 'internet_detail_dialog',
- 'dependencies': [
- '<(DEPTH)/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp:cr_onc_types',
- '<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_network_behavior',
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
- '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
- '<(EXTERNS_GYP):chrome_send',
- '<(EXTERNS_GYP):networking_private',
- '<(INTERFACES_GYP):networking_private_interface',
- ],
- 'includes': ['../../../../third_party/closure_compiler/compile_js2.gypi'],
- },
- ],
+ ]
}
diff --git a/chromium/chrome/browser/resources/chromeos/internet_config_dialog/BUILD.gn b/chromium/chrome/browser/resources/chromeos/internet_config_dialog/BUILD.gn
new file mode 100644
index 00000000000..b6041a5b6ea
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/internet_config_dialog/BUILD.gn
@@ -0,0 +1,12 @@
+import("../../optimize_webui.gni")
+
+optimize_webui("build") {
+ host = "internet_config_dialog"
+ html_in_files = [ "internet_config_dialog.html" ]
+ html_out_files = [ "vulcanized.html" ]
+
+ input = rebase_path(".", root_build_dir)
+ js_out_files = [ "crisper.js" ]
+
+ deps = []
+}
diff --git a/chromium/chrome/browser/resources/chromeos/internet_config_dialog/compiled_resources2.gyp b/chromium/chrome/browser/resources/chromeos/internet_config_dialog/compiled_resources2.gyp
new file mode 100644
index 00000000000..a75a8e4f46a
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/internet_config_dialog/compiled_resources2.gyp
@@ -0,0 +1,22 @@
+# 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.
+{
+ 'targets': [
+ {
+ 'target_name': 'internet_config_dialog',
+ 'dependencies': [
+ '<(DEPTH)/ui/webui/resources/cr_components/chromeos/network/compiled_resources2.gyp:network_config',
+ '<(DEPTH)/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp:cr_onc_types',
+ '<(DEPTH)/ui/webui/resources/cr_elements/cr_dialog/compiled_resources2.gyp:cr_dialog',
+ '<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_network_behavior',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
+ '<(EXTERNS_GYP):chrome_send',
+ '<(EXTERNS_GYP):networking_private',
+ '<(INTERFACES_GYP):networking_private_interface',
+ ],
+ 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
+ },
+ ],
+}
diff --git a/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/BUILD.gn b/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/BUILD.gn
new file mode 100644
index 00000000000..a97168ca4a3
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/BUILD.gn
@@ -0,0 +1,12 @@
+import("../../optimize_webui.gni")
+
+optimize_webui("build") {
+ host = "internet_detail_dialog"
+ html_in_files = [ "internet_detail_dialog.html" ]
+ html_out_files = [ "vulcanized.html" ]
+
+ input = rebase_path(".", root_build_dir)
+ js_out_files = [ "crisper.js" ]
+
+ deps = []
+}
diff --git a/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/compiled_resources2.gyp b/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/compiled_resources2.gyp
new file mode 100644
index 00000000000..8d58322672d
--- /dev/null
+++ b/chromium/chrome/browser/resources/chromeos/internet_detail_dialog/compiled_resources2.gyp
@@ -0,0 +1,20 @@
+# 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.
+{
+ 'targets': [
+ {
+ 'target_name': 'internet_detail_dialog',
+ 'dependencies': [
+ '<(DEPTH)/ui/webui/resources/cr_elements/chromeos/network/compiled_resources2.gyp:cr_onc_types',
+ '<(DEPTH)/ui/webui/resources/cr_elements/policy/compiled_resources2.gyp:cr_policy_network_behavior',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert',
+ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior',
+ '<(EXTERNS_GYP):chrome_send',
+ '<(EXTERNS_GYP):networking_private',
+ '<(INTERFACES_GYP):networking_private_interface',
+ ],
+ 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
+ },
+ ],
+}
diff --git a/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json b/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
index 456a43640de..3478c1cc9d3 100644
--- a/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
+++ b/chromium/chrome/browser/resources/chromeos/zip_archiver/manifest.json
@@ -22,8 +22,7 @@
"directory"
]
},
- "notifications",
- "storage"
+ "notifications"
],
"file_system_provider_capabilities": {
"multipleMounts": true,
diff --git a/chromium/chrome/browser/resources/feedback/js/feedback.js b/chromium/chrome/browser/resources/feedback/js/feedback.js
index a4a37683e34..909a5e50a68 100644
--- a/chromium/chrome/browser/resources/feedback/js/feedback.js
+++ b/chromium/chrome/browser/resources/feedback/js/feedback.js
@@ -321,7 +321,8 @@ function initialize() {
}
$('description-text').textContent = feedbackInfo.description;
- $('description-text').placeholder = feedbackInfo.descriptionPlaceholder;
+ if (feedbackInfo.descriptionPlaceholder)
+ $('description-text').placeholder = feedbackInfo.descriptionPlaceholder;
if (feedbackInfo.pageUrl)
$('page-url-text').value = feedbackInfo.pageUrl;
diff --git a/chromium/chrome/browser/resources/print_preview/data/destination_match.js b/chromium/chrome/browser/resources/print_preview/data/destination_match.js
index 260a6411f31..84cb9c014cb 100644
--- a/chromium/chrome/browser/resources/print_preview/data/destination_match.js
+++ b/chromium/chrome/browser/resources/print_preview/data/destination_match.js
@@ -106,11 +106,12 @@ cr.define('print_preview', function() {
}
/**
- * @return {?print_preview.PrinterType} The printer type of this
- * destination match. Will return null for Cloud destinations.
+ * @return {!Set<?print_preview.PrinterType>} The printer types that
+ * correspond to this destination match. A null element in the set
+ * indicates the match may represent a Cloud destination.
*/
- getType() {
- return originToType(this.origins_[0]);
+ getTypes() {
+ return new Set(this.origins_.map(origin => originToType(origin)));
}
}
diff --git a/chromium/chrome/browser/resources/print_preview/data/destination_store.js b/chromium/chrome/browser/resources/print_preview/data/destination_store.js
index 975c6874f12..6bb76292b0b 100644
--- a/chromium/chrome/browser/resources/print_preview/data/destination_store.js
+++ b/chromium/chrome/browser/resources/print_preview/data/destination_store.js
@@ -530,16 +530,18 @@ cr.define('print_preview', function() {
*/
fetchMatchingDestination_(destinationMatch) {
this.autoSelectMatchingDestination_ = destinationMatch;
- const type = destinationMatch.getType();
- if (type != null) { // Local, Privet, or Extension.
- this.startLoadDestinations(type);
- } else if (
- destinationMatch.matchOrigin(
- print_preview.DestinationOrigin.COOKIES) ||
- destinationMatch.matchOrigin(
- print_preview.DestinationOrigin.DEVICE)) {
- this.startLoadCloudDestinations();
- }
+ const types = destinationMatch.getTypes();
+ types.forEach(type => {
+ if (type != null) { // Local, extension, or privet printer
+ this.startLoadDestinations(type);
+ } else if (
+ destinationMatch.matchOrigin(
+ print_preview.DestinationOrigin.COOKIES) ||
+ destinationMatch.matchOrigin(
+ print_preview.DestinationOrigin.DEVICE)) {
+ this.startLoadCloudDestinations();
+ }
+ });
}
/**
diff --git a/chromium/chrome/browser/resources/settings/about_page/about_page.js b/chromium/chrome/browser/resources/settings/about_page/about_page.js
index ac46a5686a9..beecac15534 100644
--- a/chromium/chrome/browser/resources/settings/about_page/about_page.js
+++ b/chromium/chrome/browser/resources/settings/about_page/about_page.js
@@ -417,7 +417,7 @@ Polymer({
/** @private */
onRelaunchAndPowerwashTap_: function() {
- this.lifetimeBrowserProxy_.factoryReset();
+ this.lifetimeBrowserProxy_.factoryReset(false);
},
/**
diff --git a/chromium/chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js b/chromium/chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js
index e165f6992a4..c8baa19e856 100644
--- a/chromium/chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js
+++ b/chromium/chrome/browser/resources/settings/android_apps_page/android_apps_subpage.js
@@ -19,7 +19,13 @@ Polymer({
/** @private {!AndroidAppsInfo|undefined} */
androidAppsInfo: {
type: Object,
- observer: 'onAndroidAppsInfoUpdate_',
+ },
+
+ /** @private */
+ playStoreEnabled_: {
+ type: Boolean,
+ computed: 'computePlayStoreEnabled_(androidAppsInfo)',
+ observer: 'onPlayStoreEnabledChanged_'
},
/** @private */
@@ -41,11 +47,9 @@ Polymer({
this.browserProxy_ = settings.AndroidAppsBrowserProxyImpl.getInstance();
},
- /**
- * @private
- */
- onAndroidAppsInfoUpdate_: function() {
- if (!this.androidAppsInfo.playStoreEnabled &&
+ /** @private */
+ onPlayStoreEnabledChanged_: function(enabled) {
+ if (!enabled &&
settings.getCurrentRoute() == settings.routes.ANDROID_APPS_DETAILS) {
settings.navigateToPreviousRoute();
}
@@ -55,6 +59,14 @@ Polymer({
* @return {boolean}
* @private
*/
+ computePlayStoreEnabled_: function() {
+ return this.androidAppsInfo.playStoreEnabled;
+ },
+
+ /**
+ * @return {boolean}
+ * @private
+ */
allowRemove_: function() {
return this.prefs.arc.enabled.enforcement !=
chrome.settingsPrivate.Enforcement.ENFORCED;
diff --git a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html
index bcb20f6001c..fb27688ce72 100644
--- a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html
+++ b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html
@@ -44,7 +44,9 @@
<div class="separator"></div>
<paper-toggle-button id="enableBluetooth"
checked="{{bluetoothToggleState_}}"
- disabled$="[[bluetoothToggleDisabled_]]" on-tap="stopTap_"
+ disabled$=
+ "[[!isToggleEnabled_(adapterState_, stateChangeInProgress_)]]"
+ on-tap="stopTap_"
aria-label="$i18n{bluetoothToggleA11yLabel}">
</paper-toggle-button>
</div>
@@ -56,7 +58,7 @@
<settings-bluetooth-subpage
adapter-state="[[adapterState_]]"
bluetooth-toggle-state="{{bluetoothToggleState_}}"
- bluetooth-toggle-disabled="[[bluetoothToggleDisabled_]]"
+ state-change-in-progress="[[stateChangeInProgress_]]"
bluetooth="[[bluetooth]]"
bluetooth-private="[[bluetoothPrivate]]">
</settings-bluetooth-subpage>
diff --git a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
index 674bf08c65f..73b88de9676 100644
--- a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
+++ b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_page.js
@@ -46,15 +46,14 @@ Polymer({
},
/**
- * Set to true before the adapter state is received, when the adapter is
- * unavailable, and while an adapter state change is requested. This
- * prevents user changes while a change is in progress or when the adapter
- * is not available.
+ * Set to true while an adapter state change is requested and the callback
+ * hasn't fired yet. One of the factor that determines whether to disable
+ * the toggle button.
* @private
*/
- bluetoothToggleDisabled_: {
+ stateChangeInProgress_: {
type: Boolean,
- value: true,
+ value: false,
},
/**
@@ -160,19 +159,28 @@ Polymer({
},
/**
+ * @return {boolean}
+ * @private
+ */
+ isToggleEnabled_: function() {
+ return this.adapterState_ !== undefined && this.adapterState_.available &&
+ !this.stateChangeInProgress_;
+ },
+
+ /**
* Process bluetooth.onAdapterStateChanged events.
* @param {!chrome.bluetooth.AdapterState} state
* @private
*/
onBluetoothAdapterStateChanged_: function(state) {
this.adapterState_ = state;
- this.bluetoothToggleState_ = state.powered;
- this.bluetoothToggleDisabled_ = !state.available;
+ if (this.isToggleEnabled_())
+ this.bluetoothToggleState_ = state.powered;
},
/** @private */
onTap_: function() {
- if (this.adapterState_.available === false)
+ if (!this.isToggleEnabled_())
return;
if (!this.bluetoothToggleState_)
this.bluetoothToggleState_ = true;
@@ -199,13 +207,17 @@ Polymer({
/** @private */
bluetoothToggleStateChanged_: function() {
- if (!this.adapterState_ || this.bluetoothToggleDisabled_ ||
+ if (!this.adapterState_ || !this.isToggleEnabled_() ||
this.bluetoothToggleState_ == this.adapterState_.powered) {
return;
}
- this.bluetoothToggleDisabled_ = true;
+ this.stateChangeInProgress_ = true;
this.bluetoothPrivate.setAdapterState(
{powered: this.bluetoothToggleState_}, () => {
+ // Restore the in-progress mark when the callback is called regardless
+ // of error or success.
+ this.stateChangeInProgress_ = false;
+
const error = chrome.runtime.lastError;
if (error && error != 'Error setting adapter properties: powered') {
console.error('Error enabling bluetooth: ' + error.message);
diff --git a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html
index 4174281cd80..6ca9d1b16fa 100644
--- a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html
+++ b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.html
@@ -46,7 +46,7 @@
</div>
<paper-toggle-button id="enableBluetooth"
checked="{{bluetoothToggleState}}"
- disabled$="[[bluetoothToggleDisabled]]"
+ disabled$="[[!isToggleEnabled_(adapterState, stateChangeInProgress)]]"
aria-label="$i18n{bluetoothToggleA11yLabel}"
on-tap="stopTap_">
</paper-toggle-button>
diff --git a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
index 48376567145..d8d0ef34916 100644
--- a/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
+++ b/chromium/chrome/browser/resources/settings/bluetooth_page/bluetooth_subpage.js
@@ -31,7 +31,7 @@ Polymer({
},
/** Reflects the bluetooth-page property. */
- bluetoothToggleDisabled: Boolean,
+ stateChangeInProgress: Boolean,
/**
* The bluetooth adapter state, cached by bluetooth-page.
@@ -379,7 +379,8 @@ Polymer({
* @private
*/
onEnableTap_: function(event) {
- this.bluetoothToggleState = !this.bluetoothToggleState;
+ if (this.isToggleEnabled_())
+ this.bluetoothToggleState = !this.bluetoothToggleState;
event.stopPropagation();
},
@@ -395,6 +396,15 @@ Polymer({
},
/**
+ * @return {boolean}
+ * @private
+ */
+ isToggleEnabled_: function() {
+ return this.adapterState !== undefined && this.adapterState.available &&
+ !this.stateChangeInProgress;
+ },
+
+ /**
* @param {boolean} bluetoothToggleState
* @param {!Array<!chrome.bluetooth.Device>} deviceList
* @return {boolean}
diff --git a/chromium/chrome/browser/resources/settings/controls/settings_dropdown_menu.html b/chromium/chrome/browser/resources/settings/controls/settings_dropdown_menu.html
index a675aa6f86f..4fbf5d6ac5b 100644
--- a/chromium/chrome/browser/resources/settings/controls/settings_dropdown_menu.html
+++ b/chromium/chrome/browser/resources/settings/controls/settings_dropdown_menu.html
@@ -16,8 +16,13 @@
display: inline-flex;
}
+ /* When settings-dropdown-menu is start-aligned, we probably want policy
+ * indicator to be be displayed after the dropdown.
+ * Setting --settings-dropdown-menu-policy-order to 1 will do the job.
+ */
cr-policy-pref-indicator {
margin: 0 var(--settings-controlled-by-spacing);
+ order: var(--settings-dropdown-menu-policy-order, 0);
}
/* Hide "Custom" value when unselectable. */
diff --git a/chromium/chrome/browser/resources/settings/date_time_page/date_time_page.html b/chromium/chrome/browser/resources/settings/date_time_page/date_time_page.html
index becd135bec1..c064fabcbef 100644
--- a/chromium/chrome/browser/resources/settings/date_time_page/date_time_page.html
+++ b/chromium/chrome/browser/resources/settings/date_time_page/date_time_page.html
@@ -88,7 +88,8 @@
<template is="dom-if" route-path="/dateTime/timeZone">
<settings-subpage data-route="DATETIME_TIMEZONE_SUBPAGE"
associated-control="[[$$('#timeZoneSettingsTrigger')]]"
- page-title="$i18n{timeZoneSubpageTitle}">
+ page-title="$i18n{timeZoneSubpageTitle}"
+ learn-more-url="$i18n{timeZoneSettingsLearnMoreURL}">
<timezone-subpage id="timezoneSubpage" prefs="{{prefs}}"
active-time-zone-display-name="{{activeTimeZoneDisplayName}}">
</timezone-subpage>
diff --git a/chromium/chrome/browser/resources/settings/date_time_page/timezone_selector.html b/chromium/chrome/browser/resources/settings/date_time_page/timezone_selector.html
index e2c5bd33190..dd6c68405b9 100644
--- a/chromium/chrome/browser/resources/settings/date_time_page/timezone_selector.html
+++ b/chromium/chrome/browser/resources/settings/date_time_page/timezone_selector.html
@@ -13,6 +13,11 @@
settings-dropdown-menu {
--md-select-width: 400px;
}
+ /* When per_user_timezone_enabled is true, dropdowns are start-aligned. */
+ #userTimeZoneSelector,
+ #systemTimezoneSelector {
+ --settings-dropdown-menu-policy-order: 1;
+ }
</style>
<template is="dom-if" restamp
if="[[!prefs.cros.flags.per_user_timezone_enabled.value]]">
diff --git a/chromium/chrome/browser/resources/settings/date_time_page/timezone_subpage.html b/chromium/chrome/browser/resources/settings/date_time_page/timezone_subpage.html
index 6d27dfb503e..e2953defea0 100644
--- a/chromium/chrome/browser/resources/settings/date_time_page/timezone_subpage.html
+++ b/chromium/chrome/browser/resources/settings/date_time_page/timezone_subpage.html
@@ -16,6 +16,11 @@
}
settings-dropdown-menu {
--md-select-width: 400px;
+ --settings-dropdown-menu-policy-order: 1;
+ }
+ #timeZoneResolveMethodDropdown,
+ #timezoneSelector {
+ -webkit-padding-start: 28px;
}
</style>
<div class="settings-box block first">
@@ -42,7 +47,7 @@
label="$i18n{setTimeZoneAutomaticallyOff}"
no-extension-indicator>
</controlled-radio-button>
- <timezone-selector prefs="{{prefs}}"
+ <timezone-selector id="timezoneSelector" prefs="{{prefs}}"
active-time-zone-display-name="{{activeTimeZoneDisplayName}}">
</timezone-selector>
</settings-radio-group>
diff --git a/chromium/chrome/browser/resources/settings/icons.html b/chromium/chrome/browser/resources/settings/icons.html
index 432ad8ed51e..5c035d852d8 100644
--- a/chromium/chrome/browser/resources/settings/icons.html
+++ b/chromium/chrome/browser/resources/settings/icons.html
@@ -29,6 +29,11 @@ List icons here rather than importing large sets of (e.g. Polymer) icons.
<path fill="none" d="M1 1h22v22H1z"></path>
</g>
+ <!-- Icons from https://icons.googleplex.com. -->
+<if expr="chromeos">
+ <g id="play-prism"><path fill="#5A5A5A" d="M20.18 10.88l-3.06-1.74L14.26 12l2.86 2.86 3.06-1.74c.55-.31.82-.71.82-1.12 0-.41-.27-.81-.82-1.12zM4.71 2.45l8.42 8.42 2.55-2.55-10.7-6.06c-.07-.04-.14-.07-.21-.1-.17-.07-.3.05-.15.21.03.02.06.05.09.08zm0 19.1l-.08.08c-.15.15-.02.28.15.21.07-.03.14-.06.21-.1l10.69-6.06-2.55-2.55s-7.2 7.21-8.42 8.42zM12 12L3.38 3.38c-.19-.19-.38-.07-.38.19v16.86c0 .26.19.38.38.19L12 12z"></path></g>
+</if>
+
<!--
These icons are copied from Polymer's iron-icons and kept in sorted order.
See http://goo.gl/Y1OdAq for instructions on adding additional icons.
@@ -37,7 +42,6 @@ List icons here rather than importing large sets of (e.g. Polymer) icons.
<g id="access-time"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g>
</if>
<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"></path></g>
- <g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"></path></g>
<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"></path></g>
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path></g>
<g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"></path></g>
diff --git a/chromium/chrome/browser/resources/settings/internet_page/network_proxy_section.js b/chromium/chrome/browser/resources/settings/internet_page/network_proxy_section.js
index be5d5f21fdf..1d974dec521 100644
--- a/chromium/chrome/browser/resources/settings/internet_page/network_proxy_section.js
+++ b/chromium/chrome/browser/resources/settings/internet_page/network_proxy_section.js
@@ -104,13 +104,9 @@ Polymer({
shouldShowAllowShared_: function(property) {
if (!this.isShared_())
return false;
- if (this.isNetworkPolicyControlled(property)) {
- // Shared networks may respect the 'use_shared_proxies' pref unless
- // the proxy is configured by a user policy.
- // See ProxyConfigServiceImpl::IgnoreProxy().
- if (typeof property.UserEditable != 'undefined')
- return property.UserEditable;
- }
+ // We currently do not accurately determine the source if the policy
+ // controlling the proxy setting, so always show the 'allow shared'
+ // toggle for shared networks. http://crbug.com/662529.
return true;
},
diff --git a/chromium/chrome/browser/resources/settings/lifetime_browser_proxy.js b/chromium/chrome/browser/resources/settings/lifetime_browser_proxy.js
index 19bc02a2d69..396539708ff 100644
--- a/chromium/chrome/browser/resources/settings/lifetime_browser_proxy.js
+++ b/chromium/chrome/browser/resources/settings/lifetime_browser_proxy.js
@@ -19,7 +19,7 @@ cr.define('settings', function() {
* Triggers a factory reset. The parameter indicates whether to install a
* TPM firmware update (if available) after the reset.
*
- * @param {boolean=} requestTpmFirmwareUpdate
+ * @param {boolean} requestTpmFirmwareUpdate
*/
factoryReset(requestTpmFirmwareUpdate) {}
// </if>
diff --git a/chromium/chrome/browser/resources/settings/reset_page/compiled_resources2.gyp b/chromium/chrome/browser/resources/settings/reset_page/compiled_resources2.gyp
index 39f600e4c60..831d1e4c2f3 100644
--- a/chromium/chrome/browser/resources/settings/reset_page/compiled_resources2.gyp
+++ b/chromium/chrome/browser/resources/settings/reset_page/compiled_resources2.gyp
@@ -4,6 +4,14 @@
{
'targets': [
{
+ 'target_name': 'powerwash_dialog',
+ 'dependencies': [
+ '../compiled_resources2.gyp:lifetime_browser_proxy',
+ 'reset_browser_proxy',
+ ],
+ 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'],
+ },
+ {
'target_name': 'reset_page',
'dependencies': [
'../compiled_resources2.gyp:route',
diff --git a/chromium/chrome/browser/resources/settings/reset_page/powerwash_dialog.js b/chromium/chrome/browser/resources/settings/reset_page/powerwash_dialog.js
index 2ff5c06ee71..37786342ef1 100644
--- a/chromium/chrome/browser/resources/settings/reset_page/powerwash_dialog.js
+++ b/chromium/chrome/browser/resources/settings/reset_page/powerwash_dialog.js
@@ -12,7 +12,10 @@ Polymer({
properties: {
/** @public */
- requestTpmFirmwareUpdate: Boolean,
+ requestTpmFirmwareUpdate: {
+ type: Boolean,
+ value: false,
+ }
},
/** @override */
diff --git a/chromium/chrome/browser/resources/settings/settings_menu/settings_menu.html b/chromium/chrome/browser/resources/settings/settings_menu/settings_menu.html
index ffe06b5ee5a..56bc54956d0 100644
--- a/chromium/chrome/browser/resources/settings/settings_menu/settings_menu.html
+++ b/chromium/chrome/browser/resources/settings/settings_menu/settings_menu.html
@@ -113,7 +113,7 @@
</a>
<if expr="chromeos">
<a href="/androidApps" hidden="[[!showAndroidApps]]">
- <iron-icon icon="settings:android"></iron-icon>
+ <iron-icon icon="settings:play-prism"></iron-icon>
$i18n{androidAppsPageTitle}
</a>
</if>
diff --git a/chromium/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc b/chromium/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc
index 4fd2ef91461..495bd41c242 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.cc
@@ -84,10 +84,16 @@ BluetoothPairingDialogUI::BluetoothPairingDialogUI(content::WebUI* web_ui)
AddBluetoothStrings(source);
source->AddLocalizedString("title", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE_TITLE);
source->SetJsonPath("strings.js");
+#if BUILDFLAG(OPTIMIZE_WEBUI)
+ source->UseGzip();
+ source->SetDefaultResource(IDR_BLUETOOTH_PAIRING_DIALOG_VULCANIZED_HTML);
+ source->AddResourcePath("crisper.js",
+ IDR_BLUETOOTH_PAIRING_DIALOG_CRISPER_JS);
+#else
source->SetDefaultResource(IDR_BLUETOOTH_PAIRING_DIALOG_HTML);
source->AddResourcePath("bluetooth_pairing_dialog.js",
IDR_BLUETOOTH_PAIRING_DIALOG_JS);
-
+#endif
content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
}
diff --git a/chromium/chrome/browser/ui/webui/chromeos/internet_config_dialog.cc b/chromium/chrome/browser/ui/webui/chromeos/internet_config_dialog.cc
index 2f559bede90..0591f3b24f6 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/internet_config_dialog.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/internet_config_dialog.cc
@@ -113,9 +113,15 @@ InternetConfigDialogUI::InternetConfigDialogUI(content::WebUI* web_ui)
AddInternetStrings(source);
source->AddLocalizedString("title", IDS_SETTINGS_INTERNET_CONFIG);
source->SetJsonPath("strings.js");
+#if BUILDFLAG(OPTIMIZE_WEBUI)
+ source->UseGzip();
+ source->SetDefaultResource(IDR_INTERNET_CONFIG_DIALOG_VULCANIZED_HTML);
+ source->AddResourcePath("crisper.js", IDR_INTERNET_CONFIG_DIALOG_CRISPER_JS);
+#else
source->SetDefaultResource(IDR_INTERNET_CONFIG_DIALOG_HTML);
source->AddResourcePath("internet_config_dialog.js",
IDR_INTERNET_CONFIG_DIALOG_JS);
+#endif
content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
}
diff --git a/chromium/chrome/browser/ui/webui/chromeos/internet_detail_dialog.cc b/chromium/chrome/browser/ui/webui/chromeos/internet_detail_dialog.cc
index 327acb5a363..3f191280d06 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/internet_detail_dialog.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/internet_detail_dialog.cc
@@ -113,10 +113,15 @@ InternetDetailDialogUI::InternetDetailDialogUI(content::WebUI* web_ui)
AddInternetStrings(source);
source->AddLocalizedString("title", IDS_SETTINGS_INTERNET_DETAIL);
source->SetJsonPath("strings.js");
+#if BUILDFLAG(OPTIMIZE_WEBUI)
+ source->UseGzip();
+ source->SetDefaultResource(IDR_INTERNET_DETAIL_DIALOG_VULCANIZED_HTML);
+ source->AddResourcePath("crisper.js", IDR_INTERNET_DETAIL_DIALOG_CRISPER_JS);
+#else
source->SetDefaultResource(IDR_INTERNET_DETAIL_DIALOG_HTML);
source->AddResourcePath("internet_detail_dialog.js",
IDR_INTERNET_DETAIL_DIALOG_JS);
-
+#endif
content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
}
diff --git a/chromium/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc b/chromium/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc
index 55c82d30e19..07a8fc05c1f 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/login/encryption_migration_screen_handler.cc
@@ -573,8 +573,8 @@ void EncryptionMigrationScreenHandler::StartMigration() {
auth_request = CreateAuthorizationRequest();
}
DBusThreadManager::Get()->GetCryptohomeClient()->MountEx(
- cryptohome::Identification(user_context_.GetAccountId()),
- cryptohome::AuthorizationRequest(), mount,
+ cryptohome::Identification(user_context_.GetAccountId()), auth_request,
+ mount,
base::BindOnce(&EncryptionMigrationScreenHandler::OnMountExistingVault,
weak_ptr_factory_.GetWeakPtr()));
}
diff --git a/chromium/chrome/browser/ui/webui/chromeos/network_element_localized_strings_provider.cc b/chromium/chrome/browser/ui/webui/chromeos/network_element_localized_strings_provider.cc
index 6ea6ba96951..3bca92cad9a 100644
--- a/chromium/chrome/browser/ui/webui/chromeos/network_element_localized_strings_provider.cc
+++ b/chromium/chrome/browser/ui/webui/chromeos/network_element_localized_strings_provider.cc
@@ -170,6 +170,8 @@ void AddDetailsLocalizedStrings(content::WebUIDataSource* html_source) {
int id;
} localized_strings[] = {
{"loading", IDS_SETTINGS_LOADING},
+ {"hidePassword", IDS_SETTINGS_PASSWORD_HIDE},
+ {"showPassword", IDS_SETTINGS_PASSWORD_SHOW},
{"networkProxy", IDS_SETTINGS_INTERNET_NETWORK_PROXY_PROXY},
{"networkProxyAddException",
IDS_SETTINGS_INTERNET_NETWORK_PROXY_ADD_EXCEPTION},
diff --git a/chromium/chrome/browser/ui/webui/settings/browser_lifetime_handler.cc b/chromium/chrome/browser/ui/webui/settings/browser_lifetime_handler.cc
index 3c264c536a0..d8fce5d42bb 100644
--- a/chromium/chrome/browser/ui/webui/settings/browser_lifetime_handler.cc
+++ b/chromium/chrome/browser/ui/webui/settings/browser_lifetime_handler.cc
@@ -59,8 +59,10 @@ void BrowserLifetimeHandler::HandleSignOutAndRestart(
void BrowserLifetimeHandler::HandleFactoryReset(
const base::ListValue* args) {
- bool tpm_firmware_update_requested;
- args->GetBoolean(0, &tpm_firmware_update_requested);
+ const base::Value::ListStorage& args_list = args->GetList();
+ CHECK_EQ(1U, args_list.size());
+ bool tpm_firmware_update_requested = args_list[0].GetBool();
+
if (tpm_firmware_update_requested) {
chromeos::tpm_firmware_update::ShouldOfferUpdateViaPowerwash(
base::BindOnce([](bool offer_update) {
diff --git a/chromium/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chromium/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
index 61f926ee926..7d992e1fae3 100644
--- a/chromium/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
+++ b/chromium/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -961,6 +961,11 @@ void AddDateTimeStrings(content::WebUIDataSource* html_source) {
};
AddLocalizedStringsBulk(html_source, localized_strings,
arraysize(localized_strings));
+ html_source->AddString(
+ "timeZoneSettingsLearnMoreURL",
+ base::ASCIIToUTF16(base::StringPrintf(
+ chrome::kTimeZoneSettingsLearnMoreURL,
+ g_browser_process->GetApplicationLocale().c_str())));
}
void AddEasyUnlockStrings(content::WebUIDataSource* html_source) {