Commit Graph

88 Commits

Author SHA1 Message Date
8b400331c7 Support disabling of cookie load/save via SetSupportedSchemes (see issue #2622).
With this change the CefCookieManager::SetSupportedSchemes method can be used
to disable all loading and saving of cookies for the associated request context.
This matches functionality that was previously available via GetBlockingManager.

This change also fixes a bug where Set-Cookie headers returned for a request
handled via CefSchemeHandlerFactory would be ignored if there was not also a
CefResourceRequestHandler returned for the request.

To test: All CookieTest.* tests pass.
2019-05-02 18:33:10 -04:00
370cc028cb Add NetworkService support for chrome and chrome-devtools schemes (see issue #2622).
Known behavior changes:
- Unsupported chrome hosts no longer redirect to chrome://version.

To test: All tests pass with NetworkService disabled. WebUITest.* and V8Test.*
tests pass with NetworkService enabled.
2019-04-30 17:16:42 -04:00
2ace33f8b7 Move cookie load/save callbacks to CefCookieAccessFilter (see issue #2622).
This change allows the NetworkService to handle cookie load/save in cases where
cookies will not be filtered (CefResourceRequestHandler::GetCookieAccessFilter
returns null) and the request will be handled by the default network loader.
This represents a minor performance improvement by reducing the volume of cross-
process messaging in the default (no filtering or custom handing) case. Cookie
load/save still needs to be routed through the browser process if a filter is
returned, or if a CefResourceHandler is used for the request.

To test: Test expectations are unchanged.
2019-04-26 13:02:58 -04:00
8f240861e3 Implement NetworkService request interception/handling (see issue #2622).
Implementation notes:
- Chromium change: CookieMonster::SetCookieableSchemes needs to be called
  immediately after the CookieMonster is created in NetworkContext::
  ApplyContextParamsToBuilder. Add a Profile::GetCookieableSchemes method and
  NetworkContextParams.cookieable_schemes member (set from
  ProfileNetworkContextService::CreateNetworkContextParams) to support that.
- Chromium change: Add a ContentBrowserClient::HandleExternalProtocol variant
  that exposes additional NetworkService request information.
- GetResourceResponseFilter is not yet implemented.

API changes:
- Resource-related callbacks have been moved from CefRequestHandler to a new
  CefResourceRequestHandler interface which is returned via the
  GetResourceRequestHandler method. If the CefRequestHandler declines to handle
  a resource it can optionally be handled by the CefRequestContextHandler, if
  any, associated with the loading context.
- The OnProtocolExecution callback has been moved from CefRequestHandler to
  CefResourceRequestHandler and will be called if a custom scheme request is
  unhandled.
- Cookie send/save permission callbacks have been moved from CefRequestHandler
  and CefResourceHandler to CefResourceRequestHandler.
- New methods added to CefResourceHandler that better match NetworkService
  execution sequence expectations. The old methods are now deprecated.
- New methods added to CefRequest and CefResponse.

Known behavior changes with the NetworkService implementation:
- Modifying the |new_url| parameter in OnResourceRedirect will no longer result
  in the method being called an additional time (likely a bug in the old
  implementation).
- Modifying the request URL in OnResourceResponse would previously cause a
  redirect. This behavior is now deprecated because the NetworkService does not
  support this functionality when using default network loaders. Temporary
  support has been added in combination with CefResourceHandler usage only.
- Other changes to the request object in OnResourceResponse will now cause the
  request to be restarted. This means that OnBeforeResourceLoad, etc, will be
  called an additional time with the new request information.
- CefResponse::GetMimeType will now be empty for non-200 responses.
- Requests using custom schemes can now be handled via CefResourceRequestHandler
  with the same callback behavior as builtin schemes.
- Redirects of custom scheme requests will now be followed as expected.
- Default handling of builtin schemes can now be disabled by setting
  |disable_default_handling| to true in GetResourceRequestHandler.
- Unhandled requests (custom scheme or builtin scheme with default handling
  disabled) will fail with an CefResponse::GetError value of
  ERR_UNKNOWN_URL_SCHEME.
- The CefSchemeHandlerFactory::Create callback will now include cookie headers.

To test:
- Run `cefclient --enable-network-service`. All resources should load
  successfully (this tests the transparent proxy capability).
- All tests pass with NetworkService disabled.
- The following tests pass with NetworkService enabled:
  - CookieTest.*
  - FrameTest.* (excluding .*Nav)
  - NavigationTest.* (excluding .Redirect*)
  - RequestHandlerTest.*
  - RequestContextTest.Basic*
  - RequestContextTest.Popup*
  - RequestTest.*
  - ResourceManagerTest.*
  - ResourceRequestHandlerTest.* (excluding .Filter*)
  - SchemeHandlerTest.*
  - StreamResourceHandlerTest.*
2019-04-23 22:53:28 -04:00
879911b721 Update to Chromium version 75.0.3749.0 (#645082) 2019-04-16 14:38:48 +00:00
b949d86c40 Move CookieManager callbacks to the UI thread (see issue #2622).
The Chromium content layer (which also exposes the NetworkService interface)
generally runs on the UI thread. Previous use of the IO thread for CookieManager
callbacks is an implementation detail of the old network stack that shouldn't be
exposed to clients.

To test: Run ceftests. They should pass as expected.
2019-03-25 15:36:08 -04:00
85c34c4dcf Add CookieManagerImpl for NetworkService (see issue #2622).
To test: Run `ceftests --gtest_filter=CookieTest.*:-CookieTest.GetCookieManager*
                       --enable-network-service`

There should be no functional change when running without the NetworkService
enabled.

Known issues:
- CefCookieManager::SetSupportedSchemes is not yet implemented.
2019-03-25 15:35:59 -04:00
a23e845244 Remove methods that modify cookie storage at runtime (see issue #2622).
This change removes cookie and request handler functionality that will not
supported by the NetworkService. Specifically, it is no longer possible to
change cookie storage locations at runime by returning a different
CefCookieManager for an already initialized CefRequestContext. After this change
you will need to use a separate CefRequestContext when creating a CefBrowser if
you require separate cookie storage.

The following methods have been removed:
- CefCookieManager::CreateManager
- CefCookieManager::GetBlockingManager
- CefCookieManager::SetStoragePath
- CefRequestContextHandler::GetCookieManager

The following methods have been renamed:
- CefRequestContext::GetDefaultCookieManager to GetCookieManager.

This change substantially simplifies the network implementation in CEF because
it is no longer necessary to proxy objects that are normally owned by Chromium.
Chromium patches that are no longer necessary will be removed as a follow-up
commit.

To test: Verify that `ceftests --gtest_filter=-PluginTest.*` pass with
NetworkService disabled. Plugin tests will be fixed in a follow-up commit.
2019-03-24 16:45:06 -04:00
6b2c1fe969 Add initial NetworkService support (see issue #2622).
This change adds an --enable-network-service command-line flag to run with
NetworkService enabled.

To test: Run `cefclient --enable-network-service --disable-extensions`. The
application should start, load a website and exit without crashing.
Network-related handlers (for cookies, schemes, requests, etc) and extensions
are not expected to work yet.

There should be no functional change when running without the NetworkService
enabled.
2019-03-24 16:43:56 -04:00
725ed88529 Update to Chromium version 74.0.3729.0 (#638880)
- Windows: 10.0.17763.0 SDK is now required.
- Mac: 10.13 SDK is now required.
- Removed CefRequestContext::ResolveHostCached which is no longer supported by Chromium.
2019-03-13 21:27:37 +00:00
8d1453fd24 Fix crash if CefAuthCallback outlives the matching URLRequest (issue #2612) 2019-02-26 16:42:22 +00:00
5a1c642431 Update to Chromium version 74.0.3706.0 (#632463) 2019-02-25 12:09:54 -05:00
ec2ee91bf0 Fix 'auth.gssapi_library_name' pref handling (issue #2568) 2019-02-01 21:08:40 +00:00
2e7f935b0d Update to Chromium version 73.0.3679.0 (#624510) 2019-02-01 16:42:40 +00:00
1a86240c93 Update to Chromium version 73.0.3665.0 (#620590) 2019-01-18 11:25:51 +01:00
4b5c38eeb4 Improve CefURLRequestJob redirect handling (issue #2542) 2019-01-11 15:12:06 +00:00
3e06fa8271 Revert "Improve CefURLRequestJob redirect handling (issue #2542)"
This reverts commit 7ea19d740d which was added
prematurely.
2018-11-15 15:26:48 -05:00
7ea19d740d Improve CefURLRequestJob redirect handling (issue #2542) 2018-11-14 16:27:06 -05:00
a7e997e524 Update to Chromium version 72.0.3599.0 (#604791) 2018-11-05 13:31:55 -05:00
1928572b52 Fix crash using CefCookieManager::SetStoragePath (issue #2522) 2018-10-08 18:57:14 +03:00
da53451f97 Update to Chromium version 71.0.3567.0 (#595360)
- Configuration of OSR VSync interval is currently missing (issue #2517)
- Rename VERSION to VERSION.in to fix libc++ compile error (issue #2518)
2018-10-04 12:17:26 +03:00
a64237bcb0 Update to Chromium version 70.0.3538.0 (#587811)
Known issues:
- The CefLoadCRLSetsFile function needs to be re-implemented (see issue #2497).
- Linux: GTK2 support has been removed. The cefclient sample needs to be updated
  to use GTK3 (see issue #2014).
2018-09-05 15:42:42 +02:00
ea0e213bef Update to Chromium version 70.0.3516.0 (#581409) 2018-08-10 11:31:08 -04:00
a659b48fd1 Update to Chromium version 70.0.3507.0 (#578961) 2018-08-02 15:15:23 -04:00
7d09642925 Update to Chromium version 69.0.3497.0 (#576753) 2018-07-24 12:15:30 -04:00
96bd993d99 Update to Chromium version 69.0.3489.0 (#574445) 2018-07-13 15:29:39 -04:00
6301e06c8a Update to Chromium version 69.0.3483.0 (#572879) 2018-07-09 11:23:23 -04:00
2d48a07bec Update to Chromium version 69.0.3476.0 (#571360) 2018-07-03 13:48:07 -04:00
35830c88e5 Update to Chromium version 69.0.3464.0 (#567918) 2018-06-19 15:49:32 -04:00
12043b16e7 Update to Chromium version 69.0.3453.0 (#565531) 2018-06-12 14:16:03 -04:00
08ff72fa20 Update to Chromium version 68.0.3433.0 (#559327)
Known issues:
- Windows now requires VS 2017 15.7.1 with 10.0.17134.0 SDK.
2018-05-22 17:03:01 +03:00
cd27cbc802 Update to Chromium version 68.0.3425.0 (#557062)
Known issues:
- Surface synchronization is now enabled for OSR, see issue #2447.
- Jumbo build is broken, fixed in https://crrev.com/868717ce.
2018-05-21 13:54:23 +03:00
84e2286995 Update to Chromium version 68.0.3403.0 (#552595) 2018-05-16 21:03:56 +02:00
8426da0de6 Update to Chromium version 68.0.3399.0 (#551554) 2018-05-16 11:23:34 +03:00
a3c55f1d26 Update to Chromium revision 9ef2aa86 (#550428) 2018-05-04 10:50:26 +02:00
90863b8c5d Add ability to stop CefURLRequest on redirect (issue #1329) 2018-04-10 13:05:18 -04:00
7a59914f97 Update to Chromium revision 66afc5e5 (#540276) 2018-03-22 16:56:23 -04:00
e030236c36 Add CefCookieManager::GetBlockingManager (issue #2374) 2018-03-14 21:40:37 -04:00
39ccd85d77 Fixes encoding issues when using a custom resource handler (issue #1906). 2018-02-22 19:05:54 +00:00
9e644b7538 Update to Chromium revision bc084a8b (#530369) 2018-02-19 17:38:04 -05:00
d34d3d1b3b Add callbacks for network request access to cookies (issue #2374) 2018-02-06 16:06:44 -05:00
8d51acb9be Update to Chromium revision 5fdc0fab (#520840)
- Windows now builds with clang by default.
2017-12-14 15:31:07 -05:00
69178d519e Fix bugs and test failures with browser-side navigation (issue #2290) 2017-11-30 18:20:24 -05:00
7840b4f406 Enable Brotli encoding (issue #2303) 2017-11-15 17:21:34 -05:00
4787b45db2 Resolve request mapping issues with swapped out frames and browser-side navigation (issue #2290) 2017-10-26 15:58:57 -04:00
9334a09176 Set the correct response status on internal redirects 2017-10-26 15:58:43 -04:00
8b4980b4ca Update to Chromium revision adb61db1 (#508578) 2017-10-26 15:58:05 -04:00
a028976ac4 Update to Chromium revision fa6a5d87 (#499098) 2017-09-07 17:29:47 -04:00
22d2fc50d1 Add QUIC protocol configuration support (issue #2184) 2017-09-05 14:21:56 -04:00
9cff99dc4e Add support for loading extensions (issue #1947)
- Add CefRequestContext::LoadExtension, CefExtension, CefExtensionHandler and
  related methods/interfaces.
- Add chrome://extensions-support that lists supported Chrome APIs.
- Add CefBrowserHost::SetAutoResizeEnabled and CefDisplayHandler::OnAutoResize
  to support browser resize based on preferred web contents size.
- views: Add support for custom CefMenuButton popups.
- cefclient: Run with `--load-extension=set_page_color` command-line flag for
  an extension loading example. Add `--use-views` on Windows and Linux for an
  even better example.
2017-08-25 18:40:32 -04:00