DescriptionAdd WebUIDataSourceImpl::DisableReplaceExistingSource
Currently when using WebUIDataSource object returned by content::WebUIDataSource::Create,
there is no way to override ShouldReplaceExistingSource for the URLDataSource object that
will be created by WebUIDataSource internally. As a result when WebUIDataSource of the same
type is added repeatedly for different instances of WebUI, the previous pending request on the data
source will be cancelled, resulting in broken WebUI page.
The New Tab Page in chromium doesn't suffer because it doesn't use WebUIDataSource,
however it's convinient and less work to use it for some WebUIs. It's also possible to work around
by avoiding adding WebUIDataSource repeatedly in the first place, but that is much more complicated
as we'll have to track is a certain WebUIDataSource already added or not for a given profile.
The proposed fix simply add the api to override ShouldReplaceExistingSource.
BUG=
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218710
Patch Set 1 #Patch Set 2 : Add WebUIDataSourceImpl::DisableReplaceExistingSource #
Total comments: 1
Patch Set 3 : Move method comment to interface #
Total comments: 1
Patch Set 4 : Comment improvement, don't mention chrome in content layer #
Messages
Total messages: 23 (0 generated)
|