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

Issue 2250183002: New Public IdFromWebContents method on TabManager. (Closed)

Created:
4 years, 4 months ago by Anderson Silva
Modified:
4 years, 4 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

New Public IdFromWebContents method on TabManager. Increase readbility by making the method public and therefore clients of TabManager don't need to know how the ids are created. BUG=621960 Committed: https://crrev.com/3b55735a3115817131690dc0607a6f998de23717 Cr-Commit-Position: refs/heads/master@{#412386}

Patch Set 1 #

Total comments: 2

Patch Set 2 : fixed nit #

Total comments: 2

Patch Set 3 : implemented suggestion #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -13 lines) Patch
M chrome/browser/extensions/api/tabs/tabs_test.cc View 1 2 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/memory/tab_manager.h View 1 chunk +4 lines, -0 lines 1 comment Download
M chrome/browser/memory/tab_manager.cc View 1 4 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/memory/tab_manager_observer_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 21 (12 generated)
Anderson Silva
cleaning up my bug list! ptal
4 years, 4 months ago (2016-08-16 18:06:26 UTC) #5
Georges Khalil
lgtm % nit https://codereview.chromium.org/2250183002/diff/1/chrome/browser/memory/tab_manager.cc File chrome/browser/memory/tab_manager.cc (right): https://codereview.chromium.org/2250183002/diff/1/chrome/browser/memory/tab_manager.cc#newcode349 chrome/browser/memory/tab_manager.cc:349: return DiscardTabById(TabManager::IdFromWebContents(contents)); nit: remove TabManager::
4 years, 4 months ago (2016-08-16 21:18:29 UTC) #8
Anderson Silva
Hi Devlin, can you please take a look at this CL? Thanks https://codereview.chromium.org/2250183002/diff/1/chrome/browser/memory/tab_manager.cc File chrome/browser/memory/tab_manager.cc ...
4 years, 4 months ago (2016-08-16 21:37:51 UTC) #11
Devlin
lgtm with an optional suggestion https://codereview.chromium.org/2250183002/diff/20001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2250183002/diff/20001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode1364 chrome/browser/extensions/api/tabs/tabs_test.cc:1364: memory::TabManager::IdFromWebContents(web_contents_a))); We could make ...
4 years, 4 months ago (2016-08-16 22:56:06 UTC) #12
Anderson Silva
thanks! submitting it to CQ https://codereview.chromium.org/2250183002/diff/20001/chrome/browser/extensions/api/tabs/tabs_test.cc File chrome/browser/extensions/api/tabs/tabs_test.cc (right): https://codereview.chromium.org/2250183002/diff/20001/chrome/browser/extensions/api/tabs/tabs_test.cc#newcode1364 chrome/browser/extensions/api/tabs/tabs_test.cc:1364: memory::TabManager::IdFromWebContents(web_contents_a))); On 2016/08/16 22:56:06, ...
4 years, 4 months ago (2016-08-16 23:13:31 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2250183002/40001
4 years, 4 months ago (2016-08-16 23:14:18 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 4 months ago (2016-08-17 00:00:00 UTC) #18
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/3b55735a3115817131690dc0607a6f998de23717 Cr-Commit-Position: refs/heads/master@{#412386}
4 years, 4 months ago (2016-08-17 00:01:59 UTC) #20
Devlin
4 years, 4 months ago (2016-08-17 00:02:44 UTC) #21
Message was sent while issue was closed.
non-blocking drive-by - feel free to ignore or fix in a followup.

https://codereview.chromium.org/2250183002/diff/40001/chrome/browser/memory/t...
File chrome/browser/memory/tab_manager.h (right):

https://codereview.chromium.org/2250183002/diff/40001/chrome/browser/memory/t...
chrome/browser/memory/tab_manager.h:115: content::WebContents*
DiscardTabByExtension(content::WebContents* contents);
drive-by: It might make sense to rename this method to be something like
DiscardTabWithWebContents() so that readers don't assume that either a) it
should only be used by extensions or b) it does some kind of attribution to
extensions.  I'd probably also omit the part about "used by the extensions API"
- method descriptions should typically describe the behavior rather than the
call sites (unless there's a reason to limit the call site, as in cases where we
might say "Only use this if it's attributable to an extension, etc).

Powered by Google App Engine
This is Rietveld 408576698