Skip to content
This repository has been archived by the owner on Jan 4, 2019. It is now read-only.

Commit

Permalink
C67 rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Jun 18, 2018
1 parent 934d299 commit 587eff1
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 27 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ mojom("mojo_bindings") {
]

public_deps = [
"//mojo/common:common_custom_types",
"//mojo/public/mojom/base",
]
}
Expand Down
3 changes: 2 additions & 1 deletion atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ void SetProxyInIO(scoped_refptr<net::URLRequestContextGetter> getter,
auto proxy_resolution_service =
getter->GetURLRequestContext()->proxy_resolution_service();
proxy_resolution_service->ResetConfigService(base::WrapUnique(
new net::ProxyConfigServiceFixed(config)));
new net::ProxyConfigServiceFixed(
net::ProxyConfigWithAnnotation(config, NO_TRAFFIC_ANNOTATION_YET))));
// Refetches and applies the new pac script if provided.
proxy_resolution_service->ForceReloadProxyConfig();
BrowserThread::PostTask(
Expand Down
4 changes: 2 additions & 2 deletions brave/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ source_set("proxy") {

deps = [
"//net",
"//third_party/WebKit/public:blink_headers",
"//third_party/blink/public:blink_headers",
]
}

Expand All @@ -186,6 +186,6 @@ source_set("tor") {
]

deps = [
"//third_party/WebKit/public:blink_headers",
"//third_party/blink/public:blink_headers",
]
}
2 changes: 1 addition & 1 deletion brave/browser/brave_browser_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#include "extensions/buildflags/buildflags.h"
#include "net/base/escape.h"
#include "net/cookies/cookie_store.h"
#include "net/proxy_resolution/proxy_service.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "net/url_request/url_request_job_factory_impl.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "base/strings/string_util.h"
#include "content/public/browser/browser_thread.h"
#include "crypto/random.h"
#include "net/proxy_resolution/proxy_service.h"
#include "net/proxy_resolution/proxy_resolution_service.h"
#include "net/url_request/url_request_context.h"
#include "vendor/brightray/browser/browser_client.h"
#include "vendor/brightray/browser/net_log.h"
Expand Down Expand Up @@ -89,10 +89,11 @@ void ProxyConfigServiceTor::TorSetProxy(
}

ProxyConfigServiceTor::ConfigAvailability
ProxyConfigServiceTor::GetLatestProxyConfig(ProxyConfig* config) {
ProxyConfigServiceTor::GetLatestProxyConfig(
ProxyConfigWithAnnotation* config) {
if (scheme_ != kSocksProxy || host_.empty() || port_.empty())
return CONFIG_UNSET;
*config = config_;
*config = net:: ProxyConfigWithAnnotation(config_, NO_TRAFFIC_ANNOTATION_YET);
return CONFIG_VALID;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class NET_EXPORT ProxyConfigServiceTor : public ProxyConfigService {
// ProxyConfigService methods:
void AddObserver(Observer* observer) override {}
void RemoveObserver(Observer* observer) override {}
ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override;
ConfigAvailability GetLatestProxyConfig(
ProxyConfigWithAnnotation* config) override;

private:
// Generate a new 128 bit random tag
Expand Down
8 changes: 4 additions & 4 deletions brave/browser/tor/tor_launcher_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "base/path_service.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_launcher_utils.h"
#include "content/public/common/service_manager_connection.h"
#include "services/service_manager/public/cpp/connector.h"
#include "url/third_party/mozilla/url_parse.h"
Expand Down Expand Up @@ -53,10 +54,9 @@ TorLauncherFactory::TorLauncherFactory(
TorLauncherFactory::~TorLauncherFactory() {}

void TorLauncherFactory::LaunchTorProcess() {
BrowserThread::PostTask(
BrowserThread::PROCESS_LAUNCHER, FROM_HERE,
base::Bind(&TorLauncherFactory::LaunchInLauncherThread,
base::Unretained(this)));
content::GetProcessLauncherTaskRunner()->PostTask(
FROM_HERE, base::Bind(&TorLauncherFactory::LaunchInLauncherThread,
base::Unretained(this)));
}

void TorLauncherFactory::LaunchInLauncherThread() {
Expand Down
8 changes: 4 additions & 4 deletions brave/common/tor/tor.mojom
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

module tor.mojom;

import "mojo/common/file_path.mojom";
import "mojo/public/mojom/base/file_path.mojom";

const string kTorServiceName = "tor_launcher";

interface TorLauncher {
Launch(mojo.common.mojom.FilePath tor_bin, string tor_host, string tor_port,
mojo.common.mojom.FilePath tor_data_dir,
mojo.common.mojom.FilePath tor_watch_dir)
Launch(mojo_base.mojom.FilePath tor_bin, string tor_host, string tor_port,
mojo_base.mojom.FilePath tor_data_dir,
mojo_base.mojom.FilePath tor_watch_dir)
=> (bool result);

// TODO(darkdh): info of callback can be more granular
Expand Down
4 changes: 2 additions & 2 deletions brave/utility/tor/tor_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void OnTorLauncherRequest(
service_manager::ServiceContextRefFactory* ref_factory,
tor::mojom::TorLauncherRequest request) {
mojo::MakeStrongBinding(
base::MakeUnique<brave::TorLauncherImpl>(ref_factory->CreateRef()),
std::make_unique<brave::TorLauncherImpl>(ref_factory->CreateRef()),
std::move(request));
}

Expand All @@ -28,7 +28,7 @@ TorService::~TorService() {}

std::unique_ptr<service_manager::Service>
TorService::CreateService() {
return base::MakeUnique<TorService>();
return std::make_unique<TorService>();
}

void TorService::OnStart() {
Expand Down
16 changes: 8 additions & 8 deletions patches/master_patch.patch
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ index 4304cc82494f57b7bbc4d1f3dff0fab96e30aef3..77130b344ba1e03e34e5faa752cd2590

assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn
index b431e6968c2193c01fdfdfd8014ef54a1fc40872..59abf80d52435f9ae050fcd789cf5b7f720957ef 100644
index e5744a9d05d3099a61815954b08c7c030d081071..33a65d47c94a101ca62bb89cc0b43fbd0769c4ac 100644
--- a/chrome/app/BUILD.gn
+++ b/chrome/app/BUILD.gn
@@ -429,6 +429,8 @@ if (!is_android) {
@@ -425,6 +425,8 @@ if (!is_android) {
chrome_packaged_services += [ "//chrome/utility:profile_import_manifest" ]
}

Expand All @@ -128,7 +128,7 @@ index b431e6968c2193c01fdfdfd8014ef54a1fc40872..59abf80d52435f9ae050fcd789cf5b7f
source = "chrome_manifest.json"
}
diff --git a/chrome/browser/chrome_content_browser_manifest_overlay.json b/chrome/browser/chrome_content_browser_manifest_overlay.json
index cd82cd63bfff860abdd765ad6e35355caffc3a43..9d24c0c3a7b315c10b519e0ae5b0eea04a880ddc 100644
index cd82cd63bfff860abdd765ad6e35355caffc3a43..eb8966b82071f04263e00c897a8708eb9ff6ec91 100644
--- a/chrome/browser/chrome_content_browser_manifest_overlay.json
+++ b/chrome/browser/chrome_content_browser_manifest_overlay.json
@@ -12,7 +12,7 @@
Expand All @@ -140,7 +140,7 @@ index cd82cd63bfff860abdd765ad6e35355caffc3a43..9d24c0c3a7b315c10b519e0ae5b0eea0
"safe_browsing::mojom::SafeBrowsing",
"translate::mojom::ContentTranslateDriver"
],
@@ -54,6 +54,7 @@
@@ -55,6 +55,7 @@
"proxy_resolver": [ "factory" ],
"preferences": [ "pref_client", "pref_control" ],
"removable_storage_writer": [ "removable_storage_writer" ],
Expand Down Expand Up @@ -2186,10 +2186,10 @@ index 3802937bc0c472cb72d38958ccbe9d5b25da6cbb..79f05f7f57f2547b50c9755dd363ab47
}

diff --git a/net/log/net_log_event_type_list.h b/net/log/net_log_event_type_list.h
index e23f2e6e9d9deb5fcd93f39c0e88c63ead47ac87..5c3e259474eec476038ee70bc90d6f0d188d84bd 100644
index 596c35c5be6a443a33d1b36587a34ef58debad68..583ff6dd9abeb39dd7e6bed43caf323ba299d838 100644
--- a/net/log/net_log_event_type_list.h
+++ b/net/log/net_log_event_type_list.h
@@ -2118,6 +2118,12 @@ EVENT_TYPE(SOCKS5_GREET_WRITE)
@@ -2115,6 +2115,12 @@ EVENT_TYPE(SOCKS5_GREET_WRITE)
// The time spent waiting for the "greeting" response from the SOCKS server.
EVENT_TYPE(SOCKS5_GREET_READ)

Expand Down Expand Up @@ -2358,10 +2358,10 @@ index 389315a25d7da30d71b59e3803ab795bc4c18e1c..79797fe7e674f9f6d2a65de542f262a9
// |buf_size| bytes into |buf|.
// Possible return values:
diff --git a/services/service_manager/sandbox/win/sandbox_win.cc b/services/service_manager/sandbox/win/sandbox_win.cc
index 6c7356eacc42f72156b65ed8ae6d2cfb8bcec3db..f2f5a25ba5c43ef1b6f7da0ff3e9f858de42ed51 100644
index 50430a8e2f8fc30e08412e75299be7d4ca275252..b65147fc394d96a0557f1987a4f4e8dc14328b44 100644
--- a/services/service_manager/sandbox/win/sandbox_win.cc
+++ b/services/service_manager/sandbox/win/sandbox_win.cc
@@ -831,6 +831,9 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
@@ -827,6 +827,9 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess(
service_manager::switches::kNoSandbox)) {
base::LaunchOptions options;
options.handles_to_inherit = handles_to_inherit;
Expand Down

0 comments on commit 587eff1

Please sign in to comment.