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

Issue 1545773002: Address some TODOs for ChooserBubbleDelegate class (Closed)

Created:
5 years ago by juncai
Modified:
4 years, 11 months ago
CC:
chromium-reviews, markusheintz_, msramek+watch_chromium.org, raymes+watch_chromium.org, tfarina, Jeffrey Yasskin
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Address some TODOs for ChooserBubbleDelegate class. This patch did the following changes: 1. Changed ChooserBubbleDelegate::Observer::OnOptionAdded(int index) ChooserBubbleDelegate::Observer::OnOptionRemoved(int index) to ChooserBubbleDelegate::Observer::OnOptionAdded(size_t index) ChooserBubbleDelegate::Observer::OnOptionRemoved(size_t index) 2. Changed ChooserBubbleDelegate::GetOptions() function to two functions: ChooserBubbleDelegate::NumOptions ChooserBubbleDelegate::GetOption(size_t index) to improve class encapsulation. 3. Changed ChooserBubbleDelegate::Select(int index) to: ChooserBubbleDelegate::Select(size_t index) 4. For USB/Bluetooth bubble delegate class, use a vector containing a pair of device information instead of two vectors. 5. Changed code that uses the above functions. BUG=492204, 535633, 535635 Committed: https://crrev.com/7d445832300217e3951ce0dd6f9f569ab4912351 Cr-Commit-Position: refs/heads/master@{#367476}

Patch Set 1 : address some TODOs for ChooserBubbleDelegate class #

Patch Set 2 : merged changes from master and resolved conflicts #

Patch Set 3 : merged changes from master #

Patch Set 4 : removed some TODO comments #

Total comments: 6

Patch Set 5 : address reillyg@'s comments #

Total comments: 31

Patch Set 6 : address pkasting@'s comments #

Patch Set 7 : fix compile error on Mac #

Patch Set 8 : fix compile error on Mac again #

Total comments: 4

Patch Set 9 : updated comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -194 lines) Patch
M chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -13 lines 0 comments Download
M chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc View 1 2 3 4 5 2 chunks +23 lines, -25 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -25 lines 0 comments Download
M chrome/browser/ui/views/website_settings/chooser_bubble_ui_view.cc View 1 2 3 4 5 4 chunks +77 lines, -75 lines 0 comments Download
M chrome/browser/ui/website_settings/chooser_bubble_delegate.h View 1 2 3 4 5 2 chunks +19 lines, -11 lines 0 comments Download
M chrome/browser/usb/usb_chooser_bubble_delegate.h View 1 2 3 4 5 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/usb/usb_chooser_bubble_delegate.cc View 1 2 3 4 5 3 chunks +35 lines, -39 lines 0 comments Download

Messages

Total messages: 23 (11 generated)
juncai
Please review this patch.
4 years, 11 months ago (2016-01-04 17:54:20 UTC) #7
Reilly Grant (use Gerrit)
https://codereview.chromium.org/1545773002/diff/60001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc File chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc (right): https://codereview.chromium.org/1545773002/diff/60001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc#newcode71 chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc:71: device_names_and_ids_.erase(device_names_and_ids_.begin() + index); Change this loop to use an ...
4 years, 11 months ago (2016-01-04 19:00:26 UTC) #8
juncai
https://codereview.chromium.org/1545773002/diff/60001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc File chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc (right): https://codereview.chromium.org/1545773002/diff/60001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc#newcode71 chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc:71: device_names_and_ids_.erase(device_names_and_ids_.begin() + index); On 2016/01/04 19:00:25, Reilly Grant wrote: ...
4 years, 11 months ago (2016-01-04 19:35:55 UTC) #9
Reilly Grant (use Gerrit)
lgtm
4 years, 11 months ago (2016-01-04 20:34:11 UTC) #10
juncai
pkasting@chromium.org: Please review changes in //chrome/browser/ui
4 years, 11 months ago (2016-01-04 20:38:51 UTC) #12
Peter Kasting
https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc File chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc (right): https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc#newcode71 chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc:71: end = device_names_and_ids_.end(); Don't declare a temp for |end|. ...
4 years, 11 months ago (2016-01-04 21:02:52 UTC) #13
juncai
https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc File chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc (right): https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc#newcode71 chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc:71: end = device_names_and_ids_.end(); On 2016/01/04 21:02:51, Peter Kasting wrote: ...
4 years, 11 months ago (2016-01-04 22:44:47 UTC) #14
Peter Kasting
LGTM https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm File chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm (right): https://codereview.chromium.org/1545773002/diff/80001/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm#newcode298 chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm:298: return num_options == 0 ? 1 : static_cast<NSInteger>(num_options); ...
4 years, 11 months ago (2016-01-04 23:54:00 UTC) #15
juncai
https://codereview.chromium.org/1545773002/diff/140001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h File chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h (right): https://codereview.chromium.org/1545773002/diff/140001/chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h#newcode49 chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h:49: // The vector contains device name and device id ...
4 years, 11 months ago (2016-01-05 03:37:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1545773002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1545773002/160001
4 years, 11 months ago (2016-01-05 03:37:55 UTC) #19
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 11 months ago (2016-01-05 03:42:47 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 03:43:43 UTC) #23
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/7d445832300217e3951ce0dd6f9f569ab4912351
Cr-Commit-Position: refs/heads/master@{#367476}

Powered by Google App Engine
This is Rietveld 408576698