Merge pull request #14964 from electron/chromium-upgrade/68
feat: upgrade to Chromium 68.0.3440.128 and Node 10.11.0
This commit is contained in:
		
				commit
				
					
						03e6113ef7
					
				
			
		
					 155 changed files with 9131 additions and 8352 deletions
				
			
		
							
								
								
									
										8
									
								
								BUILD.gn
									
										
									
									
									
								
							
							
						
						
									
										8
									
								
								BUILD.gn
									
										
									
									
									
								
							| 
						 | 
					@ -248,6 +248,12 @@ static_library("electron_lib") {
 | 
				
			||||||
      "*\bwin_*.cc",
 | 
					      "*\bwin_*.cc",
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  if (!is_posix) {
 | 
				
			||||||
 | 
					    extra_source_filters += [
 | 
				
			||||||
 | 
					      "*_posix.cc",
 | 
				
			||||||
 | 
					      "*_posix.h",
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  if (is_mac) {
 | 
					  if (is_mac) {
 | 
				
			||||||
    extra_source_filters += [
 | 
					    extra_source_filters += [
 | 
				
			||||||
      "*_views.cc",
 | 
					      "*_views.cc",
 | 
				
			||||||
| 
						 | 
					@ -744,7 +750,6 @@ group("chromium_unittests") {
 | 
				
			||||||
  deps = [
 | 
					  deps = [
 | 
				
			||||||
    "//base:base_unittests",
 | 
					    "//base:base_unittests",
 | 
				
			||||||
    "//cc:cc_unittests",
 | 
					    "//cc:cc_unittests",
 | 
				
			||||||
    "//cc/blink:cc_blink_unittests",
 | 
					 | 
				
			||||||
    "//content/test:content_unittests",
 | 
					    "//content/test:content_unittests",
 | 
				
			||||||
    "//crypto:crypto_unittests",
 | 
					    "//crypto:crypto_unittests",
 | 
				
			||||||
    "//device:device_unittests",
 | 
					    "//device:device_unittests",
 | 
				
			||||||
| 
						 | 
					@ -756,7 +761,6 @@ group("chromium_unittests") {
 | 
				
			||||||
    "//media/midi:midi_unittests",
 | 
					    "//media/midi:midi_unittests",
 | 
				
			||||||
    "//media/mojo:media_mojo_unittests",
 | 
					    "//media/mojo:media_mojo_unittests",
 | 
				
			||||||
    "//mojo:mojo_unittests",
 | 
					    "//mojo:mojo_unittests",
 | 
				
			||||||
    "//mojo/common:mojo_common_unittests",
 | 
					 | 
				
			||||||
    "//net:net_unittests",
 | 
					    "//net:net_unittests",
 | 
				
			||||||
    "//ppapi:ppapi_unittests",
 | 
					    "//ppapi:ppapi_unittests",
 | 
				
			||||||
    "//printing:printing_unittests",
 | 
					    "//printing:printing_unittests",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								DEPS
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								DEPS
									
										
									
									
									
								
							| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
vars = {
 | 
					vars = {
 | 
				
			||||||
  'chromium_version':
 | 
					  'chromium_version':
 | 
				
			||||||
    '67.0.3396.99',
 | 
					    '68.0.3440.128',
 | 
				
			||||||
  'node_version':
 | 
					  'node_version':
 | 
				
			||||||
    '7295c611497c5e70d292e96e98f1180822b907a6',
 | 
					    '18a9880b70039f5d41ee860a95fe84e5ef928973',
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  'pyyaml_version':
 | 
					  'pyyaml_version':
 | 
				
			||||||
    '3.12',
 | 
					    '3.12',
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,8 +41,11 @@ namespace atom {
 | 
				
			||||||
namespace {
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(WIDEVINE_CDM_AVAILABLE)
 | 
					#if defined(WIDEVINE_CDM_AVAILABLE)
 | 
				
			||||||
bool IsWidevineAvailable(base::FilePath* cdm_path,
 | 
					bool IsWidevineAvailable(
 | 
				
			||||||
                         std::vector<media::VideoCodec>* codecs_supported) {
 | 
					    base::FilePath* cdm_path,
 | 
				
			||||||
 | 
					    std::vector<media::VideoCodec>* codecs_supported,
 | 
				
			||||||
 | 
					    bool* supports_persistent_license,
 | 
				
			||||||
 | 
					    base::flat_set<media::EncryptionMode>* modes_supported) {
 | 
				
			||||||
  static enum {
 | 
					  static enum {
 | 
				
			||||||
    NOT_CHECKED,
 | 
					    NOT_CHECKED,
 | 
				
			||||||
    FOUND,
 | 
					    FOUND,
 | 
				
			||||||
| 
						 | 
					@ -68,6 +71,16 @@ bool IsWidevineAvailable(base::FilePath* cdm_path,
 | 
				
			||||||
    codecs_supported->push_back(media::VideoCodec::kCodecH264);
 | 
					    codecs_supported->push_back(media::VideoCodec::kCodecH264);
 | 
				
			||||||
#endif  // BUILDFLAG(USE_PROPRIETARY_CODECS)
 | 
					#endif  // BUILDFLAG(USE_PROPRIETARY_CODECS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// TODO(crbug.com/767941): Push persistent-license support info here once
 | 
				
			||||||
 | 
					// we check in a new CDM that supports it on Linux.
 | 
				
			||||||
 | 
					#if defined(OS_CHROMEOS)
 | 
				
			||||||
 | 
					    *supports_persistent_license = true;
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					    *supports_persistent_license = false;
 | 
				
			||||||
 | 
					#endif  // defined(OS_CHROMEOS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    modes_supported->insert(media::EncryptionMode::kCenc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,7 +226,10 @@ void AtomContentClient::AddContentDecryptionModules(
 | 
				
			||||||
    base::FilePath cdm_path;
 | 
					    base::FilePath cdm_path;
 | 
				
			||||||
    std::vector<media::VideoCodec> video_codecs_supported;
 | 
					    std::vector<media::VideoCodec> video_codecs_supported;
 | 
				
			||||||
    bool supports_persistent_license = false;
 | 
					    bool supports_persistent_license = false;
 | 
				
			||||||
    if (IsWidevineAvailable(&cdm_path, &video_codecs_supported)) {
 | 
					    base::flat_set<media::EncryptionMode> encryption_modes_supported;
 | 
				
			||||||
 | 
					    if (IsWidevineAvailable(&cdm_path, &video_codecs_supported,
 | 
				
			||||||
 | 
					                            &supports_persistent_license,
 | 
				
			||||||
 | 
					                            &encryption_modes_supported)) {
 | 
				
			||||||
      base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
 | 
					      base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
 | 
				
			||||||
      auto cdm_version_string =
 | 
					      auto cdm_version_string =
 | 
				
			||||||
          command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
 | 
					          command_line->GetSwitchValueASCII(switches::kWidevineCdmVersion);
 | 
				
			||||||
| 
						 | 
					@ -226,7 +242,8 @@ void AtomContentClient::AddContentDecryptionModules(
 | 
				
			||||||
      cdms->push_back(content::CdmInfo(
 | 
					      cdms->push_back(content::CdmInfo(
 | 
				
			||||||
          kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
 | 
					          kWidevineCdmDisplayName, kWidevineCdmGuid, version, cdm_path,
 | 
				
			||||||
          kWidevineCdmFileSystemId, video_codecs_supported,
 | 
					          kWidevineCdmFileSystemId, video_codecs_supported,
 | 
				
			||||||
          supports_persistent_license, kWidevineKeySystem, false));
 | 
					          supports_persistent_license, encryption_modes_supported,
 | 
				
			||||||
 | 
					          kWidevineKeySystem, false));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
#endif  // defined(WIDEVINE_CDM_AVAILABLE)
 | 
					#endif  // defined(WIDEVINE_CDM_AVAILABLE)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -145,7 +145,7 @@ void AtomMainDelegate::PreSandboxStartup() {
 | 
				
			||||||
          service_manager::switches::kDisableSetuidSandbox);
 | 
					          service_manager::switches::kDisableSetuidSandbox);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      // Disable renderer sandbox for most of node's functions.
 | 
					      // Disable renderer sandbox for most of node's functions.
 | 
				
			||||||
      command_line->AppendSwitch(::switches::kNoSandbox);
 | 
					      command_line->AppendSwitch(service_manager::switches::kNoSandbox);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -168,7 +168,7 @@ AtomMainDelegate::CreateContentRendererClient() {
 | 
				
			||||||
  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
					  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
				
			||||||
          switches::kEnableSandbox) ||
 | 
					          switches::kEnableSandbox) ||
 | 
				
			||||||
      !base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
					      !base::CommandLine::ForCurrentProcess()->HasSwitch(
 | 
				
			||||||
          ::switches::kNoSandbox)) {
 | 
					          service_manager::switches::kNoSandbox)) {
 | 
				
			||||||
    renderer_client_.reset(new AtomSandboxedRendererClient);
 | 
					    renderer_client_.reset(new AtomSandboxedRendererClient);
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    renderer_client_.reset(new AtomRendererClient);
 | 
					    renderer_client_.reset(new AtomRendererClient);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,7 +49,7 @@ void AtomMainDelegate::OverrideChildProcessPath() {
 | 
				
			||||||
        GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
 | 
					        GetHelperAppPath(frameworks_path, brightray::GetApplicationName());
 | 
				
			||||||
  if (!base::PathExists(helper_path))
 | 
					  if (!base::PathExists(helper_path))
 | 
				
			||||||
    LOG(FATAL) << "Unable to find helper app";
 | 
					    LOG(FATAL) << "Unable to find helper app";
 | 
				
			||||||
  PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
 | 
					  base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AtomMainDelegate::SetUpBundleOverrides() {
 | 
					void AtomMainDelegate::SetUpBundleOverrides() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ int NodeMain(int argc, char* argv[]) {
 | 
				
			||||||
    bool more;
 | 
					    bool more;
 | 
				
			||||||
    do {
 | 
					    do {
 | 
				
			||||||
      more = uv_run(env->event_loop(), UV_RUN_ONCE);
 | 
					      more = uv_run(env->event_loop(), UV_RUN_ONCE);
 | 
				
			||||||
      gin_env.platform()->DrainBackgroundTasks(env->isolate());
 | 
					      gin_env.platform()->DrainTasks(env->isolate());
 | 
				
			||||||
      if (more == false) {
 | 
					      if (more == false) {
 | 
				
			||||||
        node::EmitBeforeExit(env);
 | 
					        node::EmitBeforeExit(env);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,7 +98,7 @@ int NodeMain(int argc, char* argv[]) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    exit_code = node::EmitExit(env);
 | 
					    exit_code = node::EmitExit(env);
 | 
				
			||||||
    node::RunAtExit(env);
 | 
					    node::RunAtExit(env);
 | 
				
			||||||
    gin_env.platform()->DrainBackgroundTasks(env->isolate());
 | 
					    gin_env.platform()->DrainTasks(env->isolate());
 | 
				
			||||||
    gin_env.platform()->CancelPendingDelayedTasks(env->isolate());
 | 
					    gin_env.platform()->CancelPendingDelayedTasks(env->isolate());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    node::FreeEnvironment(env);
 | 
					    node::FreeEnvironment(env);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -50,6 +50,7 @@
 | 
				
			||||||
#include "net/ssl/client_cert_identity.h"
 | 
					#include "net/ssl/client_cert_identity.h"
 | 
				
			||||||
#include "net/ssl/ssl_cert_request_info.h"
 | 
					#include "net/ssl/ssl_cert_request_info.h"
 | 
				
			||||||
#include "services/network/public/cpp/network_switches.h"
 | 
					#include "services/network/public/cpp/network_switches.h"
 | 
				
			||||||
 | 
					#include "services/service_manager/sandbox/switches.h"
 | 
				
			||||||
#include "ui/base/l10n/l10n_util.h"
 | 
					#include "ui/base/l10n/l10n_util.h"
 | 
				
			||||||
#include "ui/gfx/image/image.h"
 | 
					#include "ui/gfx/image/image.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -481,7 +482,7 @@ void OnClientCertificateSelected(
 | 
				
			||||||
  if (!certs.empty()) {
 | 
					  if (!certs.empty()) {
 | 
				
			||||||
    scoped_refptr<net::X509Certificate> cert(certs[0].get());
 | 
					    scoped_refptr<net::X509Certificate> cert(certs[0].get());
 | 
				
			||||||
    for (size_t i = 0; i < identities->size(); ++i) {
 | 
					    for (size_t i = 0; i < identities->size(); ++i) {
 | 
				
			||||||
      if (cert->Equals((*identities)[i]->certificate())) {
 | 
					      if (cert->EqualsExcludingChain((*identities)[i]->certificate())) {
 | 
				
			||||||
        net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
 | 
					        net::ClientCertIdentity::SelfOwningAcquirePrivateKey(
 | 
				
			||||||
            std::move((*identities)[i]),
 | 
					            std::move((*identities)[i]),
 | 
				
			||||||
            base::Bind(&GotPrivateKey, delegate, std::move(cert)));
 | 
					            base::Bind(&GotPrivateKey, delegate, std::move(cert)));
 | 
				
			||||||
| 
						 | 
					@ -786,18 +787,21 @@ void App::BrowserChildProcessHostDisconnected(
 | 
				
			||||||
  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
					  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void App::BrowserChildProcessCrashed(const content::ChildProcessData& data,
 | 
					void App::BrowserChildProcessCrashed(
 | 
				
			||||||
                                     int exit_code) {
 | 
					    const content::ChildProcessData& data,
 | 
				
			||||||
 | 
					    const content::ChildProcessTerminationInfo& info) {
 | 
				
			||||||
  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
					  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void App::BrowserChildProcessKilled(const content::ChildProcessData& data,
 | 
					void App::BrowserChildProcessKilled(
 | 
				
			||||||
                                    int exit_code) {
 | 
					    const content::ChildProcessData& data,
 | 
				
			||||||
 | 
					    const content::ChildProcessTerminationInfo& info) {
 | 
				
			||||||
  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
					  ChildProcessDisconnected(base::GetProcId(data.handle));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void App::RenderProcessReady(content::RenderProcessHost* host) {
 | 
					void App::RenderProcessReady(content::RenderProcessHost* host) {
 | 
				
			||||||
  ChildProcessLaunched(content::PROCESS_TYPE_RENDERER, host->GetHandle());
 | 
					  ChildProcessLaunched(content::PROCESS_TYPE_RENDERER,
 | 
				
			||||||
 | 
					                       host->GetProcess().Handle());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void App::RenderProcessDisconnected(base::ProcessId host_pid) {
 | 
					void App::RenderProcessDisconnected(base::ProcessId host_pid) {
 | 
				
			||||||
| 
						 | 
					@ -836,7 +840,7 @@ base::FilePath App::GetPath(mate::Arguments* args, const std::string& name) {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  int key = GetPathConstant(name);
 | 
					  int key = GetPathConstant(name);
 | 
				
			||||||
  if (key >= 0)
 | 
					  if (key >= 0)
 | 
				
			||||||
    succeed = PathService::Get(key, &path);
 | 
					    succeed = base::PathService::Get(key, &path);
 | 
				
			||||||
  if (!succeed)
 | 
					  if (!succeed)
 | 
				
			||||||
    args->ThrowError("Failed to get '" + name + "' path");
 | 
					    args->ThrowError("Failed to get '" + name + "' path");
 | 
				
			||||||
  return path;
 | 
					  return path;
 | 
				
			||||||
| 
						 | 
					@ -853,7 +857,8 @@ void App::SetPath(mate::Arguments* args,
 | 
				
			||||||
  bool succeed = false;
 | 
					  bool succeed = false;
 | 
				
			||||||
  int key = GetPathConstant(name);
 | 
					  int key = GetPathConstant(name);
 | 
				
			||||||
  if (key >= 0)
 | 
					  if (key >= 0)
 | 
				
			||||||
    succeed = PathService::OverrideAndCreateIfNeeded(key, path, true, false);
 | 
					    succeed =
 | 
				
			||||||
 | 
					        base::PathService::OverrideAndCreateIfNeeded(key, path, true, false);
 | 
				
			||||||
  if (!succeed)
 | 
					  if (!succeed)
 | 
				
			||||||
    args->ThrowError("Failed to set path");
 | 
					    args->ThrowError("Failed to set path");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -885,7 +890,7 @@ bool App::RequestSingleInstanceLock() {
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base::FilePath user_dir;
 | 
					  base::FilePath user_dir;
 | 
				
			||||||
  PathService::Get(brightray::DIR_USER_DATA, &user_dir);
 | 
					  base::PathService::Get(brightray::DIR_USER_DATA, &user_dir);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  auto cb = base::Bind(&App::OnSecondInstance, base::Unretained(this));
 | 
					  auto cb = base::Bind(&App::OnSecondInstance, base::Unretained(this));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -934,7 +939,7 @@ bool App::Relaunch(mate::Arguments* js_args) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (exec_path.empty()) {
 | 
					  if (exec_path.empty()) {
 | 
				
			||||||
    base::FilePath current_exe_path;
 | 
					    base::FilePath current_exe_path;
 | 
				
			||||||
    PathService::Get(base::FILE_EXE, ¤t_exe_path);
 | 
					    base::PathService::Get(base::FILE_EXE, ¤t_exe_path);
 | 
				
			||||||
    argv.push_back(current_exe_path.value());
 | 
					    argv.push_back(current_exe_path.value());
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    argv.push_back(exec_path.value());
 | 
					    argv.push_back(exec_path.value());
 | 
				
			||||||
| 
						 | 
					@ -1188,7 +1193,7 @@ void App::EnableMixedSandbox(mate::Arguments* args) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
					  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
				
			||||||
  if (command_line->HasSwitch(::switches::kNoSandbox)) {
 | 
					  if (command_line->HasSwitch(service_manager::switches::kNoSandbox)) {
 | 
				
			||||||
#if defined(OS_WIN)
 | 
					#if defined(OS_WIN)
 | 
				
			||||||
    const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
 | 
					    const base::CommandLine::CharType* noSandboxArg = L"--no-sandbox";
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -162,10 +162,12 @@ class App : public AtomBrowserClient::Delegate,
 | 
				
			||||||
      const content::ChildProcessData& data) override;
 | 
					      const content::ChildProcessData& data) override;
 | 
				
			||||||
  void BrowserChildProcessHostDisconnected(
 | 
					  void BrowserChildProcessHostDisconnected(
 | 
				
			||||||
      const content::ChildProcessData& data) override;
 | 
					      const content::ChildProcessData& data) override;
 | 
				
			||||||
  void BrowserChildProcessCrashed(const content::ChildProcessData& data,
 | 
					  void BrowserChildProcessCrashed(
 | 
				
			||||||
                                  int exit_code) override;
 | 
					      const content::ChildProcessData& data,
 | 
				
			||||||
  void BrowserChildProcessKilled(const content::ChildProcessData& data,
 | 
					      const content::ChildProcessTerminationInfo& info) override;
 | 
				
			||||||
                                 int exit_code) override;
 | 
					  void BrowserChildProcessKilled(
 | 
				
			||||||
 | 
					      const content::ChildProcessData& data,
 | 
				
			||||||
 | 
					      const content::ChildProcessTerminationInfo& info) override;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 private:
 | 
					 private:
 | 
				
			||||||
  void SetAppPath(const base::FilePath& app_path);
 | 
					  void SetAppPath(const base::FilePath& app_path);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -97,8 +97,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  [popup_controllers_[window_id] setCloseCallback:close_callback];
 | 
					  [popup_controllers_[window_id] setCloseCallback:close_callback];
 | 
				
			||||||
  // Make sure events can be pumped while the menu is up.
 | 
					  // Make sure events can be pumped while the menu is up.
 | 
				
			||||||
  base::MessageLoop::ScopedNestableTaskAllower allow(
 | 
					  base::MessageLoop::ScopedNestableTaskAllower allow;
 | 
				
			||||||
      base::MessageLoop::current());
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // One of the events that could be pumped is |window.close()|.
 | 
					  // One of the events that could be pumped is |window.close()|.
 | 
				
			||||||
  // User-initiated event-tracking loops protect against this by
 | 
					  // User-initiated event-tracking loops protect against this by
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -396,7 +396,7 @@ void ClearAuthCacheInIO(
 | 
				
			||||||
            options.origin, options.realm, options.auth_scheme,
 | 
					            options.origin, options.realm, options.auth_scheme,
 | 
				
			||||||
            net::AuthCredentials(options.username, options.password));
 | 
					            net::AuthCredentials(options.username, options.password));
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        auth_cache->ClearEntriesAddedWithin(base::TimeDelta::Max());
 | 
					        auth_cache->ClearAllEntries();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    } else if (options.type == "clientCertificate") {
 | 
					    } else if (options.type == "clientCertificate") {
 | 
				
			||||||
      auto* client_auth_cache = network_session->ssl_client_auth_cache();
 | 
					      auto* client_auth_cache = network_session->ssl_client_auth_cache();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -362,7 +362,7 @@ WebContents::WebContents(v8::Isolate* isolate,
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  session_.Reset(isolate, session.ToV8());
 | 
					  session_.Reset(isolate, session.ToV8());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  content::WebContents* web_contents;
 | 
					  std::unique_ptr<content::WebContents> web_contents;
 | 
				
			||||||
  if (IsGuest()) {
 | 
					  if (IsGuest()) {
 | 
				
			||||||
    scoped_refptr<content::SiteInstance> site_instance =
 | 
					    scoped_refptr<content::SiteInstance> site_instance =
 | 
				
			||||||
        content::SiteInstance::CreateForURL(session->browser_context(),
 | 
					        content::SiteInstance::CreateForURL(session->browser_context(),
 | 
				
			||||||
| 
						 | 
					@ -405,7 +405,7 @@ WebContents::WebContents(v8::Isolate* isolate,
 | 
				
			||||||
    web_contents = content::WebContents::Create(params);
 | 
					    web_contents = content::WebContents::Create(params);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  InitWithSessionAndOptions(isolate, web_contents, session, options);
 | 
					  InitWithSessionAndOptions(isolate, web_contents.release(), session, options);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WebContents::InitZoomController(content::WebContents* web_contents,
 | 
					void WebContents::InitZoomController(content::WebContents* web_contents,
 | 
				
			||||||
| 
						 | 
					@ -537,16 +537,17 @@ void WebContents::WebContentsCreated(content::WebContents* source_contents,
 | 
				
			||||||
  Emit("-web-contents-created", api_web_contents, target_url, frame_name);
 | 
					  Emit("-web-contents-created", api_web_contents, target_url, frame_name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WebContents::AddNewContents(content::WebContents* source,
 | 
					void WebContents::AddNewContents(
 | 
				
			||||||
                                 content::WebContents* new_contents,
 | 
					    content::WebContents* source,
 | 
				
			||||||
                                 WindowOpenDisposition disposition,
 | 
					    std::unique_ptr<content::WebContents> new_contents,
 | 
				
			||||||
                                 const gfx::Rect& initial_rect,
 | 
					    WindowOpenDisposition disposition,
 | 
				
			||||||
                                 bool user_gesture,
 | 
					    const gfx::Rect& initial_rect,
 | 
				
			||||||
                                 bool* was_blocked) {
 | 
					    bool user_gesture,
 | 
				
			||||||
  new ChildWebContentsTracker(new_contents);
 | 
					    bool* was_blocked) {
 | 
				
			||||||
 | 
					  new ChildWebContentsTracker(new_contents.get());
 | 
				
			||||||
  v8::Locker locker(isolate());
 | 
					  v8::Locker locker(isolate());
 | 
				
			||||||
  v8::HandleScope handle_scope(isolate());
 | 
					  v8::HandleScope handle_scope(isolate());
 | 
				
			||||||
  auto api_web_contents = CreateFrom(isolate(), new_contents);
 | 
					  auto api_web_contents = CreateFrom(isolate(), new_contents.release());
 | 
				
			||||||
  if (Emit("-add-new-contents", api_web_contents, disposition, user_gesture,
 | 
					  if (Emit("-add-new-contents", api_web_contents, disposition, user_gesture,
 | 
				
			||||||
           initial_rect.x(), initial_rect.y(), initial_rect.width(),
 | 
					           initial_rect.x(), initial_rect.y(), initial_rect.width(),
 | 
				
			||||||
           initial_rect.height())) {
 | 
					           initial_rect.height())) {
 | 
				
			||||||
| 
						 | 
					@ -641,21 +642,25 @@ content::KeyboardEventProcessingResult WebContents::PreHandleKeyboardEvent(
 | 
				
			||||||
  return content::KeyboardEventProcessingResult::NOT_HANDLED;
 | 
					  return content::KeyboardEventProcessingResult::NOT_HANDLED;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WebContents::EnterFullscreenModeForTab(content::WebContents* source,
 | 
					void WebContents::EnterFullscreenModeForTab(
 | 
				
			||||||
                                            const GURL& origin) {
 | 
					    content::WebContents* source,
 | 
				
			||||||
 | 
					    const GURL& origin,
 | 
				
			||||||
 | 
					    const blink::WebFullscreenOptions& options) {
 | 
				
			||||||
  auto* permission_helper =
 | 
					  auto* permission_helper =
 | 
				
			||||||
      WebContentsPermissionHelper::FromWebContents(source);
 | 
					      WebContentsPermissionHelper::FromWebContents(source);
 | 
				
			||||||
  auto callback = base::Bind(&WebContents::OnEnterFullscreenModeForTab,
 | 
					  auto callback = base::Bind(&WebContents::OnEnterFullscreenModeForTab,
 | 
				
			||||||
                             base::Unretained(this), source, origin);
 | 
					                             base::Unretained(this), source, origin, options);
 | 
				
			||||||
  permission_helper->RequestFullscreenPermission(callback);
 | 
					  permission_helper->RequestFullscreenPermission(callback);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WebContents::OnEnterFullscreenModeForTab(content::WebContents* source,
 | 
					void WebContents::OnEnterFullscreenModeForTab(
 | 
				
			||||||
                                              const GURL& origin,
 | 
					    content::WebContents* source,
 | 
				
			||||||
                                              bool allowed) {
 | 
					    const GURL& origin,
 | 
				
			||||||
 | 
					    const blink::WebFullscreenOptions& options,
 | 
				
			||||||
 | 
					    bool allowed) {
 | 
				
			||||||
  if (!allowed)
 | 
					  if (!allowed)
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  CommonWebContentsDelegate::EnterFullscreenModeForTab(source, origin);
 | 
					  CommonWebContentsDelegate::EnterFullscreenModeForTab(source, origin, options);
 | 
				
			||||||
  Emit("enter-html-full-screen");
 | 
					  Emit("enter-html-full-screen");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -757,8 +762,7 @@ content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
 | 
				
			||||||
  return dialog_manager_.get();
 | 
					  return dialog_manager_.get();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void WebContents::OnAudioStateChanged(content::WebContents* web_contents,
 | 
					void WebContents::OnAudioStateChanged(bool audible) {
 | 
				
			||||||
                                      bool audible) {
 | 
					 | 
				
			||||||
  Emit("-audio-state-changed", audible);
 | 
					  Emit("-audio-state-changed", audible);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1103,7 +1107,7 @@ int WebContents::GetProcessID() const {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
base::ProcessId WebContents::GetOSProcessID() const {
 | 
					base::ProcessId WebContents::GetOSProcessID() const {
 | 
				
			||||||
  base::ProcessHandle process_handle =
 | 
					  base::ProcessHandle process_handle =
 | 
				
			||||||
      web_contents()->GetMainFrame()->GetProcess()->GetHandle();
 | 
					      web_contents()->GetMainFrame()->GetProcess()->GetProcess().Handle();
 | 
				
			||||||
  return base::GetProcId(process_handle);
 | 
					  return base::GetProcId(process_handle);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1688,8 +1692,7 @@ void WebContents::StartDrag(const mate::Dictionary& item,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Start dragging.
 | 
					  // Start dragging.
 | 
				
			||||||
  if (!files.empty()) {
 | 
					  if (!files.empty()) {
 | 
				
			||||||
    base::MessageLoop::ScopedNestableTaskAllower allow(
 | 
					    base::MessageLoop::ScopedNestableTaskAllower allow;
 | 
				
			||||||
        base::MessageLoop::current());
 | 
					 | 
				
			||||||
    DragFileItems(files, icon->image(), web_contents()->GetNativeView());
 | 
					    DragFileItems(files, icon->image(), web_contents()->GetNativeView());
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    args->ThrowError("Must specify either 'file' or 'files' option");
 | 
					    args->ThrowError("Must specify either 'file' or 'files' option");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -229,6 +229,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
 | 
				
			||||||
  // Callback triggered on permission response.
 | 
					  // Callback triggered on permission response.
 | 
				
			||||||
  void OnEnterFullscreenModeForTab(content::WebContents* source,
 | 
					  void OnEnterFullscreenModeForTab(content::WebContents* source,
 | 
				
			||||||
                                   const GURL& origin,
 | 
					                                   const GURL& origin,
 | 
				
			||||||
 | 
					                                   const blink::WebFullscreenOptions& options,
 | 
				
			||||||
                                   bool allowed);
 | 
					                                   bool allowed);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Create window with the given disposition.
 | 
					  // Create window with the given disposition.
 | 
				
			||||||
| 
						 | 
					@ -300,7 +301,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
 | 
				
			||||||
                          const GURL& target_url,
 | 
					                          const GURL& target_url,
 | 
				
			||||||
                          content::WebContents* new_contents) override;
 | 
					                          content::WebContents* new_contents) override;
 | 
				
			||||||
  void AddNewContents(content::WebContents* source,
 | 
					  void AddNewContents(content::WebContents* source,
 | 
				
			||||||
                      content::WebContents* new_contents,
 | 
					                      std::unique_ptr<content::WebContents> new_contents,
 | 
				
			||||||
                      WindowOpenDisposition disposition,
 | 
					                      WindowOpenDisposition disposition,
 | 
				
			||||||
                      const gfx::Rect& initial_rect,
 | 
					                      const gfx::Rect& initial_rect,
 | 
				
			||||||
                      bool user_gesture,
 | 
					                      bool user_gesture,
 | 
				
			||||||
| 
						 | 
					@ -323,8 +324,10 @@ class WebContents : public mate::TrackableObject<WebContents>,
 | 
				
			||||||
  content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
 | 
					  content::KeyboardEventProcessingResult PreHandleKeyboardEvent(
 | 
				
			||||||
      content::WebContents* source,
 | 
					      content::WebContents* source,
 | 
				
			||||||
      const content::NativeWebKeyboardEvent& event) override;
 | 
					      const content::NativeWebKeyboardEvent& event) override;
 | 
				
			||||||
  void EnterFullscreenModeForTab(content::WebContents* source,
 | 
					  void EnterFullscreenModeForTab(
 | 
				
			||||||
                                 const GURL& origin) override;
 | 
					      content::WebContents* source,
 | 
				
			||||||
 | 
					      const GURL& origin,
 | 
				
			||||||
 | 
					      const blink::WebFullscreenOptions& options) override;
 | 
				
			||||||
  void ExitFullscreenModeForTab(content::WebContents* source) override;
 | 
					  void ExitFullscreenModeForTab(content::WebContents* source) override;
 | 
				
			||||||
  void RendererUnresponsive(
 | 
					  void RendererUnresponsive(
 | 
				
			||||||
      content::WebContents* source,
 | 
					      content::WebContents* source,
 | 
				
			||||||
| 
						 | 
					@ -355,8 +358,7 @@ class WebContents : public mate::TrackableObject<WebContents>,
 | 
				
			||||||
      const content::BluetoothChooser::EventHandler& handler) override;
 | 
					      const content::BluetoothChooser::EventHandler& handler) override;
 | 
				
			||||||
  content::JavaScriptDialogManager* GetJavaScriptDialogManager(
 | 
					  content::JavaScriptDialogManager* GetJavaScriptDialogManager(
 | 
				
			||||||
      content::WebContents* source) override;
 | 
					      content::WebContents* source) override;
 | 
				
			||||||
  void OnAudioStateChanged(content::WebContents* web_contents,
 | 
					  void OnAudioStateChanged(bool audible) override;
 | 
				
			||||||
                           bool audible) override;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // content::WebContentsObserver:
 | 
					  // content::WebContentsObserver:
 | 
				
			||||||
  void BeforeUnloadFired(const base::TimeTicks& proceed_time) override;
 | 
					  void BeforeUnloadFired(const base::TimeTicks& proceed_time) override;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -312,7 +312,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
 | 
				
			||||||
  // Make sure we're about to launch a known executable
 | 
					  // Make sure we're about to launch a known executable
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    base::FilePath child_path;
 | 
					    base::FilePath child_path;
 | 
				
			||||||
    PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
 | 
					    base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
					    base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
				
			||||||
    CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);
 | 
					    CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);
 | 
				
			||||||
| 
						 | 
					@ -551,15 +551,16 @@ void AtomBrowserClient::RenderProcessHostDestroyed(
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AtomBrowserClient::RenderProcessReady(content::RenderProcessHost* host) {
 | 
					void AtomBrowserClient::RenderProcessReady(content::RenderProcessHost* host) {
 | 
				
			||||||
  render_process_host_pids_[host->GetID()] = base::GetProcId(host->GetHandle());
 | 
					  render_process_host_pids_[host->GetID()] =
 | 
				
			||||||
 | 
					      base::GetProcId(host->GetProcess().Handle());
 | 
				
			||||||
  if (delegate_) {
 | 
					  if (delegate_) {
 | 
				
			||||||
    static_cast<api::App*>(delegate_)->RenderProcessReady(host);
 | 
					    static_cast<api::App*>(delegate_)->RenderProcessReady(host);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AtomBrowserClient::RenderProcessExited(content::RenderProcessHost* host,
 | 
					void AtomBrowserClient::RenderProcessExited(
 | 
				
			||||||
                                            base::TerminationStatus status,
 | 
					    content::RenderProcessHost* host,
 | 
				
			||||||
                                            int exit_code) {
 | 
					    const content::ChildProcessTerminationInfo& info) {
 | 
				
			||||||
  auto host_pid = render_process_host_pids_.find(host->GetID());
 | 
					  auto host_pid = render_process_host_pids_.find(host->GetID());
 | 
				
			||||||
  if (host_pid != render_process_host_pids_.end()) {
 | 
					  if (host_pid != render_process_host_pids_.end()) {
 | 
				
			||||||
    if (delegate_) {
 | 
					    if (delegate_) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -123,9 +123,9 @@ class AtomBrowserClient : public brightray::BrowserClient,
 | 
				
			||||||
  // content::RenderProcessHostObserver:
 | 
					  // content::RenderProcessHostObserver:
 | 
				
			||||||
  void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
 | 
					  void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
 | 
				
			||||||
  void RenderProcessReady(content::RenderProcessHost* host) override;
 | 
					  void RenderProcessReady(content::RenderProcessHost* host) override;
 | 
				
			||||||
  void RenderProcessExited(content::RenderProcessHost* host,
 | 
					  void RenderProcessExited(
 | 
				
			||||||
                           base::TerminationStatus status,
 | 
					      content::RenderProcessHost* host,
 | 
				
			||||||
                           int exit_code) override;
 | 
					      const content::ChildProcessTerminationInfo& info) override;
 | 
				
			||||||
  bool HandleExternalProtocol(
 | 
					  bool HandleExternalProtocol(
 | 
				
			||||||
      const GURL& url,
 | 
					      const GURL& url,
 | 
				
			||||||
      content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
 | 
					      content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,7 +108,7 @@ void AtomBrowserContext::RegisterPrefs(PrefRegistrySimple* pref_registry) {
 | 
				
			||||||
  pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
 | 
					  pref_registry->RegisterFilePathPref(prefs::kSelectFileLastDirectory,
 | 
				
			||||||
                                      base::FilePath());
 | 
					                                      base::FilePath());
 | 
				
			||||||
  base::FilePath download_dir;
 | 
					  base::FilePath download_dir;
 | 
				
			||||||
  PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_dir);
 | 
					  base::PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &download_dir);
 | 
				
			||||||
  pref_registry->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
 | 
					  pref_registry->RegisterFilePathPref(prefs::kDownloadDefaultDirectory,
 | 
				
			||||||
                                      download_dir);
 | 
					                                      download_dir);
 | 
				
			||||||
  pref_registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
 | 
					  pref_registry->RegisterDictionaryPref(prefs::kDevToolsFileSystemPaths);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,14 +115,14 @@ void AtomBrowserMainParts::RegisterDestructionCallback(
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int AtomBrowserMainParts::PreEarlyInitialization() {
 | 
					int AtomBrowserMainParts::PreEarlyInitialization() {
 | 
				
			||||||
  const int result = brightray::BrowserMainParts::PreEarlyInitialization();
 | 
					  const int result = brightray::BrowserMainParts::PreEarlyInitialization();
 | 
				
			||||||
  if (result != content::RESULT_CODE_NORMAL_EXIT)
 | 
					  if (result != service_manager::RESULT_CODE_NORMAL_EXIT)
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(OS_POSIX)
 | 
					#if defined(OS_POSIX)
 | 
				
			||||||
  HandleSIGCHLD();
 | 
					  HandleSIGCHLD();
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return content::RESULT_CODE_NORMAL_EXIT;
 | 
					  return service_manager::RESULT_CODE_NORMAL_EXIT;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AtomBrowserMainParts::PostEarlyInitialization() {
 | 
					void AtomBrowserMainParts::PostEarlyInitialization() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,7 @@ BridgeTaskRunner::BridgeTaskRunner() = default;
 | 
				
			||||||
BridgeTaskRunner::~BridgeTaskRunner() = default;
 | 
					BridgeTaskRunner::~BridgeTaskRunner() = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void BridgeTaskRunner::MessageLoopIsReady() {
 | 
					void BridgeTaskRunner::MessageLoopIsReady() {
 | 
				
			||||||
  auto* message_loop = base::MessageLoop::current();
 | 
					  auto message_loop = base::MessageLoop::current();
 | 
				
			||||||
  CHECK(message_loop);
 | 
					  CHECK(message_loop);
 | 
				
			||||||
  for (TaskPair& task : tasks_) {
 | 
					  for (TaskPair& task : tasks_) {
 | 
				
			||||||
    message_loop->task_runner()->PostDelayedTask(
 | 
					    message_loop->task_runner()->PostDelayedTask(
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ void BridgeTaskRunner::MessageLoopIsReady() {
 | 
				
			||||||
bool BridgeTaskRunner::PostDelayedTask(const base::Location& from_here,
 | 
					bool BridgeTaskRunner::PostDelayedTask(const base::Location& from_here,
 | 
				
			||||||
                                       base::OnceClosure task,
 | 
					                                       base::OnceClosure task,
 | 
				
			||||||
                                       base::TimeDelta delay) {
 | 
					                                       base::TimeDelta delay) {
 | 
				
			||||||
  auto* message_loop = base::MessageLoop::current();
 | 
					  auto message_loop = base::MessageLoop::current();
 | 
				
			||||||
  if (!message_loop) {
 | 
					  if (!message_loop) {
 | 
				
			||||||
    tasks_.push_back(std::make_tuple(from_here, std::move(task), delay));
 | 
					    tasks_.push_back(std::make_tuple(from_here, std::move(task), delay));
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
| 
						 | 
					@ -40,7 +40,7 @@ bool BridgeTaskRunner::PostDelayedTask(const base::Location& from_here,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool BridgeTaskRunner::RunsTasksInCurrentSequence() const {
 | 
					bool BridgeTaskRunner::RunsTasksInCurrentSequence() const {
 | 
				
			||||||
  auto* message_loop = base::MessageLoop::current();
 | 
					  auto message_loop = base::MessageLoop::current();
 | 
				
			||||||
  if (!message_loop)
 | 
					  if (!message_loop)
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,7 @@ bool BridgeTaskRunner::PostNonNestableDelayedTask(
 | 
				
			||||||
    const base::Location& from_here,
 | 
					    const base::Location& from_here,
 | 
				
			||||||
    base::OnceClosure task,
 | 
					    base::OnceClosure task,
 | 
				
			||||||
    base::TimeDelta delay) {
 | 
					    base::TimeDelta delay) {
 | 
				
			||||||
  auto* message_loop = base::MessageLoop::current();
 | 
					  auto message_loop = base::MessageLoop::current();
 | 
				
			||||||
  if (!message_loop) {
 | 
					  if (!message_loop) {
 | 
				
			||||||
    non_nestable_tasks_.push_back(
 | 
					    non_nestable_tasks_.push_back(
 | 
				
			||||||
        std::make_tuple(from_here, std::move(task), delay));
 | 
					        std::make_tuple(from_here, std::move(task), delay));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -92,7 +92,7 @@ void Browser::Shutdown() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (base::ThreadTaskRunnerHandle::IsSet()) {
 | 
					  if (base::ThreadTaskRunnerHandle::IsSet()) {
 | 
				
			||||||
    base::ThreadTaskRunnerHandle::Get()->PostTask(
 | 
					    base::ThreadTaskRunnerHandle::Get()->PostTask(
 | 
				
			||||||
        FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
 | 
					        FROM_HERE, base::RunLoop::QuitCurrentWhenIdleClosureDeprecated());
 | 
				
			||||||
  } else {
 | 
					  } else {
 | 
				
			||||||
    // There is no message loop available so we are in early stage.
 | 
					    // There is no message loop available so we are in early stage.
 | 
				
			||||||
    exit(0);
 | 
					    exit(0);
 | 
				
			||||||
| 
						 | 
					@ -152,7 +152,7 @@ void Browser::DidFinishLaunching(const base::DictionaryValue& launch_info) {
 | 
				
			||||||
  // Make sure the userData directory is created.
 | 
					  // Make sure the userData directory is created.
 | 
				
			||||||
  base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
					  base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
				
			||||||
  base::FilePath user_data;
 | 
					  base::FilePath user_data;
 | 
				
			||||||
  if (PathService::Get(brightray::DIR_USER_DATA, &user_data))
 | 
					  if (base::PathService::Get(brightray::DIR_USER_DATA, &user_data))
 | 
				
			||||||
    base::CreateDirectoryAndGetError(user_data, nullptr);
 | 
					    base::CreateDirectoryAndGetError(user_data, nullptr);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  is_ready_ = true;
 | 
					  is_ready_ = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,7 +45,7 @@ BOOL CALLBACK WindowsEnumerationHandler(HWND hwnd, LPARAM param) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool GetProcessExecPath(base::string16* exe) {
 | 
					bool GetProcessExecPath(base::string16* exe) {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  if (!PathService::Get(base::FILE_EXE, &path)) {
 | 
					  if (!base::PathService::Get(base::FILE_EXE, &path)) {
 | 
				
			||||||
    LOG(ERROR) << "Error getting app exe path";
 | 
					    LOG(ERROR) << "Error getting app exe path";
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					@ -329,7 +329,7 @@ PCWSTR Browser::GetAppUserModelID() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
std::string Browser::GetExecutableFileVersion() const {
 | 
					std::string Browser::GetExecutableFileVersion() const {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  if (PathService::Get(base::FILE_EXE, &path)) {
 | 
					  if (base::PathService::Get(base::FILE_EXE, &path)) {
 | 
				
			||||||
    base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
					    base::ThreadRestrictions::ScopedAllowIO allow_io;
 | 
				
			||||||
    std::unique_ptr<FileVersionInfo> version_info(
 | 
					    std::unique_ptr<FileVersionInfo> version_info(
 | 
				
			||||||
        FileVersionInfo::CreateFileVersionInfo(path));
 | 
					        FileVersionInfo::CreateFileVersionInfo(path));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -270,12 +270,13 @@ void CommonWebContentsDelegate::EnumerateDirectory(content::WebContents* guest,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CommonWebContentsDelegate::EnterFullscreenModeForTab(
 | 
					void CommonWebContentsDelegate::EnterFullscreenModeForTab(
 | 
				
			||||||
    content::WebContents* source,
 | 
					    content::WebContents* source,
 | 
				
			||||||
    const GURL& origin) {
 | 
					    const GURL& origin,
 | 
				
			||||||
 | 
					    const blink::WebFullscreenOptions& options) {
 | 
				
			||||||
  if (!owner_window_)
 | 
					  if (!owner_window_)
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  SetHtmlApiFullscreen(true);
 | 
					  SetHtmlApiFullscreen(true);
 | 
				
			||||||
  owner_window_->NotifyWindowEnterHtmlFullScreen();
 | 
					  owner_window_->NotifyWindowEnterHtmlFullScreen();
 | 
				
			||||||
  source->GetRenderViewHost()->GetWidget()->WasResized();
 | 
					  source->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void CommonWebContentsDelegate::ExitFullscreenModeForTab(
 | 
					void CommonWebContentsDelegate::ExitFullscreenModeForTab(
 | 
				
			||||||
| 
						 | 
					@ -284,7 +285,7 @@ void CommonWebContentsDelegate::ExitFullscreenModeForTab(
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  SetHtmlApiFullscreen(false);
 | 
					  SetHtmlApiFullscreen(false);
 | 
				
			||||||
  owner_window_->NotifyWindowLeaveHtmlFullScreen();
 | 
					  owner_window_->NotifyWindowLeaveHtmlFullScreen();
 | 
				
			||||||
  source->GetRenderViewHost()->GetWidget()->WasResized();
 | 
					  source->GetRenderViewHost()->GetWidget()->SynchronizeVisualProperties();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool CommonWebContentsDelegate::IsFullscreenForTabOrPending(
 | 
					bool CommonWebContentsDelegate::IsFullscreenForTabOrPending(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,8 +80,10 @@ class CommonWebContentsDelegate
 | 
				
			||||||
  void EnumerateDirectory(content::WebContents* web_contents,
 | 
					  void EnumerateDirectory(content::WebContents* web_contents,
 | 
				
			||||||
                          int request_id,
 | 
					                          int request_id,
 | 
				
			||||||
                          const base::FilePath& path) override;
 | 
					                          const base::FilePath& path) override;
 | 
				
			||||||
  void EnterFullscreenModeForTab(content::WebContents* source,
 | 
					  void EnterFullscreenModeForTab(
 | 
				
			||||||
                                 const GURL& origin) override;
 | 
					      content::WebContents* source,
 | 
				
			||||||
 | 
					      const GURL& origin,
 | 
				
			||||||
 | 
					      const blink::WebFullscreenOptions& options) override;
 | 
				
			||||||
  void ExitFullscreenModeForTab(content::WebContents* source) override;
 | 
					  void ExitFullscreenModeForTab(content::WebContents* source) override;
 | 
				
			||||||
  bool IsFullscreenForTabOrPending(
 | 
					  bool IsFullscreenForTabOrPending(
 | 
				
			||||||
      const content::WebContents* source) const override;
 | 
					      const content::WebContents* source) const override;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,9 +4,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "atom/browser/node_debugger.h"
 | 
					#include "atom/browser/node_debugger.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <memory>
 | 
				
			||||||
#include <string>
 | 
					#include <string>
 | 
				
			||||||
 | 
					#include <vector>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "base/command_line.h"
 | 
					#include "base/command_line.h"
 | 
				
			||||||
 | 
					#include "base/logging.h"
 | 
				
			||||||
#include "base/strings/utf_string_conversions.h"
 | 
					#include "base/strings/utf_string_conversions.h"
 | 
				
			||||||
#include "libplatform/libplatform.h"
 | 
					#include "libplatform/libplatform.h"
 | 
				
			||||||
#include "native_mate/dictionary.h"
 | 
					#include "native_mate/dictionary.h"
 | 
				
			||||||
| 
						 | 
					@ -24,29 +27,40 @@ void NodeDebugger::Start() {
 | 
				
			||||||
  if (inspector == nullptr)
 | 
					  if (inspector == nullptr)
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  node::DebugOptions options;
 | 
					  std::vector<std::string> args;
 | 
				
			||||||
  for (auto& arg : base::CommandLine::ForCurrentProcess()->argv()) {
 | 
					  for (auto& arg : base::CommandLine::ForCurrentProcess()->argv()) {
 | 
				
			||||||
#if defined(OS_WIN)
 | 
					#if defined(OS_WIN)
 | 
				
			||||||
    const std::string nice_arg = base::UTF16ToUTF8(arg);
 | 
					    args.push_back(base::UTF16ToUTF8(arg));
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
    const std::string& nice_arg = arg;
 | 
					    args.push_back(arg);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    // Stop handling arguments after a "--" to be consistent with Chromium
 | 
					  }
 | 
				
			||||||
    if (nice_arg == "--")
 | 
					 | 
				
			||||||
      break;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    options.ParseOption("Electron", nice_arg);
 | 
					  auto options = std::make_shared<node::DebugOptions>();
 | 
				
			||||||
 | 
					  std::vector<std::string> exec_args;
 | 
				
			||||||
 | 
					  std::vector<std::string> v8_args;
 | 
				
			||||||
 | 
					  std::string error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  node::options_parser::DebugOptionsParser::instance.Parse(
 | 
				
			||||||
 | 
					      &args, &exec_args, &v8_args, options.get(),
 | 
				
			||||||
 | 
					      node::options_parser::kDisallowedInEnvironment, &error);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (!error.empty()) {
 | 
				
			||||||
 | 
					    // TODO(jeremy): what's the appropriate behaviour here?
 | 
				
			||||||
 | 
					    LOG(ERROR) << "Error parsing node options: " << error;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Set process._debugWaitConnect if --inspect-brk was specified to stop
 | 
					  // Set process._debugWaitConnect if --inspect-brk was specified to stop
 | 
				
			||||||
  // the debugger on the first line
 | 
					  // the debugger on the first line
 | 
				
			||||||
  if (options.wait_for_connect()) {
 | 
					  if (options->wait_for_connect()) {
 | 
				
			||||||
    mate::Dictionary process(env_->isolate(), env_->process_object());
 | 
					    mate::Dictionary process(env_->isolate(), env_->process_object());
 | 
				
			||||||
    process.Set("_breakFirstLine", true);
 | 
					    process.Set("_breakFirstLine", true);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  inspector->Start(/* path */ nullptr, options);
 | 
					  const char* path = "";
 | 
				
			||||||
  DCHECK(env_->inspector_agent()->IsStarted());
 | 
					  inspector->Start(path, options);
 | 
				
			||||||
 | 
					  // FIXME
 | 
				
			||||||
 | 
					  // DCHECK(env_->inspector_agent()->IsListening());
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace atom
 | 
					}  // namespace atom
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,7 @@ bool RelaunchApp(const StringVector& argv) {
 | 
				
			||||||
  // helper process, because there's no guarantee that the updated version's
 | 
					  // helper process, because there's no guarantee that the updated version's
 | 
				
			||||||
  // relauncher implementation will be compatible with the running version's.
 | 
					  // relauncher implementation will be compatible with the running version's.
 | 
				
			||||||
  base::FilePath child_path;
 | 
					  base::FilePath child_path;
 | 
				
			||||||
  if (!PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) {
 | 
					  if (!base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path)) {
 | 
				
			||||||
    LOG(ERROR) << "No CHILD_PROCESS_EXE";
 | 
					    LOG(ERROR) << "No CHILD_PROCESS_EXE";
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -24,6 +24,7 @@
 | 
				
			||||||
#include "content/public/common/web_preferences.h"
 | 
					#include "content/public/common/web_preferences.h"
 | 
				
			||||||
#include "native_mate/dictionary.h"
 | 
					#include "native_mate/dictionary.h"
 | 
				
			||||||
#include "net/base/filename_util.h"
 | 
					#include "net/base/filename_util.h"
 | 
				
			||||||
 | 
					#include "services/service_manager/sandbox/switches.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(OS_WIN)
 | 
					#if defined(OS_WIN)
 | 
				
			||||||
#include "ui/gfx/switches.h"
 | 
					#include "ui/gfx/switches.h"
 | 
				
			||||||
| 
						 | 
					@ -245,7 +246,7 @@ void WebContentsPreferences::AppendCommandLineSwitches(
 | 
				
			||||||
  if (IsEnabled(options::kSandbox))
 | 
					  if (IsEnabled(options::kSandbox))
 | 
				
			||||||
    command_line->AppendSwitch(switches::kEnableSandbox);
 | 
					    command_line->AppendSwitch(switches::kEnableSandbox);
 | 
				
			||||||
  else if (!command_line->HasSwitch(switches::kEnableSandbox))
 | 
					  else if (!command_line->HasSwitch(switches::kEnableSandbox))
 | 
				
			||||||
    command_line->AppendSwitch(::switches::kNoSandbox);
 | 
					    command_line->AppendSwitch(service_manager::switches::kNoSandbox);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Check if nativeWindowOpen is enabled.
 | 
					  // Check if nativeWindowOpen is enabled.
 | 
				
			||||||
  if (IsEnabled(options::kNativeWindowOpen))
 | 
					  if (IsEnabled(options::kNativeWindowOpen))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "atom/browser/web_view_guest_delegate.h"
 | 
					#include "atom/browser/web_view_guest_delegate.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <memory>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "atom/browser/api/atom_api_web_contents.h"
 | 
					#include "atom/browser/api/atom_api_web_contents.h"
 | 
				
			||||||
#include "atom/common/native_mate_converters/gurl_converter.h"
 | 
					#include "atom/common/native_mate_converters/gurl_converter.h"
 | 
				
			||||||
#include "content/browser/web_contents/web_contents_impl.h"
 | 
					#include "content/browser/web_contents/web_contents_impl.h"
 | 
				
			||||||
| 
						 | 
					@ -104,13 +106,16 @@ content::WebContents* WebViewGuestDelegate::CreateNewGuestWindow(
 | 
				
			||||||
  guest_params.initial_size =
 | 
					  guest_params.initial_size =
 | 
				
			||||||
      embedder_web_contents_->GetContainerBounds().size();
 | 
					      embedder_web_contents_->GetContainerBounds().size();
 | 
				
			||||||
  guest_params.context = embedder_web_contents_->GetNativeView();
 | 
					  guest_params.context = embedder_web_contents_->GetNativeView();
 | 
				
			||||||
  auto* guest_contents = content::WebContents::Create(guest_params);
 | 
					  std::unique_ptr<content::WebContents> guest_contents =
 | 
				
			||||||
 | 
					      content::WebContents::Create(guest_params);
 | 
				
			||||||
 | 
					  content::RenderWidgetHost* render_widget_host =
 | 
				
			||||||
 | 
					      guest_contents->GetRenderViewHost()->GetWidget();
 | 
				
			||||||
  auto* guest_contents_impl =
 | 
					  auto* guest_contents_impl =
 | 
				
			||||||
      static_cast<content::WebContentsImpl*>(guest_contents);
 | 
					      static_cast<content::WebContentsImpl*>(guest_contents.release());
 | 
				
			||||||
  guest_contents_impl->GetView()->CreateViewForWidget(
 | 
					  guest_contents_impl->GetView()->CreateViewForWidget(render_widget_host,
 | 
				
			||||||
      guest_contents->GetRenderViewHost()->GetWidget(), false);
 | 
					                                                      false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return guest_contents;
 | 
					  return guest_contents_impl;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace atom
 | 
					}  // namespace atom
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -66,7 +66,7 @@ void AtomBindings::BindTo(v8::Isolate* isolate, v8::Local<v8::Object> process) {
 | 
				
			||||||
  dict.SetMethod("getIOCounters", &GetIOCounters);
 | 
					  dict.SetMethod("getIOCounters", &GetIOCounters);
 | 
				
			||||||
  dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot);
 | 
					  dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot);
 | 
				
			||||||
#if defined(OS_POSIX)
 | 
					#if defined(OS_POSIX)
 | 
				
			||||||
  dict.SetMethod("setFdLimit", &base::SetFdLimit);
 | 
					  dict.SetMethod("setFdLimit", &base::IncreaseFdLimitTo);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
  dict.SetMethod("activateUvLoop", base::Bind(&AtomBindings::ActivateUVLoop,
 | 
					  dict.SetMethod("activateUvLoop", base::Bind(&AtomBindings::ActivateUVLoop,
 | 
				
			||||||
                                              base::Unretained(this)));
 | 
					                                              base::Unretained(this)));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,7 +8,7 @@
 | 
				
			||||||
#ifndef ATOM_COMMON_CHROME_VERSION_H_
 | 
					#ifndef ATOM_COMMON_CHROME_VERSION_H_
 | 
				
			||||||
#define ATOM_COMMON_CHROME_VERSION_H_
 | 
					#define ATOM_COMMON_CHROME_VERSION_H_
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define CHROME_VERSION_STRING "67.0.3396.99"
 | 
					#define CHROME_VERSION_STRING "68.0.3440.128"
 | 
				
			||||||
#define CHROME_VERSION "v" CHROME_VERSION_STRING
 | 
					#define CHROME_VERSION "v" CHROME_VERSION_STRING
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif  // ATOM_COMMON_CHROME_VERSION_H_
 | 
					#endif  // ATOM_COMMON_CHROME_VERSION_H_
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -162,7 +162,7 @@ bool Converter<blink::WebInputEvent>::FromV8(v8::Isolate* isolate,
 | 
				
			||||||
  std::vector<blink::WebInputEvent::Modifiers> modifiers;
 | 
					  std::vector<blink::WebInputEvent::Modifiers> modifiers;
 | 
				
			||||||
  if (dict.Get("modifiers", &modifiers))
 | 
					  if (dict.Get("modifiers", &modifiers))
 | 
				
			||||||
    out->SetModifiers(VectorToBitArray(modifiers));
 | 
					    out->SetModifiers(VectorToBitArray(modifiers));
 | 
				
			||||||
  out->SetTimeStampSeconds(base::Time::Now().ToDoubleT());
 | 
					  out->SetTimeStamp(base::TimeTicks::Now());
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -136,7 +136,7 @@ std::unique_ptr<const char* []> StringVectorToArgArray(
 | 
				
			||||||
base::FilePath GetResourcesPath(bool is_browser) {
 | 
					base::FilePath GetResourcesPath(bool is_browser) {
 | 
				
			||||||
  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
					  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
				
			||||||
  base::FilePath exec_path(command_line->GetProgram());
 | 
					  base::FilePath exec_path(command_line->GetProgram());
 | 
				
			||||||
  PathService::Get(base::FILE_EXE, &exec_path);
 | 
					  base::PathService::Get(base::FILE_EXE, &exec_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base::FilePath resources_path =
 | 
					  base::FilePath resources_path =
 | 
				
			||||||
#if defined(OS_MACOSX)
 | 
					#if defined(OS_MACOSX)
 | 
				
			||||||
| 
						 | 
					@ -217,7 +217,11 @@ void NodeBindings::Initialize() {
 | 
				
			||||||
  // Init node.
 | 
					  // Init node.
 | 
				
			||||||
  // (we assume node::Init would not modify the parameters under embedded mode).
 | 
					  // (we assume node::Init would not modify the parameters under embedded mode).
 | 
				
			||||||
  // NOTE: If you change this line, please ping @codebytere or @MarshallOfSound
 | 
					  // NOTE: If you change this line, please ping @codebytere or @MarshallOfSound
 | 
				
			||||||
  node::Init(nullptr, nullptr, nullptr, nullptr);
 | 
					  int argc = 0;
 | 
				
			||||||
 | 
					  int exec_argc = 0;
 | 
				
			||||||
 | 
					  const char** argv = nullptr;
 | 
				
			||||||
 | 
					  const char** exec_argv = nullptr;
 | 
				
			||||||
 | 
					  node::Init(&argc, argv, &exec_argc, &exec_argv);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if defined(OS_WIN)
 | 
					#if defined(OS_WIN)
 | 
				
			||||||
  // uv_init overrides error mode to suppress the default crash dialog, bring
 | 
					  // uv_init overrides error mode to suppress the default crash dialog, bring
 | 
				
			||||||
| 
						 | 
					@ -285,7 +289,7 @@ node::Environment* NodeBindings::CreateEnvironment(
 | 
				
			||||||
    process.Set("_noBrowserGlobals", resources_path);
 | 
					    process.Set("_noBrowserGlobals", resources_path);
 | 
				
			||||||
  // The path to helper app.
 | 
					  // The path to helper app.
 | 
				
			||||||
  base::FilePath helper_exec_path;
 | 
					  base::FilePath helper_exec_path;
 | 
				
			||||||
  PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path);
 | 
					  base::PathService::Get(content::CHILD_PROCESS_EXE, &helper_exec_path);
 | 
				
			||||||
  process.Set("helperExecPath", helper_exec_path);
 | 
					  process.Set("helperExecPath", helper_exec_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return env;
 | 
					  return env;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,8 +35,8 @@
 | 
				
			||||||
#include "env.h"
 | 
					#include "env.h"
 | 
				
			||||||
#include "node.h"
 | 
					#include "node.h"
 | 
				
			||||||
#include "node_buffer.h"
 | 
					#include "node_buffer.h"
 | 
				
			||||||
#include "node_debug_options.h"
 | 
					 | 
				
			||||||
#include "node_internals.h"
 | 
					#include "node_internals.h"
 | 
				
			||||||
 | 
					#include "node_options.h"
 | 
				
			||||||
#include "node_platform.h"
 | 
					#include "node_platform.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace node {
 | 
					namespace node {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -141,7 +141,7 @@ void AtomRenderFrameObserver::CreateIsolatedWorldContext() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Create initial script context in isolated world
 | 
					  // Create initial script context in isolated world
 | 
				
			||||||
  blink::WebScriptSource source("void 0");
 | 
					  blink::WebScriptSource source("void 0");
 | 
				
			||||||
  frame->ExecuteScriptInIsolatedWorld(World::ISOLATED_WORLD, &source, 1);
 | 
					  frame->ExecuteScriptInIsolatedWorld(World::ISOLATED_WORLD, source);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool AtomRenderFrameObserver::IsMainWorld(int world_id) {
 | 
					bool AtomRenderFrameObserver::IsMainWorld(int world_id) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,7 +83,7 @@ v8::Local<v8::Value> GetBinding(v8::Isolate* isolate,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
base::FilePath::StringType GetExecPath() {
 | 
					base::FilePath::StringType GetExecPath() {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  PathService::Get(base::FILE_EXE, &path);
 | 
					  base::PathService::Get(base::FILE_EXE, &path);
 | 
				
			||||||
  return path.value();
 | 
					  return path.value();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,6 +6,7 @@ static_library("brightray") {
 | 
				
			||||||
    "//base:base_static",
 | 
					    "//base:base_static",
 | 
				
			||||||
    "//components/network_session_configurator/common",
 | 
					    "//components/network_session_configurator/common",
 | 
				
			||||||
    "//components/prefs",
 | 
					    "//components/prefs",
 | 
				
			||||||
 | 
					    "//components/certificate_transparency",
 | 
				
			||||||
    "//content/public/browser",
 | 
					    "//content/public/browser",
 | 
				
			||||||
    "//content/shell:copy_shell_resources",
 | 
					    "//content/shell:copy_shell_resources",
 | 
				
			||||||
    "//net:extras",
 | 
					    "//net:extras",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,7 +115,7 @@ NetLog* BrowserClient::GetNetLog() {
 | 
				
			||||||
base::FilePath BrowserClient::GetDefaultDownloadDirectory() {
 | 
					base::FilePath BrowserClient::GetDefaultDownloadDirectory() {
 | 
				
			||||||
  // ~/Downloads
 | 
					  // ~/Downloads
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  if (PathService::Get(base::DIR_HOME, &path))
 | 
					  if (base::PathService::Get(base::DIR_HOME, &path))
 | 
				
			||||||
    path = path.Append(FILE_PATH_LITERAL("Downloads"));
 | 
					    path = path.Append(FILE_PATH_LITERAL("Downloads"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return path;
 | 
					  return path;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -57,10 +57,10 @@ scoped_refptr<BrowserContext> BrowserContext::Get(const std::string& partition,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BrowserContext::BrowserContext(const std::string& partition, bool in_memory)
 | 
					BrowserContext::BrowserContext(const std::string& partition, bool in_memory)
 | 
				
			||||||
    : in_memory_(in_memory), weak_factory_(this) {
 | 
					    : in_memory_(in_memory), weak_factory_(this) {
 | 
				
			||||||
  if (!PathService::Get(DIR_USER_DATA, &path_)) {
 | 
					  if (!base::PathService::Get(DIR_USER_DATA, &path_)) {
 | 
				
			||||||
    PathService::Get(DIR_APP_DATA, &path_);
 | 
					    base::PathService::Get(DIR_APP_DATA, &path_);
 | 
				
			||||||
    path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
 | 
					    path_ = path_.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
 | 
				
			||||||
    PathService::Override(DIR_USER_DATA, path_);
 | 
					    base::PathService::Override(DIR_USER_DATA, path_);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!in_memory_ && !partition.empty())
 | 
					  if (!in_memory_ && !partition.empty())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -95,12 +95,12 @@ const int kWaitForUIThreadSeconds = 10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void OverrideLinuxAppDataPath() {
 | 
					void OverrideLinuxAppDataPath() {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  if (PathService::Get(DIR_APP_DATA, &path))
 | 
					  if (base::PathService::Get(DIR_APP_DATA, &path))
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
  std::unique_ptr<base::Environment> env(base::Environment::Create());
 | 
					  std::unique_ptr<base::Environment> env(base::Environment::Create());
 | 
				
			||||||
  path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar,
 | 
					  path = base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar,
 | 
				
			||||||
                                    base::nix::kDotConfigDir);
 | 
					                                    base::nix::kDotConfigDir);
 | 
				
			||||||
  PathService::Override(DIR_APP_DATA, path);
 | 
					  base::PathService::Override(DIR_APP_DATA, path);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) {
 | 
					int BrowserX11ErrorHandler(Display* d, XErrorEvent* error) {
 | 
				
			||||||
| 
						 | 
					@ -137,7 +137,7 @@ int BrowserX11IOErrorHandler(Display* d) {
 | 
				
			||||||
  g_in_x11_io_error_handler = true;
 | 
					  g_in_x11_io_error_handler = true;
 | 
				
			||||||
  LOG(ERROR) << "X IO error received (X server probably went away)";
 | 
					  LOG(ERROR) << "X IO error received (X server probably went away)";
 | 
				
			||||||
  base::ThreadTaskRunnerHandle::Get()->PostTask(
 | 
					  base::ThreadTaskRunnerHandle::Get()->PostTask(
 | 
				
			||||||
      FROM_HERE, base::MessageLoop::QuitWhenIdleClosure());
 | 
					      FROM_HERE, base::RunLoop::QuitCurrentWhenIdleClosureDeprecated());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -173,10 +173,10 @@ BrowserMainParts::~BrowserMainParts() {}
 | 
				
			||||||
#if defined(OS_WIN) || defined(OS_LINUX)
 | 
					#if defined(OS_WIN) || defined(OS_LINUX)
 | 
				
			||||||
void OverrideAppLogsPath() {
 | 
					void OverrideAppLogsPath() {
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  if (PathService::Get(brightray::DIR_APP_DATA, &path)) {
 | 
					  if (base::PathService::Get(brightray::DIR_APP_DATA, &path)) {
 | 
				
			||||||
    path = path.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
 | 
					    path = path.Append(base::FilePath::FromUTF8Unsafe(GetApplicationName()));
 | 
				
			||||||
    path = path.Append(base::FilePath::FromUTF8Unsafe("logs"));
 | 
					    path = path.Append(base::FilePath::FromUTF8Unsafe("logs"));
 | 
				
			||||||
    PathService::Override(DIR_APP_LOGS, path);
 | 
					    base::PathService::Override(DIR_APP_LOGS, path);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
| 
						 | 
					@ -215,7 +215,7 @@ int BrowserMainParts::PreEarlyInitialization() {
 | 
				
			||||||
  ui::SetX11ErrorHandlers(nullptr, nullptr);
 | 
					  ui::SetX11ErrorHandlers(nullptr, nullptr);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return content::RESULT_CODE_NORMAL_EXIT;
 | 
					  return service_manager::RESULT_CODE_NORMAL_EXIT;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void BrowserMainParts::ToolkitInitialized() {
 | 
					void BrowserMainParts::ToolkitInitialized() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,8 @@ void BrowserMainParts::OverrideAppLogsPath() {
 | 
				
			||||||
  NSString* libraryPath =
 | 
					  NSString* libraryPath =
 | 
				
			||||||
      [NSHomeDirectory() stringByAppendingPathComponent:logsPath];
 | 
					      [NSHomeDirectory() stringByAppendingPathComponent:logsPath];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  PathService::Override(DIR_APP_LOGS, base::FilePath([libraryPath UTF8String]));
 | 
					  base::PathService::Override(DIR_APP_LOGS,
 | 
				
			||||||
 | 
					                              base::FilePath([libraryPath UTF8String]));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Replicates NSApplicationMain, but doesn't start a run loop.
 | 
					// Replicates NSApplicationMain, but doesn't start a run loop.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -320,9 +320,8 @@ void InspectableWebContentsImpl::ShowDevTools() {
 | 
				
			||||||
      DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this));
 | 
					      DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!external_devtools_web_contents_) {  // no external devtools
 | 
					  if (!external_devtools_web_contents_) {  // no external devtools
 | 
				
			||||||
    managed_devtools_web_contents_.reset(
 | 
					    managed_devtools_web_contents_ = content::WebContents::Create(
 | 
				
			||||||
        content::WebContents::Create(content::WebContents::CreateParams(
 | 
					        content::WebContents::CreateParams(web_contents_->GetBrowserContext()));
 | 
				
			||||||
            web_contents_->GetBrowserContext())));
 | 
					 | 
				
			||||||
    managed_devtools_web_contents_->SetDelegate(this);
 | 
					    managed_devtools_web_contents_->SetDelegate(this);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,7 +54,7 @@ class NotificationDelegateImpl final : public brightray::NotificationDelegate {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void NotificationClosed() override {
 | 
					  void NotificationClosed() override {
 | 
				
			||||||
    content::NotificationEventDispatcher::GetInstance()
 | 
					    content::NotificationEventDispatcher::GetInstance()
 | 
				
			||||||
        ->DispatchNonPersistentCloseEvent(notification_id_);
 | 
					        ->DispatchNonPersistentCloseEvent(notification_id_, base::DoNothing());
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  void NotificationDisplayed() override {
 | 
					  void NotificationDisplayed() override {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,6 +18,7 @@
 | 
				
			||||||
#include "brightray/browser/net/require_ct_delegate.h"
 | 
					#include "brightray/browser/net/require_ct_delegate.h"
 | 
				
			||||||
#include "brightray/browser/net_log.h"
 | 
					#include "brightray/browser/net_log.h"
 | 
				
			||||||
#include "brightray/common/switches.h"
 | 
					#include "brightray/common/switches.h"
 | 
				
			||||||
 | 
					#include "components/certificate_transparency/ct_known_logs.h"
 | 
				
			||||||
#include "components/network_session_configurator/common/network_switches.h"
 | 
					#include "components/network_session_configurator/common/network_switches.h"
 | 
				
			||||||
#include "content/public/browser/browser_thread.h"
 | 
					#include "content/public/browser/browser_thread.h"
 | 
				
			||||||
#include "content/public/browser/cookie_store_factory.h"
 | 
					#include "content/public/browser/cookie_store_factory.h"
 | 
				
			||||||
| 
						 | 
					@ -25,7 +26,6 @@
 | 
				
			||||||
#include "content/public/browser/resource_context.h"
 | 
					#include "content/public/browser/resource_context.h"
 | 
				
			||||||
#include "net/base/host_mapping_rules.h"
 | 
					#include "net/base/host_mapping_rules.h"
 | 
				
			||||||
#include "net/cert/cert_verifier.h"
 | 
					#include "net/cert/cert_verifier.h"
 | 
				
			||||||
#include "net/cert/ct_known_logs.h"
 | 
					 | 
				
			||||||
#include "net/cert/ct_log_verifier.h"
 | 
					#include "net/cert/ct_log_verifier.h"
 | 
				
			||||||
#include "net/cert/ct_policy_enforcer.h"
 | 
					#include "net/cert/ct_policy_enforcer.h"
 | 
				
			||||||
#include "net/cert/multi_log_ct_verifier.h"
 | 
					#include "net/cert/multi_log_ct_verifier.h"
 | 
				
			||||||
| 
						 | 
					@ -62,6 +62,29 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
using content::BrowserThread;
 | 
					using content::BrowserThread;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					std::vector<scoped_refptr<const net::CTLogVerifier>>
 | 
				
			||||||
 | 
					CreateLogVerifiersForKnownLogs() {
 | 
				
			||||||
 | 
					  std::vector<scoped_refptr<const net::CTLogVerifier>> verifiers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (const auto& log : certificate_transparency::GetKnownLogs()) {
 | 
				
			||||||
 | 
					    scoped_refptr<const net::CTLogVerifier> log_verifier =
 | 
				
			||||||
 | 
					        net::CTLogVerifier::Create(
 | 
				
			||||||
 | 
					            base::StringPiece(log.log_key, log.log_key_length), log.log_name,
 | 
				
			||||||
 | 
					            log.log_dns_domain);
 | 
				
			||||||
 | 
					    // Make sure no null logs enter verifiers. Parsing of all statically
 | 
				
			||||||
 | 
					    // configured logs should always succeed, unless there has been binary or
 | 
				
			||||||
 | 
					    // memory corruption.
 | 
				
			||||||
 | 
					    CHECK(log_verifier);
 | 
				
			||||||
 | 
					    verifiers.push_back(std::move(log_verifier));
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return verifiers;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}  // namespace
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace brightray {
 | 
					namespace brightray {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ResourceContext : public content::ResourceContext {
 | 
					class ResourceContext : public content::ResourceContext {
 | 
				
			||||||
| 
						 | 
					@ -347,11 +370,13 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() {
 | 
				
			||||||
        new net::HttpServerPropertiesImpl);
 | 
					        new net::HttpServerPropertiesImpl);
 | 
				
			||||||
    storage_->set_http_server_properties(std::move(server_properties));
 | 
					    storage_->set_http_server_properties(std::move(server_properties));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // FIXME(jeremy): decide what to do about certificate transparency.
 | 
				
			||||||
    std::unique_ptr<net::MultiLogCTVerifier> ct_verifier =
 | 
					    std::unique_ptr<net::MultiLogCTVerifier> ct_verifier =
 | 
				
			||||||
        std::make_unique<net::MultiLogCTVerifier>();
 | 
					        std::make_unique<net::MultiLogCTVerifier>();
 | 
				
			||||||
    ct_verifier->AddLogs(net::ct::CreateLogVerifiersForKnownLogs());
 | 
					    ct_verifier->AddLogs(CreateLogVerifiersForKnownLogs());
 | 
				
			||||||
    storage_->set_cert_transparency_verifier(std::move(ct_verifier));
 | 
					    storage_->set_cert_transparency_verifier(std::move(ct_verifier));
 | 
				
			||||||
    storage_->set_ct_policy_enforcer(std::make_unique<net::CTPolicyEnforcer>());
 | 
					    storage_->set_ct_policy_enforcer(
 | 
				
			||||||
 | 
					        std::make_unique<net::DefaultCTPolicyEnforcer>());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    net::HttpNetworkSession::Params network_session_params;
 | 
					    net::HttpNetworkSession::Params network_session_params;
 | 
				
			||||||
    network_session_params.ignore_certificate_errors = false;
 | 
					    network_session_params.ignore_certificate_errors = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,12 +86,6 @@ void ViewsDelegate::AddRef() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ViewsDelegate::ReleaseRef() {}
 | 
					void ViewsDelegate::ReleaseRef() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
content::WebContents* ViewsDelegate::CreateWebContents(
 | 
					 | 
				
			||||||
    content::BrowserContext* browser_context,
 | 
					 | 
				
			||||||
    content::SiteInstance* site_instance) {
 | 
					 | 
				
			||||||
  return NULL;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void ViewsDelegate::OnBeforeWidgetInit(
 | 
					void ViewsDelegate::OnBeforeWidgetInit(
 | 
				
			||||||
    views::Widget::InitParams* params,
 | 
					    views::Widget::InitParams* params,
 | 
				
			||||||
    views::internal::NativeWidgetDelegate* delegate) {
 | 
					    views::internal::NativeWidgetDelegate* delegate) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,9 +46,6 @@ class ViewsDelegate : public views::ViewsDelegate {
 | 
				
			||||||
      views::Widget* widget) override;
 | 
					      views::Widget* widget) override;
 | 
				
			||||||
  void AddRef() override;
 | 
					  void AddRef() override;
 | 
				
			||||||
  void ReleaseRef() override;
 | 
					  void ReleaseRef() override;
 | 
				
			||||||
  content::WebContents* CreateWebContents(
 | 
					 | 
				
			||||||
      content::BrowserContext* browser_context,
 | 
					 | 
				
			||||||
      content::SiteInstance* site_instance) override;
 | 
					 | 
				
			||||||
  void OnBeforeWidgetInit(
 | 
					  void OnBeforeWidgetInit(
 | 
				
			||||||
      views::Widget::InitParams* params,
 | 
					      views::Widget::InitParams* params,
 | 
				
			||||||
      views::internal::NativeWidgetDelegate* delegate) override;
 | 
					      views::internal::NativeWidgetDelegate* delegate) override;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@ bool HasMainProcessKey() {
 | 
				
			||||||
base::FilePath MainApplicationBundlePath() {
 | 
					base::FilePath MainApplicationBundlePath() {
 | 
				
			||||||
  // Start out with the path to the running executable.
 | 
					  // Start out with the path to the running executable.
 | 
				
			||||||
  base::FilePath path;
 | 
					  base::FilePath path;
 | 
				
			||||||
  PathService::Get(base::FILE_EXE, &path);
 | 
					  base::PathService::Get(base::FILE_EXE, &path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Up to Contents.
 | 
					  // Up to Contents.
 | 
				
			||||||
  if (!HasMainProcessKey() &&
 | 
					  if (!HasMainProcessKey() &&
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
#include "brightray/common/content_client.h"
 | 
					#include "brightray/common/content_client.h"
 | 
				
			||||||
#include "content/public/common/content_switches.h"
 | 
					#include "content/public/common/content_switches.h"
 | 
				
			||||||
#include "electron/buildflags/buildflags.h"
 | 
					#include "electron/buildflags/buildflags.h"
 | 
				
			||||||
 | 
					#include "services/service_manager/embedder/switches.h"
 | 
				
			||||||
#include "ui/base/resource/resource_bundle.h"
 | 
					#include "ui/base/resource/resource_bundle.h"
 | 
				
			||||||
#include "ui/base/ui_base_switches.h"
 | 
					#include "ui/base/ui_base_switches.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +27,7 @@ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
 | 
				
			||||||
  return
 | 
					  return
 | 
				
			||||||
#if defined(OS_POSIX) && !defined(OS_MACOSX)
 | 
					#if defined(OS_POSIX) && !defined(OS_MACOSX)
 | 
				
			||||||
      // The zygote process opens the resources for the renderers.
 | 
					      // The zygote process opens the resources for the renderers.
 | 
				
			||||||
      process_type == switches::kZygoteProcess ||
 | 
					      process_type == service_manager::switches::kZygoteProcess ||
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#if defined(OS_MACOSX)
 | 
					#if defined(OS_MACOSX)
 | 
				
			||||||
      // Mac needs them too for scrollbar related images and for sandbox
 | 
					      // Mac needs them too for scrollbar related images and for sandbox
 | 
				
			||||||
| 
						 | 
					@ -52,7 +53,7 @@ void LoadResourceBundle(const std::string& locale) {
 | 
				
			||||||
  pak_dir =
 | 
					  pak_dir =
 | 
				
			||||||
      base::mac::FrameworkBundlePath().Append(FILE_PATH_LITERAL("Resources"));
 | 
					      base::mac::FrameworkBundlePath().Append(FILE_PATH_LITERAL("Resources"));
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
  PathService::Get(base::DIR_MODULE, &pak_dir);
 | 
					  base::PathService::Get(base::DIR_MODULE, &pak_dir);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ui::ResourceBundle::InitSharedInstanceWithLocale(
 | 
					  ui::ResourceBundle::InitSharedInstanceWithLocale(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ void MainDelegate::OverrideChildProcessPath() {
 | 
				
			||||||
                                   .Append("MacOS")
 | 
					                                   .Append("MacOS")
 | 
				
			||||||
                                   .Append(GetApplicationName() + " Helper");
 | 
					                                   .Append(GetApplicationName() + " Helper");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
 | 
					  base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}  // namespace brightray
 | 
					}  // namespace brightray
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -9,3 +9,8 @@ enable_cdm_host_verification = false
 | 
				
			||||||
enable_extensions = false
 | 
					enable_extensions = false
 | 
				
			||||||
proprietary_codecs = true
 | 
					proprietary_codecs = true
 | 
				
			||||||
ffmpeg_branding = "Chrome"
 | 
					ffmpeg_branding = "Chrome"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TODO(jeremy): OSR is broken in M68. Remove this once it's fixed.
 | 
				
			||||||
 | 
					enable_osr = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					is_cfi = false
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,14 +56,13 @@ def execute(argv):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main(argv):
 | 
					def main(argv):
 | 
				
			||||||
  dist_zip, runtime_deps, target_cpu, target_os = argv
 | 
					  dist_zip, runtime_deps, target_cpu, target_os = argv
 | 
				
			||||||
  dist_files = []
 | 
					  dist_files = set()
 | 
				
			||||||
  with open(runtime_deps) as f:
 | 
					  with open(runtime_deps) as f:
 | 
				
			||||||
    for dep in f.readlines():
 | 
					    for dep in f.readlines():
 | 
				
			||||||
      dep = dep.strip()
 | 
					      dep = dep.strip()
 | 
				
			||||||
      if dep not in dist_files:
 | 
					      dist_files.add(dep)
 | 
				
			||||||
        dist_files += [dep]
 | 
					 | 
				
			||||||
  if sys.platform == 'darwin':
 | 
					  if sys.platform == 'darwin':
 | 
				
			||||||
    mac_zip_results = execute(['zip', '-r', '-y', dist_zip] + dist_files)
 | 
					    execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
 | 
				
			||||||
  else:
 | 
					  else:
 | 
				
			||||||
    with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED) as z:
 | 
					    with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED) as z:
 | 
				
			||||||
      for dep in dist_files:
 | 
					      for dep in dist_files:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,8 @@ source_set("chrome") {
 | 
				
			||||||
    "//chrome/browser/ssl/security_state_tab_helper.h",
 | 
					    "//chrome/browser/ssl/security_state_tab_helper.h",
 | 
				
			||||||
    "//chrome/common/chrome_constants.cc",
 | 
					    "//chrome/common/chrome_constants.cc",
 | 
				
			||||||
    "//chrome/common/chrome_constants.h",
 | 
					    "//chrome/common/chrome_constants.h",
 | 
				
			||||||
 | 
					    "//chrome/common/secure_origin_whitelist.cc",
 | 
				
			||||||
 | 
					    "//chrome/common/secure_origin_whitelist.h",
 | 
				
			||||||
  ]
 | 
					  ]
 | 
				
			||||||
  public_deps = [
 | 
					  public_deps = [
 | 
				
			||||||
    "//content/public/browser",
 | 
					    "//content/public/browser",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,11 +44,7 @@ void HoldRefCallback(const scoped_refptr<PrintJobWorkerOwner>& owner,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PrintJob::PrintJob()
 | 
					PrintJob::PrintJob()
 | 
				
			||||||
    : is_job_pending_(false), is_canceling_(false), quit_factory_(this) {
 | 
					    : is_job_pending_(false), is_canceling_(false), quit_factory_(this) {
 | 
				
			||||||
  // This is normally a UI message loop, but in unit tests, the message loop is
 | 
					  DCHECK(base::MessageLoopForUI::IsCurrent());
 | 
				
			||||||
  // of the 'default' type.
 | 
					 | 
				
			||||||
  DCHECK(base::MessageLoopForUI::IsCurrent() ||
 | 
					 | 
				
			||||||
         base::MessageLoop::current()->type() ==
 | 
					 | 
				
			||||||
             base::MessageLoop::TYPE_DEFAULT);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PrintJob::~PrintJob() {
 | 
					PrintJob::~PrintJob() {
 | 
				
			||||||
| 
						 | 
					@ -188,8 +184,7 @@ bool PrintJob::FlushJob(base::TimeDelta timeout) {
 | 
				
			||||||
      FROM_HERE, base::Bind(&PrintJob::Quit, quit_factory_.GetWeakPtr()),
 | 
					      FROM_HERE, base::Bind(&PrintJob::Quit, quit_factory_.GetWeakPtr()),
 | 
				
			||||||
      timeout);
 | 
					      timeout);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base::MessageLoop::ScopedNestableTaskAllower allow(
 | 
					  base::MessageLoop::ScopedNestableTaskAllower allow;
 | 
				
			||||||
      base::MessageLoop::current());
 | 
					 | 
				
			||||||
  base::RunLoop().Run();
 | 
					  base::RunLoop().Run();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -431,8 +431,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Need to enable recursive task.
 | 
					  // Need to enable recursive task.
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    base::MessageLoop::ScopedNestableTaskAllower allow(
 | 
					    base::MessageLoop::ScopedNestableTaskAllower allow;
 | 
				
			||||||
        base::MessageLoop::current());
 | 
					 | 
				
			||||||
    base::RunLoop().Run();
 | 
					    base::RunLoop().Run();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -323,7 +323,7 @@ bool IsChromeProcess(pid_t pid) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
					  auto* command_line = base::CommandLine::ForCurrentProcess();
 | 
				
			||||||
  base::FilePath exec_path(command_line->GetProgram());
 | 
					  base::FilePath exec_path(command_line->GetProgram());
 | 
				
			||||||
  PathService::Get(base::FILE_EXE, &exec_path);
 | 
					  base::PathService::Get(base::FILE_EXE, &exec_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (!other_chrome_path.empty() &&
 | 
					  return (!other_chrome_path.empty() &&
 | 
				
			||||||
          other_chrome_path.BaseName() == exec_path.BaseName());
 | 
					          other_chrome_path.BaseName() == exec_path.BaseName());
 | 
				
			||||||
| 
						 | 
					@ -820,7 +820,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
 | 
				
			||||||
  to_send.push_back(kTokenDelimiter);
 | 
					  to_send.push_back(kTokenDelimiter);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  base::FilePath current_dir;
 | 
					  base::FilePath current_dir;
 | 
				
			||||||
  if (!PathService::Get(base::DIR_CURRENT, ¤t_dir))
 | 
					  if (!base::PathService::Get(base::DIR_CURRENT, ¤t_dir))
 | 
				
			||||||
    return PROCESS_NONE;
 | 
					    return PROCESS_NONE;
 | 
				
			||||||
  to_send.append(current_dir.value());
 | 
					  to_send.append(current_dir.value());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,5 @@
 | 
				
			||||||
repo: src/third_party/boringssl/src
 | 
					repo: src/third_party/boringssl/src
 | 
				
			||||||
patches:
 | 
					patches:
 | 
				
			||||||
-
 | 
					 | 
				
			||||||
  author: Jeremy Apthorp <nornagon@nornagon.net>
 | 
					 | 
				
			||||||
  file: 0001-Implement-legacy-OCSP-APIs-for-libssl.patch
 | 
					 | 
				
			||||||
  description: see patch header
 | 
					 | 
				
			||||||
-
 | 
					-
 | 
				
			||||||
  author: Aleksei Kuzmin <alkuzmin@microsoft.com>
 | 
					  author: Aleksei Kuzmin <alkuzmin@microsoft.com>
 | 
				
			||||||
  file: implement-SSL_get_tlsext_status_type.patch
 | 
					  file: implement-SSL_get_tlsext_status_type.patch
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,741 +0,0 @@
 | 
				
			||||||
From 81d4909d00c3628453a8712bc331304bd01d8eaf Mon Sep 17 00:00:00 2001
 | 
					 | 
				
			||||||
From: David Benjamin <davidben@google.com>
 | 
					 | 
				
			||||||
Date: Thu, 10 May 2018 19:55:02 -0400
 | 
					 | 
				
			||||||
Subject: [PATCH] Implement legacy OCSP APIs for libssl.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Previously, we'd omitted OpenSSL's OCSP APIs because they depend on a
 | 
					 | 
				
			||||||
complex OCSP mechanism and encourage the the unreliable server behavior
 | 
					 | 
				
			||||||
that hampers using OCSP stapling to fix revocation today. (OCSP
 | 
					 | 
				
			||||||
responses should not be fetched on-demand on a callback. They should be
 | 
					 | 
				
			||||||
managed like other server credentials and refreshed eagerly, so
 | 
					 | 
				
			||||||
temporary CA outage does not translate to loss of OCSP.)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
But most of the APIs are byte-oriented anyway, so they're easy to
 | 
					 | 
				
			||||||
support. Intentionally omit the one that takes a bunch of OCSP_RESPIDs.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The callback is benign on the client (an artifact of OpenSSL reading
 | 
					 | 
				
			||||||
OCSP and verifying certificates in the wrong order). On the server, it
 | 
					 | 
				
			||||||
encourages unreliability, but pyOpenSSL/cryptography.io depends on this.
 | 
					 | 
				
			||||||
Dcument that this is only for compatibility with legacy software.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Also tweak a few things for compatilibility. cryptography.io expects
 | 
					 | 
				
			||||||
SSL_CTX_set_read_ahead to return something, SSL_get_server_tmp_key's
 | 
					 | 
				
			||||||
signature was wrong, and cryptography.io tries to redefine
 | 
					 | 
				
			||||||
SSL_get_server_tmp_key if SSL_CTRL_GET_SERVER_TMP_KEY is missing.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Change-Id: I2f99711783456bfb7324e9ad972510be8a95e845
 | 
					 | 
				
			||||||
Reviewed-on: https://boringssl-review.googlesource.com/28404
 | 
					 | 
				
			||||||
Commit-Queue: David Benjamin <davidben@google.com>
 | 
					 | 
				
			||||||
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
 | 
					 | 
				
			||||||
Reviewed-by: Adam Langley <agl@google.com>
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 crypto/err/ssl.errordata  |   1 +
 | 
					 | 
				
			||||||
 include/openssl/ssl.h     |  64 +++++++++++++--
 | 
					 | 
				
			||||||
 include/openssl/tls1.h    |   1 +
 | 
					 | 
				
			||||||
 ssl/handshake.cc          |  16 ++++
 | 
					 | 
				
			||||||
 ssl/handshake_server.cc   |  16 ++++
 | 
					 | 
				
			||||||
 ssl/internal.h            |   5 ++
 | 
					 | 
				
			||||||
 ssl/ssl_lib.cc            |  39 ++++++++-
 | 
					 | 
				
			||||||
 ssl/test/bssl_shim.cc     |  26 ++++++
 | 
					 | 
				
			||||||
 ssl/test/runner/alert.go  | 122 +++++++++++++--------------
 | 
					 | 
				
			||||||
 ssl/test/runner/runner.go | 205 ++++++++++++++++++++++++++++++++++------------
 | 
					 | 
				
			||||||
 ssl/test/test_config.cc   |   4 +
 | 
					 | 
				
			||||||
 ssl/test/test_config.h    |   4 +
 | 
					 | 
				
			||||||
 12 files changed, 381 insertions(+), 122 deletions(-)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
diff --git a/crypto/err/ssl.errordata b/crypto/err/ssl.errordata
 | 
					 | 
				
			||||||
index 7b63bc8..375df9a 100644
 | 
					 | 
				
			||||||
--- a/crypto/err/ssl.errordata
 | 
					 | 
				
			||||||
+++ b/crypto/err/ssl.errordata
 | 
					 | 
				
			||||||
@@ -108,6 +108,7 @@ SSL,266,NO_SHARED_GROUP
 | 
					 | 
				
			||||||
 SSL,280,NO_SUPPORTED_VERSIONS_ENABLED
 | 
					 | 
				
			||||||
 SSL,185,NULL_SSL_CTX
 | 
					 | 
				
			||||||
 SSL,186,NULL_SSL_METHOD_PASSED
 | 
					 | 
				
			||||||
+SSL,289,OCSP_CB_ERROR
 | 
					 | 
				
			||||||
 SSL,187,OLD_SESSION_CIPHER_NOT_RETURNED
 | 
					 | 
				
			||||||
 SSL,268,OLD_SESSION_PRF_HASH_MISMATCH
 | 
					 | 
				
			||||||
 SSL,188,OLD_SESSION_VERSION_NOT_RETURNED
 | 
					 | 
				
			||||||
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
 | 
					 | 
				
			||||||
index 35506f7..d46a5af 100644
 | 
					 | 
				
			||||||
--- a/include/openssl/ssl.h
 | 
					 | 
				
			||||||
+++ b/include/openssl/ssl.h
 | 
					 | 
				
			||||||
@@ -3715,14 +3715,14 @@ OPENSSL_EXPORT int SSL_set_tmp_rsa(SSL *ssl, const RSA *rsa);
 | 
					 | 
				
			||||||
 // SSL_CTX_get_read_ahead returns zero.
 | 
					 | 
				
			||||||
 OPENSSL_EXPORT int SSL_CTX_get_read_ahead(const SSL_CTX *ctx);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-// SSL_CTX_set_read_ahead does nothing.
 | 
					 | 
				
			||||||
-OPENSSL_EXPORT void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes);
 | 
					 | 
				
			||||||
+// SSL_CTX_set_read_ahead returns one.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // SSL_get_read_ahead returns zero.
 | 
					 | 
				
			||||||
 OPENSSL_EXPORT int SSL_get_read_ahead(const SSL *ssl);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-// SSL_set_read_ahead does nothing.
 | 
					 | 
				
			||||||
-OPENSSL_EXPORT void SSL_set_read_ahead(SSL *ssl, int yes);
 | 
					 | 
				
			||||||
+// SSL_set_read_ahead returns one.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_set_read_ahead(SSL *ssl, int yes);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // SSL_renegotiate put an error on the error queue and returns zero.
 | 
					 | 
				
			||||||
 OPENSSL_EXPORT int SSL_renegotiate(SSL *ssl);
 | 
					 | 
				
			||||||
@@ -3793,7 +3793,7 @@ OPENSSL_EXPORT const COMP_METHOD *SSL_get_current_compression(SSL *ssl);
 | 
					 | 
				
			||||||
 OPENSSL_EXPORT const COMP_METHOD *SSL_get_current_expansion(SSL *ssl);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // SSL_get_server_tmp_key returns zero.
 | 
					 | 
				
			||||||
-OPENSSL_EXPORT int *SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key);
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key);
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // SSL_CTX_set_tmp_dh returns 1.
 | 
					 | 
				
			||||||
 OPENSSL_EXPORT int SSL_CTX_set_tmp_dh(SSL_CTX *ctx, const DH *dh);
 | 
					 | 
				
			||||||
@@ -4108,6 +4108,58 @@ extern "C++" OPENSSL_EXPORT void SSL_CTX_sess_set_get_cb(
 | 
					 | 
				
			||||||
                                                  int id_len, int *out_copy));
 | 
					 | 
				
			||||||
 #endif
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+// SSL_set_tlsext_status_type configures a client to request OCSP stapling if
 | 
					 | 
				
			||||||
+// |type| is |TLSEXT_STATUSTYPE_ocsp| and disables it otherwise. It returns one
 | 
					 | 
				
			||||||
+// on success and zero if handshake configuration has already been shed.
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// Use |SSL_enable_ocsp_stapling| instead.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_set_tlsext_status_type(SSL *ssl, int type);
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+// SSL_set_tlsext_status_ocsp_resp sets the OCSP response. It returns one on
 | 
					 | 
				
			||||||
+// success and zero on error. On success, |ssl| takes ownership of |resp|, which
 | 
					 | 
				
			||||||
+// must have been allocated by |OPENSSL_malloc|.
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// Use |SSL_set_ocsp_response| instead.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_set_tlsext_status_ocsp_resp(SSL *ssl, uint8_t *resp,
 | 
					 | 
				
			||||||
+                                                   size_t resp_len);
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+// SSL_get_tlsext_status_ocsp_resp sets |*out| to point to the OCSP response
 | 
					 | 
				
			||||||
+// from the server. It returns the length of the response. If there was no
 | 
					 | 
				
			||||||
+// response, it sets |*out| to NULL and returns zero.
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// Use |SSL_get0_ocsp_response| instead.
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// WARNING: the returned data is not guaranteed to be well formed.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT size_t SSL_get_tlsext_status_ocsp_resp(const SSL *ssl,
 | 
					 | 
				
			||||||
+                                                      const uint8_t **out);
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+// SSL_CTX_set_tlsext_status_cb configures the legacy OpenSSL OCSP callback and
 | 
					 | 
				
			||||||
+// returns one. Though the type signature is the same, this callback has
 | 
					 | 
				
			||||||
+// different behavior for client and server connections:
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// For clients, the callback is called after certificate verification. It should
 | 
					 | 
				
			||||||
+// return one for success, zero for a bad OCSP response, and a negative number
 | 
					 | 
				
			||||||
+// for internal error. Instead, handle this as part of certificate verification.
 | 
					 | 
				
			||||||
+// (Historically, OpenSSL verified certificates just before parsing stapled OCSP
 | 
					 | 
				
			||||||
+// responses, but BoringSSL fixes this ordering. All server credentials are
 | 
					 | 
				
			||||||
+// available during verification.)
 | 
					 | 
				
			||||||
+//
 | 
					 | 
				
			||||||
+// Do not use this callback as a server. It is provided for compatibility
 | 
					 | 
				
			||||||
+// purposes only. For servers, it is called to configure server credentials. It
 | 
					 | 
				
			||||||
+// should return |SSL_TLSEXT_ERR_OK| on success, |SSL_TLSEXT_ERR_NOACK| to
 | 
					 | 
				
			||||||
+// ignore OCSP requests, or |SSL_TLSEXT_ERR_ALERT_FATAL| on error. It is usually
 | 
					 | 
				
			||||||
+// used to fetch OCSP responses on demand, which is not ideal. Instead, treat
 | 
					 | 
				
			||||||
+// OCSP responses like other server credentials, such as certificates or SCT
 | 
					 | 
				
			||||||
+// lists. Configure, store, and refresh them eagerly. This avoids downtime if
 | 
					 | 
				
			||||||
+// the CA's OCSP responder is briefly offline.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx,
 | 
					 | 
				
			||||||
+                                                int (*callback)(SSL *ssl,
 | 
					 | 
				
			||||||
+                                                                void *arg));
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+// SSL_CTX_set_tlsext_status_arg sets additional data for
 | 
					 | 
				
			||||||
+// |SSL_CTX_set_tlsext_status_cb|'s callback and returns one.
 | 
					 | 
				
			||||||
+OPENSSL_EXPORT int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg);
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // Private structures.
 | 
					 | 
				
			||||||
 //
 | 
					 | 
				
			||||||
@@ -4285,6 +4337,7 @@ struct ssl_session_st {
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_NUM_RENEGOTIATIONS doesnt_exist
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_READ_AHEAD doesnt_exist
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_RI_SUPPORT doesnt_exist
 | 
					 | 
				
			||||||
+#define SSL_CTRL_GET_SERVER_TMP_KEY doesnt_exist
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_SESSION_REUSED doesnt_exist
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_SESS_CACHE_MODE doesnt_exist
 | 
					 | 
				
			||||||
 #define SSL_CTRL_GET_SESS_CACHE_SIZE doesnt_exist
 | 
					 | 
				
			||||||
@@ -4698,6 +4751,7 @@ OPENSSL_EXPORT bool SSL_apply_handback(SSL *ssl, Span<const uint8_t> handback);
 | 
					 | 
				
			||||||
 #define SSL_R_NEGOTIATED_TB_WITHOUT_EMS_OR_RI 285
 | 
					 | 
				
			||||||
 #define SSL_R_SERVER_ECHOED_INVALID_SESSION_ID 286
 | 
					 | 
				
			||||||
 #define SSL_R_PRIVATE_KEY_OPERATION_FAILED 287
 | 
					 | 
				
			||||||
+#define SSL_R_OCSP_CB_ERROR 289
 | 
					 | 
				
			||||||
 #define SSL_R_SSLV3_ALERT_CLOSE_NOTIFY 1000
 | 
					 | 
				
			||||||
 #define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
 | 
					 | 
				
			||||||
 #define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
 | 
					 | 
				
			||||||
diff --git a/include/openssl/tls1.h b/include/openssl/tls1.h
 | 
					 | 
				
			||||||
index 3424f3d..7a05969 100644
 | 
					 | 
				
			||||||
--- a/include/openssl/tls1.h
 | 
					 | 
				
			||||||
+++ b/include/openssl/tls1.h
 | 
					 | 
				
			||||||
@@ -237,6 +237,7 @@ extern "C" {
 | 
					 | 
				
			||||||
 #define TLSEXT_TYPE_dummy_pq_padding 54537
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // status request value from RFC 3546
 | 
					 | 
				
			||||||
+#define TLSEXT_STATUSTYPE_nothing (-1)
 | 
					 | 
				
			||||||
 #define TLSEXT_STATUSTYPE_ocsp 1
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 // ECPointFormat values from RFC 4492
 | 
					 | 
				
			||||||
diff --git a/ssl/handshake.cc b/ssl/handshake.cc
 | 
					 | 
				
			||||||
index 6432424..0a90b9f 100644
 | 
					 | 
				
			||||||
--- a/ssl/handshake.cc
 | 
					 | 
				
			||||||
+++ b/ssl/handshake.cc
 | 
					 | 
				
			||||||
@@ -356,6 +356,22 @@ enum ssl_verify_result_t ssl_verify_peer_cert(SSL_HANDSHAKE *hs) {
 | 
					 | 
				
			||||||
     ssl_send_alert(ssl, SSL3_AL_FATAL, alert);
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  // Emulate OpenSSL's client OCSP callback. OpenSSL verifies certificates
 | 
					 | 
				
			||||||
+  // before it receives the OCSP, so it needs a second callback for OCSP.
 | 
					 | 
				
			||||||
+  if (ret == ssl_verify_ok && !ssl->server &&
 | 
					 | 
				
			||||||
+      hs->new_session->ocsp_response != nullptr &&
 | 
					 | 
				
			||||||
+      ssl->ctx->legacy_ocsp_callback != nullptr) {
 | 
					 | 
				
			||||||
+    int cb_ret =
 | 
					 | 
				
			||||||
+        ssl->ctx->legacy_ocsp_callback(ssl, ssl->ctx->legacy_ocsp_callback_arg);
 | 
					 | 
				
			||||||
+    if (cb_ret <= 0) {
 | 
					 | 
				
			||||||
+      OPENSSL_PUT_ERROR(SSL, SSL_R_OCSP_CB_ERROR);
 | 
					 | 
				
			||||||
+      ssl_send_alert(ssl, SSL3_AL_FATAL,
 | 
					 | 
				
			||||||
+                     cb_ret == 0 ? SSL_AD_BAD_CERTIFICATE_STATUS_RESPONSE
 | 
					 | 
				
			||||||
+                                 : SSL_AD_INTERNAL_ERROR);
 | 
					 | 
				
			||||||
+      ret = ssl_verify_invalid;
 | 
					 | 
				
			||||||
+    }
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   return ret;
 | 
					 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
diff --git a/ssl/handshake_server.cc b/ssl/handshake_server.cc
 | 
					 | 
				
			||||||
index fa8a241..7a96767 100644
 | 
					 | 
				
			||||||
--- a/ssl/handshake_server.cc
 | 
					 | 
				
			||||||
+++ b/ssl/handshake_server.cc
 | 
					 | 
				
			||||||
@@ -534,6 +534,22 @@ static enum ssl_hs_wait_t do_select_certificate(SSL_HANDSHAKE *hs) {
 | 
					 | 
				
			||||||
     return ssl_hs_error;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  if (hs->ocsp_stapling_requested &&
 | 
					 | 
				
			||||||
+      ssl->ctx->legacy_ocsp_callback != nullptr) {
 | 
					 | 
				
			||||||
+    switch (ssl->ctx->legacy_ocsp_callback(
 | 
					 | 
				
			||||||
+        ssl, ssl->ctx->legacy_ocsp_callback_arg)) {
 | 
					 | 
				
			||||||
+      case SSL_TLSEXT_ERR_OK:
 | 
					 | 
				
			||||||
+        break;
 | 
					 | 
				
			||||||
+      case SSL_TLSEXT_ERR_NOACK:
 | 
					 | 
				
			||||||
+        hs->ocsp_stapling_requested = false;
 | 
					 | 
				
			||||||
+        break;
 | 
					 | 
				
			||||||
+      default:
 | 
					 | 
				
			||||||
+        OPENSSL_PUT_ERROR(SSL, SSL_R_OCSP_CB_ERROR);
 | 
					 | 
				
			||||||
+        ssl_send_alert(ssl, SSL3_AL_FATAL, SSL_AD_INTERNAL_ERROR);
 | 
					 | 
				
			||||||
+        return ssl_hs_error;
 | 
					 | 
				
			||||||
+    }
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   if (ssl_protocol_version(ssl) >= TLS1_3_VERSION) {
 | 
					 | 
				
			||||||
     // Jump to the TLS 1.3 state machine.
 | 
					 | 
				
			||||||
     hs->state = state_tls13;
 | 
					 | 
				
			||||||
diff --git a/ssl/internal.h b/ssl/internal.h
 | 
					 | 
				
			||||||
index d13d5f2..1cdfb8e 100644
 | 
					 | 
				
			||||||
--- a/ssl/internal.h
 | 
					 | 
				
			||||||
+++ b/ssl/internal.h
 | 
					 | 
				
			||||||
@@ -2140,6 +2140,11 @@ struct SSLContext {
 | 
					 | 
				
			||||||
   // session tickets.
 | 
					 | 
				
			||||||
   const SSL_TICKET_AEAD_METHOD *ticket_aead_method;
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  // legacy_ocsp_callback implements an OCSP-related callback for OpenSSL
 | 
					 | 
				
			||||||
+  // compatibility.
 | 
					 | 
				
			||||||
+  int (*legacy_ocsp_callback)(SSL *ssl, void *arg);
 | 
					 | 
				
			||||||
+  void *legacy_ocsp_callback_arg;
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   // verify_sigalgs, if not empty, is the set of signature algorithms
 | 
					 | 
				
			||||||
   // accepted from the peer in decreasing order of preference.
 | 
					 | 
				
			||||||
   uint16_t *verify_sigalgs;
 | 
					 | 
				
			||||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
 | 
					 | 
				
			||||||
index 9f56d54..50608e9 100644
 | 
					 | 
				
			||||||
--- a/ssl/ssl_lib.cc
 | 
					 | 
				
			||||||
+++ b/ssl/ssl_lib.cc
 | 
					 | 
				
			||||||
@@ -1591,9 +1591,9 @@ int SSL_CTX_get_read_ahead(const SSL_CTX *ctx) { return 0; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 int SSL_get_read_ahead(const SSL *ssl) { return 0; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes) { }
 | 
					 | 
				
			||||||
+int SSL_CTX_set_read_ahead(SSL_CTX *ctx, int yes) { return 1; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-void SSL_set_read_ahead(SSL *ssl, int yes) { }
 | 
					 | 
				
			||||||
+int SSL_set_read_ahead(SSL *ssl, int yes) { return 1; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 int SSL_pending(const SSL *ssl) {
 | 
					 | 
				
			||||||
   return static_cast<int>(ssl->s3->pending_app_data.size());
 | 
					 | 
				
			||||||
@@ -2205,7 +2205,7 @@ const COMP_METHOD *SSL_get_current_compression(SSL *ssl) { return NULL; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 const COMP_METHOD *SSL_get_current_expansion(SSL *ssl) { return NULL; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-int *SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key) { return 0; }
 | 
					 | 
				
			||||||
+int SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **out_key) { return 0; }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode) {
 | 
					 | 
				
			||||||
   ctx->quiet_shutdown = (mode != 0);
 | 
					 | 
				
			||||||
@@ -2717,3 +2717,33 @@ void SSL_CTX_set_ticket_aead_method(SSL_CTX *ctx,
 | 
					 | 
				
			||||||
                                     const SSL_TICKET_AEAD_METHOD *aead_method) {
 | 
					 | 
				
			||||||
   ctx->ticket_aead_method = aead_method;
 | 
					 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+int SSL_set_tlsext_status_type(SSL *ssl, int type) {
 | 
					 | 
				
			||||||
+  ssl->ocsp_stapling_enabled = type == TLSEXT_STATUSTYPE_ocsp;
 | 
					 | 
				
			||||||
+  return 1;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+int SSL_set_tlsext_status_ocsp_resp(SSL *ssl, uint8_t *resp, size_t resp_len) {
 | 
					 | 
				
			||||||
+  if (SSL_set_ocsp_response(ssl, resp, resp_len)) {
 | 
					 | 
				
			||||||
+    OPENSSL_free(resp);
 | 
					 | 
				
			||||||
+    return 1;
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+  return 0;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+size_t SSL_get_tlsext_status_ocsp_resp(const SSL *ssl, const uint8_t **out) {
 | 
					 | 
				
			||||||
+  size_t ret;
 | 
					 | 
				
			||||||
+  SSL_get0_ocsp_response(ssl, out, &ret);
 | 
					 | 
				
			||||||
+  return ret;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+int SSL_CTX_set_tlsext_status_cb(SSL_CTX *ctx,
 | 
					 | 
				
			||||||
+                                 int (*callback)(SSL *ssl, void *arg)) {
 | 
					 | 
				
			||||||
+  ctx->legacy_ocsp_callback = callback;
 | 
					 | 
				
			||||||
+  return 1;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+int SSL_CTX_set_tlsext_status_arg(SSL_CTX *ctx, void *arg) {
 | 
					 | 
				
			||||||
+  ctx->legacy_ocsp_callback_arg = arg;
 | 
					 | 
				
			||||||
+  return 1;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc
 | 
					 | 
				
			||||||
index ae26ded..3a33d60 100644
 | 
					 | 
				
			||||||
--- a/ssl/test/bssl_shim.cc
 | 
					 | 
				
			||||||
+++ b/ssl/test/bssl_shim.cc
 | 
					 | 
				
			||||||
@@ -495,6 +495,7 @@ static bool GetCertificate(SSL *ssl, bssl::UniquePtr<X509> *out_x509,
 | 
					 | 
				
			||||||
     return false;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
   if (!config->ocsp_response.empty() &&
 | 
					 | 
				
			||||||
+      !config->set_ocsp_in_callback &&
 | 
					 | 
				
			||||||
       !SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(),
 | 
					 | 
				
			||||||
                              config->ocsp_response.size())) {
 | 
					 | 
				
			||||||
     return false;
 | 
					 | 
				
			||||||
@@ -1100,6 +1101,27 @@ static void MessageCallback(int is_write, int version, int content_type,
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+static int LegacyOCSPCallback(SSL *ssl, void *arg) {
 | 
					 | 
				
			||||||
+  const TestConfig *config = GetTestConfig(ssl);
 | 
					 | 
				
			||||||
+  if (!SSL_is_server(ssl)) {
 | 
					 | 
				
			||||||
+    return !config->fail_ocsp_callback;
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+  if (!config->ocsp_response.empty() &&
 | 
					 | 
				
			||||||
+      config->set_ocsp_in_callback &&
 | 
					 | 
				
			||||||
+      !SSL_set_ocsp_response(ssl, (const uint8_t *)config->ocsp_response.data(),
 | 
					 | 
				
			||||||
+                             config->ocsp_response.size())) {
 | 
					 | 
				
			||||||
+    return SSL_TLSEXT_ERR_ALERT_FATAL;
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+  if (config->fail_ocsp_callback) {
 | 
					 | 
				
			||||||
+    return SSL_TLSEXT_ERR_ALERT_FATAL;
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+  if (config->decline_ocsp_callback) {
 | 
					 | 
				
			||||||
+    return SSL_TLSEXT_ERR_NOACK;
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+  return SSL_TLSEXT_ERR_OK;
 | 
					 | 
				
			||||||
+}
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
 // Connect returns a new socket connected to localhost on |port| or -1 on
 | 
					 | 
				
			||||||
 // error.
 | 
					 | 
				
			||||||
 static int Connect(uint16_t port) {
 | 
					 | 
				
			||||||
@@ -1334,6 +1356,10 @@ static bssl::UniquePtr<SSL_CTX> SetupCtx(SSL_CTX *old_ctx,
 | 
					 | 
				
			||||||
     SSL_CTX_set_false_start_allowed_without_alpn(ssl_ctx.get(), 1);
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  if (config->use_ocsp_callback) {
 | 
					 | 
				
			||||||
+    SSL_CTX_set_tlsext_status_cb(ssl_ctx.get(), LegacyOCSPCallback);
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   if (old_ctx) {
 | 
					 | 
				
			||||||
     uint8_t keys[48];
 | 
					 | 
				
			||||||
     if (!SSL_CTX_get_tlsext_ticket_keys(old_ctx, &keys, sizeof(keys)) ||
 | 
					 | 
				
			||||||
diff --git a/ssl/test/runner/alert.go b/ssl/test/runner/alert.go
 | 
					 | 
				
			||||||
index 652e9ee..c79725e 100644
 | 
					 | 
				
			||||||
--- a/ssl/test/runner/alert.go
 | 
					 | 
				
			||||||
+++ b/ssl/test/runner/alert.go
 | 
					 | 
				
			||||||
@@ -15,69 +15,71 @@ const (
 | 
					 | 
				
			||||||
 )
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 const (
 | 
					 | 
				
			||||||
-	alertCloseNotify            alert = 0
 | 
					 | 
				
			||||||
-	alertEndOfEarlyData         alert = 1
 | 
					 | 
				
			||||||
-	alertUnexpectedMessage      alert = 10
 | 
					 | 
				
			||||||
-	alertBadRecordMAC           alert = 20
 | 
					 | 
				
			||||||
-	alertDecryptionFailed       alert = 21
 | 
					 | 
				
			||||||
-	alertRecordOverflow         alert = 22
 | 
					 | 
				
			||||||
-	alertDecompressionFailure   alert = 30
 | 
					 | 
				
			||||||
-	alertHandshakeFailure       alert = 40
 | 
					 | 
				
			||||||
-	alertNoCertificate          alert = 41
 | 
					 | 
				
			||||||
-	alertBadCertificate         alert = 42
 | 
					 | 
				
			||||||
-	alertUnsupportedCertificate alert = 43
 | 
					 | 
				
			||||||
-	alertCertificateRevoked     alert = 44
 | 
					 | 
				
			||||||
-	alertCertificateExpired     alert = 45
 | 
					 | 
				
			||||||
-	alertCertificateUnknown     alert = 46
 | 
					 | 
				
			||||||
-	alertIllegalParameter       alert = 47
 | 
					 | 
				
			||||||
-	alertUnknownCA              alert = 48
 | 
					 | 
				
			||||||
-	alertAccessDenied           alert = 49
 | 
					 | 
				
			||||||
-	alertDecodeError            alert = 50
 | 
					 | 
				
			||||||
-	alertDecryptError           alert = 51
 | 
					 | 
				
			||||||
-	alertProtocolVersion        alert = 70
 | 
					 | 
				
			||||||
-	alertInsufficientSecurity   alert = 71
 | 
					 | 
				
			||||||
-	alertInternalError          alert = 80
 | 
					 | 
				
			||||||
-	alertInappropriateFallback  alert = 86
 | 
					 | 
				
			||||||
-	alertUserCanceled           alert = 90
 | 
					 | 
				
			||||||
-	alertNoRenegotiation        alert = 100
 | 
					 | 
				
			||||||
-	alertMissingExtension       alert = 109
 | 
					 | 
				
			||||||
-	alertUnsupportedExtension   alert = 110
 | 
					 | 
				
			||||||
-	alertUnrecognizedName       alert = 112
 | 
					 | 
				
			||||||
-	alertUnknownPSKIdentity     alert = 115
 | 
					 | 
				
			||||||
-	alertCertificateRequired    alert = 116
 | 
					 | 
				
			||||||
+	alertCloseNotify                  alert = 0
 | 
					 | 
				
			||||||
+	alertEndOfEarlyData               alert = 1
 | 
					 | 
				
			||||||
+	alertUnexpectedMessage            alert = 10
 | 
					 | 
				
			||||||
+	alertBadRecordMAC                 alert = 20
 | 
					 | 
				
			||||||
+	alertDecryptionFailed             alert = 21
 | 
					 | 
				
			||||||
+	alertRecordOverflow               alert = 22
 | 
					 | 
				
			||||||
+	alertDecompressionFailure         alert = 30
 | 
					 | 
				
			||||||
+	alertHandshakeFailure             alert = 40
 | 
					 | 
				
			||||||
+	alertNoCertificate                alert = 41
 | 
					 | 
				
			||||||
+	alertBadCertificate               alert = 42
 | 
					 | 
				
			||||||
+	alertUnsupportedCertificate       alert = 43
 | 
					 | 
				
			||||||
+	alertCertificateRevoked           alert = 44
 | 
					 | 
				
			||||||
+	alertCertificateExpired           alert = 45
 | 
					 | 
				
			||||||
+	alertCertificateUnknown           alert = 46
 | 
					 | 
				
			||||||
+	alertIllegalParameter             alert = 47
 | 
					 | 
				
			||||||
+	alertUnknownCA                    alert = 48
 | 
					 | 
				
			||||||
+	alertAccessDenied                 alert = 49
 | 
					 | 
				
			||||||
+	alertDecodeError                  alert = 50
 | 
					 | 
				
			||||||
+	alertDecryptError                 alert = 51
 | 
					 | 
				
			||||||
+	alertProtocolVersion              alert = 70
 | 
					 | 
				
			||||||
+	alertInsufficientSecurity         alert = 71
 | 
					 | 
				
			||||||
+	alertInternalError                alert = 80
 | 
					 | 
				
			||||||
+	alertInappropriateFallback        alert = 86
 | 
					 | 
				
			||||||
+	alertUserCanceled                 alert = 90
 | 
					 | 
				
			||||||
+	alertNoRenegotiation              alert = 100
 | 
					 | 
				
			||||||
+	alertMissingExtension             alert = 109
 | 
					 | 
				
			||||||
+	alertUnsupportedExtension         alert = 110
 | 
					 | 
				
			||||||
+	alertUnrecognizedName             alert = 112
 | 
					 | 
				
			||||||
+	alertBadCertificateStatusResponse alert = 113
 | 
					 | 
				
			||||||
+	alertUnknownPSKIdentity           alert = 115
 | 
					 | 
				
			||||||
+	alertCertificateRequired          alert = 116
 | 
					 | 
				
			||||||
 )
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 var alertText = map[alert]string{
 | 
					 | 
				
			||||||
-	alertCloseNotify:            "close notify",
 | 
					 | 
				
			||||||
-	alertEndOfEarlyData:         "end of early data",
 | 
					 | 
				
			||||||
-	alertUnexpectedMessage:      "unexpected message",
 | 
					 | 
				
			||||||
-	alertBadRecordMAC:           "bad record MAC",
 | 
					 | 
				
			||||||
-	alertDecryptionFailed:       "decryption failed",
 | 
					 | 
				
			||||||
-	alertRecordOverflow:         "record overflow",
 | 
					 | 
				
			||||||
-	alertDecompressionFailure:   "decompression failure",
 | 
					 | 
				
			||||||
-	alertHandshakeFailure:       "handshake failure",
 | 
					 | 
				
			||||||
-	alertNoCertificate:          "no certificate",
 | 
					 | 
				
			||||||
-	alertBadCertificate:         "bad certificate",
 | 
					 | 
				
			||||||
-	alertUnsupportedCertificate: "unsupported certificate",
 | 
					 | 
				
			||||||
-	alertCertificateRevoked:     "revoked certificate",
 | 
					 | 
				
			||||||
-	alertCertificateExpired:     "expired certificate",
 | 
					 | 
				
			||||||
-	alertCertificateUnknown:     "unknown certificate",
 | 
					 | 
				
			||||||
-	alertIllegalParameter:       "illegal parameter",
 | 
					 | 
				
			||||||
-	alertUnknownCA:              "unknown certificate authority",
 | 
					 | 
				
			||||||
-	alertAccessDenied:           "access denied",
 | 
					 | 
				
			||||||
-	alertDecodeError:            "error decoding message",
 | 
					 | 
				
			||||||
-	alertDecryptError:           "error decrypting message",
 | 
					 | 
				
			||||||
-	alertProtocolVersion:        "protocol version not supported",
 | 
					 | 
				
			||||||
-	alertInsufficientSecurity:   "insufficient security level",
 | 
					 | 
				
			||||||
-	alertInternalError:          "internal error",
 | 
					 | 
				
			||||||
-	alertInappropriateFallback:  "inappropriate fallback",
 | 
					 | 
				
			||||||
-	alertUserCanceled:           "user canceled",
 | 
					 | 
				
			||||||
-	alertNoRenegotiation:        "no renegotiation",
 | 
					 | 
				
			||||||
-	alertMissingExtension:       "missing extension",
 | 
					 | 
				
			||||||
-	alertUnsupportedExtension:   "unsupported extension",
 | 
					 | 
				
			||||||
-	alertUnrecognizedName:       "unrecognized name",
 | 
					 | 
				
			||||||
-	alertUnknownPSKIdentity:     "unknown PSK identity",
 | 
					 | 
				
			||||||
-	alertCertificateRequired:    "certificate required",
 | 
					 | 
				
			||||||
+	alertCloseNotify:                  "close notify",
 | 
					 | 
				
			||||||
+	alertEndOfEarlyData:               "end of early data",
 | 
					 | 
				
			||||||
+	alertUnexpectedMessage:            "unexpected message",
 | 
					 | 
				
			||||||
+	alertBadRecordMAC:                 "bad record MAC",
 | 
					 | 
				
			||||||
+	alertDecryptionFailed:             "decryption failed",
 | 
					 | 
				
			||||||
+	alertRecordOverflow:               "record overflow",
 | 
					 | 
				
			||||||
+	alertDecompressionFailure:         "decompression failure",
 | 
					 | 
				
			||||||
+	alertHandshakeFailure:             "handshake failure",
 | 
					 | 
				
			||||||
+	alertNoCertificate:                "no certificate",
 | 
					 | 
				
			||||||
+	alertBadCertificate:               "bad certificate",
 | 
					 | 
				
			||||||
+	alertUnsupportedCertificate:       "unsupported certificate",
 | 
					 | 
				
			||||||
+	alertCertificateRevoked:           "revoked certificate",
 | 
					 | 
				
			||||||
+	alertCertificateExpired:           "expired certificate",
 | 
					 | 
				
			||||||
+	alertCertificateUnknown:           "unknown certificate",
 | 
					 | 
				
			||||||
+	alertIllegalParameter:             "illegal parameter",
 | 
					 | 
				
			||||||
+	alertUnknownCA:                    "unknown certificate authority",
 | 
					 | 
				
			||||||
+	alertAccessDenied:                 "access denied",
 | 
					 | 
				
			||||||
+	alertDecodeError:                  "error decoding message",
 | 
					 | 
				
			||||||
+	alertDecryptError:                 "error decrypting message",
 | 
					 | 
				
			||||||
+	alertProtocolVersion:              "protocol version not supported",
 | 
					 | 
				
			||||||
+	alertInsufficientSecurity:         "insufficient security level",
 | 
					 | 
				
			||||||
+	alertInternalError:                "internal error",
 | 
					 | 
				
			||||||
+	alertInappropriateFallback:        "inappropriate fallback",
 | 
					 | 
				
			||||||
+	alertUserCanceled:                 "user canceled",
 | 
					 | 
				
			||||||
+	alertNoRenegotiation:              "no renegotiation",
 | 
					 | 
				
			||||||
+	alertMissingExtension:             "missing extension",
 | 
					 | 
				
			||||||
+	alertUnsupportedExtension:         "unsupported extension",
 | 
					 | 
				
			||||||
+	alertBadCertificateStatusResponse: "bad certificate status response",
 | 
					 | 
				
			||||||
+	alertUnrecognizedName:             "unrecognized name",
 | 
					 | 
				
			||||||
+	alertUnknownPSKIdentity:           "unknown PSK identity",
 | 
					 | 
				
			||||||
+	alertCertificateRequired:          "certificate required",
 | 
					 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 func (e alert) String() string {
 | 
					 | 
				
			||||||
diff --git a/ssl/test/runner/runner.go b/ssl/test/runner/runner.go
 | 
					 | 
				
			||||||
index 510a48b..1a6d0f9 100644
 | 
					 | 
				
			||||||
--- a/ssl/test/runner/runner.go
 | 
					 | 
				
			||||||
+++ b/ssl/test/runner/runner.go
 | 
					 | 
				
			||||||
@@ -4744,60 +4744,157 @@ func addStateMachineCoverageTests(config stateMachineTestConfig) {
 | 
					 | 
				
			||||||
 	})
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 	// OCSP stapling tests.
 | 
					 | 
				
			||||||
-	tests = append(tests, testCase{
 | 
					 | 
				
			||||||
-		testType: clientTest,
 | 
					 | 
				
			||||||
-		name:     "OCSPStapling-Client",
 | 
					 | 
				
			||||||
-		config: Config{
 | 
					 | 
				
			||||||
-			MaxVersion: VersionTLS12,
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		flags: []string{
 | 
					 | 
				
			||||||
-			"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
-			"-expect-ocsp-response",
 | 
					 | 
				
			||||||
-			base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
-			"-verify-peer",
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		resumeSession: true,
 | 
					 | 
				
			||||||
-	})
 | 
					 | 
				
			||||||
-	tests = append(tests, testCase{
 | 
					 | 
				
			||||||
-		testType: serverTest,
 | 
					 | 
				
			||||||
-		name:     "OCSPStapling-Server",
 | 
					 | 
				
			||||||
-		config: Config{
 | 
					 | 
				
			||||||
-			MaxVersion: VersionTLS12,
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		expectedOCSPResponse: testOCSPResponse,
 | 
					 | 
				
			||||||
-		flags: []string{
 | 
					 | 
				
			||||||
-			"-ocsp-response",
 | 
					 | 
				
			||||||
-			base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		resumeSession: true,
 | 
					 | 
				
			||||||
-	})
 | 
					 | 
				
			||||||
-	tests = append(tests, testCase{
 | 
					 | 
				
			||||||
-		testType: clientTest,
 | 
					 | 
				
			||||||
-		name:     "OCSPStapling-Client-TLS13",
 | 
					 | 
				
			||||||
-		config: Config{
 | 
					 | 
				
			||||||
-			MaxVersion: VersionTLS13,
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		flags: []string{
 | 
					 | 
				
			||||||
-			"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
-			"-expect-ocsp-response",
 | 
					 | 
				
			||||||
-			base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
-			"-verify-peer",
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		resumeSession: true,
 | 
					 | 
				
			||||||
-	})
 | 
					 | 
				
			||||||
-	tests = append(tests, testCase{
 | 
					 | 
				
			||||||
-		testType: serverTest,
 | 
					 | 
				
			||||||
-		name:     "OCSPStapling-Server-TLS13",
 | 
					 | 
				
			||||||
-		config: Config{
 | 
					 | 
				
			||||||
-			MaxVersion: VersionTLS13,
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		expectedOCSPResponse: testOCSPResponse,
 | 
					 | 
				
			||||||
-		flags: []string{
 | 
					 | 
				
			||||||
-			"-ocsp-response",
 | 
					 | 
				
			||||||
-			base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
-		},
 | 
					 | 
				
			||||||
-		resumeSession: true,
 | 
					 | 
				
			||||||
-	})
 | 
					 | 
				
			||||||
+	for _, vers := range tlsVersions {
 | 
					 | 
				
			||||||
+		if config.protocol == dtls && !vers.hasDTLS {
 | 
					 | 
				
			||||||
+			continue
 | 
					 | 
				
			||||||
+		}
 | 
					 | 
				
			||||||
+		if vers.version == VersionSSL30 {
 | 
					 | 
				
			||||||
+			continue
 | 
					 | 
				
			||||||
+		}
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: clientTest,
 | 
					 | 
				
			||||||
+			name:     "OCSPStapling-Client-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion: vers.version,
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant: vers.tls13Variant,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
+				"-expect-ocsp-response",
 | 
					 | 
				
			||||||
+				base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
+				"-verify-peer",
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			resumeSession: true,
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: serverTest,
 | 
					 | 
				
			||||||
+			name:     "OCSPStapling-Server-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion: vers.version,
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant:         vers.tls13Variant,
 | 
					 | 
				
			||||||
+			expectedOCSPResponse: testOCSPResponse,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-ocsp-response",
 | 
					 | 
				
			||||||
+				base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			resumeSession: true,
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+		// The client OCSP callback is an alternate certificate
 | 
					 | 
				
			||||||
+		// verification callback.
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: clientTest,
 | 
					 | 
				
			||||||
+			name:     "ClientOCSPCallback-Pass-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion:   vers.version,
 | 
					 | 
				
			||||||
+				Certificates: []Certificate{rsaCertificate},
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant: vers.tls13Variant,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+		var expectedLocalError string
 | 
					 | 
				
			||||||
+		if !config.async {
 | 
					 | 
				
			||||||
+			// TODO(davidben): Asynchronous fatal alerts are never
 | 
					 | 
				
			||||||
+			// sent. https://crbug.com/boringssl/130.
 | 
					 | 
				
			||||||
+			expectedLocalError = "remote error: bad certificate status response"
 | 
					 | 
				
			||||||
+		}
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: clientTest,
 | 
					 | 
				
			||||||
+			name:     "ClientOCSPCallback-Fail-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion:   vers.version,
 | 
					 | 
				
			||||||
+				Certificates: []Certificate{rsaCertificate},
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant: vers.tls13Variant,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-fail-ocsp-callback",
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			shouldFail:         true,
 | 
					 | 
				
			||||||
+			expectedLocalError: expectedLocalError,
 | 
					 | 
				
			||||||
+			expectedError:      ":OCSP_CB_ERROR:",
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+		// The callback does not run if the server does not send an
 | 
					 | 
				
			||||||
+		// OCSP response.
 | 
					 | 
				
			||||||
+		certNoStaple := rsaCertificate
 | 
					 | 
				
			||||||
+		certNoStaple.OCSPStaple = nil
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: clientTest,
 | 
					 | 
				
			||||||
+			name:     "ClientOCSPCallback-FailNoStaple-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion:   vers.version,
 | 
					 | 
				
			||||||
+				Certificates: []Certificate{certNoStaple},
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant: vers.tls13Variant,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-enable-ocsp-stapling",
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-fail-ocsp-callback",
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+		// The server OCSP callback is a legacy mechanism for
 | 
					 | 
				
			||||||
+		// configuring OCSP, used by unreliable server software.
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: serverTest,
 | 
					 | 
				
			||||||
+			name:     "ServerOCSPCallback-SetInCallback-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion: vers.version,
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant:         vers.tls13Variant,
 | 
					 | 
				
			||||||
+			expectedOCSPResponse: testOCSPResponse,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-set-ocsp-in-callback",
 | 
					 | 
				
			||||||
+				"-ocsp-response",
 | 
					 | 
				
			||||||
+				base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			resumeSession: true,
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+		// The callback may decline OCSP, in which case  we act as if
 | 
					 | 
				
			||||||
+		// the client did not support it, even if a response was
 | 
					 | 
				
			||||||
+		// configured.
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: serverTest,
 | 
					 | 
				
			||||||
+			name:     "ServerOCSPCallback-Decline-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion: vers.version,
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant:         vers.tls13Variant,
 | 
					 | 
				
			||||||
+			expectedOCSPResponse: []byte{},
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-decline-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-ocsp-response",
 | 
					 | 
				
			||||||
+				base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			resumeSession: true,
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+		// The callback may also signal an internal error.
 | 
					 | 
				
			||||||
+		tests = append(tests, testCase{
 | 
					 | 
				
			||||||
+			testType: serverTest,
 | 
					 | 
				
			||||||
+			name:     "ServerOCSPCallback-Fail-" + vers.name,
 | 
					 | 
				
			||||||
+			config: Config{
 | 
					 | 
				
			||||||
+				MaxVersion: vers.version,
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			tls13Variant: vers.tls13Variant,
 | 
					 | 
				
			||||||
+			flags: []string{
 | 
					 | 
				
			||||||
+				"-use-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-fail-ocsp-callback",
 | 
					 | 
				
			||||||
+				"-ocsp-response",
 | 
					 | 
				
			||||||
+				base64.StdEncoding.EncodeToString(testOCSPResponse),
 | 
					 | 
				
			||||||
+			},
 | 
					 | 
				
			||||||
+			shouldFail:    true,
 | 
					 | 
				
			||||||
+			expectedError: ":OCSP_CB_ERROR:",
 | 
					 | 
				
			||||||
+		})
 | 
					 | 
				
			||||||
+	}
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 	// Certificate verification tests.
 | 
					 | 
				
			||||||
 	for _, vers := range tlsVersions {
 | 
					 | 
				
			||||||
diff --git a/ssl/test/test_config.cc b/ssl/test/test_config.cc
 | 
					 | 
				
			||||||
index f50251d..3afb01b 100644
 | 
					 | 
				
			||||||
--- a/ssl/test/test_config.cc
 | 
					 | 
				
			||||||
+++ b/ssl/test/test_config.cc
 | 
					 | 
				
			||||||
@@ -133,6 +133,10 @@ const Flag<bool> kBoolFlags[] = {
 | 
					 | 
				
			||||||
   { "-expect-draft-downgrade", &TestConfig::expect_draft_downgrade },
 | 
					 | 
				
			||||||
   { "-handoff", &TestConfig::handoff },
 | 
					 | 
				
			||||||
   { "-expect-dummy-pq-padding", &TestConfig::expect_dummy_pq_padding },
 | 
					 | 
				
			||||||
+  { "-use-ocsp-callback", &TestConfig::use_ocsp_callback },
 | 
					 | 
				
			||||||
+  { "-set-ocsp-in-callback", &TestConfig::set_ocsp_in_callback },
 | 
					 | 
				
			||||||
+  { "-decline-ocsp-callback", &TestConfig::decline_ocsp_callback },
 | 
					 | 
				
			||||||
+  { "-fail-ocsp-callback", &TestConfig::fail_ocsp_callback },
 | 
					 | 
				
			||||||
 };
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 const Flag<std::string> kStringFlags[] = {
 | 
					 | 
				
			||||||
diff --git a/ssl/test/test_config.h b/ssl/test/test_config.h
 | 
					 | 
				
			||||||
index fb479d1..a9eec62 100644
 | 
					 | 
				
			||||||
--- a/ssl/test/test_config.h
 | 
					 | 
				
			||||||
+++ b/ssl/test/test_config.h
 | 
					 | 
				
			||||||
@@ -154,6 +154,10 @@ struct TestConfig {
 | 
					 | 
				
			||||||
   int dummy_pq_padding_len = 0;
 | 
					 | 
				
			||||||
   bool handoff = false;
 | 
					 | 
				
			||||||
   bool expect_dummy_pq_padding = false;
 | 
					 | 
				
			||||||
+  bool use_ocsp_callback = false;
 | 
					 | 
				
			||||||
+  bool set_ocsp_in_callback = false;
 | 
					 | 
				
			||||||
+  bool decline_ocsp_callback = false;
 | 
					 | 
				
			||||||
+  bool fail_ocsp_callback = false;
 | 
					 | 
				
			||||||
 };
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 bool ParseConfig(int argc, char **argv, TestConfig *out_initial,
 | 
					 | 
				
			||||||
-- 
 | 
					 | 
				
			||||||
2.7.4
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ index 0c004fd4..6c849b5b 100644
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
+int SSL_get_tlsext_status_type(SSL *ssl) {
 | 
					+int SSL_get_tlsext_status_type(SSL *ssl) {
 | 
				
			||||||
+  if (ssl->ocsp_stapling_enabled) {
 | 
					+  if (ssl->config->ocsp_stapling_enabled) {
 | 
				
			||||||
+    return TLSEXT_STATUSTYPE_ocsp;
 | 
					+    return TLSEXT_STATUSTYPE_ocsp;
 | 
				
			||||||
+  }
 | 
					+  }
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -45,7 +45,6 @@ patches:
 | 
				
			||||||
      base/memory/weak_ptr.cc
 | 
					      base/memory/weak_ptr.cc
 | 
				
			||||||
      base/process/kill_win.cc
 | 
					      base/process/kill_win.cc
 | 
				
			||||||
      components/viz/service/display/program_binding.h
 | 
					      components/viz/service/display/program_binding.h
 | 
				
			||||||
      components/viz/service/display_embedder/server_shared_bitmap_manager.cc
 | 
					 | 
				
			||||||
      content/browser/frame_host/navigation_controller_impl.cc
 | 
					      content/browser/frame_host/navigation_controller_impl.cc
 | 
				
			||||||
      content/browser/frame_host/render_frame_host_impl.cc
 | 
					      content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
      content/browser/renderer_host/render_widget_host_view_mac.mm
 | 
					      content/browser/renderer_host/render_widget_host_view_mac.mm
 | 
				
			||||||
| 
						 | 
					@ -442,8 +441,8 @@ patches:
 | 
				
			||||||
  author: Aleksei Kuzmin <alkuzmin@microsoft.com>
 | 
					  author: Aleksei Kuzmin <alkuzmin@microsoft.com>
 | 
				
			||||||
  file: exclude-a-few-test-files-from-build.patch
 | 
					  file: exclude-a-few-test-files-from-build.patch
 | 
				
			||||||
  description: |
 | 
					  description: |
 | 
				
			||||||
    Compilation of those files fails with the Chromium 67.
 | 
					    Compilation of those files fails with the Chromium 68.
 | 
				
			||||||
    Remove the patch during the Chromium 68 upgrade.
 | 
					    Remove the patch during the Chromium 69 upgrade.
 | 
				
			||||||
-
 | 
					-
 | 
				
			||||||
  author: deepak1556 <hop2deep@gmail.com>
 | 
					  author: deepak1556 <hop2deep@gmail.com>
 | 
				
			||||||
  file: disable_extensions_gn.patch
 | 
					  file: disable_extensions_gn.patch
 | 
				
			||||||
| 
						 | 
					@ -452,9 +451,7 @@ patches:
 | 
				
			||||||
-
 | 
					-
 | 
				
			||||||
  author: Jeremy Apthorp <nornagon@nornagon.net>
 | 
					  author: Jeremy Apthorp <nornagon@nornagon.net>
 | 
				
			||||||
  file: crashpad_http_status.patch
 | 
					  file: crashpad_http_status.patch
 | 
				
			||||||
  description: |
 | 
					  description: backport of crashpad f540abb506
 | 
				
			||||||
    Accept all HTTP codes in [200, 300) as successful, instead of just 200.
 | 
					 | 
				
			||||||
    For example HockeyApp responds with 202.
 | 
					 | 
				
			||||||
-
 | 
					-
 | 
				
			||||||
  author: Jeremy Apthorp <jeremya@chromium.org>
 | 
					  author: Jeremy Apthorp <jeremya@chromium.org>
 | 
				
			||||||
  file: backport_cd7154e0bb5.patch
 | 
					  file: backport_cd7154e0bb5.patch
 | 
				
			||||||
| 
						 | 
					@ -477,3 +474,19 @@ patches:
 | 
				
			||||||
      desktop capture api.
 | 
					      desktop capture api.
 | 
				
			||||||
    * Backports https://chromium-review.googlesource.com/c/chromium/src/+/1199806
 | 
					    * Backports https://chromium-review.googlesource.com/c/chromium/src/+/1199806
 | 
				
			||||||
      that fixes crash with screen capturer, can be removed in 71.0.3539.0
 | 
					      that fixes crash with screen capturer, can be removed in 71.0.3539.0
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 | 
					  author: Jeremy Apthorp <jeremya@chromium.org>
 | 
				
			||||||
 | 
					  file: expose-net-observer-api.patch
 | 
				
			||||||
 | 
					  description: |
 | 
				
			||||||
 | 
					    Expose URLRequestContextGetter::{Add,Remove}Observer.
 | 
				
			||||||
 | 
					    This patch should be removed once we switch to using the net service (cc @robo)
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 | 
					  author: Aleksei Kuzmin <alkuzmin@microsoft.com>
 | 
				
			||||||
 | 
					  file: backport_7167a9eac.patch
 | 
				
			||||||
 | 
					  description: |
 | 
				
			||||||
 | 
					    "viz: Remove the global ServerSharedBitmapManager."
 | 
				
			||||||
 | 
					    https://chromium-review.googlesource.com/802574
 | 
				
			||||||
 | 
					    Landed in 69.0.3447.0.
 | 
				
			||||||
 | 
					    See https://github.com/electron/electron/issues/14327
 | 
				
			||||||
 | 
					    (Android specific changes and changes in some test files
 | 
				
			||||||
 | 
					    have been removed from the diff.)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
 | 
					diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
 | 
				
			||||||
index a6756c2..5352958 100644
 | 
					index a6756c20f22c..53529588af27 100644
 | 
				
			||||||
--- a/ui/base/accelerators/accelerator.cc
 | 
					--- a/ui/base/accelerators/accelerator.cc
 | 
				
			||||||
+++ b/ui/base/accelerators/accelerator.cc
 | 
					+++ b/ui/base/accelerators/accelerator.cc
 | 
				
			||||||
@@ -11,6 +11,7 @@
 | 
					@@ -11,6 +11,7 @@
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
 | 
					diff --git a/base/BUILD.gn b/base/BUILD.gn
 | 
				
			||||||
index b674e703617d..5a7a11d816cf 100644
 | 
					index 943412faefd7..c505df950b2b 100644
 | 
				
			||||||
--- a/base/BUILD.gn
 | 
					--- a/base/BUILD.gn
 | 
				
			||||||
+++ b/base/BUILD.gn
 | 
					+++ b/base/BUILD.gn
 | 
				
			||||||
@@ -1131,7 +1131,7 @@ component("base") {
 | 
					@@ -1217,7 +1217,7 @@ jumbo_component("base") {
 | 
				
			||||||
   # Needed for <atomic> if using newer C++ library than sysroot, except if
 | 
					   # Needed for <atomic> if using newer C++ library than sysroot, except if
 | 
				
			||||||
   # building inside the cros_sdk environment - use host_toolchain as a
 | 
					   # building inside the cros_sdk environment - use host_toolchain as a
 | 
				
			||||||
   # more robust check for this.
 | 
					   # more robust check for this.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
 | 
					diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
 | 
				
			||||||
index f84934bfd712..63bce16a9d06 100644
 | 
					index f84934bfd712..fc23fef68b6f 100644
 | 
				
			||||||
--- a/gin/array_buffer.cc
 | 
					--- a/gin/array_buffer.cc
 | 
				
			||||||
+++ b/gin/array_buffer.cc
 | 
					+++ b/gin/array_buffer.cc
 | 
				
			||||||
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
 | 
					@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,7 @@ index f84934bfd712..63bce16a9d06 100644
 | 
				
			||||||
   free(data);
 | 
					   free(data);
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
 | 
					diff --git a/gin/array_buffer.h b/gin/array_buffer.h
 | 
				
			||||||
index 2aef366ac819..c037808a9bb3 100644
 | 
					index 2aef366ac819..3c7d66c81032 100644
 | 
				
			||||||
--- a/gin/array_buffer.h
 | 
					--- a/gin/array_buffer.h
 | 
				
			||||||
+++ b/gin/array_buffer.h
 | 
					+++ b/gin/array_buffer.h
 | 
				
			||||||
@@ -21,6 +21,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | 
					@@ -21,6 +21,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | 
				
			||||||
| 
						 | 
					@ -25,6 +25,21 @@ index 2aef366ac819..c037808a9bb3 100644
 | 
				
			||||||
   void Free(void* data, size_t length) override;
 | 
					   void Free(void* data, size_t length) override;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
 | 
					   GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
 | 
				
			||||||
 | 
					diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
				
			||||||
 | 
					index c8c822632a69..d12976b3cd01 100644
 | 
				
			||||||
 | 
					--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
				
			||||||
 | 
					+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
				
			||||||
 | 
					@@ -619,6 +619,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | 
				
			||||||
 | 
					         size, WTF::ArrayBufferContents::kDontInitialize);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+  void* Realloc(void* data, size_t size) override {
 | 
				
			||||||
 | 
					+    return WTF::ArrayBufferContents::Realloc(data, size);
 | 
				
			||||||
 | 
					+  }
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					   void Free(void* data, size_t size) override {
 | 
				
			||||||
 | 
					     WTF::ArrayBufferContents::FreeMemory(data);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | 
					diff --git a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc b/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | 
				
			||||||
index 053babce1051..e33d6d4ceb5a 100644
 | 
					index 053babce1051..e33d6d4ceb5a 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | 
					--- a/third_party/blink/renderer/platform/wtf/typed_arrays/array_buffer_contents.cc
 | 
				
			||||||
| 
						 | 
					@ -53,18 +68,3 @@ index 809229caa872..6248ad32d6b0 100644
 | 
				
			||||||
   static void FreeMemory(void*);
 | 
					   static void FreeMemory(void*);
 | 
				
			||||||
   static DataHandle CreateDataHandle(size_t, InitializationPolicy);
 | 
					   static DataHandle CreateDataHandle(size_t, InitializationPolicy);
 | 
				
			||||||
   static void Initialize(
 | 
					   static void Initialize(
 | 
				
			||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
					 | 
				
			||||||
index cf2762ede559..f065b5ebafb8 100644
 | 
					 | 
				
			||||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
					 | 
				
			||||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 | 
					 | 
				
			||||||
@@ -555,6 +555,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
 | 
					 | 
				
			||||||
         size, WTF::ArrayBufferContents::kDontInitialize);
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  void* Realloc(void* data, size_t size) override {
 | 
					 | 
				
			||||||
+    return WTF::ArrayBufferContents::Realloc(data, size);
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   void Free(void* data, size_t size) override {
 | 
					 | 
				
			||||||
     WTF::ArrayBufferContents::FreeMemory(data);
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/base/process/launch.h b/base/process/launch.h
 | 
					diff --git a/base/process/launch.h b/base/process/launch.h
 | 
				
			||||||
index 20b76fc..9db73bf 100644
 | 
					index b4530b755a23..d6f02d9ab2e3 100644
 | 
				
			||||||
--- a/base/process/launch.h
 | 
					--- a/base/process/launch.h
 | 
				
			||||||
+++ b/base/process/launch.h
 | 
					+++ b/base/process/launch.h
 | 
				
			||||||
@@ -147,7 +147,7 @@ struct BASE_EXPORT LaunchOptions {
 | 
					@@ -176,7 +176,7 @@ struct BASE_EXPORT LaunchOptions {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
 | 
					   // By default, child processes will have the PR_SET_NO_NEW_PRIVS bit set. If
 | 
				
			||||||
   // true, then this bit will not be set in the new child process.
 | 
					   // true, then this bit will not be set in the new child process.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,13 +1,13 @@
 | 
				
			||||||
diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
					diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
				
			||||||
index 0c57d20..0916ed0 100644
 | 
					index 1c1fb59e02c8..86b87e294336 100644
 | 
				
			||||||
--- a/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
					--- a/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
				
			||||||
+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
					+++ b/content/browser/loader/resource_dispatcher_host_impl.cc
 | 
				
			||||||
@@ -1870,6 +1870,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
 | 
					@@ -1597,6 +1597,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
 | 
				
			||||||
       !policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
 | 
					       !policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
 | 
				
			||||||
       !is_external_protocol;
 | 
					       !is_external_protocol;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
+  non_web_url_in_guest = false;
 | 
					+  non_web_url_in_guest = false;
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
   if (is_shutdown_ || non_web_url_in_guest ||
 | 
					   if (is_shutdown_ || non_web_url_in_guest) {
 | 
				
			||||||
       (delegate_ && !delegate_->ShouldBeginRequest(
 | 
					     url_loader_client->OnComplete(
 | 
				
			||||||
           info.common_params.method,
 | 
					         network::URLLoaderCompletionStatus(net::ERR_ABORTED));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
					diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
				
			||||||
index 91674b9..8a4c391 100644
 | 
					index 40399a35f8d2..1d3a0da948dc 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
					--- a/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
					+++ b/chrome/browser/ui/libgtkui/app_indicator_icon_menu.cc
 | 
				
			||||||
@@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
 | 
					@@ -116,7 +116,7 @@ void AppIndicatorIconMenu::OnMenuItemActivated(GtkWidget* menu_item) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1298
									
								
								patches/common/chromium/backport_7167a9eac.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1298
									
								
								patches/common/chromium/backport_7167a9eac.patch
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -1,6 +1,8 @@
 | 
				
			||||||
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
 | 
					diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
 | 
				
			||||||
index bf4b1d0..a3b72c4 100644
 | 
					index bf4b1d07f7fe..8435c60a0786 100644
 | 
				
			||||||
@@ -995,7 +996,8 @@
 | 
					--- a/ui/views/widget/widget.cc
 | 
				
			||||||
 | 
					+++ b/ui/views/widget/widget.cc
 | 
				
			||||||
 | 
					@@ -995,7 +995,8 @@ bool Widget::IsTranslucentWindowOpacitySupported() const {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 void Widget::OnSizeConstraintsChanged() {
 | 
					 void Widget::OnSizeConstraintsChanged() {
 | 
				
			||||||
   native_widget_->OnSizeConstraintsChanged();
 | 
					   native_widget_->OnSizeConstraintsChanged();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
					diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
				
			||||||
index bdd886eff5e3..42a3f0ef6e55 100644
 | 
					index 4b47f551f366..227c58a5629d 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
					--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
					+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 | 
				
			||||||
@@ -255,7 +255,6 @@ void WorkerScriptLoader::ProcessContentSecurityPolicy(
 | 
					@@ -246,7 +246,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
 | 
				
			||||||
   // document (which is implemented in WorkerMessagingProxy, and
 | 
					   // document (which is implemented in WorkerMessagingProxy, and
 | 
				
			||||||
   // m_contentSecurityPolicy should be left as nullptr to inherit the policy).
 | 
					   // m_contentSecurityPolicy should be left as nullptr to inherit the policy).
 | 
				
			||||||
   if (!response.Url().ProtocolIs("blob") &&
 | 
					   if (!response.Url().ProtocolIs("blob") &&
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
 | 
					diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
 | 
				
			||||||
index 0bfe29512050..81439f7ab8f7 100644
 | 
					index 39831f1902c6..fddb013aa122 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/fileapi/file.h
 | 
					--- a/third_party/blink/renderer/core/fileapi/file.h
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/fileapi/file.h
 | 
					+++ b/third_party/blink/renderer/core/fileapi/file.h
 | 
				
			||||||
@@ -170,6 +170,9 @@ class CORE_EXPORT File final : public Blob {
 | 
					@@ -168,6 +168,9 @@ class CORE_EXPORT File final : public Blob {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   const String& name() const { return name_; }
 | 
					   const String& name() const { return name_; }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ index 0bfe29512050..81439f7ab8f7 100644
 | 
				
			||||||
   // http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
 | 
					   // http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
 | 
				
			||||||
   long long lastModified() const;
 | 
					   long long lastModified() const;
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
 | 
					diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
 | 
				
			||||||
index df954bc8f818..4683b2853bb4 100644
 | 
					index a74beceda3e7..7196fd5f5f9e 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/fileapi/file.idl
 | 
					--- a/third_party/blink/renderer/core/fileapi/file.idl
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/fileapi/file.idl
 | 
					+++ b/third_party/blink/renderer/core/fileapi/file.idl
 | 
				
			||||||
@@ -32,6 +32,7 @@
 | 
					@@ -32,6 +32,7 @@
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
cdiff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
					diff --git a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
				
			||||||
index aedc832..8c26681 100644
 | 
					index 87f2176ce897..ce3d9ce19bff 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
					--- a/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
					+++ b/third_party/blink/renderer/platform/bindings/v8_object_constructor.cc
 | 
				
			||||||
@@ -94,8 +94,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
 | 
					@@ -98,8 +98,10 @@ v8::Local<v8::Function> V8ObjectConstructor::CreateInterfaceObject(
 | 
				
			||||||
     bool get_prototype_value =
 | 
					     bool get_prototype_value =
 | 
				
			||||||
         interface_object->Get(context, V8AtomicString(isolate, "prototype"))
 | 
					         interface_object->Get(context, V8AtomicString(isolate, "prototype"))
 | 
				
			||||||
             .ToLocal(&prototype_value);
 | 
					             .ToLocal(&prototype_value);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
					diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
				
			||||||
index 33d958fb31ae..47efe62650aa 100644
 | 
					index 5c00e3e935b2..43f882eb0883 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
					--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
					+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 | 
				
			||||||
@@ -170,11 +170,11 @@ void LocalWindowProxy::Initialize() {
 | 
					@@ -171,11 +171,11 @@ void LocalWindowProxy::Initialize() {
 | 
				
			||||||
                  GetFrame()->IsMainFrame());
 | 
					                  GetFrame()->IsMainFrame());
 | 
				
			||||||
     MainThreadDebugger::Instance()->ContextCreated(script_state_.get(),
 | 
					     MainThreadDebugger::Instance()->ContextCreated(script_state_.get(),
 | 
				
			||||||
                                                    GetFrame(), origin);
 | 
					                                                    GetFrame(), origin);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
 | 
					diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
 | 
				
			||||||
index 97a5393d40b4..04f88dd2ea15 100644
 | 
					index 5686e6a06d6f..4798d7e36bec 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
 | 
					--- a/third_party/blink/renderer/core/frame/local_frame.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
 | 
					+++ b/third_party/blink/renderer/core/frame/local_frame.cc
 | 
				
			||||||
@@ -303,10 +303,6 @@ void LocalFrame::Detach(FrameDetachType type) {
 | 
					@@ -382,10 +382,6 @@ void LocalFrame::Detach(FrameDetachType type) {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   CHECK(!view_ || !view_->IsAttached());
 | 
					   CHECK(!view_ || !view_->IsAttached());
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ index 97a5393d40b4..04f88dd2ea15 100644
 | 
				
			||||||
   if (!Client())
 | 
					   if (!Client())
 | 
				
			||||||
     return;
 | 
					     return;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -316,6 +312,10 @@ void LocalFrame::Detach(FrameDetachType type) {
 | 
					@@ -403,6 +399,10 @@ void LocalFrame::Detach(FrameDetachType type) {
 | 
				
			||||||
   // Notify ScriptController that the frame is closing, since its cleanup ends
 | 
					   // Notify ScriptController that the frame is closing, since its cleanup ends
 | 
				
			||||||
   // up calling back to LocalFrameClient via WindowProxy.
 | 
					   // up calling back to LocalFrameClient via WindowProxy.
 | 
				
			||||||
   GetScriptController().ClearForClose();
 | 
					   GetScriptController().ClearForClose();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,22 @@
 | 
				
			||||||
 | 
					diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
 | 
				
			||||||
 | 
					index 601242f8df12..8cb523f82df0 100644
 | 
				
			||||||
 | 
					--- a/third_party/blink/public/web/web_local_frame.h
 | 
				
			||||||
 | 
					+++ b/third_party/blink/public/web/web_local_frame.h
 | 
				
			||||||
 | 
					@@ -427,6 +427,9 @@ class WebLocalFrame : public WebFrame {
 | 
				
			||||||
 | 
					   // be calling this API.
 | 
				
			||||||
 | 
					   virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+  virtual v8::Local<v8::Context> WorldScriptContext(
 | 
				
			||||||
 | 
					+      v8::Isolate* isolate, int world_id) const = 0;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					   // Executes script in the context of the current page and returns the value
 | 
				
			||||||
 | 
					   // that the script evaluated to with callback. Script execution can be
 | 
				
			||||||
 | 
					   // suspend.
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
					diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
				
			||||||
index a93834fbe86e..937b7f335693 100644
 | 
					index db86ae3c5eb4..602841d00df4 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
					--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
					+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
 | 
				
			||||||
@@ -843,6 +843,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
 | 
					@@ -892,6 +892,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
 | 
				
			||||||
   return MainWorldScriptContext()->Global();
 | 
					   return MainWorldScriptContext()->Global();
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -17,10 +31,10 @@ index a93834fbe86e..937b7f335693 100644
 | 
				
			||||||
   return BindingSecurity::ShouldAllowAccessToFrame(
 | 
					   return BindingSecurity::ShouldAllowAccessToFrame(
 | 
				
			||||||
       CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
 | 
					       CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
					diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
				
			||||||
index d66499296ff8..bfea68983fda 100644
 | 
					index 0adc92eb48f2..a17891ce397c 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
					--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
					+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 | 
				
			||||||
@@ -142,6 +142,8 @@ class CORE_EXPORT WebLocalFrameImpl final
 | 
					@@ -144,6 +144,8 @@ class CORE_EXPORT WebLocalFrameImpl final
 | 
				
			||||||
       int argc,
 | 
					       int argc,
 | 
				
			||||||
       v8::Local<v8::Value> argv[]) override;
 | 
					       v8::Local<v8::Value> argv[]) override;
 | 
				
			||||||
   v8::Local<v8::Context> MainWorldScriptContext() const override;
 | 
					   v8::Local<v8::Context> MainWorldScriptContext() const override;
 | 
				
			||||||
| 
						 | 
					@ -28,18 +42,4 @@ index d66499296ff8..bfea68983fda 100644
 | 
				
			||||||
+      v8::Isolate* isolate, int world_id) const override;
 | 
					+      v8::Isolate* isolate, int world_id) const override;
 | 
				
			||||||
   v8::Local<v8::Object> GlobalProxy() const override;
 | 
					   v8::Local<v8::Object> GlobalProxy() const override;
 | 
				
			||||||
   void Reload(WebFrameLoadType) override;
 | 
					   void Reload(WebFrameLoadType) override;
 | 
				
			||||||
   void ReloadWithOverrideURL(const WebURL& override_url,
 | 
					   void ReloadImage(const WebNode&) override;
 | 
				
			||||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
 | 
					 | 
				
			||||||
index ad0fa84f9511..69f96587b1f1 100644
 | 
					 | 
				
			||||||
--- a/third_party/blink/public/web/web_local_frame.h
 | 
					 | 
				
			||||||
+++ b/third_party/blink/public/web/web_local_frame.h
 | 
					 | 
				
			||||||
@@ -404,6 +404,9 @@ class WebLocalFrame : public WebFrame {
 | 
					 | 
				
			||||||
   // be calling this API.
 | 
					 | 
				
			||||||
   virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+  virtual v8::Local<v8::Context> WorldScriptContext(
 | 
					 | 
				
			||||||
+      v8::Isolate* isolate, int world_id) const = 0;
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
   // Executes script in the context of the current page and returns the value
 | 
					 | 
				
			||||||
   // that the script evaluated to with callback. Script execution can be
 | 
					 | 
				
			||||||
   // suspend.
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
 | 
					diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
 | 
				
			||||||
index c75fb7c2bb7e..423f4b2ddb10 100644
 | 
					index d31a9f29fa9c..dea5a6403f4c 100644
 | 
				
			||||||
--- a/third_party/boringssl/BUILD.gn
 | 
					--- a/third_party/boringssl/BUILD.gn
 | 
				
			||||||
+++ b/third_party/boringssl/BUILD.gn
 | 
					+++ b/third_party/boringssl/BUILD.gn
 | 
				
			||||||
@@ -44,6 +44,13 @@ config("no_asm_config") {
 | 
					@@ -46,6 +46,13 @@ config("no_asm_config") {
 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 all_sources = crypto_sources + ssl_sources
 | 
					 all_sources = crypto_sources + ssl_sources
 | 
				
			||||||
 | 
					 all_headers = crypto_headers + ssl_headers
 | 
				
			||||||
+if (is_electron_build) {
 | 
					+if (is_electron_build) {
 | 
				
			||||||
+  # Needed to build a nodejs-compatible boringssl.
 | 
					+  # Needed to build a nodejs-compatible boringssl.
 | 
				
			||||||
+  all_sources += [
 | 
					+  all_sources += [
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
					diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
				
			||||||
index 7426062f7381..bd5cd2fcd230 100644
 | 
					index bc9eba153a6a..5200f79afd05 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
					--- a/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
				
			||||||
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
					+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
 | 
				
			||||||
@@ -54,10 +54,13 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient {
 | 
					@@ -59,6 +59,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
 | 
				
			||||||
   // These will not return nullptr until Destroy is called.
 | 
					   // These will not return nullptr until Destroy is called.
 | 
				
			||||||
   DelegatedFrameHost* GetDelegatedFrameHost();
 | 
					   DelegatedFrameHost* GetDelegatedFrameHost();
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -11,16 +11,19 @@ index 7426062f7381..bd5cd2fcd230 100644
 | 
				
			||||||
   // Ensure that the currect compositor frame be cleared (even if it is
 | 
					   // Ensure that the currect compositor frame be cleared (even if it is
 | 
				
			||||||
   // potentially visible).
 | 
					   // potentially visible).
 | 
				
			||||||
   void ClearCompositorFrame();
 | 
					   void ClearCompositorFrame();
 | 
				
			||||||
 | 
					@@ -69,6 +71,7 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient,
 | 
				
			||||||
 | 
					   // no valid frame is available.
 | 
				
			||||||
 | 
					   const gfx::CALayerParams* GetLastCALayerParams() const;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
+  ui::Compositor* GetCompositor();
 | 
					+  ui::Compositor* GetCompositor();
 | 
				
			||||||
   gfx::AcceleratedWidget GetAcceleratedWidget();
 | 
					   gfx::AcceleratedWidget GetAcceleratedWidget();
 | 
				
			||||||
   void DidCreateNewRendererCompositorFrameSink(
 | 
					   void DidCreateNewRendererCompositorFrameSink(
 | 
				
			||||||
       viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
 | 
					       viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink);
 | 
				
			||||||
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
					diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
				
			||||||
index 7fcc24c15c37..7c31977b20f9 100644
 | 
					index 3d12a1126a0d..7a60368b2c8a 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
					--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
				
			||||||
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
					+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
 | 
				
			||||||
@@ -208,6 +208,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
 | 
					@@ -240,6 +240,12 @@ BrowserCompositorMac::~BrowserCompositorMac() {
 | 
				
			||||||
     g_spare_recyclable_compositors.Get().clear();
 | 
					     g_spare_recyclable_compositors.Get().clear();
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
					diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
				
			||||||
index 964c9a093a3b..f3b3d66ff267 100644
 | 
					index a0bc9305e62d..7f022f6cfda7 100644
 | 
				
			||||||
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
					--- a/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
				
			||||||
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
					+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
 | 
				
			||||||
@@ -214,8 +214,11 @@ void BrowserPluginGuest::Init() {
 | 
					@@ -207,8 +207,11 @@ void BrowserPluginGuest::Init() {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   WebContentsImpl* owner_web_contents = static_cast<WebContentsImpl*>(
 | 
					   WebContentsImpl* owner_web_contents = static_cast<WebContentsImpl*>(
 | 
				
			||||||
       delegate_->GetOwnerWebContents());
 | 
					       delegate_->GetOwnerWebContents());
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
 | 
					diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
 | 
				
			||||||
index 06762fb..e89b1f0 100644
 | 
					index d64895137a73..c42dd6ddf172 100644
 | 
				
			||||||
--- a/content/renderer/browser_plugin/browser_plugin.cc
 | 
					--- a/content/renderer/browser_plugin/browser_plugin.cc
 | 
				
			||||||
+++ b/content/renderer/browser_plugin/browser_plugin.cc
 | 
					+++ b/content/renderer/browser_plugin/browser_plugin.cc
 | 
				
			||||||
@@ -448,15 +448,11 @@ blink::WebInputEventResult BrowserPlugin::handleInputEvent(
 | 
					@@ -642,15 +642,11 @@ blink::WebInputEventResult BrowserPlugin::HandleInputEvent(
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   DCHECK(!blink::WebInputEvent::IsTouchEventType(event.GetType()));
 | 
					   DCHECK(!blink::WebInputEvent::IsTouchEventType(event.GetType()));
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
 | 
					diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
 | 
				
			||||||
index 9e38ee0e592b..bd54ce154b13 100644
 | 
					index 93a97ff2803f..02c469e930a1 100644
 | 
				
			||||||
--- a/build/config/BUILDCONFIG.gn
 | 
					--- a/build/config/BUILDCONFIG.gn
 | 
				
			||||||
+++ b/build/config/BUILDCONFIG.gn
 | 
					+++ b/build/config/BUILDCONFIG.gn
 | 
				
			||||||
@@ -123,6 +123,9 @@ if (current_os == "") {
 | 
					@@ -123,6 +123,9 @@ if (current_os == "") {
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ index 9e38ee0e592b..bd54ce154b13 100644
 | 
				
			||||||
   # Set to enable the official build level of optimization. This has nothing
 | 
					   # Set to enable the official build level of optimization. This has nothing
 | 
				
			||||||
   # to do with branding, but enables an additional level of optimization above
 | 
					   # to do with branding, but enables an additional level of optimization above
 | 
				
			||||||
   # release (!is_debug). This might be better expressed as a tri-state
 | 
					   # release (!is_debug). This might be better expressed as a tri-state
 | 
				
			||||||
@@ -539,6 +542,7 @@ default_compiler_configs = [
 | 
					@@ -527,6 +531,7 @@ default_compiler_configs = [
 | 
				
			||||||
   "//build/config/compiler:thin_archive",
 | 
					   "//build/config/compiler:thin_archive",
 | 
				
			||||||
   "//build/config/coverage:default_coverage",
 | 
					   "//build/config/coverage:default_coverage",
 | 
				
			||||||
   "//build/config/sanitizers:default_sanitizer_flags",
 | 
					   "//build/config/sanitizers:default_sanitizer_flags",
 | 
				
			||||||
| 
						 | 
					@ -21,10 +21,10 @@ index 9e38ee0e592b..bd54ce154b13 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 if (is_win) {
 | 
					 if (is_win) {
 | 
				
			||||||
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 | 
					diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 | 
				
			||||||
index 9a10137aa405..bb33e5450eaa 100644
 | 
					index 83337d52e4b9..8ec56ca46c74 100644
 | 
				
			||||||
--- a/build/config/compiler/BUILD.gn
 | 
					--- a/build/config/compiler/BUILD.gn
 | 
				
			||||||
+++ b/build/config/compiler/BUILD.gn
 | 
					+++ b/build/config/compiler/BUILD.gn
 | 
				
			||||||
@@ -579,10 +579,13 @@ config("compiler") {
 | 
					@@ -636,10 +636,13 @@ config("compiler") {
 | 
				
			||||||
       ldflags += [ "-Wl,--lto-O0" ]
 | 
					       ldflags += [ "-Wl,--lto-O0" ]
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
 | 
					diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn
 | 
				
			||||||
index 53f767a0bddb..661466b779e8 100644
 | 
					index 4d9d1f45f870..286c791613ba 100644
 | 
				
			||||||
--- a/build/toolchain/win/BUILD.gn
 | 
					--- a/build/toolchain/win/BUILD.gn
 | 
				
			||||||
+++ b/build/toolchain/win/BUILD.gn
 | 
					+++ b/build/toolchain/win/BUILD.gn
 | 
				
			||||||
@@ -176,6 +176,12 @@ template("msvc_toolchain") {
 | 
					@@ -154,6 +154,12 @@ template("msvc_toolchain") {
 | 
				
			||||||
       ]
 | 
					       ]
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
       command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
 | 
					       command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,7 @@ index 53f767a0bddb..661466b779e8 100644
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     tool("cxx") {
 | 
					     tool("cxx") {
 | 
				
			||||||
@@ -192,6 +198,12 @@ template("msvc_toolchain") {
 | 
					@@ -170,6 +176,12 @@ template("msvc_toolchain") {
 | 
				
			||||||
       ]
 | 
					       ]
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
       command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
 | 
					       command = "$env_wrapper$cl /nologo /showIncludes ${clflags} $sys_include_flags{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} /c {{source}} /Fo{{output}} /Fd\"$pdbname\""
 | 
				
			||||||
| 
						 | 
					@ -29,10 +29,10 @@ index 53f767a0bddb..661466b779e8 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     tool("rc") {
 | 
					     tool("rc") {
 | 
				
			||||||
diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
 | 
					diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
index 3a81368f3469..7c5ef1ea5db4 100644
 | 
					index b2cb093377ee..801d7a9b8e03 100644
 | 
				
			||||||
--- a/build/toolchain/win/tool_wrapper.py
 | 
					--- a/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
+++ b/build/toolchain/win/tool_wrapper.py
 | 
					+++ b/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
@@ -315,6 +315,25 @@ class WinTool(object):
 | 
					@@ -270,6 +270,25 @@ class WinTool(object):
 | 
				
			||||||
     dirname = dirname[0] if dirname else None
 | 
					     dirname = dirname[0] if dirname else None
 | 
				
			||||||
     return subprocess.call(args, shell=True, env=env, cwd=dirname)
 | 
					     return subprocess.call(args, shell=True, env=env, cwd=dirname)
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
 | 
					diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
index 25841d376bcd..df41213f4c49 100644
 | 
					index 321a12f74202..7a53675a2139 100644
 | 
				
			||||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
 | 
					--- a/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
 | 
					+++ b/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
@@ -2874,6 +2874,38 @@ void RenderFrameHostImpl::CreateNewWindow(
 | 
					@@ -3058,6 +3058,38 @@ void RenderFrameHostImpl::CreateNewWindow(
 | 
				
			||||||
                "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
 | 
					                "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url",
 | 
				
			||||||
                params->target_url.possibly_invalid_spec());
 | 
					                params->target_url.possibly_invalid_spec());
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ index 25841d376bcd..df41213f4c49 100644
 | 
				
			||||||
   bool no_javascript_access = false;
 | 
					   bool no_javascript_access = false;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   // Filter out URLs to which navigation is disallowed from this context.
 | 
					   // Filter out URLs to which navigation is disallowed from this context.
 | 
				
			||||||
@@ -2896,8 +2928,9 @@ void RenderFrameHostImpl::CreateNewWindow(
 | 
					@@ -3080,8 +3112,9 @@ void RenderFrameHostImpl::CreateNewWindow(
 | 
				
			||||||
           frame_tree_node_->frame_tree()->GetMainFrame()->GetLastCommittedURL(),
 | 
					           frame_tree_node_->frame_tree()->GetMainFrame()->GetLastCommittedURL(),
 | 
				
			||||||
           last_committed_origin_.GetURL(), params->window_container_type,
 | 
					           last_committed_origin_.GetURL(), params->window_container_type,
 | 
				
			||||||
           params->target_url, params->referrer, params->frame_name,
 | 
					           params->target_url, params->referrer, params->frame_name,
 | 
				
			||||||
| 
						 | 
					@ -53,8 +53,20 @@ index 25841d376bcd..df41213f4c49 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   if (!can_create_window) {
 | 
					   if (!can_create_window) {
 | 
				
			||||||
     std::move(callback).Run(mojom::CreateNewWindowStatus::kIgnore, nullptr);
 | 
					     std::move(callback).Run(mojom::CreateNewWindowStatus::kIgnore, nullptr);
 | 
				
			||||||
 | 
					diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
 | 
				
			||||||
 | 
					index 9c298b182440..2fcbde75ba47 100644
 | 
				
			||||||
 | 
					--- a/content/browser/security_exploit_browsertest.cc
 | 
				
			||||||
 | 
					+++ b/content/browser/security_exploit_browsertest.cc
 | 
				
			||||||
 | 
					@@ -293,6 +293,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					   mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
 | 
				
			||||||
 | 
					   params->target_url = GURL("about:blank");
 | 
				
			||||||
 | 
					+  params->body = mojom::ResourceRequestBody::New();
 | 
				
			||||||
 | 
					   pending_rfh->CreateNewWindow(
 | 
				
			||||||
 | 
					       std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
 | 
				
			||||||
 | 
					                                            mojom::CreateNewWindowReplyPtr) {}));
 | 
				
			||||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
 | 
					diff --git a/content/common/frame.mojom b/content/common/frame.mojom
 | 
				
			||||||
index 99ec7e8d7995..26a4040fba97 100644
 | 
					index 09b5766c0794..edb604c80d3f 100644
 | 
				
			||||||
--- a/content/common/frame.mojom
 | 
					--- a/content/common/frame.mojom
 | 
				
			||||||
+++ b/content/common/frame.mojom
 | 
					+++ b/content/common/frame.mojom
 | 
				
			||||||
@@ -11,6 +11,8 @@ import "content/public/common/resource_type.mojom";
 | 
					@@ -11,6 +11,8 @@ import "content/public/common/resource_type.mojom";
 | 
				
			||||||
| 
						 | 
					@ -66,7 +78,7 @@ index 99ec7e8d7995..26a4040fba97 100644
 | 
				
			||||||
 import "mojo/public/mojom/base/string16.mojom";
 | 
					 import "mojo/public/mojom/base/string16.mojom";
 | 
				
			||||||
 import "mojo/public/mojom/base/unguessable_token.mojom";
 | 
					 import "mojo/public/mojom/base/unguessable_token.mojom";
 | 
				
			||||||
 import "services/network/public/mojom/url_loader.mojom";
 | 
					 import "services/network/public/mojom/url_loader.mojom";
 | 
				
			||||||
@@ -146,6 +148,24 @@ interface FrameFactory {
 | 
					@@ -148,6 +150,24 @@ interface FrameFactory {
 | 
				
			||||||
   CreateFrame(int32 frame_routing_id, Frame& frame);
 | 
					   CreateFrame(int32 frame_routing_id, Frame& frame);
 | 
				
			||||||
 };
 | 
					 };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -91,7 +103,7 @@ index 99ec7e8d7995..26a4040fba97 100644
 | 
				
			||||||
 struct CreateNewWindowParams {
 | 
					 struct CreateNewWindowParams {
 | 
				
			||||||
   // True if this open request came in the context of a user gesture.
 | 
					   // True if this open request came in the context of a user gesture.
 | 
				
			||||||
   bool user_gesture;
 | 
					   bool user_gesture;
 | 
				
			||||||
@@ -182,6 +202,10 @@ struct CreateNewWindowParams {
 | 
					@@ -184,6 +204,10 @@ struct CreateNewWindowParams {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   // The window features to use for the new window.
 | 
					   // The window features to use for the new window.
 | 
				
			||||||
   blink.mojom.WindowFeatures features;
 | 
					   blink.mojom.WindowFeatures features;
 | 
				
			||||||
| 
						 | 
					@ -103,10 +115,10 @@ index 99ec7e8d7995..26a4040fba97 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 // Operation result when the renderer asks the browser to create a new window.
 | 
					 // Operation result when the renderer asks the browser to create a new window.
 | 
				
			||||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
 | 
					diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
 | 
				
			||||||
index 37e2d88e28e9..6c366435ddd8 100644
 | 
					index a8927d0ba8da..396ae3d82ba2 100644
 | 
				
			||||||
--- a/content/public/browser/content_browser_client.cc
 | 
					--- a/content/public/browser/content_browser_client.cc
 | 
				
			||||||
+++ b/content/public/browser/content_browser_client.cc
 | 
					+++ b/content/public/browser/content_browser_client.cc
 | 
				
			||||||
@@ -382,6 +382,8 @@ bool ContentBrowserClient::CanCreateWindow(
 | 
					@@ -401,6 +401,8 @@ bool ContentBrowserClient::CanCreateWindow(
 | 
				
			||||||
     const std::string& frame_name,
 | 
					     const std::string& frame_name,
 | 
				
			||||||
     WindowOpenDisposition disposition,
 | 
					     WindowOpenDisposition disposition,
 | 
				
			||||||
     const blink::mojom::WindowFeatures& features,
 | 
					     const blink::mojom::WindowFeatures& features,
 | 
				
			||||||
| 
						 | 
					@ -116,18 +128,18 @@ index 37e2d88e28e9..6c366435ddd8 100644
 | 
				
			||||||
     bool opener_suppressed,
 | 
					     bool opener_suppressed,
 | 
				
			||||||
     bool* no_javascript_access) {
 | 
					     bool* no_javascript_access) {
 | 
				
			||||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
 | 
					diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
 | 
				
			||||||
index 63cb3851db0a..4a96c8851df0 100644
 | 
					index e9c6b810e050..3ca627448e33 100644
 | 
				
			||||||
--- a/content/public/browser/content_browser_client.h
 | 
					--- a/content/public/browser/content_browser_client.h
 | 
				
			||||||
+++ b/content/public/browser/content_browser_client.h
 | 
					+++ b/content/public/browser/content_browser_client.h
 | 
				
			||||||
@@ -151,6 +151,7 @@ class RenderFrameHost;
 | 
					@@ -153,6 +153,7 @@ class RenderFrameHost;
 | 
				
			||||||
 class RenderProcessHost;
 | 
					 class RenderProcessHost;
 | 
				
			||||||
 class RenderViewHost;
 | 
					 class RenderViewHost;
 | 
				
			||||||
 class ResourceContext;
 | 
					 class ResourceContext;
 | 
				
			||||||
+class ResourceRequestBody;
 | 
					+class ResourceRequestBody;
 | 
				
			||||||
 | 
					 class ServiceManagerConnection;
 | 
				
			||||||
 class SiteInstance;
 | 
					 class SiteInstance;
 | 
				
			||||||
 class SpeechRecognitionManagerDelegate;
 | 
					 class SpeechRecognitionManagerDelegate;
 | 
				
			||||||
 class StoragePartition;
 | 
					@@ -651,6 +652,8 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
				
			||||||
@@ -625,6 +626,8 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
					 | 
				
			||||||
       const std::string& frame_name,
 | 
					       const std::string& frame_name,
 | 
				
			||||||
       WindowOpenDisposition disposition,
 | 
					       WindowOpenDisposition disposition,
 | 
				
			||||||
       const blink::mojom::WindowFeatures& features,
 | 
					       const blink::mojom::WindowFeatures& features,
 | 
				
			||||||
| 
						 | 
					@ -137,18 +149,18 @@ index 63cb3851db0a..4a96c8851df0 100644
 | 
				
			||||||
       bool opener_suppressed,
 | 
					       bool opener_suppressed,
 | 
				
			||||||
       bool* no_javascript_access);
 | 
					       bool* no_javascript_access);
 | 
				
			||||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
 | 
					diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
 | 
				
			||||||
index 7a866ded50f1..f019ce3b24bb 100644
 | 
					index 4aba7a9e290e..a13cc1599d70 100644
 | 
				
			||||||
--- a/content/renderer/render_view_impl.cc
 | 
					--- a/content/renderer/render_view_impl.cc
 | 
				
			||||||
+++ b/content/renderer/render_view_impl.cc
 | 
					+++ b/content/renderer/render_view_impl.cc
 | 
				
			||||||
@@ -79,6 +79,7 @@
 | 
					@@ -78,6 +78,7 @@
 | 
				
			||||||
 #include "content/renderer/input/input_handler_manager.h"
 | 
					 #include "content/renderer/ime_event_guard.h"
 | 
				
			||||||
 #include "content/renderer/internal_document_state_data.h"
 | 
					 #include "content/renderer/internal_document_state_data.h"
 | 
				
			||||||
 #include "content/renderer/loader/request_extra_data.h"
 | 
					 #include "content/renderer/loader/request_extra_data.h"
 | 
				
			||||||
+#include "content/renderer/loader/web_url_request_util.h"
 | 
					+#include "content/renderer/loader/web_url_request_util.h"
 | 
				
			||||||
 #include "content/renderer/media/audio_device_factory.h"
 | 
					 #include "content/renderer/media/audio_device_factory.h"
 | 
				
			||||||
 #include "content/renderer/media/stream/media_stream_device_observer.h"
 | 
					 #include "content/renderer/media/stream/media_stream_device_observer.h"
 | 
				
			||||||
 #include "content/renderer/media/video_capture_impl_manager.h"
 | 
					 #include "content/renderer/media/video_capture_impl_manager.h"
 | 
				
			||||||
@@ -1258,6 +1259,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
 | 
					@@ -1243,6 +1244,46 @@ WebView* RenderViewImpl::CreateView(WebLocalFrame* creator,
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
 | 
					   params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -195,23 +207,11 @@ index 7a866ded50f1..f019ce3b24bb 100644
 | 
				
			||||||
   // We preserve this information before sending the message since |params| is
 | 
					   // We preserve this information before sending the message since |params| is
 | 
				
			||||||
   // moved on send.
 | 
					   // moved on send.
 | 
				
			||||||
   bool is_background_tab =
 | 
					   bool is_background_tab =
 | 
				
			||||||
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
 | 
					 | 
				
			||||||
index 0a1f363a673a..adcef6fca779 100644
 | 
					 | 
				
			||||||
--- a/content/browser/security_exploit_browsertest.cc
 | 
					 | 
				
			||||||
+++ b/content/browser/security_exploit_browsertest.cc
 | 
					 | 
				
			||||||
@@ -293,6 +293,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest,
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
   mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
 | 
					 | 
				
			||||||
   params->target_url = GURL("about:blank");
 | 
					 | 
				
			||||||
+  params->body = mojom::ResourceRequestBody::New();
 | 
					 | 
				
			||||||
   pending_rfh->CreateNewWindow(
 | 
					 | 
				
			||||||
       std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus,
 | 
					 | 
				
			||||||
                                            mojom::CreateNewWindowReplyPtr) {}));
 | 
					 | 
				
			||||||
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
					diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
				
			||||||
index 2eaee37ec780..9994df95a798 100644
 | 
					index 3a908d742130..52294125b799 100644
 | 
				
			||||||
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
					--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
				
			||||||
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
					+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
 | 
				
			||||||
@@ -182,6 +182,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
 | 
					@@ -247,6 +247,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow(
 | 
				
			||||||
     const std::string& frame_name,
 | 
					     const std::string& frame_name,
 | 
				
			||||||
     WindowOpenDisposition disposition,
 | 
					     WindowOpenDisposition disposition,
 | 
				
			||||||
     const blink::mojom::WindowFeatures& features,
 | 
					     const blink::mojom::WindowFeatures& features,
 | 
				
			||||||
| 
						 | 
					@ -221,10 +221,10 @@ index 2eaee37ec780..9994df95a798 100644
 | 
				
			||||||
     bool opener_suppressed,
 | 
					     bool opener_suppressed,
 | 
				
			||||||
     bool* no_javascript_access) {
 | 
					     bool* no_javascript_access) {
 | 
				
			||||||
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
					diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
				
			||||||
index 62b637bc80ce..1a9a06ce4bf6 100644
 | 
					index d0ba19167522..3d1154b3cb8a 100644
 | 
				
			||||||
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
					--- a/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
				
			||||||
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
					+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h
 | 
				
			||||||
@@ -58,6 +58,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
 | 
					@@ -67,6 +67,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient {
 | 
				
			||||||
                        const std::string& frame_name,
 | 
					                        const std::string& frame_name,
 | 
				
			||||||
                        WindowOpenDisposition disposition,
 | 
					                        WindowOpenDisposition disposition,
 | 
				
			||||||
                        const blink::mojom::WindowFeatures& features,
 | 
					                        const blink::mojom::WindowFeatures& features,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
 | 
					diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
 | 
				
			||||||
index f3033337199b..856bc8f0b143 100644
 | 
					index c0cf00b5da05..992827ca6782 100644
 | 
				
			||||||
--- a/chrome/renderer/media/chrome_key_systems.cc
 | 
					--- a/chrome/renderer/media/chrome_key_systems.cc
 | 
				
			||||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
 | 
					+++ b/chrome/renderer/media/chrome_key_systems.cc
 | 
				
			||||||
@@ -14,7 +14,9 @@
 | 
					@@ -14,7 +14,9 @@
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ index f3033337199b..856bc8f0b143 100644
 | 
				
			||||||
 #include "components/cdm/renderer/external_clear_key_key_system_properties.h"
 | 
					 #include "components/cdm/renderer/external_clear_key_key_system_properties.h"
 | 
				
			||||||
 #include "components/cdm/renderer/widevine_key_system_properties.h"
 | 
					 #include "components/cdm/renderer/widevine_key_system_properties.h"
 | 
				
			||||||
 #include "content/public/renderer/render_thread.h"
 | 
					 #include "content/public/renderer/render_thread.h"
 | 
				
			||||||
@@ -140,12 +142,14 @@ static void AddExternalClearKey(
 | 
					@@ -142,12 +144,14 @@ static void AddExternalClearKey(
 | 
				
			||||||
 #if defined(WIDEVINE_CDM_AVAILABLE)
 | 
					 #if defined(WIDEVINE_CDM_AVAILABLE)
 | 
				
			||||||
 // Returns persistent-license session support.
 | 
					 // Returns persistent-license session support.
 | 
				
			||||||
 EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
 | 
					 EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
 | 
					diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
 | 
				
			||||||
index 7b9fc4114c52..bdbbf93f6f0d 100644
 | 
					index e679dbb02a81..d90a276fc0e1 100644
 | 
				
			||||||
--- a/content/browser/compositor/gpu_process_transport_factory.cc
 | 
					--- a/content/browser/compositor/gpu_process_transport_factory.cc
 | 
				
			||||||
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
 | 
					+++ b/content/browser/compositor/gpu_process_transport_factory.cc
 | 
				
			||||||
@@ -495,9 +495,19 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
 | 
					@@ -507,10 +507,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel(
 | 
				
			||||||
         // surfaces as they are not following the correct mode.
 | 
					         // surfaces as they are not following the correct mode.
 | 
				
			||||||
         DisableGpuCompositing(compositor.get());
 | 
					         DisableGpuCompositing(compositor.get());
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
| 
						 | 
					@ -13,18 +13,20 @@ index 7b9fc4114c52..bdbbf93f6f0d 100644
 | 
				
			||||||
+            compositor.get());
 | 
					+            compositor.get());
 | 
				
			||||||
+      }
 | 
					+      }
 | 
				
			||||||
+      if (!output_device) {
 | 
					+      if (!output_device) {
 | 
				
			||||||
+        output_device = CreateSoftwareOutputDevice(compositor->widget());
 | 
					+        output_device = CreateSoftwareOutputDevice(compositor->widget(),
 | 
				
			||||||
 | 
					+                                                   compositor->task_runner());
 | 
				
			||||||
+      }
 | 
					+      }
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
       display_output_surface =
 | 
					       display_output_surface =
 | 
				
			||||||
           std::make_unique<SoftwareBrowserCompositorOutputSurface>(
 | 
					           std::make_unique<SoftwareBrowserCompositorOutputSurface>(
 | 
				
			||||||
-              CreateSoftwareOutputDevice(compositor->widget()),
 | 
					-              CreateSoftwareOutputDevice(compositor->widget(),
 | 
				
			||||||
 | 
					-                                         compositor->task_runner()),
 | 
				
			||||||
+              std::move(output_device),
 | 
					+              std::move(output_device),
 | 
				
			||||||
               std::move(vsync_callback), compositor->task_runner());
 | 
					               std::move(vsync_callback));
 | 
				
			||||||
     } else {
 | 
					     } else {
 | 
				
			||||||
       DCHECK(context_provider);
 | 
					       DCHECK(context_provider);
 | 
				
			||||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
 | 
					diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
 | 
				
			||||||
index d842aa55175b..2c2131774b71 100644
 | 
					index eb250697ebd6..36be87675e9a 100644
 | 
				
			||||||
--- a/ui/compositor/compositor.h
 | 
					--- a/ui/compositor/compositor.h
 | 
				
			||||||
+++ b/ui/compositor/compositor.h
 | 
					+++ b/ui/compositor/compositor.h
 | 
				
			||||||
@@ -24,6 +24,7 @@
 | 
					@@ -24,6 +24,7 @@
 | 
				
			||||||
| 
						 | 
					@ -35,7 +37,7 @@ index d842aa55175b..2c2131774b71 100644
 | 
				
			||||||
 #include "third_party/skia/include/core/SkColor.h"
 | 
					 #include "third_party/skia/include/core/SkColor.h"
 | 
				
			||||||
 #include "third_party/skia/include/core/SkMatrix44.h"
 | 
					 #include "third_party/skia/include/core/SkMatrix44.h"
 | 
				
			||||||
 #include "ui/compositor/compositor_animation_observer.h"
 | 
					 #include "ui/compositor/compositor_animation_observer.h"
 | 
				
			||||||
@@ -182,6 +183,15 @@ class COMPOSITOR_EXPORT ContextFactory {
 | 
					@@ -183,6 +184,15 @@ class COMPOSITOR_EXPORT ContextFactory {
 | 
				
			||||||
   virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
 | 
					   virtual void RemoveObserver(ContextFactoryObserver* observer) = 0;
 | 
				
			||||||
 };
 | 
					 };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -51,7 +53,7 @@ index d842aa55175b..2c2131774b71 100644
 | 
				
			||||||
 // Compositor object to take care of GPU painting.
 | 
					 // Compositor object to take care of GPU painting.
 | 
				
			||||||
 // A Browser compositor object is responsible for generating the final
 | 
					 // A Browser compositor object is responsible for generating the final
 | 
				
			||||||
 // displayable form of pixels comprising a single widget's contents. It draws an
 | 
					 // displayable form of pixels comprising a single widget's contents. It draws an
 | 
				
			||||||
@@ -221,6 +231,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
 | 
					@@ -222,6 +232,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
 | 
				
			||||||
   // Schedules a redraw of the layer tree associated with this compositor.
 | 
					   // Schedules a redraw of the layer tree associated with this compositor.
 | 
				
			||||||
   void ScheduleDraw();
 | 
					   void ScheduleDraw();
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -61,7 +63,7 @@ index d842aa55175b..2c2131774b71 100644
 | 
				
			||||||
   // Sets the root of the layer tree drawn by this Compositor. The root layer
 | 
					   // Sets the root of the layer tree drawn by this Compositor. The root layer
 | 
				
			||||||
   // must have no parent. The compositor's root layer is reset if the root layer
 | 
					   // must have no parent. The compositor's root layer is reset if the root layer
 | 
				
			||||||
   // is destroyed. NULL can be passed to reset the root layer, in which case the
 | 
					   // is destroyed. NULL can be passed to reset the root layer, in which case the
 | 
				
			||||||
@@ -426,6 +439,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
 | 
					@@ -447,6 +460,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
 | 
				
			||||||
   ui::ContextFactory* context_factory_;
 | 
					   ui::ContextFactory* context_factory_;
 | 
				
			||||||
   ui::ContextFactoryPrivate* context_factory_private_;
 | 
					   ui::ContextFactoryPrivate* context_factory_private_;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,12 +1,15 @@
 | 
				
			||||||
diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
 | 
					diff --git a/content/public/app/mojo/content_browser_manifest.json b/content/public/app/mojo/content_browser_manifest.json
 | 
				
			||||||
index 5a217fa9b741..8fd1b39ea6ca 100644
 | 
					index a515b68616a8..dc0431fd17e6 100644
 | 
				
			||||||
--- a/content/public/app/mojo/content_browser_manifest.json
 | 
					--- a/content/public/app/mojo/content_browser_manifest.json
 | 
				
			||||||
+++ b/content/public/app/mojo/content_browser_manifest.json
 | 
					+++ b/content/public/app/mojo/content_browser_manifest.json
 | 
				
			||||||
@@ -82,6 +82,7 @@
 | 
					@@ -90,6 +90,7 @@
 | 
				
			||||||
           "device:battery_monitor",
 | 
					           "device:battery_monitor",
 | 
				
			||||||
           "device:generic_sensor",
 | 
					           "device:generic_sensor",
 | 
				
			||||||
           "device:geolocation",
 | 
					           "device:geolocation",
 | 
				
			||||||
+          "device:geolocation_control",
 | 
					+          "device:geolocation_control",
 | 
				
			||||||
           "device:hid",
 | 
					           "device:hid",
 | 
				
			||||||
           "device:input_service",
 | 
					           "device:input_service",
 | 
				
			||||||
           "device:nfc",
 | 
					           "device:mtp",
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					2.17.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,54 +1,79 @@
 | 
				
			||||||
From 800aa10d300af0f3fe162ae586b6b1ebe0566ab4 Mon Sep 17 00:00:00 2001
 | 
					diff --git a/third_party/crashpad/crashpad/util/net/http_transport.h b/third_party/crashpad/crashpad/util/net/http_transport.h
 | 
				
			||||||
From: Catalin Fratila <catalinf@microsoft.com>
 | 
					index f91a556..acd4e44 100644
 | 
				
			||||||
Date: Fri, 19 May 2017 09:28:53 +0200
 | 
					--- a/third_party/crashpad/crashpad/util/net/http_transport.h
 | 
				
			||||||
Subject: [PATCH] Handle everything not in [200, 300) as error. For example
 | 
					+++ b/third_party/crashpad/crashpad/util/net/http_transport.h
 | 
				
			||||||
 HockeyApp responds with 202.
 | 
					@@ -90,7 +90,7 @@
 | 
				
			||||||
 | 
					   //!     if the response body is not required.
 | 
				
			||||||
 | 
					   //!
 | 
				
			||||||
 | 
					   //! \return Whether or not the request was successful, defined as returning
 | 
				
			||||||
 | 
					-  //!     a HTTP status 200 (OK) code.
 | 
				
			||||||
 | 
					+  //!     a HTTP status code in the range 200-203 (inclusive).
 | 
				
			||||||
 | 
					   virtual bool ExecuteSynchronously(std::string* response_body) = 0;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
(cherry picked from commit f7c320766756a8aaa45ccbcff2945053d9f7e109)
 | 
					  protected:
 | 
				
			||||||
(cherry picked from commit 1875fddc7e671b14d8b54068301d9648d12e9dc2)
 | 
					 | 
				
			||||||
(cherry picked from commit 670fb453b0c3d6ae0a0d5923f68df02464337617)
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc | 2 +-
 | 
					 | 
				
			||||||
 third_party/crashpad/crashpad/util/net/http_transport_mac.mm     | 2 +-
 | 
					 | 
				
			||||||
 third_party/crashpad/crashpad/util/net/http_transport_win.cc     | 2 +-
 | 
					 | 
				
			||||||
 3 files changed, 3 insertions(+), 3 deletions(-)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
 | 
					 | 
				
			||||||
index c16a593..0e262b0 100644
 | 
					 | 
				
			||||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
 | 
					 | 
				
			||||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
 | 
					 | 
				
			||||||
@@ -338,7 +338,7 @@ bool HTTPTransportLibcurl::ExecuteSynchronously(std::string* response_body) {
 | 
					 | 
				
			||||||
     return false;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
-  if (status != 200) {
 | 
					 | 
				
			||||||
+  if (status < 200 || status >= 300) {
 | 
					 | 
				
			||||||
     LOG(ERROR) << base::StringPrintf("HTTP status %ld", status);
 | 
					 | 
				
			||||||
     return false;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
					diff --git a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
				
			||||||
index 8d5f78c..a6434c2 100644
 | 
					index 8d5f78c..a433bb3 100644
 | 
				
			||||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
					--- a/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
				
			||||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
					+++ b/third_party/crashpad/crashpad/util/net/http_transport_mac.mm
 | 
				
			||||||
@@ -293,7 +293,7 @@ static void Unschedule(CFReadStreamRef stream,
 | 
					@@ -293,7 +293,7 @@
 | 
				
			||||||
       return false;
 | 
					       return false;
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
     NSInteger http_status = [http_response statusCode];
 | 
					     NSInteger http_status = [http_response statusCode];
 | 
				
			||||||
-    if (http_status != 200) {
 | 
					-    if (http_status != 200) {
 | 
				
			||||||
+    if (http_status < 200 || http_status >= 300) {
 | 
					+    if (http_status < 200 || http_status > 203) {
 | 
				
			||||||
       LOG(ERROR) << base::StringPrintf("HTTP status %ld",
 | 
					       LOG(ERROR) << base::StringPrintf("HTTP status %ld",
 | 
				
			||||||
                                        implicit_cast<long>(http_status));
 | 
					                                        implicit_cast<long>(http_status));
 | 
				
			||||||
       return false;
 | 
					       return false;
 | 
				
			||||||
 | 
					diff --git a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
 | 
				
			||||||
 | 
					index f0e2dc1..34d8dee 100644
 | 
				
			||||||
 | 
					--- a/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
 | 
				
			||||||
 | 
					+++ b/third_party/crashpad/crashpad/util/net/http_transport_socket.cc
 | 
				
			||||||
 | 
					@@ -457,10 +457,18 @@
 | 
				
			||||||
 | 
					     LOG(ERROR) << "ReadLine";
 | 
				
			||||||
 | 
					     return false;
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					-  static constexpr const char kHttp10[] = "HTTP/1.0 200 ";
 | 
				
			||||||
 | 
					-  static constexpr const char kHttp11[] = "HTTP/1.1 200 ";
 | 
				
			||||||
 | 
					-  return StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
 | 
				
			||||||
 | 
					-         StartsWith(response_line, kHttp11, strlen(kHttp11));
 | 
				
			||||||
 | 
					+  static constexpr const char kHttp10[] = "HTTP/1.0 ";
 | 
				
			||||||
 | 
					+  static constexpr const char kHttp11[] = "HTTP/1.1 ";
 | 
				
			||||||
 | 
					+  if (!(StartsWith(response_line, kHttp10, strlen(kHttp10)) ||
 | 
				
			||||||
 | 
					+        StartsWith(response_line, kHttp11, strlen(kHttp11))) ||
 | 
				
			||||||
 | 
					+      response_line.size() < strlen(kHttp10) + 3 ||
 | 
				
			||||||
 | 
					+      response_line.at(strlen(kHttp10) + 3) != ' ') {
 | 
				
			||||||
 | 
					+    return false;
 | 
				
			||||||
 | 
					+  }
 | 
				
			||||||
 | 
					+  unsigned int http_status = 0;
 | 
				
			||||||
 | 
					+  return base::StringToUint(response_line.substr(strlen(kHttp10), 3),
 | 
				
			||||||
 | 
					+                            &http_status) &&
 | 
				
			||||||
 | 
					+         http_status >= 200 && http_status <= 203;
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 bool ReadResponseHeaders(int sock, HTTPHeaders* headers) {
 | 
				
			||||||
 | 
					diff --git a/third_party/crashpad/crashpad/util/net/http_transport_test.cc b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
 | 
				
			||||||
 | 
					index 7b5f41d..d73dc99 100644
 | 
				
			||||||
 | 
					--- a/third_party/crashpad/crashpad/util/net/http_transport_test.cc
 | 
				
			||||||
 | 
					+++ b/third_party/crashpad/crashpad/util/net/http_transport_test.cc
 | 
				
			||||||
 | 
					@@ -137,7 +137,7 @@
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					     std::string response_body;
 | 
				
			||||||
 | 
					     bool success = transport->ExecuteSynchronously(&response_body);
 | 
				
			||||||
 | 
					-    if (response_code_ == 200) {
 | 
				
			||||||
 | 
					+    if (response_code_ >= 200 && response_code_ <= 203) {
 | 
				
			||||||
 | 
					       EXPECT_TRUE(success);
 | 
				
			||||||
 | 
					       std::string expect_response_body = random_string + "\r\n";
 | 
				
			||||||
 | 
					       EXPECT_EQ(response_body, expect_response_body);
 | 
				
			||||||
diff --git a/third_party/crashpad/crashpad/util/net/http_transport_win.cc b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
					diff --git a/third_party/crashpad/crashpad/util/net/http_transport_win.cc b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
				
			||||||
index 18d343c..40c3061 100644
 | 
					index 18d343c..2919bc1 100644
 | 
				
			||||||
--- a/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
					--- a/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
				
			||||||
+++ b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
					+++ b/third_party/crashpad/crashpad/util/net/http_transport_win.cc
 | 
				
			||||||
@@ -375,7 +375,7 @@ bool HTTPTransportWin::ExecuteSynchronously(std::string* response_body) {
 | 
					@@ -375,7 +375,7 @@
 | 
				
			||||||
     return false;
 | 
					     return false;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
-  if (status_code != 200) {
 | 
					-  if (status_code != 200) {
 | 
				
			||||||
+  if (status_code < 200 || status_code >= 300) {
 | 
					+  if (status_code < 200 || status_code > 203) {
 | 
				
			||||||
     LOG(ERROR) << base::StringPrintf("HTTP status %lu", status_code);
 | 
					     LOG(ERROR) << base::StringPrintf("HTTP status %lu", status_code);
 | 
				
			||||||
     return false;
 | 
					     return false;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/base/logging.h b/base/logging.h
 | 
					diff --git a/base/logging.h b/base/logging.h
 | 
				
			||||||
index 582fb89868cd..24d3e82232b6 100644
 | 
					index 29960599a5c6..7352201e7b66 100644
 | 
				
			||||||
--- a/base/logging.h
 | 
					--- a/base/logging.h
 | 
				
			||||||
+++ b/base/logging.h
 | 
					+++ b/base/logging.h
 | 
				
			||||||
@@ -850,7 +850,7 @@ const LogSeverity LOG_DCHECK = LOG_INFO;
 | 
					@@ -874,7 +874,7 @@ const LogSeverity LOG_DCHECK = LOG_FATAL;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 #else  // !(defined(_PREFAST_) && defined(OS_WIN))
 | 
					 #else  // !(defined(_PREFAST_) && defined(OS_WIN))
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -12,7 +12,7 @@ index 582fb89868cd..24d3e82232b6 100644
 | 
				
			||||||
 #define DCHECK(condition)                                           \
 | 
					 #define DCHECK(condition)                                           \
 | 
				
			||||||
   LAZY_STREAM(LOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
 | 
					   LAZY_STREAM(LOG_STREAM(DCHECK), !ANALYZER_ASSUME_TRUE(condition)) \
 | 
				
			||||||
diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
 | 
					diff --git a/base/memory/weak_ptr.cc b/base/memory/weak_ptr.cc
 | 
				
			||||||
index 8879651e6da7..33fe8948a063 100644
 | 
					index d2a7d89e5667..def40703ea25 100644
 | 
				
			||||||
--- a/base/memory/weak_ptr.cc
 | 
					--- a/base/memory/weak_ptr.cc
 | 
				
			||||||
+++ b/base/memory/weak_ptr.cc
 | 
					+++ b/base/memory/weak_ptr.cc
 | 
				
			||||||
@@ -23,8 +23,8 @@ void WeakReference::Flag::Invalidate() {
 | 
					@@ -23,8 +23,8 @@ void WeakReference::Flag::Invalidate() {
 | 
				
			||||||
| 
						 | 
					@ -27,10 +27,10 @@ index 8879651e6da7..33fe8948a063 100644
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
 | 
					diff --git a/base/process/kill_win.cc b/base/process/kill_win.cc
 | 
				
			||||||
index 6a0038e2c00d..dd00dfb3e5d0 100644
 | 
					index 7a664429bcd3..26f49dc3d1e7 100644
 | 
				
			||||||
--- a/base/process/kill_win.cc
 | 
					--- a/base/process/kill_win.cc
 | 
				
			||||||
+++ b/base/process/kill_win.cc
 | 
					+++ b/base/process/kill_win.cc
 | 
				
			||||||
@@ -45,7 +45,7 @@ TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
 | 
					@@ -23,7 +23,7 @@ TerminationStatus GetTerminationStatus(ProcessHandle handle, int* exit_code) {
 | 
				
			||||||
   DWORD tmp_exit_code = 0;
 | 
					   DWORD tmp_exit_code = 0;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   if (!::GetExitCodeProcess(handle, &tmp_exit_code)) {
 | 
					   if (!::GetExitCodeProcess(handle, &tmp_exit_code)) {
 | 
				
			||||||
| 
						 | 
					@ -39,11 +39,29 @@ index 6a0038e2c00d..dd00dfb3e5d0 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     // This really is a random number.  We haven't received any
 | 
					     // This really is a random number.  We haven't received any
 | 
				
			||||||
     // information about the exit code, presumably because this
 | 
					     // information about the exit code, presumably because this
 | 
				
			||||||
 | 
					diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
 | 
				
			||||||
 | 
					index 18ef58a725c3..239f319c8b4c 100644
 | 
				
			||||||
 | 
					--- a/base/process/process_metrics_win.cc
 | 
				
			||||||
 | 
					+++ b/base/process/process_metrics_win.cc
 | 
				
			||||||
 | 
					@@ -153,10 +153,9 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
 | 
				
			||||||
 | 
					 ProcessMetrics::ProcessMetrics(ProcessHandle process) {
 | 
				
			||||||
 | 
					   if (process) {
 | 
				
			||||||
 | 
					     HANDLE duplicate_handle = INVALID_HANDLE_VALUE;
 | 
				
			||||||
 | 
					-    BOOL result = ::DuplicateHandle(::GetCurrentProcess(), process,
 | 
				
			||||||
 | 
					-                                    ::GetCurrentProcess(), &duplicate_handle,
 | 
				
			||||||
 | 
					-                                    PROCESS_QUERY_INFORMATION, FALSE, 0);
 | 
				
			||||||
 | 
					-    DPCHECK(result);
 | 
				
			||||||
 | 
					+    ::DuplicateHandle(::GetCurrentProcess(), process,
 | 
				
			||||||
 | 
					+                      ::GetCurrentProcess(), &duplicate_handle,
 | 
				
			||||||
 | 
					+                      PROCESS_QUERY_INFORMATION, FALSE, 0);
 | 
				
			||||||
 | 
					     process_.Set(duplicate_handle);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
diff --git a/components/viz/service/display/program_binding.h b/components/viz/service/display/program_binding.h
 | 
					diff --git a/components/viz/service/display/program_binding.h b/components/viz/service/display/program_binding.h
 | 
				
			||||||
index 70f1ff97b1ac..d1abd804e988 100644
 | 
					index 8b28c57f854e..a0e7056af23f 100644
 | 
				
			||||||
--- a/components/viz/service/display/program_binding.h
 | 
					--- a/components/viz/service/display/program_binding.h
 | 
				
			||||||
+++ b/components/viz/service/display/program_binding.h
 | 
					+++ b/components/viz/service/display/program_binding.h
 | 
				
			||||||
@@ -416,7 +416,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
 | 
					@@ -433,7 +433,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
 | 
				
			||||||
     if (!ProgramBindingBase::Init(context_provider->ContextGL(),
 | 
					     if (!ProgramBindingBase::Init(context_provider->ContextGL(),
 | 
				
			||||||
                                   vertex_shader_.GetShaderString(),
 | 
					                                   vertex_shader_.GetShaderString(),
 | 
				
			||||||
                                   fragment_shader_.GetShaderString())) {
 | 
					                                   fragment_shader_.GetShaderString())) {
 | 
				
			||||||
| 
						 | 
					@ -52,7 +70,7 @@ index 70f1ff97b1ac..d1abd804e988 100644
 | 
				
			||||||
       return;
 | 
					       return;
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -428,7 +428,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
 | 
					@@ -445,7 +445,7 @@ class VIZ_SERVICE_EXPORT Program : public ProgramBindingBase {
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     // Link after binding uniforms
 | 
					     // Link after binding uniforms
 | 
				
			||||||
     if (!Link(context_provider->ContextGL())) {
 | 
					     if (!Link(context_provider->ContextGL())) {
 | 
				
			||||||
| 
						 | 
					@ -62,10 +80,10 @@ index 70f1ff97b1ac..d1abd804e988 100644
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
 | 
					diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
 | 
				
			||||||
index ff1d3fcb6eba..ad6578f645d4 100644
 | 
					index 74ff6b4286c2..02bf1c55d86f 100644
 | 
				
			||||||
--- a/content/browser/frame_host/navigation_controller_impl.cc
 | 
					--- a/content/browser/frame_host/navigation_controller_impl.cc
 | 
				
			||||||
+++ b/content/browser/frame_host/navigation_controller_impl.cc
 | 
					+++ b/content/browser/frame_host/navigation_controller_impl.cc
 | 
				
			||||||
@@ -1079,8 +1079,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
 | 
					@@ -1083,8 +1083,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
 | 
				
			||||||
     return NAVIGATION_TYPE_NEW_SUBFRAME;
 | 
					     return NAVIGATION_TYPE_NEW_SUBFRAME;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -78,7 +96,7 @@ index ff1d3fcb6eba..ad6578f645d4 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   if (rfh->GetParent()) {
 | 
					   if (rfh->GetParent()) {
 | 
				
			||||||
     // All manual subframes would be did_create_new_entry and handled above, so
 | 
					     // All manual subframes would be did_create_new_entry and handled above, so
 | 
				
			||||||
@@ -1301,7 +1303,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
 | 
					@@ -1305,7 +1307,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
 | 
				
			||||||
     new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
 | 
					     new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -91,10 +109,10 @@ index ff1d3fcb6eba..ad6578f645d4 100644
 | 
				
			||||||
   // navigation. Now we know that the renderer has updated its state accordingly
 | 
					   // navigation. Now we know that the renderer has updated its state accordingly
 | 
				
			||||||
   // and it is safe to also clear the browser side history.
 | 
					   // and it is safe to also clear the browser side history.
 | 
				
			||||||
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
 | 
					diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
index 346765edaef9..a30e87bfcda6 100644
 | 
					index cd755cbc3f2c..321a12f74202 100644
 | 
				
			||||||
--- a/content/browser/frame_host/render_frame_host_impl.cc
 | 
					--- a/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
+++ b/content/browser/frame_host/render_frame_host_impl.cc
 | 
					+++ b/content/browser/frame_host/render_frame_host_impl.cc
 | 
				
			||||||
@@ -2072,8 +2073,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
 | 
					@@ -2345,8 +2345,10 @@ void RenderFrameHostImpl::AllowBindings(int bindings_flags) {
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   enabled_bindings_ |= bindings_flags;
 | 
					   enabled_bindings_ |= bindings_flags;
 | 
				
			||||||
| 
						 | 
					@ -108,10 +126,10 @@ index 346765edaef9..a30e87bfcda6 100644
 | 
				
			||||||
   if (render_frame_created_) {
 | 
					   if (render_frame_created_) {
 | 
				
			||||||
     if (!frame_bindings_control_)
 | 
					     if (!frame_bindings_control_)
 | 
				
			||||||
diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
					diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
				
			||||||
index 8ee84cdafbde..c7ad6fa8c75f 100644
 | 
					index d86576cc36ac..5b4ae0732914 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
					--- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
				
			||||||
+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
					+++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm
 | 
				
			||||||
@@ -618,8 +618,8 @@ void ExtractUnderlines(NSAttributedString* string,
 | 
					@@ -650,8 +650,8 @@ void ExtractUnderlines(NSAttributedString* string,
 | 
				
			||||||
   if (EventIsReservedBySystem(theEvent))
 | 
					   if (EventIsReservedBySystem(theEvent))
 | 
				
			||||||
     return;
 | 
					     return;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -135,6 +153,19 @@ index f3c68fab3de6..b8609daf3ef9 100644
 | 
				
			||||||
     return;
 | 
					     return;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 | 
					diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
 | 
				
			||||||
 | 
					index ca47b2d09693..b4b6ce96209b 100644
 | 
				
			||||||
 | 
					--- a/third_party/blink/renderer/core/dom/node.cc
 | 
				
			||||||
 | 
					+++ b/third_party/blink/renderer/core/dom/node.cc
 | 
				
			||||||
 | 
					@@ -2535,7 +2535,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 HTMLSlotElement* Node::AssignedSlot() const {
 | 
				
			||||||
 | 
					   // assignedSlot doesn't need to call updateDistribution().
 | 
				
			||||||
 | 
					-  DCHECK(!IsPseudoElement());
 | 
				
			||||||
 | 
					+  // DCHECK(!IsPseudoElement());
 | 
				
			||||||
 | 
					   if (ShadowRoot* root = V1ShadowRootOfParent())
 | 
				
			||||||
 | 
					     return root->AssignedSlotFor(*this);
 | 
				
			||||||
 | 
					   return nullptr;
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/loader/BUILD.gn b/third_party/blink/renderer/core/loader/BUILD.gn
 | 
					diff --git a/third_party/blink/renderer/core/loader/BUILD.gn b/third_party/blink/renderer/core/loader/BUILD.gn
 | 
				
			||||||
index 82f6e8bc9d33..ccad95d61a4a 100644
 | 
					index 82f6e8bc9d33..ccad95d61a4a 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/loader/BUILD.gn
 | 
					--- a/third_party/blink/renderer/core/loader/BUILD.gn
 | 
				
			||||||
| 
						 | 
					@ -151,19 +182,6 @@ index 82f6e8bc9d33..ccad95d61a4a 100644
 | 
				
			||||||
+    defines += [ "ELECTRON_NO_DCHECK" ]
 | 
					+    defines += [ "ELECTRON_NO_DCHECK" ]
 | 
				
			||||||
+  }
 | 
					+  }
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/dom/node.cc b/third_party/blink/renderer/core/dom/node.cc
 | 
					 | 
				
			||||||
index 922a2561bcef..e31fa34f98ea 100644
 | 
					 | 
				
			||||||
--- a/third_party/blink/renderer/core/dom/node.cc
 | 
					 | 
				
			||||||
+++ b/third_party/blink/renderer/core/dom/node.cc
 | 
					 | 
				
			||||||
@@ -2435,7 +2435,7 @@ StaticNodeList* Node::getDestinationInsertionPoints() {
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 HTMLSlotElement* Node::AssignedSlot() const {
 | 
					 | 
				
			||||||
   // assignedSlot doesn't need to call updateDistribution().
 | 
					 | 
				
			||||||
-  DCHECK(!IsPseudoElement());
 | 
					 | 
				
			||||||
+  // DCHECK(!IsPseudoElement());
 | 
					 | 
				
			||||||
   if (ShadowRoot* root = V1ShadowRootOfParent())
 | 
					 | 
				
			||||||
     return root->AssignedSlotFor(*this);
 | 
					 | 
				
			||||||
   return nullptr;
 | 
					 | 
				
			||||||
diff --git a/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
 | 
					diff --git a/third_party/blink/renderer/platform/wtf/text/string_impl.h b/third_party/blink/renderer/platform/wtf/text/string_impl.h
 | 
				
			||||||
index 158d81ca9ba2..1b6aafecadef 100644
 | 
					index 158d81ca9ba2..1b6aafecadef 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/platform/wtf/text/string_impl.h
 | 
					--- a/third_party/blink/renderer/platform/wtf/text/string_impl.h
 | 
				
			||||||
| 
						 | 
					@ -193,26 +211,11 @@ index 158d81ca9ba2..1b6aafecadef 100644
 | 
				
			||||||
     DCHECK(IsStatic() || verifier_.OnDeref(ref_count_))
 | 
					     DCHECK(IsStatic() || verifier_.OnDeref(ref_count_))
 | 
				
			||||||
         << AsciiForDebugging() << " " << CurrentThread();
 | 
					         << AsciiForDebugging() << " " << CurrentThread();
 | 
				
			||||||
 #endif
 | 
					 #endif
 | 
				
			||||||
diff --git a/url/BUILD.gn b/url/BUILD.gn
 | 
					 | 
				
			||||||
index 82eb115ae666..b4806804cdbf 100644
 | 
					 | 
				
			||||||
--- a/url/BUILD.gn
 | 
					 | 
				
			||||||
+++ b/url/BUILD.gn
 | 
					 | 
				
			||||||
@@ -96,6 +96,10 @@ component("url") {
 | 
					 | 
				
			||||||
     ]
 | 
					 | 
				
			||||||
     deps += [ "//third_party/icu" ]
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
+
 | 
					 | 
				
			||||||
+  if (is_electron_build) {
 | 
					 | 
				
			||||||
+    defines += [ "ELECTRON_NO_DCHECK" ]
 | 
					 | 
				
			||||||
+  }
 | 
					 | 
				
			||||||
 }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 if (is_android) {
 | 
					 | 
				
			||||||
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
 | 
					diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
 | 
				
			||||||
index 674b0e9a909c..a1bff6e40f56 100644
 | 
					index e49dd8c81270..9e61c901cd2d 100644
 | 
				
			||||||
--- a/ui/base/clipboard/clipboard_win.cc
 | 
					--- a/ui/base/clipboard/clipboard_win.cc
 | 
				
			||||||
+++ b/ui/base/clipboard/clipboard_win.cc
 | 
					+++ b/ui/base/clipboard/clipboard_win.cc
 | 
				
			||||||
@@ -886,9 +886,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
 | 
					@@ -905,9 +905,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
 | 
					 void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
 | 
				
			||||||
| 
						 | 
					@ -224,49 +227,21 @@ index 674b0e9a909c..a1bff6e40f56 100644
 | 
				
			||||||
     FreeData(format, handle);
 | 
					     FreeData(format, handle);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 diff --git a/third_party/WebKit/Source/core/animation/ElementAnimations.cpp b/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
 | 
					diff --git a/url/BUILD.gn b/url/BUILD.gn
 | 
				
			||||||
 index 60b8123cd818..dc719dd31dbf 100644
 | 
					index c4deb10db9ca..ecc068d7447a 100644
 | 
				
			||||||
 --- a/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
 | 
					--- a/url/BUILD.gn
 | 
				
			||||||
 +++ b/third_party/WebKit/Source/core/animation/ElementAnimations.cpp
 | 
					+++ b/url/BUILD.gn
 | 
				
			||||||
 @@ -108,7 +108,7 @@ void ElementAnimations::UpdateBaseComputedStyle(
 | 
					@@ -98,6 +98,10 @@ component("url") {
 | 
				
			||||||
      base_computed_style_ = nullptr;
 | 
					     ]
 | 
				
			||||||
      return;
 | 
					     deps += [ "//third_party/icu" ]
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 -#if DCHECK_IS_ON()
 | 
					 | 
				
			||||||
 +#if 0
 | 
					 | 
				
			||||||
    if (base_computed_style_ && computed_style)
 | 
					 | 
				
			||||||
      DCHECK(*base_computed_style_ == *computed_style);
 | 
					 | 
				
			||||||
  #endif
 | 
					 | 
				
			||||||
diff --git a/base/process/process_metrics_win.cc b/base/process/process_metrics_win.cc
 | 
					 | 
				
			||||||
index faabdbf63a2a..ba56e4cd994c 100644
 | 
					 | 
				
			||||||
--- a/base/process/process_metrics_win.cc
 | 
					 | 
				
			||||||
+++ b/base/process/process_metrics_win.cc
 | 
					 | 
				
			||||||
@@ -179,10 +179,9 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
 | 
					 | 
				
			||||||
 ProcessMetrics::ProcessMetrics(ProcessHandle process) : last_system_time_(0) {
 | 
					 | 
				
			||||||
   if (process) {
 | 
					 | 
				
			||||||
     HANDLE duplicate_handle = INVALID_HANDLE_VALUE;
 | 
					 | 
				
			||||||
-    BOOL result = ::DuplicateHandle(::GetCurrentProcess(), process,
 | 
					 | 
				
			||||||
-                                    ::GetCurrentProcess(), &duplicate_handle,
 | 
					 | 
				
			||||||
-                                    PROCESS_QUERY_INFORMATION, FALSE, 0);
 | 
					 | 
				
			||||||
-    DPCHECK(result);
 | 
					 | 
				
			||||||
+    ::DuplicateHandle(::GetCurrentProcess(), process,
 | 
					 | 
				
			||||||
+                      ::GetCurrentProcess(), &duplicate_handle,
 | 
					 | 
				
			||||||
+                      PROCESS_QUERY_INFORMATION, FALSE, 0);
 | 
					 | 
				
			||||||
     process_.Set(duplicate_handle);
 | 
					 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 }
 | 
					+
 | 
				
			||||||
diff --git a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
 | 
					+  if (is_electron_build) {
 | 
				
			||||||
index 9477a5aa45f9..895425c8c6cc 100644
 | 
					+    defines += [ "ELECTRON_NO_DCHECK" ]
 | 
				
			||||||
--- a/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
 | 
					+  }
 | 
				
			||||||
+++ b/components/viz/service/display_embedder/server_shared_bitmap_manager.cc
 | 
					 | 
				
			||||||
@@ -69,7 +69,9 @@ base::LazyInstance<ServerSharedBitmapManager>::DestructorAtExit
 | 
					 | 
				
			||||||
 ServerSharedBitmapManager::ServerSharedBitmapManager() = default;
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
 ServerSharedBitmapManager::~ServerSharedBitmapManager() {
 | 
					 | 
				
			||||||
-  DCHECK(handle_map_.empty());
 | 
					 | 
				
			||||||
+  // FIXME(alexeykuzmin): Gets constantly triggered on Windows CI.
 | 
					 | 
				
			||||||
+  // Backporting https://chromium-review.googlesource.com/802574 should help.
 | 
					 | 
				
			||||||
+  // DCHECK(handle_map_.empty());
 | 
					 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 ServerSharedBitmapManager* ServerSharedBitmapManager::current() {
 | 
					 if (is_android) {
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					2.17.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
					diff --git a/ui/views/widget/desktop_aura/desktop_screen_win.cc b/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
				
			||||||
index f772f64..7d13f9f 100644
 | 
					index f772f64d656e..7d13f9f81b6c 100644
 | 
				
			||||||
--- a/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
					--- a/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
				
			||||||
+++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
					+++ b/ui/views/widget/desktop_aura/desktop_screen_win.cc
 | 
				
			||||||
@@ -32,6 +32,8 @@ display::Display DesktopScreenWin::GetDisplayMatching(
 | 
					@@ -32,6 +32,8 @@ display::Display DesktopScreenWin::GetDisplayMatching(
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
 | 
					diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
 | 
				
			||||||
index c8fb7eecb9c8..3d995aa331b1 100644
 | 
					index cadeb2322620..3c5d1afbdfee 100644
 | 
				
			||||||
--- a/ui/views/win/hwnd_message_handler.cc
 | 
					--- a/ui/views/win/hwnd_message_handler.cc
 | 
				
			||||||
+++ b/ui/views/win/hwnd_message_handler.cc
 | 
					+++ b/ui/views/win/hwnd_message_handler.cc
 | 
				
			||||||
@@ -251,6 +251,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
 | 
					@@ -256,6 +256,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 }  // namespace
 | 
					 }  // namespace
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -13,7 +13,7 @@ index c8fb7eecb9c8..3d995aa331b1 100644
 | 
				
			||||||
 // A scoping class that prevents a window from being able to redraw in response
 | 
					 // A scoping class that prevents a window from being able to redraw in response
 | 
				
			||||||
 // to invalidations that may occur within it for the lifetime of the object.
 | 
					 // to invalidations that may occur within it for the lifetime of the object.
 | 
				
			||||||
 //
 | 
					 //
 | 
				
			||||||
@@ -302,6 +306,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
 | 
					@@ -307,6 +311,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
 | 
				
			||||||
         cancel_unlock_(false),
 | 
					         cancel_unlock_(false),
 | 
				
			||||||
         should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
 | 
					         should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
 | 
				
			||||||
                      ::IsWindow(hwnd_) &&
 | 
					                      ::IsWindow(hwnd_) &&
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,7 @@ index c8fb7eecb9c8..3d995aa331b1 100644
 | 
				
			||||||
                      (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
 | 
					                      (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
 | 
				
			||||||
                       !ui::win::IsAeroGlassEnabled())) {
 | 
					                       !ui::win::IsAeroGlassEnabled())) {
 | 
				
			||||||
     if (should_lock_)
 | 
					     if (should_lock_)
 | 
				
			||||||
@@ -903,6 +908,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
 | 
					@@ -898,6 +903,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
 | 
				
			||||||
       hwnd());
 | 
					       hwnd());
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -33,10 +33,10 @@ index c8fb7eecb9c8..3d995aa331b1 100644
 | 
				
			||||||
 // HWNDMessageHandler, gfx::WindowImpl overrides:
 | 
					 // HWNDMessageHandler, gfx::WindowImpl overrides:
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
 | 
					diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
 | 
				
			||||||
index 5d5765c1928e..d77991cfa737 100644
 | 
					index 5afb32aa043c..3d17f29dff9a 100644
 | 
				
			||||||
--- a/ui/views/win/hwnd_message_handler.h
 | 
					--- a/ui/views/win/hwnd_message_handler.h
 | 
				
			||||||
+++ b/ui/views/win/hwnd_message_handler.h
 | 
					+++ b/ui/views/win/hwnd_message_handler.h
 | 
				
			||||||
@@ -227,6 +227,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
 | 
					@@ -177,6 +177,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
 | 
				
			||||||
   typedef std::set<DWORD> TouchIDs;
 | 
					   typedef std::set<DWORD> TouchIDs;
 | 
				
			||||||
   enum class DwmFrameState { OFF, ON };
 | 
					   enum class DwmFrameState { OFF, ON };
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -46,7 +46,7 @@ index 5d5765c1928e..d77991cfa737 100644
 | 
				
			||||||
   HICON GetDefaultWindowIcon() const override;
 | 
					   HICON GetDefaultWindowIcon() const override;
 | 
				
			||||||
   HICON GetSmallWindowIcon() const override;
 | 
					   HICON GetSmallWindowIcon() const override;
 | 
				
			||||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
 | 
					diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
 | 
				
			||||||
index d13f807e4a75..877189d63616 100644
 | 
					index 1b2d98a85738..dd080180aebd 100644
 | 
				
			||||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
 | 
					--- a/ui/views/win/hwnd_message_handler_delegate.h
 | 
				
			||||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
 | 
					+++ b/ui/views/win/hwnd_message_handler_delegate.h
 | 
				
			||||||
@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
 | 
					@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
 | 
					diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc
 | 
				
			||||||
index b44b0fd..a74d827 100644
 | 
					index 838bc1e20c30..2aa16fbf19fc 100644
 | 
				
			||||||
--- a/content/browser/frame_host/render_frame_proxy_host.cc
 | 
					--- a/content/browser/frame_host/render_frame_proxy_host.cc
 | 
				
			||||||
+++ b/content/browser/frame_host/render_frame_proxy_host.cc
 | 
					+++ b/content/browser/frame_host/render_frame_proxy_host.cc
 | 
				
			||||||
@@ -253,6 +253,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
 | 
					@@ -260,6 +260,12 @@ void RenderFrameProxyHost::SetDestructionCallback(
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 void RenderFrameProxyHost::OnDetach() {
 | 
					 void RenderFrameProxyHost::OnDetach() {
 | 
				
			||||||
   if (frame_tree_node_->render_manager()->ForInnerDelegate()) {
 | 
					   if (frame_tree_node_->render_manager()->ForInnerDelegate()) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,14 +39,15 @@ index b480129fcd7c..4f4f7d06029b 100644
 | 
				
			||||||
+  }
 | 
					+  }
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 | 
					diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
 | 
				
			||||||
index 72dde06a99a7..e00d6b863b84 100644
 | 
					index c514878fafe7..bcd3432f75c9 100644
 | 
				
			||||||
--- a/chrome/browser/ui/BUILD.gn
 | 
					--- a/chrome/browser/ui/BUILD.gn
 | 
				
			||||||
+++ b/chrome/browser/ui/BUILD.gn
 | 
					+++ b/chrome/browser/ui/BUILD.gn
 | 
				
			||||||
@@ -2496,7 +2496,9 @@ split_static_library("ui") {
 | 
					@@ -2495,7 +2495,10 @@ split_static_library("ui") {
 | 
				
			||||||
         ]
 | 
					         "views/tabs/window_finder_mac.mm",
 | 
				
			||||||
       }
 | 
					       ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-      deps += [ "//extensions/components/native_app_window" ]
 | 
					-      deps += [ "//extensions/components/native_app_window" ]
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
+      if (enable_extensions) {
 | 
					+      if (enable_extensions) {
 | 
				
			||||||
+        deps += [ "//extensions/components/native_app_window" ]
 | 
					+        deps += [ "//extensions/components/native_app_window" ]
 | 
				
			||||||
+      }
 | 
					+      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
index 77c870b8a075..f1c4076788c5 100644
 | 
					index 213f32e0891f..60cfacdcf9fc 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					--- a/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					+++ b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
@@ -664,6 +664,9 @@ void RenderWidgetHostImpl::WasHidden() {
 | 
					@@ -668,6 +668,9 @@ void RenderWidgetHostImpl::WasHidden() {
 | 
				
			||||||
   if (is_hidden_)
 | 
					   if (is_hidden_)
 | 
				
			||||||
     return;
 | 
					     return;
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -13,10 +13,10 @@ index 77c870b8a075..f1c4076788c5 100644
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
 | 
					   TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
 | 
				
			||||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
 | 
					diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
 | 
				
			||||||
index b6aa99e..ef4fa35 100644
 | 
					index 316385180c60..afce0525e89d 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
 | 
					--- a/content/browser/renderer_host/render_widget_host_impl.h
 | 
				
			||||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
 | 
					+++ b/content/browser/renderer_host/render_widget_host_impl.h
 | 
				
			||||||
@@ -124,6 +124,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl : public RenderWidgetHost,
 | 
					@@ -149,6 +149,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
 | 
				
			||||||
   // RenderWidgetHostImpl.
 | 
					   // RenderWidgetHostImpl.
 | 
				
			||||||
   static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
 | 
					   static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,21 +1,21 @@
 | 
				
			||||||
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
					diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
				
			||||||
index 5d5bead..f2ac4d8 100644
 | 
					index c3f4641e8525..dd50ff1c2557 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
					--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
				
			||||||
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
					+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc
 | 
				
			||||||
@@ -339,7 +339,7 @@ void MouseWheelEventQueue::SendScrollBegin(
 | 
					@@ -362,7 +362,7 @@ void MouseWheelEventQueue::SendScrollBegin(
 | 
				
			||||||
          (synthetic && !needs_scroll_begin_when_scroll_latching_disabled_) ||
 | 
					          (synthetic && !needs_scroll_begin_when_scroll_latching_disabled_) ||
 | 
				
			||||||
          needs_scroll_begin_when_scroll_latching_disabled_);
 | 
					          needs_scroll_begin_when_scroll_latching_disabled_);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
-  DCHECK(!scroll_in_progress_);
 | 
					-  DCHECK(!client_->IsWheelScrollInProgress());
 | 
				
			||||||
+  // DCHECK(!scroll_in_progress_);
 | 
					+  // DCHECK(!client_->IsWheelScrollInProgress());
 | 
				
			||||||
   scroll_in_progress_ = true;
 | 
					 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
   WebGestureEvent scroll_begin(gesture_update);
 | 
					   WebGestureEvent scroll_begin(gesture_update);
 | 
				
			||||||
 | 
					   scroll_begin.SetType(WebInputEvent::kGestureScrollBegin);
 | 
				
			||||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
index 97ca37d843be..fdc4a3f90c64 100644
 | 
					index 9b930b8acd1d..f3d356f86f15 100644
 | 
				
			||||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					--- a/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
					+++ b/content/browser/renderer_host/render_widget_host_impl.cc
 | 
				
			||||||
@@ -1230,8 +1238,8 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo(
 | 
					@@ -1263,8 +1263,8 @@ void RenderWidgetHostImpl::ForwardGestureEventWithLatencyInfo(
 | 
				
			||||||
     // GSB and GSU events instead of sending them to the renderer and continues
 | 
					     // GSB and GSU events instead of sending them to the renderer and continues
 | 
				
			||||||
     // to progress the fling. So, the renderer doesn't receive two GSB events
 | 
					     // to progress the fling. So, the renderer doesn't receive two GSB events
 | 
				
			||||||
     // without any GSE in between.
 | 
					     // without any GSE in between.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
 | 
					diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
 | 
				
			||||||
index a39067db8c52..4a0d69dc3fb5 100644
 | 
					index 9abb526ef011..296abf0a1b93 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/core/dom/document.cc
 | 
					--- a/third_party/blink/renderer/core/dom/document.cc
 | 
				
			||||||
+++ b/third_party/blink/renderer/core/dom/document.cc
 | 
					+++ b/third_party/blink/renderer/core/dom/document.cc
 | 
				
			||||||
@@ -3239,7 +3239,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
 | 
					@@ -3442,7 +3442,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client,
 | 
				
			||||||
         "Blocked attempt to show a 'beforeunload' confirmation panel for a "
 | 
					         "Blocked attempt to show a 'beforeunload' confirmation panel for a "
 | 
				
			||||||
         "frame that never had a user gesture since its load. "
 | 
					         "frame that never had a user gesture since its load. "
 | 
				
			||||||
         "https://www.chromestatus.com/feature/5082396709879808"));
 | 
					         "https://www.chromestatus.com/feature/5082396709879808"));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,22 @@
 | 
				
			||||||
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
 | 
					diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
 | 
				
			||||||
index 9173f6f0324c..8f976057d5d9 100644
 | 
					index 05177001104e..5b5e00e9ef2d 100644
 | 
				
			||||||
--- a/third_party/blink/renderer/platform/BUILD.gn
 | 
					--- a/third_party/blink/renderer/platform/BUILD.gn
 | 
				
			||||||
+++ b/third_party/blink/renderer/platform/BUILD.gn
 | 
					+++ b/third_party/blink/renderer/platform/BUILD.gn
 | 
				
			||||||
@@ -1819,7 +1819,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
 | 
					@@ -1797,7 +1797,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
 | 
				
			||||||
     "graphics/accelerated_static_bitmap_image_test.cc",
 | 
					 | 
				
			||||||
     "graphics/bitmap_image_test.cc",
 | 
					 | 
				
			||||||
     "graphics/compositing/chunk_to_layer_mapper_test.cc",
 | 
					     "graphics/compositing/chunk_to_layer_mapper_test.cc",
 | 
				
			||||||
-    "graphics/compositing/composited_layer_raster_invalidator_test.cc",
 | 
					     "graphics/compositing/composited_layer_raster_invalidator_test.cc",
 | 
				
			||||||
+    #"graphics/compositing/composited_layer_raster_invalidator_test.cc",
 | 
					 | 
				
			||||||
     "graphics/compositing/paint_artifact_compositor_test.cc",
 | 
					     "graphics/compositing/paint_artifact_compositor_test.cc",
 | 
				
			||||||
     "graphics/compositing/paint_chunks_to_cc_layer_test.cc",
 | 
					-    "graphics/compositing/paint_chunks_to_cc_layer_test.cc",
 | 
				
			||||||
 | 
					+    # "graphics/compositing/paint_chunks_to_cc_layer_test.cc",
 | 
				
			||||||
     "graphics/compositor_element_id_test.cc",
 | 
					     "graphics/compositor_element_id_test.cc",
 | 
				
			||||||
@@ -1839,7 +1839,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
 | 
					     "graphics/contiguous_container_test.cc",
 | 
				
			||||||
     "graphics/paint/drawing_display_item_test.cc",
 | 
					     "graphics/decoding_image_generator_test.cc",
 | 
				
			||||||
     "graphics/paint/drawing_recorder_test.cc",
 | 
					@@ -1873,7 +1873,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
 | 
				
			||||||
     "graphics/paint/float_clip_rect_test.cc",
 | 
					     "text/date_time_format_test.cc",
 | 
				
			||||||
-    "graphics/paint/geometry_mapper_test.cc",
 | 
					     "text/hyphenation_test.cc",
 | 
				
			||||||
+    #"graphics/paint/geometry_mapper_test.cc",
 | 
					     "text/icu_error_test.cc",
 | 
				
			||||||
     "graphics/paint/paint_chunk_test.cc",
 | 
					-    "text/line_ending_test.cc",
 | 
				
			||||||
     "graphics/paint/paint_chunker_test.cc",
 | 
					+    # "text/line_ending_test.cc",
 | 
				
			||||||
     "graphics/paint/paint_controller_test.cc",
 | 
					     "text/platform_locale_test.cc",
 | 
				
			||||||
 | 
					     "text/segmented_string_test.cc",
 | 
				
			||||||
 | 
					     "text/suffix_tree_test.cc",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										30
									
								
								patches/common/chromium/expose-net-observer-api.patch
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								patches/common/chromium/expose-net-observer-api.patch
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,30 @@
 | 
				
			||||||
 | 
					From f9178257245c16180336ff06debc6778d80b0975 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Jeremy Apthorp <nornagon@nornagon.net>
 | 
				
			||||||
 | 
					Date: Mon, 1 Oct 2018 12:16:41 -0700
 | 
				
			||||||
 | 
					Subject: Expose URLRequestContextGetter::{Add,Remove}Observer
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
 | 
				
			||||||
 | 
					index 7a2dcd9de423..494526c843b9 100644
 | 
				
			||||||
 | 
					--- a/net/url_request/url_request_context_getter.h
 | 
				
			||||||
 | 
					+++ b/net/url_request/url_request_context_getter.h
 | 
				
			||||||
 | 
					@@ -79,11 +79,16 @@ class NET_EXPORT URLRequestContextGetter
 | 
				
			||||||
 | 
					   friend class web::NetworkContextOwner;
 | 
				
			||||||
 | 
					 #endif  // defined(OS_IOS)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+  // NOTE(nornagon/robo): electron currently depends on this deprecated API
 | 
				
			||||||
 | 
					+  // from net/, but will be removing it soon when we switch to using the
 | 
				
			||||||
 | 
					+  // network service.
 | 
				
			||||||
 | 
					+ public:
 | 
				
			||||||
 | 
					   // Adds / removes an observer to watch for shutdown of |this|'s context. Must
 | 
				
			||||||
 | 
					   // only be called on network thread. May not be called once
 | 
				
			||||||
 | 
					   // GetURLRequestContext() starts returning nullptr.
 | 
				
			||||||
 | 
					   void AddObserver(URLRequestContextGetterObserver* observer);
 | 
				
			||||||
 | 
					   void RemoveObserver(URLRequestContextGetterObserver* observer);
 | 
				
			||||||
 | 
					+ private:
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					   // OnDestruct is used to ensure deletion on the thread on which the request
 | 
				
			||||||
 | 
					   // IO happens.
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					2.17.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
 | 
					diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
 | 
				
			||||||
index e6f6b3012b02..965b58e237ec 100644
 | 
					index b682235b0f87..0c88f4bf86b6 100644
 | 
				
			||||||
--- a/content/browser/frame_host/render_frame_host_manager.cc
 | 
					--- a/content/browser/frame_host/render_frame_host_manager.cc
 | 
				
			||||||
+++ b/content/browser/frame_host/render_frame_host_manager.cc
 | 
					+++ b/content/browser/frame_host/render_frame_host_manager.cc
 | 
				
			||||||
@@ -1834,6 +1834,18 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
					@@ -1912,6 +1912,18 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
				
			||||||
   bool was_server_redirect = request.navigation_handle() &&
 | 
					   bool was_server_redirect = request.navigation_handle() &&
 | 
				
			||||||
                              request.navigation_handle()->WasServerRedirect();
 | 
					                              request.navigation_handle()->WasServerRedirect();
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -21,8 +21,8 @@ index e6f6b3012b02..965b58e237ec 100644
 | 
				
			||||||
   if (frame_tree_node_->IsMainFrame()) {
 | 
					   if (frame_tree_node_->IsMainFrame()) {
 | 
				
			||||||
     // Renderer-initiated main frame navigations that may require a
 | 
					     // Renderer-initiated main frame navigations that may require a
 | 
				
			||||||
     // SiteInstance swap are sent to the browser via the OpenURL IPC and are
 | 
					     // SiteInstance swap are sent to the browser via the OpenURL IPC and are
 | 
				
			||||||
@@ -1850,6 +1862,19 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
					@@ -1931,6 +1943,19 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
				
			||||||
 
 | 
					                                                request.common_params().url));
 | 
				
			||||||
     no_renderer_swap_allowed |=
 | 
					     no_renderer_swap_allowed |=
 | 
				
			||||||
         request.from_begin_navigation() && !can_renderer_initiate_transfer;
 | 
					         request.from_begin_navigation() && !can_renderer_initiate_transfer;
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ index e6f6b3012b02..965b58e237ec 100644
 | 
				
			||||||
   } else {
 | 
					   } else {
 | 
				
			||||||
     // Subframe navigations will use the current renderer, unless specifically
 | 
					     // Subframe navigations will use the current renderer, unless specifically
 | 
				
			||||||
     // allowed to swap processes.
 | 
					     // allowed to swap processes.
 | 
				
			||||||
@@ -1861,18 +1886,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
					@@ -1942,18 +1967,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
 | 
				
			||||||
   if (no_renderer_swap_allowed)
 | 
					   if (no_renderer_swap_allowed)
 | 
				
			||||||
     return scoped_refptr<SiteInstance>(current_site_instance);
 | 
					     return scoped_refptr<SiteInstance>(current_site_instance);
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					@ -59,13 +59,13 @@ index e6f6b3012b02..965b58e237ec 100644
 | 
				
			||||||
-      request.dest_site_instance(), candidate_site_instance,
 | 
					-      request.dest_site_instance(), candidate_site_instance,
 | 
				
			||||||
+      request.dest_site_instance(), candidate_site_instance.get(),
 | 
					+      request.dest_site_instance(), candidate_site_instance.get(),
 | 
				
			||||||
       request.common_params().transition,
 | 
					       request.common_params().transition,
 | 
				
			||||||
 | 
					       request.state() == NavigationRequest::FAILED,
 | 
				
			||||||
       request.restore_type() != RestoreType::NONE, request.is_view_source(),
 | 
					       request.restore_type() != RestoreType::NONE, request.is_view_source(),
 | 
				
			||||||
       was_server_redirect);
 | 
					 | 
				
			||||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
 | 
					diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
 | 
				
			||||||
index 746760e8596c..99d9e0770f32 100644
 | 
					index 3ca627448e33..7d0c9ed7e1af 100644
 | 
				
			||||||
--- a/content/public/browser/content_browser_client.h
 | 
					--- a/content/public/browser/content_browser_client.h
 | 
				
			||||||
+++ b/content/public/browser/content_browser_client.h
 | 
					+++ b/content/public/browser/content_browser_client.h
 | 
				
			||||||
@@ -181,6 +181,15 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
					@@ -186,6 +186,15 @@ class CONTENT_EXPORT ContentBrowserClient {
 | 
				
			||||||
  public:
 | 
					  public:
 | 
				
			||||||
   virtual ~ContentBrowserClient() {}
 | 
					   virtual ~ContentBrowserClient() {}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
 | 
					diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
 | 
				
			||||||
index 56402d477ca3..8ab11bd18783 100644
 | 
					index 076d137eb7cf..c10c3b0be66b 100644
 | 
				
			||||||
--- a/gin/isolate_holder.cc
 | 
					--- a/gin/isolate_holder.cc
 | 
				
			||||||
+++ b/gin/isolate_holder.cc
 | 
					+++ b/gin/isolate_holder.cc
 | 
				
			||||||
@@ -116,9 +116,10 @@ IsolateHolder::~IsolateHolder() {
 | 
					@@ -119,9 +119,10 @@ IsolateHolder::~IsolateHolder() {
 | 
				
			||||||
 void IsolateHolder::Initialize(ScriptMode mode,
 | 
					 void IsolateHolder::Initialize(ScriptMode mode,
 | 
				
			||||||
                                V8ExtrasMode v8_extras_mode,
 | 
					                                V8ExtrasMode v8_extras_mode,
 | 
				
			||||||
                                v8::ArrayBuffer::Allocator* allocator,
 | 
					                                v8::ArrayBuffer::Allocator* allocator,
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ index 2509aca609f9..94003c6031cf 100644
 | 
				
			||||||
   v8::Isolate* isolate() { return isolate_; }
 | 
					   v8::Isolate* isolate() { return isolate_; }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
 | 
					diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
 | 
				
			||||||
index 02d4b1cd6521..ec6d51d7e5d8 100644
 | 
					index be2b9149e440..816e56aa4f6b 100644
 | 
				
			||||||
--- a/gin/v8_initializer.cc
 | 
					--- a/gin/v8_initializer.cc
 | 
				
			||||||
+++ b/gin/v8_initializer.cc
 | 
					+++ b/gin/v8_initializer.cc
 | 
				
			||||||
@@ -236,12 +236,14 @@ LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
 | 
					@@ -236,12 +236,14 @@ LoadV8FileResult MapOpenedFile(const OpenedFileMap::mapped_type& file_region,
 | 
				
			||||||
| 
						 | 
					@ -51,7 +51,7 @@ index 02d4b1cd6521..ec6d51d7e5d8 100644
 | 
				
			||||||
   if (base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
 | 
					   if (base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) {
 | 
				
			||||||
     static const char optimize[] = "--opt";
 | 
					     static const char optimize[] = "--opt";
 | 
				
			||||||
diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
 | 
					diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h
 | 
				
			||||||
index f0a7c5e0fb68..df4ab4f3e4b9 100644
 | 
					index 6f3265ba4d06..29f28bebbdcd 100644
 | 
				
			||||||
--- a/gin/v8_initializer.h
 | 
					--- a/gin/v8_initializer.h
 | 
				
			||||||
+++ b/gin/v8_initializer.h
 | 
					+++ b/gin/v8_initializer.h
 | 
				
			||||||
@@ -21,7 +21,8 @@ class GIN_EXPORT V8Initializer {
 | 
					@@ -21,7 +21,8 @@ class GIN_EXPORT V8Initializer {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,11 +1,11 @@
 | 
				
			||||||
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
 | 
					diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
 | 
				
			||||||
index eb75461..2116f93 100644
 | 
					index deae4d3455a8..fd5d906b98b0 100644
 | 
				
			||||||
--- a/build/config/linux/gtk/BUILD.gn
 | 
					--- a/build/config/linux/gtk/BUILD.gn
 | 
				
			||||||
+++ b/build/config/linux/gtk/BUILD.gn
 | 
					+++ b/build/config/linux/gtk/BUILD.gn
 | 
				
			||||||
@@ -17,6 +17,8 @@ assert(is_linux, "This file should only be referenced on Linux")
 | 
					@@ -18,6 +18,8 @@ group("gtk") {
 | 
				
			||||||
 group("gtk") {
 | 
					 | 
				
			||||||
   visibility = [
 | 
					   visibility = [
 | 
				
			||||||
     "//chrome/test:interactive_ui_tests",
 | 
					     "//chrome/test:interactive_ui_tests",
 | 
				
			||||||
 | 
					     "//chrome/test:unit_tests",
 | 
				
			||||||
+    "//electron:*",
 | 
					+    "//electron:*",
 | 
				
			||||||
+    "//electron/brightray:*",
 | 
					+    "//electron/brightray:*",
 | 
				
			||||||
     "//examples:peerconnection_client",
 | 
					     "//examples:peerconnection_client",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +1,8 @@
 | 
				
			||||||
diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
 | 
					diff --git a/build/toolchain/win/tool_wrapper.py b/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
index a76e926a8681..c43839a01211 100644
 | 
					index 801d7a9b8e03..7b54f8dceb36 100644
 | 
				
			||||||
--- a/build/toolchain/win/tool_wrapper.py
 | 
					--- a/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
+++ b/build/toolchain/win/tool_wrapper.py
 | 
					+++ b/build/toolchain/win/tool_wrapper.py
 | 
				
			||||||
@@ -258,7 +258,11 @@ class WinTool(object):
 | 
					@@ -254,7 +254,11 @@ class WinTool(object):
 | 
				
			||||||
       if rc_exe_exit_code == 0:
 | 
					       if rc_exe_exit_code == 0:
 | 
				
			||||||
         import filecmp
 | 
					         import filecmp
 | 
				
			||||||
         # Strip "/fo" prefix.
 | 
					         # Strip "/fo" prefix.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
diff --git a/third_party/leveldatabase/port/port_chromium.h b/third_party/leveldatabase/port/port_chromium.h
 | 
					diff --git a/third_party/leveldatabase/port/port_chromium.h b/third_party/leveldatabase/port/port_chromium.h
 | 
				
			||||||
index a7c449eba19c..acbce7efd582 100644
 | 
					index a7c449eba19c..acbce7efd582 100644
 | 
				
			||||||
--- a/third_party/leveldatabase/port/port_chromium.h
 | 
					--- a/third_party/leveldatabase/port/port_chromium.h
 | 
				
			||||||
+++ b/third_party/leveldatabase/port/port_chromium.h
 | 
					+++ b/third_party/leveldatabase/port/port_chromium.h
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon.h b/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
					diff --git a/chrome/browser/ui/libgtkui/app_indicator_icon.h b/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
				
			||||||
index 7815fbb..f17a5c5 100644
 | 
					index 7815fbb2cea8..f17a5c59e64b 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
					--- a/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
					+++ b/chrome/browser/ui/libgtkui/app_indicator_icon.h
 | 
				
			||||||
@@ -12,6 +12,7 @@
 | 
					@@ -12,6 +12,7 @@
 | 
				
			||||||
| 
						 | 
					@ -20,7 +20,7 @@ index 7815fbb..f17a5c5 100644
 | 
				
			||||||
   // The id uniquely identifies the new status icon from other chrome status
 | 
					   // The id uniquely identifies the new status icon from other chrome status
 | 
				
			||||||
   // icons.
 | 
					   // icons.
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/gtk_status_icon.h b/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
					diff --git a/chrome/browser/ui/libgtkui/gtk_status_icon.h b/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
				
			||||||
index e4e0da4..af02871 100644
 | 
					index e4e0da40981c..af028715ada9 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
					--- a/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
					+++ b/chrome/browser/ui/libgtkui/gtk_status_icon.h
 | 
				
			||||||
@@ -10,6 +10,7 @@
 | 
					@@ -10,6 +10,7 @@
 | 
				
			||||||
| 
						 | 
					@ -41,7 +41,7 @@ index e4e0da4..af02871 100644
 | 
				
			||||||
   Gtk2StatusIcon(const gfx::ImageSkia& image, const base::string16& tool_tip);
 | 
					   Gtk2StatusIcon(const gfx::ImageSkia& image, const base::string16& tool_tip);
 | 
				
			||||||
   ~Gtk2StatusIcon() override;
 | 
					   ~Gtk2StatusIcon() override;
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
 | 
					diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
 | 
				
			||||||
index 665ec57..4ccb088 100644
 | 
					index 665ec57c09d5..4ccb08807fb4 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/gtk_util.h
 | 
					--- a/chrome/browser/ui/libgtkui/gtk_util.h
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/gtk_util.h
 | 
					+++ b/chrome/browser/ui/libgtkui/gtk_util.h
 | 
				
			||||||
@@ -11,6 +11,7 @@
 | 
					@@ -11,6 +11,7 @@
 | 
				
			||||||
| 
						 | 
					@ -84,7 +84,7 @@ index 665ec57..4ccb088 100644
 | 
				
			||||||
 // Renders the border from the style context created by
 | 
					 // Renders the border from the style context created by
 | 
				
			||||||
 // GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
 | 
					 // GetStyleContextFromCss(|css_selector|) into a 24x24 bitmap and
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/skia_utils_gtk.h b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
					diff --git a/chrome/browser/ui/libgtkui/skia_utils_gtk.h b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
				
			||||||
index e05fbe9..3afca9a 100644
 | 
					index e05fbe9d8b2f..3afca9a72ab6 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
					--- a/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
					+++ b/chrome/browser/ui/libgtkui/skia_utils_gtk.h
 | 
				
			||||||
@@ -7,6 +7,7 @@
 | 
					@@ -7,6 +7,7 @@
 | 
				
			||||||
| 
						 | 
					@ -105,7 +105,7 @@ index e05fbe9..3afca9a 100644
 | 
				
			||||||
 }  // namespace libgtkui
 | 
					 }  // namespace libgtkui
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
diff --git a/chrome/browser/ui/libgtkui/unity_service.h b/chrome/browser/ui/libgtkui/unity_service.h
 | 
					diff --git a/chrome/browser/ui/libgtkui/unity_service.h b/chrome/browser/ui/libgtkui/unity_service.h
 | 
				
			||||||
index 8d67e14..95fbb27 100644
 | 
					index 8d67e1460837..95fbb27b6a81 100644
 | 
				
			||||||
--- a/chrome/browser/ui/libgtkui/unity_service.h
 | 
					--- a/chrome/browser/ui/libgtkui/unity_service.h
 | 
				
			||||||
+++ b/chrome/browser/ui/libgtkui/unity_service.h
 | 
					+++ b/chrome/browser/ui/libgtkui/unity_service.h
 | 
				
			||||||
@@ -5,18 +5,20 @@
 | 
					@@ -5,18 +5,20 @@
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,17 +1,8 @@
 | 
				
			||||||
From d322e351554a4fa1fbaf529769416041031f07e9 Mon Sep 17 00:00:00 2001
 | 
					 | 
				
			||||||
From: Jeremy Apthorp <jeremya@chromium.org>
 | 
					 | 
				
			||||||
Date: Mon, 6 Aug 2018 13:02:53 -0700
 | 
					 | 
				
			||||||
Subject: fix: [mas] don't call private api AudioDeviceDuck
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 media/audio/mac/audio_low_latency_input_mac.cc | 4 ++++
 | 
					 | 
				
			||||||
 1 file changed, 4 insertions(+)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
 | 
					diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
 | 
				
			||||||
index 173167b54dfb..1c0fda354d03 100644
 | 
					index 53586b888d82..c1d750dbf32d 100644
 | 
				
			||||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
 | 
					--- a/media/audio/mac/audio_low_latency_input_mac.cc
 | 
				
			||||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
 | 
					+++ b/media/audio/mac/audio_low_latency_input_mac.cc
 | 
				
			||||||
@@ -28,12 +28,14 @@
 | 
					@@ -31,19 +31,23 @@
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 namespace {
 | 
					 namespace {
 | 
				
			||||||
 extern "C" {
 | 
					 extern "C" {
 | 
				
			||||||
| 
						 | 
					@ -25,23 +16,16 @@ index 173167b54dfb..1c0fda354d03 100644
 | 
				
			||||||
+#endif
 | 
					+#endif
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 }  // namespace
 | 
					 void UndoDucking(AudioDeviceID output_device_id) {
 | 
				
			||||||
@@ -604,6 +606,7 @@ bool AUAudioInputStream::OpenVoiceProcessingAU() {
 | 
					 | 
				
			||||||
     return false;
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
 
 | 
					 | 
				
			||||||
+#ifndef MAS_BUILD
 | 
					+#ifndef MAS_BUILD
 | 
				
			||||||
   if (AudioDeviceDuck != nullptr) {
 | 
					   if (AudioDeviceDuck != nullptr) {
 | 
				
			||||||
     // Undo the ducking.
 | 
					     // Ramp the volume back up over half a second.
 | 
				
			||||||
     // Obtain the AudioDeviceID of the default output AudioDevice.
 | 
					     AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
 | 
				
			||||||
@@ -619,6 +622,7 @@ bool AUAudioInputStream::OpenVoiceProcessingAU() {
 | 
					 | 
				
			||||||
       AudioDeviceDuck(output_device, 1.0, nullptr, 0.5);
 | 
					 | 
				
			||||||
     }
 | 
					 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
+#endif
 | 
					+#endif
 | 
				
			||||||
 
 | 
					 | 
				
			||||||
   return true;
 | 
					 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 }  // namespace
 | 
				
			||||||
-- 
 | 
					-- 
 | 
				
			||||||
2.17.0
 | 
					2.17.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,25 +1,16 @@
 | 
				
			||||||
From 9fb1ac04b1a3e7ec53e27cf1f413469d04360d1e Mon Sep 17 00:00:00 2001
 | 
					 | 
				
			||||||
From: Jeremy Apthorp <jeremya@chromium.org>
 | 
					 | 
				
			||||||
Date: Mon, 6 Aug 2018 17:11:14 -0700
 | 
					 | 
				
			||||||
Subject: fix: [mas] remove usage of _CFIsObjC
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 base/mac/foundation_util.mm | 7 +------
 | 
					 | 
				
			||||||
 1 file changed, 1 insertion(+), 6 deletions(-)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
 | 
					diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
 | 
				
			||||||
index aec8c0f6398c..6a6dfc272d45 100644
 | 
					index 15fc15ba307e..7ca4e0ec5ca8 100644
 | 
				
			||||||
--- a/base/mac/foundation_util.mm
 | 
					--- a/base/mac/foundation_util.mm
 | 
				
			||||||
+++ b/base/mac/foundation_util.mm
 | 
					+++ b/base/mac/foundation_util.mm
 | 
				
			||||||
@@ -25,7 +25,6 @@
 | 
					@@ -26,7 +26,6 @@ CFTypeID SecKeyGetTypeID();
 | 
				
			||||||
 extern "C" {
 | 
					 #if !defined(OS_IOS)
 | 
				
			||||||
 CFTypeID SecACLGetTypeID();
 | 
					 CFTypeID SecACLGetTypeID();
 | 
				
			||||||
 CFTypeID SecTrustedApplicationGetTypeID();
 | 
					 CFTypeID SecTrustedApplicationGetTypeID();
 | 
				
			||||||
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
 | 
					-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
 | 
				
			||||||
 }  // extern "C"
 | 
					 | 
				
			||||||
 #endif
 | 
					 #endif
 | 
				
			||||||
 | 
					 }  // extern "C"
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -323,8 +322,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
 | 
					@@ -325,8 +324,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
 | 
				
			||||||
       const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
 | 
					       const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
 | 
				
			||||||
   DCHECK(!cf_val ||
 | 
					   DCHECK(!cf_val ||
 | 
				
			||||||
          CTFontGetTypeID() == CFGetTypeID(cf_val) ||
 | 
					          CTFontGetTypeID() == CFGetTypeID(cf_val) ||
 | 
				
			||||||
| 
						 | 
					@ -29,7 +20,7 @@ index aec8c0f6398c..6a6dfc272d45 100644
 | 
				
			||||||
   return ns_val;
 | 
					   return ns_val;
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
@@ -392,9 +390,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
 | 
					@@ -394,9 +392,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
 | 
				
			||||||
     return (CTFontRef)(cf_val);
 | 
					     return (CTFontRef)(cf_val);
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,11 @@
 | 
				
			||||||
From 82d0ef64e22c69c0435608276149977d2811a3f7 Mon Sep 17 00:00:00 2001
 | 
					From 0680698be349b3619561c65eb072d9880e405fae Mon Sep 17 00:00:00 2001
 | 
				
			||||||
From: Jeremy Apthorp <nornagon@nornagon.net>
 | 
					From: Jeremy Apthorp <nornagon@nornagon.net>
 | 
				
			||||||
Date: Mon, 6 Aug 2018 10:58:46 -0700
 | 
					Date: Fri, 14 Sep 2018 09:53:11 -0700
 | 
				
			||||||
Subject: fix: [mas] remove usage of CGDisplayUsesForceToGray
 | 
					Subject: apply patch: mas-cgdisplayusesforcetogray
 | 
				
			||||||
 | 
					
 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 ui/display/mac/screen_mac.mm | 10 ++++++++++
 | 
					 | 
				
			||||||
 1 file changed, 10 insertions(+)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
 | 
					diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
 | 
				
			||||||
index 4850c795480e..ec34b25a6fe8 100644
 | 
					index be4f343bcd44..84fd3ec23cfa 100644
 | 
				
			||||||
--- a/ui/display/mac/screen_mac.mm
 | 
					--- a/ui/display/mac/screen_mac.mm
 | 
				
			||||||
+++ b/ui/display/mac/screen_mac.mm
 | 
					+++ b/ui/display/mac/screen_mac.mm
 | 
				
			||||||
@@ -106,7 +106,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
 | 
					@@ -106,7 +106,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,14 +1,5 @@
 | 
				
			||||||
From 3fcbe57ff316894349907bf1c85f71d7487f0932 Mon Sep 17 00:00:00 2001
 | 
					 | 
				
			||||||
From: Jeremy Apthorp <jeremya@chromium.org>
 | 
					 | 
				
			||||||
Date: Mon, 6 Aug 2018 13:40:24 -0700
 | 
					 | 
				
			||||||
Subject: fix: [mas] don't call LaunchServices private api
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
---
 | 
					 | 
				
			||||||
 content/gpu/gpu_main.cc | 2 ++
 | 
					 | 
				
			||||||
 1 file changed, 2 insertions(+)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
 | 
					diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
 | 
				
			||||||
index 115f871094bc..aa47a1c1a51e 100644
 | 
					index e6a589fb90e0..64ff5e248bd7 100644
 | 
				
			||||||
--- a/content/gpu/gpu_main.cc
 | 
					--- a/content/gpu/gpu_main.cc
 | 
				
			||||||
+++ b/content/gpu/gpu_main.cc
 | 
					+++ b/content/gpu/gpu_main.cc
 | 
				
			||||||
@@ -276,8 +276,10 @@ int GpuMain(const MainFunctionParams& parameters) {
 | 
					@@ -276,8 +276,10 @@ int GpuMain(const MainFunctionParams& parameters) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show more
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue