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

Issue 2941001: Removal of TabContentsDelegate::GetBrowser() interface method. (Closed)

Created:
10 years, 5 months ago by Jeff Timanus
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., pam+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Change removing method, GetBrowser from TabContentsDelegate, as this was breaking an abstraction layer. This routine was originally added in CL 434046, which required the Browser* to construct extension popup views from within Chrome-Frame instances. I changed all accesses to Browser instances from usage of the above method, to either iterating the BrowserList using the situation-specific profile as a search key, or modifying the appropriate delegate interfaces to provide the functionality that was previously used directly via the Browser. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54560

Patch Set 1 #

Total comments: 8

Patch Set 2 : '' #

Patch Set 3 : Correcting cocoa unittests. #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 6

Patch Set 6 : '' #

Patch Set 7 : Update to correct merge conflicts in tab_strip_model.h #

Patch Set 8 : Correct browser_tab_stripo_controller.cc #

Total comments: 2

Patch Set 9 : BrowserTabStripController constructor parameter added. #

Patch Set 10 : '' #

Patch Set 11 : Propagate const changes to tab_strip_controller_unittest.mm #

Total comments: 2

Patch Set 12 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -91 lines) Patch
M chrome/browser/autofill/autofill_cc_infobar_delegate.h View 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/autofill/autofill_cc_infobar_delegate.cc View 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -10 lines 0 comments Download
M chrome/browser/autofill/autofill_manager.h View 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/browser.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +13 lines, -4 lines 0 comments Download
M chrome/browser/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +34 lines, -22 lines 0 comments Download
M chrome/browser/browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/browser_init.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/cocoa/tab_strip_controller_unittest.mm View 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/dom_ui/dom_ui.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/dom_ui/dom_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/dom_ui/history2_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/dom_ui/history_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_dom_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -6 lines 0 comments Download
M chrome/browser/external_tab_container_win.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -8 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_delegate.cc View 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/tabs/tab_strip_model.h View 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/tabs/tab_strip_model_unittest.cc View 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/views/frame/browser_view.cc View 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/tabs/browser_tab_strip_controller.h View 9 10 11 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/views/tabs/browser_tab_strip_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +12 lines, -9 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Jeff Timanus
Hi All, As per Ben G.'s comments in review http://codereview.chromium.org/434046/show, I have removed TabContentsDelegate::GetBrowser(), and ...
10 years, 5 months ago (2010-07-08 18:50:07 UTC) #1
Ben Goodger (Google)
http://codereview.chromium.org/2941001/diff/1/9 File chrome/browser/dom_ui/history_ui.cc (right): http://codereview.chromium.org/2941001/diff/1/9#newcode241 chrome/browser/dom_ui/history_ui.cc:241: browser->OpenClearBrowsingDataDialog(); Brett and I do not want DOMUI to ...
10 years, 5 months ago (2010-07-08 19:18:19 UTC) #2
Jeff Timanus
http://codereview.chromium.org/2941001/diff/1/9 File chrome/browser/dom_ui/history_ui.cc (right): http://codereview.chromium.org/2941001/diff/1/9#newcode241 chrome/browser/dom_ui/history_ui.cc:241: browser->OpenClearBrowsingDataDialog(); On 2010/07/08 19:18:20, Ben Goodger wrote: > Brett ...
10 years, 5 months ago (2010-07-15 19:01:12 UTC) #3
Ben Goodger (Google)
Cool. I have been out sick this week. I will make sure I get to ...
10 years, 5 months ago (2010-07-15 19:11:21 UTC) #4
Jeff Timanus
On 2010/07/15 19:11:21, Ben Goodger wrote: > Cool. I have been out sick this week. ...
10 years, 5 months ago (2010-07-21 01:43:13 UTC) #5
Ben Goodger (Google)
Sorry for my latency, I have been really sick and away from work. I am ...
10 years, 5 months ago (2010-07-21 17:15:08 UTC) #6
Ben Goodger (Google)
http://codereview.chromium.org/2941001/diff/1/9 File chrome/browser/dom_ui/history_ui.cc (right): http://codereview.chromium.org/2941001/diff/1/9#newcode241 chrome/browser/dom_ui/history_ui.cc:241: browser->OpenClearBrowsingDataDialog(); Let's just leave this as you have it ...
10 years, 5 months ago (2010-07-21 17:17:20 UTC) #7
Ben Goodger (Google)
http://codereview.chromium.org/2941001/diff/62001/63014 File chrome/browser/extensions/extension_dom_ui.cc (right): http://codereview.chromium.org/2941001/diff/62001/63014#newcode179 chrome/browser/extensions/extension_dom_ui.cc:179: return BrowserList::FindBrowserWithProfile(DOMUI::GetProfile()); please add comments in all these DOMUIs ...
10 years, 5 months ago (2010-07-21 17:33:36 UTC) #8
Jeff Timanus
http://codereview.chromium.org/2941001/diff/1/9 File chrome/browser/dom_ui/history_ui.cc (right): http://codereview.chromium.org/2941001/diff/1/9#newcode241 chrome/browser/dom_ui/history_ui.cc:241: browser->OpenClearBrowsingDataDialog(); On 2010/07/21 17:17:20, Ben Goodger wrote: > Let's ...
10 years, 5 months ago (2010-07-21 21:40:29 UTC) #9
Jeff Timanus
Any more changes that you recommend? Things look good to you, Ben? Thanks, Jeff
10 years, 5 months ago (2010-07-26 18:28:57 UTC) #10
Ben Goodger (Google)
http://codereview.chromium.org/2941001/diff/44003/53063 File chrome/browser/views/tabs/browser_tab_strip_controller.cc (right): http://codereview.chromium.org/2941001/diff/44003/53063#newcode273 chrome/browser/views/tabs/browser_tab_strip_controller.cc:273: Browser* browser = BrowserList::FindBrowserWithProfile(model_->profile()); You shouldn't use this enumerator ...
10 years, 5 months ago (2010-07-27 21:54:20 UTC) #11
Jeff Timanus
http://codereview.chromium.org/2941001/diff/44003/53063 File chrome/browser/views/tabs/browser_tab_strip_controller.cc (right): http://codereview.chromium.org/2941001/diff/44003/53063#newcode273 chrome/browser/views/tabs/browser_tab_strip_controller.cc:273: Browser* browser = BrowserList::FindBrowserWithProfile(model_->profile()); On 2010/07/27 21:54:20, Ben Goodger ...
10 years, 4 months ago (2010-07-28 19:22:05 UTC) #12
Jeff Timanus
Any further comments? Good to go?
10 years, 4 months ago (2010-07-30 18:47:08 UTC) #13
Ben Goodger (Google)
Yes LGTM. http://codereview.chromium.org/2941001/diff/75014/54042 File chrome/browser/views/tabs/browser_tab_strip_controller.cc (right): http://codereview.chromium.org/2941001/diff/75014/54042#newcode10 chrome/browser/views/tabs/browser_tab_strip_controller.cc:10: #include "chrome/browser/browser_list.h" nix this include you don't ...
10 years, 4 months ago (2010-08-02 15:14:11 UTC) #14
Jeff Timanus
http://codereview.chromium.org/2941001/diff/75014/54042 File chrome/browser/views/tabs/browser_tab_strip_controller.cc (right): http://codereview.chromium.org/2941001/diff/75014/54042#newcode10 chrome/browser/views/tabs/browser_tab_strip_controller.cc:10: #include "chrome/browser/browser_list.h" On 2010/08/02 15:14:11, Ben Goodger wrote: > ...
10 years, 4 months ago (2010-08-02 16:07:26 UTC) #15
Aaron Boodman
This change broke a feature of chrome extensions. The change to ExtensionDOMUI::GetBrowser() was not correct. ...
10 years, 1 month ago (2010-10-26 19:36:29 UTC) #16
Aaron Boodman
This change broke a feature of chrome extensions. The change to ExtensionDOMUI::GetBrowser() was not correct. ...
10 years, 1 month ago (2010-10-26 19:36:29 UTC) #17
Jeff Timanus
On 2010/10/26 19:36:29, Aaron Boodman wrote: > This change broke a feature of chrome extensions. ...
10 years, 1 month ago (2010-10-26 21:36:51 UTC) #18
Aaron Boodman
On Tue, Oct 26, 2010 at 2:36 PM, <twiz@chromium.org> wrote: > On 2010/10/26 19:36:29, Aaron ...
10 years, 1 month ago (2010-10-26 21:40:56 UTC) #19
Jeff Timanus
10 years, 1 month ago (2010-10-26 21:50:43 UTC) #20
On 2010/10/26 21:40:56, Aaron Boodman wrote:
> On Tue, Oct 26, 2010 at 2:36 PM,  <mailto:twiz@chromium.org> wrote:
> > On 2010/10/26 19:36:29, Aaron Boodman wrote:
> >>
> >> This change broke a feature of chrome extensions. The change to
> >> ExtensionDOMUI::GetBrowser() was not correct.
> >
> >> ExtensionFunctionDispatcher::Delegate::GetBrowser() is not supposed to
> >> return
> >> any old browser, it is supposed to return the browser containing the code
> >> executing the extension function.
> >
> > Would a suitable fix be using the TabContentsIterator (browser_list.h)
> > utility
> > class to iterate through all of the browsers until we find one that matches
> > the
> > TabContents of the ExtensionDOMUI?
> 
> Is there a reference to the original complaint? I'd like to better
> understand what the issue was with the original code.

I removed the TabContentsDelegate::GetBrowser method because it had introduced
an abstraction layering violation.  

See the comments in this review for background: 
http://codereview.chromium.org/434046/show

Jeff
> 
> - a
>

Powered by Google App Engine
This is Rietveld 408576698