Commit 3d54e6fd authored by mrefaat's avatar mrefaat Committed by Commit Bot

update comment in GetWebViewConfiguration

update comment in

it returns a shallow copy of the configuration.

WKWebViewConfigurationProvider: :GetWebViewConfiguration to indicate that
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I85286fec068683ebe923e53d3e39b7d852abf281
Reviewed-on: https://chromium-review.googlesource.com/956693Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mohammad Refaat <mrefaat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542159}
parent ee72677f
......@@ -28,9 +28,10 @@ class WKWebViewConfigurationProvider : public base::SupportsUserData::Data {
static web::WKWebViewConfigurationProvider& FromBrowserState(
web::BrowserState* browser_state);
// Returns an autoreleased copy of WKWebViewConfiguration associated with
// browser state. Lazily creates the config. Configuration's |preferences|
// will have scriptCanOpenWindowsAutomatically property set to YES.
// Returns an autoreleased shallow copy of WKWebViewConfiguration associated
// with browser state. Lazily creates the config. Configuration's
// |preferences| will have scriptCanOpenWindowsAutomatically property set to
// YES.
// Must be used instead of [[WKWebViewConfiguration alloc] init].
// Callers must not retain the returned object.
WKWebViewConfiguration* GetWebViewConfiguration();
......
......@@ -101,7 +101,8 @@ WKWebViewConfigurationProvider::GetWebViewConfiguration() {
[[configuration_ userContentController]
addUserScript:InternalGetDocumentEndScriptForAllFrames(browser_state_)];
}
// Prevent callers from changing the internals of configuration.
// This is a shallow copy to prevent callers from changing the internals of
// configuration.
return [configuration_ copy];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment