Chromium Code Reviews| Index: chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| index 97eb5f57a8c69e4dc60dc633054ae5fa214548fe..0bdce39b744fb7cf9dd10f0580a1563b1c557cf1 100644 |
| --- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| +++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm |
| @@ -2106,19 +2106,18 @@ CGFloat FlipXInView(NSView* view, CGFloat width, CGFloat x) { |
| return; |
| } |
| - //TODO(viettrungluu): dropping multiple URLs. |
| - if ([urls count] > 1) |
| - NOTIMPLEMENTED(); |
| + for (id urlString in [urls reverseObjectEnumerator]) { |
| + GURL url(GURL(url_formatter::FixupURL(base::SysNSStringToUTF8(urlString), |
| + std::string()))); |
|
Avi (use Gerrit)
2016/11/13 22:55:55
FixupURL returns a GURL. That original code makes
shahriar
2016/11/13 23:40:34
Done.
|
| - // Get the first URL and fix it up. |
| - GURL url(GURL(url_formatter::FixupURL( |
| - base::SysNSStringToUTF8([urls objectAtIndex:0]), std::string()))); |
| + // If the URL isn't valid, don't bother. |
| + if (!url.is_valid()) |
| + continue; |
| - // If the URL isn't valid, don't bother. |
| - if (!url.is_valid()) |
| - return; |
| + [self openURL:&url inView:view at:point]; |
| + } |
| - [self openURL:&url inView:view at:point]; |
| + tabStripModel_->ActivateTabAt(tabStripModel_->count() - 1, true); |
| } |
| // (URLDropTargetController protocol) |