![electron-roller[bot]](/assets/img/avatar_default.png)
* chore: bump chromium in DEPS to 131.0.6756.0 * chore: update disable_hidden.patch no code changes; just handling upstream context shear5887019
* chore: update feat_expose_raw_response_headers_from_urlloader.patch Factor out URLLoader's URLRequest configuration into a helper Xref:5902254
* chore: update fix_disabling_background_throttling_in_compositor.patch no manual changes; patch applied with fuzz 1 * chore: e patches all * 5882129: Fix basic auth issues for sub frame and sub resources |5882129
- Add `is_request_for_navigation` param to ElectronBrowserClient::CreateLoginDelegate(). - Propagate the flag as another undocumented property in the app.login Event's authenticationResponseDetails object - Side cleanup: also in CreateLoginDelegate(), use upstream's name for the `is_request_for_main_frame` param, renamed back in3256171
* 5875189: [FSA] Check for DANGEROUS extension types when creating a new file. |5875189
* chore: node ./script/gen-libc++-filenames.js * chore: bump chromium in DEPS to 131.0.6758.0 * chore: bump chromium in DEPS to 131.0.6760.0 * chore: update patches * [A11y] Remove Accessibility Object Model (AOM) Refs5896593
* chore: bump chromium in DEPS to 131.0.6762.0 * [heap] Remove deprecated V8 flag Refs5904046
--------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com>
58 lines
1.8 KiB
C++
58 lines
1.8 KiB
C++
// Copyright (c) 2015 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_LOGIN_HANDLER_H_
|
|
#define ELECTRON_SHELL_BROWSER_LOGIN_HANDLER_H_
|
|
|
|
#include "base/process/process_handle.h"
|
|
#include "content/public/browser/content_browser_client.h"
|
|
#include "content/public/browser/login_delegate.h"
|
|
|
|
namespace content {
|
|
class WebContents;
|
|
}
|
|
|
|
namespace gin {
|
|
class Arguments;
|
|
}
|
|
|
|
namespace electron {
|
|
|
|
// Handles HTTP basic auth.
|
|
class LoginHandler : public content::LoginDelegate {
|
|
public:
|
|
LoginHandler(const net::AuthChallengeInfo& auth_info,
|
|
content::WebContents* web_contents,
|
|
bool is_request_for_primary_main_frame,
|
|
bool is_request_for_navigation,
|
|
base::ProcessId process_id,
|
|
const GURL& url,
|
|
scoped_refptr<net::HttpResponseHeaders> response_headers,
|
|
bool first_auth_attempt,
|
|
LoginAuthRequiredCallback auth_required_callback);
|
|
~LoginHandler() override;
|
|
|
|
// disable copy
|
|
LoginHandler(const LoginHandler&) = delete;
|
|
LoginHandler& operator=(const LoginHandler&) = delete;
|
|
|
|
private:
|
|
void EmitEvent(net::AuthChallengeInfo auth_info,
|
|
content::WebContents* web_contents,
|
|
bool is_request_for_primary_main_frame,
|
|
bool is_request_for_navigation,
|
|
base::ProcessId process_id,
|
|
const GURL& url,
|
|
scoped_refptr<net::HttpResponseHeaders> response_headers,
|
|
bool first_auth_attempt);
|
|
void CallbackFromJS(gin::Arguments* args);
|
|
|
|
LoginAuthRequiredCallback auth_required_callback_;
|
|
|
|
base::WeakPtrFactory<LoginHandler> weak_factory_{this};
|
|
};
|
|
|
|
} // namespace electron
|
|
|
|
#endif // ELECTRON_SHELL_BROWSER_LOGIN_HANDLER_H_
|