![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 134.0.6998.1 * chore: bump chromium in DEPS to 134.0.6998.5 * chore: bump chromium in DEPS to 134.0.6998.3 * chore: bump chromium to 134.0.6988.0 (main) (#45334) * chore: bump chromium in DEPS to 134.0.6976.0 * chore: update mas_avoid_private_macos_api_usage.patch.patch6171046
process_info_mac.cc -> process_info_mac.mm * chore: update build_do_not_depend_on_packed_resource_integrity.patch6196857
* chore: update feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch6182296
6183404
6187853
A lot changed in the upstream implementation. There's a good chance I got this wrong as threading has changed and moved some variables into globals. * chore: remove build_remove_vr_directx_helpers_dependency.patch6186102
This landed upstream * chore: e patches all * chore: update net::CookieInclusionStatus::ExclusionReason enum6183252
6185544
* chore: update content::WebAuthenticationDelegate import6189769
* Revert "chore: disable focus handling test due to win32/ia32 regression" This reverts commit 1a57ba5d59848d0c841ddda59c9299a4f957452a. * chore: bump chromium in DEPS to 134.0.6978.0 * chore: bump chromium in DEPS to 134.0.6980.0 * chore: bump chromium in DEPS to 134.0.6982.0 * chore: bump chromium in DEPS to 134.0.6984.0 * 6196281: Allow direct embedder IsPdfInternalPluginAllowedOrigin() interaction6196281
* 6196283: Delete PdfInternalPluginDelegate6196283
* chore: update patches * chore: bump chromium in DEPS to 134.0.6986.0 * chore: update patches * 6205762: Support option to use window.showSaveFilePicker() in PDF attachment code6205762
See also: * https://issues.chromium.org/issues/373852607 * 5939153: [PDF] Add PdfUseShowSaveFilePicker feature flag |5939153
* 6205761: Delete spurious Ink-specific code in pdf_viewer.ts |6205761
* 6209609: Remove WebVector: Automatic changes6209609
* 6205488: UI: make QT5 optional6205488
* 6178281: Rename pak files from branding strings6178281
* fixup! 6209609: Remove WebVector: Automatic changes6209609
* 6193249: Switch from safe_browsing::EventResult to enterprise_connectors:EventResult6193249
* 6197457: Remove Pause/ResumeReadingBodyFromNet IPCs6197457
* 6191230: Record total time spent on a picture in picture window6191230
* chore: bump chromium in DEPS to 134.0.6988.0 * chore: update patches * 6215440: Remove base/ranges/.6215440
* Disable unsafe buffers error Not sure what changed, but we're now seeing unsafe buffer errors in Chromium code, at least when using reclient. Will update this comment if we find out the cause. * 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType6187853
* fix `setDisplayMediaRequestHandler` test Given how this test is written, I would expect this assertion to be false. It seems the oppositue was true before, but that was also acknowledged to be suprising. Seems that the underlying implementation is now fixed and works as expected. * fixup! 6187853: SelectFileDialogLinuxPortal: Use dbus_xdg::Request and DbusType6187853
* chore: udpate patches * Multiple PRS:6185544
|6183252
* fix: cast enum class to numeric type * fix: add 1 to MAX_EXCLUSION_REASON because enum values are zero-based, and we want the total count of reasons. * Reapply "chore: disable focus handling test due to win32/ia32 regression" This reverts commit 760b1a519b5919b483c66bc3096eeefb4d7011f4. * refactor: use ExclusionReasonBitset::kValueCount for size --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: clavin <clavin@electronjs.org> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> (cherry picked from commit213165a467
) --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
90 lines
3.2 KiB
C++
90 lines
3.2 KiB
C++
// Copyright (c) 2019 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_
|
|
#define ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
#include "base/values.h"
|
|
#include "mojo/public/cpp/bindings/receiver.h"
|
|
#include "mojo/public/cpp/bindings/remote.h"
|
|
#include "services/network/public/cpp/resource_request.h"
|
|
#include "services/network/public/cpp/simple_url_loader.h"
|
|
#include "services/network/public/cpp/simple_url_loader_stream_consumer.h"
|
|
#include "services/network/public/mojom/url_loader.mojom.h"
|
|
|
|
namespace mojo {
|
|
class DataPipeProducer;
|
|
}
|
|
|
|
namespace network {
|
|
class SharedURLLoaderFactory;
|
|
}
|
|
|
|
namespace electron {
|
|
|
|
// Read data from URL and pipe it to NetworkService.
|
|
//
|
|
// Different from creating a new loader for the URL directly, protocol handlers
|
|
// using this loader can work around CORS restrictions.
|
|
//
|
|
// This class manages its own lifetime and should delete itself when the
|
|
// connection is lost or finished.
|
|
class URLPipeLoader : public network::mojom::URLLoader,
|
|
public network::SimpleURLLoaderStreamConsumer {
|
|
public:
|
|
URLPipeLoader(scoped_refptr<network::SharedURLLoaderFactory> factory,
|
|
std::unique_ptr<network::ResourceRequest> request,
|
|
mojo::PendingReceiver<network::mojom::URLLoader> loader,
|
|
mojo::PendingRemote<network::mojom::URLLoaderClient> client,
|
|
const net::NetworkTrafficAnnotationTag& annotation,
|
|
base::Value::Dict upload_data);
|
|
|
|
// disable copy
|
|
URLPipeLoader(const URLPipeLoader&) = delete;
|
|
URLPipeLoader& operator=(const URLPipeLoader&) = delete;
|
|
|
|
private:
|
|
~URLPipeLoader() override;
|
|
|
|
void Start(scoped_refptr<network::SharedURLLoaderFactory> factory,
|
|
std::unique_ptr<network::ResourceRequest> request,
|
|
const net::NetworkTrafficAnnotationTag& annotation,
|
|
base::Value::Dict upload_data);
|
|
void NotifyComplete(int result);
|
|
void OnResponseStarted(const GURL& final_url,
|
|
const network::mojom::URLResponseHead& response_head);
|
|
void OnWrite(base::OnceClosure resume, MojoResult result);
|
|
|
|
// SimpleURLLoaderStreamConsumer:
|
|
void OnDataReceived(std::string_view string_view,
|
|
base::OnceClosure resume) override;
|
|
void OnComplete(bool success) override;
|
|
void OnRetry(base::OnceClosure start_retry) override;
|
|
|
|
// URLLoader:
|
|
void FollowRedirect(
|
|
const std::vector<std::string>& removed_headers,
|
|
const net::HttpRequestHeaders& modified_headers,
|
|
const net::HttpRequestHeaders& modified_cors_exempt_headers,
|
|
const std::optional<GURL>& new_url) override {}
|
|
void SetPriority(net::RequestPriority priority,
|
|
int32_t intra_priority_value) override {}
|
|
|
|
mojo::Receiver<network::mojom::URLLoader> url_loader_;
|
|
mojo::Remote<network::mojom::URLLoaderClient> client_;
|
|
|
|
std::unique_ptr<mojo::DataPipeProducer> producer_;
|
|
std::unique_ptr<network::SimpleURLLoader> loader_;
|
|
|
|
base::WeakPtrFactory<URLPipeLoader> weak_factory_{this};
|
|
};
|
|
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_BROWSER_NET_URL_PIPE_LOADER_H_
|