Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Issue 22150004: Add WebUIDataSourceImpl::DisableReplaceExistingSource (Closed)

Created:
7 years, 4 months ago by shuais_
Modified:
7 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, Daniel Bratell
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Add 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M content/browser/webui/web_ui_data_source_impl.h View 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/webui/web_ui_data_source_impl.cc View 3 chunks +9 lines, -1 line 0 comments Download
M content/public/browser/web_ui_data_source.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
shuais_
Hi guys, please have a look at this small patch.
7 years, 4 months ago (2013-08-05 07:38:36 UTC) #1
Evan Stade
nothing actually calls DisableReplaceExistingSource(), so this is dead code.
7 years, 4 months ago (2013-08-05 20:50:55 UTC) #2
shuais_
On 2013/08/05 20:50:55, Evan Stade wrote: > nothing actually calls DisableReplaceExistingSource(), so this is dead ...
7 years, 4 months ago (2013-08-06 02:58:32 UTC) #3
arv (Not doing code reviews)
A test or a comment would be good. Currently, it is possible that someone will ...
7 years, 4 months ago (2013-08-07 13:44:18 UTC) #4
Evan Stade
On 2013/08/06 02:58:32, shuais_ wrote: > On 2013/08/05 20:50:55, Evan Stade wrote: > > nothing ...
7 years, 4 months ago (2013-08-07 23:12:02 UTC) #5
Evan Stade
+jam for content api change.
7 years, 4 months ago (2013-08-07 23:18:19 UTC) #6
shuais_
On 2013/08/07 23:12:02, Evan Stade wrote: > On 2013/08/06 02:58:32, shuais_ wrote: > > On ...
7 years, 4 months ago (2013-08-08 09:53:06 UTC) #7
jam
lgtm, please add a comment in the header saying that this is used by embedders ...
7 years, 4 months ago (2013-08-08 15:23:43 UTC) #8
Evan Stade
7 years, 4 months ago (2013-08-08 17:02:58 UTC) #9
Evan Stade
On 2013/08/08 09:53:06, shuais_ wrote: > On 2013/08/07 23:12:02, Evan Stade wrote: > > On ...
7 years, 4 months ago (2013-08-08 17:57:14 UTC) #10
shuais_
On 2013/08/08 17:57:14, Evan Stade wrote: > On 2013/08/08 09:53:06, shuais_ wrote: > > On ...
7 years, 4 months ago (2013-08-12 08:12:42 UTC) #11
arv (Not doing code reviews)
LGTM Thanks for adding the comment.
7 years, 4 months ago (2013-08-12 15:18:55 UTC) #12
Evan Stade
removing myself from reviewers.
7 years, 4 months ago (2013-08-12 16:38:28 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shuais@opera.com/22150004/12001
7 years, 4 months ago (2013-08-13 03:58:39 UTC) #14
shuais_
Thanks all.
7 years, 4 months ago (2013-08-13 04:00:17 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=158484
7 years, 4 months ago (2013-08-13 04:54:16 UTC) #16
jam
https://codereview.chromium.org/22150004/diff/12001/content/browser/webui/web_ui_data_source_impl.h File content/browser/webui/web_ui_data_source_impl.h (right): https://codereview.chromium.org/22150004/diff/12001/content/browser/webui/web_ui_data_source_impl.h#newcode45 content/browser/webui/web_ui_data_source_impl.h:45: // Currently only used by embedders for WebUIs with ...
7 years, 4 months ago (2013-08-13 21:36:45 UTC) #17
shuais_
On 2013/08/13 21:36:45, jam wrote: > https://codereview.chromium.org/22150004/diff/12001/content/browser/webui/web_ui_data_source_impl.h > File content/browser/webui/web_ui_data_source_impl.h (right): > > https://codereview.chromium.org/22150004/diff/12001/content/browser/webui/web_ui_data_source_impl.h#newcode45 > ...
7 years, 4 months ago (2013-08-20 08:23:09 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/shuais@opera.com/22150004/46001
7 years, 4 months ago (2013-08-21 08:26:57 UTC) #19
commit-bot: I haz the power
Change committed as 218710
7 years, 4 months ago (2013-08-21 12:25:37 UTC) #20
jam
https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/browser/web_ui_data_source.h File content/public/browser/web_ui_data_source.h (right): https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/browser/web_ui_data_source.h#newcode83 content/public/browser/web_ui_data_source.h:83: // have been useful for NTP as well if ...
7 years, 4 months ago (2013-08-25 07:22:38 UTC) #21
shuais_
On 2013/08/25 07:22:38, jam wrote: > https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/browser/web_ui_data_source.h > File content/public/browser/web_ui_data_source.h (right): > > https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/browser/web_ui_data_source.h#newcode83 > ...
7 years, 3 months ago (2013-08-26 03:07:44 UTC) #22
jam
7 years, 3 months ago (2013-08-26 14:18:58 UTC) #23
Message was sent while issue was closed.
On 2013/08/26 03:07:44, shuais_ wrote:
> On 2013/08/25 07:22:38, jam wrote:
> >
>
https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/bro...
> > File content/public/browser/web_ui_data_source.h (right):
> > 
> >
>
https://chromiumcodereview.appspot.com/22150004/diff/46001/content/public/bro...
> > content/public/browser/web_ui_data_source.h:83: // have been useful for NTP
as
> > well if it wasn't implementing URLDataSource
> > nit: please remove everything after the comment. per comment 11 NTP can't
use
> > this, and either way it's a layering violation to mention a chrome concept
in
> > content.
> 
> Fixed but can't commit as this issue is closed.. should I open a new issue for
> the new fix or reopen this one?

just upload a new issue

Powered by Google App Engine
This is Rietveld 408576698