diff options
Diffstat (limited to 'chromium/chrome/browser')
11 files changed, 92 insertions, 32 deletions
diff --git a/chromium/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc b/chromium/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc index b324f2171dc..7e26990ca4b 100644 --- a/chromium/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc +++ b/chromium/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.cc @@ -124,8 +124,12 @@ bool CertificateProviderInternalReportCertificatesFunction:: return false; } - out_info->certificate = - net::X509Certificate::CreateFromBytes(cert_der.data(), cert_der.size()); + // Allow UTF-8 inside PrintableStrings in client certificates. See + // crbug.com/770323 and crbug.com/788655. + net::X509Certificate::UnsafeCreateOptions options; + options.printable_string_is_utf8 = true; + out_info->certificate = net::X509Certificate::CreateFromBytesUnsafeOptions( + cert_der.data(), cert_der.size(), options); if (!out_info->certificate) { WriteToConsole(content::CONSOLE_MESSAGE_LEVEL_ERROR, kErrorInvalidX509Cert); return false; diff --git a/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc b/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc index 3a0a01ad53a..d20974aad2d 100644 --- a/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc +++ b/chromium/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc @@ -142,8 +142,13 @@ EnterprisePlatformKeysImportCertificateFunction::Run() { return RespondNow(Error(platform_keys::kErrorInvalidToken)); const std::vector<char>& cert_der = params->certificate; + // Allow UTF-8 inside PrintableStrings in client certificates. See + // crbug.com/770323 and crbug.com/788655. + net::X509Certificate::UnsafeCreateOptions options; + options.printable_string_is_utf8 = true; scoped_refptr<net::X509Certificate> cert_x509 = - net::X509Certificate::CreateFromBytes(cert_der.data(), cert_der.size()); + net::X509Certificate::CreateFromBytesUnsafeOptions( + cert_der.data(), cert_der.size(), options); if (!cert_x509.get()) return RespondNow(Error(kErrorInvalidX509Cert)); @@ -180,8 +185,13 @@ EnterprisePlatformKeysRemoveCertificateFunction::Run() { return RespondNow(Error(platform_keys::kErrorInvalidToken)); const std::vector<char>& cert_der = params->certificate; + // Allow UTF-8 inside PrintableStrings in client certificates. See + // crbug.com/770323 and crbug.com/788655. + net::X509Certificate::UnsafeCreateOptions options; + options.printable_string_is_utf8 = true; scoped_refptr<net::X509Certificate> cert_x509 = - net::X509Certificate::CreateFromBytes(cert_der.data(), cert_der.size()); + net::X509Certificate::CreateFromBytesUnsafeOptions( + cert_der.data(), cert_der.size(), options); if (!cert_x509.get()) return RespondNow(Error(kErrorInvalidX509Cert)); diff --git a/chromium/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc b/chromium/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc index 4372d80fa7b..7fd7ef4dced 100644 --- a/chromium/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc +++ b/chromium/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc @@ -131,8 +131,13 @@ PlatformKeysInternalGetPublicKeyFunction::Run() { const std::vector<char>& cert_der = params->certificate; if (cert_der.empty()) return RespondNow(Error(platform_keys::kErrorInvalidX509Cert)); + // Allow UTF-8 inside PrintableStrings in client certificates. See + // crbug.com/770323 and crbug.com/788655. + net::X509Certificate::UnsafeCreateOptions options; + options.printable_string_is_utf8 = true; scoped_refptr<net::X509Certificate> cert_x509 = - net::X509Certificate::CreateFromBytes(cert_der.data(), cert_der.size()); + net::X509Certificate::CreateFromBytesUnsafeOptions( + cert_der.data(), cert_der.size(), options); if (!cert_x509) return RespondNow(Error(platform_keys::kErrorInvalidX509Cert)); @@ -206,9 +211,13 @@ PlatformKeysInternalSelectClientCertificatesFunction::Run() { *params->details.client_certs) { if (client_cert_der.empty()) return RespondNow(Error(platform_keys::kErrorInvalidX509Cert)); + // Allow UTF-8 inside PrintableStrings in client certificates. See + // crbug.com/770323 and crbug.com/788655. + net::X509Certificate::UnsafeCreateOptions options; + options.printable_string_is_utf8 = true; scoped_refptr<net::X509Certificate> client_cert_x509 = - net::X509Certificate::CreateFromBytes(client_cert_der.data(), - client_cert_der.size()); + net::X509Certificate::CreateFromBytesUnsafeOptions( + client_cert_der.data(), client_cert_der.size(), options); if (!client_cert_x509) return RespondNow(Error(platform_keys::kErrorInvalidX509Cert)); client_certs->push_back(client_cert_x509); diff --git a/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js b/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js index 4d1bc38391f..fa1e41103f4 100644 --- a/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js +++ b/chromium/chrome/browser/resources/gaia_auth_host/authenticator.js @@ -91,6 +91,9 @@ cr.define('cr.login', function() { 'menuGuestMode', // Enables "Guest mode" menu item 'menuKeyboardOptions', // Enables "Keyboard options" menu item 'menuEnterpriseEnrollment', // Enables "Enterprise enrollment" menu item. + 'lsbReleaseBoard', // Chrome OS Release board name + 'isFirstUser', // True if this is non-enterprise device, + // and there are no users yet. // The email fields allow for the following possibilities: // @@ -328,6 +331,11 @@ cr.define('cr.login', function() { mi += 'ee,'; if (mi.length) url = appendParam(url, 'mi', mi); + + if (data.lsbReleaseBoard) + url = appendParam(url, 'chromeos_board', data.lsbReleaseBoard); + if (data.isFirstUser) + url = appendParam(url, 'is_first_user', true); } } else { url = appendParam(url, 'continue', this.continueUrl_); @@ -428,8 +436,10 @@ cr.define('cr.login', function() { * @private */ Authenticator.prototype.onFocus_ = function(e) { - if (this.authMode == AuthMode.DESKTOP) + if (this.authMode == AuthMode.DESKTOP && + document.activeElement == document.body) { this.webview_.focus(); + } }; /** diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json index ebd071c247c..99b6cf673f3 100644 --- a/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json +++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_linux.json @@ -1,5 +1,5 @@ { - "x-version": 24, + "x-version": 26, "google-talk": { "mime_types": [ ], @@ -80,9 +80,9 @@ ], "versions": [ { - "version": "26.0.0.126", + "version": "27.0.0.187", "status": "up_to_date", - "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-17.html" + "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html" } ], "lang": "en-US", diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json index efd1b4f3612..a85342825f9 100644 --- a/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json +++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_mac.json @@ -1,5 +1,5 @@ { - "x-version": 30, + "x-version": 32, "google-talk": { "mime_types": [ ], @@ -115,9 +115,9 @@ ], "versions": [ { - "version": "26.0.0.126", + "version": "27.0.0.187", "status": "requires_authorization", - "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-17.html" + "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html" } ], "lang": "en-US", diff --git a/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json b/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json index 00786d2f197..c5b325b08c2 100644 --- a/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json +++ b/chromium/chrome/browser/resources/plugin_metadata/plugins_win.json @@ -1,5 +1,5 @@ { - "x-version": 39, + "x-version": 41, "google-talk": { "mime_types": [ ], @@ -137,9 +137,9 @@ ], "versions": [ { - "version": "26.0.0.126", + "version": "27.0.0.187", "status": "requires_authorization", - "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-17.html" + "reference": "https://helpx.adobe.com/security/products/flash-player/apsb17-33.html" } ], "lang": "en-US", diff --git a/chromium/chrome/browser/resources/settings/device_page/display.html b/chromium/chrome/browser/resources/settings/device_page/display.html index 73d02acd988..0602de00131 100644 --- a/chromium/chrome/browser/resources/settings/device_page/display.html +++ b/chromium/chrome/browser/resources/settings/device_page/display.html @@ -145,7 +145,7 @@ [[getResolutionText_(selectedDisplay, selectedModePref_.value)]] </div> </div> - <settings-slider disabled="[[selectedDisplay.isTabletMode]]" + <settings-slider disabled="[[!enableSetResolution_(selectedDisplay)]]" tick-values="[[modeValues_]]" pref="{{selectedModePref_}}" on-change="onSelectedModeChange_"> </settings-slider> diff --git a/chromium/chrome/browser/resources/settings/people_page/change_picture.js b/chromium/chrome/browser/resources/settings/people_page/change_picture.js index b610c1d4ac2..702225517b3 100644 --- a/chromium/chrome/browser/resources/settings/people_page/change_picture.js +++ b/chromium/chrome/browser/resources/settings/people_page/change_picture.js @@ -58,6 +58,7 @@ Polymer({ listeners: { 'discard-image': 'onDiscardImage_', 'image-activate': 'onImageActivate_', + 'focus-action': 'onFocusAction_', 'photo-taken': 'onPhotoTaken_', 'switch-mode': 'onSwitchMode_', }, @@ -193,6 +194,11 @@ Polymer({ this.selectImage_(event.detail); }, + /** Focus the action button in the picture pane. */ + onFocusAction_: function() { + /** CrPicturePaneElement */ (this.$.picturePane).focusActionButton(); + }, + /** * @param {!{detail: !{photoDataUrl: string}}} event * @private diff --git a/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc index 712663b8457..365c68203b1 100644 --- a/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc +++ b/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc @@ -12,6 +12,7 @@ #include "base/metrics/histogram_macros.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" +#include "base/sys_info.h" #include "base/task_scheduler/post_task.h" #include "base/values.h" #include "chrome/browser/browser_process.h" @@ -35,6 +36,7 @@ #include "chrome/common/chrome_features.h" #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" +#include "chrome/installer/util/google_update_settings.h" #include "chromeos/chromeos_switches.h" #include "chromeos/login/auth/authpolicy_login_helper.h" #include "chromeos/login/auth/user_context.h" @@ -212,6 +214,11 @@ bool IsOnline(NetworkPortalDetector::CaptivePortalStatus status) { return status == NetworkPortalDetector::CAPTIVE_PORTAL_STATUS_ONLINE; } +void GetVersionAndConsent(std::string* out_version, bool* out_consent) { + *out_version = version_loader::GetVersion(version_loader::VERSION_SHORT); + *out_consent = GoogleUpdateSettings::GetCollectStatsConsent(); +} + } // namespace // A class that's used to specify the way how Gaia should be loaded. @@ -289,16 +296,24 @@ void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { } void GaiaScreenHandler::LoadGaia(const GaiaContext& context) { - base::PostTaskWithTraitsAndReplyWithResult( - FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, - base::Bind(&version_loader::GetVersion, version_loader::VERSION_SHORT), - base::Bind(&GaiaScreenHandler::LoadGaiaWithVersion, - weak_factory_.GetWeakPtr(), context)); -} - -void GaiaScreenHandler::LoadGaiaWithVersion( + std::unique_ptr<std::string> version = std::make_unique<std::string>(); + std::unique_ptr<bool> consent = std::make_unique<bool>(); + base::OnceClosure get_version_and_consent = + base::BindOnce(&GetVersionAndConsent, base::Unretained(version.get()), + base::Unretained(consent.get())); + base::OnceClosure load_gaia = base::BindOnce( + &GaiaScreenHandler::LoadGaiaWithVersionAndConsent, + weak_factory_.GetWeakPtr(), context, base::Owned(version.release()), + base::Owned(consent.release())); + base::PostTaskWithTraitsAndReply( + FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_VISIBLE}, + std::move(get_version_and_consent), std::move(load_gaia)); +} + +void GaiaScreenHandler::LoadGaiaWithVersionAndConsent( const GaiaContext& context, - const std::string& platform_version) { + const std::string* platform_version, + const bool* collect_stats_consent) { base::DictionaryValue params; params.SetBoolean("forceReload", context.force_reload); @@ -348,8 +363,8 @@ void GaiaScreenHandler::LoadGaiaWithVersion( params.SetString("clientId", GaiaUrls::GetInstance()->oauth2_chrome_client_id()); params.SetString("clientVersion", version_info::GetVersionNumber()); - if (!platform_version.empty()) - params.SetString("platformVersion", platform_version); + if (!platform_version->empty()) + params.SetString("platformVersion", *platform_version); params.SetString("releaseChannel", chrome::GetChannelString()); params.SetString("endpointGen", kEndpointGen); @@ -370,6 +385,10 @@ void GaiaScreenHandler::LoadGaiaWithVersion( // (see https://crbug.com/709244 ). params.SetString("chromeOSApiVersion", "2"); } + // We only send |chromeos_board| Gaia URL parameter if user has opted into + // sending device statistics. + if (*collect_stats_consent) + params.SetString("lsbReleaseBoard", base::SysInfo::GetLsbReleaseBoard()); frame_state_ = FRAME_STATE_LOADING; CallJS("loadAuthExtension", params); diff --git a/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h b/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h index 2cda506da93..5ef51ba2f57 100644 --- a/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h +++ b/chromium/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h @@ -58,9 +58,11 @@ class GaiaScreenHandler : public BaseScreenHandler, void LoadGaia(const GaiaContext& context); - // Callback that loads GAIA after version information has been retrieved. - void LoadGaiaWithVersion(const GaiaContext& context, - const std::string& platform_version); + // Callback that loads GAIA after version and stat consent information has + // been retrieved. + void LoadGaiaWithVersionAndConsent(const GaiaContext& context, + const std::string* platform_version, + const bool* collect_stats_consent); // Sends request to reload Gaia. If |force_reload| is true, request // will be sent in any case, otherwise it will be sent only when Gaia is |